From 0f45da2eff1a348210e2300d4dbc0d73f941236d Mon Sep 17 00:00:00 2001 From: Zack Jackson <25274700+ScriptedAlchemy@users.noreply.github.com> Date: Sat, 24 Oct 2026 01:21:51 -0700 Subject: [PATCH 1/4] fix(sdk): bound SSE frames and scan fragmented lines once Bound raw lines and retained event fields to the existing Rust SDK policy. Scan transport bytes once through a fixed line buffer, preserving UTF-8, CRLF and persistent IDs while refusing overflow before further reads. Add shared Rust/TypeScript framing fixtures and public-client regression checks, and regenerate the embedded extension server through its owner. Fixes #4411. --- crates/tracedecay-sdk/src/client.rs | 4 +- .../tests/fixtures/sse-framing.json | 77 ++++++ .../tracedecay-sdk/tests/sdk_suite/client.rs | 82 +++++++ sdks/typescript/README.md | 17 ++ sdks/typescript/src/client.ts | 112 +++++---- sdks/typescript/test/sse-framing.test.ts | 223 ++++++++++++++++++ 6 files changed, 465 insertions(+), 50 deletions(-) create mode 100644 crates/tracedecay-sdk/tests/fixtures/sse-framing.json create mode 100644 sdks/typescript/test/sse-framing.test.ts diff --git a/crates/tracedecay-sdk/src/client.rs b/crates/tracedecay-sdk/src/client.rs index 662571d320..5b99702f97 100644 --- a/crates/tracedecay-sdk/src/client.rs +++ b/crates/tracedecay-sdk/src/client.rs @@ -26,8 +26,8 @@ const MAX_OPAQUE_BYTES: usize = 4_096; const MAX_REQUEST_ID_BYTES: usize = 512; /// Bound on one raw SSE line and on the event/id/data bytes retained for one /// frame before JSON decoding. Every canonical frame is a single JSON object of -/// bounded metadata, request and operation identifiers (≤ 512 bytes), a -/// sequence, a frontier with a 32-byte resume key, or a terminal receipt, so +/// bounded metadata, request and operation identifiers (≤ 512 bytes), a test +/// name (≤ 1 KiB), a sequence, a frontier or a terminal receipt, so /// 64 KiB leaves wide headroom while capping what a peer can make the client /// retain. const MAX_SSE_FRAME_BYTES: usize = 64 * 1024; diff --git a/crates/tracedecay-sdk/tests/fixtures/sse-framing.json b/crates/tracedecay-sdk/tests/fixtures/sse-framing.json new file mode 100644 index 0000000000..7beef8c212 --- /dev/null +++ b/crates/tracedecay-sdk/tests/fixtures/sse-framing.json @@ -0,0 +1,77 @@ +{ + "limit_bytes": 65536, + "cases": [ + { + "name": "data line including LF exceeds the limit", + "outcome": "oversized", + "prefix": "event: item\nid: 0\ndata: ", + "repeat": "a", + "count": 65530, + "suffix": "\n\n" + }, + { + "name": "comment including LF exceeds the limit", + "outcome": "oversized", + "prefix": ":", + "repeat": "a", + "count": 65535, + "suffix": "\n\n" + }, + { + "name": "unknown field including CRLF exceeds the limit", + "outcome": "oversized", + "prefix": "unknown: ", + "repeat": "a", + "count": 65526, + "suffix": "\r\n\r\n" + }, + { + "name": "many small data fields exceed retained frame bytes", + "outcome": "oversized", + "prefix": "event: item\nid: 0\n", + "repeat": "data: abcdefghijklmnopqrstuvwxyz0123456789\n", + "count": 1800, + "suffix": "\n" + }, + { + "name": "event value exceeds the line limit", + "outcome": "oversized", + "prefix": "event: ", + "repeat": "a", + "count": 65529, + "suffix": "\n\n" + }, + { + "name": "id value exceeds the line limit", + "outcome": "oversized", + "prefix": "id: ", + "repeat": "a", + "count": 65532, + "suffix": "\n\n" + }, + { + "name": "comment exactly at the raw LF line limit", + "outcome": "valid", + "prefix": ":", + "repeat": "a", + "count": 65534, + "suffix": "\n\n" + }, + { + "name": "unknown field exactly at the raw CRLF line limit", + "outcome": "valid", + "prefix": "unknown: ", + "repeat": "a", + "count": 65525, + "suffix": "\r\n\r\n" + }, + { + "name": "near-limit multiline UTF-8 data", + "outcome": "valid_open", + "prefix": "event: open\ndata: {\"event\":\"open\",\"data\":{\"correlation_id\":\"request.operation\",\ndata: \"padding\":\"", + "repeat": "🙂", + "count": 16320, + "suffix": "\"\ndata: ,\"frontier\":{\"next_sequence\":0,\"retained_from_sequence\":0,\"resume_token\":\"resume\"}}}\n\n" + } + ] +} diff --git a/crates/tracedecay-sdk/tests/sdk_suite/client.rs b/crates/tracedecay-sdk/tests/sdk_suite/client.rs index 2ae1b2d6e5..70773f1d9b 100644 --- a/crates/tracedecay-sdk/tests/sdk_suite/client.rs +++ b/crates/tracedecay-sdk/tests/sdk_suite/client.rs @@ -715,6 +715,88 @@ const SSE_OPEN_FRAME: &str = concat!( "\"resume_token\":\"resume\"}}}\n\n" ); +#[test] +fn sse_framing_policy_matches_the_typescript_client() { + #[derive(serde::Deserialize)] + struct FramingCase { + name: String, + outcome: String, + prefix: String, + repeat: String, + count: usize, + suffix: String, + } + #[derive(serde::Deserialize)] + struct FramingFixtures { + limit_bytes: usize, + cases: Vec, + } + let fixtures: FramingFixtures = + serde_json::from_str(include_str!("../fixtures/sse-framing.json")).unwrap(); + assert_eq!(fixtures.limit_bytes, SSE_FRAME_LIMIT_BYTES); + for fixture in fixtures.cases { + let fragment = format!( + "{}{}{}", + fixture.prefix, + fixture.repeat.repeat(fixture.count), + fixture.suffix + ); + let body = if fixture.outcome == "valid_open" { + fragment + } else { + format!("{SSE_OPEN_FRAME}{fragment}") + }; + if fixture.outcome == "oversized" { + let base_url = serve_abandonable_event_stream(body); + let client = + Client::builder(ConnectionMode::local(&base_url, "project.sdk", "sdk-token")) + .build() + .unwrap(); + let mut stream = client + .stream_operation( + "request.operation", + StreamOptions { + resume: None, + max_reconnects: 3, + }, + ) + .unwrap(); + assert_eq!(stream.next().unwrap().unwrap().event, "open"); + assert!( + matches!( + stream.next(), + Some(Err(ClientError::StreamFrameTooLarge { + limit_bytes: SSE_FRAME_LIMIT_BYTES + })) + ), + "{} must refuse before delivery", + fixture.name + ); + assert!( + stream.next().is_none(), + "{} must not reconnect", + fixture.name + ); + } else { + let body = format!("{body}{}", terminal_frame("completed", "completed")); + let (base_url, server) = serve(vec![event_response(&body)]); + let client = + Client::builder(ConnectionMode::local(&base_url, "project.sdk", "sdk-token")) + .build() + .unwrap(); + let events = client + .stream_operation("request.operation", StreamOptions::default()) + .unwrap() + .collect::, _>>() + .unwrap_or_else(|error| panic!("{}: {error}", fixture.name)); + assert_eq!(events.len(), 2, "{}", fixture.name); + assert_eq!(events[0].event, "open", "{}", fixture.name); + assert!(events[1].terminal(), "{}", fixture.name); + server.join().unwrap(); + } + } +} + #[test] fn oversized_sse_lines_and_frames_are_refused_without_delivery_or_reconnect() { let single_line = format!( diff --git a/sdks/typescript/README.md b/sdks/typescript/README.md index 6e03a92392..e34077101e 100644 --- a/sdks/typescript/README.md +++ b/sdks/typescript/README.md @@ -90,3 +90,20 @@ installing code. Prerelease package versions publish under the `beta` dist-tag; stable versions take `latest`. Setting `TRACEDECAY_SDK_TARBALL` to a prebuilt tarball path makes `test:installed` exercise that tarball instead of packing its own. + +## Event-stream framing limits + +The TypeScript and Rust clients use the same 64 KiB allowance for each raw SSE +line, including its CR/LF ending, and for the UTF-8 event, ID and data bytes +retained for a frame. Data-line separators count toward the frame allowance; +replacement fields use the Rust client's conservative one-byte allowance. +An inherited last-event ID stays charged until replaced or cleared. Canonical +accepted-operation metadata, test-result names (at most 1 KiB), progress, +frontiers, gaps and terminal receipts fit within this policy. + +The TypeScript client scans transport bytes once into a bounded line buffer, +including when a transport supplies one large chunk. One byte of lookahead +detects a line overflow. Oversized comments and unknown fields are refused too. +Overflow throws `TraceDecayMalformedResponseError` with `payload.limitBytes`, +cancels the response body and never reconnects or delivers the oversized frame. +Transport-owned chunks are outside the parser's retained-state allowance. diff --git a/sdks/typescript/src/client.ts b/sdks/typescript/src/client.ts index 5d18b9b8a8..5b8bb64e40 100644 --- a/sdks/typescript/src/client.ts +++ b/sdks/typescript/src/client.ts @@ -171,6 +171,11 @@ const MAX_PAGE_SIZE = 1_000; const MAX_OPAQUE_CURSOR_BYTES = 4_096; const MAX_RESUME_TOKEN_BYTES = 4_096; const MAX_REQUEST_ID_BYTES = 512; +// Match the Rust SDK's raw-line and retained event/id/data policy. Accepted +// identifiers (512 bytes), test names (1 KiB), frontiers and terminal receipts +// fit comfortably within 64 KiB, including JSON escaping. Raw line endings +// count too; one additional byte detects overflow without retaining it. +const MAX_SSE_FRAME_BYTES = 64 * 1024; const MAX_U64 = 18_446_744_073_709_551_615n; const UTF8_ENCODER = new TextEncoder(); @@ -369,16 +374,38 @@ async function* parseSse( ): AsyncGenerator { const reader = body.getReader(); const decoder = new TextDecoder("utf-8", { fatal: true }); - let buffer = ""; + const lineBuffer = new Uint8Array(MAX_SSE_FRAME_BYTES); + let lineBytes = 0; + let previousLineBytes = 0; + let skipLf = false; let eventType = ""; + let eventBytes = 0; let lastEventId = initialLastEventId ?? ""; + let idBytes = UTF8_ENCODER.encode(lastEventId).byteLength; let data: string[] = []; + let dataBytes = 0; let pendingFields = false; let retryDelayMs: number | undefined; + const oversized = () => new TraceDecayMalformedResponseError( + `the daemon returned an SSE line or frame exceeding ${MAX_SSE_FRAME_BYTES} bytes`, + { payload: { limitBytes: MAX_SSE_FRAME_BYTES } }, + ); + const decodeUtf8 = (bytes: Uint8Array, stream: boolean): string => { + try { + return decoder.decode(bytes, { stream }); + } catch (cause) { + throw new TraceDecayMalformedResponseError( + "the daemon returned malformed UTF-8 event-stream data", + { payload: cause }, + ); + } + }; + const consumeLine = (line: string): SseFrame | null => { if (line === "") { pendingFields = false; + eventBytes = 0; if (data.length === 0) { eventType = ""; return null; @@ -391,6 +418,7 @@ async function* parseSse( }; eventType = ""; data = []; + dataBytes = 0; return result; } if (line.startsWith(":")) { @@ -403,16 +431,29 @@ async function* parseSse( if (fieldValue.startsWith(" ")) { fieldValue = fieldValue.slice(1); } + const valueBytes = UTF8_ENCODER.encode(fieldValue).byteLength; + if ( + (field === "event" || field === "id" || field === "data") && + eventBytes + idBytes + dataBytes + valueBytes + 1 > MAX_SSE_FRAME_BYTES + ) { + // Keep the Rust client's conservative replacement allowance and count + // the separator before extending data. Persistent IDs retain their + // charge across empty frames and dispatch boundaries. + throw oversized(); + } switch (field) { case "event": eventType = fieldValue; + eventBytes = valueBytes; break; case "id": if (!fieldValue.includes("\0")) { lastEventId = fieldValue; + idBytes = valueBytes; } break; case "data": + dataBytes += valueBytes + (data.length === 0 ? 0 : 1); data.push(fieldValue); break; case "retry": @@ -428,65 +469,40 @@ async function* parseSse( return null; }; - const lines = function* (atEnd: boolean): Generator { - for (;;) { - let boundary = -1; - for (let index = 0; index < buffer.length; index += 1) { - if (buffer[index] === "\r" || buffer[index] === "\n") { - boundary = index; - break; - } - } - if (boundary < 0) { - return; - } - if (buffer[boundary] === "\r" && boundary === buffer.length - 1 && !atEnd) { - return; - } - const line = buffer.slice(0, boundary); - const width = - buffer[boundary] === "\r" && buffer[boundary + 1] === "\n" ? 2 : 1; - buffer = buffer.slice(boundary + width); - yield line; - } - }; - try { for (;;) { const chunk = await reader.read(); if (chunk.done) { - try { - buffer += decoder.decode(); - } catch (cause) { - throw new TraceDecayMalformedResponseError( - "the daemon returned malformed UTF-8 event-stream data", - { payload: cause }, - ); - } - for (const line of lines(true)) { - const frame = consumeLine(line); - if (frame !== null) { - yield frame; - } - } + decodeUtf8(lineBuffer.subarray(0, lineBytes), false); break; } - try { - buffer += decoder.decode(chunk.value, { stream: true }); - } catch (cause) { - throw new TraceDecayMalformedResponseError( - "the daemon returned malformed UTF-8 event-stream data", - { payload: cause }, - ); - } - for (const line of lines(false)) { + // Inspect each incoming byte once and copy only into the bounded line. + // A transport may supply a huge chunk; never decode or retain it whole. + for (let index = 0; index < chunk.value.length; index += 1) { + const byte = chunk.value[index]; + if (skipLf) { + skipLf = false; + if (byte === 10) { + if (previousLineBytes === MAX_SSE_FRAME_BYTES) throw oversized(); + continue; + } + } + if (lineBytes === MAX_SSE_FRAME_BYTES) throw oversized(); + lineBuffer[lineBytes++] = byte; + if (byte !== 10 && byte !== 13) continue; + // Decode the delimiter too, so a malformed code point cannot straddle + // lines. One decoder preserves BOM handling for the whole stream. + const line = decodeUtf8(lineBuffer.subarray(0, lineBytes), true).slice(0, -1); + previousLineBytes = lineBytes; + lineBytes = 0; + skipLf = byte === 13; const frame = consumeLine(line); if (frame !== null) { yield frame; } } } - if (buffer.length > 0 || pendingFields || data.length > 0) { + if (lineBytes > 0 || pendingFields || data.length > 0) { throw new TraceDecayDisconnectedError( "operation stream ended with an incomplete SSE event", ); diff --git a/sdks/typescript/test/sse-framing.test.ts b/sdks/typescript/test/sse-framing.test.ts new file mode 100644 index 0000000000..7beb0eb353 --- /dev/null +++ b/sdks/typescript/test/sse-framing.test.ts @@ -0,0 +1,223 @@ +import { readFileSync } from "node:fs"; + +import { describe, expect, it, vi } from "vitest"; + +import { + createClient, + TraceDecayMalformedResponseError, + type OperationStreamEvent, +} from "../src/client"; + +const ENCODER = new TextEncoder(); +const FIXTURES = JSON.parse(readFileSync(new URL( + "../../../crates/tracedecay-sdk/tests/fixtures/sse-framing.json", + import.meta.url, +), "utf8")) as { + limit_bytes: number; + cases: Array<{ + name: string; + outcome: "oversized" | "valid" | "valid_open"; + prefix: string; + repeat: string; + count: number; + suffix: string; + }>; +}; +const LIMIT = FIXTURES.limit_bytes; +const OPEN = "event: open\ndata: " + JSON.stringify({ + event: "open", + data: { + correlation_id: "request.operation", + frontier: { next_sequence: 0, retained_from_sequence: 0, resume_token: "resume" }, + }, +}) + "\n\n"; +const TERMINAL = "event: completed\nid: 0\ndata: " + JSON.stringify({ + event: "completed", + data: { + sequence: 0, + terminal: { + termination: "completed", + receipt: { + started_at: 1, ended_at: 2, effective_deadline: { expires_at: 3 }, + cancellation: null, + budget: { units_consumed: 1, bytes_consumed: 1, elapsed_micros: 1 }, + termination: "completed", + }, + }, + }, +}) + "\n\n"; + +function controlledStream(chunks: Iterable, cancellationError?: Error) { + const source = chunks[Symbol.iterator](); + let pulls = 0; + let cancelled = 0; + let requests = 0; + const body = new ReadableStream({ + pull(controller) { + pulls += 1; + const chunk = source.next(); + if (chunk.done) { + controller.error(new Error("the client read past the supplied frames")); + } else { + controller.enqueue(chunk.value); + } + }, + cancel() { + cancelled += 1; + if (cancellationError !== undefined) throw cancellationError; + }, + }, { highWaterMark: 0 }); + const response = new Response(body, { headers: { "content-type": "text/event-stream" } }); + const client = createClient({ + baseUrl: "http://127.0.0.1:4317", projectId: "project.sdk", token: "sdk-secret", + fetch: async () => { + requests += 1; + if (requests > 1) throw new Error("unexpected reconnect"); + return response; + }, + }); + const events: OperationStreamEvent[] = []; + const iterator = client.streamOperation("request.operation", { maxReconnects: 3 }); + return { + events, + iterator, + async collect() { + for await (const event of iterator) events.push(event); + return events; + }, + state: () => ({ pulls, cancelled, requests, locked: body.locked }), + }; +} + +function* fragment(bytes: Uint8Array, size: number): Generator { + for (let offset = 0; offset < bytes.length; offset += size) { + yield bytes.subarray(offset, offset + size); + } +} + +describe("bounded operation SSE framing", () => { + it.each(FIXTURES.cases.filter((fixture) => fixture.outcome === "oversized"))( + "refuses $name without reading on or reconnecting", + async (fixture) => { + const bytes = ENCODER.encode(fixture.prefix + fixture.repeat.repeat(fixture.count) + fixture.suffix); + const stream = controlledStream([ENCODER.encode(OPEN), bytes]); + await expect(stream.collect()).rejects.toMatchObject({ + name: "TraceDecayMalformedResponseError", + message: `the daemon returned an SSE line or frame exceeding ${LIMIT} bytes`, + payload: { limitBytes: LIMIT }, + }); + expect(stream.events.map((event) => event.event)).toEqual(["open"]); + expect(stream.state()).toEqual({ pulls: 2, cancelled: 1, requests: 1, locked: false }); + expect(await stream.iterator.next()).toEqual({ done: true, value: undefined }); + }, + ); + + it.each(FIXTURES.cases.filter((fixture) => fixture.outcome !== "oversized"))( + "accepts $name across transport boundaries", + async (fixture) => { + const frame = fixture.prefix + fixture.repeat.repeat(fixture.count) + fixture.suffix; + const body = (fixture.outcome === "valid_open" ? "" : OPEN) + frame + TERMINAL; + const stream = controlledStream(fragment(ENCODER.encode(body), 127)); + expect((await stream.collect()).map((event) => event.event)).toEqual(["open", "completed"]); + expect(stream.state()).toMatchObject({ cancelled: 1, requests: 1, locked: false }); + }, + ); + + it("preserves the size failure when cancellation also fails", async () => { + const stream = controlledStream([ + ENCODER.encode(OPEN), ENCODER.encode(":" + "x".repeat(LIMIT)), + ], new Error("cancel failed")); + await expect(stream.collect()).rejects.toMatchObject({ + name: "TraceDecayMalformedResponseError", payload: { limitBytes: LIMIT }, + }); + expect(stream.state()).toEqual({ pulls: 2, cancelled: 1, requests: 1, locked: false }); + }); + + it("counts a split CRLF as part of the bounded raw line", async () => { + const stream = controlledStream([ + ENCODER.encode(OPEN), ENCODER.encode(":" + "x".repeat(LIMIT - 2) + "\r"), + ENCODER.encode("\n"), + ]); + await expect(stream.collect()).rejects.toMatchObject({ payload: { limitBytes: LIMIT } }); + expect(stream.state()).toEqual({ pulls: 3, cancelled: 1, requests: 1, locked: false }); + }); + + it("refuses oversized combined fields before a dispatch delimiter", async () => { + const stream = controlledStream([ + ENCODER.encode(OPEN), + ENCODER.encode(`event: ${"e".repeat(32_768)}\nid: ${"1".repeat(32_768)}\n`), + ]); + await expect(stream.collect()).rejects.toMatchObject({ payload: { limitBytes: LIMIT } }); + expect(stream.state()).toEqual({ pulls: 2, cancelled: 1, requests: 1, locked: false }); + }); + + it("preserves the last event ID across empty frames without retaining old data", async () => { + const body = OPEN + "id: 0\n\n: heartbeat\r\n\r\n" + TERMINAL.replace("id: 0\n", ""); + const stream = controlledStream(fragment(ENCODER.encode(body), 1)); + expect((await stream.collect()).map((event) => event.id)).toEqual([null, "0"]); + }); + + it("keeps malformed split UTF-8 a non-retryable protocol failure", async () => { + const stream = controlledStream([ + ENCODER.encode(OPEN), ENCODER.encode("data: "), Uint8Array.of(0xc3), + Uint8Array.of(0x0a, 0xa9, 0x0a), + ]); + await expect(stream.collect()).rejects.toBeInstanceOf(TraceDecayMalformedResponseError); + expect(stream.state()).toMatchObject({ cancelled: 1, requests: 1, locked: false }); + }); + + it("strips only the initial BOM and preserves later field prefixes", async () => { + const body = "\uFEFF" + OPEN + "id: 0\n\n\uFEFFid: 1\n\n" + TERMINAL.replace("id: 0\n", ""); + const stream = controlledStream(fragment(ENCODER.encode(body), 1)); + expect((await stream.collect()).map((event) => event.id)).toEqual([null, "0"]); + }); + + it("bounds decoding even when a transport supplies one huge chunk", async () => { + const stream = controlledStream([ + ENCODER.encode(OPEN), ENCODER.encode(":" + "x".repeat(LIMIT * 4)), + ]); + const decoding = vi.spyOn(TextDecoder.prototype, "decode"); + try { + await expect(stream.collect()).rejects.toMatchObject({ payload: { limitBytes: LIMIT } }); + const decodedBytes = decoding.mock.calls.map(([input]) => input?.byteLength ?? 0); + expect(decodedBytes.length).toBeGreaterThan(0); + expect(Math.max(...decodedBytes)).toBeLessThanOrEqual(LIMIT); + expect(decodedBytes.reduce((sum, bytes) => sum + bytes, 0)).toBeLessThan(LIMIT); + expect(stream.state()).toEqual({ pulls: 2, cancelled: 1, requests: 1, locked: false }); + } finally { + decoding.mockRestore(); + } + }); + + it("inspects fragmented partial lines once per byte", async () => { + for (const length of [4096, 8192]) { + const bytes = ENCODER.encode(OPEN + ":" + "x".repeat(length) + "\n" + TERMINAL); + let inspected = 0; + function* observedChunks() { + for (const chunk of fragment(bytes, 1)) { + // Observe real byte access without adding counters or test hooks to + // the parser. The backing bytes and public stream path are unchanged. + yield new Proxy(chunk, { + get(target, key) { + if (typeof key === "string" && /^[0-9]+$/.test(key)) inspected += 1; + const value = Reflect.get(target, key, target); + return typeof value === "function" ? value.bind(target) : value; + }, + }); + } + } + const stream = controlledStream(observedChunks()); + expect((await stream.collect()).map((event) => event.event)).toEqual(["open", "completed"]); + expect(inspected).toBe(bytes.length); + } + }); + + it("continues accounting for an inherited ID after an empty frame", async () => { + const stream = controlledStream([ + ENCODER.encode(OPEN), + ENCODER.encode(`id: ${"1".repeat(40_000)}\n\nevent: ${"e".repeat(25_000)}\ndata: ${"d".repeat(1000)}\n`), + ]); + await expect(stream.collect()).rejects.toMatchObject({ payload: { limitBytes: LIMIT } }); + expect(stream.state()).toEqual({ pulls: 2, cancelled: 1, requests: 1, locked: false }); + }); +}); From ce7e605ab6febf48a7a0d5b15320eb08b89956b0 Mon Sep 17 00:00:00 2001 From: Zack Jackson Date: Sat, 24 Oct 2026 01:59:29 -0700 Subject: [PATCH 2/4] fix(sdk): declare shared SSE fixture in Bazel runfiles --- crates/tracedecay-sdk/BUILD.bazel | 8 ++++++++ scripts/bazel/gen_builds.py | 8 ++++++++ sdks/typescript/BUILD.bazel | 2 +- 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/crates/tracedecay-sdk/BUILD.bazel b/crates/tracedecay-sdk/BUILD.bazel index cf0803fbb1..012b6a99e0 100644 --- a/crates/tracedecay-sdk/BUILD.bazel +++ b/crates/tracedecay-sdk/BUILD.bazel @@ -8,6 +8,8 @@ load("@rules_rust//cargo:defs.bzl", "cargo_build_script") load("@rules_rust//rust:defs.bzl", "rust_binary", "rust_library") load("//scripts:bazel/rust_test.bzl", "perf_rustc_flags", "rust_test") +load("@aspect_rules_js//js:defs.bzl", "js_library") + rust_library( name = "tracedecay-sdk", srcs = glob(["src/**/*.rs"]), @@ -90,6 +92,12 @@ exports_files(["src/bin/generate.rs", "src/codegen.rs", "src/operations.rs"], visibility = ["//visibility:public"], ) +js_library( + name = "sse_framing_fixture", + srcs = ["tests/fixtures/sse-framing.json"], + visibility = ["//visibility:public"], +) + filegroup( name = "rustfmt_sources_2024", srcs = depset(glob(["src/**/*.rs"]) + glob(["tests/**/*.rs"], exclude = ["tests/fixtures/**"]) + ["//tests:support_sources"] + glob(["tests/sdk_suite/**/*.rs"]) + ["//tests:support_sources"]).to_list(), diff --git a/scripts/bazel/gen_builds.py b/scripts/bazel/gen_builds.py index 5b35e20daa..366be494d0 100755 --- a/scripts/bazel/gen_builds.py +++ b/scripts/bazel/gen_builds.py @@ -1025,6 +1025,8 @@ def unique_name(want): 'load("@rules_rust//rust:defs.bzl", "rust_binary", "rust_library")\n' 'load("//scripts:bazel/rust_test.bzl", "perf_rustc_flags", "rust_test")\n' ) + if name == "tracedecay-sdk": + out.append('load("@aspect_rules_js//js:defs.bzl", "js_library")\n') if lib_t: for (vkind, closure), vfmap in sorted( @@ -1387,6 +1389,12 @@ def unique_name(want): 'exports_files(["src/bin/generate.rs", "src/codegen.rs", "src/operations.rs"],', ' visibility = ["//visibility:public"],', ')\n', + # rules_js copies shared test data in its owning package. + 'js_library(', + ' name = "sse_framing_fixture",', + ' srcs = ["tests/fixtures/sse-framing.json"],', + ' visibility = ["//visibility:public"],', + ')\n', ] out.extend(formatting_rules(dir_of[name], formatting_sources)) return "\n".join(out) diff --git a/sdks/typescript/BUILD.bazel b/sdks/typescript/BUILD.bazel index 3114450724..3efb386b59 100644 --- a/sdks/typescript/BUILD.bazel +++ b/sdks/typescript/BUILD.bazel @@ -34,7 +34,7 @@ js_binary( vitest_bin.vitest_test( name = "unit_test", - data = [":pkg", ":node_modules"] + glob(["test/**", "*.json", "*.ts"]), + data = [":pkg", ":node_modules", "//crates/tracedecay-sdk:sse_framing_fixture"] + glob(["test/**", "*.json", "*.ts"]), args = ["run", "--exclude", "test/installed-package.test.ts"], chdir = package_name(), ) From f1d2bd8a8b2dd5dc8b349bab0655dd826bc07a6f Mon Sep 17 00:00:00 2001 From: ScriptedAlchemy Date: Sat, 24 Oct 2026 15:06:56 +0000 Subject: [PATCH 3/4] build(plugin): regenerate chatgpt embed after SSE rebase --- plugin/chatgpt-extension/embedded/server.mjs | 32 ++++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/plugin/chatgpt-extension/embedded/server.mjs b/plugin/chatgpt-extension/embedded/server.mjs index 0968ef0934..dc4a426901 100644 --- a/plugin/chatgpt-extension/embedded/server.mjs +++ b/plugin/chatgpt-extension/embedded/server.mjs @@ -1,6 +1,6 @@ -let e,t,r,i,o,n,a,s,d,c,l,p,u,m,f,h,y,g,_,v,b,$,S,k,w;import{randomBytes as V,timingSafeEqual as P}from"node:crypto";import{realpathSync as R}from"node:fs";import{chmod as q,mkdir as I,readFile as x,rm as j,writeFile as C}from"node:fs/promises";import{createServer as T}from"node:http";import O,{join as E}from"node:path";import{pathToFileURL as A}from"node:url";import{parseArgs as W}from"node:util";import M from"node:process";import"http";import{Http2ServerRequest as N,constants as z}from"http2";import{Readable as D}from"stream";import F from"crypto";import L from"node:os";import{AsyncLocalStorage as U}from"node:async_hooks";import{PassThrough as H}from"node:stream";import{createRequire as G}from"node:module";let B=G(import.meta.url);var K,J,Z,Q,X,Y,ee,et,er,ei,eo,en,ea,es,ed={},ec={};function el(e){var t=ec[e];if(void 0!==t)return t.exports;var r=ec[e]={exports:{}};return ed[e](r,r.exports,el),r.exports}el.m=ed,el.d=(e,t,r)=>{var i=(t,r)=>{for(var i in t)el.o(t,i)&&!el.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,[r]:t[i]})};i(t,"get"),i(r,"value")},el.add=function(e){Object.assign(el.m,e)},el.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),el.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},el.add({"../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/index.js"(e,t,r){let i=B("child_process"),o=r("../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/parse.js"),n=r("../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/enoent.js");function a(e,t,r){let a=o(e,t,r),s=i.spawn(a.command,a.args,a.options);return n.hookChildProcess(s,a),s}e.exports=a,e.exports.spawn=a,e.exports.sync=function(e,t,r){let a=o(e,t,r),s=i.spawnSync(a.command,a.args,a.options);return s.error=s.error||n.verifyENOENTSync(s.status,a),s},e.exports._parse=o,e.exports._enoent=n},"../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/enoent.js"(e){let t="win32"===process.platform;function r(e,t){return Object.assign(Error(`${t} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}function i(e,i){return t&&1===e&&!i.file?r(i.original,"spawn"):null}e.exports={hookChildProcess:function(e,r){if(!t)return;let o=e.emit;e.emit=function(t,n){if("exit"===t){let t=i(n,r);if(t)return o.call(e,"error",t)}return o.apply(e,arguments)}},verifyENOENT:i,verifyENOENTSync:function(e,i){return t&&1===e&&!i.file?r(i.original,"spawnSync"):null},notFoundError:r}},"../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/parse.js"(e,t,r){let i=B("path"),o=r("../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/resolveCommand.js"),n=r("../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/escape.js"),a=r("../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/readShebang.js"),s="win32"===process.platform,d=/\.(?:com|exe)$/i,c=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;e.exports=function(e,t,r){t&&!Array.isArray(t)&&(r=t,t=null);let l={command:e,args:t=t?t.slice(0):[],options:r=Object.assign({},r),file:void 0,original:{command:e,args:t}};return r.shell?l:function(e){let t;if(!s)return e;let r=(e.file=o(e),(t=e.file&&a(e.file))?(e.args.unshift(e.file),e.command=t,o(e)):e.file),l=!d.test(r);if(e.options.forceShell||l){let t=c.test(r);e.command=i.normalize(e.command),e.command=n.command(e.command),e.args=e.args.map(e=>n.argument(e,t));let o=[e.command].concat(e.args).join(" ");e.args=["/d","/s","/c",`"${o}"`],e.command=process.env.comspec||"cmd.exe",e.options.windowsVerbatimArguments=!0}return e}(l)}},"../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/escape.js"(e){let t=/([()\][%!^"`<>&|;, *?])/g;e.exports.command=function(e){return e.replace(t,"^$1")},e.exports.argument=function(e,r){return e=(e=(e=`${e}`).replace(/(?=(\\+?)?)\1"/g,'$1$1\\"')).replace(/(?=(\\+?)?)\1$/,"$1$1"),e=(e=`"${e}"`).replace(t,"^$1"),r&&(e=e.replace(t,"^$1")),e}},"../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/readShebang.js"(e,t,r){let i=B("fs"),o=r("../../node_modules/.pnpm/shebang-command@2.0.0/node_modules/shebang-command/index.js");e.exports=function(e){let t,r=Buffer.alloc(150);try{t=i.openSync(e,"r"),i.readSync(t,r,0,150,0),i.closeSync(t)}catch(e){}return o(r.toString())}},"../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/resolveCommand.js"(e,t,r){let i=B("path"),o=r("../../node_modules/.pnpm/which@2.0.2/node_modules/which/which.js"),n=r("../../node_modules/.pnpm/path-key@3.1.1/node_modules/path-key/index.js");function a(e,t){let r,a=e.options.env||process.env,s=process.cwd(),d=null!=e.options.cwd,c=d&&void 0!==process.chdir&&!process.chdir.disabled;if(c)try{process.chdir(e.options.cwd)}catch(e){}try{r=o.sync(e.command,{path:a[n({env:a})],pathExt:t?i.delimiter:void 0})}catch(e){}finally{c&&process.chdir(s)}return r&&(r=i.resolve(d?e.options.cwd:"",r)),r}e.exports=function(e){return a(e)||a(e,!0)}},"../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js"(e,t,r){var i;function o(e,t,r){if("function"==typeof t&&(r=t,t={}),!r){if("function"!=typeof Promise)throw TypeError("callback not provided");return new Promise(function(r,i){o(e,t||{},function(e,t){e?i(e):r(t)})})}i(e,t||{},function(e,i){e&&("EACCES"===e.code||t&&t.ignoreErrors)&&(e=null,i=!1),r(e,i)})}B("fs"),i="win32"===process.platform||global.TESTING_WINDOWS?r("../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js"):r("../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js"),e.exports=o,o.sync=function(e,t){try{return i.sync(e,t||{})}catch(e){if(t&&t.ignoreErrors||"EACCES"===e.code)return!1;throw e}}},"../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js"(e){e.exports=r,r.sync=function(e,r){return i(t.statSync(e),r)};var t=B("fs");function r(e,r,o){t.stat(e,function(e,t){o(e,!e&&i(t,r))})}function i(e,t){var r,i,o,n,a,s,d,c,l;return e.isFile()&&(r=e,i=t,o=r.mode,n=r.uid,a=r.gid,s=void 0!==i.uid?i.uid:process.getuid&&process.getuid(),d=void 0!==i.gid?i.gid:process.getgid&&process.getgid(),c=parseInt("100",8),l=parseInt("010",8),o&parseInt("001",8)||o&l&&a===d||o&c&&n===s||o&(c|l)&&0===s)}},"../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js"(e){e.exports=i,i.sync=function(e,i){return r(t.statSync(e),e,i)};var t=B("fs");function r(e,t,r){if(!e.isSymbolicLink()&&!e.isFile())return!1;var i=void 0!==r.pathExt?r.pathExt:process.env.PATHEXT;if(!i||-1!==(i=i.split(";")).indexOf(""))return!0;for(var o=0;o{let t=e.env||process.env;return"win32"!==(e.platform||process.platform)?"PATH":Object.keys(t).reverse().find(e=>"PATH"===e.toUpperCase())||"Path"};e.exports=t,e.exports.default=t},"../../node_modules/.pnpm/shebang-command@2.0.0/node_modules/shebang-command/index.js"(e,t,r){let i=r("../../node_modules/.pnpm/shebang-regex@3.0.0/node_modules/shebang-regex/index.js");e.exports=(e="")=>{let t=e.match(i);if(!t)return null;let[r,o]=t[0].replace(/#! ?/,"").split(" "),n=r.split("/").pop();return"env"===n?o:o?`${n} ${o}`:n}},"../../node_modules/.pnpm/shebang-regex@3.0.0/node_modules/shebang-regex/index.js"(e){e.exports=/^#!(.*)/},"../../node_modules/.pnpm/which@2.0.2/node_modules/which/which.js"(e,t,r){let i="win32"===process.platform||"cygwin"===process.env.OSTYPE||"msys"===process.env.OSTYPE,o=B("path"),n=i?";":":",a=r("../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js"),s=e=>Object.assign(Error(`not found: ${e}`),{code:"ENOENT"}),d=(e,t)=>{let r=t.colon||n,o=e.match(/\//)||i&&e.match(/\\/)?[""]:[...i?[process.cwd()]:[],...(t.path||process.env.PATH||"").split(r)],a=i?t.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",s=i?a.split(r):[""];return i&&-1!==e.indexOf(".")&&""!==s[0]&&s.unshift(""),{pathEnv:o,pathExt:s,pathExtExe:a}},c=(e,t,r)=>{"function"==typeof t&&(r=t,t={}),t||(t={});let{pathEnv:i,pathExt:n,pathExtExe:c}=d(e,t),l=[],p=r=>new Promise((n,a)=>{if(r===i.length)return t.all&&l.length?n(l):a(s(e));let d=i[r],c=/^".*"$/.test(d)?d.slice(1,-1):d,p=o.join(c,e);n(u(!c&&/^\.[\\\/]/.test(e)?e.slice(0,2)+p:p,r,0))}),u=(e,r,i)=>new Promise((o,s)=>{if(i===n.length)return o(p(r+1));let d=n[i];a(e+d,{pathExt:c},(n,a)=>{if(!n&&a)if(!t.all)return o(e+d);else l.push(e+d);return o(u(e,r,i+1))})});return r?p(0).then(e=>r(null,e),r):p(0)};e.exports=c,c.sync=(e,t)=>{let{pathEnv:r,pathExt:i,pathExtExe:n}=d(e,t=t||{}),c=[];for(let s=0;sIZ,CompactSign:()=>I1,EmbeddedJWK:()=>xg,EncryptJWT:()=>I5,FlattenedEncrypt:()=>IQ,FlattenedSign:()=>I0,GeneralEncrypt:()=>Im,GeneralSign:()=>I4,SignJWT:()=>I3,UnsecuredJWT:()=>xP,base64url:()=>eu,calculateJwkThumbprint:()=>xh,calculateJwkThumbprintUri:()=>xy,compactDecrypt:()=>Io,compactVerify:()=>II,createLocalJWKSet:()=>xv,createRemoteJWKSet:()=>xw,cryptoRuntime:()=>xE,customFetch:()=>xb,decodeJwt:()=>xC,decodeProtectedHeader:()=>xj,errors:()=>em,exportJWK:()=>xm,exportPKCS8:()=>xu,exportSPKI:()=>xp,flattenedDecrypt:()=>In,flattenedVerify:()=>Ix,generalDecrypt:()=>Ia,generalVerify:()=>Ij,generateKeyPair:()=>xT,generateSecret:()=>xO,importJWK:()=>xx,importPKCS8:()=>xI,importSPKI:()=>xR,importX509:()=>xq,jwksCache:()=>x$,jwtDecrypt:()=>IJ,jwtVerify:()=>IK});var eu={};el.r(eu),el.d(eu,{decode:()=>R1,encode:()=>R0});var em={};el.r(em),el.d(em,{JOSEAlgNotAllowed:()=>RF,JOSEError:()=>RN,JOSENotSupported:()=>RL,JWEDecryptionFailed:()=>RU,JWEInvalid:()=>RH,JWKInvalid:()=>RK,JWKSInvalid:()=>RJ,JWKSMultipleMatchingKeys:()=>RQ,JWKSNoMatchingKey:()=>RZ,JWKSTimeout:()=>RX,JWSInvalid:()=>RG,JWSSignatureVerificationFailed:()=>RY,JWTClaimValidationFailed:()=>Rz,JWTExpired:()=>RD,JWTInvalid:()=>RB});var ef=Object.create,eh=Object.defineProperty,ey=Object.getOwnPropertyDescriptor,eg=Object.getOwnPropertyNames,e_=Object.getPrototypeOf,ev=Object.prototype.hasOwnProperty,eb=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),e$=(e,t,r)=>(r=null!=e?ef(e_(e)):{},((e,t,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(var i,o=eg(t),n=0,a=o.length;nt[e]).bind(null,i),enumerable:!(r=ey(t,i))||r.enumerable});return e})(!t&&e&&e.__esModule?r:eh(r,"default",{value:e,enumerable:!0}),e));let eS=new Set(["https://json-schema.org/draft/2020-12/schema","http://json-schema.org/draft/2020-12/schema"]),ek=new Set(["https://json-schema.org/draft/2019-09/schema","http://json-schema.org/draft/2019-09/schema"]),ew=new Set(["https://json-schema.org/draft-07/schema","http://json-schema.org/draft-07/schema"]),eV=new Set(["https://json-schema.org/draft-06/schema","http://json-schema.org/draft-06/schema"]);function eP(e){let t=Object.values(e).filter(e=>"number"==typeof e);return Object.entries(e).filter(([e,r])=>-1===t.indexOf(+e)).map(([e,t])=>t)}function eR(e,t="|"){return e.map(e=>eJ(e)).join(t)}function eq(e,t){return"bigint"==typeof t?t.toString():t}class eI{constructor(e){this._getter=e,this._value=void 0}get value(){let e=this._getter;return void 0!==e&&(this._value=e(),this._getter=void 0),this._value}}function ex(e){return new eI(e)}function ej(e){let t=+!!e.startsWith("^"),r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}let eC=Symbol("evaluating");function eT(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function eO(e){let t=Object.getOwnPropertyDescriptor(e,"shape");return t?.get?t.get.raw:t?.value}function eE(e){return eO(e._zod.def)??e._zod.def.shape}function eA(e,t,r){Object.defineProperty(e,t,{get(){let e=r();return eT(this,t,e),e},enumerable:!0,configurable:!0})}function eW(e,t,r){t in e?eT(e,t,r):e[t]=r}function eM(e,t,r,i){let o=eE(t);for(let n of r){let r=Object.getOwnPropertyDescriptor(o,n);r.enumerable&&(r.get?eA(e,n,()=>{let e=t._zod.def.shape[n];return i?i(e,n):e}):eW(e,n,i?i(r.value,n):r.value))}}function eN(...e){let t={};for(let r of e)Object.assign(t,Object.getOwnPropertyDescriptors(r));return Object.defineProperties({},t)}let ez="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function eD(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}let eF=ex(()=>{if(tu.jitless||"u">typeof navigator&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return Function(""),!0}catch(e){return!1}});function eL(e){if(!1===eD(e))return!1;let t=e.constructor;if(void 0===t||"function"!=typeof t)return!0;let r=t.prototype;return!1!==eD(r)&&!1!==Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")}function eU(e){return eL(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}let eH=new Set(["string","number","symbol"]);function eG(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function eB(e,t,r){let i=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(i._zod.parent=e),i}function eK(e){if(!e)return{};if("string"==typeof e)return{error:()=>e};if(e?.message!==void 0){if(e?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");e.error=e.message}return(delete e.message,"string"==typeof e.error)?{...e,error:()=>e.error}:e}function eJ(e){return"bigint"==typeof e?e.toString()+"n":"string"==typeof e?`"${e}"`:`${e}`}let eZ={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-0x80000000,0x7fffffff],uint32:[0,0xffffffff],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},eQ={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function eX(e,t){let r=eE(e),i=[];for(let e of Reflect.ownKeys(t)){if(!Object.getOwnPropertyDescriptor(r,e)?.enumerable)throw Error(`Unrecognized key: "${String(e)}"`);t[e]&&i.push(e)}return i}function eY(e,t){let r={};eM(r,e,Reflect.ownKeys(eE(e)));for(let e of Reflect.ownKeys(t)){let i=Object.getOwnPropertyDescriptor(t,e);i.enumerable&&(i.get?eA(r,e,()=>t[e]):eW(r,e,i.value))}return r}function e1(e,t,r,i="partial"){let o=t._zod.def.checks;if(o&&o.length>0)throw Error(`.${i}() cannot be used on object schemas containing refinements`);let n=r?new Set(eX(t,r)):void 0,a={};return eM(a,t,Reflect.ownKeys(eE(t)),e&&((t,r)=>n&&!n.has(r)?t:new e({type:"optional",innerType:t}))),eB(t,eN(t._zod.def,{shape:a,checks:[]}))}function e0(e,t=0){if(!0===e.aborted)return!0;for(let r=t;r(t.path??(t.path=[]),t.path.unshift(e),t))}function e4(e){return"string"==typeof e?e:e?.message}function e6(e){let t=[];for(let r of e??[]){let e=r._zod.def;if(!/_(length|size)$|_equals$/.test(e.check))break;let i=e.maximum??e.length??e.size;i>=0&&t.push([i,r])}return t}function e3(e,t,r){var i;for(let o=t;o!!i?.Parent&&t instanceof i.Parent||t?._zod?.traits?.has(e)}),Object.defineProperty(c,"name",{value:e}),c}class tl extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class tp extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}}(er=globalThis).__zod_globalConfig??(er.__zod_globalConfig={});let tu=globalThis.__zod_globalConfig;function tm(e){return e&&Object.assign(tu,e),tu}class tf extends Error{constructor(){super("Cannot parse a reference cycle that closes through a transform"),this.name="ZodCyclicError"}}let th="~memo",ty=[];function tg(e){return null!==e&&"object"==typeof e}function t_(e){return e.map(e=>e.path?{...e,path:e.path.slice()}:{...e})}let tv=new WeakMap,tb=[],t$={alloc(e,r,i){let o=t;if(!o)return i;t=void 0;let n={value:i,issues:null};return o.set(r.value,n),tb.push(n),i},guard(e){var t;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,r=(e,r)=>{var i,o;let n;if("backward"!==r.direction&&(i=r,o=e.value,void 0!==(n=i[th]?.backEdges)&&tg(o)&&n.has(o)))throw new tf;return t(e,r)};e._zod.parse=r,e._zod.run===t&&(e._zod.run=r)})},attach(e){var r;let i,o,n,a=!1;(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred.push(()=>{let r=e._zod.parse,s=(d,c)=>{let l;if(void 0===i){let t=function e(t,r,i){var o,n;let a=tv.get(t);if(void 0!==a)return 2*!!a;if(r.has(t))return 2;r.add(t);let s=0,d=t=>{if(2!==s&&t?._zod){let o=e(t,r,i);o>s&&(s=o)}},c=e=>{e>s&&(s=e)},l=t._zod.def;switch(l.type){case"object":{let t=eO(l);c(t?((t,o)=>{let n=0;for(let a of Reflect.ownKeys(t)){let s=Object.getOwnPropertyDescriptor(t,a);if(o&&!s.enumerable)continue;let d=s.get?1:s.value?._zod?e(s.value,r,i):0;d>n&&(n=d)}return n})(t,!0):1),d(l.catchall);break}case"array":d(l.element);break;case"tuple":for(let e of l.items)d(e);d(l.rest);break;case"record":case"map":d(l.keyType),d(l.valueType);break;case"set":d(l.valueType);break;case"union":for(let e of l.options)d(e);break;case"intersection":d(l.left),d(l.right);break;case"optional":case"nullable":case"default":case"prefault":case"catch":case"readonly":case"nonoptional":case"promise":case"success":d(l.innerType);break;case"pipe":d(l.in),d(l.out);break;case"function":d(l.input),d(l.output);break;case"lazy":{let o=l._cachedInner??(i?t._zod.innerType:void 0);c(o?e(o,r,!1):1);break}case"template_literal":case"string":case"number":case"int":case"boolean":case"bigint":case"symbol":case"undefined":case"null":case"void":case"never":case"any":case"unknown":case"date":case"nan":case"enum":case"literal":case"file":case"transform":case"custom":break;default:for(let e in l){let t=Object.getOwnPropertyDescriptor(l,e);if(!t||t.get)continue;let r=t.value;if(r&&"object"==typeof r){if(r._zod)d(r);else if(Array.isArray(r))for(let e of r)d(e)}}}return r.delete(t),o=t,1!==(n=s)&&tv.set(o,2===n),n}(e,new Set,!1);if(0===t)return e._zod.parse=r,e._zod.run===s&&(e._zod.run=r),r(d,c);2===t||a?i=!0:a=!0}let p=d.value;if(!tg(p))return r(d,c);let u=c[th];if(u||(u={buckets:new WeakMap,backEdges:void 0},c[th]=u),o===c)l=n;else{var m;let t;(t=(m=u).buckets.get(e))||(t=new WeakMap,m.buckets.set(e,t)),l=t,o=c,n=l}let f=l.get(p);if(f)return d.value=f.value,f.issues?f.issues.length&&d.issues.push(...t_(f.issues)):(d.memo=!0,u.backEdges??(u.backEdges=new WeakSet),u.backEdges.add(f.value)),d;t=l;let h=tb.length,y=r(d,c);t=void 0;let g=tb.length>h?tb.pop():void 0;return y instanceof Promise?y.then(e=>(g&&(g.issues=e.issues.length?t_(e.issues):ty),e)):(g&&(g.issues=y.issues.length?t_(y.issues):ty),y)};e._zod.parse=s,e._zod.run===r&&(e._zod.run=s)})}},tS=/^[cC][0-9a-z]{6,}$/,tk=/^[0-9a-z]+$/,tw=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,tV=/^[0-9a-vA-V]{20}$/,tP=/^[A-Za-z0-9]{27}$/,tR=/^[a-zA-Z0-9_-]{21}$/,tq=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,tI=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,tx=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([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)$/,tj=/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,tC=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,tT=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,tO=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,tE=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,tA=/^https?$/,tW=/^\+[1-9]\d{6,14}$/,tM="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",tN=RegExp(`^${tM}$`);function tz(e){let t="(?:[01]\\d|2[0-3]):[0-5]\\d";return"number"==typeof e.precision?-1===e.precision?`${t}`:0===e.precision?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:e.seconds?`${t}:[0-5]\\d(?:\\.\\d+)?`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}let tD=/^[\s\S]{0,}$/,tF=/^-?\d+$/,tL=/^-?\d+(?:\.\d+)?$/,tU=/^(?:true|false)$/i,tH=/^null$/i,tG=/^[^A-Z]*$/,tB=/^[^a-z]*$/,tK=tc("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),tJ=e=>{let t=e.value;return null!=t&&void 0!==t.length},tZ={number:"number",bigint:"bigint",object:"date"},tQ=tc("$ZodCheckLessThan",(e,t)=>{tK.init(e,t);let r=tZ[typeof t.value];e._zod.check=i=>{(t.inclusive?i.value<=t.value:i.value{tK.init(e,t);let r=tZ[typeof t.value];e._zod.check=i=>{(t.inclusive?i.value>=t.value:i.value>t.value)||i.issues.push({origin:tZ[typeof i.value]??r,code:"too_small",minimum:"object"==typeof t.value?t.value.getTime():t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),tY=tc("$ZodCheckMultipleOf",(e,t)=>{tK.init(e,t),e._zod.check=r=>{let i,o,n;if(typeof r.value!=typeof t.value)throw Error("Cannot mix number and bigint in multiple_of check.");("bigint"==typeof r.value?t.value!==BigInt(0)&&r.value%t.value===BigInt(0):0==(o=Math.round(i=r.value/t.value),n=4*Number.EPSILON*Math.max(Math.abs(i),1),Math.abs(i-o){tK.init(e,t),t.format=t.format||"float64";let r=t.format?.includes("int"),i=r?"int":"number",[o,n]=eZ[t.format];e._zod.check=a=>{let s=a.value;if(r){if(!Number.isInteger(s))return void a.issues.push({expected:i,format:t.format,code:"invalid_type",continue:!1,input:s,inst:e});if(!Number.isSafeInteger(s))return void(s>0?a.issues.push({input:s,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!t.abort}):a.issues.push({input:s,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!t.abort}))}sn&&a.issues.push({origin:"number",input:s,code:"too_big",maximum:n,inclusive:!0,inst:e,continue:!t.abort})}}),t0=tc("$ZodCheckMaxLength",(e,t)=>{var r;tK.init(e,t),(r=e._zod.def).when??(r.when=tJ),e._zod.check=r=>{let i=r.value,o=i.length;if(("string"==typeof i&&o>t.maximum?e8(i):o)<=t.maximum)return;let n=e7(i);r.issues.push({origin:n,code:"too_big",maximum:t.maximum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),t2=tc("$ZodCheckMinLength",(e,t)=>{var r;tK.init(e,t),(r=e._zod.def).when??(r.when=tJ),e._zod.check=r=>{let i=r.value,o=i.length;if(("string"==typeof i&&o>=t.minimum&&o<2*t.minimum?e8(i):o)>=t.minimum)return;let n=e7(i);r.issues.push({origin:n,code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),t4=tc("$ZodCheckLengthEquals",(e,t)=>{var r;tK.init(e,t),(r=e._zod.def).when??(r.when=tJ),e._zod.check=r=>{let i=r.value,o=i.length,n="string"==typeof i&&o>=t.length&&o<=2*t.length?e8(i):o;if(n===t.length)return;let a=e7(i),s=n>t.length;r.issues.push({origin:a,...s?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),t6=tc("$ZodCheckStringFormat",(e,t)=>{var r,i;tK.init(e,t),t.pattern?(r=e._zod).check??(r.check=r=>{t.pattern.lastIndex=0,t.pattern.test(r.value)||r.issues.push({origin:"string",code:"invalid_format",format:t.format,input:r.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(i=e._zod).check??(i.check=()=>{})}),t3=tc("$ZodCheckRegex",(e,t)=>{t6.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,t.pattern.test(r.value)||r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),t9=tc("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=tG),t6.init(e,t)}),t5=tc("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=tB),t6.init(e,t)}),t8=tc("$ZodCheckIncludes",(e,t)=>{tK.init(e,t);let r=eG(t.includes),i=new RegExp("number"==typeof t.position?`^.{${t.position},}${r}`:r);t.pattern=i,e._zod.check=r=>{r.value.includes(t.includes,t.position)||r.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:r.value,inst:e,continue:!t.abort})}}),t7=tc("$ZodCheckStartsWith",(e,t)=>{tK.init(e,t);let r=RegExp(`^${eG(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.check=r=>{r.value.startsWith(t.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:r.value,inst:e,continue:!t.abort})}}),re=tc("$ZodCheckEndsWith",(e,t)=>{tK.init(e,t);let r=RegExp(`.*${eG(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.check=r=>{r.value.endsWith(t.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:r.value,inst:e,continue:!t.abort})}}),rt=tc("$ZodCheckOverwrite",(e,t)=>{tK.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}});class rr{constructor(e=[],t={}){this.content=[],this.indent=0,this.args=e,this.closed=t}indented(e){this.indent+=1;try{e(this)}finally{this.indent-=1}}write(e){if("function"==typeof e){e(this,{execution:"sync"}),e(this,{execution:"async"});return}let t=e.split("\n").filter(e=>e),r=Math.min(...t.map(e=>e.length-e.trimStart().length));for(let e of t.map(e=>e.slice(r)).map(e=>" ".repeat(2*this.indent)+e))this.content.push(e)}compile(){let e=Function,t=this?.content??[""];return new e(...Object.keys(this.closed),`return function (${this.args.join(", ")}) { +let e,t,r,i,o,n,a,s,d,c,l,p,u,m,f,h,y,g,_,v,b,$,S,k,w;import{randomBytes as R,timingSafeEqual as P}from"node:crypto";import{realpathSync as V}from"node:fs";import{chmod as q,mkdir as I,readFile as x,rm as j,writeFile as C}from"node:fs/promises";import{createServer as T}from"node:http";import O,{join as E}from"node:path";import{pathToFileURL as A}from"node:url";import{parseArgs as M}from"node:util";import W from"node:process";import"http";import{Http2ServerRequest as N,constants as z}from"http2";import{Readable as D}from"stream";import F from"crypto";import L from"node:os";import{AsyncLocalStorage as U}from"node:async_hooks";import{PassThrough as H}from"node:stream";import{createRequire as G}from"node:module";let B=G(import.meta.url);var K,J,Z,Q,X,Y,ee,et,er,ei,eo,en,ea,es,ed={},ec={};function el(e){var t=ec[e];if(void 0!==t)return t.exports;var r=ec[e]={exports:{}};return ed[e](r,r.exports,el),r.exports}el.m=ed,el.d=(e,t,r)=>{var i=(t,r)=>{for(var i in t)el.o(t,i)&&!el.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,[r]:t[i]})};i(t,"get"),i(r,"value")},el.add=function(e){Object.assign(el.m,e)},el.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),el.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},el.add({"../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/index.js"(e,t,r){let i=B("child_process"),o=r("../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/parse.js"),n=r("../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/enoent.js");function a(e,t,r){let a=o(e,t,r),s=i.spawn(a.command,a.args,a.options);return n.hookChildProcess(s,a),s}e.exports=a,e.exports.spawn=a,e.exports.sync=function(e,t,r){let a=o(e,t,r),s=i.spawnSync(a.command,a.args,a.options);return s.error=s.error||n.verifyENOENTSync(s.status,a),s},e.exports._parse=o,e.exports._enoent=n},"../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/enoent.js"(e){let t="win32"===process.platform;function r(e,t){return Object.assign(Error(`${t} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}function i(e,i){return t&&1===e&&!i.file?r(i.original,"spawn"):null}e.exports={hookChildProcess:function(e,r){if(!t)return;let o=e.emit;e.emit=function(t,n){if("exit"===t){let t=i(n,r);if(t)return o.call(e,"error",t)}return o.apply(e,arguments)}},verifyENOENT:i,verifyENOENTSync:function(e,i){return t&&1===e&&!i.file?r(i.original,"spawnSync"):null},notFoundError:r}},"../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/parse.js"(e,t,r){let i=B("path"),o=r("../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/resolveCommand.js"),n=r("../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/escape.js"),a=r("../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/readShebang.js"),s="win32"===process.platform,d=/\.(?:com|exe)$/i,c=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;e.exports=function(e,t,r){t&&!Array.isArray(t)&&(r=t,t=null);let l={command:e,args:t=t?t.slice(0):[],options:r=Object.assign({},r),file:void 0,original:{command:e,args:t}};return r.shell?l:function(e){let t;if(!s)return e;let r=(e.file=o(e),(t=e.file&&a(e.file))?(e.args.unshift(e.file),e.command=t,o(e)):e.file),l=!d.test(r);if(e.options.forceShell||l){let t=c.test(r);e.command=i.normalize(e.command),e.command=n.command(e.command),e.args=e.args.map(e=>n.argument(e,t));let o=[e.command].concat(e.args).join(" ");e.args=["/d","/s","/c",`"${o}"`],e.command=process.env.comspec||"cmd.exe",e.options.windowsVerbatimArguments=!0}return e}(l)}},"../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/escape.js"(e){let t=/([()\][%!^"`<>&|;, *?])/g;e.exports.command=function(e){return e.replace(t,"^$1")},e.exports.argument=function(e,r){return e=(e=(e=`${e}`).replace(/(?=(\\+?)?)\1"/g,'$1$1\\"')).replace(/(?=(\\+?)?)\1$/,"$1$1"),e=(e=`"${e}"`).replace(t,"^$1"),r&&(e=e.replace(t,"^$1")),e}},"../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/readShebang.js"(e,t,r){let i=B("fs"),o=r("../../node_modules/.pnpm/shebang-command@2.0.0/node_modules/shebang-command/index.js");e.exports=function(e){let t,r=Buffer.alloc(150);try{t=i.openSync(e,"r"),i.readSync(t,r,0,150,0),i.closeSync(t)}catch(e){}return o(r.toString())}},"../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/resolveCommand.js"(e,t,r){let i=B("path"),o=r("../../node_modules/.pnpm/which@2.0.2/node_modules/which/which.js"),n=r("../../node_modules/.pnpm/path-key@3.1.1/node_modules/path-key/index.js");function a(e,t){let r,a=e.options.env||process.env,s=process.cwd(),d=null!=e.options.cwd,c=d&&void 0!==process.chdir&&!process.chdir.disabled;if(c)try{process.chdir(e.options.cwd)}catch(e){}try{r=o.sync(e.command,{path:a[n({env:a})],pathExt:t?i.delimiter:void 0})}catch(e){}finally{c&&process.chdir(s)}return r&&(r=i.resolve(d?e.options.cwd:"",r)),r}e.exports=function(e){return a(e)||a(e,!0)}},"../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js"(e,t,r){var i;function o(e,t,r){if("function"==typeof t&&(r=t,t={}),!r){if("function"!=typeof Promise)throw TypeError("callback not provided");return new Promise(function(r,i){o(e,t||{},function(e,t){e?i(e):r(t)})})}i(e,t||{},function(e,i){e&&("EACCES"===e.code||t&&t.ignoreErrors)&&(e=null,i=!1),r(e,i)})}B("fs"),i="win32"===process.platform||global.TESTING_WINDOWS?r("../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js"):r("../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js"),e.exports=o,o.sync=function(e,t){try{return i.sync(e,t||{})}catch(e){if(t&&t.ignoreErrors||"EACCES"===e.code)return!1;throw e}}},"../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js"(e){e.exports=r,r.sync=function(e,r){return i(t.statSync(e),r)};var t=B("fs");function r(e,r,o){t.stat(e,function(e,t){o(e,!e&&i(t,r))})}function i(e,t){var r,i,o,n,a,s,d,c,l;return e.isFile()&&(r=e,i=t,o=r.mode,n=r.uid,a=r.gid,s=void 0!==i.uid?i.uid:process.getuid&&process.getuid(),d=void 0!==i.gid?i.gid:process.getgid&&process.getgid(),c=parseInt("100",8),l=parseInt("010",8),o&parseInt("001",8)||o&l&&a===d||o&c&&n===s||o&(c|l)&&0===s)}},"../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js"(e){e.exports=i,i.sync=function(e,i){return r(t.statSync(e),e,i)};var t=B("fs");function r(e,t,r){if(!e.isSymbolicLink()&&!e.isFile())return!1;var i=void 0!==r.pathExt?r.pathExt:process.env.PATHEXT;if(!i||-1!==(i=i.split(";")).indexOf(""))return!0;for(var o=0;o{let t=e.env||process.env;return"win32"!==(e.platform||process.platform)?"PATH":Object.keys(t).reverse().find(e=>"PATH"===e.toUpperCase())||"Path"};e.exports=t,e.exports.default=t},"../../node_modules/.pnpm/shebang-command@2.0.0/node_modules/shebang-command/index.js"(e,t,r){let i=r("../../node_modules/.pnpm/shebang-regex@3.0.0/node_modules/shebang-regex/index.js");e.exports=(e="")=>{let t=e.match(i);if(!t)return null;let[r,o]=t[0].replace(/#! ?/,"").split(" "),n=r.split("/").pop();return"env"===n?o:o?`${n} ${o}`:n}},"../../node_modules/.pnpm/shebang-regex@3.0.0/node_modules/shebang-regex/index.js"(e){e.exports=/^#!(.*)/},"../../node_modules/.pnpm/which@2.0.2/node_modules/which/which.js"(e,t,r){let i="win32"===process.platform||"cygwin"===process.env.OSTYPE||"msys"===process.env.OSTYPE,o=B("path"),n=i?";":":",a=r("../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js"),s=e=>Object.assign(Error(`not found: ${e}`),{code:"ENOENT"}),d=(e,t)=>{let r=t.colon||n,o=e.match(/\//)||i&&e.match(/\\/)?[""]:[...i?[process.cwd()]:[],...(t.path||process.env.PATH||"").split(r)],a=i?t.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",s=i?a.split(r):[""];return i&&-1!==e.indexOf(".")&&""!==s[0]&&s.unshift(""),{pathEnv:o,pathExt:s,pathExtExe:a}},c=(e,t,r)=>{"function"==typeof t&&(r=t,t={}),t||(t={});let{pathEnv:i,pathExt:n,pathExtExe:c}=d(e,t),l=[],p=r=>new Promise((n,a)=>{if(r===i.length)return t.all&&l.length?n(l):a(s(e));let d=i[r],c=/^".*"$/.test(d)?d.slice(1,-1):d,p=o.join(c,e);n(u(!c&&/^\.[\\\/]/.test(e)?e.slice(0,2)+p:p,r,0))}),u=(e,r,i)=>new Promise((o,s)=>{if(i===n.length)return o(p(r+1));let d=n[i];a(e+d,{pathExt:c},(n,a)=>{if(!n&&a)if(!t.all)return o(e+d);else l.push(e+d);return o(u(e,r,i+1))})});return r?p(0).then(e=>r(null,e),r):p(0)};e.exports=c,c.sync=(e,t)=>{let{pathEnv:r,pathExt:i,pathExtExe:n}=d(e,t=t||{}),c=[];for(let s=0;sI$,CompactSign:()=>IR,EmbeddedJWK:()=>IX,EncryptJWT:()=>IC,FlattenedEncrypt:()=>IS,FlattenedSign:()=>IP,GeneralEncrypt:()=>qK,GeneralSign:()=>Iq,SignJWT:()=>Ix,UnsecuredJWT:()=>I5,base64url:()=>eu,calculateJwkThumbprint:()=>IZ,calculateJwkThumbprintUri:()=>IQ,compactDecrypt:()=>qN,compactVerify:()=>Ie,createLocalJWKSet:()=>I1,createRemoteJWKSet:()=>I3,cryptoRuntime:()=>xa,customFetch:()=>I0,decodeJwt:()=>xi,decodeProtectedHeader:()=>xr,errors:()=>em,exportJWK:()=>IK,exportPKCS8:()=>IB,exportSPKI:()=>IG,flattenedDecrypt:()=>qz,flattenedVerify:()=>It,generalDecrypt:()=>qD,generalVerify:()=>Ir,generateKeyPair:()=>xo,generateSecret:()=>xn,importJWK:()=>xt,importPKCS8:()=>xe,importSPKI:()=>I8,importX509:()=>I7,jwksCache:()=>I2,jwtDecrypt:()=>Ib,jwtVerify:()=>Iv});var eu={};el.r(eu),el.d(eu,{decode:()=>VR,encode:()=>VP});var em={};el.r(em),el.d(em,{JOSEAlgNotAllowed:()=>Vm,JOSEError:()=>Vl,JOSENotSupported:()=>Vf,JWEDecryptionFailed:()=>Vh,JWEInvalid:()=>Vy,JWKInvalid:()=>Vv,JWKSInvalid:()=>Vb,JWKSMultipleMatchingKeys:()=>VS,JWKSNoMatchingKey:()=>V$,JWKSTimeout:()=>Vk,JWSInvalid:()=>Vg,JWSSignatureVerificationFailed:()=>Vw,JWTClaimValidationFailed:()=>Vp,JWTExpired:()=>Vu,JWTInvalid:()=>V_});var ef=Object.create,eh=Object.defineProperty,ey=Object.getOwnPropertyDescriptor,eg=Object.getOwnPropertyNames,e_=Object.getPrototypeOf,ev=Object.prototype.hasOwnProperty,eb=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),e$=(e,t,r)=>(r=null!=e?ef(e_(e)):{},((e,t,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(var i,o=eg(t),n=0,a=o.length;nt[e]).bind(null,i),enumerable:!(r=ey(t,i))||r.enumerable});return e})(!t&&e&&e.__esModule?r:eh(r,"default",{value:e,enumerable:!0}),e));let eS=new Set(["https://json-schema.org/draft/2020-12/schema","http://json-schema.org/draft/2020-12/schema"]),ek=new Set(["https://json-schema.org/draft/2019-09/schema","http://json-schema.org/draft/2019-09/schema"]),ew=new Set(["https://json-schema.org/draft-07/schema","http://json-schema.org/draft-07/schema"]),eR=new Set(["https://json-schema.org/draft-06/schema","http://json-schema.org/draft-06/schema"]);function eP(e){let t=Object.values(e).filter(e=>"number"==typeof e);return Object.entries(e).filter(([e,r])=>-1===t.indexOf(+e)).map(([e,t])=>t)}function eV(e,t="|"){return e.map(e=>eJ(e)).join(t)}function eq(e,t){return"bigint"==typeof t?t.toString():t}class eI{constructor(e){this._getter=e,this._value=void 0}get value(){let e=this._getter;return void 0!==e&&(this._value=e(),this._getter=void 0),this._value}}function ex(e){return new eI(e)}function ej(e){let t=+!!e.startsWith("^"),r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}let eC=Symbol("evaluating");function eT(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function eO(e){let t=Object.getOwnPropertyDescriptor(e,"shape");return t?.get?t.get.raw:t?.value}function eE(e){return eO(e._zod.def)??e._zod.def.shape}function eA(e,t,r){Object.defineProperty(e,t,{get(){let e=r();return eT(this,t,e),e},enumerable:!0,configurable:!0})}function eM(e,t,r){t in e?eT(e,t,r):e[t]=r}function eW(e,t,r,i){let o=eE(t);for(let n of r){let r=Object.getOwnPropertyDescriptor(o,n);r.enumerable&&(r.get?eA(e,n,()=>{let e=t._zod.def.shape[n];return i?i(e,n):e}):eM(e,n,i?i(r.value,n):r.value))}}function eN(...e){let t={};for(let r of e)Object.assign(t,Object.getOwnPropertyDescriptors(r));return Object.defineProperties({},t)}let ez="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function eD(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}let eF=ex(()=>{if(tu.jitless||"u">typeof navigator&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return Function(""),!0}catch(e){return!1}});function eL(e){if(!1===eD(e))return!1;let t=e.constructor;if(void 0===t||"function"!=typeof t)return!0;let r=t.prototype;return!1!==eD(r)&&!1!==Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")}function eU(e){return eL(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}let eH=new Set(["string","number","symbol"]);function eG(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function eB(e,t,r){let i=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(i._zod.parent=e),i}function eK(e){if(!e)return{};if("string"==typeof e)return{error:()=>e};if(e?.message!==void 0){if(e?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");e.error=e.message}return(delete e.message,"string"==typeof e.error)?{...e,error:()=>e.error}:e}function eJ(e){return"bigint"==typeof e?e.toString()+"n":"string"==typeof e?`"${e}"`:`${e}`}let eZ={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-0x80000000,0x7fffffff],uint32:[0,0xffffffff],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},eQ={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function eX(e,t){let r=eE(e),i=[];for(let e of Reflect.ownKeys(t)){if(!Object.getOwnPropertyDescriptor(r,e)?.enumerable)throw Error(`Unrecognized key: "${String(e)}"`);t[e]&&i.push(e)}return i}function eY(e,t){let r={};eW(r,e,Reflect.ownKeys(eE(e)));for(let e of Reflect.ownKeys(t)){let i=Object.getOwnPropertyDescriptor(t,e);i.enumerable&&(i.get?eA(r,e,()=>t[e]):eM(r,e,i.value))}return r}function e1(e,t,r,i="partial"){let o=t._zod.def.checks;if(o&&o.length>0)throw Error(`.${i}() cannot be used on object schemas containing refinements`);let n=r?new Set(eX(t,r)):void 0,a={};return eW(a,t,Reflect.ownKeys(eE(t)),e&&((t,r)=>n&&!n.has(r)?t:new e({type:"optional",innerType:t}))),eB(t,eN(t._zod.def,{shape:a,checks:[]}))}function e0(e,t=0){if(!0===e.aborted)return!0;for(let r=t;r(t.path??(t.path=[]),t.path.unshift(e),t))}function e4(e){return"string"==typeof e?e:e?.message}function e6(e){let t=[];for(let r of e??[]){let e=r._zod.def;if(!/_(length|size)$|_equals$/.test(e.check))break;let i=e.maximum??e.length??e.size;i>=0&&t.push([i,r])}return t}function e3(e,t,r){var i;for(let o=t;o!!i?.Parent&&t instanceof i.Parent||t?._zod?.traits?.has(e)}),Object.defineProperty(c,"name",{value:e}),c}class tl extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class tp extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}}(er=globalThis).__zod_globalConfig??(er.__zod_globalConfig={});let tu=globalThis.__zod_globalConfig;function tm(e){return e&&Object.assign(tu,e),tu}class tf extends Error{constructor(){super("Cannot parse a reference cycle that closes through a transform"),this.name="ZodCyclicError"}}let th="~memo",ty=[];function tg(e){return null!==e&&"object"==typeof e}function t_(e){return e.map(e=>e.path?{...e,path:e.path.slice()}:{...e})}let tv=new WeakMap,tb=[],t$={alloc(e,r,i){let o=t;if(!o)return i;t=void 0;let n={value:i,issues:null};return o.set(r.value,n),tb.push(n),i},guard(e){var t;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,r=(e,r)=>{var i,o;let n;if("backward"!==r.direction&&(i=r,o=e.value,void 0!==(n=i[th]?.backEdges)&&tg(o)&&n.has(o)))throw new tf;return t(e,r)};e._zod.parse=r,e._zod.run===t&&(e._zod.run=r)})},attach(e){var r;let i,o,n,a=!1;(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred.push(()=>{let r=e._zod.parse,s=(d,c)=>{let l;if(void 0===i){let t=function e(t,r,i){var o,n;let a=tv.get(t);if(void 0!==a)return 2*!!a;if(r.has(t))return 2;r.add(t);let s=0,d=t=>{if(2!==s&&t?._zod){let o=e(t,r,i);o>s&&(s=o)}},c=e=>{e>s&&(s=e)},l=t._zod.def;switch(l.type){case"object":{let t=eO(l);c(t?((t,o)=>{let n=0;for(let a of Reflect.ownKeys(t)){let s=Object.getOwnPropertyDescriptor(t,a);if(o&&!s.enumerable)continue;let d=s.get?1:s.value?._zod?e(s.value,r,i):0;d>n&&(n=d)}return n})(t,!0):1),d(l.catchall);break}case"array":d(l.element);break;case"tuple":for(let e of l.items)d(e);d(l.rest);break;case"record":case"map":d(l.keyType),d(l.valueType);break;case"set":d(l.valueType);break;case"union":for(let e of l.options)d(e);break;case"intersection":d(l.left),d(l.right);break;case"optional":case"nullable":case"default":case"prefault":case"catch":case"readonly":case"nonoptional":case"promise":case"success":d(l.innerType);break;case"pipe":d(l.in),d(l.out);break;case"function":d(l.input),d(l.output);break;case"lazy":{let o=l._cachedInner??(i?t._zod.innerType:void 0);c(o?e(o,r,!1):1);break}case"template_literal":case"string":case"number":case"int":case"boolean":case"bigint":case"symbol":case"undefined":case"null":case"void":case"never":case"any":case"unknown":case"date":case"nan":case"enum":case"literal":case"file":case"transform":case"custom":break;default:for(let e in l){let t=Object.getOwnPropertyDescriptor(l,e);if(!t||t.get)continue;let r=t.value;if(r&&"object"==typeof r){if(r._zod)d(r);else if(Array.isArray(r))for(let e of r)d(e)}}}return r.delete(t),o=t,1!==(n=s)&&tv.set(o,2===n),n}(e,new Set,!1);if(0===t)return e._zod.parse=r,e._zod.run===s&&(e._zod.run=r),r(d,c);2===t||a?i=!0:a=!0}let p=d.value;if(!tg(p))return r(d,c);let u=c[th];if(u||(u={buckets:new WeakMap,backEdges:void 0},c[th]=u),o===c)l=n;else{var m;let t;(t=(m=u).buckets.get(e))||(t=new WeakMap,m.buckets.set(e,t)),l=t,o=c,n=l}let f=l.get(p);if(f)return d.value=f.value,f.issues?f.issues.length&&d.issues.push(...t_(f.issues)):(d.memo=!0,u.backEdges??(u.backEdges=new WeakSet),u.backEdges.add(f.value)),d;t=l;let h=tb.length,y=r(d,c);t=void 0;let g=tb.length>h?tb.pop():void 0;return y instanceof Promise?y.then(e=>(g&&(g.issues=e.issues.length?t_(e.issues):ty),e)):(g&&(g.issues=y.issues.length?t_(y.issues):ty),y)};e._zod.parse=s,e._zod.run===r&&(e._zod.run=s)})}},tS=/^[cC][0-9a-z]{6,}$/,tk=/^[0-9a-z]+$/,tw=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,tR=/^[0-9a-vA-V]{20}$/,tP=/^[A-Za-z0-9]{27}$/,tV=/^[a-zA-Z0-9_-]{21}$/,tq=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,tI=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,tx=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([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)$/,tj=/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,tC=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,tT=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,tO=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,tE=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,tA=/^https?$/,tM=/^\+[1-9]\d{6,14}$/,tW="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",tN=RegExp(`^${tW}$`);function tz(e){let t="(?:[01]\\d|2[0-3]):[0-5]\\d";return"number"==typeof e.precision?-1===e.precision?`${t}`:0===e.precision?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:e.seconds?`${t}:[0-5]\\d(?:\\.\\d+)?`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}let tD=/^[\s\S]{0,}$/,tF=/^-?\d+$/,tL=/^-?\d+(?:\.\d+)?$/,tU=/^(?:true|false)$/i,tH=/^null$/i,tG=/^[^A-Z]*$/,tB=/^[^a-z]*$/,tK=tc("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),tJ=e=>{let t=e.value;return null!=t&&void 0!==t.length},tZ={number:"number",bigint:"bigint",object:"date"},tQ=tc("$ZodCheckLessThan",(e,t)=>{tK.init(e,t);let r=tZ[typeof t.value];e._zod.check=i=>{(t.inclusive?i.value<=t.value:i.value{tK.init(e,t);let r=tZ[typeof t.value];e._zod.check=i=>{(t.inclusive?i.value>=t.value:i.value>t.value)||i.issues.push({origin:tZ[typeof i.value]??r,code:"too_small",minimum:"object"==typeof t.value?t.value.getTime():t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),tY=tc("$ZodCheckMultipleOf",(e,t)=>{tK.init(e,t),e._zod.check=r=>{let i,o,n;if(typeof r.value!=typeof t.value)throw Error("Cannot mix number and bigint in multiple_of check.");("bigint"==typeof r.value?t.value!==BigInt(0)&&r.value%t.value===BigInt(0):0==(o=Math.round(i=r.value/t.value),n=4*Number.EPSILON*Math.max(Math.abs(i),1),Math.abs(i-o){tK.init(e,t),t.format=t.format||"float64";let r=t.format?.includes("int"),i=r?"int":"number",[o,n]=eZ[t.format];e._zod.check=a=>{let s=a.value;if(r){if(!Number.isInteger(s))return void a.issues.push({expected:i,format:t.format,code:"invalid_type",continue:!1,input:s,inst:e});if(!Number.isSafeInteger(s))return void(s>0?a.issues.push({input:s,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!t.abort}):a.issues.push({input:s,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!t.abort}))}sn&&a.issues.push({origin:"number",input:s,code:"too_big",maximum:n,inclusive:!0,inst:e,continue:!t.abort})}}),t0=tc("$ZodCheckMaxLength",(e,t)=>{var r;tK.init(e,t),(r=e._zod.def).when??(r.when=tJ),e._zod.check=r=>{let i=r.value,o=i.length;if(("string"==typeof i&&o>t.maximum?e8(i):o)<=t.maximum)return;let n=e7(i);r.issues.push({origin:n,code:"too_big",maximum:t.maximum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),t2=tc("$ZodCheckMinLength",(e,t)=>{var r;tK.init(e,t),(r=e._zod.def).when??(r.when=tJ),e._zod.check=r=>{let i=r.value,o=i.length;if(("string"==typeof i&&o>=t.minimum&&o<2*t.minimum?e8(i):o)>=t.minimum)return;let n=e7(i);r.issues.push({origin:n,code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),t4=tc("$ZodCheckLengthEquals",(e,t)=>{var r;tK.init(e,t),(r=e._zod.def).when??(r.when=tJ),e._zod.check=r=>{let i=r.value,o=i.length,n="string"==typeof i&&o>=t.length&&o<=2*t.length?e8(i):o;if(n===t.length)return;let a=e7(i),s=n>t.length;r.issues.push({origin:a,...s?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),t6=tc("$ZodCheckStringFormat",(e,t)=>{var r,i;tK.init(e,t),t.pattern?(r=e._zod).check??(r.check=r=>{t.pattern.lastIndex=0,t.pattern.test(r.value)||r.issues.push({origin:"string",code:"invalid_format",format:t.format,input:r.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(i=e._zod).check??(i.check=()=>{})}),t3=tc("$ZodCheckRegex",(e,t)=>{t6.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,t.pattern.test(r.value)||r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),t9=tc("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=tG),t6.init(e,t)}),t5=tc("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=tB),t6.init(e,t)}),t8=tc("$ZodCheckIncludes",(e,t)=>{tK.init(e,t);let r=eG(t.includes),i=new RegExp("number"==typeof t.position?`^.{${t.position},}${r}`:r);t.pattern=i,e._zod.check=r=>{r.value.includes(t.includes,t.position)||r.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:r.value,inst:e,continue:!t.abort})}}),t7=tc("$ZodCheckStartsWith",(e,t)=>{tK.init(e,t);let r=RegExp(`^${eG(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.check=r=>{r.value.startsWith(t.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:r.value,inst:e,continue:!t.abort})}}),re=tc("$ZodCheckEndsWith",(e,t)=>{tK.init(e,t);let r=RegExp(`.*${eG(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.check=r=>{r.value.endsWith(t.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:r.value,inst:e,continue:!t.abort})}}),rt=tc("$ZodCheckOverwrite",(e,t)=>{tK.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}});class rr{constructor(e=[],t={}){this.content=[],this.indent=0,this.args=e,this.closed=t}indented(e){this.indent+=1;try{e(this)}finally{this.indent-=1}}write(e){if("function"==typeof e){e(this,{execution:"sync"}),e(this,{execution:"async"});return}let t=e.split("\n").filter(e=>e),r=Math.min(...t.map(e=>e.length-e.trimStart().length));for(let e of t.map(e=>e.slice(r)).map(e=>" ".repeat(2*this.indent)+e))this.content.push(e)}compile(){let e=Function,t=this?.content??[""];return new e(...Object.keys(this.closed),`return function (${this.args.join(", ")}) { ${t.join("\n")} -};`)(...Object.values(this.closed))}}let ri={major:4,minor:6,patch:7},ro=tc("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=ri;let i=e._zod.def.checks,o=e._zod.traits.has("$ZodCheck")?[e,...i??[]]:i?.length?[...i]:[];for(let t of o)for(let r of t._zod.onattach)r(e);if(0===o.length)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(t,r,i)=>{let o;if(t.memo)return t;let n=e0(t);for(let a of r){if(a._zod.def.when){if(function(e,t=0){if(!0===e.aborted)return!0;for(let r=t;r{await s,t.issues.length!==r&&(e3(t.issues,r,e),n||(n=e0(t,r)))});else{if(t.issues.length===r)continue;e3(t.issues,r,e),n||(n=e0(t,r))}}return o?o.then(()=>t):t},r=(r,i,n)=>{if(e0(r))return r.aborted=!0,r;let a=t(i,o,n);if(a instanceof Promise){if(!1===n.async)throw new tl;return a.then(t=>e._zod.parse(t,n))}return e._zod.parse(a,n)};e._zod.run=(i,n)=>{if(n.skipChecks)return e._zod.parse(i,n);if("backward"===n.direction){let t=e._zod.parse({value:i.value,issues:[]},{...n,skipChecks:!0});return t instanceof Promise?t.then(e=>r(e,i,n)):r(t,i,n)}let a=e._zod.parse(i,n);if(a instanceof Promise){if(!1===n.async)throw new tl;return a.then(e=>t(e,o,n))}return t(a,o,n)}}},{get"~standard"(){return tt(this,"~standard",ra(this),!1)},set"~standard"(e){tt(this,"~standard",e)}}),rn=(e,t)=>e.issues.length?{issues:e.issues.map(e=>e9(e,t,tm()))}:{value:e.value};function ra(e){return{validate:t=>{let r={async:!1};try{let i=e._zod.run({value:t,issues:[]},r);if(!(i instanceof Promise))return rn(i,r)}catch(e){}return async function(e,t){let r={async:!0};return rn(await e._zod.run({value:t,issues:[]},r),r)}(e,t)},vendor:"zod",version:1}}let rs=tc("$ZodString",(e,t)=>{ro.init(e,t),e._zod.pattern=t.pattern??tD,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=String(r.value)}catch(e){}return"string"==typeof r.value||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),rd=tc("$ZodStringFormat",(e,t)=>{t6.init(e,t),rs.init(e,t)}),rc=tc("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=tI),rd.init(e,t)}),rl=tc("$ZodUUID",(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(void 0===e)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=tx(e))}else t.pattern??(t.pattern=tx());rd.init(e,t)}),rp=tc("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=tj),rd.init(e,t)});function ru(e){try{if("u">typeof URL&&"function"==typeof URL.canParse)return URL.canParse(e);return new URL(e),!0}catch{return!1}}let rm=/[\t\n\r]/g;function rf(e){return e.replace(rm,"")}let rh=tc("$ZodURL",(e,t)=>{rd.init(e,t),e._zod.check=r=>{try{var i,o;let n=r.value.trim(),a="normalize"in t||"hostname"in t||"protocol"in t?function(e,t){if(!t.normalize&&t.protocol?.source===tA.source&&!/^https?:\/\//i.test(e))return 1;try{if("u">typeof URL){let t=URL;if("function"==typeof t.parse)return t.parse(e)??2}return new URL(e)}catch{return 2}}(n,t):ru(n)||2;if(1===a)return void r.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:r.value,inst:e,continue:!t.abort});if(2===a)return void r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort});if(!0===a){r.value=rf(n);return}t.hostname&&((i=t.hostname).lastIndex=0,!i.test(a.hostname))&&r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort}),t.protocol&&((o=t.protocol).lastIndex=0,!o.test(a.protocol.endsWith(":")?a.protocol.slice(0,-1):a.protocol))&&r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort}),r.value=t.normalize?a.href:rf(n);return}catch(i){r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),ry=tc("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=RegExp("^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$","u")),rd.init(e,t)}),rg=tc("$ZodNanoID",(e,t)=>{var r;if(void 0!==t.length&&(!Number.isInteger(t.length)||t.length<1))throw Error(`Invalid nanoid length: ${t.length}`);t.pattern??(t.pattern=void 0===t.length?tR:(r=t.length,RegExp(`^[a-zA-Z0-9_-]{${r}}$`))),rd.init(e,t)}),r_=tc("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=tS),rd.init(e,t)}),rv=tc("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=tk),rd.init(e,t)}),rb=tc("$ZodULID",(e,t)=>{t.pattern??(t.pattern=tw),rd.init(e,t)}),r$=tc("$ZodXID",(e,t)=>{t.pattern??(t.pattern=tV),rd.init(e,t)}),rS=tc("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=tP),rd.init(e,t)}),rk=tc("$ZodISODateTime",(e,t)=>{let r,i,o;t.pattern??(r=["Z"],t.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)"),i=`${tz({precision:t.precision,seconds:!0})}(?:${r.join("|")})`,o=t.local?`${i}|${tz({precision:t.precision})}`:i,t.pattern=RegExp(`^${tM}T(?:${o})$`)),rd.init(e,t)}),rw=tc("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=tN),rd.init(e,t)}),rV=tc("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=RegExp(`^${tz(t)}$`)),rd.init(e,t)}),rP=tc("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=tq),rd.init(e,t)}),rR=tc("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=tC),rd.init(e,t)}),rq=/^[0-9a-fA-F:.]+$/;function rI(e){return!!rq.test(e)&&ru(`http://[${e}]`)}let rx=tc("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=tT),rd.init(e,t),e._zod.check=r=>{rI(r.value)||r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}),rj=tc("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=tO),rd.init(e,t)}),rC=tc("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=tE),rd.init(e,t),e._zod.check=r=>{!function(e){let t=e.split("/");if(2!==t.length)return!1;let[r,i]=t;if(!i)return!1;let o=Number(i);return`${o}`===i&&!(o<0)&&!(o>128)&&rI(r)}(r.value)&&r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}});function rT(e){if(""===e)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}let rO=/^[0-9a-zA-Z+/]*={0,2}$/,rE=tc("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=rO),rd.init(e,t),e._zod.check=r=>{rT(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}}),rA=/^[A-Za-z0-9_-]*$/,rW=tc("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=rA),rd.init(e,t),e._zod.check=r=>{!function(e){if(!rA.test(e))return!1;let t=e.replace(/[-_]/g,e=>"-"===e?"+":"/");return rT(t.padEnd(4*Math.ceil(t.length/4),"="))}(r.value)&&r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),rM=tc("$ZodE164",(e,t)=>{t.pattern??(t.pattern=tW),rd.init(e,t)}),rN=tc("$ZodJWT",(e,t)=>{rd.init(e,t),e._zod.check=r=>{!function(e,t=null){try{let r=e.split(".");if(3!==r.length)return!1;let[i]=r;if(!i)return!1;let o=JSON.parse(atob(i));if("typ"in o&&o?.typ!=="JWT"||!o.alg||t&&(!("alg"in o)||o.alg!==t))return!1;return!0}catch{return!1}}(r.value,t.alg)&&r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),rz=tc("$ZodNumber",(e,t)=>{ro.init(e,t),e._zod.pattern=tL,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=Number(r.value)}catch(e){}let o=r.value;if("number"==typeof o&&!Number.isNaN(o)&&Number.isFinite(o))return r;let n="number"==typeof o?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:String(o):void 0;return r.issues.push({expected:"number",code:"invalid_type",input:o,inst:e,...n?{received:n}:{}}),r}}),rD=tc("$ZodNumberFormat",(e,t)=>{t1.init(e,t),rz.init(e,t)}),rF=tc("$ZodBoolean",(e,t)=>{ro.init(e,t),e._zod.pattern=tU,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=!!r.value}catch(e){}let o=r.value;return"boolean"==typeof o||r.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:e}),r}}),rL=tc("$ZodNull",(e,t)=>{ro.init(e,t),e._zod.pattern=tH,e._zod.values=new Set([null]),e._zod.parse=(t,r)=>{let i=t.value;return null===i||t.issues.push({expected:"null",code:"invalid_type",input:i,inst:e}),t}}),rU=tc("$ZodAny",(e,t)=>{ro.init(e,t),e._zod.parse=e=>e}),rH=tc("$ZodUnknown",(e,t)=>{ro.init(e,t),e._zod.parse=e=>e}),rG=tc("$ZodNever",(e,t)=>{ro.init(e,t),e._zod.parse=(t,r)=>(t.issues.push({expected:"never",code:"invalid_type",input:t.value,inst:e}),t)}),rB=e=>Array.isArray(e)?e.length:-1;function rK(e,t,r){e.issues.length&&t.issues.push(...e2(r,e.issues)),t.value[r]=e.value}let rJ=tc("$ZodArray",(e,t)=>{ro.init(e,t);let r=tu.memoizer;r?.attach(e),e._zod.parse=(i,o)=>{let n=i.value;if(!Array.isArray(n))return i.issues.push({expected:"array",code:"invalid_type",input:n,inst:e}),i;i.value=r?r.alloc(e,i,Array(n.length),o):Array(n.length);let a=[],s=o?.abortEarly;for(let e=0;erK(t,i,e)));else if(rK(d,i,e),s&&0!==d.issues.length&&e0(d))break}return a.length?Promise.all(a).then(()=>i):i},function(e,t){let r=e6(e._zod.def.checks);if(!r.length)return;let i=Math.min(...r.map(e=>e[0])),o=e._zod.parse;e._zod.parse=(r,n)=>{let a=t(r.value);if(a>i&&!n?.skipChecks&&n?.direction!=="backward"){for(let[t,i]of e6(e._zod.def.checks))if(a>t&&i._zod.def.when(r)){let t=r.issues.length;return i._zod.check(r),r.issues[t].continue=!1,e3(r.issues,t,e),r}}return o(r,n)}}(e,rB)});function rZ(e,t,r,i,o,n){let a=r in i,s="optional"===n;if(a||!s||"optional"!==o){if(e.issues.length){if(void 0!==o&&s&&!a)return;t.issues.push(...e2(r,e.issues))}if(!a&&void 0===o){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[r]});return}void 0===e.value?(a||"defaulted"===o&&!s)&&(t.value[r]=void 0):t.value[r]=e.value}}let rQ=[];function rX(e){var t;let r=Object.keys(e.shape),i=Object.getOwnPropertySymbols(e.shape),o=i.length?i:rQ,n=o.length?[...r,...o]:r;for(let t of n)if(!e.shape?.[t]?._zod?.traits?.has("$ZodType"))throw Error(`Invalid element at key "${String(t)}": expected a Zod schema`);let a=Object.keys(t=e.shape).filter(e=>void 0!==t[e]._zod.optin&&"optional"===t[e]._zod.optout);return{...e,allKeys:n,symbolKeys:o,keySet:new Set(r),numKeys:r.length,optionalKeys:new Set(a)}}function rY(e,t,r,i,o,n,a){let s=[],d=o.keySet,c=o.catchall._zod,l=c.def.type,p=c.optin,u=c.optout,m=0;for(let o in t){if(a&&r.issues.length!==m){if(e0(r,m))break;m=r.issues.length}if(d.has(o))continue;if("__proto__"===o){"never"===l&&s.push(o);continue}if("never"===l){s.push(o);continue}let n=c.run({value:t[o],issues:[]},i);n instanceof Promise?e.push(n.then(e=>rZ(e,r,o,t,p,u))):rZ(n,r,o,t,p,u)}return(s.length&&r.issues.push({code:"unrecognized_keys",keys:s,input:t,inst:n,continue:!0}),e.length)?Promise.all(e).then(()=>r):r}let r1=tc("$ZodObject",(e,t)=>{let r;ro.init(e,t);let i=Object.getOwnPropertyDescriptor(t,"shape"),o=i?.get?i.get.raw:t.shape??{};if(o){let e=()=>{let r={...o};return Object.defineProperty(t,"shape",{value:r}),e.raw=r,r};e.raw=o,Object.defineProperty(t,"shape",{get:e})}let n=ex(()=>rX(t));tn(e,"propValues",e=>{let t=e.def.shape,r={};for(let e in t){let i=t[e]._zod;if(i.values){for(let t of(Object.prototype.hasOwnProperty.call(r,e)||eT(r,e,new Set),i.values))r[e].add(t);void 0!==i.optin&&r[e].add(void 0)}}return r});let a=t.catchall,s=tu.memoizer;s?.attach(e),e._zod.parse=(t,i)=>{r??(r=n.value);let o=t.value;if(!eD(o))return t.issues.push({expected:"object",code:"invalid_type",input:o,inst:e}),t;t.value=s?s.alloc(e,t,{},i):{};let d=[],c=r.shape,l=i?.abortEarly,p=t.issues.length;for(let e of r.allKeys){if(l&&t.issues.length!==p){if(e0(t,p))break;p=t.issues.length}if("__proto__"===e)continue;let r=c[e],n=r._zod.optin,a=r._zod.optout,s=r._zod.run({value:o[e],issues:[]},i);s instanceof Promise?d.push(s.then(r=>rZ(r,t,e,o,n,a))):rZ(s,t,e,o,n,a)}return a?rY(d,o,t,i,n.value,e,!0===l):d.length?Promise.all(d).then(()=>t):t}}),r0=tc("$ZodObjectJIT",(e,t)=>{let r,i;r1.init(e,t);let o=e._zod.parse,n=ex(()=>rX(t)),a=tu.memoizer,s=!tu.jitless,d=s&&eF.value,c=t.catchall;e._zod.parse=(l,p)=>{i??(i=n.value);let u=l.value;return eD(u)?s&&d&&p?.async===!1&&!0!==p.jitless?(r||(r=(t=>{let r=n.value,i=r.symbolKeys,o=new rr(["payload","ctx"],{shape:t,inst:e,memo:a,syms:i}),s=e=>`shape[${e}]._zod.run({ value: input[${e}], issues: [] }, ctx)`,d=(e,t)=>` +};`)(...Object.values(this.closed))}}let ri={major:4,minor:6,patch:7},ro=tc("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=ri;let i=e._zod.def.checks,o=e._zod.traits.has("$ZodCheck")?[e,...i??[]]:i?.length?[...i]:[];for(let t of o)for(let r of t._zod.onattach)r(e);if(0===o.length)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(t,r,i)=>{let o;if(t.memo)return t;let n=e0(t);for(let a of r){if(a._zod.def.when){if(function(e,t=0){if(!0===e.aborted)return!0;for(let r=t;r{await s,t.issues.length!==r&&(e3(t.issues,r,e),n||(n=e0(t,r)))});else{if(t.issues.length===r)continue;e3(t.issues,r,e),n||(n=e0(t,r))}}return o?o.then(()=>t):t},r=(r,i,n)=>{if(e0(r))return r.aborted=!0,r;let a=t(i,o,n);if(a instanceof Promise){if(!1===n.async)throw new tl;return a.then(t=>e._zod.parse(t,n))}return e._zod.parse(a,n)};e._zod.run=(i,n)=>{if(n.skipChecks)return e._zod.parse(i,n);if("backward"===n.direction){let t=e._zod.parse({value:i.value,issues:[]},{...n,skipChecks:!0});return t instanceof Promise?t.then(e=>r(e,i,n)):r(t,i,n)}let a=e._zod.parse(i,n);if(a instanceof Promise){if(!1===n.async)throw new tl;return a.then(e=>t(e,o,n))}return t(a,o,n)}}},{get"~standard"(){return tt(this,"~standard",ra(this),!1)},set"~standard"(e){tt(this,"~standard",e)}}),rn=(e,t)=>e.issues.length?{issues:e.issues.map(e=>e9(e,t,tm()))}:{value:e.value};function ra(e){return{validate:t=>{let r={async:!1};try{let i=e._zod.run({value:t,issues:[]},r);if(!(i instanceof Promise))return rn(i,r)}catch(e){}return async function(e,t){let r={async:!0};return rn(await e._zod.run({value:t,issues:[]},r),r)}(e,t)},vendor:"zod",version:1}}let rs=tc("$ZodString",(e,t)=>{ro.init(e,t),e._zod.pattern=t.pattern??tD,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=String(r.value)}catch(e){}return"string"==typeof r.value||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),rd=tc("$ZodStringFormat",(e,t)=>{t6.init(e,t),rs.init(e,t)}),rc=tc("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=tI),rd.init(e,t)}),rl=tc("$ZodUUID",(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(void 0===e)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=tx(e))}else t.pattern??(t.pattern=tx());rd.init(e,t)}),rp=tc("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=tj),rd.init(e,t)});function ru(e){try{if("u">typeof URL&&"function"==typeof URL.canParse)return URL.canParse(e);return new URL(e),!0}catch{return!1}}let rm=/[\t\n\r]/g;function rf(e){return e.replace(rm,"")}let rh=tc("$ZodURL",(e,t)=>{rd.init(e,t),e._zod.check=r=>{try{var i,o;let n=r.value.trim(),a="normalize"in t||"hostname"in t||"protocol"in t?function(e,t){if(!t.normalize&&t.protocol?.source===tA.source&&!/^https?:\/\//i.test(e))return 1;try{if("u">typeof URL){let t=URL;if("function"==typeof t.parse)return t.parse(e)??2}return new URL(e)}catch{return 2}}(n,t):ru(n)||2;if(1===a)return void r.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:r.value,inst:e,continue:!t.abort});if(2===a)return void r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort});if(!0===a){r.value=rf(n);return}t.hostname&&((i=t.hostname).lastIndex=0,!i.test(a.hostname))&&r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort}),t.protocol&&((o=t.protocol).lastIndex=0,!o.test(a.protocol.endsWith(":")?a.protocol.slice(0,-1):a.protocol))&&r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort}),r.value=t.normalize?a.href:rf(n);return}catch(i){r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),ry=tc("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=RegExp("^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$","u")),rd.init(e,t)}),rg=tc("$ZodNanoID",(e,t)=>{var r;if(void 0!==t.length&&(!Number.isInteger(t.length)||t.length<1))throw Error(`Invalid nanoid length: ${t.length}`);t.pattern??(t.pattern=void 0===t.length?tV:(r=t.length,RegExp(`^[a-zA-Z0-9_-]{${r}}$`))),rd.init(e,t)}),r_=tc("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=tS),rd.init(e,t)}),rv=tc("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=tk),rd.init(e,t)}),rb=tc("$ZodULID",(e,t)=>{t.pattern??(t.pattern=tw),rd.init(e,t)}),r$=tc("$ZodXID",(e,t)=>{t.pattern??(t.pattern=tR),rd.init(e,t)}),rS=tc("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=tP),rd.init(e,t)}),rk=tc("$ZodISODateTime",(e,t)=>{let r,i,o;t.pattern??(r=["Z"],t.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)"),i=`${tz({precision:t.precision,seconds:!0})}(?:${r.join("|")})`,o=t.local?`${i}|${tz({precision:t.precision})}`:i,t.pattern=RegExp(`^${tW}T(?:${o})$`)),rd.init(e,t)}),rw=tc("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=tN),rd.init(e,t)}),rR=tc("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=RegExp(`^${tz(t)}$`)),rd.init(e,t)}),rP=tc("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=tq),rd.init(e,t)}),rV=tc("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=tC),rd.init(e,t)}),rq=/^[0-9a-fA-F:.]+$/;function rI(e){return!!rq.test(e)&&ru(`http://[${e}]`)}let rx=tc("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=tT),rd.init(e,t),e._zod.check=r=>{rI(r.value)||r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}),rj=tc("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=tO),rd.init(e,t)}),rC=tc("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=tE),rd.init(e,t),e._zod.check=r=>{!function(e){let t=e.split("/");if(2!==t.length)return!1;let[r,i]=t;if(!i)return!1;let o=Number(i);return`${o}`===i&&!(o<0)&&!(o>128)&&rI(r)}(r.value)&&r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}});function rT(e){if(""===e)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}let rO=/^[0-9a-zA-Z+/]*={0,2}$/,rE=tc("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=rO),rd.init(e,t),e._zod.check=r=>{rT(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}}),rA=/^[A-Za-z0-9_-]*$/,rM=tc("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=rA),rd.init(e,t),e._zod.check=r=>{!function(e){if(!rA.test(e))return!1;let t=e.replace(/[-_]/g,e=>"-"===e?"+":"/");return rT(t.padEnd(4*Math.ceil(t.length/4),"="))}(r.value)&&r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),rW=tc("$ZodE164",(e,t)=>{t.pattern??(t.pattern=tM),rd.init(e,t)}),rN=tc("$ZodJWT",(e,t)=>{rd.init(e,t),e._zod.check=r=>{!function(e,t=null){try{let r=e.split(".");if(3!==r.length)return!1;let[i]=r;if(!i)return!1;let o=JSON.parse(atob(i));if("typ"in o&&o?.typ!=="JWT"||!o.alg||t&&(!("alg"in o)||o.alg!==t))return!1;return!0}catch{return!1}}(r.value,t.alg)&&r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),rz=tc("$ZodNumber",(e,t)=>{ro.init(e,t),e._zod.pattern=tL,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=Number(r.value)}catch(e){}let o=r.value;if("number"==typeof o&&!Number.isNaN(o)&&Number.isFinite(o))return r;let n="number"==typeof o?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:String(o):void 0;return r.issues.push({expected:"number",code:"invalid_type",input:o,inst:e,...n?{received:n}:{}}),r}}),rD=tc("$ZodNumberFormat",(e,t)=>{t1.init(e,t),rz.init(e,t)}),rF=tc("$ZodBoolean",(e,t)=>{ro.init(e,t),e._zod.pattern=tU,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=!!r.value}catch(e){}let o=r.value;return"boolean"==typeof o||r.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:e}),r}}),rL=tc("$ZodNull",(e,t)=>{ro.init(e,t),e._zod.pattern=tH,e._zod.values=new Set([null]),e._zod.parse=(t,r)=>{let i=t.value;return null===i||t.issues.push({expected:"null",code:"invalid_type",input:i,inst:e}),t}}),rU=tc("$ZodAny",(e,t)=>{ro.init(e,t),e._zod.parse=e=>e}),rH=tc("$ZodUnknown",(e,t)=>{ro.init(e,t),e._zod.parse=e=>e}),rG=tc("$ZodNever",(e,t)=>{ro.init(e,t),e._zod.parse=(t,r)=>(t.issues.push({expected:"never",code:"invalid_type",input:t.value,inst:e}),t)}),rB=e=>Array.isArray(e)?e.length:-1;function rK(e,t,r){e.issues.length&&t.issues.push(...e2(r,e.issues)),t.value[r]=e.value}let rJ=tc("$ZodArray",(e,t)=>{ro.init(e,t);let r=tu.memoizer;r?.attach(e),e._zod.parse=(i,o)=>{let n=i.value;if(!Array.isArray(n))return i.issues.push({expected:"array",code:"invalid_type",input:n,inst:e}),i;i.value=r?r.alloc(e,i,Array(n.length),o):Array(n.length);let a=[],s=o?.abortEarly;for(let e=0;erK(t,i,e)));else if(rK(d,i,e),s&&0!==d.issues.length&&e0(d))break}return a.length?Promise.all(a).then(()=>i):i},function(e,t){let r=e6(e._zod.def.checks);if(!r.length)return;let i=Math.min(...r.map(e=>e[0])),o=e._zod.parse;e._zod.parse=(r,n)=>{let a=t(r.value);if(a>i&&!n?.skipChecks&&n?.direction!=="backward"){for(let[t,i]of e6(e._zod.def.checks))if(a>t&&i._zod.def.when(r)){let t=r.issues.length;return i._zod.check(r),r.issues[t].continue=!1,e3(r.issues,t,e),r}}return o(r,n)}}(e,rB)});function rZ(e,t,r,i,o,n){let a=r in i,s="optional"===n;if(a||!s||"optional"!==o){if(e.issues.length){if(void 0!==o&&s&&!a)return;t.issues.push(...e2(r,e.issues))}if(!a&&void 0===o){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[r]});return}void 0===e.value?(a||"defaulted"===o&&!s)&&(t.value[r]=void 0):t.value[r]=e.value}}let rQ=[];function rX(e){var t;let r=Object.keys(e.shape),i=Object.getOwnPropertySymbols(e.shape),o=i.length?i:rQ,n=o.length?[...r,...o]:r;for(let t of n)if(!e.shape?.[t]?._zod?.traits?.has("$ZodType"))throw Error(`Invalid element at key "${String(t)}": expected a Zod schema`);let a=Object.keys(t=e.shape).filter(e=>void 0!==t[e]._zod.optin&&"optional"===t[e]._zod.optout);return{...e,allKeys:n,symbolKeys:o,keySet:new Set(r),numKeys:r.length,optionalKeys:new Set(a)}}function rY(e,t,r,i,o,n,a){let s=[],d=o.keySet,c=o.catchall._zod,l=c.def.type,p=c.optin,u=c.optout,m=0;for(let o in t){if(a&&r.issues.length!==m){if(e0(r,m))break;m=r.issues.length}if(d.has(o))continue;if("__proto__"===o){"never"===l&&s.push(o);continue}if("never"===l){s.push(o);continue}let n=c.run({value:t[o],issues:[]},i);n instanceof Promise?e.push(n.then(e=>rZ(e,r,o,t,p,u))):rZ(n,r,o,t,p,u)}return(s.length&&r.issues.push({code:"unrecognized_keys",keys:s,input:t,inst:n,continue:!0}),e.length)?Promise.all(e).then(()=>r):r}let r1=tc("$ZodObject",(e,t)=>{let r;ro.init(e,t);let i=Object.getOwnPropertyDescriptor(t,"shape"),o=i?.get?i.get.raw:t.shape??{};if(o){let e=()=>{let r={...o};return Object.defineProperty(t,"shape",{value:r}),e.raw=r,r};e.raw=o,Object.defineProperty(t,"shape",{get:e})}let n=ex(()=>rX(t));tn(e,"propValues",e=>{let t=e.def.shape,r={};for(let e in t){let i=t[e]._zod;if(i.values){for(let t of(Object.prototype.hasOwnProperty.call(r,e)||eT(r,e,new Set),i.values))r[e].add(t);void 0!==i.optin&&r[e].add(void 0)}}return r});let a=t.catchall,s=tu.memoizer;s?.attach(e),e._zod.parse=(t,i)=>{r??(r=n.value);let o=t.value;if(!eD(o))return t.issues.push({expected:"object",code:"invalid_type",input:o,inst:e}),t;t.value=s?s.alloc(e,t,{},i):{};let d=[],c=r.shape,l=i?.abortEarly,p=t.issues.length;for(let e of r.allKeys){if(l&&t.issues.length!==p){if(e0(t,p))break;p=t.issues.length}if("__proto__"===e)continue;let r=c[e],n=r._zod.optin,a=r._zod.optout,s=r._zod.run({value:o[e],issues:[]},i);s instanceof Promise?d.push(s.then(r=>rZ(r,t,e,o,n,a))):rZ(s,t,e,o,n,a)}return a?rY(d,o,t,i,n.value,e,!0===l):d.length?Promise.all(d).then(()=>t):t}}),r0=tc("$ZodObjectJIT",(e,t)=>{let r,i;r1.init(e,t);let o=e._zod.parse,n=ex(()=>rX(t)),a=tu.memoizer,s=!tu.jitless,d=s&&eF.value,c=t.catchall;e._zod.parse=(l,p)=>{i??(i=n.value);let u=l.value;return eD(u)?s&&d&&p?.async===!1&&!0!==p.jitless?(r||(r=(t=>{let r=n.value,i=r.symbolKeys,o=new rr(["payload","ctx"],{shape:t,inst:e,memo:a,syms:i}),s=e=>`shape[${e}]._zod.run({ value: input[${e}], issues: [] }, ctx)`,d=(e,t)=>` let ${e}_ab = false; for (let i = 0; i < ${e}.issues.length; i++) { const iss = ${e}.issues[i]; @@ -50,20 +50,20 @@ ${t.join("\n")} newResult[${n}] = ${r}.value; } - `)}return o.write("payload.value = newResult;"),o.write("return payload;"),o.compile()})(t.shape)),l=r(l,p),c)?rY([],u,l,p,i,e,p?.abortEarly===!0):l:o(l,p):(l.issues.push({expected:"object",code:"invalid_type",input:u,inst:e}),l)}});function r2(e,t,r,i){for(let r of e)if(0===r.issues.length)return t.value=r.value,t;let o=e.filter(e=>!e0(e));return 1===o.length?(t.value=o[0].value,o[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(e=>e.issues.map(e=>e9(e,i,tm())))}),t)}let r4=tc("$ZodUnion",(e,t)=>{ro.init(e,t),tn(e,"optin",e=>e.def.options.some(e=>"defaulted"===e._zod.optin)?"defaulted":e.def.options.some(e=>void 0!==e._zod.optin)?"optional":void 0),tn(e,"optout",e=>e.def.options.some(e=>"optional"===e._zod.optout)?"optional":void 0),tn(e,"values",e=>{if(e.def.options.every(e=>e._zod.values))return new Set(e.def.options.flatMap(e=>Array.from(e._zod.values)))}),tn(e,"pattern",e=>{if(e.def.options.every(e=>e._zod.pattern)){let t=e.def.options.map(e=>e._zod.pattern);return RegExp(`^(${t.map(e=>ej(e.source)).join("|")})$`)}});let r=1===t.options.length?t.options[0]._zod.run:null;e._zod.parse=(i,o)=>{if(r)return r(i,o);let n=!1,a=[];for(let e of t.options){let t=e._zod.run({value:i.value,issues:[]},o);if(t instanceof Promise)a.push(t),n=!0;else{if(0===t.issues.length)return t;a.push(t)}}return n?Promise.all(a).then(t=>r2(t,i,e,o)):r2(a,i,e,o)}}),r6=tc("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,r4.init(e,t);let r=e._zod.parse;tn(e,"propValues",e=>{let t={},r=0;for(let i of e.def.options){let o=i._zod.propValues;if(!o||0===Object.keys(o).length)throw Error(`Invalid discriminated union option at index "${e.def.options.indexOf(i)}"`);for(let[i,n]of(o[e.def.discriminator]?.has(void 0)&&r++,Object.entries(o)))for(let e of(Object.prototype.hasOwnProperty.call(t,i)||eT(t,i,new Set),n))t[i].add(e)}return!e.def.unionFallback&&r>1&&t[e.def.discriminator]?.delete(void 0),t}),t.options.forEach((e,r)=>{let i=eO(e._zod.def);if(i&&!Object.prototype.hasOwnProperty.call(i,t.discriminator))throw Error(`Invalid discriminated union option at index "${r}"`)});let i=ex(()=>(function(e){let t=new Map;for(let r of e.options){let i=r._zod.propValues?.[e.discriminator];if(!i||0===i.size)throw Error(`Invalid discriminated union option at index "${e.options.indexOf(r)}"`);for(let e of i)if(t.has(e)){if(void 0!==e)throw Error(`Duplicate discriminator value "${String(e)}"`);t.set(e,null)}else t.set(e,r)}return t})(t));e._zod.parse=(o,n)=>{let a=o.value;if(!eD(a))return o.issues.push({code:"invalid_type",expected:"object",input:a,inst:e}),o;let s=a?.[t.discriminator],d=i.value.get(s);return d&&(void 0!==s||"backward"!==n.direction)?d._zod.run(o,n):t.unionFallback||"backward"===n.direction?r(o,n):(o.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,options:Array.from(i.value.keys()).filter(e=>null!==i.value.get(e)),input:a,path:[t.discriminator],inst:e}),o)}}),r3=tc("$ZodIntersection",(e,t)=>{ro.init(e,t),e._zod.parse=(e,r)=>{let i=e.value,o=t.left._zod.run({value:i,issues:[]},r),n=t.right._zod.run({value:i,issues:[]},r);return o instanceof Promise||n instanceof Promise?Promise.all([o,n]).then(([t,r])=>r9(e,t,r)):r9(e,o,n)}});function r9(e,t,r){let i,o=new Map,n=new Map,a=(e,t)=>{let r;if("unrecognized_keys"!==e.code||e.path?.length)if("invalid_key"!==e.code||"record"!==e.origin||e.path?.length!==1)return!1;else{let t=String(e.path[0]);n.has(t)||n.set(t,e),r=[t]}else i??(i=e),r=e.keys;for(let e of r)o.has(e)||o.set(e,{}),o.get(e)[t]=!0;return!0};for(let r of t.issues)a(r,"l")||e.issues.push(r);for(let t of r.issues)a(t,"r")||e.issues.push(t);let s=[...o].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(s.length){let t=i?s.filter(e=>i.keys.includes(e)):[];for(let r of(t.length&&e.issues.push({...i,keys:t}),s))!t.includes(r)&&n.has(r)&&e.issues.push(n.get(r))}let d=function e(t,r){if(t===r||t instanceof Date&&r instanceof Date&&+t==+r)return{valid:!0,data:t};if(eL(t)&&eL(r)){let i=Object.keys(r),o=Object.keys(t).filter(e=>-1!==i.indexOf(e)),n={...t,...r};for(let i of(Object.prototype.hasOwnProperty.call(n,"__proto__")&&delete n.__proto__,o)){if("__proto__"===i)continue;let o=e(t[i],r[i]);if(!o.valid)return{valid:!1,mergeErrorPath:[i,...o.mergeErrorPath]};n[i]=o.data}return{valid:!0,data:n}}if(Array.isArray(t)&&Array.isArray(r)){if(t.length!==r.length)return{valid:!1,mergeErrorPath:[]};let i=[];for(let o=0;o{ro.init(e,t);let r=tu.memoizer;r?.attach(e),e._zod.parse=(i,o)=>{let n=i.value;if(!eL(n))return i.issues.push({expected:"record",code:"invalid_type",input:n,inst:e}),i;let a=[],s=t.keyType._zod.values;if(s&&!t.partial){let d;i.value=r?r.alloc(e,i,{},o):{};let c=new Set;for(let r of s)if("string"==typeof r||"number"==typeof r||"symbol"==typeof r){if(c.add("number"==typeof r?r.toString():r),"__proto__"===r)continue;let s=t.keyType._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(s.issues.length){i.issues.push({code:"invalid_key",origin:"record",issues:s.issues.map(e=>e9(e,o,tm())),input:r,path:[r],inst:e});continue}let d=s.value;if("__proto__"===d)continue;let l=t.valueType._zod.run({value:n[r],issues:[]},o);l instanceof Promise?a.push(l.then(e=>{e.issues.length&&i.issues.push(...e2(r,e.issues)),i.value[d]=e.value})):(l.issues.length&&i.issues.push(...e2(r,l.issues)),i.value[d]=l.value)}for(let e in n)if(!c.has(e))if("loose"===t.mode){if("__proto__"===e)continue;i.value[e]=n[e]}else(d=d??[]).push(e);d&&d.length>0&&i.issues.push({code:"unrecognized_keys",input:n,inst:e,keys:d,continue:!0})}else{let d;for(let c of(i.value=r?r.alloc(e,i,{},o):{},Reflect.ownKeys(n))){if("__proto__"===c||!Object.prototype.propertyIsEnumerable.call(n,c))continue;let r=t.keyType._zod.run({value:c,issues:[]},o);if(r instanceof Promise)throw Error("Async schemas not supported in object keys currently");if("string"==typeof c&&tL.test(c)&&r.issues.length){let e=t.keyType._zod.run({value:Number(c),issues:[]},o);if(e instanceof Promise)throw Error("Async schemas not supported in object keys currently");0===e.issues.length&&(r=e)}if(r.issues.length){"loose"===t.mode?i.value[c]=n[c]:s?(d=d??[]).push(c):i.issues.push({code:"invalid_key",origin:"record",issues:r.issues.map(e=>e9(e,o,tm())),input:c,path:[c],inst:e});continue}let l=r.value;if("__proto__"===l)continue;let p=t.valueType._zod.run({value:n[c],issues:[]},o);p instanceof Promise?a.push(p.then(e=>{e.issues.length&&i.issues.push(...e2(c,e.issues)),i.value[l]=e.value})):(p.issues.length&&i.issues.push(...e2(c,p.issues)),i.value[l]=p.value)}d&&d.length>0&&i.issues.push({code:"unrecognized_keys",input:n,inst:e,keys:d,continue:!0})}return a.length?Promise.all(a).then(()=>i):i}}),r8=tc("$ZodEnum",(e,t)=>{ro.init(e,t);let r=eP(t.entries),i=new Set(r);e._zod.values=i,tn(e,"pattern",e=>{let t=eP(e.def.entries).filter(e=>eH.has(typeof e));return new RegExp(t.length?`^(${t.map(e=>eG(e.toString())).join("|")})$`:"^[^\\s\\S]$")}),e._zod.parse=(t,o)=>{let n=t.value;return i.has(n)||t.issues.push({code:"invalid_value",values:r,input:n,inst:e}),t}}),r7=tc("$ZodLiteral",(e,t)=>{ro.init(e,t);let r=new Set(t.values);e._zod.values=r,tn(e,"pattern",e=>{let t=e.def.values;return new RegExp(t.length?`^(${t.map(e=>"string"==typeof e?eG(e):e?eG(e.toString()):String(e)).join("|")})$`:"^[^\\s\\S]$")}),e._zod.parse=(i,o)=>{let n=i.value;return r.has(n)||i.issues.push({code:"invalid_value",values:t.values,input:n,inst:e}),i}}),ie=tc("$ZodTransform",(e,t)=>{ro.init(e,t),e._zod.optin="optional",tu.memoizer?.guard(e),e._zod.parse=(r,i)=>{if("backward"===i.direction)throw new tp(e.constructor.name);let o=t.transform(r.value,r);if(i.async)return(o instanceof Promise?o:Promise.resolve(o)).then(e=>(r.value=e,r));if(o instanceof Promise)throw new tl;return r.value=o,r}});function it(e,t){return e.value=t.issues.length?void 0:t.value,e}let ir=tc("$ZodOptional",(e,t)=>{ro.init(e,t),tn(e,"optin",e=>"defaulted"===e.def.innerType._zod.optin?"defaulted":"optional"),e._zod.optout="optional",tn(e,"values",e=>{let t=e.def.innerType._zod.values;return t?new Set([...t,void 0]):void 0}),tn(e,"pattern",e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${ej(t.source)})?$`):void 0}),e._zod.parse=(e,r)=>{if(void 0===e.value){if("defaulted"!==t.innerType._zod.optin)return e;let i=t.innerType._zod.run({value:e.value,issues:[]},r);return i instanceof Promise?i.then(t=>it(e,t)):it(e,i)}return t.innerType._zod.run(e,r)}}),ii=tc("$ZodExactOptional",(e,t)=>{ir.init(e,t),tn(e,"values",e=>e.def.innerType._zod.values),tn(e,"pattern",e=>e.def.innerType._zod.pattern),e._zod.parse=(e,r)=>t.innerType._zod.run(e,r)}),io=tc("$ZodNullable",(e,t)=>{ro.init(e,t),tn(e,"optin",e=>e.def.innerType._zod.optin),tn(e,"optout",e=>e.def.innerType._zod.optout),tn(e,"pattern",e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${ej(t.source)}|null)$`):void 0}),tn(e,"values",e=>e.def.innerType._zod.values?new Set([...e.def.innerType._zod.values,null]):void 0),e._zod.parse=(e,r)=>null===e.value?e:t.innerType._zod.run(e,r)}),ia=tc("$ZodDefault",(e,t)=>{ro.init(e,t),e._zod.optin="defaulted",tn(e,"values",e=>e.def.innerType._zod.values),e._zod.parse=(e,r)=>{if("backward"===r.direction)return t.innerType._zod.run(e,r);if(void 0===e.value)return e.value=t.defaultValue,e;let i=t.innerType._zod.run(e,r);return i instanceof Promise?i.then(e=>is(e,t)):is(i,t)}});function is(e,t){return void 0===e.value&&(e.value=t.defaultValue),e}let id=tc("$ZodPrefault",(e,t)=>{ro.init(e,t),e._zod.optin="defaulted",tn(e,"values",e=>e.def.innerType._zod.values),e._zod.parse=(e,r)=>("backward"===r.direction||void 0===e.value&&(e.value=t.defaultValue),t.innerType._zod.run(e,r))}),ic=tc("$ZodNonOptional",(e,t)=>{ro.init(e,t),tn(e,"values",e=>{let t=e.def.innerType._zod.values;return t?new Set([...t].filter(e=>void 0!==e)):void 0}),e._zod.parse=(r,i)=>{let o=t.innerType._zod.run(r,i);return o instanceof Promise?o.then(t=>il(t,e)):il(o,e)}});function il(e,t){return e.issues.length||void 0!==e.value||e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}function ip(e,t,r,i){return t.issues.length?e.value=r.catchValue({...t,value:e.value,error:{issues:t.issues.map(e=>e9(e,i,tm()))},input:e.value}):(e.value=t.value,t.memo&&(e.memo=!0)),e}let iu=tc("$ZodCatch",(e,t)=>{ro.init(e,t),tn(e,"optin",e=>"defaulted"===e.def.innerType._zod.optin?"defaulted":"optional"),tn(e,"optout",e=>e.def.innerType._zod.optout),tn(e,"values",e=>e.def.innerType._zod.values),e._zod.parse=(e,r)=>{if("backward"===r.direction)return t.innerType._zod.run(e,r);let i=t.innerType._zod.run({value:e.value,issues:[]},r);return i instanceof Promise?i.then(i=>ip(e,i,t,r)):ip(e,i,t,r)}}),im=tc("$ZodPipe",(e,t)=>{ro.init(e,t),tn(e,"values",e=>e.def.in._zod.values),tn(e,"optin",e=>e.def.in._zod.optin),tn(e,"optout",e=>e.def.out._zod.optout),tn(e,"propValues",e=>e.def.in._zod.propValues),e._zod.parse=(e,r)=>{if("backward"===r.direction){let i=t.out._zod.run(e,r);return i instanceof Promise?i.then(e=>ih(e,t.in,r)):ih(i,t.in,r)}let i=t.in._zod.run(e,r);return i instanceof Promise?i.then(e=>ih(e,t.out,r)):ih(i,t.out,r)}});function ih(e,t,r){return e.issues.some(e=>"unrecognized_keys"!==e.code)?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}let iy=tc("$ZodPreprocess",(e,t)=>{im.init(e,t)}),ig=tc("$ZodReadonly",(e,t)=>{ro.init(e,t),tn(e,"propValues",e=>e.def.innerType._zod.propValues),tn(e,"values",e=>e.def.innerType._zod.values),tn(e,"optin",e=>e.def.innerType?._zod?.optin),tn(e,"optout",e=>e.def.innerType?._zod?.optout),e._zod.parse=(e,r)=>{if("backward"===r.direction)return t.innerType._zod.run(e,r);let i=t.innerType._zod.run(e,r);return i instanceof Promise?i.then(i_):i_(i)}});function i_(e){return e.memo||(e.value=Object.freeze(e.value)),e}let iv=tc("$ZodLazy",(e,t)=>{var r;let i;ro.init(e,t),r=e._zod,Object.defineProperty(r,"innerType",{get(){if(i!==eC)return void 0===i&&(i=eC,i=(()=>(t._cachedInner||(t._cachedInner=t.getter()),t._cachedInner))()),i},set(e){Object.defineProperty(r,"innerType",{value:e})},configurable:!0}),tn(e,"pattern",e=>e.innerType?._zod?.pattern),tn(e,"propValues",e=>e.innerType?._zod?.propValues),tn(e,"optin",e=>e.innerType?._zod?.optin??void 0),tn(e,"optout",e=>e.innerType?._zod?.optout??void 0),e._zod.parse=(t,r)=>e._zod.innerType._zod.run(t,r)}),ib=tc("$ZodCustom",(e,t)=>{tK.init(e,t),ro.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=r=>{let i=r.value,o=t.fn(i);if(o instanceof Promise)return o.then(t=>i$(t,r,i,e));i$(o,r,i,e)}});function i$(e,t,r,i){if(!e){let e={code:"custom",input:r,inst:i,path:[...i._zod.def.path??[]],continue:!i._zod.def.abort};i._zod.def.params&&(e.params=i._zod.def.params),t.issues.push(te(e))}}(ei=globalThis).__zod_globalRegistry??(ei.__zod_globalRegistry=new class e{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let r=t[0];return this._map.set(e,r),r&&"object"==typeof r&&"id"in r&&this._idmap.set(r.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&"object"==typeof t&&"id"in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let r={...this.get(t)??{}};delete r.id;let i={...r,...this._map.get(e)};return Object.keys(i).length?i:void 0}return this._map.get(e)}has(e){return this._map.has(e)}});let iS=globalThis.__zod_globalRegistry;function ik(e){return e.checks&&(e.checks=[...e.checks]),e}function iw(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...eK(t)})}function iV(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...eK(t)})}function iP(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...eK(t)})}function iR(e,t){return new e({type:"string",format:"date",check:"string_format",...eK(t)})}function iq(e,t){return new tQ({check:"less_than",...eK(t),value:e,inclusive:!1})}function iI(e,t){return new tQ({check:"less_than",...eK(t),value:e,inclusive:!0})}function ix(e,t){return new tX({check:"greater_than",...eK(t),value:e,inclusive:!1})}function ij(e,t){return new tX({check:"greater_than",...eK(t),value:e,inclusive:!0})}function iC(e,t){return new tY({check:"multiple_of",...eK(t),value:e})}function iT(e,t){return new t0({check:"max_length",...eK(t),maximum:e})}function iO(e,t){return new t2({check:"min_length",...eK(t),minimum:e})}function iE(e,t){return new t4({check:"length_equals",...eK(t),length:e})}function iA(e){return new rt({check:"overwrite",tx:e})}function iW(e,...t){for(let r of t)for(let t of Reflect.ownKeys(r))Object.prototype.propertyIsEnumerable.call(r,t)&&eT(e,t,r[t]);return e}function iM(e){let t=e?.target??"draft-2020-12";return"draft-4"===t&&(t="draft-04"),"draft-7"===t&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??iS,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:e?.cycles??"ref",reused:e?.reused??"inline",intersections:[],deferred:[],external:e?.external??void 0}}function iN(e,t,r,i,o){let n="function"==typeof t.unrepresentable?t.unrepresentable({zodSchema:e,path:i.path,message:o}):t.unrepresentable;if("any"===n)return!1;if(void 0===n||"throw"===n)throw Error(o);return Object.assign(r,n),!0}function iz(e,t,r={path:[],schemaPath:[]}){var i;let o=e._zod.def,n=t.seen.get(e);if(n)return n.count++,r.schemaPath.includes(e)&&(n.cycle=r.path),n.schema;let a={schema:{},count:1,cycle:void 0,path:r.path};t.seen.set(e,a),t.sharedDefsExtractedFor=void 0,t.sharedEmitDoneFor=void 0;let s=e._zod.toJSONSchema?.();if(s)a.schema=s;else{let i={...r,schemaPath:[...r.schemaPath,e],path:r.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,a.schema,i);else{let r=a.schema,n=t.processors[o.type];if(!n)throw Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);n(e,t,r,i)}let n=e._zod.parent;n&&(a.ref||(a.ref=n),iz(n,t,i),t.seen.get(n).isParent=!0)}let d=t.metadataRegistry.get(e);return d&&iW(a.schema,d),"input"===t.io&&function e(t,r){let i=r??{seen:new Set};if(i.seen.has(t))return!1;i.seen.add(t);let o=t._zod.def;if("transform"===o.type)return!0;if("array"===o.type)return e(o.element,i);if("set"===o.type)return e(o.valueType,i);if("lazy"===o.type)return e(o.getter(),i);if("promise"===o.type||"optional"===o.type||"nonoptional"===o.type||"nullable"===o.type||"readonly"===o.type||"default"===o.type||"prefault"===o.type||"catch"===o.type)return e(o.innerType,i);if("intersection"===o.type)return e(o.left,i)||e(o.right,i);if("record"===o.type||"map"===o.type)return e(o.keyType,i)||e(o.valueType,i);if("pipe"===o.type)return!!t._zod.traits.has("$ZodCodec")||e(o.in,i)||e(o.out,i);if("object"===o.type){for(let t in o.shape)if(e(o.shape[t],i))return!0;return!1}if("union"===o.type){for(let t of o.options)if(e(t,i))return!0;return!1}if("tuple"===o.type){for(let t of o.items)if(e(t,i))return!0;if(o.rest&&e(o.rest,i))return!0}return!1}(e)&&(delete a.schema.examples,delete a.schema.default),"input"===t.io&&"_prefault"in a.schema&&((i=a.schema).default??(i.default=a.schema._prefault)),delete a.schema._prefault,t.seen.get(e).schema}function iD(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function iF(e,t){let r=e.seen.get(t);if(!r)throw Error("Unprocessed schema. This is a bug in Zod.");if(e.external&&e.sharedDefsExtractedFor===e.external)return;let i=new Map;for(let t of e.seen.entries()){let r=e.metadataRegistry.get(t[0])?.id;if(r){let e=i.get(r);if(e&&e!==t[0])throw Error(`Duplicate schema id "${r}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);i.set(r,t[0])}}let o=t=>{if(t[1].schema.$ref)return;let i=t[1],{ref:o,defId:n}=(t=>{let i="draft-2020-12"===e.target?"$defs":"definitions";if(e.external){let r=e.external.registry.get(t[0])?.id,o=e.external.uri??(e=>e);if(r)return{ref:o(r)};let n=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=n,{defId:n,ref:`${o("__shared")}#/${i}/${iD(n)}`}}let o=`#/${i}/`;if(t[1]===r&&!t[1].schema.id)return{ref:"#"};let n=t[1].schema.id??`__schema${e.counter++}`;return{defId:n,ref:o+iD(n)}})(t);i.def={...i.schema},n&&(i.defId=n);let a=i.schema;for(let e in a)delete a[e];a.$ref=o};if("throw"===e.cycles)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join("/")}/ + `)}return o.write("payload.value = newResult;"),o.write("return payload;"),o.compile()})(t.shape)),l=r(l,p),c)?rY([],u,l,p,i,e,p?.abortEarly===!0):l:o(l,p):(l.issues.push({expected:"object",code:"invalid_type",input:u,inst:e}),l)}});function r2(e,t,r,i){for(let r of e)if(0===r.issues.length)return t.value=r.value,t;let o=e.filter(e=>!e0(e));return 1===o.length?(t.value=o[0].value,o[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(e=>e.issues.map(e=>e9(e,i,tm())))}),t)}let r4=tc("$ZodUnion",(e,t)=>{ro.init(e,t),tn(e,"optin",e=>e.def.options.some(e=>"defaulted"===e._zod.optin)?"defaulted":e.def.options.some(e=>void 0!==e._zod.optin)?"optional":void 0),tn(e,"optout",e=>e.def.options.some(e=>"optional"===e._zod.optout)?"optional":void 0),tn(e,"values",e=>{if(e.def.options.every(e=>e._zod.values))return new Set(e.def.options.flatMap(e=>Array.from(e._zod.values)))}),tn(e,"pattern",e=>{if(e.def.options.every(e=>e._zod.pattern)){let t=e.def.options.map(e=>e._zod.pattern);return RegExp(`^(${t.map(e=>ej(e.source)).join("|")})$`)}});let r=1===t.options.length?t.options[0]._zod.run:null;e._zod.parse=(i,o)=>{if(r)return r(i,o);let n=!1,a=[];for(let e of t.options){let t=e._zod.run({value:i.value,issues:[]},o);if(t instanceof Promise)a.push(t),n=!0;else{if(0===t.issues.length)return t;a.push(t)}}return n?Promise.all(a).then(t=>r2(t,i,e,o)):r2(a,i,e,o)}}),r6=tc("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,r4.init(e,t);let r=e._zod.parse;tn(e,"propValues",e=>{let t={},r=0;for(let i of e.def.options){let o=i._zod.propValues;if(!o||0===Object.keys(o).length)throw Error(`Invalid discriminated union option at index "${e.def.options.indexOf(i)}"`);for(let[i,n]of(o[e.def.discriminator]?.has(void 0)&&r++,Object.entries(o)))for(let e of(Object.prototype.hasOwnProperty.call(t,i)||eT(t,i,new Set),n))t[i].add(e)}return!e.def.unionFallback&&r>1&&t[e.def.discriminator]?.delete(void 0),t}),t.options.forEach((e,r)=>{let i=eO(e._zod.def);if(i&&!Object.prototype.hasOwnProperty.call(i,t.discriminator))throw Error(`Invalid discriminated union option at index "${r}"`)});let i=ex(()=>(function(e){let t=new Map;for(let r of e.options){let i=r._zod.propValues?.[e.discriminator];if(!i||0===i.size)throw Error(`Invalid discriminated union option at index "${e.options.indexOf(r)}"`);for(let e of i)if(t.has(e)){if(void 0!==e)throw Error(`Duplicate discriminator value "${String(e)}"`);t.set(e,null)}else t.set(e,r)}return t})(t));e._zod.parse=(o,n)=>{let a=o.value;if(!eD(a))return o.issues.push({code:"invalid_type",expected:"object",input:a,inst:e}),o;let s=a?.[t.discriminator],d=i.value.get(s);return d&&(void 0!==s||"backward"!==n.direction)?d._zod.run(o,n):t.unionFallback||"backward"===n.direction?r(o,n):(o.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,options:Array.from(i.value.keys()).filter(e=>null!==i.value.get(e)),input:a,path:[t.discriminator],inst:e}),o)}}),r3=tc("$ZodIntersection",(e,t)=>{ro.init(e,t),e._zod.parse=(e,r)=>{let i=e.value,o=t.left._zod.run({value:i,issues:[]},r),n=t.right._zod.run({value:i,issues:[]},r);return o instanceof Promise||n instanceof Promise?Promise.all([o,n]).then(([t,r])=>r9(e,t,r)):r9(e,o,n)}});function r9(e,t,r){let i,o=new Map,n=new Map,a=(e,t)=>{let r;if("unrecognized_keys"!==e.code||e.path?.length)if("invalid_key"!==e.code||"record"!==e.origin||e.path?.length!==1)return!1;else{let t=String(e.path[0]);n.has(t)||n.set(t,e),r=[t]}else i??(i=e),r=e.keys;for(let e of r)o.has(e)||o.set(e,{}),o.get(e)[t]=!0;return!0};for(let r of t.issues)a(r,"l")||e.issues.push(r);for(let t of r.issues)a(t,"r")||e.issues.push(t);let s=[...o].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(s.length){let t=i?s.filter(e=>i.keys.includes(e)):[];for(let r of(t.length&&e.issues.push({...i,keys:t}),s))!t.includes(r)&&n.has(r)&&e.issues.push(n.get(r))}let d=function e(t,r){if(t===r||t instanceof Date&&r instanceof Date&&+t==+r)return{valid:!0,data:t};if(eL(t)&&eL(r)){let i=Object.keys(r),o=Object.keys(t).filter(e=>-1!==i.indexOf(e)),n={...t,...r};for(let i of(Object.prototype.hasOwnProperty.call(n,"__proto__")&&delete n.__proto__,o)){if("__proto__"===i)continue;let o=e(t[i],r[i]);if(!o.valid)return{valid:!1,mergeErrorPath:[i,...o.mergeErrorPath]};n[i]=o.data}return{valid:!0,data:n}}if(Array.isArray(t)&&Array.isArray(r)){if(t.length!==r.length)return{valid:!1,mergeErrorPath:[]};let i=[];for(let o=0;o{ro.init(e,t);let r=tu.memoizer;r?.attach(e),e._zod.parse=(i,o)=>{let n=i.value;if(!eL(n))return i.issues.push({expected:"record",code:"invalid_type",input:n,inst:e}),i;let a=[],s=t.keyType._zod.values;if(s&&!t.partial){let d;i.value=r?r.alloc(e,i,{},o):{};let c=new Set;for(let r of s)if("string"==typeof r||"number"==typeof r||"symbol"==typeof r){if(c.add("number"==typeof r?r.toString():r),"__proto__"===r)continue;let s=t.keyType._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(s.issues.length){i.issues.push({code:"invalid_key",origin:"record",issues:s.issues.map(e=>e9(e,o,tm())),input:r,path:[r],inst:e});continue}let d=s.value;if("__proto__"===d)continue;let l=t.valueType._zod.run({value:n[r],issues:[]},o);l instanceof Promise?a.push(l.then(e=>{e.issues.length&&i.issues.push(...e2(r,e.issues)),i.value[d]=e.value})):(l.issues.length&&i.issues.push(...e2(r,l.issues)),i.value[d]=l.value)}for(let e in n)if(!c.has(e))if("loose"===t.mode){if("__proto__"===e)continue;i.value[e]=n[e]}else(d=d??[]).push(e);d&&d.length>0&&i.issues.push({code:"unrecognized_keys",input:n,inst:e,keys:d,continue:!0})}else{let d;for(let c of(i.value=r?r.alloc(e,i,{},o):{},Reflect.ownKeys(n))){if("__proto__"===c||!Object.prototype.propertyIsEnumerable.call(n,c))continue;let r=t.keyType._zod.run({value:c,issues:[]},o);if(r instanceof Promise)throw Error("Async schemas not supported in object keys currently");if("string"==typeof c&&tL.test(c)&&r.issues.length){let e=t.keyType._zod.run({value:Number(c),issues:[]},o);if(e instanceof Promise)throw Error("Async schemas not supported in object keys currently");0===e.issues.length&&(r=e)}if(r.issues.length){"loose"===t.mode?i.value[c]=n[c]:s?(d=d??[]).push(c):i.issues.push({code:"invalid_key",origin:"record",issues:r.issues.map(e=>e9(e,o,tm())),input:c,path:[c],inst:e});continue}let l=r.value;if("__proto__"===l)continue;let p=t.valueType._zod.run({value:n[c],issues:[]},o);p instanceof Promise?a.push(p.then(e=>{e.issues.length&&i.issues.push(...e2(c,e.issues)),i.value[l]=e.value})):(p.issues.length&&i.issues.push(...e2(c,p.issues)),i.value[l]=p.value)}d&&d.length>0&&i.issues.push({code:"unrecognized_keys",input:n,inst:e,keys:d,continue:!0})}return a.length?Promise.all(a).then(()=>i):i}}),r8=tc("$ZodEnum",(e,t)=>{ro.init(e,t);let r=eP(t.entries),i=new Set(r);e._zod.values=i,tn(e,"pattern",e=>{let t=eP(e.def.entries).filter(e=>eH.has(typeof e));return new RegExp(t.length?`^(${t.map(e=>eG(e.toString())).join("|")})$`:"^[^\\s\\S]$")}),e._zod.parse=(t,o)=>{let n=t.value;return i.has(n)||t.issues.push({code:"invalid_value",values:r,input:n,inst:e}),t}}),r7=tc("$ZodLiteral",(e,t)=>{ro.init(e,t);let r=new Set(t.values);e._zod.values=r,tn(e,"pattern",e=>{let t=e.def.values;return new RegExp(t.length?`^(${t.map(e=>"string"==typeof e?eG(e):e?eG(e.toString()):String(e)).join("|")})$`:"^[^\\s\\S]$")}),e._zod.parse=(i,o)=>{let n=i.value;return r.has(n)||i.issues.push({code:"invalid_value",values:t.values,input:n,inst:e}),i}}),ie=tc("$ZodTransform",(e,t)=>{ro.init(e,t),e._zod.optin="optional",tu.memoizer?.guard(e),e._zod.parse=(r,i)=>{if("backward"===i.direction)throw new tp(e.constructor.name);let o=t.transform(r.value,r);if(i.async)return(o instanceof Promise?o:Promise.resolve(o)).then(e=>(r.value=e,r));if(o instanceof Promise)throw new tl;return r.value=o,r}});function it(e,t){return e.value=t.issues.length?void 0:t.value,e}let ir=tc("$ZodOptional",(e,t)=>{ro.init(e,t),tn(e,"optin",e=>"defaulted"===e.def.innerType._zod.optin?"defaulted":"optional"),e._zod.optout="optional",tn(e,"values",e=>{let t=e.def.innerType._zod.values;return t?new Set([...t,void 0]):void 0}),tn(e,"pattern",e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${ej(t.source)})?$`):void 0}),e._zod.parse=(e,r)=>{if(void 0===e.value){if("defaulted"!==t.innerType._zod.optin)return e;let i=t.innerType._zod.run({value:e.value,issues:[]},r);return i instanceof Promise?i.then(t=>it(e,t)):it(e,i)}return t.innerType._zod.run(e,r)}}),ii=tc("$ZodExactOptional",(e,t)=>{ir.init(e,t),tn(e,"values",e=>e.def.innerType._zod.values),tn(e,"pattern",e=>e.def.innerType._zod.pattern),e._zod.parse=(e,r)=>t.innerType._zod.run(e,r)}),io=tc("$ZodNullable",(e,t)=>{ro.init(e,t),tn(e,"optin",e=>e.def.innerType._zod.optin),tn(e,"optout",e=>e.def.innerType._zod.optout),tn(e,"pattern",e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${ej(t.source)}|null)$`):void 0}),tn(e,"values",e=>e.def.innerType._zod.values?new Set([...e.def.innerType._zod.values,null]):void 0),e._zod.parse=(e,r)=>null===e.value?e:t.innerType._zod.run(e,r)}),ia=tc("$ZodDefault",(e,t)=>{ro.init(e,t),e._zod.optin="defaulted",tn(e,"values",e=>e.def.innerType._zod.values),e._zod.parse=(e,r)=>{if("backward"===r.direction)return t.innerType._zod.run(e,r);if(void 0===e.value)return e.value=t.defaultValue,e;let i=t.innerType._zod.run(e,r);return i instanceof Promise?i.then(e=>is(e,t)):is(i,t)}});function is(e,t){return void 0===e.value&&(e.value=t.defaultValue),e}let id=tc("$ZodPrefault",(e,t)=>{ro.init(e,t),e._zod.optin="defaulted",tn(e,"values",e=>e.def.innerType._zod.values),e._zod.parse=(e,r)=>("backward"===r.direction||void 0===e.value&&(e.value=t.defaultValue),t.innerType._zod.run(e,r))}),ic=tc("$ZodNonOptional",(e,t)=>{ro.init(e,t),tn(e,"values",e=>{let t=e.def.innerType._zod.values;return t?new Set([...t].filter(e=>void 0!==e)):void 0}),e._zod.parse=(r,i)=>{let o=t.innerType._zod.run(r,i);return o instanceof Promise?o.then(t=>il(t,e)):il(o,e)}});function il(e,t){return e.issues.length||void 0!==e.value||e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}function ip(e,t,r,i){return t.issues.length?e.value=r.catchValue({...t,value:e.value,error:{issues:t.issues.map(e=>e9(e,i,tm()))},input:e.value}):(e.value=t.value,t.memo&&(e.memo=!0)),e}let iu=tc("$ZodCatch",(e,t)=>{ro.init(e,t),tn(e,"optin",e=>"defaulted"===e.def.innerType._zod.optin?"defaulted":"optional"),tn(e,"optout",e=>e.def.innerType._zod.optout),tn(e,"values",e=>e.def.innerType._zod.values),e._zod.parse=(e,r)=>{if("backward"===r.direction)return t.innerType._zod.run(e,r);let i=t.innerType._zod.run({value:e.value,issues:[]},r);return i instanceof Promise?i.then(i=>ip(e,i,t,r)):ip(e,i,t,r)}}),im=tc("$ZodPipe",(e,t)=>{ro.init(e,t),tn(e,"values",e=>e.def.in._zod.values),tn(e,"optin",e=>e.def.in._zod.optin),tn(e,"optout",e=>e.def.out._zod.optout),tn(e,"propValues",e=>e.def.in._zod.propValues),e._zod.parse=(e,r)=>{if("backward"===r.direction){let i=t.out._zod.run(e,r);return i instanceof Promise?i.then(e=>ih(e,t.in,r)):ih(i,t.in,r)}let i=t.in._zod.run(e,r);return i instanceof Promise?i.then(e=>ih(e,t.out,r)):ih(i,t.out,r)}});function ih(e,t,r){return e.issues.some(e=>"unrecognized_keys"!==e.code)?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}let iy=tc("$ZodPreprocess",(e,t)=>{im.init(e,t)}),ig=tc("$ZodReadonly",(e,t)=>{ro.init(e,t),tn(e,"propValues",e=>e.def.innerType._zod.propValues),tn(e,"values",e=>e.def.innerType._zod.values),tn(e,"optin",e=>e.def.innerType?._zod?.optin),tn(e,"optout",e=>e.def.innerType?._zod?.optout),e._zod.parse=(e,r)=>{if("backward"===r.direction)return t.innerType._zod.run(e,r);let i=t.innerType._zod.run(e,r);return i instanceof Promise?i.then(i_):i_(i)}});function i_(e){return e.memo||(e.value=Object.freeze(e.value)),e}let iv=tc("$ZodLazy",(e,t)=>{var r;let i;ro.init(e,t),r=e._zod,Object.defineProperty(r,"innerType",{get(){if(i!==eC)return void 0===i&&(i=eC,i=(()=>(t._cachedInner||(t._cachedInner=t.getter()),t._cachedInner))()),i},set(e){Object.defineProperty(r,"innerType",{value:e})},configurable:!0}),tn(e,"pattern",e=>e.innerType?._zod?.pattern),tn(e,"propValues",e=>e.innerType?._zod?.propValues),tn(e,"optin",e=>e.innerType?._zod?.optin??void 0),tn(e,"optout",e=>e.innerType?._zod?.optout??void 0),e._zod.parse=(t,r)=>e._zod.innerType._zod.run(t,r)}),ib=tc("$ZodCustom",(e,t)=>{tK.init(e,t),ro.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=r=>{let i=r.value,o=t.fn(i);if(o instanceof Promise)return o.then(t=>i$(t,r,i,e));i$(o,r,i,e)}});function i$(e,t,r,i){if(!e){let e={code:"custom",input:r,inst:i,path:[...i._zod.def.path??[]],continue:!i._zod.def.abort};i._zod.def.params&&(e.params=i._zod.def.params),t.issues.push(te(e))}}(ei=globalThis).__zod_globalRegistry??(ei.__zod_globalRegistry=new class e{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let r=t[0];return this._map.set(e,r),r&&"object"==typeof r&&"id"in r&&this._idmap.set(r.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&"object"==typeof t&&"id"in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let r={...this.get(t)??{}};delete r.id;let i={...r,...this._map.get(e)};return Object.keys(i).length?i:void 0}return this._map.get(e)}has(e){return this._map.has(e)}});let iS=globalThis.__zod_globalRegistry;function ik(e){return e.checks&&(e.checks=[...e.checks]),e}function iw(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...eK(t)})}function iR(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...eK(t)})}function iP(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...eK(t)})}function iV(e,t){return new e({type:"string",format:"date",check:"string_format",...eK(t)})}function iq(e,t){return new tQ({check:"less_than",...eK(t),value:e,inclusive:!1})}function iI(e,t){return new tQ({check:"less_than",...eK(t),value:e,inclusive:!0})}function ix(e,t){return new tX({check:"greater_than",...eK(t),value:e,inclusive:!1})}function ij(e,t){return new tX({check:"greater_than",...eK(t),value:e,inclusive:!0})}function iC(e,t){return new tY({check:"multiple_of",...eK(t),value:e})}function iT(e,t){return new t0({check:"max_length",...eK(t),maximum:e})}function iO(e,t){return new t2({check:"min_length",...eK(t),minimum:e})}function iE(e,t){return new t4({check:"length_equals",...eK(t),length:e})}function iA(e){return new rt({check:"overwrite",tx:e})}function iM(e,...t){for(let r of t)for(let t of Reflect.ownKeys(r))Object.prototype.propertyIsEnumerable.call(r,t)&&eT(e,t,r[t]);return e}function iW(e){let t=e?.target??"draft-2020-12";return"draft-4"===t&&(t="draft-04"),"draft-7"===t&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??iS,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:e?.cycles??"ref",reused:e?.reused??"inline",intersections:[],deferred:[],external:e?.external??void 0}}function iN(e,t,r,i,o){let n="function"==typeof t.unrepresentable?t.unrepresentable({zodSchema:e,path:i.path,message:o}):t.unrepresentable;if("any"===n)return!1;if(void 0===n||"throw"===n)throw Error(o);return Object.assign(r,n),!0}function iz(e,t,r={path:[],schemaPath:[]}){var i;let o=e._zod.def,n=t.seen.get(e);if(n)return n.count++,r.schemaPath.includes(e)&&(n.cycle=r.path),n.schema;let a={schema:{},count:1,cycle:void 0,path:r.path};t.seen.set(e,a),t.sharedDefsExtractedFor=void 0,t.sharedEmitDoneFor=void 0;let s=e._zod.toJSONSchema?.();if(s)a.schema=s;else{let i={...r,schemaPath:[...r.schemaPath,e],path:r.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,a.schema,i);else{let r=a.schema,n=t.processors[o.type];if(!n)throw Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);n(e,t,r,i)}let n=e._zod.parent;n&&(a.ref||(a.ref=n),iz(n,t,i),t.seen.get(n).isParent=!0)}let d=t.metadataRegistry.get(e);return d&&iM(a.schema,d),"input"===t.io&&function e(t,r){let i=r??{seen:new Set};if(i.seen.has(t))return!1;i.seen.add(t);let o=t._zod.def;if("transform"===o.type)return!0;if("array"===o.type)return e(o.element,i);if("set"===o.type)return e(o.valueType,i);if("lazy"===o.type)return e(o.getter(),i);if("promise"===o.type||"optional"===o.type||"nonoptional"===o.type||"nullable"===o.type||"readonly"===o.type||"default"===o.type||"prefault"===o.type||"catch"===o.type)return e(o.innerType,i);if("intersection"===o.type)return e(o.left,i)||e(o.right,i);if("record"===o.type||"map"===o.type)return e(o.keyType,i)||e(o.valueType,i);if("pipe"===o.type)return!!t._zod.traits.has("$ZodCodec")||e(o.in,i)||e(o.out,i);if("object"===o.type){for(let t in o.shape)if(e(o.shape[t],i))return!0;return!1}if("union"===o.type){for(let t of o.options)if(e(t,i))return!0;return!1}if("tuple"===o.type){for(let t of o.items)if(e(t,i))return!0;if(o.rest&&e(o.rest,i))return!0}return!1}(e)&&(delete a.schema.examples,delete a.schema.default),"input"===t.io&&"_prefault"in a.schema&&((i=a.schema).default??(i.default=a.schema._prefault)),delete a.schema._prefault,t.seen.get(e).schema}function iD(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function iF(e,t){let r=e.seen.get(t);if(!r)throw Error("Unprocessed schema. This is a bug in Zod.");if(e.external&&e.sharedDefsExtractedFor===e.external)return;let i=new Map;for(let t of e.seen.entries()){let r=e.metadataRegistry.get(t[0])?.id;if(r){let e=i.get(r);if(e&&e!==t[0])throw Error(`Duplicate schema id "${r}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);i.set(r,t[0])}}let o=t=>{if(t[1].schema.$ref)return;let i=t[1],{ref:o,defId:n}=(t=>{let i="draft-2020-12"===e.target?"$defs":"definitions";if(e.external){let r=e.external.registry.get(t[0])?.id,o=e.external.uri??(e=>e);if(r)return{ref:o(r)};let n=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=n,{defId:n,ref:`${o("__shared")}#/${i}/${iD(n)}`}}let o=`#/${i}/`;if(t[1]===r&&!t[1].schema.id)return{ref:"#"};let n=t[1].schema.id??`__schema${e.counter++}`;return{defId:n,ref:o+iD(n)}})(t);i.def={...i.schema},n&&(i.defId=n);let a=i.schema;for(let e in a)delete a[e];a.$ref=o};if("throw"===e.cycles)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join("/")}/ -Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let r of e.seen.entries()){let i=r[1];if(t===r[0]){o(r);continue}if(e.external){let i=e.external.registry.get(r[0])?.id;if(t!==r[0]&&i){o(r);continue}}if(e.metadataRegistry.get(r[0])?.id||i.cycle){o(r);continue}i.count>1&&"ref"===e.reused&&o(r)}e.external&&(e.sharedDefsExtractedFor=e.external)}let iL=new Set(["type","properties","required","additionalProperties"]),iU=["oneOf","anyOf"];function iH(e){let t=e.additionalProperties;return void 0===t||!1===t||"object"!=typeof t||null===t?null:Object.keys(t).length?t:null}function iG(e){let t=[];for(let r of e){if("object"!=typeof r||"object"!==r.type)return null;for(let e in r)if(!iL.has(e))return null;t.push(r)}let r={},i=new Set;for(let e of t){for(let i in e.properties){if(Object.prototype.hasOwnProperty.call(r,i))continue;let e=[];for(let r of t){let t=r.properties?.[i]??iH(r);null!=t&&(e.some(e=>JSON.stringify(e)===JSON.stringify(t))||e.push(t))}eT(r,i,1===e.length?e[0]:iG(e)??{allOf:e})}for(let t of e.required??[])i.add(t)}let o={type:"object",properties:r};if(i.size&&(o.required=[...i]),t.every(e=>!1===e.additionalProperties))o.additionalProperties=!1;else{let e=[];for(let r of t){let t=iH(r);t&&!e.some(e=>JSON.stringify(e)===JSON.stringify(t))&&e.push(t)}1===e.length?o.additionalProperties=e[0]:e.length>1&&(o.additionalProperties={allOf:e})}return o}function iB(e,t){let r=e.seen.get(t);if(!r)throw Error("Unprocessed schema. This is a bug in Zod.");let i=t=>{let r=e.seen.get(t);if(null===r.ref)return;let o=r.def??r.schema,n={...o},a=r.ref;if(r.ref=null,a){i(a);let r=e.seen.get(a),s=r.schema;if(s.$ref&&("draft-07"===e.target||"draft-04"===e.target||"openapi-3.0"===e.target)?(o.allOf=o.allOf??[],o.allOf.push(s)):iW(o,s),iW(o,n),t._zod.parent===a)for(let e in o)"$ref"!==e&&"allOf"!==e&&(e in n||delete o[e]);if(s.$ref&&r.def)for(let e in o)"$ref"!==e&&"allOf"!==e&&e in r.def&&JSON.stringify(o[e])===JSON.stringify(r.def[e])&&delete o[e]}let s=t._zod.parent;if(s&&s!==a){i(s);let t=e.seen.get(s);if(t?.schema.$ref&&(o.$ref=t.schema.$ref,t.def))for(let e in o)"$ref"!==e&&"allOf"!==e&&e in t.def&&JSON.stringify(o[e])===JSON.stringify(t.def[e])&&delete o[e]}e.override({zodSchema:t,jsonSchema:o,path:r.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(let t of[...e.seen.entries()].reverse())i(t[0]);if("openapi-3.0"!==e.target)for(let t of e.seen.entries())!function e(t){let r=t.anyOf;if(!Array.isArray(r)||0===r.length||void 0!==t.type)return;let i=[];for(let t of r){if(!t||"object"!=typeof t)return;e(t);let r=Object.keys(t);if(1!==r.length||"type"!==r[0])return;let o=t.type;for(let e of Array.isArray(o)?o:[o]){if("string"!=typeof e)return;i.includes(e)||i.push(e)}}delete t.anyOf,t.type=1===i.length?i[0]:i}(t[1].def??t[1].schema);for(let t of e.deferred)t();if(e.intersections.length){let t=new Map;for(let r of e.seen.values())for(let e of[r.schema,r.def]){let r=e?.allOf;if(!Array.isArray(r))continue;let i=t.get(r);i?i.push(e):t.set(r,[e])}for(let r of e.intersections)for(let e of t.get(r)??[])!function(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let t of iL)if(t in e)return;let r=t.filter(e=>iU.some(t=>Array.isArray(e[t]))),i=null;if(r.length){let e=r[0],o=iU.find(t=>Array.isArray(e[t]));if(1!==Object.keys(e).length)return;let n=t.filter(t=>t!==e),a=e[o].map(e=>iG([...n,e]));if(a.some(e=>!e))return;i={[o]:a}}else i=iG(t);i&&(delete e.allOf,iW(e,i))}(e)}}let o={};if("draft-2020-12"===e.target?o.$schema="https://json-schema.org/draft/2020-12/schema":"draft-07"===e.target?o.$schema="http://json-schema.org/draft-07/schema#":"draft-04"===e.target?o.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){let r=e.external.registry.get(t)?.id;if(!r)throw Error("Schema is missing an `id` property");o.$id=e.external.uri(r)}iW(o,r.defId?r.schema:r.def??r.schema);let n=e.metadataRegistry.get(t)?.id;void 0!==n&&o.id===n&&delete o.id;let a=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,eT(a,e.defId,e.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(a).length>0&&("draft-2020-12"===e.target?o.$defs=a:o.definitions=a);try{let r=JSON.parse(JSON.stringify(o));return Object.defineProperty(r,"~standard",{value:{...t["~standard"],jsonSchema:{input:iK(t,"input",e.processors),output:iK(t,"output",e.processors)}},enumerable:!1,writable:!1}),r}catch(e){throw Error("Error converting schema to JSON.")}}let iK=(e,t,r={})=>i=>{let{libraryOptions:o,target:n}=i??{},a=iM({...o??{},target:n,io:t,processors:r});return iz(e,a),iF(a,e),iB(a,e)},iJ=(e,t,r)=>{(void 0===e[t]||r>e[t])&&(e[t]=r)},iZ=(e,t,r)=>{(void 0===e[t]||r{iJ(e,"minimum",t),iZ(e,"maximum",t)},iX=(e,t)=>{e.multipleOf??(e.multipleOf=[]),e.multipleOf.includes(t)||e.multipleOf.push(t)},iY=(e,t)=>{e.patterns??(e.patterns=new Set),e.patterns.add(t)},i1=(e,t)=>{e.mime=e.mime?e.mime.filter(e=>t.includes(e)):[...t]},i0=(e,t)=>{e.format=t,t.includes("int")&&(e.isInt=!0)},i2=(e,t)=>iJ(e,"minimum",t.minimum),i4=(e,t)=>iZ(e,"maximum",t.maximum),i6=e=>(t,r)=>{i0(t,r.format);let[i,o]=e[r.format];iJ(t,"minimum",i),iZ(t,"maximum",o)},i3={greater_than:(e,t)=>iJ(e,t.inclusive?"minimum":"exclusiveMinimum",t.value),less_than:(e,t)=>iZ(e,t.inclusive?"maximum":"exclusiveMaximum",t.value),multiple_of:(e,t)=>iX(e,t.value),number_format:i6(eZ),bigint_format:i6(eQ),min_length:i2,max_length:i4,length_equals:(e,t)=>iQ(e,t.length),min_size:i2,max_size:i4,size_equals:(e,t)=>iQ(e,t.size),string_format:(e,t)=>{i0(e,t.format),t.pattern&&iY(e,t.pattern),("base64"===t.format||"base64url"===t.format)&&(e.contentEncoding=t.format),(t.local||-1===t.precision)&&(e.laxFormat=!0)},mime_type:(e,t)=>i1(e,t.mime)};function i9(e){let t={},r=e._zod.def;for(let i of e._zod.traits.has("$ZodCheck")?[e,...r.checks??[]]:r.checks??[])i3[i._zod.def.check]?.(t,i._zod.def);let i=e._zod.bag;for(let e of(void 0!==i.minimum&&iJ(t,"minimum",i.minimum),void 0!==i.exclusiveMinimum&&iJ(t,"exclusiveMinimum",i.exclusiveMinimum),void 0!==i.maximum&&iZ(t,"maximum",i.maximum),void 0!==i.exclusiveMaximum&&iZ(t,"exclusiveMaximum",i.exclusiveMaximum),void 0!==i.multipleOf&&iX(t,i.multipleOf),void 0!==i.format&&(t.format??(t.format=i.format),i.format.includes("int")&&(t.isInt=!0)),i.mime&&i1(t,i.mime),i.patterns??[]))iY(t,e);return t}let i5={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},i8=new Map([[rO,/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/],[rA,/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/]]),i7=e=>i8.get(e)??e,oe=(e,t,r,i)=>{r.type="string";let{minimum:o,maximum:n,format:a,patterns:s,contentEncoding:d,laxFormat:c}=i9(e);if("number"==typeof o&&(r.minLength=o),"number"==typeof n&&(r.maxLength=n),a&&(r.format=i5[a]??a,""===r.format&&delete r.format,("time"===a||c)&&delete r.format),d&&(r.contentEncoding=d),s&&s.size>0){let e=[...s].map(i7);1===e.length?r.pattern=e[0].source:e.length>1&&(r.allOf=[...e.map(e=>({..."draft-07"===t.target||"draft-04"===t.target||"openapi-3.0"===t.target?{type:"string"}:{},pattern:e.source}))])}},ot=(e,t,r,i)=>{let{minimum:o,maximum:n,multipleOf:a,exclusiveMaximum:s,exclusiveMinimum:d,isInt:c}=i9(e);r.type=c?"integer":"number";let l="number"==typeof d&&d>=(o??-1/0),p="number"==typeof s&&s<=(n??1/0),u="draft-04"===t.target||"openapi-3.0"===t.target;if(l?u?(r.minimum=d,r.exclusiveMinimum=!0):r.exclusiveMinimum=d:"number"==typeof o&&(r.minimum=o),p?u?(r.maximum=s,r.exclusiveMaximum=!0):r.exclusiveMaximum=s:"number"==typeof n&&(r.maximum=n),a){let o=new Set;for(let n of a)Number.isFinite(n)&&0!==n?o.add(Math.abs(n)):iN(e,t,r,i,`A multipleOf divisor of ${n} cannot be represented in JSON Schema`);let[n,...s]=o;void 0!==n&&(r.multipleOf=n),s.length&&(r.allOf=[...r.allOf??[],...s.map(e=>({multipleOf:e}))])}},or=(e,t,r,i)=>{r.type="boolean"},oi=(e,t,r,i)=>{"openapi-3.0"===t.target?(r.type="string",r.nullable=!0,r.enum=[null]):r.type="null"},oo=(e,t,r,i)=>{r.not={}},on=(e,t,r,i)=>{},oa=(e,t,r,i)=>{},os=(e,t,r,i)=>{let o=eP(e._zod.def.entries);if(0===o.length){r.not={};return}o.every(e=>"number"==typeof e)&&(r.type="number"),o.every(e=>"string"==typeof e)&&(r.type="string"),r.enum=o},od=(e,t,r,i)=>{let o=e._zod.def;if(0===o.values.length){r.not={};return}let n=[];for(let a of o.values)if(void 0===a){if(iN(e,t,r,i,"Literal `undefined` cannot be represented in JSON Schema"))return}else if("bigint"==typeof a){if(iN(e,t,r,i,"BigInt literals cannot be represented in JSON Schema"))return;n.push(Number(a))}else n.push(a);if(0===n.length);else if(1===n.length){let e=n[0];r.type=null===e?"null":typeof e,"draft-04"===t.target||"openapi-3.0"===t.target?r.enum=[e]:r.const=e}else n.every(e=>"number"==typeof e)&&(r.type="number"),n.every(e=>"string"==typeof e)&&(r.type="string"),n.every(e=>"boolean"==typeof e)&&(r.type="boolean"),n.every(e=>null===e)&&(r.type="null"),r.enum=n},oc=(e,t,r,i)=>{iN(e,t,r,i,"Custom types cannot be represented in JSON Schema")},ol=(e,t,r,i)=>{iN(e,t,r,i,"Transforms cannot be represented in JSON Schema")},op=(e,t,r,i)=>{let o=e._zod.def,{minimum:n,maximum:a}=i9(e);"number"==typeof n&&(r.minItems=n),"number"==typeof a&&(r.maxItems=a),r.type="array",r.items=iz(o.element,t,{...i,path:[...i.path,"items"]})};function ou(e){let t=e._zod.def;return"pipe"===t.type&&t.in._zod.traits.has("$ZodTransform")?ou(t.out):"catch"===t.type?ou(t.innerType):e._zod.optin}let om=(e,t,r,i)=>{let o=e._zod.def,n=o.shape;if(Object.getOwnPropertySymbols(n).length&&iN(e,t,r,i,"Symbol keys cannot be represented in JSON Schema"))return;for(let e in r.type="object",r.properties={},n)eT(r.properties,e,iz(n[e],t,{...i,path:[...i.path,"properties",e]}));let a=[];for(let e of Object.keys(n)){let r=o.shape[e];("input"===t.io?void 0===ou(r):void 0===r._zod.optout)&&a.push(e)}a.length>0&&(r.required=a),o.catchall?._zod.def.type==="never"?r.additionalProperties=!1:o.catchall?o.catchall&&(r.additionalProperties=iz(o.catchall,t,{...i,path:[...i.path,"additionalProperties"]})):"output"===t.io&&(r.additionalProperties=!1)},of=(e,t,r,i)=>{let o=e._zod.def,n=!1===o.inclusive,a=o.options.map((e,r)=>iz(e,t,{...i,path:[...i.path,n?"oneOf":"anyOf",r]}));n?r.oneOf=a:r.anyOf=a},oh=(e,t,r,i)=>{let o=e._zod.def,n=iz(o.left,t,{...i,path:[...i.path,"allOf",0]}),a=iz(o.right,t,{...i,path:[...i.path,"allOf",1]}),s=e=>"allOf"in e&&1===Object.keys(e).length,d=[...s(n)?n.allOf:[n],...s(a)?a.allOf:[a]];r.allOf=d,t.intersections.push(d)},oy=new WeakMap,og=(e,t,r,i)=>{let o=e._zod.def;r.type="object";let n=o.keyType,a=i9(n).patterns;if("loose"===o.mode&&a&&a.size>0){let e=iz(o.valueType,t,{...i,path:[...i.path,"patternProperties","*"]});for(let t of(r.patternProperties={},a))eT(r.patternProperties,i7(t).source,e)}else{if("draft-07"===t.target||"draft-2020-12"===t.target){r.propertyNames=iz(o.keyType,t,{...i,path:[...i.path,"propertyNames"]});let n=oy.get(t);n||(n=[],oy.set(t,n),t.deferred.push(()=>(function(e){let t=new Map;for(let r of e.seen.values())r.def&&!t.has(r.schema)&&t.set(r.schema,r);let r=new Map;for(let i of oy.get(e)??[]){let o=e.seen.get(i),n=(o?.def??o?.schema)?.propertyNames;if(!n||!0===n||r.has(n))continue;let a=function e(t,r,i){if(r.$ref){if(i.has(r))return r;i.add(r);let o=t.get(r)?.def;if(!o)return r;let n=e(t,o,i);return n===o?r:n}for(let o of["anyOf","oneOf"]){let n=r[o];if(!Array.isArray(n))continue;let a=n.map(r=>e(t,r,i));a.some((e,t)=>e!==n[t])&&(r={...r,[o]:a})}let o=Array.isArray(r.type)?r.type:[r.type],n=!o.includes("string")&&o.some(e=>"number"===e||"integer"===e),a=r.enum??(void 0!==r.const?[r.const]:void 0);if(!n&&!a?.some(e=>"number"==typeof e))return r;let{minimum:s,maximum:d,exclusiveMinimum:c,exclusiveMaximum:l,multipleOf:p,format:u,id:m,...f}=r;return f.enum?f.enum=f.enum.map(e=>"number"==typeof e?String(e):e):"number"==typeof f.const&&(f.const=String(f.const)),n&&(f.type="string",a||(f.pattern=(o.includes("number")?tL:tF).source)),f}(t,n,new Set);a!==n&&r.set(n,a)}if(r.size)for(let t of e.seen.values())for(let e of[t.schema,t.def]){let t=e&&r.get(e.propertyNames);t&&(e.propertyNames=t)}})(t))),n.push(e)}r.additionalProperties=iz(o.valueType,t,{...i,path:[...i.path,"additionalProperties"]})}let s=n._zod.values,d="input"===t.io&&void 0!==ou(o.valueType);if(s&&!o.partial&&!d){let e=[...s].filter(e=>"string"==typeof e||"number"==typeof e);e.length>0&&(r.required=e.map(String))}},o_=(e,t,r,i)=>{let o=e._zod.def,n=iz(o.innerType,t,i),a=t.seen.get(e);"openapi-3.0"===t.target?(a.ref=o.innerType,r.nullable=!0):r.anyOf=[n,{type:"null"}]},ov=(e,t,r,i)=>{let o=e._zod.def;iz(o.innerType,t,i),t.seen.get(e).ref=o.innerType},ob=Symbol();function o$(e,t,r,i,o){let n=!1,a=JSON.stringify(e,(e,t)=>"bigint"!=typeof t?t:(n=!0,null));return n?(iN(t,r,i,o,"BigInt defaults cannot be represented in JSON Schema"),ob):JSON.parse(a)}let oS=(e,t,r,i)=>{let o=e._zod.def;iz(o.innerType,t,i),t.seen.get(e).ref=o.innerType;let n=o$(o.defaultValue,e,t,r,i);n!==ob&&(r.default=n)},ok=(e,t,r,i)=>{let o=e._zod.def;if(iz(o.innerType,t,i),t.seen.get(e).ref=o.innerType,"input"!==t.io)return;let n=o$(o.defaultValue,e,t,r,i);n!==ob&&(r._prefault=n)},ow=(e,t,r,i)=>{let o,n=e._zod.def;iz(n.innerType,t,i),t.seen.get(e).ref=n.innerType;try{o=n.catchValue(void 0)}catch{iN(e,t,r,i,"Dynamic catch values are not supported in JSON Schema");return}r.default=o},oV=(e,t,r,i)=>{let o=e._zod.def,n=o.in._zod.traits.has("$ZodTransform"),a="input"===t.io?n?o.out:o.in:o.out;iz(a,t,i),t.seen.get(e).ref=a},oP=(e,t,r,i)=>{let o=e._zod.def;iz(o.innerType,t,i),t.seen.get(e).ref=o.innerType,r.readOnly=!0},oR=(e,t,r,i)=>{let o=e._zod.def;iz(o.innerType,t,i),t.seen.get(e).ref=o.innerType},oq=(e,t,r,i)=>{let o=e._zod.innerType;iz(o,t,i),t.seen.get(e).ref=o},oI={string:oe,number:ot,boolean:or,bigint:(e,t,r,i)=>{iN(e,t,r,i,"BigInt cannot be represented in JSON Schema")},symbol:(e,t,r,i)=>{iN(e,t,r,i,"Symbols cannot be represented in JSON Schema")},null:oi,undefined:(e,t,r,i)=>{iN(e,t,r,i,"Undefined cannot be represented in JSON Schema")},void:(e,t,r,i)=>{iN(e,t,r,i,"Void cannot be represented in JSON Schema")},never:oo,any:on,unknown:oa,date:(e,t,r,i)=>{iN(e,t,r,i,"Date cannot be represented in JSON Schema")},enum:os,literal:od,nan:(e,t,r,i)=>{iN(e,t,r,i,"NaN cannot be represented in JSON Schema")},template_literal:(e,t,r,i)=>{let o=e._zod.pattern;if(!o)throw Error("Pattern not found in template literal");r.type="string",r.pattern=o.source},file:(e,t,r,i)=>{r.type="string",r.format="binary",r.contentEncoding="binary";let{minimum:o,maximum:n,mime:a}=i9(e);void 0!==o&&(r.minLength=o),void 0!==n&&(r.maxLength=n),a&&(0===a.length?r.not={}:1===a.length?r.contentMediaType=a[0]:r.anyOf=a.map(e=>({contentMediaType:e})))},success:(e,t,r,i)=>{r.type="boolean"},custom:oc,function:(e,t,r,i)=>{iN(e,t,r,i,"Function types cannot be represented in JSON Schema")},transform:ol,map:(e,t,r,i)=>{iN(e,t,r,i,"Map cannot be represented in JSON Schema")},set:(e,t,r,i)=>{iN(e,t,r,i,"Set cannot be represented in JSON Schema")},array:op,object:om,union:of,intersection:oh,tuple:(e,t,r,i)=>{let o=e._zod.def;r.type="array";let n="draft-2020-12"===t.target?"prefixItems":"items",a="draft-2020-12"===t.target||"openapi-3.0"===t.target?"items":"additionalItems",s=o.items.map((e,r)=>iz(e,t,{...i,path:[...i.path,n,r]})),d=o.rest?iz(o.rest,t,{...i,path:[...i.path,a,..."openapi-3.0"===t.target?[o.items.length]:[]]}):null,c=o.items.length;for(;c>0;){let e=o.items[c-1];if(!("input"===t.io?void 0!==ou(e):"optional"===e._zod.optout))break;c--}let l=o.items.length,p=!o.rest;"draft-2020-12"===t.target?(r.prefixItems=s,p?r.items=!1:d&&(r.items=d)):"openapi-3.0"===t.target?(r.items={anyOf:s},d&&r.items.anyOf.push(d)):(r.items=s,p?r.additionalItems=!1:d&&(r.additionalItems=d)),c>0&&(r.minItems=c),p&&(r.maxItems=l);let{minimum:u,maximum:m}=i9(e);"number"==typeof u&&(r.minItems=u),"number"==typeof m&&(r.maxItems=m)},record:og,nullable:o_,nonoptional:ov,default:oS,prefault:ok,catch:ow,pipe:oV,readonly:oP,promise:(e,t,r,i)=>{let o=e._zod.def;iz(o.innerType,t,i),t.seen.get(e).ref=o.innerType},optional:oR,lazy:oq};function ox(e,t){if("_idmap"in e){let r=iM({...t,processors:oI}),i={};for(let t of e._idmap.entries()){let[e,i]=t;iz(i,r)}let o={};for(let n of(r.external={registry:e,uri:t?.uri,defs:i},e._idmap.entries())){let[e,t]=n;iF(r,t),eT(o,e,iB(r,t))}return Object.keys(i).length>0&&(o.__shared={["draft-2020-12"===r.target?"$defs":"definitions"]:i}),{schemas:o}}let r=iM({...t,processors:oI});return iz(e,r),iF(r,e),iB(r,e)}let oj={get:function(){let e=this._zod;return e.message??(e.message=JSON.stringify(e.def,eq,2)),e.message},set:function(e){this._zod.message=e},enumerable:!0,configurable:!0},oC={value:void 0,enumerable:!1},oT=new WeakSet([Object.prototype,Error.prototype]),oO=(e,t)=>{e.name="$ZodError",oC.value=t,Object.defineProperty(e,"issues",oC),oC.value=void 0,Object.defineProperty(e,"message",oj);let r=Object.getPrototypeOf(e);oT.has(r)||(oT.add(r),Object.defineProperty(r,"toString",{configurable:!0,enumerable:!1,get(){let e=()=>this.message;return Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0})}}))},oE=tc("$ZodError",oO);function oA(e,t){return{callee:t?.callee??e,Err:t?.Err}}tc("$ZodError",oO,void 0,{Parent:Error});let oW=e=>{let t=(r,i,o,n)=>{let a=o?{...o,async:!1}:{async:!1},s=r._zod.run({value:i,issues:[]},a);if(s instanceof Promise)throw new tl;if(s.issues.length){let r=new(n?.Err??e)(s.issues.map(e=>e9(e,a,tm())));throw ez(r,n?.callee??t),r}return s.value};return t},oM=e=>{let t=async(r,i,o,n)=>{let a=o?{...o,async:!0}:{async:!0},s=r._zod.run({value:i,issues:[]},a);if(s instanceof Promise&&(s=await s),s.issues.length){let r=new(n?.Err??e)(s.issues.map(e=>e9(e,a,tm())));throw ez(r,n?.callee??t),r}return s.value};return t},oN=e=>(t,r,i)=>{let o=i?{...i,async:!1}:{async:!1},n=t._zod.run({value:r,issues:[]},o);if(n instanceof Promise)throw new tl;return n.issues.length?oz(e,n.issues,o):{success:!0,data:n.value}};function oz(e,t,r){let i;return{success:!1,get error(){return i||(i=new e(t.map(e=>e9(e,r,tm()))),t=void 0,r=void 0),i},set error(e){i=e,t=void 0,r=void 0}}}let oD=e=>async(t,r,i)=>{let o=i?{...i,async:!0}:{async:!0},n=t._zod.run({value:r,issues:[]},o);return n instanceof Promise&&(n=await n),n.issues.length?oz(e,n.issues,o):{success:!0,data:n.value}},oF=Symbol.for("zod.compile.invalid"),oL=Symbol.for("zod.compile.fallback"),oU=new WeakSet([Object.prototype,Error.prototype]);function oH(e,t,r){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){let e=r(this);return Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0})}})}let oG=tc("ZodError",(e,t)=>{oE.init(e,t),e.name="ZodError";let r=Object.getPrototypeOf(e);oU.has(r)||(oU.add(r),oH(r,"format",e=>t=>(function(e,t=e=>e.message){let r={_errors:[]},i=(e,o=[])=>{for(let n of e.issues)if("invalid_union"===n.code&&n.errors.length)n.errors.map(e=>i({issues:e},[...o,...n.path]));else if("invalid_key"===n.code)i({issues:n.issues},[...o,...n.path]);else if("invalid_element"===n.code)i({issues:n.issues},[...o,...n.path]);else{let e=[...o,...n.path];if(0===e.length)r._errors.push(t(n));else{let i=r,o=0;for(;ot=>(function(e,t=e=>e.message){let r={},i=[];for(let a of e.issues)if(a.path.length>0){var o,n;(o=a.path[0],n=()=>[],!Object.prototype.hasOwnProperty.call(r,o)&&("__proto__"===o?Object.defineProperty(r,o,{value:n(),writable:!0,enumerable:!0,configurable:!0}):r[o]=n()),r[o]).push(t(a))}else i.push(t(a));return{formErrors:i,fieldErrors:r}})(e,t)),oH(r,"addIssue",e=>t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,eq,2)}),oH(r,"addIssues",e=>t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,eq,2)}),Object.defineProperty(r,"isEmpty",{configurable:!0,enumerable:!1,get(){return 0===this.issues.length}}))},void 0,{Parent:Error}),oB=oW(oG),oK=oM(oG),oJ=oN(oG),oZ=oD(oG),oQ=(y=oW(oG),g=(e,t,r,i)=>y(e,t,r?{...r,direction:"backward"}:{direction:"backward"},oA(g,i))),oX=(_=oW(oG),v=(e,t,r,i)=>_(e,t,r,oA(v,i))),oY=(b=oM(oG),$=async(e,t,r,i)=>{let o=r?{...r,direction:"backward"}:{direction:"backward"};return await b(e,t,o,oA($,i))}),o1=(S=oM(oG),k=async(e,t,r,i)=>await S(e,t,r,oA(k,i))),o0=(e,t,r)=>{let i=r?{...r,direction:"backward"}:{direction:"backward"};return oN(oG)(e,t,i)},o2=(e,t,r)=>oN(oG)(e,t,r),o4=async(e,t,r)=>{let i=r?{...r,direction:"backward"}:{direction:"backward"};return oD(oG)(e,t,i)},o6=async(e,t,r)=>oD(oG)(e,t,r);function o3(){tu.memoizer||tm({memoizer:t$})}let o9=tc("ZodType",(e,t)=>(tu.localeError||tm({localeError:(()=>{let e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}},t={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",currency_code:"currency code",credit_card:"credit card number",iban:"IBAN",jwt:"JWT",template_literal:"input"},r={nan:"NaN"};function i(e,t){return"number"!==e||"number"!=typeof t||Number.isFinite(t)?r[e]??e:String(t)}return r=>{switch(r.code){case"invalid_type":{let e=i(r.expected),t=i(function(e){let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":if(null===e)return"null";if(Array.isArray(e))return"array";if(e&&Object.getPrototypeOf(e)!==Object.prototype&&"constructor"in e&&e.constructor)return e.constructor.name}return t}(r.input),r.input);return`Invalid input: expected ${e}, received ${t}`}case"invalid_value":if(1===r.values.length)return`Invalid input: expected ${eJ(r.values[0])}`;return`Invalid option: expected one of ${eR(r.values,"|")}`;case"too_big":{let t=r.exact?"exactly ":r.inclusive?"<=":"<",i=e[r.origin]??null;if(i)return`Too big: expected ${r.origin??"value"} to have ${t}${r.maximum.toString()} ${i.unit??"elements"}`;return`Too big: expected ${r.origin??"value"} to be ${t}${r.maximum.toString()}`}case"too_small":{let t=r.exact?"exactly ":r.inclusive?">=":">",i=e[r.origin]??null;if(i)return`Too small: expected ${r.origin} to have ${t}${r.minimum.toString()} ${i.unit}`;return`Too small: expected ${r.origin} to be ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Invalid string: must start with "${r.prefix}"`;if("ends_with"===r.format)return`Invalid string: must end with "${r.suffix}"`;if("includes"===r.format)return`Invalid string: must include "${r.includes}"`;if("regex"===r.format)return`Invalid string: must match pattern ${r.pattern}`;return`Invalid ${t[r.format]??r.format}`;case"not_multiple_of":return`Invalid number: must be a multiple of ${r.divisor}`;case"unrecognized_keys":return`Unrecognized key${r.keys.length>1?"s":""}: ${eR(r.keys,", ")}`;case"invalid_key":return`Invalid key in ${r.origin}`;case"invalid_union":if(r.options&&Array.isArray(r.options)&&r.options.length>0){let e=r.options.map(e=>`'${e}'`).join(" | ");return`Invalid discriminator value. Expected ${e}`}if(!1===r.inclusive)return"Invalid input: more than one option matched";return"Invalid input";case"invalid_element":return`Invalid value in ${r.origin}`;default:return"Invalid input"}}})()}),ro.init(e,t),e.def=t,e.type=t.type,e),{check(...e){let t=this.def;return this.clone(eN(t,{checks:[...t.checks??[],...e.map(e=>"function"==typeof e?{_zod:{check:e,def:{check:"custom"},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return eB(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(function(e,t={}){return new as({type:"custom",check:"custom",fn:e,...eK(t)})}(e,t))},superRefine(e,t){return this.check(function(e,t){var r;let i,o;return r=t=>(t.addIssue=e=>{"string"==typeof e?t.issues.push(te(e,t.value,i._zod.def)):(e.fatal&&(e.continue=!1),e.code??(e.code="custom"),"input"in e||(e.input=t.value),e.inst??(e.inst=i),e.continue??(e.continue=!i._zod.def.abort),t.issues.push(te(e)))},e(t.value,t)),(o=new tK({check:"custom",...eK(t)}))._zod.check=r,i=o}(e,t))},overwrite(e){return this.check(iA(e))},optional(){return n4(this)},exactOptional(){var e;return e=this,new n6({type:"optional",innerType:e})},nullable(){return n9(this)},nullish(){return n4(n9(this))},nonoptional(e){var t;return t=this,new n7({type:"nonoptional",innerType:t,...eK(e)})},array(){return nM(this)},or(e){return nL([this,e])},and(e){return nB(this,e)},transform(e){return ar(this,n0(e))},default(e){var t,r;return t=this,r=e,new n5({type:"default",innerType:t,get defaultValue(){return"function"==typeof r?r():eU(r)}})},prefault(e){var t,r;return t=this,r=e,new n8({type:"prefault",innerType:t,get defaultValue(){return"function"==typeof r?r():eU(r)}})},catch(e){return function(e,t){let r;return new ae({type:"catch",innerType:e,catchValue:"function"==typeof t?t:((r=()=>t)["~constantCatch"]=!0,r)})}(this,e)},pipe(e){return ar(this,e)},readonly(){var e;return e=this,new ao({type:"readonly",innerType:e})},describe(e){let t=this.clone();return iS.add(t,{description:e}),t},meta(...e){if(0===e.length)return iS.get(this);let t=this.clone();return iS.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return 0===t.length?e(this):e(this,...t)},get"~standard"(){return tt(this,"~standard",{...ra(this),jsonSchema:{input:iK(this,"input"),output:iK(this,"output")}},!1)},set"~standard"(e){tt(this,"~standard",e)},parse:function e(t,r){return oB(this,t,r,{callee:e})},parseAsync:async function e(t,r){return await oK(this,t,r,{callee:e})},safeParse(e,t){return oJ(this,e,t)},async safeParseAsync(e,t){return oZ(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){tt(this,"spa",e)},validate(e,t){let r=this._zod.bag.validator;if(void 0!==r){if(r(e)!==oF)return!0;if(!0===r.definite&&void 0===t)return!1}return function(e,t,r){let i,o=r?{...r,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},n=e._zod.bag.fallbackRun;if(n?(o[oL]=!0,i=n({value:t,issues:[]},o)):i=e._zod.run({value:t,issues:[]},o),i instanceof Promise)throw new tl;return 0===i.issues.length}(this,e,t)},validateAsync(e,t){return(async(e,t,r)=>{let i=r?{...r,async:!0,abortEarly:!0}:{async:!0,abortEarly:!0},o=e._zod.run({value:t,issues:[]},i);return o instanceof Promise&&(o=await o),0===o.issues.length})(this,e,t)},encode:function e(t,r){return oQ(this,t,r,{callee:e})},decode:function e(t,r){return oX(this,t,r,{callee:e})},encodeAsync:async function e(t,r){return await oY(this,t,r,{callee:e})},decodeAsync:async function e(t,r){return await o1(this,t,r,{callee:e})},safeEncode(e,t){return o0(this,e,t)},safeDecode(e,t){return o2(this,e,t)},async safeEncodeAsync(e,t){return o4(this,e,t)},async safeDecodeAsync(e,t){return o6(this,e,t)},toJSONSchema(e){return((e,t={})=>r=>{let i=iM({...r,processors:t});return iz(e,i),iF(i,e),iB(i,e)})(this,{})(e)},get description(){return iS.get(this)?.description},get _def(){return this._zod.def}}),o5=tc("_ZodString",(e,t)=>{rs.init(e,t),o9.init(e,t),e._zod.processJSONSchema=(t,r,i)=>oe(e,t,r,i)},tr({format:e=>i9(e).format??null,minLength:e=>i9(e).minimum??null,maxLength:e=>i9(e).maximum??null},{regex(...e){return this.check(function(e,t){return new t3({check:"string_format",format:"regex",...eK(t),pattern:e})}(...e))},includes(...e){return this.check(function(e,t){return new t8({check:"string_format",format:"includes",...eK(t),includes:e})}(...e))},startsWith(...e){return this.check(function(e,t){return new t7({check:"string_format",format:"starts_with",...eK(t),prefix:e})}(...e))},endsWith(...e){return this.check(function(e,t){return new re({check:"string_format",format:"ends_with",...eK(t),suffix:e})}(...e))},min(...e){return this.check(iO(...e))},max(...e){return this.check(iT(...e))},length(...e){return this.check(iE(...e))},nonempty(...e){return this.check(iO(1,...e))},lowercase(e){return this.check(new t9({check:"string_format",format:"lowercase",...eK(e)}))},uppercase(e){return this.check(new t5({check:"string_format",format:"uppercase",...eK(e)}))},trim(){return this.check(iA(e=>e.trim()))},normalize(...e){return this.check(function(e){return iA(t=>t.normalize(e))}(...e))},toLowerCase(){return this.check(iA(e=>e.toLowerCase()))},toUpperCase(){return this.check(iA(e=>e.toUpperCase()))},slugify(){return this.check(iA(e=>e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")))}})),o8=tc("ZodString",(e,t)=>{rs.init(e,t),o5.init(e,t)},{email(e){return this.check(iw(nn,e))},url(e){return this.check(iV(nd,e))},jwt(e){return this.check(new nk({type:"string",format:"jwt",check:"string_format",abort:!1,...eK(e)}))},emoji(e){return this.check(new nc({type:"string",format:"emoji",check:"string_format",abort:!1,...eK(e)}))},guid(e){return this.check(new na({type:"string",format:"guid",check:"string_format",abort:!1,...eK(e)}))},uuid(e){return this.check(new ns({type:"string",format:"uuid",check:"string_format",abort:!1,...eK(e)}))},uuidv4(e){return this.check(new ns({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...eK(e)}))},uuidv6(e){return this.check(new ns({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...eK(e)}))},uuidv7(e){return this.check(new ns({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...eK(e)}))},nanoid(e){return this.check(new nl({type:"string",format:"nanoid",check:"string_format",abort:!1,...eK(e)}))},cuid(e){return this.check(new np({type:"string",format:"cuid",check:"string_format",abort:!1,...eK(e)}))},cuid2(e){return this.check(new nu({type:"string",format:"cuid2",check:"string_format",abort:!1,...eK(e)}))},ulid(e){return this.check(new nm({type:"string",format:"ulid",check:"string_format",abort:!1,...eK(e)}))},base64(e){return this.check(new nb({type:"string",format:"base64",check:"string_format",abort:!1,...eK(e)}))},base64url(e){return this.check(new n$({type:"string",format:"base64url",check:"string_format",abort:!1,...eK(e)}))},xid(e){return this.check(new nf({type:"string",format:"xid",check:"string_format",abort:!1,...eK(e)}))},ksuid(e){return this.check(new nh({type:"string",format:"ksuid",check:"string_format",abort:!1,...eK(e)}))},ipv4(e){return this.check(new ny({type:"string",format:"ipv4",check:"string_format",abort:!1,...eK(e)}))},ipv6(e){return this.check(new ng({type:"string",format:"ipv6",check:"string_format",abort:!1,...eK(e)}))},cidrv4(e){return this.check(new n_({type:"string",format:"cidrv4",check:"string_format",abort:!1,...eK(e)}))},cidrv6(e){return this.check(new nv({type:"string",format:"cidrv6",check:"string_format",abort:!1,...eK(e)}))},e164(e){return this.check(new nS({type:"string",format:"e164",check:"string_format",abort:!1,...eK(e)}))},datetime(e){return this.check(iP(nt,e))},date(e){return this.check(iR(nr,e))},time(e){return this.check(new ni({type:"string",format:"time",check:"string_format",precision:null,...eK(e)}))},duration(e){return this.check(new no({type:"string",format:"duration",check:"string_format",...eK(e)}))}});function o7(e){return new o8(ik({type:"string",...eK(e)}))}let ne=tc("ZodStringFormat",(e,t)=>{rd.init(e,t),o5.init(e,t)}),nt=tc("ZodISODateTime",(e,t)=>{rk.init(e,t),ne.init(e,t)}),nr=tc("ZodISODate",(e,t)=>{rw.init(e,t),ne.init(e,t)}),ni=tc("ZodISOTime",(e,t)=>{rV.init(e,t),ne.init(e,t)}),no=tc("ZodISODuration",(e,t)=>{rP.init(e,t),ne.init(e,t)}),nn=tc("ZodEmail",(e,t)=>{rp.init(e,t),ne.init(e,t)}),na=tc("ZodGUID",(e,t)=>{rc.init(e,t),ne.init(e,t)}),ns=tc("ZodUUID",(e,t)=>{rl.init(e,t),ne.init(e,t)}),nd=tc("ZodURL",(e,t)=>{rh.init(e,t),ne.init(e,t)}),nc=tc("ZodEmoji",(e,t)=>{ry.init(e,t),ne.init(e,t)}),nl=tc("ZodNanoID",(e,t)=>{rg.init(e,t),ne.init(e,t)}),np=tc("ZodCUID",(e,t)=>{r_.init(e,t),ne.init(e,t)}),nu=tc("ZodCUID2",(e,t)=>{rv.init(e,t),ne.init(e,t)}),nm=tc("ZodULID",(e,t)=>{rb.init(e,t),ne.init(e,t)}),nf=tc("ZodXID",(e,t)=>{r$.init(e,t),ne.init(e,t)}),nh=tc("ZodKSUID",(e,t)=>{rS.init(e,t),ne.init(e,t)}),ny=tc("ZodIPv4",(e,t)=>{rR.init(e,t),ne.init(e,t)}),ng=tc("ZodIPv6",(e,t)=>{rx.init(e,t),ne.init(e,t)}),n_=tc("ZodCIDRv4",(e,t)=>{rj.init(e,t),ne.init(e,t)}),nv=tc("ZodCIDRv6",(e,t)=>{rC.init(e,t),ne.init(e,t)}),nb=tc("ZodBase64",(e,t)=>{rE.init(e,t),ne.init(e,t)}),n$=tc("ZodBase64URL",(e,t)=>{rW.init(e,t),ne.init(e,t)}),nS=tc("ZodE164",(e,t)=>{rM.init(e,t),ne.init(e,t)}),nk=tc("ZodJWT",(e,t)=>{rN.init(e,t),ne.init(e,t)}),nw=tc("ZodNumber",(e,t)=>{rz.init(e,t),o9.init(e,t),e._zod.processJSONSchema=(t,r,i)=>ot(e,t,r,i),e.isFinite=!0},tr({minValue:e=>{let{minimum:t,exclusiveMinimum:r}=i9(e);return Math.max(t??-1/0,r??-1/0)},maxValue:e=>{let{maximum:t,exclusiveMaximum:r}=i9(e);return Math.min(t??1/0,r??1/0)},isInt:e=>{let{isInt:t,multipleOf:r}=i9(e);return!!t||!!r?.some(Number.isSafeInteger)},format:e=>i9(e).format??null},{gt(e,t){return this.check(ix(e,t))},gte(e,t){return this.check(ij(e,t))},min(e,t){return this.check(ij(e,t))},lt(e,t){return this.check(iq(e,t))},lte(e,t){return this.check(iI(e,t))},max(e,t){return this.check(iI(e,t))},int(e){return this.check(nR(e))},safe(e){return this.check(nR(e))},positive(e){return this.check(ix(0,e))},nonnegative(e){return this.check(ij(0,e))},negative(e){return this.check(iq(0,e))},nonpositive(e){return this.check(iI(0,e))},multipleOf(e,t){return this.check(iC(e,t))},step(e,t){return this.check(iC(e,t))},finite(){return this}}));function nV(e){return new nw(ik({type:"number",checks:[],...eK(e)}))}let nP=tc("ZodNumberFormat",(e,t)=>{rD.init(e,t),nw.init(e,t)});function nR(e){return new nP({type:"number",check:"number_format",abort:!1,format:"safeint",...eK(e)})}let nq=tc("ZodBoolean",(e,t)=>{rF.init(e,t),o9.init(e,t),e._zod.processJSONSchema=(t,r,i)=>or(e,t,r,i)});function nI(e){return new nq({type:"boolean",...eK(e)})}let nx=tc("ZodNull",(e,t)=>{rL.init(e,t),o9.init(e,t),e._zod.processJSONSchema=(t,r,i)=>oi(e,t,r,i)});function nj(e){return new nx({type:"null",...eK(e)})}let nC=tc("ZodAny",(e,t)=>{rU.init(e,t),o9.init(e,t),e._zod.processJSONSchema=(t,r,i)=>on(e,t,r,i)});function nT(){return new nC({type:"any"})}let nO=tc("ZodUnknown",(e,t)=>{rH.init(e,t),o9.init(e,t),e._zod.processJSONSchema=(t,r,i)=>oa(e,t,r,i)});function nE(){return new nO({type:"unknown"})}let nA=tc("ZodNever",(e,t)=>{rG.init(e,t),o9.init(e,t),e._zod.processJSONSchema=(t,r,i)=>oo(e,t,r,i)}),nW=tc("ZodArray",(e,t)=>{o3(),rJ.init(e,t),o9.init(e,t),e._zod.processJSONSchema=(t,r,i)=>op(e,t,r,i),e.element=t.element},{min(e,t){return this.check(iO(e,t))},nonempty(e){return this.check(iO(1,e))},max(e,t){return this.check(iT(e,t))},length(e,t){return this.check(iE(e,t))},unwrap(){return this.element}});function nM(e,t){return new nW({type:"array",element:e,...eK(t)})}let nN=tc("ZodObject",(e,t)=>{var r;let i,o;o3(),r0.init(e,t),o9.init(e,t),e._zod.processJSONSchema=(t,r,i)=>om(e,t,r,i),r="shape",(o=r in(i=Object.getPrototypeOf(e))?void 0:i)&&Object.defineProperty(o,r,{configurable:!0,get(){let e={configurable:!0,writable:!0,enumerable:!1,value:void 0};return Object.defineProperty(this,r,e),e.value=(e=>e._zod.def.shape)(this),Object.defineProperty(this,r,e),e.value},set(e){Object.defineProperty(this,r,{configurable:!0,writable:!0,enumerable:!1,value:e})}})},{keyof(){return nQ(Object.keys(this._zod.def.shape))},catchall(e){return this.clone(eN(this._zod.def,{catchall:e}))},passthrough(){return this.clone(eN(this._zod.def,{catchall:nE()}))},loose(){return this.clone(eN(this._zod.def,{catchall:nE()}))},strict(){return this.clone(eN(this._zod.def,{catchall:new nA({type:"never",...eK(void 0)})}))},strip(){return this.clone(eN(this._zod.def,{catchall:void 0}))},extend(e){if(!eL(e))throw Error("Invalid input to extend: expected a plain object");let t=this._zod.def.checks;if(t&&t.length>0){let t=eE(this);for(let r of Reflect.ownKeys(e))if(void 0!==Object.getOwnPropertyDescriptor(t,r))throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return eB(this,eN(this._zod.def,{shape:eY(this,e)}))},safeExtend(e){if(!eL(e))throw Error("Invalid input to safeExtend: expected a plain object");return eB(this,eN(this._zod.def,{shape:eY(this,e)}))},merge(e){if(!e?._zod?.def)throw Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(this._zod.def.checks?.length)throw Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let t={};return eM(t,this,Reflect.ownKeys(eE(this))),eM(t,e,Reflect.ownKeys(eE(e))),eB(this,eN(this._zod.def,{shape:t,get catchall(){return e._zod.def.catchall},checks:e._zod.def.checks??[]}))},pick(e){return function(e,t){let r=e._zod.def,i=r.checks;if(i&&i.length>0)throw Error(".pick() cannot be used on object schemas containing refinements");let o={};return eM(o,e,eX(e,t)),eB(e,eN(r,{shape:o,checks:[]}))}(this,e)},omit(e){return function(e,t){let r=e._zod.def,i=r.checks;if(i&&i.length>0)throw Error(".omit() cannot be used on object schemas containing refinements");let o=new Set(eX(e,t)),n={};return eM(n,e,Reflect.ownKeys(eE(e)).filter(e=>!o.has(e))),eB(e,eN(r,{shape:n,checks:[]}))}(this,e)},partial(...e){return e1(n2,this,e[0])},exactPartial(...e){return e1(n6,this,e[0],"exactPartial")},required(...e){var t;let r,i;return r=(t=e[0])?new Set(eX(this,t)):void 0,eM(i={},this,Reflect.ownKeys(eE(this)),(e,t)=>r&&!r.has(t)?e:new n7({type:"nonoptional",innerType:e})),eB(this,eN(this._zod.def,{shape:i}))}});function nz(e,t){return new nN({type:"object",shape:e??{},...eK(t)})}function nD(e,t){return new nN({type:"object",shape:e,catchall:nE(),...eK(t)})}let nF=tc("ZodUnion",(e,t)=>{r4.init(e,t),o9.init(e,t),e._zod.processJSONSchema=(t,r,i)=>of(e,t,r,i),e.options=t.options});function nL(e,t){return new nF({type:"union",options:e,...eK(t)})}let nU=tc("ZodDiscriminatedUnion",(e,t)=>{nF.init(e,t),r6.init(e,t)});function nH(e,t,r){return new nU({type:"union",options:t,discriminator:e,...eK(r)})}let nG=tc("ZodIntersection",(e,t)=>{r3.init(e,t),o9.init(e,t),e._zod.processJSONSchema=(t,r,i)=>oh(e,t,r,i)});function nB(e,t){return new nG({type:"intersection",left:e,right:t})}let nK=tc("ZodRecord",(e,t)=>{o3(),r5.init(e,t),o9.init(e,t),e._zod.processJSONSchema=(t,r,i)=>og(e,t,r,i),e.keyType=t.keyType,e.valueType=t.valueType});function nJ(e,t,r){return new nK(t&&t._zod?{type:"record",keyType:e,valueType:t,...eK(r)}:{type:"record",keyType:o7(),valueType:e,...eK(t)})}let nZ=tc("ZodEnum",(e,t)=>{r8.init(e,t),o9.init(e,t),e._zod.processJSONSchema=(t,r,i)=>os(e,t,r,i),e.enum=t.entries,e.options=[...e._zod.values];let r=new Set(Object.keys(t.entries));e.extract=(e,i)=>{let o={};for(let i of e)if(r.has(i))o[i]=t.entries[i];else throw Error(`Key ${i} not found in enum`);return new nZ({...t,checks:[],...eK(i),entries:o})},e.exclude=(e,i)=>{let o={...t.entries};for(let t of e)if(r.has(t))delete o[t];else throw Error(`Key ${t} not found in enum`);return new nZ({...t,checks:[],...eK(i),entries:o})}});function nQ(e,t){return new nZ({type:"enum",entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...eK(t)})}let nX=tc("ZodLiteral",(e,t)=>{r7.init(e,t),o9.init(e,t),e._zod.processJSONSchema=(t,r,i)=>od(e,t,r,i),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function nY(e,t){return new nX({type:"literal",values:Array.isArray(e)?e:[e],...eK(t)})}let n1=tc("ZodTransform",(e,t)=>{o3(),ie.init(e,t),o9.init(e,t),e._zod.processJSONSchema=(t,r,i)=>ol(e,t,r,i),e._zod.parse=(r,i)=>{if("backward"===i.direction)throw new tp(e.constructor.name);r.addIssue=i=>{"string"==typeof i?r.issues.push(te(i,r.value,t)):(i.fatal&&(i.continue=!1),i.code??(i.code="custom"),"input"in i||(i.input=r.value),i.inst??(i.inst=e),r.issues.push(te(i)))};let o=t.transform(r.value,r);return o instanceof Promise?o.then(e=>(r.value=e,r)):(r.value=o,r)}});function n0(e){return new n1({type:"transform",transform:e})}let n2=tc("ZodOptional",(e,t)=>{ir.init(e,t),o9.init(e,t),e._zod.processJSONSchema=(t,r,i)=>oR(e,t,r,i),e.unwrap=()=>e._zod.def.innerType});function n4(e){return new n2({type:"optional",innerType:e})}let n6=tc("ZodExactOptional",(e,t)=>{ii.init(e,t),o9.init(e,t),e._zod.processJSONSchema=(t,r,i)=>oR(e,t,r,i),e.unwrap=()=>e._zod.def.innerType}),n3=tc("ZodNullable",(e,t)=>{io.init(e,t),o9.init(e,t),e._zod.processJSONSchema=(t,r,i)=>o_(e,t,r,i),e.unwrap=()=>e._zod.def.innerType});function n9(e){return new n3({type:"nullable",innerType:e})}let n5=tc("ZodDefault",(e,t)=>{ia.init(e,t),o9.init(e,t),e._zod.processJSONSchema=(t,r,i)=>oS(e,t,r,i),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap}),n8=tc("ZodPrefault",(e,t)=>{id.init(e,t),o9.init(e,t),e._zod.processJSONSchema=(t,r,i)=>ok(e,t,r,i),e.unwrap=()=>e._zod.def.innerType}),n7=tc("ZodNonOptional",(e,t)=>{ic.init(e,t),o9.init(e,t),e._zod.processJSONSchema=(t,r,i)=>ov(e,t,r,i),e.unwrap=()=>e._zod.def.innerType}),ae=tc("ZodCatch",(e,t)=>{iu.init(e,t),o9.init(e,t),e._zod.processJSONSchema=(t,r,i)=>ow(e,t,r,i),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap}),at=tc("ZodPipe",(e,t)=>{im.init(e,t),o9.init(e,t),e._zod.processJSONSchema=(t,r,i)=>oV(e,t,r,i),e.in=t.in,e.out=t.out});function ar(e,t){return new at({type:"pipe",in:e,out:t})}let ai=tc("ZodPreprocess",(e,t)=>{at.init(e,t),iy.init(e,t)}),ao=tc("ZodReadonly",(e,t)=>{ig.init(e,t),o9.init(e,t),e._zod.processJSONSchema=(t,r,i)=>oP(e,t,r,i),e.unwrap=()=>e._zod.def.innerType}),an=tc("ZodLazy",(e,t)=>{iv.init(e,t),o9.init(e,t),e._zod.processJSONSchema=(t,r,i)=>oq(e,t,r,i),e.unwrap=()=>e._zod.def.getter()});function aa(e){return new an({type:"lazy",getter:e})}let as=tc("ZodCustom",(e,t)=>{ib.init(e,t),o9.init(e,t),e._zod.processJSONSchema=(t,r,i)=>oc(e,t,r,i)});function ad(e,t){return new ai({type:"pipe",in:n0(e),out:t})}function ac(e){return iP(nt,e)}let al="2025-11-25",ap=[al,"2025-06-18","2025-03-26","2024-11-05","2024-10-07"],au="io.modelcontextprotocol/protocolVersion",am="io.modelcontextprotocol/clientInfo",af="io.modelcontextprotocol/serverInfo",ah="io.modelcontextprotocol/clientCapabilities",ay="io.modelcontextprotocol/logLevel",ag=aa(()=>nL([o7(),nV(),nI(),nj(),nJ(o7(),ag),nM(ag)])),a_=nJ(o7(),ag),av=nM(ag),ab=nL([o7(),nV().int()]),a$=o7(),aS=nz({ttl:nV().optional()}),ak=nz({taskId:o7()}),aw=nD({progressToken:ab.optional(),"io.modelcontextprotocol/related-task":ak.optional()}),aV=nz({_meta:aw.optional()}),aP=aV.extend({task:aS.optional()}),aR=nz({method:o7(),params:aV.loose().optional()}),aq=nz({_meta:aw.optional()}),aI=nz({method:o7(),params:aq.loose().optional()}),ax=nD({get[af](){return aH.optional().catch(void 0)}}),aj=nD({_meta:ax.optional()}),aC=nL([o7(),nV().int()]),aT=nz({jsonrpc:nY("2.0"),id:aC,...aR.shape}).strict(),aO=nz({jsonrpc:nY("2.0"),...aI.shape}).strict(),aE=nz({jsonrpc:nY("2.0"),id:aC,result:aj}).strict(),aA=nz({jsonrpc:nY("2.0"),id:aC.optional(),error:nz({code:nV().int(),message:o7(),data:nE().optional()})}).strict(),aW=nL([aT,aO,aE,aA]),aM=nL([aE,aA]),aN=aj.strict(),az=aq.extend({requestId:aC.optional(),reason:o7().optional()}),aD=aI.extend({method:nY("notifications/cancelled"),params:az}),aF=nz({src:o7(),mimeType:o7().optional(),sizes:nM(o7()).optional(),theme:nQ(["light","dark"]).optional()}),aL=nz({icons:nM(aF).optional()}),aU=nz({name:o7(),title:o7().optional()}),aH=aU.extend({...aU.shape,...aL.shape,version:o7(),websiteUrl:o7().optional(),description:o7().optional()}),aG=nB(nz({applyDefaults:nI().optional()}),a_),aB=ad(e=>e&&"object"==typeof e&&!Array.isArray(e)&&0===Object.keys(e).length?{form:{}}:e,nB(nz({form:aG.optional(),url:a_.optional()}),a_.optional())),aK=nD({list:a_.optional(),cancel:a_.optional(),requests:nD({sampling:nD({createMessage:a_.optional()}).optional(),elicitation:nD({create:a_.optional()}).optional()}).optional()}),aJ=nD({list:a_.optional(),cancel:a_.optional(),requests:nD({tools:nD({call:a_.optional()}).optional()}).optional()}),aZ=nz({experimental:nJ(o7(),a_).optional(),sampling:nz({context:a_.optional(),tools:a_.optional()}).optional(),elicitation:aB.optional(),roots:nz({listChanged:nI().optional()}).optional(),tasks:aK.optional(),extensions:nJ(o7(),a_).optional()}),aQ=aV.extend({protocolVersion:o7(),capabilities:aZ,clientInfo:aH}),aX=aR.extend({method:nY("initialize"),params:aQ}),aY=nz({experimental:nJ(o7(),a_).optional(),logging:a_.optional(),completions:a_.optional(),prompts:nz({listChanged:nI().optional()}).optional(),resources:nz({subscribe:nI().optional(),listChanged:nI().optional()}).optional(),tools:nz({listChanged:nI().optional()}).optional(),tasks:aJ.optional(),extensions:nJ(o7(),a_).optional()}),a1=aj.extend({protocolVersion:o7(),capabilities:aY,serverInfo:aH,instructions:o7().optional()}),a0=aI.extend({method:nY("notifications/initialized"),params:aq.optional()}),a2=aR.extend({method:nY("server/discover"),params:aV.optional()}),a4=aj.extend({supportedVersions:nM(o7()),capabilities:aY,instructions:o7().optional()}),a6=aR.extend({method:nY("ping"),params:aV.optional()}),a3=nz({progress:nV(),total:n4(nV()),message:n4(o7())}),a9=nz({...aq.shape,...a3.shape,progressToken:ab}),a5=aI.extend({method:nY("notifications/progress"),params:a9}),a8=aV.extend({cursor:a$.optional()}),a7=aR.extend({params:a8.optional()}),se=aj.extend({nextCursor:a$.optional()}),st=nz({uri:o7(),mimeType:n4(o7()),_meta:nJ(o7(),nE()).optional()}),sr=st.extend({text:o7()}),si=o7().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:"Invalid Base64 string"}),so=st.extend({blob:si}),sn=nQ(["user","assistant"]),sa=nz({audience:nM(sn).optional(),priority:nV().min(0).max(1).optional(),lastModified:ac({offset:!0}).optional()}),ss=nz({...aU.shape,...aL.shape,uri:o7(),description:n4(o7()),mimeType:n4(o7()),size:n4(nV()),annotations:sa.optional(),_meta:n4(nD({}))}),sd=nz({...aU.shape,...aL.shape,uriTemplate:o7(),description:n4(o7()),mimeType:n4(o7()),annotations:sa.optional(),_meta:n4(nD({}))}),sc=a7.extend({method:nY("resources/list")}),sl=se.extend({resources:nM(ss)}),sp=a7.extend({method:nY("resources/templates/list")}),su=se.extend({resourceTemplates:nM(sd)}),sm=aV.extend({uri:o7()}),sf=aR.extend({method:nY("resources/read"),params:sm}),sh=aj.extend({contents:nM(nL([sr,so]))}),sy=aI.extend({method:nY("notifications/resources/list_changed"),params:aq.optional()}),sg=aR.extend({method:nY("resources/subscribe"),params:sm}),s_=aR.extend({method:nY("resources/unsubscribe"),params:sm}),sv=nz({toolsListChanged:nI().optional(),promptsListChanged:nI().optional(),resourcesListChanged:nI().optional(),resourceSubscriptions:nM(o7()).optional()}),sb=aV.extend({notifications:sv}),s$=aR.extend({method:nY("subscriptions/listen"),params:sb}),sS=aq.extend({notifications:sv}),sk=aI.extend({method:nY("notifications/subscriptions/acknowledged"),params:sS}),sw=ax.extend({"io.modelcontextprotocol/subscriptionId":aC}),sV=aj.extend({_meta:sw}),sP=aq.extend({uri:o7()}),sR=aI.extend({method:nY("notifications/resources/updated"),params:sP}),sq=nz({name:o7(),description:n4(o7()),required:n4(nI())}),sI=nz({...aU.shape,...aL.shape,description:n4(o7()),arguments:n4(nM(sq)),_meta:n4(nD({}))}),sx=a7.extend({method:nY("prompts/list")}),sj=se.extend({prompts:nM(sI)}),sC=aV.extend({name:o7(),arguments:nJ(o7(),o7()).optional()}),sT=aR.extend({method:nY("prompts/get"),params:sC}),sO=nz({type:nY("text"),text:o7(),annotations:sa.optional(),_meta:nJ(o7(),nE()).optional()}),sE=nz({type:nY("image"),data:si,mimeType:o7(),annotations:sa.optional(),_meta:nJ(o7(),nE()).optional()}),sA=nz({type:nY("audio"),data:si,mimeType:o7(),annotations:sa.optional(),_meta:nJ(o7(),nE()).optional()}),sW=nz({type:nY("tool_use"),name:o7(),id:o7(),input:nJ(o7(),nE()),_meta:nJ(o7(),nE()).optional()}),sM=nz({type:nY("resource"),resource:nL([sr,so]),annotations:sa.optional(),_meta:nJ(o7(),nE()).optional()}),sN=ss.extend({type:nY("resource_link")}),sz=nL([sO,sE,sA,sN,sM]),sD=nz({role:sn,content:sz}),sF=aj.extend({description:o7().optional(),messages:nM(sD)}),sL=aI.extend({method:nY("notifications/prompts/list_changed"),params:aq.optional()}),sU=nz({title:o7().optional(),readOnlyHint:nI().optional(),destructiveHint:nI().optional(),idempotentHint:nI().optional(),openWorldHint:nI().optional()}),sH=nz({taskSupport:nQ(["required","optional","forbidden"]).optional()}),sG=nz({...aU.shape,...aL.shape,description:o7().optional(),inputSchema:nz({type:nY("object"),properties:nJ(o7(),ag).optional(),required:nM(o7()).optional()}).catchall(nE()),outputSchema:nD({$schema:o7().optional()}).optional(),annotations:sU.optional(),execution:sH.optional(),_meta:nJ(o7(),nE()).optional()}),sB=a7.extend({method:nY("tools/list")}),sK=se.extend({tools:nM(sG)}),sJ=aj.extend({content:nM(sz).default([]),structuredContent:nE().optional(),isError:nI().optional()}),sZ=sJ.or(aj.extend({toolResult:nE()})),sQ=aP.extend({name:o7(),arguments:nJ(o7(),nE()).optional()}),sX=aR.extend({method:nY("tools/call"),params:sQ}),sY=aI.extend({method:nY("notifications/tools/list_changed"),params:aq.optional()}),s1=nz({autoRefresh:nI().default(!0),debounceMs:nV().int().nonnegative().default(300)}),s0=nQ(["debug","info","notice","warning","error","critical","alert","emergency"]),s2=aV.extend({level:s0}),s4=aR.extend({method:nY("logging/setLevel"),params:s2}),s6=aq.extend({level:s0,logger:o7().optional(),data:nE()}),s3=aI.extend({method:nY("notifications/message"),params:s6}),s9=nz({name:o7().optional()}),s5=nz({hints:nM(s9).optional(),costPriority:nV().min(0).max(1).optional(),speedPriority:nV().min(0).max(1).optional(),intelligencePriority:nV().min(0).max(1).optional()}),s8=nz({mode:nQ(["auto","required","none"]).optional()}),s7=nz({type:nY("tool_result"),toolUseId:o7().describe("The unique identifier for the corresponding tool call."),content:nM(sz),structuredContent:nE().optional(),isError:nI().optional(),_meta:nJ(o7(),nE()).optional()}),de=nH("type",[sO,sE,sA]),dt=nH("type",[sO,sE,sA,sW,s7]),dr=nz({role:sn,content:nL([dt,nM(dt)]),_meta:nJ(o7(),nE()).optional()}),di=aP.extend({messages:nM(dr),modelPreferences:s5.optional(),systemPrompt:o7().optional(),includeContext:nQ(["none","thisServer","allServers"]).optional(),temperature:nV().optional(),maxTokens:nV().int(),stopSequences:nM(o7()).optional(),metadata:a_.optional(),tools:nM(sG).optional(),toolChoice:s8.optional()}),dn=aR.extend({method:nY("sampling/createMessage"),params:di}),da=aj.extend({model:o7(),stopReason:n4(nQ(["endTurn","stopSequence","maxTokens"]).or(o7())),role:sn,content:de}),ds=aj.extend({model:o7(),stopReason:n4(nQ(["endTurn","stopSequence","maxTokens","toolUse"]).or(o7())),role:sn,content:nL([dt,nM(dt)])}),dd=nz({type:nY("boolean"),title:o7().optional(),description:o7().optional(),default:nI().optional()}),dc=nz({type:nY("string"),title:o7().optional(),description:o7().optional(),minLength:nV().optional(),maxLength:nV().optional(),format:nQ(["email","uri","date","date-time"]).optional(),default:o7().optional()}),dl=nz({type:nQ(["number","integer"]),title:o7().optional(),description:o7().optional(),minimum:nV().optional(),maximum:nV().optional(),default:nV().optional()}),dp=nz({type:nY("string"),title:o7().optional(),description:o7().optional(),enum:nM(o7()),default:o7().optional()}),du=nz({type:nY("string"),title:o7().optional(),description:o7().optional(),oneOf:nM(nz({const:o7(),title:o7()})),default:o7().optional()}),dm=nz({type:nY("string"),title:o7().optional(),description:o7().optional(),enum:nM(o7()),enumNames:nM(o7()).optional(),default:o7().optional()}),df=nL([dp,du]),dh=nz({type:nY("array"),title:o7().optional(),description:o7().optional(),minItems:nV().optional(),maxItems:nV().optional(),items:nz({type:nY("string"),enum:nM(o7())}),default:nM(o7()).optional()}),dy=nz({type:nY("array"),title:o7().optional(),description:o7().optional(),minItems:nV().optional(),maxItems:nV().optional(),items:nz({anyOf:nM(nz({const:o7(),title:o7()}))}),default:nM(o7()).optional()}),dg=nL([dh,dy]),d_=nL([dm,df,dg]),dv=nL([d_,dd,dc,dl]),db=aP.extend({mode:nY("form").optional(),message:o7(),requestedSchema:nz({type:nY("object"),properties:nJ(o7(),dv),required:nM(o7()).optional()}).catchall(nE())}),d$=aP.extend({mode:nY("url"),message:o7(),elicitationId:o7(),url:o7().url()}),dS=nL([db,d$]),dk=aR.extend({method:nY("elicitation/create"),params:dS}),dw=aq.extend({elicitationId:o7()}),dV=aI.extend({method:nY("notifications/elicitation/complete"),params:dw}),dP=aj.extend({action:nQ(["accept","decline","cancel"]),content:ad(e=>null===e?void 0:e,nJ(o7(),nL([o7(),nV(),nI(),nM(o7())])).optional())}),dR=nz({type:nY("ref/resource"),uri:o7()}),dq=nz({type:nY("ref/prompt"),name:o7()}),dI=aV.extend({ref:nL([dq,dR]),argument:nz({name:o7(),value:o7()}),context:nz({arguments:nJ(o7(),o7()).optional()}).optional()}),dx=aR.extend({method:nY("completion/complete"),params:dI}),dj=aj.extend({completion:nD({values:nM(o7()).max(100),total:n4(nV().int()),hasMore:n4(nI())})}),dC=nz({uri:o7().startsWith("file://"),name:o7().optional(),_meta:nJ(o7(),nE()).optional()}),dT=aR.extend({method:nY("roots/list"),params:aV.optional()}),dO=aj.extend({roots:nM(dC)}),dE=aI.extend({method:nY("notifications/roots/list_changed"),params:aq.optional()}),dA=nD({ttl:nV().optional(),pollInterval:nV().optional()}),dW=nQ(["working","input_required","completed","failed","cancelled"]),dM=nz({taskId:o7(),status:dW,ttl:nL([nV(),nj()]),createdAt:o7(),lastUpdatedAt:o7(),pollInterval:n4(nV()),statusMessage:n4(o7())}),dN=aj.extend({task:dM}),dz=aq.merge(dM),dD=aI.extend({method:nY("notifications/tasks/status"),params:dz}),dF=aR.extend({method:nY("tasks/get"),params:aV.extend({taskId:o7()})}),dL=aj.merge(dM),dU=aR.extend({method:nY("tasks/result"),params:aV.extend({taskId:o7()})}),dH=aj.loose(),dG=a7.extend({method:nY("tasks/list")}),dB=se.extend({tasks:nM(dM)}),dK=aR.extend({method:nY("tasks/cancel"),params:aV.extend({taskId:o7()})}),dJ=aj.merge(dM),dZ=nL([a6,aX,a2,dx,s4,sT,sx,sc,sp,sf,sg,s_,s$,sX,sB]),dQ=nL([aD,a5,a0,dE]),dX=nL([aN,da,ds,dP,dO]),dY=nL([a6,dn,dk,dT]),d1=nL([aD,a5,s3,sR,sy,sY,sL,sk,dV]),d0=nL([aN,a1,a4,dj,sF,sj,sl,su,sh,sJ,sK,sV]),d2="custom";function d4(e){return new nw(ik({type:"number",coerce:!0,checks:[],...eK(e)}))}eo||(eo={});let d6=iV(nd,void 0).superRefine((e,t)=>{if(!URL.canParse(e))return t.addIssue({code:d2,message:"URL must be parseable",fatal:!0}),ta}).refine(e=>{let t=new URL(e);return"javascript:"!==t.protocol&&"data:"!==t.protocol&&"vbscript:"!==t.protocol},{message:"URL cannot use javascript:, data:, or vbscript: scheme"}),d3=nD({resource:o7().url(),authorization_servers:nM(d6).optional(),jwks_uri:o7().url().optional(),scopes_supported:nM(o7()).optional(),bearer_methods_supported:nM(o7()).optional(),resource_signing_alg_values_supported:nM(o7()).optional(),resource_name:o7().optional(),resource_documentation:o7().optional(),resource_policy_uri:o7().url().optional(),resource_tos_uri:o7().url().optional(),tls_client_certificate_bound_access_tokens:nI().optional(),authorization_details_types_supported:nM(o7()).optional(),dpop_signing_alg_values_supported:nM(o7()).optional(),dpop_bound_access_tokens_required:nI().optional()}),d9=nD({issuer:o7(),authorization_endpoint:d6,token_endpoint:d6,registration_endpoint:d6.optional(),scopes_supported:nM(o7()).optional(),response_types_supported:nM(o7()),response_modes_supported:nM(o7()).optional(),grant_types_supported:nM(o7()).optional(),token_endpoint_auth_methods_supported:nM(o7()).optional(),token_endpoint_auth_signing_alg_values_supported:nM(o7()).optional(),service_documentation:d6.optional(),revocation_endpoint:d6.optional(),revocation_endpoint_auth_methods_supported:nM(o7()).optional(),revocation_endpoint_auth_signing_alg_values_supported:nM(o7()).optional(),introspection_endpoint:o7().optional(),introspection_endpoint_auth_methods_supported:nM(o7()).optional(),introspection_endpoint_auth_signing_alg_values_supported:nM(o7()).optional(),code_challenge_methods_supported:nM(o7()).optional(),client_id_metadata_document_supported:nI().optional(),authorization_response_iss_parameter_supported:nI().optional().catch(void 0),dpop_signing_alg_values_supported:nM(o7()).optional()}),d5=nD({issuer:o7(),authorization_endpoint:d6,token_endpoint:d6,userinfo_endpoint:d6.optional(),jwks_uri:d6,registration_endpoint:d6.optional(),scopes_supported:nM(o7()).optional(),response_types_supported:nM(o7()),response_modes_supported:nM(o7()).optional(),grant_types_supported:nM(o7()).optional(),acr_values_supported:nM(o7()).optional(),subject_types_supported:nM(o7()),id_token_signing_alg_values_supported:nM(o7()),id_token_encryption_alg_values_supported:nM(o7()).optional(),id_token_encryption_enc_values_supported:nM(o7()).optional(),userinfo_signing_alg_values_supported:nM(o7()).optional(),userinfo_encryption_alg_values_supported:nM(o7()).optional(),userinfo_encryption_enc_values_supported:nM(o7()).optional(),request_object_signing_alg_values_supported:nM(o7()).optional(),request_object_encryption_alg_values_supported:nM(o7()).optional(),request_object_encryption_enc_values_supported:nM(o7()).optional(),token_endpoint_auth_methods_supported:nM(o7()).optional(),token_endpoint_auth_signing_alg_values_supported:nM(o7()).optional(),display_values_supported:nM(o7()).optional(),claim_types_supported:nM(o7()).optional(),claims_supported:nM(o7()).optional(),service_documentation:o7().optional(),claims_locales_supported:nM(o7()).optional(),ui_locales_supported:nM(o7()).optional(),claims_parameter_supported:nI().optional(),request_parameter_supported:nI().optional(),request_uri_parameter_supported:nI().optional(),require_request_uri_registration:nI().optional(),op_policy_uri:d6.optional(),op_tos_uri:d6.optional(),client_id_metadata_document_supported:nI().optional(),authorization_response_iss_parameter_supported:nI().optional().catch(void 0)}),d8=nz({...d5.shape,...d9.pick({code_challenge_methods_supported:!0}).shape}),d7=nz({access_token:o7(),id_token:o7().optional(),token_type:o7(),expires_in:d4().optional(),scope:o7().optional(),refresh_token:o7().optional(),issuer:o7().optional().catch(void 0)}).strip(),ce=nz({issued_token_type:nY("urn:ietf:params:oauth:token-type:id-jag"),access_token:o7(),token_type:o7().optional(),expires_in:nV().optional(),scope:o7().optional()}).strip(),ct=nz({error:o7(),error_description:o7().optional(),error_uri:o7().optional()}),cr=d6.optional().or(nY("").transform(()=>void 0)),ci=nz({redirect_uris:nM(d6),token_endpoint_auth_method:o7().optional(),grant_types:nM(o7()).optional(),response_types:nM(o7()).optional(),application_type:o7().optional(),client_name:o7().optional(),client_uri:d6.optional(),logo_uri:cr,scope:o7().optional(),contacts:nM(o7()).optional(),tos_uri:cr,policy_uri:o7().optional(),jwks_uri:d6.optional(),jwks:nT().optional(),software_id:o7().optional(),software_version:o7().optional(),software_statement:o7().optional()}).strip(),co=nz({client_id:o7(),client_secret:o7().optional(),client_id_issued_at:nV().optional(),client_secret_expires_at:nV().optional(),issuer:o7().optional().catch(void 0)}).strip(),cn=ci.merge(co),ca=nz({error:o7(),error_description:o7().optional()}).strip(),cs=nz({token:o7(),token_type_hint:o7().optional()}).strip(),cd=Symbol.for("mcp.sdk.errorBrands");function cc(e,t){let r=new Set,i=t;for(;"function"==typeof i;){let e=i.mcpBrand;Object.prototype.hasOwnProperty.call(i,"mcpBrand")&&"string"==typeof e&&r.add(e),i=Object.getPrototypeOf(i)}0!==r.size&&Object.defineProperty(e,cd,{value:r,enumerable:!1,configurable:!0})}function cl(e,t){try{if("object"==typeof t&&null!==t&&Object.prototype.hasOwnProperty.call(e,"mcpBrand")&&"string"==typeof e.mcpBrand&&Object.prototype.hasOwnProperty.call(t,cd)){let r=t[cd];if(r&&"function"==typeof r.has&&r.has(e.mcpBrand))return!0}}catch{}return Function.prototype[Symbol.hasInstance].call(e,t)}let cp=((K={}).InvalidRequest="invalid_request",K.InvalidClient="invalid_client",K.InvalidGrant="invalid_grant",K.UnauthorizedClient="unauthorized_client",K.UnsupportedGrantType="unsupported_grant_type",K.InvalidScope="invalid_scope",K.AccessDenied="access_denied",K.ServerError="server_error",K.TemporarilyUnavailable="temporarily_unavailable",K.UnsupportedResponseType="unsupported_response_type",K.UnsupportedTokenType="unsupported_token_type",K.InvalidToken="invalid_token",K.MethodNotAllowed="method_not_allowed",K.TooManyRequests="too_many_requests",K.InvalidClientMetadata="invalid_client_metadata",K.InvalidRedirectUri="invalid_redirect_uri",K.InsufficientScope="insufficient_scope",K.InvalidTarget="invalid_target",K.InvalidDpopProof="invalid_dpop_proof",K.UseDpopNonce="use_dpop_nonce",K);var cu=class e extends Error{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.OAuthError"})}static[Symbol.hasInstance](e){return cl(this,e)}static isInstance(e){if("function"!=typeof this)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return cl(this,e)}constructor(e,t,r){super(t),this.code=e,this.errorUri=r,this.name="OAuthError",cc(this,new.target)}toResponseObject(){let e={error:this.code,error_description:this.message};return this.errorUri&&(e.error_uri=this.errorUri),e}static fromResponse(t){return new e(t.error,t.error_description??t.error,t.error_uri)}};let cm=((J={}).NotConnected="NOT_CONNECTED",J.AlreadyConnected="ALREADY_CONNECTED",J.NotInitialized="NOT_INITIALIZED",J.CapabilityNotSupported="CAPABILITY_NOT_SUPPORTED",J.RequestTimeout="REQUEST_TIMEOUT",J.ConnectionClosed="CONNECTION_CLOSED",J.SendFailed="SEND_FAILED",J.InvalidResult="INVALID_RESULT",J.UnsupportedResultType="UNSUPPORTED_RESULT_TYPE",J.InputRequiredRoundsExceeded="INPUT_REQUIRED_ROUNDS_EXCEEDED",J.ListPaginationExceeded="LIST_PAGINATION_EXCEEDED",J.MethodNotSupportedByProtocolVersion="METHOD_NOT_SUPPORTED_BY_PROTOCOL_VERSION",J.EraNegotiationFailed="ERA_NEGOTIATION_FAILED",J.ClientHttpNotImplemented="CLIENT_HTTP_NOT_IMPLEMENTED",J.ClientHttpAuthentication="CLIENT_HTTP_AUTHENTICATION",J.ClientHttpForbidden="CLIENT_HTTP_FORBIDDEN",J.ClientHttpUnexpectedContent="CLIENT_HTTP_UNEXPECTED_CONTENT",J.ClientHttpFailedToOpenStream="CLIENT_HTTP_FAILED_TO_OPEN_STREAM",J.ClientHttpFailedToTerminateSession="CLIENT_HTTP_FAILED_TO_TERMINATE_SESSION",J);var cf=class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.SdkError"})}static[Symbol.hasInstance](e){return cl(this,e)}static isInstance(e){if("function"!=typeof this)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return cl(this,e)}constructor(e,t,r,i){super(t,i),this.code=e,this.data=r,this.name="SdkError",cc(this,new.target)}};function ch(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)}function cy(e,t){let r={};for(let[i,o]of Object.entries(e)){if(void 0===o)continue;let e=void 0===t?void 0:t[i];if(void 0===e){r[i]=o;continue}if(ch(o)&&ch(e)){let t={};for(let[r,n]of Object.entries(o))void 0!==n&&void 0===e[r]&&("elicitation"!==i||"form"!==r||void 0!==e.form||void 0!==e.url)&&(t[r]=n);Object.keys(t).length>0&&(r[i]=t)}}return Object.keys(r).length>0?r:void 0}(class extends cf{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.SdkHttpError"})}constructor(e,t,r,i){super(e,t,r,i),this.name="SdkHttpError"}get status(){return this.data.status}get statusText(){return this.data.statusText}});let cg="2026-07-28",c_=[cg];function cv(e){return e.filter(e=>e>=cg)}function cb(e){let t=e.structuredContent;return void 0===t||!("object"!=typeof t||null===t||Array.isArray(t))||e.content?.some(e=>"text"===e.type)?e:{...e,content:[...e.content??[],{type:"text",text:JSON.stringify(t)}]}}let c$=["task","inputRequests","requestState"];function cS(e){return null===e||"object"!=typeof e||Array.isArray(e)||void 0!==e.content||c$.some(t=>t in e)?e:{...e,content:[]}}function ck(){let e,t,i,o,n,a,s,d,c,l,p,u,m,f,h,y,g,_,v,b,$,S,k,w,V,P,R,q,I,x,j,C,T,O,E,A,W,M,N,z,D,F,L,U,H,G,B,K,J,Z,Q,X,Y,ee,et,er,ei,eo,en,ea,es,ed,ec,el,ep,eu,em,ef,eh,ey,eg,e_,ev,eb,e$,eS,ek,ew,eV,eP,eR,eq,eI,ex,ej,eC,eT,eO,eE,eA,eW,eM,eN,ez,eD,eF,eL,eU,eH,eG,eB,eK,eJ,eZ,eQ,eX,eY,e1,e0,e2,e4,e6,e3,e9,e5,e8,e7,te,tt,tr,ti,to,tn,ta,ts,td,tc,tl,tp,tu,tm,tf,th,ty,tg,t_,tv,tb,t$,tS;return r??=(e=aa(()=>nL([o7(),nV(),nI(),nj(),nJ(o7(),e),nM(e)])),t=nJ(o7(),e),i=nL([o7(),nV().int()]),o=o7(),n=nz({ttl:nV().optional()}),a=nz({taskId:o7()}),c=(d=nz({_meta:(s=nD({progressToken:i.optional(),"io.modelcontextprotocol/related-task":a.optional()})).optional()})).extend({task:n.optional()}),l=nz({method:o7(),params:d.loose().optional()}),p=nz({_meta:s.optional()}),u=nz({method:o7(),params:p.loose().optional()}),m=nD({_meta:s.optional()}),f=nL([o7(),nV().int()]),h=m.strict(),y=p.extend({requestId:f.optional(),reason:o7().optional()}),g=u.extend({method:nY("notifications/cancelled"),params:y}),_=nz({src:o7(),mimeType:o7().optional(),sizes:nM(o7()).optional(),theme:nQ(["light","dark"]).optional()}),v=nz({icons:nM(_).optional()}),$=(b=nz({name:o7(),title:o7().optional()})).extend({...b.shape,...v.shape,version:o7(),websiteUrl:o7().optional(),description:o7().optional()}),S=nB(nz({applyDefaults:nI().optional()}),t),k=ad(e=>e&&"object"==typeof e&&!Array.isArray(e)&&0===Object.keys(e).length?{form:{}}:e,nB(nz({form:S.optional(),url:t.optional()}),t.optional())),w=nD({list:t.optional(),cancel:t.optional(),requests:nD({sampling:nD({createMessage:t.optional()}).optional(),elicitation:nD({create:t.optional()}).optional()}).optional()}),V=nD({list:t.optional(),cancel:t.optional(),requests:nD({tools:nD({call:t.optional()}).optional()}).optional()}),P=nz({experimental:nJ(o7(),t).optional(),sampling:nz({context:t.optional(),tools:t.optional()}).optional(),elicitation:k.optional(),roots:nz({listChanged:nI().optional()}).optional(),tasks:w.optional(),extensions:nJ(o7(),t).optional()}),R=d.extend({protocolVersion:o7(),capabilities:P,clientInfo:$}),q=l.extend({method:nY("initialize"),params:R}),I=nz({experimental:nJ(o7(),t).optional(),logging:t.optional(),completions:t.optional(),prompts:nz({listChanged:nI().optional()}).optional(),resources:nz({subscribe:nI().optional(),listChanged:nI().optional()}).optional(),tools:nz({listChanged:nI().optional()}).optional(),tasks:V.optional(),extensions:nJ(o7(),t).optional()}),x=m.extend({protocolVersion:o7(),capabilities:I,serverInfo:$,instructions:o7().optional()}),j=u.extend({method:nY("notifications/initialized"),params:p.optional()}),C=l.extend({method:nY("ping"),params:d.optional()}),T=nz({progress:nV(),total:n4(nV()),message:n4(o7())}),O=nz({...p.shape,...T.shape,progressToken:i}),E=u.extend({method:nY("notifications/progress"),params:O}),A=d.extend({cursor:o.optional()}),W=l.extend({params:A.optional()}),M=m.extend({nextCursor:o.optional()}),z=(N=nz({uri:o7(),mimeType:n4(o7()),_meta:nJ(o7(),nE()).optional()})).extend({text:o7()}),D=o7().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:"Invalid Base64 string"}),F=N.extend({blob:D}),U=nz({audience:nM(L=nQ(["user","assistant"])).optional(),priority:nV().min(0).max(1).optional(),lastModified:ac({offset:!0}).optional()}),H=nz({...b.shape,...v.shape,uri:o7(),description:n4(o7()),mimeType:n4(o7()),size:n4(nV()),annotations:U.optional(),_meta:n4(nD({}))}),G=nz({...b.shape,...v.shape,uriTemplate:o7(),description:n4(o7()),mimeType:n4(o7()),annotations:U.optional(),_meta:n4(nD({}))}),B=W.extend({method:nY("resources/list")}),K=M.extend({resources:nM(H)}),J=W.extend({method:nY("resources/templates/list")}),Z=M.extend({resourceTemplates:nM(G)}),Q=d.extend({uri:o7()}),X=l.extend({method:nY("resources/read"),params:Q}),Y=m.extend({contents:nM(nL([z,F]))}),ee=u.extend({method:nY("notifications/resources/list_changed"),params:p.optional()}),et=l.extend({method:nY("resources/subscribe"),params:Q}),er=l.extend({method:nY("resources/unsubscribe"),params:Q}),ei=p.extend({uri:o7()}),eo=u.extend({method:nY("notifications/resources/updated"),params:ei}),en=nz({name:o7(),description:n4(o7()),required:n4(nI())}),ea=nz({...b.shape,...v.shape,description:n4(o7()),arguments:n4(nM(en)),_meta:n4(nD({}))}),es=W.extend({method:nY("prompts/list")}),ed=M.extend({prompts:nM(ea)}),ec=d.extend({name:o7(),arguments:nJ(o7(),o7()).optional()}),el=l.extend({method:nY("prompts/get"),params:ec}),ep=nz({type:nY("text"),text:o7(),annotations:U.optional(),_meta:nJ(o7(),nE()).optional()}),eu=nz({type:nY("image"),data:D,mimeType:o7(),annotations:U.optional(),_meta:nJ(o7(),nE()).optional()}),em=nz({type:nY("audio"),data:D,mimeType:o7(),annotations:U.optional(),_meta:nJ(o7(),nE()).optional()}),ef=nz({type:nY("tool_use"),name:o7(),id:o7(),input:nJ(o7(),nE()),_meta:nJ(o7(),nE()).optional()}),eh=nz({type:nY("resource"),resource:nL([z,F]),annotations:U.optional(),_meta:nJ(o7(),nE()).optional()}),e_=nz({role:L,content:eg=nL([ep,eu,em,ey=H.extend({type:nY("resource_link")}),eh])}),ev=m.extend({description:o7().optional(),messages:nM(e_)}),eb=u.extend({method:nY("notifications/prompts/list_changed"),params:p.optional()}),e$=nz({title:o7().optional(),readOnlyHint:nI().optional(),destructiveHint:nI().optional(),idempotentHint:nI().optional(),openWorldHint:nI().optional()}),eS=nz({taskSupport:nQ(["required","optional","forbidden"]).optional()}),ek=nz({...b.shape,...v.shape,description:o7().optional(),inputSchema:nz({type:nY("object"),properties:nJ(o7(),e).optional(),required:nM(o7()).optional()}).catchall(nE()),outputSchema:nz({type:nY("object"),properties:nJ(o7(),e).optional(),required:nM(o7()).optional()}).catchall(nE()).optional(),annotations:e$.optional(),execution:eS.optional(),_meta:nJ(o7(),nE()).optional()}),ew=W.extend({method:nY("tools/list")}),eV=M.extend({tools:nM(ek)}),eP=m.extend({content:nM(eg),structuredContent:nJ(o7(),nE()).optional(),isError:nI().optional()}),eR=c.extend({name:o7(),arguments:nJ(o7(),nE()).optional()}),eq=l.extend({method:nY("tools/call"),params:eR}),eI=u.extend({method:nY("notifications/tools/list_changed"),params:p.optional()}),ex=nQ(["debug","info","notice","warning","error","critical","alert","emergency"]),ej=d.extend({level:ex}),eC=l.extend({method:nY("logging/setLevel"),params:ej}),eT=p.extend({level:ex,logger:o7().optional(),data:nE()}),eO=u.extend({method:nY("notifications/message"),params:eT}),eE=nz({name:o7().optional()}),eA=nz({hints:nM(eE).optional(),costPriority:nV().min(0).max(1).optional(),speedPriority:nV().min(0).max(1).optional(),intelligencePriority:nV().min(0).max(1).optional()}),eW=nz({mode:nQ(["auto","required","none"]).optional()}),eM=nz({type:nY("tool_result"),toolUseId:o7().describe("The unique identifier for the corresponding tool call."),content:nM(eg),structuredContent:nz({}).loose().optional(),isError:nI().optional(),_meta:nJ(o7(),nE()).optional()}),eN=nH("type",[ep,eu,em]),eD=nz({role:L,content:nL([ez=nH("type",[ep,eu,em,ef,eM]),nM(ez)]),_meta:nJ(o7(),nE()).optional()}),eF=c.extend({messages:nM(eD),modelPreferences:eA.optional(),systemPrompt:o7().optional(),includeContext:nQ(["none","thisServer","allServers"]).optional(),temperature:nV().optional(),maxTokens:nV().int(),stopSequences:nM(o7()).optional(),metadata:t.optional(),tools:nM(ek).optional(),toolChoice:eW.optional()}),eL=l.extend({method:nY("sampling/createMessage"),params:eF}),eU=m.extend({model:o7(),stopReason:n4(nQ(["endTurn","stopSequence","maxTokens"]).or(o7())),role:L,content:eN}),eH=m.extend({model:o7(),stopReason:n4(nQ(["endTurn","stopSequence","maxTokens","toolUse"]).or(o7())),role:L,content:nL([ez,nM(ez)])}),eG=nz({type:nY("boolean"),title:o7().optional(),description:o7().optional(),default:nI().optional()}),eB=nz({type:nY("string"),title:o7().optional(),description:o7().optional(),minLength:nV().optional(),maxLength:nV().optional(),format:nQ(["email","uri","date","date-time"]).optional(),default:o7().optional()}),eK=nz({type:nQ(["number","integer"]),title:o7().optional(),description:o7().optional(),minimum:nV().optional(),maximum:nV().optional(),default:nV().optional()}),eJ=nz({type:nY("string"),title:o7().optional(),description:o7().optional(),enum:nM(o7()),default:o7().optional()}),eZ=nz({type:nY("string"),title:o7().optional(),description:o7().optional(),oneOf:nM(nz({const:o7(),title:o7()})),default:o7().optional()}),eQ=nz({type:nY("string"),title:o7().optional(),description:o7().optional(),enum:nM(o7()),enumNames:nM(o7()).optional(),default:o7().optional()}),eX=nL([eJ,eZ]),eY=nz({type:nY("array"),title:o7().optional(),description:o7().optional(),minItems:nV().optional(),maxItems:nV().optional(),items:nz({type:nY("string"),enum:nM(o7())}),default:nM(o7()).optional()}),e0=nL([eY,e1=nz({type:nY("array"),title:o7().optional(),description:o7().optional(),minItems:nV().optional(),maxItems:nV().optional(),items:nz({anyOf:nM(nz({const:o7(),title:o7()}))}),default:nM(o7()).optional()})]),e2=nL([eQ,eX,e0]),e4=nL([e2,eG,eB,eK]),e6=c.extend({mode:nY("form").optional(),message:o7(),requestedSchema:nz({type:nY("object"),properties:nJ(o7(),e4),required:nM(o7()).optional()}).catchall(nE())}),e9=nL([e6,e3=c.extend({mode:nY("url"),message:o7(),elicitationId:o7(),url:o7().url()})]),e5=l.extend({method:nY("elicitation/create"),params:e9}),e8=p.extend({elicitationId:o7()}),e7=u.extend({method:nY("notifications/elicitation/complete"),params:e8}),te=m.extend({action:nQ(["accept","decline","cancel"]),content:ad(e=>null===e?void 0:e,nJ(o7(),nL([o7(),nV(),nI(),nM(o7())])).optional())}),tt=nz({type:nY("ref/resource"),uri:o7()}),tr=nz({type:nY("ref/prompt"),name:o7()}),ti=d.extend({ref:nL([tr,tt]),argument:nz({name:o7(),value:o7()}),context:nz({arguments:nJ(o7(),o7()).optional()}).optional()}),to=l.extend({method:nY("completion/complete"),params:ti}),tn=m.extend({completion:nD({values:nM(o7()).max(100),total:n4(nV().int()),hasMore:n4(nI())})}),ta=nz({uri:o7().startsWith("file://"),name:o7().optional(),_meta:nJ(o7(),nE()).optional()}),ts=l.extend({method:nY("roots/list"),params:d.optional()}),td=m.extend({roots:nM(ta)}),tc=u.extend({method:nY("notifications/roots/list_changed"),params:p.optional()}),tl=nD({ttl:nV().optional(),pollInterval:nV().optional()}),tp=nQ(["working","input_required","completed","failed","cancelled"]),tu=nz({taskId:o7(),status:tp,ttl:nL([nV(),nj()]),createdAt:o7(),lastUpdatedAt:o7(),pollInterval:n4(nV()),statusMessage:n4(o7())}),tm=m.extend({task:tu}),tf=p.merge(tu),th=u.extend({method:nY("notifications/tasks/status"),params:tf}),ty=l.extend({method:nY("tasks/get"),params:d.extend({taskId:o7()})}),tg=m.merge(tu),t_=l.extend({method:nY("tasks/result"),params:d.extend({taskId:o7()})}),tv=m.loose(),tb=W.extend({method:nY("tasks/list")}),t$=M.extend({tasks:nM(tu)}),tS=l.extend({method:nY("tasks/cancel"),params:d.extend({taskId:o7()})}),{JSONValueSchema:e,JSONObjectSchema:t,ProgressTokenSchema:i,CursorSchema:o,TaskMetadataSchema:n,RelatedTaskMetadataSchema:a,RequestMetaSchema:s,BaseRequestParamsSchema:d,TaskAugmentedRequestParamsSchema:c,RequestSchema:l,NotificationsParamsSchema:p,NotificationSchema:u,ResultSchema:m,RequestIdSchema:f,EmptyResultSchema:h,CancelledNotificationParamsSchema:y,CancelledNotificationSchema:g,IconSchema:_,IconsSchema:v,BaseMetadataSchema:b,ImplementationSchema:$,ClientTasksCapabilitySchema:w,ServerTasksCapabilitySchema:V,ClientCapabilitiesSchema:P,InitializeRequestParamsSchema:R,InitializeRequestSchema:q,ServerCapabilitiesSchema:I,InitializeResultSchema:x,InitializedNotificationSchema:j,PingRequestSchema:C,ProgressSchema:T,ProgressNotificationParamsSchema:O,ProgressNotificationSchema:E,PaginatedRequestParamsSchema:A,PaginatedRequestSchema:W,PaginatedResultSchema:M,ResourceContentsSchema:N,TextResourceContentsSchema:z,BlobResourceContentsSchema:F,RoleSchema:L,AnnotationsSchema:U,ResourceSchema:H,ResourceTemplateSchema:G,ListResourcesRequestSchema:B,ListResourcesResultSchema:K,ListResourceTemplatesRequestSchema:J,ListResourceTemplatesResultSchema:Z,ResourceRequestParamsSchema:Q,ReadResourceRequestParamsSchema:Q,ReadResourceRequestSchema:X,ReadResourceResultSchema:Y,ResourceListChangedNotificationSchema:ee,SubscribeRequestParamsSchema:Q,SubscribeRequestSchema:et,UnsubscribeRequestParamsSchema:Q,UnsubscribeRequestSchema:er,ResourceUpdatedNotificationParamsSchema:ei,ResourceUpdatedNotificationSchema:eo,PromptArgumentSchema:en,PromptSchema:ea,ListPromptsRequestSchema:es,ListPromptsResultSchema:ed,GetPromptRequestParamsSchema:ec,GetPromptRequestSchema:el,TextContentSchema:ep,ImageContentSchema:eu,AudioContentSchema:em,ToolUseContentSchema:ef,EmbeddedResourceSchema:eh,ResourceLinkSchema:ey,ContentBlockSchema:eg,PromptMessageSchema:e_,GetPromptResultSchema:ev,PromptListChangedNotificationSchema:eb,ToolAnnotationsSchema:e$,ToolExecutionSchema:eS,ToolSchema:ek,ListToolsRequestSchema:ew,ListToolsResultSchema:eV,CallToolResultSchema:eP,CallToolRequestParamsSchema:eR,CallToolRequestSchema:eq,ToolListChangedNotificationSchema:eI,LoggingLevelSchema:ex,SetLevelRequestParamsSchema:ej,SetLevelRequestSchema:eC,LoggingMessageNotificationParamsSchema:eT,LoggingMessageNotificationSchema:eO,ModelHintSchema:eE,ModelPreferencesSchema:eA,ToolChoiceSchema:eW,ToolResultContentSchema:eM,SamplingContentSchema:eN,SamplingMessageContentBlockSchema:ez,SamplingMessageSchema:eD,CreateMessageRequestParamsSchema:eF,CreateMessageRequestSchema:eL,CreateMessageResultSchema:eU,CreateMessageResultWithToolsSchema:eH,BooleanSchemaSchema:eG,StringSchemaSchema:eB,NumberSchemaSchema:eK,UntitledSingleSelectEnumSchemaSchema:eJ,TitledSingleSelectEnumSchemaSchema:eZ,LegacyTitledEnumSchemaSchema:eQ,SingleSelectEnumSchemaSchema:eX,UntitledMultiSelectEnumSchemaSchema:eY,TitledMultiSelectEnumSchemaSchema:e1,MultiSelectEnumSchemaSchema:e0,EnumSchemaSchema:e2,PrimitiveSchemaDefinitionSchema:e4,ElicitRequestFormParamsSchema:e6,ElicitRequestURLParamsSchema:e3,ElicitRequestParamsSchema:e9,ElicitRequestSchema:e5,ElicitationCompleteNotificationParamsSchema:e8,ElicitationCompleteNotificationSchema:e7,ElicitResultSchema:te,ResourceTemplateReferenceSchema:tt,PromptReferenceSchema:tr,CompleteRequestParamsSchema:ti,CompleteRequestSchema:to,CompleteResultSchema:tn,RootSchema:ta,ListRootsRequestSchema:ts,ListRootsResultSchema:td,RootsListChangedNotificationSchema:tc,TaskCreationParamsSchema:tl,TaskStatusSchema:tp,TaskSchema:tu,CreateTaskResultSchema:tm,TaskStatusNotificationParamsSchema:tf,TaskStatusNotificationSchema:th,GetTaskRequestSchema:ty,GetTaskResultSchema:tg,GetTaskPayloadRequestSchema:t_,GetTaskPayloadResultSchema:tv,ListTasksRequestSchema:tb,ListTasksResultSchema:t$,CancelTaskRequestSchema:tS,CancelTaskResultSchema:m.merge(tu),ClientRequestSchema:nL([C,q,to,eC,el,es,B,J,X,et,er,eq,ew,ty,t_,tb,tS]),ClientNotificationSchema:nL([g,E,j,tc,th]),ClientResultSchema:nL([h,eU,eH,te,td,tg,t$,tm]),ServerRequestSchema:nL([C,eL,e5,ts,ty,t_,tb,tS]),ServerNotificationSchema:nL([g,E,eO,eo,ee,eI,eb,th,e7]),ServerResultSchema:nL([h,x,tn,ev,ed,K,Z,Y,eP,eV,tg,t$,tm]),CallToolResultWireSchema:nE().superRefine((e,t)=>{if(!("object"!=typeof e||null===e||Array.isArray(e))&&void 0===e.content){for(let r of c$)if(r in e)return void t.addIssue({code:"custom",message:`content is required when the body carries '${r}' — another result family cannot default into an empty tools/call success`})}}).transform(cS).pipe(eP)})}function cw(e){return"object"!==e.type}let cV=new Set(["const","enum","default","examples"]),cP=new Set(["properties","patternProperties","$defs","definitions","dependentSchemas","dependencies"]);function cR(e){return void 0!==e&&!("string"==typeof e&&e.startsWith("#"))}let cq={ping:null,initialize:null,"completion/complete":null,"logging/setLevel":null,"prompts/get":null,"prompts/list":null,"resources/list":null,"resources/templates/list":null,"resources/read":null,"resources/subscribe":null,"resources/unsubscribe":null,"tools/call":null,"tools/list":null,"tasks/get":null,"tasks/result":null,"tasks/list":null,"tasks/cancel":null,"sampling/createMessage":null,"elicitation/create":null,"roots/list":null},cI={"notifications/cancelled":null,"notifications/progress":null,"notifications/initialized":null,"notifications/roots/list_changed":null,"notifications/tasks/status":null,"notifications/message":null,"notifications/resources/updated":null,"notifications/resources/list_changed":null,"notifications/tools/list_changed":null,"notifications/prompts/list_changed":null,"notifications/elicitation/complete":null},cx={ping:null,initialize:null,"completion/complete":null,"logging/setLevel":null,"prompts/get":null,"prompts/list":null,"resources/list":null,"resources/templates/list":null,"resources/read":null,"resources/subscribe":null,"resources/unsubscribe":null,"tools/call":null,"tools/list":null,"sampling/createMessage":null,"elicitation/create":null,"roots/list":null};function cj(){if(i)return i;let e=ck();return i={requestSchemas:{ping:e.PingRequestSchema,initialize:e.InitializeRequestSchema,"completion/complete":e.CompleteRequestSchema,"logging/setLevel":e.SetLevelRequestSchema,"prompts/get":e.GetPromptRequestSchema,"prompts/list":e.ListPromptsRequestSchema,"resources/list":e.ListResourcesRequestSchema,"resources/templates/list":e.ListResourceTemplatesRequestSchema,"resources/read":e.ReadResourceRequestSchema,"resources/subscribe":e.SubscribeRequestSchema,"resources/unsubscribe":e.UnsubscribeRequestSchema,"tools/call":e.CallToolRequestSchema,"tools/list":e.ListToolsRequestSchema,"tasks/get":e.GetTaskRequestSchema,"tasks/result":e.GetTaskPayloadRequestSchema,"tasks/list":e.ListTasksRequestSchema,"tasks/cancel":e.CancelTaskRequestSchema,"sampling/createMessage":e.CreateMessageRequestSchema,"elicitation/create":e.ElicitRequestSchema,"roots/list":e.ListRootsRequestSchema},notificationSchemas:{"notifications/cancelled":e.CancelledNotificationSchema,"notifications/progress":e.ProgressNotificationSchema,"notifications/initialized":e.InitializedNotificationSchema,"notifications/roots/list_changed":e.RootsListChangedNotificationSchema,"notifications/tasks/status":e.TaskStatusNotificationSchema,"notifications/message":e.LoggingMessageNotificationSchema,"notifications/resources/updated":e.ResourceUpdatedNotificationSchema,"notifications/resources/list_changed":e.ResourceListChangedNotificationSchema,"notifications/tools/list_changed":e.ToolListChangedNotificationSchema,"notifications/prompts/list_changed":e.PromptListChangedNotificationSchema,"notifications/elicitation/complete":e.ElicitationCompleteNotificationSchema},resultSchemas:{ping:e.EmptyResultSchema,initialize:e.InitializeResultSchema,"completion/complete":e.CompleteResultSchema,"logging/setLevel":e.EmptyResultSchema,"prompts/get":e.GetPromptResultSchema,"prompts/list":e.ListPromptsResultSchema,"resources/list":e.ListResourcesResultSchema,"resources/templates/list":e.ListResourceTemplatesResultSchema,"resources/read":e.ReadResourceResultSchema,"resources/subscribe":e.EmptyResultSchema,"resources/unsubscribe":e.EmptyResultSchema,"tools/call":e.CallToolResultWireSchema,"tools/list":e.ListToolsResultSchema,"sampling/createMessage":e.CreateMessageResultWithToolsSchema,"elicitation/create":e.ElicitResultSchema,"roots/list":e.ListRootsResultSchema}}}function cC(e){return Object.prototype.hasOwnProperty.call(cq,e)}function cT(e){return Object.prototype.hasOwnProperty.call(cI,e)}function cO(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)}function cE(e,t){if(void 0===e)return{ok:!1,reason:"not-in-era"};let r=e.safeParse(t);return r.success?{ok:!0,value:r.data}:{ok:!1,reason:"invalid",message:String(r.error)}}Object.keys(cq),Object.keys(cI);let cA={ok:!1,reason:"not-in-era"};function cW(e){return cO(e)&&cO(e.outputSchema)&&cw(e.outputSchema)}let cM={era:"2025-11-25",hasRequestMethod:cC,hasNotificationMethod:cT,validateRequest:(e,t)=>cE(cC(e)?cj().requestSchemas[e]:void 0,t),validateResult:(e,t)=>cE(Object.prototype.hasOwnProperty.call(cx,e)?cj().resultSchemas[e]:void 0,t),validateNotification:(e,t)=>cE(cT(e)?cj().notificationSchemas[e]:void 0,t),hasInputRequestMethod:()=>!1,validateInputRequest:()=>cA,validateInputResponse:()=>cA,samplingResultVariant:(e,t)=>{let r=ck();return cE(e?r.CreateMessageResultWithToolsSchema:r.CreateMessageResultSchema,t)},outboundEnvelope:e=>void 0,validateEnvelopeMeta:e=>[],projectCallToolResult(e,t){let r=cb(e),i=r.structuredContent;if(void 0===i)return r;let o="object"!=typeof i||null===i||Array.isArray(i),n=void 0!==t&&cw(t);return o||n?{...r,structuredContent:{result:i}}:r},decodeResult(e,t){if(cO(t)&&"resultType"in t){let e={...t};return delete e.resultType,{kind:"complete",result:e}}return{kind:"complete",result:t}},encodeResult(e,t){if("tools/list"!==e)return t;let r=t.tools;return Array.isArray(r)&&r.some(e=>cW(e))?{...t,tools:r.map(e=>cW(e)?{...e,outputSchema:function(e){var t;let r="string"==typeof e.$schema?e.$schema:void 0;if(cR(e.$id))return{...void 0!==r&&{$schema:r},type:"object",properties:{result:e},required:["result"]};let i="string"==typeof(t=e.$schema)&&ek.has(t.replace(/#$/,""))&&!0!==e.$recursiveAnchor,o=(e,t)=>{if(Array.isArray(e))return e.map(e=>o(e,!1));if(null===e||"object"!=typeof e||!t&&cR(e.$id))return e;let r={},n=!1;for(let[a,s]of Object.entries(e))t?r[a]=o(s,!1):("$ref"===a||"$dynamicRef"===a)&&"string"==typeof s?r[a]="#"===s?"#/properties/result":s.startsWith("#/")?`#/properties/result${s.slice(1)}`:s:"$recursiveRef"===a&&"#"===s&&i?n=!0:cV.has(a)?r[a]=s:cP.has(a)?r[a]=o(s,!0):r[a]=o(s,!1);return n&&("$ref"in r?r.allOf=[...Array.isArray(r.allOf)?r.allOf:[],{$ref:"#/properties/result"}]:r.$ref="#/properties/result"),r};return{...void 0!==r&&{$schema:r},type:"object",properties:{result:o(e,!1)},required:["result"]}}(e.outputSchema)}:e)}:t},encodeErrorCode:e=>-32002===e?-32602:e,checkInboundEnvelope:e=>void 0};function cN(){return o??=function(){let e=aa(()=>nL([o7(),nV(),nI(),nj(),nJ(o7(),e),nM(e)])),t=nJ(o7(),e),r=nL([o7(),nV().int()]),i=o7(),o=nL([o7(),nV().int()]),n=nQ(["user","assistant"]),a=nQ(["debug","info","notice","warning","error","critical","alert","emergency"]),s=o7().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:"Invalid Base64 string"}),d=nz({ttl:nV().optional()}),c=nz({taskId:o7()}),l=nD({progressToken:r.optional(),"io.modelcontextprotocol/related-task":c.optional()}),p=nz({_meta:l.optional()}),u=p.extend({task:d.optional()}),m=nz({_meta:l.optional()}),f=nz({method:o7(),params:m.loose().optional()}),h=nz({src:o7(),mimeType:o7().optional(),sizes:nM(o7()).optional(),theme:nQ(["light","dark"]).optional()}),y=nz({icons:nM(h).optional()}),g=nz({name:o7(),title:o7().optional()}),_=g.extend({...g.shape,...y.shape,version:o7(),websiteUrl:o7().optional(),description:o7().optional()}),v=nB(nz({applyDefaults:nI().optional()}),t),b=ad(e=>e&&"object"==typeof e&&!Array.isArray(e)&&0===Object.keys(e).length?{form:{}}:e,nB(nz({form:v.optional(),url:t.optional()}),t.optional())),$=nD({list:t.optional(),cancel:t.optional(),requests:nD({sampling:nD({createMessage:t.optional()}).optional(),elicitation:nD({create:t.optional()}).optional()}).optional()}),S=nD({list:t.optional(),cancel:t.optional(),requests:nD({tools:nD({call:t.optional()}).optional()}).optional()}),k=nz({experimental:nJ(o7(),t).optional(),sampling:nz({context:t.optional(),tools:t.optional()}).optional(),elicitation:b.optional(),roots:nz({listChanged:nI().optional()}).optional(),tasks:$.optional(),extensions:nJ(o7(),t).optional()}),w=nz({experimental:nJ(o7(),t).optional(),logging:t.optional(),completions:t.optional(),prompts:nz({listChanged:nI().optional()}).optional(),resources:nz({subscribe:nI().optional(),listChanged:nI().optional()}).optional(),tools:nz({listChanged:nI().optional()}).optional(),tasks:S.optional(),extensions:nJ(o7(),t).optional()}),V=nz({progress:nV(),total:n4(nV()),message:n4(o7())}),P=nz({...m.shape,...V.shape,progressToken:r}),R=f.extend({method:nY("notifications/progress"),params:P}),q=m.extend({level:a,logger:o7().optional(),data:nE()}),I=f.extend({method:nY("notifications/message"),params:q}),x=nz({uri:o7(),mimeType:n4(o7()),_meta:nJ(o7(),nE()).optional()}),j=x.extend({text:o7()}),C=x.extend({blob:s}),T=nz({audience:nM(n).optional(),priority:nV().min(0).max(1).optional(),lastModified:ac({offset:!0}).optional()}),O=nz({...g.shape,...y.shape,uri:o7(),description:n4(o7()),mimeType:n4(o7()),size:n4(nV()),annotations:T.optional(),_meta:n4(nD({}))}),E=nz({...g.shape,...y.shape,uriTemplate:o7(),description:n4(o7()),mimeType:n4(o7()),annotations:T.optional(),_meta:n4(nD({}))}),A=f.extend({method:nY("notifications/resources/list_changed"),params:m.optional()}),W=m.extend({uri:o7()}),M=f.extend({method:nY("notifications/resources/updated"),params:W}),N=nz({name:o7(),description:n4(o7()),required:n4(nI())}),z=nz({...g.shape,...y.shape,description:n4(o7()),arguments:n4(nM(N)),_meta:n4(nD({}))}),D=f.extend({method:nY("notifications/prompts/list_changed"),params:m.optional()}),F=nz({type:nY("text"),text:o7(),annotations:T.optional(),_meta:nJ(o7(),nE()).optional()}),L=nz({type:nY("image"),data:s,mimeType:o7(),annotations:T.optional(),_meta:nJ(o7(),nE()).optional()}),U=nz({type:nY("audio"),data:s,mimeType:o7(),annotations:T.optional(),_meta:nJ(o7(),nE()).optional()}),H=nz({type:nY("tool_use"),name:o7(),id:o7(),input:nJ(o7(),nE()),_meta:nJ(o7(),nE()).optional()}),G=nz({type:nY("resource"),resource:nL([j,C]),annotations:T.optional(),_meta:nJ(o7(),nE()).optional()}),B=O.extend({type:nY("resource_link")}),K=nL([F,L,U,B,G]),J=nz({role:n,content:K}),Z=nz({title:o7().optional(),readOnlyHint:nI().optional(),destructiveHint:nI().optional(),idempotentHint:nI().optional(),openWorldHint:nI().optional()}),Q=f.extend({method:nY("notifications/tools/list_changed"),params:m.optional()}),X=nz({name:o7().optional()}),Y=nz({hints:nM(X).optional(),costPriority:nV().min(0).max(1).optional(),speedPriority:nV().min(0).max(1).optional(),intelligencePriority:nV().min(0).max(1).optional()}),ee=nz({mode:nQ(["auto","required","none"]).optional()}),et=nz({type:nY("boolean"),title:o7().optional(),description:o7().optional(),default:nI().optional()}),er=nz({type:nY("string"),title:o7().optional(),description:o7().optional(),minLength:nV().optional(),maxLength:nV().optional(),format:nQ(["email","uri","date","date-time"]).optional(),default:o7().optional()}),ei=nz({type:nQ(["number","integer"]),title:o7().optional(),description:o7().optional(),minimum:nV().optional(),maximum:nV().optional(),default:nV().optional()}),eo=nz({type:nY("string"),title:o7().optional(),description:o7().optional(),enum:nM(o7()),default:o7().optional()}),en=nz({type:nY("string"),title:o7().optional(),description:o7().optional(),oneOf:nM(nz({const:o7(),title:o7()})),default:o7().optional()}),ea=nz({type:nY("string"),title:o7().optional(),description:o7().optional(),enum:nM(o7()),enumNames:nM(o7()).optional(),default:o7().optional()}),es=nL([eo,en]),ed=nz({type:nY("array"),title:o7().optional(),description:o7().optional(),minItems:nV().optional(),maxItems:nV().optional(),items:nz({type:nY("string"),enum:nM(o7())}),default:nM(o7()).optional()}),ec=nz({type:nY("array"),title:o7().optional(),description:o7().optional(),minItems:nV().optional(),maxItems:nV().optional(),items:nz({anyOf:nM(nz({const:o7(),title:o7()}))}),default:nM(o7()).optional()}),el=nL([ed,ec]),ep=nL([ea,es,el]),eu=nL([ep,et,er,ei]),em=u.extend({mode:nY("form").optional(),message:o7(),requestedSchema:nz({type:nY("object"),properties:nJ(o7(),eu),required:nM(o7()).optional()}).catchall(nE())}),ef=nz({type:nY("ref/resource"),uri:o7()}),eh=nz({type:nY("ref/prompt"),name:o7()}),ey=nz({uri:o7().startsWith("file://"),name:o7().optional(),_meta:nJ(o7(),nE()).optional()}),eg=k.shape,e_=nz({experimental:eg.experimental,sampling:eg.sampling,elicitation:eg.elicitation,roots:eg.roots,extensions:eg.extensions}),ev=w.shape,eb=nz({experimental:ev.experimental,logging:ev.logging,completions:ev.completions,prompts:ev.prompts,resources:ev.resources,tools:ev.tools,extensions:ev.extensions}),e$=nD({progressToken:r.optional(),[au]:o7(),[am]:_.optional(),[ah]:e_,[ay]:a.optional()}),eS=nz({...g.shape,...y.shape,description:o7().optional(),inputSchema:nD({$schema:o7().optional(),type:nY("object")}),outputSchema:nD({$schema:o7().optional()}).optional(),annotations:Z.optional(),_meta:nJ(o7(),nE()).optional()}),ek=nz({type:nY("tool_result"),toolUseId:o7(),content:nM(K),structuredContent:nE().optional(),isError:nI().optional(),_meta:nJ(o7(),nE()).optional()}),ew=nL([F,L,U,H,ek]),eV=nz({role:n,content:nL([ew,nM(ew)]),_meta:nJ(o7(),nE()).optional()}),eP=o7(),eR=nD({[af]:_.optional().catch(void 0)}),eq=eR.optional();function eI(e){return nD({_meta:eq,resultType:eP.default("complete"),...e})}let ex=eI({}),ej=eI({nextCursor:i.optional()}),eC=eI({content:nM(K),structuredContent:nE().optional(),isError:nI().optional()}),eT=eI({ttlMs:nV().int().min(0),cacheScope:nQ(["public","private"]),tools:nM(eS),nextCursor:i.optional()}),eO=eI({ttlMs:nV().int().min(0),cacheScope:nQ(["public","private"]),prompts:nM(z),nextCursor:i.optional()}),eE=eI({description:o7().optional(),messages:nM(J)}),eA=eI({ttlMs:nV().int().min(0),cacheScope:nQ(["public","private"]),resources:nM(O),nextCursor:i.optional()}),eW=eI({ttlMs:nV().int().min(0),cacheScope:nQ(["public","private"]),resourceTemplates:nM(E),nextCursor:i.optional()}),eM=eI({ttlMs:nV().int().min(0),cacheScope:nQ(["public","private"]),contents:nM(nL([j,C]))}),eN=eI({completion:nz({values:nM(o7()).max(100),total:nV().int().optional(),hasMore:nI().optional()}).loose()}),ez=eI({ttlMs:nV().int().min(0),cacheScope:nQ(["public","private"])}),eD=eI({ttlMs:nV().int().min(0).catch(0),cacheScope:nQ(["public","private"]).catch("private"),supportedVersions:nM(o7()),capabilities:eb,instructions:o7().optional()}),eF=nz({messages:nM(eV),modelPreferences:Y.optional(),systemPrompt:o7().optional(),includeContext:nQ(["none","thisServer","allServers"]).optional(),temperature:nV().optional(),maxTokens:nV().int(),stopSequences:nM(o7()).optional(),metadata:t.optional(),tools:nM(eS).optional(),toolChoice:ee.optional()}),eL=nz({method:nY("sampling/createMessage"),params:eF}),eU=nz({method:nY("roots/list"),params:nz({_meta:nJ(o7(),nE()).optional()}).optional()}),eH=nz({...eV.shape,model:o7(),stopReason:o7().optional()}),eG=nz({roots:nM(ey)}),eB=nz({action:nQ(["accept","decline","cancel"]),content:nJ(o7(),nL([o7(),nV(),nI(),nM(o7())])).optional()}),eK=nz({mode:nY("url"),message:o7(),url:o7().url()}),eJ=nL([em,eK]),eZ=nz({method:nY("elicitation/create"),params:eJ}),eQ=nL([eL,eU,eZ]),eX=nL([eH,eG,eB]),eY=nJ(o7(),eQ),e1=nJ(o7(),eX),e0=eI({inputRequests:eY.optional(),requestState:o7().optional()}),e2={inputResponses:e1.optional(),requestState:o7().optional()},e4=nz({_meta:e$,...e2}),e6=nD({progressToken:r.optional()});function e3(e,t){return nz({method:nY(e),params:nz({_meta:e$,...t})})}function e9(e,t){return nz({method:nY(e),params:nz({_meta:e6.optional(),...t}).optional()})}let e5={name:o7(),arguments:nJ(o7(),nE()).optional(),...e2},e8={cursor:i.optional()},e7=e3("tools/call",e5),te=e3("tools/list",e8),tt=e3("prompts/list",e8),tr=e3("prompts/get",{name:o7(),arguments:nJ(o7(),o7()).optional(),...e2}),ti=e3("resources/list",e8),to=e3("resources/templates/list",e8),tn=e3("resources/read",{uri:o7(),...e2}),ta={ref:nL([eh,ef]),argument:nz({name:o7(),value:o7()}),context:nz({arguments:nJ(o7(),o7()).optional()}).optional()},ts=e3("completion/complete",ta),td=e3("server/discover",{}),tc=nz({toolsListChanged:nI().optional(),promptsListChanged:nI().optional(),resourcesListChanged:nI().optional(),resourceSubscriptions:nM(o7()).optional()}),tl={notifications:tc},tp=e3("subscriptions/listen",tl),tu=eR.extend({"io.modelcontextprotocol/subscriptionId":o}),tm=nD({_meta:tu,resultType:eP.default("complete")}),tf={"tools/call":e9("tools/call",e5),"tools/list":e9("tools/list",e8),"prompts/get":e9("prompts/get",{name:o7(),arguments:nJ(o7(),o7()).optional()}),"prompts/list":e9("prompts/list",e8),"resources/list":e9("resources/list",e8),"resources/templates/list":e9("resources/templates/list",e8),"resources/read":e9("resources/read",{uri:o7()}),"completion/complete":e9("completion/complete",ta),"server/discover":e9("server/discover",{}),"subscriptions/listen":e9("subscriptions/listen",tl)};function th(e){return nD({_meta:eq,...e})}let ty={"tools/call":th({content:nM(K),structuredContent:nE().optional(),isError:nI().optional()}),"tools/list":th({ttlMs:nV().int().min(0),cacheScope:nQ(["public","private"]),tools:nM(eS),nextCursor:i.optional()}),"prompts/get":th({description:o7().optional(),messages:nM(J)}),"prompts/list":th({ttlMs:nV().int().min(0),cacheScope:nQ(["public","private"]),prompts:nM(z),nextCursor:i.optional()}),"resources/list":th({ttlMs:nV().int().min(0),cacheScope:nQ(["public","private"]),resources:nM(O),nextCursor:i.optional()}),"resources/templates/list":th({ttlMs:nV().int().min(0),cacheScope:nQ(["public","private"]),resourceTemplates:nM(E),nextCursor:i.optional()}),"resources/read":th({ttlMs:nV().int().min(0),cacheScope:nQ(["public","private"]),contents:nM(nL([j,C]))}),"completion/complete":th({completion:nz({values:nM(o7()).max(100),total:nV().int().optional(),hasMore:nI().optional()}).loose()}),"server/discover":th({ttlMs:nV().int().min(0).catch(0),cacheScope:nQ(["public","private"]).catch("private"),supportedVersions:nM(o7()),capabilities:eb,instructions:o7().optional()}),"subscriptions/listen":th({})},tg=nD({"io.modelcontextprotocol/subscriptionId":o.optional()}),t_=nz({method:nY("notifications/subscriptions/acknowledged"),params:nz({_meta:tg.optional(),notifications:tc})}),tv=nz({_meta:tg.optional(),requestId:o,reason:o7().optional()}),tb=nz({method:nY("notifications/cancelled"),params:tv}),t$=e=>nz({jsonrpc:nY("2.0"),id:nL([o7(),nV().int()]),result:e}).strict();return{JSONValueSchema:e,JSONObjectSchema:t,ProgressTokenSchema:r,CursorSchema:i,RequestIdSchema:o,RoleSchema:n,LoggingLevelSchema:a,TaskMetadataSchema:d,RelatedTaskMetadataSchema:c,RequestMetaSchema:l,BaseRequestParamsSchema:p,TaskAugmentedRequestParamsSchema:u,NotificationsParamsSchema:m,NotificationSchema:f,IconSchema:h,IconsSchema:y,BaseMetadataSchema:g,ImplementationSchema:_,ClientTasksCapabilitySchema:$,ServerTasksCapabilitySchema:S,ClientCapabilitiesSchema:k,ServerCapabilitiesSchema:w,ProgressSchema:V,ProgressNotificationParamsSchema:P,ProgressNotificationSchema:R,LoggingMessageNotificationParamsSchema:q,LoggingMessageNotificationSchema:I,ResourceContentsSchema:x,TextResourceContentsSchema:j,BlobResourceContentsSchema:C,AnnotationsSchema:T,ResourceSchema:O,ResourceTemplateSchema:E,ResourceListChangedNotificationSchema:A,ResourceUpdatedNotificationParamsSchema:W,ResourceUpdatedNotificationSchema:M,PromptArgumentSchema:N,PromptSchema:z,PromptListChangedNotificationSchema:D,TextContentSchema:F,ImageContentSchema:L,AudioContentSchema:U,ToolUseContentSchema:H,EmbeddedResourceSchema:G,ResourceLinkSchema:B,ContentBlockSchema:K,PromptMessageSchema:J,ToolAnnotationsSchema:Z,ToolListChangedNotificationSchema:Q,ModelHintSchema:X,ModelPreferencesSchema:Y,ToolChoiceSchema:ee,BooleanSchemaSchema:et,StringSchemaSchema:er,NumberSchemaSchema:ei,UntitledSingleSelectEnumSchemaSchema:eo,TitledSingleSelectEnumSchemaSchema:en,LegacyTitledEnumSchemaSchema:ea,SingleSelectEnumSchemaSchema:es,UntitledMultiSelectEnumSchemaSchema:ed,TitledMultiSelectEnumSchemaSchema:ec,MultiSelectEnumSchemaSchema:el,EnumSchemaSchema:ep,PrimitiveSchemaDefinitionSchema:eu,ElicitRequestFormParamsSchema:em,ResourceTemplateReferenceSchema:ef,PromptReferenceSchema:eh,RootSchema:ey,ClientCapabilities2026Schema:e_,ServerCapabilities2026Schema:eb,RequestMetaEnvelopeSchema:e$,ToolSchema:eS,ToolResultContentSchema:ek,SamplingMessageContentBlockSchema:ew,SamplingMessageSchema:eV,ResultTypeSchema:eP,ResultMetaSchema:eR,ResultSchema:ex,PaginatedResultSchema:ej,CallToolResultSchema:eC,ListToolsResultSchema:eT,ListPromptsResultSchema:eO,GetPromptResultSchema:eE,ListResourcesResultSchema:eA,ListResourceTemplatesResultSchema:eW,ReadResourceResultSchema:eM,CompleteResultSchema:eN,CacheableResultSchema:ez,DiscoverResultSchema:eD,CreateMessageRequestParamsSchema:eF,CreateMessageRequestSchema:eL,ListRootsRequestSchema:eU,CreateMessageResultSchema:eH,ListRootsResultSchema:eG,ElicitResultSchema:eB,ElicitRequestURLParamsSchema:eK,ElicitRequestParamsSchema:eJ,ElicitRequestSchema:eZ,InputRequestSchema:eQ,InputResponseSchema:eX,InputRequestsSchema:eY,InputResponsesSchema:e1,InputRequiredResultSchema:e0,InputResponseRequestParamsSchema:e4,CallToolRequestSchema:e7,ListToolsRequestSchema:te,ListPromptsRequestSchema:tt,GetPromptRequestSchema:tr,ListResourcesRequestSchema:ti,ListResourceTemplatesRequestSchema:to,ReadResourceRequestSchema:tn,CompleteRequestSchema:ts,DiscoverRequestSchema:td,SubscriptionFilterSchema:tc,SubscriptionsListenRequestSchema:tp,SubscriptionsListenResultMetaSchema:tu,SubscriptionsListenResultSchema:tm,dispatchRequestSchemas:tf,dispatchResultSchemas:ty,NotificationMetaSchema:tg,SubscriptionsAcknowledgedNotificationSchema:t_,CancelledNotificationParamsSchema:tv,CancelledNotificationSchema:tb,notificationSchemas2026:{"notifications/cancelled":tb,"notifications/progress":R,"notifications/message":I,"notifications/resources/updated":M,"notifications/resources/list_changed":A,"notifications/tools/list_changed":Q,"notifications/prompts/list_changed":D,"notifications/subscriptions/acknowledged":t_},JSONRPCResultResponseSchema:t$(ex),CallToolResultResponseSchema:t$(nL([eC,e0])),ListToolsResultResponseSchema:t$(eT),ListPromptsResultResponseSchema:t$(eO),GetPromptResultResponseSchema:t$(nL([eE,e0])),ListResourcesResultResponseSchema:t$(eA),ListResourceTemplatesResultResponseSchema:t$(eW),ReadResourceResultResponseSchema:t$(nL([eM,e0])),CompleteResultResponseSchema:t$(eN),DiscoverResultResponseSchema:t$(eD),SubscriptionsListenResultResponseSchema:t$(tm)}}()}let cz=["tools/list","prompts/list","resources/list","resources/templates/list","resources/read","server/discover"],cD=Symbol("modelcontextprotocol.resultCacheHintFallback");function cF(e,t){if(void 0===t)return e;let r=e[cD];if(void 0===r)return{...e,[cD]:t};let i={},o=r.ttlMs??t.ttlMs;void 0!==o&&(i.ttlMs=o);let n=r.cacheScope??t.cacheScope;return void 0!==n&&(i.cacheScope=n),{...e,[cD]:i}}function cL(e){return"number"==typeof e&&Number.isSafeInteger(e)&&e>=0}function cU(e){return"public"===e||"private"===e}function cH(e,t){if(void 0!==e.ttlMs&&!cL(e.ttlMs))throw RangeError(`Invalid cache hint for ${t}: ttlMs must be a non-negative safe integer (got ${String(e.ttlMs)})`);if(void 0!==e.cacheScope&&!cU(e.cacheScope))throw RangeError(`Invalid cache hint for ${t}: cacheScope must be 'public' or 'private' (got ${String(e.cacheScope)})`)}let cG=((Z={})[Z.ParseError=-32700]="ParseError",Z[Z.InvalidRequest=-32600]="InvalidRequest",Z[Z.MethodNotFound=-32601]="MethodNotFound",Z[Z.InvalidParams=-32602]="InvalidParams",Z[Z.InternalError=-32603]="InternalError",Z[Z.ResourceNotFound=-32002]="ResourceNotFound",Z[Z.MissingRequiredClientCapability=-32021]="MissingRequiredClientCapability",Z[Z.UnsupportedProtocolVersion=-32022]="UnsupportedProtocolVersion",Z[Z.UrlElicitationRequired=-32042]="UrlElicitationRequired",Z);var cB=class e extends Error{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.ProtocolError"})}static[Symbol.hasInstance](e){return cl(this,e)}static isInstance(e){if("function"!=typeof this)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return cl(this,e)}constructor(e,t,r){super(t),this.code=e,this.data=r,this.name="ProtocolError",cc(this,new.target)}static fromError(t,r,i){return t===cG.UrlElicitationRequired&&i&&i.elicitations?new cJ(i.elicitations,r):t===cG.UnsupportedProtocolVersion&&i&&Array.isArray(i.supported)&&"string"==typeof i.requested?new cZ({supported:i.supported,requested:i.requested},r):(t===cG.InvalidParams||t===cG.ResourceNotFound)&&"string"==typeof i?.uri&&(t===cG.ResourceNotFound||1===Object.keys(i).length)?new cK(i.uri,r):t===cG.MissingRequiredClientCapability&&i&&null!==i.requiredCapabilities&&"object"==typeof i.requiredCapabilities&&!Array.isArray(i.requiredCapabilities)?new cQ({requiredCapabilities:i.requiredCapabilities},r):new e(t,r,i)}},cK=class extends cB{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.ResourceNotFoundError"})}constructor(e,t=`Resource not found: ${e}`){super(cG.InvalidParams,t,{uri:e})}get uri(){return this.data.uri}},cJ=class extends cB{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.UrlElicitationRequiredError"})}constructor(e,t=`URL elicitation${e.length>1?"s":""} required`){super(cG.UrlElicitationRequired,t,{elicitations:e})}get elicitations(){return this.data?.elicitations??[]}},cZ=class extends cB{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.UnsupportedProtocolVersionError"})}constructor(e,t=`Unsupported protocol version: ${e.requested}`){super(cG.UnsupportedProtocolVersion,t,e)}get supported(){return this.data.supported}get requested(){return this.data.requested}},cQ=class extends cB{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.MissingRequiredClientCapabilityError"})}constructor(e,t=`Missing required client capabilities: ${Object.keys(e.requiredCapabilities).join(", ")}`){super(cG.MissingRequiredClientCapability,t,e)}get requiredCapabilities(){return this.data.requiredCapabilities}};let cX=["tools/call","prompts/get","resources/read"],cY=["elicitation/create","sampling/createMessage","roots/list"];function c1(){if(n)return n;let e=cN();return n={request:{"elicitation/create":nz({method:nY("elicitation/create"),params:e.ElicitRequestParamsSchema}),"sampling/createMessage":nz({method:nY("sampling/createMessage"),params:e.CreateMessageRequestParamsSchema}),"roots/list":nz({method:nY("roots/list"),params:nD({}).optional()})},response:{"elicitation/create":e.ElicitResultSchema,"sampling/createMessage":e.CreateMessageResultSchema,"roots/list":e.ListRootsResultSchema}}}function c0(e){return cY.includes(e)}function c2(e){return c0(e)?c1().request[e]:void 0}let c4={"tools/call":null,"tools/list":null,"prompts/get":null,"prompts/list":null,"resources/list":null,"resources/templates/list":null,"resources/read":null,"completion/complete":null,"server/discover":null,"subscriptions/listen":null},c6={"notifications/cancelled":null,"notifications/progress":null,"notifications/message":null,"notifications/resources/updated":null,"notifications/resources/list_changed":null,"notifications/tools/list_changed":null,"notifications/prompts/list_changed":null,"notifications/subscriptions/acknowledged":null};function c3(e){return Object.prototype.hasOwnProperty.call(c4,e)}function c9(e){return Object.prototype.hasOwnProperty.call(c6,e)}function c5(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)}function c8(e,t){if(void 0===e)return{ok:!1,reason:"not-in-era"};let r=e.safeParse(t);return r.success?{ok:!0,value:r.data}:{ok:!1,reason:"invalid",message:String(r.error)}}Object.keys(c4),Object.keys(c6);let c7={ok:!1,reason:"not-in-era"},le=[au,ah],lt={era:"2026-07-28",hasRequestMethod:c3,hasNotificationMethod:c9,hasInputRequestMethod:e=>void 0!==c2(e),validateRequest:(e,t)=>c8(c3(e)?cN().dispatchRequestSchemas[e]:void 0,t),validateResult:(e,t)=>c8(Object.prototype.hasOwnProperty.call(c4,e)?cN().dispatchResultSchemas[e]:void 0,t),validateNotification:(e,t)=>c8(c9(e)?cN().notificationSchemas2026[e]:void 0,t),validateInputRequest:(e,t)=>c8(c2(e),t),validateInputResponse:(e,t)=>c8(c0(e)?c1().response[e]:void 0,t),samplingResultVariant:()=>c7,outboundEnvelope:e=>({[au]:e.protocolVersion,[am]:e.clientInfo,[ah]:e.clientCapabilities,...void 0!==e.logLevel&&{[ay]:e.logLevel}}),validateEnvelopeMeta(e){let t=[];for(let r of le)r in e||t.push({key:r,problem:"missing"});let r=cN().RequestMetaEnvelopeSchema.safeParse(e);if(!r.success)for(let e of r.error.issues){let r=e.path.map(String),i=r.length>0?r.join("."):"_meta";1===r.length&&t.some(e=>e.key===i&&"missing"===e.problem)||t.push({key:i,problem:e.message})}return t},projectCallToolResult:e=>cb(e),inputRequestSchema:c2,decodeResult(e,t){if(!c5(t))return{kind:"invalid",error:new cf(cm.InvalidResult,`Invalid result for ${e}: not an object`,{method:e})};let r=t.resultType;if(void 0===r)return{kind:"invalid",error:new cf(cm.InvalidResult,`Invalid result for ${e}: missing required resultType — servers implementing protocol revision 2026-07-28 MUST include it (the absent-means-complete bridge applies only to earlier-revision servers)`,{method:e,violation:"missing-resultType"})};if("string"!=typeof r)return{kind:"invalid",error:new cf(cm.InvalidResult,`Invalid result for ${e}: non-string resultType`,{method:e,resultType:r})};if("input_required"===r){let r=t.inputRequests,i=c5(r)?r:{},o=t.requestState,n=void 0===t._meta?void 0:cN().ResultMetaSchema.safeParse(t._meta),a=n?.success?n.data:void 0;return 0===Object.keys(i).length&&"string"!=typeof o?{kind:"invalid",error:new cf(cm.InvalidResult,`Invalid result for ${e}: input_required carries neither inputRequests nor requestState (every input_required result must include at least one of the two)`,{method:e,violation:"input-required-missing-both"})}:{kind:"input_required",inputRequests:i,..."string"==typeof o&&{requestState:o},...void 0!==a&&{_meta:a}}}if("complete"!==r)return{kind:"invalid",error:new cf(cm.UnsupportedResultType,`Unsupported result type '${r}' for ${e}`,{resultType:r,method:e})};let i=function(){if(a)return a;let e=cN();return a={"tools/call":e.CallToolResultSchema,"tools/list":e.ListToolsResultSchema,"prompts/get":e.GetPromptResultSchema,"prompts/list":e.ListPromptsResultSchema,"resources/list":e.ListResourcesResultSchema,"resources/templates/list":e.ListResourceTemplatesResultSchema,"resources/read":e.ReadResourceResultSchema,"completion/complete":e.CompleteResultSchema,"server/discover":e.DiscoverResultSchema}}(),o=Object.hasOwn(i,e)?i[e]:void 0;if(void 0!==o){let r=o.safeParse(t);if(!r.success)return{kind:"invalid",error:new cf(cm.InvalidResult,`Invalid result for ${e}: ${r.error}`,{method:e})}}let n={...t};return delete n.resultType,{kind:"complete",result:n}},encodeResult:(e,t,r)=>(function(e,t){if(void 0===t)return e;let r=e._meta;return void 0===r?{...e,_meta:{[af]:t}}:null===r||"object"!=typeof r||Array.isArray(r)||void 0!==r[af]?e:{...e,_meta:{...r,[af]:t}}})(function(e,t){var r,i;let o=t[cD];if("complete"!==t.resultType||!cz.includes(e)){let e;return void 0===o?t:(e={...t},delete e[cD],e)}let n=cL(t.ttlMs)?t.ttlMs:void 0!==(r=o)&&cL(r.ttlMs)?r.ttlMs:0,a=cU(t.cacheScope)?t.cacheScope:void 0!==(i=o)&&cU(i.cacheScope)?i.cacheScope:"private",s={...t,ttlMs:n,cacheScope:a};return delete s[cD],s}(e,function(e,t){let r=t.resultType;if(void 0===r)return{...t,resultType:"complete"};if("complete"===r||cX.includes(e))return t;throw new cB(cG.InternalError,`Handler for ${e} returned resultType '${String(r)}', but results of ${e} only support 'complete' on protocol revision 2026-07-28`)}(e,function(e,t){let r=t,i=!1,o=()=>(i||(r={...r},i=!0),r),n=t.tools;"tools/list"===e&&Array.isArray(n)&&n.some(e=>c5(e)&&"execution"in e)&&(o().tools=n.map(e=>{if(!c5(e)||!("execution"in e))return e;let t={...e};return delete t.execution,t}));let a=t.capabilities;if(c5(a)&&"tasks"in a){let e={...a};delete e.tasks,o().capabilities=e}return r}(e,t))),r),encodeErrorCode:e=>-32002===e?-32602:e,checkInboundEnvelope(e){if(void 0===e.envelope)return"Request is missing the required _meta envelope for protocol revision 2026-07-28 (io.modelcontextprotocol/protocolVersion, io.modelcontextprotocol/clientCapabilities)";let t=cN().RequestMetaEnvelopeSchema.safeParse(e.envelope);if(!t.success)return`Invalid _meta envelope for protocol revision 2026-07-28: ${t.error.issues.map(e=>e.message).join("; ")}`}},lr="2026-07-28";function li(e){return void 0!==e&&e>=cg?lt:cM}function lo(e){return void 0!==e.revision?li(e.revision).era:"modern"===e.era?lt.era:cM.era}function ln(e){return ld.some(t=>t.hasRequestMethod(e))}function la(e){return ld.some(t=>t.hasNotificationMethod(e))}function ls(e){return"tasks/get"===e||"tasks/cancel"===e}let ld=[cM,lt];var lc=(e=>{let t={};for(var r in e)eh(t,r,{get:e[r],enumerable:!0});return t})({AnnotationsSchema:()=>sa,AudioContentSchema:()=>sA,BaseMetadataSchema:()=>aU,BaseRequestParamsSchema:()=>aV,BlobResourceContentsSchema:()=>so,BooleanSchemaSchema:()=>dd,CallToolRequestParamsSchema:()=>sQ,CallToolRequestSchema:()=>sX,CallToolResultSchema:()=>sJ,CancelTaskRequestSchema:()=>dK,CancelTaskResultSchema:()=>dJ,CancelledNotificationParamsSchema:()=>az,CancelledNotificationSchema:()=>aD,ClientCapabilitiesSchema:()=>aZ,ClientNotificationSchema:()=>dQ,ClientRequestSchema:()=>dZ,ClientResultSchema:()=>dX,ClientTasksCapabilitySchema:()=>aK,CompatibilityCallToolResultSchema:()=>sZ,CompleteRequestParamsSchema:()=>dI,CompleteRequestSchema:()=>dx,CompleteResultSchema:()=>dj,ContentBlockSchema:()=>sz,CreateMessageRequestParamsSchema:()=>di,CreateMessageRequestSchema:()=>dn,CreateMessageResultSchema:()=>da,CreateMessageResultWithToolsSchema:()=>ds,CreateTaskResultSchema:()=>dN,CursorSchema:()=>a$,DiscoverRequestSchema:()=>a2,DiscoverResultSchema:()=>a4,ElicitRequestFormParamsSchema:()=>db,ElicitRequestParamsSchema:()=>dS,ElicitRequestSchema:()=>dk,ElicitRequestURLParamsSchema:()=>d$,ElicitResultSchema:()=>dP,ElicitationCompleteNotificationParamsSchema:()=>dw,ElicitationCompleteNotificationSchema:()=>dV,EmbeddedResourceSchema:()=>sM,EmptyResultSchema:()=>aN,EnumSchemaSchema:()=>d_,GetPromptRequestParamsSchema:()=>sC,GetPromptRequestSchema:()=>sT,GetPromptResultSchema:()=>sF,GetTaskPayloadRequestSchema:()=>dU,GetTaskPayloadResultSchema:()=>dH,GetTaskRequestSchema:()=>dF,GetTaskResultSchema:()=>dL,IconSchema:()=>aF,IconsSchema:()=>aL,ImageContentSchema:()=>sE,ImplementationSchema:()=>aH,InitializeRequestParamsSchema:()=>aQ,InitializeRequestSchema:()=>aX,InitializeResultSchema:()=>a1,InitializedNotificationSchema:()=>a0,JSONArraySchema:()=>av,JSONObjectSchema:()=>a_,JSONRPCErrorResponseSchema:()=>aA,JSONRPCMessageSchema:()=>aW,JSONRPCNotificationSchema:()=>aO,JSONRPCRequestSchema:()=>aT,JSONRPCResponseSchema:()=>aM,JSONRPCResultResponseSchema:()=>aE,JSONValueSchema:()=>ag,LegacyTitledEnumSchemaSchema:()=>dm,ListChangedOptionsBaseSchema:()=>s1,ListPromptsRequestSchema:()=>sx,ListPromptsResultSchema:()=>sj,ListResourceTemplatesRequestSchema:()=>sp,ListResourceTemplatesResultSchema:()=>su,ListResourcesRequestSchema:()=>sc,ListResourcesResultSchema:()=>sl,ListRootsRequestSchema:()=>dT,ListRootsResultSchema:()=>dO,ListTasksRequestSchema:()=>dG,ListTasksResultSchema:()=>dB,ListToolsRequestSchema:()=>sB,ListToolsResultSchema:()=>sK,LoggingLevelSchema:()=>s0,LoggingMessageNotificationParamsSchema:()=>s6,LoggingMessageNotificationSchema:()=>s3,ModelHintSchema:()=>s9,ModelPreferencesSchema:()=>s5,MultiSelectEnumSchemaSchema:()=>dg,NotificationSchema:()=>aI,NotificationsParamsSchema:()=>aq,NumberSchemaSchema:()=>dl,PaginatedRequestParamsSchema:()=>a8,PaginatedRequestSchema:()=>a7,PaginatedResultSchema:()=>se,PingRequestSchema:()=>a6,PrimitiveSchemaDefinitionSchema:()=>dv,ProgressNotificationParamsSchema:()=>a9,ProgressNotificationSchema:()=>a5,ProgressSchema:()=>a3,ProgressTokenSchema:()=>ab,PromptArgumentSchema:()=>sq,PromptListChangedNotificationSchema:()=>sL,PromptMessageSchema:()=>sD,PromptReferenceSchema:()=>dq,PromptSchema:()=>sI,ReadResourceRequestParamsSchema:()=>sm,ReadResourceRequestSchema:()=>sf,ReadResourceResultSchema:()=>sh,RelatedTaskMetadataSchema:()=>ak,RequestIdSchema:()=>aC,RequestMetaSchema:()=>aw,RequestSchema:()=>aR,ResourceContentsSchema:()=>st,ResourceLinkSchema:()=>sN,ResourceListChangedNotificationSchema:()=>sy,ResourceRequestParamsSchema:()=>sm,ResourceSchema:()=>ss,ResourceTemplateReferenceSchema:()=>dR,ResourceTemplateSchema:()=>sd,ResourceUpdatedNotificationParamsSchema:()=>sP,ResourceUpdatedNotificationSchema:()=>sR,ResultMetaObjectSchema:()=>ax,ResultSchema:()=>aj,RoleSchema:()=>sn,RootSchema:()=>dC,RootsListChangedNotificationSchema:()=>dE,SamplingContentSchema:()=>de,SamplingMessageContentBlockSchema:()=>dt,SamplingMessageSchema:()=>dr,ServerCapabilitiesSchema:()=>aY,ServerNotificationSchema:()=>d1,ServerRequestSchema:()=>dY,ServerResultSchema:()=>d0,ServerTasksCapabilitySchema:()=>aJ,SetLevelRequestParamsSchema:()=>s2,SetLevelRequestSchema:()=>s4,SingleSelectEnumSchemaSchema:()=>df,StringSchemaSchema:()=>dc,SubscribeRequestParamsSchema:()=>sm,SubscribeRequestSchema:()=>sg,SubscriptionFilterSchema:()=>sv,SubscriptionsAcknowledgedNotificationParamsSchema:()=>sS,SubscriptionsAcknowledgedNotificationSchema:()=>sk,SubscriptionsListenRequestParamsSchema:()=>sb,SubscriptionsListenRequestSchema:()=>s$,SubscriptionsListenResultMetaSchema:()=>sw,SubscriptionsListenResultSchema:()=>sV,TaskAugmentedRequestParamsSchema:()=>aP,TaskCreationParamsSchema:()=>dA,TaskMetadataSchema:()=>aS,TaskSchema:()=>dM,TaskStatusNotificationParamsSchema:()=>dz,TaskStatusNotificationSchema:()=>dD,TaskStatusSchema:()=>dW,TextContentSchema:()=>sO,TextResourceContentsSchema:()=>sr,TitledMultiSelectEnumSchemaSchema:()=>dy,TitledSingleSelectEnumSchemaSchema:()=>du,ToolAnnotationsSchema:()=>sU,ToolChoiceSchema:()=>s8,ToolExecutionSchema:()=>sH,ToolListChangedNotificationSchema:()=>sY,ToolResultContentSchema:()=>s7,ToolSchema:()=>sG,ToolUseContentSchema:()=>sW,UnsubscribeRequestParamsSchema:()=>sm,UnsubscribeRequestSchema:()=>s_,UntitledMultiSelectEnumSchemaSchema:()=>dh,UntitledSingleSelectEnumSchemaSchema:()=>dp});let ll=e=>aT.safeParse(e).success,lp=e=>"object"==typeof e&&null!==e&&!Array.isArray(e)&&"input_required"===e.resultType,lu="x-mcp-header",lm=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/,lf=new Set(["string","integer","boolean"]),lh=["items","prefixItems","contains","additionalProperties","unevaluatedProperties","unevaluatedItems","propertyNames","patternProperties","dependentSchemas","oneOf","anyOf","allOf","not","if","then","else","$defs","definitions"],ly=new Set(["patternProperties","dependentSchemas","$defs","definitions"]);function lg(e){return 0===e.length?"":e.join(".")}cG.InvalidRequest,cG.UnsupportedProtocolVersion,cG.InvalidParams,cG.MethodNotFound,cG.InvalidParams,cG.MissingRequiredClientCapability;let l_={[cG.ParseError]:400,[cG.InvalidRequest]:400,[cG.MethodNotFound]:404,[cG.UnsupportedProtocolVersion]:400,[cG.MissingRequiredClientCapability]:400,[-32020]:400};function lv(e){return new Set(e.flatMap(e=>Object.keys(e.shape)))}function lb(e){if(null==e)return!1;let t=typeof e;return("object"===t||"function"===t)&&"~standard"in e&&"function"==typeof e["~standard"]?.validate}let l$=!1,lS="draft-2020-12";function lk(e,t="input"){let r,i=e["~standard"];if(i.jsonSchema)r=i.jsonSchema[t]({target:lS});else if("zod"===i.vendor){if(!("_zod"in e))throw Error("Schema appears to be from zod 3, which the SDK cannot convert to JSON Schema. Upgrade to zod >=4.2.0, or wrap your JSON Schema with fromJsonSchema().");l$||(l$=!0,console.warn("[mcp-sdk] Your zod version does not implement `~standard.jsonSchema` (added in zod 4.2.0). Falling back to z.toJSONSchema(). Upgrade to zod >=4.2.0 to silence this warning.")),r=ox(e,{target:lS,io:t})}else throw Error(`Schema library "${i.vendor}" does not implement StandardJSONSchemaV1 (\`~standard.jsonSchema\`). Upgrade to a version that does, or wrap your JSON Schema with fromJsonSchema().`);if("output"===t)return void 0!==r.type||!function e(t,r=t){if("properties"in t||"patternProperties"in t||"additionalProperties"in t||"required"in t)return!0;let i="string"==typeof t.$ref&&lw.exec(t.$ref);if(i&&r[i[1]]?.[i[2]]?.type==="object")return!0;for(let i of["oneOf","anyOf","allOf"]){let o=t[i];if(Array.isArray(o)&&o.length>0)return o.every(t=>null!==t&&"object"==typeof t&&("object"===t.type||e(t,"$id"in t?{}:r)))}return!1}(r)?r:{type:"object",...r};if(void 0!==r.type&&"object"!==r.type)throw Error(`MCP tool and prompt schemas must describe objects (got type: ${JSON.stringify(r.type)}). Wrap your schema in z.object({...}) or equivalent.`);return{type:"object",...r}}let lw=/^#\/(\$defs|definitions)\/([^/~%]+)$/;async function lV(e,t){let r=await e["~standard"].validate(t);return r.issues&&r.issues.length>0?{success:!1,error:r.issues.map(e=>e.path?.length?`${e.path.map(e=>String("object"==typeof e?e.key:e)).join(".")}: ${e.message}`:e.message).join(", ")}:{success:!0,data:r.value}}let lP=/\\\.\\d\{(\d+)\}/;function lR(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}let lq=new Set(["$comment","deprecated","description","examples","readOnly","title","writeOnly"]);function lI(e){return lq.has(e)||e.startsWith("x-")}let lx=new Set(["$schema",...Object.keys(db.shape.requestedSchema.shape)]),lj={string:lv([dc,dp,du,dm]),number:lv([dl]),integer:lv([dl]),boolean:lv([dd]),array:lv([dh,dy])},lC=new Set(dc.shape.format.unwrap().options);Object.assign(function(e){let t=void 0!==e.inputRequests&&Object.keys(e.inputRequests).length>0,r="string"==typeof e.requestState;if(!t&&!r)throw TypeError("inputRequired() requires at least one of inputRequests (with at least one entry) or requestState (spec: every InputRequiredResult MUST include at least one of the two)");return{resultType:"input_required",...void 0!==e.inputRequests&&{inputRequests:e.inputRequests},...void 0!==e.requestState&&{requestState:e.requestState}}},{elicit(e){try{return{method:"elicitation/create",params:function(e){var t;if(!lb(e.requestedSchema))return{...e,mode:"form",requestedSchema:e.requestedSchema};let r=e.requestedSchema["~standard"].vendor,i=function(e,t){let r={},i=[];for(let[o,n]of Object.entries(e))"properties"===o&&lR(n)?r[o]=Object.fromEntries(Object.entries(n).map(([e,r])=>[e,function(e,t,r,i){if(!lR(e))return e;let o="string"==typeof e.type&&Object.hasOwn(lj,e.type)?lj[e.type]:void 0;if(void 0===o)return e;let n={};for(let[s,d]of Object.entries(e))if(o.has(s)||lI(s))n[s]=d;else if("pattern"===s&&"string"===e.type&&"string"==typeof e.format)if(lC.has(e.format)){var a;"string"==typeof d&&(a=e.format,"zod"!==r||(function(e,t){let r;switch(e){case"email":r=[iw(nn,void 0)];break;case"uri":r=[iV(nd,void 0)];break;case"date":r=[iR(nr,void 0)];break;case"date-time":let i,o;i=lP.exec(t),o=[void 0,-1,0],i&&o.push(Number(i[1])),r=[!1,!0].flatMap(e=>[!1,!0].flatMap(t=>o.map(r=>ac({local:e,offset:t,precision:r}))))}return new Set(r.map(e=>{let t;return t=ox(e,{target:lS,io:"input"}),"string"==typeof t.pattern?t.pattern:void 0}).filter(e=>void 0!==e))})(a,d).has(d))||i.push(`${t}.${s}`)}else n[s]=d;else i.push(`${t}.${s}`);return n}(r,`properties.${e}`,t,i)])):lx.has(o)?r[o]=n:lI(o)||i.push(o);if(i.length>0)throw new cB(cG.InvalidParams,`Elicitation requestedSchema contains unsupported JSON Schema constraint(s) after Standard Schema conversion: ${i.join(", ")}`);return r}(function(e){try{return lk(e,"input")}catch(t){let e=t instanceof Error?t.message:String(t);throw new cB(cG.InvalidParams,`Elicitation requestedSchema must describe an object with flat primitive properties: ${e}`)}}(e.requestedSchema),r),o=(t=db.shape.requestedSchema,oJ(t,i));if(!o.success)throw new cB(cG.InvalidParams,`Elicitation requestedSchema only supports flat primitive properties (string, number, integer, boolean, and string enums): ${function(e,t){if(!lR(e.properties))return t;let r=Object.entries(e.properties).filter(([,e])=>!oJ(dv,e).success).map(([e])=>`properties.${e}`);return r.length>0?r.join(", "):t}(i,o.error.message)}`);let n=function e(t,r,i=""){return Array.isArray(t)&&Array.isArray(r)?t.flatMap((t,o)=>e(t,r[o],`${i}[${o}]`)):lR(t)&&lR(r)?Object.entries(t).flatMap(([t,o])=>{let n=i?`${i}.${t}`:t;return Object.prototype.hasOwnProperty.call(r,t)?e(o,r[t],n):lI(t)?[]:[n]}):[]}(i,o.data);if(n.length>0)throw new cB(cG.InvalidParams,`Elicitation requestedSchema contains unsupported JSON Schema constraint(s) after Standard Schema conversion: ${n.join(", ")}`);let a=(o.data.required??[]).filter(e=>!Object.prototype.hasOwnProperty.call(o.data.properties,e));if(a.length>0)throw new cB(cG.InvalidParams,`Elicitation requestedSchema lists required properties that are not defined in properties: ${a.join(", ")}`);return{...e,mode:"form",requestedSchema:o.data}}(e)}}catch(e){throw e instanceof cB?TypeError(e.message,{cause:e}):e}},elicitUrl:e=>({method:"elicitation/create",params:{...e,mode:"url"}}),createMessage:e=>({method:"sampling/createMessage",params:e}),listRoots:()=>({method:"roots/list"})});let lT={},lO={};function lE(e,t){let r=e.slice(0,-6);lT[r]=t,lO[r]=e=>t.safeParse(e).success}for(let e of["AnnotationsSchema","AudioContentSchema","BaseMetadataSchema","BlobResourceContentsSchema","BooleanSchemaSchema","CallToolRequestSchema","CallToolRequestParamsSchema","CallToolResultSchema","CancelledNotificationSchema","CancelledNotificationParamsSchema","CancelTaskRequestSchema","CancelTaskResultSchema","ClientCapabilitiesSchema","ClientNotificationSchema","ClientRequestSchema","ClientResultSchema","CompatibilityCallToolResultSchema","CompleteRequestSchema","CompleteRequestParamsSchema","CompleteResultSchema","ContentBlockSchema","CreateMessageRequestSchema","CreateMessageRequestParamsSchema","CreateMessageResultSchema","CreateMessageResultWithToolsSchema","CreateTaskResultSchema","CursorSchema","DiscoverRequestSchema","DiscoverResultSchema","ElicitationCompleteNotificationSchema","ElicitationCompleteNotificationParamsSchema","ElicitRequestSchema","ElicitRequestFormParamsSchema","ElicitRequestParamsSchema","ElicitRequestURLParamsSchema","ElicitResultSchema","EmbeddedResourceSchema","EmptyResultSchema","EnumSchemaSchema","GetPromptRequestSchema","GetPromptRequestParamsSchema","GetPromptResultSchema","GetTaskPayloadRequestSchema","GetTaskPayloadResultSchema","GetTaskRequestSchema","GetTaskResultSchema","IconSchema","IconsSchema","ImageContentSchema","ImplementationSchema","InitializedNotificationSchema","InitializeRequestSchema","InitializeRequestParamsSchema","InitializeResultSchema","JSONArraySchema","JSONObjectSchema","JSONRPCErrorResponseSchema","JSONRPCMessageSchema","JSONRPCNotificationSchema","JSONRPCRequestSchema","JSONRPCResponseSchema","JSONRPCResultResponseSchema","JSONValueSchema","LegacyTitledEnumSchemaSchema","ListPromptsRequestSchema","ListPromptsResultSchema","ListResourcesRequestSchema","ListResourcesResultSchema","ListResourceTemplatesRequestSchema","ListResourceTemplatesResultSchema","ListRootsRequestSchema","ListRootsResultSchema","ListTasksRequestSchema","ListTasksResultSchema","ListToolsRequestSchema","ListToolsResultSchema","LoggingLevelSchema","LoggingMessageNotificationSchema","LoggingMessageNotificationParamsSchema","ModelHintSchema","ModelPreferencesSchema","MultiSelectEnumSchemaSchema","NotificationSchema","NumberSchemaSchema","PaginatedRequestSchema","PaginatedRequestParamsSchema","PaginatedResultSchema","PingRequestSchema","PrimitiveSchemaDefinitionSchema","ProgressSchema","ProgressNotificationSchema","ProgressNotificationParamsSchema","ProgressTokenSchema","PromptSchema","PromptArgumentSchema","PromptListChangedNotificationSchema","PromptMessageSchema","PromptReferenceSchema","ReadResourceRequestSchema","ReadResourceRequestParamsSchema","ReadResourceResultSchema","RelatedTaskMetadataSchema","RequestSchema","RequestIdSchema","RequestMetaSchema","ResourceSchema","ResourceContentsSchema","ResourceLinkSchema","ResourceListChangedNotificationSchema","ResourceRequestParamsSchema","ResourceTemplateSchema","ResourceTemplateReferenceSchema","ResourceUpdatedNotificationSchema","ResourceUpdatedNotificationParamsSchema","ResultMetaObjectSchema","ResultSchema","RoleSchema","RootSchema","RootsListChangedNotificationSchema","SamplingContentSchema","SamplingMessageSchema","SamplingMessageContentBlockSchema","ServerCapabilitiesSchema","ServerNotificationSchema","ServerRequestSchema","ServerResultSchema","SetLevelRequestSchema","SetLevelRequestParamsSchema","SingleSelectEnumSchemaSchema","StringSchemaSchema","SubscribeRequestSchema","SubscribeRequestParamsSchema","SubscriptionFilterSchema","SubscriptionsAcknowledgedNotificationSchema","SubscriptionsAcknowledgedNotificationParamsSchema","SubscriptionsListenRequestSchema","SubscriptionsListenRequestParamsSchema","SubscriptionsListenResultSchema","SubscriptionsListenResultMetaSchema","TaskAugmentedRequestParamsSchema","TaskCreationParamsSchema","TaskMetadataSchema","TaskSchema","TaskStatusSchema","TaskStatusNotificationSchema","TaskStatusNotificationParamsSchema","TextContentSchema","TextResourceContentsSchema","TitledMultiSelectEnumSchemaSchema","TitledSingleSelectEnumSchemaSchema","ToolSchema","ToolAnnotationsSchema","ToolChoiceSchema","ToolExecutionSchema","ToolListChangedNotificationSchema","ToolResultContentSchema","ToolUseContentSchema","UnsubscribeRequestSchema","UnsubscribeRequestParamsSchema","UntitledMultiSelectEnumSchemaSchema","UntitledSingleSelectEnumSchemaSchema"])lE(e,lc[e]);for(let[e,t]of Object.entries({IdJagTokenExchangeResponseSchema:ce,OAuthClientInformationFullSchema:cn,OAuthClientInformationSchema:co,OAuthClientMetadataSchema:ci,OAuthClientRegistrationErrorSchema:ca,OAuthErrorResponseSchema:ct,OAuthMetadataSchema:d9,OAuthProtectedResourceMetadataSchema:d3,OAuthTokenRevocationRequestSchema:cs,OAuthTokensSchema:d7,OpenIdProviderDiscoveryMetadataSchema:d8,OpenIdProviderMetadataSchema:d5}))lE(e,t);Object.freeze(lT),Object.freeze(lO);let lA=[au,am,ah,ay],lW=["inputResponses","requestState"];function lM(e,t){let r=e.params;if(!lL(r))return{message:e,lifted:{}};let i=r._meta,o=lL(i)?lA.filter(e=>e in i):[],n="request"===t?lW.filter(e=>e in r):[];if(0===o.length&&0===n.length)return{message:e,lifted:{}};let a={},s={...r};if(o.length>0&&lL(i)){let e={},t={...i};for(let r of o)e[r]=i[r],delete t[r];a.envelope=e,Object.keys(t).length>0?s._meta=t:delete s._meta}for(let e of n)"inputResponses"===e&&(a.inputResponses=s[e]),"requestState"===e&&(a.requestState=s[e]),delete s[e];return{message:{...e,params:s},lifted:a}}function lN(e,t){let r=e.validateResult(t,void 0);if(r.ok||"not-in-era"!==r.reason)return{"~standard":{version:1,vendor:"mcp-wire-codec",validate(r){let i=e.validateResult(t,r);return i.ok?{value:i.value}:{issues:[{message:"invalid"===i.reason?i.message:`not-in-era: ${t}`}]}}}}}let lz=(Q=void 0,()=>Q);function lD(e,t){return{...e,mcpReq:{...e.mcpReq,requestState:()=>t}}}var lF=class{_transport;_requestMessageId=0;_requestHandlers=new Map;_customSchemaRequestMethods=new Set;_requestHandlerAbortControllers=new Map;_notificationHandlers=new Map;_responseHandlers=new Map;_progressHandlers=new Map;_timeoutInfo=new Map;_pendingDebouncedNotifications=new Set;_negotiatedProtocolVersion;_supportedProtocolVersions;onclose;onerror;fallbackRequestHandler;fallbackNotificationHandler;constructor(e){this._options=e,this._supportedProtocolVersions=e?.supportedProtocolVersions??ap,this.setNotificationHandler("notifications/cancelled",e=>{this._oncancel(e)}),this.setNotificationHandler("notifications/progress",e=>{this._onprogress(e)}),this.setRequestHandler("ping",e=>({}))}_shouldDropInbound(e){}_outboundMetaEnvelope(){}_envelopeOutbound(e){let t=this._outboundMetaEnvelope();if(void 0===t)return e;let r=e.params??{};return{...e,params:{...r,_meta:{...t,...r._meta}}}}_resolveNonCompleteResult(e,t){return Promise.reject(new cf(cm.UnsupportedResultType,`Unsupported result type '${e.kind}' for ${t.request.method}`,{resultType:e.kind,method:t.request.method}))}_getRequestHandler(e){return this._requestHandlers.get(e)}async _oncancel(e){void 0!==e.params.requestId&&this._requestHandlerAbortControllers.get(e.params.requestId)?.abort(e.params.reason)}_setupTimeout(e,t,r,i,o=!1){this._timeoutInfo.set(e,{timeoutId:setTimeout(i,t),startTime:Date.now(),timeout:t,maxTotalTimeout:r,resetTimeoutOnProgress:o,onTimeout:i})}_resetTimeout(e){let t=this._timeoutInfo.get(e);if(!t)return!1;let r=Date.now()-t.startTime;if(t.maxTotalTimeout&&r>=t.maxTotalTimeout)throw this._timeoutInfo.delete(e),new cf(cm.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:t.maxTotalTimeout,totalElapsed:r});return clearTimeout(t.timeoutId),t.timeoutId=setTimeout(t.onTimeout,t.timeout),!0}_cleanupTimeout(e){let t=this._timeoutInfo.get(e);t&&(clearTimeout(t.timeoutId),this._timeoutInfo.delete(e))}async connect(e){this._transport=e;let t=this.transport?.onclose;this._transport.onclose=()=>{try{t?.()}finally{this._onclose()}};let r=this.transport?.onerror;this._transport.onerror=e=>{r?.(e),this._onerror(e)};let i=this._transport?.onmessage;this._transport.onmessage=(e,t)=>{if(i?.(e,t),aE.safeParse(e).success||aA.safeParse(e).success)this._onresponse(e);else if(ll(e))this._onrequest(e,t);else aO.safeParse(e).success?this._onnotification(e,t):this._onerror(Error(`Unknown message type: ${JSON.stringify(e)}`))},e.setSupportedProtocolVersions?.(this._supportedProtocolVersions),await this._transport.start()}_onclose(){let e=this._responseHandlers;for(let e of(this._responseHandlers=new Map,this._progressHandlers.clear(),this._pendingDebouncedNotifications.clear(),this._timeoutInfo.values()))clearTimeout(e.timeoutId);this._timeoutInfo.clear();let t=this._requestHandlerAbortControllers;this._requestHandlerAbortControllers=new Map;let r=new cf(cm.ConnectionClosed,"Connection closed");this._transport=void 0;try{this.onclose?.()}finally{for(let t of e.values())t(r);for(let e of t.values())e.abort(r)}}_onerror(e){this.onerror?.(e)}_onnotification(e,t){let{message:r}=lM(e,"notification"),i=this._negotiatedWireCodec();if(t?.classification===void 0&&"drop"===this._shouldDropInbound(e))return;if(t?.classification!==void 0){let e=lo(t.classification);if(e!==i.era)return void this._onerror(Error(`Era mismatch on inbound notification '${r.method}': classified as ${e} but this instance serves ${i.era}`))}if(la(r.method)&&!i.hasNotificationMethod(r.method))return;let o=this._notificationHandlers.get(r.method),n=this.fallbackNotificationHandler;(void 0!==o||void 0!==n)&&Promise.resolve().then(()=>void 0===o?n(r):o(r,i)).catch(e=>this._onerror(Error(`Uncaught error in notification handler: ${e}`)))}_onrequest(e,t){var r;let{message:i,lifted:o}=lM(e,"request"),n=this._negotiatedWireCodec();if(t?.classification===void 0&&"drop"===this._shouldDropInbound(e))return void this._onerror(Error(`Dropped inbound request '${e.method}': not servable on this connection's protocol era`));let a=this._transport,s=(e,t,r)=>{let o={jsonrpc:"2.0",id:i.id,error:{code:e,message:t,...void 0!==r&&{data:r}}};a?.send(o).catch(e=>this._onerror(Error(`Failed to send an error response: ${e}`)))};if(t?.classification!==void 0){let e=lo(t.classification);if(e!==n.era){this._onerror(Error(`Era mismatch on inbound request '${i.method}': classified as ${e} but this instance serves ${n.era}`));let r=t.classification.revision??e;s(cG.UnsupportedProtocolVersion,`Unsupported protocol version: ${r}`,{supported:this._supportedProtocolVersions,requested:r});return}}if(ln(i.method)&&!n.hasRequestMethod(i.method)&&!(ls(i.method)&&this._customSchemaRequestMethods.has(i.method)))return void s(cG.MethodNotFound,"Method not found");let d=this._requestHandlers.get(i.method)??this.fallbackRequestHandler;if(void 0===d)return void s(cG.MethodNotFound,"Method not found");let c=n.checkInboundEnvelope(o);if(void 0!==c)return void s(cG.InvalidParams,c);let l=(e,t)=>this._notificationViaCodec(this._resolveOutboundCodec(e.method),e,{...t,relatedRequestId:i.id}),p=(e,t,r)=>this._requestWithSchemaViaCodec(this._resolveOutboundCodec(e.method),e,t,{...r,relatedRequestId:i.id}),u=new AbortController;this._requestHandlerAbortControllers.set(i.id,u);let m=void 0===o.inputResponses?void 0:function(e){let t={},r=[];if(!lU(e))return{accepted:t,droppedKeys:r};for(let[i,o]of Object.entries(e)){if(!lU(o)||"method"in o||"result"in o){r.push(i);continue}t[i]=o}return{accepted:t,droppedKeys:r}}(o.inputResponses),f={sessionId:a?.sessionId,mcpReq:{id:i.id,method:i.method,_meta:i.params?._meta,...void 0!==o.envelope&&{envelope:o.envelope},...void 0!==m&&{inputResponses:m.accepted},...void 0!==m&&m.droppedKeys.length>0&&{droppedInputResponseKeys:m.droppedKeys},requestState:void 0===o.requestState?lz:(r=o.requestState,()=>r),signal:u.signal,send:(e,t,r)=>{let i=this._resolveOutboundCodec(e.method);if(this._assertOutboundRequestInEra(i,e.method),lb(t))return p(e,t,r);let o=lN(i,e.method);if(void 0===o)throw TypeError(`'${e.method}' is not a spec method; pass a result schema as the second argument to ctx.mcpReq.send().`);return p(e,o,t)},notify:l},http:t?.authInfo?{authInfo:t.authInfo}:void 0},h=this.buildContext(f,t);Promise.resolve().then(()=>d(i,h)).then(async e=>{let t;if(u.signal.aborted)return;try{t=n.encodeResult(i.method,e,this._outboundServerInfo())}catch(e){this._onerror(Error(`Failed to encode result for ${i.method}: ${e}`)),s(cG.InternalError,"Internal error");return}let r={result:t,jsonrpc:"2.0",id:i.id};await a?.send(r)},async e=>{if(u.signal.aborted)return;let t=Number.isSafeInteger(e.code)?e.code:cG.InternalError,r={jsonrpc:"2.0",id:i.id,error:{code:n.encodeErrorCode(t),message:e.message??"Internal error",...void 0!==e.data&&{data:e.data}}};await a?.send(r)}).catch(e=>this._onerror(Error(`Failed to send response: ${e}`))).finally(()=>{this._requestHandlerAbortControllers.get(i.id)===u&&this._requestHandlerAbortControllers.delete(i.id)})}_onprogress(e){let{progressToken:t,...r}=e.params,i=Number(t),o=this._progressHandlers.get(i);if(!o)return void this._onerror(Error(`Received a progress notification for an unknown token: ${JSON.stringify(e)}`));let n=this._responseHandlers.get(i),a=this._timeoutInfo.get(i);if(a&&n&&a.resetTimeoutOnProgress)try{this._resetTimeout(i)}catch(e){this._responseHandlers.delete(i),this._progressHandlers.delete(i),this._cleanupTimeout(i),n(e);return}o(r)}_onresponse(e){let t=Number(e.id),r=this._responseHandlers.get(t);void 0===r?this._onerror(Error(`Received a response for an unknown message ID: ${JSON.stringify(e)}`)):(this._responseHandlers.delete(t),this._cleanupTimeout(t),this._progressHandlers.delete(t),r(aE.safeParse(e).success?e:cB.fromError(e.error.code,e.error.message,e.error.data)))}get transport(){return this._transport}async close(){await this._transport?.close()}request(e,t,r){let i=this._resolveOutboundCodec(e.method);if(lb(t))return ls(e.method)||this._assertOutboundRequestInEra(i,e.method),this._requestWithSchemaViaCodec(i,e,t,r);this._assertOutboundRequestInEra(i,e.method);let o=lN(i,e.method);if(void 0===o)throw TypeError(`'${e.method}' is not a spec method; pass a result schema as the second argument to request().`);return this._requestWithSchemaViaCodec(i,e,o,t)}_negotiatedWireCodec(){return li(this._negotiatedProtocolVersion)}_wireCodec(){return this._negotiatedWireCodec()}_resolveOutboundCodec(e){if(void 0===this._negotiatedProtocolVersion){let t=function(e){switch(e){case"initialize":case"notifications/initialized":return li(void 0);case"server/discover":return li(lr);default:return}}(e);if(t)return t}return this._negotiatedWireCodec()}_assertOutboundRequestInEra(e,t){if(ln(t)&&!e.hasRequestMethod(t))throw new cf(cm.MethodNotSupportedByProtocolVersion,`Method '${t}' is not supported by the negotiated protocol version (wire era ${e.era})`,{method:t,era:e.era})}_requestWithSchema(e,t,r){let i=this._resolveOutboundCodec(e.method);return this._assertOutboundRequestInEra(i,e.method),this._requestWithSchemaViaCodec(i,e,t,r)}_requestWithSchemaViaCodec(e,t,r,i){let o,n,{relatedRequestId:a,resumptionToken:s,onresumptiontoken:d,headers:c}=i??{},l=Date.now();return new Promise((p,u)=>{let m=e=>{u(e)};if(!this._transport)return void m(Error("Not connected"));if(this._options?.enforceStrictCapabilities===!0)try{this.assertCapabilityForMethod(t.method)}catch(e){m(e);return}if(i?.signal?.aborted){let e=i.signal.reason;throw e instanceof cf?e:new cf(cm.RequestTimeout,String(e))}let f=e.era===lr&&!0===this._transport.hasPerRequestStream?new AbortController:void 0,h=this._requestMessageId++;n=h;let y={...t,jsonrpc:"2.0",id:h};i?.onprogress&&(this._progressHandlers.set(h,i.onprogress),y.params={...t.params,_meta:{...t.params?._meta,progressToken:h}});let g=this._envelopeOutbound(y),_=!1,v=e=>{_||(this._progressHandlers.delete(h),void 0===f?"initialize"!==t.method&&this._transport?.send(this._envelopeOutbound({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:h,reason:String(e)}}),{relatedRequestId:a,resumptionToken:s,onresumptiontoken:d}).catch(e=>this._onerror(Error(`Failed to send cancellation: ${e}`))):f.abort(),u(e instanceof cf?e:new cf(cm.RequestTimeout,String(e))))};this._responseHandlers.set(h,o=>{let n;if(!i?.signal?.aborted){if(_=!0,o instanceof Error)return u(o);try{n=e.decodeResult(t.method,o.result)}catch(e){return u(e instanceof Error?e:Error(String(e)))}if("invalid"===n.kind)return u(n.error);if("input_required"===n.kind){var a;return i?.allowInputRequired===!0?p({resultType:"input_required",inputRequests:(a=n).inputRequests,...void 0!==a.requestState&&{requestState:a.requestState},...void 0!==a._meta&&{_meta:a._meta}}):p(this._resolveNonCompleteResult(n,{codec:e,request:t,resultSchema:r,options:i,flowStartedAt:l,retry:(i,o)=>this._requestWithSchemaViaCodec(e,void 0===i?{method:t.method}:{method:t.method,params:i},r,o)}))}lV(r,n.result).then(e=>{e.success?p(e.data):u(new cf(cm.InvalidResult,`Invalid result for ${t.method}: ${e.error}`))},u)}}),o=()=>v(i?.signal?.reason),i?.signal?.addEventListener("abort",o,{once:!0});let b=i?.timeout??6e4;this._setupTimeout(h,b,i?.maxTotalTimeout,()=>v(new cf(cm.RequestTimeout,"Request timed out",{timeout:b})),i?.resetTimeoutOnProgress??!1),this._transport.send(g,{relatedRequestId:a,resumptionToken:s,onresumptiontoken:d,headers:c,requestSignal:f?.signal}).catch(e=>{this._progressHandlers.delete(h),u(e)})}).finally(()=>{o&&i?.signal?.removeEventListener("abort",o),void 0!==n&&(this._responseHandlers.delete(n),this._cleanupTimeout(n))})}async notification(e,t){return await this._notificationViaCodec(this._resolveOutboundCodec(e.method),e,t)}async _notificationViaCodec(e,t,r){if(!this._transport)throw new cf(cm.NotConnected,"Not connected");if(la(t.method)&&!e.hasNotificationMethod(t.method))throw new cf(cm.MethodNotSupportedByProtocolVersion,`Notification '${t.method}' is not supported by the negotiated protocol version (wire era ${e.era})`,{method:t.method,era:e.era});this.assertNotificationCapability(t.method);let i=this._envelopeOutbound({jsonrpc:"2.0",...t});if((this._options?.debouncedNotificationMethods??[]).includes(t.method)&&!t.params&&r?.relatedRequestId===void 0){if(this._pendingDebouncedNotifications.has(t.method))return;this._pendingDebouncedNotifications.add(t.method),Promise.resolve().then(()=>{this._pendingDebouncedNotifications.delete(t.method),this._transport&&this._transport?.send(i,r).catch(e=>this._onerror(e))});return}await this._transport.send(i,r)}setRequestHandler(e,t,r){let i;if(this.assertRequestHandlerCapability(e),"function"==typeof t){if(!ln(e))throw TypeError(`'${e}' is not a spec request method; pass schemas as the second argument to setRequestHandler().`);i=(r,i)=>{let o=this._negotiatedWireCodec(),n=o.validateRequest(e,r);if(n.ok||"not-in-era"!==n.reason||(n=o.validateInputRequest(e,r)),!n.ok){if("not-in-era"===n.reason)throw new cB(cG.InternalError,`No wire schema for ${e} in the resolved era`);throw Error(n.message)}return Promise.resolve(t(n.value,i))}}else if(r)i=async(i,o)=>{let n=await lV(t.params,{...i.params});if(!n.success)throw new cB(cG.InvalidParams,`Invalid params for ${e}: ${n.error}`);return r(n.data,o)};else throw TypeError("setRequestHandler: handler is required");"function"==typeof t?this._customSchemaRequestMethods.delete(e):this._customSchemaRequestMethods.add(e),this._requestHandlers.set(e,this._wrapHandler(e,i))}_wrapHandler(e,t){return t}_outboundServerInfo(){}removeRequestHandler(e){this._requestHandlers.delete(e),this._customSchemaRequestMethods.delete(e)}assertCanSetRequestHandler(e){if(this._requestHandlers.has(e))throw Error(`A request handler for ${e} already exists, which would be overridden`)}setNotificationHandler(e,t,r){if("function"==typeof t){if(!la(e))throw TypeError(`'${e}' is not a spec notification method; pass schemas as the second argument to setNotificationHandler().`);this._notificationHandlers.set(e,(r,i)=>{let o=i.validateNotification(e,r);if(!o.ok){if("not-in-era"===o.reason)throw new cB(cG.InternalError,`No wire schema for ${e} in the resolved era`);throw Error(o.message)}return Promise.resolve(t(o.value))});return}if(!r)throw TypeError("setNotificationHandler: handler is required");this._notificationHandlers.set(e,async i=>{let o=await lV(t.params,{...i.params});if(!o.success)throw new cB(cG.InvalidParams,`Invalid params for notification ${e}: ${o.error}`);await r(o.data,i)})}removeNotificationHandler(e){this._notificationHandlers.delete(e)}};function lL(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)}function lU(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}var lH=e$((eb(e=>{var t=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,r=/\\([\u000b\u0020-\u00ff])/g,i=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;function o(e){this.parameters=Object.create(null),this.type=e}e.parse=function(e){if(!e)throw TypeError("argument string is required");var n,a,s,d="object"==typeof e?function(e){var t;if("function"==typeof e.getHeader?t=e.getHeader("content-type"):"object"==typeof e.headers&&(t=e.headers&&e.headers["content-type"]),"string"!=typeof t)throw TypeError("content-type header is missing from object");return t}(e):e;if("string"!=typeof d)throw TypeError("argument string is required to be a string");var c=d.indexOf(";"),l=-1!==c?d.slice(0,c).trim():d.trim();if(!i.test(l))throw TypeError("invalid media type");var p=new o(l.toLowerCase());if(-1!==c){for(t.lastIndex=c;a=t.exec(d);){if(a.index!==c)throw TypeError("invalid parameter format");c+=a[0].length,n=a[1].toLowerCase(),34===(s=a[2]).charCodeAt(0)&&-1!==(s=s.slice(1,-1)).indexOf("\\")&&(s=s.replace(r,"$1")),p.parameters[n]=s}if(c!==d.length)throw TypeError("invalid parameter format")}return p}}))(),1),lG=class{_buffer;_maxBufferSize;constructor(e){this._maxBufferSize=e?.maxBufferSize??0xa00000}append(e){if((this._buffer?.length??0)+e.length>this._maxBufferSize)throw this.clear(),Error(`ReadBuffer exceeded maximum size of ${this._maxBufferSize} bytes`);this._buffer=this._buffer?Buffer.concat([this._buffer,e]):e}readMessage(){for(;this._buffer;){let t=this._buffer.indexOf("\n");if(-1===t)break;let r=this._buffer.toString("utf8",0,t).replace(/\r$/,"");this._buffer=this._buffer.subarray(t+1);try{var e;return e=r,aW.parse(JSON.parse(e))}catch(e){if(e instanceof SyntaxError)continue;throw e}}return null}clear(){this._buffer=void 0}};let lB=/^[A-Za-z0-9._-]{1,128}$/;function lK(e){let t=function(e){let t=[];if(0===e.length)return{isValid:!1,warnings:["Tool name cannot be empty"]};if(e.length>128)return{isValid:!1,warnings:[`Tool name exceeds maximum length of 128 characters (current: ${e.length})`]};if(e.includes(" ")&&t.push("Tool name contains spaces, which may cause parsing issues"),e.includes(",")&&t.push("Tool name contains commas, which may cause parsing issues"),(e.startsWith("-")||e.endsWith("-"))&&t.push("Tool name starts or ends with a dash, which may cause parsing issues in some contexts"),(e.startsWith(".")||e.endsWith("."))&&t.push("Tool name starts or ends with a dot, which may cause parsing issues in some contexts"),!lB.test(e)){let r=[...e].filter(e=>!/[A-Za-z0-9._-]/.test(e)).filter((e,t,r)=>r.indexOf(e)===t);return t.push(`Tool name contains invalid characters: ${r.map(e=>`"${e}"`).join(", ")}`,"Allowed characters are: A-Z, a-z, 0-9, underscore (_), dash (-), and dot (.)"),{isValid:!1,warnings:t}}return{isValid:!0,warnings:t}}(e);var r=t.warnings;if(r.length>0){for(let t of(console.warn(`Tool name validation warning for "${e}":`),r))console.warn(` - ${t}`);console.warn("Tool registration will proceed, but this may cause compatibility issues."),console.warn("Consider updating the tool name to conform to the MCP tool naming standard."),console.warn("See SEP: Specify Format for Tool Names (https://github.com/modelcontextprotocol/modelcontextprotocol/issues/986) for more details.")}return t.isValid}var lJ=class e{static isTemplate(e){return/\{[^}\s]+\}/.test(e)}static validateLength(e,t,r){if(e.length>t)throw Error(`${r} exceeds maximum length of ${t} characters (got ${e.length})`)}template;parts;get variableNames(){return this.parts.flatMap(e=>"string"==typeof e?[]:e.names)}constructor(t){e.validateLength(t,1e6,"Template"),this.template=t,this.parts=this.parse(t)}toString(){return this.template}parse(t){let r=[],i="",o=0,n=0;for(;o1e4)throw Error("Template contains too many expressions (max 10000)");let s=t.slice(o+1,a),d=this.getOperator(s),c=s.includes("*"),l=this.getNames(s),p=l[0];for(let t of l)e.validateLength(t,1e6,"Variable name");r.push({name:p,operator:d,names:l,exploded:c}),o=a+1}else i+=t[o],o++;return i&&r.push(i),r}getOperator(e){return["+","#",".","/","?","&"].find(t=>e.startsWith(t))||""}getNames(e){let t=this.getOperator(e);return e.slice(t.length).split(",").map(e=>e.replace("*","").trim()).filter(e=>e.length>0)}encodeValue(t,r){return(e.validateLength(t,1e6,"Variable value"),"+"===r||"#"===r)?encodeURI(t):encodeURIComponent(t)}expandPart(e,t){if("?"===e.operator||"&"===e.operator){let r=e.names.map(r=>{let i=t[r];return void 0===i?"":`${r}=${Array.isArray(i)?i.map(t=>this.encodeValue(t,e.operator)).join(","):this.encodeValue(i.toString(),e.operator)}`}).filter(e=>e.length>0);return 0===r.length?"":("?"===e.operator?"?":"&")+r.join("&")}if(e.names.length>1){let r=e.names.map(e=>t[e]).filter(e=>void 0!==e);return 0===r.length?"":r.map(e=>Array.isArray(e)?e[0]:e).join(",")}let r=t[e.name];if(void 0===r)return"";let i=(Array.isArray(r)?r:[r]).map(t=>this.encodeValue(t,e.operator));switch(e.operator){case"":case"+":default:return i.join(",");case"#":return"#"+i.join(",");case".":return"."+i.join(".");case"/":return"/"+i.join("/")}}expand(e){let t="",r=!1;for(let i of this.parts){if("string"==typeof i){t+=i;continue}let o=this.expandPart(i,e);o&&(t+=("?"===i.operator||"&"===i.operator)&&r?o.replace("?","&"):o,("?"===i.operator||"&"===i.operator)&&(r=!0))}return t}escapeRegExp(e){return e.replaceAll(/[.*+?^${}()|[\]\\]/g,String.raw`\$&`)}partToRegExp(t){let r,i=[];for(let r of t.names)e.validateLength(r,1e6,"Variable name");if("?"===t.operator||"&"===t.operator){for(let e=0;e"object"==typeof e&&null!==e&&"_zod"in e)}(e))return nz(e);if("object"==typeof e&&null!==e&&!lb(e)&&Object.values(e).some(e=>"object"==typeof e&&null!==e&&!("_zod"in e)&&"_def"in e&&"string"==typeof e._def?.typeName))throw TypeError("Raw-shape inputSchema/outputSchema/argsSchema fields must be Zod v4 schemas. Got a Zod v3 field schema. Import from `zod/v4` (or upgrade your zod import), or wrap with `z.object({...})` yourself.");if(!lb(e))throw TypeError("inputSchema/outputSchema/argsSchema must be a Standard Schema (e.g. z.object({...})) or a raw Zod shape ({ field: z.string() }).");return e}}var lQ=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;var t=class{};e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var r=class extends t{constructor(t){if(super(),!e.IDENTIFIER.test(t))throw Error("CodeGen: name must be a valid identifier");this.str=t}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};e.Name=r;var i=class extends t{constructor(e){super(),this._items="string"==typeof e?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return""===e||'""'===e}get str(){var e;return null!=(e=this._str)?e:this._str=this._items.reduce((e,t)=>`${e}${t}`,"")}get names(){var e;return null!=(e=this._names)?e:this._names=this._items.reduce((e,t)=>(t instanceof r&&(e[t.str]=(e[t.str]||0)+1),e),{})}};function o(e,...t){let r=[e[0]],n=0;for(;n{Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;let t=lQ();var r,i,o=class extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}};(r=i||(e.UsedValueState=i={}))[r.Started=0]="Started",r[r.Completed=1]="Completed",e.varKinds={const:new t.Name("const"),let:new t.Name("let"),var:new t.Name("var")};var n=class{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof t.Name?e:this.name(e)}name(e){return new t.Name(this._newName(e))}_newName(e){let t=this._names[e]||this._nameGroup(e);return`${e}${t.index++}`}_nameGroup(e){var t,r;if((null==(r=null==(t=this._parent)?void 0:t._prefixes)?void 0:r.has(e))||this._prefixes&&!this._prefixes.has(e))throw Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}};e.Scope=n;var a=class extends t.Name{constructor(e,t){super(t),this.prefix=e}setValue(e,{property:r,itemIndex:i}){this.value=e,this.scopePath=(0,t._)`.${new t.Name(r)}[${i}]`}};e.ValueScopeName=a;let s=(0,t._)`\n`;var d=class extends n{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?s:t.nil}}get(){return this._scope}name(e){return new a(e,this._newName(e))}value(e,t){var r;if(void 0===t.ref)throw Error("CodeGen: ref must be passed in value");let i=this.toName(e),{prefix:o}=i,n=null!=(r=t.key)?r:t.ref,a=this._values[o];if(a){let e=a.get(n);if(e)return e}else a=this._values[o]=new Map;a.set(n,i);let s=this._scope[o]||(this._scope[o]=[]),d=s.length;return s[d]=t.ref,i.setValue(t,{property:o,itemIndex:d}),i}getValue(e,t){let r=this._values[e];if(r)return r.get(t)}scopeRefs(e,r=this._values){return this._reduceValues(r,r=>{if(void 0===r.scopePath)throw Error(`CodeGen: name "${r}" has no value`);return(0,t._)`${e}${r.scopePath}`})}scopeCode(e=this._values,t,r){return this._reduceValues(e,e=>{if(void 0===e.value)throw Error(`CodeGen: name "${e}" has no value`);return e.value.code},t,r)}_reduceValues(r,n,a={},s){let d=t.nil;for(let c in r){let l=r[c];if(!l)continue;let p=a[c]=a[c]||new Map;l.forEach(r=>{if(p.has(r))return;p.set(r,i.Started);let a=n(r);if(a){let i=this.opts.es5?e.varKinds.var:e.varKinds.const;d=(0,t._)`${d}${i} ${r} = ${a};${this.opts._n}`}else if(a=null==s?void 0:s(r))d=(0,t._)`${d}${a}${this.opts._n}`;else throw new o(r);p.set(r,i.Completed)})}return d}};e.ValueScope=d}),lY=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;let t=lQ(),r=lX();var i=lQ();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return i._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return i.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return i.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return i.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return i.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return i.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return i.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return i.Name}});var o=lX();Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return o.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return o.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return o.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return o.varKinds}}),e.operators={GT:new t._Code(">"),GTE:new t._Code(">="),LT:new t._Code("<"),LTE:new t._Code("<="),EQ:new t._Code("==="),NEQ:new t._Code("!=="),NOT:new t._Code("!"),OR:new t._Code("||"),AND:new t._Code("&&"),ADD:new t._Code("+")};var n=class{optimizeNodes(){return this}optimizeNames(e,t){return this}},a=class extends n{constructor(e,t,r){super(),this.varKind=e,this.name=t,this.rhs=r}render({es5:e,_n:t}){let i=e?r.varKinds.var:this.varKind,o=void 0===this.rhs?"":` = ${this.rhs}`;return`${i} ${this.name}${o};`+t}optimizeNames(e,t){if(e[this.name.str])return this.rhs&&(this.rhs=x(this.rhs,e,t)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}},s=class extends n{constructor(e,t,r){super(),this.lhs=e,this.rhs=t,this.sideEffects=r}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,r){if(!(this.lhs instanceof t.Name)||e[this.lhs.str]||this.sideEffects)return this.rhs=x(this.rhs,e,r),this}get names(){return I(this.lhs instanceof t.Name?{}:{...this.lhs.names},this.rhs)}},d=class extends s{constructor(e,t,r,i){super(e,r,i),this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}},c=class extends n{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}},l=class extends n{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}},p=class extends n{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}},u=class extends n{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=x(this.code,e,t),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}},m=class extends n{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce((t,r)=>t+r.render(e),"")}optimizeNodes(){let{nodes:e}=this,t=e.length;for(;t--;){let r=e[t].optimizeNodes();Array.isArray(r)?e.splice(t,1,...r):r?e[t]=r:e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){let{nodes:r}=this,i=r.length;for(;i--;){let o=r[i];o.optimizeNames(e,t)||(function(e,t){for(let r in t)e[r]=(e[r]||0)-(t[r]||0)}(e,o.names),r.splice(i,1))}return r.length>0?this:void 0}get names(){return this.nodes.reduce((e,t)=>q(e,t.names),{})}},f=class extends m{render(e){return"{"+e._n+super.render(e)+"}"+e._n}},h=class extends m{},y=class extends f{};y.kind="else";var g=class e extends f{constructor(e,t){super(t),this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);return this.else&&(t+="else "+this.else.render(e)),t}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(!0===t)return this.nodes;let r=this.else;if(r){let e=r.optimizeNodes();r=this.else=Array.isArray(e)?new y(e):e}return r?!1===t?r instanceof e?r:r.nodes:this.nodes.length?this:new e(j(t),r instanceof e?[r]:r.nodes):!1!==t&&this.nodes.length?this:void 0}optimizeNames(e,t){var r;if(this.else=null==(r=this.else)?void 0:r.optimizeNames(e,t),super.optimizeNames(e,t)||this.else)return this.condition=x(this.condition,e,t),this}get names(){let e=super.names;return I(e,this.condition),this.else&&q(e,this.else.names),e}};g.kind="if";var _=class extends f{};_.kind="for";var v=class extends _{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iteration=x(this.iteration,e,t),this}get names(){return q(super.names,this.iteration.names)}},b=class extends _{constructor(e,t,r,i){super(),this.varKind=e,this.name=t,this.from=r,this.to=i}render(e){let t=e.es5?r.varKinds.var:this.varKind,{name:i,from:o,to:n}=this;return`for(${t} ${i}=${o}; ${i}<${n}; ${i}++)`+super.render(e)}get names(){return I(I(super.names,this.from),this.to)}},$=class extends _{constructor(e,t,r,i){super(),this.loop=e,this.varKind=t,this.name=r,this.iterable=i}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iterable=x(this.iterable,e,t),this}get names(){return q(super.names,this.iterable.names)}},S=class extends f{constructor(e,t,r){super(),this.name=e,this.args=t,this.async=r}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}};S.kind="func";var k=class extends m{render(e){return"return "+super.render(e)}};k.kind="return";var w=class extends f{render(e){let t="try"+super.render(e);return this.catch&&(t+=this.catch.render(e)),this.finally&&(t+=this.finally.render(e)),t}optimizeNodes(){var e,t;return super.optimizeNodes(),null==(e=this.catch)||e.optimizeNodes(),null==(t=this.finally)||t.optimizeNodes(),this}optimizeNames(e,t){var r,i;return super.optimizeNames(e,t),null==(r=this.catch)||r.optimizeNames(e,t),null==(i=this.finally)||i.optimizeNames(e,t),this}get names(){let e=super.names;return this.catch&&q(e,this.catch.names),this.finally&&q(e,this.finally.names),e}},V=class extends f{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}};V.kind="catch";var P=class extends f{render(e){return"finally"+super.render(e)}};P.kind="finally";var R=class{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?"\n":""},this._extScope=e,this._scope=new r.Scope({parent:e}),this._nodes=[new h]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){let r=this._extScope.value(e,t);return(this._values[r.prefix]||(this._values[r.prefix]=new Set)).add(r),r}getScopeValue(e,t){return this._extScope.getValue(e,t)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,t,r,i){let o=this._scope.toName(t);return void 0!==r&&i&&(this._constants[o.str]=r),this._leafNode(new a(e,o,r)),o}const(e,t,i){return this._def(r.varKinds.const,e,t,i)}let(e,t,i){return this._def(r.varKinds.let,e,t,i)}var(e,t,i){return this._def(r.varKinds.var,e,t,i)}assign(e,t,r){return this._leafNode(new s(e,t,r))}add(t,r){return this._leafNode(new d(t,e.operators.ADD,r))}code(e){return"function"==typeof e?e():e!==t.nil&&this._leafNode(new u(e)),this}object(...e){let r=["{"];for(let[i,o]of e)r.length>1&&r.push(","),r.push(i),(i!==o||this.opts.es5)&&(r.push(":"),(0,t.addCodeArg)(r,o));return r.push("}"),new t._Code(r)}if(e,t,r){if(this._blockNode(new g(e)),t&&r)this.code(t).else().code(r).endIf();else if(t)this.code(t).endIf();else if(r)throw Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new g(e))}else(){return this._elseNode(new y)}endIf(){return this._endBlockNode(g,y)}_for(e,t){return this._blockNode(e),t&&this.code(t).endFor(),this}for(e,t){return this._for(new v(e),t)}forRange(e,t,i,o,n=this.opts.es5?r.varKinds.var:r.varKinds.let){let a=this._scope.toName(e);return this._for(new b(n,a,t,i),()=>o(a))}forOf(e,i,o,n=r.varKinds.const){let a=this._scope.toName(e);if(this.opts.es5){let e=i instanceof t.Name?i:this.var("_arr",i);return this.forRange("_i",0,(0,t._)`${e}.length`,r=>{this.var(a,(0,t._)`${e}[${r}]`),o(a)})}return this._for(new $("of",n,a,i),()=>o(a))}forIn(e,i,o,n=this.opts.es5?r.varKinds.var:r.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,t._)`Object.keys(${i})`,o);let a=this._scope.toName(e);return this._for(new $("in",n,a,i),()=>o(a))}endFor(){return this._endBlockNode(_)}label(e){return this._leafNode(new c(e))}break(e){return this._leafNode(new l(e))}return(e){let t=new k;if(this._blockNode(t),this.code(e),1!==t.nodes.length)throw Error('CodeGen: "return" should have one node');return this._endBlockNode(k)}try(e,t,r){if(!t&&!r)throw Error('CodeGen: "try" without "catch" and "finally"');let i=new w;if(this._blockNode(i),this.code(e),t){let e=this.name("e");this._currNode=i.catch=new V(e),t(e)}return r&&(this._currNode=i.finally=new P,this.code(r)),this._endBlockNode(V,P)}throw(e){return this._leafNode(new p(e))}block(e,t){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(t),this}endBlock(e){let t=this._blockStarts.pop();if(void 0===t)throw Error("CodeGen: not in self-balancing block");let r=this._nodes.length-t;if(r<0||void 0!==e&&r!==e)throw Error(`CodeGen: wrong number of nodes: ${r} vs ${e} expected`);return this._nodes.length=t,this}func(e,r=t.nil,i,o){return this._blockNode(new S(e,r,i)),o&&this.code(o).endFunc(),this}endFunc(){return this._endBlockNode(S)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,t){let r=this._currNode;if(r instanceof e||t&&r instanceof t)return this._nodes.pop(),this;throw Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){let t=this._currNode;if(!(t instanceof g))throw Error('CodeGen: "else" without "if"');return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let t=this._nodes;t[t.length-1]=e}};function q(e,t){for(let r in t)e[r]=(e[r]||0)+(t[r]||0);return e}function I(e,r){return r instanceof t._CodeOrName?q(e,r.names):e}function x(e,r,i){var o;if(e instanceof t.Name)return n(e);if(!((o=e)instanceof t._Code&&o._items.some(e=>e instanceof t.Name&&1===r[e.str]&&void 0!==i[e.str])))return e;return new t._Code(e._items.reduce((e,r)=>(r instanceof t.Name&&(r=n(r)),r instanceof t._Code?e.push(...r._items):e.push(r),e),[]));function n(e){let t=i[e.str];return void 0===t||1!==r[e.str]?e:(delete r[e.str],t)}}function j(e){return"boolean"==typeof e||"number"==typeof e||null===e?!e:(0,t._)`!${E(e)}`}e.CodeGen=R,e.not=j;let C=O(e.operators.AND);e.and=function(...e){return e.reduce(C)};let T=O(e.operators.OR);function O(e){return(r,i)=>r===t.nil?i:i===t.nil?r:(0,t._)`${E(r)} ${e} ${E(i)}`}function E(e){return e instanceof t.Name?e:(0,t._)`(${e})`}e.or=function(...e){return e.reduce(T)}}),l1=eb(e=>{var t,r;Object.defineProperty(e,"__esModule",{value:!0}),e.checkStrictMode=e.getErrorPath=e.Type=e.useFunc=e.setEvaluated=e.evaluatedPropsToName=e.mergeEvaluated=e.eachItem=e.unescapeJsonPointer=e.escapeJsonPointer=e.escapeFragment=e.unescapeFragment=e.schemaRefOrVal=e.schemaHasRulesButRef=e.schemaHasRules=e.checkUnknownRules=e.alwaysValidSchema=e.toHash=void 0;let i=lY(),o=lQ();function n(e,t=e.schema){let{opts:r,self:i}=e;if(!r.strictSchema||"boolean"==typeof t)return;let o=i.RULES.keywords;for(let r in t)o[r]||m(e,`unknown keyword: "${r}"`)}function a(e,t){if("boolean"==typeof e)return!e;for(let r in e)if(t[r])return!0;return!1}function s(e){return"number"==typeof e?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}function d(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function c({mergeNames:e,mergeToName:t,mergeValues:r,resultToName:o}){return(n,a,s,d)=>{let c=void 0===s?a:s instanceof i.Name?(a instanceof i.Name?e(n,a,s):t(n,a,s),s):a instanceof i.Name?(t(n,s,a),a):r(a,s);return d!==i.Name||c instanceof i.Name?c:o(n,c)}}function l(e,t){if(!0===t)return e.var("props",!0);let r=e.var("props",(0,i._)`{}`);return void 0!==t&&p(e,r,t),r}function p(e,t,r){Object.keys(r).forEach(r=>e.assign((0,i._)`${t}${(0,i.getProperty)(r)}`,!0))}e.toHash=function(e){let t={};for(let r of e)t[r]=!0;return t},e.alwaysValidSchema=function(e,t){return"boolean"==typeof t?t:0===Object.keys(t).length||(n(e,t),!a(t,e.self.RULES.all))},e.checkUnknownRules=n,e.schemaHasRules=a,e.schemaHasRulesButRef=function(e,t){if("boolean"==typeof e)return!e;for(let r in e)if("$ref"!==r&&t.all[r])return!0;return!1},e.schemaRefOrVal=function({topSchemaRef:e,schemaPath:t},r,o,n){if(!n){if("number"==typeof r||"boolean"==typeof r)return r;if("string"==typeof r)return(0,i._)`${r}`}return(0,i._)`${e}${t}${(0,i.getProperty)(o)}`},e.unescapeFragment=function(e){return d(decodeURIComponent(e))},e.escapeFragment=function(e){return encodeURIComponent(s(e))},e.escapeJsonPointer=s,e.unescapeJsonPointer=d,e.eachItem=function(e,t){if(Array.isArray(e))for(let r of e)t(r);else t(e)},e.mergeEvaluated={props:c({mergeNames:(e,t,r)=>e.if((0,i._)`${r} !== true && ${t} !== undefined`,()=>{e.if((0,i._)`${t} === true`,()=>e.assign(r,!0),()=>e.assign(r,(0,i._)`${r} || {}`).code((0,i._)`Object.assign(${r}, ${t})`))}),mergeToName:(e,t,r)=>e.if((0,i._)`${r} !== true`,()=>{!0===t?e.assign(r,!0):(e.assign(r,(0,i._)`${r} || {}`),p(e,r,t))}),mergeValues:(e,t)=>!0===e||{...e,...t},resultToName:l}),items:c({mergeNames:(e,t,r)=>e.if((0,i._)`${r} !== true && ${t} !== undefined`,()=>e.assign(r,(0,i._)`${t} === true ? true : ${r} > ${t} ? ${r} : ${t}`)),mergeToName:(e,t,r)=>e.if((0,i._)`${r} !== true`,()=>e.assign(r,!0===t||(0,i._)`${r} > ${t} ? ${r} : ${t}`)),mergeValues:(e,t)=>!0===e||Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})},e.evaluatedPropsToName=l,e.setEvaluated=p;let u={};function m(e,t,r=e.opts.strictSchema){if(r){if(t=`strict mode: ${t}`,!0===r)throw Error(t);e.self.logger.warn(t)}}e.useFunc=function(e,t){return e.scopeValue("func",{ref:t,code:u[t.code]||(u[t.code]=new o._Code(t.code))})},(r=t||(e.Type=t={}))[r.Num=0]="Num",r[r.Str=1]="Str",e.getErrorPath=function(e,r,o){if(e instanceof i.Name){let n=r===t.Num;return o?n?(0,i._)`"[" + ${e} + "]"`:(0,i._)`"['" + ${e} + "']"`:n?(0,i._)`"/" + ${e}`:(0,i._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return o?(0,i.getProperty)(e).toString():"/"+s(e)},e.checkStrictMode=m}),l0=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=lY();e.default={data:new t.Name("data"),valCxt:new t.Name("valCxt"),instancePath:new t.Name("instancePath"),parentData:new t.Name("parentData"),parentDataProperty:new t.Name("parentDataProperty"),rootData:new t.Name("rootData"),dynamicAnchors:new t.Name("dynamicAnchors"),vErrors:new t.Name("vErrors"),errors:new t.Name("errors"),this:new t.Name("this"),self:new t.Name("self"),scope:new t.Name("scope"),json:new t.Name("json"),jsonPos:new t.Name("jsonPos"),jsonLen:new t.Name("jsonLen"),jsonPart:new t.Name("jsonPart")}}),l2=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;let t=lY(),r=l1(),i=l0();function o(e,r){let o=e.const("err",r);e.if((0,t._)`${i.default.vErrors} === null`,()=>e.assign(i.default.vErrors,(0,t._)`[${o}]`),(0,t._)`${i.default.vErrors}.push(${o})`),e.code((0,t._)`${i.default.errors}++`)}function n(e,r){let{gen:i,validateName:o,schemaEnv:n}=e;n.$async?i.throw((0,t._)`new ${e.ValidationError}(${r})`):(i.assign((0,t._)`${o}.errors`,r),i.return(!1))}e.keywordError={message:({keyword:e})=>(0,t.str)`must pass "${e}" keyword validation`},e.keyword$DataError={message:({keyword:e,schemaType:r})=>r?(0,t.str)`"${e}" keyword must be ${r} ($data)`:(0,t.str)`"${e}" keyword is invalid ($data)`},e.reportError=function(r,i=e.keywordError,a,d){let{it:c}=r,{gen:l,compositeRule:p,allErrors:u}=c,m=s(r,i,a);(null!=d?d:p||u)?o(l,m):n(c,(0,t._)`[${m}]`)},e.reportExtraError=function(t,r=e.keywordError,a){let{it:d}=t,{gen:c,compositeRule:l,allErrors:p}=d;o(c,s(t,r,a)),l||p||n(d,i.default.vErrors)},e.resetErrorsCount=function(e,r){e.assign(i.default.errors,r),e.if((0,t._)`${i.default.vErrors} !== null`,()=>e.if(r,()=>e.assign((0,t._)`${i.default.vErrors}.length`,r),()=>e.assign(i.default.vErrors,null)))},e.extendErrors=function({gen:e,keyword:r,schemaValue:o,data:n,errsCount:a,it:s}){if(void 0===a)throw Error("ajv implementation error");let d=e.name("err");e.forRange("i",a,i.default.errors,a=>{e.const(d,(0,t._)`${i.default.vErrors}[${a}]`),e.if((0,t._)`${d}.instancePath === undefined`,()=>e.assign((0,t._)`${d}.instancePath`,(0,t.strConcat)(i.default.instancePath,s.errorPath))),e.assign((0,t._)`${d}.schemaPath`,(0,t.str)`${s.errSchemaPath}/${r}`),s.opts.verbose&&(e.assign((0,t._)`${d}.schema`,o),e.assign((0,t._)`${d}.data`,n))})};let a={keyword:new t.Name("keyword"),schemaPath:new t.Name("schemaPath"),params:new t.Name("params"),propertyName:new t.Name("propertyName"),message:new t.Name("message"),schema:new t.Name("schema"),parentSchema:new t.Name("parentSchema")};function s(e,o,n){let{createErrors:s}=e.it;return!1===s?(0,t._)`{}`:function(e,o,n={}){let{gen:s,it:d}=e,c=[function({errorPath:e},{instancePath:o}){let n=o?(0,t.str)`${e}${(0,r.getErrorPath)(o,r.Type.Str)}`:e;return[i.default.instancePath,(0,t.strConcat)(i.default.instancePath,n)]}(d,n),function({keyword:e,it:{errSchemaPath:i}},{schemaPath:o,parentSchema:n}){let s=n?i:(0,t.str)`${i}/${e}`;return o&&(s=(0,t.str)`${s}${(0,r.getErrorPath)(o,r.Type.Str)}`),[a.schemaPath,s]}(e,n)];return function(e,{params:r,message:o},n){let{keyword:s,data:d,schemaValue:c,it:l}=e,{opts:p,propertyName:u,topSchemaRef:m,schemaPath:f}=l;n.push([a.keyword,s],[a.params,"function"==typeof r?r(e):r||(0,t._)`{}`]),p.messages&&n.push([a.message,"function"==typeof o?o(e):o]),p.verbose&&n.push([a.schema,c],[a.parentSchema,(0,t._)`${m}${f}`],[i.default.data,d]),u&&n.push([a.propertyName,u])}(e,o,c),s.object(...c)}(e,o,n)}}),l4=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.boolOrEmptySchema=e.topBoolOrEmptySchema=void 0;let t=l2(),r=lY(),i=l0(),o={message:"boolean schema is false"};function n(e,r){let{gen:i,data:n}=e;(0,t.reportError)({gen:i,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e},o,void 0,r)}e.topBoolOrEmptySchema=function(e){let{gen:t,schema:o,validateName:a}=e;!1===o?n(e,!1):"object"==typeof o&&!0===o.$async?t.return(i.default.data):(t.assign((0,r._)`${a}.errors`,null),t.return(!0))},e.boolOrEmptySchema=function(e,t){let{gen:r,schema:i}=e;!1===i?(r.var(t,!1),n(e)):r.var(t,!0)}}),l6=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getRules=e.isJSONType=void 0;let t=new Set(["string","number","integer","boolean","null","object","array"]);e.isJSONType=function(e){return"string"==typeof e&&t.has(e)},e.getRules=function(){let e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}}),l3=eb(e=>{function t(e,t){return t.rules.some(t=>r(e,t))}function r(e,t){var r;return void 0!==e[t.keyword]||(null==(r=t.definition.implements)?void 0:r.some(t=>void 0!==e[t]))}Object.defineProperty(e,"__esModule",{value:!0}),e.shouldUseRule=e.shouldUseGroup=e.schemaHasRulesForType=void 0,e.schemaHasRulesForType=function({schema:e,self:r},i){let o=r.RULES.types[i];return o&&!0!==o&&t(e,o)},e.shouldUseGroup=t,e.shouldUseRule=r}),l9=eb(e=>{var t,r;Object.defineProperty(e,"__esModule",{value:!0}),e.reportTypeError=e.checkDataTypes=e.checkDataType=e.coerceAndCheckDataType=e.getJSONTypes=e.getSchemaTypes=e.DataType=void 0;let i=l6(),o=l3(),n=l2(),a=lY(),s=l1();function d(e){let t=Array.isArray(e)?e:e?[e]:[];if(t.every(i.isJSONType))return t;throw Error("type must be JSONType or JSONType[]: "+t.join(","))}(r=t||(e.DataType=t={}))[r.Correct=0]="Correct",r[r.Wrong=1]="Wrong",e.getSchemaTypes=function(e){let t=d(e.type);if(t.includes("null")){if(!1===e.nullable)throw Error("type: null contradicts nullable: false")}else{if(!t.length&&void 0!==e.nullable)throw Error('"nullable" cannot be used without "type"');!0===e.nullable&&t.push("null")}return t},e.getJSONTypes=d,e.coerceAndCheckDataType=function(e,r){var i,n;let{gen:s,data:d,opts:l}=e,u=(i=r,(n=l.coerceTypes)?i.filter(e=>c.has(e)||"array"===n&&"array"===e):[]),f=r.length>0&&!(0===u.length&&1===r.length&&(0,o.schemaHasRulesForType)(e,r[0]));if(f){let i=p(r,d,l.strictNumbers,t.Wrong);s.if(i,()=>{u.length?function(e,t,r){let{gen:i,data:o,opts:n}=e,s=i.let("dataType",(0,a._)`typeof ${o}`),d=i.let("coerced",(0,a._)`undefined`);for(let e of("array"===n.coerceTypes&&i.if((0,a._)`${s} == 'object' && Array.isArray(${o}) && ${o}.length == 1`,()=>i.assign(o,(0,a._)`${o}[0]`).assign(s,(0,a._)`typeof ${o}`).if(p(t,o,n.strictNumbers),()=>i.assign(d,o))),i.if((0,a._)`${d} !== undefined`),r))(c.has(e)||"array"===e&&"array"===n.coerceTypes)&&function(e){switch(e){case"string":i.elseIf((0,a._)`${s} == "number" || ${s} == "boolean"`).assign(d,(0,a._)`"" + ${o}`).elseIf((0,a._)`${o} === null`).assign(d,(0,a._)`""`);return;case"number":i.elseIf((0,a._)`${s} == "boolean" || ${o} === null +Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let r of e.seen.entries()){let i=r[1];if(t===r[0]){o(r);continue}if(e.external){let i=e.external.registry.get(r[0])?.id;if(t!==r[0]&&i){o(r);continue}}if(e.metadataRegistry.get(r[0])?.id||i.cycle){o(r);continue}i.count>1&&"ref"===e.reused&&o(r)}e.external&&(e.sharedDefsExtractedFor=e.external)}let iL=new Set(["type","properties","required","additionalProperties"]),iU=["oneOf","anyOf"];function iH(e){let t=e.additionalProperties;return void 0===t||!1===t||"object"!=typeof t||null===t?null:Object.keys(t).length?t:null}function iG(e){let t=[];for(let r of e){if("object"!=typeof r||"object"!==r.type)return null;for(let e in r)if(!iL.has(e))return null;t.push(r)}let r={},i=new Set;for(let e of t){for(let i in e.properties){if(Object.prototype.hasOwnProperty.call(r,i))continue;let e=[];for(let r of t){let t=r.properties?.[i]??iH(r);null!=t&&(e.some(e=>JSON.stringify(e)===JSON.stringify(t))||e.push(t))}eT(r,i,1===e.length?e[0]:iG(e)??{allOf:e})}for(let t of e.required??[])i.add(t)}let o={type:"object",properties:r};if(i.size&&(o.required=[...i]),t.every(e=>!1===e.additionalProperties))o.additionalProperties=!1;else{let e=[];for(let r of t){let t=iH(r);t&&!e.some(e=>JSON.stringify(e)===JSON.stringify(t))&&e.push(t)}1===e.length?o.additionalProperties=e[0]:e.length>1&&(o.additionalProperties={allOf:e})}return o}function iB(e,t){let r=e.seen.get(t);if(!r)throw Error("Unprocessed schema. This is a bug in Zod.");let i=t=>{let r=e.seen.get(t);if(null===r.ref)return;let o=r.def??r.schema,n={...o},a=r.ref;if(r.ref=null,a){i(a);let r=e.seen.get(a),s=r.schema;if(s.$ref&&("draft-07"===e.target||"draft-04"===e.target||"openapi-3.0"===e.target)?(o.allOf=o.allOf??[],o.allOf.push(s)):iM(o,s),iM(o,n),t._zod.parent===a)for(let e in o)"$ref"!==e&&"allOf"!==e&&(e in n||delete o[e]);if(s.$ref&&r.def)for(let e in o)"$ref"!==e&&"allOf"!==e&&e in r.def&&JSON.stringify(o[e])===JSON.stringify(r.def[e])&&delete o[e]}let s=t._zod.parent;if(s&&s!==a){i(s);let t=e.seen.get(s);if(t?.schema.$ref&&(o.$ref=t.schema.$ref,t.def))for(let e in o)"$ref"!==e&&"allOf"!==e&&e in t.def&&JSON.stringify(o[e])===JSON.stringify(t.def[e])&&delete o[e]}e.override({zodSchema:t,jsonSchema:o,path:r.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(let t of[...e.seen.entries()].reverse())i(t[0]);if("openapi-3.0"!==e.target)for(let t of e.seen.entries())!function e(t){let r=t.anyOf;if(!Array.isArray(r)||0===r.length||void 0!==t.type)return;let i=[];for(let t of r){if(!t||"object"!=typeof t)return;e(t);let r=Object.keys(t);if(1!==r.length||"type"!==r[0])return;let o=t.type;for(let e of Array.isArray(o)?o:[o]){if("string"!=typeof e)return;i.includes(e)||i.push(e)}}delete t.anyOf,t.type=1===i.length?i[0]:i}(t[1].def??t[1].schema);for(let t of e.deferred)t();if(e.intersections.length){let t=new Map;for(let r of e.seen.values())for(let e of[r.schema,r.def]){let r=e?.allOf;if(!Array.isArray(r))continue;let i=t.get(r);i?i.push(e):t.set(r,[e])}for(let r of e.intersections)for(let e of t.get(r)??[])!function(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let t of iL)if(t in e)return;let r=t.filter(e=>iU.some(t=>Array.isArray(e[t]))),i=null;if(r.length){let e=r[0],o=iU.find(t=>Array.isArray(e[t]));if(1!==Object.keys(e).length)return;let n=t.filter(t=>t!==e),a=e[o].map(e=>iG([...n,e]));if(a.some(e=>!e))return;i={[o]:a}}else i=iG(t);i&&(delete e.allOf,iM(e,i))}(e)}}let o={};if("draft-2020-12"===e.target?o.$schema="https://json-schema.org/draft/2020-12/schema":"draft-07"===e.target?o.$schema="http://json-schema.org/draft-07/schema#":"draft-04"===e.target?o.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){let r=e.external.registry.get(t)?.id;if(!r)throw Error("Schema is missing an `id` property");o.$id=e.external.uri(r)}iM(o,r.defId?r.schema:r.def??r.schema);let n=e.metadataRegistry.get(t)?.id;void 0!==n&&o.id===n&&delete o.id;let a=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,eT(a,e.defId,e.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(a).length>0&&("draft-2020-12"===e.target?o.$defs=a:o.definitions=a);try{let r=JSON.parse(JSON.stringify(o));return Object.defineProperty(r,"~standard",{value:{...t["~standard"],jsonSchema:{input:iK(t,"input",e.processors),output:iK(t,"output",e.processors)}},enumerable:!1,writable:!1}),r}catch(e){throw Error("Error converting schema to JSON.")}}let iK=(e,t,r={})=>i=>{let{libraryOptions:o,target:n}=i??{},a=iW({...o??{},target:n,io:t,processors:r});return iz(e,a),iF(a,e),iB(a,e)},iJ=(e,t,r)=>{(void 0===e[t]||r>e[t])&&(e[t]=r)},iZ=(e,t,r)=>{(void 0===e[t]||r{iJ(e,"minimum",t),iZ(e,"maximum",t)},iX=(e,t)=>{e.multipleOf??(e.multipleOf=[]),e.multipleOf.includes(t)||e.multipleOf.push(t)},iY=(e,t)=>{e.patterns??(e.patterns=new Set),e.patterns.add(t)},i1=(e,t)=>{e.mime=e.mime?e.mime.filter(e=>t.includes(e)):[...t]},i0=(e,t)=>{e.format=t,t.includes("int")&&(e.isInt=!0)},i2=(e,t)=>iJ(e,"minimum",t.minimum),i4=(e,t)=>iZ(e,"maximum",t.maximum),i6=e=>(t,r)=>{i0(t,r.format);let[i,o]=e[r.format];iJ(t,"minimum",i),iZ(t,"maximum",o)},i3={greater_than:(e,t)=>iJ(e,t.inclusive?"minimum":"exclusiveMinimum",t.value),less_than:(e,t)=>iZ(e,t.inclusive?"maximum":"exclusiveMaximum",t.value),multiple_of:(e,t)=>iX(e,t.value),number_format:i6(eZ),bigint_format:i6(eQ),min_length:i2,max_length:i4,length_equals:(e,t)=>iQ(e,t.length),min_size:i2,max_size:i4,size_equals:(e,t)=>iQ(e,t.size),string_format:(e,t)=>{i0(e,t.format),t.pattern&&iY(e,t.pattern),("base64"===t.format||"base64url"===t.format)&&(e.contentEncoding=t.format),(t.local||-1===t.precision)&&(e.laxFormat=!0)},mime_type:(e,t)=>i1(e,t.mime)};function i9(e){let t={},r=e._zod.def;for(let i of e._zod.traits.has("$ZodCheck")?[e,...r.checks??[]]:r.checks??[])i3[i._zod.def.check]?.(t,i._zod.def);let i=e._zod.bag;for(let e of(void 0!==i.minimum&&iJ(t,"minimum",i.minimum),void 0!==i.exclusiveMinimum&&iJ(t,"exclusiveMinimum",i.exclusiveMinimum),void 0!==i.maximum&&iZ(t,"maximum",i.maximum),void 0!==i.exclusiveMaximum&&iZ(t,"exclusiveMaximum",i.exclusiveMaximum),void 0!==i.multipleOf&&iX(t,i.multipleOf),void 0!==i.format&&(t.format??(t.format=i.format),i.format.includes("int")&&(t.isInt=!0)),i.mime&&i1(t,i.mime),i.patterns??[]))iY(t,e);return t}let i5={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},i8=new Map([[rO,/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/],[rA,/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/]]),i7=e=>i8.get(e)??e,oe=(e,t,r,i)=>{r.type="string";let{minimum:o,maximum:n,format:a,patterns:s,contentEncoding:d,laxFormat:c}=i9(e);if("number"==typeof o&&(r.minLength=o),"number"==typeof n&&(r.maxLength=n),a&&(r.format=i5[a]??a,""===r.format&&delete r.format,("time"===a||c)&&delete r.format),d&&(r.contentEncoding=d),s&&s.size>0){let e=[...s].map(i7);1===e.length?r.pattern=e[0].source:e.length>1&&(r.allOf=[...e.map(e=>({..."draft-07"===t.target||"draft-04"===t.target||"openapi-3.0"===t.target?{type:"string"}:{},pattern:e.source}))])}},ot=(e,t,r,i)=>{let{minimum:o,maximum:n,multipleOf:a,exclusiveMaximum:s,exclusiveMinimum:d,isInt:c}=i9(e);r.type=c?"integer":"number";let l="number"==typeof d&&d>=(o??-1/0),p="number"==typeof s&&s<=(n??1/0),u="draft-04"===t.target||"openapi-3.0"===t.target;if(l?u?(r.minimum=d,r.exclusiveMinimum=!0):r.exclusiveMinimum=d:"number"==typeof o&&(r.minimum=o),p?u?(r.maximum=s,r.exclusiveMaximum=!0):r.exclusiveMaximum=s:"number"==typeof n&&(r.maximum=n),a){let o=new Set;for(let n of a)Number.isFinite(n)&&0!==n?o.add(Math.abs(n)):iN(e,t,r,i,`A multipleOf divisor of ${n} cannot be represented in JSON Schema`);let[n,...s]=o;void 0!==n&&(r.multipleOf=n),s.length&&(r.allOf=[...r.allOf??[],...s.map(e=>({multipleOf:e}))])}},or=(e,t,r,i)=>{r.type="boolean"},oi=(e,t,r,i)=>{"openapi-3.0"===t.target?(r.type="string",r.nullable=!0,r.enum=[null]):r.type="null"},oo=(e,t,r,i)=>{r.not={}},on=(e,t,r,i)=>{},oa=(e,t,r,i)=>{},os=(e,t,r,i)=>{let o=eP(e._zod.def.entries);if(0===o.length){r.not={};return}o.every(e=>"number"==typeof e)&&(r.type="number"),o.every(e=>"string"==typeof e)&&(r.type="string"),r.enum=o},od=(e,t,r,i)=>{let o=e._zod.def;if(0===o.values.length){r.not={};return}let n=[];for(let a of o.values)if(void 0===a){if(iN(e,t,r,i,"Literal `undefined` cannot be represented in JSON Schema"))return}else if("bigint"==typeof a){if(iN(e,t,r,i,"BigInt literals cannot be represented in JSON Schema"))return;n.push(Number(a))}else n.push(a);if(0===n.length);else if(1===n.length){let e=n[0];r.type=null===e?"null":typeof e,"draft-04"===t.target||"openapi-3.0"===t.target?r.enum=[e]:r.const=e}else n.every(e=>"number"==typeof e)&&(r.type="number"),n.every(e=>"string"==typeof e)&&(r.type="string"),n.every(e=>"boolean"==typeof e)&&(r.type="boolean"),n.every(e=>null===e)&&(r.type="null"),r.enum=n},oc=(e,t,r,i)=>{iN(e,t,r,i,"Custom types cannot be represented in JSON Schema")},ol=(e,t,r,i)=>{iN(e,t,r,i,"Transforms cannot be represented in JSON Schema")},op=(e,t,r,i)=>{let o=e._zod.def,{minimum:n,maximum:a}=i9(e);"number"==typeof n&&(r.minItems=n),"number"==typeof a&&(r.maxItems=a),r.type="array",r.items=iz(o.element,t,{...i,path:[...i.path,"items"]})};function ou(e){let t=e._zod.def;return"pipe"===t.type&&t.in._zod.traits.has("$ZodTransform")?ou(t.out):"catch"===t.type?ou(t.innerType):e._zod.optin}let om=(e,t,r,i)=>{let o=e._zod.def,n=o.shape;if(Object.getOwnPropertySymbols(n).length&&iN(e,t,r,i,"Symbol keys cannot be represented in JSON Schema"))return;for(let e in r.type="object",r.properties={},n)eT(r.properties,e,iz(n[e],t,{...i,path:[...i.path,"properties",e]}));let a=[];for(let e of Object.keys(n)){let r=o.shape[e];("input"===t.io?void 0===ou(r):void 0===r._zod.optout)&&a.push(e)}a.length>0&&(r.required=a),o.catchall?._zod.def.type==="never"?r.additionalProperties=!1:o.catchall?o.catchall&&(r.additionalProperties=iz(o.catchall,t,{...i,path:[...i.path,"additionalProperties"]})):"output"===t.io&&(r.additionalProperties=!1)},of=(e,t,r,i)=>{let o=e._zod.def,n=!1===o.inclusive,a=o.options.map((e,r)=>iz(e,t,{...i,path:[...i.path,n?"oneOf":"anyOf",r]}));n?r.oneOf=a:r.anyOf=a},oh=(e,t,r,i)=>{let o=e._zod.def,n=iz(o.left,t,{...i,path:[...i.path,"allOf",0]}),a=iz(o.right,t,{...i,path:[...i.path,"allOf",1]}),s=e=>"allOf"in e&&1===Object.keys(e).length,d=[...s(n)?n.allOf:[n],...s(a)?a.allOf:[a]];r.allOf=d,t.intersections.push(d)},oy=new WeakMap,og=(e,t,r,i)=>{let o=e._zod.def;r.type="object";let n=o.keyType,a=i9(n).patterns;if("loose"===o.mode&&a&&a.size>0){let e=iz(o.valueType,t,{...i,path:[...i.path,"patternProperties","*"]});for(let t of(r.patternProperties={},a))eT(r.patternProperties,i7(t).source,e)}else{if("draft-07"===t.target||"draft-2020-12"===t.target){r.propertyNames=iz(o.keyType,t,{...i,path:[...i.path,"propertyNames"]});let n=oy.get(t);n||(n=[],oy.set(t,n),t.deferred.push(()=>(function(e){let t=new Map;for(let r of e.seen.values())r.def&&!t.has(r.schema)&&t.set(r.schema,r);let r=new Map;for(let i of oy.get(e)??[]){let o=e.seen.get(i),n=(o?.def??o?.schema)?.propertyNames;if(!n||!0===n||r.has(n))continue;let a=function e(t,r,i){if(r.$ref){if(i.has(r))return r;i.add(r);let o=t.get(r)?.def;if(!o)return r;let n=e(t,o,i);return n===o?r:n}for(let o of["anyOf","oneOf"]){let n=r[o];if(!Array.isArray(n))continue;let a=n.map(r=>e(t,r,i));a.some((e,t)=>e!==n[t])&&(r={...r,[o]:a})}let o=Array.isArray(r.type)?r.type:[r.type],n=!o.includes("string")&&o.some(e=>"number"===e||"integer"===e),a=r.enum??(void 0!==r.const?[r.const]:void 0);if(!n&&!a?.some(e=>"number"==typeof e))return r;let{minimum:s,maximum:d,exclusiveMinimum:c,exclusiveMaximum:l,multipleOf:p,format:u,id:m,...f}=r;return f.enum?f.enum=f.enum.map(e=>"number"==typeof e?String(e):e):"number"==typeof f.const&&(f.const=String(f.const)),n&&(f.type="string",a||(f.pattern=(o.includes("number")?tL:tF).source)),f}(t,n,new Set);a!==n&&r.set(n,a)}if(r.size)for(let t of e.seen.values())for(let e of[t.schema,t.def]){let t=e&&r.get(e.propertyNames);t&&(e.propertyNames=t)}})(t))),n.push(e)}r.additionalProperties=iz(o.valueType,t,{...i,path:[...i.path,"additionalProperties"]})}let s=n._zod.values,d="input"===t.io&&void 0!==ou(o.valueType);if(s&&!o.partial&&!d){let e=[...s].filter(e=>"string"==typeof e||"number"==typeof e);e.length>0&&(r.required=e.map(String))}},o_=(e,t,r,i)=>{let o=e._zod.def,n=iz(o.innerType,t,i),a=t.seen.get(e);"openapi-3.0"===t.target?(a.ref=o.innerType,r.nullable=!0):r.anyOf=[n,{type:"null"}]},ov=(e,t,r,i)=>{let o=e._zod.def;iz(o.innerType,t,i),t.seen.get(e).ref=o.innerType},ob=Symbol();function o$(e,t,r,i,o){let n=!1,a=JSON.stringify(e,(e,t)=>"bigint"!=typeof t?t:(n=!0,null));return n?(iN(t,r,i,o,"BigInt defaults cannot be represented in JSON Schema"),ob):JSON.parse(a)}let oS=(e,t,r,i)=>{let o=e._zod.def;iz(o.innerType,t,i),t.seen.get(e).ref=o.innerType;let n=o$(o.defaultValue,e,t,r,i);n!==ob&&(r.default=n)},ok=(e,t,r,i)=>{let o=e._zod.def;if(iz(o.innerType,t,i),t.seen.get(e).ref=o.innerType,"input"!==t.io)return;let n=o$(o.defaultValue,e,t,r,i);n!==ob&&(r._prefault=n)},ow=(e,t,r,i)=>{let o,n=e._zod.def;iz(n.innerType,t,i),t.seen.get(e).ref=n.innerType;try{o=n.catchValue(void 0)}catch{iN(e,t,r,i,"Dynamic catch values are not supported in JSON Schema");return}r.default=o},oR=(e,t,r,i)=>{let o=e._zod.def,n=o.in._zod.traits.has("$ZodTransform"),a="input"===t.io?n?o.out:o.in:o.out;iz(a,t,i),t.seen.get(e).ref=a},oP=(e,t,r,i)=>{let o=e._zod.def;iz(o.innerType,t,i),t.seen.get(e).ref=o.innerType,r.readOnly=!0},oV=(e,t,r,i)=>{let o=e._zod.def;iz(o.innerType,t,i),t.seen.get(e).ref=o.innerType},oq=(e,t,r,i)=>{let o=e._zod.innerType;iz(o,t,i),t.seen.get(e).ref=o},oI={string:oe,number:ot,boolean:or,bigint:(e,t,r,i)=>{iN(e,t,r,i,"BigInt cannot be represented in JSON Schema")},symbol:(e,t,r,i)=>{iN(e,t,r,i,"Symbols cannot be represented in JSON Schema")},null:oi,undefined:(e,t,r,i)=>{iN(e,t,r,i,"Undefined cannot be represented in JSON Schema")},void:(e,t,r,i)=>{iN(e,t,r,i,"Void cannot be represented in JSON Schema")},never:oo,any:on,unknown:oa,date:(e,t,r,i)=>{iN(e,t,r,i,"Date cannot be represented in JSON Schema")},enum:os,literal:od,nan:(e,t,r,i)=>{iN(e,t,r,i,"NaN cannot be represented in JSON Schema")},template_literal:(e,t,r,i)=>{let o=e._zod.pattern;if(!o)throw Error("Pattern not found in template literal");r.type="string",r.pattern=o.source},file:(e,t,r,i)=>{r.type="string",r.format="binary",r.contentEncoding="binary";let{minimum:o,maximum:n,mime:a}=i9(e);void 0!==o&&(r.minLength=o),void 0!==n&&(r.maxLength=n),a&&(0===a.length?r.not={}:1===a.length?r.contentMediaType=a[0]:r.anyOf=a.map(e=>({contentMediaType:e})))},success:(e,t,r,i)=>{r.type="boolean"},custom:oc,function:(e,t,r,i)=>{iN(e,t,r,i,"Function types cannot be represented in JSON Schema")},transform:ol,map:(e,t,r,i)=>{iN(e,t,r,i,"Map cannot be represented in JSON Schema")},set:(e,t,r,i)=>{iN(e,t,r,i,"Set cannot be represented in JSON Schema")},array:op,object:om,union:of,intersection:oh,tuple:(e,t,r,i)=>{let o=e._zod.def;r.type="array";let n="draft-2020-12"===t.target?"prefixItems":"items",a="draft-2020-12"===t.target||"openapi-3.0"===t.target?"items":"additionalItems",s=o.items.map((e,r)=>iz(e,t,{...i,path:[...i.path,n,r]})),d=o.rest?iz(o.rest,t,{...i,path:[...i.path,a,..."openapi-3.0"===t.target?[o.items.length]:[]]}):null,c=o.items.length;for(;c>0;){let e=o.items[c-1];if(!("input"===t.io?void 0!==ou(e):"optional"===e._zod.optout))break;c--}let l=o.items.length,p=!o.rest;"draft-2020-12"===t.target?(r.prefixItems=s,p?r.items=!1:d&&(r.items=d)):"openapi-3.0"===t.target?(r.items={anyOf:s},d&&r.items.anyOf.push(d)):(r.items=s,p?r.additionalItems=!1:d&&(r.additionalItems=d)),c>0&&(r.minItems=c),p&&(r.maxItems=l);let{minimum:u,maximum:m}=i9(e);"number"==typeof u&&(r.minItems=u),"number"==typeof m&&(r.maxItems=m)},record:og,nullable:o_,nonoptional:ov,default:oS,prefault:ok,catch:ow,pipe:oR,readonly:oP,promise:(e,t,r,i)=>{let o=e._zod.def;iz(o.innerType,t,i),t.seen.get(e).ref=o.innerType},optional:oV,lazy:oq};function ox(e,t){if("_idmap"in e){let r=iW({...t,processors:oI}),i={};for(let t of e._idmap.entries()){let[e,i]=t;iz(i,r)}let o={};for(let n of(r.external={registry:e,uri:t?.uri,defs:i},e._idmap.entries())){let[e,t]=n;iF(r,t),eT(o,e,iB(r,t))}return Object.keys(i).length>0&&(o.__shared={["draft-2020-12"===r.target?"$defs":"definitions"]:i}),{schemas:o}}let r=iW({...t,processors:oI});return iz(e,r),iF(r,e),iB(r,e)}let oj={get:function(){let e=this._zod;return e.message??(e.message=JSON.stringify(e.def,eq,2)),e.message},set:function(e){this._zod.message=e},enumerable:!0,configurable:!0},oC={value:void 0,enumerable:!1},oT=new WeakSet([Object.prototype,Error.prototype]),oO=(e,t)=>{e.name="$ZodError",oC.value=t,Object.defineProperty(e,"issues",oC),oC.value=void 0,Object.defineProperty(e,"message",oj);let r=Object.getPrototypeOf(e);oT.has(r)||(oT.add(r),Object.defineProperty(r,"toString",{configurable:!0,enumerable:!1,get(){let e=()=>this.message;return Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0})}}))},oE=tc("$ZodError",oO);function oA(e,t){return{callee:t?.callee??e,Err:t?.Err}}tc("$ZodError",oO,void 0,{Parent:Error});let oM=e=>{let t=(r,i,o,n)=>{let a=o?{...o,async:!1}:{async:!1},s=r._zod.run({value:i,issues:[]},a);if(s instanceof Promise)throw new tl;if(s.issues.length){let r=new(n?.Err??e)(s.issues.map(e=>e9(e,a,tm())));throw ez(r,n?.callee??t),r}return s.value};return t},oW=e=>{let t=async(r,i,o,n)=>{let a=o?{...o,async:!0}:{async:!0},s=r._zod.run({value:i,issues:[]},a);if(s instanceof Promise&&(s=await s),s.issues.length){let r=new(n?.Err??e)(s.issues.map(e=>e9(e,a,tm())));throw ez(r,n?.callee??t),r}return s.value};return t},oN=e=>(t,r,i)=>{let o=i?{...i,async:!1}:{async:!1},n=t._zod.run({value:r,issues:[]},o);if(n instanceof Promise)throw new tl;return n.issues.length?oz(e,n.issues,o):{success:!0,data:n.value}};function oz(e,t,r){let i;return{success:!1,get error(){return i||(i=new e(t.map(e=>e9(e,r,tm()))),t=void 0,r=void 0),i},set error(e){i=e,t=void 0,r=void 0}}}let oD=e=>async(t,r,i)=>{let o=i?{...i,async:!0}:{async:!0},n=t._zod.run({value:r,issues:[]},o);return n instanceof Promise&&(n=await n),n.issues.length?oz(e,n.issues,o):{success:!0,data:n.value}},oF=Symbol.for("zod.compile.invalid"),oL=Symbol.for("zod.compile.fallback"),oU=new WeakSet([Object.prototype,Error.prototype]);function oH(e,t,r){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){let e=r(this);return Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0})}})}let oG=tc("ZodError",(e,t)=>{oE.init(e,t),e.name="ZodError";let r=Object.getPrototypeOf(e);oU.has(r)||(oU.add(r),oH(r,"format",e=>t=>(function(e,t=e=>e.message){let r={_errors:[]},i=(e,o=[])=>{for(let n of e.issues)if("invalid_union"===n.code&&n.errors.length)n.errors.map(e=>i({issues:e},[...o,...n.path]));else if("invalid_key"===n.code)i({issues:n.issues},[...o,...n.path]);else if("invalid_element"===n.code)i({issues:n.issues},[...o,...n.path]);else{let e=[...o,...n.path];if(0===e.length)r._errors.push(t(n));else{let i=r,o=0;for(;ot=>(function(e,t=e=>e.message){let r={},i=[];for(let a of e.issues)if(a.path.length>0){var o,n;(o=a.path[0],n=()=>[],!Object.prototype.hasOwnProperty.call(r,o)&&("__proto__"===o?Object.defineProperty(r,o,{value:n(),writable:!0,enumerable:!0,configurable:!0}):r[o]=n()),r[o]).push(t(a))}else i.push(t(a));return{formErrors:i,fieldErrors:r}})(e,t)),oH(r,"addIssue",e=>t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,eq,2)}),oH(r,"addIssues",e=>t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,eq,2)}),Object.defineProperty(r,"isEmpty",{configurable:!0,enumerable:!1,get(){return 0===this.issues.length}}))},void 0,{Parent:Error}),oB=oM(oG),oK=oW(oG),oJ=oN(oG),oZ=oD(oG),oQ=(y=oM(oG),g=(e,t,r,i)=>y(e,t,r?{...r,direction:"backward"}:{direction:"backward"},oA(g,i))),oX=(_=oM(oG),v=(e,t,r,i)=>_(e,t,r,oA(v,i))),oY=(b=oW(oG),$=async(e,t,r,i)=>{let o=r?{...r,direction:"backward"}:{direction:"backward"};return await b(e,t,o,oA($,i))}),o1=(S=oW(oG),k=async(e,t,r,i)=>await S(e,t,r,oA(k,i))),o0=(e,t,r)=>{let i=r?{...r,direction:"backward"}:{direction:"backward"};return oN(oG)(e,t,i)},o2=(e,t,r)=>oN(oG)(e,t,r),o4=async(e,t,r)=>{let i=r?{...r,direction:"backward"}:{direction:"backward"};return oD(oG)(e,t,i)},o6=async(e,t,r)=>oD(oG)(e,t,r);function o3(){tu.memoizer||tm({memoizer:t$})}let o9=tc("ZodType",(e,t)=>(tu.localeError||tm({localeError:(()=>{let e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}},t={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",currency_code:"currency code",credit_card:"credit card number",iban:"IBAN",jwt:"JWT",template_literal:"input"},r={nan:"NaN"};function i(e,t){return"number"!==e||"number"!=typeof t||Number.isFinite(t)?r[e]??e:String(t)}return r=>{switch(r.code){case"invalid_type":{let e=i(r.expected),t=i(function(e){let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":if(null===e)return"null";if(Array.isArray(e))return"array";if(e&&Object.getPrototypeOf(e)!==Object.prototype&&"constructor"in e&&e.constructor)return e.constructor.name}return t}(r.input),r.input);return`Invalid input: expected ${e}, received ${t}`}case"invalid_value":if(1===r.values.length)return`Invalid input: expected ${eJ(r.values[0])}`;return`Invalid option: expected one of ${eV(r.values,"|")}`;case"too_big":{let t=r.exact?"exactly ":r.inclusive?"<=":"<",i=e[r.origin]??null;if(i)return`Too big: expected ${r.origin??"value"} to have ${t}${r.maximum.toString()} ${i.unit??"elements"}`;return`Too big: expected ${r.origin??"value"} to be ${t}${r.maximum.toString()}`}case"too_small":{let t=r.exact?"exactly ":r.inclusive?">=":">",i=e[r.origin]??null;if(i)return`Too small: expected ${r.origin} to have ${t}${r.minimum.toString()} ${i.unit}`;return`Too small: expected ${r.origin} to be ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Invalid string: must start with "${r.prefix}"`;if("ends_with"===r.format)return`Invalid string: must end with "${r.suffix}"`;if("includes"===r.format)return`Invalid string: must include "${r.includes}"`;if("regex"===r.format)return`Invalid string: must match pattern ${r.pattern}`;return`Invalid ${t[r.format]??r.format}`;case"not_multiple_of":return`Invalid number: must be a multiple of ${r.divisor}`;case"unrecognized_keys":return`Unrecognized key${r.keys.length>1?"s":""}: ${eV(r.keys,", ")}`;case"invalid_key":return`Invalid key in ${r.origin}`;case"invalid_union":if(r.options&&Array.isArray(r.options)&&r.options.length>0){let e=r.options.map(e=>`'${e}'`).join(" | ");return`Invalid discriminator value. Expected ${e}`}if(!1===r.inclusive)return"Invalid input: more than one option matched";return"Invalid input";case"invalid_element":return`Invalid value in ${r.origin}`;default:return"Invalid input"}}})()}),ro.init(e,t),e.def=t,e.type=t.type,e),{check(...e){let t=this.def;return this.clone(eN(t,{checks:[...t.checks??[],...e.map(e=>"function"==typeof e?{_zod:{check:e,def:{check:"custom"},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return eB(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(function(e,t={}){return new as({type:"custom",check:"custom",fn:e,...eK(t)})}(e,t))},superRefine(e,t){return this.check(function(e,t){var r;let i,o;return r=t=>(t.addIssue=e=>{"string"==typeof e?t.issues.push(te(e,t.value,i._zod.def)):(e.fatal&&(e.continue=!1),e.code??(e.code="custom"),"input"in e||(e.input=t.value),e.inst??(e.inst=i),e.continue??(e.continue=!i._zod.def.abort),t.issues.push(te(e)))},e(t.value,t)),(o=new tK({check:"custom",...eK(t)}))._zod.check=r,i=o}(e,t))},overwrite(e){return this.check(iA(e))},optional(){return n4(this)},exactOptional(){var e;return e=this,new n6({type:"optional",innerType:e})},nullable(){return n9(this)},nullish(){return n4(n9(this))},nonoptional(e){var t;return t=this,new n7({type:"nonoptional",innerType:t,...eK(e)})},array(){return nW(this)},or(e){return nL([this,e])},and(e){return nB(this,e)},transform(e){return ar(this,n0(e))},default(e){var t,r;return t=this,r=e,new n5({type:"default",innerType:t,get defaultValue(){return"function"==typeof r?r():eU(r)}})},prefault(e){var t,r;return t=this,r=e,new n8({type:"prefault",innerType:t,get defaultValue(){return"function"==typeof r?r():eU(r)}})},catch(e){return function(e,t){let r;return new ae({type:"catch",innerType:e,catchValue:"function"==typeof t?t:((r=()=>t)["~constantCatch"]=!0,r)})}(this,e)},pipe(e){return ar(this,e)},readonly(){var e;return e=this,new ao({type:"readonly",innerType:e})},describe(e){let t=this.clone();return iS.add(t,{description:e}),t},meta(...e){if(0===e.length)return iS.get(this);let t=this.clone();return iS.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return 0===t.length?e(this):e(this,...t)},get"~standard"(){return tt(this,"~standard",{...ra(this),jsonSchema:{input:iK(this,"input"),output:iK(this,"output")}},!1)},set"~standard"(e){tt(this,"~standard",e)},parse:function e(t,r){return oB(this,t,r,{callee:e})},parseAsync:async function e(t,r){return await oK(this,t,r,{callee:e})},safeParse(e,t){return oJ(this,e,t)},async safeParseAsync(e,t){return oZ(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){tt(this,"spa",e)},validate(e,t){let r=this._zod.bag.validator;if(void 0!==r){if(r(e)!==oF)return!0;if(!0===r.definite&&void 0===t)return!1}return function(e,t,r){let i,o=r?{...r,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},n=e._zod.bag.fallbackRun;if(n?(o[oL]=!0,i=n({value:t,issues:[]},o)):i=e._zod.run({value:t,issues:[]},o),i instanceof Promise)throw new tl;return 0===i.issues.length}(this,e,t)},validateAsync(e,t){return(async(e,t,r)=>{let i=r?{...r,async:!0,abortEarly:!0}:{async:!0,abortEarly:!0},o=e._zod.run({value:t,issues:[]},i);return o instanceof Promise&&(o=await o),0===o.issues.length})(this,e,t)},encode:function e(t,r){return oQ(this,t,r,{callee:e})},decode:function e(t,r){return oX(this,t,r,{callee:e})},encodeAsync:async function e(t,r){return await oY(this,t,r,{callee:e})},decodeAsync:async function e(t,r){return await o1(this,t,r,{callee:e})},safeEncode(e,t){return o0(this,e,t)},safeDecode(e,t){return o2(this,e,t)},async safeEncodeAsync(e,t){return o4(this,e,t)},async safeDecodeAsync(e,t){return o6(this,e,t)},toJSONSchema(e){return((e,t={})=>r=>{let i=iW({...r,processors:t});return iz(e,i),iF(i,e),iB(i,e)})(this,{})(e)},get description(){return iS.get(this)?.description},get _def(){return this._zod.def}}),o5=tc("_ZodString",(e,t)=>{rs.init(e,t),o9.init(e,t),e._zod.processJSONSchema=(t,r,i)=>oe(e,t,r,i)},tr({format:e=>i9(e).format??null,minLength:e=>i9(e).minimum??null,maxLength:e=>i9(e).maximum??null},{regex(...e){return this.check(function(e,t){return new t3({check:"string_format",format:"regex",...eK(t),pattern:e})}(...e))},includes(...e){return this.check(function(e,t){return new t8({check:"string_format",format:"includes",...eK(t),includes:e})}(...e))},startsWith(...e){return this.check(function(e,t){return new t7({check:"string_format",format:"starts_with",...eK(t),prefix:e})}(...e))},endsWith(...e){return this.check(function(e,t){return new re({check:"string_format",format:"ends_with",...eK(t),suffix:e})}(...e))},min(...e){return this.check(iO(...e))},max(...e){return this.check(iT(...e))},length(...e){return this.check(iE(...e))},nonempty(...e){return this.check(iO(1,...e))},lowercase(e){return this.check(new t9({check:"string_format",format:"lowercase",...eK(e)}))},uppercase(e){return this.check(new t5({check:"string_format",format:"uppercase",...eK(e)}))},trim(){return this.check(iA(e=>e.trim()))},normalize(...e){return this.check(function(e){return iA(t=>t.normalize(e))}(...e))},toLowerCase(){return this.check(iA(e=>e.toLowerCase()))},toUpperCase(){return this.check(iA(e=>e.toUpperCase()))},slugify(){return this.check(iA(e=>e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")))}})),o8=tc("ZodString",(e,t)=>{rs.init(e,t),o5.init(e,t)},{email(e){return this.check(iw(nn,e))},url(e){return this.check(iR(nd,e))},jwt(e){return this.check(new nk({type:"string",format:"jwt",check:"string_format",abort:!1,...eK(e)}))},emoji(e){return this.check(new nc({type:"string",format:"emoji",check:"string_format",abort:!1,...eK(e)}))},guid(e){return this.check(new na({type:"string",format:"guid",check:"string_format",abort:!1,...eK(e)}))},uuid(e){return this.check(new ns({type:"string",format:"uuid",check:"string_format",abort:!1,...eK(e)}))},uuidv4(e){return this.check(new ns({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...eK(e)}))},uuidv6(e){return this.check(new ns({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...eK(e)}))},uuidv7(e){return this.check(new ns({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...eK(e)}))},nanoid(e){return this.check(new nl({type:"string",format:"nanoid",check:"string_format",abort:!1,...eK(e)}))},cuid(e){return this.check(new np({type:"string",format:"cuid",check:"string_format",abort:!1,...eK(e)}))},cuid2(e){return this.check(new nu({type:"string",format:"cuid2",check:"string_format",abort:!1,...eK(e)}))},ulid(e){return this.check(new nm({type:"string",format:"ulid",check:"string_format",abort:!1,...eK(e)}))},base64(e){return this.check(new nb({type:"string",format:"base64",check:"string_format",abort:!1,...eK(e)}))},base64url(e){return this.check(new n$({type:"string",format:"base64url",check:"string_format",abort:!1,...eK(e)}))},xid(e){return this.check(new nf({type:"string",format:"xid",check:"string_format",abort:!1,...eK(e)}))},ksuid(e){return this.check(new nh({type:"string",format:"ksuid",check:"string_format",abort:!1,...eK(e)}))},ipv4(e){return this.check(new ny({type:"string",format:"ipv4",check:"string_format",abort:!1,...eK(e)}))},ipv6(e){return this.check(new ng({type:"string",format:"ipv6",check:"string_format",abort:!1,...eK(e)}))},cidrv4(e){return this.check(new n_({type:"string",format:"cidrv4",check:"string_format",abort:!1,...eK(e)}))},cidrv6(e){return this.check(new nv({type:"string",format:"cidrv6",check:"string_format",abort:!1,...eK(e)}))},e164(e){return this.check(new nS({type:"string",format:"e164",check:"string_format",abort:!1,...eK(e)}))},datetime(e){return this.check(iP(nt,e))},date(e){return this.check(iV(nr,e))},time(e){return this.check(new ni({type:"string",format:"time",check:"string_format",precision:null,...eK(e)}))},duration(e){return this.check(new no({type:"string",format:"duration",check:"string_format",...eK(e)}))}});function o7(e){return new o8(ik({type:"string",...eK(e)}))}let ne=tc("ZodStringFormat",(e,t)=>{rd.init(e,t),o5.init(e,t)}),nt=tc("ZodISODateTime",(e,t)=>{rk.init(e,t),ne.init(e,t)}),nr=tc("ZodISODate",(e,t)=>{rw.init(e,t),ne.init(e,t)}),ni=tc("ZodISOTime",(e,t)=>{rR.init(e,t),ne.init(e,t)}),no=tc("ZodISODuration",(e,t)=>{rP.init(e,t),ne.init(e,t)}),nn=tc("ZodEmail",(e,t)=>{rp.init(e,t),ne.init(e,t)}),na=tc("ZodGUID",(e,t)=>{rc.init(e,t),ne.init(e,t)}),ns=tc("ZodUUID",(e,t)=>{rl.init(e,t),ne.init(e,t)}),nd=tc("ZodURL",(e,t)=>{rh.init(e,t),ne.init(e,t)}),nc=tc("ZodEmoji",(e,t)=>{ry.init(e,t),ne.init(e,t)}),nl=tc("ZodNanoID",(e,t)=>{rg.init(e,t),ne.init(e,t)}),np=tc("ZodCUID",(e,t)=>{r_.init(e,t),ne.init(e,t)}),nu=tc("ZodCUID2",(e,t)=>{rv.init(e,t),ne.init(e,t)}),nm=tc("ZodULID",(e,t)=>{rb.init(e,t),ne.init(e,t)}),nf=tc("ZodXID",(e,t)=>{r$.init(e,t),ne.init(e,t)}),nh=tc("ZodKSUID",(e,t)=>{rS.init(e,t),ne.init(e,t)}),ny=tc("ZodIPv4",(e,t)=>{rV.init(e,t),ne.init(e,t)}),ng=tc("ZodIPv6",(e,t)=>{rx.init(e,t),ne.init(e,t)}),n_=tc("ZodCIDRv4",(e,t)=>{rj.init(e,t),ne.init(e,t)}),nv=tc("ZodCIDRv6",(e,t)=>{rC.init(e,t),ne.init(e,t)}),nb=tc("ZodBase64",(e,t)=>{rE.init(e,t),ne.init(e,t)}),n$=tc("ZodBase64URL",(e,t)=>{rM.init(e,t),ne.init(e,t)}),nS=tc("ZodE164",(e,t)=>{rW.init(e,t),ne.init(e,t)}),nk=tc("ZodJWT",(e,t)=>{rN.init(e,t),ne.init(e,t)}),nw=tc("ZodNumber",(e,t)=>{rz.init(e,t),o9.init(e,t),e._zod.processJSONSchema=(t,r,i)=>ot(e,t,r,i),e.isFinite=!0},tr({minValue:e=>{let{minimum:t,exclusiveMinimum:r}=i9(e);return Math.max(t??-1/0,r??-1/0)},maxValue:e=>{let{maximum:t,exclusiveMaximum:r}=i9(e);return Math.min(t??1/0,r??1/0)},isInt:e=>{let{isInt:t,multipleOf:r}=i9(e);return!!t||!!r?.some(Number.isSafeInteger)},format:e=>i9(e).format??null},{gt(e,t){return this.check(ix(e,t))},gte(e,t){return this.check(ij(e,t))},min(e,t){return this.check(ij(e,t))},lt(e,t){return this.check(iq(e,t))},lte(e,t){return this.check(iI(e,t))},max(e,t){return this.check(iI(e,t))},int(e){return this.check(nV(e))},safe(e){return this.check(nV(e))},positive(e){return this.check(ix(0,e))},nonnegative(e){return this.check(ij(0,e))},negative(e){return this.check(iq(0,e))},nonpositive(e){return this.check(iI(0,e))},multipleOf(e,t){return this.check(iC(e,t))},step(e,t){return this.check(iC(e,t))},finite(){return this}}));function nR(e){return new nw(ik({type:"number",checks:[],...eK(e)}))}let nP=tc("ZodNumberFormat",(e,t)=>{rD.init(e,t),nw.init(e,t)});function nV(e){return new nP({type:"number",check:"number_format",abort:!1,format:"safeint",...eK(e)})}let nq=tc("ZodBoolean",(e,t)=>{rF.init(e,t),o9.init(e,t),e._zod.processJSONSchema=(t,r,i)=>or(e,t,r,i)});function nI(e){return new nq({type:"boolean",...eK(e)})}let nx=tc("ZodNull",(e,t)=>{rL.init(e,t),o9.init(e,t),e._zod.processJSONSchema=(t,r,i)=>oi(e,t,r,i)});function nj(e){return new nx({type:"null",...eK(e)})}let nC=tc("ZodAny",(e,t)=>{rU.init(e,t),o9.init(e,t),e._zod.processJSONSchema=(t,r,i)=>on(e,t,r,i)});function nT(){return new nC({type:"any"})}let nO=tc("ZodUnknown",(e,t)=>{rH.init(e,t),o9.init(e,t),e._zod.processJSONSchema=(t,r,i)=>oa(e,t,r,i)});function nE(){return new nO({type:"unknown"})}let nA=tc("ZodNever",(e,t)=>{rG.init(e,t),o9.init(e,t),e._zod.processJSONSchema=(t,r,i)=>oo(e,t,r,i)}),nM=tc("ZodArray",(e,t)=>{o3(),rJ.init(e,t),o9.init(e,t),e._zod.processJSONSchema=(t,r,i)=>op(e,t,r,i),e.element=t.element},{min(e,t){return this.check(iO(e,t))},nonempty(e){return this.check(iO(1,e))},max(e,t){return this.check(iT(e,t))},length(e,t){return this.check(iE(e,t))},unwrap(){return this.element}});function nW(e,t){return new nM({type:"array",element:e,...eK(t)})}let nN=tc("ZodObject",(e,t)=>{var r;let i,o;o3(),r0.init(e,t),o9.init(e,t),e._zod.processJSONSchema=(t,r,i)=>om(e,t,r,i),r="shape",(o=r in(i=Object.getPrototypeOf(e))?void 0:i)&&Object.defineProperty(o,r,{configurable:!0,get(){let e={configurable:!0,writable:!0,enumerable:!1,value:void 0};return Object.defineProperty(this,r,e),e.value=(e=>e._zod.def.shape)(this),Object.defineProperty(this,r,e),e.value},set(e){Object.defineProperty(this,r,{configurable:!0,writable:!0,enumerable:!1,value:e})}})},{keyof(){return nQ(Object.keys(this._zod.def.shape))},catchall(e){return this.clone(eN(this._zod.def,{catchall:e}))},passthrough(){return this.clone(eN(this._zod.def,{catchall:nE()}))},loose(){return this.clone(eN(this._zod.def,{catchall:nE()}))},strict(){return this.clone(eN(this._zod.def,{catchall:new nA({type:"never",...eK(void 0)})}))},strip(){return this.clone(eN(this._zod.def,{catchall:void 0}))},extend(e){if(!eL(e))throw Error("Invalid input to extend: expected a plain object");let t=this._zod.def.checks;if(t&&t.length>0){let t=eE(this);for(let r of Reflect.ownKeys(e))if(void 0!==Object.getOwnPropertyDescriptor(t,r))throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return eB(this,eN(this._zod.def,{shape:eY(this,e)}))},safeExtend(e){if(!eL(e))throw Error("Invalid input to safeExtend: expected a plain object");return eB(this,eN(this._zod.def,{shape:eY(this,e)}))},merge(e){if(!e?._zod?.def)throw Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(this._zod.def.checks?.length)throw Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let t={};return eW(t,this,Reflect.ownKeys(eE(this))),eW(t,e,Reflect.ownKeys(eE(e))),eB(this,eN(this._zod.def,{shape:t,get catchall(){return e._zod.def.catchall},checks:e._zod.def.checks??[]}))},pick(e){return function(e,t){let r=e._zod.def,i=r.checks;if(i&&i.length>0)throw Error(".pick() cannot be used on object schemas containing refinements");let o={};return eW(o,e,eX(e,t)),eB(e,eN(r,{shape:o,checks:[]}))}(this,e)},omit(e){return function(e,t){let r=e._zod.def,i=r.checks;if(i&&i.length>0)throw Error(".omit() cannot be used on object schemas containing refinements");let o=new Set(eX(e,t)),n={};return eW(n,e,Reflect.ownKeys(eE(e)).filter(e=>!o.has(e))),eB(e,eN(r,{shape:n,checks:[]}))}(this,e)},partial(...e){return e1(n2,this,e[0])},exactPartial(...e){return e1(n6,this,e[0],"exactPartial")},required(...e){var t;let r,i;return r=(t=e[0])?new Set(eX(this,t)):void 0,eW(i={},this,Reflect.ownKeys(eE(this)),(e,t)=>r&&!r.has(t)?e:new n7({type:"nonoptional",innerType:e})),eB(this,eN(this._zod.def,{shape:i}))}});function nz(e,t){return new nN({type:"object",shape:e??{},...eK(t)})}function nD(e,t){return new nN({type:"object",shape:e,catchall:nE(),...eK(t)})}let nF=tc("ZodUnion",(e,t)=>{r4.init(e,t),o9.init(e,t),e._zod.processJSONSchema=(t,r,i)=>of(e,t,r,i),e.options=t.options});function nL(e,t){return new nF({type:"union",options:e,...eK(t)})}let nU=tc("ZodDiscriminatedUnion",(e,t)=>{nF.init(e,t),r6.init(e,t)});function nH(e,t,r){return new nU({type:"union",options:t,discriminator:e,...eK(r)})}let nG=tc("ZodIntersection",(e,t)=>{r3.init(e,t),o9.init(e,t),e._zod.processJSONSchema=(t,r,i)=>oh(e,t,r,i)});function nB(e,t){return new nG({type:"intersection",left:e,right:t})}let nK=tc("ZodRecord",(e,t)=>{o3(),r5.init(e,t),o9.init(e,t),e._zod.processJSONSchema=(t,r,i)=>og(e,t,r,i),e.keyType=t.keyType,e.valueType=t.valueType});function nJ(e,t,r){return new nK(t&&t._zod?{type:"record",keyType:e,valueType:t,...eK(r)}:{type:"record",keyType:o7(),valueType:e,...eK(t)})}let nZ=tc("ZodEnum",(e,t)=>{r8.init(e,t),o9.init(e,t),e._zod.processJSONSchema=(t,r,i)=>os(e,t,r,i),e.enum=t.entries,e.options=[...e._zod.values];let r=new Set(Object.keys(t.entries));e.extract=(e,i)=>{let o={};for(let i of e)if(r.has(i))o[i]=t.entries[i];else throw Error(`Key ${i} not found in enum`);return new nZ({...t,checks:[],...eK(i),entries:o})},e.exclude=(e,i)=>{let o={...t.entries};for(let t of e)if(r.has(t))delete o[t];else throw Error(`Key ${t} not found in enum`);return new nZ({...t,checks:[],...eK(i),entries:o})}});function nQ(e,t){return new nZ({type:"enum",entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...eK(t)})}let nX=tc("ZodLiteral",(e,t)=>{r7.init(e,t),o9.init(e,t),e._zod.processJSONSchema=(t,r,i)=>od(e,t,r,i),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function nY(e,t){return new nX({type:"literal",values:Array.isArray(e)?e:[e],...eK(t)})}let n1=tc("ZodTransform",(e,t)=>{o3(),ie.init(e,t),o9.init(e,t),e._zod.processJSONSchema=(t,r,i)=>ol(e,t,r,i),e._zod.parse=(r,i)=>{if("backward"===i.direction)throw new tp(e.constructor.name);r.addIssue=i=>{"string"==typeof i?r.issues.push(te(i,r.value,t)):(i.fatal&&(i.continue=!1),i.code??(i.code="custom"),"input"in i||(i.input=r.value),i.inst??(i.inst=e),r.issues.push(te(i)))};let o=t.transform(r.value,r);return o instanceof Promise?o.then(e=>(r.value=e,r)):(r.value=o,r)}});function n0(e){return new n1({type:"transform",transform:e})}let n2=tc("ZodOptional",(e,t)=>{ir.init(e,t),o9.init(e,t),e._zod.processJSONSchema=(t,r,i)=>oV(e,t,r,i),e.unwrap=()=>e._zod.def.innerType});function n4(e){return new n2({type:"optional",innerType:e})}let n6=tc("ZodExactOptional",(e,t)=>{ii.init(e,t),o9.init(e,t),e._zod.processJSONSchema=(t,r,i)=>oV(e,t,r,i),e.unwrap=()=>e._zod.def.innerType}),n3=tc("ZodNullable",(e,t)=>{io.init(e,t),o9.init(e,t),e._zod.processJSONSchema=(t,r,i)=>o_(e,t,r,i),e.unwrap=()=>e._zod.def.innerType});function n9(e){return new n3({type:"nullable",innerType:e})}let n5=tc("ZodDefault",(e,t)=>{ia.init(e,t),o9.init(e,t),e._zod.processJSONSchema=(t,r,i)=>oS(e,t,r,i),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap}),n8=tc("ZodPrefault",(e,t)=>{id.init(e,t),o9.init(e,t),e._zod.processJSONSchema=(t,r,i)=>ok(e,t,r,i),e.unwrap=()=>e._zod.def.innerType}),n7=tc("ZodNonOptional",(e,t)=>{ic.init(e,t),o9.init(e,t),e._zod.processJSONSchema=(t,r,i)=>ov(e,t,r,i),e.unwrap=()=>e._zod.def.innerType}),ae=tc("ZodCatch",(e,t)=>{iu.init(e,t),o9.init(e,t),e._zod.processJSONSchema=(t,r,i)=>ow(e,t,r,i),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap}),at=tc("ZodPipe",(e,t)=>{im.init(e,t),o9.init(e,t),e._zod.processJSONSchema=(t,r,i)=>oR(e,t,r,i),e.in=t.in,e.out=t.out});function ar(e,t){return new at({type:"pipe",in:e,out:t})}let ai=tc("ZodPreprocess",(e,t)=>{at.init(e,t),iy.init(e,t)}),ao=tc("ZodReadonly",(e,t)=>{ig.init(e,t),o9.init(e,t),e._zod.processJSONSchema=(t,r,i)=>oP(e,t,r,i),e.unwrap=()=>e._zod.def.innerType}),an=tc("ZodLazy",(e,t)=>{iv.init(e,t),o9.init(e,t),e._zod.processJSONSchema=(t,r,i)=>oq(e,t,r,i),e.unwrap=()=>e._zod.def.getter()});function aa(e){return new an({type:"lazy",getter:e})}let as=tc("ZodCustom",(e,t)=>{ib.init(e,t),o9.init(e,t),e._zod.processJSONSchema=(t,r,i)=>oc(e,t,r,i)});function ad(e,t){return new ai({type:"pipe",in:n0(e),out:t})}function ac(e){return iP(nt,e)}let al="2025-11-25",ap=[al,"2025-06-18","2025-03-26","2024-11-05","2024-10-07"],au="io.modelcontextprotocol/protocolVersion",am="io.modelcontextprotocol/clientInfo",af="io.modelcontextprotocol/serverInfo",ah="io.modelcontextprotocol/clientCapabilities",ay="io.modelcontextprotocol/logLevel",ag=aa(()=>nL([o7(),nR(),nI(),nj(),nJ(o7(),ag),nW(ag)])),a_=nJ(o7(),ag),av=nW(ag),ab=nL([o7(),nR().int()]),a$=o7(),aS=nz({ttl:nR().optional()}),ak=nz({taskId:o7()}),aw=nD({progressToken:ab.optional(),"io.modelcontextprotocol/related-task":ak.optional()}),aR=nz({_meta:aw.optional()}),aP=aR.extend({task:aS.optional()}),aV=nz({method:o7(),params:aR.loose().optional()}),aq=nz({_meta:aw.optional()}),aI=nz({method:o7(),params:aq.loose().optional()}),ax=nD({get[af](){return aH.optional().catch(void 0)}}),aj=nD({_meta:ax.optional()}),aC=nL([o7(),nR().int()]),aT=nz({jsonrpc:nY("2.0"),id:aC,...aV.shape}).strict(),aO=nz({jsonrpc:nY("2.0"),...aI.shape}).strict(),aE=nz({jsonrpc:nY("2.0"),id:aC,result:aj}).strict(),aA=nz({jsonrpc:nY("2.0"),id:aC.optional(),error:nz({code:nR().int(),message:o7(),data:nE().optional()})}).strict(),aM=nL([aT,aO,aE,aA]),aW=nL([aE,aA]),aN=aj.strict(),az=aq.extend({requestId:aC.optional(),reason:o7().optional()}),aD=aI.extend({method:nY("notifications/cancelled"),params:az}),aF=nz({src:o7(),mimeType:o7().optional(),sizes:nW(o7()).optional(),theme:nQ(["light","dark"]).optional()}),aL=nz({icons:nW(aF).optional()}),aU=nz({name:o7(),title:o7().optional()}),aH=aU.extend({...aU.shape,...aL.shape,version:o7(),websiteUrl:o7().optional(),description:o7().optional()}),aG=nB(nz({applyDefaults:nI().optional()}),a_),aB=ad(e=>e&&"object"==typeof e&&!Array.isArray(e)&&0===Object.keys(e).length?{form:{}}:e,nB(nz({form:aG.optional(),url:a_.optional()}),a_.optional())),aK=nD({list:a_.optional(),cancel:a_.optional(),requests:nD({sampling:nD({createMessage:a_.optional()}).optional(),elicitation:nD({create:a_.optional()}).optional()}).optional()}),aJ=nD({list:a_.optional(),cancel:a_.optional(),requests:nD({tools:nD({call:a_.optional()}).optional()}).optional()}),aZ=nz({experimental:nJ(o7(),a_).optional(),sampling:nz({context:a_.optional(),tools:a_.optional()}).optional(),elicitation:aB.optional(),roots:nz({listChanged:nI().optional()}).optional(),tasks:aK.optional(),extensions:nJ(o7(),a_).optional()}),aQ=aR.extend({protocolVersion:o7(),capabilities:aZ,clientInfo:aH}),aX=aV.extend({method:nY("initialize"),params:aQ}),aY=nz({experimental:nJ(o7(),a_).optional(),logging:a_.optional(),completions:a_.optional(),prompts:nz({listChanged:nI().optional()}).optional(),resources:nz({subscribe:nI().optional(),listChanged:nI().optional()}).optional(),tools:nz({listChanged:nI().optional()}).optional(),tasks:aJ.optional(),extensions:nJ(o7(),a_).optional()}),a1=aj.extend({protocolVersion:o7(),capabilities:aY,serverInfo:aH,instructions:o7().optional()}),a0=aI.extend({method:nY("notifications/initialized"),params:aq.optional()}),a2=aV.extend({method:nY("server/discover"),params:aR.optional()}),a4=aj.extend({supportedVersions:nW(o7()),capabilities:aY,instructions:o7().optional()}),a6=aV.extend({method:nY("ping"),params:aR.optional()}),a3=nz({progress:nR(),total:n4(nR()),message:n4(o7())}),a9=nz({...aq.shape,...a3.shape,progressToken:ab}),a5=aI.extend({method:nY("notifications/progress"),params:a9}),a8=aR.extend({cursor:a$.optional()}),a7=aV.extend({params:a8.optional()}),se=aj.extend({nextCursor:a$.optional()}),st=nz({uri:o7(),mimeType:n4(o7()),_meta:nJ(o7(),nE()).optional()}),sr=st.extend({text:o7()}),si=o7().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:"Invalid Base64 string"}),so=st.extend({blob:si}),sn=nQ(["user","assistant"]),sa=nz({audience:nW(sn).optional(),priority:nR().min(0).max(1).optional(),lastModified:ac({offset:!0}).optional()}),ss=nz({...aU.shape,...aL.shape,uri:o7(),description:n4(o7()),mimeType:n4(o7()),size:n4(nR()),annotations:sa.optional(),_meta:n4(nD({}))}),sd=nz({...aU.shape,...aL.shape,uriTemplate:o7(),description:n4(o7()),mimeType:n4(o7()),annotations:sa.optional(),_meta:n4(nD({}))}),sc=a7.extend({method:nY("resources/list")}),sl=se.extend({resources:nW(ss)}),sp=a7.extend({method:nY("resources/templates/list")}),su=se.extend({resourceTemplates:nW(sd)}),sm=aR.extend({uri:o7()}),sf=aV.extend({method:nY("resources/read"),params:sm}),sh=aj.extend({contents:nW(nL([sr,so]))}),sy=aI.extend({method:nY("notifications/resources/list_changed"),params:aq.optional()}),sg=aV.extend({method:nY("resources/subscribe"),params:sm}),s_=aV.extend({method:nY("resources/unsubscribe"),params:sm}),sv=nz({toolsListChanged:nI().optional(),promptsListChanged:nI().optional(),resourcesListChanged:nI().optional(),resourceSubscriptions:nW(o7()).optional()}),sb=aR.extend({notifications:sv}),s$=aV.extend({method:nY("subscriptions/listen"),params:sb}),sS=aq.extend({notifications:sv}),sk=aI.extend({method:nY("notifications/subscriptions/acknowledged"),params:sS}),sw=ax.extend({"io.modelcontextprotocol/subscriptionId":aC}),sR=aj.extend({_meta:sw}),sP=aq.extend({uri:o7()}),sV=aI.extend({method:nY("notifications/resources/updated"),params:sP}),sq=nz({name:o7(),description:n4(o7()),required:n4(nI())}),sI=nz({...aU.shape,...aL.shape,description:n4(o7()),arguments:n4(nW(sq)),_meta:n4(nD({}))}),sx=a7.extend({method:nY("prompts/list")}),sj=se.extend({prompts:nW(sI)}),sC=aR.extend({name:o7(),arguments:nJ(o7(),o7()).optional()}),sT=aV.extend({method:nY("prompts/get"),params:sC}),sO=nz({type:nY("text"),text:o7(),annotations:sa.optional(),_meta:nJ(o7(),nE()).optional()}),sE=nz({type:nY("image"),data:si,mimeType:o7(),annotations:sa.optional(),_meta:nJ(o7(),nE()).optional()}),sA=nz({type:nY("audio"),data:si,mimeType:o7(),annotations:sa.optional(),_meta:nJ(o7(),nE()).optional()}),sM=nz({type:nY("tool_use"),name:o7(),id:o7(),input:nJ(o7(),nE()),_meta:nJ(o7(),nE()).optional()}),sW=nz({type:nY("resource"),resource:nL([sr,so]),annotations:sa.optional(),_meta:nJ(o7(),nE()).optional()}),sN=ss.extend({type:nY("resource_link")}),sz=nL([sO,sE,sA,sN,sW]),sD=nz({role:sn,content:sz}),sF=aj.extend({description:o7().optional(),messages:nW(sD)}),sL=aI.extend({method:nY("notifications/prompts/list_changed"),params:aq.optional()}),sU=nz({title:o7().optional(),readOnlyHint:nI().optional(),destructiveHint:nI().optional(),idempotentHint:nI().optional(),openWorldHint:nI().optional()}),sH=nz({taskSupport:nQ(["required","optional","forbidden"]).optional()}),sG=nz({...aU.shape,...aL.shape,description:o7().optional(),inputSchema:nz({type:nY("object"),properties:nJ(o7(),ag).optional(),required:nW(o7()).optional()}).catchall(nE()),outputSchema:nD({$schema:o7().optional()}).optional(),annotations:sU.optional(),execution:sH.optional(),_meta:nJ(o7(),nE()).optional()}),sB=a7.extend({method:nY("tools/list")}),sK=se.extend({tools:nW(sG)}),sJ=aj.extend({content:nW(sz).default([]),structuredContent:nE().optional(),isError:nI().optional()}),sZ=sJ.or(aj.extend({toolResult:nE()})),sQ=aP.extend({name:o7(),arguments:nJ(o7(),nE()).optional()}),sX=aV.extend({method:nY("tools/call"),params:sQ}),sY=aI.extend({method:nY("notifications/tools/list_changed"),params:aq.optional()}),s1=nz({autoRefresh:nI().default(!0),debounceMs:nR().int().nonnegative().default(300)}),s0=nQ(["debug","info","notice","warning","error","critical","alert","emergency"]),s2=aR.extend({level:s0}),s4=aV.extend({method:nY("logging/setLevel"),params:s2}),s6=aq.extend({level:s0,logger:o7().optional(),data:nE()}),s3=aI.extend({method:nY("notifications/message"),params:s6}),s9=nz({name:o7().optional()}),s5=nz({hints:nW(s9).optional(),costPriority:nR().min(0).max(1).optional(),speedPriority:nR().min(0).max(1).optional(),intelligencePriority:nR().min(0).max(1).optional()}),s8=nz({mode:nQ(["auto","required","none"]).optional()}),s7=nz({type:nY("tool_result"),toolUseId:o7().describe("The unique identifier for the corresponding tool call."),content:nW(sz),structuredContent:nE().optional(),isError:nI().optional(),_meta:nJ(o7(),nE()).optional()}),de=nH("type",[sO,sE,sA]),dt=nH("type",[sO,sE,sA,sM,s7]),dr=nz({role:sn,content:nL([dt,nW(dt)]),_meta:nJ(o7(),nE()).optional()}),di=aP.extend({messages:nW(dr),modelPreferences:s5.optional(),systemPrompt:o7().optional(),includeContext:nQ(["none","thisServer","allServers"]).optional(),temperature:nR().optional(),maxTokens:nR().int(),stopSequences:nW(o7()).optional(),metadata:a_.optional(),tools:nW(sG).optional(),toolChoice:s8.optional()}),dn=aV.extend({method:nY("sampling/createMessage"),params:di}),da=aj.extend({model:o7(),stopReason:n4(nQ(["endTurn","stopSequence","maxTokens"]).or(o7())),role:sn,content:de}),ds=aj.extend({model:o7(),stopReason:n4(nQ(["endTurn","stopSequence","maxTokens","toolUse"]).or(o7())),role:sn,content:nL([dt,nW(dt)])}),dd=nz({type:nY("boolean"),title:o7().optional(),description:o7().optional(),default:nI().optional()}),dc=nz({type:nY("string"),title:o7().optional(),description:o7().optional(),minLength:nR().optional(),maxLength:nR().optional(),format:nQ(["email","uri","date","date-time"]).optional(),default:o7().optional()}),dl=nz({type:nQ(["number","integer"]),title:o7().optional(),description:o7().optional(),minimum:nR().optional(),maximum:nR().optional(),default:nR().optional()}),dp=nz({type:nY("string"),title:o7().optional(),description:o7().optional(),enum:nW(o7()),default:o7().optional()}),du=nz({type:nY("string"),title:o7().optional(),description:o7().optional(),oneOf:nW(nz({const:o7(),title:o7()})),default:o7().optional()}),dm=nz({type:nY("string"),title:o7().optional(),description:o7().optional(),enum:nW(o7()),enumNames:nW(o7()).optional(),default:o7().optional()}),df=nL([dp,du]),dh=nz({type:nY("array"),title:o7().optional(),description:o7().optional(),minItems:nR().optional(),maxItems:nR().optional(),items:nz({type:nY("string"),enum:nW(o7())}),default:nW(o7()).optional()}),dy=nz({type:nY("array"),title:o7().optional(),description:o7().optional(),minItems:nR().optional(),maxItems:nR().optional(),items:nz({anyOf:nW(nz({const:o7(),title:o7()}))}),default:nW(o7()).optional()}),dg=nL([dh,dy]),d_=nL([dm,df,dg]),dv=nL([d_,dd,dc,dl]),db=aP.extend({mode:nY("form").optional(),message:o7(),requestedSchema:nz({type:nY("object"),properties:nJ(o7(),dv),required:nW(o7()).optional()}).catchall(nE())}),d$=aP.extend({mode:nY("url"),message:o7(),elicitationId:o7(),url:o7().url()}),dS=nL([db,d$]),dk=aV.extend({method:nY("elicitation/create"),params:dS}),dw=aq.extend({elicitationId:o7()}),dR=aI.extend({method:nY("notifications/elicitation/complete"),params:dw}),dP=aj.extend({action:nQ(["accept","decline","cancel"]),content:ad(e=>null===e?void 0:e,nJ(o7(),nL([o7(),nR(),nI(),nW(o7())])).optional())}),dV=nz({type:nY("ref/resource"),uri:o7()}),dq=nz({type:nY("ref/prompt"),name:o7()}),dI=aR.extend({ref:nL([dq,dV]),argument:nz({name:o7(),value:o7()}),context:nz({arguments:nJ(o7(),o7()).optional()}).optional()}),dx=aV.extend({method:nY("completion/complete"),params:dI}),dj=aj.extend({completion:nD({values:nW(o7()).max(100),total:n4(nR().int()),hasMore:n4(nI())})}),dC=nz({uri:o7().startsWith("file://"),name:o7().optional(),_meta:nJ(o7(),nE()).optional()}),dT=aV.extend({method:nY("roots/list"),params:aR.optional()}),dO=aj.extend({roots:nW(dC)}),dE=aI.extend({method:nY("notifications/roots/list_changed"),params:aq.optional()}),dA=nD({ttl:nR().optional(),pollInterval:nR().optional()}),dM=nQ(["working","input_required","completed","failed","cancelled"]),dW=nz({taskId:o7(),status:dM,ttl:nL([nR(),nj()]),createdAt:o7(),lastUpdatedAt:o7(),pollInterval:n4(nR()),statusMessage:n4(o7())}),dN=aj.extend({task:dW}),dz=aq.merge(dW),dD=aI.extend({method:nY("notifications/tasks/status"),params:dz}),dF=aV.extend({method:nY("tasks/get"),params:aR.extend({taskId:o7()})}),dL=aj.merge(dW),dU=aV.extend({method:nY("tasks/result"),params:aR.extend({taskId:o7()})}),dH=aj.loose(),dG=a7.extend({method:nY("tasks/list")}),dB=se.extend({tasks:nW(dW)}),dK=aV.extend({method:nY("tasks/cancel"),params:aR.extend({taskId:o7()})}),dJ=aj.merge(dW),dZ=nL([a6,aX,a2,dx,s4,sT,sx,sc,sp,sf,sg,s_,s$,sX,sB]),dQ=nL([aD,a5,a0,dE]),dX=nL([aN,da,ds,dP,dO]),dY=nL([a6,dn,dk,dT]),d1=nL([aD,a5,s3,sV,sy,sY,sL,sk,dR]),d0=nL([aN,a1,a4,dj,sF,sj,sl,su,sh,sJ,sK,sR]),d2="custom";function d4(e){return new nw(ik({type:"number",coerce:!0,checks:[],...eK(e)}))}eo||(eo={});let d6=iR(nd,void 0).superRefine((e,t)=>{if(!URL.canParse(e))return t.addIssue({code:d2,message:"URL must be parseable",fatal:!0}),ta}).refine(e=>{let t=new URL(e);return"javascript:"!==t.protocol&&"data:"!==t.protocol&&"vbscript:"!==t.protocol},{message:"URL cannot use javascript:, data:, or vbscript: scheme"}),d3=nD({resource:o7().url(),authorization_servers:nW(d6).optional(),jwks_uri:o7().url().optional(),scopes_supported:nW(o7()).optional(),bearer_methods_supported:nW(o7()).optional(),resource_signing_alg_values_supported:nW(o7()).optional(),resource_name:o7().optional(),resource_documentation:o7().optional(),resource_policy_uri:o7().url().optional(),resource_tos_uri:o7().url().optional(),tls_client_certificate_bound_access_tokens:nI().optional(),authorization_details_types_supported:nW(o7()).optional(),dpop_signing_alg_values_supported:nW(o7()).optional(),dpop_bound_access_tokens_required:nI().optional()}),d9=nD({issuer:o7(),authorization_endpoint:d6,token_endpoint:d6,registration_endpoint:d6.optional(),scopes_supported:nW(o7()).optional(),response_types_supported:nW(o7()),response_modes_supported:nW(o7()).optional(),grant_types_supported:nW(o7()).optional(),token_endpoint_auth_methods_supported:nW(o7()).optional(),token_endpoint_auth_signing_alg_values_supported:nW(o7()).optional(),service_documentation:d6.optional(),revocation_endpoint:d6.optional(),revocation_endpoint_auth_methods_supported:nW(o7()).optional(),revocation_endpoint_auth_signing_alg_values_supported:nW(o7()).optional(),introspection_endpoint:o7().optional(),introspection_endpoint_auth_methods_supported:nW(o7()).optional(),introspection_endpoint_auth_signing_alg_values_supported:nW(o7()).optional(),code_challenge_methods_supported:nW(o7()).optional(),client_id_metadata_document_supported:nI().optional(),authorization_response_iss_parameter_supported:nI().optional().catch(void 0),dpop_signing_alg_values_supported:nW(o7()).optional()}),d5=nD({issuer:o7(),authorization_endpoint:d6,token_endpoint:d6,userinfo_endpoint:d6.optional(),jwks_uri:d6,registration_endpoint:d6.optional(),scopes_supported:nW(o7()).optional(),response_types_supported:nW(o7()),response_modes_supported:nW(o7()).optional(),grant_types_supported:nW(o7()).optional(),acr_values_supported:nW(o7()).optional(),subject_types_supported:nW(o7()),id_token_signing_alg_values_supported:nW(o7()),id_token_encryption_alg_values_supported:nW(o7()).optional(),id_token_encryption_enc_values_supported:nW(o7()).optional(),userinfo_signing_alg_values_supported:nW(o7()).optional(),userinfo_encryption_alg_values_supported:nW(o7()).optional(),userinfo_encryption_enc_values_supported:nW(o7()).optional(),request_object_signing_alg_values_supported:nW(o7()).optional(),request_object_encryption_alg_values_supported:nW(o7()).optional(),request_object_encryption_enc_values_supported:nW(o7()).optional(),token_endpoint_auth_methods_supported:nW(o7()).optional(),token_endpoint_auth_signing_alg_values_supported:nW(o7()).optional(),display_values_supported:nW(o7()).optional(),claim_types_supported:nW(o7()).optional(),claims_supported:nW(o7()).optional(),service_documentation:o7().optional(),claims_locales_supported:nW(o7()).optional(),ui_locales_supported:nW(o7()).optional(),claims_parameter_supported:nI().optional(),request_parameter_supported:nI().optional(),request_uri_parameter_supported:nI().optional(),require_request_uri_registration:nI().optional(),op_policy_uri:d6.optional(),op_tos_uri:d6.optional(),client_id_metadata_document_supported:nI().optional(),authorization_response_iss_parameter_supported:nI().optional().catch(void 0)}),d8=nz({...d5.shape,...d9.pick({code_challenge_methods_supported:!0}).shape}),d7=nz({access_token:o7(),id_token:o7().optional(),token_type:o7(),expires_in:d4().optional(),scope:o7().optional(),refresh_token:o7().optional(),issuer:o7().optional().catch(void 0)}).strip(),ce=nz({issued_token_type:nY("urn:ietf:params:oauth:token-type:id-jag"),access_token:o7(),token_type:o7().optional(),expires_in:nR().optional(),scope:o7().optional()}).strip(),ct=nz({error:o7(),error_description:o7().optional(),error_uri:o7().optional()}),cr=d6.optional().or(nY("").transform(()=>void 0)),ci=nz({redirect_uris:nW(d6),token_endpoint_auth_method:o7().optional(),grant_types:nW(o7()).optional(),response_types:nW(o7()).optional(),application_type:o7().optional(),client_name:o7().optional(),client_uri:d6.optional(),logo_uri:cr,scope:o7().optional(),contacts:nW(o7()).optional(),tos_uri:cr,policy_uri:o7().optional(),jwks_uri:d6.optional(),jwks:nT().optional(),software_id:o7().optional(),software_version:o7().optional(),software_statement:o7().optional()}).strip(),co=nz({client_id:o7(),client_secret:o7().optional(),client_id_issued_at:nR().optional(),client_secret_expires_at:nR().optional(),issuer:o7().optional().catch(void 0)}).strip(),cn=ci.merge(co),ca=nz({error:o7(),error_description:o7().optional()}).strip(),cs=nz({token:o7(),token_type_hint:o7().optional()}).strip(),cd=Symbol.for("mcp.sdk.errorBrands");function cc(e,t){let r=new Set,i=t;for(;"function"==typeof i;){let e=i.mcpBrand;Object.prototype.hasOwnProperty.call(i,"mcpBrand")&&"string"==typeof e&&r.add(e),i=Object.getPrototypeOf(i)}0!==r.size&&Object.defineProperty(e,cd,{value:r,enumerable:!1,configurable:!0})}function cl(e,t){try{if("object"==typeof t&&null!==t&&Object.prototype.hasOwnProperty.call(e,"mcpBrand")&&"string"==typeof e.mcpBrand&&Object.prototype.hasOwnProperty.call(t,cd)){let r=t[cd];if(r&&"function"==typeof r.has&&r.has(e.mcpBrand))return!0}}catch{}return Function.prototype[Symbol.hasInstance].call(e,t)}let cp=((K={}).InvalidRequest="invalid_request",K.InvalidClient="invalid_client",K.InvalidGrant="invalid_grant",K.UnauthorizedClient="unauthorized_client",K.UnsupportedGrantType="unsupported_grant_type",K.InvalidScope="invalid_scope",K.AccessDenied="access_denied",K.ServerError="server_error",K.TemporarilyUnavailable="temporarily_unavailable",K.UnsupportedResponseType="unsupported_response_type",K.UnsupportedTokenType="unsupported_token_type",K.InvalidToken="invalid_token",K.MethodNotAllowed="method_not_allowed",K.TooManyRequests="too_many_requests",K.InvalidClientMetadata="invalid_client_metadata",K.InvalidRedirectUri="invalid_redirect_uri",K.InsufficientScope="insufficient_scope",K.InvalidTarget="invalid_target",K.InvalidDpopProof="invalid_dpop_proof",K.UseDpopNonce="use_dpop_nonce",K);var cu=class e extends Error{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.OAuthError"})}static[Symbol.hasInstance](e){return cl(this,e)}static isInstance(e){if("function"!=typeof this)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return cl(this,e)}constructor(e,t,r){super(t),this.code=e,this.errorUri=r,this.name="OAuthError",cc(this,new.target)}toResponseObject(){let e={error:this.code,error_description:this.message};return this.errorUri&&(e.error_uri=this.errorUri),e}static fromResponse(t){return new e(t.error,t.error_description??t.error,t.error_uri)}};let cm=((J={}).NotConnected="NOT_CONNECTED",J.AlreadyConnected="ALREADY_CONNECTED",J.NotInitialized="NOT_INITIALIZED",J.CapabilityNotSupported="CAPABILITY_NOT_SUPPORTED",J.RequestTimeout="REQUEST_TIMEOUT",J.ConnectionClosed="CONNECTION_CLOSED",J.SendFailed="SEND_FAILED",J.InvalidResult="INVALID_RESULT",J.UnsupportedResultType="UNSUPPORTED_RESULT_TYPE",J.InputRequiredRoundsExceeded="INPUT_REQUIRED_ROUNDS_EXCEEDED",J.ListPaginationExceeded="LIST_PAGINATION_EXCEEDED",J.MethodNotSupportedByProtocolVersion="METHOD_NOT_SUPPORTED_BY_PROTOCOL_VERSION",J.EraNegotiationFailed="ERA_NEGOTIATION_FAILED",J.ClientHttpNotImplemented="CLIENT_HTTP_NOT_IMPLEMENTED",J.ClientHttpAuthentication="CLIENT_HTTP_AUTHENTICATION",J.ClientHttpForbidden="CLIENT_HTTP_FORBIDDEN",J.ClientHttpUnexpectedContent="CLIENT_HTTP_UNEXPECTED_CONTENT",J.ClientHttpFailedToOpenStream="CLIENT_HTTP_FAILED_TO_OPEN_STREAM",J.ClientHttpFailedToTerminateSession="CLIENT_HTTP_FAILED_TO_TERMINATE_SESSION",J);var cf=class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.SdkError"})}static[Symbol.hasInstance](e){return cl(this,e)}static isInstance(e){if("function"!=typeof this)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return cl(this,e)}constructor(e,t,r,i){super(t,i),this.code=e,this.data=r,this.name="SdkError",cc(this,new.target)}};function ch(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)}function cy(e,t){let r={};for(let[i,o]of Object.entries(e)){if(void 0===o)continue;let e=void 0===t?void 0:t[i];if(void 0===e){r[i]=o;continue}if(ch(o)&&ch(e)){let t={};for(let[r,n]of Object.entries(o))void 0!==n&&void 0===e[r]&&("elicitation"!==i||"form"!==r||void 0!==e.form||void 0!==e.url)&&(t[r]=n);Object.keys(t).length>0&&(r[i]=t)}}return Object.keys(r).length>0?r:void 0}(class extends cf{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.SdkHttpError"})}constructor(e,t,r,i){super(e,t,r,i),this.name="SdkHttpError"}get status(){return this.data.status}get statusText(){return this.data.statusText}});let cg="2026-07-28",c_=[cg];function cv(e){return e.filter(e=>e>=cg)}function cb(e){let t=e.structuredContent;return void 0===t||!("object"!=typeof t||null===t||Array.isArray(t))||e.content?.some(e=>"text"===e.type)?e:{...e,content:[...e.content??[],{type:"text",text:JSON.stringify(t)}]}}let c$=["task","inputRequests","requestState"];function cS(e){return null===e||"object"!=typeof e||Array.isArray(e)||void 0!==e.content||c$.some(t=>t in e)?e:{...e,content:[]}}function ck(){let e,t,i,o,n,a,s,d,c,l,p,u,m,f,h,y,g,_,v,b,$,S,k,w,R,P,V,q,I,x,j,C,T,O,E,A,M,W,N,z,D,F,L,U,H,G,B,K,J,Z,Q,X,Y,ee,et,er,ei,eo,en,ea,es,ed,ec,el,ep,eu,em,ef,eh,ey,eg,e_,ev,eb,e$,eS,ek,ew,eR,eP,eV,eq,eI,ex,ej,eC,eT,eO,eE,eA,eM,eW,eN,ez,eD,eF,eL,eU,eH,eG,eB,eK,eJ,eZ,eQ,eX,eY,e1,e0,e2,e4,e6,e3,e9,e5,e8,e7,te,tt,tr,ti,to,tn,ta,ts,td,tc,tl,tp,tu,tm,tf,th,ty,tg,t_,tv,tb,t$,tS;return r??=(e=aa(()=>nL([o7(),nR(),nI(),nj(),nJ(o7(),e),nW(e)])),t=nJ(o7(),e),i=nL([o7(),nR().int()]),o=o7(),n=nz({ttl:nR().optional()}),a=nz({taskId:o7()}),c=(d=nz({_meta:(s=nD({progressToken:i.optional(),"io.modelcontextprotocol/related-task":a.optional()})).optional()})).extend({task:n.optional()}),l=nz({method:o7(),params:d.loose().optional()}),p=nz({_meta:s.optional()}),u=nz({method:o7(),params:p.loose().optional()}),m=nD({_meta:s.optional()}),f=nL([o7(),nR().int()]),h=m.strict(),y=p.extend({requestId:f.optional(),reason:o7().optional()}),g=u.extend({method:nY("notifications/cancelled"),params:y}),_=nz({src:o7(),mimeType:o7().optional(),sizes:nW(o7()).optional(),theme:nQ(["light","dark"]).optional()}),v=nz({icons:nW(_).optional()}),$=(b=nz({name:o7(),title:o7().optional()})).extend({...b.shape,...v.shape,version:o7(),websiteUrl:o7().optional(),description:o7().optional()}),S=nB(nz({applyDefaults:nI().optional()}),t),k=ad(e=>e&&"object"==typeof e&&!Array.isArray(e)&&0===Object.keys(e).length?{form:{}}:e,nB(nz({form:S.optional(),url:t.optional()}),t.optional())),w=nD({list:t.optional(),cancel:t.optional(),requests:nD({sampling:nD({createMessage:t.optional()}).optional(),elicitation:nD({create:t.optional()}).optional()}).optional()}),R=nD({list:t.optional(),cancel:t.optional(),requests:nD({tools:nD({call:t.optional()}).optional()}).optional()}),P=nz({experimental:nJ(o7(),t).optional(),sampling:nz({context:t.optional(),tools:t.optional()}).optional(),elicitation:k.optional(),roots:nz({listChanged:nI().optional()}).optional(),tasks:w.optional(),extensions:nJ(o7(),t).optional()}),V=d.extend({protocolVersion:o7(),capabilities:P,clientInfo:$}),q=l.extend({method:nY("initialize"),params:V}),I=nz({experimental:nJ(o7(),t).optional(),logging:t.optional(),completions:t.optional(),prompts:nz({listChanged:nI().optional()}).optional(),resources:nz({subscribe:nI().optional(),listChanged:nI().optional()}).optional(),tools:nz({listChanged:nI().optional()}).optional(),tasks:R.optional(),extensions:nJ(o7(),t).optional()}),x=m.extend({protocolVersion:o7(),capabilities:I,serverInfo:$,instructions:o7().optional()}),j=u.extend({method:nY("notifications/initialized"),params:p.optional()}),C=l.extend({method:nY("ping"),params:d.optional()}),T=nz({progress:nR(),total:n4(nR()),message:n4(o7())}),O=nz({...p.shape,...T.shape,progressToken:i}),E=u.extend({method:nY("notifications/progress"),params:O}),A=d.extend({cursor:o.optional()}),M=l.extend({params:A.optional()}),W=m.extend({nextCursor:o.optional()}),z=(N=nz({uri:o7(),mimeType:n4(o7()),_meta:nJ(o7(),nE()).optional()})).extend({text:o7()}),D=o7().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:"Invalid Base64 string"}),F=N.extend({blob:D}),U=nz({audience:nW(L=nQ(["user","assistant"])).optional(),priority:nR().min(0).max(1).optional(),lastModified:ac({offset:!0}).optional()}),H=nz({...b.shape,...v.shape,uri:o7(),description:n4(o7()),mimeType:n4(o7()),size:n4(nR()),annotations:U.optional(),_meta:n4(nD({}))}),G=nz({...b.shape,...v.shape,uriTemplate:o7(),description:n4(o7()),mimeType:n4(o7()),annotations:U.optional(),_meta:n4(nD({}))}),B=M.extend({method:nY("resources/list")}),K=W.extend({resources:nW(H)}),J=M.extend({method:nY("resources/templates/list")}),Z=W.extend({resourceTemplates:nW(G)}),Q=d.extend({uri:o7()}),X=l.extend({method:nY("resources/read"),params:Q}),Y=m.extend({contents:nW(nL([z,F]))}),ee=u.extend({method:nY("notifications/resources/list_changed"),params:p.optional()}),et=l.extend({method:nY("resources/subscribe"),params:Q}),er=l.extend({method:nY("resources/unsubscribe"),params:Q}),ei=p.extend({uri:o7()}),eo=u.extend({method:nY("notifications/resources/updated"),params:ei}),en=nz({name:o7(),description:n4(o7()),required:n4(nI())}),ea=nz({...b.shape,...v.shape,description:n4(o7()),arguments:n4(nW(en)),_meta:n4(nD({}))}),es=M.extend({method:nY("prompts/list")}),ed=W.extend({prompts:nW(ea)}),ec=d.extend({name:o7(),arguments:nJ(o7(),o7()).optional()}),el=l.extend({method:nY("prompts/get"),params:ec}),ep=nz({type:nY("text"),text:o7(),annotations:U.optional(),_meta:nJ(o7(),nE()).optional()}),eu=nz({type:nY("image"),data:D,mimeType:o7(),annotations:U.optional(),_meta:nJ(o7(),nE()).optional()}),em=nz({type:nY("audio"),data:D,mimeType:o7(),annotations:U.optional(),_meta:nJ(o7(),nE()).optional()}),ef=nz({type:nY("tool_use"),name:o7(),id:o7(),input:nJ(o7(),nE()),_meta:nJ(o7(),nE()).optional()}),eh=nz({type:nY("resource"),resource:nL([z,F]),annotations:U.optional(),_meta:nJ(o7(),nE()).optional()}),e_=nz({role:L,content:eg=nL([ep,eu,em,ey=H.extend({type:nY("resource_link")}),eh])}),ev=m.extend({description:o7().optional(),messages:nW(e_)}),eb=u.extend({method:nY("notifications/prompts/list_changed"),params:p.optional()}),e$=nz({title:o7().optional(),readOnlyHint:nI().optional(),destructiveHint:nI().optional(),idempotentHint:nI().optional(),openWorldHint:nI().optional()}),eS=nz({taskSupport:nQ(["required","optional","forbidden"]).optional()}),ek=nz({...b.shape,...v.shape,description:o7().optional(),inputSchema:nz({type:nY("object"),properties:nJ(o7(),e).optional(),required:nW(o7()).optional()}).catchall(nE()),outputSchema:nz({type:nY("object"),properties:nJ(o7(),e).optional(),required:nW(o7()).optional()}).catchall(nE()).optional(),annotations:e$.optional(),execution:eS.optional(),_meta:nJ(o7(),nE()).optional()}),ew=M.extend({method:nY("tools/list")}),eR=W.extend({tools:nW(ek)}),eP=m.extend({content:nW(eg),structuredContent:nJ(o7(),nE()).optional(),isError:nI().optional()}),eV=c.extend({name:o7(),arguments:nJ(o7(),nE()).optional()}),eq=l.extend({method:nY("tools/call"),params:eV}),eI=u.extend({method:nY("notifications/tools/list_changed"),params:p.optional()}),ex=nQ(["debug","info","notice","warning","error","critical","alert","emergency"]),ej=d.extend({level:ex}),eC=l.extend({method:nY("logging/setLevel"),params:ej}),eT=p.extend({level:ex,logger:o7().optional(),data:nE()}),eO=u.extend({method:nY("notifications/message"),params:eT}),eE=nz({name:o7().optional()}),eA=nz({hints:nW(eE).optional(),costPriority:nR().min(0).max(1).optional(),speedPriority:nR().min(0).max(1).optional(),intelligencePriority:nR().min(0).max(1).optional()}),eM=nz({mode:nQ(["auto","required","none"]).optional()}),eW=nz({type:nY("tool_result"),toolUseId:o7().describe("The unique identifier for the corresponding tool call."),content:nW(eg),structuredContent:nz({}).loose().optional(),isError:nI().optional(),_meta:nJ(o7(),nE()).optional()}),eN=nH("type",[ep,eu,em]),eD=nz({role:L,content:nL([ez=nH("type",[ep,eu,em,ef,eW]),nW(ez)]),_meta:nJ(o7(),nE()).optional()}),eF=c.extend({messages:nW(eD),modelPreferences:eA.optional(),systemPrompt:o7().optional(),includeContext:nQ(["none","thisServer","allServers"]).optional(),temperature:nR().optional(),maxTokens:nR().int(),stopSequences:nW(o7()).optional(),metadata:t.optional(),tools:nW(ek).optional(),toolChoice:eM.optional()}),eL=l.extend({method:nY("sampling/createMessage"),params:eF}),eU=m.extend({model:o7(),stopReason:n4(nQ(["endTurn","stopSequence","maxTokens"]).or(o7())),role:L,content:eN}),eH=m.extend({model:o7(),stopReason:n4(nQ(["endTurn","stopSequence","maxTokens","toolUse"]).or(o7())),role:L,content:nL([ez,nW(ez)])}),eG=nz({type:nY("boolean"),title:o7().optional(),description:o7().optional(),default:nI().optional()}),eB=nz({type:nY("string"),title:o7().optional(),description:o7().optional(),minLength:nR().optional(),maxLength:nR().optional(),format:nQ(["email","uri","date","date-time"]).optional(),default:o7().optional()}),eK=nz({type:nQ(["number","integer"]),title:o7().optional(),description:o7().optional(),minimum:nR().optional(),maximum:nR().optional(),default:nR().optional()}),eJ=nz({type:nY("string"),title:o7().optional(),description:o7().optional(),enum:nW(o7()),default:o7().optional()}),eZ=nz({type:nY("string"),title:o7().optional(),description:o7().optional(),oneOf:nW(nz({const:o7(),title:o7()})),default:o7().optional()}),eQ=nz({type:nY("string"),title:o7().optional(),description:o7().optional(),enum:nW(o7()),enumNames:nW(o7()).optional(),default:o7().optional()}),eX=nL([eJ,eZ]),eY=nz({type:nY("array"),title:o7().optional(),description:o7().optional(),minItems:nR().optional(),maxItems:nR().optional(),items:nz({type:nY("string"),enum:nW(o7())}),default:nW(o7()).optional()}),e0=nL([eY,e1=nz({type:nY("array"),title:o7().optional(),description:o7().optional(),minItems:nR().optional(),maxItems:nR().optional(),items:nz({anyOf:nW(nz({const:o7(),title:o7()}))}),default:nW(o7()).optional()})]),e2=nL([eQ,eX,e0]),e4=nL([e2,eG,eB,eK]),e6=c.extend({mode:nY("form").optional(),message:o7(),requestedSchema:nz({type:nY("object"),properties:nJ(o7(),e4),required:nW(o7()).optional()}).catchall(nE())}),e9=nL([e6,e3=c.extend({mode:nY("url"),message:o7(),elicitationId:o7(),url:o7().url()})]),e5=l.extend({method:nY("elicitation/create"),params:e9}),e8=p.extend({elicitationId:o7()}),e7=u.extend({method:nY("notifications/elicitation/complete"),params:e8}),te=m.extend({action:nQ(["accept","decline","cancel"]),content:ad(e=>null===e?void 0:e,nJ(o7(),nL([o7(),nR(),nI(),nW(o7())])).optional())}),tt=nz({type:nY("ref/resource"),uri:o7()}),tr=nz({type:nY("ref/prompt"),name:o7()}),ti=d.extend({ref:nL([tr,tt]),argument:nz({name:o7(),value:o7()}),context:nz({arguments:nJ(o7(),o7()).optional()}).optional()}),to=l.extend({method:nY("completion/complete"),params:ti}),tn=m.extend({completion:nD({values:nW(o7()).max(100),total:n4(nR().int()),hasMore:n4(nI())})}),ta=nz({uri:o7().startsWith("file://"),name:o7().optional(),_meta:nJ(o7(),nE()).optional()}),ts=l.extend({method:nY("roots/list"),params:d.optional()}),td=m.extend({roots:nW(ta)}),tc=u.extend({method:nY("notifications/roots/list_changed"),params:p.optional()}),tl=nD({ttl:nR().optional(),pollInterval:nR().optional()}),tp=nQ(["working","input_required","completed","failed","cancelled"]),tu=nz({taskId:o7(),status:tp,ttl:nL([nR(),nj()]),createdAt:o7(),lastUpdatedAt:o7(),pollInterval:n4(nR()),statusMessage:n4(o7())}),tm=m.extend({task:tu}),tf=p.merge(tu),th=u.extend({method:nY("notifications/tasks/status"),params:tf}),ty=l.extend({method:nY("tasks/get"),params:d.extend({taskId:o7()})}),tg=m.merge(tu),t_=l.extend({method:nY("tasks/result"),params:d.extend({taskId:o7()})}),tv=m.loose(),tb=M.extend({method:nY("tasks/list")}),t$=W.extend({tasks:nW(tu)}),tS=l.extend({method:nY("tasks/cancel"),params:d.extend({taskId:o7()})}),{JSONValueSchema:e,JSONObjectSchema:t,ProgressTokenSchema:i,CursorSchema:o,TaskMetadataSchema:n,RelatedTaskMetadataSchema:a,RequestMetaSchema:s,BaseRequestParamsSchema:d,TaskAugmentedRequestParamsSchema:c,RequestSchema:l,NotificationsParamsSchema:p,NotificationSchema:u,ResultSchema:m,RequestIdSchema:f,EmptyResultSchema:h,CancelledNotificationParamsSchema:y,CancelledNotificationSchema:g,IconSchema:_,IconsSchema:v,BaseMetadataSchema:b,ImplementationSchema:$,ClientTasksCapabilitySchema:w,ServerTasksCapabilitySchema:R,ClientCapabilitiesSchema:P,InitializeRequestParamsSchema:V,InitializeRequestSchema:q,ServerCapabilitiesSchema:I,InitializeResultSchema:x,InitializedNotificationSchema:j,PingRequestSchema:C,ProgressSchema:T,ProgressNotificationParamsSchema:O,ProgressNotificationSchema:E,PaginatedRequestParamsSchema:A,PaginatedRequestSchema:M,PaginatedResultSchema:W,ResourceContentsSchema:N,TextResourceContentsSchema:z,BlobResourceContentsSchema:F,RoleSchema:L,AnnotationsSchema:U,ResourceSchema:H,ResourceTemplateSchema:G,ListResourcesRequestSchema:B,ListResourcesResultSchema:K,ListResourceTemplatesRequestSchema:J,ListResourceTemplatesResultSchema:Z,ResourceRequestParamsSchema:Q,ReadResourceRequestParamsSchema:Q,ReadResourceRequestSchema:X,ReadResourceResultSchema:Y,ResourceListChangedNotificationSchema:ee,SubscribeRequestParamsSchema:Q,SubscribeRequestSchema:et,UnsubscribeRequestParamsSchema:Q,UnsubscribeRequestSchema:er,ResourceUpdatedNotificationParamsSchema:ei,ResourceUpdatedNotificationSchema:eo,PromptArgumentSchema:en,PromptSchema:ea,ListPromptsRequestSchema:es,ListPromptsResultSchema:ed,GetPromptRequestParamsSchema:ec,GetPromptRequestSchema:el,TextContentSchema:ep,ImageContentSchema:eu,AudioContentSchema:em,ToolUseContentSchema:ef,EmbeddedResourceSchema:eh,ResourceLinkSchema:ey,ContentBlockSchema:eg,PromptMessageSchema:e_,GetPromptResultSchema:ev,PromptListChangedNotificationSchema:eb,ToolAnnotationsSchema:e$,ToolExecutionSchema:eS,ToolSchema:ek,ListToolsRequestSchema:ew,ListToolsResultSchema:eR,CallToolResultSchema:eP,CallToolRequestParamsSchema:eV,CallToolRequestSchema:eq,ToolListChangedNotificationSchema:eI,LoggingLevelSchema:ex,SetLevelRequestParamsSchema:ej,SetLevelRequestSchema:eC,LoggingMessageNotificationParamsSchema:eT,LoggingMessageNotificationSchema:eO,ModelHintSchema:eE,ModelPreferencesSchema:eA,ToolChoiceSchema:eM,ToolResultContentSchema:eW,SamplingContentSchema:eN,SamplingMessageContentBlockSchema:ez,SamplingMessageSchema:eD,CreateMessageRequestParamsSchema:eF,CreateMessageRequestSchema:eL,CreateMessageResultSchema:eU,CreateMessageResultWithToolsSchema:eH,BooleanSchemaSchema:eG,StringSchemaSchema:eB,NumberSchemaSchema:eK,UntitledSingleSelectEnumSchemaSchema:eJ,TitledSingleSelectEnumSchemaSchema:eZ,LegacyTitledEnumSchemaSchema:eQ,SingleSelectEnumSchemaSchema:eX,UntitledMultiSelectEnumSchemaSchema:eY,TitledMultiSelectEnumSchemaSchema:e1,MultiSelectEnumSchemaSchema:e0,EnumSchemaSchema:e2,PrimitiveSchemaDefinitionSchema:e4,ElicitRequestFormParamsSchema:e6,ElicitRequestURLParamsSchema:e3,ElicitRequestParamsSchema:e9,ElicitRequestSchema:e5,ElicitationCompleteNotificationParamsSchema:e8,ElicitationCompleteNotificationSchema:e7,ElicitResultSchema:te,ResourceTemplateReferenceSchema:tt,PromptReferenceSchema:tr,CompleteRequestParamsSchema:ti,CompleteRequestSchema:to,CompleteResultSchema:tn,RootSchema:ta,ListRootsRequestSchema:ts,ListRootsResultSchema:td,RootsListChangedNotificationSchema:tc,TaskCreationParamsSchema:tl,TaskStatusSchema:tp,TaskSchema:tu,CreateTaskResultSchema:tm,TaskStatusNotificationParamsSchema:tf,TaskStatusNotificationSchema:th,GetTaskRequestSchema:ty,GetTaskResultSchema:tg,GetTaskPayloadRequestSchema:t_,GetTaskPayloadResultSchema:tv,ListTasksRequestSchema:tb,ListTasksResultSchema:t$,CancelTaskRequestSchema:tS,CancelTaskResultSchema:m.merge(tu),ClientRequestSchema:nL([C,q,to,eC,el,es,B,J,X,et,er,eq,ew,ty,t_,tb,tS]),ClientNotificationSchema:nL([g,E,j,tc,th]),ClientResultSchema:nL([h,eU,eH,te,td,tg,t$,tm]),ServerRequestSchema:nL([C,eL,e5,ts,ty,t_,tb,tS]),ServerNotificationSchema:nL([g,E,eO,eo,ee,eI,eb,th,e7]),ServerResultSchema:nL([h,x,tn,ev,ed,K,Z,Y,eP,eR,tg,t$,tm]),CallToolResultWireSchema:nE().superRefine((e,t)=>{if(!("object"!=typeof e||null===e||Array.isArray(e))&&void 0===e.content){for(let r of c$)if(r in e)return void t.addIssue({code:"custom",message:`content is required when the body carries '${r}' — another result family cannot default into an empty tools/call success`})}}).transform(cS).pipe(eP)})}function cw(e){return"object"!==e.type}let cR=new Set(["const","enum","default","examples"]),cP=new Set(["properties","patternProperties","$defs","definitions","dependentSchemas","dependencies"]);function cV(e){return void 0!==e&&!("string"==typeof e&&e.startsWith("#"))}let cq={ping:null,initialize:null,"completion/complete":null,"logging/setLevel":null,"prompts/get":null,"prompts/list":null,"resources/list":null,"resources/templates/list":null,"resources/read":null,"resources/subscribe":null,"resources/unsubscribe":null,"tools/call":null,"tools/list":null,"tasks/get":null,"tasks/result":null,"tasks/list":null,"tasks/cancel":null,"sampling/createMessage":null,"elicitation/create":null,"roots/list":null},cI={"notifications/cancelled":null,"notifications/progress":null,"notifications/initialized":null,"notifications/roots/list_changed":null,"notifications/tasks/status":null,"notifications/message":null,"notifications/resources/updated":null,"notifications/resources/list_changed":null,"notifications/tools/list_changed":null,"notifications/prompts/list_changed":null,"notifications/elicitation/complete":null},cx={ping:null,initialize:null,"completion/complete":null,"logging/setLevel":null,"prompts/get":null,"prompts/list":null,"resources/list":null,"resources/templates/list":null,"resources/read":null,"resources/subscribe":null,"resources/unsubscribe":null,"tools/call":null,"tools/list":null,"sampling/createMessage":null,"elicitation/create":null,"roots/list":null};function cj(){if(i)return i;let e=ck();return i={requestSchemas:{ping:e.PingRequestSchema,initialize:e.InitializeRequestSchema,"completion/complete":e.CompleteRequestSchema,"logging/setLevel":e.SetLevelRequestSchema,"prompts/get":e.GetPromptRequestSchema,"prompts/list":e.ListPromptsRequestSchema,"resources/list":e.ListResourcesRequestSchema,"resources/templates/list":e.ListResourceTemplatesRequestSchema,"resources/read":e.ReadResourceRequestSchema,"resources/subscribe":e.SubscribeRequestSchema,"resources/unsubscribe":e.UnsubscribeRequestSchema,"tools/call":e.CallToolRequestSchema,"tools/list":e.ListToolsRequestSchema,"tasks/get":e.GetTaskRequestSchema,"tasks/result":e.GetTaskPayloadRequestSchema,"tasks/list":e.ListTasksRequestSchema,"tasks/cancel":e.CancelTaskRequestSchema,"sampling/createMessage":e.CreateMessageRequestSchema,"elicitation/create":e.ElicitRequestSchema,"roots/list":e.ListRootsRequestSchema},notificationSchemas:{"notifications/cancelled":e.CancelledNotificationSchema,"notifications/progress":e.ProgressNotificationSchema,"notifications/initialized":e.InitializedNotificationSchema,"notifications/roots/list_changed":e.RootsListChangedNotificationSchema,"notifications/tasks/status":e.TaskStatusNotificationSchema,"notifications/message":e.LoggingMessageNotificationSchema,"notifications/resources/updated":e.ResourceUpdatedNotificationSchema,"notifications/resources/list_changed":e.ResourceListChangedNotificationSchema,"notifications/tools/list_changed":e.ToolListChangedNotificationSchema,"notifications/prompts/list_changed":e.PromptListChangedNotificationSchema,"notifications/elicitation/complete":e.ElicitationCompleteNotificationSchema},resultSchemas:{ping:e.EmptyResultSchema,initialize:e.InitializeResultSchema,"completion/complete":e.CompleteResultSchema,"logging/setLevel":e.EmptyResultSchema,"prompts/get":e.GetPromptResultSchema,"prompts/list":e.ListPromptsResultSchema,"resources/list":e.ListResourcesResultSchema,"resources/templates/list":e.ListResourceTemplatesResultSchema,"resources/read":e.ReadResourceResultSchema,"resources/subscribe":e.EmptyResultSchema,"resources/unsubscribe":e.EmptyResultSchema,"tools/call":e.CallToolResultWireSchema,"tools/list":e.ListToolsResultSchema,"sampling/createMessage":e.CreateMessageResultWithToolsSchema,"elicitation/create":e.ElicitResultSchema,"roots/list":e.ListRootsResultSchema}}}function cC(e){return Object.prototype.hasOwnProperty.call(cq,e)}function cT(e){return Object.prototype.hasOwnProperty.call(cI,e)}function cO(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)}function cE(e,t){if(void 0===e)return{ok:!1,reason:"not-in-era"};let r=e.safeParse(t);return r.success?{ok:!0,value:r.data}:{ok:!1,reason:"invalid",message:String(r.error)}}Object.keys(cq),Object.keys(cI);let cA={ok:!1,reason:"not-in-era"};function cM(e){return cO(e)&&cO(e.outputSchema)&&cw(e.outputSchema)}let cW={era:"2025-11-25",hasRequestMethod:cC,hasNotificationMethod:cT,validateRequest:(e,t)=>cE(cC(e)?cj().requestSchemas[e]:void 0,t),validateResult:(e,t)=>cE(Object.prototype.hasOwnProperty.call(cx,e)?cj().resultSchemas[e]:void 0,t),validateNotification:(e,t)=>cE(cT(e)?cj().notificationSchemas[e]:void 0,t),hasInputRequestMethod:()=>!1,validateInputRequest:()=>cA,validateInputResponse:()=>cA,samplingResultVariant:(e,t)=>{let r=ck();return cE(e?r.CreateMessageResultWithToolsSchema:r.CreateMessageResultSchema,t)},outboundEnvelope:e=>void 0,validateEnvelopeMeta:e=>[],projectCallToolResult(e,t){let r=cb(e),i=r.structuredContent;if(void 0===i)return r;let o="object"!=typeof i||null===i||Array.isArray(i),n=void 0!==t&&cw(t);return o||n?{...r,structuredContent:{result:i}}:r},decodeResult(e,t){if(cO(t)&&"resultType"in t){let e={...t};return delete e.resultType,{kind:"complete",result:e}}return{kind:"complete",result:t}},encodeResult(e,t){if("tools/list"!==e)return t;let r=t.tools;return Array.isArray(r)&&r.some(e=>cM(e))?{...t,tools:r.map(e=>cM(e)?{...e,outputSchema:function(e){var t;let r="string"==typeof e.$schema?e.$schema:void 0;if(cV(e.$id))return{...void 0!==r&&{$schema:r},type:"object",properties:{result:e},required:["result"]};let i="string"==typeof(t=e.$schema)&&ek.has(t.replace(/#$/,""))&&!0!==e.$recursiveAnchor,o=(e,t)=>{if(Array.isArray(e))return e.map(e=>o(e,!1));if(null===e||"object"!=typeof e||!t&&cV(e.$id))return e;let r={},n=!1;for(let[a,s]of Object.entries(e))t?r[a]=o(s,!1):("$ref"===a||"$dynamicRef"===a)&&"string"==typeof s?r[a]="#"===s?"#/properties/result":s.startsWith("#/")?`#/properties/result${s.slice(1)}`:s:"$recursiveRef"===a&&"#"===s&&i?n=!0:cR.has(a)?r[a]=s:cP.has(a)?r[a]=o(s,!0):r[a]=o(s,!1);return n&&("$ref"in r?r.allOf=[...Array.isArray(r.allOf)?r.allOf:[],{$ref:"#/properties/result"}]:r.$ref="#/properties/result"),r};return{...void 0!==r&&{$schema:r},type:"object",properties:{result:o(e,!1)},required:["result"]}}(e.outputSchema)}:e)}:t},encodeErrorCode:e=>-32002===e?-32602:e,checkInboundEnvelope:e=>void 0};function cN(){return o??=function(){let e=aa(()=>nL([o7(),nR(),nI(),nj(),nJ(o7(),e),nW(e)])),t=nJ(o7(),e),r=nL([o7(),nR().int()]),i=o7(),o=nL([o7(),nR().int()]),n=nQ(["user","assistant"]),a=nQ(["debug","info","notice","warning","error","critical","alert","emergency"]),s=o7().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:"Invalid Base64 string"}),d=nz({ttl:nR().optional()}),c=nz({taskId:o7()}),l=nD({progressToken:r.optional(),"io.modelcontextprotocol/related-task":c.optional()}),p=nz({_meta:l.optional()}),u=p.extend({task:d.optional()}),m=nz({_meta:l.optional()}),f=nz({method:o7(),params:m.loose().optional()}),h=nz({src:o7(),mimeType:o7().optional(),sizes:nW(o7()).optional(),theme:nQ(["light","dark"]).optional()}),y=nz({icons:nW(h).optional()}),g=nz({name:o7(),title:o7().optional()}),_=g.extend({...g.shape,...y.shape,version:o7(),websiteUrl:o7().optional(),description:o7().optional()}),v=nB(nz({applyDefaults:nI().optional()}),t),b=ad(e=>e&&"object"==typeof e&&!Array.isArray(e)&&0===Object.keys(e).length?{form:{}}:e,nB(nz({form:v.optional(),url:t.optional()}),t.optional())),$=nD({list:t.optional(),cancel:t.optional(),requests:nD({sampling:nD({createMessage:t.optional()}).optional(),elicitation:nD({create:t.optional()}).optional()}).optional()}),S=nD({list:t.optional(),cancel:t.optional(),requests:nD({tools:nD({call:t.optional()}).optional()}).optional()}),k=nz({experimental:nJ(o7(),t).optional(),sampling:nz({context:t.optional(),tools:t.optional()}).optional(),elicitation:b.optional(),roots:nz({listChanged:nI().optional()}).optional(),tasks:$.optional(),extensions:nJ(o7(),t).optional()}),w=nz({experimental:nJ(o7(),t).optional(),logging:t.optional(),completions:t.optional(),prompts:nz({listChanged:nI().optional()}).optional(),resources:nz({subscribe:nI().optional(),listChanged:nI().optional()}).optional(),tools:nz({listChanged:nI().optional()}).optional(),tasks:S.optional(),extensions:nJ(o7(),t).optional()}),R=nz({progress:nR(),total:n4(nR()),message:n4(o7())}),P=nz({...m.shape,...R.shape,progressToken:r}),V=f.extend({method:nY("notifications/progress"),params:P}),q=m.extend({level:a,logger:o7().optional(),data:nE()}),I=f.extend({method:nY("notifications/message"),params:q}),x=nz({uri:o7(),mimeType:n4(o7()),_meta:nJ(o7(),nE()).optional()}),j=x.extend({text:o7()}),C=x.extend({blob:s}),T=nz({audience:nW(n).optional(),priority:nR().min(0).max(1).optional(),lastModified:ac({offset:!0}).optional()}),O=nz({...g.shape,...y.shape,uri:o7(),description:n4(o7()),mimeType:n4(o7()),size:n4(nR()),annotations:T.optional(),_meta:n4(nD({}))}),E=nz({...g.shape,...y.shape,uriTemplate:o7(),description:n4(o7()),mimeType:n4(o7()),annotations:T.optional(),_meta:n4(nD({}))}),A=f.extend({method:nY("notifications/resources/list_changed"),params:m.optional()}),M=m.extend({uri:o7()}),W=f.extend({method:nY("notifications/resources/updated"),params:M}),N=nz({name:o7(),description:n4(o7()),required:n4(nI())}),z=nz({...g.shape,...y.shape,description:n4(o7()),arguments:n4(nW(N)),_meta:n4(nD({}))}),D=f.extend({method:nY("notifications/prompts/list_changed"),params:m.optional()}),F=nz({type:nY("text"),text:o7(),annotations:T.optional(),_meta:nJ(o7(),nE()).optional()}),L=nz({type:nY("image"),data:s,mimeType:o7(),annotations:T.optional(),_meta:nJ(o7(),nE()).optional()}),U=nz({type:nY("audio"),data:s,mimeType:o7(),annotations:T.optional(),_meta:nJ(o7(),nE()).optional()}),H=nz({type:nY("tool_use"),name:o7(),id:o7(),input:nJ(o7(),nE()),_meta:nJ(o7(),nE()).optional()}),G=nz({type:nY("resource"),resource:nL([j,C]),annotations:T.optional(),_meta:nJ(o7(),nE()).optional()}),B=O.extend({type:nY("resource_link")}),K=nL([F,L,U,B,G]),J=nz({role:n,content:K}),Z=nz({title:o7().optional(),readOnlyHint:nI().optional(),destructiveHint:nI().optional(),idempotentHint:nI().optional(),openWorldHint:nI().optional()}),Q=f.extend({method:nY("notifications/tools/list_changed"),params:m.optional()}),X=nz({name:o7().optional()}),Y=nz({hints:nW(X).optional(),costPriority:nR().min(0).max(1).optional(),speedPriority:nR().min(0).max(1).optional(),intelligencePriority:nR().min(0).max(1).optional()}),ee=nz({mode:nQ(["auto","required","none"]).optional()}),et=nz({type:nY("boolean"),title:o7().optional(),description:o7().optional(),default:nI().optional()}),er=nz({type:nY("string"),title:o7().optional(),description:o7().optional(),minLength:nR().optional(),maxLength:nR().optional(),format:nQ(["email","uri","date","date-time"]).optional(),default:o7().optional()}),ei=nz({type:nQ(["number","integer"]),title:o7().optional(),description:o7().optional(),minimum:nR().optional(),maximum:nR().optional(),default:nR().optional()}),eo=nz({type:nY("string"),title:o7().optional(),description:o7().optional(),enum:nW(o7()),default:o7().optional()}),en=nz({type:nY("string"),title:o7().optional(),description:o7().optional(),oneOf:nW(nz({const:o7(),title:o7()})),default:o7().optional()}),ea=nz({type:nY("string"),title:o7().optional(),description:o7().optional(),enum:nW(o7()),enumNames:nW(o7()).optional(),default:o7().optional()}),es=nL([eo,en]),ed=nz({type:nY("array"),title:o7().optional(),description:o7().optional(),minItems:nR().optional(),maxItems:nR().optional(),items:nz({type:nY("string"),enum:nW(o7())}),default:nW(o7()).optional()}),ec=nz({type:nY("array"),title:o7().optional(),description:o7().optional(),minItems:nR().optional(),maxItems:nR().optional(),items:nz({anyOf:nW(nz({const:o7(),title:o7()}))}),default:nW(o7()).optional()}),el=nL([ed,ec]),ep=nL([ea,es,el]),eu=nL([ep,et,er,ei]),em=u.extend({mode:nY("form").optional(),message:o7(),requestedSchema:nz({type:nY("object"),properties:nJ(o7(),eu),required:nW(o7()).optional()}).catchall(nE())}),ef=nz({type:nY("ref/resource"),uri:o7()}),eh=nz({type:nY("ref/prompt"),name:o7()}),ey=nz({uri:o7().startsWith("file://"),name:o7().optional(),_meta:nJ(o7(),nE()).optional()}),eg=k.shape,e_=nz({experimental:eg.experimental,sampling:eg.sampling,elicitation:eg.elicitation,roots:eg.roots,extensions:eg.extensions}),ev=w.shape,eb=nz({experimental:ev.experimental,logging:ev.logging,completions:ev.completions,prompts:ev.prompts,resources:ev.resources,tools:ev.tools,extensions:ev.extensions}),e$=nD({progressToken:r.optional(),[au]:o7(),[am]:_.optional(),[ah]:e_,[ay]:a.optional()}),eS=nz({...g.shape,...y.shape,description:o7().optional(),inputSchema:nD({$schema:o7().optional(),type:nY("object")}),outputSchema:nD({$schema:o7().optional()}).optional(),annotations:Z.optional(),_meta:nJ(o7(),nE()).optional()}),ek=nz({type:nY("tool_result"),toolUseId:o7(),content:nW(K),structuredContent:nE().optional(),isError:nI().optional(),_meta:nJ(o7(),nE()).optional()}),ew=nL([F,L,U,H,ek]),eR=nz({role:n,content:nL([ew,nW(ew)]),_meta:nJ(o7(),nE()).optional()}),eP=o7(),eV=nD({[af]:_.optional().catch(void 0)}),eq=eV.optional();function eI(e){return nD({_meta:eq,resultType:eP.default("complete"),...e})}let ex=eI({}),ej=eI({nextCursor:i.optional()}),eC=eI({content:nW(K),structuredContent:nE().optional(),isError:nI().optional()}),eT=eI({ttlMs:nR().int().min(0),cacheScope:nQ(["public","private"]),tools:nW(eS),nextCursor:i.optional()}),eO=eI({ttlMs:nR().int().min(0),cacheScope:nQ(["public","private"]),prompts:nW(z),nextCursor:i.optional()}),eE=eI({description:o7().optional(),messages:nW(J)}),eA=eI({ttlMs:nR().int().min(0),cacheScope:nQ(["public","private"]),resources:nW(O),nextCursor:i.optional()}),eM=eI({ttlMs:nR().int().min(0),cacheScope:nQ(["public","private"]),resourceTemplates:nW(E),nextCursor:i.optional()}),eW=eI({ttlMs:nR().int().min(0),cacheScope:nQ(["public","private"]),contents:nW(nL([j,C]))}),eN=eI({completion:nz({values:nW(o7()).max(100),total:nR().int().optional(),hasMore:nI().optional()}).loose()}),ez=eI({ttlMs:nR().int().min(0),cacheScope:nQ(["public","private"])}),eD=eI({ttlMs:nR().int().min(0).catch(0),cacheScope:nQ(["public","private"]).catch("private"),supportedVersions:nW(o7()),capabilities:eb,instructions:o7().optional()}),eF=nz({messages:nW(eR),modelPreferences:Y.optional(),systemPrompt:o7().optional(),includeContext:nQ(["none","thisServer","allServers"]).optional(),temperature:nR().optional(),maxTokens:nR().int(),stopSequences:nW(o7()).optional(),metadata:t.optional(),tools:nW(eS).optional(),toolChoice:ee.optional()}),eL=nz({method:nY("sampling/createMessage"),params:eF}),eU=nz({method:nY("roots/list"),params:nz({_meta:nJ(o7(),nE()).optional()}).optional()}),eH=nz({...eR.shape,model:o7(),stopReason:o7().optional()}),eG=nz({roots:nW(ey)}),eB=nz({action:nQ(["accept","decline","cancel"]),content:nJ(o7(),nL([o7(),nR(),nI(),nW(o7())])).optional()}),eK=nz({mode:nY("url"),message:o7(),url:o7().url()}),eJ=nL([em,eK]),eZ=nz({method:nY("elicitation/create"),params:eJ}),eQ=nL([eL,eU,eZ]),eX=nL([eH,eG,eB]),eY=nJ(o7(),eQ),e1=nJ(o7(),eX),e0=eI({inputRequests:eY.optional(),requestState:o7().optional()}),e2={inputResponses:e1.optional(),requestState:o7().optional()},e4=nz({_meta:e$,...e2}),e6=nD({progressToken:r.optional()});function e3(e,t){return nz({method:nY(e),params:nz({_meta:e$,...t})})}function e9(e,t){return nz({method:nY(e),params:nz({_meta:e6.optional(),...t}).optional()})}let e5={name:o7(),arguments:nJ(o7(),nE()).optional(),...e2},e8={cursor:i.optional()},e7=e3("tools/call",e5),te=e3("tools/list",e8),tt=e3("prompts/list",e8),tr=e3("prompts/get",{name:o7(),arguments:nJ(o7(),o7()).optional(),...e2}),ti=e3("resources/list",e8),to=e3("resources/templates/list",e8),tn=e3("resources/read",{uri:o7(),...e2}),ta={ref:nL([eh,ef]),argument:nz({name:o7(),value:o7()}),context:nz({arguments:nJ(o7(),o7()).optional()}).optional()},ts=e3("completion/complete",ta),td=e3("server/discover",{}),tc=nz({toolsListChanged:nI().optional(),promptsListChanged:nI().optional(),resourcesListChanged:nI().optional(),resourceSubscriptions:nW(o7()).optional()}),tl={notifications:tc},tp=e3("subscriptions/listen",tl),tu=eV.extend({"io.modelcontextprotocol/subscriptionId":o}),tm=nD({_meta:tu,resultType:eP.default("complete")}),tf={"tools/call":e9("tools/call",e5),"tools/list":e9("tools/list",e8),"prompts/get":e9("prompts/get",{name:o7(),arguments:nJ(o7(),o7()).optional()}),"prompts/list":e9("prompts/list",e8),"resources/list":e9("resources/list",e8),"resources/templates/list":e9("resources/templates/list",e8),"resources/read":e9("resources/read",{uri:o7()}),"completion/complete":e9("completion/complete",ta),"server/discover":e9("server/discover",{}),"subscriptions/listen":e9("subscriptions/listen",tl)};function th(e){return nD({_meta:eq,...e})}let ty={"tools/call":th({content:nW(K),structuredContent:nE().optional(),isError:nI().optional()}),"tools/list":th({ttlMs:nR().int().min(0),cacheScope:nQ(["public","private"]),tools:nW(eS),nextCursor:i.optional()}),"prompts/get":th({description:o7().optional(),messages:nW(J)}),"prompts/list":th({ttlMs:nR().int().min(0),cacheScope:nQ(["public","private"]),prompts:nW(z),nextCursor:i.optional()}),"resources/list":th({ttlMs:nR().int().min(0),cacheScope:nQ(["public","private"]),resources:nW(O),nextCursor:i.optional()}),"resources/templates/list":th({ttlMs:nR().int().min(0),cacheScope:nQ(["public","private"]),resourceTemplates:nW(E),nextCursor:i.optional()}),"resources/read":th({ttlMs:nR().int().min(0),cacheScope:nQ(["public","private"]),contents:nW(nL([j,C]))}),"completion/complete":th({completion:nz({values:nW(o7()).max(100),total:nR().int().optional(),hasMore:nI().optional()}).loose()}),"server/discover":th({ttlMs:nR().int().min(0).catch(0),cacheScope:nQ(["public","private"]).catch("private"),supportedVersions:nW(o7()),capabilities:eb,instructions:o7().optional()}),"subscriptions/listen":th({})},tg=nD({"io.modelcontextprotocol/subscriptionId":o.optional()}),t_=nz({method:nY("notifications/subscriptions/acknowledged"),params:nz({_meta:tg.optional(),notifications:tc})}),tv=nz({_meta:tg.optional(),requestId:o,reason:o7().optional()}),tb=nz({method:nY("notifications/cancelled"),params:tv}),t$=e=>nz({jsonrpc:nY("2.0"),id:nL([o7(),nR().int()]),result:e}).strict();return{JSONValueSchema:e,JSONObjectSchema:t,ProgressTokenSchema:r,CursorSchema:i,RequestIdSchema:o,RoleSchema:n,LoggingLevelSchema:a,TaskMetadataSchema:d,RelatedTaskMetadataSchema:c,RequestMetaSchema:l,BaseRequestParamsSchema:p,TaskAugmentedRequestParamsSchema:u,NotificationsParamsSchema:m,NotificationSchema:f,IconSchema:h,IconsSchema:y,BaseMetadataSchema:g,ImplementationSchema:_,ClientTasksCapabilitySchema:$,ServerTasksCapabilitySchema:S,ClientCapabilitiesSchema:k,ServerCapabilitiesSchema:w,ProgressSchema:R,ProgressNotificationParamsSchema:P,ProgressNotificationSchema:V,LoggingMessageNotificationParamsSchema:q,LoggingMessageNotificationSchema:I,ResourceContentsSchema:x,TextResourceContentsSchema:j,BlobResourceContentsSchema:C,AnnotationsSchema:T,ResourceSchema:O,ResourceTemplateSchema:E,ResourceListChangedNotificationSchema:A,ResourceUpdatedNotificationParamsSchema:M,ResourceUpdatedNotificationSchema:W,PromptArgumentSchema:N,PromptSchema:z,PromptListChangedNotificationSchema:D,TextContentSchema:F,ImageContentSchema:L,AudioContentSchema:U,ToolUseContentSchema:H,EmbeddedResourceSchema:G,ResourceLinkSchema:B,ContentBlockSchema:K,PromptMessageSchema:J,ToolAnnotationsSchema:Z,ToolListChangedNotificationSchema:Q,ModelHintSchema:X,ModelPreferencesSchema:Y,ToolChoiceSchema:ee,BooleanSchemaSchema:et,StringSchemaSchema:er,NumberSchemaSchema:ei,UntitledSingleSelectEnumSchemaSchema:eo,TitledSingleSelectEnumSchemaSchema:en,LegacyTitledEnumSchemaSchema:ea,SingleSelectEnumSchemaSchema:es,UntitledMultiSelectEnumSchemaSchema:ed,TitledMultiSelectEnumSchemaSchema:ec,MultiSelectEnumSchemaSchema:el,EnumSchemaSchema:ep,PrimitiveSchemaDefinitionSchema:eu,ElicitRequestFormParamsSchema:em,ResourceTemplateReferenceSchema:ef,PromptReferenceSchema:eh,RootSchema:ey,ClientCapabilities2026Schema:e_,ServerCapabilities2026Schema:eb,RequestMetaEnvelopeSchema:e$,ToolSchema:eS,ToolResultContentSchema:ek,SamplingMessageContentBlockSchema:ew,SamplingMessageSchema:eR,ResultTypeSchema:eP,ResultMetaSchema:eV,ResultSchema:ex,PaginatedResultSchema:ej,CallToolResultSchema:eC,ListToolsResultSchema:eT,ListPromptsResultSchema:eO,GetPromptResultSchema:eE,ListResourcesResultSchema:eA,ListResourceTemplatesResultSchema:eM,ReadResourceResultSchema:eW,CompleteResultSchema:eN,CacheableResultSchema:ez,DiscoverResultSchema:eD,CreateMessageRequestParamsSchema:eF,CreateMessageRequestSchema:eL,ListRootsRequestSchema:eU,CreateMessageResultSchema:eH,ListRootsResultSchema:eG,ElicitResultSchema:eB,ElicitRequestURLParamsSchema:eK,ElicitRequestParamsSchema:eJ,ElicitRequestSchema:eZ,InputRequestSchema:eQ,InputResponseSchema:eX,InputRequestsSchema:eY,InputResponsesSchema:e1,InputRequiredResultSchema:e0,InputResponseRequestParamsSchema:e4,CallToolRequestSchema:e7,ListToolsRequestSchema:te,ListPromptsRequestSchema:tt,GetPromptRequestSchema:tr,ListResourcesRequestSchema:ti,ListResourceTemplatesRequestSchema:to,ReadResourceRequestSchema:tn,CompleteRequestSchema:ts,DiscoverRequestSchema:td,SubscriptionFilterSchema:tc,SubscriptionsListenRequestSchema:tp,SubscriptionsListenResultMetaSchema:tu,SubscriptionsListenResultSchema:tm,dispatchRequestSchemas:tf,dispatchResultSchemas:ty,NotificationMetaSchema:tg,SubscriptionsAcknowledgedNotificationSchema:t_,CancelledNotificationParamsSchema:tv,CancelledNotificationSchema:tb,notificationSchemas2026:{"notifications/cancelled":tb,"notifications/progress":V,"notifications/message":I,"notifications/resources/updated":W,"notifications/resources/list_changed":A,"notifications/tools/list_changed":Q,"notifications/prompts/list_changed":D,"notifications/subscriptions/acknowledged":t_},JSONRPCResultResponseSchema:t$(ex),CallToolResultResponseSchema:t$(nL([eC,e0])),ListToolsResultResponseSchema:t$(eT),ListPromptsResultResponseSchema:t$(eO),GetPromptResultResponseSchema:t$(nL([eE,e0])),ListResourcesResultResponseSchema:t$(eA),ListResourceTemplatesResultResponseSchema:t$(eM),ReadResourceResultResponseSchema:t$(nL([eW,e0])),CompleteResultResponseSchema:t$(eN),DiscoverResultResponseSchema:t$(eD),SubscriptionsListenResultResponseSchema:t$(tm)}}()}let cz=["tools/list","prompts/list","resources/list","resources/templates/list","resources/read","server/discover"],cD=Symbol("modelcontextprotocol.resultCacheHintFallback");function cF(e,t){if(void 0===t)return e;let r=e[cD];if(void 0===r)return{...e,[cD]:t};let i={},o=r.ttlMs??t.ttlMs;void 0!==o&&(i.ttlMs=o);let n=r.cacheScope??t.cacheScope;return void 0!==n&&(i.cacheScope=n),{...e,[cD]:i}}function cL(e){return"number"==typeof e&&Number.isSafeInteger(e)&&e>=0}function cU(e){return"public"===e||"private"===e}function cH(e,t){if(void 0!==e.ttlMs&&!cL(e.ttlMs))throw RangeError(`Invalid cache hint for ${t}: ttlMs must be a non-negative safe integer (got ${String(e.ttlMs)})`);if(void 0!==e.cacheScope&&!cU(e.cacheScope))throw RangeError(`Invalid cache hint for ${t}: cacheScope must be 'public' or 'private' (got ${String(e.cacheScope)})`)}let cG=((Z={})[Z.ParseError=-32700]="ParseError",Z[Z.InvalidRequest=-32600]="InvalidRequest",Z[Z.MethodNotFound=-32601]="MethodNotFound",Z[Z.InvalidParams=-32602]="InvalidParams",Z[Z.InternalError=-32603]="InternalError",Z[Z.ResourceNotFound=-32002]="ResourceNotFound",Z[Z.MissingRequiredClientCapability=-32021]="MissingRequiredClientCapability",Z[Z.UnsupportedProtocolVersion=-32022]="UnsupportedProtocolVersion",Z[Z.UrlElicitationRequired=-32042]="UrlElicitationRequired",Z);var cB=class e extends Error{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.ProtocolError"})}static[Symbol.hasInstance](e){return cl(this,e)}static isInstance(e){if("function"!=typeof this)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return cl(this,e)}constructor(e,t,r){super(t),this.code=e,this.data=r,this.name="ProtocolError",cc(this,new.target)}static fromError(t,r,i){return t===cG.UrlElicitationRequired&&i&&i.elicitations?new cJ(i.elicitations,r):t===cG.UnsupportedProtocolVersion&&i&&Array.isArray(i.supported)&&"string"==typeof i.requested?new cZ({supported:i.supported,requested:i.requested},r):(t===cG.InvalidParams||t===cG.ResourceNotFound)&&"string"==typeof i?.uri&&(t===cG.ResourceNotFound||1===Object.keys(i).length)?new cK(i.uri,r):t===cG.MissingRequiredClientCapability&&i&&null!==i.requiredCapabilities&&"object"==typeof i.requiredCapabilities&&!Array.isArray(i.requiredCapabilities)?new cQ({requiredCapabilities:i.requiredCapabilities},r):new e(t,r,i)}},cK=class extends cB{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.ResourceNotFoundError"})}constructor(e,t=`Resource not found: ${e}`){super(cG.InvalidParams,t,{uri:e})}get uri(){return this.data.uri}},cJ=class extends cB{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.UrlElicitationRequiredError"})}constructor(e,t=`URL elicitation${e.length>1?"s":""} required`){super(cG.UrlElicitationRequired,t,{elicitations:e})}get elicitations(){return this.data?.elicitations??[]}},cZ=class extends cB{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.UnsupportedProtocolVersionError"})}constructor(e,t=`Unsupported protocol version: ${e.requested}`){super(cG.UnsupportedProtocolVersion,t,e)}get supported(){return this.data.supported}get requested(){return this.data.requested}},cQ=class extends cB{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.MissingRequiredClientCapabilityError"})}constructor(e,t=`Missing required client capabilities: ${Object.keys(e.requiredCapabilities).join(", ")}`){super(cG.MissingRequiredClientCapability,t,e)}get requiredCapabilities(){return this.data.requiredCapabilities}};let cX=["tools/call","prompts/get","resources/read"],cY=["elicitation/create","sampling/createMessage","roots/list"];function c1(){if(n)return n;let e=cN();return n={request:{"elicitation/create":nz({method:nY("elicitation/create"),params:e.ElicitRequestParamsSchema}),"sampling/createMessage":nz({method:nY("sampling/createMessage"),params:e.CreateMessageRequestParamsSchema}),"roots/list":nz({method:nY("roots/list"),params:nD({}).optional()})},response:{"elicitation/create":e.ElicitResultSchema,"sampling/createMessage":e.CreateMessageResultSchema,"roots/list":e.ListRootsResultSchema}}}function c0(e){return cY.includes(e)}function c2(e){return c0(e)?c1().request[e]:void 0}let c4={"tools/call":null,"tools/list":null,"prompts/get":null,"prompts/list":null,"resources/list":null,"resources/templates/list":null,"resources/read":null,"completion/complete":null,"server/discover":null,"subscriptions/listen":null},c6={"notifications/cancelled":null,"notifications/progress":null,"notifications/message":null,"notifications/resources/updated":null,"notifications/resources/list_changed":null,"notifications/tools/list_changed":null,"notifications/prompts/list_changed":null,"notifications/subscriptions/acknowledged":null};function c3(e){return Object.prototype.hasOwnProperty.call(c4,e)}function c9(e){return Object.prototype.hasOwnProperty.call(c6,e)}function c5(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)}function c8(e,t){if(void 0===e)return{ok:!1,reason:"not-in-era"};let r=e.safeParse(t);return r.success?{ok:!0,value:r.data}:{ok:!1,reason:"invalid",message:String(r.error)}}Object.keys(c4),Object.keys(c6);let c7={ok:!1,reason:"not-in-era"},le=[au,ah],lt={era:"2026-07-28",hasRequestMethod:c3,hasNotificationMethod:c9,hasInputRequestMethod:e=>void 0!==c2(e),validateRequest:(e,t)=>c8(c3(e)?cN().dispatchRequestSchemas[e]:void 0,t),validateResult:(e,t)=>c8(Object.prototype.hasOwnProperty.call(c4,e)?cN().dispatchResultSchemas[e]:void 0,t),validateNotification:(e,t)=>c8(c9(e)?cN().notificationSchemas2026[e]:void 0,t),validateInputRequest:(e,t)=>c8(c2(e),t),validateInputResponse:(e,t)=>c8(c0(e)?c1().response[e]:void 0,t),samplingResultVariant:()=>c7,outboundEnvelope:e=>({[au]:e.protocolVersion,[am]:e.clientInfo,[ah]:e.clientCapabilities,...void 0!==e.logLevel&&{[ay]:e.logLevel}}),validateEnvelopeMeta(e){let t=[];for(let r of le)r in e||t.push({key:r,problem:"missing"});let r=cN().RequestMetaEnvelopeSchema.safeParse(e);if(!r.success)for(let e of r.error.issues){let r=e.path.map(String),i=r.length>0?r.join("."):"_meta";1===r.length&&t.some(e=>e.key===i&&"missing"===e.problem)||t.push({key:i,problem:e.message})}return t},projectCallToolResult:e=>cb(e),inputRequestSchema:c2,decodeResult(e,t){if(!c5(t))return{kind:"invalid",error:new cf(cm.InvalidResult,`Invalid result for ${e}: not an object`,{method:e})};let r=t.resultType;if(void 0===r)return{kind:"invalid",error:new cf(cm.InvalidResult,`Invalid result for ${e}: missing required resultType — servers implementing protocol revision 2026-07-28 MUST include it (the absent-means-complete bridge applies only to earlier-revision servers)`,{method:e,violation:"missing-resultType"})};if("string"!=typeof r)return{kind:"invalid",error:new cf(cm.InvalidResult,`Invalid result for ${e}: non-string resultType`,{method:e,resultType:r})};if("input_required"===r){let r=t.inputRequests,i=c5(r)?r:{},o=t.requestState,n=void 0===t._meta?void 0:cN().ResultMetaSchema.safeParse(t._meta),a=n?.success?n.data:void 0;return 0===Object.keys(i).length&&"string"!=typeof o?{kind:"invalid",error:new cf(cm.InvalidResult,`Invalid result for ${e}: input_required carries neither inputRequests nor requestState (every input_required result must include at least one of the two)`,{method:e,violation:"input-required-missing-both"})}:{kind:"input_required",inputRequests:i,..."string"==typeof o&&{requestState:o},...void 0!==a&&{_meta:a}}}if("complete"!==r)return{kind:"invalid",error:new cf(cm.UnsupportedResultType,`Unsupported result type '${r}' for ${e}`,{resultType:r,method:e})};let i=function(){if(a)return a;let e=cN();return a={"tools/call":e.CallToolResultSchema,"tools/list":e.ListToolsResultSchema,"prompts/get":e.GetPromptResultSchema,"prompts/list":e.ListPromptsResultSchema,"resources/list":e.ListResourcesResultSchema,"resources/templates/list":e.ListResourceTemplatesResultSchema,"resources/read":e.ReadResourceResultSchema,"completion/complete":e.CompleteResultSchema,"server/discover":e.DiscoverResultSchema}}(),o=Object.hasOwn(i,e)?i[e]:void 0;if(void 0!==o){let r=o.safeParse(t);if(!r.success)return{kind:"invalid",error:new cf(cm.InvalidResult,`Invalid result for ${e}: ${r.error}`,{method:e})}}let n={...t};return delete n.resultType,{kind:"complete",result:n}},encodeResult:(e,t,r)=>(function(e,t){if(void 0===t)return e;let r=e._meta;return void 0===r?{...e,_meta:{[af]:t}}:null===r||"object"!=typeof r||Array.isArray(r)||void 0!==r[af]?e:{...e,_meta:{...r,[af]:t}}})(function(e,t){var r,i;let o=t[cD];if("complete"!==t.resultType||!cz.includes(e)){let e;return void 0===o?t:(e={...t},delete e[cD],e)}let n=cL(t.ttlMs)?t.ttlMs:void 0!==(r=o)&&cL(r.ttlMs)?r.ttlMs:0,a=cU(t.cacheScope)?t.cacheScope:void 0!==(i=o)&&cU(i.cacheScope)?i.cacheScope:"private",s={...t,ttlMs:n,cacheScope:a};return delete s[cD],s}(e,function(e,t){let r=t.resultType;if(void 0===r)return{...t,resultType:"complete"};if("complete"===r||cX.includes(e))return t;throw new cB(cG.InternalError,`Handler for ${e} returned resultType '${String(r)}', but results of ${e} only support 'complete' on protocol revision 2026-07-28`)}(e,function(e,t){let r=t,i=!1,o=()=>(i||(r={...r},i=!0),r),n=t.tools;"tools/list"===e&&Array.isArray(n)&&n.some(e=>c5(e)&&"execution"in e)&&(o().tools=n.map(e=>{if(!c5(e)||!("execution"in e))return e;let t={...e};return delete t.execution,t}));let a=t.capabilities;if(c5(a)&&"tasks"in a){let e={...a};delete e.tasks,o().capabilities=e}return r}(e,t))),r),encodeErrorCode:e=>-32002===e?-32602:e,checkInboundEnvelope(e){if(void 0===e.envelope)return"Request is missing the required _meta envelope for protocol revision 2026-07-28 (io.modelcontextprotocol/protocolVersion, io.modelcontextprotocol/clientCapabilities)";let t=cN().RequestMetaEnvelopeSchema.safeParse(e.envelope);if(!t.success)return`Invalid _meta envelope for protocol revision 2026-07-28: ${t.error.issues.map(e=>e.message).join("; ")}`}},lr="2026-07-28";function li(e){return void 0!==e&&e>=cg?lt:cW}function lo(e){return void 0!==e.revision?li(e.revision).era:"modern"===e.era?lt.era:cW.era}function ln(e){return ld.some(t=>t.hasRequestMethod(e))}function la(e){return ld.some(t=>t.hasNotificationMethod(e))}function ls(e){return"tasks/get"===e||"tasks/cancel"===e}let ld=[cW,lt];var lc=(e=>{let t={};for(var r in e)eh(t,r,{get:e[r],enumerable:!0});return t})({AnnotationsSchema:()=>sa,AudioContentSchema:()=>sA,BaseMetadataSchema:()=>aU,BaseRequestParamsSchema:()=>aR,BlobResourceContentsSchema:()=>so,BooleanSchemaSchema:()=>dd,CallToolRequestParamsSchema:()=>sQ,CallToolRequestSchema:()=>sX,CallToolResultSchema:()=>sJ,CancelTaskRequestSchema:()=>dK,CancelTaskResultSchema:()=>dJ,CancelledNotificationParamsSchema:()=>az,CancelledNotificationSchema:()=>aD,ClientCapabilitiesSchema:()=>aZ,ClientNotificationSchema:()=>dQ,ClientRequestSchema:()=>dZ,ClientResultSchema:()=>dX,ClientTasksCapabilitySchema:()=>aK,CompatibilityCallToolResultSchema:()=>sZ,CompleteRequestParamsSchema:()=>dI,CompleteRequestSchema:()=>dx,CompleteResultSchema:()=>dj,ContentBlockSchema:()=>sz,CreateMessageRequestParamsSchema:()=>di,CreateMessageRequestSchema:()=>dn,CreateMessageResultSchema:()=>da,CreateMessageResultWithToolsSchema:()=>ds,CreateTaskResultSchema:()=>dN,CursorSchema:()=>a$,DiscoverRequestSchema:()=>a2,DiscoverResultSchema:()=>a4,ElicitRequestFormParamsSchema:()=>db,ElicitRequestParamsSchema:()=>dS,ElicitRequestSchema:()=>dk,ElicitRequestURLParamsSchema:()=>d$,ElicitResultSchema:()=>dP,ElicitationCompleteNotificationParamsSchema:()=>dw,ElicitationCompleteNotificationSchema:()=>dR,EmbeddedResourceSchema:()=>sW,EmptyResultSchema:()=>aN,EnumSchemaSchema:()=>d_,GetPromptRequestParamsSchema:()=>sC,GetPromptRequestSchema:()=>sT,GetPromptResultSchema:()=>sF,GetTaskPayloadRequestSchema:()=>dU,GetTaskPayloadResultSchema:()=>dH,GetTaskRequestSchema:()=>dF,GetTaskResultSchema:()=>dL,IconSchema:()=>aF,IconsSchema:()=>aL,ImageContentSchema:()=>sE,ImplementationSchema:()=>aH,InitializeRequestParamsSchema:()=>aQ,InitializeRequestSchema:()=>aX,InitializeResultSchema:()=>a1,InitializedNotificationSchema:()=>a0,JSONArraySchema:()=>av,JSONObjectSchema:()=>a_,JSONRPCErrorResponseSchema:()=>aA,JSONRPCMessageSchema:()=>aM,JSONRPCNotificationSchema:()=>aO,JSONRPCRequestSchema:()=>aT,JSONRPCResponseSchema:()=>aW,JSONRPCResultResponseSchema:()=>aE,JSONValueSchema:()=>ag,LegacyTitledEnumSchemaSchema:()=>dm,ListChangedOptionsBaseSchema:()=>s1,ListPromptsRequestSchema:()=>sx,ListPromptsResultSchema:()=>sj,ListResourceTemplatesRequestSchema:()=>sp,ListResourceTemplatesResultSchema:()=>su,ListResourcesRequestSchema:()=>sc,ListResourcesResultSchema:()=>sl,ListRootsRequestSchema:()=>dT,ListRootsResultSchema:()=>dO,ListTasksRequestSchema:()=>dG,ListTasksResultSchema:()=>dB,ListToolsRequestSchema:()=>sB,ListToolsResultSchema:()=>sK,LoggingLevelSchema:()=>s0,LoggingMessageNotificationParamsSchema:()=>s6,LoggingMessageNotificationSchema:()=>s3,ModelHintSchema:()=>s9,ModelPreferencesSchema:()=>s5,MultiSelectEnumSchemaSchema:()=>dg,NotificationSchema:()=>aI,NotificationsParamsSchema:()=>aq,NumberSchemaSchema:()=>dl,PaginatedRequestParamsSchema:()=>a8,PaginatedRequestSchema:()=>a7,PaginatedResultSchema:()=>se,PingRequestSchema:()=>a6,PrimitiveSchemaDefinitionSchema:()=>dv,ProgressNotificationParamsSchema:()=>a9,ProgressNotificationSchema:()=>a5,ProgressSchema:()=>a3,ProgressTokenSchema:()=>ab,PromptArgumentSchema:()=>sq,PromptListChangedNotificationSchema:()=>sL,PromptMessageSchema:()=>sD,PromptReferenceSchema:()=>dq,PromptSchema:()=>sI,ReadResourceRequestParamsSchema:()=>sm,ReadResourceRequestSchema:()=>sf,ReadResourceResultSchema:()=>sh,RelatedTaskMetadataSchema:()=>ak,RequestIdSchema:()=>aC,RequestMetaSchema:()=>aw,RequestSchema:()=>aV,ResourceContentsSchema:()=>st,ResourceLinkSchema:()=>sN,ResourceListChangedNotificationSchema:()=>sy,ResourceRequestParamsSchema:()=>sm,ResourceSchema:()=>ss,ResourceTemplateReferenceSchema:()=>dV,ResourceTemplateSchema:()=>sd,ResourceUpdatedNotificationParamsSchema:()=>sP,ResourceUpdatedNotificationSchema:()=>sV,ResultMetaObjectSchema:()=>ax,ResultSchema:()=>aj,RoleSchema:()=>sn,RootSchema:()=>dC,RootsListChangedNotificationSchema:()=>dE,SamplingContentSchema:()=>de,SamplingMessageContentBlockSchema:()=>dt,SamplingMessageSchema:()=>dr,ServerCapabilitiesSchema:()=>aY,ServerNotificationSchema:()=>d1,ServerRequestSchema:()=>dY,ServerResultSchema:()=>d0,ServerTasksCapabilitySchema:()=>aJ,SetLevelRequestParamsSchema:()=>s2,SetLevelRequestSchema:()=>s4,SingleSelectEnumSchemaSchema:()=>df,StringSchemaSchema:()=>dc,SubscribeRequestParamsSchema:()=>sm,SubscribeRequestSchema:()=>sg,SubscriptionFilterSchema:()=>sv,SubscriptionsAcknowledgedNotificationParamsSchema:()=>sS,SubscriptionsAcknowledgedNotificationSchema:()=>sk,SubscriptionsListenRequestParamsSchema:()=>sb,SubscriptionsListenRequestSchema:()=>s$,SubscriptionsListenResultMetaSchema:()=>sw,SubscriptionsListenResultSchema:()=>sR,TaskAugmentedRequestParamsSchema:()=>aP,TaskCreationParamsSchema:()=>dA,TaskMetadataSchema:()=>aS,TaskSchema:()=>dW,TaskStatusNotificationParamsSchema:()=>dz,TaskStatusNotificationSchema:()=>dD,TaskStatusSchema:()=>dM,TextContentSchema:()=>sO,TextResourceContentsSchema:()=>sr,TitledMultiSelectEnumSchemaSchema:()=>dy,TitledSingleSelectEnumSchemaSchema:()=>du,ToolAnnotationsSchema:()=>sU,ToolChoiceSchema:()=>s8,ToolExecutionSchema:()=>sH,ToolListChangedNotificationSchema:()=>sY,ToolResultContentSchema:()=>s7,ToolSchema:()=>sG,ToolUseContentSchema:()=>sM,UnsubscribeRequestParamsSchema:()=>sm,UnsubscribeRequestSchema:()=>s_,UntitledMultiSelectEnumSchemaSchema:()=>dh,UntitledSingleSelectEnumSchemaSchema:()=>dp});let ll=e=>aT.safeParse(e).success,lp=e=>"object"==typeof e&&null!==e&&!Array.isArray(e)&&"input_required"===e.resultType,lu="x-mcp-header",lm=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/,lf=new Set(["string","integer","boolean"]),lh=["items","prefixItems","contains","additionalProperties","unevaluatedProperties","unevaluatedItems","propertyNames","patternProperties","dependentSchemas","oneOf","anyOf","allOf","not","if","then","else","$defs","definitions"],ly=new Set(["patternProperties","dependentSchemas","$defs","definitions"]);function lg(e){return 0===e.length?"":e.join(".")}cG.InvalidRequest,cG.UnsupportedProtocolVersion,cG.InvalidParams,cG.MethodNotFound,cG.InvalidParams,cG.MissingRequiredClientCapability;let l_={[cG.ParseError]:400,[cG.InvalidRequest]:400,[cG.MethodNotFound]:404,[cG.UnsupportedProtocolVersion]:400,[cG.MissingRequiredClientCapability]:400,[-32020]:400};function lv(e){return new Set(e.flatMap(e=>Object.keys(e.shape)))}function lb(e){if(null==e)return!1;let t=typeof e;return("object"===t||"function"===t)&&"~standard"in e&&"function"==typeof e["~standard"]?.validate}let l$=!1,lS="draft-2020-12";function lk(e,t="input"){let r,i=e["~standard"];if(i.jsonSchema)r=i.jsonSchema[t]({target:lS});else if("zod"===i.vendor){if(!("_zod"in e))throw Error("Schema appears to be from zod 3, which the SDK cannot convert to JSON Schema. Upgrade to zod >=4.2.0, or wrap your JSON Schema with fromJsonSchema().");l$||(l$=!0,console.warn("[mcp-sdk] Your zod version does not implement `~standard.jsonSchema` (added in zod 4.2.0). Falling back to z.toJSONSchema(). Upgrade to zod >=4.2.0 to silence this warning.")),r=ox(e,{target:lS,io:t})}else throw Error(`Schema library "${i.vendor}" does not implement StandardJSONSchemaV1 (\`~standard.jsonSchema\`). Upgrade to a version that does, or wrap your JSON Schema with fromJsonSchema().`);if("output"===t)return void 0!==r.type||!function e(t,r=t){if("properties"in t||"patternProperties"in t||"additionalProperties"in t||"required"in t)return!0;let i="string"==typeof t.$ref&&lw.exec(t.$ref);if(i&&r[i[1]]?.[i[2]]?.type==="object")return!0;for(let i of["oneOf","anyOf","allOf"]){let o=t[i];if(Array.isArray(o)&&o.length>0)return o.every(t=>null!==t&&"object"==typeof t&&("object"===t.type||e(t,"$id"in t?{}:r)))}return!1}(r)?r:{type:"object",...r};if(void 0!==r.type&&"object"!==r.type)throw Error(`MCP tool and prompt schemas must describe objects (got type: ${JSON.stringify(r.type)}). Wrap your schema in z.object({...}) or equivalent.`);return{type:"object",...r}}let lw=/^#\/(\$defs|definitions)\/([^/~%]+)$/;async function lR(e,t){let r=await e["~standard"].validate(t);return r.issues&&r.issues.length>0?{success:!1,error:r.issues.map(e=>e.path?.length?`${e.path.map(e=>String("object"==typeof e?e.key:e)).join(".")}: ${e.message}`:e.message).join(", ")}:{success:!0,data:r.value}}let lP=/\\\.\\d\{(\d+)\}/;function lV(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}let lq=new Set(["$comment","deprecated","description","examples","readOnly","title","writeOnly"]);function lI(e){return lq.has(e)||e.startsWith("x-")}let lx=new Set(["$schema",...Object.keys(db.shape.requestedSchema.shape)]),lj={string:lv([dc,dp,du,dm]),number:lv([dl]),integer:lv([dl]),boolean:lv([dd]),array:lv([dh,dy])},lC=new Set(dc.shape.format.unwrap().options);Object.assign(function(e){let t=void 0!==e.inputRequests&&Object.keys(e.inputRequests).length>0,r="string"==typeof e.requestState;if(!t&&!r)throw TypeError("inputRequired() requires at least one of inputRequests (with at least one entry) or requestState (spec: every InputRequiredResult MUST include at least one of the two)");return{resultType:"input_required",...void 0!==e.inputRequests&&{inputRequests:e.inputRequests},...void 0!==e.requestState&&{requestState:e.requestState}}},{elicit(e){try{return{method:"elicitation/create",params:function(e){var t;if(!lb(e.requestedSchema))return{...e,mode:"form",requestedSchema:e.requestedSchema};let r=e.requestedSchema["~standard"].vendor,i=function(e,t){let r={},i=[];for(let[o,n]of Object.entries(e))"properties"===o&&lV(n)?r[o]=Object.fromEntries(Object.entries(n).map(([e,r])=>[e,function(e,t,r,i){if(!lV(e))return e;let o="string"==typeof e.type&&Object.hasOwn(lj,e.type)?lj[e.type]:void 0;if(void 0===o)return e;let n={};for(let[s,d]of Object.entries(e))if(o.has(s)||lI(s))n[s]=d;else if("pattern"===s&&"string"===e.type&&"string"==typeof e.format)if(lC.has(e.format)){var a;"string"==typeof d&&(a=e.format,"zod"!==r||(function(e,t){let r;switch(e){case"email":r=[iw(nn,void 0)];break;case"uri":r=[iR(nd,void 0)];break;case"date":r=[iV(nr,void 0)];break;case"date-time":let i,o;i=lP.exec(t),o=[void 0,-1,0],i&&o.push(Number(i[1])),r=[!1,!0].flatMap(e=>[!1,!0].flatMap(t=>o.map(r=>ac({local:e,offset:t,precision:r}))))}return new Set(r.map(e=>{let t;return t=ox(e,{target:lS,io:"input"}),"string"==typeof t.pattern?t.pattern:void 0}).filter(e=>void 0!==e))})(a,d).has(d))||i.push(`${t}.${s}`)}else n[s]=d;else i.push(`${t}.${s}`);return n}(r,`properties.${e}`,t,i)])):lx.has(o)?r[o]=n:lI(o)||i.push(o);if(i.length>0)throw new cB(cG.InvalidParams,`Elicitation requestedSchema contains unsupported JSON Schema constraint(s) after Standard Schema conversion: ${i.join(", ")}`);return r}(function(e){try{return lk(e,"input")}catch(t){let e=t instanceof Error?t.message:String(t);throw new cB(cG.InvalidParams,`Elicitation requestedSchema must describe an object with flat primitive properties: ${e}`)}}(e.requestedSchema),r),o=(t=db.shape.requestedSchema,oJ(t,i));if(!o.success)throw new cB(cG.InvalidParams,`Elicitation requestedSchema only supports flat primitive properties (string, number, integer, boolean, and string enums): ${function(e,t){if(!lV(e.properties))return t;let r=Object.entries(e.properties).filter(([,e])=>!oJ(dv,e).success).map(([e])=>`properties.${e}`);return r.length>0?r.join(", "):t}(i,o.error.message)}`);let n=function e(t,r,i=""){return Array.isArray(t)&&Array.isArray(r)?t.flatMap((t,o)=>e(t,r[o],`${i}[${o}]`)):lV(t)&&lV(r)?Object.entries(t).flatMap(([t,o])=>{let n=i?`${i}.${t}`:t;return Object.prototype.hasOwnProperty.call(r,t)?e(o,r[t],n):lI(t)?[]:[n]}):[]}(i,o.data);if(n.length>0)throw new cB(cG.InvalidParams,`Elicitation requestedSchema contains unsupported JSON Schema constraint(s) after Standard Schema conversion: ${n.join(", ")}`);let a=(o.data.required??[]).filter(e=>!Object.prototype.hasOwnProperty.call(o.data.properties,e));if(a.length>0)throw new cB(cG.InvalidParams,`Elicitation requestedSchema lists required properties that are not defined in properties: ${a.join(", ")}`);return{...e,mode:"form",requestedSchema:o.data}}(e)}}catch(e){throw e instanceof cB?TypeError(e.message,{cause:e}):e}},elicitUrl:e=>({method:"elicitation/create",params:{...e,mode:"url"}}),createMessage:e=>({method:"sampling/createMessage",params:e}),listRoots:()=>({method:"roots/list"})});let lT={},lO={};function lE(e,t){let r=e.slice(0,-6);lT[r]=t,lO[r]=e=>t.safeParse(e).success}for(let e of["AnnotationsSchema","AudioContentSchema","BaseMetadataSchema","BlobResourceContentsSchema","BooleanSchemaSchema","CallToolRequestSchema","CallToolRequestParamsSchema","CallToolResultSchema","CancelledNotificationSchema","CancelledNotificationParamsSchema","CancelTaskRequestSchema","CancelTaskResultSchema","ClientCapabilitiesSchema","ClientNotificationSchema","ClientRequestSchema","ClientResultSchema","CompatibilityCallToolResultSchema","CompleteRequestSchema","CompleteRequestParamsSchema","CompleteResultSchema","ContentBlockSchema","CreateMessageRequestSchema","CreateMessageRequestParamsSchema","CreateMessageResultSchema","CreateMessageResultWithToolsSchema","CreateTaskResultSchema","CursorSchema","DiscoverRequestSchema","DiscoverResultSchema","ElicitationCompleteNotificationSchema","ElicitationCompleteNotificationParamsSchema","ElicitRequestSchema","ElicitRequestFormParamsSchema","ElicitRequestParamsSchema","ElicitRequestURLParamsSchema","ElicitResultSchema","EmbeddedResourceSchema","EmptyResultSchema","EnumSchemaSchema","GetPromptRequestSchema","GetPromptRequestParamsSchema","GetPromptResultSchema","GetTaskPayloadRequestSchema","GetTaskPayloadResultSchema","GetTaskRequestSchema","GetTaskResultSchema","IconSchema","IconsSchema","ImageContentSchema","ImplementationSchema","InitializedNotificationSchema","InitializeRequestSchema","InitializeRequestParamsSchema","InitializeResultSchema","JSONArraySchema","JSONObjectSchema","JSONRPCErrorResponseSchema","JSONRPCMessageSchema","JSONRPCNotificationSchema","JSONRPCRequestSchema","JSONRPCResponseSchema","JSONRPCResultResponseSchema","JSONValueSchema","LegacyTitledEnumSchemaSchema","ListPromptsRequestSchema","ListPromptsResultSchema","ListResourcesRequestSchema","ListResourcesResultSchema","ListResourceTemplatesRequestSchema","ListResourceTemplatesResultSchema","ListRootsRequestSchema","ListRootsResultSchema","ListTasksRequestSchema","ListTasksResultSchema","ListToolsRequestSchema","ListToolsResultSchema","LoggingLevelSchema","LoggingMessageNotificationSchema","LoggingMessageNotificationParamsSchema","ModelHintSchema","ModelPreferencesSchema","MultiSelectEnumSchemaSchema","NotificationSchema","NumberSchemaSchema","PaginatedRequestSchema","PaginatedRequestParamsSchema","PaginatedResultSchema","PingRequestSchema","PrimitiveSchemaDefinitionSchema","ProgressSchema","ProgressNotificationSchema","ProgressNotificationParamsSchema","ProgressTokenSchema","PromptSchema","PromptArgumentSchema","PromptListChangedNotificationSchema","PromptMessageSchema","PromptReferenceSchema","ReadResourceRequestSchema","ReadResourceRequestParamsSchema","ReadResourceResultSchema","RelatedTaskMetadataSchema","RequestSchema","RequestIdSchema","RequestMetaSchema","ResourceSchema","ResourceContentsSchema","ResourceLinkSchema","ResourceListChangedNotificationSchema","ResourceRequestParamsSchema","ResourceTemplateSchema","ResourceTemplateReferenceSchema","ResourceUpdatedNotificationSchema","ResourceUpdatedNotificationParamsSchema","ResultMetaObjectSchema","ResultSchema","RoleSchema","RootSchema","RootsListChangedNotificationSchema","SamplingContentSchema","SamplingMessageSchema","SamplingMessageContentBlockSchema","ServerCapabilitiesSchema","ServerNotificationSchema","ServerRequestSchema","ServerResultSchema","SetLevelRequestSchema","SetLevelRequestParamsSchema","SingleSelectEnumSchemaSchema","StringSchemaSchema","SubscribeRequestSchema","SubscribeRequestParamsSchema","SubscriptionFilterSchema","SubscriptionsAcknowledgedNotificationSchema","SubscriptionsAcknowledgedNotificationParamsSchema","SubscriptionsListenRequestSchema","SubscriptionsListenRequestParamsSchema","SubscriptionsListenResultSchema","SubscriptionsListenResultMetaSchema","TaskAugmentedRequestParamsSchema","TaskCreationParamsSchema","TaskMetadataSchema","TaskSchema","TaskStatusSchema","TaskStatusNotificationSchema","TaskStatusNotificationParamsSchema","TextContentSchema","TextResourceContentsSchema","TitledMultiSelectEnumSchemaSchema","TitledSingleSelectEnumSchemaSchema","ToolSchema","ToolAnnotationsSchema","ToolChoiceSchema","ToolExecutionSchema","ToolListChangedNotificationSchema","ToolResultContentSchema","ToolUseContentSchema","UnsubscribeRequestSchema","UnsubscribeRequestParamsSchema","UntitledMultiSelectEnumSchemaSchema","UntitledSingleSelectEnumSchemaSchema"])lE(e,lc[e]);for(let[e,t]of Object.entries({IdJagTokenExchangeResponseSchema:ce,OAuthClientInformationFullSchema:cn,OAuthClientInformationSchema:co,OAuthClientMetadataSchema:ci,OAuthClientRegistrationErrorSchema:ca,OAuthErrorResponseSchema:ct,OAuthMetadataSchema:d9,OAuthProtectedResourceMetadataSchema:d3,OAuthTokenRevocationRequestSchema:cs,OAuthTokensSchema:d7,OpenIdProviderDiscoveryMetadataSchema:d8,OpenIdProviderMetadataSchema:d5}))lE(e,t);Object.freeze(lT),Object.freeze(lO);let lA=[au,am,ah,ay],lM=["inputResponses","requestState"];function lW(e,t){let r=e.params;if(!lL(r))return{message:e,lifted:{}};let i=r._meta,o=lL(i)?lA.filter(e=>e in i):[],n="request"===t?lM.filter(e=>e in r):[];if(0===o.length&&0===n.length)return{message:e,lifted:{}};let a={},s={...r};if(o.length>0&&lL(i)){let e={},t={...i};for(let r of o)e[r]=i[r],delete t[r];a.envelope=e,Object.keys(t).length>0?s._meta=t:delete s._meta}for(let e of n)"inputResponses"===e&&(a.inputResponses=s[e]),"requestState"===e&&(a.requestState=s[e]),delete s[e];return{message:{...e,params:s},lifted:a}}function lN(e,t){let r=e.validateResult(t,void 0);if(r.ok||"not-in-era"!==r.reason)return{"~standard":{version:1,vendor:"mcp-wire-codec",validate(r){let i=e.validateResult(t,r);return i.ok?{value:i.value}:{issues:[{message:"invalid"===i.reason?i.message:`not-in-era: ${t}`}]}}}}}let lz=(Q=void 0,()=>Q);function lD(e,t){return{...e,mcpReq:{...e.mcpReq,requestState:()=>t}}}var lF=class{_transport;_requestMessageId=0;_requestHandlers=new Map;_customSchemaRequestMethods=new Set;_requestHandlerAbortControllers=new Map;_notificationHandlers=new Map;_responseHandlers=new Map;_progressHandlers=new Map;_timeoutInfo=new Map;_pendingDebouncedNotifications=new Set;_negotiatedProtocolVersion;_supportedProtocolVersions;onclose;onerror;fallbackRequestHandler;fallbackNotificationHandler;constructor(e){this._options=e,this._supportedProtocolVersions=e?.supportedProtocolVersions??ap,this.setNotificationHandler("notifications/cancelled",e=>{this._oncancel(e)}),this.setNotificationHandler("notifications/progress",e=>{this._onprogress(e)}),this.setRequestHandler("ping",e=>({}))}_shouldDropInbound(e){}_outboundMetaEnvelope(){}_envelopeOutbound(e){let t=this._outboundMetaEnvelope();if(void 0===t)return e;let r=e.params??{};return{...e,params:{...r,_meta:{...t,...r._meta}}}}_resolveNonCompleteResult(e,t){return Promise.reject(new cf(cm.UnsupportedResultType,`Unsupported result type '${e.kind}' for ${t.request.method}`,{resultType:e.kind,method:t.request.method}))}_getRequestHandler(e){return this._requestHandlers.get(e)}async _oncancel(e){void 0!==e.params.requestId&&this._requestHandlerAbortControllers.get(e.params.requestId)?.abort(e.params.reason)}_setupTimeout(e,t,r,i,o=!1){this._timeoutInfo.set(e,{timeoutId:setTimeout(i,t),startTime:Date.now(),timeout:t,maxTotalTimeout:r,resetTimeoutOnProgress:o,onTimeout:i})}_resetTimeout(e){let t=this._timeoutInfo.get(e);if(!t)return!1;let r=Date.now()-t.startTime;if(t.maxTotalTimeout&&r>=t.maxTotalTimeout)throw this._timeoutInfo.delete(e),new cf(cm.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:t.maxTotalTimeout,totalElapsed:r});return clearTimeout(t.timeoutId),t.timeoutId=setTimeout(t.onTimeout,t.timeout),!0}_cleanupTimeout(e){let t=this._timeoutInfo.get(e);t&&(clearTimeout(t.timeoutId),this._timeoutInfo.delete(e))}async connect(e){this._transport=e;let t=this.transport?.onclose;this._transport.onclose=()=>{try{t?.()}finally{this._onclose()}};let r=this.transport?.onerror;this._transport.onerror=e=>{r?.(e),this._onerror(e)};let i=this._transport?.onmessage;this._transport.onmessage=(e,t)=>{if(i?.(e,t),aE.safeParse(e).success||aA.safeParse(e).success)this._onresponse(e);else if(ll(e))this._onrequest(e,t);else aO.safeParse(e).success?this._onnotification(e,t):this._onerror(Error(`Unknown message type: ${JSON.stringify(e)}`))},e.setSupportedProtocolVersions?.(this._supportedProtocolVersions),await this._transport.start()}_onclose(){let e=this._responseHandlers;for(let e of(this._responseHandlers=new Map,this._progressHandlers.clear(),this._pendingDebouncedNotifications.clear(),this._timeoutInfo.values()))clearTimeout(e.timeoutId);this._timeoutInfo.clear();let t=this._requestHandlerAbortControllers;this._requestHandlerAbortControllers=new Map;let r=new cf(cm.ConnectionClosed,"Connection closed");this._transport=void 0;try{this.onclose?.()}finally{for(let t of e.values())t(r);for(let e of t.values())e.abort(r)}}_onerror(e){this.onerror?.(e)}_onnotification(e,t){let{message:r}=lW(e,"notification"),i=this._negotiatedWireCodec();if(t?.classification===void 0&&"drop"===this._shouldDropInbound(e))return;if(t?.classification!==void 0){let e=lo(t.classification);if(e!==i.era)return void this._onerror(Error(`Era mismatch on inbound notification '${r.method}': classified as ${e} but this instance serves ${i.era}`))}if(la(r.method)&&!i.hasNotificationMethod(r.method))return;let o=this._notificationHandlers.get(r.method),n=this.fallbackNotificationHandler;(void 0!==o||void 0!==n)&&Promise.resolve().then(()=>void 0===o?n(r):o(r,i)).catch(e=>this._onerror(Error(`Uncaught error in notification handler: ${e}`)))}_onrequest(e,t){var r;let{message:i,lifted:o}=lW(e,"request"),n=this._negotiatedWireCodec();if(t?.classification===void 0&&"drop"===this._shouldDropInbound(e))return void this._onerror(Error(`Dropped inbound request '${e.method}': not servable on this connection's protocol era`));let a=this._transport,s=(e,t,r)=>{let o={jsonrpc:"2.0",id:i.id,error:{code:e,message:t,...void 0!==r&&{data:r}}};a?.send(o).catch(e=>this._onerror(Error(`Failed to send an error response: ${e}`)))};if(t?.classification!==void 0){let e=lo(t.classification);if(e!==n.era){this._onerror(Error(`Era mismatch on inbound request '${i.method}': classified as ${e} but this instance serves ${n.era}`));let r=t.classification.revision??e;s(cG.UnsupportedProtocolVersion,`Unsupported protocol version: ${r}`,{supported:this._supportedProtocolVersions,requested:r});return}}if(ln(i.method)&&!n.hasRequestMethod(i.method)&&!(ls(i.method)&&this._customSchemaRequestMethods.has(i.method)))return void s(cG.MethodNotFound,"Method not found");let d=this._requestHandlers.get(i.method)??this.fallbackRequestHandler;if(void 0===d)return void s(cG.MethodNotFound,"Method not found");let c=n.checkInboundEnvelope(o);if(void 0!==c)return void s(cG.InvalidParams,c);let l=(e,t)=>this._notificationViaCodec(this._resolveOutboundCodec(e.method),e,{...t,relatedRequestId:i.id}),p=(e,t,r)=>this._requestWithSchemaViaCodec(this._resolveOutboundCodec(e.method),e,t,{...r,relatedRequestId:i.id}),u=new AbortController;this._requestHandlerAbortControllers.set(i.id,u);let m=void 0===o.inputResponses?void 0:function(e){let t={},r=[];if(!lU(e))return{accepted:t,droppedKeys:r};for(let[i,o]of Object.entries(e)){if(!lU(o)||"method"in o||"result"in o){r.push(i);continue}t[i]=o}return{accepted:t,droppedKeys:r}}(o.inputResponses),f={sessionId:a?.sessionId,mcpReq:{id:i.id,method:i.method,_meta:i.params?._meta,...void 0!==o.envelope&&{envelope:o.envelope},...void 0!==m&&{inputResponses:m.accepted},...void 0!==m&&m.droppedKeys.length>0&&{droppedInputResponseKeys:m.droppedKeys},requestState:void 0===o.requestState?lz:(r=o.requestState,()=>r),signal:u.signal,send:(e,t,r)=>{let i=this._resolveOutboundCodec(e.method);if(this._assertOutboundRequestInEra(i,e.method),lb(t))return p(e,t,r);let o=lN(i,e.method);if(void 0===o)throw TypeError(`'${e.method}' is not a spec method; pass a result schema as the second argument to ctx.mcpReq.send().`);return p(e,o,t)},notify:l},http:t?.authInfo?{authInfo:t.authInfo}:void 0},h=this.buildContext(f,t);Promise.resolve().then(()=>d(i,h)).then(async e=>{let t;if(u.signal.aborted)return;try{t=n.encodeResult(i.method,e,this._outboundServerInfo())}catch(e){this._onerror(Error(`Failed to encode result for ${i.method}: ${e}`)),s(cG.InternalError,"Internal error");return}let r={result:t,jsonrpc:"2.0",id:i.id};await a?.send(r)},async e=>{if(u.signal.aborted)return;let t=Number.isSafeInteger(e.code)?e.code:cG.InternalError,r={jsonrpc:"2.0",id:i.id,error:{code:n.encodeErrorCode(t),message:e.message??"Internal error",...void 0!==e.data&&{data:e.data}}};await a?.send(r)}).catch(e=>this._onerror(Error(`Failed to send response: ${e}`))).finally(()=>{this._requestHandlerAbortControllers.get(i.id)===u&&this._requestHandlerAbortControllers.delete(i.id)})}_onprogress(e){let{progressToken:t,...r}=e.params,i=Number(t),o=this._progressHandlers.get(i);if(!o)return void this._onerror(Error(`Received a progress notification for an unknown token: ${JSON.stringify(e)}`));let n=this._responseHandlers.get(i),a=this._timeoutInfo.get(i);if(a&&n&&a.resetTimeoutOnProgress)try{this._resetTimeout(i)}catch(e){this._responseHandlers.delete(i),this._progressHandlers.delete(i),this._cleanupTimeout(i),n(e);return}o(r)}_onresponse(e){let t=Number(e.id),r=this._responseHandlers.get(t);void 0===r?this._onerror(Error(`Received a response for an unknown message ID: ${JSON.stringify(e)}`)):(this._responseHandlers.delete(t),this._cleanupTimeout(t),this._progressHandlers.delete(t),r(aE.safeParse(e).success?e:cB.fromError(e.error.code,e.error.message,e.error.data)))}get transport(){return this._transport}async close(){await this._transport?.close()}request(e,t,r){let i=this._resolveOutboundCodec(e.method);if(lb(t))return ls(e.method)||this._assertOutboundRequestInEra(i,e.method),this._requestWithSchemaViaCodec(i,e,t,r);this._assertOutboundRequestInEra(i,e.method);let o=lN(i,e.method);if(void 0===o)throw TypeError(`'${e.method}' is not a spec method; pass a result schema as the second argument to request().`);return this._requestWithSchemaViaCodec(i,e,o,t)}_negotiatedWireCodec(){return li(this._negotiatedProtocolVersion)}_wireCodec(){return this._negotiatedWireCodec()}_resolveOutboundCodec(e){if(void 0===this._negotiatedProtocolVersion){let t=function(e){switch(e){case"initialize":case"notifications/initialized":return li(void 0);case"server/discover":return li(lr);default:return}}(e);if(t)return t}return this._negotiatedWireCodec()}_assertOutboundRequestInEra(e,t){if(ln(t)&&!e.hasRequestMethod(t))throw new cf(cm.MethodNotSupportedByProtocolVersion,`Method '${t}' is not supported by the negotiated protocol version (wire era ${e.era})`,{method:t,era:e.era})}_requestWithSchema(e,t,r){let i=this._resolveOutboundCodec(e.method);return this._assertOutboundRequestInEra(i,e.method),this._requestWithSchemaViaCodec(i,e,t,r)}_requestWithSchemaViaCodec(e,t,r,i){let o,n,{relatedRequestId:a,resumptionToken:s,onresumptiontoken:d,headers:c}=i??{},l=Date.now();return new Promise((p,u)=>{let m=e=>{u(e)};if(!this._transport)return void m(Error("Not connected"));if(this._options?.enforceStrictCapabilities===!0)try{this.assertCapabilityForMethod(t.method)}catch(e){m(e);return}if(i?.signal?.aborted){let e=i.signal.reason;throw e instanceof cf?e:new cf(cm.RequestTimeout,String(e))}let f=e.era===lr&&!0===this._transport.hasPerRequestStream?new AbortController:void 0,h=this._requestMessageId++;n=h;let y={...t,jsonrpc:"2.0",id:h};i?.onprogress&&(this._progressHandlers.set(h,i.onprogress),y.params={...t.params,_meta:{...t.params?._meta,progressToken:h}});let g=this._envelopeOutbound(y),_=!1,v=e=>{_||(this._progressHandlers.delete(h),void 0===f?"initialize"!==t.method&&this._transport?.send(this._envelopeOutbound({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:h,reason:String(e)}}),{relatedRequestId:a,resumptionToken:s,onresumptiontoken:d}).catch(e=>this._onerror(Error(`Failed to send cancellation: ${e}`))):f.abort(),u(e instanceof cf?e:new cf(cm.RequestTimeout,String(e))))};this._responseHandlers.set(h,o=>{let n;if(!i?.signal?.aborted){if(_=!0,o instanceof Error)return u(o);try{n=e.decodeResult(t.method,o.result)}catch(e){return u(e instanceof Error?e:Error(String(e)))}if("invalid"===n.kind)return u(n.error);if("input_required"===n.kind){var a;return i?.allowInputRequired===!0?p({resultType:"input_required",inputRequests:(a=n).inputRequests,...void 0!==a.requestState&&{requestState:a.requestState},...void 0!==a._meta&&{_meta:a._meta}}):p(this._resolveNonCompleteResult(n,{codec:e,request:t,resultSchema:r,options:i,flowStartedAt:l,retry:(i,o)=>this._requestWithSchemaViaCodec(e,void 0===i?{method:t.method}:{method:t.method,params:i},r,o)}))}lR(r,n.result).then(e=>{e.success?p(e.data):u(new cf(cm.InvalidResult,`Invalid result for ${t.method}: ${e.error}`))},u)}}),o=()=>v(i?.signal?.reason),i?.signal?.addEventListener("abort",o,{once:!0});let b=i?.timeout??6e4;this._setupTimeout(h,b,i?.maxTotalTimeout,()=>v(new cf(cm.RequestTimeout,"Request timed out",{timeout:b})),i?.resetTimeoutOnProgress??!1),this._transport.send(g,{relatedRequestId:a,resumptionToken:s,onresumptiontoken:d,headers:c,requestSignal:f?.signal}).catch(e=>{this._progressHandlers.delete(h),u(e)})}).finally(()=>{o&&i?.signal?.removeEventListener("abort",o),void 0!==n&&(this._responseHandlers.delete(n),this._cleanupTimeout(n))})}async notification(e,t){return await this._notificationViaCodec(this._resolveOutboundCodec(e.method),e,t)}async _notificationViaCodec(e,t,r){if(!this._transport)throw new cf(cm.NotConnected,"Not connected");if(la(t.method)&&!e.hasNotificationMethod(t.method))throw new cf(cm.MethodNotSupportedByProtocolVersion,`Notification '${t.method}' is not supported by the negotiated protocol version (wire era ${e.era})`,{method:t.method,era:e.era});this.assertNotificationCapability(t.method);let i=this._envelopeOutbound({jsonrpc:"2.0",...t});if((this._options?.debouncedNotificationMethods??[]).includes(t.method)&&!t.params&&r?.relatedRequestId===void 0){if(this._pendingDebouncedNotifications.has(t.method))return;this._pendingDebouncedNotifications.add(t.method),Promise.resolve().then(()=>{this._pendingDebouncedNotifications.delete(t.method),this._transport&&this._transport?.send(i,r).catch(e=>this._onerror(e))});return}await this._transport.send(i,r)}setRequestHandler(e,t,r){let i;if(this.assertRequestHandlerCapability(e),"function"==typeof t){if(!ln(e))throw TypeError(`'${e}' is not a spec request method; pass schemas as the second argument to setRequestHandler().`);i=(r,i)=>{let o=this._negotiatedWireCodec(),n=o.validateRequest(e,r);if(n.ok||"not-in-era"!==n.reason||(n=o.validateInputRequest(e,r)),!n.ok){if("not-in-era"===n.reason)throw new cB(cG.InternalError,`No wire schema for ${e} in the resolved era`);throw Error(n.message)}return Promise.resolve(t(n.value,i))}}else if(r)i=async(i,o)=>{let n=await lR(t.params,{...i.params});if(!n.success)throw new cB(cG.InvalidParams,`Invalid params for ${e}: ${n.error}`);return r(n.data,o)};else throw TypeError("setRequestHandler: handler is required");"function"==typeof t?this._customSchemaRequestMethods.delete(e):this._customSchemaRequestMethods.add(e),this._requestHandlers.set(e,this._wrapHandler(e,i))}_wrapHandler(e,t){return t}_outboundServerInfo(){}removeRequestHandler(e){this._requestHandlers.delete(e),this._customSchemaRequestMethods.delete(e)}assertCanSetRequestHandler(e){if(this._requestHandlers.has(e))throw Error(`A request handler for ${e} already exists, which would be overridden`)}setNotificationHandler(e,t,r){if("function"==typeof t){if(!la(e))throw TypeError(`'${e}' is not a spec notification method; pass schemas as the second argument to setNotificationHandler().`);this._notificationHandlers.set(e,(r,i)=>{let o=i.validateNotification(e,r);if(!o.ok){if("not-in-era"===o.reason)throw new cB(cG.InternalError,`No wire schema for ${e} in the resolved era`);throw Error(o.message)}return Promise.resolve(t(o.value))});return}if(!r)throw TypeError("setNotificationHandler: handler is required");this._notificationHandlers.set(e,async i=>{let o=await lR(t.params,{...i.params});if(!o.success)throw new cB(cG.InvalidParams,`Invalid params for notification ${e}: ${o.error}`);await r(o.data,i)})}removeNotificationHandler(e){this._notificationHandlers.delete(e)}};function lL(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)}function lU(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}var lH=e$((eb(e=>{var t=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,r=/\\([\u000b\u0020-\u00ff])/g,i=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;function o(e){this.parameters=Object.create(null),this.type=e}e.parse=function(e){if(!e)throw TypeError("argument string is required");var n,a,s,d="object"==typeof e?function(e){var t;if("function"==typeof e.getHeader?t=e.getHeader("content-type"):"object"==typeof e.headers&&(t=e.headers&&e.headers["content-type"]),"string"!=typeof t)throw TypeError("content-type header is missing from object");return t}(e):e;if("string"!=typeof d)throw TypeError("argument string is required to be a string");var c=d.indexOf(";"),l=-1!==c?d.slice(0,c).trim():d.trim();if(!i.test(l))throw TypeError("invalid media type");var p=new o(l.toLowerCase());if(-1!==c){for(t.lastIndex=c;a=t.exec(d);){if(a.index!==c)throw TypeError("invalid parameter format");c+=a[0].length,n=a[1].toLowerCase(),34===(s=a[2]).charCodeAt(0)&&-1!==(s=s.slice(1,-1)).indexOf("\\")&&(s=s.replace(r,"$1")),p.parameters[n]=s}if(c!==d.length)throw TypeError("invalid parameter format")}return p}}))(),1),lG=class{_buffer;_maxBufferSize;constructor(e){this._maxBufferSize=e?.maxBufferSize??0xa00000}append(e){if((this._buffer?.length??0)+e.length>this._maxBufferSize)throw this.clear(),Error(`ReadBuffer exceeded maximum size of ${this._maxBufferSize} bytes`);this._buffer=this._buffer?Buffer.concat([this._buffer,e]):e}readMessage(){for(;this._buffer;){let t=this._buffer.indexOf("\n");if(-1===t)break;let r=this._buffer.toString("utf8",0,t).replace(/\r$/,"");this._buffer=this._buffer.subarray(t+1);try{var e;return e=r,aM.parse(JSON.parse(e))}catch(e){if(e instanceof SyntaxError)continue;throw e}}return null}clear(){this._buffer=void 0}};let lB=/^[A-Za-z0-9._-]{1,128}$/;function lK(e){let t=function(e){let t=[];if(0===e.length)return{isValid:!1,warnings:["Tool name cannot be empty"]};if(e.length>128)return{isValid:!1,warnings:[`Tool name exceeds maximum length of 128 characters (current: ${e.length})`]};if(e.includes(" ")&&t.push("Tool name contains spaces, which may cause parsing issues"),e.includes(",")&&t.push("Tool name contains commas, which may cause parsing issues"),(e.startsWith("-")||e.endsWith("-"))&&t.push("Tool name starts or ends with a dash, which may cause parsing issues in some contexts"),(e.startsWith(".")||e.endsWith("."))&&t.push("Tool name starts or ends with a dot, which may cause parsing issues in some contexts"),!lB.test(e)){let r=[...e].filter(e=>!/[A-Za-z0-9._-]/.test(e)).filter((e,t,r)=>r.indexOf(e)===t);return t.push(`Tool name contains invalid characters: ${r.map(e=>`"${e}"`).join(", ")}`,"Allowed characters are: A-Z, a-z, 0-9, underscore (_), dash (-), and dot (.)"),{isValid:!1,warnings:t}}return{isValid:!0,warnings:t}}(e);var r=t.warnings;if(r.length>0){for(let t of(console.warn(`Tool name validation warning for "${e}":`),r))console.warn(` - ${t}`);console.warn("Tool registration will proceed, but this may cause compatibility issues."),console.warn("Consider updating the tool name to conform to the MCP tool naming standard."),console.warn("See SEP: Specify Format for Tool Names (https://github.com/modelcontextprotocol/modelcontextprotocol/issues/986) for more details.")}return t.isValid}var lJ=class e{static isTemplate(e){return/\{[^}\s]+\}/.test(e)}static validateLength(e,t,r){if(e.length>t)throw Error(`${r} exceeds maximum length of ${t} characters (got ${e.length})`)}template;parts;get variableNames(){return this.parts.flatMap(e=>"string"==typeof e?[]:e.names)}constructor(t){e.validateLength(t,1e6,"Template"),this.template=t,this.parts=this.parse(t)}toString(){return this.template}parse(t){let r=[],i="",o=0,n=0;for(;o1e4)throw Error("Template contains too many expressions (max 10000)");let s=t.slice(o+1,a),d=this.getOperator(s),c=s.includes("*"),l=this.getNames(s),p=l[0];for(let t of l)e.validateLength(t,1e6,"Variable name");r.push({name:p,operator:d,names:l,exploded:c}),o=a+1}else i+=t[o],o++;return i&&r.push(i),r}getOperator(e){return["+","#",".","/","?","&"].find(t=>e.startsWith(t))||""}getNames(e){let t=this.getOperator(e);return e.slice(t.length).split(",").map(e=>e.replace("*","").trim()).filter(e=>e.length>0)}encodeValue(t,r){return(e.validateLength(t,1e6,"Variable value"),"+"===r||"#"===r)?encodeURI(t):encodeURIComponent(t)}expandPart(e,t){if("?"===e.operator||"&"===e.operator){let r=e.names.map(r=>{let i=t[r];return void 0===i?"":`${r}=${Array.isArray(i)?i.map(t=>this.encodeValue(t,e.operator)).join(","):this.encodeValue(i.toString(),e.operator)}`}).filter(e=>e.length>0);return 0===r.length?"":("?"===e.operator?"?":"&")+r.join("&")}if(e.names.length>1){let r=e.names.map(e=>t[e]).filter(e=>void 0!==e);return 0===r.length?"":r.map(e=>Array.isArray(e)?e[0]:e).join(",")}let r=t[e.name];if(void 0===r)return"";let i=(Array.isArray(r)?r:[r]).map(t=>this.encodeValue(t,e.operator));switch(e.operator){case"":case"+":default:return i.join(",");case"#":return"#"+i.join(",");case".":return"."+i.join(".");case"/":return"/"+i.join("/")}}expand(e){let t="",r=!1;for(let i of this.parts){if("string"==typeof i){t+=i;continue}let o=this.expandPart(i,e);o&&(t+=("?"===i.operator||"&"===i.operator)&&r?o.replace("?","&"):o,("?"===i.operator||"&"===i.operator)&&(r=!0))}return t}escapeRegExp(e){return e.replaceAll(/[.*+?^${}()|[\]\\]/g,String.raw`\$&`)}partToRegExp(t){let r,i=[];for(let r of t.names)e.validateLength(r,1e6,"Variable name");if("?"===t.operator||"&"===t.operator){for(let e=0;e"object"==typeof e&&null!==e&&"_zod"in e)}(e))return nz(e);if("object"==typeof e&&null!==e&&!lb(e)&&Object.values(e).some(e=>"object"==typeof e&&null!==e&&!("_zod"in e)&&"_def"in e&&"string"==typeof e._def?.typeName))throw TypeError("Raw-shape inputSchema/outputSchema/argsSchema fields must be Zod v4 schemas. Got a Zod v3 field schema. Import from `zod/v4` (or upgrade your zod import), or wrap with `z.object({...})` yourself.");if(!lb(e))throw TypeError("inputSchema/outputSchema/argsSchema must be a Standard Schema (e.g. z.object({...})) or a raw Zod shape ({ field: z.string() }).");return e}}var lQ=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;var t=class{};e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var r=class extends t{constructor(t){if(super(),!e.IDENTIFIER.test(t))throw Error("CodeGen: name must be a valid identifier");this.str=t}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};e.Name=r;var i=class extends t{constructor(e){super(),this._items="string"==typeof e?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return""===e||'""'===e}get str(){var e;return null!=(e=this._str)?e:this._str=this._items.reduce((e,t)=>`${e}${t}`,"")}get names(){var e;return null!=(e=this._names)?e:this._names=this._items.reduce((e,t)=>(t instanceof r&&(e[t.str]=(e[t.str]||0)+1),e),{})}};function o(e,...t){let r=[e[0]],n=0;for(;n{Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;let t=lQ();var r,i,o=class extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}};(r=i||(e.UsedValueState=i={}))[r.Started=0]="Started",r[r.Completed=1]="Completed",e.varKinds={const:new t.Name("const"),let:new t.Name("let"),var:new t.Name("var")};var n=class{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof t.Name?e:this.name(e)}name(e){return new t.Name(this._newName(e))}_newName(e){let t=this._names[e]||this._nameGroup(e);return`${e}${t.index++}`}_nameGroup(e){var t,r;if((null==(r=null==(t=this._parent)?void 0:t._prefixes)?void 0:r.has(e))||this._prefixes&&!this._prefixes.has(e))throw Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}};e.Scope=n;var a=class extends t.Name{constructor(e,t){super(t),this.prefix=e}setValue(e,{property:r,itemIndex:i}){this.value=e,this.scopePath=(0,t._)`.${new t.Name(r)}[${i}]`}};e.ValueScopeName=a;let s=(0,t._)`\n`;var d=class extends n{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?s:t.nil}}get(){return this._scope}name(e){return new a(e,this._newName(e))}value(e,t){var r;if(void 0===t.ref)throw Error("CodeGen: ref must be passed in value");let i=this.toName(e),{prefix:o}=i,n=null!=(r=t.key)?r:t.ref,a=this._values[o];if(a){let e=a.get(n);if(e)return e}else a=this._values[o]=new Map;a.set(n,i);let s=this._scope[o]||(this._scope[o]=[]),d=s.length;return s[d]=t.ref,i.setValue(t,{property:o,itemIndex:d}),i}getValue(e,t){let r=this._values[e];if(r)return r.get(t)}scopeRefs(e,r=this._values){return this._reduceValues(r,r=>{if(void 0===r.scopePath)throw Error(`CodeGen: name "${r}" has no value`);return(0,t._)`${e}${r.scopePath}`})}scopeCode(e=this._values,t,r){return this._reduceValues(e,e=>{if(void 0===e.value)throw Error(`CodeGen: name "${e}" has no value`);return e.value.code},t,r)}_reduceValues(r,n,a={},s){let d=t.nil;for(let c in r){let l=r[c];if(!l)continue;let p=a[c]=a[c]||new Map;l.forEach(r=>{if(p.has(r))return;p.set(r,i.Started);let a=n(r);if(a){let i=this.opts.es5?e.varKinds.var:e.varKinds.const;d=(0,t._)`${d}${i} ${r} = ${a};${this.opts._n}`}else if(a=null==s?void 0:s(r))d=(0,t._)`${d}${a}${this.opts._n}`;else throw new o(r);p.set(r,i.Completed)})}return d}};e.ValueScope=d}),lY=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;let t=lQ(),r=lX();var i=lQ();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return i._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return i.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return i.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return i.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return i.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return i.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return i.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return i.Name}});var o=lX();Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return o.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return o.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return o.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return o.varKinds}}),e.operators={GT:new t._Code(">"),GTE:new t._Code(">="),LT:new t._Code("<"),LTE:new t._Code("<="),EQ:new t._Code("==="),NEQ:new t._Code("!=="),NOT:new t._Code("!"),OR:new t._Code("||"),AND:new t._Code("&&"),ADD:new t._Code("+")};var n=class{optimizeNodes(){return this}optimizeNames(e,t){return this}},a=class extends n{constructor(e,t,r){super(),this.varKind=e,this.name=t,this.rhs=r}render({es5:e,_n:t}){let i=e?r.varKinds.var:this.varKind,o=void 0===this.rhs?"":` = ${this.rhs}`;return`${i} ${this.name}${o};`+t}optimizeNames(e,t){if(e[this.name.str])return this.rhs&&(this.rhs=x(this.rhs,e,t)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}},s=class extends n{constructor(e,t,r){super(),this.lhs=e,this.rhs=t,this.sideEffects=r}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,r){if(!(this.lhs instanceof t.Name)||e[this.lhs.str]||this.sideEffects)return this.rhs=x(this.rhs,e,r),this}get names(){return I(this.lhs instanceof t.Name?{}:{...this.lhs.names},this.rhs)}},d=class extends s{constructor(e,t,r,i){super(e,r,i),this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}},c=class extends n{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}},l=class extends n{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}},p=class extends n{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}},u=class extends n{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=x(this.code,e,t),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}},m=class extends n{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce((t,r)=>t+r.render(e),"")}optimizeNodes(){let{nodes:e}=this,t=e.length;for(;t--;){let r=e[t].optimizeNodes();Array.isArray(r)?e.splice(t,1,...r):r?e[t]=r:e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){let{nodes:r}=this,i=r.length;for(;i--;){let o=r[i];o.optimizeNames(e,t)||(function(e,t){for(let r in t)e[r]=(e[r]||0)-(t[r]||0)}(e,o.names),r.splice(i,1))}return r.length>0?this:void 0}get names(){return this.nodes.reduce((e,t)=>q(e,t.names),{})}},f=class extends m{render(e){return"{"+e._n+super.render(e)+"}"+e._n}},h=class extends m{},y=class extends f{};y.kind="else";var g=class e extends f{constructor(e,t){super(t),this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);return this.else&&(t+="else "+this.else.render(e)),t}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(!0===t)return this.nodes;let r=this.else;if(r){let e=r.optimizeNodes();r=this.else=Array.isArray(e)?new y(e):e}return r?!1===t?r instanceof e?r:r.nodes:this.nodes.length?this:new e(j(t),r instanceof e?[r]:r.nodes):!1!==t&&this.nodes.length?this:void 0}optimizeNames(e,t){var r;if(this.else=null==(r=this.else)?void 0:r.optimizeNames(e,t),super.optimizeNames(e,t)||this.else)return this.condition=x(this.condition,e,t),this}get names(){let e=super.names;return I(e,this.condition),this.else&&q(e,this.else.names),e}};g.kind="if";var _=class extends f{};_.kind="for";var v=class extends _{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iteration=x(this.iteration,e,t),this}get names(){return q(super.names,this.iteration.names)}},b=class extends _{constructor(e,t,r,i){super(),this.varKind=e,this.name=t,this.from=r,this.to=i}render(e){let t=e.es5?r.varKinds.var:this.varKind,{name:i,from:o,to:n}=this;return`for(${t} ${i}=${o}; ${i}<${n}; ${i}++)`+super.render(e)}get names(){return I(I(super.names,this.from),this.to)}},$=class extends _{constructor(e,t,r,i){super(),this.loop=e,this.varKind=t,this.name=r,this.iterable=i}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iterable=x(this.iterable,e,t),this}get names(){return q(super.names,this.iterable.names)}},S=class extends f{constructor(e,t,r){super(),this.name=e,this.args=t,this.async=r}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}};S.kind="func";var k=class extends m{render(e){return"return "+super.render(e)}};k.kind="return";var w=class extends f{render(e){let t="try"+super.render(e);return this.catch&&(t+=this.catch.render(e)),this.finally&&(t+=this.finally.render(e)),t}optimizeNodes(){var e,t;return super.optimizeNodes(),null==(e=this.catch)||e.optimizeNodes(),null==(t=this.finally)||t.optimizeNodes(),this}optimizeNames(e,t){var r,i;return super.optimizeNames(e,t),null==(r=this.catch)||r.optimizeNames(e,t),null==(i=this.finally)||i.optimizeNames(e,t),this}get names(){let e=super.names;return this.catch&&q(e,this.catch.names),this.finally&&q(e,this.finally.names),e}},R=class extends f{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}};R.kind="catch";var P=class extends f{render(e){return"finally"+super.render(e)}};P.kind="finally";var V=class{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?"\n":""},this._extScope=e,this._scope=new r.Scope({parent:e}),this._nodes=[new h]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){let r=this._extScope.value(e,t);return(this._values[r.prefix]||(this._values[r.prefix]=new Set)).add(r),r}getScopeValue(e,t){return this._extScope.getValue(e,t)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,t,r,i){let o=this._scope.toName(t);return void 0!==r&&i&&(this._constants[o.str]=r),this._leafNode(new a(e,o,r)),o}const(e,t,i){return this._def(r.varKinds.const,e,t,i)}let(e,t,i){return this._def(r.varKinds.let,e,t,i)}var(e,t,i){return this._def(r.varKinds.var,e,t,i)}assign(e,t,r){return this._leafNode(new s(e,t,r))}add(t,r){return this._leafNode(new d(t,e.operators.ADD,r))}code(e){return"function"==typeof e?e():e!==t.nil&&this._leafNode(new u(e)),this}object(...e){let r=["{"];for(let[i,o]of e)r.length>1&&r.push(","),r.push(i),(i!==o||this.opts.es5)&&(r.push(":"),(0,t.addCodeArg)(r,o));return r.push("}"),new t._Code(r)}if(e,t,r){if(this._blockNode(new g(e)),t&&r)this.code(t).else().code(r).endIf();else if(t)this.code(t).endIf();else if(r)throw Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new g(e))}else(){return this._elseNode(new y)}endIf(){return this._endBlockNode(g,y)}_for(e,t){return this._blockNode(e),t&&this.code(t).endFor(),this}for(e,t){return this._for(new v(e),t)}forRange(e,t,i,o,n=this.opts.es5?r.varKinds.var:r.varKinds.let){let a=this._scope.toName(e);return this._for(new b(n,a,t,i),()=>o(a))}forOf(e,i,o,n=r.varKinds.const){let a=this._scope.toName(e);if(this.opts.es5){let e=i instanceof t.Name?i:this.var("_arr",i);return this.forRange("_i",0,(0,t._)`${e}.length`,r=>{this.var(a,(0,t._)`${e}[${r}]`),o(a)})}return this._for(new $("of",n,a,i),()=>o(a))}forIn(e,i,o,n=this.opts.es5?r.varKinds.var:r.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,t._)`Object.keys(${i})`,o);let a=this._scope.toName(e);return this._for(new $("in",n,a,i),()=>o(a))}endFor(){return this._endBlockNode(_)}label(e){return this._leafNode(new c(e))}break(e){return this._leafNode(new l(e))}return(e){let t=new k;if(this._blockNode(t),this.code(e),1!==t.nodes.length)throw Error('CodeGen: "return" should have one node');return this._endBlockNode(k)}try(e,t,r){if(!t&&!r)throw Error('CodeGen: "try" without "catch" and "finally"');let i=new w;if(this._blockNode(i),this.code(e),t){let e=this.name("e");this._currNode=i.catch=new R(e),t(e)}return r&&(this._currNode=i.finally=new P,this.code(r)),this._endBlockNode(R,P)}throw(e){return this._leafNode(new p(e))}block(e,t){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(t),this}endBlock(e){let t=this._blockStarts.pop();if(void 0===t)throw Error("CodeGen: not in self-balancing block");let r=this._nodes.length-t;if(r<0||void 0!==e&&r!==e)throw Error(`CodeGen: wrong number of nodes: ${r} vs ${e} expected`);return this._nodes.length=t,this}func(e,r=t.nil,i,o){return this._blockNode(new S(e,r,i)),o&&this.code(o).endFunc(),this}endFunc(){return this._endBlockNode(S)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,t){let r=this._currNode;if(r instanceof e||t&&r instanceof t)return this._nodes.pop(),this;throw Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){let t=this._currNode;if(!(t instanceof g))throw Error('CodeGen: "else" without "if"');return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let t=this._nodes;t[t.length-1]=e}};function q(e,t){for(let r in t)e[r]=(e[r]||0)+(t[r]||0);return e}function I(e,r){return r instanceof t._CodeOrName?q(e,r.names):e}function x(e,r,i){var o;if(e instanceof t.Name)return n(e);if(!((o=e)instanceof t._Code&&o._items.some(e=>e instanceof t.Name&&1===r[e.str]&&void 0!==i[e.str])))return e;return new t._Code(e._items.reduce((e,r)=>(r instanceof t.Name&&(r=n(r)),r instanceof t._Code?e.push(...r._items):e.push(r),e),[]));function n(e){let t=i[e.str];return void 0===t||1!==r[e.str]?e:(delete r[e.str],t)}}function j(e){return"boolean"==typeof e||"number"==typeof e||null===e?!e:(0,t._)`!${E(e)}`}e.CodeGen=V,e.not=j;let C=O(e.operators.AND);e.and=function(...e){return e.reduce(C)};let T=O(e.operators.OR);function O(e){return(r,i)=>r===t.nil?i:i===t.nil?r:(0,t._)`${E(r)} ${e} ${E(i)}`}function E(e){return e instanceof t.Name?e:(0,t._)`(${e})`}e.or=function(...e){return e.reduce(T)}}),l1=eb(e=>{var t,r;Object.defineProperty(e,"__esModule",{value:!0}),e.checkStrictMode=e.getErrorPath=e.Type=e.useFunc=e.setEvaluated=e.evaluatedPropsToName=e.mergeEvaluated=e.eachItem=e.unescapeJsonPointer=e.escapeJsonPointer=e.escapeFragment=e.unescapeFragment=e.schemaRefOrVal=e.schemaHasRulesButRef=e.schemaHasRules=e.checkUnknownRules=e.alwaysValidSchema=e.toHash=void 0;let i=lY(),o=lQ();function n(e,t=e.schema){let{opts:r,self:i}=e;if(!r.strictSchema||"boolean"==typeof t)return;let o=i.RULES.keywords;for(let r in t)o[r]||m(e,`unknown keyword: "${r}"`)}function a(e,t){if("boolean"==typeof e)return!e;for(let r in e)if(t[r])return!0;return!1}function s(e){return"number"==typeof e?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}function d(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function c({mergeNames:e,mergeToName:t,mergeValues:r,resultToName:o}){return(n,a,s,d)=>{let c=void 0===s?a:s instanceof i.Name?(a instanceof i.Name?e(n,a,s):t(n,a,s),s):a instanceof i.Name?(t(n,s,a),a):r(a,s);return d!==i.Name||c instanceof i.Name?c:o(n,c)}}function l(e,t){if(!0===t)return e.var("props",!0);let r=e.var("props",(0,i._)`{}`);return void 0!==t&&p(e,r,t),r}function p(e,t,r){Object.keys(r).forEach(r=>e.assign((0,i._)`${t}${(0,i.getProperty)(r)}`,!0))}e.toHash=function(e){let t={};for(let r of e)t[r]=!0;return t},e.alwaysValidSchema=function(e,t){return"boolean"==typeof t?t:0===Object.keys(t).length||(n(e,t),!a(t,e.self.RULES.all))},e.checkUnknownRules=n,e.schemaHasRules=a,e.schemaHasRulesButRef=function(e,t){if("boolean"==typeof e)return!e;for(let r in e)if("$ref"!==r&&t.all[r])return!0;return!1},e.schemaRefOrVal=function({topSchemaRef:e,schemaPath:t},r,o,n){if(!n){if("number"==typeof r||"boolean"==typeof r)return r;if("string"==typeof r)return(0,i._)`${r}`}return(0,i._)`${e}${t}${(0,i.getProperty)(o)}`},e.unescapeFragment=function(e){return d(decodeURIComponent(e))},e.escapeFragment=function(e){return encodeURIComponent(s(e))},e.escapeJsonPointer=s,e.unescapeJsonPointer=d,e.eachItem=function(e,t){if(Array.isArray(e))for(let r of e)t(r);else t(e)},e.mergeEvaluated={props:c({mergeNames:(e,t,r)=>e.if((0,i._)`${r} !== true && ${t} !== undefined`,()=>{e.if((0,i._)`${t} === true`,()=>e.assign(r,!0),()=>e.assign(r,(0,i._)`${r} || {}`).code((0,i._)`Object.assign(${r}, ${t})`))}),mergeToName:(e,t,r)=>e.if((0,i._)`${r} !== true`,()=>{!0===t?e.assign(r,!0):(e.assign(r,(0,i._)`${r} || {}`),p(e,r,t))}),mergeValues:(e,t)=>!0===e||{...e,...t},resultToName:l}),items:c({mergeNames:(e,t,r)=>e.if((0,i._)`${r} !== true && ${t} !== undefined`,()=>e.assign(r,(0,i._)`${t} === true ? true : ${r} > ${t} ? ${r} : ${t}`)),mergeToName:(e,t,r)=>e.if((0,i._)`${r} !== true`,()=>e.assign(r,!0===t||(0,i._)`${r} > ${t} ? ${r} : ${t}`)),mergeValues:(e,t)=>!0===e||Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})},e.evaluatedPropsToName=l,e.setEvaluated=p;let u={};function m(e,t,r=e.opts.strictSchema){if(r){if(t=`strict mode: ${t}`,!0===r)throw Error(t);e.self.logger.warn(t)}}e.useFunc=function(e,t){return e.scopeValue("func",{ref:t,code:u[t.code]||(u[t.code]=new o._Code(t.code))})},(r=t||(e.Type=t={}))[r.Num=0]="Num",r[r.Str=1]="Str",e.getErrorPath=function(e,r,o){if(e instanceof i.Name){let n=r===t.Num;return o?n?(0,i._)`"[" + ${e} + "]"`:(0,i._)`"['" + ${e} + "']"`:n?(0,i._)`"/" + ${e}`:(0,i._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return o?(0,i.getProperty)(e).toString():"/"+s(e)},e.checkStrictMode=m}),l0=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=lY();e.default={data:new t.Name("data"),valCxt:new t.Name("valCxt"),instancePath:new t.Name("instancePath"),parentData:new t.Name("parentData"),parentDataProperty:new t.Name("parentDataProperty"),rootData:new t.Name("rootData"),dynamicAnchors:new t.Name("dynamicAnchors"),vErrors:new t.Name("vErrors"),errors:new t.Name("errors"),this:new t.Name("this"),self:new t.Name("self"),scope:new t.Name("scope"),json:new t.Name("json"),jsonPos:new t.Name("jsonPos"),jsonLen:new t.Name("jsonLen"),jsonPart:new t.Name("jsonPart")}}),l2=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;let t=lY(),r=l1(),i=l0();function o(e,r){let o=e.const("err",r);e.if((0,t._)`${i.default.vErrors} === null`,()=>e.assign(i.default.vErrors,(0,t._)`[${o}]`),(0,t._)`${i.default.vErrors}.push(${o})`),e.code((0,t._)`${i.default.errors}++`)}function n(e,r){let{gen:i,validateName:o,schemaEnv:n}=e;n.$async?i.throw((0,t._)`new ${e.ValidationError}(${r})`):(i.assign((0,t._)`${o}.errors`,r),i.return(!1))}e.keywordError={message:({keyword:e})=>(0,t.str)`must pass "${e}" keyword validation`},e.keyword$DataError={message:({keyword:e,schemaType:r})=>r?(0,t.str)`"${e}" keyword must be ${r} ($data)`:(0,t.str)`"${e}" keyword is invalid ($data)`},e.reportError=function(r,i=e.keywordError,a,d){let{it:c}=r,{gen:l,compositeRule:p,allErrors:u}=c,m=s(r,i,a);(null!=d?d:p||u)?o(l,m):n(c,(0,t._)`[${m}]`)},e.reportExtraError=function(t,r=e.keywordError,a){let{it:d}=t,{gen:c,compositeRule:l,allErrors:p}=d;o(c,s(t,r,a)),l||p||n(d,i.default.vErrors)},e.resetErrorsCount=function(e,r){e.assign(i.default.errors,r),e.if((0,t._)`${i.default.vErrors} !== null`,()=>e.if(r,()=>e.assign((0,t._)`${i.default.vErrors}.length`,r),()=>e.assign(i.default.vErrors,null)))},e.extendErrors=function({gen:e,keyword:r,schemaValue:o,data:n,errsCount:a,it:s}){if(void 0===a)throw Error("ajv implementation error");let d=e.name("err");e.forRange("i",a,i.default.errors,a=>{e.const(d,(0,t._)`${i.default.vErrors}[${a}]`),e.if((0,t._)`${d}.instancePath === undefined`,()=>e.assign((0,t._)`${d}.instancePath`,(0,t.strConcat)(i.default.instancePath,s.errorPath))),e.assign((0,t._)`${d}.schemaPath`,(0,t.str)`${s.errSchemaPath}/${r}`),s.opts.verbose&&(e.assign((0,t._)`${d}.schema`,o),e.assign((0,t._)`${d}.data`,n))})};let a={keyword:new t.Name("keyword"),schemaPath:new t.Name("schemaPath"),params:new t.Name("params"),propertyName:new t.Name("propertyName"),message:new t.Name("message"),schema:new t.Name("schema"),parentSchema:new t.Name("parentSchema")};function s(e,o,n){let{createErrors:s}=e.it;return!1===s?(0,t._)`{}`:function(e,o,n={}){let{gen:s,it:d}=e,c=[function({errorPath:e},{instancePath:o}){let n=o?(0,t.str)`${e}${(0,r.getErrorPath)(o,r.Type.Str)}`:e;return[i.default.instancePath,(0,t.strConcat)(i.default.instancePath,n)]}(d,n),function({keyword:e,it:{errSchemaPath:i}},{schemaPath:o,parentSchema:n}){let s=n?i:(0,t.str)`${i}/${e}`;return o&&(s=(0,t.str)`${s}${(0,r.getErrorPath)(o,r.Type.Str)}`),[a.schemaPath,s]}(e,n)];return function(e,{params:r,message:o},n){let{keyword:s,data:d,schemaValue:c,it:l}=e,{opts:p,propertyName:u,topSchemaRef:m,schemaPath:f}=l;n.push([a.keyword,s],[a.params,"function"==typeof r?r(e):r||(0,t._)`{}`]),p.messages&&n.push([a.message,"function"==typeof o?o(e):o]),p.verbose&&n.push([a.schema,c],[a.parentSchema,(0,t._)`${m}${f}`],[i.default.data,d]),u&&n.push([a.propertyName,u])}(e,o,c),s.object(...c)}(e,o,n)}}),l4=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.boolOrEmptySchema=e.topBoolOrEmptySchema=void 0;let t=l2(),r=lY(),i=l0(),o={message:"boolean schema is false"};function n(e,r){let{gen:i,data:n}=e;(0,t.reportError)({gen:i,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e},o,void 0,r)}e.topBoolOrEmptySchema=function(e){let{gen:t,schema:o,validateName:a}=e;!1===o?n(e,!1):"object"==typeof o&&!0===o.$async?t.return(i.default.data):(t.assign((0,r._)`${a}.errors`,null),t.return(!0))},e.boolOrEmptySchema=function(e,t){let{gen:r,schema:i}=e;!1===i?(r.var(t,!1),n(e)):r.var(t,!0)}}),l6=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getRules=e.isJSONType=void 0;let t=new Set(["string","number","integer","boolean","null","object","array"]);e.isJSONType=function(e){return"string"==typeof e&&t.has(e)},e.getRules=function(){let e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}}),l3=eb(e=>{function t(e,t){return t.rules.some(t=>r(e,t))}function r(e,t){var r;return void 0!==e[t.keyword]||(null==(r=t.definition.implements)?void 0:r.some(t=>void 0!==e[t]))}Object.defineProperty(e,"__esModule",{value:!0}),e.shouldUseRule=e.shouldUseGroup=e.schemaHasRulesForType=void 0,e.schemaHasRulesForType=function({schema:e,self:r},i){let o=r.RULES.types[i];return o&&!0!==o&&t(e,o)},e.shouldUseGroup=t,e.shouldUseRule=r}),l9=eb(e=>{var t,r;Object.defineProperty(e,"__esModule",{value:!0}),e.reportTypeError=e.checkDataTypes=e.checkDataType=e.coerceAndCheckDataType=e.getJSONTypes=e.getSchemaTypes=e.DataType=void 0;let i=l6(),o=l3(),n=l2(),a=lY(),s=l1();function d(e){let t=Array.isArray(e)?e:e?[e]:[];if(t.every(i.isJSONType))return t;throw Error("type must be JSONType or JSONType[]: "+t.join(","))}(r=t||(e.DataType=t={}))[r.Correct=0]="Correct",r[r.Wrong=1]="Wrong",e.getSchemaTypes=function(e){let t=d(e.type);if(t.includes("null")){if(!1===e.nullable)throw Error("type: null contradicts nullable: false")}else{if(!t.length&&void 0!==e.nullable)throw Error('"nullable" cannot be used without "type"');!0===e.nullable&&t.push("null")}return t},e.getJSONTypes=d,e.coerceAndCheckDataType=function(e,r){var i,n;let{gen:s,data:d,opts:l}=e,u=(i=r,(n=l.coerceTypes)?i.filter(e=>c.has(e)||"array"===n&&"array"===e):[]),f=r.length>0&&!(0===u.length&&1===r.length&&(0,o.schemaHasRulesForType)(e,r[0]));if(f){let i=p(r,d,l.strictNumbers,t.Wrong);s.if(i,()=>{u.length?function(e,t,r){let{gen:i,data:o,opts:n}=e,s=i.let("dataType",(0,a._)`typeof ${o}`),d=i.let("coerced",(0,a._)`undefined`);for(let e of("array"===n.coerceTypes&&i.if((0,a._)`${s} == 'object' && Array.isArray(${o}) && ${o}.length == 1`,()=>i.assign(o,(0,a._)`${o}[0]`).assign(s,(0,a._)`typeof ${o}`).if(p(t,o,n.strictNumbers),()=>i.assign(d,o))),i.if((0,a._)`${d} !== undefined`),r))(c.has(e)||"array"===e&&"array"===n.coerceTypes)&&function(e){switch(e){case"string":i.elseIf((0,a._)`${s} == "number" || ${s} == "boolean"`).assign(d,(0,a._)`"" + ${o}`).elseIf((0,a._)`${o} === null`).assign(d,(0,a._)`""`);return;case"number":i.elseIf((0,a._)`${s} == "boolean" || ${o} === null || (${s} == "string" && ${o} && ${o} == +${o})`).assign(d,(0,a._)`+${o}`);return;case"integer":i.elseIf((0,a._)`${s} === "boolean" || ${o} === null || (${s} === "string" && ${o} && ${o} == +${o} && !(${o} % 1))`).assign(d,(0,a._)`+${o}`);return;case"boolean":i.elseIf((0,a._)`${o} === "false" || ${o} === 0 || ${o} === null`).assign(d,!1).elseIf((0,a._)`${o} === "true" || ${o} === 1`).assign(d,!0);return;case"null":i.elseIf((0,a._)`${o} === "" || ${o} === 0 || ${o} === false`),i.assign(d,null);return;case"array":i.elseIf((0,a._)`${s} === "string" || ${s} === "number" - || ${s} === "boolean" || ${o} === null`).assign(d,(0,a._)`[${o}]`)}}(e);i.else(),m(e),i.endIf(),i.if((0,a._)`${d} !== undefined`,()=>{i.assign(o,d),function({gen:e,parentData:t,parentDataProperty:r},i){e.if((0,a._)`${t} !== undefined`,()=>e.assign((0,a._)`${t}[${r}]`,i))}(e,d)})}(e,r,u):m(e)})}return f};let c=new Set(["string","number","integer","boolean","null"]);function l(e,r,i,o=t.Correct){let n,s=o===t.Correct?a.operators.EQ:a.operators.NEQ;switch(e){case"null":return(0,a._)`${r} ${s} null`;case"array":n=(0,a._)`Array.isArray(${r})`;break;case"object":n=(0,a._)`${r} && typeof ${r} == "object" && !Array.isArray(${r})`;break;case"integer":n=d((0,a._)`!(${r} % 1) && !isNaN(${r})`);break;case"number":n=d();break;default:return(0,a._)`typeof ${r} ${s} ${e}`}return o===t.Correct?n:(0,a.not)(n);function d(e=a.nil){return(0,a.and)((0,a._)`typeof ${r} == "number"`,e,i?(0,a._)`isFinite(${r})`:a.nil)}}function p(e,t,r,i){let o;if(1===e.length)return l(e[0],t,r,i);let n=(0,s.toHash)(e);if(n.array&&n.object){let e=(0,a._)`typeof ${t} != "object"`;o=n.null?e:(0,a._)`!${t} || ${e}`,delete n.null,delete n.array,delete n.object}else o=a.nil;for(let e in n.number&&delete n.integer,n)o=(0,a.and)(o,l(e,t,r,i));return o}e.checkDataType=l,e.checkDataTypes=p;let u={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>"string"==typeof e?(0,a._)`{type: ${e}}`:(0,a._)`{type: ${t}}`};function m(e){let t=function(e){let{gen:t,data:r,schema:i}=e,o=(0,s.schemaRefOrVal)(e,i,"type");return{gen:t,keyword:"type",data:r,schema:i.type,schemaCode:o,schemaValue:o,parentSchema:i,params:{},it:e}}(e);(0,n.reportError)(t,u)}e.reportTypeError=m}),l5=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.assignDefaults=void 0;let t=lY(),r=l1();function i(e,i,o){let{gen:n,compositeRule:a,data:s,opts:d}=e;if(void 0===o)return;let c=(0,t._)`${s}${(0,t.getProperty)(i)}`;if(a)return void(0,r.checkStrictMode)(e,`default is ignored for: ${c}`);let l=(0,t._)`${c} === undefined`;"empty"===d.useDefaults&&(l=(0,t._)`${l} || ${c} === null || ${c} === ""`),n.if(l,(0,t._)`${c} = ${(0,t.stringify)(o)}`)}e.assignDefaults=function(e,t){let{properties:r,items:o}=e.schema;if("object"===t&&r)for(let t in r)i(e,t,r[t].default);else"array"===t&&Array.isArray(o)&&o.forEach((t,r)=>i(e,r,t.default))}}),l8=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateUnion=e.validateArray=e.usePattern=e.callValidateCode=e.schemaProperties=e.allSchemaProperties=e.noPropertyInData=e.propertyInData=e.isOwnProperty=e.hasPropFunc=e.reportMissingProp=e.checkMissingProp=e.checkReportMissingProp=void 0;let t=lY(),r=l1(),i=l0(),o=l1();function n(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,t._)`Object.prototype.hasOwnProperty`})}function a(e,r,i){return(0,t._)`${n(e)}.call(${r}, ${i})`}function s(e,r,i,o){let n=(0,t._)`${r}${(0,t.getProperty)(i)} === undefined`;return o?(0,t.or)(n,(0,t.not)(a(e,r,i))):n}function d(e){return e?Object.keys(e).filter(e=>"__proto__"!==e):[]}e.checkReportMissingProp=function(e,r){let{gen:i,data:o,it:n}=e;i.if(s(i,o,r,n.opts.ownProperties),()=>{e.setParams({missingProperty:(0,t._)`${r}`},!0),e.error()})},e.checkMissingProp=function({gen:e,data:r,it:{opts:i}},o,n){return(0,t.or)(...o.map(o=>(0,t.and)(s(e,r,o,i.ownProperties),(0,t._)`${n} = ${o}`)))},e.reportMissingProp=function(e,t){e.setParams({missingProperty:t},!0),e.error()},e.hasPropFunc=n,e.isOwnProperty=a,e.propertyInData=function(e,r,i,o){let n=(0,t._)`${r}${(0,t.getProperty)(i)} !== undefined`;return o?(0,t._)`${n} && ${a(e,r,i)}`:n},e.noPropertyInData=s,e.allSchemaProperties=d,e.schemaProperties=function(e,t){return d(t).filter(i=>!(0,r.alwaysValidSchema)(e,t[i]))},e.callValidateCode=function({schemaCode:e,data:r,it:{gen:o,topSchemaRef:n,schemaPath:a,errorPath:s},it:d},c,l,p){let u=p?(0,t._)`${e}, ${r}, ${n}${a}`:r,m=[[i.default.instancePath,(0,t.strConcat)(i.default.instancePath,s)],[i.default.parentData,d.parentData],[i.default.parentDataProperty,d.parentDataProperty],[i.default.rootData,i.default.rootData]];d.opts.dynamicRef&&m.push([i.default.dynamicAnchors,i.default.dynamicAnchors]);let f=(0,t._)`${u}, ${o.object(...m)}`;return l!==t.nil?(0,t._)`${c}.call(${l}, ${f})`:(0,t._)`${c}(${f})`};let c=(0,t._)`new RegExp`;e.usePattern=function({gen:e,it:{opts:r}},i){let n=r.unicodeRegExp?"u":"",{regExp:a}=r.code,s=a(i,n);return e.scopeValue("pattern",{key:s.toString(),ref:s,code:(0,t._)`${"new RegExp"===a.code?c:(0,o.useFunc)(e,a)}(${i}, ${n})`})},e.validateArray=function(e){let{gen:i,data:o,keyword:n,it:a}=e,s=i.name("valid");if(a.allErrors){let e=i.let("valid",!0);return d(()=>i.assign(e,!1)),e}return i.var(s,!0),d(()=>i.break()),s;function d(a){let d=i.const("len",(0,t._)`${o}.length`);i.forRange("i",0,d,o=>{e.subschema({keyword:n,dataProp:o,dataPropType:r.Type.Num},s),i.if((0,t.not)(s),a)})}},e.validateUnion=function(e){let{gen:i,schema:o,keyword:n,it:a}=e;if(!Array.isArray(o))throw Error("ajv implementation error");if(o.some(e=>(0,r.alwaysValidSchema)(a,e))&&!a.opts.unevaluated)return;let s=i.let("valid",!1),d=i.name("_valid");i.block(()=>o.forEach((r,o)=>{let a=e.subschema({keyword:n,schemaProp:o,compositeRule:!0},d);i.assign(s,(0,t._)`${s} || ${d}`),e.mergeValidEvaluated(a,d)||i.if((0,t.not)(s))})),e.result(s,()=>e.reset(),()=>e.error(!0))}}),l7=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateKeywordUsage=e.validSchemaType=e.funcKeywordCode=e.macroKeywordCode=void 0;let t=lY(),r=l0(),i=l8(),o=l2();function n(e){let{gen:r,data:i,it:o}=e;r.if(o.parentData,()=>r.assign(i,(0,t._)`${o.parentData}[${o.parentDataProperty}]`))}function a(e,r,i){if(void 0===i)throw Error(`keyword "${r}" failed to compile`);return e.scopeValue("keyword","function"==typeof i?{ref:i}:{ref:i,code:(0,t.stringify)(i)})}e.macroKeywordCode=function(e,r){let{gen:i,keyword:o,schema:n,parentSchema:s,it:d}=e,c=r.macro.call(d.self,n,s,d),l=a(i,o,c);!1!==d.opts.validateSchema&&d.self.validateSchema(c,!0);let p=i.name("valid");e.subschema({schema:c,schemaPath:t.nil,errSchemaPath:`${d.errSchemaPath}/${o}`,topSchemaRef:l,compositeRule:!0},p),e.pass(p,()=>e.error(!0))},e.funcKeywordCode=function(e,s){var d;let{gen:c,keyword:l,schema:p,parentSchema:u,$data:m,it:f}=e;!function({schemaEnv:e},t){if(t.async&&!e.$async)throw Error("async keyword in sync schema")}(f,s);let h=a(c,l,!m&&s.compile?s.compile.call(f.self,p,u,f):s.validate),y=c.let("valid");function g(o=s.async?(0,t._)`await `:t.nil){let n=f.opts.passContext?r.default.this:r.default.self,a=!("compile"in s&&!m||!1===s.schema);c.assign(y,(0,t._)`${o}${(0,i.callValidateCode)(e,h,n,a)}`,s.modifying)}function _(e){var r;c.if((0,t.not)(null!=(r=s.valid)?r:y),e)}e.block$data(y,function(){if(!1===s.errors)g(),s.modifying&&n(e),_(()=>e.error());else{let i,a,d=s.async?(i=c.let("ruleErrs",null),c.try(()=>g((0,t._)`await `),e=>c.assign(y,!1).if((0,t._)`${e} instanceof ${f.ValidationError}`,()=>c.assign(i,(0,t._)`${e}.errors`),()=>c.throw(e))),i):(a=(0,t._)`${h}.errors`,c.assign(a,null),g(t.nil),a);s.modifying&&n(e),_(()=>(function(e,i){let{gen:n}=e;n.if((0,t._)`Array.isArray(${i})`,()=>{n.assign(r.default.vErrors,(0,t._)`${r.default.vErrors} === null ? ${i} : ${r.default.vErrors}.concat(${i})`).assign(r.default.errors,(0,t._)`${r.default.vErrors}.length`),(0,o.extendErrors)(e)},()=>e.error())})(e,d))}}),e.ok(null!=(d=s.valid)?d:y)},e.validSchemaType=function(e,t,r=!1){return!t.length||t.some(t=>"array"===t?Array.isArray(e):"object"===t?e&&"object"==typeof e&&!Array.isArray(e):typeof e==t||r&&void 0===e)},e.validateKeywordUsage=function({schema:e,opts:t,self:r,errSchemaPath:i},o,n){if(Array.isArray(o.keyword)?!o.keyword.includes(n):o.keyword!==n)throw Error("ajv implementation error");let a=o.dependencies;if(null==a?void 0:a.some(t=>!Object.prototype.hasOwnProperty.call(e,t)))throw Error(`parent schema must have dependencies of ${n}: ${a.join(",")}`);if(o.validateSchema&&!o.validateSchema(e[n])){let e=`keyword "${n}" value is invalid at path "${i}": `+r.errorsText(o.validateSchema.errors);if("log"===t.validateSchema)r.logger.error(e);else throw Error(e)}}}),pe=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.extendSubschemaMode=e.extendSubschemaData=e.getSubschema=void 0;let t=lY(),r=l1();e.getSubschema=function(e,{keyword:i,schemaProp:o,schema:n,schemaPath:a,errSchemaPath:s,topSchemaRef:d}){if(void 0!==i&&void 0!==n)throw Error('both "keyword" and "schema" passed, only one allowed');if(void 0!==i){let n=e.schema[i];return void 0===o?{schema:n,schemaPath:(0,t._)`${e.schemaPath}${(0,t.getProperty)(i)}`,errSchemaPath:`${e.errSchemaPath}/${i}`}:{schema:n[o],schemaPath:(0,t._)`${e.schemaPath}${(0,t.getProperty)(i)}${(0,t.getProperty)(o)}`,errSchemaPath:`${e.errSchemaPath}/${i}/${(0,r.escapeFragment)(o)}`}}if(void 0!==n){if(void 0===a||void 0===s||void 0===d)throw Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:n,schemaPath:a,topSchemaRef:d,errSchemaPath:s}}throw Error('either "keyword" or "schema" must be passed')},e.extendSubschemaData=function(e,i,{dataProp:o,dataPropType:n,data:a,dataTypes:s,propertyName:d}){if(void 0!==a&&void 0!==o)throw Error('both "data" and "dataProp" passed, only one allowed');let{gen:c}=i;if(void 0!==o){let{errorPath:a,dataPathArr:s,opts:d}=i;l(c.let("data",(0,t._)`${i.data}${(0,t.getProperty)(o)}`,!0)),e.errorPath=(0,t.str)`${a}${(0,r.getErrorPath)(o,n,d.jsPropertySyntax)}`,e.parentDataProperty=(0,t._)`${o}`,e.dataPathArr=[...s,e.parentDataProperty]}function l(t){e.data=t,e.dataLevel=i.dataLevel+1,e.dataTypes=[],i.definedProperties=new Set,e.parentData=i.data,e.dataNames=[...i.dataNames,t]}void 0!==a&&(l(a instanceof t.Name?a:c.let("data",a,!0)),void 0!==d&&(e.propertyName=d)),s&&(e.dataTypes=s)},e.extendSubschemaMode=function(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:i,createErrors:o,allErrors:n}){void 0!==i&&(e.compositeRule=i),void 0!==o&&(e.createErrors=o),void 0!==n&&(e.allErrors=n),e.jtdDiscriminator=t,e.jtdMetadata=r}}),pt=eb((e,t)=>{t.exports=function e(t,r){if(t===r)return!0;if(t&&r&&"object"==typeof t&&"object"==typeof r){if(t.constructor!==r.constructor)return!1;if(Array.isArray(t)){if((i=t.length)!=r.length)return!1;for(o=i;0!=o--;)if(!e(t[o],r[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if((i=(n=Object.keys(t)).length)!==Object.keys(r).length)return!1;for(o=i;0!=o--;)if(!Object.prototype.hasOwnProperty.call(r,n[o]))return!1;for(o=i;0!=o--;){var i,o,n,a=n[o];if(!e(t[a],r[a]))return!1}return!0}return t!=t&&r!=r}}),pr=eb((e,t)=>{var r=t.exports=function(e,t,i){"function"==typeof t&&(i=t,t={});var o="function"==typeof(i=t.cb||i)?i:i.pre||function(){};!function e(t,i,o,n,a,s,d,c,l,p){if(n&&"object"==typeof n&&!Array.isArray(n)){for(var u in i(n,a,s,d,c,l,p),n){var m=n[u];if(Array.isArray(m)){if(u in r.arrayKeywords)for(var f=0;f{Object.defineProperty(e,"__esModule",{value:!0}),e.getSchemaRefs=e.resolveUrl=e.normalizeId=e._getFullPath=e.getFullPath=e.inlineRef=void 0;let t=l1(),r=pt(),i=pr(),o=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);e.inlineRef=function(e,r=!0){return"boolean"==typeof e||(!0===r?!function e(t){for(let r in t){if(n.has(r))return!0;let i=t[r];if(Array.isArray(i)&&i.some(e)||"object"==typeof i&&e(i))return!0}return!1}(e):!!r&&function e(r){let i=0;for(let n in r)if("$ref"===n||(i++,!o.has(n)&&("object"==typeof r[n]&&(0,t.eachItem)(r[n],t=>i+=e(t)),1/0===i)))return 1/0;return i}(e)<=r)};let n=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function a(e,t="",r){return!1!==r&&(t=c(t)),s(e,e.parse(t))}function s(e,t){return e.serialize(t).split("#")[0]+"#"}e.getFullPath=a,e._getFullPath=s;let d=/#\/?$/;function c(e){return e?e.replace(d,""):""}e.normalizeId=c,e.resolveUrl=function(e,t,r){return r=c(r),e.resolve(t,r)};let l=/^[a-z_][-a-z0-9._]*$/i;e.getSchemaRefs=function(e,t){if("boolean"==typeof e)return{};let{schemaId:o,uriResolver:n}=this.opts,s=c(e[o]||t),d={"":s},p=a(n,s,!1),u={},m=new Set;return i(e,{allKeys:!0},(e,t,r,i)=>{if(void 0===i)return;let n=p+t,a=d[i];function s(t){let r=this.opts.uriResolver.resolve;if(t=c(a?r(a,t):t),m.has(t))throw h(t);m.add(t);let i=this.refs[t];return"string"==typeof i&&(i=this.refs[i]),"object"==typeof i?f(e,i.schema,t):t!==c(n)&&("#"===t[0]?(f(e,u[t],t),u[t]=e):this.refs[t]=n),t}function y(e){if("string"==typeof e){if(!l.test(e))throw Error(`invalid anchor "${e}"`);s.call(this,`#${e}`)}}"string"==typeof e[o]&&(a=s.call(this,e[o])),y.call(this,e.$anchor),y.call(this,e.$dynamicAnchor),d[t]=a}),u;function f(e,t,i){if(void 0!==t&&!r(e,t))throw h(i)}function h(e){return Error(`reference "${e}" resolves to more than one schema`)}}}),po=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getData=e.KeywordCxt=e.validateFunctionCode=void 0;let t=l4(),r=l9(),i=l3(),o=l9(),n=l5(),a=l7(),s=pe(),d=lY(),c=l0(),l=pi(),p=l1(),u=l2();function m({gen:e,validateName:t,schema:r,schemaEnv:i,opts:o},n){var a;o.code.es5?e.func(t,(0,d._)`${c.default.data}, ${c.default.valCxt}`,i.$async,()=>{var t,i;e.code((0,d._)`"use strict"; ${f(r,o)}`),t=e,i=o,t.if(c.default.valCxt,()=>{t.var(c.default.instancePath,(0,d._)`${c.default.valCxt}.${c.default.instancePath}`),t.var(c.default.parentData,(0,d._)`${c.default.valCxt}.${c.default.parentData}`),t.var(c.default.parentDataProperty,(0,d._)`${c.default.valCxt}.${c.default.parentDataProperty}`),t.var(c.default.rootData,(0,d._)`${c.default.valCxt}.${c.default.rootData}`),i.dynamicRef&&t.var(c.default.dynamicAnchors,(0,d._)`${c.default.valCxt}.${c.default.dynamicAnchors}`)},()=>{t.var(c.default.instancePath,(0,d._)`""`),t.var(c.default.parentData,(0,d._)`undefined`),t.var(c.default.parentDataProperty,(0,d._)`undefined`),t.var(c.default.rootData,c.default.data),i.dynamicRef&&t.var(c.default.dynamicAnchors,(0,d._)`{}`)}),e.code(n)}):e.func(t,(0,d._)`${c.default.data}, ${(a=o,(0,d._)`{${c.default.instancePath}="", ${c.default.parentData}, ${c.default.parentDataProperty}, ${c.default.rootData}=${c.default.data}${a.dynamicRef?(0,d._)`, ${c.default.dynamicAnchors}={}`:d.nil}}={}`)}`,i.$async,()=>e.code(f(r,o)).code(n))}function f(e,t){let r="object"==typeof e&&e[t.schemaId];return r&&(t.code.source||t.code.process)?(0,d._)`/*# sourceURL=${r} */`:d.nil}function h({schema:e,self:t}){if("boolean"==typeof e)return!e;for(let r in e)if(t.RULES.all[r])return!0;return!1}function y(e){return"boolean"!=typeof e.schema}function g(e){(0,p.checkUnknownRules)(e),function(e){let{schema:t,errSchemaPath:r,opts:i,self:o}=e;t.$ref&&i.ignoreKeywordsWithRef&&(0,p.schemaHasRulesButRef)(t,o.RULES)&&o.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}(e)}function _(e,t){if(e.opts.jtd)return b(e,[],!1,t);let i=(0,r.getSchemaTypes)(e.schema);b(e,i,!(0,r.coerceAndCheckDataType)(e,i),t)}function v({gen:e,schemaEnv:t,schema:r,errSchemaPath:i,opts:o}){let n=r.$comment;if(!0===o.$comment)e.code((0,d._)`${c.default.self}.logger.log(${n})`);else if("function"==typeof o.$comment){let r=(0,d.str)`${i}/$comment`,o=e.scopeValue("root",{ref:t.root});e.code((0,d._)`${c.default.self}.opts.$comment(${n}, ${r}, ${o}.schema)`)}}function b(e,t,r,n){var a,s,l,u;let{gen:m,schema:f,data:h,allErrors:y,opts:g,self:_}=e,{RULES:v}=_;if(f.$ref&&(g.ignoreKeywordsWithRef||!(0,p.schemaHasRulesButRef)(f,v)))return void m.block(()=>V(e,"$ref",v.all.$ref.definition));function b(a){(0,i.shouldUseGroup)(f,a)&&(a.type?(m.if((0,o.checkDataType)(a.type,h,g.strictNumbers)),$(e,a),1===t.length&&t[0]===a.type&&r&&(m.else(),(0,o.reportTypeError)(e)),m.endIf()):$(e,a),y||m.if((0,d._)`${c.default.errors} === ${n||0}`))}g.jtd||(a=e,s=t,!a.schemaEnv.meta&&a.opts.strictTypes&&(function(e,t){if(t.length){if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach(t=>{S(e.dataTypes,t)||k(e,`type "${t}" not allowed by context "${e.dataTypes.join(",")}"`)}),function(e,t){let r=[];for(let i of e.dataTypes)S(t,i)?r.push(i):t.includes("integer")&&"number"===i&&r.push("integer");e.dataTypes=r}(e,t)}}(a,s),a.opts.allowUnionTypes||(l=a,(u=s).length>1&&!(2===u.length&&u.includes("null"))&&k(l,"use allowUnionTypes to allow union type keyword")),function(e,t){let r=e.self.RULES.all;for(let o in r){let n=r[o];if("object"==typeof n&&(0,i.shouldUseRule)(e.schema,n)){let{type:r}=n.definition;r.length&&!r.some(e=>{var r,i;return r=t,i=e,r.includes(i)||"number"===i&&r.includes("integer")})&&k(e,`missing type "${r.join(",")}" for keyword "${o}"`)}}}(a,a.dataTypes))),m.block(()=>{for(let e of v.rules)b(e);b(v.post)})}function $(e,t){let{gen:r,schema:o,opts:{useDefaults:a}}=e;a&&(0,n.assignDefaults)(e,t.type),r.block(()=>{for(let r of t.rules)(0,i.shouldUseRule)(o,r)&&V(e,r.keyword,r.definition,t.type)})}function S(e,t){return e.includes(t)||"integer"===t&&e.includes("number")}function k(e,t){let r=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${r}" (strictTypes)`,(0,p.checkStrictMode)(e,t,e.opts.strictTypes)}e.validateFunctionCode=function(e){y(e)&&(g(e),h(e))?function(e){let{schema:t,opts:r,gen:i}=e;m(e,()=>{r.$comment&&t.$comment&&v(e),function(e){let{schema:t,opts:r}=e;void 0!==t.default&&r.useDefaults&&r.strictSchema&&(0,p.checkStrictMode)(e,"default is ignored in the schema root")}(e),i.let(c.default.vErrors,null),i.let(c.default.errors,0),r.unevaluated&&function(e){let{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",(0,d._)`${r}.evaluated`),t.if((0,d._)`${e.evaluated}.dynamicProps`,()=>t.assign((0,d._)`${e.evaluated}.props`,(0,d._)`undefined`)),t.if((0,d._)`${e.evaluated}.dynamicItems`,()=>t.assign((0,d._)`${e.evaluated}.items`,(0,d._)`undefined`))}(e),_(e),function(e){let{gen:t,schemaEnv:r,validateName:i,ValidationError:o,opts:n}=e;r.$async?t.if((0,d._)`${c.default.errors} === 0`,()=>t.return(c.default.data),()=>t.throw((0,d._)`new ${o}(${c.default.vErrors})`)):(t.assign((0,d._)`${i}.errors`,c.default.vErrors),n.unevaluated&&function({gen:e,evaluated:t,props:r,items:i}){r instanceof d.Name&&e.assign((0,d._)`${t}.props`,r),i instanceof d.Name&&e.assign((0,d._)`${t}.items`,i)}(e),t.return((0,d._)`${c.default.errors} === 0`))}(e)})}(e):m(e,()=>(0,t.topBoolOrEmptySchema)(e))};var w=class{constructor(e,t,r){if((0,a.validateKeywordUsage)(e,t,r),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=r,this.data=e.data,this.schema=e.schema[r],this.$data=t.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,p.schemaRefOrVal)(e,this.schema,r,this.$data),this.schemaType=t.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=t,this.$data)this.schemaCode=e.gen.const("vSchema",q(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,a.validSchemaType)(this.schema,t.schemaType,t.allowUndefined))throw Error(`${r} value must be ${JSON.stringify(t.schemaType)}`);("code"in t?t.trackErrors:!1!==t.errors)&&(this.errsCount=e.gen.const("_errs",c.default.errors))}result(e,t,r){this.failResult((0,d.not)(e),t,r)}failResult(e,t,r){this.gen.if(e),r?r():this.error(),t?(this.gen.else(),t(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,t){this.failResult((0,d.not)(e),void 0,t)}fail(e){if(void 0===e){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);let{schemaCode:t}=this;this.fail((0,d._)`${t} !== undefined && (${(0,d.or)(this.invalid$data(),e)})`)}error(e,t,r){if(t){this.setParams(t),this._error(e,r),this.setParams({});return}this._error(e,r)}_error(e,t){(e?u.reportExtraError:u.reportError)(this,this.def.error,t)}$dataError(){(0,u.reportError)(this,this.def.$dataError||u.keyword$DataError)}reset(){if(void 0===this.errsCount)throw Error('add "trackErrors" to keyword definition');(0,u.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,t){t?Object.assign(this.params,e):this.params=e}block$data(e,t,r=d.nil){this.gen.block(()=>{this.check$data(e,r),t()})}check$data(e=d.nil,t=d.nil){if(!this.$data)return;let{gen:r,schemaCode:i,schemaType:o,def:n}=this;r.if((0,d.or)((0,d._)`${i} === undefined`,t)),e!==d.nil&&r.assign(e,!0),(o.length||n.validateSchema)&&(r.elseIf(this.invalid$data()),this.$dataError(),e!==d.nil&&r.assign(e,!1)),r.else()}invalid$data(){let{gen:e,schemaCode:t,schemaType:r,def:i,it:n}=this;return(0,d.or)(function(){if(r.length){if(!(t instanceof d.Name))throw Error("ajv implementation error");let e=Array.isArray(r)?r:[r];return(0,d._)`${(0,o.checkDataTypes)(e,t,n.opts.strictNumbers,o.DataType.Wrong)}`}return d.nil}(),function(){if(i.validateSchema){let r=e.scopeValue("validate$data",{ref:i.validateSchema});return(0,d._)`!${r}(${t})`}return d.nil}())}subschema(e,r){let i=(0,s.getSubschema)(this.it,e);(0,s.extendSubschemaData)(i,this.it,e),(0,s.extendSubschemaMode)(i,e);let o={...this.it,...i,items:void 0,props:void 0};return!function(e,r){if(y(e)&&(g(e),h(e)))return function(e,t){var r;let i,{schema:o,gen:n,opts:a}=e;a.$comment&&o.$comment&&v(e),(i=(r=e).schema[r.opts.schemaId])&&(r.baseId=(0,l.resolveUrl)(r.opts.uriResolver,r.baseId,i)),function(e){if(e.schema.$async&&!e.schemaEnv.$async)throw Error("async schema in sync schema")}(e);let s=n.const("_errs",c.default.errors);_(e,s),n.var(t,(0,d._)`${s} === ${c.default.errors}`)}(e,r);(0,t.boolOrEmptySchema)(e,r)}(o,r),o}mergeEvaluated(e,t){let{it:r,gen:i}=this;r.opts.unevaluated&&(!0!==r.props&&void 0!==e.props&&(r.props=p.mergeEvaluated.props(i,e.props,r.props,t)),!0!==r.items&&void 0!==e.items&&(r.items=p.mergeEvaluated.items(i,e.items,r.items,t)))}mergeValidEvaluated(e,t){let{it:r,gen:i}=this;if(r.opts.unevaluated&&(!0!==r.props||!0!==r.items))return i.if(t,()=>this.mergeEvaluated(e,d.Name)),!0}};function V(e,t,r,i){let o=new w(e,r,t);"code"in r?r.code(o,i):o.$data&&r.validate?(0,a.funcKeywordCode)(o,r):"macro"in r?(0,a.macroKeywordCode)(o,r):(r.compile||r.validate)&&(0,a.funcKeywordCode)(o,r)}e.KeywordCxt=w;let P=/^\/(?:[^~]|~0|~1)*$/,R=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function q(e,{dataLevel:t,dataNames:r,dataPathArr:i}){let o,n;if(""===e)return c.default.rootData;if("/"===e[0]){if(!P.test(e))throw Error(`Invalid JSON-pointer: ${e}`);o=e,n=c.default.rootData}else{let a=R.exec(e);if(!a)throw Error(`Invalid JSON-pointer: ${e}`);let d=+a[1];if("#"===(o=a[2])){if(d>=t)throw Error(s("property/index",d));return i[t-d]}if(d>t)throw Error(s("data",d));if(n=r[t-d],!o)return n}let a=n;for(let e of o.split("/"))e&&(n=(0,d._)`${n}${(0,d.getProperty)((0,p.unescapeJsonPointer)(e))}`,a=(0,d._)`${a} && ${n}`);return a;function s(e,r){return`Cannot access ${e} ${r} levels up, current level is ${t}`}}e.getData=q}),pn=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=class extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}}}),pa=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=pi();e.default=class extends Error{constructor(e,r,i,o){super(o||`can't resolve reference ${i} from id ${r}`),this.missingRef=(0,t.resolveUrl)(e,r,i),this.missingSchema=(0,t.normalizeId)((0,t.getFullPath)(e,this.missingRef))}}}),ps=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.resolveSchema=e.getCompilingSchema=e.resolveRef=e.compileSchema=e.SchemaEnv=void 0;let t=lY(),r=pn(),i=l0(),o=pi(),n=l1(),a=po();var s=class{constructor(e){var t;let r;this.refs={},this.dynamicAnchors={},"object"==typeof e.schema&&(r=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=null!=(t=e.baseId)?t:(0,o.normalizeId)(null==r?void 0:r[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=null==r?void 0:r.$async,this.refs={}}};function d(e){let n,s,d=l.call(this,e);if(d)return d;let c=(0,o.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:p,lines:u}=this.opts.code,{ownProperties:m}=this.opts,f=new t.CodeGen(this.scope,{es5:p,lines:u,ownProperties:m});e.$async&&(n=f.scopeValue("Error",{ref:r.default,code:(0,t._)`require("ajv/dist/runtime/validation_error").default`}));let h=f.scopeName("validate");e.validateName=h;let y={gen:f,allErrors:this.opts.allErrors,data:i.default.data,parentData:i.default.parentData,parentDataProperty:i.default.parentDataProperty,dataNames:[i.default.data],dataPathArr:[t.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:f.scopeValue("schema",!0===this.opts.code.source?{ref:e.schema,code:(0,t.stringify)(e.schema)}:{ref:e.schema}),validateName:h,ValidationError:n,schema:e.schema,schemaEnv:e,rootId:c,baseId:e.baseId||c,schemaPath:t.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,t._)`""`,opts:this.opts,self:this};try{this._compilations.add(e),(0,a.validateFunctionCode)(y),f.optimize(this.opts.code.optimize);let r=f.toString();s=`${f.scopeRefs(i.default.scope)}return ${r}`,this.opts.code.process&&(s=this.opts.code.process(s,e));let o=Function(`${i.default.self}`,`${i.default.scope}`,s)(this,this.scope.get());if(this.scope.value(h,{ref:o}),o.errors=null,o.schema=e.schema,o.schemaEnv=e,e.$async&&(o.$async=!0),!0===this.opts.code.source&&(o.source={validateName:h,validateCode:r,scopeValues:f._values}),this.opts.unevaluated){let{props:e,items:r}=y;o.evaluated={props:e instanceof t.Name?void 0:e,items:r instanceof t.Name?void 0:r,dynamicProps:e instanceof t.Name,dynamicItems:r instanceof t.Name},o.source&&(o.source.evaluated=(0,t.stringify)(o.evaluated))}return e.validate=o,e}catch(t){throw delete e.validate,delete e.validateName,s&&this.logger.error("Error compiling schema, function code:",s),t}finally{this._compilations.delete(e)}}function c(e){return(0,o.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:d.call(this,e)}function l(e){for(let i of this._compilations){var t,r;if(t=i,r=e,t.schema===r.schema&&t.root===r.root&&t.baseId===r.baseId)return i}}function p(e,t){let r;for(;"string"==typeof(r=this.refs[t]);)t=r;return r||this.schemas[t]||u.call(this,e,t)}function u(e,t){let r=this.opts.uriResolver.parse(t),i=(0,o._getFullPath)(this.opts.uriResolver,r),n=(0,o.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&i===n)return f.call(this,r,e);let a=(0,o.normalizeId)(i),c=this.refs[a]||this.schemas[a];if("string"==typeof c){let t=u.call(this,e,c);if("object"!=typeof(null==t?void 0:t.schema))return;return f.call(this,r,t)}if("object"==typeof(null==c?void 0:c.schema)){if(c.validate||d.call(this,c),a===(0,o.normalizeId)(t)){let{schema:t}=c,{schemaId:r}=this.opts,i=t[r];return i&&(n=(0,o.resolveUrl)(this.opts.uriResolver,n,i)),new s({schema:t,schemaId:r,root:e,baseId:n})}return f.call(this,r,c)}}e.SchemaEnv=s,e.compileSchema=d,e.resolveRef=function(e,t,r){var i;r=(0,o.resolveUrl)(this.opts.uriResolver,t,r);let n=e.refs[r];if(n)return n;let a=p.call(this,e,r);if(void 0===a){let o=null==(i=e.localRefs)?void 0:i[r],{schemaId:n}=this.opts;o&&(a=new s({schema:o,schemaId:n,root:e,baseId:t}))}if(void 0!==a)return e.refs[r]=c.call(this,a)},e.getCompilingSchema=l,e.resolveSchema=u;let m=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function f(e,{baseId:t,schema:r,root:i}){var a;let d;if((null==(a=e.fragment)?void 0:a[0])!=="/")return;for(let i of e.fragment.slice(1).split("/")){if("boolean"==typeof r)return;let e=r[(0,n.unescapeFragment)(i)];if(void 0===e)return;let a="object"==typeof(r=e)&&r[this.opts.schemaId];!m.has(i)&&a&&(t=(0,o.resolveUrl)(this.opts.uriResolver,t,a))}if("boolean"!=typeof r&&r.$ref&&!(0,n.schemaHasRulesButRef)(r,this.RULES)){let e=(0,o.resolveUrl)(this.opts.uriResolver,t,r.$ref);d=u.call(this,i,e)}let{schemaId:c}=this.opts;if((d=d||new s({schema:r,schemaId:c,root:i,baseId:t})).schema!==d.root.schema)return d}}),pd=eb((e,t)=>{t.exports={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}}),pc=eb((e,t)=>{let r=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),i=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u),o=RegExp.prototype.test.bind(/^\d*$/u),n=RegExp.prototype.test.bind(/^[\da-f]{2}$/iu),a=RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu),s=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:@/]$/u),d=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:@/?]$/u),c=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:]$/u),l=Array(256);{let e="0123456789ABCDEF";for(let t=0;t<256;t++)l[t]="%"+e[t>>4]+e[15&t]}function p(e){return e<2048?l[192|e>>6]+l[128|63&e]:e<65536?l[224|e>>12]+l[128|e>>6&63]+l[128|63&e]:l[240|e>>18]+l[128|e>>12&63]+l[128|e>>6&63]+l[128|63&e]}let u=RegExp.prototype.test.bind(/^[\dA-Fa-f]{1,4}$/),m=RegExp.prototype.test.bind(/^[vV][\dA-Fa-f]+\.[A-Za-z\d\-._~!$&'()*+,;=:]+$/),f=RegExp.prototype.test.bind(/^[A-Za-z\d\-._~]$/),h=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function y(e){let t=-1,r=0,i=-1,o=0;for(let n=0;nr&&(r=o,t=i)):(i=-1,o=0);return r<2?e.join(":"):e.slice(0,t).join(":")+"::"+e.slice(t+r).join(":")}function g(e){let t="["===e[0]&&"]"===e[e.length-1];if(("["===e[0]||"]"===e[e.length-1])&&!t)return{host:e,isIPV6:!1,error:!0};let r=t?e.slice(1,-1):e;if(t&&m(r))return r=r.toLowerCase(),{host:`[${r}]`,escapedHost:r,isIPV6:!1,isIPVFuture:!0};if(2>function(e){let t=0;for(let r=0;r=8)return;let s=n.slice(0,r.length);for(let e=a;e<8;e++)s.push("0");for(let e=r.length;e_[e])}function S(e,t=!1){if(-1===e.indexOf("%"))return e;let r="";for(let i=0;i57343)r+=p(t);else if(t<=56319&&i+1=56320&&o<=57343?(r+=p(65536+(t-55296<<10)+(o-56320)),i++):r+=p(65533)}else r+=p(65533)}}return r}function w(e){return k(e,c)}function V(e){return e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122||42===e||43===e||45===e||46===e||47===e||64===e||95===e}t.exports={nonSimpleDomain:h,recomposeAuthority:function(e){let t=[];if(void 0!==e.userinfo&&(t.push(w(e.userinfo)),t.push("@")),void 0!==e.host){let r=e.host;if(!i(r)){let e=g(r);!0!==e.isIPV6&&!0!==e.isIPVFuture&&(e=g(r=S(r,!0))),r=!0===e.isIPV6||!0===e.isIPVFuture?`[${e.escapedHost}]`:$(r,!1)}t.push(r)}if("number"==typeof e.port||"string"==typeof e.port){let r=String(e.port);if(!o(r))throw TypeError("URI port is malformed.");t.push(":"),t.push(r)}return t.length?t.join(""):void 0},reescapeHostDelimiters:$,normalizePercentEncoding:S,normalizePathEncoding:function(e){let t="";for(let r=0;r57343)t+=p(o);else if(o<=56319&&r+1=56320&&i<=57343?(t+=p(65536+(o-55296<<10)+(i-56320)),r++):t+=p(65533)}else t+=p(65533)}}return t},serializePathEncoding:function(e,t=!1){let r="",i=t&&"/"!==e[0];for(let t=0;t57343)r+=p(i);else if(i<=56319&&t+1=56320&&o<=57343?(r+=p(65536+(i-55296<<10)+(o-56320)),t++):r+=p(65533)}else r+=p(65533)}}return r},normalizeQueryFragmentEncoding:function(e){let t="";for(let r=0;r57343)t+=p(o);else if(o<=56319&&r+1=56320&&i<=57343?(t+=p(65536+(o-55296<<10)+(i-56320)),r++):t+=p(65533)}else t+=p(65533)}}return t},encodeUserinfo:w,encodeQuery:function(e){return k(e,d)},encodeFragment:function(e){return k(e,d)},escapePreservingEscapes:function(e){let t="";for(let r=0;r=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";t+=e[i];break}for(i+=1;i=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";t+=e[i]}return t}}}),pl=eb((e,t)=>{let{isUUID:r}=pc(),i=/^([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-./:;=@]|%[\da-f]{2})+)$/iu,o=["http","https","ws","wss","urn","urn:uuid"];function n(e){return!0===e.secure||!1!==e.secure&&!!e.scheme&&3===e.scheme.length&&("w"===e.scheme[0]||"W"===e.scheme[0])&&("s"===e.scheme[1]||"S"===e.scheme[1])&&("s"===e.scheme[2]||"S"===e.scheme[2])}function a(e){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e}function s(e){let t="https"===String(e.scheme).toLowerCase();return(e.port===(t?443:80)||""===e.port)&&(e.port=void 0),e.path||(e.path="/"),e}let d={scheme:"http",domainHost:!0,parse:a,serialize:s},c={scheme:"https",domainHost:d.domainHost,parse:a,serialize:s},l={scheme:"ws",domainHost:!0,parse:function(e){return e.secure=n(e),e.resourceName=(e.path||"/")+(e.query?"?"+e.query:""),e.path=void 0,e.query=void 0,e},serialize:function(e){if((e.port===(n(e)?443:80)||""===e.port)&&(e.port=void 0),"boolean"==typeof e.secure&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){let t=e.resourceName.indexOf("?"),r=-1===t?e.resourceName:e.resourceName.slice(0,t);e.path=r&&"/"!==r?r:void 0,e.query=-1===t?void 0:e.resourceName.slice(t+1),e.resourceName=void 0}return e.fragment=void 0,e}},p={scheme:"wss",domainHost:l.domainHost,parse:l.parse,serialize:l.serialize},u={http:d,https:c,ws:l,wss:p,urn:{scheme:"urn",parse:function(e,t){if(!e.path)return e.error="URN can not be parsed",e;let r=e.path.match(i);if(r&&r[0]===e.path){let i=t.scheme||e.scheme||"urn";e.nid=r[1].toLowerCase(),e.nss=r[2];let o=m(`${i}:${t.nid||e.nid}`);e.path=void 0,o&&(e=o.parse(e,t))}else e.error=e.error||"URN can not be parsed.";return e},serialize:function(e,t){if(void 0===e.nid)throw Error("URN without nid cannot be serialized");let r=t.scheme||e.scheme||"urn",i=e.nid.toLowerCase(),o=m(`${r}:${t.nid||i}`);o&&(e=o.serialize(e,t));let n=e,a=e.nss;return n.path=`${i||t.nid}:${a}`,t.skipEscape=!0,n},skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:function(e,t){return e.uuid=e.nss,e.nss=void 0,t.tolerant||e.uuid&&r(e.uuid)||(e.error=e.error||"UUID is not valid."),e},serialize:function(e){return e.nss=(e.uuid||"").toLowerCase(),e},skipNormalize:!0}};function m(e){return e&&(u[e]||u[e.toLowerCase()])||void 0}Object.setPrototypeOf(u,null),t.exports={wsIsSecure:n,SCHEMES:u,isValidSchemeName:function(e){return -1!==o.indexOf(e)},getSchemeHandler:m}}),pp=eb((e,t)=>{let{normalizeIPv6:r,removeDotSegments:i,recomposeAuthority:o,normalizePercentEncoding:n,normalizePathEncoding:a,serializePathEncoding:s,normalizeQueryFragmentEncoding:d,encodeQuery:c,encodeFragment:l,reescapeHostDelimiters:p,isIPv4:u,nonSimpleDomain:m}=pc(),{SCHEMES:f,getSchemeHandler:h}=pl(),y=/^[A-Za-z][A-Za-z0-9+.-]*$/u,g="URI scheme is malformed.";function _(e){let t=unescape(String(e));if(!y.test(t))throw TypeError(g);return t}function v(e,t,r,o){let n={};return o||(e=q(b(e,r),r),t=q(b(t,r),r)),!(r=r||{}).tolerant&&t.scheme?(n.scheme=t.scheme,n.userinfo=t.userinfo,n.host=t.host,n.port=t.port,n.path=i(t.path||""),n.query=t.query):(void 0!==t.userinfo||void 0!==t.host||void 0!==t.port?(n.userinfo=t.userinfo,n.host=t.host,n.port=t.port,n.path=i(t.path||""),n.query=t.query):(t.path?("/"===t.path[0]?n.path=i(t.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?n.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:n.path=t.path:n.path="/"+t.path,n.path=i(n.path)),n.query=t.query):(n.path=e.path,void 0!==t.query?n.query=t.query:n.query=e.query),n.userinfo=e.userinfo,n.host=e.host,n.port=e.port),n.scheme=e.scheme),n.fragment=t.fragment,n}function b(e,t){let r={host:e.host,scheme:e.scheme,userinfo:e.userinfo,port:e.port,path:e.path,query:e.query,nid:e.nid,nss:e.nss,uuid:e.uuid,fragment:e.fragment,reference:e.reference,resourceName:e.resourceName,secure:e.secure,error:""},a=Object.assign({},t),d=[];r.scheme&&(r.scheme=_(r.scheme));let p=h(a.scheme||r.scheme);p&&p.serialize&&p.serialize(r,a);let u=void 0!==r.userinfo||void 0!==r.host||void 0!==r.port,m=!a.skipEscape&&void 0===r.scheme&&!u;void 0!==r.path&&(a.skipEscape?r.path=n(r.path):r.path=s(r.path,m)),"suffix"!==a.reference&&r.scheme&&(r.scheme=_(r.scheme),d.push(r.scheme,":"));let f=o(r);if(void 0!==f&&("suffix"!==a.reference&&d.push("//"),d.push(f),r.path&&"/"!==r.path[0]&&d.push("/")),void 0!==r.path){let e=r.path;a.absolutePath||p&&p.absolutePath||(e=i(e)),m&&(e=s(e,!0)),void 0===f&&"/"===e[0]&&"/"===e[1]&&(e="/%2F"+e.slice(2)),d.push(e)}return void 0!==r.query&&d.push("?",c(r.query)),void 0!==r.fragment&&d.push("#",l(r.fragment)),d.join("")}let $=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u,S=/^(?:[^#/:?]+:)?\/\/([^/?#]*)/,k=/^(?:[^#/:?]+:)?([/\\\t\n\r]*)/;function w(e){if(void 0===e)return!1;let t=e.indexOf("%");for(;-1!==t;){if(t+2>=e.length||!/^[\da-f]{2}$/iu.test(e.slice(t+1,t+3)))return!0;t=e.indexOf("%",t+3)}return!1}function V(e){return"["===e[0]&&"]"===e[e.length-1]}function P(e,t,r,i){if(!t.unicodeSupport&&(!r||!r.unicodeSupport)&&e.host&&!V(e.host)&&(t.domainHost||r&&r.domainHost)&&!1===i&&m(e.host))try{e.host=new URL("http://"+e.host).hostname}catch(t){return e.error=e.error||"Host's domain name can not be converted to ASCII: "+t,!0}return!1}function R(e,t){let i=Object.assign({},t),o={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},s=!1,c=!1,l=!1,m=!1,_=!1,v=!1,b=!1;"suffix"===i.reference&&(e=i.scheme?i.scheme+":"+e:"//"+e);let R=e.match(S);null!==R&&-1!==R[1].indexOf("\\")&&(o.error="URI authority must not contain a literal backslash.",s=!0);let q=e.match(k);if(null!==q){let e=q[1],t=e.replace(/[\t\n\r]/g,"");t.length>=2&&("//"!==t.slice(0,2)?(o.error=o.error||"URI authority must not contain a literal backslash.",s=!0):e.length!==t.length&&(o.error=o.error||"URI authority introducer must not contain whitespace.",s=!0))}let I=e.match($);if(I){let t;if(o.scheme=I[1],o.userinfo=I[3],o.host=I[4],o.port=parseInt(I[5],10),o.path=I[6]||"",o.query=I[7],o.fragment=I[8],void 0!==o.scheme){let e=unescape(o.scheme);y.test(e)?o.scheme=e.toLowerCase():(o.error=o.error||g,v=!0)}t=I[4],(c=w(I[3])||void 0!==t&&!V(t)&&w(t)||w(I[6])||w(I[7])||w(I[8]))&&(o.error=o.error||"URI contains malformed percent-encoding."),isNaN(o.port)&&(o.port=I[5]);let $=void 0!==I[2]&&o.path&&"/"!==o.path[0]?'URI path must start with "/" when authority is present.':"number"==typeof o.port&&(o.port<0||o.port>65535)?"URI port is malformed.":void 0;if(void 0!==$&&(o.error=o.error||$,s=!0),o.host)if(!1===u(o.host)){let e=V(o.host),t=-1!==o.host.indexOf("[")||-1!==o.host.indexOf("]"),i=r(o.host);b=i.isIPV6||!0===i.isIPVFuture,_=t&&(!e||!0===i.error),o.host=b?i.host:i.host.toLowerCase(),_&&(o.error=o.error||"URI host is malformed.",s=!0)}else b=!0;void 0!==o.scheme||void 0!==o.userinfo||void 0!==o.host||void 0!==o.port||void 0!==o.query||o.path?void 0===o.scheme?o.reference="relative":void 0===o.fragment?o.reference="absolute":o.reference="uri":o.reference="same-document",i.reference&&"suffix"!==i.reference&&i.reference!==o.reference&&(o.error=o.error||"URI is not a "+i.reference+" reference.");let S=h(i.scheme||o.scheme);if(_||(m=P(o,i,S,b)),-1!==e.indexOf("%")&&void 0!==o.host&&!_){let e=b?o.host:n(o.host,!0);b||(e=n(e.toLowerCase())),o.host=p(e,b)}(!S||S&&!S.skipNormalize)&&(o.path&&(o.path=a(o.path)),o.query&&(o.query=d(o.query)),o.fragment&&(o.fragment=d(o.fragment))),S&&S.parse&&(S.parse(o,i),S===f.urn&&void 0===o.nid&&(l=!0))}else o.error=o.error||"URI can not be parsed.";return{parsed:o,malformedAuthorityOrPort:s,malformedPercentEncoding:c,malformedSchemeSpecific:l,malformedHost:m,malformedScheme:v}}function q(e,t){return R(e,t).parsed}function I(e,t){let{parsed:r,malformedAuthorityOrPort:i,malformedPercentEncoding:o,malformedSchemeSpecific:n,malformedHost:a,malformedScheme:s}=R(e,t);return{normalized:i||o||n||a||s?e:b(r,t),malformedAuthorityOrPort:i,malformedPercentEncoding:o,malformedSchemeSpecific:n,malformedHost:a,malformedScheme:s}}function x(e,t){let r;if("string"!=typeof e&&"object"!=typeof e)return;try{r="string"==typeof e?e:b(e,t)}catch{return}let{normalized:i,malformedAuthorityOrPort:o,malformedPercentEncoding:n,malformedSchemeSpecific:a,malformedHost:s,malformedScheme:d}=I(r,t);return o||n||a||s||d?void 0:i}let j={SCHEMES:f,normalize:function(e,t){return"string"==typeof e?e=I(e,t).normalized:"object"==typeof e&&(e=q(b(e,t),t)),e},resolve:function(e,t,i){let o=i?Object.assign({scheme:"null"},i):{scheme:"null"},{parsed:n,malformedAuthorityOrPort:a,malformedPercentEncoding:s,malformedSchemeSpecific:d,malformedHost:c,malformedScheme:l}=R(e,o),{parsed:p,malformedAuthorityOrPort:m,malformedPercentEncoding:f,malformedSchemeSpecific:y,malformedHost:g,malformedScheme:_}=R(t,o);if(a||m||s||f||d||y||c||g||l||_)throw Error(n.error||p.error||"URI is malformed.");let $=v(n,p,o,!0),S=h(i&&i.scheme||$.scheme),k=$.host;P($,i||{},S,void 0!==k&&""!==k&&(u(k)||r(k).isIPV6));let w=k&&-1!==k.indexOf("%")&&!/\P{ASCII}/u.test(k);if($.error&&!w)throw Error($.error);return o.skipEscape=!0,b($,o)},resolveComponent:v,equal:function(e,t,r){let i=x(e,r),o=x(t,r);return void 0!==i&&void 0!==o&&i===o},serialize:b,parse:q};t.exports=j,t.exports.default=j,t.exports.fastUri=j}),pu=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=pp();t.code='require("ajv/dist/runtime/uri").default',e.default=t}),pm=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var t=po();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var r=lY();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return r.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return r.CodeGen}});let i=pn(),o=pa(),n=l6(),a=ps(),s=lY(),d=pi(),c=l9(),l=l1(),p=pd(),u=pu(),m=(e,t)=>new RegExp(e,t);m.code="new RegExp";let f=["removeAdditional","useDefaults","coerceTypes"],h=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),y={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},g={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'};var _=class{constructor(e={}){var t,r,i,o,a,d,c,l,p,f,_,b,P,R,q,I,x,j,C,T,O,E,A,W,M,N;let z,D,F,L,U;this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...(z=(t=e).strict,F=!0===(D=null==(r=t.code)?void 0:r.optimize)||void 0===D?1:D||0,L=null!=(o=null==(i=t.code)?void 0:i.regExp)?o:m,U=null!=(a=t.uriResolver)?a:u.default,{strictSchema:null==(c=null!=(d=t.strictSchema)?d:z)||c,strictNumbers:null==(p=null!=(l=t.strictNumbers)?l:z)||p,strictTypes:null!=(_=null!=(f=t.strictTypes)?f:z)?_:"log",strictTuples:null!=(P=null!=(b=t.strictTuples)?b:z)?P:"log",strictRequired:null!=(q=null!=(R=t.strictRequired)?R:z)&&q,code:t.code?{...t.code,optimize:F,regExp:L}:{optimize:F,regExp:L},loopRequired:null!=(I=t.loopRequired)?I:200,loopEnum:null!=(x=t.loopEnum)?x:200,meta:null==(j=t.meta)||j,messages:null==(C=t.messages)||C,inlineRefs:null==(T=t.inlineRefs)||T,schemaId:null!=(O=t.schemaId)?O:"$id",addUsedSchema:null==(E=t.addUsedSchema)||E,validateSchema:null==(A=t.validateSchema)||A,validateFormats:null==(W=t.validateFormats)||W,unicodeRegExp:null==(M=t.unicodeRegExp)||M,int32range:null==(N=t.int32range)||N,uriResolver:U})};let{es5:H,lines:G}=this.opts.code;this.scope=new s.ValueScope({scope:{},prefixes:h,es5:H,lines:G}),this.logger=function(e){if(!1===e)return V;if(void 0===e)return console;if(e.log&&e.warn&&e.error)return e;throw Error("logger must implement log, warn and error methods")}(e.logger);let B=e.validateFormats;e.validateFormats=!1,this.RULES=(0,n.getRules)(),v.call(this,y,e,"NOT SUPPORTED"),v.call(this,g,e,"DEPRECATED","warn"),this._metaOpts=w.call(this),e.formats&&S.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&k.call(this,e.keywords),"object"==typeof e.meta&&this.addMetaSchema(e.meta),$.call(this),e.validateFormats=B}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:e,meta:t,schemaId:r}=this.opts,i=p;"id"===r&&((i={...p}).id=i.$id,delete i.$id),t&&e&&this.addMetaSchema(i,i[r],!1)}defaultMeta(){let{meta:e,schemaId:t}=this.opts;return this.opts.defaultMeta="object"==typeof e?e[t]||e:void 0}validate(e,t){let r;if("string"==typeof e){if(!(r=this.getSchema(e)))throw Error(`no schema with key or ref "${e}"`)}else r=this.compile(e);let i=r(t);return"$async"in r||(this.errors=r.errors),i}compile(e,t){let r=this._addSchema(e,t);return r.validate||this._compileSchemaEnv(r)}compileAsync(e,t){if("function"!=typeof this.opts.loadSchema)throw Error("options.loadSchema should be a function");let{loadSchema:r}=this.opts;return i.call(this,e,t);async function i(e,t){await n.call(this,e.$schema);let r=this._addSchema(e,t);return r.validate||a.call(this,r)}async function n(e){e&&!this.getSchema(e)&&await i.call(this,{$ref:e},!0)}async function a(e){try{return this._compileSchemaEnv(e)}catch(t){if(!(t instanceof o.default))throw t;return s.call(this,t),await d.call(this,t.missingSchema),a.call(this,e)}}function s({missingSchema:e,missingRef:t}){if(this.refs[e])throw Error(`AnySchema ${e} is loaded but ${t} cannot be resolved`)}async function d(e){let r=await c.call(this,e);this.refs[e]||await n.call(this,r.$schema),this.refs[e]||this.addSchema(r,e,t)}async function c(e){let t=this._loading[e];if(t)return t;try{return await (this._loading[e]=r(e))}finally{delete this._loading[e]}}}addSchema(e,t,r,i=this.opts.validateSchema){let o;if(Array.isArray(e)){for(let t of e)this.addSchema(t,void 0,r,i);return this}if("object"==typeof e){let{schemaId:t}=this.opts;if(void 0!==(o=e[t])&&"string"!=typeof o)throw Error(`schema ${t} must be string`)}return t=(0,d.normalizeId)(t||o),this._checkUnique(t),this.schemas[t]=this._addSchema(e,r,t,i,!0),this}addMetaSchema(e,t,r=this.opts.validateSchema){return this.addSchema(e,t,!0,r),this}validateSchema(e,t){let r;if("boolean"==typeof e)return!0;if(void 0!==(r=e.$schema)&&"string"!=typeof r)throw Error("$schema must be a string");if(!(r=r||this.opts.defaultMeta||this.defaultMeta()))return this.logger.warn("meta-schema not available"),this.errors=null,!0;let i=this.validate(r,e);if(!i&&t){let e="schema is invalid: "+this.errorsText();if("log"===this.opts.validateSchema)this.logger.error(e);else throw Error(e)}return i}getSchema(e){let t;for(;"string"==typeof(t=b.call(this,e));)e=t;if(void 0===t){let{schemaId:r}=this.opts,i=new a.SchemaEnv({schema:{},schemaId:r});if(!(t=a.resolveSchema.call(this,i,e)))return;this.refs[e]=t}return t.validate||this._compileSchemaEnv(t)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let t=b.call(this,e);return"object"==typeof t&&this._cache.delete(t.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{this._cache.delete(e);let t=e[this.opts.schemaId];return t&&(t=(0,d.normalizeId)(t),delete this.schemas[t],delete this.refs[t]),this}default:throw Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(let t of e)this.addKeyword(t);return this}addKeyword(e,t){let r;if("string"==typeof e)r=e,"object"==typeof t&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),t.keyword=r);else if("object"==typeof e&&void 0===t){if(Array.isArray(r=(t=e).keyword)&&!r.length)throw Error("addKeywords: keyword must be string or non-empty array")}else throw Error("invalid addKeywords parameters");if(R.call(this,r,t),!t)return(0,l.eachItem)(r,e=>q.call(this,e)),this;x.call(this,t);let i={...t,type:(0,c.getJSONTypes)(t.type),schemaType:(0,c.getJSONTypes)(t.schemaType)};return(0,l.eachItem)(r,0===i.type.length?e=>q.call(this,e,i):e=>i.type.forEach(t=>q.call(this,e,i,t))),this}getKeyword(e){let t=this.RULES.all[e];return"object"==typeof t?t.definition:!!t}removeKeyword(e){let{RULES:t}=this;for(let r of(delete t.keywords[e],delete t.all[e],t.rules)){let t=r.rules.findIndex(t=>t.keyword===e);t>=0&&r.rules.splice(t,1)}return this}addFormat(e,t){return"string"==typeof t&&(t=new RegExp(t)),this.formats[e]=t,this}errorsText(e=this.errors,{separator:t=", ",dataVar:r="data"}={}){return e&&0!==e.length?e.map(e=>`${r}${e.instancePath} ${e.message}`).reduce((e,r)=>e+t+r):"No errors"}$dataMetaSchema(e,t){let r=this.RULES.all;for(let i of(e=JSON.parse(JSON.stringify(e)),t)){let t=i.split("/").slice(1),o=e;for(let e of t)o=o[e];for(let e in r){let t=r[e];if("object"!=typeof t)continue;let{$data:i}=t.definition,n=o[e];i&&n&&(o[e]=C(n))}}return e}_removeAllSchemas(e,t){for(let r in e){let i=e[r];(!t||t.test(r))&&("string"==typeof i?delete e[r]:i&&!i.meta&&(this._cache.delete(i.schema),delete e[r]))}}_addSchema(e,t,r,i=this.opts.validateSchema,o=this.opts.addUsedSchema){let n,{schemaId:s}=this.opts;if("object"==typeof e)n=e[s];else if(this.opts.jtd)throw Error("schema must be object");else if("boolean"!=typeof e)throw Error("schema must be object or boolean");let c=this._cache.get(e);if(void 0!==c)return c;r=(0,d.normalizeId)(n||r);let l=d.getSchemaRefs.call(this,e,r);return c=new a.SchemaEnv({schema:e,schemaId:s,meta:t,baseId:r,localRefs:l}),this._cache.set(c.schema,c),o&&!r.startsWith("#")&&(r&&this._checkUnique(r),this.refs[r]=c),i&&this.validateSchema(e,!0),c}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):a.compileSchema.call(this,e),!e.validate)throw Error("ajv implementation error");return e.validate}_compileMetaSchema(e){let t=this.opts;this.opts=this._metaOpts;try{a.compileSchema.call(this,e)}finally{this.opts=t}}};function v(e,t,r,i="error"){for(let o in e)o in t&&this.logger[i](`${r}: option ${o}. ${e[o]}`)}function b(e){return e=(0,d.normalizeId)(e),this.schemas[e]||this.refs[e]}function $(){let e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(let t in e)this.addSchema(e[t],t)}function S(){for(let e in this.opts.formats){let t=this.opts.formats[e];t&&this.addFormat(e,t)}}function k(e){if(Array.isArray(e))return void this.addVocabulary(e);for(let t in this.logger.warn("keywords option as map is deprecated, pass array"),e){let r=e[t];r.keyword||(r.keyword=t),this.addKeyword(r)}}function w(){let e={...this.opts};for(let t of f)delete e[t];return e}_.ValidationError=i.default,_.MissingRefError=o.default,e.default=_;let V={log(){},warn(){},error(){}},P=/^[a-z_$][a-z0-9_$:-]*$/i;function R(e,t){let{RULES:r}=this;if((0,l.eachItem)(e,e=>{if(r.keywords[e])throw Error(`Keyword ${e} is already defined`);if(!P.test(e))throw Error(`Keyword ${e} has invalid name`)}),t&&t.$data&&!("code"in t||"validate"in t))throw Error('$data keyword must have "code" or "validate" function')}function q(e,t,r){var i;let o=null==t?void 0:t.post;if(r&&o)throw Error('keyword with "post" flag cannot have "type"');let{RULES:n}=this,a=o?n.post:n.rules.find(({type:e})=>e===r);if(a||(a={type:r,rules:[]},n.rules.push(a)),n.keywords[e]=!0,!t)return;let s={keyword:e,definition:{...t,type:(0,c.getJSONTypes)(t.type),schemaType:(0,c.getJSONTypes)(t.schemaType)}};t.before?I.call(this,a,s,t.before):a.rules.push(s),n.all[e]=s,null==(i=t.implements)||i.forEach(e=>this.addKeyword(e))}function I(e,t,r){let i=e.rules.findIndex(e=>e.keyword===r);i>=0?e.rules.splice(i,0,t):(e.rules.push(t),this.logger.warn(`rule ${r} is not defined`))}function x(e){let{metaSchema:t}=e;void 0!==t&&(e.$data&&this.opts.$data&&(t=C(t)),e.validateSchema=this.compile(t,!0))}let j={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function C(e){return{anyOf:[e,j]}}}),pf=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={keyword:"id",code(){throw Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}}}),ph=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.callRef=e.getValidate=void 0;let t=pa(),r=l8(),i=lY(),o=l0(),n=ps(),a=l1();function s(e,t){let{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):(0,i._)`${r.scopeValue("wrapper",{ref:t})}.validate`}function d(e,t,n,s){let{gen:d,it:c}=e,{allErrors:l,schemaEnv:p,opts:u}=c,m=u.passContext?o.default.this:i.nil;function f(e){let t=(0,i._)`${e}.errors`;d.assign(o.default.vErrors,(0,i._)`${o.default.vErrors} === null ? ${t} : ${o.default.vErrors}.concat(${t})`),d.assign(o.default.errors,(0,i._)`${o.default.vErrors}.length`)}function h(e){var t;if(!c.opts.unevaluated)return;let r=null==(t=null==n?void 0:n.validate)?void 0:t.evaluated;if(!0!==c.props)if(r&&!r.dynamicProps)void 0!==r.props&&(c.props=a.mergeEvaluated.props(d,r.props,c.props));else{let t=d.var("props",(0,i._)`${e}.evaluated.props`);c.props=a.mergeEvaluated.props(d,t,c.props,i.Name)}if(!0!==c.items)if(r&&!r.dynamicItems)void 0!==r.items&&(c.items=a.mergeEvaluated.items(d,r.items,c.items));else{let t=d.var("items",(0,i._)`${e}.evaluated.items`);c.items=a.mergeEvaluated.items(d,t,c.items,i.Name)}}s?function(){if(!p.$async)throw Error("async schema referenced by sync schema");let o=d.let("valid");d.try(()=>{d.code((0,i._)`await ${(0,r.callValidateCode)(e,t,m)}`),h(t),l||d.assign(o,!0)},e=>{d.if((0,i._)`!(${e} instanceof ${c.ValidationError})`,()=>d.throw(e)),f(e),l||d.assign(o,!1)}),e.ok(o)}():e.result((0,r.callValidateCode)(e,t,m),()=>h(t),()=>f(t))}e.getValidate=s,e.callRef=d,e.default={keyword:"$ref",schemaType:"string",code(e){var r,o;let a,c,l,{gen:p,schema:u,it:m}=e,{baseId:f,schemaEnv:h,validateName:y,opts:g,self:_}=m,{root:v}=h;if(("#"===u||"#/"===u)&&f===v.baseId){if(h===v)return d(e,y,h,h.$async);let t=p.scopeValue("root",{ref:v});return d(e,(0,i._)`${t}.validate`,v,v.$async)}let b=n.resolveRef.call(_,v,f,u);if(void 0===b)throw new t.default(m.opts.uriResolver,f,u);return b instanceof n.SchemaEnv?void d(e,s(e,r=b),r,r.$async):(o=b,a=p.scopeValue("schema",!0===g.code.source?{ref:o,code:(0,i.stringify)(o)}:{ref:o}),c=p.name("valid"),l=e.subschema({schema:o,dataTypes:[],schemaPath:i.nil,topSchemaRef:a,errSchemaPath:u},c),void(e.mergeEvaluated(l),e.ok(c)))}}}),py=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=pf(),r=ph();e.default=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",t.default,r.default]}),pg=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=lY(),r=t.operators,i={maximum:{okStr:"<=",ok:r.LTE,fail:r.GT},minimum:{okStr:">=",ok:r.GTE,fail:r.LT},exclusiveMaximum:{okStr:"<",ok:r.LT,fail:r.GTE},exclusiveMinimum:{okStr:">",ok:r.GT,fail:r.LTE}};e.default={keyword:Object.keys(i),type:"number",schemaType:"number",$data:!0,error:{message:({keyword:e,schemaCode:r})=>(0,t.str)`must be ${i[e].okStr} ${r}`,params:({keyword:e,schemaCode:r})=>(0,t._)`{comparison: ${i[e].okStr}, limit: ${r}}`},code(e){let{keyword:r,data:o,schemaCode:n}=e;e.fail$data((0,t._)`${o} ${i[r].fail} ${n} || isNaN(${o})`)}}}),p_=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=lY();e.default={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:e})=>(0,t.str)`must be multiple of ${e}`,params:({schemaCode:e})=>(0,t._)`{multipleOf: ${e}}`},code(e){let{gen:r,data:i,schemaCode:o,it:n}=e,a=n.opts.multipleOfPrecision,s=r.let("res"),d=a?(0,t._)`Math.abs(Math.round(${s}) - ${s}) > 1e-${a}`:(0,t._)`${s} !== parseInt(${s})`;e.fail$data((0,t._)`(${o} === 0 || (${s} = ${i}/${o}, ${d}))`)}}}),pv=eb(e=>{function t(e){let t,r=e.length,i=0,o=0;for(;o=55296&&t<=56319&&o{Object.defineProperty(e,"__esModule",{value:!0});let t=lY(),r=l1(),i=pv();e.default={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message:({keyword:e,schemaCode:r})=>(0,t.str)`must NOT have ${"maxLength"===e?"more":"fewer"} than ${r} characters`,params:({schemaCode:e})=>(0,t._)`{limit: ${e}}`},code(e){let{keyword:o,data:n,schemaCode:a,it:s}=e,d="maxLength"===o?t.operators.GT:t.operators.LT,c=!1===s.opts.unicode?(0,t._)`${n}.length`:(0,t._)`${(0,r.useFunc)(e.gen,i.default)}(${n})`;e.fail$data((0,t._)`${c} ${d} ${a}`)}}}),p$=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=l8(),r=l1(),i=lY();e.default={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>(0,i.str)`must match pattern "${e}"`,params:({schemaCode:e})=>(0,i._)`{pattern: ${e}}`},code(e){let{gen:o,data:n,$data:a,schema:s,schemaCode:d,it:c}=e,l=c.opts.unicodeRegExp?"u":"";if(a){let{regExp:t}=c.opts.code,a="new RegExp"===t.code?(0,i._)`new RegExp`:(0,r.useFunc)(o,t),s=o.let("valid");o.try(()=>o.assign(s,(0,i._)`${a}(${d}, ${l}).test(${n})`),()=>o.assign(s,!1)),e.fail$data((0,i._)`!${s}`)}else{let r=(0,t.usePattern)(e,s);e.fail$data((0,i._)`!${r}.test(${n})`)}}}}),pS=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=lY();e.default={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message:({keyword:e,schemaCode:r})=>(0,t.str)`must NOT have ${"maxProperties"===e?"more":"fewer"} than ${r} properties`,params:({schemaCode:e})=>(0,t._)`{limit: ${e}}`},code(e){let{keyword:r,data:i,schemaCode:o}=e,n="maxProperties"===r?t.operators.GT:t.operators.LT;e.fail$data((0,t._)`Object.keys(${i}).length ${n} ${o}`)}}}),pk=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=l8(),r=lY(),i=l1();e.default={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:e}})=>(0,r.str)`must have required property '${e}'`,params:({params:{missingProperty:e}})=>(0,r._)`{missingProperty: ${e}}`},code(e){let{gen:o,schema:n,schemaCode:a,data:s,$data:d,it:c}=e,{opts:l}=c;if(!d&&0===n.length)return;let p=n.length>=l.loopRequired;if(c.allErrors?function(){if(p||d)e.block$data(r.nil,u);else for(let r of n)(0,t.checkReportMissingProp)(e,r)}():function(){let i=o.let("missing");if(p||d){let n=o.let("valid",!0);e.block$data(n,()=>{var d,c;return d=i,c=n,void(e.setParams({missingProperty:d}),o.forOf(d,a,()=>{o.assign(c,(0,t.propertyInData)(o,s,d,l.ownProperties)),o.if((0,r.not)(c),()=>{e.error(),o.break()})},r.nil))}),e.ok(n)}else o.if((0,t.checkMissingProp)(e,n,i)),(0,t.reportMissingProp)(e,i),o.else()}(),l.strictRequired){let t=e.parentSchema.properties,{definedProperties:r}=e.it;for(let e of n)if((null==t?void 0:t[e])===void 0&&!r.has(e)){let t=`required property "${e}" is not defined at "${c.schemaEnv.baseId+c.errSchemaPath}" (strictRequired)`;(0,i.checkStrictMode)(c,t,c.opts.strictRequired)}}function u(){o.forOf("prop",a,r=>{e.setParams({missingProperty:r}),o.if((0,t.noPropertyInData)(o,s,r,l.ownProperties),()=>e.error())})}}}}),pw=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=lY();e.default={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message:({keyword:e,schemaCode:r})=>(0,t.str)`must NOT have ${"maxItems"===e?"more":"fewer"} than ${r} items`,params:({schemaCode:e})=>(0,t._)`{limit: ${e}}`},code(e){let{keyword:r,data:i,schemaCode:o}=e,n="maxItems"===r?t.operators.GT:t.operators.LT;e.fail$data((0,t._)`${i}.length ${n} ${o}`)}}}),pV=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=pt();t.code='require("ajv/dist/runtime/equal").default',e.default=t}),pP=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=l9(),r=lY(),i=l1(),o=pV();e.default={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:e,j:t}})=>(0,r.str)`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>(0,r._)`{i: ${e}, j: ${t}}`},code(e){let{gen:n,data:a,$data:s,schema:d,parentSchema:c,schemaCode:l,it:p}=e;if(!s&&!d)return;let u=n.let("valid"),m=c.items?(0,t.getSchemaTypes)(c.items):[];e.block$data(u,function(){let s=n.let("i",(0,r._)`${a}.length`),d=n.let("j");e.setParams({i:s,j:d}),n.assign(u,!0),n.if((0,r._)`${s} > 1`,()=>(m.length>0&&!m.some(e=>"object"===e||"array"===e)?function(i,o){let s=n.name("item"),d=(0,t.checkDataTypes)(m,s,p.opts.strictNumbers,t.DataType.Wrong),c=n.const("indices",(0,r._)`{}`);n.for((0,r._)`;${i}--;`,()=>{n.let(s,(0,r._)`${a}[${i}]`),n.if(d,(0,r._)`continue`),m.length>1&&n.if((0,r._)`typeof ${s} == "string"`,(0,r._)`${s} += "_"`),n.if((0,r._)`typeof ${c}[${s}] == "number"`,()=>{n.assign(o,(0,r._)`${c}[${s}]`),e.error(),n.assign(u,!1).break()}).code((0,r._)`${c}[${s}] = ${i}`)})}:function(t,s){let d=(0,i.useFunc)(n,o.default),c=n.name("outer");n.label(c).for((0,r._)`;${t}--;`,()=>n.for((0,r._)`${s} = ${t}; ${s}--;`,()=>n.if((0,r._)`${d}(${a}[${t}], ${a}[${s}])`,()=>{e.error(),n.assign(u,!1).break(c)})))})(s,d))},(0,r._)`${l} === false`),e.ok(u)}}}),pR=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=lY(),r=l1(),i=pV();e.default={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:e})=>(0,t._)`{allowedValue: ${e}}`},code(e){let{gen:o,data:n,$data:a,schemaCode:s,schema:d}=e;a||d&&"object"==typeof d?e.fail$data((0,t._)`!${(0,r.useFunc)(o,i.default)}(${n}, ${s})`):e.fail((0,t._)`${d} !== ${n}`)}}}),pq=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=lY(),r=l1(),i=pV();e.default={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:e})=>(0,t._)`{allowedValues: ${e}}`},code(e){let o,n,{gen:a,data:s,$data:d,schema:c,schemaCode:l,it:p}=e;if(!d&&0===c.length)throw Error("enum must have non-empty array");let u=c.length>=p.opts.loopEnum,m=()=>null!=o?o:o=(0,r.useFunc)(a,i.default);if(u||d)n=a.let("valid"),e.block$data(n,function(){a.assign(n,!1),a.forOf("v",l,e=>a.if((0,t._)`${m()}(${s}, ${e})`,()=>a.assign(n,!0).break()))});else{if(!Array.isArray(c))throw Error("ajv implementation error");let e=a.const("vSchema",l);n=(0,t.or)(...c.map((r,i)=>{var o,n;let a;return o=e,"object"==typeof(a=c[n=i])&&null!==a?(0,t._)`${m()}(${s}, ${o}[${n}])`:(0,t._)`${s} === ${a}`}))}e.pass(n)}}}),pI=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=pg(),r=p_(),i=pb(),o=p$(),n=pS(),a=pk(),s=pw(),d=pP(),c=pR(),l=pq();e.default=[t.default,r.default,i.default,o.default,n.default,a.default,s.default,d.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},c.default,l.default]}),px=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateAdditionalItems=void 0;let t=lY(),r=l1();function i(e,i){let{gen:o,schema:n,data:a,keyword:s,it:d}=e;d.items=!0;let c=o.const("len",(0,t._)`${a}.length`);if(!1===n)e.setParams({len:i.length}),e.pass((0,t._)`${c} <= ${i.length}`);else if("object"==typeof n&&!(0,r.alwaysValidSchema)(d,n)){let n=o.var("valid",(0,t._)`${c} <= ${i.length}`);o.if((0,t.not)(n),()=>{var a;return a=n,void o.forRange("i",i.length,c,i=>{e.subschema({keyword:s,dataProp:i,dataPropType:r.Type.Num},a),d.allErrors||o.if((0,t.not)(a),()=>o.break())})}),e.ok(n)}}e.validateAdditionalItems=i,e.default={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:e}})=>(0,t.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,t._)`{limit: ${e}}`},code(e){let{parentSchema:t,it:o}=e,{items:n}=t;Array.isArray(n)?i(e,n):(0,r.checkStrictMode)(o,'"additionalItems" is ignored when "items" is not an array of schemas')}}}),pj=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateTuple=void 0;let t=lY(),r=l1(),i=l8();function o(e,i,n=e.schema){let{gen:a,parentSchema:s,data:d,keyword:c,it:l}=e;(function(e){let{opts:t,errSchemaPath:o}=l,a=n.length,s=a===e.minItems&&(a===e.maxItems||!1===e[i]);if(t.strictTuples&&!s){let e=`"${c}" is ${a}-tuple, but minItems or maxItems/${i} are not specified or different at path "${o}"`;(0,r.checkStrictMode)(l,e,t.strictTuples)}})(s),l.opts.unevaluated&&n.length&&!0!==l.items&&(l.items=r.mergeEvaluated.items(a,n.length,l.items));let p=a.name("valid"),u=a.const("len",(0,t._)`${d}.length`);n.forEach((i,o)=>{(0,r.alwaysValidSchema)(l,i)||(a.if((0,t._)`${u} > ${o}`,()=>e.subschema({keyword:c,schemaProp:o,dataProp:o},p)),e.ok(p))})}e.validateTuple=o,e.default={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){let{schema:t,it:n}=e;if(Array.isArray(t))return o(e,"additionalItems",t);n.items=!0,(0,r.alwaysValidSchema)(n,t)||e.ok((0,i.validateArray)(e))}}}),pC=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=pj();e.default={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,t.validateTuple)(e,"items")}}),pT=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=lY(),r=l1(),i=l8(),o=px();e.default={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:e}})=>(0,t.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,t._)`{limit: ${e}}`},code(e){let{schema:t,parentSchema:n,it:a}=e,{prefixItems:s}=n;a.items=!0,(0,r.alwaysValidSchema)(a,t)||(s?(0,o.validateAdditionalItems)(e,s):e.ok((0,i.validateArray)(e)))}}}),pO=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=lY(),r=l1();e.default={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:e,max:r}})=>void 0===r?(0,t.str)`must contain at least ${e} valid item(s)`:(0,t.str)`must contain at least ${e} and no more than ${r} valid item(s)`,params:({params:{min:e,max:r}})=>void 0===r?(0,t._)`{minContains: ${e}}`:(0,t._)`{minContains: ${e}, maxContains: ${r}}`},code(e){let i,o,{gen:n,schema:a,parentSchema:s,data:d,it:c}=e,{minContains:l,maxContains:p}=s;c.opts.next?(i=void 0===l?1:l,o=p):i=1;let u=n.const("len",(0,t._)`${d}.length`);if(e.setParams({min:i,max:o}),void 0===o&&0===i)return void(0,r.checkStrictMode)(c,'"minContains" == 0 without "maxContains": "contains" keyword ignored');if(void 0!==o&&i>o){(0,r.checkStrictMode)(c,'"minContains" > "maxContains" is always invalid'),e.fail();return}if((0,r.alwaysValidSchema)(c,a)){let r=(0,t._)`${u} >= ${i}`;void 0!==o&&(r=(0,t._)`${r} && ${u} <= ${o}`),e.pass(r);return}c.items=!0;let m=n.name("valid");function f(){let e=n.name("_valid"),r=n.let("count",0);h(e,()=>n.if(e,()=>{var e;return e=r,void(n.code((0,t._)`${e}++`),void 0===o?n.if((0,t._)`${e} >= ${i}`,()=>n.assign(m,!0).break()):(n.if((0,t._)`${e} > ${o}`,()=>n.assign(m,!1).break()),1===i?n.assign(m,!0):n.if((0,t._)`${e} >= ${i}`,()=>n.assign(m,!0))))}))}function h(t,i){n.forRange("i",0,u,o=>{e.subschema({keyword:"contains",dataProp:o,dataPropType:r.Type.Num,compositeRule:!0},t),i()})}void 0===o&&1===i?h(m,()=>n.if(m,()=>n.break())):0===i?(n.let(m,!0),void 0!==o&&n.if((0,t._)`${d}.length > 0`,f)):(n.let(m,!1),f()),e.result(m,()=>e.reset())}}}),pE=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;let t=lY(),r=l1(),i=l8();e.error={message:({params:{property:e,depsCount:r,deps:i}})=>(0,t.str)`must have ${1===r?"property":"properties"} ${i} when property ${e} is present`,params:({params:{property:e,depsCount:r,deps:i,missingProperty:o}})=>(0,t._)`{property: ${e}, + || ${s} === "boolean" || ${o} === null`).assign(d,(0,a._)`[${o}]`)}}(e);i.else(),m(e),i.endIf(),i.if((0,a._)`${d} !== undefined`,()=>{i.assign(o,d),function({gen:e,parentData:t,parentDataProperty:r},i){e.if((0,a._)`${t} !== undefined`,()=>e.assign((0,a._)`${t}[${r}]`,i))}(e,d)})}(e,r,u):m(e)})}return f};let c=new Set(["string","number","integer","boolean","null"]);function l(e,r,i,o=t.Correct){let n,s=o===t.Correct?a.operators.EQ:a.operators.NEQ;switch(e){case"null":return(0,a._)`${r} ${s} null`;case"array":n=(0,a._)`Array.isArray(${r})`;break;case"object":n=(0,a._)`${r} && typeof ${r} == "object" && !Array.isArray(${r})`;break;case"integer":n=d((0,a._)`!(${r} % 1) && !isNaN(${r})`);break;case"number":n=d();break;default:return(0,a._)`typeof ${r} ${s} ${e}`}return o===t.Correct?n:(0,a.not)(n);function d(e=a.nil){return(0,a.and)((0,a._)`typeof ${r} == "number"`,e,i?(0,a._)`isFinite(${r})`:a.nil)}}function p(e,t,r,i){let o;if(1===e.length)return l(e[0],t,r,i);let n=(0,s.toHash)(e);if(n.array&&n.object){let e=(0,a._)`typeof ${t} != "object"`;o=n.null?e:(0,a._)`!${t} || ${e}`,delete n.null,delete n.array,delete n.object}else o=a.nil;for(let e in n.number&&delete n.integer,n)o=(0,a.and)(o,l(e,t,r,i));return o}e.checkDataType=l,e.checkDataTypes=p;let u={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>"string"==typeof e?(0,a._)`{type: ${e}}`:(0,a._)`{type: ${t}}`};function m(e){let t=function(e){let{gen:t,data:r,schema:i}=e,o=(0,s.schemaRefOrVal)(e,i,"type");return{gen:t,keyword:"type",data:r,schema:i.type,schemaCode:o,schemaValue:o,parentSchema:i,params:{},it:e}}(e);(0,n.reportError)(t,u)}e.reportTypeError=m}),l5=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.assignDefaults=void 0;let t=lY(),r=l1();function i(e,i,o){let{gen:n,compositeRule:a,data:s,opts:d}=e;if(void 0===o)return;let c=(0,t._)`${s}${(0,t.getProperty)(i)}`;if(a)return void(0,r.checkStrictMode)(e,`default is ignored for: ${c}`);let l=(0,t._)`${c} === undefined`;"empty"===d.useDefaults&&(l=(0,t._)`${l} || ${c} === null || ${c} === ""`),n.if(l,(0,t._)`${c} = ${(0,t.stringify)(o)}`)}e.assignDefaults=function(e,t){let{properties:r,items:o}=e.schema;if("object"===t&&r)for(let t in r)i(e,t,r[t].default);else"array"===t&&Array.isArray(o)&&o.forEach((t,r)=>i(e,r,t.default))}}),l8=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateUnion=e.validateArray=e.usePattern=e.callValidateCode=e.schemaProperties=e.allSchemaProperties=e.noPropertyInData=e.propertyInData=e.isOwnProperty=e.hasPropFunc=e.reportMissingProp=e.checkMissingProp=e.checkReportMissingProp=void 0;let t=lY(),r=l1(),i=l0(),o=l1();function n(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,t._)`Object.prototype.hasOwnProperty`})}function a(e,r,i){return(0,t._)`${n(e)}.call(${r}, ${i})`}function s(e,r,i,o){let n=(0,t._)`${r}${(0,t.getProperty)(i)} === undefined`;return o?(0,t.or)(n,(0,t.not)(a(e,r,i))):n}function d(e){return e?Object.keys(e).filter(e=>"__proto__"!==e):[]}e.checkReportMissingProp=function(e,r){let{gen:i,data:o,it:n}=e;i.if(s(i,o,r,n.opts.ownProperties),()=>{e.setParams({missingProperty:(0,t._)`${r}`},!0),e.error()})},e.checkMissingProp=function({gen:e,data:r,it:{opts:i}},o,n){return(0,t.or)(...o.map(o=>(0,t.and)(s(e,r,o,i.ownProperties),(0,t._)`${n} = ${o}`)))},e.reportMissingProp=function(e,t){e.setParams({missingProperty:t},!0),e.error()},e.hasPropFunc=n,e.isOwnProperty=a,e.propertyInData=function(e,r,i,o){let n=(0,t._)`${r}${(0,t.getProperty)(i)} !== undefined`;return o?(0,t._)`${n} && ${a(e,r,i)}`:n},e.noPropertyInData=s,e.allSchemaProperties=d,e.schemaProperties=function(e,t){return d(t).filter(i=>!(0,r.alwaysValidSchema)(e,t[i]))},e.callValidateCode=function({schemaCode:e,data:r,it:{gen:o,topSchemaRef:n,schemaPath:a,errorPath:s},it:d},c,l,p){let u=p?(0,t._)`${e}, ${r}, ${n}${a}`:r,m=[[i.default.instancePath,(0,t.strConcat)(i.default.instancePath,s)],[i.default.parentData,d.parentData],[i.default.parentDataProperty,d.parentDataProperty],[i.default.rootData,i.default.rootData]];d.opts.dynamicRef&&m.push([i.default.dynamicAnchors,i.default.dynamicAnchors]);let f=(0,t._)`${u}, ${o.object(...m)}`;return l!==t.nil?(0,t._)`${c}.call(${l}, ${f})`:(0,t._)`${c}(${f})`};let c=(0,t._)`new RegExp`;e.usePattern=function({gen:e,it:{opts:r}},i){let n=r.unicodeRegExp?"u":"",{regExp:a}=r.code,s=a(i,n);return e.scopeValue("pattern",{key:s.toString(),ref:s,code:(0,t._)`${"new RegExp"===a.code?c:(0,o.useFunc)(e,a)}(${i}, ${n})`})},e.validateArray=function(e){let{gen:i,data:o,keyword:n,it:a}=e,s=i.name("valid");if(a.allErrors){let e=i.let("valid",!0);return d(()=>i.assign(e,!1)),e}return i.var(s,!0),d(()=>i.break()),s;function d(a){let d=i.const("len",(0,t._)`${o}.length`);i.forRange("i",0,d,o=>{e.subschema({keyword:n,dataProp:o,dataPropType:r.Type.Num},s),i.if((0,t.not)(s),a)})}},e.validateUnion=function(e){let{gen:i,schema:o,keyword:n,it:a}=e;if(!Array.isArray(o))throw Error("ajv implementation error");if(o.some(e=>(0,r.alwaysValidSchema)(a,e))&&!a.opts.unevaluated)return;let s=i.let("valid",!1),d=i.name("_valid");i.block(()=>o.forEach((r,o)=>{let a=e.subschema({keyword:n,schemaProp:o,compositeRule:!0},d);i.assign(s,(0,t._)`${s} || ${d}`),e.mergeValidEvaluated(a,d)||i.if((0,t.not)(s))})),e.result(s,()=>e.reset(),()=>e.error(!0))}}),l7=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateKeywordUsage=e.validSchemaType=e.funcKeywordCode=e.macroKeywordCode=void 0;let t=lY(),r=l0(),i=l8(),o=l2();function n(e){let{gen:r,data:i,it:o}=e;r.if(o.parentData,()=>r.assign(i,(0,t._)`${o.parentData}[${o.parentDataProperty}]`))}function a(e,r,i){if(void 0===i)throw Error(`keyword "${r}" failed to compile`);return e.scopeValue("keyword","function"==typeof i?{ref:i}:{ref:i,code:(0,t.stringify)(i)})}e.macroKeywordCode=function(e,r){let{gen:i,keyword:o,schema:n,parentSchema:s,it:d}=e,c=r.macro.call(d.self,n,s,d),l=a(i,o,c);!1!==d.opts.validateSchema&&d.self.validateSchema(c,!0);let p=i.name("valid");e.subschema({schema:c,schemaPath:t.nil,errSchemaPath:`${d.errSchemaPath}/${o}`,topSchemaRef:l,compositeRule:!0},p),e.pass(p,()=>e.error(!0))},e.funcKeywordCode=function(e,s){var d;let{gen:c,keyword:l,schema:p,parentSchema:u,$data:m,it:f}=e;!function({schemaEnv:e},t){if(t.async&&!e.$async)throw Error("async keyword in sync schema")}(f,s);let h=a(c,l,!m&&s.compile?s.compile.call(f.self,p,u,f):s.validate),y=c.let("valid");function g(o=s.async?(0,t._)`await `:t.nil){let n=f.opts.passContext?r.default.this:r.default.self,a=!("compile"in s&&!m||!1===s.schema);c.assign(y,(0,t._)`${o}${(0,i.callValidateCode)(e,h,n,a)}`,s.modifying)}function _(e){var r;c.if((0,t.not)(null!=(r=s.valid)?r:y),e)}e.block$data(y,function(){if(!1===s.errors)g(),s.modifying&&n(e),_(()=>e.error());else{let i,a,d=s.async?(i=c.let("ruleErrs",null),c.try(()=>g((0,t._)`await `),e=>c.assign(y,!1).if((0,t._)`${e} instanceof ${f.ValidationError}`,()=>c.assign(i,(0,t._)`${e}.errors`),()=>c.throw(e))),i):(a=(0,t._)`${h}.errors`,c.assign(a,null),g(t.nil),a);s.modifying&&n(e),_(()=>(function(e,i){let{gen:n}=e;n.if((0,t._)`Array.isArray(${i})`,()=>{n.assign(r.default.vErrors,(0,t._)`${r.default.vErrors} === null ? ${i} : ${r.default.vErrors}.concat(${i})`).assign(r.default.errors,(0,t._)`${r.default.vErrors}.length`),(0,o.extendErrors)(e)},()=>e.error())})(e,d))}}),e.ok(null!=(d=s.valid)?d:y)},e.validSchemaType=function(e,t,r=!1){return!t.length||t.some(t=>"array"===t?Array.isArray(e):"object"===t?e&&"object"==typeof e&&!Array.isArray(e):typeof e==t||r&&void 0===e)},e.validateKeywordUsage=function({schema:e,opts:t,self:r,errSchemaPath:i},o,n){if(Array.isArray(o.keyword)?!o.keyword.includes(n):o.keyword!==n)throw Error("ajv implementation error");let a=o.dependencies;if(null==a?void 0:a.some(t=>!Object.prototype.hasOwnProperty.call(e,t)))throw Error(`parent schema must have dependencies of ${n}: ${a.join(",")}`);if(o.validateSchema&&!o.validateSchema(e[n])){let e=`keyword "${n}" value is invalid at path "${i}": `+r.errorsText(o.validateSchema.errors);if("log"===t.validateSchema)r.logger.error(e);else throw Error(e)}}}),pe=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.extendSubschemaMode=e.extendSubschemaData=e.getSubschema=void 0;let t=lY(),r=l1();e.getSubschema=function(e,{keyword:i,schemaProp:o,schema:n,schemaPath:a,errSchemaPath:s,topSchemaRef:d}){if(void 0!==i&&void 0!==n)throw Error('both "keyword" and "schema" passed, only one allowed');if(void 0!==i){let n=e.schema[i];return void 0===o?{schema:n,schemaPath:(0,t._)`${e.schemaPath}${(0,t.getProperty)(i)}`,errSchemaPath:`${e.errSchemaPath}/${i}`}:{schema:n[o],schemaPath:(0,t._)`${e.schemaPath}${(0,t.getProperty)(i)}${(0,t.getProperty)(o)}`,errSchemaPath:`${e.errSchemaPath}/${i}/${(0,r.escapeFragment)(o)}`}}if(void 0!==n){if(void 0===a||void 0===s||void 0===d)throw Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:n,schemaPath:a,topSchemaRef:d,errSchemaPath:s}}throw Error('either "keyword" or "schema" must be passed')},e.extendSubschemaData=function(e,i,{dataProp:o,dataPropType:n,data:a,dataTypes:s,propertyName:d}){if(void 0!==a&&void 0!==o)throw Error('both "data" and "dataProp" passed, only one allowed');let{gen:c}=i;if(void 0!==o){let{errorPath:a,dataPathArr:s,opts:d}=i;l(c.let("data",(0,t._)`${i.data}${(0,t.getProperty)(o)}`,!0)),e.errorPath=(0,t.str)`${a}${(0,r.getErrorPath)(o,n,d.jsPropertySyntax)}`,e.parentDataProperty=(0,t._)`${o}`,e.dataPathArr=[...s,e.parentDataProperty]}function l(t){e.data=t,e.dataLevel=i.dataLevel+1,e.dataTypes=[],i.definedProperties=new Set,e.parentData=i.data,e.dataNames=[...i.dataNames,t]}void 0!==a&&(l(a instanceof t.Name?a:c.let("data",a,!0)),void 0!==d&&(e.propertyName=d)),s&&(e.dataTypes=s)},e.extendSubschemaMode=function(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:i,createErrors:o,allErrors:n}){void 0!==i&&(e.compositeRule=i),void 0!==o&&(e.createErrors=o),void 0!==n&&(e.allErrors=n),e.jtdDiscriminator=t,e.jtdMetadata=r}}),pt=eb((e,t)=>{t.exports=function e(t,r){if(t===r)return!0;if(t&&r&&"object"==typeof t&&"object"==typeof r){if(t.constructor!==r.constructor)return!1;if(Array.isArray(t)){if((i=t.length)!=r.length)return!1;for(o=i;0!=o--;)if(!e(t[o],r[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if((i=(n=Object.keys(t)).length)!==Object.keys(r).length)return!1;for(o=i;0!=o--;)if(!Object.prototype.hasOwnProperty.call(r,n[o]))return!1;for(o=i;0!=o--;){var i,o,n,a=n[o];if(!e(t[a],r[a]))return!1}return!0}return t!=t&&r!=r}}),pr=eb((e,t)=>{var r=t.exports=function(e,t,i){"function"==typeof t&&(i=t,t={});var o="function"==typeof(i=t.cb||i)?i:i.pre||function(){};!function e(t,i,o,n,a,s,d,c,l,p){if(n&&"object"==typeof n&&!Array.isArray(n)){for(var u in i(n,a,s,d,c,l,p),n){var m=n[u];if(Array.isArray(m)){if(u in r.arrayKeywords)for(var f=0;f{Object.defineProperty(e,"__esModule",{value:!0}),e.getSchemaRefs=e.resolveUrl=e.normalizeId=e._getFullPath=e.getFullPath=e.inlineRef=void 0;let t=l1(),r=pt(),i=pr(),o=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);e.inlineRef=function(e,r=!0){return"boolean"==typeof e||(!0===r?!function e(t){for(let r in t){if(n.has(r))return!0;let i=t[r];if(Array.isArray(i)&&i.some(e)||"object"==typeof i&&e(i))return!0}return!1}(e):!!r&&function e(r){let i=0;for(let n in r)if("$ref"===n||(i++,!o.has(n)&&("object"==typeof r[n]&&(0,t.eachItem)(r[n],t=>i+=e(t)),1/0===i)))return 1/0;return i}(e)<=r)};let n=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function a(e,t="",r){return!1!==r&&(t=c(t)),s(e,e.parse(t))}function s(e,t){return e.serialize(t).split("#")[0]+"#"}e.getFullPath=a,e._getFullPath=s;let d=/#\/?$/;function c(e){return e?e.replace(d,""):""}e.normalizeId=c,e.resolveUrl=function(e,t,r){return r=c(r),e.resolve(t,r)};let l=/^[a-z_][-a-z0-9._]*$/i;e.getSchemaRefs=function(e,t){if("boolean"==typeof e)return{};let{schemaId:o,uriResolver:n}=this.opts,s=c(e[o]||t),d={"":s},p=a(n,s,!1),u={},m=new Set;return i(e,{allKeys:!0},(e,t,r,i)=>{if(void 0===i)return;let n=p+t,a=d[i];function s(t){let r=this.opts.uriResolver.resolve;if(t=c(a?r(a,t):t),m.has(t))throw h(t);m.add(t);let i=this.refs[t];return"string"==typeof i&&(i=this.refs[i]),"object"==typeof i?f(e,i.schema,t):t!==c(n)&&("#"===t[0]?(f(e,u[t],t),u[t]=e):this.refs[t]=n),t}function y(e){if("string"==typeof e){if(!l.test(e))throw Error(`invalid anchor "${e}"`);s.call(this,`#${e}`)}}"string"==typeof e[o]&&(a=s.call(this,e[o])),y.call(this,e.$anchor),y.call(this,e.$dynamicAnchor),d[t]=a}),u;function f(e,t,i){if(void 0!==t&&!r(e,t))throw h(i)}function h(e){return Error(`reference "${e}" resolves to more than one schema`)}}}),po=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getData=e.KeywordCxt=e.validateFunctionCode=void 0;let t=l4(),r=l9(),i=l3(),o=l9(),n=l5(),a=l7(),s=pe(),d=lY(),c=l0(),l=pi(),p=l1(),u=l2();function m({gen:e,validateName:t,schema:r,schemaEnv:i,opts:o},n){var a;o.code.es5?e.func(t,(0,d._)`${c.default.data}, ${c.default.valCxt}`,i.$async,()=>{var t,i;e.code((0,d._)`"use strict"; ${f(r,o)}`),t=e,i=o,t.if(c.default.valCxt,()=>{t.var(c.default.instancePath,(0,d._)`${c.default.valCxt}.${c.default.instancePath}`),t.var(c.default.parentData,(0,d._)`${c.default.valCxt}.${c.default.parentData}`),t.var(c.default.parentDataProperty,(0,d._)`${c.default.valCxt}.${c.default.parentDataProperty}`),t.var(c.default.rootData,(0,d._)`${c.default.valCxt}.${c.default.rootData}`),i.dynamicRef&&t.var(c.default.dynamicAnchors,(0,d._)`${c.default.valCxt}.${c.default.dynamicAnchors}`)},()=>{t.var(c.default.instancePath,(0,d._)`""`),t.var(c.default.parentData,(0,d._)`undefined`),t.var(c.default.parentDataProperty,(0,d._)`undefined`),t.var(c.default.rootData,c.default.data),i.dynamicRef&&t.var(c.default.dynamicAnchors,(0,d._)`{}`)}),e.code(n)}):e.func(t,(0,d._)`${c.default.data}, ${(a=o,(0,d._)`{${c.default.instancePath}="", ${c.default.parentData}, ${c.default.parentDataProperty}, ${c.default.rootData}=${c.default.data}${a.dynamicRef?(0,d._)`, ${c.default.dynamicAnchors}={}`:d.nil}}={}`)}`,i.$async,()=>e.code(f(r,o)).code(n))}function f(e,t){let r="object"==typeof e&&e[t.schemaId];return r&&(t.code.source||t.code.process)?(0,d._)`/*# sourceURL=${r} */`:d.nil}function h({schema:e,self:t}){if("boolean"==typeof e)return!e;for(let r in e)if(t.RULES.all[r])return!0;return!1}function y(e){return"boolean"!=typeof e.schema}function g(e){(0,p.checkUnknownRules)(e),function(e){let{schema:t,errSchemaPath:r,opts:i,self:o}=e;t.$ref&&i.ignoreKeywordsWithRef&&(0,p.schemaHasRulesButRef)(t,o.RULES)&&o.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}(e)}function _(e,t){if(e.opts.jtd)return b(e,[],!1,t);let i=(0,r.getSchemaTypes)(e.schema);b(e,i,!(0,r.coerceAndCheckDataType)(e,i),t)}function v({gen:e,schemaEnv:t,schema:r,errSchemaPath:i,opts:o}){let n=r.$comment;if(!0===o.$comment)e.code((0,d._)`${c.default.self}.logger.log(${n})`);else if("function"==typeof o.$comment){let r=(0,d.str)`${i}/$comment`,o=e.scopeValue("root",{ref:t.root});e.code((0,d._)`${c.default.self}.opts.$comment(${n}, ${r}, ${o}.schema)`)}}function b(e,t,r,n){var a,s,l,u;let{gen:m,schema:f,data:h,allErrors:y,opts:g,self:_}=e,{RULES:v}=_;if(f.$ref&&(g.ignoreKeywordsWithRef||!(0,p.schemaHasRulesButRef)(f,v)))return void m.block(()=>R(e,"$ref",v.all.$ref.definition));function b(a){(0,i.shouldUseGroup)(f,a)&&(a.type?(m.if((0,o.checkDataType)(a.type,h,g.strictNumbers)),$(e,a),1===t.length&&t[0]===a.type&&r&&(m.else(),(0,o.reportTypeError)(e)),m.endIf()):$(e,a),y||m.if((0,d._)`${c.default.errors} === ${n||0}`))}g.jtd||(a=e,s=t,!a.schemaEnv.meta&&a.opts.strictTypes&&(function(e,t){if(t.length){if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach(t=>{S(e.dataTypes,t)||k(e,`type "${t}" not allowed by context "${e.dataTypes.join(",")}"`)}),function(e,t){let r=[];for(let i of e.dataTypes)S(t,i)?r.push(i):t.includes("integer")&&"number"===i&&r.push("integer");e.dataTypes=r}(e,t)}}(a,s),a.opts.allowUnionTypes||(l=a,(u=s).length>1&&!(2===u.length&&u.includes("null"))&&k(l,"use allowUnionTypes to allow union type keyword")),function(e,t){let r=e.self.RULES.all;for(let o in r){let n=r[o];if("object"==typeof n&&(0,i.shouldUseRule)(e.schema,n)){let{type:r}=n.definition;r.length&&!r.some(e=>{var r,i;return r=t,i=e,r.includes(i)||"number"===i&&r.includes("integer")})&&k(e,`missing type "${r.join(",")}" for keyword "${o}"`)}}}(a,a.dataTypes))),m.block(()=>{for(let e of v.rules)b(e);b(v.post)})}function $(e,t){let{gen:r,schema:o,opts:{useDefaults:a}}=e;a&&(0,n.assignDefaults)(e,t.type),r.block(()=>{for(let r of t.rules)(0,i.shouldUseRule)(o,r)&&R(e,r.keyword,r.definition,t.type)})}function S(e,t){return e.includes(t)||"integer"===t&&e.includes("number")}function k(e,t){let r=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${r}" (strictTypes)`,(0,p.checkStrictMode)(e,t,e.opts.strictTypes)}e.validateFunctionCode=function(e){y(e)&&(g(e),h(e))?function(e){let{schema:t,opts:r,gen:i}=e;m(e,()=>{r.$comment&&t.$comment&&v(e),function(e){let{schema:t,opts:r}=e;void 0!==t.default&&r.useDefaults&&r.strictSchema&&(0,p.checkStrictMode)(e,"default is ignored in the schema root")}(e),i.let(c.default.vErrors,null),i.let(c.default.errors,0),r.unevaluated&&function(e){let{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",(0,d._)`${r}.evaluated`),t.if((0,d._)`${e.evaluated}.dynamicProps`,()=>t.assign((0,d._)`${e.evaluated}.props`,(0,d._)`undefined`)),t.if((0,d._)`${e.evaluated}.dynamicItems`,()=>t.assign((0,d._)`${e.evaluated}.items`,(0,d._)`undefined`))}(e),_(e),function(e){let{gen:t,schemaEnv:r,validateName:i,ValidationError:o,opts:n}=e;r.$async?t.if((0,d._)`${c.default.errors} === 0`,()=>t.return(c.default.data),()=>t.throw((0,d._)`new ${o}(${c.default.vErrors})`)):(t.assign((0,d._)`${i}.errors`,c.default.vErrors),n.unevaluated&&function({gen:e,evaluated:t,props:r,items:i}){r instanceof d.Name&&e.assign((0,d._)`${t}.props`,r),i instanceof d.Name&&e.assign((0,d._)`${t}.items`,i)}(e),t.return((0,d._)`${c.default.errors} === 0`))}(e)})}(e):m(e,()=>(0,t.topBoolOrEmptySchema)(e))};var w=class{constructor(e,t,r){if((0,a.validateKeywordUsage)(e,t,r),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=r,this.data=e.data,this.schema=e.schema[r],this.$data=t.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,p.schemaRefOrVal)(e,this.schema,r,this.$data),this.schemaType=t.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=t,this.$data)this.schemaCode=e.gen.const("vSchema",q(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,a.validSchemaType)(this.schema,t.schemaType,t.allowUndefined))throw Error(`${r} value must be ${JSON.stringify(t.schemaType)}`);("code"in t?t.trackErrors:!1!==t.errors)&&(this.errsCount=e.gen.const("_errs",c.default.errors))}result(e,t,r){this.failResult((0,d.not)(e),t,r)}failResult(e,t,r){this.gen.if(e),r?r():this.error(),t?(this.gen.else(),t(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,t){this.failResult((0,d.not)(e),void 0,t)}fail(e){if(void 0===e){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);let{schemaCode:t}=this;this.fail((0,d._)`${t} !== undefined && (${(0,d.or)(this.invalid$data(),e)})`)}error(e,t,r){if(t){this.setParams(t),this._error(e,r),this.setParams({});return}this._error(e,r)}_error(e,t){(e?u.reportExtraError:u.reportError)(this,this.def.error,t)}$dataError(){(0,u.reportError)(this,this.def.$dataError||u.keyword$DataError)}reset(){if(void 0===this.errsCount)throw Error('add "trackErrors" to keyword definition');(0,u.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,t){t?Object.assign(this.params,e):this.params=e}block$data(e,t,r=d.nil){this.gen.block(()=>{this.check$data(e,r),t()})}check$data(e=d.nil,t=d.nil){if(!this.$data)return;let{gen:r,schemaCode:i,schemaType:o,def:n}=this;r.if((0,d.or)((0,d._)`${i} === undefined`,t)),e!==d.nil&&r.assign(e,!0),(o.length||n.validateSchema)&&(r.elseIf(this.invalid$data()),this.$dataError(),e!==d.nil&&r.assign(e,!1)),r.else()}invalid$data(){let{gen:e,schemaCode:t,schemaType:r,def:i,it:n}=this;return(0,d.or)(function(){if(r.length){if(!(t instanceof d.Name))throw Error("ajv implementation error");let e=Array.isArray(r)?r:[r];return(0,d._)`${(0,o.checkDataTypes)(e,t,n.opts.strictNumbers,o.DataType.Wrong)}`}return d.nil}(),function(){if(i.validateSchema){let r=e.scopeValue("validate$data",{ref:i.validateSchema});return(0,d._)`!${r}(${t})`}return d.nil}())}subschema(e,r){let i=(0,s.getSubschema)(this.it,e);(0,s.extendSubschemaData)(i,this.it,e),(0,s.extendSubschemaMode)(i,e);let o={...this.it,...i,items:void 0,props:void 0};return!function(e,r){if(y(e)&&(g(e),h(e)))return function(e,t){var r;let i,{schema:o,gen:n,opts:a}=e;a.$comment&&o.$comment&&v(e),(i=(r=e).schema[r.opts.schemaId])&&(r.baseId=(0,l.resolveUrl)(r.opts.uriResolver,r.baseId,i)),function(e){if(e.schema.$async&&!e.schemaEnv.$async)throw Error("async schema in sync schema")}(e);let s=n.const("_errs",c.default.errors);_(e,s),n.var(t,(0,d._)`${s} === ${c.default.errors}`)}(e,r);(0,t.boolOrEmptySchema)(e,r)}(o,r),o}mergeEvaluated(e,t){let{it:r,gen:i}=this;r.opts.unevaluated&&(!0!==r.props&&void 0!==e.props&&(r.props=p.mergeEvaluated.props(i,e.props,r.props,t)),!0!==r.items&&void 0!==e.items&&(r.items=p.mergeEvaluated.items(i,e.items,r.items,t)))}mergeValidEvaluated(e,t){let{it:r,gen:i}=this;if(r.opts.unevaluated&&(!0!==r.props||!0!==r.items))return i.if(t,()=>this.mergeEvaluated(e,d.Name)),!0}};function R(e,t,r,i){let o=new w(e,r,t);"code"in r?r.code(o,i):o.$data&&r.validate?(0,a.funcKeywordCode)(o,r):"macro"in r?(0,a.macroKeywordCode)(o,r):(r.compile||r.validate)&&(0,a.funcKeywordCode)(o,r)}e.KeywordCxt=w;let P=/^\/(?:[^~]|~0|~1)*$/,V=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function q(e,{dataLevel:t,dataNames:r,dataPathArr:i}){let o,n;if(""===e)return c.default.rootData;if("/"===e[0]){if(!P.test(e))throw Error(`Invalid JSON-pointer: ${e}`);o=e,n=c.default.rootData}else{let a=V.exec(e);if(!a)throw Error(`Invalid JSON-pointer: ${e}`);let d=+a[1];if("#"===(o=a[2])){if(d>=t)throw Error(s("property/index",d));return i[t-d]}if(d>t)throw Error(s("data",d));if(n=r[t-d],!o)return n}let a=n;for(let e of o.split("/"))e&&(n=(0,d._)`${n}${(0,d.getProperty)((0,p.unescapeJsonPointer)(e))}`,a=(0,d._)`${a} && ${n}`);return a;function s(e,r){return`Cannot access ${e} ${r} levels up, current level is ${t}`}}e.getData=q}),pn=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=class extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}}}),pa=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=pi();e.default=class extends Error{constructor(e,r,i,o){super(o||`can't resolve reference ${i} from id ${r}`),this.missingRef=(0,t.resolveUrl)(e,r,i),this.missingSchema=(0,t.normalizeId)((0,t.getFullPath)(e,this.missingRef))}}}),ps=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.resolveSchema=e.getCompilingSchema=e.resolveRef=e.compileSchema=e.SchemaEnv=void 0;let t=lY(),r=pn(),i=l0(),o=pi(),n=l1(),a=po();var s=class{constructor(e){var t;let r;this.refs={},this.dynamicAnchors={},"object"==typeof e.schema&&(r=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=null!=(t=e.baseId)?t:(0,o.normalizeId)(null==r?void 0:r[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=null==r?void 0:r.$async,this.refs={}}};function d(e){let n,s,d=l.call(this,e);if(d)return d;let c=(0,o.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:p,lines:u}=this.opts.code,{ownProperties:m}=this.opts,f=new t.CodeGen(this.scope,{es5:p,lines:u,ownProperties:m});e.$async&&(n=f.scopeValue("Error",{ref:r.default,code:(0,t._)`require("ajv/dist/runtime/validation_error").default`}));let h=f.scopeName("validate");e.validateName=h;let y={gen:f,allErrors:this.opts.allErrors,data:i.default.data,parentData:i.default.parentData,parentDataProperty:i.default.parentDataProperty,dataNames:[i.default.data],dataPathArr:[t.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:f.scopeValue("schema",!0===this.opts.code.source?{ref:e.schema,code:(0,t.stringify)(e.schema)}:{ref:e.schema}),validateName:h,ValidationError:n,schema:e.schema,schemaEnv:e,rootId:c,baseId:e.baseId||c,schemaPath:t.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,t._)`""`,opts:this.opts,self:this};try{this._compilations.add(e),(0,a.validateFunctionCode)(y),f.optimize(this.opts.code.optimize);let r=f.toString();s=`${f.scopeRefs(i.default.scope)}return ${r}`,this.opts.code.process&&(s=this.opts.code.process(s,e));let o=Function(`${i.default.self}`,`${i.default.scope}`,s)(this,this.scope.get());if(this.scope.value(h,{ref:o}),o.errors=null,o.schema=e.schema,o.schemaEnv=e,e.$async&&(o.$async=!0),!0===this.opts.code.source&&(o.source={validateName:h,validateCode:r,scopeValues:f._values}),this.opts.unevaluated){let{props:e,items:r}=y;o.evaluated={props:e instanceof t.Name?void 0:e,items:r instanceof t.Name?void 0:r,dynamicProps:e instanceof t.Name,dynamicItems:r instanceof t.Name},o.source&&(o.source.evaluated=(0,t.stringify)(o.evaluated))}return e.validate=o,e}catch(t){throw delete e.validate,delete e.validateName,s&&this.logger.error("Error compiling schema, function code:",s),t}finally{this._compilations.delete(e)}}function c(e){return(0,o.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:d.call(this,e)}function l(e){for(let i of this._compilations){var t,r;if(t=i,r=e,t.schema===r.schema&&t.root===r.root&&t.baseId===r.baseId)return i}}function p(e,t){let r;for(;"string"==typeof(r=this.refs[t]);)t=r;return r||this.schemas[t]||u.call(this,e,t)}function u(e,t){let r=this.opts.uriResolver.parse(t),i=(0,o._getFullPath)(this.opts.uriResolver,r),n=(0,o.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&i===n)return f.call(this,r,e);let a=(0,o.normalizeId)(i),c=this.refs[a]||this.schemas[a];if("string"==typeof c){let t=u.call(this,e,c);if("object"!=typeof(null==t?void 0:t.schema))return;return f.call(this,r,t)}if("object"==typeof(null==c?void 0:c.schema)){if(c.validate||d.call(this,c),a===(0,o.normalizeId)(t)){let{schema:t}=c,{schemaId:r}=this.opts,i=t[r];return i&&(n=(0,o.resolveUrl)(this.opts.uriResolver,n,i)),new s({schema:t,schemaId:r,root:e,baseId:n})}return f.call(this,r,c)}}e.SchemaEnv=s,e.compileSchema=d,e.resolveRef=function(e,t,r){var i;r=(0,o.resolveUrl)(this.opts.uriResolver,t,r);let n=e.refs[r];if(n)return n;let a=p.call(this,e,r);if(void 0===a){let o=null==(i=e.localRefs)?void 0:i[r],{schemaId:n}=this.opts;o&&(a=new s({schema:o,schemaId:n,root:e,baseId:t}))}if(void 0!==a)return e.refs[r]=c.call(this,a)},e.getCompilingSchema=l,e.resolveSchema=u;let m=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function f(e,{baseId:t,schema:r,root:i}){var a;let d;if((null==(a=e.fragment)?void 0:a[0])!=="/")return;for(let i of e.fragment.slice(1).split("/")){if("boolean"==typeof r)return;let e=r[(0,n.unescapeFragment)(i)];if(void 0===e)return;let a="object"==typeof(r=e)&&r[this.opts.schemaId];!m.has(i)&&a&&(t=(0,o.resolveUrl)(this.opts.uriResolver,t,a))}if("boolean"!=typeof r&&r.$ref&&!(0,n.schemaHasRulesButRef)(r,this.RULES)){let e=(0,o.resolveUrl)(this.opts.uriResolver,t,r.$ref);d=u.call(this,i,e)}let{schemaId:c}=this.opts;if((d=d||new s({schema:r,schemaId:c,root:i,baseId:t})).schema!==d.root.schema)return d}}),pd=eb((e,t)=>{t.exports={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}}),pc=eb((e,t)=>{let r=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),i=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u),o=RegExp.prototype.test.bind(/^\d*$/u),n=RegExp.prototype.test.bind(/^[\da-f]{2}$/iu),a=RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu),s=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:@/]$/u),d=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:@/?]$/u),c=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:]$/u),l=Array(256);{let e="0123456789ABCDEF";for(let t=0;t<256;t++)l[t]="%"+e[t>>4]+e[15&t]}function p(e){return e<2048?l[192|e>>6]+l[128|63&e]:e<65536?l[224|e>>12]+l[128|e>>6&63]+l[128|63&e]:l[240|e>>18]+l[128|e>>12&63]+l[128|e>>6&63]+l[128|63&e]}let u=RegExp.prototype.test.bind(/^[\dA-Fa-f]{1,4}$/),m=RegExp.prototype.test.bind(/^[vV][\dA-Fa-f]+\.[A-Za-z\d\-._~!$&'()*+,;=:]+$/),f=RegExp.prototype.test.bind(/^[A-Za-z\d\-._~]$/),h=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function y(e){let t=-1,r=0,i=-1,o=0;for(let n=0;nr&&(r=o,t=i)):(i=-1,o=0);return r<2?e.join(":"):e.slice(0,t).join(":")+"::"+e.slice(t+r).join(":")}function g(e){let t="["===e[0]&&"]"===e[e.length-1];if(("["===e[0]||"]"===e[e.length-1])&&!t)return{host:e,isIPV6:!1,error:!0};let r=t?e.slice(1,-1):e;if(t&&m(r))return r=r.toLowerCase(),{host:`[${r}]`,escapedHost:r,isIPV6:!1,isIPVFuture:!0};if(2>function(e){let t=0;for(let r=0;r=8)return;let s=n.slice(0,r.length);for(let e=a;e<8;e++)s.push("0");for(let e=r.length;e_[e])}function S(e,t=!1){if(-1===e.indexOf("%"))return e;let r="";for(let i=0;i57343)r+=p(t);else if(t<=56319&&i+1=56320&&o<=57343?(r+=p(65536+(t-55296<<10)+(o-56320)),i++):r+=p(65533)}else r+=p(65533)}}return r}function w(e){return k(e,c)}function R(e){return e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122||42===e||43===e||45===e||46===e||47===e||64===e||95===e}t.exports={nonSimpleDomain:h,recomposeAuthority:function(e){let t=[];if(void 0!==e.userinfo&&(t.push(w(e.userinfo)),t.push("@")),void 0!==e.host){let r=e.host;if(!i(r)){let e=g(r);!0!==e.isIPV6&&!0!==e.isIPVFuture&&(e=g(r=S(r,!0))),r=!0===e.isIPV6||!0===e.isIPVFuture?`[${e.escapedHost}]`:$(r,!1)}t.push(r)}if("number"==typeof e.port||"string"==typeof e.port){let r=String(e.port);if(!o(r))throw TypeError("URI port is malformed.");t.push(":"),t.push(r)}return t.length?t.join(""):void 0},reescapeHostDelimiters:$,normalizePercentEncoding:S,normalizePathEncoding:function(e){let t="";for(let r=0;r57343)t+=p(o);else if(o<=56319&&r+1=56320&&i<=57343?(t+=p(65536+(o-55296<<10)+(i-56320)),r++):t+=p(65533)}else t+=p(65533)}}return t},serializePathEncoding:function(e,t=!1){let r="",i=t&&"/"!==e[0];for(let t=0;t57343)r+=p(i);else if(i<=56319&&t+1=56320&&o<=57343?(r+=p(65536+(i-55296<<10)+(o-56320)),t++):r+=p(65533)}else r+=p(65533)}}return r},normalizeQueryFragmentEncoding:function(e){let t="";for(let r=0;r57343)t+=p(o);else if(o<=56319&&r+1=56320&&i<=57343?(t+=p(65536+(o-55296<<10)+(i-56320)),r++):t+=p(65533)}else t+=p(65533)}}return t},encodeUserinfo:w,encodeQuery:function(e){return k(e,d)},encodeFragment:function(e){return k(e,d)},escapePreservingEscapes:function(e){let t="";for(let r=0;r=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";t+=e[i];break}for(i+=1;i=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";t+=e[i]}return t}}}),pl=eb((e,t)=>{let{isUUID:r}=pc(),i=/^([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-./:;=@]|%[\da-f]{2})+)$/iu,o=["http","https","ws","wss","urn","urn:uuid"];function n(e){return!0===e.secure||!1!==e.secure&&!!e.scheme&&3===e.scheme.length&&("w"===e.scheme[0]||"W"===e.scheme[0])&&("s"===e.scheme[1]||"S"===e.scheme[1])&&("s"===e.scheme[2]||"S"===e.scheme[2])}function a(e){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e}function s(e){let t="https"===String(e.scheme).toLowerCase();return(e.port===(t?443:80)||""===e.port)&&(e.port=void 0),e.path||(e.path="/"),e}let d={scheme:"http",domainHost:!0,parse:a,serialize:s},c={scheme:"https",domainHost:d.domainHost,parse:a,serialize:s},l={scheme:"ws",domainHost:!0,parse:function(e){return e.secure=n(e),e.resourceName=(e.path||"/")+(e.query?"?"+e.query:""),e.path=void 0,e.query=void 0,e},serialize:function(e){if((e.port===(n(e)?443:80)||""===e.port)&&(e.port=void 0),"boolean"==typeof e.secure&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){let t=e.resourceName.indexOf("?"),r=-1===t?e.resourceName:e.resourceName.slice(0,t);e.path=r&&"/"!==r?r:void 0,e.query=-1===t?void 0:e.resourceName.slice(t+1),e.resourceName=void 0}return e.fragment=void 0,e}},p={scheme:"wss",domainHost:l.domainHost,parse:l.parse,serialize:l.serialize},u={http:d,https:c,ws:l,wss:p,urn:{scheme:"urn",parse:function(e,t){if(!e.path)return e.error="URN can not be parsed",e;let r=e.path.match(i);if(r&&r[0]===e.path){let i=t.scheme||e.scheme||"urn";e.nid=r[1].toLowerCase(),e.nss=r[2];let o=m(`${i}:${t.nid||e.nid}`);e.path=void 0,o&&(e=o.parse(e,t))}else e.error=e.error||"URN can not be parsed.";return e},serialize:function(e,t){if(void 0===e.nid)throw Error("URN without nid cannot be serialized");let r=t.scheme||e.scheme||"urn",i=e.nid.toLowerCase(),o=m(`${r}:${t.nid||i}`);o&&(e=o.serialize(e,t));let n=e,a=e.nss;return n.path=`${i||t.nid}:${a}`,t.skipEscape=!0,n},skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:function(e,t){return e.uuid=e.nss,e.nss=void 0,t.tolerant||e.uuid&&r(e.uuid)||(e.error=e.error||"UUID is not valid."),e},serialize:function(e){return e.nss=(e.uuid||"").toLowerCase(),e},skipNormalize:!0}};function m(e){return e&&(u[e]||u[e.toLowerCase()])||void 0}Object.setPrototypeOf(u,null),t.exports={wsIsSecure:n,SCHEMES:u,isValidSchemeName:function(e){return -1!==o.indexOf(e)},getSchemeHandler:m}}),pp=eb((e,t)=>{let{normalizeIPv6:r,removeDotSegments:i,recomposeAuthority:o,normalizePercentEncoding:n,normalizePathEncoding:a,serializePathEncoding:s,normalizeQueryFragmentEncoding:d,encodeQuery:c,encodeFragment:l,reescapeHostDelimiters:p,isIPv4:u,nonSimpleDomain:m}=pc(),{SCHEMES:f,getSchemeHandler:h}=pl(),y=/^[A-Za-z][A-Za-z0-9+.-]*$/u,g="URI scheme is malformed.";function _(e){let t=unescape(String(e));if(!y.test(t))throw TypeError(g);return t}function v(e,t,r,o){let n={};return o||(e=q(b(e,r),r),t=q(b(t,r),r)),!(r=r||{}).tolerant&&t.scheme?(n.scheme=t.scheme,n.userinfo=t.userinfo,n.host=t.host,n.port=t.port,n.path=i(t.path||""),n.query=t.query):(void 0!==t.userinfo||void 0!==t.host||void 0!==t.port?(n.userinfo=t.userinfo,n.host=t.host,n.port=t.port,n.path=i(t.path||""),n.query=t.query):(t.path?("/"===t.path[0]?n.path=i(t.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?n.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:n.path=t.path:n.path="/"+t.path,n.path=i(n.path)),n.query=t.query):(n.path=e.path,void 0!==t.query?n.query=t.query:n.query=e.query),n.userinfo=e.userinfo,n.host=e.host,n.port=e.port),n.scheme=e.scheme),n.fragment=t.fragment,n}function b(e,t){let r={host:e.host,scheme:e.scheme,userinfo:e.userinfo,port:e.port,path:e.path,query:e.query,nid:e.nid,nss:e.nss,uuid:e.uuid,fragment:e.fragment,reference:e.reference,resourceName:e.resourceName,secure:e.secure,error:""},a=Object.assign({},t),d=[];r.scheme&&(r.scheme=_(r.scheme));let p=h(a.scheme||r.scheme);p&&p.serialize&&p.serialize(r,a);let u=void 0!==r.userinfo||void 0!==r.host||void 0!==r.port,m=!a.skipEscape&&void 0===r.scheme&&!u;void 0!==r.path&&(a.skipEscape?r.path=n(r.path):r.path=s(r.path,m)),"suffix"!==a.reference&&r.scheme&&(r.scheme=_(r.scheme),d.push(r.scheme,":"));let f=o(r);if(void 0!==f&&("suffix"!==a.reference&&d.push("//"),d.push(f),r.path&&"/"!==r.path[0]&&d.push("/")),void 0!==r.path){let e=r.path;a.absolutePath||p&&p.absolutePath||(e=i(e)),m&&(e=s(e,!0)),void 0===f&&"/"===e[0]&&"/"===e[1]&&(e="/%2F"+e.slice(2)),d.push(e)}return void 0!==r.query&&d.push("?",c(r.query)),void 0!==r.fragment&&d.push("#",l(r.fragment)),d.join("")}let $=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u,S=/^(?:[^#/:?]+:)?\/\/([^/?#]*)/,k=/^(?:[^#/:?]+:)?([/\\\t\n\r]*)/;function w(e){if(void 0===e)return!1;let t=e.indexOf("%");for(;-1!==t;){if(t+2>=e.length||!/^[\da-f]{2}$/iu.test(e.slice(t+1,t+3)))return!0;t=e.indexOf("%",t+3)}return!1}function R(e){return"["===e[0]&&"]"===e[e.length-1]}function P(e,t,r,i){if(!t.unicodeSupport&&(!r||!r.unicodeSupport)&&e.host&&!R(e.host)&&(t.domainHost||r&&r.domainHost)&&!1===i&&m(e.host))try{e.host=new URL("http://"+e.host).hostname}catch(t){return e.error=e.error||"Host's domain name can not be converted to ASCII: "+t,!0}return!1}function V(e,t){let i=Object.assign({},t),o={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},s=!1,c=!1,l=!1,m=!1,_=!1,v=!1,b=!1;"suffix"===i.reference&&(e=i.scheme?i.scheme+":"+e:"//"+e);let V=e.match(S);null!==V&&-1!==V[1].indexOf("\\")&&(o.error="URI authority must not contain a literal backslash.",s=!0);let q=e.match(k);if(null!==q){let e=q[1],t=e.replace(/[\t\n\r]/g,"");t.length>=2&&("//"!==t.slice(0,2)?(o.error=o.error||"URI authority must not contain a literal backslash.",s=!0):e.length!==t.length&&(o.error=o.error||"URI authority introducer must not contain whitespace.",s=!0))}let I=e.match($);if(I){let t;if(o.scheme=I[1],o.userinfo=I[3],o.host=I[4],o.port=parseInt(I[5],10),o.path=I[6]||"",o.query=I[7],o.fragment=I[8],void 0!==o.scheme){let e=unescape(o.scheme);y.test(e)?o.scheme=e.toLowerCase():(o.error=o.error||g,v=!0)}t=I[4],(c=w(I[3])||void 0!==t&&!R(t)&&w(t)||w(I[6])||w(I[7])||w(I[8]))&&(o.error=o.error||"URI contains malformed percent-encoding."),isNaN(o.port)&&(o.port=I[5]);let $=void 0!==I[2]&&o.path&&"/"!==o.path[0]?'URI path must start with "/" when authority is present.':"number"==typeof o.port&&(o.port<0||o.port>65535)?"URI port is malformed.":void 0;if(void 0!==$&&(o.error=o.error||$,s=!0),o.host)if(!1===u(o.host)){let e=R(o.host),t=-1!==o.host.indexOf("[")||-1!==o.host.indexOf("]"),i=r(o.host);b=i.isIPV6||!0===i.isIPVFuture,_=t&&(!e||!0===i.error),o.host=b?i.host:i.host.toLowerCase(),_&&(o.error=o.error||"URI host is malformed.",s=!0)}else b=!0;void 0!==o.scheme||void 0!==o.userinfo||void 0!==o.host||void 0!==o.port||void 0!==o.query||o.path?void 0===o.scheme?o.reference="relative":void 0===o.fragment?o.reference="absolute":o.reference="uri":o.reference="same-document",i.reference&&"suffix"!==i.reference&&i.reference!==o.reference&&(o.error=o.error||"URI is not a "+i.reference+" reference.");let S=h(i.scheme||o.scheme);if(_||(m=P(o,i,S,b)),-1!==e.indexOf("%")&&void 0!==o.host&&!_){let e=b?o.host:n(o.host,!0);b||(e=n(e.toLowerCase())),o.host=p(e,b)}(!S||S&&!S.skipNormalize)&&(o.path&&(o.path=a(o.path)),o.query&&(o.query=d(o.query)),o.fragment&&(o.fragment=d(o.fragment))),S&&S.parse&&(S.parse(o,i),S===f.urn&&void 0===o.nid&&(l=!0))}else o.error=o.error||"URI can not be parsed.";return{parsed:o,malformedAuthorityOrPort:s,malformedPercentEncoding:c,malformedSchemeSpecific:l,malformedHost:m,malformedScheme:v}}function q(e,t){return V(e,t).parsed}function I(e,t){let{parsed:r,malformedAuthorityOrPort:i,malformedPercentEncoding:o,malformedSchemeSpecific:n,malformedHost:a,malformedScheme:s}=V(e,t);return{normalized:i||o||n||a||s?e:b(r,t),malformedAuthorityOrPort:i,malformedPercentEncoding:o,malformedSchemeSpecific:n,malformedHost:a,malformedScheme:s}}function x(e,t){let r;if("string"!=typeof e&&"object"!=typeof e)return;try{r="string"==typeof e?e:b(e,t)}catch{return}let{normalized:i,malformedAuthorityOrPort:o,malformedPercentEncoding:n,malformedSchemeSpecific:a,malformedHost:s,malformedScheme:d}=I(r,t);return o||n||a||s||d?void 0:i}let j={SCHEMES:f,normalize:function(e,t){return"string"==typeof e?e=I(e,t).normalized:"object"==typeof e&&(e=q(b(e,t),t)),e},resolve:function(e,t,i){let o=i?Object.assign({scheme:"null"},i):{scheme:"null"},{parsed:n,malformedAuthorityOrPort:a,malformedPercentEncoding:s,malformedSchemeSpecific:d,malformedHost:c,malformedScheme:l}=V(e,o),{parsed:p,malformedAuthorityOrPort:m,malformedPercentEncoding:f,malformedSchemeSpecific:y,malformedHost:g,malformedScheme:_}=V(t,o);if(a||m||s||f||d||y||c||g||l||_)throw Error(n.error||p.error||"URI is malformed.");let $=v(n,p,o,!0),S=h(i&&i.scheme||$.scheme),k=$.host;P($,i||{},S,void 0!==k&&""!==k&&(u(k)||r(k).isIPV6));let w=k&&-1!==k.indexOf("%")&&!/\P{ASCII}/u.test(k);if($.error&&!w)throw Error($.error);return o.skipEscape=!0,b($,o)},resolveComponent:v,equal:function(e,t,r){let i=x(e,r),o=x(t,r);return void 0!==i&&void 0!==o&&i===o},serialize:b,parse:q};t.exports=j,t.exports.default=j,t.exports.fastUri=j}),pu=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=pp();t.code='require("ajv/dist/runtime/uri").default',e.default=t}),pm=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var t=po();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var r=lY();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return r.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return r.CodeGen}});let i=pn(),o=pa(),n=l6(),a=ps(),s=lY(),d=pi(),c=l9(),l=l1(),p=pd(),u=pu(),m=(e,t)=>new RegExp(e,t);m.code="new RegExp";let f=["removeAdditional","useDefaults","coerceTypes"],h=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),y={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},g={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'};var _=class{constructor(e={}){var t,r,i,o,a,d,c,l,p,f,_,b,P,V,q,I,x,j,C,T,O,E,A,M,W,N;let z,D,F,L,U;this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...(z=(t=e).strict,F=!0===(D=null==(r=t.code)?void 0:r.optimize)||void 0===D?1:D||0,L=null!=(o=null==(i=t.code)?void 0:i.regExp)?o:m,U=null!=(a=t.uriResolver)?a:u.default,{strictSchema:null==(c=null!=(d=t.strictSchema)?d:z)||c,strictNumbers:null==(p=null!=(l=t.strictNumbers)?l:z)||p,strictTypes:null!=(_=null!=(f=t.strictTypes)?f:z)?_:"log",strictTuples:null!=(P=null!=(b=t.strictTuples)?b:z)?P:"log",strictRequired:null!=(q=null!=(V=t.strictRequired)?V:z)&&q,code:t.code?{...t.code,optimize:F,regExp:L}:{optimize:F,regExp:L},loopRequired:null!=(I=t.loopRequired)?I:200,loopEnum:null!=(x=t.loopEnum)?x:200,meta:null==(j=t.meta)||j,messages:null==(C=t.messages)||C,inlineRefs:null==(T=t.inlineRefs)||T,schemaId:null!=(O=t.schemaId)?O:"$id",addUsedSchema:null==(E=t.addUsedSchema)||E,validateSchema:null==(A=t.validateSchema)||A,validateFormats:null==(M=t.validateFormats)||M,unicodeRegExp:null==(W=t.unicodeRegExp)||W,int32range:null==(N=t.int32range)||N,uriResolver:U})};let{es5:H,lines:G}=this.opts.code;this.scope=new s.ValueScope({scope:{},prefixes:h,es5:H,lines:G}),this.logger=function(e){if(!1===e)return R;if(void 0===e)return console;if(e.log&&e.warn&&e.error)return e;throw Error("logger must implement log, warn and error methods")}(e.logger);let B=e.validateFormats;e.validateFormats=!1,this.RULES=(0,n.getRules)(),v.call(this,y,e,"NOT SUPPORTED"),v.call(this,g,e,"DEPRECATED","warn"),this._metaOpts=w.call(this),e.formats&&S.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&k.call(this,e.keywords),"object"==typeof e.meta&&this.addMetaSchema(e.meta),$.call(this),e.validateFormats=B}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:e,meta:t,schemaId:r}=this.opts,i=p;"id"===r&&((i={...p}).id=i.$id,delete i.$id),t&&e&&this.addMetaSchema(i,i[r],!1)}defaultMeta(){let{meta:e,schemaId:t}=this.opts;return this.opts.defaultMeta="object"==typeof e?e[t]||e:void 0}validate(e,t){let r;if("string"==typeof e){if(!(r=this.getSchema(e)))throw Error(`no schema with key or ref "${e}"`)}else r=this.compile(e);let i=r(t);return"$async"in r||(this.errors=r.errors),i}compile(e,t){let r=this._addSchema(e,t);return r.validate||this._compileSchemaEnv(r)}compileAsync(e,t){if("function"!=typeof this.opts.loadSchema)throw Error("options.loadSchema should be a function");let{loadSchema:r}=this.opts;return i.call(this,e,t);async function i(e,t){await n.call(this,e.$schema);let r=this._addSchema(e,t);return r.validate||a.call(this,r)}async function n(e){e&&!this.getSchema(e)&&await i.call(this,{$ref:e},!0)}async function a(e){try{return this._compileSchemaEnv(e)}catch(t){if(!(t instanceof o.default))throw t;return s.call(this,t),await d.call(this,t.missingSchema),a.call(this,e)}}function s({missingSchema:e,missingRef:t}){if(this.refs[e])throw Error(`AnySchema ${e} is loaded but ${t} cannot be resolved`)}async function d(e){let r=await c.call(this,e);this.refs[e]||await n.call(this,r.$schema),this.refs[e]||this.addSchema(r,e,t)}async function c(e){let t=this._loading[e];if(t)return t;try{return await (this._loading[e]=r(e))}finally{delete this._loading[e]}}}addSchema(e,t,r,i=this.opts.validateSchema){let o;if(Array.isArray(e)){for(let t of e)this.addSchema(t,void 0,r,i);return this}if("object"==typeof e){let{schemaId:t}=this.opts;if(void 0!==(o=e[t])&&"string"!=typeof o)throw Error(`schema ${t} must be string`)}return t=(0,d.normalizeId)(t||o),this._checkUnique(t),this.schemas[t]=this._addSchema(e,r,t,i,!0),this}addMetaSchema(e,t,r=this.opts.validateSchema){return this.addSchema(e,t,!0,r),this}validateSchema(e,t){let r;if("boolean"==typeof e)return!0;if(void 0!==(r=e.$schema)&&"string"!=typeof r)throw Error("$schema must be a string");if(!(r=r||this.opts.defaultMeta||this.defaultMeta()))return this.logger.warn("meta-schema not available"),this.errors=null,!0;let i=this.validate(r,e);if(!i&&t){let e="schema is invalid: "+this.errorsText();if("log"===this.opts.validateSchema)this.logger.error(e);else throw Error(e)}return i}getSchema(e){let t;for(;"string"==typeof(t=b.call(this,e));)e=t;if(void 0===t){let{schemaId:r}=this.opts,i=new a.SchemaEnv({schema:{},schemaId:r});if(!(t=a.resolveSchema.call(this,i,e)))return;this.refs[e]=t}return t.validate||this._compileSchemaEnv(t)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let t=b.call(this,e);return"object"==typeof t&&this._cache.delete(t.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{this._cache.delete(e);let t=e[this.opts.schemaId];return t&&(t=(0,d.normalizeId)(t),delete this.schemas[t],delete this.refs[t]),this}default:throw Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(let t of e)this.addKeyword(t);return this}addKeyword(e,t){let r;if("string"==typeof e)r=e,"object"==typeof t&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),t.keyword=r);else if("object"==typeof e&&void 0===t){if(Array.isArray(r=(t=e).keyword)&&!r.length)throw Error("addKeywords: keyword must be string or non-empty array")}else throw Error("invalid addKeywords parameters");if(V.call(this,r,t),!t)return(0,l.eachItem)(r,e=>q.call(this,e)),this;x.call(this,t);let i={...t,type:(0,c.getJSONTypes)(t.type),schemaType:(0,c.getJSONTypes)(t.schemaType)};return(0,l.eachItem)(r,0===i.type.length?e=>q.call(this,e,i):e=>i.type.forEach(t=>q.call(this,e,i,t))),this}getKeyword(e){let t=this.RULES.all[e];return"object"==typeof t?t.definition:!!t}removeKeyword(e){let{RULES:t}=this;for(let r of(delete t.keywords[e],delete t.all[e],t.rules)){let t=r.rules.findIndex(t=>t.keyword===e);t>=0&&r.rules.splice(t,1)}return this}addFormat(e,t){return"string"==typeof t&&(t=new RegExp(t)),this.formats[e]=t,this}errorsText(e=this.errors,{separator:t=", ",dataVar:r="data"}={}){return e&&0!==e.length?e.map(e=>`${r}${e.instancePath} ${e.message}`).reduce((e,r)=>e+t+r):"No errors"}$dataMetaSchema(e,t){let r=this.RULES.all;for(let i of(e=JSON.parse(JSON.stringify(e)),t)){let t=i.split("/").slice(1),o=e;for(let e of t)o=o[e];for(let e in r){let t=r[e];if("object"!=typeof t)continue;let{$data:i}=t.definition,n=o[e];i&&n&&(o[e]=C(n))}}return e}_removeAllSchemas(e,t){for(let r in e){let i=e[r];(!t||t.test(r))&&("string"==typeof i?delete e[r]:i&&!i.meta&&(this._cache.delete(i.schema),delete e[r]))}}_addSchema(e,t,r,i=this.opts.validateSchema,o=this.opts.addUsedSchema){let n,{schemaId:s}=this.opts;if("object"==typeof e)n=e[s];else if(this.opts.jtd)throw Error("schema must be object");else if("boolean"!=typeof e)throw Error("schema must be object or boolean");let c=this._cache.get(e);if(void 0!==c)return c;r=(0,d.normalizeId)(n||r);let l=d.getSchemaRefs.call(this,e,r);return c=new a.SchemaEnv({schema:e,schemaId:s,meta:t,baseId:r,localRefs:l}),this._cache.set(c.schema,c),o&&!r.startsWith("#")&&(r&&this._checkUnique(r),this.refs[r]=c),i&&this.validateSchema(e,!0),c}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):a.compileSchema.call(this,e),!e.validate)throw Error("ajv implementation error");return e.validate}_compileMetaSchema(e){let t=this.opts;this.opts=this._metaOpts;try{a.compileSchema.call(this,e)}finally{this.opts=t}}};function v(e,t,r,i="error"){for(let o in e)o in t&&this.logger[i](`${r}: option ${o}. ${e[o]}`)}function b(e){return e=(0,d.normalizeId)(e),this.schemas[e]||this.refs[e]}function $(){let e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(let t in e)this.addSchema(e[t],t)}function S(){for(let e in this.opts.formats){let t=this.opts.formats[e];t&&this.addFormat(e,t)}}function k(e){if(Array.isArray(e))return void this.addVocabulary(e);for(let t in this.logger.warn("keywords option as map is deprecated, pass array"),e){let r=e[t];r.keyword||(r.keyword=t),this.addKeyword(r)}}function w(){let e={...this.opts};for(let t of f)delete e[t];return e}_.ValidationError=i.default,_.MissingRefError=o.default,e.default=_;let R={log(){},warn(){},error(){}},P=/^[a-z_$][a-z0-9_$:-]*$/i;function V(e,t){let{RULES:r}=this;if((0,l.eachItem)(e,e=>{if(r.keywords[e])throw Error(`Keyword ${e} is already defined`);if(!P.test(e))throw Error(`Keyword ${e} has invalid name`)}),t&&t.$data&&!("code"in t||"validate"in t))throw Error('$data keyword must have "code" or "validate" function')}function q(e,t,r){var i;let o=null==t?void 0:t.post;if(r&&o)throw Error('keyword with "post" flag cannot have "type"');let{RULES:n}=this,a=o?n.post:n.rules.find(({type:e})=>e===r);if(a||(a={type:r,rules:[]},n.rules.push(a)),n.keywords[e]=!0,!t)return;let s={keyword:e,definition:{...t,type:(0,c.getJSONTypes)(t.type),schemaType:(0,c.getJSONTypes)(t.schemaType)}};t.before?I.call(this,a,s,t.before):a.rules.push(s),n.all[e]=s,null==(i=t.implements)||i.forEach(e=>this.addKeyword(e))}function I(e,t,r){let i=e.rules.findIndex(e=>e.keyword===r);i>=0?e.rules.splice(i,0,t):(e.rules.push(t),this.logger.warn(`rule ${r} is not defined`))}function x(e){let{metaSchema:t}=e;void 0!==t&&(e.$data&&this.opts.$data&&(t=C(t)),e.validateSchema=this.compile(t,!0))}let j={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function C(e){return{anyOf:[e,j]}}}),pf=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={keyword:"id",code(){throw Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}}}),ph=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.callRef=e.getValidate=void 0;let t=pa(),r=l8(),i=lY(),o=l0(),n=ps(),a=l1();function s(e,t){let{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):(0,i._)`${r.scopeValue("wrapper",{ref:t})}.validate`}function d(e,t,n,s){let{gen:d,it:c}=e,{allErrors:l,schemaEnv:p,opts:u}=c,m=u.passContext?o.default.this:i.nil;function f(e){let t=(0,i._)`${e}.errors`;d.assign(o.default.vErrors,(0,i._)`${o.default.vErrors} === null ? ${t} : ${o.default.vErrors}.concat(${t})`),d.assign(o.default.errors,(0,i._)`${o.default.vErrors}.length`)}function h(e){var t;if(!c.opts.unevaluated)return;let r=null==(t=null==n?void 0:n.validate)?void 0:t.evaluated;if(!0!==c.props)if(r&&!r.dynamicProps)void 0!==r.props&&(c.props=a.mergeEvaluated.props(d,r.props,c.props));else{let t=d.var("props",(0,i._)`${e}.evaluated.props`);c.props=a.mergeEvaluated.props(d,t,c.props,i.Name)}if(!0!==c.items)if(r&&!r.dynamicItems)void 0!==r.items&&(c.items=a.mergeEvaluated.items(d,r.items,c.items));else{let t=d.var("items",(0,i._)`${e}.evaluated.items`);c.items=a.mergeEvaluated.items(d,t,c.items,i.Name)}}s?function(){if(!p.$async)throw Error("async schema referenced by sync schema");let o=d.let("valid");d.try(()=>{d.code((0,i._)`await ${(0,r.callValidateCode)(e,t,m)}`),h(t),l||d.assign(o,!0)},e=>{d.if((0,i._)`!(${e} instanceof ${c.ValidationError})`,()=>d.throw(e)),f(e),l||d.assign(o,!1)}),e.ok(o)}():e.result((0,r.callValidateCode)(e,t,m),()=>h(t),()=>f(t))}e.getValidate=s,e.callRef=d,e.default={keyword:"$ref",schemaType:"string",code(e){var r,o;let a,c,l,{gen:p,schema:u,it:m}=e,{baseId:f,schemaEnv:h,validateName:y,opts:g,self:_}=m,{root:v}=h;if(("#"===u||"#/"===u)&&f===v.baseId){if(h===v)return d(e,y,h,h.$async);let t=p.scopeValue("root",{ref:v});return d(e,(0,i._)`${t}.validate`,v,v.$async)}let b=n.resolveRef.call(_,v,f,u);if(void 0===b)throw new t.default(m.opts.uriResolver,f,u);return b instanceof n.SchemaEnv?void d(e,s(e,r=b),r,r.$async):(o=b,a=p.scopeValue("schema",!0===g.code.source?{ref:o,code:(0,i.stringify)(o)}:{ref:o}),c=p.name("valid"),l=e.subschema({schema:o,dataTypes:[],schemaPath:i.nil,topSchemaRef:a,errSchemaPath:u},c),void(e.mergeEvaluated(l),e.ok(c)))}}}),py=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=pf(),r=ph();e.default=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",t.default,r.default]}),pg=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=lY(),r=t.operators,i={maximum:{okStr:"<=",ok:r.LTE,fail:r.GT},minimum:{okStr:">=",ok:r.GTE,fail:r.LT},exclusiveMaximum:{okStr:"<",ok:r.LT,fail:r.GTE},exclusiveMinimum:{okStr:">",ok:r.GT,fail:r.LTE}};e.default={keyword:Object.keys(i),type:"number",schemaType:"number",$data:!0,error:{message:({keyword:e,schemaCode:r})=>(0,t.str)`must be ${i[e].okStr} ${r}`,params:({keyword:e,schemaCode:r})=>(0,t._)`{comparison: ${i[e].okStr}, limit: ${r}}`},code(e){let{keyword:r,data:o,schemaCode:n}=e;e.fail$data((0,t._)`${o} ${i[r].fail} ${n} || isNaN(${o})`)}}}),p_=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=lY();e.default={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:e})=>(0,t.str)`must be multiple of ${e}`,params:({schemaCode:e})=>(0,t._)`{multipleOf: ${e}}`},code(e){let{gen:r,data:i,schemaCode:o,it:n}=e,a=n.opts.multipleOfPrecision,s=r.let("res"),d=a?(0,t._)`Math.abs(Math.round(${s}) - ${s}) > 1e-${a}`:(0,t._)`${s} !== parseInt(${s})`;e.fail$data((0,t._)`(${o} === 0 || (${s} = ${i}/${o}, ${d}))`)}}}),pv=eb(e=>{function t(e){let t,r=e.length,i=0,o=0;for(;o=55296&&t<=56319&&o{Object.defineProperty(e,"__esModule",{value:!0});let t=lY(),r=l1(),i=pv();e.default={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message:({keyword:e,schemaCode:r})=>(0,t.str)`must NOT have ${"maxLength"===e?"more":"fewer"} than ${r} characters`,params:({schemaCode:e})=>(0,t._)`{limit: ${e}}`},code(e){let{keyword:o,data:n,schemaCode:a,it:s}=e,d="maxLength"===o?t.operators.GT:t.operators.LT,c=!1===s.opts.unicode?(0,t._)`${n}.length`:(0,t._)`${(0,r.useFunc)(e.gen,i.default)}(${n})`;e.fail$data((0,t._)`${c} ${d} ${a}`)}}}),p$=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=l8(),r=l1(),i=lY();e.default={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>(0,i.str)`must match pattern "${e}"`,params:({schemaCode:e})=>(0,i._)`{pattern: ${e}}`},code(e){let{gen:o,data:n,$data:a,schema:s,schemaCode:d,it:c}=e,l=c.opts.unicodeRegExp?"u":"";if(a){let{regExp:t}=c.opts.code,a="new RegExp"===t.code?(0,i._)`new RegExp`:(0,r.useFunc)(o,t),s=o.let("valid");o.try(()=>o.assign(s,(0,i._)`${a}(${d}, ${l}).test(${n})`),()=>o.assign(s,!1)),e.fail$data((0,i._)`!${s}`)}else{let r=(0,t.usePattern)(e,s);e.fail$data((0,i._)`!${r}.test(${n})`)}}}}),pS=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=lY();e.default={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message:({keyword:e,schemaCode:r})=>(0,t.str)`must NOT have ${"maxProperties"===e?"more":"fewer"} than ${r} properties`,params:({schemaCode:e})=>(0,t._)`{limit: ${e}}`},code(e){let{keyword:r,data:i,schemaCode:o}=e,n="maxProperties"===r?t.operators.GT:t.operators.LT;e.fail$data((0,t._)`Object.keys(${i}).length ${n} ${o}`)}}}),pk=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=l8(),r=lY(),i=l1();e.default={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:e}})=>(0,r.str)`must have required property '${e}'`,params:({params:{missingProperty:e}})=>(0,r._)`{missingProperty: ${e}}`},code(e){let{gen:o,schema:n,schemaCode:a,data:s,$data:d,it:c}=e,{opts:l}=c;if(!d&&0===n.length)return;let p=n.length>=l.loopRequired;if(c.allErrors?function(){if(p||d)e.block$data(r.nil,u);else for(let r of n)(0,t.checkReportMissingProp)(e,r)}():function(){let i=o.let("missing");if(p||d){let n=o.let("valid",!0);e.block$data(n,()=>{var d,c;return d=i,c=n,void(e.setParams({missingProperty:d}),o.forOf(d,a,()=>{o.assign(c,(0,t.propertyInData)(o,s,d,l.ownProperties)),o.if((0,r.not)(c),()=>{e.error(),o.break()})},r.nil))}),e.ok(n)}else o.if((0,t.checkMissingProp)(e,n,i)),(0,t.reportMissingProp)(e,i),o.else()}(),l.strictRequired){let t=e.parentSchema.properties,{definedProperties:r}=e.it;for(let e of n)if((null==t?void 0:t[e])===void 0&&!r.has(e)){let t=`required property "${e}" is not defined at "${c.schemaEnv.baseId+c.errSchemaPath}" (strictRequired)`;(0,i.checkStrictMode)(c,t,c.opts.strictRequired)}}function u(){o.forOf("prop",a,r=>{e.setParams({missingProperty:r}),o.if((0,t.noPropertyInData)(o,s,r,l.ownProperties),()=>e.error())})}}}}),pw=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=lY();e.default={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message:({keyword:e,schemaCode:r})=>(0,t.str)`must NOT have ${"maxItems"===e?"more":"fewer"} than ${r} items`,params:({schemaCode:e})=>(0,t._)`{limit: ${e}}`},code(e){let{keyword:r,data:i,schemaCode:o}=e,n="maxItems"===r?t.operators.GT:t.operators.LT;e.fail$data((0,t._)`${i}.length ${n} ${o}`)}}}),pR=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=pt();t.code='require("ajv/dist/runtime/equal").default',e.default=t}),pP=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=l9(),r=lY(),i=l1(),o=pR();e.default={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:e,j:t}})=>(0,r.str)`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>(0,r._)`{i: ${e}, j: ${t}}`},code(e){let{gen:n,data:a,$data:s,schema:d,parentSchema:c,schemaCode:l,it:p}=e;if(!s&&!d)return;let u=n.let("valid"),m=c.items?(0,t.getSchemaTypes)(c.items):[];e.block$data(u,function(){let s=n.let("i",(0,r._)`${a}.length`),d=n.let("j");e.setParams({i:s,j:d}),n.assign(u,!0),n.if((0,r._)`${s} > 1`,()=>(m.length>0&&!m.some(e=>"object"===e||"array"===e)?function(i,o){let s=n.name("item"),d=(0,t.checkDataTypes)(m,s,p.opts.strictNumbers,t.DataType.Wrong),c=n.const("indices",(0,r._)`{}`);n.for((0,r._)`;${i}--;`,()=>{n.let(s,(0,r._)`${a}[${i}]`),n.if(d,(0,r._)`continue`),m.length>1&&n.if((0,r._)`typeof ${s} == "string"`,(0,r._)`${s} += "_"`),n.if((0,r._)`typeof ${c}[${s}] == "number"`,()=>{n.assign(o,(0,r._)`${c}[${s}]`),e.error(),n.assign(u,!1).break()}).code((0,r._)`${c}[${s}] = ${i}`)})}:function(t,s){let d=(0,i.useFunc)(n,o.default),c=n.name("outer");n.label(c).for((0,r._)`;${t}--;`,()=>n.for((0,r._)`${s} = ${t}; ${s}--;`,()=>n.if((0,r._)`${d}(${a}[${t}], ${a}[${s}])`,()=>{e.error(),n.assign(u,!1).break(c)})))})(s,d))},(0,r._)`${l} === false`),e.ok(u)}}}),pV=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=lY(),r=l1(),i=pR();e.default={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:e})=>(0,t._)`{allowedValue: ${e}}`},code(e){let{gen:o,data:n,$data:a,schemaCode:s,schema:d}=e;a||d&&"object"==typeof d?e.fail$data((0,t._)`!${(0,r.useFunc)(o,i.default)}(${n}, ${s})`):e.fail((0,t._)`${d} !== ${n}`)}}}),pq=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=lY(),r=l1(),i=pR();e.default={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:e})=>(0,t._)`{allowedValues: ${e}}`},code(e){let o,n,{gen:a,data:s,$data:d,schema:c,schemaCode:l,it:p}=e;if(!d&&0===c.length)throw Error("enum must have non-empty array");let u=c.length>=p.opts.loopEnum,m=()=>null!=o?o:o=(0,r.useFunc)(a,i.default);if(u||d)n=a.let("valid"),e.block$data(n,function(){a.assign(n,!1),a.forOf("v",l,e=>a.if((0,t._)`${m()}(${s}, ${e})`,()=>a.assign(n,!0).break()))});else{if(!Array.isArray(c))throw Error("ajv implementation error");let e=a.const("vSchema",l);n=(0,t.or)(...c.map((r,i)=>{var o,n;let a;return o=e,"object"==typeof(a=c[n=i])&&null!==a?(0,t._)`${m()}(${s}, ${o}[${n}])`:(0,t._)`${s} === ${a}`}))}e.pass(n)}}}),pI=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=pg(),r=p_(),i=pb(),o=p$(),n=pS(),a=pk(),s=pw(),d=pP(),c=pV(),l=pq();e.default=[t.default,r.default,i.default,o.default,n.default,a.default,s.default,d.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},c.default,l.default]}),px=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateAdditionalItems=void 0;let t=lY(),r=l1();function i(e,i){let{gen:o,schema:n,data:a,keyword:s,it:d}=e;d.items=!0;let c=o.const("len",(0,t._)`${a}.length`);if(!1===n)e.setParams({len:i.length}),e.pass((0,t._)`${c} <= ${i.length}`);else if("object"==typeof n&&!(0,r.alwaysValidSchema)(d,n)){let n=o.var("valid",(0,t._)`${c} <= ${i.length}`);o.if((0,t.not)(n),()=>{var a;return a=n,void o.forRange("i",i.length,c,i=>{e.subschema({keyword:s,dataProp:i,dataPropType:r.Type.Num},a),d.allErrors||o.if((0,t.not)(a),()=>o.break())})}),e.ok(n)}}e.validateAdditionalItems=i,e.default={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:e}})=>(0,t.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,t._)`{limit: ${e}}`},code(e){let{parentSchema:t,it:o}=e,{items:n}=t;Array.isArray(n)?i(e,n):(0,r.checkStrictMode)(o,'"additionalItems" is ignored when "items" is not an array of schemas')}}}),pj=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateTuple=void 0;let t=lY(),r=l1(),i=l8();function o(e,i,n=e.schema){let{gen:a,parentSchema:s,data:d,keyword:c,it:l}=e;(function(e){let{opts:t,errSchemaPath:o}=l,a=n.length,s=a===e.minItems&&(a===e.maxItems||!1===e[i]);if(t.strictTuples&&!s){let e=`"${c}" is ${a}-tuple, but minItems or maxItems/${i} are not specified or different at path "${o}"`;(0,r.checkStrictMode)(l,e,t.strictTuples)}})(s),l.opts.unevaluated&&n.length&&!0!==l.items&&(l.items=r.mergeEvaluated.items(a,n.length,l.items));let p=a.name("valid"),u=a.const("len",(0,t._)`${d}.length`);n.forEach((i,o)=>{(0,r.alwaysValidSchema)(l,i)||(a.if((0,t._)`${u} > ${o}`,()=>e.subschema({keyword:c,schemaProp:o,dataProp:o},p)),e.ok(p))})}e.validateTuple=o,e.default={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){let{schema:t,it:n}=e;if(Array.isArray(t))return o(e,"additionalItems",t);n.items=!0,(0,r.alwaysValidSchema)(n,t)||e.ok((0,i.validateArray)(e))}}}),pC=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=pj();e.default={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,t.validateTuple)(e,"items")}}),pT=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=lY(),r=l1(),i=l8(),o=px();e.default={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:e}})=>(0,t.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,t._)`{limit: ${e}}`},code(e){let{schema:t,parentSchema:n,it:a}=e,{prefixItems:s}=n;a.items=!0,(0,r.alwaysValidSchema)(a,t)||(s?(0,o.validateAdditionalItems)(e,s):e.ok((0,i.validateArray)(e)))}}}),pO=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=lY(),r=l1();e.default={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:e,max:r}})=>void 0===r?(0,t.str)`must contain at least ${e} valid item(s)`:(0,t.str)`must contain at least ${e} and no more than ${r} valid item(s)`,params:({params:{min:e,max:r}})=>void 0===r?(0,t._)`{minContains: ${e}}`:(0,t._)`{minContains: ${e}, maxContains: ${r}}`},code(e){let i,o,{gen:n,schema:a,parentSchema:s,data:d,it:c}=e,{minContains:l,maxContains:p}=s;c.opts.next?(i=void 0===l?1:l,o=p):i=1;let u=n.const("len",(0,t._)`${d}.length`);if(e.setParams({min:i,max:o}),void 0===o&&0===i)return void(0,r.checkStrictMode)(c,'"minContains" == 0 without "maxContains": "contains" keyword ignored');if(void 0!==o&&i>o){(0,r.checkStrictMode)(c,'"minContains" > "maxContains" is always invalid'),e.fail();return}if((0,r.alwaysValidSchema)(c,a)){let r=(0,t._)`${u} >= ${i}`;void 0!==o&&(r=(0,t._)`${r} && ${u} <= ${o}`),e.pass(r);return}c.items=!0;let m=n.name("valid");function f(){let e=n.name("_valid"),r=n.let("count",0);h(e,()=>n.if(e,()=>{var e;return e=r,void(n.code((0,t._)`${e}++`),void 0===o?n.if((0,t._)`${e} >= ${i}`,()=>n.assign(m,!0).break()):(n.if((0,t._)`${e} > ${o}`,()=>n.assign(m,!1).break()),1===i?n.assign(m,!0):n.if((0,t._)`${e} >= ${i}`,()=>n.assign(m,!0))))}))}function h(t,i){n.forRange("i",0,u,o=>{e.subschema({keyword:"contains",dataProp:o,dataPropType:r.Type.Num,compositeRule:!0},t),i()})}void 0===o&&1===i?h(m,()=>n.if(m,()=>n.break())):0===i?(n.let(m,!0),void 0!==o&&n.if((0,t._)`${d}.length > 0`,f)):(n.let(m,!1),f()),e.result(m,()=>e.reset())}}}),pE=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;let t=lY(),r=l1(),i=l8();e.error={message:({params:{property:e,depsCount:r,deps:i}})=>(0,t.str)`must have ${1===r?"property":"properties"} ${i} when property ${e} is present`,params:({params:{property:e,depsCount:r,deps:i,missingProperty:o}})=>(0,t._)`{property: ${e}, missingProperty: ${o}, depsCount: ${r}, - deps: ${i}}`};let o={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(e){let[t,r]=function({schema:e}){let t={},r={};for(let i in e)"__proto__"!==i&&((Array.isArray(e[i])?t:r)[i]=e[i]);return[t,r]}(e);n(e,t),a(e,r)}};function n(e,r=e.schema){let{gen:o,data:a,it:s}=e;if(0===Object.keys(r).length)return;let d=o.let("missing");for(let n in r){let c=r[n];if(0===c.length)continue;let l=(0,i.propertyInData)(o,a,n,s.opts.ownProperties);e.setParams({property:n,depsCount:c.length,deps:c.join(", ")}),s.allErrors?o.if(l,()=>{for(let t of c)(0,i.checkReportMissingProp)(e,t)}):(o.if((0,t._)`${l} && (${(0,i.checkMissingProp)(e,c,d)})`),(0,i.reportMissingProp)(e,d),o.else())}}function a(e,t=e.schema){let{gen:o,data:n,keyword:s,it:d}=e,c=o.name("valid");for(let a in t)(0,r.alwaysValidSchema)(d,t[a])||(o.if((0,i.propertyInData)(o,n,a,d.opts.ownProperties),()=>{let t=e.subschema({keyword:s,schemaProp:a},c);e.mergeValidEvaluated(t,c)},()=>o.var(c,!0)),e.ok(c))}e.validatePropertyDeps=n,e.validateSchemaDeps=a,e.default=o}),pA=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=lY(),r=l1();e.default={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:e})=>(0,t._)`{propertyName: ${e.propertyName}}`},code(e){let{gen:i,schema:o,data:n,it:a}=e;if((0,r.alwaysValidSchema)(a,o))return;let s=i.name("valid");i.forIn("key",n,r=>{e.setParams({propertyName:r}),e.subschema({keyword:"propertyNames",data:r,dataTypes:["string"],propertyName:r,compositeRule:!0},s),i.if((0,t.not)(s),()=>{e.error(!0),a.allErrors||i.break()})}),e.ok(s)}}}),pW=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=l8(),r=lY(),i=l0(),o=l1();e.default={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:e})=>(0,r._)`{additionalProperty: ${e.additionalProperty}}`},code(e){let{gen:n,schema:a,parentSchema:s,data:d,errsCount:c,it:l}=e;if(!c)throw Error("ajv implementation error");let{allErrors:p,opts:u}=l;if(l.props=!0,"all"!==u.removeAdditional&&(0,o.alwaysValidSchema)(l,a))return;let m=(0,t.allSchemaProperties)(s.properties),f=(0,t.allSchemaProperties)(s.patternProperties);function h(e){n.code((0,r._)`delete ${d}[${e}]`)}function y(t){if("all"===u.removeAdditional||u.removeAdditional&&!1===a)return void h(t);if(!1===a){e.setParams({additionalProperty:t}),e.error(),p||n.break();return}if("object"==typeof a&&!(0,o.alwaysValidSchema)(l,a)){let i=n.name("valid");"failing"===u.removeAdditional?(g(t,i,!1),n.if((0,r.not)(i),()=>{e.reset(),h(t)})):(g(t,i),p||n.if((0,r.not)(i),()=>n.break()))}}function g(t,r,i){let n={keyword:"additionalProperties",dataProp:t,dataPropType:o.Type.Str};!1===i&&Object.assign(n,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(n,r)}n.forIn("key",d,i=>{m.length||f.length?n.if(function(i){let a;if(m.length>8){let e=(0,o.schemaRefOrVal)(l,s.properties,"properties");a=(0,t.isOwnProperty)(n,e,i)}else a=m.length?(0,r.or)(...m.map(e=>(0,r._)`${i} === ${e}`)):r.nil;return f.length&&(a=(0,r.or)(a,...f.map(o=>(0,r._)`${(0,t.usePattern)(e,o)}.test(${i})`))),(0,r.not)(a)}(i),()=>y(i)):y(i)}),e.ok((0,r._)`${c} === ${i.default.errors}`)}}}),pM=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=po(),r=l8(),i=l1(),o=pW();e.default={keyword:"properties",type:"object",schemaType:"object",code(e){let{gen:n,schema:a,parentSchema:s,data:d,it:c}=e;"all"===c.opts.removeAdditional&&void 0===s.additionalProperties&&o.default.code(new t.KeywordCxt(c,o.default,"additionalProperties"));let l=(0,r.allSchemaProperties)(a);for(let e of l)c.definedProperties.add(e);c.opts.unevaluated&&l.length&&!0!==c.props&&(c.props=i.mergeEvaluated.props(n,(0,i.toHash)(l),c.props));let p=l.filter(e=>!(0,i.alwaysValidSchema)(c,a[e]));if(0===p.length)return;let u=n.name("valid");for(let t of p){var m;(m=t,c.opts.useDefaults&&!c.compositeRule&&void 0!==a[m].default)?f(t):(n.if((0,r.propertyInData)(n,d,t,c.opts.ownProperties)),f(t),c.allErrors||n.else().var(u,!0),n.endIf()),e.it.definedProperties.add(t),e.ok(u)}function f(t){e.subschema({keyword:"properties",schemaProp:t,dataProp:t},u)}}}}),pN=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=l8(),r=lY(),i=l1(),o=l1();e.default={keyword:"patternProperties",type:"object",schemaType:"object",code(e){let{gen:n,schema:a,data:s,parentSchema:d,it:c}=e,{opts:l}=c,p=(0,t.allSchemaProperties)(a),u=p.filter(e=>(0,i.alwaysValidSchema)(c,a[e]));if(0===p.length||u.length===p.length&&(!c.opts.unevaluated||!0===c.props))return;let m=l.strictSchema&&!l.allowMatchingProperties&&d.properties,f=n.name("valid");!0===c.props||c.props instanceof r.Name||(c.props=(0,o.evaluatedPropsToName)(n,c.props));let{props:h}=c;for(let e of p)m&&function(e){for(let t in m)new RegExp(e).test(t)&&(0,i.checkStrictMode)(c,`property ${t} matches pattern ${e} (use allowMatchingProperties)`)}(e),c.allErrors?y(e):(n.var(f,!0),y(e),n.if(f));function y(i){n.forIn("key",s,a=>{n.if((0,r._)`${(0,t.usePattern)(e,i)}.test(${a})`,()=>{let t=u.includes(i);t||e.subschema({keyword:"patternProperties",schemaProp:i,dataProp:a,dataPropType:o.Type.Str},f),c.opts.unevaluated&&!0!==h?n.assign((0,r._)`${h}[${a}]`,!0):t||c.allErrors||n.if((0,r.not)(f),()=>n.break())})})}}}}),pz=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=l1();e.default={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){let{gen:r,schema:i,it:o}=e;if((0,t.alwaysValidSchema)(o,i))return void e.fail();let n=r.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},n),e.failResult(n,()=>e.reset(),()=>e.error())},error:{message:"must NOT be valid"}}}),pD=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:l8().validateUnion,error:{message:"must match a schema in anyOf"}}}),pF=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=lY(),r=l1();e.default={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:e})=>(0,t._)`{passingSchemas: ${e.passing}}`},code(e){let{gen:i,schema:o,parentSchema:n,it:a}=e;if(!Array.isArray(o))throw Error("ajv implementation error");if(a.opts.discriminator&&n.discriminator)return;let s=i.let("valid",!1),d=i.let("passing",null),c=i.name("_valid");e.setParams({passing:d}),i.block(function(){o.forEach((o,n)=>{let l;(0,r.alwaysValidSchema)(a,o)?i.var(c,!0):l=e.subschema({keyword:"oneOf",schemaProp:n,compositeRule:!0},c),n>0&&i.if((0,t._)`${c} && ${s}`).assign(s,!1).assign(d,(0,t._)`[${d}, ${n}]`).else(),i.if(c,()=>{i.assign(s,!0),i.assign(d,n),l&&e.mergeEvaluated(l,t.Name)})})}),e.result(s,()=>e.reset(),()=>e.error(!0))}}}),pL=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=l1();e.default={keyword:"allOf",schemaType:"array",code(e){let{gen:r,schema:i,it:o}=e;if(!Array.isArray(i))throw Error("ajv implementation error");let n=r.name("valid");i.forEach((r,i)=>{if((0,t.alwaysValidSchema)(o,r))return;let a=e.subschema({keyword:"allOf",schemaProp:i},n);e.ok(n),e.mergeEvaluated(a)})}}}),pU=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=lY(),r=l1();function i(e,t){let i=e.schema[t];return void 0!==i&&!(0,r.alwaysValidSchema)(e,i)}e.default={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:e})=>(0,t.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,t._)`{failingKeyword: ${e.ifClause}}`},code(e){let o,{gen:n,parentSchema:a,it:s}=e;void 0===a.then&&void 0===a.else&&(0,r.checkStrictMode)(s,'"if" without "then" and "else" is ignored');let d=i(s,"then"),c=i(s,"else");if(!d&&!c)return;let l=n.let("valid",!0),p=n.name("_valid");if(o=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},p),e.mergeEvaluated(o),e.reset(),d&&c){let t=n.let("ifClause");e.setParams({ifClause:t}),n.if(p,u("then",t),u("else",t))}else d?n.if(p,u("then")):n.if((0,t.not)(p),u("else"));function u(r,i){return()=>{let o=e.subschema({keyword:r},p);n.assign(l,p),e.mergeValidEvaluated(o,l),i?n.assign(i,(0,t._)`${r}`):e.setParams({ifClause:r})}}e.pass(l,()=>e.error(!0))}}}),pH=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=l1();e.default={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:r,it:i}){void 0===r.if&&(0,t.checkStrictMode)(i,`"${e}" without "if" is ignored`)}}}),pG=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=px(),r=pC(),i=pj(),o=pT(),n=pO(),a=pE(),s=pA(),d=pW(),c=pM(),l=pN(),p=pz(),u=pD(),m=pF(),f=pL(),h=pU(),y=pH();e.default=function(e=!1){let g=[p.default,u.default,m.default,f.default,h.default,y.default,s.default,d.default,a.default,c.default,l.default];return e?g.push(r.default,o.default):g.push(t.default,i.default),g.push(n.default),g}}),pB=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=lY();e.default={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>(0,t.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,t._)`{format: ${e}}`},code(e,r){let i,o,n,a,s,d,{gen:c,data:l,$data:p,schema:u,schemaCode:m,it:f}=e,{opts:h,errSchemaPath:y,schemaEnv:g,self:_}=f;h.validateFormats&&(p?(i=c.scopeValue("formats",{ref:_.formats,code:h.code.formats}),o=c.const("fDef",(0,t._)`${i}[${m}]`),n=c.let("fType"),a=c.let("format"),c.if((0,t._)`typeof ${o} == "object" && !(${o} instanceof RegExp)`,()=>c.assign(n,(0,t._)`${o}.type || "string"`).assign(a,(0,t._)`${o}.validate`),()=>c.assign(n,(0,t._)`"string"`).assign(a,o)),e.fail$data((0,t.or)(!1===h.strictSchema?t.nil:(0,t._)`${m} && !${a}`,(s=g.$async?(0,t._)`(${o}.async ? await ${a}(${l}) : ${a}(${l}))`:(0,t._)`${a}(${l})`,d=(0,t._)`(typeof ${a} == "function" ? ${s} : ${a}.test(${l}))`,(0,t._)`${a} && ${a} !== true && ${n} === ${r} && !${d}`)))):function(){var i;let o,n,a=_.formats[u];if(!a){if(!1===h.strictSchema)return _.logger.warn(s());throw Error(s());function s(){return`unknown format "${u}" ignored in schema at path "${y}"`}}if(!0===a)return;let[d,p,m]=(o=(i=a)instanceof RegExp?(0,t.regexpCode)(i):h.code.formats?(0,t._)`${h.code.formats}${(0,t.getProperty)(u)}`:void 0,n=c.scopeValue("formats",{key:u,ref:i,code:o}),"object"!=typeof i||i instanceof RegExp?["string",i,n]:[i.type||"string",i.validate,(0,t._)`${n}.validate`]);d===r&&e.pass(function(){if("object"==typeof a&&!(a instanceof RegExp)&&a.async){if(!g.$async)throw Error("async format in sync schema");return(0,t._)`await ${m}(${l})`}return"function"==typeof p?(0,t._)`${m}(${l})`:(0,t._)`${m}.test(${l})`}())}())}}}),pK=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=[pB().default]}),pJ=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.contentVocabulary=e.metadataVocabulary=void 0,e.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],e.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]}),pZ=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=py(),r=pI(),i=pG(),o=pK(),n=pJ();e.default=[t.default,r.default,(0,i.default)(),o.default,n.metadataVocabulary,n.contentVocabulary]}),pQ=eb(e=>{var t,r;Object.defineProperty(e,"__esModule",{value:!0}),e.DiscrError=void 0,(r=t||(e.DiscrError=t={})).Tag="tag",r.Mapping="mapping"}),pX=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=lY(),r=pQ(),i=ps(),o=pa(),n=l1();e.default={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:e,tagName:t}})=>e===r.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:r,tagName:i}})=>(0,t._)`{error: ${e}, tag: ${i}, tagValue: ${r}}`},code(e){let{gen:a,data:s,schema:d,parentSchema:c,it:l}=e,{oneOf:p}=c;if(!l.opts.discriminator)throw Error("discriminator: requires discriminator option");let u=d.propertyName;if("string"!=typeof u)throw Error("discriminator: requires propertyName");if(d.mapping)throw Error("discriminator: mapping is not supported");if(!p)throw Error("discriminator: requires oneOf keyword");let m=a.let("valid",!1),f=a.const("tag",(0,t._)`${s}${(0,t.getProperty)(u)}`);a.if((0,t._)`typeof ${f} == "string"`,()=>(function(){let s=function(){var e;let t={},r=s(c),a=!0;for(let t=0;te.error(!1,{discrError:r.DiscrError.Tag,tag:f,tagName:u})),e.ok(m)}}}),pY=eb((e,t)=>{t.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}}),p1=eb((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.MissingRefError=e.ValidationError=e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=e.Ajv=void 0;let r=pm(),i=pZ(),o=pX(),n=pY(),a=["/properties"],s="http://json-schema.org/draft-07/schema";var d=class extends r.default{_addVocabularies(){super._addVocabularies(),i.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(o.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let e=this.opts.$data?this.$dataMetaSchema(n,a):n;this.addMetaSchema(e,s,!1),this.refs["http://json-schema.org/schema"]=s}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(s)?s:void 0)}};e.Ajv=d,t.exports=e=d,t.exports.Ajv=d,Object.defineProperty(e,"__esModule",{value:!0}),e.default=d;var c=po();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return c.KeywordCxt}});var l=lY();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return l._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return l.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return l.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return l.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return l.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return l.CodeGen}});var p=pn();Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return p.default}});var u=pa();Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return u.default}})}),p0=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.dynamicAnchor=void 0;let t=lY(),r=l0(),i=ps(),o=ph();function n(e,n){let{gen:a,it:s}=e;s.schemaEnv.root.dynamicAnchors[n]=!0;let d=(0,t._)`${r.default.dynamicAnchors}${(0,t.getProperty)(n)}`,c="#"===s.errSchemaPath?s.validateName:function(e){let{schemaEnv:t,schema:r,self:n}=e.it,{root:a,baseId:s,localRefs:d,meta:c}=t.root,{schemaId:l}=n.opts,p=new i.SchemaEnv({schema:r,schemaId:l,root:a,baseId:s,localRefs:d,meta:c});return i.compileSchema.call(n,p),(0,o.getValidate)(e,p)}(e);a.if((0,t._)`!${d}`,()=>a.assign(d,c))}e.dynamicAnchor=n,e.default={keyword:"$dynamicAnchor",schemaType:"string",code:e=>n(e,e.schema)}}),p2=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.dynamicRef=void 0;let t=lY(),r=l0(),i=ph();function o(e,o){let{gen:n,keyword:a,it:s}=e;if("#"!==o[0])throw Error(`"${a}" only supports hash fragment reference`);let d=o.slice(1);if(s.allErrors)c();else{let t=n.let("valid",!1);c(t),e.ok(t)}function c(e){if(s.schemaEnv.root.dynamicAnchors[d]){let i=n.let("_v",(0,t._)`${r.default.dynamicAnchors}${(0,t.getProperty)(d)}`);n.if(i,l(i,e),l(s.validateName,e))}else l(s.validateName,e)()}function l(t,r){return r?()=>n.block(()=>{(0,i.callRef)(e,t),n.let(r,!0)}):()=>(0,i.callRef)(e,t)}}e.dynamicRef=o,e.default={keyword:"$dynamicRef",schemaType:"string",code:e=>o(e,e.schema)}}),p4=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=p0(),r=l1();e.default={keyword:"$recursiveAnchor",schemaType:"boolean",code(e){e.schema?(0,t.dynamicAnchor)(e,""):(0,r.checkStrictMode)(e.it,"$recursiveAnchor: false is ignored")}}}),p6=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=p2();e.default={keyword:"$recursiveRef",schemaType:"string",code:e=>(0,t.dynamicRef)(e,e.schema)}}),p3=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=p0(),r=p2(),i=p4(),o=p6();e.default=[t.default,r.default,i.default,o.default]}),p9=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=pE();e.default={keyword:"dependentRequired",type:"object",schemaType:"object",error:t.error,code:e=>(0,t.validatePropertyDeps)(e)}}),p5=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=pE();e.default={keyword:"dependentSchemas",type:"object",schemaType:"object",code:e=>(0,t.validateSchemaDeps)(e)}}),p8=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=l1();e.default={keyword:["maxContains","minContains"],type:"array",schemaType:"number",code({keyword:e,parentSchema:r,it:i}){void 0===r.contains&&(0,t.checkStrictMode)(i,`"${e}" without "contains" is ignored`)}}}),p7=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=p9(),r=p5(),i=p8();e.default=[t.default,r.default,i.default]}),ue=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=lY(),r=l1(),i=l0();e.default={keyword:"unevaluatedProperties",type:"object",schemaType:["boolean","object"],trackErrors:!0,error:{message:"must NOT have unevaluated properties",params:({params:e})=>(0,t._)`{unevaluatedProperty: ${e.unevaluatedProperty}}`},code(e){let{gen:o,schema:n,data:a,errsCount:s,it:d}=e;if(!s)throw Error("ajv implementation error");let{allErrors:c,props:l}=d;function p(i){if(!1===n){e.setParams({unevaluatedProperty:i}),e.error(),c||o.break();return}if(!(0,r.alwaysValidSchema)(d,n)){let n=o.name("valid");e.subschema({keyword:"unevaluatedProperties",dataProp:i,dataPropType:r.Type.Str},n),c||o.if((0,t.not)(n),()=>o.break())}}l instanceof t.Name?o.if((0,t._)`${l} !== true`,()=>o.forIn("key",a,e=>{var r,i;return o.if((r=l,i=e,(0,t._)`!${r} || !${r}[${i}]`),()=>p(e))})):!0!==l&&o.forIn("key",a,e=>void 0===l?p(e):o.if(function(e,r){let i=[];for(let o in e)!0===e[o]&&i.push((0,t._)`${r} !== ${o}`);return(0,t.and)(...i)}(l,e),()=>p(e))),d.props=!0,e.ok((0,t._)`${s} === ${i.default.errors}`)}}}),ut=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=lY(),r=l1();e.default={keyword:"unevaluatedItems",type:"array",schemaType:["boolean","object"],error:{message:({params:{len:e}})=>(0,t.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,t._)`{limit: ${e}}`},code(e){let{gen:i,schema:o,data:n,it:a}=e,s=a.items||0;if(!0===s)return;let d=i.const("len",(0,t._)`${n}.length`);if(!1===o)e.setParams({len:s}),e.fail((0,t._)`${d} > ${s}`);else if("object"==typeof o&&!(0,r.alwaysValidSchema)(a,o)){let o=i.var("valid",(0,t._)`${d} <= ${s}`);i.if((0,t.not)(o),()=>{var n,c;return n=o,c=s,void i.forRange("i",c,d,o=>{e.subschema({keyword:"unevaluatedItems",dataProp:o,dataPropType:r.Type.Num},n),a.allErrors||i.if((0,t.not)(n),()=>i.break())})}),e.ok(o)}a.items=!0}}}),ur=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=ue(),r=ut();e.default=[t.default,r.default]}),ui=eb((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/schema",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/core":!0,"https://json-schema.org/draft/2019-09/vocab/applicator":!0,"https://json-schema.org/draft/2019-09/vocab/validation":!0,"https://json-schema.org/draft/2019-09/vocab/meta-data":!0,"https://json-schema.org/draft/2019-09/vocab/format":!1,"https://json-schema.org/draft/2019-09/vocab/content":!0},$recursiveAnchor:!0,title:"Core and Validation specifications meta-schema",allOf:[{$ref:"meta/core"},{$ref:"meta/applicator"},{$ref:"meta/validation"},{$ref:"meta/meta-data"},{$ref:"meta/format"},{$ref:"meta/content"}],type:["object","boolean"],properties:{definitions:{$comment:"While no longer an official keyword as it is replaced by $defs, this keyword is retained in the meta-schema to prevent incompatible extensions as it remains in common use.",type:"object",additionalProperties:{$recursiveRef:"#"},default:{}},dependencies:{$comment:'"dependencies" is no longer a keyword, but schema authors should avoid redefining it to facilitate a smooth transition to "dependentSchemas" and "dependentRequired"',type:"object",additionalProperties:{anyOf:[{$recursiveRef:"#"},{$ref:"meta/validation#/$defs/stringArray"}]}}}}}),uo=eb((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/meta/applicator",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/applicator":!0},$recursiveAnchor:!0,title:"Applicator vocabulary meta-schema",type:["object","boolean"],properties:{additionalItems:{$recursiveRef:"#"},unevaluatedItems:{$recursiveRef:"#"},items:{anyOf:[{$recursiveRef:"#"},{$ref:"#/$defs/schemaArray"}]},contains:{$recursiveRef:"#"},additionalProperties:{$recursiveRef:"#"},unevaluatedProperties:{$recursiveRef:"#"},properties:{type:"object",additionalProperties:{$recursiveRef:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$recursiveRef:"#"},propertyNames:{format:"regex"},default:{}},dependentSchemas:{type:"object",additionalProperties:{$recursiveRef:"#"}},propertyNames:{$recursiveRef:"#"},if:{$recursiveRef:"#"},then:{$recursiveRef:"#"},else:{$recursiveRef:"#"},allOf:{$ref:"#/$defs/schemaArray"},anyOf:{$ref:"#/$defs/schemaArray"},oneOf:{$ref:"#/$defs/schemaArray"},not:{$recursiveRef:"#"}},$defs:{schemaArray:{type:"array",minItems:1,items:{$recursiveRef:"#"}}}}}),un=eb((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/meta/content",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/content":!0},$recursiveAnchor:!0,title:"Content vocabulary meta-schema",type:["object","boolean"],properties:{contentMediaType:{type:"string"},contentEncoding:{type:"string"},contentSchema:{$recursiveRef:"#"}}}}),ua=eb((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/meta/core",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/core":!0},$recursiveAnchor:!0,title:"Core vocabulary meta-schema",type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference",$comment:"Non-empty fragments not allowed.",pattern:"^[^#]*#?$"},$schema:{type:"string",format:"uri"},$anchor:{type:"string",pattern:"^[A-Za-z][-A-Za-z0-9.:_]*$"},$ref:{type:"string",format:"uri-reference"},$recursiveRef:{type:"string",format:"uri-reference"},$recursiveAnchor:{type:"boolean",default:!1},$vocabulary:{type:"object",propertyNames:{type:"string",format:"uri"},additionalProperties:{type:"boolean"}},$comment:{type:"string"},$defs:{type:"object",additionalProperties:{$recursiveRef:"#"},default:{}}}}}),us=eb((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/meta/format",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/format":!0},$recursiveAnchor:!0,title:"Format vocabulary meta-schema",type:["object","boolean"],properties:{format:{type:"string"}}}}),ud=eb((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/meta/meta-data",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/meta-data":!0},$recursiveAnchor:!0,title:"Meta-data vocabulary meta-schema",type:["object","boolean"],properties:{title:{type:"string"},description:{type:"string"},default:!0,deprecated:{type:"boolean",default:!1},readOnly:{type:"boolean",default:!1},writeOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0}}}}),uc=eb((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/meta/validation",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/validation":!0},$recursiveAnchor:!0,title:"Validation vocabulary meta-schema",type:["object","boolean"],properties:{multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/$defs/nonNegativeInteger"},minLength:{$ref:"#/$defs/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},maxItems:{$ref:"#/$defs/nonNegativeInteger"},minItems:{$ref:"#/$defs/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxContains:{$ref:"#/$defs/nonNegativeInteger"},minContains:{$ref:"#/$defs/nonNegativeInteger",default:1},maxProperties:{$ref:"#/$defs/nonNegativeInteger"},minProperties:{$ref:"#/$defs/nonNegativeIntegerDefault0"},required:{$ref:"#/$defs/stringArray"},dependentRequired:{type:"object",additionalProperties:{$ref:"#/$defs/stringArray"}},const:!0,enum:{type:"array",items:!0},type:{anyOf:[{$ref:"#/$defs/simpleTypes"},{type:"array",items:{$ref:"#/$defs/simpleTypes"},minItems:1,uniqueItems:!0}]}},$defs:{nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{$ref:"#/$defs/nonNegativeInteger",default:0},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}}}}),ul=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=ui(),r=uo(),i=un(),o=ua(),n=us(),a=ud(),s=uc(),d=["/properties"];e.default=function(e){return[t,r,i,o,c(this,n),a,c(this,s)].forEach(e=>this.addMetaSchema(e,void 0,!1)),this;function c(t,r){return e?t.$dataMetaSchema(r,d):r}}}),up=eb((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.MissingRefError=e.ValidationError=e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=e.Ajv2019=void 0;let r=pm(),i=pZ(),o=p3(),n=p7(),a=ur(),s=pX(),d=ul(),c="https://json-schema.org/draft/2019-09/schema";var l=class extends r.default{constructor(e={}){super({...e,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),this.addVocabulary(o.default),i.default.forEach(e=>this.addVocabulary(e)),this.addVocabulary(n.default),this.addVocabulary(a.default),this.opts.discriminator&&this.addKeyword(s.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();let{$data:e,meta:t}=this.opts;t&&(d.default.call(this,e),this.refs["http://json-schema.org/schema"]=c)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(c)?c:void 0)}};e.Ajv2019=l,t.exports=e=l,t.exports.Ajv2019=l,Object.defineProperty(e,"__esModule",{value:!0}),e.default=l;var p=po();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return p.KeywordCxt}});var u=lY();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return u._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return u.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return u.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return u.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return u.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return u.CodeGen}});var m=pn();Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return m.default}});var f=pa();Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return f.default}})}),uu=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=py(),r=pI(),i=pG(),o=p3(),n=p7(),a=ur(),s=pK(),d=pJ();e.default=[o.default,t.default,r.default,(0,i.default)(!0),s.default,d.metadataVocabulary,d.contentVocabulary,n.default,a.default]}),um=eb((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/schema",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/core":!0,"https://json-schema.org/draft/2020-12/vocab/applicator":!0,"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0,"https://json-schema.org/draft/2020-12/vocab/validation":!0,"https://json-schema.org/draft/2020-12/vocab/meta-data":!0,"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0,"https://json-schema.org/draft/2020-12/vocab/content":!0},$dynamicAnchor:"meta",title:"Core and Validation specifications meta-schema",allOf:[{$ref:"meta/core"},{$ref:"meta/applicator"},{$ref:"meta/unevaluated"},{$ref:"meta/validation"},{$ref:"meta/meta-data"},{$ref:"meta/format-annotation"},{$ref:"meta/content"}],type:["object","boolean"],$comment:"This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.",properties:{definitions:{$comment:'"definitions" has been replaced by "$defs".',type:"object",additionalProperties:{$dynamicRef:"#meta"},deprecated:!0,default:{}},dependencies:{$comment:'"dependencies" has been split and replaced by "dependentSchemas" and "dependentRequired" in order to serve their differing semantics.',type:"object",additionalProperties:{anyOf:[{$dynamicRef:"#meta"},{$ref:"meta/validation#/$defs/stringArray"}]},deprecated:!0,default:{}},$recursiveAnchor:{$comment:'"$recursiveAnchor" has been replaced by "$dynamicAnchor".',$ref:"meta/core#/$defs/anchorString",deprecated:!0},$recursiveRef:{$comment:'"$recursiveRef" has been replaced by "$dynamicRef".',$ref:"meta/core#/$defs/uriReferenceString",deprecated:!0}}}}),uf=eb((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/applicator",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/applicator":!0},$dynamicAnchor:"meta",title:"Applicator vocabulary meta-schema",type:["object","boolean"],properties:{prefixItems:{$ref:"#/$defs/schemaArray"},items:{$dynamicRef:"#meta"},contains:{$dynamicRef:"#meta"},additionalProperties:{$dynamicRef:"#meta"},properties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},patternProperties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},propertyNames:{format:"regex"},default:{}},dependentSchemas:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},propertyNames:{$dynamicRef:"#meta"},if:{$dynamicRef:"#meta"},then:{$dynamicRef:"#meta"},else:{$dynamicRef:"#meta"},allOf:{$ref:"#/$defs/schemaArray"},anyOf:{$ref:"#/$defs/schemaArray"},oneOf:{$ref:"#/$defs/schemaArray"},not:{$dynamicRef:"#meta"}},$defs:{schemaArray:{type:"array",minItems:1,items:{$dynamicRef:"#meta"}}}}}),uh=eb((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/unevaluated",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0},$dynamicAnchor:"meta",title:"Unevaluated applicator vocabulary meta-schema",type:["object","boolean"],properties:{unevaluatedItems:{$dynamicRef:"#meta"},unevaluatedProperties:{$dynamicRef:"#meta"}}}}),uy=eb((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/content",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/content":!0},$dynamicAnchor:"meta",title:"Content vocabulary meta-schema",type:["object","boolean"],properties:{contentEncoding:{type:"string"},contentMediaType:{type:"string"},contentSchema:{$dynamicRef:"#meta"}}}}),ug=eb((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/core",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/core":!0},$dynamicAnchor:"meta",title:"Core vocabulary meta-schema",type:["object","boolean"],properties:{$id:{$ref:"#/$defs/uriReferenceString",$comment:"Non-empty fragments not allowed.",pattern:"^[^#]*#?$"},$schema:{$ref:"#/$defs/uriString"},$ref:{$ref:"#/$defs/uriReferenceString"},$anchor:{$ref:"#/$defs/anchorString"},$dynamicRef:{$ref:"#/$defs/uriReferenceString"},$dynamicAnchor:{$ref:"#/$defs/anchorString"},$vocabulary:{type:"object",propertyNames:{$ref:"#/$defs/uriString"},additionalProperties:{type:"boolean"}},$comment:{type:"string"},$defs:{type:"object",additionalProperties:{$dynamicRef:"#meta"}}},$defs:{anchorString:{type:"string",pattern:"^[A-Za-z_][-A-Za-z0-9._]*$"},uriString:{type:"string",format:"uri"},uriReferenceString:{type:"string",format:"uri-reference"}}}}),u_=eb((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/format-annotation",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0},$dynamicAnchor:"meta",title:"Format vocabulary meta-schema for annotation results",type:["object","boolean"],properties:{format:{type:"string"}}}}),uv=eb((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/meta-data",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/meta-data":!0},$dynamicAnchor:"meta",title:"Meta-data vocabulary meta-schema",type:["object","boolean"],properties:{title:{type:"string"},description:{type:"string"},default:!0,deprecated:{type:"boolean",default:!1},readOnly:{type:"boolean",default:!1},writeOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0}}}}),ub=eb((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/validation",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/validation":!0},$dynamicAnchor:"meta",title:"Validation vocabulary meta-schema",type:["object","boolean"],properties:{type:{anyOf:[{$ref:"#/$defs/simpleTypes"},{type:"array",items:{$ref:"#/$defs/simpleTypes"},minItems:1,uniqueItems:!0}]},const:!0,enum:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/$defs/nonNegativeInteger"},minLength:{$ref:"#/$defs/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},maxItems:{$ref:"#/$defs/nonNegativeInteger"},minItems:{$ref:"#/$defs/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxContains:{$ref:"#/$defs/nonNegativeInteger"},minContains:{$ref:"#/$defs/nonNegativeInteger",default:1},maxProperties:{$ref:"#/$defs/nonNegativeInteger"},minProperties:{$ref:"#/$defs/nonNegativeIntegerDefault0"},required:{$ref:"#/$defs/stringArray"},dependentRequired:{type:"object",additionalProperties:{$ref:"#/$defs/stringArray"}}},$defs:{nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{$ref:"#/$defs/nonNegativeInteger",default:0},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}}}}),u$=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=um(),r=uf(),i=uh(),o=uy(),n=ug(),a=u_(),s=uv(),d=ub(),c=["/properties"];e.default=function(e){return[t,r,i,o,n,l(this,a),s,l(this,d)].forEach(e=>this.addMetaSchema(e,void 0,!1)),this;function l(t,r){return e?t.$dataMetaSchema(r,c):r}}}),uS=eb((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.MissingRefError=e.ValidationError=e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=e.Ajv2020=void 0;let r=pm(),i=uu(),o=pX(),n=u$(),a="https://json-schema.org/draft/2020-12/schema";var s=class extends r.default{constructor(e={}){super({...e,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),i.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(o.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();let{$data:e,meta:t}=this.opts;t&&(n.default.call(this,e),this.refs["http://json-schema.org/schema"]=a)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(a)?a:void 0)}};e.Ajv2020=s,t.exports=e=s,t.exports.Ajv2020=s,Object.defineProperty(e,"__esModule",{value:!0}),e.default=s;var d=po();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return d.KeywordCxt}});var c=lY();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return c._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return c.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return c.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return c.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return c.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return c.CodeGen}});var l=pn();Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return l.default}});var p=pa();Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return p.default}})}),uk=eb(e=>{function t(e,t){return{validate:e,compare:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.formatNames=e.fastFormats=e.fullFormats=void 0,e.fullFormats={date:t(o,n),time:t(s(!0),d),"date-time":t(p(!0),u),"iso-time":t(s(),c),"iso-date-time":t(p(),m),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:function(e){return f.test(e)&&h.test(e)},"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:function(e){if(b.test(e))return!1;try{return new RegExp(e),!0}catch(e){return!1}},uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:function(e){return y.lastIndex=0,y.test(e)},int32:{type:"number",validate:function(e){return Number.isInteger(e)&&e<=_&&e>=g}},int64:{type:"number",validate:function(e){return Number.isInteger(e)}},float:{type:"number",validate:v},double:{type:"number",validate:v},password:!0,binary:!0},e.fastFormats={...e.fullFormats,date:t(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,n),time:t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,d),"date-time":t(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,u),"iso-time":t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,c),"iso-date-time":t(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,m),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},e.formatNames=Object.keys(e.fullFormats);let r=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,i=[0,31,28,31,30,31,30,31,31,30,31,30,31];function o(e){var t;let o=r.exec(e);if(!o)return!1;let n=+o[1],a=+o[2],s=+o[3];return a>=1&&a<=12&&s>=1&&s<=(2===a&&(t=n)%4==0&&(t%100!=0||t%400==0)?29:i[a])}function n(e,t){if(e&&t)return e>t?1:e23||l>59||e&&!s)return!1;if(i<=23&&o<=59&&n<60)return!0;let p=o-l*d,u=i-c*d-(p<0);return(23===u||-1===u)&&(59===p||-1===p)&&n<61}}function d(e,t){if(!(e&&t))return;let r=(new Date("2020-01-01T"+e)).valueOf(),i=(new Date("2020-01-01T"+t)).valueOf();if(r&&i)return r-i}function c(e,t){if(!(e&&t))return;let r=a.exec(e),i=a.exec(t);if(r&&i)return(e=r[1]+r[2]+r[3])>(t=i[1]+i[2]+i[3])?1:e{Object.defineProperty(e,"__esModule",{value:!0}),e.formatLimitDefinition=void 0;let t=p1(),r=lY(),i=r.operators,o={formatMaximum:{okStr:"<=",ok:i.LTE,fail:i.GT},formatMinimum:{okStr:">=",ok:i.GTE,fail:i.LT},formatExclusiveMaximum:{okStr:"<",ok:i.LT,fail:i.GTE},formatExclusiveMinimum:{okStr:">",ok:i.GT,fail:i.LTE}};e.formatLimitDefinition={keyword:Object.keys(o),type:"string",schemaType:"string",$data:!0,error:{message:({keyword:e,schemaCode:t})=>(0,r.str)`should be ${o[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,r._)`{comparison: ${o[e].okStr}, limit: ${t}}`},code(e){let i,n,{gen:a,data:s,schemaCode:d,keyword:c,it:l}=e,{opts:p,self:u}=l;if(!p.validateFormats)return;let m=new t.KeywordCxt(l,u.RULES.all.format.definition,"format");function f(e){return(0,r._)`${e}.compare(${s}, ${d}) ${o[c].fail} 0`}m.$data?(i=a.scopeValue("formats",{ref:u.formats,code:p.code.formats}),n=a.const("fmt",(0,r._)`${i}[${m.schemaCode}]`),e.fail$data((0,r.or)((0,r._)`typeof ${n} != "object"`,(0,r._)`${n} instanceof RegExp`,(0,r._)`typeof ${n}.compare != "function"`,f(n)))):function(){let t=m.schema,i=u.formats[t];if(!i||!0===i)return;if("object"!=typeof i||i instanceof RegExp||"function"!=typeof i.compare)throw Error(`"${c}": format "${t}" does not define "compare" function`);let o=a.scopeValue("formats",{key:t,ref:i,code:p.code.formats?(0,r._)`${p.code.formats}${(0,r.getProperty)(t)}`:void 0});e.fail$data(f(o))}()},dependencies:["format"]},e.default=t=>(t.addKeyword(e.formatLimitDefinition),t)}),uV=eb((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0});let r=uk(),i=uw(),o=lY(),n=new o.Name("fullFormats"),a=new o.Name("fastFormats"),s=(e,t={keywords:!0})=>{if(Array.isArray(t))return d(e,t,r.fullFormats,n),e;let[o,s]="fast"===t.mode?[r.fastFormats,a]:[r.fullFormats,n];return d(e,t.formats||r.formatNames,o,s),t.keywords&&(0,i.default)(e),e};function d(e,t,r,i){var n;for(let a of(null!=(n=e.opts.code).formats||(n.formats=(0,o._)`require("ajv-formats/dist/formats").${i}`),t))e.addFormat(a,r[a])}s.get=(e,t="full")=>{let i=("fast"===t?r.fastFormats:r.fullFormats)[e];if(!i)throw Error(`Unknown format "${e}"`);return i},t.exports=e=s,Object.defineProperty(e,"__esModule",{value:!0}),e.default=s}),uP=p1(),uR=up(),uq=uS();let uI=(e$(uV(),1)).default;function ux(e){let t=new e({strict:!1,validateFormats:!0,validateSchema:!1,allErrors:!0});return uI(t),t}var uj=class{_ajv;_ajvDraft7;_ajv2019;_userAjv;constructor(e){this._userAjv=void 0!==e,this._ajv=e}get ajv(){return this._ajv??=ux(uq.Ajv2020)}_engineFor(e){if(this._userAjv)return this.ajv;let t=function(e,t){if(!("$schema"in e)||"string"!=typeof e.$schema)return"2020-12";let r=e.$schema.replace(/#$/,"");if(eS.has(r))return"2020-12";if(ek.has(r))return"2019-09";if(ew.has(r)||eV.has(r))return"draft-7";throw Error(`JSON Schema declares an unsupported dialect ("$schema": "${e.$schema.slice(0,200)}"). The default validator supports JSON Schema 2020-12, 2019-09, draft-07, and draft-06; ${t}`)}(e,"pass a pre-configured Ajv instance to AjvJsonSchemaValidator(ajv) to validate other dialects.");return"2020-12"===t?this.ajv:"2019-09"===t?this._ajv2019??=ux(uR.Ajv2019):this._ajvDraft7??=ux(uP.Ajv)}getValidator(e){let t=this._engineFor(e),r="$id"in e&&"string"==typeof e.$id?t.getSchema(e.$id)??t.compile(e):t.compile(e);return e=>r(e)?{valid:!0,data:e,errorMessage:void 0}:{valid:!1,data:void 0,errorMessage:t.errorsText(r.errors)}}};uP.Ajv;let uC=Symbol.for("mcp.completable");function uT(e){return!!e&&"object"==typeof e&&uC in e}function uO(e,t){if(!Number.isFinite(e)||e<1)return;let r=setInterval(t,Math.min(e,0x7fffffff));return r.unref?.(),r}var uE=class{static{s=e=>e._classification}onclose;onerror;onmessage;_classification;_responseMode;_started=!1;_used=!1;_closed=!1;_terminalDelivered=!1;_dispatchWindowOpen=!1;_requestId;_deferredResponse;_sse;_abortCleanup;_keepAliveMs;constructor(e){this._classification=e.classification,this._responseMode=e.responseMode??"auto",this._keepAliveMs=e.keepAliveMs??15e3}async start(){if(this._started)throw Error("PerRequestHTTPServerTransport is already started");this._started=!0}async handleMessage(e,t){if(this._used)throw Error("PerRequestHTTPServerTransport serves exactly one exchange; construct a new transport per request");if(!this._started||void 0===this.onmessage)throw Error("PerRequestHTTPServerTransport is not connected: connect a server to this transport before handling a message");if(this._closed)throw Error("PerRequestHTTPServerTransport is closed");this._used=!0;let r=t?.request?.signal;if(r?.aborted)throw await this.close(),new cf(cm.ConnectionClosed,"The request was aborted before it could be handled");let i={classification:this._classification,...t?.request!==void 0&&{request:t.request},...t?.authInfo!==void 0&&{authInfo:t.authInfo}};if(ll(e)){let t,o;this._requestId=e.id;let n=new Promise((e,r)=>{t=e,o=r});if(this._deferredResponse={promise:n,resolve:t,reject:o,settled:!1},void 0!==r){let e=()=>void this.close();r.addEventListener("abort",e,{once:!0}),this._abortCleanup=()=>r.removeEventListener("abort",e)}this._dispatchWindowOpen=!0;try{this.onmessage(e,i)}finally{this._dispatchWindowOpen=!1}return"sse"!==this._responseMode||this._closed||this._deferredResponse.settled||this.upgradeToSse(),n}return this.onmessage(e,i),new Response(null,{status:202})}async send(e,t){if(this._closed)return;let r=aE.safeParse(e).success||aA.safeParse(e).success,i=r?e.id:t?.relatedRequestId;if(void 0===this._requestId||void 0===i||i!==this._requestId){r&&this.onerror?.(Error(`Received a response for an unknown request id: ${String(e.id)}`));return}if(r){if(this._terminalDelivered)return;this._terminalDelivered=!0;let t=aA.safeParse(e).success?e.error.code:void 0,r=void 0!==t&&(this._dispatchWindowOpen||t===cG.MissingRequiredClientCapability)?l_[t]:void 0;if(void 0!==r&&void 0===this._sse){this.settleResponse(Response.json(e,{status:r,headers:{"Content-Type":"application/json"}})),queueMicrotask(()=>void this.close());return}if(void 0!==this._sse||"sse"===this._responseMode){void 0===this._sse&&this.upgradeToSse(),this.writeMessageFrame(e),this.finalizeStream();return}this.settleResponse(Response.json(e,{status:200,headers:{"Content-Type":"application/json"}})),queueMicrotask(()=>void this.close());return}"json"!==this._responseMode&&(void 0===this._sse&&this.upgradeToSse(),this.writeMessageFrame(e))}writeCommentFrame(e){if(this._closed||void 0===this._sse||this._sse.closed)return;let t=e.split("\n").map(e=>`: ${e}`).join("\n");this.writeFrame(`${t} + deps: ${i}}`};let o={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(e){let[t,r]=function({schema:e}){let t={},r={};for(let i in e)"__proto__"!==i&&((Array.isArray(e[i])?t:r)[i]=e[i]);return[t,r]}(e);n(e,t),a(e,r)}};function n(e,r=e.schema){let{gen:o,data:a,it:s}=e;if(0===Object.keys(r).length)return;let d=o.let("missing");for(let n in r){let c=r[n];if(0===c.length)continue;let l=(0,i.propertyInData)(o,a,n,s.opts.ownProperties);e.setParams({property:n,depsCount:c.length,deps:c.join(", ")}),s.allErrors?o.if(l,()=>{for(let t of c)(0,i.checkReportMissingProp)(e,t)}):(o.if((0,t._)`${l} && (${(0,i.checkMissingProp)(e,c,d)})`),(0,i.reportMissingProp)(e,d),o.else())}}function a(e,t=e.schema){let{gen:o,data:n,keyword:s,it:d}=e,c=o.name("valid");for(let a in t)(0,r.alwaysValidSchema)(d,t[a])||(o.if((0,i.propertyInData)(o,n,a,d.opts.ownProperties),()=>{let t=e.subschema({keyword:s,schemaProp:a},c);e.mergeValidEvaluated(t,c)},()=>o.var(c,!0)),e.ok(c))}e.validatePropertyDeps=n,e.validateSchemaDeps=a,e.default=o}),pA=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=lY(),r=l1();e.default={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:e})=>(0,t._)`{propertyName: ${e.propertyName}}`},code(e){let{gen:i,schema:o,data:n,it:a}=e;if((0,r.alwaysValidSchema)(a,o))return;let s=i.name("valid");i.forIn("key",n,r=>{e.setParams({propertyName:r}),e.subschema({keyword:"propertyNames",data:r,dataTypes:["string"],propertyName:r,compositeRule:!0},s),i.if((0,t.not)(s),()=>{e.error(!0),a.allErrors||i.break()})}),e.ok(s)}}}),pM=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=l8(),r=lY(),i=l0(),o=l1();e.default={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:e})=>(0,r._)`{additionalProperty: ${e.additionalProperty}}`},code(e){let{gen:n,schema:a,parentSchema:s,data:d,errsCount:c,it:l}=e;if(!c)throw Error("ajv implementation error");let{allErrors:p,opts:u}=l;if(l.props=!0,"all"!==u.removeAdditional&&(0,o.alwaysValidSchema)(l,a))return;let m=(0,t.allSchemaProperties)(s.properties),f=(0,t.allSchemaProperties)(s.patternProperties);function h(e){n.code((0,r._)`delete ${d}[${e}]`)}function y(t){if("all"===u.removeAdditional||u.removeAdditional&&!1===a)return void h(t);if(!1===a){e.setParams({additionalProperty:t}),e.error(),p||n.break();return}if("object"==typeof a&&!(0,o.alwaysValidSchema)(l,a)){let i=n.name("valid");"failing"===u.removeAdditional?(g(t,i,!1),n.if((0,r.not)(i),()=>{e.reset(),h(t)})):(g(t,i),p||n.if((0,r.not)(i),()=>n.break()))}}function g(t,r,i){let n={keyword:"additionalProperties",dataProp:t,dataPropType:o.Type.Str};!1===i&&Object.assign(n,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(n,r)}n.forIn("key",d,i=>{m.length||f.length?n.if(function(i){let a;if(m.length>8){let e=(0,o.schemaRefOrVal)(l,s.properties,"properties");a=(0,t.isOwnProperty)(n,e,i)}else a=m.length?(0,r.or)(...m.map(e=>(0,r._)`${i} === ${e}`)):r.nil;return f.length&&(a=(0,r.or)(a,...f.map(o=>(0,r._)`${(0,t.usePattern)(e,o)}.test(${i})`))),(0,r.not)(a)}(i),()=>y(i)):y(i)}),e.ok((0,r._)`${c} === ${i.default.errors}`)}}}),pW=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=po(),r=l8(),i=l1(),o=pM();e.default={keyword:"properties",type:"object",schemaType:"object",code(e){let{gen:n,schema:a,parentSchema:s,data:d,it:c}=e;"all"===c.opts.removeAdditional&&void 0===s.additionalProperties&&o.default.code(new t.KeywordCxt(c,o.default,"additionalProperties"));let l=(0,r.allSchemaProperties)(a);for(let e of l)c.definedProperties.add(e);c.opts.unevaluated&&l.length&&!0!==c.props&&(c.props=i.mergeEvaluated.props(n,(0,i.toHash)(l),c.props));let p=l.filter(e=>!(0,i.alwaysValidSchema)(c,a[e]));if(0===p.length)return;let u=n.name("valid");for(let t of p){var m;(m=t,c.opts.useDefaults&&!c.compositeRule&&void 0!==a[m].default)?f(t):(n.if((0,r.propertyInData)(n,d,t,c.opts.ownProperties)),f(t),c.allErrors||n.else().var(u,!0),n.endIf()),e.it.definedProperties.add(t),e.ok(u)}function f(t){e.subschema({keyword:"properties",schemaProp:t,dataProp:t},u)}}}}),pN=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=l8(),r=lY(),i=l1(),o=l1();e.default={keyword:"patternProperties",type:"object",schemaType:"object",code(e){let{gen:n,schema:a,data:s,parentSchema:d,it:c}=e,{opts:l}=c,p=(0,t.allSchemaProperties)(a),u=p.filter(e=>(0,i.alwaysValidSchema)(c,a[e]));if(0===p.length||u.length===p.length&&(!c.opts.unevaluated||!0===c.props))return;let m=l.strictSchema&&!l.allowMatchingProperties&&d.properties,f=n.name("valid");!0===c.props||c.props instanceof r.Name||(c.props=(0,o.evaluatedPropsToName)(n,c.props));let{props:h}=c;for(let e of p)m&&function(e){for(let t in m)new RegExp(e).test(t)&&(0,i.checkStrictMode)(c,`property ${t} matches pattern ${e} (use allowMatchingProperties)`)}(e),c.allErrors?y(e):(n.var(f,!0),y(e),n.if(f));function y(i){n.forIn("key",s,a=>{n.if((0,r._)`${(0,t.usePattern)(e,i)}.test(${a})`,()=>{let t=u.includes(i);t||e.subschema({keyword:"patternProperties",schemaProp:i,dataProp:a,dataPropType:o.Type.Str},f),c.opts.unevaluated&&!0!==h?n.assign((0,r._)`${h}[${a}]`,!0):t||c.allErrors||n.if((0,r.not)(f),()=>n.break())})})}}}}),pz=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=l1();e.default={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){let{gen:r,schema:i,it:o}=e;if((0,t.alwaysValidSchema)(o,i))return void e.fail();let n=r.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},n),e.failResult(n,()=>e.reset(),()=>e.error())},error:{message:"must NOT be valid"}}}),pD=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:l8().validateUnion,error:{message:"must match a schema in anyOf"}}}),pF=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=lY(),r=l1();e.default={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:e})=>(0,t._)`{passingSchemas: ${e.passing}}`},code(e){let{gen:i,schema:o,parentSchema:n,it:a}=e;if(!Array.isArray(o))throw Error("ajv implementation error");if(a.opts.discriminator&&n.discriminator)return;let s=i.let("valid",!1),d=i.let("passing",null),c=i.name("_valid");e.setParams({passing:d}),i.block(function(){o.forEach((o,n)=>{let l;(0,r.alwaysValidSchema)(a,o)?i.var(c,!0):l=e.subschema({keyword:"oneOf",schemaProp:n,compositeRule:!0},c),n>0&&i.if((0,t._)`${c} && ${s}`).assign(s,!1).assign(d,(0,t._)`[${d}, ${n}]`).else(),i.if(c,()=>{i.assign(s,!0),i.assign(d,n),l&&e.mergeEvaluated(l,t.Name)})})}),e.result(s,()=>e.reset(),()=>e.error(!0))}}}),pL=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=l1();e.default={keyword:"allOf",schemaType:"array",code(e){let{gen:r,schema:i,it:o}=e;if(!Array.isArray(i))throw Error("ajv implementation error");let n=r.name("valid");i.forEach((r,i)=>{if((0,t.alwaysValidSchema)(o,r))return;let a=e.subschema({keyword:"allOf",schemaProp:i},n);e.ok(n),e.mergeEvaluated(a)})}}}),pU=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=lY(),r=l1();function i(e,t){let i=e.schema[t];return void 0!==i&&!(0,r.alwaysValidSchema)(e,i)}e.default={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:e})=>(0,t.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,t._)`{failingKeyword: ${e.ifClause}}`},code(e){let o,{gen:n,parentSchema:a,it:s}=e;void 0===a.then&&void 0===a.else&&(0,r.checkStrictMode)(s,'"if" without "then" and "else" is ignored');let d=i(s,"then"),c=i(s,"else");if(!d&&!c)return;let l=n.let("valid",!0),p=n.name("_valid");if(o=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},p),e.mergeEvaluated(o),e.reset(),d&&c){let t=n.let("ifClause");e.setParams({ifClause:t}),n.if(p,u("then",t),u("else",t))}else d?n.if(p,u("then")):n.if((0,t.not)(p),u("else"));function u(r,i){return()=>{let o=e.subschema({keyword:r},p);n.assign(l,p),e.mergeValidEvaluated(o,l),i?n.assign(i,(0,t._)`${r}`):e.setParams({ifClause:r})}}e.pass(l,()=>e.error(!0))}}}),pH=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=l1();e.default={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:r,it:i}){void 0===r.if&&(0,t.checkStrictMode)(i,`"${e}" without "if" is ignored`)}}}),pG=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=px(),r=pC(),i=pj(),o=pT(),n=pO(),a=pE(),s=pA(),d=pM(),c=pW(),l=pN(),p=pz(),u=pD(),m=pF(),f=pL(),h=pU(),y=pH();e.default=function(e=!1){let g=[p.default,u.default,m.default,f.default,h.default,y.default,s.default,d.default,a.default,c.default,l.default];return e?g.push(r.default,o.default):g.push(t.default,i.default),g.push(n.default),g}}),pB=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=lY();e.default={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>(0,t.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,t._)`{format: ${e}}`},code(e,r){let i,o,n,a,s,d,{gen:c,data:l,$data:p,schema:u,schemaCode:m,it:f}=e,{opts:h,errSchemaPath:y,schemaEnv:g,self:_}=f;h.validateFormats&&(p?(i=c.scopeValue("formats",{ref:_.formats,code:h.code.formats}),o=c.const("fDef",(0,t._)`${i}[${m}]`),n=c.let("fType"),a=c.let("format"),c.if((0,t._)`typeof ${o} == "object" && !(${o} instanceof RegExp)`,()=>c.assign(n,(0,t._)`${o}.type || "string"`).assign(a,(0,t._)`${o}.validate`),()=>c.assign(n,(0,t._)`"string"`).assign(a,o)),e.fail$data((0,t.or)(!1===h.strictSchema?t.nil:(0,t._)`${m} && !${a}`,(s=g.$async?(0,t._)`(${o}.async ? await ${a}(${l}) : ${a}(${l}))`:(0,t._)`${a}(${l})`,d=(0,t._)`(typeof ${a} == "function" ? ${s} : ${a}.test(${l}))`,(0,t._)`${a} && ${a} !== true && ${n} === ${r} && !${d}`)))):function(){var i;let o,n,a=_.formats[u];if(!a){if(!1===h.strictSchema)return _.logger.warn(s());throw Error(s());function s(){return`unknown format "${u}" ignored in schema at path "${y}"`}}if(!0===a)return;let[d,p,m]=(o=(i=a)instanceof RegExp?(0,t.regexpCode)(i):h.code.formats?(0,t._)`${h.code.formats}${(0,t.getProperty)(u)}`:void 0,n=c.scopeValue("formats",{key:u,ref:i,code:o}),"object"!=typeof i||i instanceof RegExp?["string",i,n]:[i.type||"string",i.validate,(0,t._)`${n}.validate`]);d===r&&e.pass(function(){if("object"==typeof a&&!(a instanceof RegExp)&&a.async){if(!g.$async)throw Error("async format in sync schema");return(0,t._)`await ${m}(${l})`}return"function"==typeof p?(0,t._)`${m}(${l})`:(0,t._)`${m}.test(${l})`}())}())}}}),pK=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=[pB().default]}),pJ=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.contentVocabulary=e.metadataVocabulary=void 0,e.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],e.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]}),pZ=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=py(),r=pI(),i=pG(),o=pK(),n=pJ();e.default=[t.default,r.default,(0,i.default)(),o.default,n.metadataVocabulary,n.contentVocabulary]}),pQ=eb(e=>{var t,r;Object.defineProperty(e,"__esModule",{value:!0}),e.DiscrError=void 0,(r=t||(e.DiscrError=t={})).Tag="tag",r.Mapping="mapping"}),pX=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=lY(),r=pQ(),i=ps(),o=pa(),n=l1();e.default={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:e,tagName:t}})=>e===r.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:r,tagName:i}})=>(0,t._)`{error: ${e}, tag: ${i}, tagValue: ${r}}`},code(e){let{gen:a,data:s,schema:d,parentSchema:c,it:l}=e,{oneOf:p}=c;if(!l.opts.discriminator)throw Error("discriminator: requires discriminator option");let u=d.propertyName;if("string"!=typeof u)throw Error("discriminator: requires propertyName");if(d.mapping)throw Error("discriminator: mapping is not supported");if(!p)throw Error("discriminator: requires oneOf keyword");let m=a.let("valid",!1),f=a.const("tag",(0,t._)`${s}${(0,t.getProperty)(u)}`);a.if((0,t._)`typeof ${f} == "string"`,()=>(function(){let s=function(){var e;let t={},r=s(c),a=!0;for(let t=0;te.error(!1,{discrError:r.DiscrError.Tag,tag:f,tagName:u})),e.ok(m)}}}),pY=eb((e,t)=>{t.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}}),p1=eb((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.MissingRefError=e.ValidationError=e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=e.Ajv=void 0;let r=pm(),i=pZ(),o=pX(),n=pY(),a=["/properties"],s="http://json-schema.org/draft-07/schema";var d=class extends r.default{_addVocabularies(){super._addVocabularies(),i.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(o.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let e=this.opts.$data?this.$dataMetaSchema(n,a):n;this.addMetaSchema(e,s,!1),this.refs["http://json-schema.org/schema"]=s}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(s)?s:void 0)}};e.Ajv=d,t.exports=e=d,t.exports.Ajv=d,Object.defineProperty(e,"__esModule",{value:!0}),e.default=d;var c=po();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return c.KeywordCxt}});var l=lY();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return l._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return l.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return l.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return l.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return l.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return l.CodeGen}});var p=pn();Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return p.default}});var u=pa();Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return u.default}})}),p0=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.dynamicAnchor=void 0;let t=lY(),r=l0(),i=ps(),o=ph();function n(e,n){let{gen:a,it:s}=e;s.schemaEnv.root.dynamicAnchors[n]=!0;let d=(0,t._)`${r.default.dynamicAnchors}${(0,t.getProperty)(n)}`,c="#"===s.errSchemaPath?s.validateName:function(e){let{schemaEnv:t,schema:r,self:n}=e.it,{root:a,baseId:s,localRefs:d,meta:c}=t.root,{schemaId:l}=n.opts,p=new i.SchemaEnv({schema:r,schemaId:l,root:a,baseId:s,localRefs:d,meta:c});return i.compileSchema.call(n,p),(0,o.getValidate)(e,p)}(e);a.if((0,t._)`!${d}`,()=>a.assign(d,c))}e.dynamicAnchor=n,e.default={keyword:"$dynamicAnchor",schemaType:"string",code:e=>n(e,e.schema)}}),p2=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.dynamicRef=void 0;let t=lY(),r=l0(),i=ph();function o(e,o){let{gen:n,keyword:a,it:s}=e;if("#"!==o[0])throw Error(`"${a}" only supports hash fragment reference`);let d=o.slice(1);if(s.allErrors)c();else{let t=n.let("valid",!1);c(t),e.ok(t)}function c(e){if(s.schemaEnv.root.dynamicAnchors[d]){let i=n.let("_v",(0,t._)`${r.default.dynamicAnchors}${(0,t.getProperty)(d)}`);n.if(i,l(i,e),l(s.validateName,e))}else l(s.validateName,e)()}function l(t,r){return r?()=>n.block(()=>{(0,i.callRef)(e,t),n.let(r,!0)}):()=>(0,i.callRef)(e,t)}}e.dynamicRef=o,e.default={keyword:"$dynamicRef",schemaType:"string",code:e=>o(e,e.schema)}}),p4=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=p0(),r=l1();e.default={keyword:"$recursiveAnchor",schemaType:"boolean",code(e){e.schema?(0,t.dynamicAnchor)(e,""):(0,r.checkStrictMode)(e.it,"$recursiveAnchor: false is ignored")}}}),p6=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=p2();e.default={keyword:"$recursiveRef",schemaType:"string",code:e=>(0,t.dynamicRef)(e,e.schema)}}),p3=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=p0(),r=p2(),i=p4(),o=p6();e.default=[t.default,r.default,i.default,o.default]}),p9=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=pE();e.default={keyword:"dependentRequired",type:"object",schemaType:"object",error:t.error,code:e=>(0,t.validatePropertyDeps)(e)}}),p5=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=pE();e.default={keyword:"dependentSchemas",type:"object",schemaType:"object",code:e=>(0,t.validateSchemaDeps)(e)}}),p8=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=l1();e.default={keyword:["maxContains","minContains"],type:"array",schemaType:"number",code({keyword:e,parentSchema:r,it:i}){void 0===r.contains&&(0,t.checkStrictMode)(i,`"${e}" without "contains" is ignored`)}}}),p7=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=p9(),r=p5(),i=p8();e.default=[t.default,r.default,i.default]}),ue=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=lY(),r=l1(),i=l0();e.default={keyword:"unevaluatedProperties",type:"object",schemaType:["boolean","object"],trackErrors:!0,error:{message:"must NOT have unevaluated properties",params:({params:e})=>(0,t._)`{unevaluatedProperty: ${e.unevaluatedProperty}}`},code(e){let{gen:o,schema:n,data:a,errsCount:s,it:d}=e;if(!s)throw Error("ajv implementation error");let{allErrors:c,props:l}=d;function p(i){if(!1===n){e.setParams({unevaluatedProperty:i}),e.error(),c||o.break();return}if(!(0,r.alwaysValidSchema)(d,n)){let n=o.name("valid");e.subschema({keyword:"unevaluatedProperties",dataProp:i,dataPropType:r.Type.Str},n),c||o.if((0,t.not)(n),()=>o.break())}}l instanceof t.Name?o.if((0,t._)`${l} !== true`,()=>o.forIn("key",a,e=>{var r,i;return o.if((r=l,i=e,(0,t._)`!${r} || !${r}[${i}]`),()=>p(e))})):!0!==l&&o.forIn("key",a,e=>void 0===l?p(e):o.if(function(e,r){let i=[];for(let o in e)!0===e[o]&&i.push((0,t._)`${r} !== ${o}`);return(0,t.and)(...i)}(l,e),()=>p(e))),d.props=!0,e.ok((0,t._)`${s} === ${i.default.errors}`)}}}),ut=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=lY(),r=l1();e.default={keyword:"unevaluatedItems",type:"array",schemaType:["boolean","object"],error:{message:({params:{len:e}})=>(0,t.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,t._)`{limit: ${e}}`},code(e){let{gen:i,schema:o,data:n,it:a}=e,s=a.items||0;if(!0===s)return;let d=i.const("len",(0,t._)`${n}.length`);if(!1===o)e.setParams({len:s}),e.fail((0,t._)`${d} > ${s}`);else if("object"==typeof o&&!(0,r.alwaysValidSchema)(a,o)){let o=i.var("valid",(0,t._)`${d} <= ${s}`);i.if((0,t.not)(o),()=>{var n,c;return n=o,c=s,void i.forRange("i",c,d,o=>{e.subschema({keyword:"unevaluatedItems",dataProp:o,dataPropType:r.Type.Num},n),a.allErrors||i.if((0,t.not)(n),()=>i.break())})}),e.ok(o)}a.items=!0}}}),ur=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=ue(),r=ut();e.default=[t.default,r.default]}),ui=eb((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/schema",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/core":!0,"https://json-schema.org/draft/2019-09/vocab/applicator":!0,"https://json-schema.org/draft/2019-09/vocab/validation":!0,"https://json-schema.org/draft/2019-09/vocab/meta-data":!0,"https://json-schema.org/draft/2019-09/vocab/format":!1,"https://json-schema.org/draft/2019-09/vocab/content":!0},$recursiveAnchor:!0,title:"Core and Validation specifications meta-schema",allOf:[{$ref:"meta/core"},{$ref:"meta/applicator"},{$ref:"meta/validation"},{$ref:"meta/meta-data"},{$ref:"meta/format"},{$ref:"meta/content"}],type:["object","boolean"],properties:{definitions:{$comment:"While no longer an official keyword as it is replaced by $defs, this keyword is retained in the meta-schema to prevent incompatible extensions as it remains in common use.",type:"object",additionalProperties:{$recursiveRef:"#"},default:{}},dependencies:{$comment:'"dependencies" is no longer a keyword, but schema authors should avoid redefining it to facilitate a smooth transition to "dependentSchemas" and "dependentRequired"',type:"object",additionalProperties:{anyOf:[{$recursiveRef:"#"},{$ref:"meta/validation#/$defs/stringArray"}]}}}}}),uo=eb((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/meta/applicator",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/applicator":!0},$recursiveAnchor:!0,title:"Applicator vocabulary meta-schema",type:["object","boolean"],properties:{additionalItems:{$recursiveRef:"#"},unevaluatedItems:{$recursiveRef:"#"},items:{anyOf:[{$recursiveRef:"#"},{$ref:"#/$defs/schemaArray"}]},contains:{$recursiveRef:"#"},additionalProperties:{$recursiveRef:"#"},unevaluatedProperties:{$recursiveRef:"#"},properties:{type:"object",additionalProperties:{$recursiveRef:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$recursiveRef:"#"},propertyNames:{format:"regex"},default:{}},dependentSchemas:{type:"object",additionalProperties:{$recursiveRef:"#"}},propertyNames:{$recursiveRef:"#"},if:{$recursiveRef:"#"},then:{$recursiveRef:"#"},else:{$recursiveRef:"#"},allOf:{$ref:"#/$defs/schemaArray"},anyOf:{$ref:"#/$defs/schemaArray"},oneOf:{$ref:"#/$defs/schemaArray"},not:{$recursiveRef:"#"}},$defs:{schemaArray:{type:"array",minItems:1,items:{$recursiveRef:"#"}}}}}),un=eb((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/meta/content",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/content":!0},$recursiveAnchor:!0,title:"Content vocabulary meta-schema",type:["object","boolean"],properties:{contentMediaType:{type:"string"},contentEncoding:{type:"string"},contentSchema:{$recursiveRef:"#"}}}}),ua=eb((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/meta/core",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/core":!0},$recursiveAnchor:!0,title:"Core vocabulary meta-schema",type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference",$comment:"Non-empty fragments not allowed.",pattern:"^[^#]*#?$"},$schema:{type:"string",format:"uri"},$anchor:{type:"string",pattern:"^[A-Za-z][-A-Za-z0-9.:_]*$"},$ref:{type:"string",format:"uri-reference"},$recursiveRef:{type:"string",format:"uri-reference"},$recursiveAnchor:{type:"boolean",default:!1},$vocabulary:{type:"object",propertyNames:{type:"string",format:"uri"},additionalProperties:{type:"boolean"}},$comment:{type:"string"},$defs:{type:"object",additionalProperties:{$recursiveRef:"#"},default:{}}}}}),us=eb((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/meta/format",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/format":!0},$recursiveAnchor:!0,title:"Format vocabulary meta-schema",type:["object","boolean"],properties:{format:{type:"string"}}}}),ud=eb((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/meta/meta-data",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/meta-data":!0},$recursiveAnchor:!0,title:"Meta-data vocabulary meta-schema",type:["object","boolean"],properties:{title:{type:"string"},description:{type:"string"},default:!0,deprecated:{type:"boolean",default:!1},readOnly:{type:"boolean",default:!1},writeOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0}}}}),uc=eb((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/meta/validation",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/validation":!0},$recursiveAnchor:!0,title:"Validation vocabulary meta-schema",type:["object","boolean"],properties:{multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/$defs/nonNegativeInteger"},minLength:{$ref:"#/$defs/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},maxItems:{$ref:"#/$defs/nonNegativeInteger"},minItems:{$ref:"#/$defs/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxContains:{$ref:"#/$defs/nonNegativeInteger"},minContains:{$ref:"#/$defs/nonNegativeInteger",default:1},maxProperties:{$ref:"#/$defs/nonNegativeInteger"},minProperties:{$ref:"#/$defs/nonNegativeIntegerDefault0"},required:{$ref:"#/$defs/stringArray"},dependentRequired:{type:"object",additionalProperties:{$ref:"#/$defs/stringArray"}},const:!0,enum:{type:"array",items:!0},type:{anyOf:[{$ref:"#/$defs/simpleTypes"},{type:"array",items:{$ref:"#/$defs/simpleTypes"},minItems:1,uniqueItems:!0}]}},$defs:{nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{$ref:"#/$defs/nonNegativeInteger",default:0},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}}}}),ul=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=ui(),r=uo(),i=un(),o=ua(),n=us(),a=ud(),s=uc(),d=["/properties"];e.default=function(e){return[t,r,i,o,c(this,n),a,c(this,s)].forEach(e=>this.addMetaSchema(e,void 0,!1)),this;function c(t,r){return e?t.$dataMetaSchema(r,d):r}}}),up=eb((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.MissingRefError=e.ValidationError=e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=e.Ajv2019=void 0;let r=pm(),i=pZ(),o=p3(),n=p7(),a=ur(),s=pX(),d=ul(),c="https://json-schema.org/draft/2019-09/schema";var l=class extends r.default{constructor(e={}){super({...e,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),this.addVocabulary(o.default),i.default.forEach(e=>this.addVocabulary(e)),this.addVocabulary(n.default),this.addVocabulary(a.default),this.opts.discriminator&&this.addKeyword(s.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();let{$data:e,meta:t}=this.opts;t&&(d.default.call(this,e),this.refs["http://json-schema.org/schema"]=c)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(c)?c:void 0)}};e.Ajv2019=l,t.exports=e=l,t.exports.Ajv2019=l,Object.defineProperty(e,"__esModule",{value:!0}),e.default=l;var p=po();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return p.KeywordCxt}});var u=lY();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return u._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return u.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return u.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return u.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return u.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return u.CodeGen}});var m=pn();Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return m.default}});var f=pa();Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return f.default}})}),uu=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=py(),r=pI(),i=pG(),o=p3(),n=p7(),a=ur(),s=pK(),d=pJ();e.default=[o.default,t.default,r.default,(0,i.default)(!0),s.default,d.metadataVocabulary,d.contentVocabulary,n.default,a.default]}),um=eb((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/schema",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/core":!0,"https://json-schema.org/draft/2020-12/vocab/applicator":!0,"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0,"https://json-schema.org/draft/2020-12/vocab/validation":!0,"https://json-schema.org/draft/2020-12/vocab/meta-data":!0,"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0,"https://json-schema.org/draft/2020-12/vocab/content":!0},$dynamicAnchor:"meta",title:"Core and Validation specifications meta-schema",allOf:[{$ref:"meta/core"},{$ref:"meta/applicator"},{$ref:"meta/unevaluated"},{$ref:"meta/validation"},{$ref:"meta/meta-data"},{$ref:"meta/format-annotation"},{$ref:"meta/content"}],type:["object","boolean"],$comment:"This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.",properties:{definitions:{$comment:'"definitions" has been replaced by "$defs".',type:"object",additionalProperties:{$dynamicRef:"#meta"},deprecated:!0,default:{}},dependencies:{$comment:'"dependencies" has been split and replaced by "dependentSchemas" and "dependentRequired" in order to serve their differing semantics.',type:"object",additionalProperties:{anyOf:[{$dynamicRef:"#meta"},{$ref:"meta/validation#/$defs/stringArray"}]},deprecated:!0,default:{}},$recursiveAnchor:{$comment:'"$recursiveAnchor" has been replaced by "$dynamicAnchor".',$ref:"meta/core#/$defs/anchorString",deprecated:!0},$recursiveRef:{$comment:'"$recursiveRef" has been replaced by "$dynamicRef".',$ref:"meta/core#/$defs/uriReferenceString",deprecated:!0}}}}),uf=eb((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/applicator",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/applicator":!0},$dynamicAnchor:"meta",title:"Applicator vocabulary meta-schema",type:["object","boolean"],properties:{prefixItems:{$ref:"#/$defs/schemaArray"},items:{$dynamicRef:"#meta"},contains:{$dynamicRef:"#meta"},additionalProperties:{$dynamicRef:"#meta"},properties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},patternProperties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},propertyNames:{format:"regex"},default:{}},dependentSchemas:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},propertyNames:{$dynamicRef:"#meta"},if:{$dynamicRef:"#meta"},then:{$dynamicRef:"#meta"},else:{$dynamicRef:"#meta"},allOf:{$ref:"#/$defs/schemaArray"},anyOf:{$ref:"#/$defs/schemaArray"},oneOf:{$ref:"#/$defs/schemaArray"},not:{$dynamicRef:"#meta"}},$defs:{schemaArray:{type:"array",minItems:1,items:{$dynamicRef:"#meta"}}}}}),uh=eb((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/unevaluated",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0},$dynamicAnchor:"meta",title:"Unevaluated applicator vocabulary meta-schema",type:["object","boolean"],properties:{unevaluatedItems:{$dynamicRef:"#meta"},unevaluatedProperties:{$dynamicRef:"#meta"}}}}),uy=eb((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/content",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/content":!0},$dynamicAnchor:"meta",title:"Content vocabulary meta-schema",type:["object","boolean"],properties:{contentEncoding:{type:"string"},contentMediaType:{type:"string"},contentSchema:{$dynamicRef:"#meta"}}}}),ug=eb((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/core",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/core":!0},$dynamicAnchor:"meta",title:"Core vocabulary meta-schema",type:["object","boolean"],properties:{$id:{$ref:"#/$defs/uriReferenceString",$comment:"Non-empty fragments not allowed.",pattern:"^[^#]*#?$"},$schema:{$ref:"#/$defs/uriString"},$ref:{$ref:"#/$defs/uriReferenceString"},$anchor:{$ref:"#/$defs/anchorString"},$dynamicRef:{$ref:"#/$defs/uriReferenceString"},$dynamicAnchor:{$ref:"#/$defs/anchorString"},$vocabulary:{type:"object",propertyNames:{$ref:"#/$defs/uriString"},additionalProperties:{type:"boolean"}},$comment:{type:"string"},$defs:{type:"object",additionalProperties:{$dynamicRef:"#meta"}}},$defs:{anchorString:{type:"string",pattern:"^[A-Za-z_][-A-Za-z0-9._]*$"},uriString:{type:"string",format:"uri"},uriReferenceString:{type:"string",format:"uri-reference"}}}}),u_=eb((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/format-annotation",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0},$dynamicAnchor:"meta",title:"Format vocabulary meta-schema for annotation results",type:["object","boolean"],properties:{format:{type:"string"}}}}),uv=eb((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/meta-data",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/meta-data":!0},$dynamicAnchor:"meta",title:"Meta-data vocabulary meta-schema",type:["object","boolean"],properties:{title:{type:"string"},description:{type:"string"},default:!0,deprecated:{type:"boolean",default:!1},readOnly:{type:"boolean",default:!1},writeOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0}}}}),ub=eb((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/validation",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/validation":!0},$dynamicAnchor:"meta",title:"Validation vocabulary meta-schema",type:["object","boolean"],properties:{type:{anyOf:[{$ref:"#/$defs/simpleTypes"},{type:"array",items:{$ref:"#/$defs/simpleTypes"},minItems:1,uniqueItems:!0}]},const:!0,enum:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/$defs/nonNegativeInteger"},minLength:{$ref:"#/$defs/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},maxItems:{$ref:"#/$defs/nonNegativeInteger"},minItems:{$ref:"#/$defs/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxContains:{$ref:"#/$defs/nonNegativeInteger"},minContains:{$ref:"#/$defs/nonNegativeInteger",default:1},maxProperties:{$ref:"#/$defs/nonNegativeInteger"},minProperties:{$ref:"#/$defs/nonNegativeIntegerDefault0"},required:{$ref:"#/$defs/stringArray"},dependentRequired:{type:"object",additionalProperties:{$ref:"#/$defs/stringArray"}}},$defs:{nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{$ref:"#/$defs/nonNegativeInteger",default:0},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}}}}),u$=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=um(),r=uf(),i=uh(),o=uy(),n=ug(),a=u_(),s=uv(),d=ub(),c=["/properties"];e.default=function(e){return[t,r,i,o,n,l(this,a),s,l(this,d)].forEach(e=>this.addMetaSchema(e,void 0,!1)),this;function l(t,r){return e?t.$dataMetaSchema(r,c):r}}}),uS=eb((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.MissingRefError=e.ValidationError=e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=e.Ajv2020=void 0;let r=pm(),i=uu(),o=pX(),n=u$(),a="https://json-schema.org/draft/2020-12/schema";var s=class extends r.default{constructor(e={}){super({...e,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),i.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(o.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();let{$data:e,meta:t}=this.opts;t&&(n.default.call(this,e),this.refs["http://json-schema.org/schema"]=a)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(a)?a:void 0)}};e.Ajv2020=s,t.exports=e=s,t.exports.Ajv2020=s,Object.defineProperty(e,"__esModule",{value:!0}),e.default=s;var d=po();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return d.KeywordCxt}});var c=lY();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return c._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return c.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return c.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return c.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return c.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return c.CodeGen}});var l=pn();Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return l.default}});var p=pa();Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return p.default}})}),uk=eb(e=>{function t(e,t){return{validate:e,compare:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.formatNames=e.fastFormats=e.fullFormats=void 0,e.fullFormats={date:t(o,n),time:t(s(!0),d),"date-time":t(p(!0),u),"iso-time":t(s(),c),"iso-date-time":t(p(),m),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:function(e){return f.test(e)&&h.test(e)},"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:function(e){if(b.test(e))return!1;try{return new RegExp(e),!0}catch(e){return!1}},uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:function(e){return y.lastIndex=0,y.test(e)},int32:{type:"number",validate:function(e){return Number.isInteger(e)&&e<=_&&e>=g}},int64:{type:"number",validate:function(e){return Number.isInteger(e)}},float:{type:"number",validate:v},double:{type:"number",validate:v},password:!0,binary:!0},e.fastFormats={...e.fullFormats,date:t(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,n),time:t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,d),"date-time":t(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,u),"iso-time":t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,c),"iso-date-time":t(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,m),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},e.formatNames=Object.keys(e.fullFormats);let r=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,i=[0,31,28,31,30,31,30,31,31,30,31,30,31];function o(e){var t;let o=r.exec(e);if(!o)return!1;let n=+o[1],a=+o[2],s=+o[3];return a>=1&&a<=12&&s>=1&&s<=(2===a&&(t=n)%4==0&&(t%100!=0||t%400==0)?29:i[a])}function n(e,t){if(e&&t)return e>t?1:e23||l>59||e&&!s)return!1;if(i<=23&&o<=59&&n<60)return!0;let p=o-l*d,u=i-c*d-(p<0);return(23===u||-1===u)&&(59===p||-1===p)&&n<61}}function d(e,t){if(!(e&&t))return;let r=(new Date("2020-01-01T"+e)).valueOf(),i=(new Date("2020-01-01T"+t)).valueOf();if(r&&i)return r-i}function c(e,t){if(!(e&&t))return;let r=a.exec(e),i=a.exec(t);if(r&&i)return(e=r[1]+r[2]+r[3])>(t=i[1]+i[2]+i[3])?1:e{Object.defineProperty(e,"__esModule",{value:!0}),e.formatLimitDefinition=void 0;let t=p1(),r=lY(),i=r.operators,o={formatMaximum:{okStr:"<=",ok:i.LTE,fail:i.GT},formatMinimum:{okStr:">=",ok:i.GTE,fail:i.LT},formatExclusiveMaximum:{okStr:"<",ok:i.LT,fail:i.GTE},formatExclusiveMinimum:{okStr:">",ok:i.GT,fail:i.LTE}};e.formatLimitDefinition={keyword:Object.keys(o),type:"string",schemaType:"string",$data:!0,error:{message:({keyword:e,schemaCode:t})=>(0,r.str)`should be ${o[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,r._)`{comparison: ${o[e].okStr}, limit: ${t}}`},code(e){let i,n,{gen:a,data:s,schemaCode:d,keyword:c,it:l}=e,{opts:p,self:u}=l;if(!p.validateFormats)return;let m=new t.KeywordCxt(l,u.RULES.all.format.definition,"format");function f(e){return(0,r._)`${e}.compare(${s}, ${d}) ${o[c].fail} 0`}m.$data?(i=a.scopeValue("formats",{ref:u.formats,code:p.code.formats}),n=a.const("fmt",(0,r._)`${i}[${m.schemaCode}]`),e.fail$data((0,r.or)((0,r._)`typeof ${n} != "object"`,(0,r._)`${n} instanceof RegExp`,(0,r._)`typeof ${n}.compare != "function"`,f(n)))):function(){let t=m.schema,i=u.formats[t];if(!i||!0===i)return;if("object"!=typeof i||i instanceof RegExp||"function"!=typeof i.compare)throw Error(`"${c}": format "${t}" does not define "compare" function`);let o=a.scopeValue("formats",{key:t,ref:i,code:p.code.formats?(0,r._)`${p.code.formats}${(0,r.getProperty)(t)}`:void 0});e.fail$data(f(o))}()},dependencies:["format"]},e.default=t=>(t.addKeyword(e.formatLimitDefinition),t)}),uR=eb((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0});let r=uk(),i=uw(),o=lY(),n=new o.Name("fullFormats"),a=new o.Name("fastFormats"),s=(e,t={keywords:!0})=>{if(Array.isArray(t))return d(e,t,r.fullFormats,n),e;let[o,s]="fast"===t.mode?[r.fastFormats,a]:[r.fullFormats,n];return d(e,t.formats||r.formatNames,o,s),t.keywords&&(0,i.default)(e),e};function d(e,t,r,i){var n;for(let a of(null!=(n=e.opts.code).formats||(n.formats=(0,o._)`require("ajv-formats/dist/formats").${i}`),t))e.addFormat(a,r[a])}s.get=(e,t="full")=>{let i=("fast"===t?r.fastFormats:r.fullFormats)[e];if(!i)throw Error(`Unknown format "${e}"`);return i},t.exports=e=s,Object.defineProperty(e,"__esModule",{value:!0}),e.default=s}),uP=p1(),uV=up(),uq=uS();let uI=(e$(uR(),1)).default;function ux(e){let t=new e({strict:!1,validateFormats:!0,validateSchema:!1,allErrors:!0});return uI(t),t}var uj=class{_ajv;_ajvDraft7;_ajv2019;_userAjv;constructor(e){this._userAjv=void 0!==e,this._ajv=e}get ajv(){return this._ajv??=ux(uq.Ajv2020)}_engineFor(e){if(this._userAjv)return this.ajv;let t=function(e,t){if(!("$schema"in e)||"string"!=typeof e.$schema)return"2020-12";let r=e.$schema.replace(/#$/,"");if(eS.has(r))return"2020-12";if(ek.has(r))return"2019-09";if(ew.has(r)||eR.has(r))return"draft-7";throw Error(`JSON Schema declares an unsupported dialect ("$schema": "${e.$schema.slice(0,200)}"). The default validator supports JSON Schema 2020-12, 2019-09, draft-07, and draft-06; ${t}`)}(e,"pass a pre-configured Ajv instance to AjvJsonSchemaValidator(ajv) to validate other dialects.");return"2020-12"===t?this.ajv:"2019-09"===t?this._ajv2019??=ux(uV.Ajv2019):this._ajvDraft7??=ux(uP.Ajv)}getValidator(e){let t=this._engineFor(e),r="$id"in e&&"string"==typeof e.$id?t.getSchema(e.$id)??t.compile(e):t.compile(e);return e=>r(e)?{valid:!0,data:e,errorMessage:void 0}:{valid:!1,data:void 0,errorMessage:t.errorsText(r.errors)}}};uP.Ajv;let uC=Symbol.for("mcp.completable");function uT(e){return!!e&&"object"==typeof e&&uC in e}function uO(e,t){if(!Number.isFinite(e)||e<1)return;let r=setInterval(t,Math.min(e,0x7fffffff));return r.unref?.(),r}var uE=class{static{s=e=>e._classification}onclose;onerror;onmessage;_classification;_responseMode;_started=!1;_used=!1;_closed=!1;_terminalDelivered=!1;_dispatchWindowOpen=!1;_requestId;_deferredResponse;_sse;_abortCleanup;_keepAliveMs;constructor(e){this._classification=e.classification,this._responseMode=e.responseMode??"auto",this._keepAliveMs=e.keepAliveMs??15e3}async start(){if(this._started)throw Error("PerRequestHTTPServerTransport is already started");this._started=!0}async handleMessage(e,t){if(this._used)throw Error("PerRequestHTTPServerTransport serves exactly one exchange; construct a new transport per request");if(!this._started||void 0===this.onmessage)throw Error("PerRequestHTTPServerTransport is not connected: connect a server to this transport before handling a message");if(this._closed)throw Error("PerRequestHTTPServerTransport is closed");this._used=!0;let r=t?.request?.signal;if(r?.aborted)throw await this.close(),new cf(cm.ConnectionClosed,"The request was aborted before it could be handled");let i={classification:this._classification,...t?.request!==void 0&&{request:t.request},...t?.authInfo!==void 0&&{authInfo:t.authInfo}};if(ll(e)){let t,o;this._requestId=e.id;let n=new Promise((e,r)=>{t=e,o=r});if(this._deferredResponse={promise:n,resolve:t,reject:o,settled:!1},void 0!==r){let e=()=>void this.close();r.addEventListener("abort",e,{once:!0}),this._abortCleanup=()=>r.removeEventListener("abort",e)}this._dispatchWindowOpen=!0;try{this.onmessage(e,i)}finally{this._dispatchWindowOpen=!1}return"sse"!==this._responseMode||this._closed||this._deferredResponse.settled||this.upgradeToSse(),n}return this.onmessage(e,i),new Response(null,{status:202})}async send(e,t){if(this._closed)return;let r=aE.safeParse(e).success||aA.safeParse(e).success,i=r?e.id:t?.relatedRequestId;if(void 0===this._requestId||void 0===i||i!==this._requestId){r&&this.onerror?.(Error(`Received a response for an unknown request id: ${String(e.id)}`));return}if(r){if(this._terminalDelivered)return;this._terminalDelivered=!0;let t=aA.safeParse(e).success?e.error.code:void 0,r=void 0!==t&&(this._dispatchWindowOpen||t===cG.MissingRequiredClientCapability)?l_[t]:void 0;if(void 0!==r&&void 0===this._sse){this.settleResponse(Response.json(e,{status:r,headers:{"Content-Type":"application/json"}})),queueMicrotask(()=>void this.close());return}if(void 0!==this._sse||"sse"===this._responseMode){void 0===this._sse&&this.upgradeToSse(),this.writeMessageFrame(e),this.finalizeStream();return}this.settleResponse(Response.json(e,{status:200,headers:{"Content-Type":"application/json"}})),queueMicrotask(()=>void this.close());return}"json"!==this._responseMode&&(void 0===this._sse&&this.upgradeToSse(),this.writeMessageFrame(e))}writeCommentFrame(e){if(this._closed||void 0===this._sse||this._sse.closed)return;let t=e.split("\n").map(e=>`: ${e}`).join("\n");this.writeFrame(`${t} `)}async close(){if(!this._closed){if(this._closed=!0,this._abortCleanup?.(),this._abortCleanup=void 0,this._sse?.keepAliveTimer!==void 0&&clearInterval(this._sse.keepAliveTimer),void 0!==this._sse&&!this._sse.closed){this._sse.closed=!0;try{this._sse.controller.close()}catch{}}void 0===this._deferredResponse||this._deferredResponse.settled||(this._deferredResponse.settled=!0,this._deferredResponse.reject(new cf(cm.ConnectionClosed,"Connection closed before a response was produced"))),this.onclose?.()}}settleResponse(e){void 0===this._deferredResponse||this._deferredResponse.settled||(this._deferredResponse.settled=!0,this._deferredResponse.resolve(e))}upgradeToSse(){let e,t=new ReadableStream({start:t=>{e=t},cancel:()=>{this.close()}});this._sse={controller:e,encoder:new TextEncoder,closed:!1},this._sse.keepAliveTimer=uO(this._keepAliveMs,()=>this.writeCommentFrame("keepalive")),this.settleResponse(new Response(t,{status:200,headers:{"Content-Type":"text/event-stream","Cache-Control":"no-cache, no-transform",Connection:"keep-alive","X-Accel-Buffering":"no"}}))}finalizeStream(){if(this._sse?.keepAliveTimer!==void 0&&clearInterval(this._sse.keepAliveTimer),void 0!==this._sse&&!this._sse.closed){this._sse.closed=!0;try{this._sse.controller.close()}catch{}}queueMicrotask(()=>void this.close())}writeMessageFrame(e){this.writeFrame(`event: message data: ${JSON.stringify(e)} -`)}writeFrame(e){if(void 0!==this._sse&&!this._sse.closed)try{this._sse.controller.enqueue(this._sse.encoder.encode(e))}catch(e){this.onerror?.(Error(`Failed to write to the response stream: ${e}`))}}};function uA(e){return e.replaceAll(/[\\"]/g,String.raw`\$&`).replaceAll(/[^\u0020-\u007E]/g," ")}function uW(e,t,r,i){let o=`Bearer error="${uA(e)}", error_description="${uA(t)}"`;return r.length>0&&(o+=`, scope="${uA(r.join(" "))}"`),i&&(o+=`, resource_metadata="${uA(i)}"`),o}function uM(e,t,r){if(null===r||"object"!=typeof r||"string"!=typeof r.method)throw new cB(cG.InternalError,`Handler for ${e} returned an invalid input request '${t}': each inputRequests entry must be an embedded elicitation/create, sampling/createMessage, or roots/list request`);let i=function(e){switch(e.method){case"elicitation/create":if(e.params?.mode==="url")return{elicitation:{url:{}}};return{elicitation:{form:{}}};case"sampling/createMessage":{let t=e.params;if(void 0!==t&&(void 0!==t.tools||void 0!==t.toolChoice))return{sampling:{tools:{}}};return{sampling:{}}}case"roots/list":return{roots:{}};default:return}}(r);if(void 0===i)throw new cB(cG.InternalError,`Handler for ${e} returned an input request '${t}' of kind '${r.method}', which is not an embedded request the 2026-07-28 revision defines`);return{embedded:r,required:i}}function uN(e,t){if("tools/call"===e)return{content:[{type:"text",text:t}],isError:!0};throw new cB(cG.InternalError,t)}var uz=class{constructor(e){this._host=e}async fulfill(e,t,r,i,o){let{maxRounds:n,roundTimeoutMs:a}=this._host,s=i.mcpReq.signal,d=o,c=0;for(;;){let o;if((c+=1)>n)return uN(e,`Multi-round-trip request '${e}' still required input after ${n} rounds (inputRequired.maxRounds)`);let l=d.inputRequests,p=null!=l&&Object.keys(l).length>0,u="string"==typeof d.requestState?d.requestState:void 0;if(!p&&void 0===u)throw new cB(cG.InternalError,`Handler for ${e} returned an input-required result with neither inputRequests nor requestState (every InputRequiredResult must include at least one of the two)`);if(p){let t=this._host.resolvedClientCapabilities(i),r=[];for(let[i,o]of Object.entries(l)){let{embedded:n,required:a}=uM(e,i,o);if("roots/list"!==n.method&&void 0===n.params)throw new cB(cG.InternalError,`Handler for ${e} returned an input request '${i}' of kind '${n.method}' without params`);if(void 0!==cy(a,t))return uN(e,`Cannot request input '${i}' (${n.method}): the client on this 2025-era connection did not declare the required capability${void 0===t?" (no client capabilities are available on this connection — per-request legacy serving cannot receive server-to-client requests)":""}`);r.push([i,n])}let n=function(e){let t=new AbortController,r=()=>t.abort(e?.reason);return e?.addEventListener("abort",r,{once:!0}),e?.aborted&&t.abort(e.reason),{signal:t.signal,abort:e=>t.abort(e),dispose:()=>e?.removeEventListener("abort",r)}}(s);try{let e={relatedRequestId:i.mcpReq.id,timeout:a,resetTimeoutOnProgress:!0,onprogress:()=>{},signal:n.signal},t=await Promise.all(r.map(async([t,r])=>{try{return[t,await this._dispatchLeg(r,e)]}catch(e){throw n.abort(e),e}}));o=Object.fromEntries(t)}catch(t){if(s.aborted)throw t;return uN(e,`Fulfilling input required by '${e}' failed: ${t instanceof Error?t.message:String(t)}`)}finally{n.dispose()}}else await function(e){return new Promise((t,r)=>{if(e?.aborted)return void r(e.reason instanceof cf?e.reason:new cf(cm.RequestTimeout,String(e.reason)));let i=setTimeout(()=>{e?.removeEventListener("abort",o),t()},250),o=()=>{clearTimeout(i),r(e?.reason instanceof cf?e.reason:new cf(cm.RequestTimeout,String(e?.reason)))};e?.addEventListener("abort",o,{once:!0})})}(s);let m={...i,mcpReq:{...i.mcpReq,inputResponses:o,droppedInputResponseKeys:void 0,requestState:function(e){return()=>e}(u)}};if(void 0!==u){let t=await this._host.verifyRequestState(u,m,e);void 0!==t&&(m=lD(m,t))}let f=await t(r,m);if(!lp(f))return f;d=f}}async _dispatchLeg(e,t){switch(e.method){case"elicitation/create":{let r=e.params;return"url"===r.mode&&void 0===r.elicitationId&&(r={...r,elicitationId:function(){let e=globalThis.crypto;if(e?.randomUUID!==void 0)return e.randomUUID();let t=new Uint8Array(16);e.getRandomValues(t),t[6]=15&t[6]|64,t[8]=63&t[8]|128;let r=[...t].map(e=>e.toString(16).padStart(2,"0")).join("");return`${r.slice(0,8)}-${r.slice(8,12)}-${r.slice(12,16)}-${r.slice(16,20)}-${r.slice(20)}`}()}),await this._host.sendElicitation(r,t)}case"sampling/createMessage":return await this._host.sendSampling(e.params,t);case"roots/list":return await this._host.listRoots(e.params,t)}}};let uD=new Set(["tools/call","prompts/get","resources/read"]);var uF=class extends lF{_clientCapabilities;_clientVersion;_capabilities;_instructions;_jsonSchemaValidator;_cacheHints;_requestStateVerify;_inputRequiredServing;_legacyShim;_boundFromTransport=!1;_legacyInputRequiredShim(){return this._legacyShim??=new uz({maxRounds:this._inputRequiredServing.maxRounds,roundTimeoutMs:this._inputRequiredServing.roundTimeoutMs,resolvedClientCapabilities:e=>this._inputRequestCapabilityView(e),verifyRequestState:(e,t,r)=>this._verifyRequestState(e,t,r),sendElicitation:(e,t)=>this._sendElicitationLeg(e,t,{validateAcceptedContent:!1}),sendSampling:(e,t)=>this.createMessage(e,t),listRoots:(e,t)=>this.listRoots(e,t)})}oninitialized;constructor(e,t){if(super(t),this._serverInfo=e,this._capabilities=t?.capabilities?{...t.capabilities}:{},this._instructions=t?.instructions,this._jsonSchemaValidator=t?.jsonSchemaValidator??new uj,this._requestStateVerify=t?.requestState?.verify,this._inputRequiredServing=function(e){if(e?.maxRounds!==void 0&&(!Number.isInteger(e.maxRounds)||e.maxRounds<1))throw RangeError(`inputRequired.maxRounds must be a positive integer (got ${e.maxRounds})`);if(e?.roundTimeoutMs!==void 0&&(!Number.isFinite(e.roundTimeoutMs)||e.roundTimeoutMs<=0))throw RangeError(`inputRequired.roundTimeoutMs must be a positive number (got ${e.roundTimeoutMs})`);return{maxRounds:e?.maxRounds??8,roundTimeoutMs:e?.roundTimeoutMs??6e5,legacyShim:e?.legacyShim??!0}}(t?.inputRequired),t?.cacheHints!==void 0){for(let[e,r]of Object.entries(t.cacheHints))void 0!==r&&cH(r,`cacheHints['${e}']`);this._cacheHints=t.cacheHints}this.setRequestHandler("initialize",e=>this._oninitialize(e)),this.setNotificationHandler("notifications/initialized",()=>this.oninitialized?.()),cv(this._supportedProtocolVersions).length>0&&this.setRequestHandler("server/discover",()=>this._ondiscover()),this._capabilities.logging&&this._registerLoggingHandler()}async connect(e){if(void 0!==this.transport)throw new cf(cm.AlreadyConnected,"Use a separate Server instance per connection: this instance is already connected to a transport. To connect it to a new transport, call close() first.");this._boundFromTransport&&(this._boundFromTransport=!1,this._negotiatedProtocolVersion=void 0);let t=(e instanceof uE?s(e):void 0)?.revision;void 0!==t&&!this._servedModernEra()&&c_.includes(t)&&cv(this._supportedProtocolVersions).includes(t)&&(this._negotiatedProtocolVersion=t,this._boundFromTransport=!0),await super.connect(e)}_registerLoggingHandler(){this.setRequestHandler("logging/setLevel",async(e,t)=>{let r=t.sessionId||t.http?.req?.headers.get("mcp-session-id")||void 0,{level:i}=e.params,o=oJ(s0,i);return o.success&&this._loggingLevels.set(r,o.data),{}})}buildContext(e,t){let r=e.http||t?.request||t?.closeSSEStream||t?.closeStandaloneSSEStream;return{...e,mcpReq:{...e.mcpReq,log:(t,r,i)=>{let o;if(!this._capabilities.logging)return Promise.resolve();if(this._servedModernEra()){if(void 0===(o=e.mcpReq.envelope?.[ay]))return Promise.resolve()}else o=this._loggingLevels.get(e.sessionId)??this._loggingLevels.get(void 0);return void 0!==o&&this.LOG_LEVEL_SEVERITY.get(t)this.elicitInput(e,t),requestSampling:(e,t)=>this.createMessage(e,t)},http:r?{...e.http,req:t?.request,closeSSE:t?.closeSSEStream,closeStandaloneSSE:t?.closeStandaloneSSEStream}:void 0}}_loggingLevels=new Map;LOG_LEVEL_SEVERITY=new Map(s0.options.map((e,t)=>[e,t]));isMessageIgnored=(e,t)=>{let r=this._loggingLevels.get(t);return!!r&&this.LOG_LEVEL_SEVERITY.get(e){let a=i?await this._invokeInputRequiredCapableHandler(e,t,o,n):await t(o,n);if(lp(a)){if(!i)throw new cB(cG.InternalError,`Handler for ${e} returned an input-required result, but only tools/call, prompts/get and resources/read support input_required (protocol revision 2026-07-28)`);return a}return void 0===r?a:cF(a,r)}:async(r,i)=>{let o=await t(r,i);if(lp(o))throw new cB(cG.InternalError,`Handler for ${e} returned an input-required result, but only tools/call, prompts/get and resources/read support input_required (protocol revision 2026-07-28)`);return o}}return async(e,r)=>{let i=li(this._negotiatedProtocolVersion),o=i.validateRequest("tools/call",e);if(!o.ok)throw new cB("not-in-era"===o.reason?cG.InternalError:cG.InvalidParams,"not-in-era"===o.reason?"No wire schema for tools/call in the resolved era":`Invalid tools/call request: ${o.message}`);let n=await this._invokeInputRequiredCapableHandler("tools/call",t,e,r);if(lp(n))return n;let a=cS(n),s=i.validateResult("tools/call",a);if(!s.ok)throw new cB("not-in-era"===s.reason?cG.InternalError:cG.InvalidParams,"not-in-era"===s.reason?"No wire schema for tools/call in the resolved era":`Invalid tools/call result: ${s.message}`);return s.value}}_servedModernEra(){return void 0!==this._negotiatedProtocolVersion&&this._negotiatedProtocolVersion>=cg}async _invokeInputRequiredCapableHandler(e,t,r,i){let o,n=this._servedModernEra(),a=i.mcpReq.requestState();if(void 0!==a&&"string"!=typeof a)throw new cB(cG.InvalidParams,"Invalid or expired requestState",{reason:"invalid_request_state"});let s=i;if("string"==typeof a){let t=await this._verifyRequestState(a,i,e);void 0!==t&&(s=lD(i,t))}try{o=await t(r,s)}catch(e){if(e instanceof cB&&e.code===cG.UrlElicitationRequired){if(!n)throw e;throw new cB(cG.InternalError,`URL elicitation cannot be signalled by throwing UrlElicitationRequiredError on protocol revision ${this._negotiatedProtocolVersion}: return inputRequired({ inputRequests: { …: inputRequired.elicitUrl(...) } }) from the handler instead. The urlElicitationRequired error (-32042) of earlier revisions is not available on this revision.`)}throw e}if(!lp(o))return o;if(!n){if(!this._inputRequiredServing.legacyShim)throw new cB(cG.InternalError,`Handler for ${e} returned an input-required result, but this request is served on protocol revision ${this._negotiatedProtocolVersion??al}, which has no input_required vocabulary`);return await this._legacyInputRequiredShim().fulfill(e,t,r,s,o)}let d=o.inputRequests,c=null!=d&&Object.keys(d).length>0,l="string"==typeof o.requestState;if(!c&&!l)throw new cB(cG.InternalError,`Handler for ${e} returned an input-required result with neither inputRequests nor requestState (every InputRequiredResult must include at least one of the two)`);if(c){let t=this._inputRequestCapabilityView(i);for(let[r,i]of Object.entries(d)){let{embedded:o,required:n}=uM(e,r,i),a=cy(n,t);if(void 0!==a)throw new cQ({requiredCapabilities:a},`Cannot request input '${r}' (${o.method}): the request's client capabilities do not declare the required capability`)}}return o}async _verifyRequestState(e,t,r){if(void 0!==this._requestStateVerify)try{return await this._requestStateVerify(e,t)}catch(e){throw this.onerror?.(Error(`requestState verification rejected ${r}: ${e instanceof Error?e.message:String(e)}`)),new cB(cG.InvalidParams,"Invalid or expired requestState",{reason:"invalid_request_state"})}}_inputRequestCapabilityView(e){return this._servedModernEra()?e.mcpReq.envelope?.[ah]:this._clientCapabilities}_assertPushApiInServedEra(e){if(this._servedModernEra())throw new cf(cm.MethodNotSupportedByProtocolVersion,`Server-to-client requests are not available on protocol revision ${this._negotiatedProtocolVersion}: '${e}' cannot be sent while serving a request on that revision. Return inputRequired({ ... }) from the handler instead — the client fulfils the embedded requests and retries the original request (multi round-trip requests).`,{method:e,era:"2026-07-28"})}assertCapabilityForMethod(e){switch(e){case"sampling/createMessage":if(!this._clientCapabilities?.sampling)throw new cf(cm.CapabilityNotSupported,`Client does not support sampling (required for ${e})`);break;case"elicitation/create":if(!this._clientCapabilities?.elicitation)throw new cf(cm.CapabilityNotSupported,`Client does not support elicitation (required for ${e})`);break;case"roots/list":if(!this._clientCapabilities?.roots)throw new cf(cm.CapabilityNotSupported,`Client does not support listing roots (required for ${e})`)}}assertNotificationCapability(e){switch(e){case"notifications/message":if(!this._capabilities.logging)throw new cf(cm.CapabilityNotSupported,`Server does not support logging (required for ${e})`);break;case"notifications/resources/updated":case"notifications/resources/list_changed":if(!this._capabilities.resources)throw new cf(cm.CapabilityNotSupported,`Server does not support notifying about resources (required for ${e})`);break;case"notifications/tools/list_changed":if(!this._capabilities.tools)throw new cf(cm.CapabilityNotSupported,`Server does not support notifying of tool list changes (required for ${e})`);break;case"notifications/prompts/list_changed":if(!this._capabilities.prompts)throw new cf(cm.CapabilityNotSupported,`Server does not support notifying of prompt list changes (required for ${e})`);break;case"notifications/elicitation/complete":if(!this._clientCapabilities?.elicitation?.url)throw new cf(cm.CapabilityNotSupported,`Client does not support URL elicitation (required for ${e})`)}}assertRequestHandlerCapability(e){switch(e){case"completion/complete":if(!this._capabilities.completions)throw new cf(cm.CapabilityNotSupported,`Server does not support completions (required for ${e})`);break;case"logging/setLevel":if(!this._capabilities.logging)throw new cf(cm.CapabilityNotSupported,`Server does not support logging (required for ${e})`);break;case"prompts/get":case"prompts/list":if(!this._capabilities.prompts)throw new cf(cm.CapabilityNotSupported,`Server does not support prompts (required for ${e})`);break;case"resources/list":case"resources/templates/list":case"resources/read":if(!this._capabilities.resources)throw new cf(cm.CapabilityNotSupported,`Server does not support resources (required for ${e})`);break;case"tools/call":case"tools/list":if(!this._capabilities.tools)throw new cf(cm.CapabilityNotSupported,`Server does not support tools (required for ${e})`)}}async _oninitialize(e){let t=e.params.protocolVersion;this._clientCapabilities=e.params.capabilities,this._clientVersion=e.params.clientInfo;let r=this._supportedProtocolVersions.filter(e=>!(e>=cg)),i=r.includes(t)?t:r[0]??al;return this._negotiatedProtocolVersion=i,this.transport?.setProtocolVersion?.(i),{protocolVersion:i,capabilities:this.getCapabilities(),serverInfo:this._serverInfo,...this._instructions&&{instructions:this._instructions}}}_ondiscover(){return{supportedVersions:cv(this._supportedProtocolVersions),capabilities:{...this.getCapabilities()},...this._instructions&&{instructions:this._instructions}}}_outboundServerInfo(){return this._serverInfo}getClientCapabilities(){return this._clientCapabilities}getClientVersion(){return this._clientVersion}getNegotiatedProtocolVersion(){return this._negotiatedProtocolVersion}projectCallToolResult(e,t){return this._wireCodec().projectCallToolResult(e,t)}getCapabilities(){return this._capabilities}async ping(){return this._assertPushApiInServedEra("ping"),this.request({method:"ping"})}async createMessage(e,t){if(this._assertPushApiInServedEra("sampling/createMessage"),(e.tools||e.toolChoice)&&!this._clientCapabilities?.sampling?.tools)throw new cf(cm.CapabilityNotSupported,"Client does not support sampling tools capability.");if(e.messages.length>0){let t=e.messages.at(-1),r=Array.isArray(t.content)?t.content:[t.content],i=r.some(e=>"tool_result"===e.type),o=e.messages.length>1?e.messages.at(-2):void 0,n=o?Array.isArray(o.content)?o.content:[o.content]:[],a=n.some(e=>"tool_use"===e.type);if(i){if(r.some(e=>"tool_result"!==e.type))throw new cB(cG.InvalidParams,"The last message must contain only tool_result content if any is present");if(!a)throw new cB(cG.InvalidParams,"tool_result blocks are not matching any tool_use from the previous message")}if(a){let e=new Set(n.filter(e=>"tool_use"===e.type).map(e=>e.id)),t=new Set(r.filter(e=>"tool_result"===e.type).map(e=>e.toolUseId));if(e.size!==t.size||![...e].every(e=>t.has(e)))throw new cB(cG.InvalidParams,"ids of tool_result blocks and tool_use blocks from previous message do not match")}}let r=!!(e.tools||e.toolChoice),i=await this.request({method:"sampling/createMessage",params:e},t),o=this._wireCodec().samplingResultVariant(r,i);if(!o.ok)throw new cf(cm.InvalidResult,`Invalid sampling/createMessage result: ${"invalid"===o.reason?o.message:o.reason}`);return o.value}async elicitInput(e,t){switch(this._assertPushApiInServedEra("elicitation/create"),e.mode??"form"){case"url":if(!this._clientCapabilities?.elicitation?.url)throw new cf(cm.CapabilityNotSupported,"Client does not support url elicitation.");break;case"form":if(!this._clientCapabilities?.elicitation?.form)throw new cf(cm.CapabilityNotSupported,"Client does not support form elicitation.")}return this._sendElicitationLeg(e,t)}async _sendElicitationLeg(e,t,r){let i=e.mode??"form",o=r?.validateAcceptedContent??!0;switch(i){case"url":return this.request({method:"elicitation/create",params:e},t);case"form":{let r="form"===e.mode?e:{...e,mode:"form"},i=await this.request({method:"elicitation/create",params:r},t);if(o&&"accept"===i.action&&i.content&&r.requestedSchema)try{let e=this._jsonSchemaValidator.getValidator(r.requestedSchema)(i.content);if(!e.valid)throw new cB(cG.InvalidParams,`Elicitation response content does not match requested schema: ${e.errorMessage}`)}catch(e){if(e instanceof cB)throw e;throw new cB(cG.InternalError,`Error validating elicitation response: ${e instanceof Error?e.message:String(e)}`)}return i}}}createElicitationCompletionNotifier(e,t){if(!this._clientCapabilities?.elicitation?.url)throw new cf(cm.CapabilityNotSupported,"Client does not support URL elicitation (required for notifications/elicitation/complete)");return()=>this.notification({method:"notifications/elicitation/complete",params:{elicitationId:e}},t)}async listRoots(e,t){return this._assertPushApiInServedEra("roots/list"),this.request({method:"roots/list",params:e},t)}async sendLoggingMessage(e,t){if(this._capabilities.logging&&!this.isMessageIgnored(e.level,t))return this.notification({method:"notifications/message",params:e})}async sendResourceUpdated(e){return this.notification({method:"notifications/resources/updated",params:e})}async sendResourceListChanged(){return this.notification({method:"notifications/resources/list_changed"})}async sendToolListChanged(){return this.notification({method:"notifications/tools/list_changed"})}async sendPromptListChanged(){return this.notification({method:"notifications/prompts/list_changed"})}},uL=class{server;_maxToolInputElements;_registeredResources={};_registeredResourceTemplates={};_registeredTools={};_registeredPrompts={};_toolInputSchemaJson={};toolInputSchemaJson(e){let t=this._registeredTools[e];if(void 0!==t&&t.enabled){if(Object.hasOwn(this._toolInputSchemaJson,e))return this._toolInputSchemaJson[e];if(void 0===t.inputSchema)return uG;try{let r=lk(t.inputSchema,"input");return this._toolInputSchemaJson[e]=r,r}catch{return}}}constructor(e,t){this.server=new uF(e,t),this._maxToolInputElements=function(e){if(void 0!==e&&1/0!==e){if("number"!=typeof e||Number.isNaN(e)||e<1)throw RangeError(`maxToolInputElements must be a number of at least 1, or Infinity, got ${String(e)}`);return e}}(t?.maxToolInputElements),t?.capabilities?.tools&&this.setToolRequestHandlers(),t?.capabilities?.resources&&this.setResourceRequestHandlers(),t?.capabilities?.prompts&&this.setPromptRequestHandlers()}async connect(e){return"object"==typeof e&&null!==e&&"setScopeChallengeResolver"in e&&"function"==typeof e.setScopeChallengeResolver&&e.setScopeChallengeResolver(e=>this.resolveScopeChallenge(e)),await this.server.connect(e)}async close(){await this.server.close()}resolveScopeChallenge=e=>{switch(e.request.method){case"tools/call":{let t=e.request.params?.name;if("string"!=typeof t)return;let r=this._registeredTools[t];if(void 0===r||!r.enabled)return;return r.scopeChallenge?.(e)}case"resources/read":{let t,r=e.request.params?.uri;if("string"!=typeof r)return;try{t=new URL(r)}catch{return}let i=this._registeredResources[t.toString()];if(void 0!==i)return i.enabled?i.scopeChallenge?.(e):void 0;for(let r of Object.values(this._registeredResourceTemplates))if(r.resourceTemplate.uriTemplate.match(t.toString()))return r.enabled?r.scopeChallenge?.(e):void 0;return}case"prompts/get":{let t=e.request.params?.name;if("string"!=typeof t)return;let r=this._registeredPrompts[t];if(void 0===r||!r.enabled)return;return r.scopeChallenge?.(e)}default:return}};_toolHandlersInitialized=!1;setToolRequestHandlers(){this._toolHandlersInitialized||(this.server.assertCanSetRequestHandler("tools/list"),this.server.assertCanSetRequestHandler("tools/call"),this.server.registerCapabilities({tools:{listChanged:this.server.getCapabilities().tools?.listChanged??!0}}),this.server.setRequestHandler("tools/list",()=>({tools:Object.entries(this._registeredTools).filter(([,e])=>e.enabled).map(([e,t])=>{let r={name:e,title:t.title,description:t.description,inputSchema:t.inputSchema?function(e,t){let r,i,o,n,a,s=lk(t,"input"),d=(i=[],o=new Map,void 0!==(a=(n=(e,t,a)=>{if(null===e||"object"!=typeof e)return;if(lu in e){if(!a||0===t.length)return`${lg(t)}: x-mcp-header is only permitted on properties statically reachable via a chain of 'properties' keys (not under items, additionalProperties, oneOf/anyOf/allOf/not, if/then/else, or $ref)`;let n=e[lu];if("string"!=typeof n||0===n.length)return`${lg(t)}: x-mcp-header MUST be a non-empty string`;if(!lm.test(n))return`${lg(t)}: x-mcp-header '${n}' is not a valid RFC 9110 token (no spaces, control characters or HTTP delimiters)`;let s="string"==typeof e.type?e.type:void 0;if(void 0===s||!lf.has(s)){let e=`${lg(t)}: x-mcp-header is only permitted on primitive-typed properties (string, integer, boolean); got ${s??""}`;if("number"!==s)return e;r??=e}let d=n.toLowerCase(),c=o.get(d);if(void 0!==c)return`x-mcp-header '${n}' is not case-insensitively unique (also declared as '${c}')`;o.set(d,n),i.push({path:t,headerName:n,type:s})}let s=e.properties;if(null!==s&&"object"==typeof s)for(let[e,r]of Object.entries(s)){let i=n(r,[...t,e],a);if(void 0!==i)return i}for(let r of lh){let i=e[r];if(void 0!==i)for(let e of Array.isArray(i)?i:null!==i&&"object"==typeof i&&ly.has(r)?Object.values(i):[i]){let i=n(e,[...t,`<${r}>`],!1);if(void 0!==i)return i}}})(s,[],!0))?{valid:!1,reason:r??a}:void 0===r?{valid:!0,declarations:i}:{valid:!1,reason:r,declarations:i});return d.valid||console.warn(`[mcp-sdk] tool '${e}' carries an invalid x-mcp-header declaration and will be excluded by conforming Streamable HTTP clients: ${d.reason}`),s}(e,t.inputSchema):uG,annotations:t.annotations,icons:t.icons,execution:t.execution,_meta:t._meta};return t.outputSchema&&(r.outputSchema=lk(t.outputSchema,"output")),r})})),this.server.setRequestHandler("tools/call",async(e,t)=>{let r=this._registeredTools[e.params.name];if(!r)throw new cB(cG.InvalidParams,`Tool ${e.params.name} not found`);if(!r.enabled)throw new cB(cG.InvalidParams,`Tool ${e.params.name} disabled`);try{let i=await this.validateToolInput(r,e.params.arguments,e.params.name),o=await this.executeToolHandler(r,i,t);if(await this.validateToolOutput(r,o,e.params.name),lp(o))return o;return this.server.projectCallToolResult(o,r.outputSchemaJson)}catch(e){if(e instanceof cB&&e.code===cG.UrlElicitationRequired)throw e;return this.createToolError(e instanceof Error?e.message:String(e))}}),this._toolHandlersInitialized=!0)}createToolError(e){return{content:[{type:"text",text:e}],isError:!0}}async validateToolInput(e,t,r){if(void 0!==this._maxToolInputElements&&function(e,t){let r=0,i=[e];for(;i.length>0;){let e=i.pop();if(null!==e&&"object"==typeof e)if(Array.isArray(e))for(let o of e){if(++r>t)return r;null!==o&&"object"==typeof o&&i.push(o)}else for(let o in e){if(!Object.prototype.hasOwnProperty.call(e,o))continue;if(++r>t)return r;let n=e[o];null!==n&&"object"==typeof n&&i.push(n)}}return r}(t,this._maxToolInputElements)>this._maxToolInputElements)throw new cB(cG.InvalidParams,`Invalid arguments for tool ${r}: arguments contain more than the maximum of ${this._maxToolInputElements} elements`);if(!e.inputSchema)return;let i=await lV(e.inputSchema,t??{});if(!i.success)throw new cB(cG.InvalidParams,`Input validation error: Invalid arguments for tool ${r}: ${i.error}`);return i.data}async validateToolOutput(e,t,r){if(!e.outputSchema||lp(t)||t.isError)return;if(void 0===t.structuredContent)throw new cB(cG.InvalidParams,`Output validation error: Tool ${r} has an output schema but no structured content was provided`);let i=await lV(e.outputSchema,t.structuredContent);if(!i.success)throw new cB(cG.InvalidParams,`Output validation error: Invalid structured content for tool ${r}: ${i.error}`)}async executeToolHandler(e,t,r){return e.executor(t,r)}_completionHandlerInitialized=!1;setCompletionRequestHandler(){this._completionHandlerInitialized||(this.server.assertCanSetRequestHandler("completion/complete"),this.server.registerCapabilities({completions:{}}),this.server.setRequestHandler("completion/complete",async e=>{switch(e.params.ref.type){case"ref/prompt":if("ref/prompt"!==e.params.ref.type)throw TypeError(`Expected CompleteRequestPrompt, but got ${e.params.ref.type}`);return this.handlePromptCompletion(e,e.params.ref);case"ref/resource":if("ref/resource"!==e.params.ref.type)throw TypeError(`Expected CompleteRequestResourceTemplate, but got ${e.params.ref.type}`);return this.handleResourceCompletion(e,e.params.ref);default:throw new cB(cG.InvalidParams,`Invalid completion reference: ${e.params.ref}`)}}),this._completionHandlerInitialized=!0)}async handlePromptCompletion(e,t){let r=this._registeredPrompts[t.name];if(!r)throw new cB(cG.InvalidParams,`Prompt ${t.name} not found`);if(!r.enabled)throw new cB(cG.InvalidParams,`Prompt ${t.name} disabled`);if(!r.argsSchema)return uZ;let i=uX(uQ(r.argsSchema)?.[e.params.argument.name]);if(!uT(i))return uZ;let o=i[uC]?.complete;return o?uJ(await o(e.params.argument.value,e.params.context)):uZ}async handleResourceCompletion(e,t){let r=Object.values(this._registeredResourceTemplates).find(e=>e.resourceTemplate.uriTemplate.toString()===t.uri);if(!r){if(this._registeredResources[t.uri])return uZ;throw new cB(cG.InvalidParams,`Resource template ${e.params.ref.uri} not found`)}let i=r.resourceTemplate.completeCallback(e.params.argument.name);return i?uJ(await i(e.params.argument.value,e.params.context)):uZ}_resourceHandlersInitialized=!1;setResourceRequestHandlers(){this._resourceHandlersInitialized||(this.server.assertCanSetRequestHandler("resources/list"),this.server.assertCanSetRequestHandler("resources/templates/list"),this.server.assertCanSetRequestHandler("resources/read"),this.server.registerCapabilities({resources:{listChanged:this.server.getCapabilities().resources?.listChanged??!0}}),this.server.setRequestHandler("resources/list",async(e,t)=>{let r=Object.entries(this._registeredResources).filter(([e,t])=>t.enabled).map(([e,t])=>({uri:e,name:t.name,...t.metadata})),i=[];for(let e of Object.values(this._registeredResourceTemplates))if(e.resourceTemplate.listCallback)for(let r of(await e.resourceTemplate.listCallback(t)).resources)i.push({...e.metadata,...r});return{resources:[...r,...i]}}),this.server.setRequestHandler("resources/templates/list",async()=>({resourceTemplates:Object.entries(this._registeredResourceTemplates).map(([e,t])=>({name:e,uriTemplate:t.resourceTemplate.uriTemplate.toString(),...t.metadata}))})),this.server.setRequestHandler("resources/read",async(e,t)=>{let r;try{r=new URL(e.params.uri)}catch{throw new cB(cG.InvalidParams,`Resource URI ${e.params.uri} is invalid`,{uri:e.params.uri,reason:"invalid_uri"})}let i=this._registeredResources[r.toString()];if(i){if(!i.enabled)throw new cB(cG.InvalidParams,`Resource ${r} disabled`);return cF(await i.readCallback(r,t),i.cacheHint)}for(let e of Object.values(this._registeredResourceTemplates)){let i=e.resourceTemplate.uriTemplate.match(r.toString());if(i){if(!e.enabled)throw new cB(cG.InvalidParams,`Resource template ${e.resourceTemplate.uriTemplate} disabled`);return cF(await e.readCallback(r,i,t),e.cacheHint)}}throw new cK(e.params.uri)}),this._resourceHandlersInitialized=!0)}_promptHandlersInitialized=!1;setPromptRequestHandlers(){this._promptHandlersInitialized||(this.server.assertCanSetRequestHandler("prompts/list"),this.server.assertCanSetRequestHandler("prompts/get"),this.server.registerCapabilities({prompts:{listChanged:this.server.getCapabilities().prompts?.listChanged??!0}}),this.server.setRequestHandler("prompts/list",()=>({prompts:Object.entries(this._registeredPrompts).filter(([,e])=>e.enabled).map(([e,t])=>{let r,i,o;return{name:e,title:t.title,description:t.description,arguments:t.argsSchema?(i=(r=lk(t.argsSchema,"input")).properties||{},o=r.required||[],Object.entries(i).map(([e,t])=>({name:e,description:t?.description,required:o.includes(e)}))):void 0,icons:t.icons,_meta:t._meta}})})),this.server.setRequestHandler("prompts/get",async(e,t)=>{let r=this._registeredPrompts[e.params.name];if(!r)throw new cB(cG.InvalidParams,`Prompt ${e.params.name} not found`);if(!r.enabled)throw new cB(cG.InvalidParams,`Prompt ${e.params.name} disabled`);return r.handler(e.params.arguments,t)}),this._promptHandlersInitialized=!0)}registerResource(e,t,r,i){let{cacheHint:o,scopeChallenge:n,...a}=r;if(void 0!==o&&cH(o,`resource ${e}`),"string"==typeof t){if(this._registeredResources[t])throw Error(`Resource ${t} is already registered`);let s=this._createRegisteredResource(e,r.title,t,a,n,i);return void 0!==o&&(s.cacheHint=o),this.setResourceRequestHandlers(),this.sendResourceListChanged(),s}{if(this._registeredResourceTemplates[e])throw Error(`Resource template ${e} is already registered`);let s=this._createRegisteredResourceTemplate(e,r.title,t,a,n,i);return void 0!==o&&(s.cacheHint=o),this.setResourceRequestHandlers(),this.sendResourceListChanged(),s}}_createRegisteredResource(e,t,r,i,o,n){let a={name:e,title:t,metadata:i,readCallback:n,scopeChallenge:o,enabled:!0,disable:()=>a.update({enabled:!1}),enable:()=>a.update({enabled:!0}),remove:()=>a.update({uri:null}),update:e=>{void 0!==e.uri&&e.uri!==r&&(delete this._registeredResources[r],e.uri&&(this._registeredResources[e.uri]=a)),void 0!==e.name&&(a.name=e.name),void 0!==e.metadata&&(a.metadata=e.metadata),void 0!==e.title&&(a.title=e.title,a.metadata={...a.metadata,title:e.title}),void 0!==e.callback&&(a.readCallback=e.callback),void 0!==e.scopeChallenge&&(a.scopeChallenge=null===e.scopeChallenge?void 0:e.scopeChallenge),void 0!==e.enabled&&(a.enabled=e.enabled),this.sendResourceListChanged()}};return this._registeredResources[r]=a,a}_createRegisteredResourceTemplate(e,t,r,i,o,n){let a={resourceTemplate:r,title:t,metadata:i,readCallback:n,scopeChallenge:o,enabled:!0,disable:()=>a.update({enabled:!1}),enable:()=>a.update({enabled:!0}),remove:()=>a.update({name:null}),update:t=>{void 0!==t.name&&t.name!==e&&(delete this._registeredResourceTemplates[e],t.name&&(this._registeredResourceTemplates[t.name]=a)),void 0!==t.template&&(a.resourceTemplate=t.template),void 0!==t.metadata&&(a.metadata=t.metadata),void 0!==t.title&&(a.title=t.title,a.metadata={...a.metadata,title:t.title}),void 0!==t.callback&&(a.readCallback=t.callback),void 0!==t.scopeChallenge&&(a.scopeChallenge=null===t.scopeChallenge?void 0:t.scopeChallenge),void 0!==t.enabled&&(a.enabled=t.enabled),this.sendResourceListChanged()}};this._registeredResourceTemplates[e]=a;let s=r.uriTemplate.variableNames;return Array.isArray(s)&&s.some(e=>!!r.completeCallback(e))&&this.setCompletionRequestHandler(),a}_createRegisteredPrompt(e,t,r,i,o,n,a,s){let d=i,c=o,l={title:t,description:r,argsSchema:i,icons:n,scopeChallenge:a,_meta:s,handler:uK(e,i,o),enabled:!0,disable:()=>l.update({enabled:!1}),enable:()=>l.update({enabled:!0}),remove:()=>l.update({name:null}),update:t=>{void 0!==t.name&&t.name!==e&&(delete this._registeredPrompts[e],t.name&&(this._registeredPrompts[t.name]=l)),void 0!==t.title&&(l.title=t.title),void 0!==t.description&&(l.description=t.description),void 0!==t.icons&&(l.icons=t.icons),void 0!==t.scopeChallenge&&(l.scopeChallenge=null===t.scopeChallenge?void 0:t.scopeChallenge),void 0!==t._meta&&(l._meta=t._meta);let r=!1;void 0!==t.argsSchema&&(l.argsSchema=t.argsSchema,d=t.argsSchema,r=!0),void 0!==t.callback&&(c=t.callback,r=!0),r&&(l.handler=uK(e,d,c)),void 0!==t.enabled&&(l.enabled=t.enabled),this.sendPromptListChanged()}};if(this._registeredPrompts[e]=l,i){let e=uQ(i);e&&Object.values(e).some(e=>uT(uX(e)))&&this.setCompletionRequestHandler()}return l}_createRegisteredTool(e,t,r,i,o,n,a,s,d,c,l){let p;lK(e);let u=l,m={title:t,description:r,inputSchema:i,outputSchema:o,get outputSchemaJson(){return p??=uB(m.outputSchema)},set outputSchemaJson(e){p=e},annotations:n,icons:a,execution:s,scopeChallenge:d,_meta:c,handler:l,executor:uH(i,l),enabled:!0,disable:()=>m.update({enabled:!1}),enable:()=>m.update({enabled:!0}),remove:()=>m.update({name:null}),update:t=>{void 0!==t.name&&t.name!==e&&("string"==typeof t.name&&lK(t.name),delete this._registeredTools[e],delete this._toolInputSchemaJson[e],t.name&&(delete this._toolInputSchemaJson[t.name],this._registeredTools[t.name]=m,e=t.name)),void 0!==t.title&&(m.title=t.title),void 0!==t.description&&(m.description=t.description);let r=!1;void 0!==t.paramsSchema&&(m.inputSchema=t.paramsSchema,delete this._toolInputSchemaJson[e],r=!0),void 0!==t.callback&&(m.handler=t.callback,u=t.callback,r=!0),r&&(m.executor=uH(m.inputSchema,u)),void 0!==t.outputSchema&&(m.outputSchema=t.outputSchema,m.outputSchemaJson=uB(t.outputSchema)),void 0!==t.annotations&&(m.annotations=t.annotations),void 0!==t.icons&&(m.icons=t.icons),void 0!==t.scopeChallenge&&(m.scopeChallenge=null===t.scopeChallenge?void 0:t.scopeChallenge),void 0!==t._meta&&(m._meta=t._meta),void 0!==t.enabled&&(m.enabled=t.enabled),this.sendToolListChanged()}};return this._registeredTools[e]=m,this.setToolRequestHandlers(),this.sendToolListChanged(),m}registerTool(e,t,r){if(this._registeredTools[e])throw Error(`Tool ${e} is already registered`);let{title:i,description:o,inputSchema:n,outputSchema:a,annotations:s,icons:d,scopeChallenge:c,_meta:l}=t;return this._createRegisteredTool(e,i,o,lZ(n),lZ(a),s,d,void 0,c,l,r)}registerPrompt(e,t,r){if(this._registeredPrompts[e])throw Error(`Prompt ${e} is already registered`);let{title:i,description:o,argsSchema:n,icons:a,scopeChallenge:s,_meta:d}=t,c=this._createRegisteredPrompt(e,i,o,lZ(n),r,a,s,d);return this.setPromptRequestHandlers(),this.sendPromptListChanged(),c}isConnected(){return void 0!==this.server.transport}async sendLoggingMessage(e,t){return this.server.sendLoggingMessage(e,t)}sendResourceListChanged(){this.isConnected()&&this.server.sendResourceListChanged()}sendToolListChanged(){this.isConnected()&&this.server.sendToolListChanged()}sendPromptListChanged(){this.isConnected()&&this.server.sendPromptListChanged()}},uU=class{_uriTemplate;constructor(e,t){this._callbacks=t,this._uriTemplate="string"==typeof e?new lJ(e):e}get uriTemplate(){return this._uriTemplate}get listCallback(){return this._callbacks.list}completeCallback(e){return this._callbacks.complete?.[e]}};function uH(e,t){return e?async(e,r)=>t(e,r):async(e,r)=>t(r)}let uG={type:"object",properties:{}};function uB(e){if(void 0!==e)try{return lk(e,"output")}catch{return}}function uK(e,t,r){return t?async(i,o)=>{let n=await lV(t,i??{});if(!n.success)throw new cB(cG.InvalidParams,`Invalid arguments for prompt ${e}: ${n.error}`);return r(n.data,o)}:async(e,t)=>r(t)}function uJ(e){return{completion:{values:e.map(String).slice(0,100),total:e.length,hasMore:e.length>100}}}let uZ={completion:{values:[],hasMore:!1}};function uQ(e){if(e.shape&&"object"==typeof e.shape)return e.shape}function uX(e){return e?.type!=="optional"?e:e.def?.innerType??e}var uY=class{sessionIdGenerator;_started=!1;_hasHandledRequest=!1;_closed=!1;_streamMapping=new Map;_requestToStreamMapping=new Map;_requestResponseMap=new Map;_initialized=!1;_enableJsonResponse=!1;_standaloneSseStreamId="_GET_stream";_eventStore;_onsessioninitialized;_onsessionclosed;_allowedHosts;_allowedOrigins;_enableDnsRebindingProtection;_retryInterval;_supportedProtocolVersions;_keepAliveMs;_maxRequestBodySize;_scopeChallengeResolver;sessionId;onclose;onerror;onmessage;constructor(e={}){this.sessionIdGenerator=e.sessionIdGenerator,this._enableJsonResponse=e.enableJsonResponse??!1,this._eventStore=e.eventStore,this._onsessioninitialized=e.onsessioninitialized,this._onsessionclosed=e.onsessionclosed,this._allowedHosts=e.allowedHosts,this._allowedOrigins=e.allowedOrigins,this._enableDnsRebindingProtection=e.enableDnsRebindingProtection??!1,this._retryInterval=e.retryInterval,this._supportedProtocolVersions=e.supportedProtocolVersions??ap,this._keepAliveMs=e.keepAliveMs??15e3,this._maxRequestBodySize=function(e){if(void 0===e)return 4194304;if("number"!=typeof e||!Number.isFinite(e)||e<=0)throw RangeError(`maxRequestBodySize must be a positive number of bytes, got ${String(e)}`);return e}(e.maxRequestBodySize)}startKeepAlive(e,t){if(this._closed)return;let r=uO(this._keepAliveMs,()=>{try{e.enqueue(t.encode(": keepalive\n\n"))}catch{void 0!==r&&clearInterval(r)}});return r}setScopeChallengeResolver(e){this._scopeChallengeResolver=e}async start(){if(this._started)throw Error("Transport already started");this._started=!0}setSupportedProtocolVersions(e){this._supportedProtocolVersions=e}createJsonErrorResponse(e,t,r,i){let o={code:t,message:r};return i?.data!==void 0&&(o.data=i.data),Response.json({jsonrpc:"2.0",error:o,id:null},{status:e,headers:{"Content-Type":"application/json",...i?.headers}})}async _checkScopeChallenge(e,t){var r;if(!this._scopeChallengeResolver)return;let i=await async function(e,t,r){for(let o of e){let e=await r({request:o,...void 0!==t&&{authInfo:t}});if(void 0!==e){if(null===e||"object"!=typeof e||!Array.isArray(e.scopes)||0===e.scopes.length)throw TypeError("scope challenge must contain at least one scope");for(let[t,r]of e.scopes.entries()){var i=`scope challenge scopes[${t}]`;if("string"!=typeof r||!/^[\u0021\u0023-\u005B\u005D-\u007E]+$/.test(r))throw TypeError(`${i} must satisfy the OAuth scope-token grammar`)}if(void 0!==e.errorDescription&&"string"!=typeof e.errorDescription)throw TypeError("scope challenge errorDescription must be a string");if(void 0!==e.errorDescription&&!/^[\u0020-\u0021\u0023-\u005B\u005D-\u007E]+$/.test(e.errorDescription))throw TypeError("scope challenge errorDescription must satisfy the RFC 6750 error-description grammar");return e}}}(e.filter(e=>ll(e)),t,this._scopeChallengeResolver);return void 0===i?void 0:(r=function(e){if(e?.resourceMetadataUrl!==void 0)return e.resourceMetadataUrl;if(e?.resource?.protocol==="https:"||e?.resource?.protocol==="http:"){var t,r;let i,o;return i=new URL(t=e.resource),o=(r=t.pathname).length>1&&r.endsWith("/")?r.slice(0,-1):r,i.pathname=`/.well-known/oauth-protected-resource${"/"===o?"":o}`,i.hash="",i.href}}(t),function(e,t){let{requiredScopes:r=[],resourceMetadataUrl:i}=t??{};if(!(e instanceof cu)){let e=new cu(cp.ServerError,"Internal Server Error");return Response.json(e.toResponseObject(),{status:500})}switch(e.code){case cp.InvalidToken:{let t=uW(e.code,e.message,r,i);return Response.json(e.toResponseObject(),{status:401,headers:{"WWW-Authenticate":t}})}case cp.InsufficientScope:{let t=uW(e.code,e.message,r,i);return Response.json(e.toResponseObject(),{status:403,headers:{"WWW-Authenticate":t}})}case cp.ServerError:return Response.json(e.toResponseObject(),{status:500});default:return Response.json(e.toResponseObject(),{status:400})}}(new cu(cp.InsufficientScope,i.errorDescription??"Insufficient scope"),{requiredScopes:[...i.scopes],resourceMetadataUrl:r}))}validateRequestHeaders(e){if(this._enableDnsRebindingProtection){if(this._allowedHosts&&this._allowedHosts.length>0){let t=e.headers.get("host");if(!t||!this._allowedHosts.includes(t)){let e=`Invalid Host header: ${t}`;return this.onerror?.(Error(e)),this.createJsonErrorResponse(403,-32e3,e)}}if(this._allowedOrigins&&this._allowedOrigins.length>0){let t=e.headers.get("origin");if(t&&!this._allowedOrigins.includes(t)){let e=`Invalid Origin header: ${t}`;return this.onerror?.(Error(e)),this.createJsonErrorResponse(403,-32e3,e)}}}}async handleRequest(e,t){if(this._closed)return this.createJsonErrorResponse(404,-32001,"Session not found");if(!this.sessionIdGenerator&&this._hasHandledRequest)throw Error("Stateless transport cannot be reused across requests. Create a new transport per request.");this._hasHandledRequest=!0;let r=this.validateRequestHeaders(e);if(r)return r;switch(e.method){case"POST":return this.handlePostRequest(e,t);case"GET":return this.handleGetRequest(e);case"DELETE":return this.handleDeleteRequest(e);default:return this.handleUnsupportedRequest()}}supportsEmptySSEData(e){return this._supportedProtocolVersions.includes(e)&&e>="2025-11-25"}async writePrimingEvent(e,t,r,i){if(!this._eventStore||!this.supportsEmptySSEData(i))return;let o=await this._eventStore.storeEvent(r,{}),n=`id: ${o} +`)}writeFrame(e){if(void 0!==this._sse&&!this._sse.closed)try{this._sse.controller.enqueue(this._sse.encoder.encode(e))}catch(e){this.onerror?.(Error(`Failed to write to the response stream: ${e}`))}}};function uA(e){return e.replaceAll(/[\\"]/g,String.raw`\$&`).replaceAll(/[^\u0020-\u007E]/g," ")}function uM(e,t,r,i){let o=`Bearer error="${uA(e)}", error_description="${uA(t)}"`;return r.length>0&&(o+=`, scope="${uA(r.join(" "))}"`),i&&(o+=`, resource_metadata="${uA(i)}"`),o}function uW(e,t,r){if(null===r||"object"!=typeof r||"string"!=typeof r.method)throw new cB(cG.InternalError,`Handler for ${e} returned an invalid input request '${t}': each inputRequests entry must be an embedded elicitation/create, sampling/createMessage, or roots/list request`);let i=function(e){switch(e.method){case"elicitation/create":if(e.params?.mode==="url")return{elicitation:{url:{}}};return{elicitation:{form:{}}};case"sampling/createMessage":{let t=e.params;if(void 0!==t&&(void 0!==t.tools||void 0!==t.toolChoice))return{sampling:{tools:{}}};return{sampling:{}}}case"roots/list":return{roots:{}};default:return}}(r);if(void 0===i)throw new cB(cG.InternalError,`Handler for ${e} returned an input request '${t}' of kind '${r.method}', which is not an embedded request the 2026-07-28 revision defines`);return{embedded:r,required:i}}function uN(e,t){if("tools/call"===e)return{content:[{type:"text",text:t}],isError:!0};throw new cB(cG.InternalError,t)}var uz=class{constructor(e){this._host=e}async fulfill(e,t,r,i,o){let{maxRounds:n,roundTimeoutMs:a}=this._host,s=i.mcpReq.signal,d=o,c=0;for(;;){let o;if((c+=1)>n)return uN(e,`Multi-round-trip request '${e}' still required input after ${n} rounds (inputRequired.maxRounds)`);let l=d.inputRequests,p=null!=l&&Object.keys(l).length>0,u="string"==typeof d.requestState?d.requestState:void 0;if(!p&&void 0===u)throw new cB(cG.InternalError,`Handler for ${e} returned an input-required result with neither inputRequests nor requestState (every InputRequiredResult must include at least one of the two)`);if(p){let t=this._host.resolvedClientCapabilities(i),r=[];for(let[i,o]of Object.entries(l)){let{embedded:n,required:a}=uW(e,i,o);if("roots/list"!==n.method&&void 0===n.params)throw new cB(cG.InternalError,`Handler for ${e} returned an input request '${i}' of kind '${n.method}' without params`);if(void 0!==cy(a,t))return uN(e,`Cannot request input '${i}' (${n.method}): the client on this 2025-era connection did not declare the required capability${void 0===t?" (no client capabilities are available on this connection — per-request legacy serving cannot receive server-to-client requests)":""}`);r.push([i,n])}let n=function(e){let t=new AbortController,r=()=>t.abort(e?.reason);return e?.addEventListener("abort",r,{once:!0}),e?.aborted&&t.abort(e.reason),{signal:t.signal,abort:e=>t.abort(e),dispose:()=>e?.removeEventListener("abort",r)}}(s);try{let e={relatedRequestId:i.mcpReq.id,timeout:a,resetTimeoutOnProgress:!0,onprogress:()=>{},signal:n.signal},t=await Promise.all(r.map(async([t,r])=>{try{return[t,await this._dispatchLeg(r,e)]}catch(e){throw n.abort(e),e}}));o=Object.fromEntries(t)}catch(t){if(s.aborted)throw t;return uN(e,`Fulfilling input required by '${e}' failed: ${t instanceof Error?t.message:String(t)}`)}finally{n.dispose()}}else await function(e){return new Promise((t,r)=>{if(e?.aborted)return void r(e.reason instanceof cf?e.reason:new cf(cm.RequestTimeout,String(e.reason)));let i=setTimeout(()=>{e?.removeEventListener("abort",o),t()},250),o=()=>{clearTimeout(i),r(e?.reason instanceof cf?e.reason:new cf(cm.RequestTimeout,String(e?.reason)))};e?.addEventListener("abort",o,{once:!0})})}(s);let m={...i,mcpReq:{...i.mcpReq,inputResponses:o,droppedInputResponseKeys:void 0,requestState:function(e){return()=>e}(u)}};if(void 0!==u){let t=await this._host.verifyRequestState(u,m,e);void 0!==t&&(m=lD(m,t))}let f=await t(r,m);if(!lp(f))return f;d=f}}async _dispatchLeg(e,t){switch(e.method){case"elicitation/create":{let r=e.params;return"url"===r.mode&&void 0===r.elicitationId&&(r={...r,elicitationId:function(){let e=globalThis.crypto;if(e?.randomUUID!==void 0)return e.randomUUID();let t=new Uint8Array(16);e.getRandomValues(t),t[6]=15&t[6]|64,t[8]=63&t[8]|128;let r=[...t].map(e=>e.toString(16).padStart(2,"0")).join("");return`${r.slice(0,8)}-${r.slice(8,12)}-${r.slice(12,16)}-${r.slice(16,20)}-${r.slice(20)}`}()}),await this._host.sendElicitation(r,t)}case"sampling/createMessage":return await this._host.sendSampling(e.params,t);case"roots/list":return await this._host.listRoots(e.params,t)}}};let uD=new Set(["tools/call","prompts/get","resources/read"]);var uF=class extends lF{_clientCapabilities;_clientVersion;_capabilities;_instructions;_jsonSchemaValidator;_cacheHints;_requestStateVerify;_inputRequiredServing;_legacyShim;_boundFromTransport=!1;_legacyInputRequiredShim(){return this._legacyShim??=new uz({maxRounds:this._inputRequiredServing.maxRounds,roundTimeoutMs:this._inputRequiredServing.roundTimeoutMs,resolvedClientCapabilities:e=>this._inputRequestCapabilityView(e),verifyRequestState:(e,t,r)=>this._verifyRequestState(e,t,r),sendElicitation:(e,t)=>this._sendElicitationLeg(e,t,{validateAcceptedContent:!1}),sendSampling:(e,t)=>this.createMessage(e,t),listRoots:(e,t)=>this.listRoots(e,t)})}oninitialized;constructor(e,t){if(super(t),this._serverInfo=e,this._capabilities=t?.capabilities?{...t.capabilities}:{},this._instructions=t?.instructions,this._jsonSchemaValidator=t?.jsonSchemaValidator??new uj,this._requestStateVerify=t?.requestState?.verify,this._inputRequiredServing=function(e){if(e?.maxRounds!==void 0&&(!Number.isInteger(e.maxRounds)||e.maxRounds<1))throw RangeError(`inputRequired.maxRounds must be a positive integer (got ${e.maxRounds})`);if(e?.roundTimeoutMs!==void 0&&(!Number.isFinite(e.roundTimeoutMs)||e.roundTimeoutMs<=0))throw RangeError(`inputRequired.roundTimeoutMs must be a positive number (got ${e.roundTimeoutMs})`);return{maxRounds:e?.maxRounds??8,roundTimeoutMs:e?.roundTimeoutMs??6e5,legacyShim:e?.legacyShim??!0}}(t?.inputRequired),t?.cacheHints!==void 0){for(let[e,r]of Object.entries(t.cacheHints))void 0!==r&&cH(r,`cacheHints['${e}']`);this._cacheHints=t.cacheHints}this.setRequestHandler("initialize",e=>this._oninitialize(e)),this.setNotificationHandler("notifications/initialized",()=>this.oninitialized?.()),cv(this._supportedProtocolVersions).length>0&&this.setRequestHandler("server/discover",()=>this._ondiscover()),this._capabilities.logging&&this._registerLoggingHandler()}async connect(e){if(void 0!==this.transport)throw new cf(cm.AlreadyConnected,"Use a separate Server instance per connection: this instance is already connected to a transport. To connect it to a new transport, call close() first.");this._boundFromTransport&&(this._boundFromTransport=!1,this._negotiatedProtocolVersion=void 0);let t=(e instanceof uE?s(e):void 0)?.revision;void 0!==t&&!this._servedModernEra()&&c_.includes(t)&&cv(this._supportedProtocolVersions).includes(t)&&(this._negotiatedProtocolVersion=t,this._boundFromTransport=!0),await super.connect(e)}_registerLoggingHandler(){this.setRequestHandler("logging/setLevel",async(e,t)=>{let r=t.sessionId||t.http?.req?.headers.get("mcp-session-id")||void 0,{level:i}=e.params,o=oJ(s0,i);return o.success&&this._loggingLevels.set(r,o.data),{}})}buildContext(e,t){let r=e.http||t?.request||t?.closeSSEStream||t?.closeStandaloneSSEStream;return{...e,mcpReq:{...e.mcpReq,log:(t,r,i)=>{let o;if(!this._capabilities.logging)return Promise.resolve();if(this._servedModernEra()){if(void 0===(o=e.mcpReq.envelope?.[ay]))return Promise.resolve()}else o=this._loggingLevels.get(e.sessionId)??this._loggingLevels.get(void 0);return void 0!==o&&this.LOG_LEVEL_SEVERITY.get(t)this.elicitInput(e,t),requestSampling:(e,t)=>this.createMessage(e,t)},http:r?{...e.http,req:t?.request,closeSSE:t?.closeSSEStream,closeStandaloneSSE:t?.closeStandaloneSSEStream}:void 0}}_loggingLevels=new Map;LOG_LEVEL_SEVERITY=new Map(s0.options.map((e,t)=>[e,t]));isMessageIgnored=(e,t)=>{let r=this._loggingLevels.get(t);return!!r&&this.LOG_LEVEL_SEVERITY.get(e){let a=i?await this._invokeInputRequiredCapableHandler(e,t,o,n):await t(o,n);if(lp(a)){if(!i)throw new cB(cG.InternalError,`Handler for ${e} returned an input-required result, but only tools/call, prompts/get and resources/read support input_required (protocol revision 2026-07-28)`);return a}return void 0===r?a:cF(a,r)}:async(r,i)=>{let o=await t(r,i);if(lp(o))throw new cB(cG.InternalError,`Handler for ${e} returned an input-required result, but only tools/call, prompts/get and resources/read support input_required (protocol revision 2026-07-28)`);return o}}return async(e,r)=>{let i=li(this._negotiatedProtocolVersion),o=i.validateRequest("tools/call",e);if(!o.ok)throw new cB("not-in-era"===o.reason?cG.InternalError:cG.InvalidParams,"not-in-era"===o.reason?"No wire schema for tools/call in the resolved era":`Invalid tools/call request: ${o.message}`);let n=await this._invokeInputRequiredCapableHandler("tools/call",t,e,r);if(lp(n))return n;let a=cS(n),s=i.validateResult("tools/call",a);if(!s.ok)throw new cB("not-in-era"===s.reason?cG.InternalError:cG.InvalidParams,"not-in-era"===s.reason?"No wire schema for tools/call in the resolved era":`Invalid tools/call result: ${s.message}`);return s.value}}_servedModernEra(){return void 0!==this._negotiatedProtocolVersion&&this._negotiatedProtocolVersion>=cg}async _invokeInputRequiredCapableHandler(e,t,r,i){let o,n=this._servedModernEra(),a=i.mcpReq.requestState();if(void 0!==a&&"string"!=typeof a)throw new cB(cG.InvalidParams,"Invalid or expired requestState",{reason:"invalid_request_state"});let s=i;if("string"==typeof a){let t=await this._verifyRequestState(a,i,e);void 0!==t&&(s=lD(i,t))}try{o=await t(r,s)}catch(e){if(e instanceof cB&&e.code===cG.UrlElicitationRequired){if(!n)throw e;throw new cB(cG.InternalError,`URL elicitation cannot be signalled by throwing UrlElicitationRequiredError on protocol revision ${this._negotiatedProtocolVersion}: return inputRequired({ inputRequests: { …: inputRequired.elicitUrl(...) } }) from the handler instead. The urlElicitationRequired error (-32042) of earlier revisions is not available on this revision.`)}throw e}if(!lp(o))return o;if(!n){if(!this._inputRequiredServing.legacyShim)throw new cB(cG.InternalError,`Handler for ${e} returned an input-required result, but this request is served on protocol revision ${this._negotiatedProtocolVersion??al}, which has no input_required vocabulary`);return await this._legacyInputRequiredShim().fulfill(e,t,r,s,o)}let d=o.inputRequests,c=null!=d&&Object.keys(d).length>0,l="string"==typeof o.requestState;if(!c&&!l)throw new cB(cG.InternalError,`Handler for ${e} returned an input-required result with neither inputRequests nor requestState (every InputRequiredResult must include at least one of the two)`);if(c){let t=this._inputRequestCapabilityView(i);for(let[r,i]of Object.entries(d)){let{embedded:o,required:n}=uW(e,r,i),a=cy(n,t);if(void 0!==a)throw new cQ({requiredCapabilities:a},`Cannot request input '${r}' (${o.method}): the request's client capabilities do not declare the required capability`)}}return o}async _verifyRequestState(e,t,r){if(void 0!==this._requestStateVerify)try{return await this._requestStateVerify(e,t)}catch(e){throw this.onerror?.(Error(`requestState verification rejected ${r}: ${e instanceof Error?e.message:String(e)}`)),new cB(cG.InvalidParams,"Invalid or expired requestState",{reason:"invalid_request_state"})}}_inputRequestCapabilityView(e){return this._servedModernEra()?e.mcpReq.envelope?.[ah]:this._clientCapabilities}_assertPushApiInServedEra(e){if(this._servedModernEra())throw new cf(cm.MethodNotSupportedByProtocolVersion,`Server-to-client requests are not available on protocol revision ${this._negotiatedProtocolVersion}: '${e}' cannot be sent while serving a request on that revision. Return inputRequired({ ... }) from the handler instead — the client fulfils the embedded requests and retries the original request (multi round-trip requests).`,{method:e,era:"2026-07-28"})}assertCapabilityForMethod(e){switch(e){case"sampling/createMessage":if(!this._clientCapabilities?.sampling)throw new cf(cm.CapabilityNotSupported,`Client does not support sampling (required for ${e})`);break;case"elicitation/create":if(!this._clientCapabilities?.elicitation)throw new cf(cm.CapabilityNotSupported,`Client does not support elicitation (required for ${e})`);break;case"roots/list":if(!this._clientCapabilities?.roots)throw new cf(cm.CapabilityNotSupported,`Client does not support listing roots (required for ${e})`)}}assertNotificationCapability(e){switch(e){case"notifications/message":if(!this._capabilities.logging)throw new cf(cm.CapabilityNotSupported,`Server does not support logging (required for ${e})`);break;case"notifications/resources/updated":case"notifications/resources/list_changed":if(!this._capabilities.resources)throw new cf(cm.CapabilityNotSupported,`Server does not support notifying about resources (required for ${e})`);break;case"notifications/tools/list_changed":if(!this._capabilities.tools)throw new cf(cm.CapabilityNotSupported,`Server does not support notifying of tool list changes (required for ${e})`);break;case"notifications/prompts/list_changed":if(!this._capabilities.prompts)throw new cf(cm.CapabilityNotSupported,`Server does not support notifying of prompt list changes (required for ${e})`);break;case"notifications/elicitation/complete":if(!this._clientCapabilities?.elicitation?.url)throw new cf(cm.CapabilityNotSupported,`Client does not support URL elicitation (required for ${e})`)}}assertRequestHandlerCapability(e){switch(e){case"completion/complete":if(!this._capabilities.completions)throw new cf(cm.CapabilityNotSupported,`Server does not support completions (required for ${e})`);break;case"logging/setLevel":if(!this._capabilities.logging)throw new cf(cm.CapabilityNotSupported,`Server does not support logging (required for ${e})`);break;case"prompts/get":case"prompts/list":if(!this._capabilities.prompts)throw new cf(cm.CapabilityNotSupported,`Server does not support prompts (required for ${e})`);break;case"resources/list":case"resources/templates/list":case"resources/read":if(!this._capabilities.resources)throw new cf(cm.CapabilityNotSupported,`Server does not support resources (required for ${e})`);break;case"tools/call":case"tools/list":if(!this._capabilities.tools)throw new cf(cm.CapabilityNotSupported,`Server does not support tools (required for ${e})`)}}async _oninitialize(e){let t=e.params.protocolVersion;this._clientCapabilities=e.params.capabilities,this._clientVersion=e.params.clientInfo;let r=this._supportedProtocolVersions.filter(e=>!(e>=cg)),i=r.includes(t)?t:r[0]??al;return this._negotiatedProtocolVersion=i,this.transport?.setProtocolVersion?.(i),{protocolVersion:i,capabilities:this.getCapabilities(),serverInfo:this._serverInfo,...this._instructions&&{instructions:this._instructions}}}_ondiscover(){return{supportedVersions:cv(this._supportedProtocolVersions),capabilities:{...this.getCapabilities()},...this._instructions&&{instructions:this._instructions}}}_outboundServerInfo(){return this._serverInfo}getClientCapabilities(){return this._clientCapabilities}getClientVersion(){return this._clientVersion}getNegotiatedProtocolVersion(){return this._negotiatedProtocolVersion}projectCallToolResult(e,t){return this._wireCodec().projectCallToolResult(e,t)}getCapabilities(){return this._capabilities}async ping(){return this._assertPushApiInServedEra("ping"),this.request({method:"ping"})}async createMessage(e,t){if(this._assertPushApiInServedEra("sampling/createMessage"),(e.tools||e.toolChoice)&&!this._clientCapabilities?.sampling?.tools)throw new cf(cm.CapabilityNotSupported,"Client does not support sampling tools capability.");if(e.messages.length>0){let t=e.messages.at(-1),r=Array.isArray(t.content)?t.content:[t.content],i=r.some(e=>"tool_result"===e.type),o=e.messages.length>1?e.messages.at(-2):void 0,n=o?Array.isArray(o.content)?o.content:[o.content]:[],a=n.some(e=>"tool_use"===e.type);if(i){if(r.some(e=>"tool_result"!==e.type))throw new cB(cG.InvalidParams,"The last message must contain only tool_result content if any is present");if(!a)throw new cB(cG.InvalidParams,"tool_result blocks are not matching any tool_use from the previous message")}if(a){let e=new Set(n.filter(e=>"tool_use"===e.type).map(e=>e.id)),t=new Set(r.filter(e=>"tool_result"===e.type).map(e=>e.toolUseId));if(e.size!==t.size||![...e].every(e=>t.has(e)))throw new cB(cG.InvalidParams,"ids of tool_result blocks and tool_use blocks from previous message do not match")}}let r=!!(e.tools||e.toolChoice),i=await this.request({method:"sampling/createMessage",params:e},t),o=this._wireCodec().samplingResultVariant(r,i);if(!o.ok)throw new cf(cm.InvalidResult,`Invalid sampling/createMessage result: ${"invalid"===o.reason?o.message:o.reason}`);return o.value}async elicitInput(e,t){switch(this._assertPushApiInServedEra("elicitation/create"),e.mode??"form"){case"url":if(!this._clientCapabilities?.elicitation?.url)throw new cf(cm.CapabilityNotSupported,"Client does not support url elicitation.");break;case"form":if(!this._clientCapabilities?.elicitation?.form)throw new cf(cm.CapabilityNotSupported,"Client does not support form elicitation.")}return this._sendElicitationLeg(e,t)}async _sendElicitationLeg(e,t,r){let i=e.mode??"form",o=r?.validateAcceptedContent??!0;switch(i){case"url":return this.request({method:"elicitation/create",params:e},t);case"form":{let r="form"===e.mode?e:{...e,mode:"form"},i=await this.request({method:"elicitation/create",params:r},t);if(o&&"accept"===i.action&&i.content&&r.requestedSchema)try{let e=this._jsonSchemaValidator.getValidator(r.requestedSchema)(i.content);if(!e.valid)throw new cB(cG.InvalidParams,`Elicitation response content does not match requested schema: ${e.errorMessage}`)}catch(e){if(e instanceof cB)throw e;throw new cB(cG.InternalError,`Error validating elicitation response: ${e instanceof Error?e.message:String(e)}`)}return i}}}createElicitationCompletionNotifier(e,t){if(!this._clientCapabilities?.elicitation?.url)throw new cf(cm.CapabilityNotSupported,"Client does not support URL elicitation (required for notifications/elicitation/complete)");return()=>this.notification({method:"notifications/elicitation/complete",params:{elicitationId:e}},t)}async listRoots(e,t){return this._assertPushApiInServedEra("roots/list"),this.request({method:"roots/list",params:e},t)}async sendLoggingMessage(e,t){if(this._capabilities.logging&&!this.isMessageIgnored(e.level,t))return this.notification({method:"notifications/message",params:e})}async sendResourceUpdated(e){return this.notification({method:"notifications/resources/updated",params:e})}async sendResourceListChanged(){return this.notification({method:"notifications/resources/list_changed"})}async sendToolListChanged(){return this.notification({method:"notifications/tools/list_changed"})}async sendPromptListChanged(){return this.notification({method:"notifications/prompts/list_changed"})}},uL=class{server;_maxToolInputElements;_registeredResources={};_registeredResourceTemplates={};_registeredTools={};_registeredPrompts={};_toolInputSchemaJson={};toolInputSchemaJson(e){let t=this._registeredTools[e];if(void 0!==t&&t.enabled){if(Object.hasOwn(this._toolInputSchemaJson,e))return this._toolInputSchemaJson[e];if(void 0===t.inputSchema)return uG;try{let r=lk(t.inputSchema,"input");return this._toolInputSchemaJson[e]=r,r}catch{return}}}constructor(e,t){this.server=new uF(e,t),this._maxToolInputElements=function(e){if(void 0!==e&&1/0!==e){if("number"!=typeof e||Number.isNaN(e)||e<1)throw RangeError(`maxToolInputElements must be a number of at least 1, or Infinity, got ${String(e)}`);return e}}(t?.maxToolInputElements),t?.capabilities?.tools&&this.setToolRequestHandlers(),t?.capabilities?.resources&&this.setResourceRequestHandlers(),t?.capabilities?.prompts&&this.setPromptRequestHandlers()}async connect(e){return"object"==typeof e&&null!==e&&"setScopeChallengeResolver"in e&&"function"==typeof e.setScopeChallengeResolver&&e.setScopeChallengeResolver(e=>this.resolveScopeChallenge(e)),await this.server.connect(e)}async close(){await this.server.close()}resolveScopeChallenge=e=>{switch(e.request.method){case"tools/call":{let t=e.request.params?.name;if("string"!=typeof t)return;let r=this._registeredTools[t];if(void 0===r||!r.enabled)return;return r.scopeChallenge?.(e)}case"resources/read":{let t,r=e.request.params?.uri;if("string"!=typeof r)return;try{t=new URL(r)}catch{return}let i=this._registeredResources[t.toString()];if(void 0!==i)return i.enabled?i.scopeChallenge?.(e):void 0;for(let r of Object.values(this._registeredResourceTemplates))if(r.resourceTemplate.uriTemplate.match(t.toString()))return r.enabled?r.scopeChallenge?.(e):void 0;return}case"prompts/get":{let t=e.request.params?.name;if("string"!=typeof t)return;let r=this._registeredPrompts[t];if(void 0===r||!r.enabled)return;return r.scopeChallenge?.(e)}default:return}};_toolHandlersInitialized=!1;setToolRequestHandlers(){this._toolHandlersInitialized||(this.server.assertCanSetRequestHandler("tools/list"),this.server.assertCanSetRequestHandler("tools/call"),this.server.registerCapabilities({tools:{listChanged:this.server.getCapabilities().tools?.listChanged??!0}}),this.server.setRequestHandler("tools/list",()=>({tools:Object.entries(this._registeredTools).filter(([,e])=>e.enabled).map(([e,t])=>{let r={name:e,title:t.title,description:t.description,inputSchema:t.inputSchema?function(e,t){let r,i,o,n,a,s=lk(t,"input"),d=(i=[],o=new Map,void 0!==(a=(n=(e,t,a)=>{if(null===e||"object"!=typeof e)return;if(lu in e){if(!a||0===t.length)return`${lg(t)}: x-mcp-header is only permitted on properties statically reachable via a chain of 'properties' keys (not under items, additionalProperties, oneOf/anyOf/allOf/not, if/then/else, or $ref)`;let n=e[lu];if("string"!=typeof n||0===n.length)return`${lg(t)}: x-mcp-header MUST be a non-empty string`;if(!lm.test(n))return`${lg(t)}: x-mcp-header '${n}' is not a valid RFC 9110 token (no spaces, control characters or HTTP delimiters)`;let s="string"==typeof e.type?e.type:void 0;if(void 0===s||!lf.has(s)){let e=`${lg(t)}: x-mcp-header is only permitted on primitive-typed properties (string, integer, boolean); got ${s??""}`;if("number"!==s)return e;r??=e}let d=n.toLowerCase(),c=o.get(d);if(void 0!==c)return`x-mcp-header '${n}' is not case-insensitively unique (also declared as '${c}')`;o.set(d,n),i.push({path:t,headerName:n,type:s})}let s=e.properties;if(null!==s&&"object"==typeof s)for(let[e,r]of Object.entries(s)){let i=n(r,[...t,e],a);if(void 0!==i)return i}for(let r of lh){let i=e[r];if(void 0!==i)for(let e of Array.isArray(i)?i:null!==i&&"object"==typeof i&&ly.has(r)?Object.values(i):[i]){let i=n(e,[...t,`<${r}>`],!1);if(void 0!==i)return i}}})(s,[],!0))?{valid:!1,reason:r??a}:void 0===r?{valid:!0,declarations:i}:{valid:!1,reason:r,declarations:i});return d.valid||console.warn(`[mcp-sdk] tool '${e}' carries an invalid x-mcp-header declaration and will be excluded by conforming Streamable HTTP clients: ${d.reason}`),s}(e,t.inputSchema):uG,annotations:t.annotations,icons:t.icons,execution:t.execution,_meta:t._meta};return t.outputSchema&&(r.outputSchema=lk(t.outputSchema,"output")),r})})),this.server.setRequestHandler("tools/call",async(e,t)=>{let r=this._registeredTools[e.params.name];if(!r)throw new cB(cG.InvalidParams,`Tool ${e.params.name} not found`);if(!r.enabled)throw new cB(cG.InvalidParams,`Tool ${e.params.name} disabled`);try{let i=await this.validateToolInput(r,e.params.arguments,e.params.name),o=await this.executeToolHandler(r,i,t);if(await this.validateToolOutput(r,o,e.params.name),lp(o))return o;return this.server.projectCallToolResult(o,r.outputSchemaJson)}catch(e){if(e instanceof cB&&e.code===cG.UrlElicitationRequired)throw e;return this.createToolError(e instanceof Error?e.message:String(e))}}),this._toolHandlersInitialized=!0)}createToolError(e){return{content:[{type:"text",text:e}],isError:!0}}async validateToolInput(e,t,r){if(void 0!==this._maxToolInputElements&&function(e,t){let r=0,i=[e];for(;i.length>0;){let e=i.pop();if(null!==e&&"object"==typeof e)if(Array.isArray(e))for(let o of e){if(++r>t)return r;null!==o&&"object"==typeof o&&i.push(o)}else for(let o in e){if(!Object.prototype.hasOwnProperty.call(e,o))continue;if(++r>t)return r;let n=e[o];null!==n&&"object"==typeof n&&i.push(n)}}return r}(t,this._maxToolInputElements)>this._maxToolInputElements)throw new cB(cG.InvalidParams,`Invalid arguments for tool ${r}: arguments contain more than the maximum of ${this._maxToolInputElements} elements`);if(!e.inputSchema)return;let i=await lR(e.inputSchema,t??{});if(!i.success)throw new cB(cG.InvalidParams,`Input validation error: Invalid arguments for tool ${r}: ${i.error}`);return i.data}async validateToolOutput(e,t,r){if(!e.outputSchema||lp(t)||t.isError)return;if(void 0===t.structuredContent)throw new cB(cG.InvalidParams,`Output validation error: Tool ${r} has an output schema but no structured content was provided`);let i=await lR(e.outputSchema,t.structuredContent);if(!i.success)throw new cB(cG.InvalidParams,`Output validation error: Invalid structured content for tool ${r}: ${i.error}`)}async executeToolHandler(e,t,r){return e.executor(t,r)}_completionHandlerInitialized=!1;setCompletionRequestHandler(){this._completionHandlerInitialized||(this.server.assertCanSetRequestHandler("completion/complete"),this.server.registerCapabilities({completions:{}}),this.server.setRequestHandler("completion/complete",async e=>{switch(e.params.ref.type){case"ref/prompt":if("ref/prompt"!==e.params.ref.type)throw TypeError(`Expected CompleteRequestPrompt, but got ${e.params.ref.type}`);return this.handlePromptCompletion(e,e.params.ref);case"ref/resource":if("ref/resource"!==e.params.ref.type)throw TypeError(`Expected CompleteRequestResourceTemplate, but got ${e.params.ref.type}`);return this.handleResourceCompletion(e,e.params.ref);default:throw new cB(cG.InvalidParams,`Invalid completion reference: ${e.params.ref}`)}}),this._completionHandlerInitialized=!0)}async handlePromptCompletion(e,t){let r=this._registeredPrompts[t.name];if(!r)throw new cB(cG.InvalidParams,`Prompt ${t.name} not found`);if(!r.enabled)throw new cB(cG.InvalidParams,`Prompt ${t.name} disabled`);if(!r.argsSchema)return uZ;let i=uX(uQ(r.argsSchema)?.[e.params.argument.name]);if(!uT(i))return uZ;let o=i[uC]?.complete;return o?uJ(await o(e.params.argument.value,e.params.context)):uZ}async handleResourceCompletion(e,t){let r=Object.values(this._registeredResourceTemplates).find(e=>e.resourceTemplate.uriTemplate.toString()===t.uri);if(!r){if(this._registeredResources[t.uri])return uZ;throw new cB(cG.InvalidParams,`Resource template ${e.params.ref.uri} not found`)}let i=r.resourceTemplate.completeCallback(e.params.argument.name);return i?uJ(await i(e.params.argument.value,e.params.context)):uZ}_resourceHandlersInitialized=!1;setResourceRequestHandlers(){this._resourceHandlersInitialized||(this.server.assertCanSetRequestHandler("resources/list"),this.server.assertCanSetRequestHandler("resources/templates/list"),this.server.assertCanSetRequestHandler("resources/read"),this.server.registerCapabilities({resources:{listChanged:this.server.getCapabilities().resources?.listChanged??!0}}),this.server.setRequestHandler("resources/list",async(e,t)=>{let r=Object.entries(this._registeredResources).filter(([e,t])=>t.enabled).map(([e,t])=>({uri:e,name:t.name,...t.metadata})),i=[];for(let e of Object.values(this._registeredResourceTemplates))if(e.resourceTemplate.listCallback)for(let r of(await e.resourceTemplate.listCallback(t)).resources)i.push({...e.metadata,...r});return{resources:[...r,...i]}}),this.server.setRequestHandler("resources/templates/list",async()=>({resourceTemplates:Object.entries(this._registeredResourceTemplates).map(([e,t])=>({name:e,uriTemplate:t.resourceTemplate.uriTemplate.toString(),...t.metadata}))})),this.server.setRequestHandler("resources/read",async(e,t)=>{let r;try{r=new URL(e.params.uri)}catch{throw new cB(cG.InvalidParams,`Resource URI ${e.params.uri} is invalid`,{uri:e.params.uri,reason:"invalid_uri"})}let i=this._registeredResources[r.toString()];if(i){if(!i.enabled)throw new cB(cG.InvalidParams,`Resource ${r} disabled`);return cF(await i.readCallback(r,t),i.cacheHint)}for(let e of Object.values(this._registeredResourceTemplates)){let i=e.resourceTemplate.uriTemplate.match(r.toString());if(i){if(!e.enabled)throw new cB(cG.InvalidParams,`Resource template ${e.resourceTemplate.uriTemplate} disabled`);return cF(await e.readCallback(r,i,t),e.cacheHint)}}throw new cK(e.params.uri)}),this._resourceHandlersInitialized=!0)}_promptHandlersInitialized=!1;setPromptRequestHandlers(){this._promptHandlersInitialized||(this.server.assertCanSetRequestHandler("prompts/list"),this.server.assertCanSetRequestHandler("prompts/get"),this.server.registerCapabilities({prompts:{listChanged:this.server.getCapabilities().prompts?.listChanged??!0}}),this.server.setRequestHandler("prompts/list",()=>({prompts:Object.entries(this._registeredPrompts).filter(([,e])=>e.enabled).map(([e,t])=>{let r,i,o;return{name:e,title:t.title,description:t.description,arguments:t.argsSchema?(i=(r=lk(t.argsSchema,"input")).properties||{},o=r.required||[],Object.entries(i).map(([e,t])=>({name:e,description:t?.description,required:o.includes(e)}))):void 0,icons:t.icons,_meta:t._meta}})})),this.server.setRequestHandler("prompts/get",async(e,t)=>{let r=this._registeredPrompts[e.params.name];if(!r)throw new cB(cG.InvalidParams,`Prompt ${e.params.name} not found`);if(!r.enabled)throw new cB(cG.InvalidParams,`Prompt ${e.params.name} disabled`);return r.handler(e.params.arguments,t)}),this._promptHandlersInitialized=!0)}registerResource(e,t,r,i){let{cacheHint:o,scopeChallenge:n,...a}=r;if(void 0!==o&&cH(o,`resource ${e}`),"string"==typeof t){if(this._registeredResources[t])throw Error(`Resource ${t} is already registered`);let s=this._createRegisteredResource(e,r.title,t,a,n,i);return void 0!==o&&(s.cacheHint=o),this.setResourceRequestHandlers(),this.sendResourceListChanged(),s}{if(this._registeredResourceTemplates[e])throw Error(`Resource template ${e} is already registered`);let s=this._createRegisteredResourceTemplate(e,r.title,t,a,n,i);return void 0!==o&&(s.cacheHint=o),this.setResourceRequestHandlers(),this.sendResourceListChanged(),s}}_createRegisteredResource(e,t,r,i,o,n){let a={name:e,title:t,metadata:i,readCallback:n,scopeChallenge:o,enabled:!0,disable:()=>a.update({enabled:!1}),enable:()=>a.update({enabled:!0}),remove:()=>a.update({uri:null}),update:e=>{void 0!==e.uri&&e.uri!==r&&(delete this._registeredResources[r],e.uri&&(this._registeredResources[e.uri]=a)),void 0!==e.name&&(a.name=e.name),void 0!==e.metadata&&(a.metadata=e.metadata),void 0!==e.title&&(a.title=e.title,a.metadata={...a.metadata,title:e.title}),void 0!==e.callback&&(a.readCallback=e.callback),void 0!==e.scopeChallenge&&(a.scopeChallenge=null===e.scopeChallenge?void 0:e.scopeChallenge),void 0!==e.enabled&&(a.enabled=e.enabled),this.sendResourceListChanged()}};return this._registeredResources[r]=a,a}_createRegisteredResourceTemplate(e,t,r,i,o,n){let a={resourceTemplate:r,title:t,metadata:i,readCallback:n,scopeChallenge:o,enabled:!0,disable:()=>a.update({enabled:!1}),enable:()=>a.update({enabled:!0}),remove:()=>a.update({name:null}),update:t=>{void 0!==t.name&&t.name!==e&&(delete this._registeredResourceTemplates[e],t.name&&(this._registeredResourceTemplates[t.name]=a)),void 0!==t.template&&(a.resourceTemplate=t.template),void 0!==t.metadata&&(a.metadata=t.metadata),void 0!==t.title&&(a.title=t.title,a.metadata={...a.metadata,title:t.title}),void 0!==t.callback&&(a.readCallback=t.callback),void 0!==t.scopeChallenge&&(a.scopeChallenge=null===t.scopeChallenge?void 0:t.scopeChallenge),void 0!==t.enabled&&(a.enabled=t.enabled),this.sendResourceListChanged()}};this._registeredResourceTemplates[e]=a;let s=r.uriTemplate.variableNames;return Array.isArray(s)&&s.some(e=>!!r.completeCallback(e))&&this.setCompletionRequestHandler(),a}_createRegisteredPrompt(e,t,r,i,o,n,a,s){let d=i,c=o,l={title:t,description:r,argsSchema:i,icons:n,scopeChallenge:a,_meta:s,handler:uK(e,i,o),enabled:!0,disable:()=>l.update({enabled:!1}),enable:()=>l.update({enabled:!0}),remove:()=>l.update({name:null}),update:t=>{void 0!==t.name&&t.name!==e&&(delete this._registeredPrompts[e],t.name&&(this._registeredPrompts[t.name]=l)),void 0!==t.title&&(l.title=t.title),void 0!==t.description&&(l.description=t.description),void 0!==t.icons&&(l.icons=t.icons),void 0!==t.scopeChallenge&&(l.scopeChallenge=null===t.scopeChallenge?void 0:t.scopeChallenge),void 0!==t._meta&&(l._meta=t._meta);let r=!1;void 0!==t.argsSchema&&(l.argsSchema=t.argsSchema,d=t.argsSchema,r=!0),void 0!==t.callback&&(c=t.callback,r=!0),r&&(l.handler=uK(e,d,c)),void 0!==t.enabled&&(l.enabled=t.enabled),this.sendPromptListChanged()}};if(this._registeredPrompts[e]=l,i){let e=uQ(i);e&&Object.values(e).some(e=>uT(uX(e)))&&this.setCompletionRequestHandler()}return l}_createRegisteredTool(e,t,r,i,o,n,a,s,d,c,l){let p;lK(e);let u=l,m={title:t,description:r,inputSchema:i,outputSchema:o,get outputSchemaJson(){return p??=uB(m.outputSchema)},set outputSchemaJson(e){p=e},annotations:n,icons:a,execution:s,scopeChallenge:d,_meta:c,handler:l,executor:uH(i,l),enabled:!0,disable:()=>m.update({enabled:!1}),enable:()=>m.update({enabled:!0}),remove:()=>m.update({name:null}),update:t=>{void 0!==t.name&&t.name!==e&&("string"==typeof t.name&&lK(t.name),delete this._registeredTools[e],delete this._toolInputSchemaJson[e],t.name&&(delete this._toolInputSchemaJson[t.name],this._registeredTools[t.name]=m,e=t.name)),void 0!==t.title&&(m.title=t.title),void 0!==t.description&&(m.description=t.description);let r=!1;void 0!==t.paramsSchema&&(m.inputSchema=t.paramsSchema,delete this._toolInputSchemaJson[e],r=!0),void 0!==t.callback&&(m.handler=t.callback,u=t.callback,r=!0),r&&(m.executor=uH(m.inputSchema,u)),void 0!==t.outputSchema&&(m.outputSchema=t.outputSchema,m.outputSchemaJson=uB(t.outputSchema)),void 0!==t.annotations&&(m.annotations=t.annotations),void 0!==t.icons&&(m.icons=t.icons),void 0!==t.scopeChallenge&&(m.scopeChallenge=null===t.scopeChallenge?void 0:t.scopeChallenge),void 0!==t._meta&&(m._meta=t._meta),void 0!==t.enabled&&(m.enabled=t.enabled),this.sendToolListChanged()}};return this._registeredTools[e]=m,this.setToolRequestHandlers(),this.sendToolListChanged(),m}registerTool(e,t,r){if(this._registeredTools[e])throw Error(`Tool ${e} is already registered`);let{title:i,description:o,inputSchema:n,outputSchema:a,annotations:s,icons:d,scopeChallenge:c,_meta:l}=t;return this._createRegisteredTool(e,i,o,lZ(n),lZ(a),s,d,void 0,c,l,r)}registerPrompt(e,t,r){if(this._registeredPrompts[e])throw Error(`Prompt ${e} is already registered`);let{title:i,description:o,argsSchema:n,icons:a,scopeChallenge:s,_meta:d}=t,c=this._createRegisteredPrompt(e,i,o,lZ(n),r,a,s,d);return this.setPromptRequestHandlers(),this.sendPromptListChanged(),c}isConnected(){return void 0!==this.server.transport}async sendLoggingMessage(e,t){return this.server.sendLoggingMessage(e,t)}sendResourceListChanged(){this.isConnected()&&this.server.sendResourceListChanged()}sendToolListChanged(){this.isConnected()&&this.server.sendToolListChanged()}sendPromptListChanged(){this.isConnected()&&this.server.sendPromptListChanged()}},uU=class{_uriTemplate;constructor(e,t){this._callbacks=t,this._uriTemplate="string"==typeof e?new lJ(e):e}get uriTemplate(){return this._uriTemplate}get listCallback(){return this._callbacks.list}completeCallback(e){return this._callbacks.complete?.[e]}};function uH(e,t){return e?async(e,r)=>t(e,r):async(e,r)=>t(r)}let uG={type:"object",properties:{}};function uB(e){if(void 0!==e)try{return lk(e,"output")}catch{return}}function uK(e,t,r){return t?async(i,o)=>{let n=await lR(t,i??{});if(!n.success)throw new cB(cG.InvalidParams,`Invalid arguments for prompt ${e}: ${n.error}`);return r(n.data,o)}:async(e,t)=>r(t)}function uJ(e){return{completion:{values:e.map(String).slice(0,100),total:e.length,hasMore:e.length>100}}}let uZ={completion:{values:[],hasMore:!1}};function uQ(e){if(e.shape&&"object"==typeof e.shape)return e.shape}function uX(e){return e?.type!=="optional"?e:e.def?.innerType??e}var uY=class{sessionIdGenerator;_started=!1;_hasHandledRequest=!1;_closed=!1;_streamMapping=new Map;_requestToStreamMapping=new Map;_requestResponseMap=new Map;_initialized=!1;_enableJsonResponse=!1;_standaloneSseStreamId="_GET_stream";_eventStore;_onsessioninitialized;_onsessionclosed;_allowedHosts;_allowedOrigins;_enableDnsRebindingProtection;_retryInterval;_supportedProtocolVersions;_keepAliveMs;_maxRequestBodySize;_scopeChallengeResolver;sessionId;onclose;onerror;onmessage;constructor(e={}){this.sessionIdGenerator=e.sessionIdGenerator,this._enableJsonResponse=e.enableJsonResponse??!1,this._eventStore=e.eventStore,this._onsessioninitialized=e.onsessioninitialized,this._onsessionclosed=e.onsessionclosed,this._allowedHosts=e.allowedHosts,this._allowedOrigins=e.allowedOrigins,this._enableDnsRebindingProtection=e.enableDnsRebindingProtection??!1,this._retryInterval=e.retryInterval,this._supportedProtocolVersions=e.supportedProtocolVersions??ap,this._keepAliveMs=e.keepAliveMs??15e3,this._maxRequestBodySize=function(e){if(void 0===e)return 4194304;if("number"!=typeof e||!Number.isFinite(e)||e<=0)throw RangeError(`maxRequestBodySize must be a positive number of bytes, got ${String(e)}`);return e}(e.maxRequestBodySize)}startKeepAlive(e,t){if(this._closed)return;let r=uO(this._keepAliveMs,()=>{try{e.enqueue(t.encode(": keepalive\n\n"))}catch{void 0!==r&&clearInterval(r)}});return r}setScopeChallengeResolver(e){this._scopeChallengeResolver=e}async start(){if(this._started)throw Error("Transport already started");this._started=!0}setSupportedProtocolVersions(e){this._supportedProtocolVersions=e}createJsonErrorResponse(e,t,r,i){let o={code:t,message:r};return i?.data!==void 0&&(o.data=i.data),Response.json({jsonrpc:"2.0",error:o,id:null},{status:e,headers:{"Content-Type":"application/json",...i?.headers}})}async _checkScopeChallenge(e,t){var r;if(!this._scopeChallengeResolver)return;let i=await async function(e,t,r){for(let o of e){let e=await r({request:o,...void 0!==t&&{authInfo:t}});if(void 0!==e){if(null===e||"object"!=typeof e||!Array.isArray(e.scopes)||0===e.scopes.length)throw TypeError("scope challenge must contain at least one scope");for(let[t,r]of e.scopes.entries()){var i=`scope challenge scopes[${t}]`;if("string"!=typeof r||!/^[\u0021\u0023-\u005B\u005D-\u007E]+$/.test(r))throw TypeError(`${i} must satisfy the OAuth scope-token grammar`)}if(void 0!==e.errorDescription&&"string"!=typeof e.errorDescription)throw TypeError("scope challenge errorDescription must be a string");if(void 0!==e.errorDescription&&!/^[\u0020-\u0021\u0023-\u005B\u005D-\u007E]+$/.test(e.errorDescription))throw TypeError("scope challenge errorDescription must satisfy the RFC 6750 error-description grammar");return e}}}(e.filter(e=>ll(e)),t,this._scopeChallengeResolver);return void 0===i?void 0:(r=function(e){if(e?.resourceMetadataUrl!==void 0)return e.resourceMetadataUrl;if(e?.resource?.protocol==="https:"||e?.resource?.protocol==="http:"){var t,r;let i,o;return i=new URL(t=e.resource),o=(r=t.pathname).length>1&&r.endsWith("/")?r.slice(0,-1):r,i.pathname=`/.well-known/oauth-protected-resource${"/"===o?"":o}`,i.hash="",i.href}}(t),function(e,t){let{requiredScopes:r=[],resourceMetadataUrl:i}=t??{};if(!(e instanceof cu)){let e=new cu(cp.ServerError,"Internal Server Error");return Response.json(e.toResponseObject(),{status:500})}switch(e.code){case cp.InvalidToken:{let t=uM(e.code,e.message,r,i);return Response.json(e.toResponseObject(),{status:401,headers:{"WWW-Authenticate":t}})}case cp.InsufficientScope:{let t=uM(e.code,e.message,r,i);return Response.json(e.toResponseObject(),{status:403,headers:{"WWW-Authenticate":t}})}case cp.ServerError:return Response.json(e.toResponseObject(),{status:500});default:return Response.json(e.toResponseObject(),{status:400})}}(new cu(cp.InsufficientScope,i.errorDescription??"Insufficient scope"),{requiredScopes:[...i.scopes],resourceMetadataUrl:r}))}validateRequestHeaders(e){if(this._enableDnsRebindingProtection){if(this._allowedHosts&&this._allowedHosts.length>0){let t=e.headers.get("host");if(!t||!this._allowedHosts.includes(t)){let e=`Invalid Host header: ${t}`;return this.onerror?.(Error(e)),this.createJsonErrorResponse(403,-32e3,e)}}if(this._allowedOrigins&&this._allowedOrigins.length>0){let t=e.headers.get("origin");if(t&&!this._allowedOrigins.includes(t)){let e=`Invalid Origin header: ${t}`;return this.onerror?.(Error(e)),this.createJsonErrorResponse(403,-32e3,e)}}}}async handleRequest(e,t){if(this._closed)return this.createJsonErrorResponse(404,-32001,"Session not found");if(!this.sessionIdGenerator&&this._hasHandledRequest)throw Error("Stateless transport cannot be reused across requests. Create a new transport per request.");this._hasHandledRequest=!0;let r=this.validateRequestHeaders(e);if(r)return r;switch(e.method){case"POST":return this.handlePostRequest(e,t);case"GET":return this.handleGetRequest(e);case"DELETE":return this.handleDeleteRequest(e);default:return this.handleUnsupportedRequest()}}supportsEmptySSEData(e){return this._supportedProtocolVersions.includes(e)&&e>="2025-11-25"}async writePrimingEvent(e,t,r,i){if(!this._eventStore||!this.supportsEmptySSEData(i))return;let o=await this._eventStore.storeEvent(r,{}),n=`id: ${o} data: `;void 0!==this._retryInterval&&(n=`id: ${o} @@ -74,16 +74,16 @@ data: `;return i&&(o+=`id: ${i} `),o+=`data: ${JSON.stringify(r)} -`,e.enqueue(t.encode(o)),!0}catch(e){return this.onerror?.(e),!1}}handleUnsupportedRequest(){return this.onerror?.(Error("Method not allowed.")),Response.json({jsonrpc:"2.0",error:{code:-32e3,message:"Method not allowed."},id:null},{status:405,headers:{Allow:"GET, POST, DELETE","Content-Type":"application/json"}})}async handlePostRequest(e,t){try{var r,i;let o,n,a,s,d,c=e.headers.get("accept");if(!c?.includes("application/json")||!c.includes("text/event-stream"))return this.onerror?.(Error("Not Acceptable: Client must accept both application/json and text/event-stream")),this.createJsonErrorResponse(406,-32e3,"Not Acceptable: Client must accept both application/json and text/event-stream");if(r=e.headers.get("content-type"),"application/json"!==r&&"application/json"!==function(e){if(e)try{return lH.parse(e).type}catch{let t=(e.split(";",1)[0]??"").trim().toLowerCase();if(""===t||e.slice(t.length).includes(","))return;return t}}(r))return this.onerror?.(Error("Unsupported Media Type: Content-Type must be application/json")),this.createJsonErrorResponse(415,-32e3,"Unsupported Media Type: Content-Type must be application/json");if(t?.parsedBody===void 0)try{let t=await async function(e,t=4194304){if(Number(e.headers.get("content-length"))>t)return{tooLarge:!0};if(null===e.body)return{tooLarge:!1,text:""};let r=e.body.getReader(),i=new TextDecoder,o=0,n="";try{for(;;){let{done:e,value:a}=await r.read();if(e)break;if((o+=a.byteLength)>t)return{tooLarge:!0};n+=i.decode(a,{stream:!0})}}finally{r.releaseLock()}return{tooLarge:!1,text:n+i.decode()}}(e,this._maxRequestBodySize);if(t.tooLarge){let e=(i=this._maxRequestBodySize,`Payload Too Large: Request body must not exceed ${i} bytes`);return this.onerror?.(Error(e)),this.createJsonErrorResponse(413,-32e3,e)}o=JSON.parse(t.text)}catch(e){return this.onerror?.(e),this.createJsonErrorResponse(400,-32700,"Parse error: Invalid JSON")}else o=t.parsedBody;if(Array.isArray(o)&&o.length>100)return this.onerror?.(Error("Invalid Request: Batch must not exceed 100 messages")),this.createJsonErrorResponse(400,-32600,"Invalid Request: Batch must not exceed 100 messages");try{n=Array.isArray(o)?o.map(e=>aW.parse(e)):[aW.parse(o)]}catch(e){return this.onerror?.(e),this.createJsonErrorResponse(400,-32700,"Parse error: Invalid JSON-RPC message")}if(this._closed)return this.createJsonErrorResponse(404,-32001,"Session not found");let l=n.some(e=>aX.safeParse(e).success);if(l){if(this._initialized&&void 0!==this.sessionId)return this.onerror?.(Error("Invalid Request: Server already initialized")),this.createJsonErrorResponse(400,-32600,"Invalid Request: Server already initialized");if(n.length>1)return this.onerror?.(Error("Invalid Request: Only one initialization request is allowed")),this.createJsonErrorResponse(400,-32600,"Invalid Request: Only one initialization request is allowed");this.sessionId=this.sessionIdGenerator?.(),this._initialized=!0,this.sessionId&&this._onsessioninitialized&&await Promise.resolve(this._onsessioninitialized(this.sessionId))}if(!l){let t=this.validateSession(e);if(t)return t;let r=this.validateProtocolVersion(e);if(r)return r}if(this._closed)return this.createJsonErrorResponse(404,-32001,"Session not found");try{a=await this._checkScopeChallenge(n,t?.authInfo)}catch(e){return this.onerror?.(e),this.createJsonErrorResponse(500,-32603,"Internal server error")}if(a)return a;if(!n.some(e=>ll(e))){for(let r of n)this.onmessage?.(r,{authInfo:t?.authInfo,request:e});return new Response(null,{status:202})}let p=crypto.randomUUID(),u=n.find(e=>aX.safeParse(e).success),m=u?u.params.protocolVersion:e.headers.get("mcp-protocol-version")??"2025-03-26";if(this._enableJsonResponse)return new Promise(r=>{for(let e of(this._streamMapping.set(p,{resolveJson:r,cleanup:()=>{this._streamMapping.delete(p)}}),n))ll(e)&&this._requestToStreamMapping.set(e.id,p);for(let r of n)this.onmessage?.(r,{authInfo:t?.authInfo,request:e})});let f=new TextEncoder,h=new ReadableStream({start:e=>{s=e},cancel:()=>{void 0!==d&&clearInterval(d),this._streamMapping.get(p)?.controller===s&&this._streamMapping.delete(p)}}),y={"Content-Type":"text/event-stream","Cache-Control":"no-cache, no-transform",Connection:"keep-alive","X-Accel-Buffering":"no"};for(let e of(void 0!==this.sessionId&&(y["mcp-session-id"]=this.sessionId),n))ll(e)&&(this._streamMapping.set(p,{controller:s,encoder:f,cleanup:()=>{void 0!==d&&clearInterval(d),this._streamMapping.delete(p);try{s.close()}catch{}}}),this._requestToStreamMapping.set(e.id,p));for(let r of(await this.writePrimingEvent(s,f,p,m),n)){let i,o;ll(r)&&this._eventStore&&this.supportsEmptySSEData(m)&&(i=()=>{this.closeSSEStream(r.id)},o=()=>{this.closeStandaloneSSEStream()}),this.onmessage?.(r,{authInfo:t?.authInfo,request:e,closeSSEStream:i,closeStandaloneSSEStream:o})}return this._streamMapping.get(p)?.controller===s&&(d=this.startKeepAlive(s,f)),new Response(h,{status:200,headers:y})}catch(e){return this.onerror?.(e),this.createJsonErrorResponse(400,-32700,"Parse error",{data:String(e)})}}async handleDeleteRequest(e){let t=this.validateSession(e);if(t)return t;let r=this.validateProtocolVersion(e);if(r)return r;try{return await Promise.resolve(this._onsessionclosed?.(this.sessionId)),new Response(null,{status:200})}finally{await this.close()}}validateSession(e){if(void 0===this.sessionIdGenerator)return;if(!this._initialized)return this.onerror?.(Error("Bad Request: Server not initialized")),this.createJsonErrorResponse(400,-32e3,"Bad Request: Server not initialized");let t=e.headers.get("mcp-session-id");return t?t!==this.sessionId?(this.onerror?.(Error("Session not found")),this.createJsonErrorResponse(404,-32001,"Session not found")):void 0:(this.onerror?.(Error("Bad Request: Mcp-Session-Id header is required")),this.createJsonErrorResponse(400,-32e3,"Bad Request: Mcp-Session-Id header is required"))}validateProtocolVersion(e){let t=e.headers.get("mcp-protocol-version");if(null!==t&&!this._supportedProtocolVersions.includes(t)){let e=`Bad Request: Unsupported protocol version: ${t} (supported versions: ${this._supportedProtocolVersions.join(", ")})`;return this.onerror?.(Error(e)),this.createJsonErrorResponse(400,-32e3,e)}}async close(){if(!this._closed){for(let{cleanup:e}of(this._closed=!0,this._streamMapping.values()))e();this._streamMapping.clear(),this._requestResponseMap.clear(),this.onclose?.()}}closeSSEStream(e){let t=this._requestToStreamMapping.get(e);if(!t)return;let r=this._streamMapping.get(t);r&&r.cleanup()}closeStandaloneSSEStream(){let e=this._streamMapping.get(this._standaloneSseStreamId);e&&e.cleanup()}async send(e,t){let r=t?.relatedRequestId;if((aE.safeParse(e).success||aA.safeParse(e).success)&&(r=e.id),void 0===r){let t;if(aE.safeParse(e).success||aA.safeParse(e).success)throw Error("Cannot send a response on a standalone SSE stream unless resuming a previous client request");this._eventStore&&(t=await this._eventStore.storeEvent(this._standaloneSseStreamId,e));let r=this._streamMapping.get(this._standaloneSseStreamId);if(void 0===r)return;r.controller&&r.encoder&&(void 0===t||!r.replayedEventIds?.has(t))&&this.writeSSEEvent(r.controller,r.encoder,e,t);return}let i=this._requestToStreamMapping.get(r);if(!i)throw Error(`No connection established for request ID: ${String(r)}`);let o=this._streamMapping.get(i);if(!this._enableJsonResponse){let t;this._eventStore&&(t=await this._eventStore.storeEvent(i,e),o=this._streamMapping.get(i)),o?.controller&&o?.encoder&&(void 0===t||!o.replayedEventIds?.has(t))&&this.writeSSEEvent(o.controller,o.encoder,e,t)}if(aE.safeParse(e).success||aA.safeParse(e).success){this._requestResponseMap.set(r,e);let t=[...this._requestToStreamMapping.entries()].filter(([e,t])=>t===i).map(([e])=>e);if(t.every(e=>this._requestResponseMap.has(e))){if(!o){if(this._enableJsonResponse)throw Error(`No connection established for request ID: ${String(r)}`);if(!this._eventStore){for(let e of(this.onerror?.(Error(`Response for request ID ${String(r)} is undeliverable: per-request stream is disconnected and no eventStore is configured`)),t))this._requestResponseMap.delete(e),this._requestToStreamMapping.delete(e);return}for(let e of t)this._requestResponseMap.delete(e),this._requestToStreamMapping.delete(e);return}if(this._enableJsonResponse&&o.resolveJson){let e={"Content-Type":"application/json"};void 0!==this.sessionId&&(e["mcp-session-id"]=this.sessionId);let r=t.map(e=>this._requestResponseMap.get(e));1===r.length?o.resolveJson(Response.json(r[0],{status:200,headers:e})):o.resolveJson(Response.json(r,{status:200,headers:e})),o.cleanup()}else o.cleanup();for(let e of t)this._requestResponseMap.delete(e),this._requestToStreamMapping.delete(e)}}}};let u1=Symbol("swallowsErrorsAfterClose");var u0=class{_readBuffer;_started=!1;_closed=!1;constructor(e=M.stdin,t=M.stdout,r){this._stdin=e,this._stdout=t,this._readBuffer=new lG({maxBufferSize:r?.maxBufferSize})}onclose;onerror;onmessage;_ondata=e=>{try{this._readBuffer.append(e),this.processReadBuffer()}catch(e){this.onerror?.(e),this.close().catch(()=>{})}};_onerror=e=>{this.onerror?.(e)};_onstdouterror=e=>{this._closed||(this.onerror?.(e),this.close().catch(()=>{}))};_onstdinclose=()=>{this.close().catch(()=>{})};async start(){if(this._started)throw Error("StdioServerTransport already started! If using Server class, note that connect() calls start() automatically.");for(let e of(this._started=!0,this._stdout.listeners("error")))e[u1]&&this._stdout.off("error",e);(this._stdin.readableEnded||this._stdin.destroyed)&&setImmediate(this._onstdinclose),this._stdin.on("data",this._ondata),this._stdin.on("error",this._onerror),this._stdin.on("end",this._onstdinclose),this._stdin.on("close",this._onstdinclose),this._stdout.on("error",this._onstdouterror)}processReadBuffer(){for(;;)try{let e=this._readBuffer.readMessage();if(null===e)break;this.onmessage?.(e)}catch(e){this.onerror?.(e)}}async close(){this._closed||(this._closed=!0,this._stdin.off("data",this._ondata),this._stdin.off("error",this._onerror),this._stdin.off("end",this._onstdinclose),this._stdin.off("close",this._onstdinclose),this._onstdouterror[u1]=!0,0===this._stdin.listenerCount("data")&&this._stdin.pause(),this._readBuffer.clear(),this.onclose?.())}send(e){return this._closed?Promise.reject(Error("StdioServerTransport is closed")):new Promise((t,r)=>{let i=JSON.stringify(e)+"\n",o=!1,n=e=>{o||(o=!0,this._stdout.off("error",n),this._stdout.off("drain",a),r(e))},a=()=>{o||(o=!0,this._stdout.off("error",n),this._stdout.off("drain",a),t())};if(this._stdout.once("error",n),this._stdout.write(i)){if(o)return;o=!0,this._stdout.off("error",n),t()}else o||this._stdout.once("drain",a)})}},u2=class extends Error{constructor(e,t){super(e,t),this.name="RequestError"}},u4=global.Request,u6=class extends u4{constructor(e,t){"object"==typeof e&&u9 in e&&(e=e[u9]()),void 0!==t?.body?.getReader&&(t.duplex??="half"),super(e,t)}},u3=Symbol("wrapBodyStream"),u9=Symbol("getRequestCache"),u5=Symbol("requestCache"),u8=Symbol("incomingKey"),u7=Symbol("urlKey"),me=Symbol("headersKey"),mt=Symbol("abortControllerKey"),mr=Symbol("getAbortController"),mi={get method(){return this[u8].method||"GET"},get url(){return this[u7]},get headers(){return this[me]||=(e=>{let t=[],r=e.rawHeaders;for(let e=0;e{let n={method:e,headers:r,signal:o.signal};if("TRACE"===e){n.method="GET";let e=new u6(t,n);return Object.defineProperty(e,"method",{get:()=>"TRACE"}),e}if("GET"!==e&&"HEAD"!==e)if("rawBody"in i&&i.rawBody instanceof Buffer)n.body=new ReadableStream({start(e){e.enqueue(i.rawBody),e.close()}});else if(i[u3]){let e;n.body=new ReadableStream({async pull(t){try{e||=D.toWeb(i).getReader();let{done:r,value:o}=await e.read();r?t.close():t.enqueue(o)}catch(e){t.error(e)}}})}else n.body=D.toWeb(i);return new u6(t,n)})(this.method,this[u7],this.headers,this[u8],this[mt])}};["body","bodyUsed","cache","credentials","destination","integrity","mode","redirect","referrer","referrerPolicy","signal","keepalive"].forEach(e=>{Object.defineProperty(mi,e,{get(){return this[u9]()[e]}})}),["arrayBuffer","blob","clone","formData","json","text"].forEach(e=>{Object.defineProperty(mi,e,{value:function(){return this[u9]()[e]()}})}),Object.defineProperty(mi,Symbol.for("nodejs.util.inspect.custom"),{value:function(e,t,r){let i={method:this.method,url:this.url,headers:this.headers,nativeRequest:this[u5]};return`Request (lightweight) ${r(i,{...t,depth:null==e?null:e-1})}`}}),Object.setPrototypeOf(mi,u6.prototype);var mo=Symbol("responseCache"),mn=Symbol("getResponseCache"),ma=Symbol("cache"),ms=global.Response,md=class e{#e;#t;[mn](){return delete this[ma],this[mo]||=new ms(this.#e,this.#t)}constructor(t,r){let i;if(this.#e=t,r instanceof e){let e=r[mo];if(e){this.#t=e,this[mn]();return}this.#t=r.#t,i=new Headers(r.#t.headers)}else this.#t=r;("string"==typeof t||void 0!==t?.getReader||t instanceof Blob||t instanceof Uint8Array)&&(this[ma]=[r?.status||200,t,i||r?.headers])}get headers(){let e=this[ma];return e?(e[2]instanceof Headers||(e[2]=new Headers(e[2]||{"content-type":"text/plain; charset=UTF-8"})),e[2]):this[mn]().headers}get status(){return this[ma]?.[0]??this[mn]().status}get ok(){let e=this.status;return e>=200&&e<300}};function mc(e,t,r){let i=t=>{e.cancel(t).catch(()=>{})};return t.on("close",i),t.on("error",i),(r??e.read()).then(a,o),e.closed.finally(()=>{t.off("close",i),t.off("error",i)});function o(e){e&&t.destroy(e)}function n(){e.read().then(a,o)}function a({done:r,value:i}){try{if(r)t.end();else{if(t.write(i))return e.read().then(a,o);t.once("drain",n)}}catch(e){o(e)}}}["body","bodyUsed","redirected","statusText","trailers","type","url"].forEach(e=>{Object.defineProperty(md.prototype,e,{get(){return this[mn]()[e]}})}),["arrayBuffer","blob","clone","formData","json","text"].forEach(e=>{Object.defineProperty(md.prototype,e,{value:function(){return this[mn]()[e]()}})}),Object.defineProperty(md.prototype,Symbol.for("nodejs.util.inspect.custom"),{value:function(e,t,r){let i={status:this.status,headers:this.headers,ok:this.ok,nativeResponse:this[mo]};return`Response (lightweight) ${r(i,{...t,depth:null==e?null:e-1})}`}}),Object.setPrototypeOf(md,ms),Object.setPrototypeOf(md.prototype,ms.prototype);var ml=e=>{let t={};e instanceof Headers||(e=new Headers(e??void 0));let r=[];for(let[i,o]of e)"set-cookie"===i?r.push(o):t[i]=o;return r.length>0&&(t["set-cookie"]=r),t["content-type"]??="text/plain; charset=UTF-8",t};void 0===global.crypto&&(global.crypto=F);var mp=Symbol("outgoingEnded"),mu=Symbol("incomingDraining"),mm=e=>{if(e.destroyed||e[mu])return;if(e[mu]=!0,e instanceof N){try{e.stream?.close?.(z.NGHTTP2_NO_ERROR)}catch{}return}let t=0,r=()=>{clearTimeout(o),e.off("data",n),e.off("end",r),e.off("error",r)},i=()=>{r();let t=e.socket;t&&!t.destroyed&&t.destroySoon()},o=setTimeout(i,500);o.unref?.();let n=e=>{(t+=e.length)>0x4000000&&i()};e.on("data",n),e.on("end",r),e.on("error",r),e.resume()},mf=e=>new Response(null,{status:e instanceof Error&&("TimeoutError"===e.name||"TimeoutError"===e.constructor.name)?504:500}),mh=(e,t)=>{let r=e instanceof Error?e:Error("unknown error",{cause:e});"ERR_STREAM_PREMATURE_CLOSE"===r.code?console.info("The user aborted a request."):(console.error(e),t.headersSent||t.writeHead(500,{"Content-Type":"text/plain"}),t.end(`Error: ${r.message}`),t.destroy(r))},my=e=>{"flushHeaders"in e&&e.writable&&e.flushHeaders()},mg=async(e,t)=>{let[r,i,o]=e[ma],n=!1;if(o){if(o instanceof Headers)n=o.has("content-length"),o=ml(o);else if(Array.isArray(o)){let e=new Headers(o);n=e.has("content-length"),o=ml(e)}else for(let e in o)if(14===e.length&&"content-length"===e.toLowerCase()){n=!0;break}}else o={"content-type":"text/plain; charset=UTF-8"};!n&&("string"==typeof i?o["Content-Length"]=Buffer.byteLength(i):i instanceof Uint8Array?o["Content-Length"]=i.byteLength:i instanceof Blob&&(o["Content-Length"]=i.size)),t.writeHead(r,o),"string"==typeof i||i instanceof Uint8Array?t.end(i):i instanceof Blob?t.end(new Uint8Array(await i.arrayBuffer())):(my(t),await (function(e,t){if(e.locked)throw TypeError("ReadableStream is locked.");if(!t.destroyed)return mc(e.getReader(),t)})(i,t)?.catch(e=>mh(e,t))),t[mp]?.()},m_=(e,t={})=>{let r=t.autoCleanupIncoming??!0;return!1!==t.overrideGlobalObjects&&global.Request!==u6&&(Object.defineProperty(global,"Request",{value:u6}),Object.defineProperty(global,"Response",{value:md})),async(i,o)=>{let n,a;try{a=((e,t)=>{let r,i=Object.create(mi);i[u8]=e;let o=e.url||"";if("/"!==o[0]&&(o.startsWith("http://")||o.startsWith("https://"))){if(e instanceof N)throw new u2("Absolute URL for :path is not allowed in HTTP/2");try{let e=new URL(o);i[u7]=e.href}catch(e){throw new u2("Invalid absolute URL",{cause:e})}return i}let n=(e instanceof N?e.authority:e.headers.host)||t;if(!n)throw new u2("Missing host header");if(e instanceof N){if("http"!==(r=e.scheme)&&"https"!==r)throw new u2("Unsupported scheme")}else r=e.socket&&e.socket.encrypted?"https":"http";let a=new URL(`${r}://${n}${o}`);if(a.hostname.length!==n.length&&a.hostname!==n.replace(/:\d+$/,""))throw new u2("Invalid host header");return i[u7]=a.href,i})(i,t.hostname);let s=!r||"GET"===i.method||"HEAD"===i.method;if(s||(i[u3]=!0,i.on("end",()=>{s=!0}),i instanceof N&&(o[mp]=()=>{s||setTimeout(()=>{s||setTimeout(()=>{mm(i)})})}),o.on("finish",()=>{s||mm(i)})),o.on("close",()=>{a[mt]&&(i.errored?a[mt].abort(i.errored.toString()):o.writableFinished||a[mt].abort("Client connection prematurely closed.")),s||setTimeout(()=>{s||setTimeout(()=>{mm(i)})})}),n=e(a,{incoming:i,outgoing:o}),ma in n)return mg(n,o)}catch(e){if(n)return mh(e,o);if(t.errorHandler){if(!(n=await t.errorHandler(a||e instanceof u2?e:new u2(e.message,{cause:e}))))return}else n=a?mf(e):new Response(null,{status:400})}try{return await (async(e,t,r={})=>{if("function"==typeof e.then)if(r.errorHandler)try{e=await e}catch(i){let t=await r.errorHandler(i);if(!t)return;e=t}else e=await e.catch(mf);if(ma in e)return mg(e,t);let i=ml(e.headers);if(e.body){let r,o=e.body.getReader(),n=[],a=!1;if("chunked"!==i["transfer-encoding"]){let e=2;for(let t=0;tPromise.resolve(void 0))])})(r).catch(e=>{console.error(e),a=!0});if(!i){if(1===t){await new Promise(e=>setTimeout(e)),e=3;continue}break}if(r=void 0,i.value&&n.push(i.value),i.done){a=!0;break}}!a||"content-length"in i||(i["content-length"]=n.reduce((e,t)=>e+t.length,0))}t.writeHead(e.status,i),n.forEach(e=>{t.write(e)}),a?t.end():(0===n.length&&my(t),await mc(o,t,r))}else i["x-hono-already-sent"]||(t.writeHead(e.status,i),t.end());t[mp]?.()})(n,o,t)}catch(e){return mh(e,o)}}},mv=class{_webStandardTransport;_requestListener;_requestContext=new WeakMap;constructor(e={}){this._webStandardTransport=new uY(e),this._requestListener=m_(async e=>{let t=this._requestContext.get(e);return this._webStandardTransport.handleRequest(e,{authInfo:t?.authInfo,parsedBody:t?.parsedBody})},{overrideGlobalObjects:!1})}get sessionId(){return this._webStandardTransport.sessionId}set onclose(e){this._webStandardTransport.onclose=e}get onclose(){return this._webStandardTransport.onclose}set onerror(e){this._webStandardTransport.onerror=e}get onerror(){return this._webStandardTransport.onerror}set onmessage(e){this._webStandardTransport.onmessage=e}get onmessage(){return this._webStandardTransport.onmessage}async start(){return this._webStandardTransport.start()}async close(){return this._webStandardTransport.close()}async send(e,t){return this._webStandardTransport.send(e,t)}setSupportedProtocolVersions(e){this._webStandardTransport.setSupportedProtocolVersions(e)}setScopeChallengeResolver(e){this._webStandardTransport.setScopeChallengeResolver(e)}async handleRequest(e,t,r){let i=e.auth;await m_(async e=>this._webStandardTransport.handleRequest(e,{authInfo:i,parsedBody:r}),{overrideGlobalObjects:!1})(e,t)}closeSSEStream(e){this._webStandardTransport.closeSSEStream(e)}closeStandaloneSSEStream(){this._webStandardTransport.closeStandaloneSSEStream()}};function mb(e=process.env){let t=e.TRACEDECAY_DATA_DIR;if(void 0!==t&&t.length>0)return O.resolve(t);let r="win32"===process.platform?e.USERPROFILE:e.HOME,i=void 0!==r&&r.length>0?r:L.homedir();return O.join(i,".tracedecay")}let m$=o7().min(1),mS=nz({pid:nV().int().nonnegative(),process_run_id:o7(),started_at_unix_secs:nV().int(),epoch:nV().int().nonnegative(),version:o7(),endpoint:nE(),http_application_endpoint:m$.nullable().optional(),auth_token:o7().min(1),profile_root:o7().min(1)});function mk(e){let t=e.http_application_endpoint;return null==t?null:`http://${t}`}function mw(e){let t=JSON.stringify(function e(t){return Array.isArray(t)?t.map(e):"object"==typeof t&&null!==t?Object.fromEntries(Object.entries(t).sort(([e],[t])=>et)).map(([t,r])=>[t,e(r)])):t}(e));if(void 0===t)throw TypeError("value is not canonical JSON");return t}function mV(e,t){if("object"!=typeof e||null===e||Array.isArray(e))throw TypeError(`malformed canonical schema: ${t} must be an object`);return e}function mP(e,t){switch(t){case"null":return null===e;case"boolean":return"boolean"==typeof e;case"integer":return"number"==typeof e&&Number.isSafeInteger(e);case"number":return"number"==typeof e&&Number.isFinite(e);case"string":return"string"==typeof e;case"array":return Array.isArray(e);case"object":return"object"==typeof e&&null!==e&&!Array.isArray(e);default:throw TypeError(`unsupported canonical schema type: ${t}`)}}function mR(e,t){if("object"!=typeof e||null===e||Array.isArray(e))throw TypeError(`malformed canonical envelope: ${t} must be an object`);return e}function mq(e,t){if("string"!=typeof e)throw TypeError(`malformed canonical envelope: ${t} must be a string`);return e}function mI(e,t){if("number"!=typeof e||!Number.isFinite(e))throw TypeError(`malformed canonical envelope: ${t} must be a finite number`);return e}function mx(e,t){if(!Array.isArray(e))throw TypeError(`malformed canonical envelope: ${t} must be an array`);return e}function mj(e,t){let r=mI(e,t);if(!Number.isSafeInteger(r))throw TypeError(`malformed canonical envelope: ${t} must be a safe integer`);return r}function mC(e,t){let r=mj(e,t);if(r<0)throw TypeError(`malformed canonical envelope: ${t} must be non-negative`);return r}let mT=new TextEncoder;function mO(e,t,r){let i=mq(e,t);if(0===i.length||i.trim()!==i||mT.encode(i).byteLength>r||/\p{Cc}/u.test(i))throw TypeError(`malformed canonical envelope: ${t} is not a bounded identifier`);return i}function mE(e,t,r,i,o,n,a,s,d){let c=mR(e,"success envelope");if(mq(c.binding_id,"binding_id")!==t)throw TypeError("malformed canonical envelope: binding mismatch");let l=mR(c.contract,"contract");if(mq(l.schema_id,"contract.schema_id")!==r||mI(l.schema_revision,"contract.schema_revision")!==i)throw TypeError("malformed canonical envelope: result contract mismatch");mq(c.request_id,"request_id"),mR(c.scope,"scope");let p=mR(c.outcome,"outcome"),u=mq(p.outcome,"outcome.outcome");return{...c,outcome:{...p,outcome:u,value:function(e,t,r,i,o,n,a){let s=mR(t,"outcome.value");if(!("payload"in s))throw TypeError("malformed canonical envelope: outcome.value.payload is required");if(("durable_effect"!==o||"required"!==n||"effect"!==e)&&("operation"!==o||"not_required"!==n||"evidence"!==e&&"preview"!==e))throw TypeError(`malformed canonical envelope: outcome ${e} is outside the operation receipt contract`);if(!function(e,t,r){let i=mR(e,"outcome.value.execution");if(mI(i.started_at,"execution.started_at"),mI(i.ended_at,"execution.ended_at"),!("effective_deadline"in i)||!("cancellation"in i))throw TypeError("malformed canonical envelope: receipt fields are required");let o=mR(i.budget,"execution.budget");mI(o.units_consumed,"budget.units_consumed"),mI(o.bytes_consumed,"budget.bytes_consumed"),mI(o.elapsed_micros,"budget.elapsed_micros");let n=mq(i.termination,"execution.termination");if(!t.includes(n))throw TypeError(`malformed canonical envelope: termination ${n} is not legal for this operation`);if(("cancelled"===n||"timed_out"===n)&&null===i.cancellation)throw TypeError("malformed canonical envelope: terminal cancellation observation is required");if(null!==i.cancellation){let e=mR(r,"operation.cancellation"),t=mq(e.mode,"operation.cancellation.mode"),o=mR(i.cancellation,"execution.cancellation"),a=mq(o.stage,"execution.cancellation.stage");if(mj(o.observed_at,"execution.cancellation.observed_at"),!["before_admission","before_read","during_read","before_effect","effect_in_flight","reconciling","after_commit"].includes(a))throw TypeError(`malformed canonical envelope: unknown cancellation stage ${a}`);if("not_cancellable"===t){if("timed_out"!==n)throw TypeError("malformed canonical envelope: non-cancellable operation returned cancellation evidence")}else if(!mx(e.points,"operation.cancellation.points").includes(a))throw TypeError(`malformed canonical envelope: cancellation stage ${a} is not legal for this operation`)}}(s.execution,r,i),"evidence"===e)mR(s.temporal,"temporal"),mR(s.authority,"authority"),mx(s.evidence_authorities,"evidence_authorities"),mR(s.coverage,"coverage"),mx(s.omissions,"omissions"),mx(s.scores,"scores"),mx(s.contributions,"contributions"),function(e){let t=mR(e,"outcome.value.page");if(mO(t.sort_contract_id,"page.sort_contract_id",192),1>mC(t.sort_revision,"page.sort_revision"))throw TypeError("malformed canonical envelope: page sort_revision must be positive");let r=null===t.total?null:mC(t.total,"page.total"),i=mC(t.returned,"page.returned");if(null!==r&&i>r)throw TypeError("malformed canonical envelope: page returned exceeds total");null!==t.cursor&&function(e){let t=mR(e,"page.cursor"),r=mq(t.kind,"page.cursor.kind");if("opaque"===r)mO(t.cursor,"page.cursor.cursor",4096);else throw TypeError(`malformed canonical envelope: unsupported page cursor kind ${r}`)}(t.cursor),null!==t.expires_at&&mj(t.expires_at,"page.expires_at")}(s.page);else if("preview"===e)mq(s.preview_id,"preview_id"),mq(s.preview_digest,"preview_digest"),mq(s.effect_class,"effect_class"),mR(s.authority,"authority"),mq(s.expected_state,"expected_state");else if("effect"===e)mq(s.effect_id,"effect_id"),mq(s.effect_class,"effect_class"),mq(s.idempotency_key,"idempotency_key"),mR(s.authority,"authority"),mq(s.expected_state,"expected_state"),mq(s.reconciliation,"reconciliation"),mR(s.receipt,"receipt");else throw TypeError(`malformed canonical envelope: unsupported outcome ${e}`);return{...s,payload:null===s.payload?null:a(s.payload)}}(u,p.value,o,n,a,s,d)}}}function mA(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}function mW(e){return"number"==typeof e&&Number.isSafeInteger(e)&&e>=0}function mM(e){return"number"==typeof e&&Number.isSafeInteger(e)}function mN(e,t){return"string"==typeof e&&e.length>0&&e.trim()===e&&mT.encode(e).byteLength<=t&&!/\p{Cc}/u.test(e)}async function mz(e){let t=await crypto.subtle.digest("SHA-256",mT.encode(mw(e)));return`sha256:${Array.from(new Uint8Array(t),e=>e.toString(16).padStart(2,"0")).join("")}`}function mD(e){return mA(e)&&"string"==typeof e.code&&"string"==typeof e.message}let mF={description:"Strongly typed algorithm-tagged integrity digest: `AccessPolicyDigest`.",type:"string"},mL={description:"Strongly typed canonical identity: `AccessRuleId`.",type:"string"},mU={description:"Strongly typed canonical identity: `ActorId`.",type:"string"},mH={description:"Strongly typed canonical identity: `AgentInstanceId`.",type:"string"},mG={enum:["memory_curator","session_reflector","skill_writer","combined_review","user_job"],type:"string"},mB={properties:{coverage:{$ref:"#/$defs/MetricCoverageV1"},current:{anyOf:[{$ref:"#/$defs/AnalyticsModeV1"},{type:"null"}]},transition_watermark:{type:["string","null"]},unavailable_reason:{type:["string","null"]}},required:["coverage"],type:"object"},mK={enum:["off","local_only","aggregate_share"],type:"string"},mJ={oneOf:[{const:"project",description:"Analytics events of the resolved project.",type:"string"},{const:"all",description:"Analytics events of every registered project.",type:"string"}]},mZ={description:"Strongly typed canonical identity: `AnalyzerEnvironmentVariable`.",type:"string"},mQ={description:"Strongly typed canonical identity: `AnalyzerExecutableId`.",type:"string"},mX={oneOf:[{properties:{executable_id:{$ref:"#/$defs/AnalyzerExecutableId"},kind:{const:"built_in",type:"string"}},required:["kind","executable_id"],type:"object"},{properties:{executable_digest:{$ref:"#/$defs/ManifestDigest"},kind:{const:"approved_external",type:"string"}},required:["kind","executable_digest"],type:"object"}]},mY={description:"Strongly typed canonical identity: `AnalyzerLanguageId`.",type:"string"},m1={additionalProperties:!1,description:"One language's analyzer selection. Host registration may project only the\nnon-sensitive `language_id`/`enabled` pair; all other fields remain in the\nconfiguration authority.",properties:{arguments:{items:{type:"string"},type:"array"},enabled:{type:"boolean"},environment_allowlist:{items:{$ref:"#/$defs/AnalyzerEnvironmentVariable"},type:"array",uniqueItems:!0},executable:{$ref:"#/$defs/AnalyzerExecutableReferenceV1"},initialization_options:{additionalProperties:{$ref:"#/$defs/AnalyzerStructuredValueV1"},type:"object"},language_id:{$ref:"#/$defs/AnalyzerLanguageId"},privacy_class:{$ref:"#/$defs/AnalyzerPrivacyClassV1"},resource_limits:{$ref:"#/$defs/AnalyzerResourceLimitsV1"},restart_policy:{$ref:"#/$defs/AnalyzerRestartPolicyV1"},settings:{additionalProperties:{$ref:"#/$defs/AnalyzerStructuredValueV1"},type:"object"}},required:["language_id","enabled","executable","arguments","initialization_options","settings","environment_allowlist","privacy_class","resource_limits","restart_policy"],type:"object"},m0={enum:["non_sensitive","sensitive","restricted"],type:"string"},m2={additionalProperties:!1,properties:{maximum_memory_mib:{format:"uint32",minimum:0,type:"integer"},request_timeout_millis:{format:"uint64",minimum:0,type:"integer"},startup_timeout_millis:{format:"uint64",minimum:0,type:"integer"}},required:["maximum_memory_mib","startup_timeout_millis","request_timeout_millis"],type:"object"},m4={enum:["restart_on_configuration_change","manual_restart_only"],type:"string"},m6={additionalProperties:!1,description:"Canonical analyzer settings. A changed selection produces a new\nconfiguration revision/digest; cache invalidation remains owned elsewhere.",properties:{schema_version:{format:"uint16",maximum:65535,minimum:0,type:"integer"},selections:{items:{$ref:"#/$defs/AnalyzerLanguageSelectionV1"},type:"array"}},required:["schema_version","selections"],type:"object"},m3={description:"A structured analyzer option value. This deliberately excludes raw\nenvironment values, commands, credential material, and transport blobs.",oneOf:[{properties:{kind:{const:"boolean",type:"string"},value:{type:"boolean"}},required:["kind","value"],type:"object"},{properties:{kind:{const:"integer",type:"string"},value:{format:"int64",type:"integer"}},required:["kind","value"],type:"object"},{properties:{kind:{const:"text",type:"string"},value:{type:"string"}},required:["kind","value"],type:"object"},{properties:{kind:{const:"text_list",type:"string"},value:{items:{type:"string"},type:"array"}},required:["kind","value"],type:"object"},{properties:{kind:{const:"object",type:"string"},value:{additionalProperties:{$ref:"#/$defs/AnalyzerStructuredValueV1"},type:"object"}},required:["kind","value"],type:"object"}]},m9={description:"The structured facts behind a problem. Adapters read these fields; the\nproblem's `message` is only their one human rendering.",oneOf:[{additionalProperties:!1,description:"The worktree's code index is parked until the operator applies\n`remedy`; repeating the request cannot change the answer.",properties:{cause:{type:"string"},kind:{const:"parked",type:"string"},remedy:{type:"string"},retries_on_wake:{type:"boolean"}},required:["kind","cause","remedy","retries_on_wake"],type:"object"},{additionalProperties:!1,description:"A session refresh asked to begin from a source frontier the\ncommitted projection has already passed.",properties:{active:{format:"uint64",minimum:0,type:"integer"},committed:{format:"uint64",minimum:0,type:"integer"},kind:{const:"stale_refresh_frontier",type:"string"},requested:{format:"uint64",minimum:0,type:"integer"}},required:["kind","requested","committed","active"],type:"object"},{additionalProperties:!1,description:"A compare-and-swap request named `requested` in `field`, but the\nauthority holds `current`. Resending with `current` is a new request.",properties:{current:{format:"uint64",minimum:0,type:"integer"},field:{type:"string"},kind:{const:"stale_precondition",type:"string"},requested:{format:"uint64",minimum:0,type:"integer"}},required:["kind","field","requested","current"],type:"object"},{additionalProperties:!1,description:"A workflow step effect named placement digest `found`, but the step's\ncurrent placement is `expected`: the effect was settled against a\nplacement the run has since replaced.",properties:{expected:{type:"string"},found:{type:"string"},kind:{const:"workflow_placement_digest_stale",type:"string"}},required:["kind","expected","found"],type:"object"},{additionalProperties:!1,description:"A writer lock stayed held by other writers past its admission\ndeadline.",properties:{deadline_ms:{format:"uint64",minimum:0,type:"integer"},kind:{const:"lock_deadline",type:"string"},resource:{type:"string"}},required:["kind","resource","deadline_ms"],type:"object"},{additionalProperties:!1,description:"A persisted store whose shape this binary does not open. It is served\nin this typed state until the operator runs `remedy`, which deletes\nthe old data; nothing is migrated or backed up.",properties:{authority:{type:"string"},found_version:{format:"int64",type:["integer","null"]},kind:{const:"reset_required",type:"string"},reason:{type:"string"},remedy:{type:"string"},required_version:{format:"int64",type:["integer","null"]}},required:["kind","authority","reason","remedy"],type:"object"},{additionalProperties:!1,description:"No compiler runs automatically for the diagnostics scope: no tsconfig\nowns `file`, or, for a workspace read (`file` null), none exists under\nthe project root. `searched` lists the owner search's candidates,\nnearest first; it is empty for a workspace read or a file outside the\nproject root.",properties:{file:{type:["string","null"]},kind:{const:"diagnostics_unsupported",type:"string"},searched:{items:{$ref:"#/$defs/DiagnosticsSearchedTsconfigV1"},type:"array"}},required:["kind","searched"],type:"object"},{additionalProperties:!1,description:"The TypeScript `producer` has not published diagnostics for the\ncurrent code generation yet. `generation` is the last generation it\npublished, null when it has published none.",properties:{generation:{type:["string","null"]},kind:{const:"diagnostics_pending",type:"string"},producer:{type:"string"}},required:["kind","producer"],type:"object"},{additionalProperties:!1,description:"The code graph's engine or catalog was released for memory and was\nstill warming again when the read's budget ran out;\n`retry_after_millis` is the measured warm-up it still needs.",properties:{kind:{const:"code_graph_rewarming",type:"string"},retry_after_millis:{format:"uint64",minimum:0,type:"integer"}},required:["kind","retry_after_millis"],type:"object"},{additionalProperties:!1,description:"No TraceDecay daemon accepts connections on `socket`. `named_by` is\nthe environment variable that chose the socket, when one did;\n`service_unit` is what this client observed of the managed service.",properties:{kind:{const:"daemon_unreachable",type:"string"},named_by:{type:["string","null"]},service_unit:{$ref:"#/$defs/DaemonServiceUnitObservationV1"},socket:{type:"string"}},required:["kind","socket","service_unit"],type:"object"}]},m5={description:"Strongly typed canonical identity: `AttemptId`.",type:"string"},m8={description:"Authoritative scope of a source binding. A mutable path, label, or host\nprofile cannot be represented as authority.",oneOf:[{properties:{id:{$ref:"#/$defs/ProjectId"},kind:{const:"project",type:"string"}},required:["kind","id"],type:"object"},{properties:{id:{$ref:"#/$defs/UserProfileId"},kind:{const:"projectless_hermes",type:"string"}},required:["kind","id"],type:"object"}]},m7={additionalProperties:!1,description:"One exact application scope paired with its registered physical locator.\n\nThe scope remains the identity authority. The locator is retained only so\na later read or restart can reopen the exact registered root without an\nactive-graph or CWD fallback.",properties:{locator:{anyOf:[{$ref:"#/$defs/RegisteredRootLocatorV1"},{type:"null"}]},scope:{$ref:"#/$defs/ResolvedScope"}},required:["scope"],type:"object"},fe={additionalProperties:!1,description:"Immutable canonical set of exact roots admitted by their existing request\ncontexts. A registered locator participates only as frozen reopening\nevidence; its paired [`ResolvedScope`](crate::context::ResolvedScope) remains\nthe root identity authority.",properties:{actor_id:{$ref:"#/$defs/ActorId"},digest:{$ref:"#/$defs/ManifestDigest"},revision:{$ref:"#/$defs/ScopeSetRevision"},roots:{items:{$ref:"#/$defs/AuthorizedRoot"},type:"array"},scope_set_id:{$ref:"#/$defs/ScopeSetId"}},required:["scope_set_id","revision","actor_id","roots","digest"],type:"object"},ft={description:"A terminal automatic-fact receipt state.",enum:["applied","quarantined"],type:"string"},fr={oneOf:[{properties:{kind:{const:"disabled",type:"string"}},required:["kind"],type:"object"},{properties:{kind:{const:"eligible_only",type:"string"},maximum_per_run:{format:"uint16",maximum:65535,minimum:1,type:"integer"},minimum_idle_seconds:{format:"uint64",minimum:1,type:"integer"}},required:["kind","minimum_idle_seconds","maximum_per_run"],type:"object"}]},fi={enum:["disabled","codex_app_server"],type:"string"},fo={enum:["standalone","delegated_host"],type:"string"},fn={description:"The settled status every successful read in this family reports.",enum:["ok"],type:"string"},fa={description:"Which owner's automation schedulers a reconcile covers.",oneOf:[{const:"project",description:"The served project's scheduler, answered by the project's owner.",type:"string"},{const:"profile",description:"Every cached project scheduler of the profile, answered by the\ndaemon's profile owner.",type:"string"}]},fs={properties:{created_at:{type:"string"},kind:{type:"string"},path:{type:"string"},schema_version:{format:"uint32",minimum:0,type:"integer"},sha256:{type:"string"},summary:{type:["string","null"]}},required:["schema_version","kind","path","sha256","created_at"],type:"object"},fd={description:"Automation run reads answer from the active project's ledger only.",enum:["active_project"],type:"string"},fc={enum:["queued","running","succeeded","failed","skipped"],type:"string"},fl={additionalProperties:!1,properties:{allow_job_commands:{type:"boolean"},backend:{$ref:"#/$defs/AutomationBackendV1"},combine_due_tasks:{type:"boolean"},enabled:{type:"boolean"},host_mode:{$ref:"#/$defs/AutomationHostModeV1"},model_id:{type:["string","null"]},scheduler_tick_secs:{format:"uint64",minimum:0,type:"integer"},schema_version:{format:"uint16",maximum:65535,minimum:0,type:"integer"},tasks:{$ref:"#/$defs/AutomationTaskSetV1"},timeout_secs:{format:"uint64",minimum:0,type:"integer"}},required:["schema_version","enabled","backend","host_mode","timeout_secs","scheduler_tick_secs","combine_due_tasks","allow_job_commands","tasks"],type:"object"},fp={additionalProperties:!1,properties:{memory_curator:{$ref:"#/$defs/AutomationTaskSettingsV1"},session_reflector:{$ref:"#/$defs/AutomationTaskSettingsV1"},skill_writer:{$ref:"#/$defs/AutomationTaskSettingsV1"}},required:["memory_curator","session_reflector","skill_writer"],type:"object"},fu={additionalProperties:!1,properties:{cooldown_secs:{format:"uint64",minimum:0,type:["integer","null"]},enabled:{type:"boolean"},interval_secs:{format:"uint64",minimum:0,type:["integer","null"]},min_idle_secs:{format:"uint64",minimum:0,type:["integer","null"]},schedule:{type:["string","null"]},session_evidence_budget_backoff_secs:{description:"Suppression window between session-evidence retrieval attempts while\nthe evidence budget stays exhausted. Unset uses the automation crate's\none-hour default. Distinct from `cooldown_secs`, which paces retries\nafter failed runs; budget exhaustion is a skip, not a failure.",format:"uint64",minimum:0,type:["integer","null"]},stale_lock_secs:{format:"uint64",minimum:0,type:["integer","null"]}},required:["enabled"],type:"object"},fm={enum:["manual_cli","manual_mcp","dashboard","application","scheduler","host_receipt"],type:"string"},ff={description:"Strongly typed canonical identity: `BrainId`.",type:"string"},fh={oneOf:[{properties:{kind:{const:"reject",type:"string"}},required:["kind"],type:"object"},{properties:{kind:{const:"append_monotonic_ordinal",type:"string"},maximum_attempts:{format:"uint16",maximum:65535,minimum:1,type:"integer"}},required:["kind","maximum_attempts"],type:"object"}]},fy={oneOf:[{properties:{bytes:{format:"uint8",maximum:255,minimum:1,type:"integer"},kind:{const:"task_id_digest_prefix",type:"string"}},required:["kind","bytes"],type:"object"},{properties:{kind:{const:"repository_slug",type:"string"}},required:["kind"],type:"object"},{properties:{kind:{const:"work_class",type:"string"}},required:["kind"],type:"object"},{properties:{kind:{const:"monotonic_collision_ordinal",type:"string"}},required:["kind"],type:"object"}]},fg={enum:["hyphen","underscore","slash"],type:"string"},f_={additionalProperties:!1,properties:{collision:{$ref:"#/$defs/BranchCollisionPolicyV1"},components:{items:{$ref:"#/$defs/BranchNameComponentV1"},type:"array"},maximum_bytes:{format:"uint16",maximum:65535,minimum:1,type:"integer"},prefix:{$ref:"#/$defs/CanonicalGitRefPrefix"},separator:{$ref:"#/$defs/BranchNameSeparatorV1"}},required:["prefix","components","separator","maximum_bytes","collision"],type:"object"},fv={additionalProperties:!1,description:"A declared dependency edge; propagation direction remains an application\ndecision and is never inferred from this edge.",properties:{dependency:{$ref:"#/$defs/StackNodeId"},dependent:{$ref:"#/$defs/StackNodeId"}},required:["dependency","dependent"],type:"object"},fb={description:"Strongly typed canonical identity: `BranchStackId`.",type:"string"},f$={additionalProperties:!1,description:"One visible branch/ref at one immutable tip.",properties:{node_id:{$ref:"#/$defs/StackNodeId"},project_id:{$ref:"#/$defs/ProjectId"},reference:{$ref:"#/$defs/RefId"},repository_id:{$ref:"#/$defs/RepositoryId"},tip:{$ref:"#/$defs/CommitId"},worktree_id:{anyOf:[{$ref:"#/$defs/WorktreeId"},{type:"null"}]}},required:["node_id","project_id","repository_id","reference","tip"],type:"object"},fS={description:"Strongly typed canonical identity: `BranchStackRevisionId`.",type:"string"},fk={additionalProperties:!1,description:"Immutable branch-stack projection at one exact inventory revision.",properties:{canonical_order:{items:{$ref:"#/$defs/StackNodeId"},type:"array"},digest:{$ref:"#/$defs/ManifestDigest"},edges:{items:{$ref:"#/$defs/BranchStackEdgeV1"},type:"array"},inventory_epoch:{$ref:"#/$defs/WorktreeInventoryEpoch"},inventory_snapshot_id:{$ref:"#/$defs/WorktreeInventorySnapshotId"},nodes:{items:{$ref:"#/$defs/BranchStackNodeV1"},type:"array"},revision_id:{$ref:"#/$defs/BranchStackRevisionId"},source:{$ref:"#/$defs/BranchStackSourceV1"},stack_id:{$ref:"#/$defs/BranchStackId"}},required:["stack_id","revision_id","inventory_snapshot_id","inventory_epoch","source","nodes","edges","canonical_order","digest"],type:"object"},fw={description:"Authoritative source that declared the exact stack topology.",enum:["explicit_declaration","accepted_task_branch_topology"],type:"string"},fV={enum:["no_branches","unbranched","independent_branches","local_stack"],type:"string"},fP={additionalProperties:!1,properties:{allowed:{items:{$ref:"#/$defs/BranchTopologyKindV1"},type:"array",uniqueItems:!0}},required:["allowed"],type:"object"},fR={description:"Strongly typed canonical identity: `CalibrationProfileId`.",type:"string"},fq={additionalProperties:!1,description:"Surface-owned query semantics. Page size remains an invocation control, but\ncontinuation is a request field so CLI, MCP, and HTTP callers all have the\nsame channel for spending a `next_cursor`.",properties:{cursor:{default:null,type:["string","null"]},order:{$ref:"#/$defs/RetrievalOrder"},projection:{$ref:"#/$defs/ResultProjection"}},required:["projection","order"],type:"object"},fI={additionalProperties:!1,properties:{observed_at:{$ref:"#/$defs/UtcMicros"},stage:{$ref:"#/$defs/CancellationStage"}},required:["stage","observed_at"],type:"object"},fx={description:"Exact stage at which cancellation or deadline state was observed.",enum:["before_admission","before_read","during_read","before_effect","effect_in_flight","reconciling","after_commit"],type:"string"},fj={additionalProperties:!1,description:"One retriever's scored contribution to a fused candidate. Every ranked\ncandidate retains every retriever's raw score domain, ordinal rank,\ncalibrated feature, weight, and weighted contribution.",properties:{calibrated_feature_micros:{format:"uint32",minimum:0,type:"integer"},calibration_profile_id:{$ref:"#/$defs/CalibrationProfileId"},ordinal_rank:{format:"uint32",minimum:0,type:"integer"},raw_score:{$ref:"#/$defs/FixedPointScore"},retriever:{$ref:"#/$defs/RetrieverKind"},retriever_revision:{$ref:"#/$defs/ComponentRevision"},score_domain:{$ref:"#/$defs/ScoreDomainId"},source_occurrence_id:{$ref:"#/$defs/SourceOccurrenceId"},weight_micros:{format:"uint32",minimum:0,type:"integer"},weighted_contribution_micros:{format:"uint64",minimum:0,type:"integer"}},required:["retriever","retriever_revision","source_occurrence_id","ordinal_rank","raw_score","score_domain","calibration_profile_id","calibrated_feature_micros","weight_micros","weighted_contribution_micros"],type:"object"},fC={description:"A validated full native Git ref name, such as `refs/heads/main`.",type:"string"},fT={description:"A validated ref/branch prefix. Branch naming accepts a short branch prefix\n(for example `tracedecay/`) while protected-ref selectors use full\n`refs/.../` prefixes.",type:"string"},fO={description:"Strongly typed canonical identity: `CapabilityId`.",type:"string"},fE={description:"Strongly typed canonical identity: `CatalogGenerationId`.",type:"string"},fA={description:"Strongly typed canonical identity: `ChangePlanId`.",type:"string"},fW={additionalProperties:!1,properties:{from_inclusive:{format:"int64",type:["integer","null"]},through_inclusive:{format:"int64",type:["integer","null"]}},type:"object"},fM={additionalProperties:!1,description:'Why co-change mining produced no answer, so an empty\n`missing_co_change_partners` does not read as "no partner is missing".',properties:{reason:{type:"string"},retryable:{type:"boolean"}},required:["reason","retryable"],type:"object"},fN={enum:["kind","language","path"],type:"string"},fz={description:"Strongly typed canonical identity: `CodeGenerationId`.",type:"string"},fD={description:"Freshness of the generation a verified graph read serves.",oneOf:[{properties:{state:{const:"current",type:"string"}},required:["state"],type:"object"},{properties:{rebuild_in_flight:{type:"boolean"},sealed_at:{$ref:"#/$defs/UtcMicros"},state:{const:"last_complete_stale",type:"string"}},required:["state","sealed_at","rebuild_in_flight"],type:"object"}]},fF={description:"A typed reason an otherwise active generation cannot make durable progress.",enum:["resident_memory","source_unavailable","artifact_store_unavailable","retry_backoff","publication_authority_corrupt"],type:"string"},fL={description:'A deterministic contract violation that parked background convergence.\n\nParked is not dead: the worker keeps re-observing the violation on its\nordinary wake cadence, so an operator fix (for example restoring an\nowner-private mode) is picked up on the next wake without a restart. The\nstate exists so `status`, doctor, and the dashboard report the violation\ntyped instead of an indefinite "warming".',properties:{blocked_reason:{anyOf:[{$ref:"#/$defs/CodeIndexBuildBlockedReasonV1"},{type:"null"}],description:"Stable class for callers that must decide whether new work is admissible."},observed_passes:{description:"Background passes that re-observed the violation since parking.",format:"uint64",minimum:0,type:"integer"},parked_at_micros:{description:"When the violation was first observed (microseconds since the Unix epoch).",format:"int64",type:"integer"},reason:{description:"Exact typed failure that parked convergence.",type:"string"},remediation:{description:"Operator action that clears the violation.",type:"string"},retries_on_wake:{description:"Whether the worker re-checks this violation on every ordinary wake.\nTrue for filesystem/contract violations an operator fix clears in\nplace; false for an abnormal task failure that only changed input (a\nnew sealed generation) retries.",type:"boolean"}},required:["reason","remediation","parked_at_micros","observed_passes","retries_on_wake"],type:"object"},fU={properties:{display_path:{description:"`git_path_bytes` decoded for display, invalid UTF-8 replaced.",type:"string"},git_path_bytes:{description:"The exact Git path bytes, which need not be UTF-8.",items:{format:"uint8",maximum:255,minimum:0,type:"integer"},type:"array"},reason:{$ref:"#/$defs/CodeIndexSourceOmissionReasonV1"}},required:["git_path_bytes","display_path","reason"],type:"object"},fH={description:"Sources a sealed snapshot captured but does not index.",properties:{count:{description:"Every omitted source in the snapshot.",format:"uint64",minimum:0,type:"integer"},sources:{description:"The first omitted sources in Git path order, at most\n[`CODE_INDEX_OMITTED_SOURCE_LIST_LIMIT`].",items:{$ref:"#/$defs/CodeIndexOmittedSourceV1"},type:"array"}},required:["count","sources"],type:"object"},fG={oneOf:[{description:"No logical path can carry the Git path: not UTF-8, a backslash, a\ncontrol character, or leading or trailing whitespace.",properties:{kind:{const:"unrepresentable_path",type:"string"}},required:["kind"],type:"object"},{description:"The privacy boundary withheld the file's bytes.",properties:{detail:{type:"string"},kind:{const:"privacy_withheld",type:"string"}},required:["kind","detail"],type:"object"}]},fB={description:"Closed staleness ladder for one mounted worktree.\n\nThe scheduler publishes one of these tokens. MCP, the dashboard, and the\nCLI must match the variant, not a hand-copied string, so a new ladder\nstate cannot appear at one caller and be missed at the others.",enum:["fresh","stale","indexing","refreshing","restoring","verifying","parked"],type:"string"},fK={description:"Profile-level worker-count intent for the process-wide code-index pool.\n`Automatic` delegates the concrete count to runtime resource admission;\n`Exact` persists an operator-requested positive worker count.",oneOf:[{additionalProperties:!1,properties:{mode:{const:"automatic",type:"string"}},required:["mode"],type:"object"},{additionalProperties:!1,properties:{mode:{const:"exact",type:"string"},workers:{format:"uint16",maximum:65535,minimum:0,type:"integer"}},required:["mode","workers"],type:"object"}]},fJ={additionalProperties:!1,properties:{chunk:{anyOf:[{$ref:"#/$defs/CodeSearchChunkId"},{type:"null"}]},file:{$ref:"#/$defs/FileOccurrenceId"},path:{type:"string"},span:{$ref:"#/$defs/SourceSpan"},symbol:{anyOf:[{$ref:"#/$defs/SymbolOccurrenceId"},{type:"null"}]}},required:["file","path","span"],type:"object"},fZ={additionalProperties:!1,description:"One immutable code-index generation inside the authorized single root.\nThe path prefix narrows a query but never establishes project identity.",properties:{generation:{$ref:"#/$defs/CodeGenerationId"},path_prefix:{type:["string","null"]}},required:["generation"],type:"object"},fQ={description:"Strongly typed canonical identity: `CodeSearchChunkId`.",type:"string"},fX={description:"Strongly typed canonical identity: `CommitId`.",type:"string"},fY={enum:["promote","reject","insufficient_evidence"],type:"string"},f1={description:"Whether the bounded complexity walk over a symbol's body ran to the end.\n\nThe extractor stops walking a body once its traversal budget is spent. The\ncounters accumulated by then are lower bounds over the visited prefix, not\nfacts about the whole body, so every surface that prints, ranks, or\naggregates complexity must render this state instead of treating those\ncounters as exact.",oneOf:[{enum:["complete"],type:"string"},{const:"traversal_budget_exhausted",description:"The walk stopped when the traversal budget ran out.",type:"string"}]},f0={description:"Strongly typed canonical identity: `ComponentRevision`.",type:"string"},f2={description:"Strongly typed canonical identity: `ComponentVersion`.",type:"string"},f4={enum:["config_summary"],type:"string"},f6={additionalProperties:!1,description:"One entry per changed config file instead of one per config key.",properties:{config_keys:{format:"uint",minimum:0,type:"integer"},file:{type:"string"},kind:{$ref:"#/$defs/ConfigSummaryKindV1"}},required:["file","kind","config_keys"],type:"object"},f3={description:"Strongly typed canonical identity: `ConfigurationIdempotencyKey`.",type:"string"},f9={description:"A typed configuration layer identity. The default layer intentionally has\nno caller-controlled identifier.",oneOf:[{properties:{kind:{const:"default",type:"string"}},required:["kind"],type:"object"},{properties:{kind:{const:"user_profile",type:"string"},profile_id:{$ref:"#/$defs/UserProfileId"}},required:["kind","profile_id"],type:"object"},{properties:{kind:{const:"project",type:"string"},project_id:{$ref:"#/$defs/ProjectId"}},required:["kind","project_id"],type:"object"},{properties:{collection_id:{$ref:"#/$defs/QueryCollectionId"},kind:{const:"collection",type:"string"}},required:["kind","collection_id"],type:"object"}]},f5={description:"Strongly typed canonical identity: `ConfigurationReceiptId`.",type:"string"},f8={description:"Strongly typed canonical identity: `ConfigurationRevisionId`.",type:"string"},f7={description:"Strongly typed canonical identity: `ConfigurationSnapshotId`.",type:"string"},he={description:"Values that the typed registry can accept.",oneOf:[{properties:{kind:{const:"boolean",type:"string"},value:{type:"boolean"}},required:["kind","value"],type:"object"},{properties:{kind:{const:"unsigned",type:"string"},value:{format:"uint64",minimum:0,type:"integer"}},required:["kind","value"],type:"object"},{properties:{kind:{const:"code_index_worker_selection",type:"string"},value:{$ref:"#/$defs/CodeIndexWorkerSelectionV1"}},required:["kind","value"],type:"object"},{properties:{kind:{const:"text",type:"string"},value:{type:"string"}},required:["kind","value"],type:"object"},{properties:{kind:{const:"string_list",type:"string"},value:{items:{type:"string"},type:"array"}},required:["kind","value"],type:"object"},{properties:{kind:{const:"source_bindings",type:"string"},value:{items:{$ref:"#/$defs/ScopeSourceBinding"},type:"array"}},required:["kind","value"],type:"object"},{properties:{kind:{const:"access_rules",type:"string"},value:{items:{$ref:"#/$defs/ScopeAccessRule"},type:"array"}},required:["kind","value"],type:"object"},{properties:{kind:{const:"analyzer_settings",type:"string"},value:{$ref:"#/$defs/AnalyzerSettingsV1"}},required:["kind","value"],type:"object"},{properties:{kind:{const:"work_topology_policy",type:"string"},value:{$ref:"#/$defs/WorkTopologyPolicyV1"}},required:["kind","value"],type:"object"},{properties:{kind:{const:"work_executable_bindings",type:"string"},value:{items:{$ref:"#/$defs/WorkExecutableBindingV1"},type:"array"}},required:["kind","value"],type:"object"},{properties:{kind:{const:"work_expertise_consent",type:"string"},value:{$ref:"#/$defs/WorkExpertiseConsentV1"}},required:["kind","value"],type:"object"},{properties:{kind:{const:"context_scout_settings",type:"string"},value:{$ref:"#/$defs/ContextScoutSettingsV1"}},required:["kind","value"],type:"object"},{properties:{kind:{const:"automation_settings",type:"string"},value:{$ref:"#/$defs/AutomationSettingsV1"}},required:["kind","value"],type:"object"},{properties:{kind:{const:"lcm_summarizer_executables",type:"string"},value:{$ref:"#/$defs/LcmSummarizerExecutablesV1"}},required:["kind","value"],type:"object"}]},ht={description:"Strongly typed algorithm-tagged integrity digest: `ContentDigest`.",type:"string"},hr={description:"What one caller `lexical_anchors` entry contributed to the response, in\ncaller order.",oneOf:[{additionalProperties:!1,description:"`matched` indexed rows carried the anchor; `admitted` result sites\ncarrying it are in this response, and `dropped` counts the sites the\nlexical lane admitted that a later stage removed, by reason.",properties:{admitted:{format:"uint64",minimum:0,type:"integer"},anchor:{type:"string"},dropped:{items:{$ref:"#/$defs/LexicalAnchorDropV1"},type:"array"},matched:{format:"uint64",minimum:0,type:"integer"},outcome:{const:"matched",type:"string"}},required:["outcome","anchor","matched","admitted"],type:"object"},{additionalProperties:!1,description:"No indexed row carries the anchor.",properties:{anchor:{type:"string"},outcome:{const:"unmatched",type:"string"}},required:["outcome","anchor"],type:"object"},{additionalProperties:!1,description:"The anchor's route did not serve; `coverage` names the lane state.",properties:{anchor:{type:"string"},outcome:{const:"not_served",type:"string"}},required:["outcome","anchor"],type:"object"}]},hi={enum:["explore","plan"],type:"string"},ho={additionalProperties:!1,description:"Exact opaque destination for one public Context Scout operation.\n\nThe daemon converts this transport-neutral address into its runtime value\nonly after catalog admission. Keeping the public wire here makes CLI, MCP,\nHTTP, and both SDKs share one generated schema authority.",properties:{agent_id:{items:{format:"uint8",maximum:255,minimum:0,type:"integer"},maxItems:16,minItems:16,type:"array"},logical_message_id:{items:{format:"uint8",maximum:255,minimum:0,type:"integer"},maxItems:16,minItems:16,type:"array"},profile_id:{items:{format:"uint8",maximum:255,minimum:0,type:"integer"},maxItems:16,minItems:16,type:"array"},project_id:{items:{format:"uint8",maximum:255,minimum:0,type:"integer"},maxItems:16,minItems:16,type:"array"},protected_session_id:{items:{format:"uint8",maximum:255,minimum:0,type:"integer"},maxItems:32,minItems:32,type:"array"},provider_id:{items:{format:"uint8",maximum:255,minimum:0,type:"integer"},maxItems:16,minItems:16,type:"array"},thread_id:{items:{format:"uint8",maximum:255,minimum:0,type:"integer"},maxItems:16,minItems:16,type:"array"},turn_id:{items:{format:"uint8",maximum:255,minimum:0,type:"integer"},maxItems:16,minItems:16,type:"array"}},required:["profile_id","provider_id","protected_session_id","thread_id","turn_id","agent_id","logical_message_id","project_id"],type:"object"},hn={enum:["retrieval","diagnostic","coordination","verification"],type:"string"},ha={additionalProperties:!1,description:"Public lease proof. It carries only opaque identities; the daemon resolves\nit back to the durable queue row before recording delivery.",properties:{envelope_id:{items:{format:"uint8",maximum:255,minimum:0,type:"integer"},maxItems:16,minItems:16,type:"array"},lease_expires_at:{$ref:"#/$defs/UtcMicros"},lease_id:{items:{format:"uint8",maximum:255,minimum:0,type:"integer"},maxItems:16,minItems:16,type:"array"},work:{$ref:"#/$defs/ContextScoutWorkV1"}},required:["work","envelope_id","lease_id","lease_expires_at"],type:"object"},hs={additionalProperties:!1,properties:{max_candidates:{format:"uint32",minimum:0,type:"integer"},max_evidence:{format:"uint32",minimum:0,type:"integer"},max_model_input_tokens:{format:"uint32",minimum:0,type:"integer"},max_model_output_tokens:{format:"uint32",minimum:0,type:"integer"},max_text_bytes:{format:"uint32",minimum:0,type:"integer"}},required:["max_candidates","max_evidence","max_text_bytes","max_model_input_tokens","max_model_output_tokens"],type:"object"},hd={enum:["deterministic","configured_model"],type:"string"},hc={enum:["active","paused","disabled"],type:"string"},hl={enum:["codex_app_server"],type:"string"},hp={enum:["attempted","delayed","displayed","expanded","explicitly_accepted","explicitly_rejected","dismissed","expired_unseen","corrected","unknown"],type:"string"},hu={additionalProperties:!1,properties:{delivered_at:{$ref:"#/$defs/UtcMicros"},envelope_id:{items:{format:"uint8",maximum:255,minimum:0,type:"integer"},maxItems:16,minItems:16,type:"array"},outcome:{$ref:"#/$defs/ContextScoutDeliveryOutcomeV1"},receipt_id:{items:{format:"uint8",maximum:255,minimum:0,type:"integer"},maxItems:16,minItems:16,type:"array"}},required:["receipt_id","envelope_id","delivered_at","outcome"],type:"object"},hm={enum:["immediate","next_boundary","idle_window","on_request","suppressed"],type:"string"},hf={enum:["complete","partial","stale","cancelled","unavailable"],type:"string"},hh={additionalProperties:!1,properties:{anchor_ids:{items:{$ref:"#/$defs/RetrievalAnchorId"},type:"array"},availability:{$ref:"#/$defs/ContextScoutEvidenceAvailabilityV1"},claim_digest:{$ref:"#/$defs/ManifestDigest"},content_generation:{$ref:"#/$defs/CodeGenerationId"},session_window:{anyOf:[{$ref:"#/$defs/ContextScoutSessionWindowV1"},{type:"null"}],description:"Session turns a session-evidence suggestion was judged from. Absent for\ncode evidence."}},required:["content_generation","availability","anchor_ids","claim_digest"],type:"object"},hy={enum:["explicitly_accepted","explicitly_rejected","dismissed","corrected"],type:"string"},hg={additionalProperties:!1,properties:{kind:{$ref:"#/$defs/ContextScoutFeedbackKindV1"},receipt_id:{items:{format:"uint8",maximum:255,minimum:0,type:"integer"},maxItems:16,minItems:16,type:"array"}},required:["receipt_id","kind"],type:"object"},h_={description:"One user intent the Scout can recognize. The serialized keys are the\nhistorical hook hint category keys, so persisted hint analytics, hint\nsettlement, and evals keep one vocabulary.",enum:["search","semantic_search","file_read","tool_descriptor_read","broad_read","call_graph","impact","symbol_lookup","file_lookup","project_context","session_recall","atomic_edit","type_orientation","explore_subagent","subagent_start_context","build_diagnostics","review_changes","memory_store","edit_redundancy","unexpected_changes"],type:"string"},hv={additionalProperties:!1,description:"Operator configuration for the Context Scout intent pass.",properties:{action_fact_score_permille:{description:"Score a deterministic action fact contributes for its intent.",format:"uint16",maximum:65535,minimum:0,type:"integer"},enabled:{type:"boolean"},engine:{$ref:"#/$defs/DecisionEngineSettingsV1"},min_delivery_gap_secs:{format:"uint32",minimum:0,type:"integer"},prompt_lookup_deadline_ms:{format:"uint32",minimum:0,type:"integer"},questions:{items:{$ref:"#/$defs/IntentQuestionSettingsV1"},type:"array"},ttl_secs:{format:"uint32",minimum:0,type:"integer"},window:{$ref:"#/$defs/IntentWindowSettingsV1"}},required:["enabled","engine","window","questions","action_fact_score_permille","ttl_secs","min_delivery_gap_secs","prompt_lookup_deadline_ms"],type:"object"},hb={additionalProperties:!1,properties:{max_candidates:{format:"uint",minimum:0,type:"integer"},max_evidence:{format:"uint",minimum:0,type:"integer"},max_model_input_tokens:{format:"uint",minimum:0,type:"integer"},max_model_output_tokens:{format:"uint",minimum:0,type:"integer"},max_text_bytes:{format:"uint",minimum:0,type:"integer"}},required:["max_candidates","max_evidence","max_text_bytes","max_model_input_tokens","max_model_output_tokens"],type:"object"},h$={enum:["disabled","codex_app_server","unsupported","decision_engine"],type:"string"},hS={oneOf:[{enum:["not_requested","succeeded","disabled","unavailable","denied","disconnected","cancelled","deadline_exceeded","token_budget_exceeded","invalid_output"],type:"string"},{const:"backpressured",description:"The engine's concurrency bound was full; the request was not sent.",type:"string"}]},hk={additionalProperties:!1,properties:{actual_model:{type:["string","null"]},actual_provider:{type:["string","null"]},estimated_cost_microusd:{format:"uint64",minimum:0,type:["integer","null"]},input_tokens:{format:"uint64",minimum:0,type:["integer","null"]},output_tokens:{format:"uint64",minimum:0,type:["integer","null"]},requested_backend:{$ref:"#/$defs/ContextScoutModelBackendV1"}},required:["requested_backend"],type:"object"},hw={additionalProperties:!1,properties:{feedback:{anyOf:[{$ref:"#/$defs/ContextScoutFeedbackV1"},{type:"null"}]},receipt:{$ref:"#/$defs/ContextScoutDeliveryReceiptV1"},suggestion:{$ref:"#/$defs/ContextScoutSuggestionProjectionV1"}},required:["suggestion","receipt"],type:"object"},hV={oneOf:[{enum:["deterministic","model_assisted","deterministic_fallback"],type:"string"},{const:"decision_engine",description:"Produced by the session intent pass: decision-engine answers combined\nwith deterministic action facts.",type:"string"}]},hP={enum:["deterministic","configured_model"],type:"string"},hR={enum:["active","paused","disabled"],type:"string"},hq={additionalProperties:!1,description:"Exact bounded span of one session's transcript an intent pass read. The\nwindow body is never retained; only its digest and store-id bounds are.",properties:{first_store_id:{format:"int64",type:"integer"},last_store_id:{format:"int64",type:"integer"},message_count:{format:"uint16",maximum:65535,minimum:0,type:"integer"},newest_timestamp:{format:"int64",type:["integer","null"]},window_digest:{$ref:"#/$defs/ManifestDigest"}},required:["first_store_id","last_store_id","message_count","window_digest"],type:"object"},hI={additionalProperties:!1,description:"Canonical Context Scout control-plane value. Disabled is the only stock\nstate; deterministic or configured-model execution requires an explicit\nconfiguration revision.",properties:{intent:{anyOf:[{$ref:"#/$defs/ContextScoutIntentSettingsV1"},{type:"null"}],description:"Session intent pass. Absent means the Scout runs no intent pass; the\nfield is omitted from the canonical encoding so settings written before\nit existed keep their behavior digest."},limits:{$ref:"#/$defs/ContextScoutConfigurationLimitsV1"},mode:{$ref:"#/$defs/ContextScoutConfigurationModeV1"},model_id:{type:["string","null"]},model_path:{anyOf:[{$ref:"#/$defs/ContextScoutConfiguredModelPathV1"},{type:"null"}]},model_timeout_secs:{format:"uint64",minimum:0,type:["integer","null"]},schema_version:{format:"uint16",maximum:65535,minimum:0,type:"integer"},state:{$ref:"#/$defs/ContextScoutConfigurationStateV1"}},required:["schema_version","state","mode","limits"],type:"object"},hx={enum:["stored","duplicate","superseded"],type:"string"},hj={additionalProperties:!1,properties:{category:{$ref:"#/$defs/ContextScoutCategoryV1"},configuration_revision:{items:{format:"uint8",maximum:255,minimum:0,type:"integer"},maxItems:32,minItems:32,type:"array"},dedupe_key:{items:{format:"uint8",maximum:255,minimum:0,type:"integer"},maxItems:32,minItems:32,type:"array"},delivery_window:{$ref:"#/$defs/ContextScoutDeliveryWindowV1"},envelope_id:{items:{format:"uint8",maximum:255,minimum:0,type:"integer"},maxItems:16,minItems:16,type:"array"},evidence:{$ref:"#/$defs/ContextScoutEvidenceProjectionV1"},expires_at:{$ref:"#/$defs/UtcMicros"},model_outcome:{$ref:"#/$defs/ContextScoutModelOutcomeV1"},model_receipt:{anyOf:[{$ref:"#/$defs/ContextScoutModelReceiptV1"},{type:"null"}]},relevance_score:{format:"uint16",maximum:65535,minimum:0,type:"integer"},route:{$ref:"#/$defs/ContextScoutRouteV1"},suggestion_text:{type:"string"},work:{$ref:"#/$defs/ContextScoutWorkV1"}},required:["work","envelope_id","configuration_revision","delivery_window","route","model_outcome","dedupe_key","category","relevance_score","suggestion_text","evidence","expires_at"],type:"object"},hC={oneOf:[{enum:["disabled","paused","dirty_overlay","quiet_or_unreceptive","no_eligible_candidate","expired","duplicate","cancelled","model_output_invalid","evidence_partial","evidence_stale","evidence_unavailable"],type:"string"},{const:"pending_sibling",description:"A suggestion for the same session is already pending delivery.",type:"string"}]},hT={additionalProperties:!1,properties:{address:{$ref:"#/$defs/ContextScoutAddressV1"},generation:{format:"uint64",minimum:0,type:"integer"},input_watermark:{items:{format:"uint8",maximum:255,minimum:0,type:"integer"},maxItems:32,minItems:32,type:"array"}},required:["address","generation","input_watermark"],type:"object"},hO={properties:{authorized_scope_ref:{type:"string"},current:{type:"boolean"},estimated_cost:{items:{$ref:"#/$defs/MetricValueV1"},type:"array"},horizon:{$ref:"#/$defs/ObservabilityHorizonV1"},latency:{description:"Provider-backed operation latency, projected from the same retained\nPlan 26 operation-resource events as Observatory. Each entry keeps\nprovider/model identity explicit; `None` is a real uncorrelated state,\nnever a client-side guess.",items:{$ref:"#/$defs/ProviderLatencyReadModelV1"},type:"array"},observed_at_micros:{format:"int64",type:"integer"},pricing_revision:{type:["string","null"]},usage:{items:{$ref:"#/$defs/MetricValueV1"},type:"array"},watermark:{type:"string"}},required:["authorized_scope_ref","horizon","watermark","observed_at_micros","current","usage","estimated_cost","latency"],type:"object"},hE={description:"Which side of a file dependency the coupling report counts.",enum:["fan_in","fan_out"],type:"string"},hA={description:"Completeness is explicit; unknown never renders as clean.",enum:["complete","partial","unknown"],type:"string"},hW={additionalProperties:!1,properties:{completeness:{$ref:"#/$defs/CoverageCompleteness"},domain:{$ref:"#/$defs/EvidenceDomain"}},required:["domain","completeness"],type:"object"},hM={enum:["known","partial","stale","unknown","sampled","capped"],type:"string"},hN={description:"Strongly typed canonical identity: `CredentialReferenceId`.",type:"string"},hz={enum:["disabled","manual_receipt_only","fast_forward_only","merge_commit","cherry_pick_exact_commits"],type:"string"},hD={additionalProperties:!1,properties:{allow_cross_repository:{type:"boolean"},allowed_modes:{items:{$ref:"#/$defs/CrossMergeModeV1"},type:"array",uniqueItems:!0},default_mode:{$ref:"#/$defs/CrossMergeModeV1"}},required:["allowed_modes","default_mode","allow_cross_repository"],type:"object"},hF={description:"The managed daemon service unit as a client observed it, from the unit\nfile alone.",oneOf:[{additionalProperties:!1,properties:{state:{const:"not_installed",type:"string"}},required:["state"],type:"object"},{additionalProperties:!1,description:"The unit file could not be read.",properties:{error:{type:"string"},state:{const:"unobservable",type:"string"}},required:["state","error"],type:"object"},{additionalProperties:!1,description:"The unit file at `path` serves the socket `serves`.",properties:{path:{type:"string"},serves:{type:"string"},state:{const:"installed",type:"string"}},required:["state","path","serves"],type:"object"}]},hL={additionalProperties:!1,description:"One immutable deadline supplied by the caller or upstream admission layer.",properties:{expires_at:{$ref:"#/$defs/UtcMicros"}},required:["expires_at"],type:"object"},hU={additionalProperties:!1,description:"The decision engine the intent pass asks. There is no default endpoint or\nmodel; both come only from explicit operator configuration.",properties:{base_url:{type:"string"},max_concurrent:{format:"uint8",maximum:255,minimum:0,type:"integer"},max_state_bytes:{format:"uint32",minimum:0,type:"integer"},model:{type:["string","null"]},timeout_ms:{format:"uint32",minimum:0,type:"integer"}},required:["base_url","timeout_ms","max_concurrent","max_state_bytes"],type:"object"},hH={description:"Diagnostic severity. Source severity is preserved exactly; TraceDecay\nnever raises severity because several producers agree.",enum:["error","warning","information","hint"],type:"string"},hG={additionalProperties:!1,description:"One tsconfig location the diagnostics owner search checked.",properties:{path:{description:"Relative to the project root, forward-slash separated.",type:"string"},present:{description:"The config exists, but neither it nor its references include the\nfile.",type:"boolean"}},required:["path","present"],type:"object"},hB={description:"Whether Doctor observed all of a family's evidence sources.",oneOf:[{const:"complete",description:"Every relevant evidence source for the family was observed.",type:"string"},{const:"partial",description:"Some evidence sources were observed; others were omitted.",type:"string"},{const:"unknown",description:"Whether coverage is complete could not be determined.",type:"string"}]},hK={description:"Shape of the design-structure-matrix report.",enum:["stats","clusters","matrix"],type:"string"},hJ={enum:["prevented","committed","unknown","not_applicable"],type:"string"},hZ={enum:["exact_duplicate","superseded_overlap","repeated_investigation","duplicate_effect","not_duplicate","censored","unknown"],type:"string"},hQ={description:"The stable effect classification of one application operation.\n\nGit index writes remain separate classes so policy cannot accidentally\nsubstitute one index mutation for another.",oneOf:[{enum:["read","preview","source_edit","git_index_stage","git_index_unstage","configuration_write","administrative"],type:"string"},{const:"spawns_process",description:"Runs a child process in the project (e.g. the project's test runner).",type:"string"},{const:"binds_server",description:"Binds a listening server in the daemon process.",type:"string"},{const:"schedules_work",description:"Queues work on a daemon-owned scheduler; the call answers with the\nscheduler's admission, not the finished work.",type:"string"},{const:"maintains_owner_state",description:"Maintains bookkeeping the daemon keeps for the project or profile it\nserves: resets a usage counter, records registry token accounting, or\nreconciles automation schedulers with the saved configuration. Each\nwrite settles within the call and answers its new state.",type:"string"},{const:"maintains_profile_state",description:"Reads and rewrites the daemon profile's own state: its project\nregistry, accounting ledgers, and session stores. Unlike bookkeeping,\nit includes long work, a registry collection or a transcript import,\nthat a cancelled call stops.",type:"string"},{const:"records_host_evidence",description:"Records a host's session evidence (transcripts, hook admissions,\nreceipts) in daemon-owned session stores.",type:"string"}]},hX={additionalProperties:!1,description:"Durable effect proof. It records identities and receipts, never credentials\nor arbitrary command text.",properties:{actor:{$ref:"#/$defs/ActorId"},catalog_digest:{$ref:"#/$defs/ManifestDigest"},committed_state:{anyOf:[{$ref:"#/$defs/ManifestDigest"},{type:"null"}]},configuration_digest:{$ref:"#/$defs/ManifestDigest"},effect_class:{$ref:"#/$defs/EffectClass"},expected_state:{$ref:"#/$defs/ManifestDigest"},external_proof:{anyOf:[{$ref:"#/$defs/RetrievalAnchorId"},{type:"null"}]},idempotency_key:{type:"string"},input_digest:{$ref:"#/$defs/ManifestDigest"},operation:{$ref:"#/$defs/UseCaseId"},outcome:{$ref:"#/$defs/EffectTermination"},policy_digest:{$ref:"#/$defs/ManifestDigest"},privacy_digest:{$ref:"#/$defs/ManifestDigest"},request_id:{type:"string"},scope:{$ref:"#/$defs/ResolvedScope"}},required:["operation","request_id","actor","scope","effect_class","idempotency_key","input_digest","expected_state","policy_digest","configuration_digest","catalog_digest","privacy_digest","outcome"],type:"object"},hY={description:"Durable effect receipt terminal state.",enum:["completed","cancelled","timed_out","failed","partial","effect_unknown"],type:"string"},h1={additionalProperties:!1,description:"Deterministic coverage fold input for an evidence packet.",properties:{completeness:{$ref:"#/$defs/CoverageCompleteness"},domains:{items:{$ref:"#/$defs/CoverageDomainState"},type:"array"},eligible:{format:"uint64",minimum:0,type:["integer","null"]},requested_domains:{items:{$ref:"#/$defs/EvidenceDomain"},type:"array"},returned:{format:"uint64",minimum:0,type:"integer"},visited:{format:"uint64",minimum:0,type:["integer","null"]}},required:["requested_domains","returned","completeness","domains"],type:"object"},h0={description:"Requested evidence domain for bounded coverage and omissions.",enum:["symbol","source","graph","test","temporal","anchor","operational","diagnostic"],type:"string"},h2={description:"Evidence role used by dedupe/diversity caps. Independent corroboration\nand contradictions are preserved.",enum:["primary","corroboration","contradiction","context"],type:"string"},h4={description:"The exact tiers, lexicographically ordered above all approximate\ncandidates. Fusion derives this only from a validated [`ExactAdmissionProof`].",enum:["exact_message","exact_literal_phrase","approximate"],type:"string"},h6={description:"The classification of one whole exact technical term. Whole exact terms\nand language-profiled subtokens are distinct fields.",enum:["whole_symbol","qualified_name","path","compiler_error_code","compiler_error_text","runtime_error_code","runtime_error_text","cli_flag","tool_name","configuration_key","commit_identifier"],type:"string"},h3={description:"Strongly typed canonical identity: `FactAssertionId`.",type:"string"},h9={enum:["general","user_pref","project","tool","decision","code_area"],type:"string"},h5={enum:["committed","idempotent_replay"],type:"string"},h8={oneOf:[{additionalProperties:!1,properties:{kind:{const:"profile",type:"string"}},required:["kind"],type:"object"},{additionalProperties:!1,properties:{kind:{const:"project",type:"string"},project_id:{$ref:"#/$defs/ProjectId"}},required:["kind","project_id"],type:"object"}]},h7={additionalProperties:!1,properties:{active_assertion_id:{anyOf:[{$ref:"#/$defs/FactAssertionId"},{type:"null"}]},committed_event_ids:{items:{$ref:"#/$defs/FactEventId"},type:"array"},disposition:{$ref:"#/$defs/FactCommitDispositionV1"},fact_id:{$ref:"#/$defs/FactId"},last_event_id:{$ref:"#/$defs/FactEventId"},owner:{$ref:"#/$defs/FactCommitOwnerV1"}},required:["disposition","fact_id","owner","committed_event_ids","last_event_id"],type:"object"},ye={description:"Strongly typed canonical identity: `FactEventId`.",type:"string"},yt={enum:["helpful","unhelpful"],type:"string"},yr={description:"Strongly typed canonical identity: `FactId`.",type:"string"},yi={oneOf:[{additionalProperties:!1,properties:{anchor_id:{$ref:"#/$defs/RetrievalAnchorId"},kind:{const:"evidence",type:"string"},stable_key:{$ref:"#/$defs/LocatorDigest"}},required:["kind","anchor_id","stable_key"],type:"object"},{additionalProperties:!1,properties:{kind:{const:"application",type:"string"},operation_id:{$ref:"#/$defs/ProvenanceId"}},required:["kind","operation_id"],type:"object"}]},yo={description:"Payload states that structurally cannot expose an available fact payload.",enum:["redacted","quarantined","retention_expired","deleted","unavailable","ambiguous"],type:"string"},yn={oneOf:[{additionalProperties:!1,properties:{fact:{$ref:"#/$defs/FactV1"},kind:{const:"available",type:"string"}},required:["kind","fact"],type:"object"},{additionalProperties:!1,properties:{fact:{$ref:"#/$defs/FactV1"},kind:{const:"superseded",type:"string"},superseded_by:{$ref:"#/$defs/FactId"}},required:["kind","fact","superseded_by"],type:"object"},{additionalProperties:!1,properties:{kind:{const:"unavailable",type:"string"},status:{$ref:"#/$defs/FactStatusV1"}},required:["kind","status"],type:"object"}]},ya={oneOf:[{additionalProperties:!1,properties:{kind:{const:"not_applicable",type:"string"}},required:["kind"],type:"object"},{additionalProperties:!1,properties:{kind:{const:"not_mounted",type:"string"}},required:["kind"],type:"object"},{additionalProperties:!1,properties:{expanded_fact_count:{format:"uint",minimum:0,type:"integer"},kind:{const:"complete",type:"string"},relation_count:{format:"uint",minimum:0,type:"integer"},root_count:{format:"uint",minimum:0,type:"integer"}},required:["kind","root_count","relation_count","expanded_fact_count"],type:"object"},{additionalProperties:!1,properties:{kind:{const:"degraded",type:"string"},reason:{$ref:"#/$defs/FactSearchGraphDegradationV1"}},required:["kind","reason"],type:"object"}]},ys={enum:["conflict","unavailable","budget_exhausted","deadline_exceeded"],type:"string"},yd={additionalProperties:!1,properties:{fact:{$ref:"#/$defs/FactV1"},scores:{$ref:"#/$defs/FactSearchScoresV1"},why:{type:["string","null"]}},required:["fact","scores"],type:"object"},yc={additionalProperties:!1,properties:{fts_score_millionths:{format:"uint32",minimum:0,type:"integer"},holographic_score_millionths:{format:"uint32",minimum:0,type:"integer"},jaccard_score_millionths:{format:"uint32",minimum:0,type:"integer"},score_millionths:{format:"uint32",minimum:0,type:"integer"},trust_score_millionths:{format:"uint32",minimum:0,type:"integer"}},required:["score_millionths","fts_score_millionths","jaccard_score_millionths","holographic_score_millionths","trust_score_millionths"],type:"object"},yl={additionalProperties:!1,properties:{fact_id:{$ref:"#/$defs/FactId"},owner:{$ref:"#/$defs/FactCommitOwnerV1"},payload_access:{$ref:"#/$defs/FactPayloadAccessV1"},projected_as_of:{$ref:"#/$defs/UtcMicros"}},required:["owner","fact_id","payload_access","projected_as_of"],type:"object"},yp={additionalProperties:!1,properties:{access_count:{format:"uint64",minimum:0,type:"integer"},created_at:{$ref:"#/$defs/UtcMicros"},helpful_count:{format:"uint64",minimum:0,type:"integer"},last_feedback_at:{anyOf:[{$ref:"#/$defs/UtcMicros"},{type:"null"}]},last_recalled_at:{anyOf:[{$ref:"#/$defs/UtcMicros"},{type:"null"}]},last_retrieved_at:{anyOf:[{$ref:"#/$defs/UtcMicros"},{type:"null"}]},retrieval_count:{format:"uint64",minimum:0,type:"integer"},unhelpful_count:{format:"uint64",minimum:0,type:"integer"},updated_at:{$ref:"#/$defs/UtcMicros"}},required:["retrieval_count","access_count","helpful_count","unhelpful_count","created_at","updated_at"],type:"object"},yu={additionalProperties:!1,description:"Available fact projection. Unavailable payload states use\n[`FactProjectionV1::Unavailable`] and cannot fabricate payload fields.",properties:{active_assertion_id:{$ref:"#/$defs/FactAssertionId"},category:{$ref:"#/$defs/FactCategoryV1"},content:{type:"string"},entities:{items:{type:"string"},type:"array"},fact_id:{$ref:"#/$defs/FactId"},last_event_id:{$ref:"#/$defs/FactEventId"},metadata:{additionalProperties:!0,type:"object"},owner:{$ref:"#/$defs/FactCommitOwnerV1"},projected_as_of:{$ref:"#/$defs/UtcMicros"},source:{$ref:"#/$defs/FactIdentitySourceResultV1"},source_label:{type:["string","null"]},tags:{items:{type:"string"},type:"array"},telemetry:{$ref:"#/$defs/FactTelemetryV1"},trust_score_millionths:{format:"uint32",minimum:0,type:"integer"}},required:["owner","fact_id","content","category","tags","entities","trust_score_millionths","source","active_assertion_id","last_event_id","projected_as_of","telemetry","metadata"],type:"object"},ym={additionalProperties:!1,description:"Exact source-owned state for one advisory producer in a composed feedback\ncycle. The producer tag is part of the durable cycle result so consumers\nnever infer provenance from the position of an aggregate provider state.",properties:{producer:{$ref:"#/$defs/FeedbackDiagnosticProducerV1"},state:{$ref:"#/$defs/ProviderEvaluationStateV1"}},required:["producer","state"],type:"object"},yf={description:"Availability of the canonical baseline used to classify a current\ndiagnostic. An unavailable or partial baseline never upgrades a finding\nto `New`; only an authoritative `NoPriorBaseline` state may do so without\na baseline record.",oneOf:[{enum:["complete","partial","stale","unavailable"],type:"string"},{const:"no_prior_baseline",description:"The authoritative runtime confirmed that there is no prior saved\ngeneration to compare. This is authoritative empty history, not an\ninvented horizon and not unavailable/partial coverage.",type:"string"}]},yh={description:"Content identity distinguishes durable saved content from an authorized\nephemeral document overlay. Overlay identity is deliberately local to its\nowning session and cannot be made durable by converting it to a digest.",oneOf:[{properties:{file_digest:{$ref:"#/$defs/ManifestDigest"},generation_digest:{$ref:"#/$defs/ManifestDigest"},kind:{const:"saved_content",type:"string"}},required:["kind","generation_digest","file_digest"],type:"object"},{properties:{agent_id:{anyOf:[{$ref:"#/$defs/AgentInstanceId"},{type:"null"}]},document_version:{format:"uint64",minimum:0,type:"integer"},kind:{const:"ephemeral_overlay",type:"string"},overlay_digest:{$ref:"#/$defs/ManifestDigest"},owner_client_id:{$ref:"#/$defs/HostInstanceId"},session_id:{$ref:"#/$defs/SessionId"}},required:["kind","session_id","owner_client_id","document_version","overlay_digest"],type:"object"}]},yy={description:"Strongly typed canonical identity: `FeedbackCycleId`.",type:"string"},yg={enum:["clean","duplicate_noop","blocked","incomplete_coverage","stale_replan_required","budget_exceeded","cancelled","user_stop","daemon_unavailable"],type:"string"},y_={enum:["new","pre_existing","unknown"],type:"string"},yv={description:"Closed producer vocabulary for standard diagnostic projection.",enum:["code_diagnostic","git_hub_review","ci_localization","proximity"],type:"string"},yb={additionalProperties:!1,description:"Bounded code location used only to project an anchored advisory finding\ninto an editor. The finding's `retrieval_anchor_id` remains the evidence\nexpansion authority; this value carries no source body or provider payload.",properties:{code:{type:"string"},code_description_uri:{type:["string","null"]},file:{$ref:"#/$defs/FileOccurrenceId"},producer:{$ref:"#/$defs/FeedbackDiagnosticProducerV1"},safe_bounded_message:{type:"string"},severity:{$ref:"#/$defs/DiagnosticSeverityV1"},span:{$ref:"#/$defs/SourceSpan"},symbol:{anyOf:[{$ref:"#/$defs/SymbolOccurrenceId"},{type:"null"}]}},required:["file","span","code","severity","safe_bounded_message","producer"],type:"object"},y$={enum:["durable","session_only"],type:"string"},yS={description:"Strongly typed canonical identity: `FeedbackFindingId`.",type:"string"},yk={enum:["active","superseded","resolved","cleared"],type:"string"},yw={additionalProperties:!1,properties:{cycle_id:{$ref:"#/$defs/FeedbackCycleId"},expand_handle:{description:"Server-minted request handle for `feedback_expand`, present only when\nthe canonical finding has a retained retrieval anchor.",type:["string","null"]},finding:{$ref:"#/$defs/FeedbackFindingV1"},get_handle:{description:"Server-minted request handle for `feedback_get`; durable identity remains\n`finding.finding_id`.\n\nCursor identity types are deliberately absent from the generated schema\nsurface; the public wire form is the bounded opaque string.",type:"string"},result_id:{$ref:"#/$defs/FeedbackResultId"},scope:{$ref:"#/$defs/FeedbackScopeV1"}},required:["result_id","cycle_id","scope","finding","get_handle"],type:"object"},yV={additionalProperties:!1,description:"Reference-only post-edit feedback finding. The safe preview is bounded display framing,\nnever a source-text copy or a second diagnostic store.",properties:{classification:{$ref:"#/$defs/FeedbackDiagnosticClassificationV1"},diagnostic_projection:{anyOf:[{$ref:"#/$defs/FeedbackDiagnosticProjectionV1"},{type:"null"}]},finding_id:{$ref:"#/$defs/FeedbackFindingId"},lifecycle:{$ref:"#/$defs/FeedbackFindingLifecycleV1"},provider_state:{$ref:"#/$defs/ProviderEvaluationStateV1"},retrieval_anchor_id:{anyOf:[{$ref:"#/$defs/RetrievalAnchorId"},{type:"null"}]},safe_bounded_preview:{type:["string","null"]}},required:["finding_id","classification","lifecycle","provider_state"],type:"object"},yP={description:"Coverage state for graph impact and affected-test evidence. An empty impact\nset is clean only when its state is complete.",enum:["complete","partial","stale","unavailable"],type:"string"},yR={additionalProperties:!1,description:"Reference-only graph and test impact for one feedback target. The owning\ngraph/query layer supplies these identities; this contract does not create\nanother graph, test map, or evidence store.",properties:{affected_callers:{items:{$ref:"#/$defs/SymbolOccurrenceId"},type:"array"},affected_files:{items:{$ref:"#/$defs/FileOccurrenceId"},type:"array"},affected_tests:{items:{$ref:"#/$defs/SymbolOccurrenceId"},type:"array"},affected_tests_state:{$ref:"#/$defs/FeedbackImpactStateV1"},evidence_anchors:{items:{$ref:"#/$defs/RetrievalAnchorId"},type:"array"},state:{$ref:"#/$defs/FeedbackImpactStateV1"},target:{$ref:"#/$defs/FeedbackTargetV1"}},required:["target","affected_files","affected_callers","affected_tests","evidence_anchors","state","affected_tests_state"],type:"object"},yq={description:"Strongly typed canonical identity: `FeedbackResultId`.",type:"string"},yI={additionalProperties:!1,description:"Exact repository scope used for a feedback evaluation. A path, current\nworking directory, repository display name, or mutable branch label is not\na substitute for this identity.",properties:{branch_ref:{type:"string"},head_commit_id:{$ref:"#/$defs/CommitId"},project_id:{$ref:"#/$defs/ProjectId"},repository_id:{$ref:"#/$defs/RepositoryId"},worktree_id:{$ref:"#/$defs/WorktreeId"}},required:["project_id","repository_id","worktree_id","branch_ref","head_commit_id"],type:"object"},yx={additionalProperties:!1,description:"Exact changed-code address for one single-root feedback evaluation. The\naddress carries canonical file/range/symbol identities, never a path or\nmutable line number.",properties:{file:{$ref:"#/$defs/FileOccurrenceId"},generation_id:{anyOf:[{$ref:"#/$defs/CodeGenerationId"},{type:"null"}]},span:{anyOf:[{$ref:"#/$defs/SourceSpan"},{type:"null"}]},symbol:{anyOf:[{$ref:"#/$defs/SymbolOccurrenceId"},{type:"null"}]}},required:["file"],type:"object"},yj={description:"Strongly typed canonical identity: `FileOccurrenceId`.",type:"string"},yC={description:"How `tracedecay_files` lays out its listing.",oneOf:[{const:"flat",description:"One file per line.",type:"string"},{const:"grouped",description:"Grouped by directory.",type:"string"}]},yT={description:"Deterministic fixed-point score in millionths. No floating point crosses\nthis boundary.",format:"uint64",minimum:0,type:"integer"},yO={description:"Compatibility state of one source/projection pair.",enum:["current","stale","incompatible","missing","unknown"],type:"string"},yE={additionalProperties:!1,description:"A candidate after contribution grouping and fixed-point fusion.",properties:{anchor_id:{$ref:"#/$defs/RetrievalAnchorId"},contributions:{items:{$ref:"#/$defs/CandidateContribution"},type:"array"},decisions:{items:{$ref:"#/$defs/RankingDecision"},type:"array"},exact_class:{$ref:"#/$defs/ExactClass"},freshness:{items:{$ref:"#/$defs/SourceFreshness"},type:"array"},logical_evidence_id:{$ref:"#/$defs/LogicalEvidenceId"},occurrences:{items:{$ref:"#/$defs/OccurrenceProvenance"},type:"array"},source_role:{$ref:"#/$defs/RetrievalSourceRoleV1",default:"production_other",description:"Strongest source role across the fused occurrences. Absent historical\ncandidates deserialize as a non-definition hit."},utility_micros:{format:"uint64",minimum:0,type:"integer"}},required:["anchor_id","logical_evidence_id","occurrences","exact_class","utility_micros","contributions","freshness","decisions"],type:"object"},yA={description:"Metric whose distribution the Gini report measures.",enum:["complexity","lines","fan_in","fan_out","members"],type:"string"},yW={description:"Unit the Gini report aggregates its metric over.",enum:["file","symbol"],type:"string"},yM={description:"Expected blob identity, or explicit absent-file state.",oneOf:[{enum:["absent_file"],type:"string"},{additionalProperties:!1,properties:{present:{$ref:"#/$defs/GitOidV1"}},required:["present"],type:"object"}]},yN={additionalProperties:!1,description:"A symbol the exact base/head branch-generation comparison reports.",properties:{content_digest:{type:"string"},file:{type:"string"},id:{type:"string"},kind:{type:"string"},name:{type:"string"},qualified_name:{type:"string"}},required:["id","name","qualified_name","kind","file","content_digest"],type:"object"},yz={additionalProperties:!1,description:"A verified-graph symbol a git-context read reports.",properties:{file:{type:"string"},id:{type:"string"},kind:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},name:{type:"string"}},required:["id","name","kind","file","line"],type:"object"},yD={additionalProperties:!1,description:"Typed coverage of a read-only Git result: the sorted, de-duplicated set\nof degradations observed while capturing it.",properties:{degradations:{items:{$ref:"#/$defs/GitDegradationV1"},type:"array"}},required:["degradations"],type:"object"},yF={description:"Typed coverage/degradation reasons for a read-only Git result. A result\ncarrying any degradation is truthful but not complete; callers must not\ntreat it as a clean full view.",oneOf:[{enum:["detached_head","unborn_branch","sparse_checkout","split_index","unreadable_state","unsupported_object_format","in_progress_operation","shallow_boundary","truncated_output"],type:"string"},{const:"ignored_collision",description:"Ignored content shares a directory with live tracked/untracked\nentries, so the untracked/ignored view may be collapsed by Git.",type:"string"},{const:"conflicted_state",description:"Unmerged index stages are present.",type:"string"},{const:"submodule_state",description:"Submodule entries exist; the adapter does not recurse into them.",type:"string"}]},yL={description:"A native Git file mode as stored in tree/index records (six octal digits,\ne.g. `100644`, `100755`, `120000` symlink, `160000` gitlink/submodule).",type:"string"},yU={description:"Native HEAD state. Missing, unborn, and detached states are explicit,\nnever guessed.",oneOf:[{properties:{branch:{type:"string"},commit:{$ref:"#/$defs/GitOidV1"},state:{const:"attached",type:"string"}},required:["state","branch","commit"],type:"object"},{properties:{commit:{$ref:"#/$defs/GitOidV1"},state:{const:"detached",type:"string"}},required:["state","commit"],type:"object"},{properties:{branch:{type:"string"},state:{const:"unborn",type:"string"}},required:["state","branch"],type:"object"}]},yH={enum:["disabled","probe_private_preview"],type:"string"},yG={additionalProperties:!1,description:"Expected index entry state for compare-and-swap: blob identity (or\nabsent), mode, and unmerged-stage state. `unmerged_stage` is `None` for a\nmerged (stage-0) entry.",properties:{blob:{$ref:"#/$defs/GitBlobExpectationV1"},mode:{anyOf:[{$ref:"#/$defs/GitFileModeV1"},{type:"null"}]},unmerged_stage:{format:"uint8",maximum:255,minimum:0,type:["integer","null"]}},required:["blob"],type:"object"},yB={description:"Strongly typed canonical identity: `GitIndexPreviewId`.",type:"string"},yK={description:"The only native Git mutations represented by the index-transaction runtime. Generic Git execution,\nref rewrites, commits, merge/rebase/cherry-pick, push, and worktree writes are\ndeliberately absent.",enum:["stage_hunks","unstage_hunks"],type:"string"},yJ={description:"A native Git object id (commit, tree, or blob), lowercase hex, SHA-1 or\nSHA-256 length. This is identity evidence only; it never authorizes\nobject reconstruction or traversal outside native Git.",type:"string"},yZ={description:"In-progress native Git operation state, read from repository metadata.",enum:["none","merge","rebase","cherry_pick","revert","bisect","sequencer","unknown"],type:"string"},yQ={description:"Whether a bounded page holds every answer or stopped at its limit.",enum:["complete","partial"],type:"string"},yX={enum:["complete"],type:"string"},yY={enum:["partial"],type:"string"},y1={enum:["unavailable"],type:"string"},y0={enum:["result_limit"],type:"string"},y2={additionalProperties:!1,properties:{branch:{type:["string","null"]},commit:{type:["string","null"]},worktree:{type:["string","null"]}},type:"object"},y4={description:"Flat public selector for an admitted Git diff scope.\n\nThis intentionally differs from [`tracedecay_domain::GitDiffScopeV1`]: MCP\nand CLI accept `scope`, `base`, and `head` as sibling fields, then\ntransport parsing builds the canonical domain scope after checking their\nlegal combinations.",enum:["working_tree","staged","commit_range"],type:"string"},y6={enum:["git"],type:"string"},y3={additionalProperties:!1,properties:{kind:{$ref:"#/$defs/GitToolErrorKindV1"},message:{type:"string"},operation:{$ref:"#/$defs/GitToolOperationV1"}},required:["kind","operation","message"],type:"object"},y9={additionalProperties:!1,description:"Git itself refused the refs, worktree status, or history the tool reads.",properties:{error:{$ref:"#/$defs/GitToolErrorV1"}},required:["error"],type:"object"},y5={description:"The git step that refused the read.",enum:["diff","status","log"],type:"string"},y8={additionalProperties:!1,properties:{binding_digest:{$ref:"#/$defs/ManifestDigest"},consumed_at:{$ref:"#/$defs/UtcMicros"},input_digest:{$ref:"#/$defs/ManifestDigest"},receipt_digest:{$ref:"#/$defs/ManifestDigest"},request_id:{type:"string"},token_digest:{$ref:"#/$defs/ManifestDigest"}},required:["binding_digest","token_digest","request_id","input_digest","consumed_at","receipt_digest"],type:"object"},y7={enum:["forbid_force_and_rebase"],type:"string"},ge={description:"Strongly typed canonical identity: `HostInstanceId`.",type:"string"},gt={description:"`HunkRef` operation direction: working tree to index, or index to\nHEAD/base. No other direction is encodable.",enum:["working_tree_to_index","index_to_head"],type:"string"},gr={additionalProperties:!1,description:"Immutable hunk identity for compare-and-swap. A hunk is identified by exact repository,\ndirection, path, expected base/index/worktree identity, normalized hunk\nheader, context and patch digests, and the preview that issued the\nreference, never by display ordinal or line number alone.\n\nquery mints these as read-only identity evidence only. Applying them is a\ndaemon Git mutation path and is not representable here.",properties:{attributes_digest:{anyOf:[{$ref:"#/$defs/ManifestDigest"},{type:"null"}],description:"Attributes/filter identity relevant to clean/smudge and EOL handling."},context_digest:{$ref:"#/$defs/ManifestDigest"},direction:{$ref:"#/$defs/HunkDirectionV1"},expected_base_blob:{$ref:"#/$defs/GitBlobExpectationV1"},expected_index_entry:{$ref:"#/$defs/GitIndexEntryExpectationV1"},expected_worktree_blob:{anyOf:[{$ref:"#/$defs/GitBlobExpectationV1"},{type:"null"}],description:"Expected working-tree identity when the operation reads the worktree:\na native content digest or explicit absent-file state. `None` means\nthe operation direction does not read the worktree."},expected_worktree_mode:{anyOf:[{$ref:"#/$defs/GitFileModeV1"},{type:"null"}]},hunk_header:{description:"Normalized `@@ -o,l +n,m @@` header text.",type:"string"},original_path:{description:"Old path for a rename or copy.",type:["string","null"]},patch_digest:{$ref:"#/$defs/ManifestDigest"},path:{type:"string"},preview_id:{type:"string"},repository:{$ref:"#/$defs/RepositoryId"},schema_version:{type:"string"},selected_line_bitmap:{description:"Selected hunk-line bitmap (little-endian word order, line 1 = bit 0\nof word 0). Full-hunk identity covers the larger old/new side so\ndeletion-only hunks remain representable.",items:{format:"uint64",minimum:0,type:"integer"},type:"array"},snapshot_digest:{$ref:"#/$defs/ManifestDigest"},worktree:{$ref:"#/$defs/WorktreeId"}},required:["repository","worktree","direction","path","expected_base_blob","expected_index_entry","hunk_header","context_digest","patch_digest","selected_line_bitmap","preview_id","schema_version","snapshot_digest"],type:"object"},gi={enum:["available","retained_but_unavailable","redacted","deleted","retention_expired","unauthorized","locked","unverifiable"],type:"string"},go={additionalProperties:!1,description:"One yes/no question asked of the decision engine for one intent. The\nintent is a candidate when the engine's probability reaches\n`threshold_permille` and, when set, exceeds the runner-up by\n`margin_permille`.",properties:{instructions:{type:"string"},intent:{$ref:"#/$defs/ContextScoutIntentKindV1"},margin_permille:{format:"uint16",maximum:65535,minimum:0,type:["integer","null"]},threshold_permille:{format:"uint16",maximum:65535,minimum:0,type:"integer"}},required:["intent","instructions","threshold_permille"],type:"object"},gn={additionalProperties:!1,description:"Bounds on the recent-session window one intent pass reads.",properties:{freshen_budget_ms:{description:"Time the pass may wait for the transcript store to ingest the newest\nturn before it reads the window as it stands.",format:"uint32",minimum:0,type:"integer"},max_age_secs:{format:"uint32",minimum:0,type:"integer"},max_bytes:{format:"uint32",minimum:0,type:"integer"},max_messages:{format:"uint8",maximum:255,minimum:0,type:"integer"},max_user_turns:{format:"uint8",maximum:255,minimum:0,type:"integer"}},required:["max_user_turns","max_messages","max_bytes","max_age_secs","freshen_budget_ms"],type:"object"},ga={description:"p50/p95/p99 for one provider operation latency stage.",properties:{p50:{$ref:"#/$defs/MetricValueV1"},p95:{$ref:"#/$defs/MetricValueV1"},p99:{$ref:"#/$defs/MetricValueV1"}},required:["p50","p95","p99"],type:"object"},gs={oneOf:[{properties:{state:{const:"ready",type:"string"}},required:["state"],type:"object"},{properties:{state:{const:"denied",type:"string"}},required:["state"],type:"object"},{properties:{state:{const:"cancelled",type:"string"}},required:["state"],type:"object"},{properties:{state:{const:"timed_out",type:"string"}},required:["state"],type:"object"},{properties:{reason:{type:"string"},state:{const:"unavailable",type:"string"}},required:["state","reason"],type:"object"},{properties:{diagnostic:{type:"string"},state:{const:"failed",type:"string"}},required:["state","diagnostic"],type:"object"}]},gd={additionalProperties:!1,properties:{limit:{format:"uint64",minimum:0,type:"integer"},offset:{format:"uint64",minimum:0,type:"integer"},returned_chars:{format:"uint64",minimum:0,type:"integer"},total_chars:{format:"uint64",minimum:0,type:"integer"},truncated:{type:"boolean"}},required:["offset","limit","returned_chars","total_chars","truncated"],type:"object"},gc={description:"Whether historical discovery, projection publication, and summary\nconvergence have all settled for everything the store's sources hold.",oneOf:[{const:"converging",description:"A stage still owes committed work.",type:"string"},{const:"converged",description:"The worker committed the last owed item and has nothing pending.",type:"string"},{const:"blocked",description:"Every runnable stage settled, but historical discovery is blocked.",type:"string"},{const:"unavailable",description:"No worker is serving the store.",type:"string"}]},gl={additionalProperties:!1,properties:{converged_at_unix_micros:{description:"When the latest convergence event was published.",format:"int64",type:["integer","null"]},epoch:{description:"Convergence events this worker has published; a larger value is a\nnewer event.",format:"uint64",minimum:0,type:"integer"},reason:{description:"The historical discovery blocker when `state` is `blocked`.",type:["string","null"]},state:{$ref:"#/$defs/LcmConvergenceStateV1"}},required:["state","epoch"],type:"object"},gp={description:"Whether the refresh worker that serves this store's temporal projection\nis current, still converging history, or not serving at all.",enum:["current","stale","unavailable"],type:"string"},gu={additionalProperties:!1,description:"The temporal projection's serving state at diagnosis time. A store whose\nschema is healthy can still have nothing to serve while history is being\nre-derived (for example on a fresh profile); this is where\nthat state is named instead of being read as absent data.",properties:{convergence:{$ref:"#/$defs/LcmConvergenceV1"},reason:{description:"Machine reason for a non-current state: `historical_convergence`,\n`historical_retry:`, `historical_blocked:`, or the worker\nunavailability (`worker_missing`, `worker_recovering`, `worker_stalled`,\n`worker_stopped`).",type:["string","null"]},state:{$ref:"#/$defs/LcmDoctorProjectionStateV1"},worker:{$ref:"#/$defs/RetrievalWorkerStatusV1"}},required:["state","worker","convergence"],type:"object"},gm={additionalProperties:!1,properties:{content:{type:"string"},content_hash:{type:"string"},message_id:{type:"string"},metadata_json:{type:["string","null"]},ordinal:{format:"int64",type:"integer"},payload_ref:{type:["string","null"]},provider:{type:"string"},role:{type:"string"},session_id:{type:"string"},storage_kind:{$ref:"#/$defs/LcmStorageKindV1"},store_id:{format:"int64",type:"integer"},timestamp:{format:"int64",type:["integer","null"]}},required:["provider","message_id","session_id","store_id","role","ordinal","content","content_hash","storage_kind"],type:"object"},gf={oneOf:[{properties:{freshness:{$ref:"#/$defs/TemporalFreshnessV1"},outcome:{const:"complete",type:"string"}},required:["outcome","freshness"],type:"object"},{properties:{freshness:{$ref:"#/$defs/TemporalFreshnessV1"},omitted:{format:"uint64",minimum:0,type:"integer"},outcome:{const:"partial",type:"string"}},required:["outcome","freshness","omitted"],type:"object"},{properties:{freshness:{$ref:"#/$defs/TemporalFreshnessV1"},outcome:{const:"stale",type:"string"}},required:["outcome","freshness"],type:"object"}]},gh={oneOf:[{properties:{kind:{const:"raw_message",type:"string"},store_id:{format:"int64",type:"integer"}},required:["kind","store_id"],type:"object"},{properties:{kind:{const:"summary_node",type:"string"},node_id:{type:"string"}},required:["kind","node_id"],type:"object"}]},gy={enum:["inline","external","canonical_occurrence"],type:"string"},gg={description:"One provider's summarizer executable: absent by default, or the exact\nabsolute path the operator configured with its optional tuning.",oneOf:[{properties:{state:{const:"unconfigured",type:"string"}},required:["state"],type:"object"},{properties:{canonical_path:{type:"string"},model:{description:"Model requested for summary turns; the provider default when absent.",type:["string","null"]},state:{const:"configured",type:"string"},timeout_secs:{description:"Wall-clock budget for one summary run, within\n[`LCM_SUMMARIZER_TIMEOUT_SECS_RANGE`]; the caller's default when absent.",format:"uint64",minimum:0,type:["integer","null"]}},required:["state","canonical_path"],type:"object"}]},g_={additionalProperties:!1,description:"The per-provider summarizer executables one configuration snapshot admits.",properties:{codex:{$ref:"#/$defs/LcmSummarizerExecutableV1",default:{state:"unconfigured"},description:"`codex`, driven over app-server JSON-RPC for Codex sessions."},cursor_agent:{$ref:"#/$defs/LcmSummarizerExecutableV1",default:{state:"unconfigured"},description:"`cursor-agent`, asked for a summary of Cursor sessions."}},type:"object"},gv={additionalProperties:!1,properties:{conversation_id:{type:"string"},created_at:{format:"int64",type:"integer"},depth:{format:"int64",type:"integer"},expand_hint:{type:["string","null"]},metadata_json:{type:["string","null"]},node_id:{type:"string"},provider:{type:"string"},session_id:{type:"string"},source_refs:{items:{$ref:"#/$defs/LcmSourceRefV1"},type:"array"},source_time_end:{format:"int64",type:["integer","null"]},source_time_start:{format:"int64",type:["integer","null"]},source_token_count:{format:"int64",type:"integer"},summary_hash:{type:"string"},summary_text:{type:"string"},summary_token_count:{format:"int64",type:"integer"}},required:["node_id","provider","conversation_id","session_id","depth","summary_text","summary_hash","source_refs","summary_token_count","source_token_count","created_at"],type:"object"},gb={additionalProperties:!1,properties:{anchors:{items:{type:"string"},type:"array"},authorized_root:{type:["string","null"]},coverage:{$ref:"#/$defs/TemporalCoverageV1"},explanations:{items:{$ref:"#/$defs/TemporalExplanationV1"},type:"array"},next_cursor:{type:["string","null"]},omissions:{items:{$ref:"#/$defs/TemporalOmissionV1"},type:"array"},source_coverage:{items:{$ref:"#/$defs/SessionSourceCoverageV1"},type:"array"},watermarks:{$ref:"#/$defs/TemporalWatermarksV1"}},required:["anchors","watermarks","coverage","explanations"],type:"object"},g$={description:"Why a site the lexical lane admitted for a caller anchor is absent from\nthe response.",oneOf:[{const:"diversity_cap",description:"Collapsed as a duplicate or held back by the per-file diversity cap.",type:"string"},{const:"outside_page",description:"Ranked, but outside the returned page: an earlier page, or behind\n`next_cursor`.",type:"string"},{const:"not_hydrated",description:"On the page, but late hydration returned no source for it.",type:"string"},{const:"out_of_scope",description:"Outside the caller's scope prefix.",type:"string"}]},gS={additionalProperties:!1,description:"Anchor sites one serving stage removed from the response.",properties:{reason:{$ref:"#/$defs/LexicalAnchorDropReasonV1"},sites:{format:"uint64",minimum:0,type:"integer"}},required:["reason","sites"],type:"object"},gk={description:"Strongly typed algorithm-tagged integrity digest: `LocatorDigest`.",type:"string"},gw={description:"Strongly typed canonical identity: `LogicalCopyClusterId`.",type:"string"},gV={description:"Strongly typed canonical identity: `LogicalEvidenceId`.",type:"string"},gP={enum:["global","project"],type:"string"},gR={properties:{absorbed_into:{type:["string","null"]},activated_at:{format:"int64",type:["integer","null"]},archived_reason:{type:["string","null"]},category:{type:"string"},checksum:{type:"string"},created_at:{format:"int64",type:"integer"},id:{type:"string"},materialization_scope:{$ref:"#/$defs/ManagedSkillMaterializationScope"},pinned:{type:"boolean"},provenance:{$ref:"#/$defs/ManagedSkillProvenance"},routing_description:{type:"string"},state:{$ref:"#/$defs/ManagedSkillState"},summary:{type:"string"},targets:{default:["cursor","codex","claude","agents","opencode","kimi","kiro","hermes"],items:{$ref:"#/$defs/SkillInstallTarget"},type:"array"},title:{type:"string"},updated_at:{format:"int64",type:"integer"}},required:["id","title","summary","routing_description","category","state","pinned","checksum","created_at","updated_at","provenance"],type:"object"},gq={properties:{actor:{type:"string"},run_id:{type:["string","null"]},source:{$ref:"#/$defs/ManagedSkillSource"}},required:["source","actor"],type:"object"},gI={enum:["automation_run","user","import"],type:"string"},gx={enum:["active","disabled","archived"],type:"string"},gj={description:"Strongly typed algorithm-tagged integrity digest: `ManifestDigest`.",type:"string"},gC={description:"The only Git histories this product operation can create.",enum:["fast_forward","two_parent_merge","cherry_pick_exact_commits"],type:"string"},gT={enum:["project","user"],type:"string"},gO={enum:["all","parents_only","subagents_only"],type:"string"},gE={enum:["all","direct_user","tool_result"],type:"string"},gA={properties:{calibration_revision:{type:"string"},cohort_revision:{type:"string"},drift_valid:{type:"boolean"},estimator_revision:{type:"string"},support:{format:"uint64",minimum:0,type:"integer"}},required:["estimator_revision","calibration_revision","cohort_revision","support","drift_valid"],type:"object"},gW={properties:{descriptor_revision:{type:"string"},eligible_population:{type:"string"}},required:["descriptor_revision","eligible_population"],type:"object"},gM={properties:{censored:{format:"uint64",minimum:0,type:"integer"},completed:{format:"uint64",minimum:0,type:"integer"},eligible:{description:"Exact denominator cardinality. `None` means the denominator is unknown.",format:"uint64",minimum:0,type:["integer","null"]},excluded:{format:"uint64",minimum:0,type:"integer"},observed:{format:"uint64",minimum:0,type:"integer"},state:{$ref:"#/$defs/CoverageStateV1"},unknown:{format:"uint64",minimum:0,type:"integer"}},required:["observed","completed","censored","unknown","excluded","state"],type:"object"},gN={enum:["measurement","association","calibrated_prediction"],type:"string"},gz={properties:{projector_revision:{type:"string"},source:{$ref:"#/$defs/MetricSourceV1"},source_revision:{type:"string"},watermark:{type:"string"}},required:["source","source_revision","projector_revision","watermark"],type:"object"},gD={enum:["observability_envelope","feedback_observations","provider_usage_observation","savings_ledger"],type:"string"},gF={properties:{baseline_watermark:{type:["string","null"]},delta:{format:"double",type:["number","null"]},horizon:{$ref:"#/$defs/ObservabilityHorizonV1"}},required:["horizon"],type:"object"},gL={properties:{lower:{format:"double",type:["number","null"]},reason:{type:["string","null"]},upper:{format:"double",type:["number","null"]}},type:"object"},gU={properties:{calibration:{anyOf:[{$ref:"#/$defs/MetricCalibrationV1"},{type:"null"}]},cohort:{$ref:"#/$defs/MetricCohortV1"},coverage:{$ref:"#/$defs/MetricCoverageV1"},denominator:{type:"string"},denominator_value:{format:"uint64",minimum:0,type:["integer","null"]},descriptor_revision:{type:"string"},evidence_class:{$ref:"#/$defs/MetricEvidenceClassV1"},metric:{type:"string"},provenance:{$ref:"#/$defs/MetricProvenanceV1"},temporal:{$ref:"#/$defs/MetricTemporalV1"},unavailable_reason:{type:["string","null"]},uncertainty:{$ref:"#/$defs/MetricUncertaintyV1"},unit:{type:"string"},value:{description:"Aggregate value. It is absent whenever its denominator or coverage is\ninsufficient; observed lower bounds remain available in `coverage`.",format:"double",type:["number","null"]}},required:["descriptor_revision","metric","unit","denominator","coverage","evidence_class","provenance","cohort","temporal","uncertainty"],type:"object"},gH={additionalProperties:!1,description:"A file that historically changes with `partner_of` but is missing from the\nchange set under review, e.g. a migration beside its schema.",properties:{co_changes:{description:"Commits that changed both `partner_of` and `file`.",format:"uint64",minimum:0,type:"integer"},file:{type:"string"},partner_of:{type:"string"},partner_of_changes:{description:"Commits that changed `partner_of`.",format:"uint64",minimum:0,type:"integer"}},required:["file","partner_of","co_changes","partner_of_changes"],type:"object"},gG={additionalProperties:!1,description:"Frozen continuation identity shared by all participating roots.",properties:{digest:{$ref:"#/$defs/ManifestDigest"},next_page:{format:"uint64",minimum:1,type:"integer"},order_digest:{$ref:"#/$defs/ManifestDigest"},query_digest:{$ref:"#/$defs/ManifestDigest"},root_cursors:{items:{$ref:"#/$defs/RootScopeOutcomeV1_for_Nullable_string"},type:"array"},root_generations:{items:{$ref:"#/$defs/RootScopeOutcomeV1_for_Nullable_RootGenerationV1"},type:"array"},scope_set_digest:{$ref:"#/$defs/ManifestDigest"}},required:["scope_set_digest","root_generations","root_cursors","query_digest","order_digest","next_page","digest"],type:"object"},gB={description:"Strongly typed canonical identity: `NativeIntegrationApprovalId`.",type:"string"},gK={description:"Explicit direction of one integration. Stack meaning is never inferred.",enum:["propagate_dependency_to_dependent","land_dependent_into_dependency","integrate_independent_branch"],type:"string"},gJ={description:"Truthful preview classification. Only `MechanicalIntegrationEligible`\ncarries apply-eligible evidence.",oneOf:[{properties:{detail:{$ref:"#/$defs/MechanicalIntegrationModeV1"},state:{const:"mechanical_integration_eligible",type:"string"}},required:["state","detail"],type:"object"},{properties:{state:{const:"already_integrated",type:"string"}},required:["state"],type:"object"},{properties:{detail:{properties:{conflict_digest:{$ref:"#/$defs/ManifestDigest"}},required:["conflict_digest"],type:"object"},state:{const:"native_conflict",type:"string"}},required:["state","detail"],type:"object"},{properties:{detail:{properties:{evidence_digest:{$ref:"#/$defs/ManifestDigest"}},required:["evidence_digest"],type:"object"},state:{const:"semantic_review_required",type:"string"}},required:["state","detail"],type:"object"},{properties:{detail:{properties:{reason:{$ref:"#/$defs/NativeIntegrationUnavailabilityV1"}},required:["reason"],type:"object"},state:{const:"partial",type:"string"}},required:["state","detail"],type:"object"},{properties:{detail:{properties:{reason:{$ref:"#/$defs/NativeIntegrationUnavailabilityV1"}},required:["reason"],type:"object"},state:{const:"unavailable",type:"string"}},required:["state","detail"],type:"object"}]},gZ={description:"Strongly typed canonical identity: `NativeIntegrationPreviewId`.",type:"string"},gQ={additionalProperties:!1,description:"Canonical stack-snapshot proof returned by `stack_snapshot` and consumed\nverbatim by preflight.",properties:{authorized_scope_set_digest:{$ref:"#/$defs/ManifestDigest"},authorized_scope_set_id:{$ref:"#/$defs/ScopeSetId"},authorized_scope_set_revision:{$ref:"#/$defs/ScopeSetRevision"},destination:{$ref:"#/$defs/ResolvedScope"},grant_digest:{$ref:"#/$defs/ManifestDigest"},inventory_epoch:{$ref:"#/$defs/WorktreeInventoryEpoch"},inventory_snapshot_id:{$ref:"#/$defs/WorktreeInventorySnapshotId"},policy_digest:{$ref:"#/$defs/ManifestDigest"},selection:{$ref:"#/$defs/NativeIntegrationSelectionBindingV1"},source:{$ref:"#/$defs/ResolvedScope"}},required:["source","destination","authorized_scope_set_id","authorized_scope_set_revision","authorized_scope_set_digest","inventory_snapshot_id","inventory_epoch","selection","grant_digest","policy_digest"],type:"object"},gX={description:"Canonically sealed selection passed to the topology authority.\n\n`stack_snapshot` requests carry declaration content; its boundary seals\nthat declaration into this proof, and preflight accepts the proof verbatim.\nThe topology authority never discovers roots or edges.",oneOf:[{properties:{binding:{properties:{declared_revision:{$ref:"#/$defs/BranchStackRevisionV1"},destination_node_id:{$ref:"#/$defs/StackNodeId"},direction:{$ref:"#/$defs/NativeIntegrationDirectionV1"},revision_digest:{$ref:"#/$defs/ManifestDigest"},revision_id:{$ref:"#/$defs/BranchStackRevisionId"},source_node_id:{$ref:"#/$defs/StackNodeId"},stack_id:{$ref:"#/$defs/BranchStackId"}},required:["stack_id","revision_id","revision_digest","declared_revision","source_node_id","destination_node_id","direction"],type:"object"},kind:{const:"declared_stack_edge",type:"string"}},required:["kind","binding"],type:"object"},{properties:{binding:{properties:{destination_ref:{$ref:"#/$defs/RefId"},proposal_digest:{$ref:"#/$defs/ManifestDigest"},source_ref:{$ref:"#/$defs/RefId"}},required:["proposal_digest","source_ref","destination_ref"],type:"object"},kind:{const:"independent_branch",type:"string"}},required:["kind","binding"],type:"object"}]},gY={description:"The only truthful terminal outcomes after recovery.",enum:["committed","aborted_no_change","rolled_back","needs_inspection"],type:"string"},g1={description:"Strongly typed canonical identity: `NativeIntegrationTransactionId`.",type:"string"},g0={description:"Why a preflight cannot authorize apply.",enum:["partial_evidence","stale_scope","denied","native_state_unavailable","reset_required","durability_uncertain","unsupported_hooks","signing_required","destination_occupied"],type:"string"},g2={description:"A target selected by exact registered identity. Repository inventory names\none repository; cleanup names one worktree within that repository.",oneOf:[{properties:{kind:{const:"repository",type:"string"},project_id:{$ref:"#/$defs/ProjectId"},repository_id:{$ref:"#/$defs/RepositoryId"}},required:["kind","project_id","repository_id"],type:"object"},{properties:{kind:{const:"worktree",type:"string"},project_id:{$ref:"#/$defs/ProjectId"},repository_id:{$ref:"#/$defs/RepositoryId"},worktree_id:{$ref:"#/$defs/WorktreeId"}},required:["kind","project_id","repository_id","worktree_id"],type:"object"}]},g4={additionalProperties:!1,properties:{body:{format:"uint64",minimum:0,type:"integer"},full_file:{format:"uint64",minimum:0,type:"integer"}},required:["body","full_file"],type:"object"},g6={properties:{since_micros:{format:"int64",type:"integer"},until_micros:{format:"int64",type:"integer"}},required:["since_micros","until_micros"],type:"object"},g3={additionalProperties:!1,description:"Stable logical identity of one provider observation source.\n\nThe session identity is provider-native evidence. The physical file identity\nis represented separately by [`ObservationSourceGenerationV1`].",properties:{provider:{$ref:"#/$defs/ProviderId"},session_id:{$ref:"#/$defs/SessionId"},source_key:{anyOf:[{$ref:"#/$defs/SessionId"},{type:"null"}]}},required:["provider","session_id"],type:"object"},g9={properties:{analytics_mode:{$ref:"#/$defs/AnalyticsModeReadModelV1"},authorized_scope_ref:{type:"string"},comparison:{$ref:"#/$defs/PerformanceComparisonReadModelV1"},current:{type:"boolean"},horizon:{$ref:"#/$defs/ObservabilityHorizonV1"},metrics:{items:{$ref:"#/$defs/MetricValueV1"},type:"array"},observed_at_micros:{format:"int64",type:"integer"},rejected_arguments:{$ref:"#/$defs/RejectedArgumentAnalyticsV1"},watermark:{type:"string"}},required:["authorized_scope_ref","horizon","watermark","observed_at_micros","current","metrics","analytics_mode","comparison","rejected_arguments"],type:"object"},g5={additionalProperties:!1,description:"Structured occurrence provenance retained through fusion. Fusion\npreserves each exact `(source_occurrence_id, retriever_evidence_anchor)`\npair; parallel unassociated provenance vectors are forbidden.",properties:{evidence_role:{$ref:"#/$defs/EvidenceRole"},file_occurrence_id:{anyOf:[{$ref:"#/$defs/FileOccurrenceId"},{type:"null"}]},freshness:{$ref:"#/$defs/SourceFreshness"},logical_copy_cluster_id:{anyOf:[{$ref:"#/$defs/LogicalCopyClusterId"},{type:"null"}]},logical_copy_evidence_anchor:{anyOf:[{$ref:"#/$defs/RetrievalAnchorId"},{type:"null"}]},repository_id:{anyOf:[{$ref:"#/$defs/RepositoryId"},{type:"null"}]},retriever_evidence_anchor:{$ref:"#/$defs/RetrievalAnchorId"},session_or_thread_id:{anyOf:[{$ref:"#/$defs/SessionOrThreadId"},{type:"null"}]},source_namespace:{$ref:"#/$defs/SourceNamespace"},source_occurrence_id:{$ref:"#/$defs/SourceOccurrenceId"}},required:["source_occurrence_id","retriever_evidence_anchor","source_namespace","evidence_role","freshness"],type:"object"},g8={additionalProperties:!1,description:"Bounded work accounting supplied by an owning port or transaction.",properties:{bytes_consumed:{format:"uint64",minimum:0,type:"integer"},elapsed_micros:{format:"uint64",minimum:0,type:"integer"},units_consumed:{format:"uint64",minimum:0,type:"integer"}},required:["units_consumed","bytes_consumed","elapsed_micros"],type:"object"},g7={additionalProperties:!1,description:"Canonical operation evidence. An admitted failure remains represented here\nrather than being replaced by a transport exception.",properties:{budget:{$ref:"#/$defs/OperationBudgetUsage"},cancellation:{anyOf:[{$ref:"#/$defs/CancellationObservation"},{type:"null"}]},effective_deadline:{$ref:"#/$defs/Deadline"},ended_at:{$ref:"#/$defs/UtcMicros"},started_at:{$ref:"#/$defs/UtcMicros"},termination:{$ref:"#/$defs/OperationTermination"}},required:["started_at","ended_at","effective_deadline","budget","termination"],type:"object"},_e={description:"Terminal state after an operation has been admitted.",enum:["completed","cancelled","timed_out","failed","unavailable","partial","effect_unknown"],type:"string"},_t={additionalProperties:!1,description:"Bounded opaque page request. Resume authorization occurs before an adapter\ndecodes or hydrates the cursor.",properties:{cursor:{description:"Opaque resume token. The identifier type is deliberately absent from the\ngenerated schema surface, so the public wire form is its bounded string.",type:["string","null"]},page_size:{format:"uint32",minimum:0,type:"integer"}},required:["page_size"],type:"object"},_r={properties:{baseline_build:{type:["string","null"]},candidate_build:{type:["string","null"]},configuration:{type:["string","null"]},corpus:{type:["string","null"]},coverage:{$ref:"#/$defs/MetricCoverageV1"},disposition:{$ref:"#/$defs/ComparisonDispositionV1"},eligible_outcomes:{format:"uint64",minimum:0,type:["integer","null"]},environment:{type:["string","null"]},oracle:{type:["string","null"]},paired_outcomes:{format:"uint64",minimum:0,type:["integer","null"]},platform:{type:["string","null"]},regression_observed:{type:["boolean","null"]},rollback_profile:{type:["string","null"]},unavailable_reason:{type:["string","null"]},workload:{type:["string","null"]}},required:["disposition","coverage"],type:"object"},_i={description:"Whether the served code generation is known current at serve time.",enum:["fresh","possibly_stale"],type:"string"},_o={additionalProperties:!1,description:"The indexing state behind a `possibly_stale` verdict: the served\ngeneration, the scheduler's latest sealed generation, its staleness-ladder\nstate, and the lanes that answered from an older generation. `summary` is\nthe one-line rendering agents read.",properties:{latest_generation:{type:["string","null"]},parked:{anyOf:[{$ref:"#/$defs/CodeIndexConvergenceParkedV1"},{type:"null"}],description:"The park holding convergence until the operator applies its remedy.\nNo wake retries it, so repeating the request cannot change the answer."},reason:{type:["string","null"]},rebuild_in_flight:{type:["boolean","null"]},served_generation:{type:["string","null"]},stale_lanes:{items:{type:"string"},type:"array"},staleness_state:{anyOf:[{$ref:"#/$defs/CodeIndexStalenessStateV1"},{type:"null"}]},summary:{type:"string"}},required:["summary"],type:"object"},_n={enum:["complete"],type:"string"},_a={additionalProperties:!1,properties:{freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},message:{type:"string"},node_id:{type:"string"},reason_code:{type:"string"},status:{type:"string"},suggestions:{description:"Nearest served symbols by edit distance to the requested id, by id,\nsimple name, or qualified name.",items:{$ref:"#/$defs/PrimitiveSymbolLocationV1"},type:"array"}},required:["status","reason_code","node_id","message"],type:"object"},_s={enum:["full","partial"],type:"string"},_d={additionalProperties:!1,description:"Freshness verdict carried by every search and context response. `indexing`\nis present exactly when the state is `possibly_stale`.",properties:{indexing:{anyOf:[{$ref:"#/$defs/PrimitiveIndexingStateV1"},{type:"null"}]},state:{$ref:"#/$defs/PrimitiveFreshnessStateV1"}},required:["state"],type:"object"},_c={additionalProperties:!1,properties:{language:{type:["string","null"]},provider:{type:["string","null"]},reason:{type:"string"}},required:["reason"],type:"object"},_l={additionalProperties:!1,properties:{end_line:{format:"uint32",minimum:0,type:"integer"},file:{type:"string"},kind:{type:"string"},name:{type:"string"},node_id:{type:"string"},qualified_name:{type:"string"},start_line:{format:"uint32",minimum:0,type:"integer"},unavailable_fields:{items:{type:"string"},type:"array"}},required:["node_id","name","qualified_name","kind","file","start_line","end_line","unavailable_fields"],type:"object"},_p={additionalProperties:!1,properties:{detail:{type:"string"},reason_code:{type:"string"},retryable:{type:"boolean"},status:{$ref:"#/$defs/PrimitiveUnavailableStatusV1"}},required:["status","reason_code","retryable","detail"],type:"object"},_u={enum:["unavailable"],type:"string"},_m={description:"Strongly typed canonical identity: `ProjectId`.",type:"string"},_f={properties:{alias_count:{format:"uint",minimum:0,type:"integer"},artifact_count:{format:"uint",minimum:0,type:"integer"},branches:{items:{type:"string"},type:"array"},canonical_root:{type:"string"},default_branch:{description:"Repository default branch recorded at registration.",type:["string","null"]},head_branch:{description:"Branch the checkout's HEAD names now; `None` when HEAD is detached or\nno checkout of this project could be read.",type:["string","null"]},is_active:{type:["boolean","null"]},kind:{type:"string"},label:{type:"string"},last_seen_at:{format:"int64",type:"integer"},project_id:{type:"string"},project_root:{type:"string"},store_count:{format:"uint",minimum:0,type:"integer"}},required:["project_id","label","project_root","canonical_root","kind","branches","store_count","artifact_count","alias_count","last_seen_at"],type:"object"},_h={properties:{project_count:{format:"uint",minimum:0,type:"integer"},repo_count:{format:"uint",minimum:0,type:"integer"},truncated:{type:"boolean"}},required:["project_count","repo_count","truncated"],type:"object"},_y={properties:{branches:{items:{type:"string"},type:"array"},git_common_dir:{type:["string","null"]},label:{type:"string"},project_count:{format:"uint",minimum:0,type:"integer"},projects:{items:{$ref:"#/$defs/ProjectRegistryEntry"},type:"array"}},required:["label","project_count","branches","projects"],type:"object"},_g={description:"Strongly typed canonical identity: `ProjectionGenerationId`.",type:"string"},__={description:"Strongly typed canonical identity: `ProposalId`.",type:"string"},_v={enum:["reject","require_human_approval_and_independent_review"],type:"string"},_b={additionalProperties:!1,properties:{disposition:{$ref:"#/$defs/ProtectedRefDispositionV1"},selector:{$ref:"#/$defs/ProtectedRefSelectorV1"}},required:["selector","disposition"],type:"object"},_$={oneOf:[{properties:{kind:{const:"native_default_branch",type:"string"}},required:["kind"],type:"object"},{properties:{kind:{const:"exact",type:"string"},value:{$ref:"#/$defs/CanonicalGitRefNameV1"}},required:["kind","value"],type:"object"},{properties:{kind:{const:"prefix",type:"string"},value:{$ref:"#/$defs/CanonicalGitRefPrefix"}},required:["kind","value"],type:"object"}]},_S={description:"Strongly typed canonical identity: `ProvenanceId`.",type:"string"},_k={description:"Complete provider states remain distinct. Empty findings are clean only\nwhen every requested provider completed with complete supported coverage.",enum:["supported_completed_complete","unsupported","absent","indexing","stale","cancelled","timed_out","failed","partial","unavailable"],type:"string"},_w={description:"Strongly typed canonical identity: `ProviderId`.",type:"string"},_V={description:"One provider/model cohort in the Costs latency read model.\n\nThe percentile cells are ordinary canonical metrics so every value carries\nits exact unit, horizon, denominator, coverage/censoring, and projector\nprovenance. Identity provenance is kept separately because latency is\nmeasured by `OperationResourceObservedV1`, while provider/model identity\nmay be joined from an exact `ProviderUsageObservationV1` request/session.",properties:{first_progress:{$ref:"#/$defs/LatencyDistributionReadModelV1"},identity_provenance:{$ref:"#/$defs/MetricProvenanceV1"},identity_unavailable_reason:{type:["string","null"]},model:{type:["string","null"]},provider:{type:["string","null"]},queue:{$ref:"#/$defs/LatencyDistributionReadModelV1"},service:{$ref:"#/$defs/LatencyDistributionReadModelV1"},start:{$ref:"#/$defs/LatencyDistributionReadModelV1"},terminal:{$ref:"#/$defs/LatencyDistributionReadModelV1"}},required:["identity_provenance","queue","start","first_progress","service","terminal"],type:"object"},_P={properties:{canonical_root:{type:"string"},created_at:{format:"int64",type:"integer"},default_branch:{description:"Repository default branch recorded at registration.",type:["string","null"]},display_root:{type:"string"},git_common_dir:{type:["string","null"]},head_branch:{description:"Branch the checkout's HEAD names now; `None` when HEAD is detached or\nno checkout of this project could be read.",type:["string","null"]},is_active:{type:["boolean","null"]},label:{type:"string"},last_seen_at:{format:"int64",type:"integer"},project_id:{type:"string"},project_root:{type:"string"}},required:["project_id","label","project_root","display_root","canonical_root","created_at","last_seen_at"],type:"object"},_R={enum:["owner_receipt","locally_measured","estimated","unknown"],type:"string"},_q={description:"Strongly typed canonical identity: `QueryCollectionId`.",type:"string"},_I={description:"Which endpoint of each counted edge the rank report ranks.",enum:["incoming","outgoing"],type:"string"},_x={description:"Relationship the rank report counts.",enum:["implements","extends","calls","uses","contains","annotates","type_of","returns","receives"],type:"string"},_j={additionalProperties:!1,description:"One recorded ranking decision. Explanations are rendered from this\nprovenance, never reconstructed from a final scalar score.",properties:{detail:{type:"string"},evidence_anchor:{anyOf:[{$ref:"#/$defs/RetrievalAnchorId"},{type:"null"}]},kind:{$ref:"#/$defs/RankingDecisionKind"},policy_anchor:{anyOf:[{$ref:"#/$defs/RetrievalAnchorId"},{type:"null"}]},retriever:{anyOf:[{$ref:"#/$defs/RetrieverKind"},{type:"null"}]}},required:["kind","detail"],type:"object"},_C={description:"The decision kinds the pipeline must record.",enum:["exact_tier_admission","same_source_duplicate_collapse","logical_copy_representative_selection","contradiction_preservation","diversity_cap","comparator_provenance","fallback"],type:"string"},_T={description:"Strongly typed canonical identity: `RefId`.",type:"string"},_O={additionalProperties:!1,description:"Exact registered root locator retained with an authorized scope.\n\n`canonical_root` is routing evidence for the already-resolved\n[`ResolvedScope`]. It cannot replace or manufacture that scope identity.",properties:{canonical_root:{type:"string"},profile:{$ref:"#/$defs/SharedProfileStoreLocatorV1"},project_id:{$ref:"#/$defs/ProjectId"}},required:["project_id","profile","canonical_root"],type:"object"},_E={description:"Frequency and rate projection for dispatcher rejected-argument observations.\n\nCounts may be known while `rejection_rate` stays absent: Plan 26 forbids\nfabricating a rate when the eligible-attempt denominator is unknown.",properties:{coverage:{$ref:"#/$defs/MetricCoverageV1"},eligible_attempts:{format:"uint64",minimum:0,type:["integer","null"]},groups:{items:{$ref:"#/$defs/RejectedArgumentGroupV1"},type:"array"},projector_revision:{type:"string"},redacted_name_count:{format:"uint64",minimum:0,type:"integer"},rejected_total:{format:"uint64",minimum:0,type:["integer","null"]},rejection_rate:{format:"double",type:["number","null"]},unavailable_reason:{type:["string","null"]},watermark:{type:"string"}},required:["coverage","projector_revision","watermark","redacted_name_count","groups"],type:"object"},_A={description:"Closed error class for a rejected surface argument.",enum:["missing","invalid_shape","out_of_bounds","unsupported","unauthorized","stale","unknown"],type:"string"},_W={description:"One surface \xd7 operation \xd7 argument \xd7 error-class cell in the rejected-argument view.",properties:{argument:{$ref:"#/$defs/RejectedArgumentNameV1"},count:{format:"uint64",minimum:0,type:"integer"},error_class:{$ref:"#/$defs/RejectedArgumentErrorClassV1"},operation:{type:"string"},rate:{description:"Eligible-attempt rate for this cell. Absent when the attempt\ndenominator or coverage is insufficient.",format:"double",type:["number","null"]},surface:{$ref:"#/$defs/RejectedArgumentSurfaceV1"}},required:["surface","operation","argument","error_class","count"],type:"object"},_M={description:"Normalized rejected-argument name. Raw flags, values, and tokens never\nenter this vocabulary.",enum:["request_body","pagination","request_handle","operation","lifecycle","unknown"],type:"string"},_N={description:"Transport that rejected a surface argument. Unknown preserves missing\nattribution instead of inventing cli/mcp/http.",enum:["cli","mcp","http","unknown"],type:"string"},_z={description:"Strongly typed canonical identity: `RepositoryId`.",type:"string"},_D={oneOf:[{properties:{kind:{const:"all_authorized",type:"string"}},required:["kind"],type:"object"},{properties:{kind:{const:"allowlist",type:"string"},repositories:{items:{$ref:"#/$defs/RepositoryId"},type:"array",uniqueItems:!0}},required:["kind","repositories"],type:"object"}]},_F={enum:["successful_terminal"],type:"string"},_L={additionalProperties:!1,properties:{capability_id:{$ref:"#/$defs/CapabilityId"},expectation:{$ref:"#/$defs/RequiredCheckExpectationV1"},maximum_age_seconds:{format:"uint32",minimum:1,type:"integer"}},required:["capability_id","expectation","maximum_age_seconds"],type:"object"},_U={additionalProperties:!1,description:"The resolved configuration scope is one exact project/repository/worktree root.\n\nPaths, CWDs, labels, and mutable branch spellings are deliberately absent.",properties:{project_id:{$ref:"#/$defs/ProjectId"},reference:{anyOf:[{$ref:"#/$defs/RefId"},{type:"null"}]},repository_id:{$ref:"#/$defs/RepositoryId"},scope_digest:{$ref:"#/$defs/ManifestDigest"},worktree_id:{$ref:"#/$defs/WorktreeId"}},required:["project_id","repository_id","worktree_id","scope_digest"],type:"object"},_H={description:"Bounded output projection chosen by a concrete use case.",enum:["summary","evidence","references_only"],type:"string"},_G={additionalProperties:!1,properties:{code:{type:"string"},kind:{type:["string","null"]},maximum:{format:"uint",minimum:0,type:["integer","null"]},message:{type:"string"},observed:{format:"uint",minimum:0,type:["integer","null"]},reason:{type:["string","null"]},retryable:{type:["boolean","null"]}},required:["code","message"],type:"object"},_B={enum:["aborted","budget_exhausted","busy","cancelled","complete","complete_zero","cursor_manifest_limit_exceeded","deadline_exceeded","deleted","denied","error","failed","joined","locked","not_found","ok","partial","recorded","redacted","running","stale","started","unavailable","unsupported_filter","wrong_scope"],type:"string"},_K={anyOf:[{format:"uint64",minimum:0,type:"integer"},{type:"string"}],description:"The temporal filter intentionally retains the established integer-or-text\nwire form (Unix timestamps, RFC3339, and relative expressions)."},_J={description:"Strongly typed canonical identity: `RetrievalAnchorId`.",type:"string"},_Z={description:"Stable semantic ordering; adapters may not replace it with transport order.",enum:["relevance","source_position","temporal_descending","stable_identity"],type:"string"},_Q={additionalProperties:!1,properties:{order:{$ref:"#/$defs/RetrievalOrder"},page:{$ref:"#/$defs/PageRequest"},projection:{$ref:"#/$defs/ResultProjection"},temporal:{$ref:"#/$defs/TemporalModeV1"}},required:["temporal","page","projection","order"],type:"object"},_X={description:"Source-role evidence used at lane admission and fusion.\n\nA production definition outranks a test-file hit for the same symbol even\nwhen the test has a higher measured score. Non-definition production hits\ncompete with test hits on measured scores so comments and references do\nnot crowd out relevant tests.",oneOf:[{const:"production_definition",description:"Non-test path whose name or signature matched the query.",type:"string"},{const:"production_other",description:"Non-test path that is not a name or signature definition match.",type:"string"},{const:"test_reference",description:"Hit under a test path.",type:"string"}]},_Y={additionalProperties:!1,properties:{backlog:{format:"uint",minimum:0,type:"integer"},blocker:{type:["string","null"]},last_progress_at_unix_micros:{format:"int64",type:["integer","null"]},retry_class:{type:["string","null"]}},required:["backlog"],type:"object"},_1={description:"Runtime-backed retrieval lanes. Each lane is independently testable,\ndisableable, budgeted, and attributable; one lane is never an alias over\nanother.",enum:["exact_literal","lexical","graph","temporal","task_session","diagnostic"],type:"string"},_0={oneOf:[{properties:{kind:{const:"none",type:"string"}},required:["kind"],type:"object"},{properties:{count:{format:"uint16",maximum:65535,minimum:1,type:"integer"},kind:{const:"independent_review_count",type:"string"}},required:["kind","count"],type:"object"},{properties:{kind:{const:"code_owner_and_independent_review",type:"string"}},required:["kind"],type:"object"}]},_2={enum:["no_review","independent_review","standard_pull_requests","git_hub_stacked_pull_requests"],type:"string"},_4={additionalProperties:!1,properties:{allowed:{items:{$ref:"#/$defs/ReviewTopologyKindV1"},type:"array",uniqueItems:!0},github_stacked_prs:{$ref:"#/$defs/GitHubStackedPullRequestPolicyV1"}},required:["allowed","github_stacked_prs"],type:"object"},_6={additionalProperties:!1,description:"Immutable collection and stack revisions for one exact resolved root.",properties:{collection_revision:{$ref:"#/$defs/ManifestDigest"},generation_digest:{$ref:"#/$defs/ManifestDigest"},scope_digest:{$ref:"#/$defs/ManifestDigest"},stack_revision:{$ref:"#/$defs/ManifestDigest"}},required:["scope_digest","collection_revision","stack_revision","generation_digest"],type:"object"},_3={additionalProperties:!1,description:"One typed outcome pinned to the digest of an exact resolved root.",properties:{outcome:{$ref:"#/$defs/ScopeOutcome_for_Nullable_RootGenerationV1"},scope_digest:{$ref:"#/$defs/ManifestDigest"}},required:["scope_digest","outcome"],type:"object"},_9={additionalProperties:!1,description:"One typed outcome pinned to the digest of an exact resolved root.",properties:{outcome:{$ref:"#/$defs/ScopeOutcome_for_Nullable_string"},scope_digest:{$ref:"#/$defs/ManifestDigest"}},required:["scope_digest","outcome"],type:"object"},_5={enum:["allow","deny"],type:"string"},_8={description:"Strongly typed canonical identity: `RunId`.",type:"string"},_7={additionalProperties:!1,properties:{degraded_row:{type:["string","null"]},progress:{anyOf:[{$ref:"#/$defs/SchemaConvergenceProgressV1"},{type:"null"}]},stage:{$ref:"#/$defs/SchemaConvergenceStageV1"},started_at_micros:{format:"int64",type:"integer"},state:{$ref:"#/$defs/SchemaConvergenceStateV1"},store:{type:"string"}},required:["store","stage","state","started_at_micros"],type:"object"},ve={oneOf:[{additionalProperties:!1,properties:{done:{format:"uint64",minimum:0,type:"integer"},remaining:{format:"uint64",minimum:0,type:"integer"},unit:{const:"rows",type:"string"}},required:["unit","done","remaining"],type:"object"},{additionalProperties:!1,properties:{done:{format:"uint64",minimum:0,type:"integer"},remaining:{format:"uint64",minimum:0,type:"integer"},unit:{const:"pages",type:"string"}},required:["unit","done","remaining"],type:"object"}]},vt={enum:["registered_schema"],type:"string"},vr={enum:["pending_schema_migration","released_shape_convergence_in_progress","degraded","completed"],type:"string"},vi={additionalProperties:!1,description:"Restrictive policy input. An allow never grants capabilities absent from\nthe independently authorized capability set passed to the resolver.",properties:{authority:{$ref:"#/$defs/AuthorityRef"},capabilities:{items:{$ref:"#/$defs/CapabilityId"},type:"array",uniqueItems:!0},effect:{$ref:"#/$defs/RuleEffect"},expires_at:{anyOf:[{$ref:"#/$defs/UtcMicros"},{type:"null"}]},rule_id:{$ref:"#/$defs/AccessRuleId"},subject:{$ref:"#/$defs/ScopeAccessSubjectV1"}},required:["rule_id","subject","authority","capabilities","effect"],type:"object"},vo={additionalProperties:!1,description:"Typed rule selectors. Unset dimensions match all values at that dimension,\nbut at least one dimension must be constrained. Free-form paths, labels,\ncollection names, and branch names are deliberately absent.",properties:{actor:{anyOf:[{$ref:"#/$defs/ActorId"},{type:"null"}]},operation:{anyOf:[{$ref:"#/$defs/ScopeControlOperationV1"},{type:"null"}]},source_kind:{anyOf:[{$ref:"#/$defs/SourceKindV1"},{type:"null"}]}},type:"object"},vn={enum:["read","source_bind","source_rebind","source_unbind","access_rule_upsert","access_rule_remove","replace_topology_policy","rollback"],type:"string"},va={description:"Truthful outcome for one authorized root or an aggregate over roots.\n\n`Denied` and `Unavailable` carry no value and therefore cannot be confused\nwith a successful empty result.",oneOf:[{properties:{outcome:{const:"exact",type:"string"},value:{anyOf:[{$ref:"#/$defs/RootGenerationV1"},{type:"null"}]}},required:["outcome","value"],type:"object"},{properties:{outcome:{const:"partial",type:"string"},value:{properties:{reason:{$ref:"#/$defs/ScopePartialReasonV1"},value:{anyOf:[{$ref:"#/$defs/RootGenerationV1"},{type:"null"}]}},required:["reason"],type:"object"}},required:["outcome","value"],type:"object"},{properties:{outcome:{const:"denied",type:"string"}},required:["outcome"],type:"object"},{properties:{outcome:{const:"unavailable",type:"string"},value:{properties:{reason:{$ref:"#/$defs/ScopeUnavailableReasonV1"}},required:["reason"],type:"object"}},required:["outcome","value"],type:"object"}]},vs={description:"Truthful outcome for one authorized root or an aggregate over roots.\n\n`Denied` and `Unavailable` carry no value and therefore cannot be confused\nwith a successful empty result.",oneOf:[{properties:{outcome:{const:"exact",type:"string"},value:{type:["string","null"]}},required:["outcome","value"],type:"object"},{properties:{outcome:{const:"partial",type:"string"},value:{properties:{reason:{$ref:"#/$defs/ScopePartialReasonV1"},value:{type:["string","null"]}},required:["reason"],type:"object"}},required:["outcome","value"],type:"object"},{properties:{outcome:{const:"denied",type:"string"}},required:["outcome"],type:"object"},{properties:{outcome:{const:"unavailable",type:"string"},value:{properties:{reason:{$ref:"#/$defs/ScopeUnavailableReasonV1"}},required:["reason"],type:"object"}},required:["outcome","value"],type:"object"}]},vd={description:"Typed explanation for a root that returned usable but incomplete data.",enum:["incomplete","stale","budget_exceeded","root_denied","root_unavailable"],type:"string"},vc={description:"Stable identity of one authorized scope-set record.",type:"string"},vl={description:"Monotonic optimistic-concurrency revision of one scope set.",format:"uint64",minimum:1,type:"integer"},vp={additionalProperties:!1,description:"A source-to-authority binding. It stores only the source kind, a redacted\nlocator digest, and the pre-resolved authority reference.",properties:{authority:{$ref:"#/$defs/AuthorityRef"},binding_id:{$ref:"#/$defs/SourceBindingId"},source_kind:{$ref:"#/$defs/SourceKindV1"},source_locator_digest:{$ref:"#/$defs/LocatorDigest"}},required:["binding_id","source_kind","source_locator_digest","authority"],type:"object"},vu={description:"Typed explanation for a root that could not return usable data.",enum:["authority_unavailable","root_missing","store_unavailable"],type:"string"},vm={description:"Strongly typed canonical identity: `ScoreDomainId`.",type:"string"},vf={additionalProperties:!1,description:"Reference-only filesystem locator. The raw path is sealed outside this\ncontract; only the privacy-bound locator digest and sealed-value digest are\nrepresentable here.",properties:{locator_digest:{$ref:"#/$defs/LocatorDigest"},sealed_value_digest:{$ref:"#/$defs/ManifestDigest"}},required:["locator_digest","sealed_value_digest"],type:"object"},vh={additionalProperties:!1,properties:{knowledge:{$ref:"#/$defs/ClosedUtcIntervalV1"},valid:{$ref:"#/$defs/ValidCoverageIntervalV1"}},required:["knowledge","valid"],type:"object"},vy={oneOf:[{properties:{kind:{const:"caught_up",type:"string"}},required:["kind"],type:"object"},{properties:{kind:{const:"projection_behind_source",type:"string"},lag:{format:"uint64",minimum:0,type:"integer"}},required:["kind","lag"],type:"object"},{properties:{kind:{const:"source_behind_target",type:"string"},lag:{format:"uint64",minimum:0,type:"integer"}},required:["kind","lag"],type:"object"},{properties:{kind:{const:"projection_and_source_behind",type:"string"},projection_lag:{format:"uint64",minimum:0,type:"integer"},source_lag:{format:"uint64",minimum:0,type:"integer"}},required:["kind","projection_lag","source_lag"],type:"object"},{properties:{kind:{const:"locked",type:"string"}},required:["kind"],type:"object"},{properties:{kind:{const:"redacted",type:"string"}},required:["kind"],type:"object"},{properties:{kind:{const:"retention_withheld",type:"string"}},required:["kind"],type:"object"},{properties:{kind:{const:"unavailable",type:"string"}},required:["kind"],type:"object"}]},vg={additionalProperties:!1,properties:{mode:{$ref:"#/$defs/TemporalModeV1"}},required:["mode"],type:"object"},v_={enum:["fresh","stale","partial","locked","redacted","retention_withheld","unavailable"],type:"string"},vv={description:"Strongly typed canonical identity: `SessionId`.",type:"string"},vb={description:"Strongly typed canonical identity: `SessionOrThreadId`.",type:"string"},v$={additionalProperties:!1,properties:{committed_through:{format:"uint64",minimum:0,type:"integer"},observed_through:{format:"uint64",minimum:0,type:"integer"}},required:["observed_through","committed_through"],type:"object"},vS={additionalProperties:!1,properties:{committed_batches:{format:"uint64",minimum:0,type:"integer"},committed_records:{format:"uint64",minimum:0,type:"integer"},coverage:{$ref:"#/$defs/TemporalCoverageV1"},frontier:{$ref:"#/$defs/SessionRefreshFrontierResultV1"},operation_id:{type:"string"},session_id:{type:"string"},source_coverage:{items:{$ref:"#/$defs/SessionSourceCoverageV1"},type:"array"},updated_at:{format:"int64",type:"integer"}},required:["operation_id","session_id","frontier","coverage","committed_batches","committed_records","updated_at"],type:"object"},vk={additionalProperties:!1,properties:{coverage:{$ref:"#/$defs/TemporalCoverageV1"},failure_code:{type:["string","null"]},frontier:{$ref:"#/$defs/SessionRefreshFrontierResultV1"},operation_id:{type:"string"},session_id:{type:"string"},source_coverage:{items:{$ref:"#/$defs/SessionSourceCoverageV1"},type:"array"},state:{$ref:"#/$defs/SessionRefreshTerminalStateResultV1"},terminal_at:{format:"int64",type:"integer"}},required:["operation_id","session_id","frontier","coverage","state","terminal_at"],type:"object"},vw={enum:["complete","failed","cancelled"],type:"string"},vV={description:"Structural budget boundary that rejected a session retrieval request.\nThese causes are non-retryable request corrections; concurrent permit or\nqueue pressure remains a separate capacity-saturation failure.",enum:["request_result_limit","request_hydration_limit","request_context_bytes","request_candidate_bytes","request_record_bytes","request_hydration_bytes","estimator_version_mismatch","execution_work_exhausted","candidate_read_exhausted","record_read_exhausted","kernel_result_limit","participant_manifest_participants","participant_manifest_canonical_bytes","cursor_manifest_limit","hydration_bytes","context_bytes","context_tokens"],type:"string"},vP={additionalProperties:!1,properties:{committed_frontier:{format:"uint64",minimum:0,type:"integer"},covered_intervals:{items:{$ref:"#/$defs/SessionCoverageIntervalV1"},type:"array"},missing_intervals:{items:{$ref:"#/$defs/SessionCoverageIntervalV1"},type:"array"},observed_frontier:{format:"uint64",minimum:0,type:"integer"},reason:{$ref:"#/$defs/SessionCoverageReasonV1"},request:{$ref:"#/$defs/SessionCoverageRequestV1"},source_id:{type:"string"},state:{$ref:"#/$defs/SessionCoverageStateV1"},target_watermark:{format:"uint64",minimum:0,type:"integer"}},required:["source_id","observed_frontier","committed_frontier","target_watermark","request","covered_intervals","missing_intervals","state","reason"],type:"object"},vR={description:"Typed configuration key. Keys are lowercase, dotted product identifiers;\nuntyped host/adapter keys are not representable.",type:"string"},vq={additionalProperties:!1,description:"Logical and verified physical identity of the shared Profile shard.\n\nBrain and profile IDs select the shard; the verified store locator binds its\nphysical store. Lease incarnations and authority epochs remain runtime fences.",properties:{brain_id:{$ref:"#/$defs/BrainId"},profile_id:{$ref:"#/$defs/UserProfileId"},store_id:{type:"string"}},required:["brain_id","profile_id","store_id"],type:"object"},vI={additionalProperties:!1,properties:{complete:{type:"boolean"},family_digest:{$ref:"#/$defs/ManifestDigest"},match_class:{$ref:"#/$defs/SimilarMatchClassV1"},member_count:{format:"uint",minimum:0,type:"integer"},members:{items:{$ref:"#/$defs/SimilarOccurrenceV1"},type:"array"},next_cursor:{type:["string","null"]},normalization_revision:{format:"uint16",maximum:65535,minimum:0,type:"integer"},representative_payload_digest:{$ref:"#/$defs/ManifestDigest"}},required:["match_class","normalization_revision","family_digest","representative_payload_digest","member_count","members","complete"],type:"object"},vx={enum:["conservative_exact","rename_normalized_exact"],type:"string"},vj={additionalProperties:!1,properties:{body_span:{$ref:"#/$defs/SourceSpan"},path:{type:"string"},project_id:{$ref:"#/$defs/ProjectId"},repository_id:{$ref:"#/$defs/RepositoryId"},snapshot_digest:{$ref:"#/$defs/ManifestDigest"},source_generation:{$ref:"#/$defs/CodeGenerationId"},symbol_occurrence_id:{$ref:"#/$defs/SymbolOccurrenceId"},worktree_id:{anyOf:[{$ref:"#/$defs/WorktreeId"},{type:"null"}]}},required:["project_id","repository_id","source_generation","snapshot_digest","symbol_occurrence_id","path","body_span"],type:"object"},vC={properties:{evidence:{default:[],items:{type:"string"},type:"array"},improvement:{type:"boolean"},priority:{type:"string"},reason:{type:"string"},recommendation:{type:"string"},skill_id:{type:"string"}},required:["skill_id","improvement","recommendation","reason","priority"],type:"object"},vT={enum:["cursor","codex","claude","agents","opencode","kimi","kiro","hermes"],type:"string"},vO={properties:{evidence:{default:[],items:{type:"string"},type:"array"},reason:{type:"string"},recommendation:{type:"string"},skill_id:{type:"string"},stale:{type:"boolean"}},required:["skill_id","stale","recommendation","reason"],type:"object"},vE={description:"One skill's durable usage counters. The ledger stores one per skill; a\nsummary is the same record merged with the skill's current metadata.",properties:{activated_at:{description:"When the skill last transitioned into the active state; mirrors the\nmanaged skill metadata so outcome scoring works from summaries alone.",format:"int64",type:["integer","null"]},category:{type:["string","null"]},created_by:{type:["string","null"]},first_seen_at:{format:"int64",type:"integer"},imported_analytics_events:{description:"Import keys that already counted toward this skill. They are not a\nstore-wide set: each key names this skill, so another skill must not\nshare the write.",items:{type:"string"},type:"array",uniqueItems:!0},last_activity_at:{format:"int64",type:"integer"},last_patched_at:{format:"int64",type:["integer","null"]},last_used_at:{format:"int64",type:["integer","null"]},last_viewed_at:{format:"int64",type:["integer","null"]},patch_count:{format:"uint64",minimum:0,type:"integer"},pinned:{type:"boolean"},provenance_source:{anyOf:[{$ref:"#/$defs/ManagedSkillSource"},{type:"null"}]},schema_version:{format:"uint32",minimum:0,type:"integer"},skill_id:{type:"string"},state:{anyOf:[{$ref:"#/$defs/ManagedSkillState"},{type:"null"}]},targets:{default:[],items:{type:"string"},type:"array"},title:{type:["string","null"]},use_count:{format:"uint64",minimum:0,type:"integer"},use_count_at_activation:{format:"uint64",minimum:0,type:["integer","null"]},view_count:{format:"uint64",minimum:0,type:"integer"},view_count_at_activation:{description:"View/use totals captured at activation time so activity since activation\nis an exact delta rather than a heuristic.",format:"uint64",minimum:0,type:["integer","null"]}},required:["schema_version","skill_id","pinned","view_count","use_count","patch_count","first_seen_at","last_activity_at"],type:"object"},vA={description:"Strongly typed canonical identity: `SourceBindingId`.",type:"string"},vW={additionalProperties:!1,description:"Source freshness is source- and retriever-specific: there is no global\nage-decay multiplier. Missing, stale, incompatible, and current are\ndistinct states.",properties:{compatibility:{$ref:"#/$defs/FreshnessCompatibilityV1"},generation_lag:{format:"uint64",minimum:0,type:["integer","null"]},observed_at:{$ref:"#/$defs/UtcMicros"},policy_revision:{$ref:"#/$defs/ComponentRevision"},projection_watermark:{format:"uint64",minimum:0,type:["integer","null"]},source_generation:{format:"uint64",minimum:0,type:["integer","null"]},source_instance:{$ref:"#/$defs/SourceInstanceKey"},source_namespace:{$ref:"#/$defs/SourceNamespace"},source_watermark:{format:"uint64",minimum:0,type:["integer","null"]}},required:["source_namespace","source_instance","observed_at","compatibility","policy_revision"],type:"object"},vM={description:"Strongly typed canonical identity: `SourceInstanceKey`.",type:"string"},vN={enum:["claude","codex","cursor","git_hub","hermes","kiro"],type:"string"},vz={description:"Strongly typed canonical identity: `SourceNamespace`.",type:"string"},vD={description:"Strongly typed canonical identity: `SourceOccurrenceId`.",type:"string"},vF={additionalProperties:!1,description:"Byte range inside one sanitized source file. Mutable line numbers are\nnever part of identity.",properties:{end_byte:{format:"uint64",minimum:0,type:"integer"},start_byte:{format:"uint64",minimum:0,type:"integer"}},required:["start_byte","end_byte"],type:"object"},vL={description:"Strongly typed canonical identity: `SourceStoreId`.",type:"string"},vU={description:"Strongly typed canonical identity: `StackDeliveryWatermarkId`.",type:"string"},vH={description:"Strongly typed canonical identity: `StackNodeId`.",type:"string"},vG={description:"Strongly typed canonical identity: `StackSignalId`.",type:"string"},vB={additionalProperties:!1,description:"Exact base/head symbol comparison was unavailable; the git evidence beside\nit is still the answer.",properties:{reason:{type:"string"},retryable:{type:"boolean"},status:{$ref:"#/$defs/GitReadUnavailableV1"}},required:["status","reason","retryable"],type:"object"},vK={additionalProperties:!1,description:"Optional narrowing inside the immutable project/repository/worktree scope\ncarried by [`RequestContext`]. A path prefix never establishes identity or\nauthorization.",properties:{path_prefix:{type:["string","null"]}},type:"object"},vJ={description:"Strongly typed canonical identity: `SymbolOccurrenceId`.",type:"string"},vZ={additionalProperties:!1,properties:{end_line:{format:"uint32",minimum:0,type:"integer"},file:{type:"string"},is_async:{type:"boolean"},kind:{type:"string"},line:{description:"One-based user-facing line.",format:"uint32",minimum:0,type:"integer"},name:{type:"string"},node_id:{type:"string"},qualified_name:{type:"string"},score:{format:"double",type:["number","null"]},signature:{type:["string","null"]}},required:["node_id","name","qualified_name","kind","file","line","end_line","is_async"],type:"object"},vQ={additionalProperties:!1,properties:{depth:{format:"uint32",minimum:0,type:["integer","null"]},dispatch_from:{type:["string","null"]},dispatch_via_trait:{type:"boolean"},edge_kind:{type:"string"},symbol:{$ref:"#/$defs/SymbolPrimitiveRecord"}},required:["symbol","edge_kind","dispatch_via_trait"],type:"object"},vX={additionalProperties:!1,properties:{anchor_id:{$ref:"#/$defs/RetrievalAnchorId"},evidence_digest:{$ref:"#/$defs/ManifestDigest"},link_id:{type:"string"},observed_at:{$ref:"#/$defs/UtcMicros"},revision:{format:"uint64",minimum:0,type:"integer"},task_id:{$ref:"#/$defs/TaskId"}},required:["link_id","revision","task_id","anchor_id","evidence_digest","observed_at"],type:"object"},vY={additionalProperties:!1,properties:{definition_id:{$ref:"#/$defs/WorkflowDefinitionId"},definition_version:{format:"uint64",minimum:1,type:"integer"},from_actor_id:{$ref:"#/$defs/ActorId"},project_id:{$ref:"#/$defs/ProjectId"},repository_id:{$ref:"#/$defs/RepositoryId"},run_id:{$ref:"#/$defs/RunId"},step_id:{$ref:"#/$defs/WorkflowStepId"},task_id:{$ref:"#/$defs/TaskId"},thread_id:{$ref:"#/$defs/ThreadId"},to_actor_id:{$ref:"#/$defs/ActorId"},worktree_id:{$ref:"#/$defs/WorktreeId"}},required:["project_id","repository_id","worktree_id","definition_id","definition_version","step_id","task_id","thread_id","run_id","from_actor_id","to_actor_id"],type:"object"},v1={description:"Strongly typed canonical identity: `TaskId`.",type:"string"},v0={additionalProperties:!1,properties:{hidden:{format:"uint64",minimum:0,type:"integer"},redacted:{format:"uint64",minimum:0,type:"integer"},unknown:{format:"uint64",minimum:0,type:"integer"},visible:{format:"uint64",minimum:0,type:"integer"}},required:["visible","hidden","unknown","redacted"],type:"object"},v2={additionalProperties:!1,properties:{anchor:{type:"string"},summary:{type:"string"}},required:["anchor","summary"],type:"object"},v4={oneOf:[{properties:{state:{const:"fresh",type:"string"}},required:["state"],type:"object"},{properties:{generation_lag:{format:"uint64",minimum:0,type:"integer"},state:{const:"stored",type:"string"}},required:["state","generation_lag"],type:"object"},{properties:{generation_lag:{format:"uint64",minimum:0,type:"integer"},state:{const:"partial",type:"string"}},required:["state","generation_lag"],type:"object"}]},v6={description:"Requested temporal interpretation.",oneOf:[{additionalProperties:!1,properties:{kind:{const:"current",type:"string"}},required:["kind"],type:"object"},{additionalProperties:!1,properties:{cutoff:{$ref:"#/$defs/UtcMicros"},kind:{const:"as_of",type:"string"}},required:["kind","cutoff"],type:"object"},{additionalProperties:!1,properties:{kind:{const:"evolution",type:"string"}},required:["kind"],type:"object"},{additionalProperties:!1,properties:{kind:{const:"forensic",type:"string"}},required:["kind"],type:"object"}]},v3={additionalProperties:!1,properties:{anchor:{type:"string"},rank:{format:"uint32",minimum:0,type:"integer"},reason:{$ref:"#/$defs/HydrationStateResultV1"}},required:["rank","anchor","reason"],type:"object"},v9={additionalProperties:!1,properties:{generation:{format:"uint64",minimum:0,type:"integer"},index:{format:"uint64",minimum:0,type:"integer"},projection:{format:"uint64",minimum:0,type:"integer"},source:{format:"uint64",minimum:0,type:"integer"},summary:{format:"uint64",minimum:0,type:"integer"}},required:["generation","source","projection","index","summary"],type:"object"},v5={description:"Strongly typed canonical identity: `ThreadId`.",type:"string"},v8={additionalProperties:!1,description:"What a token budget did to an answer. `est_tokens` is the kept rows.\n`over_ceiling` means a single row was larger than its section quota and\nwas kept anyway.",properties:{budget_tokens:{format:"uint32",minimum:0,type:"integer"},est_tokens:{format:"uint32",minimum:0,type:"integer"},over_ceiling:{type:"boolean"},sections:{items:{$ref:"#/$defs/TokenBudgetSectionV1"},type:"array"}},required:["budget_tokens","est_tokens","over_ceiling","sections"],type:"object"},v7={additionalProperties:!1,description:"One section a token budget kept or cut.",properties:{section:{type:"string"},shown:{format:"uint32",minimum:0,type:"integer"},total:{format:"uint32",minimum:0,type:"integer"}},required:["section","total","shown"],type:"object"},be={additionalProperties:!1,properties:{maximum_active_per_repository:{format:"uint16",maximum:65535,minimum:1,type:"integer"},maximum_global_active:{format:"uint16",maximum:65535,minimum:1,type:"integer"},maximum_parallel_per_task:{format:"uint16",maximum:65535,minimum:1,type:"integer"},maximum_stack_depth:{format:"uint16",maximum:65535,minimum:1,type:"integer"}},required:["maximum_active_per_repository","maximum_parallel_per_task","maximum_global_active","maximum_stack_depth"],type:"object"},bt={enum:["reject","require_explicit_human_approval","require_human_approval_and_independent_review"],type:"string"},br={additionalProperties:!1,properties:{cleanliness:{$ref:"#/$defs/WorktreeCleanlinessRequirementV1"},maximum_preflight_age_seconds:{format:"uint32",minimum:1,type:"integer"},require_fresh_preflight:{type:"boolean"},review:{$ref:"#/$defs/ReviewRequirementV1"},tests:{items:{$ref:"#/$defs/RequiredCheckV1"},type:"array"}},required:["cleanliness","tests","review","require_fresh_preflight","maximum_preflight_age_seconds"],type:"object"},bi={enum:["critical_only","lifecycle","verbose"],type:"string"},bo={description:"Risky construct the pattern scan looks for.",enum:["unwrap","expect","panic","todo","unimplemented","unsafe_block"],type:"string"},bn={description:"Stable, canonical catalog identity for `UseCaseId`.",type:"string"},ba={description:"Strongly typed canonical identity: `UserProfileId`.",type:"string"},bs={description:"UTC timestamp represented as microseconds from the Unix epoch.",format:"int64",type:"integer"},bd={oneOf:[{properties:{interval:{$ref:"#/$defs/ClosedUtcIntervalV1"},kind:{const:"known",type:"string"}},required:["kind","interval"],type:"object"},{properties:{kind:{const:"unknown",type:"string"}},required:["kind"],type:"object"}]},bc={additionalProperties:!1,description:"One exact verified graph snapshot identity.",properties:{event_sequence:{format:"uint64",minimum:0,type:"integer"},graph_version:{format:"uint64",minimum:0,type:"integer"},recovered_graph_digest:{$ref:"#/$defs/ManifestDigest"},source_watermark:{additionalProperties:{format:"uint64",minimum:0,type:"integer"},type:"object"}},required:["graph_version","event_sequence","source_watermark","recovered_graph_digest"],type:"object"},bl={additionalProperties:!1,properties:{criterion_id:{type:"string"},description:{type:"string"},evidence_required:{type:"boolean"}},required:["criterion_id","description","evidence_required"],type:"object"},bp={enum:["never","on_request"],type:"string"},bu={description:"Strongly typed canonical identity: `WorkArtifactId`.",type:"string"},bm={additionalProperties:!1,properties:{artifact_id:{$ref:"#/$defs/WorkArtifactId"},byte_length:{format:"uint64",minimum:0,type:"integer"},digest:{$ref:"#/$defs/ManifestDigest"}},required:["artifact_id","digest","byte_length"],type:"object"},bf={additionalProperties:!1,description:"Sealed terminal evidence for one provider attempt. The digest of this\nrecord is the evidence digest carried by [`WorkTerminalEvidenceV1`] and by\nthe `RuntimeEvidenceRef` attached to the Work projection, so the receipt\nin Work always names an inspectable record.",properties:{actual_route:{anyOf:[{$ref:"#/$defs/WorkProviderRouteV1"},{type:"null"}]},identity:{$ref:"#/$defs/WorkAttemptIdentityV1"},observed_at:{$ref:"#/$defs/UtcMicros"},outcome:{$ref:"#/$defs/WorkAttemptProviderOutcomeV1"},provider_fallback:{anyOf:[{$ref:"#/$defs/WorkProviderFallbackRecordV1"},{type:"null"}],description:"Present only when the pinned preferred backend was disqualified before\nstartup. `None` means the attempt ran on its first-choice backend."},provider_session:{anyOf:[{$ref:"#/$defs/ObservationSourceIdentityV1"},{type:"null"}],description:"Native provider-qualified session/thread identity, when the provider\nreported one. Admission cannot supply this value and no fallback is\nfabricated."},requested_route:{$ref:"#/$defs/WorkProviderRouteV1"},stderr:{anyOf:[{$ref:"#/$defs/WorkAttemptStreamSummaryV1"},{type:"null"}]},stdout:{anyOf:[{$ref:"#/$defs/WorkAttemptStreamSummaryV1"},{type:"null"}]}},required:["identity","requested_route","outcome","observed_at"],type:"object"},bh={additionalProperties:!1,properties:{attempt_id:{$ref:"#/$defs/AttemptId"},run_id:{$ref:"#/$defs/RunId"},task_id:{$ref:"#/$defs/TaskId"}},required:["task_id","run_id","attempt_id"],type:"object"},by={description:"How much of the authorized attempt set one page covers.",oneOf:[{additionalProperties:!1,description:"Every attempt after the page start was returned; zero returned is the\nexplicit empty authorized result, not a concealment.",properties:{coverage:{const:"complete",type:"string"},returned:{format:"uint32",minimum:0,type:"integer"}},required:["coverage","returned"],type:"object"},{additionalProperties:!1,description:"The page cap was reached; `resume` continues under the same verified\ntopology generation.",properties:{coverage:{const:"capped",type:"string"},remaining:{format:"uint32",minimum:0,type:"integer"},resume:{$ref:"#/$defs/WorkAttemptListCursorV1"},returned:{format:"uint32",minimum:0,type:"integer"}},required:["coverage","returned","remaining","resume"],type:"object"}]},bg={description:"Opaque resume point for the next page of one attempt-list-family read,\nbound to the operation and `page_size` that minted it and pinned to the\nverified topology generation the page was read under.",type:"string"},b_={additionalProperties:!1,properties:{completed:{format:"uint64",minimum:0,type:"integer"},total:{format:"uint64",minimum:0,type:"integer"}},required:["completed","total"],type:"object"},bv={additionalProperties:!1,properties:{accepted_proposal:{$ref:"#/$defs/ProposalId",description:"Exact accepted proposal the attempt was admitted against. A superseded\nor cleared proposal is a different binding, not a compatible refresh."},event_sequence:{description:"Exact immutable product event that verified this graph version.",format:"uint64",minimum:0,type:"integer"},graph_version:{format:"uint64",minimum:0,type:"integer"},recovered_graph_digest:{$ref:"#/$defs/ManifestDigest",description:"Digest of the graph recovered and verified at admission."},source_watermark:{additionalProperties:{format:"uint64",minimum:0,type:"integer"},description:"Source-frontier identity preserved from the verified product graph.",type:"object"}},required:["graph_version","event_sequence","source_watermark","recovered_graph_digest","accepted_proposal"],type:"object"},bb={description:"How one provider attempt ended, as observed by the daemon runtime.",oneOf:[{properties:{code:{format:"int32",type:"integer"},outcome:{const:"exited",type:"string"}},required:["outcome","code"],type:"object"},{properties:{outcome:{const:"signalled",type:"string"},signal:{format:"int32",type:"integer"}},required:["outcome","signal"],type:"object"},{properties:{outcome:{const:"timed_out",type:"string"}},required:["outcome"],type:"object"},{properties:{outcome:{const:"cancelled",type:"string"}},required:["outcome"],type:"object"},{properties:{outcome:{const:"provider_unavailable",type:"string"},state:{$ref:"#/$defs/WorkProviderAvailabilityV1"}},required:["outcome","state"],type:"object"},{properties:{channel:{$ref:"#/$defs/WorkAttemptStreamChannelV1"},outcome:{const:"stream_overflow",type:"string"}},required:["outcome","channel"],type:"object"},{properties:{outcome:{const:"launch_failed",type:"string"}},required:["outcome"],type:"object"},{description:"The provider started but its typed protocol session did not reach a\nterminal answer: a malformed, out-of-order, oversized, or lost frame.\nPlan 32 requires such a stream to seal failed evidence rather than a\ntext-scraped success.",properties:{outcome:{const:"protocol_failed",type:"string"}},required:["outcome"],type:"object"}]},b$={additionalProperties:!1,properties:{artifacts:{items:{$ref:"#/$defs/WorkArtifactRefV1"},type:"array"},evidence:{anyOf:[{$ref:"#/$defs/WorkAttemptEvidenceRecordV1"},{type:"null"}]},identity:{$ref:"#/$defs/WorkAttemptIdentityV1"}},required:["identity","artifacts"],type:"object"},bS={enum:["leased","running","cancellation_requested","cancellation_acknowledged","cancellation_escalated","recovery_required","succeeded","failed","timed_out","cancelled"],type:"string"},bk={enum:["stdout","stderr"],type:"string"},bw={additionalProperties:!1,description:"Bounded summary of one captured provider stream.",properties:{byte_length:{format:"uint64",minimum:0,type:"integer"},digest:{$ref:"#/$defs/ManifestDigest"},truncated:{type:"boolean"}},required:["byte_length","truncated","digest"],type:"object"},bV={additionalProperties:!1,description:"The verified Work topology snapshot one attempt-list page was read under.",properties:{generation:{description:"The verified graph generation the topology snapshot is published under.",type:"string"},task_count:{description:"The number of tasks in the verified topology.",format:"uint32",minimum:0,type:"integer"}},required:["generation","task_count"],type:"object"},bP={properties:{actual_route:{anyOf:[{$ref:"#/$defs/WorkProviderRouteV1"},{type:"null"}]},artifacts:{items:{$ref:"#/$defs/WorkArtifactRefV1"},type:"array"},cancellation:{$ref:"#/$defs/WorkCancellationStateV1"},execution:{$ref:"#/$defs/WorkExecutionEnvelopeV1"},identity:{$ref:"#/$defs/WorkAttemptIdentityV1"},lease:{$ref:"#/$defs/WorkLeaseFenceV1"},progress:{anyOf:[{$ref:"#/$defs/WorkAttemptProgressV1"},{type:"null"}]},projection_binding:{$ref:"#/$defs/WorkAttemptProjectionBindingV1"},recovery:{$ref:"#/$defs/WorkRecoveryStateV1"},requested_route:{$ref:"#/$defs/WorkProviderRouteV1"},state:{$ref:"#/$defs/WorkAttemptStateV1"},terminal:{anyOf:[{$ref:"#/$defs/WorkTerminalEvidenceV1"},{type:"null"}]}},required:["identity","projection_binding","execution","lease","state","artifacts","cancellation","recovery","requested_route"],type:"object"},bR={additionalProperties:!1,properties:{acknowledged_at:{$ref:"#/$defs/UtcMicros"},request:{$ref:"#/$defs/WorkCancellationRequestV1"}},required:["request","acknowledged_at"],type:"object"},bq={additionalProperties:!1,properties:{acknowledgement:{$ref:"#/$defs/WorkCancellationAcknowledgementV1"},escalated_at:{$ref:"#/$defs/UtcMicros"}},required:["acknowledgement","escalated_at"],type:"object"},bI={description:"Strongly typed canonical identity: `WorkCancellationRequestId`.",type:"string"},bx={additionalProperties:!1,properties:{request_id:{$ref:"#/$defs/WorkCancellationRequestId"},requested_at:{$ref:"#/$defs/UtcMicros"}},required:["request_id","requested_at"],type:"object"},bj={oneOf:[{properties:{state:{const:"none",type:"string"}},required:["state"],type:"object"},{properties:{state:{const:"requested",type:"string"},value:{$ref:"#/$defs/WorkCancellationRequestV1"}},required:["state","value"],type:"object"},{properties:{state:{const:"acknowledged",type:"string"},value:{$ref:"#/$defs/WorkCancellationAcknowledgementV1"}},required:["state","value"],type:"object"},{properties:{state:{const:"escalated",type:"string"},value:{$ref:"#/$defs/WorkCancellationEscalationV1"}},required:["state","value"],type:"object"}]},bC={description:"Strongly typed canonical identity: `WorkCommandId`.",type:"string"},bT={description:"Where a configured route places task content.",enum:["local","tenant","external"],type:"string"},bO={additionalProperties:!1,properties:{topology_generation:{$ref:"#/$defs/WorkTopologyGenerationRefV1"},work_generation:{$ref:"#/$defs/ProjectionGenerationId"}},required:["work_generation","topology_generation"],type:"object"},bE={additionalProperties:!1,properties:{cost_micros:{format:"uint64",minimum:0,type:["integer","null"]},coverage:{$ref:"#/$defs/CoverageStateV1"},effect_count:{format:"uint64",minimum:0,type:["integer","null"]},effect_outcome:{$ref:"#/$defs/DuplicateEffectOutcomeV1"},evidence:{$ref:"#/$defs/QuantityEvidenceClassV1"},test_count:{format:"uint64",minimum:0,type:["integer","null"]},token_count:{format:"uint64",minimum:0,type:["integer","null"]},wall_micros:{format:"uint64",minimum:0,type:["integer","null"]}},required:["evidence","effect_outcome","coverage"],type:"object"},bA={description:"Effect semantics admitted for one provider attempt.",enum:["observational","intercepted","compound_non_repeatable"],type:"string"},bW={description:"Declared effort class of a configured route.",enum:["minimal","standard","extended"],type:"string"},bM={enum:["deny","allowlisted"],type:"string"},bN={oneOf:[{additionalProperties:!1,properties:{cursor:{type:"string"},kind:{const:"anchor",type:"string"},link_id:{type:"string"}},required:["kind","link_id","cursor"],type:"object"},{additionalProperties:!1,properties:{continuation:{$ref:"#/$defs/WorkTaskSessionContinuationV1"},kind:{const:"task_session",type:"string"}},required:["kind","continuation"],type:"object"}]},bz={additionalProperties:!1,description:"One immutable evidence frontier. Local code/session evidence and live Git\nevidence each carry their own frontier; the evaluator never merges,\nsubstitutes, or advances one from the other.",properties:{digest:{$ref:"#/$defs/ManifestDigest"},watermark:{$ref:"#/$defs/UtcMicros"}},required:["watermark","digest"],type:"object"},bD={additionalProperties:!1,description:"Exact on-disk executable selected for one opaque executable identity.\n\nThe path is configuration data, never a lookup hint. Runtime admission\ncanonicalizes it again and verifies the file bytes against\n`executable.artifact_digest` before returning an executable binding.",properties:{canonical_path:{type:"string"},capabilities:{items:{$ref:"#/$defs/WorkExecutableCapabilityV1"},type:"array"},executable:{$ref:"#/$defs/WorkExecutableReference"},routes:{items:{$ref:"#/$defs/WorkRouteCandidateV1"},type:"array"}},required:["executable","canonical_path","capabilities","routes"],type:"object"},bF={description:"One executable capability admitted by a configured artifact binding.\n\nThe closed variants bind a provider backend to its exact wire protocol.\nCallers cannot claim an arbitrary backend/protocol combination.",enum:["claude_code_stream_json","codex_app_server_json_rpc","codex_cli_exec_json"],type:"string"},bL={additionalProperties:!1,properties:{artifact_digest:{$ref:"#/$defs/ManifestDigest"},executable_id:{type:"string"}},required:["executable_id","artifact_digest"],type:"object"},bU={additionalProperties:!1,description:"Exact immutable provider admission attached to the durable Work attempt.\n\nCallers name typed route and scope facts, never argv, environment entries,\nor executable paths. The daemon resolves the registered executable only\nafter this envelope has been persisted and admitted to the canonical queue.",properties:{attempt_identity:{$ref:"#/$defs/WorkAttemptIdentityV1"},cancellation_generation:{format:"uint64",minimum:0,type:"integer"},commit:{$ref:"#/$defs/CommitId"},effect_state:{$ref:"#/$defs/WorkEffectStateV1"},execution_snapshot:{$ref:"#/$defs/WorkExecutionSnapshot"},instructions:{description:"Exact provider instructions admitted with this attempt. The adapter\ndelivers these bytes verbatim on the provider's typed input channel;\nthey are never interpolated into argv or an ambient prompt source.",type:"string"},operation:{$ref:"#/$defs/WorkflowOperationRef"},project_id:{$ref:"#/$defs/ProjectId"},projection_binding:{$ref:"#/$defs/WorkAttemptProjectionBindingV1"},reference:{anyOf:[{$ref:"#/$defs/RefId"},{type:"null"}]},repository_id:{$ref:"#/$defs/RepositoryId"},worktree_id:{$ref:"#/$defs/WorktreeId"},worktree_root:{type:"string"}},required:["attempt_identity","projection_binding","operation","execution_snapshot","project_id","repository_id","worktree_id","worktree_root","commit","instructions","cancellation_generation","effect_state"],type:"object"},bH={additionalProperties:!1,properties:{max_concurrency:{format:"uint32",minimum:0,type:"integer"},max_input_tokens:{format:"uint64",minimum:0,type:"integer"},max_output_tokens:{format:"uint64",minimum:0,type:"integer"},max_protocol_bytes:{format:"uint64",minimum:0,type:"integer"},max_stderr_bytes:{format:"uint64",minimum:0,type:"integer"},max_stdout_bytes:{format:"uint64",minimum:0,type:"integer"}},required:["max_input_tokens","max_output_tokens","max_stdout_bytes","max_stderr_bytes","max_protocol_bytes","max_concurrency"],type:"object"},bG={additionalProperties:!1,description:"Immutable provider and topology authority pinned for exactly one Work\nexecution. Every constraint the execution is governed by is named here;\nnothing in this value is an opaque stand-in that a reader must resolve\nagainst a mutable store.",properties:{approval:{$ref:"#/$defs/WorkApprovalPolicy"},backend:{$ref:"#/$defs/WorkProviderBackendV1"},configuration_revision_id:{$ref:"#/$defs/ConfigurationRevisionId"},configuration_snapshot_id:{$ref:"#/$defs/ConfigurationSnapshotId"},credential_references:{items:{$ref:"#/$defs/CredentialReferenceId"},type:"array",uniqueItems:!0},deadline:{$ref:"#/$defs/UtcMicros"},effective_behavior_digest:{$ref:"#/$defs/ManifestDigest"},egress:{$ref:"#/$defs/WorkEgressPolicy"},environment_allowlist:{items:{type:"string"},type:"array",uniqueItems:!0},executable:{$ref:"#/$defs/WorkExecutableReference"},fallback:{$ref:"#/$defs/WorkFallbackTopology"},filesystem:{$ref:"#/$defs/WorkFilesystemPolicy"},limits:{$ref:"#/$defs/WorkExecutionLimits"},model:{type:"string"},protocol:{$ref:"#/$defs/WorkProviderProtocol"},resolution_provenance_digest:{$ref:"#/$defs/ManifestDigest"},route:{$ref:"#/$defs/WorkProviderRouteV1"},sandbox:{$ref:"#/$defs/WorkSandboxPolicy"},topology:{$ref:"#/$defs/WorkTopologyPolicyV1",description:"See [`WorkExecutionSnapshotInput::topology`]. Validated on construction,\nso an admitted snapshot can never pin a topology that weakens the\nprotected-ref floor or permits a native integration without its gates."}},required:["configuration_revision_id","configuration_snapshot_id","effective_behavior_digest","resolution_provenance_digest","route","backend","protocol","model","executable","sandbox","approval","filesystem","egress","environment_allowlist","credential_references","limits","deadline","fallback","topology"],type:"object"},bB={enum:["language","framework","architecture","testing","operations","security","domain"],type:"string"},bK={additionalProperties:!1,description:"Explicit, expiring consent for ephemeral expertise context.\n\nUser-profile and project authorization are separate registered settings;\nWork requires both and uses only their category intersection.",properties:{allowed_categories:{items:{$ref:"#/$defs/WorkExpertiseCategoryV1"},type:"array",uniqueItems:!0},enabled:{type:"boolean"},expires_at:{anyOf:[{$ref:"#/$defs/UtcMicros"},{type:"null"}]},granted_at:{anyOf:[{$ref:"#/$defs/UtcMicros"},{type:"null"}]},schema_version:{format:"uint16",maximum:65535,minimum:0,type:"integer"}},required:["schema_version","enabled","allowed_categories"],type:"object"},bJ={oneOf:[{additionalProperties:!1,properties:{kind:{const:"disabled",type:"string"}},required:["kind"],type:"object"},{additionalProperties:!1,properties:{executable:{$ref:"#/$defs/WorkExecutableReference"},kind:{const:"codex_cli",type:"string"},route:{$ref:"#/$defs/WorkProviderRouteV1"}},required:["kind","route","executable"],type:"object"}]},bZ={format:"uint64",minimum:0,title:"WorkFenceEpochV1",type:"integer"},bQ={enum:["read_only","workspace_write"],type:"string"},bX={oneOf:[{additionalProperties:!1,properties:{item:{$ref:"#/$defs/WorkItemV1"},kind:{const:"task_added",type:"string"}},required:["kind","item"],type:"object"},{additionalProperties:!1,properties:{initiative:{$ref:"#/$defs/WorkInitiativeV1"},item:{$ref:"#/$defs/WorkItemV1"},kind:{const:"task_created",type:"string"},milestone:{$ref:"#/$defs/WorkMilestoneV1"},plan:{$ref:"#/$defs/WorkPlanV1"}},required:["kind","initiative","plan","milestone","item"],type:"object"},{additionalProperties:!1,properties:{decided_at:{$ref:"#/$defs/UtcMicros"},disposition:{$ref:"#/$defs/WorkProposalDispositionV1"},kind:{const:"relation_replan_decided",type:"string"},proposal:{$ref:"#/$defs/WorkRelationReplanProposalV1"}},required:["kind","proposal","disposition","decided_at"],type:"object"},{additionalProperties:!1,properties:{applied_at:{$ref:"#/$defs/UtcMicros"},kind:{const:"task_relations_replanned",type:"string"},proposal_id:{$ref:"#/$defs/ProposalId"}},required:["kind","proposal_id","applied_at"],type:"object"},{additionalProperties:!1,properties:{evidence:{$ref:"#/$defs/TaskEvidenceLinkV1"},kind:{const:"evidence_linked",type:"string"},task_id:{$ref:"#/$defs/TaskId"}},required:["kind","task_id","evidence"],type:"object"},{additionalProperties:!1,properties:{decided_at:{$ref:"#/$defs/UtcMicros"},disposition:{$ref:"#/$defs/WorkProposalDispositionV1"},kind:{const:"proposal_decided",type:"string"},proposal:{$ref:"#/$defs/WorkProposalV1"}},required:["kind","proposal","disposition","decided_at"],type:"object"},{additionalProperties:!1,properties:{accepted_at:{$ref:"#/$defs/UtcMicros"},kind:{const:"proposal_accepted",type:"string"},proposal:{$ref:"#/$defs/WorkProposalV1"}},required:["kind","proposal","accepted_at"],type:"object"},{additionalProperties:!1,properties:{admitted_at:{$ref:"#/$defs/UtcMicros"},based_on_version:{format:"uint64",minimum:0,type:"integer"},kind:{const:"execution_admitted",type:"string"},task_id:{$ref:"#/$defs/TaskId"}},required:["kind","task_id","based_on_version","admitted_at"],type:"object"},{additionalProperties:!1,properties:{based_on_version:{format:"uint64",minimum:0,type:"integer"},identity:{$ref:"#/$defs/WorkAttemptIdentityV1"},kind:{const:"accepted_attempt_linked",type:"string"},linked_at:{$ref:"#/$defs/UtcMicros"},task_id:{$ref:"#/$defs/TaskId"}},required:["kind","task_id","based_on_version","identity","linked_at"],type:"object"},{additionalProperties:!1,properties:{accepted_at:{$ref:"#/$defs/UtcMicros"},evidence_by_criterion:{additionalProperties:{type:"string"},type:"object"},kind:{const:"task_accepted",type:"string"},task_id:{$ref:"#/$defs/TaskId"}},required:["kind","task_id","evidence_by_criterion","accepted_at"],type:"object"},{additionalProperties:!1,properties:{handoff:{$ref:"#/$defs/WorkHandoffV1"},kind:{const:"handoff_recorded",type:"string"}},required:["kind","handoff"],type:"object"}]},bY={additionalProperties:!1,description:"One attempt on the evidence frontier: exactly which attempt, in which\nstate, backed by which sealed evidence digest (when the attempt has\nreported one). No lease or fence is part of the frontier. Those are\nruntime authority, not checkpoint evidence.",properties:{evidence_digest:{anyOf:[{$ref:"#/$defs/ManifestDigest"},{type:"null"}],description:"The digest of the sealed terminal evidence record, when the attempt\nhas one. `None` is the typed not-yet-reported state."},identity:{$ref:"#/$defs/WorkAttemptIdentityV1"},state:{$ref:"#/$defs/WorkAttemptStateV1"}},required:["identity","state"],type:"object"},b1={additionalProperties:!1,description:"The exact work/evidence frontier one handoff records.",properties:{attempts:{description:"The evidence frontier: every attempt the issuer knows about, in\nstable identity order.",items:{$ref:"#/$defs/WorkHandoffAttemptFrontierV1"},type:"array"},blockers:{description:"What is blocking progress. Bounded, non-empty entries.",items:{type:"string"},type:"array"},legal_actions:{description:"The actions the issuer believes are legal next steps.",items:{type:"string"},type:"array"},lineage:{$ref:"#/$defs/WorkHandoffLineageV1"},task_id:{$ref:"#/$defs/TaskId"},unknowns:{description:"What the issuer does not know yet. Bounded, non-empty entries.",items:{type:"string"},type:"array"},work_version:{description:"The exact Work version the frontier was cut at.",format:"uint64",minimum:0,type:"integer"}},required:["task_id","work_version","attempts","unknowns","blockers","legal_actions","lineage"],type:"object"},b0={additionalProperties:!1,description:"Who issued this frontier and what it supersedes.",properties:{issued_at:{$ref:"#/$defs/UtcMicros"},issued_by:{$ref:"#/$defs/ActorId"},prior_frontier_digest:{anyOf:[{$ref:"#/$defs/ManifestDigest"},{type:"null"}],description:"The canonical digest of the frontier this one supersedes, when the\ntask has been handed off before. `None` states a first handoff."}},required:["issued_by","issued_at"],type:"object"},b2={additionalProperties:!1,properties:{evidence_frontier:{items:{type:"string"},type:"array",uniqueItems:!0},from_actor:{$ref:"#/$defs/ActorId"},handed_off_at:{$ref:"#/$defs/UtcMicros"},handoff_id:{type:"string"},task_id:{$ref:"#/$defs/TaskId"},to_actor:{$ref:"#/$defs/ActorId"},unknowns:{items:{type:"string"},type:"array",uniqueItems:!0}},required:["handoff_id","task_id","from_actor","to_actor","evidence_frontier","unknowns","handed_off_at"],type:"object"},b4={additionalProperties:!1,properties:{initiative_id:{type:"string"},milestone_id:{type:"string"},plan_id:{type:"string"}},required:["initiative_id","plan_id","milestone_id"],type:"object"},b6={additionalProperties:!1,properties:{created_at:{$ref:"#/$defs/UtcMicros"},id:{type:"string"},title:{type:"string"}},required:["id","title","created_at"],type:"object"},b3={additionalProperties:!1,properties:{acceptance_criteria:{items:{$ref:"#/$defs/WorkAcceptanceCriterionV1"},type:"array"},causal_candidates:{items:{$ref:"#/$defs/TaskId"},type:"array",uniqueItems:!0},created_at:{$ref:"#/$defs/UtcMicros"},deadline:{anyOf:[{$ref:"#/$defs/UtcMicros"},{type:"null"}]},dependencies:{items:{$ref:"#/$defs/TaskId"},type:"array",uniqueItems:!0},effort:{format:"uint32",minimum:0,type:"integer"},hierarchy:{$ref:"#/$defs/WorkHierarchyV1"},informational_relations:{items:{$ref:"#/$defs/TaskId"},type:"array",uniqueItems:!0},scheduled_at:{anyOf:[{$ref:"#/$defs/UtcMicros"},{type:"null"}]},task_id:{$ref:"#/$defs/TaskId"},title:{type:"string"},updated_at:{$ref:"#/$defs/UtcMicros"}},required:["task_id","hierarchy","title","dependencies","informational_relations","causal_candidates","acceptance_criteria","effort","created_at","updated_at"],type:"object"},b9={additionalProperties:!1,properties:{accepted_at:{anyOf:[{$ref:"#/$defs/UtcMicros"},{type:"null"}]},accepted_attempts:{items:{$ref:"#/$defs/WorkAttemptIdentityV1"},type:"array"},accepted_criteria:{additionalProperties:{type:"string"},type:"object"},accepted_proposal:{anyOf:[{$ref:"#/$defs/ProposalId"},{type:"null"}]},accepted_route:{anyOf:[{$ref:"#/$defs/WorkRouteDecisionV1"},{type:"null"}]},archived_at:{anyOf:[{$ref:"#/$defs/UtcMicros"},{type:"null"}]},evidence_links:{items:{type:"string"},type:"array",uniqueItems:!0},execution_admitted_at:{anyOf:[{$ref:"#/$defs/UtcMicros"},{type:"null"}]},handoffs:{items:{$ref:"#/$defs/WorkHandoffV1"},type:"array"},input:{$ref:"#/$defs/WorkItemInputV1"}},required:["input","evidence_links","accepted_criteria","accepted_attempts","handoffs"],type:"object"},b5={description:"A job task key: `[a-z0-9-]`, 1 to 48 bytes. Identities derive from it.",type:"string"},b8={additionalProperties:!1,properties:{epoch:{$ref:"#/$defs/WorkFenceEpochV1"},lease_id:{$ref:"#/$defs/WorkLeaseId"}},required:["lease_id","epoch"],type:"object"},b7={description:"Strongly typed canonical identity: `WorkLeaseId`.",type:"string"},$e={additionalProperties:!1,properties:{created_at:{$ref:"#/$defs/UtcMicros"},id:{type:"string"},plan_id:{type:"string"},title:{type:"string"}},required:["id","plan_id","title","created_at"],type:"object"},$t={description:"Ordinal band. Never a probability, never a scalar score.\n\nBands are ordered `Lowest` .. `Highest`. Comparison is the only operation\nconsumers perform over them, so no weighted sum can be reconstructed from\na recorded decision.",enum:["lowest","low","moderate","high","highest"],type:"string"},$r={description:"Closed set of conditions that block admission or removal.",oneOf:[{const:"dirty_tracked_files",description:"Tracked files differ from the index or HEAD.",type:"string"},{const:"untracked_data",description:"Untracked data is present in the target.",type:"string"},{const:"unique_commits",description:"The target holds commits reachable from nowhere else.",type:"string"},{const:"active_holder",description:"Another admitted placement holds this target.",type:"string"},{const:"unresolved_effect",description:"An effect against this placement is unresolved.",type:"string"},{const:"unacknowledged_receipt",description:"A receipt produced against this placement is unacknowledged.",type:"string"},{const:"uncertain_pull_request",description:"A pull request produced from this placement is in an uncertain state.",type:"string"},{const:"shared_ref",description:"A ref in this target is shared with another holder.",type:"string"},{const:"missing_anchor",description:"A retrieval or evidence anchor this placement referenced is missing.",type:"string"},{const:"stale_scope",description:"The authorized scope no longer matches the placement.",type:"string"},{const:"authorization_lost",description:"Authorization for this placement was lost.",type:"string"},{const:"target_unreadable",description:"The target could not be read, so its state is unknown.",type:"string"},{const:"network_required",description:"The placement declared itself network-free but the action needs network.",type:"string"}],title:"WorkPlacementBlockerV1"},$i={additionalProperties:!1,description:"Which run a placement belongs to. Placement never redefines TaskId.",properties:{run_id:{$ref:"#/$defs/RunId"},task_id:{$ref:"#/$defs/TaskId"}},required:["task_id","run_id"],title:"WorkPlacementIdentityV1",type:"object"},$o={description:"The supported placement choices, and only those.",oneOf:[{const:"no_managed_placement",description:"TraceDecay manages no checkout for this run. No-Git work is first class.",type:"string"},{const:"clean_in_place",description:"The caller's own strictly clean checkout, explicitly acknowledged.",type:"string"},{const:"linked_worktree",description:"A linked worktree of the same repository.",type:"string"},{const:"isolated_clone",description:"An isolated local clone.",type:"string"}],title:"WorkPlacementKindV1"},$n={description:"The durable state of one admitted placement.",oneOf:[{const:"admitted",description:"The placement holds its target.",type:"string"},{const:"released",description:"The placement gave its target up cleanly. Nothing was deleted by this\ntransition; removal is a separate cleanup preflight.",type:"string"},{const:"quarantined",description:"The placement was retained because removal is blocked.",type:"string"}],title:"WorkPlacementStateV1"},$a={additionalProperties:!1,description:"The exact placement a caller asked for.",properties:{in_place_acknowledged:{description:"Set only for `CleanInPlace`: the caller states it accepts running in\nits own checkout. Acknowledgement is explicit, never inferred.",type:"boolean"},kind:{$ref:"#/$defs/WorkPlacementKindV1"},network_free:{description:"The placement declares it needs no network. Declared, not detected.",type:"boolean"},root:{description:"Absolute root, present exactly when the kind manages one.",type:["string","null"]}},required:["kind","in_place_acknowledged","network_free"],title:"WorkPlacementTargetV1",type:"object"},$s={additionalProperties:!1,description:"One run's durable placement relation.",properties:{authority_version:{format:"uint64",minimum:0,type:"integer"},blockers:{items:{$ref:"#/$defs/WorkPlacementBlockerV1"},type:"array",uniqueItems:!0},identity:{$ref:"#/$defs/WorkPlacementIdentityV1"},retention_eligible_at:{anyOf:[{$ref:"#/$defs/UtcMicros"},{type:"null"}],description:"When retention makes this placement *eligible* for a fresh cleanup\npreflight. Eligibility is not delete authority."},state:{$ref:"#/$defs/WorkPlacementStateV1"},target:{$ref:"#/$defs/WorkPlacementTargetV1"},transitioned_at:{$ref:"#/$defs/UtcMicros"}},required:["identity","target","state","authority_version","transitioned_at","blockers"],title:"WorkPlacementV1",type:"object"},$d={additionalProperties:!1,properties:{created_at:{$ref:"#/$defs/UtcMicros"},id:{type:"string"},initiative_id:{type:"string"},title:{type:"string"}},required:["id","initiative_id","title","created_at"],type:"object"},$c={oneOf:[{additionalProperties:!1,properties:{kind:{const:"project",type:"string"},project_id:{$ref:"#/$defs/ProjectId"}},required:["kind","project_id"],type:"object"},{additionalProperties:!1,properties:{kind:{const:"repository",type:"string"},project_id:{$ref:"#/$defs/ProjectId"},repository_id:{$ref:"#/$defs/RepositoryId"}},required:["kind","project_id","repository_id"],type:"object"}]},$l={additionalProperties:!1,properties:{anchor_id:{$ref:"#/$defs/RetrievalAnchorId"},evidence_digest:{$ref:"#/$defs/ManifestDigest"},source_store_id:{$ref:"#/$defs/SourceStoreId"}},required:["source_store_id","anchor_id","evidence_digest"],type:"object"},$p={oneOf:[{additionalProperties:!1,properties:{graph:{$ref:"#/$defs/WorkProductGraphV1"},kind:{const:"created",type:"string"}},required:["kind","graph"],type:"object"},{additionalProperties:!1,properties:{change:{$ref:"#/$defs/WorkGraphChangeV1"},kind:{const:"changed",type:"string"}},required:["kind","change"],type:"object"}]},$u={additionalProperties:!1,properties:{actor_id:{$ref:"#/$defs/ActorId"},authorized_relation_scopes:{items:{$ref:"#/$defs/WorkProductAuthorizedRelationScopeV1"},type:"array"},canonical_input_digest:{$ref:"#/$defs/ManifestDigest"},catalog_generation_id:{$ref:"#/$defs/CatalogGenerationId"},causation_event_id:{type:["string","null"]},command_id:{$ref:"#/$defs/WorkCommandId"},configuration_revision_id:{$ref:"#/$defs/ConfigurationRevisionId"},event_id:{type:"string"},evidence:{items:{$ref:"#/$defs/WorkProductEventEvidenceV1"},type:"array"},expected_graph_version:{format:"uint64",minimum:0,type:["integer","null"]},occurred_at:{$ref:"#/$defs/UtcMicros"},owner_scope:{$ref:"#/$defs/WorkProductProfileScopeV1"},payload:{$ref:"#/$defs/WorkProductEventPayloadV1"},policy_revision_id:{type:"string"},result_graph_version:{format:"uint64",minimum:0,type:"integer"},sequence:{format:"uint64",minimum:0,type:"integer"},source_watermark:{additionalProperties:{format:"uint64",minimum:0,type:"integer"},type:"object"}},required:["event_id","sequence","actor_id","owner_scope","authorized_relation_scopes","result_graph_version","command_id","canonical_input_digest","evidence","source_watermark","occurred_at","policy_revision_id","configuration_revision_id","catalog_generation_id","payload"],type:"object"},$m={oneOf:[{additionalProperties:!1,properties:{authority:{const:"no_prior_graph",type:"string"}},required:["authority"],type:"object"},{additionalProperties:!1,properties:{authority:{const:"verified",type:"string"},verified_version:{$ref:"#/$defs/VerifiedWorkGraphVersionV1"}},required:["authority","verified_version"],type:"object"}]},$f={additionalProperties:!1,properties:{evidence:{items:{$ref:"#/$defs/TaskEvidenceLinkV1"},type:"array"},initiatives:{items:{$ref:"#/$defs/WorkInitiativeV1"},type:"array"},items:{items:{$ref:"#/$defs/WorkItemV1"},type:"array"},milestones:{items:{$ref:"#/$defs/WorkMilestoneV1"},type:"array"},plans:{items:{$ref:"#/$defs/WorkPlanV1"},type:"array"},proposal_decisions:{items:{$ref:"#/$defs/WorkProposalDecisionV1"},type:"array"},relation_replan_decisions:{items:{$ref:"#/$defs/WorkRelationReplanDecisionV1"},type:"array"},version:{format:"uint64",minimum:0,type:"integer"}},required:["version","initiatives","plans","milestones","items","proposal_decisions","relation_replan_decisions","evidence"],type:"object"},$h={additionalProperties:!1,properties:{causation_event_id:{type:["string","null"]},command_id:{$ref:"#/$defs/WorkCommandId"},evidence:{items:{$ref:"#/$defs/WorkProductEventEvidenceV1"},type:"array"},expected_authority:{$ref:"#/$defs/WorkProductExpectedAuthorityV1"},occurred_at:{$ref:"#/$defs/UtcMicros"},revisions:{$ref:"#/$defs/WorkProductRevisionPinsV1"}},required:["expected_authority","command_id","evidence","occurred_at","revisions"],type:"object"},$y={additionalProperties:!1,properties:{event:{$ref:"#/$defs/WorkProductEventV1"},replayed:{type:"boolean"},verified_graph_version:{$ref:"#/$defs/VerifiedWorkGraphVersionV1"}},required:["event","verified_graph_version","replayed"],type:"object"},$g={additionalProperties:!1,properties:{brain_id:{$ref:"#/$defs/BrainId"},profile_id:{$ref:"#/$defs/UserProfileId"}},required:["brain_id","profile_id"],type:"object"},$_={oneOf:[{properties:{initiative_id:{type:"string"},kind:{const:"initiative_contains_plan",type:"string"},plan_id:{type:"string"}},required:["kind","initiative_id","plan_id"],type:"object"},{properties:{kind:{const:"plan_contains_milestone",type:"string"},milestone_id:{type:"string"},plan_id:{type:"string"}},required:["kind","plan_id","milestone_id"],type:"object"},{properties:{kind:{const:"milestone_contains_task",type:"string"},milestone_id:{type:"string"},task_id:{$ref:"#/$defs/TaskId"}},required:["kind","milestone_id","task_id"],type:"object"},{properties:{dependency:{$ref:"#/$defs/TaskId"},dependent:{$ref:"#/$defs/TaskId"},kind:{const:"gates",type:"string"}},required:["kind","dependency","dependent"],type:"object"},{properties:{kind:{const:"informational",type:"string"},source:{$ref:"#/$defs/TaskId"},target:{$ref:"#/$defs/TaskId"}},required:["kind","source","target"],type:"object"},{properties:{cause:{$ref:"#/$defs/TaskId"},effect:{$ref:"#/$defs/TaskId"},kind:{const:"causal_candidate",type:"string"}},required:["kind","cause","effect"],type:"object"},{properties:{kind:{const:"evidence",type:"string"},link_id:{type:"string"},task_id:{$ref:"#/$defs/TaskId"}},required:["kind","task_id","link_id"],type:"object"},{properties:{identity:{$ref:"#/$defs/WorkAttemptIdentityV1"},kind:{const:"accepted_attempt",type:"string"},task_id:{$ref:"#/$defs/TaskId"}},required:["kind","task_id","identity"],type:"object"},{properties:{handoff_id:{type:"string"},kind:{const:"handoff",type:"string"},task_id:{$ref:"#/$defs/TaskId"}},required:["kind","task_id","handoff_id"],type:"object"},{properties:{kind:{const:"proposal_decision",type:"string"},proposal_id:{$ref:"#/$defs/ProposalId"},task_id:{$ref:"#/$defs/TaskId"}},required:["kind","task_id","proposal_id"],type:"object"}]},$v={additionalProperties:!1,properties:{catalog_generation_id:{$ref:"#/$defs/CatalogGenerationId"},configuration_revision_id:{$ref:"#/$defs/ConfigurationRevisionId"},policy_revision_id:{type:"string"}},required:["policy_revision_id","configuration_revision_id","catalog_generation_id"],type:"object"},$b={description:"The exact owner-relative relation set selected for a canonical Work graph.\n\nThis identity lives in the domain because attempt admission must retain\nit byte-for-byte through provider settlement. Reconstructing it from a\nproject context would conflate explicit no-Git work with a scoped\nrepository relation.",oneOf:[{properties:{selection:{const:"profile_owned_no_git",type:"string"}},required:["selection"],type:"object"},{properties:{relation_scopes:{items:{$ref:"#/$defs/WorkProductAuthorizedRelationScopeV1"},type:"array",uniqueItems:!0},selection:{const:"relations",type:"string"}},required:["selection","relation_scopes"],type:"object"}]},$$={additionalProperties:!1,properties:{decided_at:{$ref:"#/$defs/UtcMicros"},disposition:{$ref:"#/$defs/WorkProposalDispositionV1"},proposal:{$ref:"#/$defs/WorkProposalV1"}},required:["proposal","disposition","decided_at"],type:"object"},$S={enum:["accepted","rejected","superseded"],type:"string"},$k={additionalProperties:!1,properties:{based_on_version:{format:"uint64",minimum:0,type:"integer"},children:{items:{$ref:"#/$defs/WorkProposedChildV1"},type:"array"},configuration_digest:{$ref:"#/$defs/ManifestDigest"},evidence_digest:{$ref:"#/$defs/ManifestDigest"},explanation:{type:"string"},proposal_id:{$ref:"#/$defs/ProposalId"},route:{$ref:"#/$defs/WorkRouteDecisionV1"},shape:{$ref:"#/$defs/WorkShapeAssessmentV1"},sizing:{$ref:"#/$defs/WorkSizingV1"},task_id:{$ref:"#/$defs/TaskId"}},required:["proposal_id","task_id","based_on_version","shape","sizing","children","route","explanation","evidence_digest","configuration_digest"],type:"object"},$w={additionalProperties:!1,properties:{dependencies:{items:{$ref:"#/$defs/TaskId"},type:"array",uniqueItems:!0},effort:{format:"uint32",minimum:0,type:"integer"},task_id:{$ref:"#/$defs/TaskId"},title:{type:"string"}},required:["task_id","title","effort","dependencies"],type:"object"},$V={description:"Typed provider availability observed at negotiation. These are product\nstates, not transport errors: each one names why the configured native\nprovider could not run, without inventing a fallback.",oneOf:[{const:"absent",description:"No executable binding is configured for the pinned executable identity.",type:"string"},{const:"stale",description:"The configured binding no longer matches the pinned reference.",type:"string"},{const:"unsupported",description:"The configured binding does not admit the pinned backend/protocol.",type:"string"},{const:"digest_mismatch",description:"The on-disk executable bytes do not match the pinned digest.",type:"string"},{const:"unavailable",description:"The configured executable could not be read or is not executable.",type:"string"}]},$P={description:"Provider protocol selected by the pinned Work configuration snapshot.",enum:["claude_code_cli","codex_app_server","codex_cli"],type:"string"},$R={additionalProperties:!1,description:'Why an admitted attempt did not run on the backend its pinned execution\nsnapshot preferred.\n\nPlan 32 (`docs/plans/tracedecay-v2/32-dynamic-workflow-runtime-and-sdk.md`,\n"Native provider execution") admits the Codex CLI "only when app-server is\nunsupported or absent before session start and the pinned Plan 20 snapshot\nexplicitly allows that fallback", and the plan index requires that fallback\nto be "reported rather than hidden". This record is that report: it names\nthe preferred backend, the typed state that disqualified it, and the\nconfiguration-bounded fallback that was selected, so a fallback run can\nnever be read as a first choice.\n\nIt is also written when the fallback itself was refused, so a denial keeps\nboth failures instead of collapsing them into one state.',properties:{fallback_backend:{$ref:"#/$defs/WorkProviderBackendV1",description:"The backend named by the snapshot's configured fallback topology."},fallback_route:{$ref:"#/$defs/WorkProviderRouteV1",description:"The route that fallback runs on."},fallback_state:{anyOf:[{$ref:"#/$defs/WorkProviderAvailabilityV1"},{type:"null"}],description:"`None` when the fallback actually started; `Some(state)` when the\nfallback was itself refused."},preferred_backend:{$ref:"#/$defs/WorkProviderBackendV1",description:"The backend the pinned snapshot named first."},preferred_route:{$ref:"#/$defs/WorkProviderRouteV1",description:"The route that backend would have run on."},preferred_state:{$ref:"#/$defs/WorkProviderAvailabilityV1",description:"Why the preferred backend could not be used."}},required:["preferred_backend","preferred_route","preferred_state","fallback_backend","fallback_route"],type:"object"},$q={enum:["claude_stream_json","codex_app_server_json_rpc","codex_exec_json"],type:"string"},$I={description:"Strongly typed canonical identity: `WorkProviderRouteId`.",type:"string"},$x={additionalProperties:!1,properties:{provider_id:{$ref:"#/$defs/ProviderId"},route_id:{$ref:"#/$defs/WorkProviderRouteId"}},required:["provider_id","route_id"],type:"object"},$j={oneOf:[{properties:{state:{const:"fresh",type:"string"}},required:["state"],type:"object"},{properties:{checkpoint:{anyOf:[{$ref:"#/$defs/WorkArtifactRefV1"},{type:"null"}]},source_attempt_id:{$ref:"#/$defs/AttemptId"},state:{const:"resumed",type:"string"}},required:["state","source_attempt_id"],type:"object"},{properties:{reason:{$ref:"#/$defs/WorkRestartReasonV1"},source_attempt_id:{$ref:"#/$defs/AttemptId"},state:{const:"restarted",type:"string"}},required:["state","source_attempt_id","reason"],type:"object"},{description:"The attempt cannot continue and must be recovered. A first attempt\nlost before it ever resumed anything has no predecessor, so the source\nis absent rather than pointing at the attempt itself.",properties:{observed_at:{$ref:"#/$defs/UtcMicros"},reason:{$ref:"#/$defs/WorkRestartReasonV1"},source_attempt_id:{anyOf:[{$ref:"#/$defs/AttemptId"},{type:"null"}],default:null},state:{const:"recovery_required",type:"string"}},required:["state","reason","observed_at"],type:"object"}]},$C={additionalProperties:!1,properties:{decided_at:{$ref:"#/$defs/UtcMicros"},disposition:{$ref:"#/$defs/WorkProposalDispositionV1"},proposal:{$ref:"#/$defs/WorkRelationReplanProposalV1"}},required:["proposal","disposition","decided_at"],type:"object"},$T={additionalProperties:!1,properties:{based_on_version:{format:"uint64",minimum:0,type:"integer"},causal_candidates:{items:{$ref:"#/$defs/TaskId"},type:"array",uniqueItems:!0},dependencies:{items:{$ref:"#/$defs/TaskId"},type:"array",uniqueItems:!0},informational_relations:{items:{$ref:"#/$defs/TaskId"},type:"array",uniqueItems:!0},payload_digest:{$ref:"#/$defs/ManifestDigest"},proposal_id:{$ref:"#/$defs/ProposalId"},task_id:{$ref:"#/$defs/TaskId"}},required:["proposal_id","task_id","based_on_version","dependencies","informational_relations","causal_candidates","payload_digest"],type:"object"},$O={enum:["lease_lost","provider_unavailable","process_lost","failure_observed"],type:"string"},$E={enum:["runtime_failure","restart_recovery_required"],type:"string"},$A={additionalProperties:!1,description:"A selector into the owning runtime-terminal evidence authority.\n\n`evidence_ref` is an opaque local reference. The Work retry owner resolves\nit through [`WorkRetryEvidencePortV1`]; callers never submit the evidence\ndigest, outcome, or observation time that decides eligibility.",properties:{cause:{$ref:"#/$defs/WorkRetryCauseV1"},evidence_ref:{type:"string"},source:{$ref:"#/$defs/WorkRetrySourceV1"}},required:["source","cause","evidence_ref"],type:"object"},$W={enum:["runtime"],type:"string"},$M={additionalProperties:!1,description:"One eligible route supplied by the authorized configuration snapshot.\n\nThe application filters these candidates by the current request grant and\nverifies the exact pinned executable before policy evaluates them.",properties:{autonomy:{$ref:"#/$defs/WorkOrdinalBandV1"},content_location:{$ref:"#/$defs/WorkContentLocationClassV1"},correctness:{$ref:"#/$defs/WorkOrdinalBandV1"},cost:{$ref:"#/$defs/WorkOrdinalBandV1"},declared_budget_ceiling:{format:"uint64",minimum:0,type:"integer"},effort:{$ref:"#/$defs/WorkEffortClassV1"},evidence_quality:{$ref:"#/$defs/WorkOrdinalBandV1"},execution:{$ref:"#/$defs/WorkRouteExecutionProfileV1"},latency:{$ref:"#/$defs/WorkOrdinalBandV1"},model_id:{type:"string"},provider_capability_id:{type:"string"},route_id:{type:"string"},sensitive_data_fitness:{$ref:"#/$defs/WorkOrdinalBandV1"}},required:["route_id","provider_capability_id","model_id","effort","declared_budget_ceiling","content_location","correctness","sensitive_data_fitness","latency","cost","autonomy","evidence_quality","execution"],type:"object"},$N={oneOf:[{properties:{alternatives:{items:{$ref:"#/$defs/WorkProviderRouteV1"},type:"array"},decision:{const:"selected",type:"string"},exclusions:{items:{type:"string"},type:"array",uniqueItems:!0},fallback:{type:"string"},recommended:{$ref:"#/$defs/WorkProviderRouteV1"}},required:["decision","recommended","alternatives","exclusions","fallback"],type:"object"},{properties:{decision:{const:"abstained",type:"string"},reason:{type:"string"}},required:["decision","reason"],type:"object"}]},$z={additionalProperties:!1,description:"Complete execution constraints configured for one provider route.\n\nThe route candidate is the configuration authority for these values. Work\nadmission copies them into the immutable execution snapshot; provider\nadapters never supply defaults.",properties:{approval:{$ref:"#/$defs/WorkApprovalPolicy"},credential_references:{items:{$ref:"#/$defs/CredentialReferenceId"},type:"array",uniqueItems:!0},egress:{$ref:"#/$defs/WorkEgressPolicy"},environment_allowlist:{items:{type:"string"},type:"array",uniqueItems:!0},fallback:{$ref:"#/$defs/WorkFallbackTopology"},filesystem:{$ref:"#/$defs/WorkFilesystemPolicy"},limits:{$ref:"#/$defs/WorkExecutionLimits"},maximum_duration_micros:{description:"Maximum elapsed time from execution admission to provider completion.",format:"uint64",minimum:0,type:"integer"},sandbox:{$ref:"#/$defs/WorkSandboxPolicy"}},required:["sandbox","approval","filesystem","egress","environment_allowlist","credential_references","limits","maximum_duration_micros","fallback"],type:"object"},$D={description:"A monotonically versioned control authority.",format:"uint64",minimum:0,title:"WorkRunControlAuthorityV1",type:"integer"},$F={description:"Why a run was paused or resumed. A closed vocabulary keeps the reason out\nof free text so it can be read by a projection without being a prompt.",oneOf:[{const:"operator_request",description:"An authorized operator asked for the transition.",type:"string"},{const:"human_wait",description:"The run is waiting on a human approval or answer.",type:"string"},{const:"budget_exhausted",description:"The shared budget ledger is exhausted for now.",type:"string"},{const:"recovery",description:"Recovery or failover is reconciling the run.",type:"string"}],title:"WorkRunControlReasonV1"},$L={description:'The published control state of one run.\n\nThere is no `Cancelled` here: cancellation is an attempt-level authority\nowned through the lease fence, and duplicating it as a run state would\ncreate a second place a run could be "over".',oneOf:[{const:"running",description:"New reservations are admitted.",type:"string"},{const:"paused",description:"New reservations are fenced; committed evidence is preserved.",type:"string"}],title:"WorkRunControlStateV1"},$U={additionalProperties:!1,description:"The run's deadline as of the last control transition.\n\n`remaining_micros` is the authority; `deadline` is the absolute instant that\nremaining resolves to while the run is running. Both are recorded so a\nreader never has to recompute one from a clock it does not trust.",properties:{checkpoint_at:{$ref:"#/$defs/UtcMicros",description:"The instant the checkpoint was taken."},deadline:{$ref:"#/$defs/UtcMicros",description:"The absolute deadline the run is measured against right now."},remaining_micros:{description:"Micros left against that deadline at `checkpoint_at`. Never negative,\nand never larger than the value the previous checkpoint carried.",format:"int64",type:"integer"}},required:["deadline","remaining_micros","checkpoint_at"],title:"WorkRunDeadlineCheckpointV1",type:"object"},$H={enum:["required"],type:"string"},$G={enum:["ordinal","heuristic","calibrated_range"],type:"string"},$B={additionalProperties:!1,properties:{ambiguity:{format:"uint8",maximum:255,minimum:0,type:"integer"},blast_radius:{format:"uint8",maximum:255,minimum:0,type:"integer"},complexity:{format:"uint8",maximum:255,minimum:0,type:"integer"},integration_overhead:{format:"uint8",maximum:255,minimum:0,type:"integer"},score_kind:{$ref:"#/$defs/WorkScoreKindV1"}},required:["score_kind","complexity","ambiguity","blast_radius","integration_overhead"],type:"object"},$K={additionalProperties:!1,properties:{coverage:{type:"string"},high:{format:"uint32",minimum:0,type:"integer"},likely:{format:"uint32",minimum:0,type:"integer"},low:{format:"uint32",minimum:0,type:"integer"},score_kind:{$ref:"#/$defs/WorkScoreKindV1"}},required:["score_kind","low","likely","high","coverage"],type:"object"},$J={additionalProperties:!1,description:"Succeeded sources grouped by the exact artifact digest list they produced.\nGroups are ordered largest first; smaller groups are the minority\nevidence, and more than one group is the disagreement, preserved as\nstructure instead of being resolved by fiat.",properties:{artifacts:{description:"The artifact digest list every source in this group produced.",items:{$ref:"#/$defs/ManifestDigest"},type:"array"},sources:{description:"The concurring sources, in the caller's requested order.",items:{$ref:"#/$defs/WorkAttemptIdentityV1"},type:"array"}},required:["artifacts","sources"],type:"object"},$Z={description:"Why a synthesis request was answered with the unsynthesized set instead\nof an admitted attempt.",oneOf:[{const:"no_citable_sources",description:"No source contributed a citable artifact: every source failed, was\ncancelled, timed out, is still unknown, or succeeded without\ndeclaring artifacts. There is nothing a synthesis could truthfully\ncite.",type:"string"}]},$Q={additionalProperties:!1,description:"One immutable source envelope: which attempt, and what it truthfully\ncontributed at admission time.",properties:{outcome:{$ref:"#/$defs/WorkSynthesisSourceOutcomeV1"},source:{$ref:"#/$defs/WorkAttemptIdentityV1"}},required:["source","outcome"],type:"object"},$X={description:"One sibling attempt's terminal contribution, captured verbatim from the\nWork authority at admission time.",oneOf:[{description:"The source succeeded; its declared artifact digests, in declaration\norder, are the evidence a synthesis may cite.",properties:{artifacts:{items:{$ref:"#/$defs/ManifestDigest"},type:"array"},outcome:{const:"succeeded",type:"string"}},required:["outcome","artifacts"],type:"object"},{description:"The source failed; its sealed terminal evidence digest is preserved\nso the failure stays visible in the synthesis record.",properties:{evidence:{$ref:"#/$defs/ManifestDigest"},outcome:{const:"failed",type:"string"}},required:["outcome","evidence"],type:"object"},{description:"The source timed out; preserved like a failure.",properties:{evidence:{$ref:"#/$defs/ManifestDigest"},outcome:{const:"timed_out",type:"string"}},required:["outcome","evidence"],type:"object"},{description:"The source was cancelled; preserved like a failure.",properties:{evidence:{$ref:"#/$defs/ManifestDigest"},outcome:{const:"cancelled",type:"string"}},required:["outcome","evidence"],type:"object"},{description:"The source has not reached a terminal state. The unknown is preserved\nas an unknown; it contributes no citable evidence and is never\nguessed at.",properties:{outcome:{const:"unknown",type:"string"},state:{$ref:"#/$defs/WorkAttemptStateV1"}},required:["outcome","state"],type:"object"}]},$Y={additionalProperties:!1,description:"The ordered, digest-sealed source envelope set a synthesis admission\nconsumed. Reordering or mutating any envelope changes the digest, so a\nreplayed or tampered set is distinguishable from the admitted one.",properties:{set_digest:{$ref:"#/$defs/ManifestDigest",description:"Canonical digest over the ordered envelopes."},sources:{description:"The envelopes, exactly in the caller's requested order.",items:{$ref:"#/$defs/WorkSynthesisSourceEnvelopeV1"},type:"array"}},required:["sources","set_digest"],type:"object"},$1={additionalProperties:!1,properties:{attempt:{$ref:"#/$defs/WorkAttemptIdentityV1"},binding:{description:"Binds the continuation to the retrieve-evidence operation and the\nresult-shaping request fields the envelope does not echo.",type:"string"},participant_epoch:{$ref:"#/$defs/ManifestDigest"},ranking_cursor:{type:["string","null"]},source:{$ref:"#/$defs/ObservationSourceIdentityV1"},temporal_cursor:{type:["string","null"]},verified_version:{$ref:"#/$defs/VerifiedWorkGraphVersionV1"}},required:["verified_version","attempt","source","participant_epoch","binding"],type:"object"},$0={oneOf:[{properties:{evidence_digest:{$ref:"#/$defs/ManifestDigest"},observed_at:{$ref:"#/$defs/UtcMicros"},outcome:{const:"succeeded",type:"string"}},required:["outcome","evidence_digest","observed_at"],type:"object"},{properties:{evidence_digest:{$ref:"#/$defs/ManifestDigest"},observed_at:{$ref:"#/$defs/UtcMicros"},outcome:{const:"failed",type:"string"}},required:["outcome","evidence_digest","observed_at"],type:"object"},{properties:{evidence_digest:{$ref:"#/$defs/ManifestDigest"},observed_at:{$ref:"#/$defs/UtcMicros"},outcome:{const:"timed_out",type:"string"}},required:["outcome","evidence_digest","observed_at"],type:"object"},{properties:{evidence_digest:{$ref:"#/$defs/ManifestDigest"},observed_at:{$ref:"#/$defs/UtcMicros"},outcome:{const:"cancelled",type:"string"}},required:["outcome","evidence_digest","observed_at"],type:"object"}]},$2={description:"Strongly typed algorithm-tagged integrity digest: `WorkTopologyGenerationRefV1`.",type:"string"},$4={additionalProperties:!1,description:"Complete V1 policy. Partial values are intentionally impossible: callers\nmust provide the entire policy and validation rejects adapter-local defaults.",properties:{branch_naming:{$ref:"#/$defs/BranchNamingPolicyV1"},branch_topology:{$ref:"#/$defs/BranchTopologyPolicyV1"},concurrency:{$ref:"#/$defs/TopologyConcurrencyPolicyV1"},cross_merge:{$ref:"#/$defs/CrossMergePolicyV1"},escalation:{$ref:"#/$defs/TopologyEscalationPolicyV1"},gates:{$ref:"#/$defs/TopologyGatePolicyV1"},history_rewrite:{$ref:"#/$defs/HistoryRewritePolicyV1"},notifications:{$ref:"#/$defs/TopologyNotificationLevelV1"},placement:{$ref:"#/$defs/WorktreePlacementModeV1"},protected_refs:{items:{$ref:"#/$defs/ProtectedRefRuleV1"},type:"array"},retention:{$ref:"#/$defs/WorktreeRetentionPolicyV1"},review_topology:{$ref:"#/$defs/ReviewTopologyPolicyV1"},roots:{items:{$ref:"#/$defs/WorktreeRootPolicyV1"},type:"array"},schema_version:{format:"uint16",maximum:65535,minimum:0,type:"integer"}},required:["schema_version","placement","roots","branch_topology","review_topology","branch_naming","concurrency","cross_merge","gates","protected_refs","history_rewrite","escalation","retention","notifications"],type:"object"},$6={additionalProperties:!1,properties:{definition_id:{$ref:"#/$defs/WorkflowDefinitionId"},definition_version:{format:"uint64",minimum:0,type:"integer"},pinned_catalog_digest:{$ref:"#/$defs/ManifestDigest",description:"Must equal the live Work executable catalog digest. Validation and\nactivation report the current digest when this pin is stale."},pinned_configuration_digest:{$ref:"#/$defs/ManifestDigest"},pinned_policy_digest:{$ref:"#/$defs/ManifestDigest"},project_id:{$ref:"#/$defs/ProjectId"},steps:{items:{$ref:"#/$defs/WorkflowStep"},type:"array"}},required:["definition_id","definition_version","project_id","steps","pinned_policy_digest","pinned_configuration_digest","pinned_catalog_digest"],type:"object"},$3={description:"Strongly typed canonical identity: `WorkflowDefinitionId`.",type:"string"},$9={additionalProperties:!1,properties:{max_width:{format:"uint32",minimum:0,type:"integer"}},required:["max_width"],type:"object"},$5={description:"Strongly typed canonical identity: `WorkflowOperationRef`.",type:"string"},$8={description:"Strongly typed canonical identity: `WorkflowOutputName`.",type:"string"},$7={additionalProperties:!1,properties:{output_name:{$ref:"#/$defs/WorkflowOutputName"},producer_step_id:{$ref:"#/$defs/WorkflowStepId"}},required:["producer_step_id","output_name"],type:"object"},Se={additionalProperties:!1,properties:{fan_out:{anyOf:[{$ref:"#/$defs/WorkflowFanOut"},{type:"null"}]},inputs:{items:{$ref:"#/$defs/WorkflowOutputReference"},type:"array"},operation:{$ref:"#/$defs/WorkflowOperationRef"},outputs:{items:{$ref:"#/$defs/WorkflowOutputName"},type:"array"},predecessors:{items:{$ref:"#/$defs/WorkflowStepId"},type:"array",uniqueItems:!0},step_id:{$ref:"#/$defs/WorkflowStepId"}},required:["step_id","operation","predecessors","inputs","outputs"],type:"object"},St={description:"Strongly typed canonical identity: `WorkflowStepId`.",type:"string"},Sr={additionalProperties:!1,description:"A provider's claim that one artifact of a fan-out output synthesizes its\nsibling source artifacts.",properties:{cited_source_digests:{description:"Content digests of every source artifact the synthesis consumed.",items:{$ref:"#/$defs/ManifestDigest"},type:"array",uniqueItems:!0},output_name:{$ref:"#/$defs/WorkflowOutputName",description:"The fan-out output the synthesis belongs to."},synthesis_attempt:{$ref:"#/$defs/WorkAttemptIdentityV1",description:"The attempt that produced the synthesis artifact inside that output."}},required:["output_name","synthesis_attempt","cited_source_digests"],type:"object"},Si={enum:["require_clean","allow_untracked_only_for_preflight","read_only_preflight_only"],type:"string"},So={description:"Strongly typed canonical identity: `WorktreeId`.",type:"string"},Sn={description:"Monotonic epoch of the worktree inventory frozen into a stack revision.",format:"uint64",minimum:0,type:"integer"},Sa={description:"Strongly typed canonical identity: `WorktreeInventorySnapshotId`.",type:"string"},Ss={oneOf:[{properties:{kind:{const:"existing_worktree_only",type:"string"}},required:["kind"],type:"object"},{properties:{kind:{const:"sibling_of_primary_checkout",type:"string"}},required:["kind"],type:"object"},{properties:{kind:{const:"repository_local_root",type:"string"}},required:["kind"],type:"object"},{properties:{kind:{const:"configured_root",type:"string"},root_id:{type:"string"}},required:["kind","root_id"],type:"object"}]},Sd={additionalProperties:!1,properties:{abandoned_retention_seconds:{format:"uint64",minimum:1,type:["integer","null"]},automatic_gc:{$ref:"#/$defs/AutomaticWorktreeGcV1"},maximum_retained_per_repository:{format:"uint16",maximum:65535,minimum:1,type:["integer","null"]},terminal_retention_seconds:{format:"uint64",minimum:1,type:["integer","null"]}},required:["automatic_gc"],type:"object"},Sc={additionalProperties:!1,properties:{locator:{$ref:"#/$defs/SensitiveFilesystemLocatorV1"},maximum_active_worktrees:{format:"uint16",maximum:65535,minimum:1,type:"integer"},repository_scope:{$ref:"#/$defs/RepositoryPlacementScopeV1"},root_id:{type:"string"}},required:["root_id","locator","repository_scope","maximum_active_worktrees"],type:"object"},Sl=[{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,title:"ActiveProjectSurfaceRequestV1",type:"object"},{$defs:{ActiveProjectBranchV1:{additionalProperties:!1,properties:{branch_drifted:{type:"boolean"},branch_resolution:{type:"string"},current_branch:{type:["string","null"]},open_active_branch:{type:["string","null"]},serving_branch:{type:["string","null"]},tracked_branch_count:{format:"uint",minimum:0,type:"integer"},warnings:{items:{type:"string"},type:"array"}},required:["branch_resolution","branch_drifted","tracked_branch_count","warnings"],type:"object"},ActiveProjectResolutionSourceV1:{enum:["active_project"],type:"string"},ActiveProjectStorageV1:{additionalProperties:!1,properties:{class:{type:"string"},data_root:{type:"string"},graph_db_exists:{type:"boolean"},graph_db_path:{type:"string"},graph_db_size_bytes:{format:"uint64",minimum:0,type:"integer"},lcm_payload_root:{type:"string"},mode:{type:"string"},response_handle_root:{type:"string"},sessions_db_path:{type:"string"}},required:["class","mode","data_root","graph_db_path","graph_db_exists","graph_db_size_bytes","sessions_db_path","response_handle_root","lcm_payload_root"],type:"object"}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"The resolved active project of this MCP session.",properties:{branch:{$ref:"#/$defs/ActiveProjectBranchV1"},project_id:{type:["string","null"]},project_root:{type:"string"},repository_id:{type:"string"},resolution_source:{$ref:"#/$defs/ActiveProjectResolutionSourceV1"},scope_prefix:{type:["string","null"]},storage:{$ref:"#/$defs/ActiveProjectStorageV1"}},required:["repository_id","project_root","resolution_source","storage","branch"],title:"ActiveProjectResultV1",type:"object"},{$defs:{AdminCliScopeV1:{description:"What a cost or analytics action reads: the served project's ledgers and\nsessions, or the whole profile's.",enum:["project","profile"],type:"string"}},$schema:"https://json-schema.org/draft/2020-12/schema",oneOf:[{additionalProperties:!1,description:"Savings and provider-usage cost over `range` (`today`, `7d`, ...).",properties:{action:{const:"cost_summary",type:"string"},range:{type:"string"},scope:{$ref:"#/$defs/AdminCliScopeV1"}},required:["action","range","scope"],type:"object"},{additionalProperties:!1,description:"Import every host's transcripts into the project's session store.",properties:{action:{const:"sessions_import",type:"string"}},required:["action"],type:"object"},{additionalProperties:!1,description:"Converge project sessions with Git history.",properties:{action:{const:"sessions_git_sync",type:"string"},dry_run:{type:"boolean"},limit_sessions:{format:"uint",minimum:0,type:"integer"},since:{format:"int64",type:"integer"}},required:["action","since","limit_sessions","dry_run"],type:"object"},{additionalProperties:!1,properties:{action:{const:"sessions_sync_status",type:"string"},idempotency_key:{type:"string"}},required:["action","idempotency_key"],type:"object"},{additionalProperties:!1,properties:{action:{const:"sessions_sync_cancel",type:"string"},idempotency_key:{type:"string"}},required:["action","idempotency_key"],type:"object"},{additionalProperties:!1,properties:{action:{const:"sessions_unfinished",type:"string"},limit:{format:"uint",minimum:0,type:"integer"}},required:["action","limit"],type:"object"},{additionalProperties:!1,description:"Import hook analytics JSONL into the accounting ledger.",properties:{action:{const:"analytics_sync",type:"string"},scope:{$ref:"#/$defs/AdminCliScopeV1"}},required:["action","scope"],type:"object"},{additionalProperties:!1,properties:{action:{const:"analytics_diagnostics",type:"string"},all:{type:"boolean"},no_sync:{type:"boolean"},scope:{$ref:"#/$defs/AdminCliScopeV1"}},required:["action","scope","all","no_sync"],type:"object"},{additionalProperties:!1,description:"Record the served project's saved-token total.",properties:{action:{const:"registry_update",type:"string"},tokens:{format:"uint64",minimum:0,type:"integer"}},required:["action","tokens"],type:"object"},{additionalProperties:!1,properties:{action:{const:"registry_list",type:"string"},limit:{format:"uint",minimum:0,type:"integer"},project_arg:{description:"Checkout to mark active when the caller's connection names no\nproject.",type:["string","null"]},query:{type:["string","null"]}},required:["action","limit"],type:"object"},{additionalProperties:!1,properties:{action:{const:"registry_context",type:"string"},project_arg:{description:"Project path or alias; the caller's project when omitted.",type:["string","null"]}},required:["action"],type:"object"},{additionalProperties:!1,properties:{action:{const:"registry_empty",type:"string"}},required:["action"],type:"object"},{additionalProperties:!1,properties:{action:{const:"registry_project_tokens",type:"string"},project_args:{items:{type:"string"},type:"array"}},required:["action","project_args"],type:"object"},{additionalProperties:!1,description:"Plan, or with `apply` execute, collection of registry rows whose\ncheckout is gone.",properties:{action:{const:"registry_gc",type:"string"},apply:{type:"boolean"},prefix:{type:["string","null"]}},required:["action","apply"],type:"object"},{additionalProperties:!1,description:"One project's storage (`project_id` with `project_root`), or one page\nof the profile's.",properties:{action:{const:"storage_report",type:"string"},cursor:{default:null,type:["string","null"]},limit:{default:8,format:"uint",minimum:0,type:"integer"},project_id:{type:["string","null"]},project_root:{type:["string","null"]}},required:["action"],type:"object"},{additionalProperties:!1,properties:{action:{const:"gain_query",type:"string"},history:{type:"boolean"},project_arg:{type:["string","null"]},since:{format:"int64",type:"integer"}},required:["action","since","history"],type:"object"}],title:"AdminCliSurfaceRequestV1"},{$defs:{AdminCliAnalyticsImportV1:{additionalProperties:!1,properties:{imported:{format:"uint64",minimum:0,type:"integer"},sources:{description:"One row per hook JSONL source: `path`, `imported`, `skipped`, `error`.",items:!0,type:"array"}},required:["imported","sources"],type:"object"},AdminCliCostSummaryV1:{additionalProperties:!1,properties:{range:{type:"string"},summary:{$ref:"#/$defs/AdminCliCostTotalsV1"},today:{$ref:"#/$defs/AdminCliCostTodayV1"}},required:["range","summary","today"],type:"object"},AdminCliCostTodayV1:{additionalProperties:!1,properties:{provider_usage:!0},required:["provider_usage"],type:"object"},AdminCliCostTotalsV1:{additionalProperties:!1,properties:{efficiency_ratio:{description:"Saved over saved-plus-consumed; null when consumption is unmeasured.",format:"double",type:["number","null"]},provider_usage:{description:"The provider-usage cost summary as the session memory prices it."},tokens_saved:{format:"uint64",minimum:0,type:"integer"}},required:["provider_usage","tokens_saved"],type:"object"},AdminCliGainDayV1:{additionalProperties:!1,properties:{calls:{format:"uint64",minimum:0,type:"integer"},day:{description:"Start-of-day epoch seconds (UTC).",format:"int64",type:"integer"},saved_tokens:{format:"uint64",minimum:0,type:"integer"}},required:["day","saved_tokens","calls"],type:"object"},AdminCliGainHistoryV1:{additionalProperties:!1,properties:{history:{items:{$ref:"#/$defs/AdminCliGainDayV1"},type:"array"}},required:["history"],type:"object"},AdminCliGainTotalV1:{additionalProperties:!1,properties:{calls:{format:"uint64",minimum:0,type:"integer"},saved_tokens:{format:"uint64",minimum:0,type:"integer"}},required:["saved_tokens","calls"],type:"object"},AdminCliProjectTokenTotalV1:{additionalProperties:!1,description:"A project whose ledger could not be read reports a null total and the\nreason, never a measured zero.",properties:{error:{type:["string","null"]},project:{type:"string"},tokens:{format:"uint64",minimum:0,type:["integer","null"]}},required:["project"],type:"object"},AdminCliProjectTokensV1:{additionalProperties:!1,properties:{projects:{items:{$ref:"#/$defs/AdminCliProjectTokenTotalV1"},type:"array"}},required:["projects"],type:"object"},AdminCliRegistryContextV1:{oneOf:[{additionalProperties:!1,properties:{aliases:{description:"Alias rows exactly as the registry serializes them.",items:!0,type:"array"},profile_id:{type:"string"},project:{$ref:"#/$defs/PublicCodeProject"},status:{const:"ok",type:"string"},stores:{description:"Store rows exactly as the registry serializes them.",items:!0,type:"array"}},required:["status","profile_id","project","aliases","stores"],type:"object"},{additionalProperties:!1,description:"The call named no project and its connection has none.",properties:{project:{type:"null"},status:{const:"invalid",type:"string"}},required:["status","project"],type:"object"},{additionalProperties:!1,properties:{project:{type:"null"},status:{const:"not_found",type:"string"}},required:["status","project"],type:"object"}]},AdminCliRegistryEmptyV1:{additionalProperties:!1,properties:{empty:{type:"boolean"}},required:["empty"],type:"object"},AdminCliRegistryGcV1:{additionalProperties:!1,description:"The registry collection plan, with its deletion counters filled when it\nwas applied.",properties:{apply:{type:"boolean"},candidate_count:{format:"uint",minimum:0,type:"integer"},candidate_paths:{items:{type:"string"},type:"array"},candidates:{description:"Registry project rows exactly as the registry serializes them.",items:!0,type:"array"},code_project_candidate_count:{format:"uint",minimum:0,type:"integer"},deleted_code_project_count:{format:"uint",minimum:0,type:"integer"},deleted_count:{format:"uint",minimum:0,type:"integer"},deleted_storage_project_count:{format:"uint",minimum:0,type:"integer"},metadata_candidate_count:{format:"uint",minimum:0,type:"integer"},prefix:{type:["string","null"]},protected_code_project_count:{format:"uint",minimum:0,type:"integer"},protected_code_projects:{items:!0,type:"array"},storage_project_candidate_count:{format:"uint",minimum:0,type:"integer"},storage_project_candidates:{items:{type:"string"},type:"array"}},required:["apply","candidate_count","metadata_candidate_count","code_project_candidate_count","storage_project_candidate_count","protected_code_project_count","deleted_count","deleted_code_project_count","deleted_storage_project_count","candidate_paths","candidates","protected_code_projects","storage_project_candidates"],type:"object"},AdminCliRegistryListV1:{oneOf:[{additionalProperties:!1,properties:{limit:{format:"uint",minimum:0,type:"integer"},project_tree:{items:{$ref:"#/$defs/ProjectRepoGroup"},type:"array"},projects:{items:{$ref:"#/$defs/PublicCodeProject"},type:"array"},query:{type:["string","null"]},status:{const:"ok",type:"string"},summary:{$ref:"#/$defs/ProjectRegistrySummary"},truncated:{type:"boolean"}},required:["status","limit","truncated","summary","project_tree","projects"],type:"object"}]},AdminCliRegistryUpdateV1:{additionalProperties:!1,properties:{current:{format:"uint64",minimum:0,type:"integer"},previous:{description:"The total before this write; null when the ledger could not be read.",format:"uint64",minimum:0,type:["integer","null"]},previous_error:{type:["string","null"]}},required:["current"],type:"object"},AdminCliSessionSyncV1:{description:"The daemon session-sync owner's answer.",oneOf:[{additionalProperties:!1,properties:{accepted_at:{$ref:"#/$defs/UtcMicros"},idempotency_key:{type:"string"},operation_id:{type:"string"},status:{const:"accepted",type:"string"}},required:["status","operation_id","idempotency_key","accepted_at"],type:"object"},{additionalProperties:!1,description:"An identical sync was already running; this call joined it.",properties:{accepted_at:{$ref:"#/$defs/UtcMicros"},idempotency_key:{type:"string"},operation_id:{type:"string"},status:{const:"joined",type:"string"}},required:["status","operation_id","idempotency_key","accepted_at"],type:"object"},{additionalProperties:!1,properties:{coalesced_primary:{type:["string","null"]},completed_at:{$ref:"#/$defs/UtcMicros"},coverage:{items:{$ref:"#/$defs/SessionSyncSourceCoverageV1"},type:"array"},failure_codes:{items:{type:"string"},type:"array"},idempotency_key:{type:"string"},operation_id:{type:"string"},source:{$ref:"#/$defs/SessionSyncSourceV1"},source_frontiers:{items:{$ref:"#/$defs/SessionSyncSourceFrontierV1"},type:"array"},stats:{$ref:"#/$defs/SessionSyncStatsV1"},status:{const:"complete",type:"string"},termination:{$ref:"#/$defs/OperationTermination"}},required:["status","operation_id","idempotency_key","source","termination","stats","coverage","source_frontiers","failure_codes","completed_at"],type:"object"},{additionalProperties:!1,properties:{status:{const:"cancelled",type:"string"}},required:["status"],type:"object"},{additionalProperties:!1,properties:{status:{const:"deadline_exceeded",type:"string"}},required:["status"],type:"object"},{additionalProperties:!1,properties:{status:{const:"wrong_scope",type:"string"}},required:["status"],type:"object"},{additionalProperties:!1,properties:{reason_code:{type:"string"},status:{const:"unavailable",type:"string"}},required:["status","reason_code"],type:"object"}]},AdminCliStorageReportV1:{additionalProperties:!1,description:"One storage report page, or one project's report.",properties:{code_generation_retention:{items:!0,type:"array"},code_generation_retention_availability:{items:!0,type:"array"},coverage:!0,full_profile_size:!0,global_db_bytes:{format:"uint64",minimum:0,type:"integer"},profile_root:{type:"string"},stores:{description:"Report rows exactly as the retention report serializes them.",items:!0,type:"array"},unregistered_bytes:{format:"uint64",minimum:0,type:"integer"},unregistered_dir_count:{format:"uint",minimum:0,type:"integer"},user_sessions_db_bytes:{default:0,format:"uint64",minimum:0,type:"integer"}},required:["profile_root","stores","code_generation_retention","code_generation_retention_availability","unregistered_dir_count","unregistered_bytes","global_db_bytes","coverage"],type:"object"},AdminCliUnfinishedSessionsV1:{additionalProperties:!1,properties:{items:{description:"Workflow state rows exactly as the session store serializes them.",items:!0,type:"array"}},required:["items"],type:"object"},OperationTermination:_e,ProjectRegistryEntry:_f,ProjectRegistrySummary:_h,ProjectRepoGroup:_y,PublicCodeProject:_P,SessionSyncCoverageV1:{oneOf:[{properties:{outcome:{const:"complete",type:"string"}},required:["outcome"],type:"object"},{properties:{deferred_units:{format:"uint64",minimum:0,type:"integer"},outcome:{const:"partial",type:"string"}},required:["outcome","deferred_units"],type:"object"},{properties:{admitted_units:{format:"uint64",minimum:0,type:"integer"},outcome:{const:"backpressured",type:"string"},rejected_units:{format:"uint64",minimum:0,type:"integer"}},required:["outcome","admitted_units","rejected_units"],type:"object"}]},SessionSyncSourceCoverageV1:{properties:{coverage:{$ref:"#/$defs/SessionSyncCoverageV1"},store_scope:{type:"string"}},required:["store_scope","coverage"],type:"object"},SessionSyncSourceFrontierV1:{description:"Exact canonical observation cursor committed by one source/store authority.",properties:{committed_cursor_json:{type:"string"},scope_json:{type:"string"},source_json:{type:"string"},store_scope:{type:"string"}},required:["store_scope","source_json","scope_json","committed_cursor_json"],type:"object"},SessionSyncSourceV1:{description:"The command that started a session sync, without its options.",oneOf:[{const:"import_transcripts",description:"Hands its remaining historical catch-up to the background refresh\nworkers.",type:"string"},{const:"synchronize_git",description:"A bounded foreground pass; nothing resumes its unfinished coverage.",type:"string"}]},SessionSyncStatsV1:{properties:{commits_attributed:{format:"uint64",minimum:0,type:"integer"},messages_imported:{format:"uint64",minimum:0,type:"integer"},sessions_imported:{format:"uint64",minimum:0,type:"integer"},sessions_scanned:{format:"uint64",minimum:0,type:"integer"},skipped:{format:"uint64",minimum:0,type:"integer"},spans_written:{format:"uint64",minimum:0,type:"integer"}},required:["sessions_imported","messages_imported","sessions_scanned","spans_written","commits_attributed","skipped"],type:"object"},UtcMicros:bs},$schema:"https://json-schema.org/draft/2020-12/schema",anyOf:[{$ref:"#/$defs/AdminCliCostSummaryV1"},{$ref:"#/$defs/AdminCliSessionSyncV1"},{$ref:"#/$defs/AdminCliUnfinishedSessionsV1"},{$ref:"#/$defs/AdminCliAnalyticsImportV1"},{$ref:"#/$defs/AdminCliRegistryUpdateV1"},{$ref:"#/$defs/AdminCliRegistryListV1"},{$ref:"#/$defs/AdminCliRegistryContextV1"},{$ref:"#/$defs/AdminCliRegistryEmptyV1"},{$ref:"#/$defs/AdminCliProjectTokensV1"},{$ref:"#/$defs/AdminCliRegistryGcV1"},{$ref:"#/$defs/AdminCliStorageReportV1"},{$ref:"#/$defs/AdminCliGainHistoryV1"},{$ref:"#/$defs/AdminCliGainTotalV1"},{description:"The diagnostics report is the analytics bridge's open document; it\ndecodes last so it never claims another action's body."}],description:"One action's answer.",title:"AdminCliResultV1"},{$defs:{AutomaticFactReceiptStateV1:ft,AutomationReconcileScope:fa},$schema:"https://json-schema.org/draft/2020-12/schema",description:"Every action is a struct variant: an internally tagged unit variant would\nignore keys beside its tag instead of refusing them.",oneOf:[{additionalProperties:!1,description:"Read the project's local usage counter.",properties:{action:{const:"counter_get",type:"string"}},required:["action"],type:"object"},{additionalProperties:!1,description:"Reset the project's local usage counter to zero.",properties:{action:{const:"counter_reset",type:"string"}},required:["action"],type:"object"},{additionalProperties:!1,description:"Record the project's saved-token total in the profile registry and\nread it back beside the other projects' total.",properties:{action:{const:"status_accounting",type:"string"}},required:["action"],type:"object"},{additionalProperties:!1,description:"List terminal automatic-fact receipts.",properties:{action:{const:"automatic_fact_receipt_list",type:"string"},limit:{format:"uint",minimum:0,type:"integer"},state:{anyOf:[{$ref:"#/$defs/AutomaticFactReceiptStateV1"},{type:"null"}],description:"Only receipts in this state (default: every state)."}},required:["action","limit"],type:"object"},{additionalProperties:!1,description:"Read one automatic-fact receipt by its apply id.",properties:{action:{const:"automatic_fact_receipt_view",type:"string"},id:{type:"string"}},required:["action","id"],type:"object"},{additionalProperties:!1,description:"Reconcile automation schedulers with the saved configuration.",properties:{action:{const:"automation_reconcile",type:"string"},scope:{$ref:"#/$defs/AutomationReconcileScope"}},required:["action","scope"],type:"object"}],title:"AdminProjectSurfaceRequestV1"},{$defs:{AdminProjectCounterResetV1:{additionalProperties:!1,properties:{reset:{description:"Always true: a reset that did not settle is a refusal.",type:"boolean"}},required:["reset"],type:"object"},AdminProjectCounterV1:{additionalProperties:!1,properties:{counter:{format:"uint64",minimum:0,type:"integer"}},required:["counter"],type:"object"},AdminProjectStatusAccountingV1:{additionalProperties:!1,properties:{global_tokens_saved:{description:"Tokens the profile's other projects saved; null when they saved none.",format:"uint64",minimum:0,type:["integer","null"]},tokens_saved:{format:"uint64",minimum:0,type:"integer"}},required:["tokens_saved"],type:"object"},AutomaticFactAddRequestV1:{additionalProperties:!1,description:"The add-fact request an automatic apply recorded.",properties:{category:{$ref:"#/$defs/FactCategoryV1"},content:{type:"string"},entities:{items:{type:"string"},type:"array"},metadata:!0,source_label:{type:["string","null"]},tags:{items:{type:"string"},type:"array"},trust:{format:"double",type:"number"}},required:["content","category","tags","entities","trust","metadata"],type:"object"},AutomaticFactEvidenceV1:{additionalProperties:!1,description:"Automation evidence retained with the receipt.",properties:{evidence_hash:{type:["string","null"]},item:!0,validation:!0},type:"object"},AutomaticFactReceiptAvailabilityV1:{oneOf:[{additionalProperties:!1,properties:{state:{const:"available",type:"string"}},required:["state"],type:"object"}]},AutomaticFactReceiptListV1:{additionalProperties:!1,properties:{availability:{$ref:"#/$defs/AutomaticFactReceiptAvailabilityV1"},count:{format:"uint",minimum:0,type:"integer"},next_after_apply_id:{description:"Continue after this apply id; null on the last page.",type:["string","null"]},receipts:{items:{$ref:"#/$defs/AutomaticFactReceiptV1"},type:"array"}},required:["availability","count","receipts"],type:"object"},AutomaticFactReceiptStateV1:ft,AutomaticFactReceiptV1:{additionalProperties:!1,description:"One terminal automatic-fact apply receipt.",properties:{add_fact_request:{$ref:"#/$defs/AutomaticFactAddRequestV1"},applied_fact_id:{description:"Present when the fact was applied.",type:["string","null"]},apply_id:{type:"string"},evidence:{$ref:"#/$defs/AutomaticFactEvidenceV1"},operation_id:{type:"string"},quarantine_reason:{description:"Present when the fact was quarantined.",type:["string","null"]},recorded_at_micros:{format:"int64",type:"integer"},state:{$ref:"#/$defs/AutomaticFactReceiptStateV1"}},required:["apply_id","state","operation_id","add_fact_request","evidence","recorded_at_micros"],type:"object"},AutomaticFactReceiptViewV1:{additionalProperties:!1,properties:{receipt:{$ref:"#/$defs/AutomaticFactReceiptV1"}},required:["receipt"],type:"object"},AutomationReconcileScope:fa,AutomationSchedulerOwnerReconcileOutcome:{additionalProperties:!1,properties:{graph_db_path:{type:"string"},outcome:{$ref:"#/$defs/AutomationSchedulerReconcileOutcome"},project_id:{type:["string","null"]},scope_prefix:{type:["string","null"]},store_root:{type:"string"}},required:["store_root","graph_db_path","outcome"],type:"object"},AutomationSchedulerReconcileOutcome:{description:"What reconciling one automation scheduler did.",enum:["started","running_notified","exiting","finished","retiring","not_configured","lifecycle_inactive","owner_unavailable"],type:"string"},FactCategoryV1:h9,ProfileAutomationReconcileReport:{additionalProperties:!1,description:"Every cached project scheduler of the profile, reconciled.",properties:{cached_owners:{format:"uint",minimum:0,type:"integer"},outcomes:{items:{$ref:"#/$defs/AutomationSchedulerOwnerReconcileOutcome"},type:"array"},scope:{$ref:"#/$defs/AutomationReconcileScope",description:"Always `profile`."},uncached_projects:{$ref:"#/$defs/UncachedProjectReconcileOutcome"}},required:["scope","cached_owners","outcomes","uncached_projects"],type:"object"},ProjectAutomationReconcileReport:{additionalProperties:!1,description:"The served project's scheduler reconcile.",properties:{outcome:{$ref:"#/$defs/AutomationSchedulerReconcileOutcome"},scope:{$ref:"#/$defs/AutomationReconcileScope",description:"Always `project`."}},required:["scope","outcome"],type:"object"},UncachedProjectReconcileOutcome:{description:"A project whose scheduler is not cached reconciles when it next starts.",enum:["deferred_until_project_startup"],type:"string"}},$schema:"https://json-schema.org/draft/2020-12/schema",anyOf:[{$ref:"#/$defs/AdminProjectCounterV1"},{$ref:"#/$defs/AdminProjectCounterResetV1"},{$ref:"#/$defs/AdminProjectStatusAccountingV1"},{$ref:"#/$defs/AutomaticFactReceiptListV1"},{$ref:"#/$defs/AutomaticFactReceiptViewV1"},{$ref:"#/$defs/ProjectAutomationReconcileReport"},{$ref:"#/$defs/ProfileAutomationReconcileReport"}],description:"One action's result, in the shape the action has always answered.",title:"AdminProjectResultV1"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"`tracedecay_admin_sync` takes no arguments: it reconciles the served\nproject.",title:"AdminSyncSurfaceRequestV1",type:"object"},{$defs:{AdminSyncAdmissionV1:{description:"The code-index scheduler's admission of the reconcile.",oneOf:[{enum:["queued"],type:"string"},{const:"not_applicable",description:"Code indexing does not apply to this project.",type:"string"}]},AdminSyncReconcileScopeV1:{description:"What the reconcile covers.",enum:["authoritative_project"],type:"string"}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{project_root:{type:"string"},reconcile_scope:{$ref:"#/$defs/AdminSyncReconcileScopeV1"},status:{$ref:"#/$defs/AdminSyncAdmissionV1"}},required:["reconcile_scope","status","project_root"],title:"AdminSyncResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{depth:{description:"Maximum dependency traversal depth (default: 5, at most 10).",format:"uint32",minimum:0,type:["integer","null"]},files:{description:"List of changed file paths to analyze.",items:{type:"string"},type:"array"},filter:{description:"Custom glob pattern for test files (default: common test patterns).",type:["string","null"]}},required:["files"],title:"AffectedSurfaceRequestV1",type:"object"},{$defs:{AffectedRankingMetadataV1:{additionalProperties:!1,properties:{compatibility_field:{type:"string"},distance:{type:"string"},recommended_proximity:{items:{type:"string"},type:"array"},strategy:{type:"string"}},required:["strategy","distance","recommended_proximity","compatibility_field"],type:"object"},CodeIndexBuildBlockedReasonV1:fF,CodeIndexConvergenceParkedV1:fL,CodeIndexStalenessStateV1:fB,PrimitiveFreshnessStateV1:_i,PrimitiveIndexingStateV1:_o,PrimitiveSearchFreshnessV1:_d,RankedAffectedTestV1:{additionalProperties:!1,properties:{distance:{format:"uint",minimum:0,type:"integer"},path:{type:"string"},proximity:{type:"string"},rank:{format:"uint",minimum:0,type:"integer"}},required:["path","rank","distance","proximity"],type:"object"}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{affected_tests:{items:{type:"string"},type:"array"},changed_files:{items:{type:"string"},type:"array"},count:{format:"uint",minimum:0,type:"integer"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},ranked_tests:{items:{$ref:"#/$defs/RankedAffectedTestV1"},type:"array"},ranking_metadata:{$ref:"#/$defs/AffectedRankingMetadataV1"},recommended_tests:{description:"Tests within two dependency hops of a changed file.",items:{type:"string"},type:"array"}},required:["changed_files","affected_tests","count","ranked_tests","recommended_tests","ranking_metadata"],title:"AffectedResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Opaque daemon-minted handle accepted by the first feedback read invocation.",properties:{request_handle:{type:"string"}},required:["request_handle"],title:"FeedbackHandleRequestV1",type:"object"},{$defs:{AgentInstanceId:mH,CodeGenerationId:fz,CommitId:fX,FeedbackContentIdentityV1:yh,FeedbackCycleId:yy,FeedbackImpactStateV1:yP,FeedbackResultId:yq,FeedbackScopeV1:yI,FeedbackTargetV1:yx,FileOccurrenceId:yj,HostInstanceId:ge,ManifestDigest:gj,ProjectId:_m,RepositoryId:_z,RetrievalAnchorId:_J,SessionId:vv,SourceSpan:vF,SymbolOccurrenceId:vJ,WorktreeId:So},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Canonical affected-tests projection returned by `affected_tests`.",properties:{affected_tests:{items:{$ref:"#/$defs/SymbolOccurrenceId"},type:"array"},content_identity:{anyOf:[{$ref:"#/$defs/FeedbackContentIdentityV1"},{type:"null"}]},cycle_id:{$ref:"#/$defs/FeedbackCycleId"},evidence_anchors:{items:{$ref:"#/$defs/RetrievalAnchorId"},type:"array"},result_id:{$ref:"#/$defs/FeedbackResultId"},scope:{$ref:"#/$defs/FeedbackScopeV1"},state:{anyOf:[{$ref:"#/$defs/FeedbackImpactStateV1"},{type:"null"}]},target:{anyOf:[{$ref:"#/$defs/FeedbackTargetV1"},{type:"null"}]}},required:["result_id","cycle_id","scope","affected_tests","evidence_anchors"],title:"CanonicalAffectedTestsProjectionV1",type:"object"},{$defs:{AnalyticsScopeV1:mJ,AnalyticsSectionV1:{enum:["tools","hints","facts","automation"],type:"string"}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{scope:{anyOf:[{$ref:"#/$defs/AnalyticsScopeV1"},{type:"null"}],description:'"project" (default) scopes analytics_events to the resolved project;\n"all" reports across every registered project.'},section:{anyOf:[{$ref:"#/$defs/AnalyticsSectionV1"},{type:"null"}],description:"Optional filter to a single section. Omit to return all sections."},window_days:{description:"Lookback window in days for events and automation runs (default: 14,\n1-365).",format:"uint32",maximum:365,minimum:1,type:["integer","null"]}},title:"AnalyticsSurfaceRequestV1",type:"object"},{$defs:{AnalyticsAutomationJobOutcomesV1:{additionalProperties:!1,properties:{failed:{format:"int64",type:"integer"},job:{type:"string"},other:{format:"int64",type:"integer"},skipped:{format:"int64",type:"integer"},succeeded:{format:"int64",type:"integer"}},required:["job","succeeded","failed","skipped","other"],type:"object"},AnalyticsAutomationOutcomesV1:{additionalProperties:!1,description:"`available` is always `true`.",properties:{available:{type:"boolean"},by_job:{items:{$ref:"#/$defs/AnalyticsAutomationJobOutcomesV1"},type:"array"},dashboard_root:{type:"string"},records_considered:{format:"uint",minimum:0,type:"integer"},records_in_window:{format:"uint",minimum:0,type:"integer"},records_truncated:{type:"boolean"}},required:["available","dashboard_root","records_considered","records_in_window","records_truncated","by_job"],type:"object"},AnalyticsAutomationSectionV1:{anyOf:[{$ref:"#/$defs/AnalyticsAutomationOutcomesV1"},{$ref:"#/$defs/AnalyticsLedgerUnavailableV1"},{$ref:"#/$defs/AnalyticsSectionUnavailableV1"}],description:"The automation run outcomes of the resolved project's ledger, or why the\nledger is unavailable."},AnalyticsCanonicalCallNameV1:{additionalProperties:!1,description:"A recorded event name that resolved to a canonical tool under another\nspelling.",properties:{calls:{format:"int64",type:"integer"},canonical_tool_name:{type:"string"},errors:{format:"int64",type:"integer"},event_name:{type:"string"}},required:["event_name","canonical_tool_name","calls","errors"],type:"object"},AnalyticsEventCallNameV1:{additionalProperties:!1,description:"A recorded event name with no advertised canonical tool.",properties:{calls:{format:"int64",type:"integer"},errors:{format:"int64",type:"integer"},event_name:{type:"string"}},required:["event_name","calls","errors"],type:"object"},AnalyticsFactFunnelV1:{additionalProperties:!1,description:"`available` is always `true`.",properties:{available:{type:"boolean"},facts:{format:"uint64",minimum:0,type:"integer"},facts_rated:{format:"uint64",minimum:0,type:"integer"},facts_retrieved:{format:"uint64",minimum:0,type:"integer"},helpful_feedback:{format:"uint64",minimum:0,type:"integer"},project_root:{type:"string"},retrievals:{format:"uint64",minimum:0,type:"integer"},unhelpful_feedback:{format:"uint64",minimum:0,type:"integer"}},required:["available","project_root","facts","retrievals","facts_retrieved","helpful_feedback","unhelpful_feedback","facts_rated"],type:"object"},AnalyticsFactsSectionV1:{anyOf:[{$ref:"#/$defs/AnalyticsFactFunnelV1"},{$ref:"#/$defs/AnalyticsProjectSectionUnavailableV1"},{$ref:"#/$defs/AnalyticsSectionUnavailableV1"}],description:"The fact-store funnel of the resolved project, or why it is unavailable.\n\nThe variants are distinguished by their exact field sets, so each one\ndenies unknown fields and the most specific shape is tried first."},AnalyticsHintCategoryV1:{properties:{category:{type:"string"},emitted:{format:"int64",type:"integer"},followed:{format:"int64",type:"integer"},ignored:{format:"int64",type:"integer"},suppressed:{format:"int64",type:"integer"}},required:["category","emitted","followed","ignored","suppressed"],type:"object"},AnalyticsHintsPayloadV1:{properties:{available:{type:"boolean"},by_category:{items:{$ref:"#/$defs/AnalyticsHintCategoryV1"},type:"array"},error:{default:null,type:["string","null"]},source:{type:"string"}},required:["available","source","by_category"],type:"object"},AnalyticsLedgerUnavailableV1:{additionalProperties:!1,description:"The ledger exists but failed to read. `available` is always `false`.",properties:{available:{type:"boolean"},dashboard_root:{type:"string"},reason:{type:"string"}},required:["available","reason","dashboard_root"],type:"object"},AnalyticsModeReadModelV1:mB,AnalyticsModeV1:mK,AnalyticsProjectSectionUnavailableV1:{additionalProperties:!1,description:"A project-scoped section whose store failed to read. `available` is\nalways `false`.",properties:{available:{type:"boolean"},project_root:{type:"string"},reason:{type:"string"}},required:["available","reason","project_root"],type:"object"},AnalyticsReportStatusV1:{description:"The settled status of an analytics report.",enum:["ok"],type:"string"},AnalyticsScopeV1:mJ,AnalyticsSectionUnavailableV1:{additionalProperties:!1,description:"A section the report could not read. `available` is always `false`.",properties:{available:{type:"boolean"},reason:{type:"string"}},required:["available","reason"],type:"object"},AnalyticsTierCountsV1:{additionalProperties:!1,properties:{calls:{format:"int64",type:"integer"},errors:{format:"int64",type:"integer"},tier:{type:"string"}},required:["tier","calls","errors"],type:"object"},AnalyticsToolsSectionV1:{additionalProperties:!1,properties:{aliased_call_names:{items:{$ref:"#/$defs/AnalyticsCanonicalCallNameV1"},type:"array"},available:{type:"boolean"},available_defined_tool_count:{format:"uint",minimum:0,type:"integer"},bound_internal_call_names:{items:{$ref:"#/$defs/AnalyticsEventCallNameV1"},type:"array"},called_available_defined_tool_count:{format:"uint",minimum:0,type:"integer"},raw_distinct_event_name_count:{format:"uint",minimum:0,type:"integer"},tiers:{items:{$ref:"#/$defs/AnalyticsTierCountsV1"},type:"array"},top_tools:{items:{$ref:"#/$defs/AnalyticsTopToolV1"},type:"array"},unknown_or_retired_call_names:{items:{$ref:"#/$defs/AnalyticsEventCallNameV1"},type:"array"},zero_call_available_defined_tools:{$ref:"#/$defs/AnalyticsZeroCallToolsV1"}},required:["available","tiers","top_tools","raw_distinct_event_name_count","called_available_defined_tool_count","available_defined_tool_count","aliased_call_names","bound_internal_call_names","unknown_or_retired_call_names","zero_call_available_defined_tools"],type:"object"},AnalyticsTopToolV1:{additionalProperties:!1,properties:{calls:{format:"int64",type:"integer"},errors:{format:"int64",type:"integer"},tier:{type:"string"},tool_name:{type:"string"}},required:["tool_name","tier","calls","errors"],type:"object"},AnalyticsZeroCallToolsV1:{additionalProperties:!1,properties:{count:{format:"uint",minimum:0,type:"integer"},sample:{items:{type:"string"},type:"array"},sample_truncated:{type:"boolean"}},required:["count","sample","sample_truncated"],type:"object"},ComparisonDispositionV1:fY,CostsReadModelV1:hO,CoverageStateV1:hM,LatencyDistributionReadModelV1:ga,MetricCalibrationV1:gA,MetricCohortV1:gW,MetricCoverageV1:gM,MetricEvidenceClassV1:gN,MetricProvenanceV1:gz,MetricSourceV1:gD,MetricTemporalV1:gF,MetricUncertaintyV1:gL,MetricValueV1:gU,ObservabilityHorizonV1:g6,ObservatoryReadModelV1:g9,PerformanceComparisonReadModelV1:_r,ProviderLatencyReadModelV1:_V,RejectedArgumentAnalyticsV1:_E,RejectedArgumentErrorClassV1:_A,RejectedArgumentGroupV1:_W,RejectedArgumentNameV1:_M,RejectedArgumentSurfaceV1:_N},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{automation:{anyOf:[{$ref:"#/$defs/AnalyticsAutomationSectionV1"},{type:"null"}]},costs:{anyOf:[{$ref:"#/$defs/CostsReadModelV1"},{type:"null"}],description:"Present only when no section filter was requested."},event_count:{format:"int64",type:"integer"},event_count_truncated:{type:"boolean"},facts:{anyOf:[{$ref:"#/$defs/AnalyticsFactsSectionV1"},{type:"null"}]},hints:{anyOf:[{$ref:"#/$defs/AnalyticsHintsPayloadV1"},{type:"null"}]},observatory:{anyOf:[{$ref:"#/$defs/ObservatoryReadModelV1"},{type:"null"}],description:"Present only when no section filter was requested."},project_id:{description:'The canonical analytics project key; `None` for `scope: "all"`.',type:["string","null"]},project_root:{type:"string"},scope:{$ref:"#/$defs/AnalyticsScopeV1"},since:{format:"int64",type:"integer"},status:{$ref:"#/$defs/AnalyticsReportStatusV1"},tools:{anyOf:[{$ref:"#/$defs/AnalyticsToolsSectionV1"},{type:"null"}]},window_days:{format:"uint32",minimum:0,type:"integer"}},required:["status","scope","project_root","window_days","since","event_count","event_count_truncated"],title:"AnalyticsResultV1",type:"object"},{$defs:{ManifestDigest:gj,NativeIntegrationApprovalId:gB,NativeIntegrationPreviewId:gZ,NativeIntegrationTransactionId:g1},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Exact one-use apply request.\n\nApply accepts only an unexpired preview identity/digest plus a one-use\ncontent-bound approval. Arbitrary Git arguments, caller-supplied paths,\nSHAs, patches, commit lists, messages, environment, or config are\nunrepresentable.",properties:{approval_digest:{$ref:"#/$defs/ManifestDigest"},approval_id:{$ref:"#/$defs/NativeIntegrationApprovalId"},preview_digest:{$ref:"#/$defs/ManifestDigest"},preview_id:{$ref:"#/$defs/NativeIntegrationPreviewId"},transaction_id:{$ref:"#/$defs/NativeIntegrationTransactionId"}},required:["preview_id","preview_digest","approval_id","approval_digest","transaction_id"],title:"NativeIntegrationApplySurfaceRequest",type:"object"},{$defs:{ActorId:mU,BranchStackEdgeV1:fv,BranchStackId:fb,BranchStackNodeV1:f$,BranchStackRevisionId:fS,BranchStackRevisionV1:fk,BranchStackSourceV1:fw,CapabilityId:fO,CodeGenerationId:fz,CommitId:fX,ContentDigest:ht,GitOidV1:yJ,GitOperationStateV1:yZ,ManifestDigest:gj,MechanicalIntegrationModeV1:gC,NativeIntegrationAnalysisAnchorV1:{additionalProperties:!1,description:"Source-local anchor for a semantic conflict finding.",properties:{generation_id:{$ref:"#/$defs/CodeGenerationId"},logical_path:{type:"string"},source_span:{$ref:"#/$defs/SourceSpan"}},required:["generation_id","logical_path","source_span"],type:"object"},NativeIntegrationAnalysisCoverageV1:{description:"Completeness of one independently evaluated semantic evidence lane.",enum:["complete","partial","unsupported"],type:"string"},NativeIntegrationAnalysisGapV1:{description:"Why one semantic evidence lane cannot authorize integration.",enum:["parser_failure","unresolved_required_edge","withheld_source","stale_evidence","unsupported_language","dynamic_schema","unbound_migration_order","capacity_unavailable","authority_unavailable"],type:"string"},NativeIntegrationAnalysisLaneV1:{additionalProperties:!1,description:"Coverage and exact gaps for one independently evaluated analysis lane.",properties:{coverage:{$ref:"#/$defs/NativeIntegrationAnalysisCoverageV1"},gaps:{items:{$ref:"#/$defs/NativeIntegrationAnalysisGapV1"},type:"array"}},required:["coverage","gaps"],type:"object"},NativeIntegrationAnalysisReportV1:{additionalProperties:!1,description:"Daemon-produced semantic evidence for one exact native candidate tree.",properties:{analyzer_revision:{type:"string"},candidate:{$ref:"#/$defs/NativeIntegrationGenerationBindingV1"},conflicts:{items:{$ref:"#/$defs/NativeIntegrationSemanticConflictV1"},type:"array"},destination:{$ref:"#/$defs/NativeIntegrationGenerationBindingV1"},digest:{$ref:"#/$defs/ManifestDigest"},graph:{$ref:"#/$defs/NativeIntegrationAnalysisLaneV1"},merge_base:{$ref:"#/$defs/NativeIntegrationGenerationBindingV1"},migrations:{$ref:"#/$defs/NativeIntegrationAnalysisLaneV1"},schema:{$ref:"#/$defs/NativeIntegrationAnalysisLaneV1"},source:{$ref:"#/$defs/NativeIntegrationGenerationBindingV1"},tests:{$ref:"#/$defs/NativeIntegrationAnalysisLaneV1"}},required:["merge_base","source","destination","candidate","graph","tests","schema","migrations","conflicts","analyzer_revision","digest"],type:"object"},NativeIntegrationApprovalId:gB,NativeIntegrationDirectionV1:gK,NativeIntegrationGenerationBindingV1:{additionalProperties:!1,description:"One immutable code-generation binding used by native integration analysis.",properties:{content_identity:{$ref:"#/$defs/ContentDigest"},generation_id:{$ref:"#/$defs/CodeGenerationId"},project_id:{$ref:"#/$defs/ProjectId"},reference:{anyOf:[{$ref:"#/$defs/RefId"},{type:"null"}]},repository_id:{$ref:"#/$defs/RepositoryId"},seal_digest:{$ref:"#/$defs/ManifestDigest"},snapshot_digest:{$ref:"#/$defs/ManifestDigest"},source_revision:{anyOf:[{$ref:"#/$defs/GitOidV1"},{type:"null"}]},source_tree:{$ref:"#/$defs/GitOidV1"},worktree_id:{anyOf:[{$ref:"#/$defs/WorktreeId"},{type:"null"}]}},required:["generation_id","project_id","repository_id","snapshot_digest","content_identity","source_tree","seal_digest"],type:"object"},NativeIntegrationPhaseV1:{description:"Durable transaction phase. `RefCommitStarted` is the cancellation boundary.",enum:["prepared","candidate_verified","ref_commit_started","final_state_verification","terminal"],type:"string"},NativeIntegrationPreviewDispositionV1:gJ,NativeIntegrationPreviewId:gZ,NativeIntegrationSealedStackSnapshotV1:gQ,NativeIntegrationSelectionBindingV1:gX,NativeIntegrationSemanticConflictKindV1:{description:"Static conflict class produced from canonical generation evidence.",enum:["divergent_symbol","signature_dependent","test_write_interaction","divergent_schema","migration_order"],type:"string"},NativeIntegrationSemanticConflictV1:{additionalProperties:!1,description:"One deterministic conflict finding with source evidence from both branches.",properties:{destination:{$ref:"#/$defs/NativeIntegrationAnalysisAnchorV1"},evidence_digest:{$ref:"#/$defs/ManifestDigest"},kind:{$ref:"#/$defs/NativeIntegrationSemanticConflictKindV1"},source:{$ref:"#/$defs/NativeIntegrationAnalysisAnchorV1"}},required:["kind","source","destination","evidence_digest"],type:"object"},NativeIntegrationSnapshotProjectionV1:{additionalProperties:!1,description:"Bounded projection of one frozen selection.",properties:{destination_ref:{$ref:"#/$defs/RefId"},frozen_at:{$ref:"#/$defs/UtcMicros"},inventory_epoch:{$ref:"#/$defs/WorktreeInventoryEpoch"},project_id:{$ref:"#/$defs/ProjectId"},repository_id:{$ref:"#/$defs/RepositoryId"},selection_digest:{$ref:"#/$defs/ManifestDigest"},source_ref:{$ref:"#/$defs/RefId"}},required:["selection_digest","project_id","repository_id","source_ref","destination_ref","inventory_epoch","frozen_at"],type:"object"},NativeIntegrationStatusProjectionV1:{additionalProperties:!1,description:"Bounded projection of one durable transaction status.",properties:{cancellation_requested:{type:"boolean"},destination_ref:{$ref:"#/$defs/RefId"},phase:{$ref:"#/$defs/NativeIntegrationPhaseV1"},phase_revision:{format:"uint64",minimum:0,type:"integer"},preview_digest:{$ref:"#/$defs/ManifestDigest"},preview_id:{$ref:"#/$defs/NativeIntegrationPreviewId"},repository_id:{$ref:"#/$defs/RepositoryId"},terminal_outcome:{anyOf:[{$ref:"#/$defs/NativeIntegrationTerminalOutcomeV1"},{type:"null"}]},transaction_id:{$ref:"#/$defs/NativeIntegrationTransactionId"},updated_at:{$ref:"#/$defs/UtcMicros"}},required:["transaction_id","preview_id","preview_digest","repository_id","destination_ref","phase","phase_revision","cancellation_requested","updated_at"],type:"object"},NativeIntegrationSurfaceUnavailableV1:{description:"Why a native-integration operation produced no advancing state.\n\nEvery variant is read-only and truthful. None of them authorizes apply, and\na denied or absent target is reported indistinguishably from an unavailable\nauthority so no identity, path, count, or topology leaks.",oneOf:[{enum:["partial","stale","denied","reset_required","durability_uncertain","cancelled","approval_conflict","transaction_conflict","recovery_required","needs_inspection","unknown_transaction"],type:"string"},{const:"authority_unmounted",description:"No native-integration runtime authority is mounted for this daemon.",type:"string"}]},NativeIntegrationTerminalOutcomeV1:gY,NativeIntegrationTransactionId:g1,NativeIntegrationUnavailabilityV1:g0,NativeWorktreeSurfaceResultV1:{oneOf:[{oneOf:[{properties:{coverage:{$ref:"#/$defs/WorktreeCoverageV1"},digest:{$ref:"#/$defs/ManifestDigest"},entries:{items:{$ref:"#/$defs/WorktreeInventoryEntryV1"},type:"array"},epoch:{$ref:"#/$defs/WorktreeInventoryEpoch"},observed_at:{$ref:"#/$defs/UtcMicros"},scope_set_digest:{$ref:"#/$defs/ManifestDigest"},scope_set_id:{$ref:"#/$defs/ScopeSetId"},scope_set_revision:{$ref:"#/$defs/ScopeSetRevision"},snapshot_id:{$ref:"#/$defs/WorktreeInventorySnapshotId"},state:{const:"snapshot",type:"string"}},required:["state","scope_set_id","scope_set_revision","scope_set_digest","snapshot_id","epoch","entries","coverage","observed_at","digest"],type:"object"},{properties:{state:{const:"stale",type:"string"}},required:["state"],type:"object"},{properties:{state:{const:"denied",type:"string"}},required:["state"],type:"object"},{properties:{state:{const:"unavailable",type:"string"}},required:["state"],type:"object"}],properties:{operation:{const:"inventory",type:"string"}},required:["operation"],type:"object"},{oneOf:[{properties:{clean:{$ref:"#/$defs/WorktreeObservationV1",description:"Whether Git status contains no tracked or untracked changes."},head:{anyOf:[{$ref:"#/$defs/GitOidV1"},{type:"null"}]},holder:{$ref:"#/$defs/WorktreeObservationV1"},inspection_digest:{$ref:"#/$defs/ManifestDigest"},kind:{anyOf:[{$ref:"#/$defs/WorktreeKindV1"},{type:"null"}]},locked:{$ref:"#/$defs/WorktreeObservationV1"},observed_at:{$ref:"#/$defs/UtcMicros"},operation_state:{anyOf:[{$ref:"#/$defs/GitOperationStateV1"},{type:"null"}]},presence:{$ref:"#/$defs/WorktreePresenceV1"},reference:{anyOf:[{$ref:"#/$defs/RefId"},{type:"null"}]},state:{const:"inspection",type:"string"},target:{$ref:"#/$defs/NativeWorktreeTargetV1"},unique_data:{$ref:"#/$defs/WorktreeObservationV1"},worktree_id:{$ref:"#/$defs/WorktreeId"}},required:["state","target","presence","worktree_id","clean","locked","holder","unique_data","observed_at","inspection_digest"],type:"object"},{properties:{state:{const:"stale",type:"string"}},required:["state"],type:"object"},{properties:{state:{const:"foreign",type:"string"}},required:["state"],type:"object"},{properties:{state:{const:"denied",type:"string"}},required:["state"],type:"object"},{properties:{state:{const:"unavailable",type:"string"}},required:["state"],type:"object"}],properties:{operation:{const:"inspection",type:"string"}},required:["operation"],type:"object"},{oneOf:[{properties:{confirmation_digest:{$ref:"#/$defs/ManifestDigest"},confirmed_at:{$ref:"#/$defs/UtcMicros"},inspection_digest:{$ref:"#/$defs/ManifestDigest"},state:{const:"confirmed",type:"string"},target:{$ref:"#/$defs/NativeWorktreeTargetV1"}},required:["state","target","inspection_digest","confirmation_digest","confirmed_at"],type:"object"},{properties:{state:{const:"stale",type:"string"}},required:["state"],type:"object"},{properties:{state:{const:"denied",type:"string"}},required:["state"],type:"object"},{properties:{state:{const:"needs_inspection",type:"string"}},required:["state"],type:"object"},{properties:{state:{const:"unavailable",type:"string"}},required:["state"],type:"object"}],properties:{operation:{const:"confirmation",type:"string"}},required:["operation"],type:"object"},{$ref:"#/$defs/WorktreeCleanupRemovalV1",properties:{operation:{const:"removal",type:"string"}},required:["operation"],type:"object"},{$ref:"#/$defs/WorktreeCleanupReconciliationV1",properties:{operation:{const:"reconciliation",type:"string"}},required:["operation"],type:"object"}]},NativeWorktreeTargetV1:g2,ProjectId:_m,RefId:_T,RepositoryId:_z,ResolvedScope:_U,ScopeSetId:vc,ScopeSetRevision:vl,SourceSpan:vF,StackNodeId:vH,UtcMicros:bs,WorktreeCleanupReconciliationV1:{oneOf:[{properties:{confirmation_digest:{$ref:"#/$defs/ManifestDigest"},observed_at:{$ref:"#/$defs/UtcMicros"},state:{const:"removed",type:"string"}},required:["state","confirmation_digest","observed_at"],type:"object"},{properties:{state:{const:"still_present",type:"string"}},required:["state"],type:"object"},{properties:{state:{const:"durability_uncertain",type:"string"}},required:["state"],type:"object"},{properties:{state:{const:"stale",type:"string"}},required:["state"],type:"object"},{properties:{state:{const:"denied",type:"string"}},required:["state"],type:"object"},{properties:{state:{const:"unavailable",type:"string"}},required:["state"],type:"object"}]},WorktreeCleanupRemovalV1:{oneOf:[{properties:{confirmation_digest:{$ref:"#/$defs/ManifestDigest"},observed_at:{$ref:"#/$defs/UtcMicros"},state:{const:"removed",type:"string"}},required:["state","confirmation_digest","observed_at"],type:"object"},{properties:{confirmation_digest:{$ref:"#/$defs/ManifestDigest"},observed_at:{$ref:"#/$defs/UtcMicros"},state:{const:"already_removed",type:"string"}},required:["state","confirmation_digest","observed_at"],type:"object"},{properties:{state:{const:"denied",type:"string"}},required:["state"],type:"object"},{properties:{state:{const:"stale",type:"string"}},required:["state"],type:"object"},{properties:{state:{const:"durability_uncertain",type:"string"}},required:["state"],type:"object"},{properties:{state:{const:"unavailable",type:"string"}},required:["state"],type:"object"}]},WorktreeCoverageV1:{enum:["complete","partial"],type:"string"},WorktreeId:So,WorktreeInventoryEntryV1:{additionalProperties:!1,properties:{clean:{$ref:"#/$defs/WorktreeObservationV1",description:"Whether Git status contains no tracked or untracked changes."},evidence_digest:{$ref:"#/$defs/ManifestDigest"},head:{anyOf:[{$ref:"#/$defs/GitOidV1"},{type:"null"}]},holder:{$ref:"#/$defs/WorktreeObservationV1"},kind:{anyOf:[{$ref:"#/$defs/WorktreeKindV1"},{type:"null"}]},locked:{$ref:"#/$defs/WorktreeObservationV1"},observed_at:{$ref:"#/$defs/UtcMicros"},operation:{anyOf:[{$ref:"#/$defs/GitOperationStateV1"},{type:"null"}]},presence:{$ref:"#/$defs/WorktreePresenceV1"},reference:{anyOf:[{$ref:"#/$defs/RefId"},{type:"null"}]},target:{$ref:"#/$defs/NativeWorktreeTargetV1"},unique_data:{$ref:"#/$defs/WorktreeObservationV1"},worktree_id:{anyOf:[{$ref:"#/$defs/WorktreeId"},{type:"null"}]}},required:["target","presence","clean","locked","holder","unique_data","observed_at","evidence_digest"],type:"object"},WorktreeInventoryEpoch:Sn,WorktreeInventorySnapshotId:Sa,WorktreeKindV1:{description:"Native Git worktree kind visible to an authorized caller.",enum:["main","linked","bare"],type:"string"},WorktreeObservationV1:{enum:["yes","no","unknown"],type:"string"},WorktreePresenceV1:{description:"Presence is intentionally not a bool: stale, unavailable and foreign are\npolicy-safe states with different reconciliation consequences.",enum:["present","stale","unavailable","foreign"],type:"string"}},$schema:"https://json-schema.org/draft/2020-12/schema",description:"One typed result for every native-integration surface operation.",oneOf:[{additionalProperties:!1,description:"Frozen selection summary plus the exact sealed proof preflight accepts.",properties:{outcome:{const:"stack_snapshot",type:"string"},sealed_snapshot:{$ref:"#/$defs/NativeIntegrationSealedStackSnapshotV1"},selection:{$ref:"#/$defs/NativeIntegrationSnapshotProjectionV1"}},required:["outcome","selection","sealed_snapshot"],type:"object"},{additionalProperties:!1,description:"Bounded projection of one immutable preview.\n\nCandidate trees, conflict bodies, and ordered commit objects stay behind the\npreview digest: the surface reports identity, classification, and expiry so\na caller can approve exactly this preview and nothing else.",properties:{analysis:{anyOf:[{$ref:"#/$defs/NativeIntegrationAnalysisReportV1"},{type:"null"}]},created_at:{$ref:"#/$defs/UtcMicros"},disposition:{$ref:"#/$defs/NativeIntegrationPreviewDispositionV1"},expires_at:{$ref:"#/$defs/UtcMicros"},ordered_commit_count:{format:"uint32",minimum:0,type:"integer"},outcome:{const:"preview",type:"string"},preview_digest:{$ref:"#/$defs/ManifestDigest"},preview_id:{$ref:"#/$defs/NativeIntegrationPreviewId"},selection:{$ref:"#/$defs/NativeIntegrationSnapshotProjectionV1"}},required:["outcome","preview_id","preview_digest","selection","disposition","ordered_commit_count","created_at","expires_at"],type:"object"},{additionalProperties:!1,description:"Bounded projection of one issued one-use approval.\n\nThe approval digest is the caller's proof-of-issuance handle for apply;\nthe preview binding and expiry are audit metadata. No preview body,\ncandidate tree, or commit content crosses this boundary.",properties:{approval_digest:{$ref:"#/$defs/ManifestDigest"},approval_id:{$ref:"#/$defs/NativeIntegrationApprovalId"},capability:{$ref:"#/$defs/CapabilityId"},expires_at:{$ref:"#/$defs/UtcMicros"},issued_at:{$ref:"#/$defs/UtcMicros"},outcome:{const:"approval",type:"string"},preview_digest:{$ref:"#/$defs/ManifestDigest"},preview_id:{$ref:"#/$defs/NativeIntegrationPreviewId"},principal:{$ref:"#/$defs/ActorId"},transaction_id:{$ref:"#/$defs/NativeIntegrationTransactionId",description:"Daemon-minted identity consumed verbatim by apply, status, and cancel."}},required:["outcome","transaction_id","approval_id","preview_id","preview_digest","principal","capability","issued_at","expires_at","approval_digest"],type:"object"},{additionalProperties:!1,description:"Bounded projection of one durable terminal receipt.\n\nThe receipt digest and final ref/tree identity are audit metadata; no patch,\nworktree body, or source content crosses this boundary.",properties:{completed_at:{$ref:"#/$defs/UtcMicros"},final_ref_tip:{type:"string"},final_tree:{type:"string"},outcome:{const:"receipt",type:"string"},receipt_digest:{$ref:"#/$defs/ManifestDigest"},status:{$ref:"#/$defs/NativeIntegrationStatusProjectionV1"},terminal_outcome:{$ref:"#/$defs/NativeIntegrationTerminalOutcomeV1"}},required:["outcome","status","terminal_outcome","final_ref_tip","final_tree","completed_at","receipt_digest"],type:"object"},{additionalProperties:!1,description:"Bounded projection of one durable transaction status.",properties:{cancellation_requested:{type:"boolean"},destination_ref:{$ref:"#/$defs/RefId"},outcome:{const:"status",type:"string"},phase:{$ref:"#/$defs/NativeIntegrationPhaseV1"},phase_revision:{format:"uint64",minimum:0,type:"integer"},preview_digest:{$ref:"#/$defs/ManifestDigest"},preview_id:{$ref:"#/$defs/NativeIntegrationPreviewId"},repository_id:{$ref:"#/$defs/RepositoryId"},terminal_outcome:{anyOf:[{$ref:"#/$defs/NativeIntegrationTerminalOutcomeV1"},{type:"null"}]},transaction_id:{$ref:"#/$defs/NativeIntegrationTransactionId"},updated_at:{$ref:"#/$defs/UtcMicros"}},required:["outcome","transaction_id","preview_id","preview_digest","repository_id","destination_ref","phase","phase_revision","cancellation_requested","updated_at"],type:"object"},{description:"Cancellation disposition. After the native commit point the committed\nreceipt is returned instead of a cancellation claim.",oneOf:[{enum:["cancellation_requested","commit_point_passed"],type:"string"},{properties:{already_terminal:{$ref:"#/$defs/NativeIntegrationTerminalOutcomeV1"}},required:["already_terminal"],type:"object"}],properties:{outcome:{const:"cancellation",type:"string"}},required:["outcome"],type:"object"},{$ref:"#/$defs/NativeWorktreeSurfaceResultV1",properties:{outcome:{const:"worktree",type:"string"}},required:["outcome"],type:"object"},{properties:{outcome:{const:"unavailable",type:"string"},reason:{$ref:"#/$defs/NativeIntegrationSurfaceUnavailableV1"}},required:["outcome","reason"],type:"object"}],title:"NativeIntegrationSurfaceResultV1"},{$defs:{ManifestDigest:gj,NativeIntegrationPreviewId:gZ},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Exact approval-issuance request (the owner-decided sixth operation).\n\nThe caller names one unexpired preview by exact identity *and* digest;\napproving an identity without its content digest is unrepresentable. The\ndaemon mints the one-use approval bound to the requesting principal, the\napply capability, the current grant lineage, and a bounded expiry, none\nof which the caller can choose.",properties:{preview_digest:{$ref:"#/$defs/ManifestDigest"},preview_id:{$ref:"#/$defs/NativeIntegrationPreviewId"}},required:["preview_id","preview_digest"],title:"NativeIntegrationApproveSurfaceRequest",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Exact public input accepted by `tracedecay_ast_grep_rewrite`.",properties:{dry_run:{default:!1,type:"boolean"},expected_state:{description:"Exact `preview_digest`/`expected_state` returned by the dry run. Apply\nre-resolves the typed plan and rejects any candidate-state drift.",type:["string","null"]},idempotency_key:{type:["string","null"]},path:{type:"string"},pattern:{type:"string"},rewrite:{type:"string"},verify:{default:!1,type:"boolean"}},required:["path","pattern","rewrite"],title:"AstGrepRewriteSurfaceRequestV1",type:"object"},{$defs:{ActorId:mU,AstGrepResult:{description:"Result of an ast-grep rewrite operation.",properties:{diff:{description:"Bounded preview of the would-be change. Populated only on a successful\ndry run; `None` for real edits and for failures.",type:["string","null"]},dry_run:{description:"True when this was a dry run: the rewrite was resolved but nothing was\nwritten.",type:"boolean"},file_path:{type:"string"},message:{type:"string"},pattern:{type:"string"},rewrite:{type:"string"},success:{type:"boolean"}},required:["success","file_path","pattern","rewrite","message"],type:"object"},AuthorityReceipt:{additionalProperties:!1,description:"Proof that this request crossed the current authorization boundary.",properties:{authorized_scope_digest:{$ref:"#/$defs/ManifestDigest"},disclosure:{$ref:"#/$defs/DisclosureClass"},grant_digest:{$ref:"#/$defs/ManifestDigest"},grant_id:{type:"string"},grant_revision:{format:"uint64",minimum:0,type:"integer"},policy:{$ref:"#/$defs/PolicyDecisionRef"},revalidated_at:{$ref:"#/$defs/UtcMicros"}},required:["grant_id","grant_revision","grant_digest","authorized_scope_digest","disclosure","policy","revalidated_at"],type:"object"},CancellationObservation:fI,CancellationStage:fx,ComponentVersion:f2,Deadline:hL,DisclosureClass:{description:"Disclosure ceiling carried by an immutable grant and revalidated at sinks.",enum:["metadata","evidence","sensitive"],type:"string"},EditResult:{description:"Result of a single string replacement edit.",properties:{diff:{description:"Bounded preview diff of the would-be change. Populated only on a\nsuccessful dry run; `None` for real edits and for failures.",type:["string","null"]},dry_run:{description:"True when this was a dry run: validation, spans, and the resulting\ncontent were all computed, but nothing was written to disk.",type:"boolean"},file_path:{type:"string"},matched_str:{type:"string"},message:{type:"string"},new_str:{type:"string"},replaced_span:{description:"The exact source text that was replaced. For `replace_symbol` this is\nthe item's full span, including any leading doc-comment / attribute\nblock, so callers can recover its docs/attrs if the replacement\ndropped them; for `str_replace` it is the matched `old_str` text.\n`None` only on a failed edit, where nothing was resolved to replace.",type:["string","null"]},success:{type:"boolean"}},required:["success","file_path","matched_str","new_str","message"],type:"object"},EffectClass:hQ,EffectReceipt:hX,EffectResult:{additionalProperties:!1,description:"Result of an admitted effect. `EffectUnknown` remains a receipt state and\ncannot be remapped into a pre-admission problem.",properties:{authority:{$ref:"#/$defs/AuthorityReceipt"},effect_class:{$ref:"#/$defs/EffectClass"},effect_id:{type:"string"},execution:{$ref:"#/$defs/OperationReceipt"},expected_state:{$ref:"#/$defs/ManifestDigest"},idempotency_key:{type:"string"},payload:{anyOf:[{$ref:"#/$defs/SourceEditDurableEffectPayloadV1"},{type:"null"}]},receipt:{$ref:"#/$defs/EffectReceipt"},reconciliation:{$ref:"#/$defs/ReconciliationState"}},required:["effect_id","effect_class","idempotency_key","authority","expected_state","execution","reconciliation","receipt"],type:"object"},EffectTermination:hY,InsertResult:{description:"Result of an insert-at operation.",properties:{anchor_line:{format:"uint32",minimum:0,type:"integer"},before:{type:"boolean"},content:{type:"string"},diff:{description:"Bounded preview diff of the would-be change. Populated only on a\nsuccessful dry run; `None` for real edits and for failures.",type:["string","null"]},dry_run:{description:"True when this was a dry run: the insertion point was resolved and the\nresulting content computed, but nothing was written to disk.",type:"boolean"},file_path:{type:"string"},message:{type:"string"},success:{type:"boolean"}},required:["success","file_path","anchor_line","content","before","message"],type:"object"},ManifestDigest:gj,MoveHint:{description:"One evidence-based, actionable finding produced by the `move_symbol` impact\nengine. Each hint points at a concrete file/line and carries a suggestion\nthe caller (or a follow-up refactor) can act on. Hints are derived from graph\nedges (callers/callees) and parse-level facts (identifiers, `use` lines,\nmodule declarations), never speculative noise.",properties:{detail:{description:"Human-readable description of what the move breaks or affects.",type:"string"},file:{description:"File the finding concerns (the caller's file, the destination, or the\nsource), project-relative.",type:"string"},kind:{description:"Taxonomy tag: `caller_reference`, `dependency_broken`, `import_needed`,\n`visibility_required`, `collision`, `module_missing`, `cycle_risk`,\n`orphaned_import`, or `cfg_context`.",type:"string"},line:{description:"1-based line the finding concerns, when a specific site is known.",format:"uint32",minimum:0,type:["integer","null"]},suggestion:{description:"The exact change to make (e.g. a `use` line to add, a path to rewrite, a\nvisibility to escalate). `None` when no single mechanical fix applies.",type:["string","null"]}},required:["kind","file","detail"],type:"object"},MoveResult:{description:"Result of a `move_symbol` operation: the moved span, a dry-run diff of the\nsource + destination files, and the centerpiece, the impact report of\neverything the move breaks or that needs attention.",properties:{applied_imports:{description:"`use` lines auto-inserted at the destination because the moved body's\ndependency on them was unambiguous. Reported so the caller sees exactly\nwhat the move added.",items:{type:"string"},type:"array"},dest_file:{type:"string"},diff:{description:"Combined preview diff of the source (removal) and destination (insertion)\nfiles. Populated on a successful dry run; `None` for real moves.",type:["string","null"]},dry_run:{description:"True when this was a dry run: spans, the destination shape, and the\nimpact report were all computed, but nothing was written to disk.",type:"boolean"},impact:{description:"The impact report: every actionable finding. Empty on a truly clean\nmove.",items:{$ref:"#/$defs/MoveHint"},type:"array"},message:{type:"string"},moved_span:{description:"The exact source span that was moved, including its leading\ndoc-comment / attribute block. `None` on failure.",type:["string","null"]},source_file:{type:"string"},success:{type:"boolean"},symbol:{description:"The resolved symbol that was (or would be) moved, `name (kind)`.",type:"string"}},required:["success","symbol","source_file","dest_file","message"],type:"object"},MultiEditResult:{description:"Result of a multi-string replacement edit.",properties:{applied_count:{format:"uint",minimum:0,type:"integer"},diff:{description:"Bounded preview diff of the would-be change. Populated only on a\nsuccessful dry run; `None` for real edits and for failures.",type:["string","null"]},dry_run:{description:"True when this was a dry run: replacements were validated and the\nresulting content computed, but nothing was written to disk.",type:"boolean"},file_path:{type:"string"},message:{type:"string"},success:{type:"boolean"}},required:["success","file_path","applied_count","message"],type:"object"},OperationBudgetUsage:g8,OperationReceipt:g7,OperationTermination:_e,PolicyDecisionRef:{additionalProperties:!1,description:"A policy decision pinned into a receipt or provider identity.",properties:{decision_id:{type:"string"},digest:{$ref:"#/$defs/ManifestDigest"},evaluator_revision:{$ref:"#/$defs/ComponentVersion"},revision:{format:"uint64",minimum:0,type:"integer"}},required:["decision_id","revision","digest","evaluator_revision"],type:"object"},ProjectId:_m,ReconciliationState:{description:"Reconciliation state retained after an admitted effect.",enum:["pending","reconciled","failed"],type:"string"},RefId:_T,RenameDispositionCountsV1:{additionalProperties:!1,properties:{blocked:{format:"uint",minimum:0,type:"integer"},changed:{format:"uint",minimum:0,type:"integer"},skipped:{format:"uint",minimum:0,type:"integer"},unchanged:{format:"uint",minimum:0,type:"integer"}},required:["changed","unchanged","skipped","blocked"],type:"object"},RenameFileEditV1:{additionalProperties:!1,description:"One file a rename changed (or would change), with the exact bound-site count.",properties:{file:{type:"string"},replaced_count:{format:"uint",minimum:0,type:"integer"}},required:["file","replaced_count"],type:"object"},RenameHazardKindV1:{enum:["invalid_identifier","stale_evidence","ambiguous_symbol","namespace_collision","changed_resolution","shadowing","unsupported_syntax","macro_expansion","generated_source","overlapping_site"],type:"string"},RenameHazardV1:{additionalProperties:!1,properties:{blocking:{type:"boolean"},kind:{$ref:"#/$defs/RenameHazardKindV1"},message:{type:"string"},site_id:{type:["string","null"]}},required:["kind","blocking","message"],type:"object"},RenameImpactV1:{additionalProperties:!1,properties:{affected_files:{items:{type:"string"},type:"array"},affected_tests:{items:{type:"string"},type:"array"},callers:{items:{type:"string"},type:"array"},reexports:{items:{type:"string"},type:"array"}},required:["callers","reexports","affected_files","affected_tests"],type:"object"},RenameProtectedValueCategoryV1:{enum:["wire_value","serialized_name","sql_identifier","persisted_name","schema_epoch","hash_domain","protocol_name","contract_snapshot","string_literal","byte_literal"],type:"string"},RenameProtectedValueV1:{additionalProperties:!1,description:"A byte-exact stable value deliberately preserved by the rename.",properties:{category:{$ref:"#/$defs/RenameProtectedValueCategoryV1"},end_byte:{format:"uint64",minimum:0,type:"integer"},exact_bytes:{type:"string"},file:{type:"string"},site_id:{type:"string"},start_byte:{format:"uint64",minimum:0,type:"integer"}},required:["site_id","file","start_byte","end_byte","category","exact_bytes"],type:"object"},RenameResult:{description:"The same typed payload is serialized by application, CLI, and MCP paths.",properties:{diff:{type:["string","null"]},dispositions:{$ref:"#/$defs/RenameDispositionCountsV1"},dry_run:{type:"boolean"},files:{items:{$ref:"#/$defs/RenameFileEditV1"},type:"array"},graph_revision:{anyOf:[{$ref:"#/$defs/ManifestDigest"},{type:"null"}],description:"Digest of the admitted generation, exact target, same-name symbols,\nand graph edges used to classify bound and protected sites."},hazards:{items:{$ref:"#/$defs/RenameHazardV1"},type:"array"},impact:{$ref:"#/$defs/RenameImpactV1"},message:{type:"string"},new_name:{type:"string"},old_name:{type:"string"},plan_digest:{anyOf:[{$ref:"#/$defs/ManifestDigest"},{type:"null"}],description:"Digest of the complete typed site/hazard/protected-value manifest."},preview_digest:{anyOf:[{$ref:"#/$defs/ManifestDigest"},{type:"null"}],description:"Exact candidate-state digest that apply must echo as `expected_state`."},preview_id:{anyOf:[{$ref:"#/$defs/ManifestDigest"},{type:"null"}],description:"Digest-addressed identity of the bound symbol plus proposed name."},protected_values:{items:{$ref:"#/$defs/RenameProtectedValueV1"},type:"array"},reference_count:{format:"uint",minimum:0,type:"integer"},repository_revision:{default:null,description:"Current Git HEAD when the worktree has one; dirty bytes remain bound by\n`preview_digest` independently of this revision.",type:["string","null"]},sites:{items:{$ref:"#/$defs/RenameSiteV1"},type:"array"},success:{type:"boolean"},symbol:{description:"Qualified name of the renamed symbol at plan time.",type:"string"}},required:["success","symbol","old_name","new_name","reference_count","dispositions","impact","message"],type:"object"},RenameSiteDispositionV1:{enum:["changed","unchanged","skipped","blocked"],type:"string"},RenameSiteKindV1:{enum:["declaration","import","reexport","qualified_path","unqualified_path","annotation","generic_argument","constructor","pattern","trait_declaration","trait_implementation","resolved_call","inherent_method","enum_variant","test","example","documentation","protected_value","unresolved_text"],type:"string"},RenameSiteV1:{additionalProperties:!1,description:"One exact old-name occurrence and the rename planner's disposition.",properties:{disposition:{$ref:"#/$defs/RenameSiteDispositionV1"},end_byte:{format:"uint64",minimum:0,type:"integer"},expected_bytes:{type:"string"},file:{type:"string"},kind:{$ref:"#/$defs/RenameSiteKindV1"},line:{format:"uint32",minimum:0,type:"integer"},reason:{type:"string"},replacement_bytes:{type:"string"},site_id:{type:"string"},source_node_id:{description:"Canonical source `SymbolOccurrenceId` that attested this site.",type:["string","null"]},start_byte:{format:"uint64",minimum:0,type:"integer"}},required:["site_id","kind","disposition","file","line","start_byte","end_byte","expected_bytes","replacement_bytes","reason"],type:"object"},RepositoryId:_z,ResolvedScope:_U,RetrievalAnchorId:_J,SourceEditCancelledResultV1:{description:"Terminal payload when cancellation is observed before an edit commits.",properties:{cancelled:{type:"boolean"},message:{type:"string"},success:{type:"boolean"}},required:["success","cancelled","message"],type:"object"},SourceEditDiagnosticV1:{properties:{code:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},message:{type:"string"}},required:["line","code","message"],type:"object"},SourceEditDurableEffectPayloadV1:{additionalProperties:!1,description:"Body-free source-edit evidence retained inside durable effect receipts.\n\nThis payload intentionally contains no caller-supplied edit text, preview\ndiff, moved span, import, diagnostic, or impact detail. It is also the\nexact replay outcome, so replay never fabricates a live edit body.",properties:{before:{type:["boolean","null"]},cancelled:{type:"boolean"},change_count:{format:"uint",minimum:0,type:["integer","null"]},durable_metadata_only:{type:"boolean"},effect_unknown:{type:"boolean"},failed:{type:"boolean"},files:{items:{type:"string"},type:"array"},finding_count:{format:"uint",minimum:0,type:["integer","null"]},import_count:{format:"uint",minimum:0,type:["integer","null"]},line:{format:"uint32",minimum:0,type:["integer","null"]},message:{type:"string"},observed_state:{anyOf:[{$ref:"#/$defs/ManifestDigest"},{type:"null"}],description:"Exact candidate-file observation from an inspection attempt."},operation:{$ref:"#/$defs/UseCaseId"},reconciled:{type:"boolean"},success:{type:"boolean"},timed_out:{type:"boolean"}},required:["operation","success","files","failed","cancelled","timed_out","effect_unknown","reconciled","durable_metadata_only","message"],type:"object"},SourceEditEffectUnknownResultV1:{description:"Terminal payload when publication may have occurred and inspection is required.",properties:{effect_unknown:{type:"boolean"},message:{type:"string"},success:{type:"boolean"}},required:["success","effect_unknown","message"],type:"object"},SourceEditFailedResultV1:{description:"Terminal payload when an edit is refused before it can publish an effect.",properties:{failed:{type:"boolean"},message:{type:"string"},success:{type:"boolean"}},required:["success","failed","message"],type:"object"},SourceEditReconciledResultV1:{description:"Terminal payload returned by explicit reconciliation.",properties:{message:{type:"string"},reconciled:{type:"boolean"},success:{type:"boolean"}},required:["success","reconciled","message"],type:"object"},SourceEditTimedOutResultV1:{description:"Terminal payload when an edit deadline expires before commit.",properties:{message:{type:"string"},success:{type:"boolean"},timed_out:{type:"boolean"}},required:["success","timed_out","message"],type:"object"},SourceEditVerificationStateV1:{enum:["clean","errors","unavailable","failed","cancelled"],type:"string"},SourceEditVerificationV1:{properties:{error_count:{format:"uint",minimum:0,type:"integer"},first_errors:{items:{$ref:"#/$defs/SourceEditDiagnosticV1"},type:"array"},message:{type:["string","null"]},state:{$ref:"#/$defs/SourceEditVerificationStateV1"},verdict:{type:"string"},warning_count:{format:"uint",minimum:0,type:"integer"}},required:["state","verdict","error_count","warning_count","first_errors"],type:"object"},UseCaseId:bn,UtcMicros:bs,WorktreeId:So},$schema:"https://json-schema.org/draft/2020-12/schema",anyOf:[{$ref:"#/$defs/SourceEditDurableEffectPayloadV1"},{$ref:"#/$defs/EditResult"},{$ref:"#/$defs/MultiEditResult"},{$ref:"#/$defs/InsertResult"},{$ref:"#/$defs/AstGrepResult"},{$ref:"#/$defs/MoveResult"},{$ref:"#/$defs/RenameResult"},{$ref:"#/$defs/SourceEditFailedResultV1"},{$ref:"#/$defs/SourceEditCancelledResultV1"},{$ref:"#/$defs/SourceEditTimedOutResultV1"},{$ref:"#/$defs/SourceEditEffectUnknownResultV1"},{$ref:"#/$defs/SourceEditReconciledResultV1"}],description:"Canonical result returned directly by every source-edit use case.",properties:{effect:{anyOf:[{$ref:"#/$defs/EffectResult"},{type:"null"}]},expected_state:{$ref:"#/$defs/ManifestDigest"},predicted_state:{anyOf:[{$ref:"#/$defs/ManifestDigest"},{type:"null"}]},replayed:{type:"boolean"},verification:{anyOf:[{$ref:"#/$defs/SourceEditVerificationV1"},{type:"null"}]}},required:["expected_state","replayed"],title:"SourceEditSurfaceResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{lang:{description:"Optional language key to force (e.g. 'rust', 'typescript', 'python').\nOmit to auto-detect each file from its extension.",type:["string","null"]},max_results:{description:"Maximum number of matches to return (default: 50, max: 200).",format:"uint32",minimum:0,type:["integer","null"]},path_glob:{description:"Optional glob restricting which files are searched, matched against\nproject-relative paths (e.g. 'src/**/*.rs').",type:["string","null"]},pattern:{description:"ast-grep structural pattern (SGPattern syntax), e.g.\n'reserve_stock($$$)' or 'Result<$T, $E>'.",type:"string"}},required:["pattern"],title:"AstGrepSearchSurfaceRequestV1",type:"object"},{$defs:{AstGrepSearchMatchV1:{additionalProperties:!1,properties:{column:{format:"uint32",minimum:0,type:"integer"},file:{type:"string"},lang:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},line_text:{type:"string"},match:{type:"string"}},required:["file","line","column","lang","match","line_text"],type:"object"},CodeIndexBuildBlockedReasonV1:fF,CodeIndexConvergenceParkedV1:fL,CodeIndexStalenessStateV1:fB,PrimitiveFreshnessStateV1:_i,PrimitiveIndexingStateV1:_o,PrimitiveSearchFreshnessV1:_d},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{files_scanned:{format:"uint64",minimum:0,type:"integer"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},match_count:{format:"uint64",minimum:0,type:"integer"},results:{items:{$ref:"#/$defs/AstGrepSearchMatchV1"},type:"array"},truncated:{type:"boolean"}},required:["results","match_count","files_scanned","truncated"],title:"AstGrepSearchResultV1",type:"object"},{$defs:{AutomationRunArtifactKind:{enum:["traces","feedback","generated_evals","validation_gate","optimizer_diagnosis","codex_handoff"],type:"string"}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{kind:{$ref:"#/$defs/AutomationRunArtifactKind",description:"Artifact kind to read."},run_id:{description:"Automation run id to inspect.",type:"string"}},required:["run_id","kind"],title:"AutomationRunArtifactViewSurfaceRequestV1",type:"object"},{$defs:{AutomationReadStatusV1:fn,AutomationRunArtifact:fs},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{artifact:{$ref:"#/$defs/AutomationRunArtifact"},payload:{description:"The hash-verified artifact document, as the run wrote it."},run_id:{type:"string"},status:{$ref:"#/$defs/AutomationReadStatusV1"}},required:["status","run_id","artifact","payload"],title:"AutomationRunArtifactViewResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{limit:{description:"Maximum run records to return (default: 50, max: 200).",format:"uint32",maximum:200,minimum:1,type:["integer","null"]}},title:"AutomationRunListSurfaceRequestV1",type:"object"},{$defs:{AgentTaskKind:mG,AutomationReadStatusV1:fn,AutomationRunListEntryV1:{additionalProperties:!1,description:"One run as the list shows it: the ledger record's identity, outcome and\nartifact kinds, without the artifact payloads or operation bodies.",properties:{accepted_count:{format:"uint",minimum:0,type:"integer"},artifact_kinds:{items:{type:"string"},type:"array"},backend:{type:"string"},completed_at:{type:"string"},error:{type:["string","null"]},model:{type:["string","null"]},rejected_count:{format:"uint",minimum:0,type:"integer"},reviewed_count:{format:"uint",minimum:0,type:"integer"},run_id:{type:"string"},skipped_count:{format:"uint",minimum:0,type:"integer"},started_at:{type:"string"},status:{$ref:"#/$defs/AutomationRunStatus"},task:{$ref:"#/$defs/AgentTaskKind"},task_key:{type:["string","null"]},trigger:{$ref:"#/$defs/AutomationTrigger"}},required:["run_id","task","trigger","backend","status","reviewed_count","accepted_count","rejected_count","skipped_count","started_at","completed_at","artifact_kinds"],type:"object"},AutomationRunPageCompletenessV1:{description:"Whether a run page read every ledger row it examined.",oneOf:[{const:"known",description:"Every examined row decoded.",type:"string"},{const:"partial",description:"The page skipped malformed rows or more runs exist past it.",type:"string"}]},AutomationRunScopeV1:fd,AutomationRunStatus:fc,AutomationTrigger:fm},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{completeness:{$ref:"#/$defs/AutomationRunPageCompletenessV1"},count:{format:"uint",minimum:0,type:"integer"},has_more:{type:"boolean"},limit:{format:"uint32",minimum:0,type:"integer"},malformed_row_count:{format:"uint",minimum:0,type:"integer"},runs:{items:{$ref:"#/$defs/AutomationRunListEntryV1"},type:"array"},scope:{$ref:"#/$defs/AutomationRunScopeV1"},status:{$ref:"#/$defs/AutomationReadStatusV1"}},required:["status","scope","runs","count","limit","has_more","malformed_row_count","completeness"],title:"AutomationRunListResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{run_id:{description:"Exact automation run id to inspect.",minLength:1,type:"string"}},required:["run_id"],title:"AutomationRunViewSurfaceRequestV1",type:"object"},{$defs:{AgentTaskFailureClass:{oneOf:[{enum:["retryable","permanent","timeout","unavailable","denied","disconnected","malformed_output"],type:"string"},{const:"input_too_large",description:"The backend refused the request because it exceeds its input or\ncontext-window limit.",type:"string"}]},AgentTaskKind:mG,AgentTaskRetryAttempt:{properties:{attempt:{format:"uint32",minimum:0,type:"integer"},backoff_millis:{format:"uint64",minimum:0,type:"integer"},failure_classification:{anyOf:[{$ref:"#/$defs/AgentTaskFailureClass"},{type:"null"}]},succeeded:{type:"boolean"}},required:["attempt","succeeded","backoff_millis"],type:"object"},AutomationReadStatusV1:fn,AutomationRunArtifact:fs,AutomationRunLedgerRecord:{properties:{accepted_count:{format:"uint",minimum:0,type:"integer"},applied_ops:!0,artifacts:{items:{$ref:"#/$defs/AutomationRunArtifact"},type:"array"},backend:{type:"string"},backend_attempt_count:{default:0,format:"uint",minimum:0,type:"integer"},backend_attempts:{items:{$ref:"#/$defs/AgentTaskRetryAttempt"},type:"array"},backend_identity:{description:"The durable backend/configuration identity this run executed under.\n\nA settled deterministic failure stays suppressed only while this\nmatches the identity now configured, so the scheduler can re-admit the\ntask the moment the backend or configuration changes. Records written\nbefore this field existed carry `None` and never suppress: an\nunidentified failure cannot be shown to have failed under the current\nidentity.",type:["string","null"]},completed_at:{type:"string"},completed_at_micros:{format:"int64",type:["integer","null"]},error:{type:["string","null"]},error_classification:{anyOf:[{$ref:"#/$defs/AgentTaskFailureClass"},{type:"null"}]},error_retryable:{type:["boolean","null"]},evidence_hash:{type:["string","null"]},fallback_status:{type:["string","null"]},host_mode:{type:["string","null"]},input_hash:{type:["string","null"]},model:{type:["string","null"]},output_hash:{type:["string","null"]},prompt_version:{type:["string","null"]},proposed_ops:!0,rejected_count:{format:"uint",minimum:0,type:"integer"},rejected_ops:!0,report_ref:!0,response_schema:!0,reviewed_count:{default:0,format:"uint",minimum:0,type:"integer"},run_id:{type:"string"},schema_version:{format:"uint32",minimum:0,type:"integer"},session_evidence_budget_stage:{anyOf:[{$ref:"#/$defs/SessionRetrievalBudgetStageV1"},{type:"null"}],description:"Exhausted retrieval boundary of a `session_evidence_budget_exhausted`\nskip; present exactly on those skips."},skipped_count:{default:0,format:"uint",minimum:0,type:"integer"},started_at:{type:"string"},status:{$ref:"#/$defs/AutomationRunStatus"},strict_json:{type:["boolean","null"]},task:{$ref:"#/$defs/AgentTaskKind"},task_key:{type:["string","null"]},trigger:{$ref:"#/$defs/AutomationTrigger"},validation_report:!0},required:["schema_version","run_id","trigger","task","backend","status","accepted_count","rejected_count","started_at","completed_at"],type:"object"},AutomationRunScopeV1:fd,AutomationRunStatus:fc,AutomationTrigger:fm,SessionRetrievalBudgetStageV1:vV},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{run:{$ref:"#/$defs/AutomationRunLedgerRecord"},scope:{$ref:"#/$defs/AutomationRunScopeV1"},status:{$ref:"#/$defs/AutomationReadStatusV1"}},required:["status","scope","run"],title:"AutomationRunViewResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{base:{description:"Base local branch name (e.g. 'main').",type:"string"},cursor:{description:"Authenticated continuation cursor returned by the preceding exact\nbranch-diff page.",type:["string","null"]},file:{description:"Optional file path filter, only show diffs for symbols in this file.",type:["string","null"]},head:{description:"Head local branch name (e.g. 'feature/foo'). Defaults to the current\nbranch.",type:["string","null"]},kind:{description:"Optional kind filter, only show diffs for this symbol kind (e.g.\n'function', 'struct').",type:["string","null"]},limit:{description:"Maximum combined added, removed, and changed results (default: 100,\nat most 256).",format:"uint32",minimum:0,type:["integer","null"]}},required:["base"],title:"BranchDiffSurfaceRequestV1",type:"object"},{$defs:{BranchDiffCompleteV1:{additionalProperties:!1,properties:{base:{type:"string"},base_generation:{type:"string"},base_revision:{type:"string"},base_tree:{type:"string"},changes:{items:{$ref:"#/$defs/BranchSymbolChangeV1"},type:"array"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},head:{type:"string"},head_generation:{type:"string"},head_revision:{type:"string"},head_tree:{type:"string"},status:{$ref:"#/$defs/GitReadCompleteV1"},summary:{$ref:"#/$defs/BranchDiffSummaryV1"},total_changes:{format:"uint",minimum:0,type:"integer"}},required:["status","base","head","base_revision","base_tree","head_revision","head_tree","base_generation","head_generation","total_changes","summary","changes"],type:"object"},BranchDiffPartialV1:{additionalProperties:!1,properties:{base:{type:"string"},base_generation:{type:"string"},base_revision:{type:"string"},base_tree:{type:"string"},changes:{items:{$ref:"#/$defs/BranchSymbolChangeV1"},type:"array"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},head:{type:"string"},head_generation:{type:"string"},head_revision:{type:"string"},head_tree:{type:"string"},next_cursor:{type:"string"},reason:{$ref:"#/$defs/GitResultLimitV1"},status:{$ref:"#/$defs/GitReadPartialV1"},summary:{$ref:"#/$defs/BranchDiffSummaryV1"},total_changes:{format:"uint",minimum:0,type:"integer"}},required:["status","reason","base","head","base_revision","base_tree","head_revision","head_tree","base_generation","head_generation","total_changes","next_cursor","summary","changes"],type:"object"},BranchDiffReferenceUnavailableV1:{additionalProperties:!1,description:"Either branch of `base..head` does not resolve to a local commit.",properties:{base_or_head:{description:"The requested range, `base..head`.",type:"string"},reason:{type:"string"},retryable:{type:"boolean"},status:{$ref:"#/$defs/GitReadUnavailableV1"}},required:["status","base_or_head","reason","retryable"],type:"object"},BranchDiffSummaryV1:{additionalProperties:!1,properties:{added:{format:"uint",minimum:0,type:"integer"},changed:{format:"uint",minimum:0,type:"integer"},removed:{format:"uint",minimum:0,type:"integer"}},required:["added","removed","changed"],type:"object"},BranchDiffUnavailableV1:{additionalProperties:!1,description:"No sealed code-index generations compare the two branches' commits.",properties:{base:{type:"string"},base_generation:{type:["string","null"]},base_revision:{type:"string"},head:{type:"string"},head_generation:{type:["string","null"]},head_revision:{type:"string"},reason:{type:"string"},retryable:{type:"boolean"},status:{$ref:"#/$defs/GitReadUnavailableV1"}},required:["status","base","head","base_revision","head_revision","reason","retryable"],type:"object"},BranchSymbolChangeV1:{oneOf:[{additionalProperties:!1,properties:{change:{const:"added",type:"string"},symbol:{$ref:"#/$defs/BranchSymbolV1"}},required:["change","symbol"],type:"object"},{additionalProperties:!1,properties:{change:{const:"removed",type:"string"},symbol:{$ref:"#/$defs/BranchSymbolV1"}},required:["change","symbol"],type:"object"},{additionalProperties:!1,properties:{base:{$ref:"#/$defs/BranchSymbolV1"},change:{const:"changed",type:"string"},head:{$ref:"#/$defs/BranchSymbolV1"}},required:["change","base","head"],type:"object"}]},BranchSymbolV1:{additionalProperties:!1,description:"A symbol in one branch's sealed generation.",properties:{content_digest:{type:"string"},file:{type:"string"},file_identity:{type:"string"},file_occurrence_id:{type:"string"},kind:{type:"string"},name:{type:"string"},qualified_name:{type:"string"},symbol_identity:{type:"string"},symbol_occurrence_id:{type:"string"}},required:["symbol_identity","symbol_occurrence_id","file_identity","file_occurrence_id","name","qualified_name","kind","file","content_digest"],type:"object"},CodeIndexBuildBlockedReasonV1:fF,CodeIndexConvergenceParkedV1:fL,CodeIndexStalenessStateV1:fB,GitReadCompleteV1:yX,GitReadPartialV1:yY,GitReadUnavailableV1:y1,GitResultLimitV1:y0,PrimitiveFreshnessStateV1:_i,PrimitiveIndexingStateV1:_o,PrimitiveSearchFreshnessV1:_d},$schema:"https://json-schema.org/draft/2020-12/schema",anyOf:[{$ref:"#/$defs/BranchDiffCompleteV1"},{$ref:"#/$defs/BranchDiffPartialV1"},{$ref:"#/$defs/BranchDiffUnavailableV1"},{$ref:"#/$defs/BranchDiffReferenceUnavailableV1"}],title:"BranchDiffResultV1"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{cursor:{description:"Continuation cursor returned as `next_cursor` by the preceding page\nwith the same `limit`.",type:["string","null"]},limit:{description:"Maximum local refs to return (default: 100, at most 128).",format:"uint32",minimum:0,type:["integer","null"]}},title:"BranchListSurfaceRequestV1",type:"object"},{$defs:{BranchListPageV1:{additionalProperties:!1,properties:{examined:{format:"uint",minimum:0,type:"integer"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},limit:{format:"uint",minimum:0,type:"integer"},next_cursor:{type:["string","null"]},reason:{anyOf:[{$ref:"#/$defs/GitReferenceLimitV1"},{type:"null"}]},snapshot_count:{format:"uint",minimum:0,type:"integer"},snapshots:{items:{$ref:"#/$defs/BranchSnapshotEntryV1"},type:"array"},status:{$ref:"#/$defs/GitPageStatusV1"}},required:["status","snapshot_count","examined","limit","snapshots"],type:"object"},BranchReadUnavailableV1:{additionalProperties:!1,description:"A local branch read refused before any snapshot was taken.",properties:{reason:{type:"string"},retryable:{type:"boolean"},status:{$ref:"#/$defs/GitReadUnavailableV1"}},required:["status","reason","retryable"],type:"object"},BranchSnapshotEntryV1:{additionalProperties:!1,properties:{branch:{type:"string"},source_revision:{type:"string"},source_tree:{type:"string"}},required:["branch","source_revision","source_tree"],type:"object"},CodeIndexBuildBlockedReasonV1:fF,CodeIndexConvergenceParkedV1:fL,CodeIndexStalenessStateV1:fB,GitPageStatusV1:yQ,GitReadUnavailableV1:y1,GitReferenceLimitV1:{enum:["reference_limit"],type:"string"},PrimitiveFreshnessStateV1:_i,PrimitiveIndexingStateV1:_o,PrimitiveSearchFreshnessV1:_d},$schema:"https://json-schema.org/draft/2020-12/schema",anyOf:[{$ref:"#/$defs/BranchListPageV1"},{$ref:"#/$defs/BranchReadUnavailableV1"}],title:"BranchListResultV1"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{branch:{description:"Exact local branch name to search.",type:"string"},cursor:{description:"Authenticated continuation cursor returned by the preceding exact\nbranch-search page.",type:["string","null"]},limit:{description:"Maximum number of results to return (default: 10, at most 500).",format:"uint32",minimum:0,type:["integer","null"]},query:{description:"Search query string to match against symbol names.",type:"string"}},required:["branch","query"],title:"BranchSearchSurfaceRequestV1",type:"object"},{$defs:{BranchReferenceUnavailableV1:{additionalProperties:!1,description:"The named branch does not resolve to a local commit.",properties:{branch:{type:"string"},reason:{type:"string"},retryable:{type:"boolean"},status:{$ref:"#/$defs/GitReadUnavailableV1"}},required:["status","branch","reason","retryable"],type:"object"},BranchSearchHitV1:{additionalProperties:!1,properties:{branch:{type:"string"},candidate:{$ref:"#/$defs/RankedCandidate"},code_generation:{type:"string"},kind:{type:["string","null"]},name:{type:["string","null"]},path:{type:["string","null"]},qualified_name:{type:["string","null"]},source_reference:{type:"string"},source_revision:{type:"string"},source_tree:{type:"string"}},required:["candidate","branch","source_reference","source_revision","source_tree","code_generation"],type:"object"},BranchSearchPageV1:{additionalProperties:!1,properties:{branch:{type:"string"},code_generation:{type:"string"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},next_cursor:{type:["string","null"]},reason:{anyOf:[{$ref:"#/$defs/GitResultLimitV1"},{type:"null"}]},results:{items:{$ref:"#/$defs/BranchSearchHitV1"},type:"array"},source_reference:{type:"string"},source_revision:{type:"string"},source_tree:{type:"string"},status:{$ref:"#/$defs/GitPageStatusV1"}},required:["status","branch","source_reference","source_revision","source_tree","code_generation","results"],type:"object"},BranchSearchUnavailableV1:{additionalProperties:!1,description:"No sealed code-index generation answers for the branch's commit.",properties:{branch:{type:"string"},code_generation:{type:["string","null"]},reason:{type:"string"},retryable:{type:"boolean"},source_revision:{type:"string"},status:{$ref:"#/$defs/GitReadUnavailableV1"}},required:["status","branch","source_revision","reason","retryable"],type:"object"},CalibrationProfileId:fR,CandidateContribution:fj,CodeIndexBuildBlockedReasonV1:fF,CodeIndexConvergenceParkedV1:fL,CodeIndexStalenessStateV1:fB,ComponentRevision:f0,EvidenceRole:h2,ExactClass:h4,FileOccurrenceId:yj,FixedPointScore:yT,FreshnessCompatibilityV1:yO,FusedCandidate:yE,GitPageStatusV1:yQ,GitReadUnavailableV1:y1,GitResultLimitV1:y0,LogicalCopyClusterId:gw,LogicalEvidenceId:gV,OccurrenceProvenance:g5,PrimitiveFreshnessStateV1:_i,PrimitiveIndexingStateV1:_o,PrimitiveSearchFreshnessV1:_d,RankedCandidate:{additionalProperties:!1,description:"A fused candidate with its final deterministic ordinal.",properties:{candidate:{$ref:"#/$defs/FusedCandidate"},final_ordinal:{format:"uint32",minimum:0,type:"integer"}},required:["candidate","final_ordinal"],type:"object"},RankingDecision:_j,RankingDecisionKind:_C,RepositoryId:_z,RetrievalAnchorId:_J,RetrievalSourceRoleV1:_X,RetrieverKind:_1,ScoreDomainId:vm,SessionOrThreadId:vb,SourceFreshness:vW,SourceInstanceKey:vM,SourceNamespace:vz,SourceOccurrenceId:vD,UtcMicros:bs},$schema:"https://json-schema.org/draft/2020-12/schema",anyOf:[{$ref:"#/$defs/BranchSearchPageV1"},{$ref:"#/$defs/BranchSearchUnavailableV1"},{$ref:"#/$defs/BranchReferenceUnavailableV1"}],title:"BranchSearchResultV1"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{qualified_name:{description:"The exact qualified name to look up.",type:"string"}},required:["qualified_name"],title:"ByQualifiedNameSurfaceRequestV1",type:"object"},{$defs:{PrimitiveSymbolLocationV1:_l},$schema:"https://json-schema.org/draft/2020-12/schema",description:"Every indexed symbol sharing one qualified name (overloads, generics,\nseparate impl blocks).",items:{$ref:"#/$defs/PrimitiveSymbolLocationV1"},title:"ByQualifiedNameResultV1",type:"array"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{from_node_id:{type:"string"},maximum_depth:{default:8,format:"uint32",minimum:0,type:"integer"},to_node_id:{type:"string"}},required:["from_node_id","to_node_id"],title:"CallChainPrimitiveRequest",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{edge_kinds:{items:{type:"string"},type:"array"},node_ids:{items:{type:"string"},type:"array"}},required:["node_ids","edge_kinds"],title:"CallChainPrimitiveResult",type:"object"},{$defs:{NativeIntegrationTransactionId:g1},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{transaction_id:{$ref:"#/$defs/NativeIntegrationTransactionId"}},required:["transaction_id"],title:"NativeIntegrationCancelSurfaceRequest",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{from_ref:{description:"Starting git ref (commit, branch, tag).",type:"string"},to_ref:{description:"Ending git ref (commit, branch, tag).",type:"string"}},required:["from_ref","to_ref"],title:"ChangelogSurfaceRequestV1",type:"object"},{$defs:{ChangelogCompleteV1:{additionalProperties:!1,properties:{base_generation:{type:"string"},changed_file_count:{format:"uint",minimum:0,type:"integer"},changed_files:{items:{type:"string"},type:"array"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},from_ref:{type:"string"},head_generation:{type:"string"},status:{$ref:"#/$defs/GitReadCompleteV1"},symbol_changes_coverage:{$ref:"#/$defs/SymbolChangesCompleteV1"},symbols_added:{items:{$ref:"#/$defs/GitComparedSymbolV1"},type:"array"},symbols_modified:{items:{$ref:"#/$defs/GitComparedSymbolV1"},type:"array"},symbols_removed:{items:{$ref:"#/$defs/GitComparedSymbolV1"},type:"array"},to_ref:{type:"string"}},required:["status","from_ref","to_ref","changed_file_count","changed_files","base_generation","head_generation","symbols_added","symbols_removed","symbols_modified","symbol_changes_coverage"],type:"object"},ChangelogPartialV1:{additionalProperties:!1,description:"The tree diff without symbol changes: the refs are not both exact local\nbranches with sealed generations.",properties:{changed_file_count:{format:"uint",minimum:0,type:"integer"},changed_files:{items:{type:"string"},type:"array"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},from_ref:{type:"string"},status:{$ref:"#/$defs/GitReadPartialV1"},symbol_changes_coverage:{$ref:"#/$defs/SymbolChangesUnavailableV1"},symbols_added:{items:{$ref:"#/$defs/GitComparedSymbolV1"},type:"array"},symbols_modified:{items:{$ref:"#/$defs/GitComparedSymbolV1"},type:"array"},symbols_removed:{items:{$ref:"#/$defs/GitComparedSymbolV1"},type:"array"},to_ref:{type:"string"}},required:["status","from_ref","to_ref","changed_file_count","changed_files","symbols_added","symbols_removed","symbols_modified","symbol_changes_coverage"],type:"object"},CodeIndexBuildBlockedReasonV1:fF,CodeIndexConvergenceParkedV1:fL,CodeIndexStalenessStateV1:fB,GitComparedSymbolV1:yN,GitReadCompleteV1:yX,GitReadPartialV1:yY,GitReadUnavailableV1:y1,GitToolErrorKindV1:y6,GitToolErrorV1:y3,GitToolFailureV1:y9,GitToolOperationV1:y5,PrimitiveFreshnessStateV1:_i,PrimitiveIndexingStateV1:_o,PrimitiveSearchFreshnessV1:_d,SymbolChangesCompleteV1:{additionalProperties:!1,properties:{status:{$ref:"#/$defs/GitReadCompleteV1"}},required:["status"],type:"object"},SymbolChangesUnavailableV1:vB},$schema:"https://json-schema.org/draft/2020-12/schema",anyOf:[{$ref:"#/$defs/ChangelogCompleteV1"},{$ref:"#/$defs/ChangelogPartialV1"},{$ref:"#/$defs/GitToolFailureV1"}],title:"ChangelogResultV1"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{limit:{description:"Maximum number of cycles to report, largest first (default: 25, max:\n200). The response always states the total detected and how many were\nomitted.",format:"uint32",minimum:0,type:["integer","null"]},member_limit:{description:"Maximum member files listed per reported cycle (default: 12, max:\n200). Each entry states its true member_count and\nomitted_member_count.",format:"uint32",minimum:0,type:["integer","null"]}},title:"CircularSurfaceRequestV1",type:"object"},{$defs:{CircularCycleV1:{additionalProperties:!1,description:"One reported file cycle: the members that fit the member bound, plus the\ncomponent's true size so the omission is stated rather than hidden.",properties:{member_count:{format:"uint64",minimum:0,type:"integer"},members:{items:{type:"string"},type:"array"},omitted_member_count:{format:"uint64",minimum:0,type:"integer"}},required:["members","member_count","omitted_member_count"],type:"object"},CodeIndexBuildBlockedReasonV1:fF,CodeIndexConvergenceParkedV1:fL,CodeIndexStalenessStateV1:fB,PrimitiveFreshnessStateV1:_i,PrimitiveIndexingStateV1:_o,PrimitiveSearchFreshnessV1:_d},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{cycle_count:{format:"uint64",minimum:0,type:"integer"},cycles:{items:{$ref:"#/$defs/CircularCycleV1"},type:"array"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},limit:{format:"uint64",minimum:0,type:"integer"},member_limit:{format:"uint64",minimum:0,type:"integer"},omitted_cycle_count:{format:"uint64",minimum:0,type:"integer"},reported_cycle_count:{format:"uint64",minimum:0,type:"integer"}},required:["cycle_count","reported_cycle_count","omitted_cycle_count","limit","member_limit","cycles"],title:"CircularResultV1",type:"object"},{$defs:{CallableCodeSurfaceMeta:fq,CodeGenerationId:fz,CodeQueryScope:fZ,ResultProjection:_H,RetrievalOrder:_Z},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{maximum_depth:{default:3,format:"uint32",minimum:0,type:"integer"},meta:{$ref:"#/$defs/CallableCodeSurfaceMeta",default:{cursor:null,order:"source_position",projection:"evidence"}},node_id:{type:"string"},resolve_trait_dispatch:{default:!0,type:"boolean"},scope:{$ref:"#/$defs/CodeQueryScope",default:{generation:"code-generation:unpinned-latest.v1",path_prefix:null}}},required:["node_id"],title:"CodeCalleesSurfaceRequest",type:"object"},{$defs:{CodeGenerationId:fz,SymbolPrimitiveRecord:vZ,SymbolRelationRecord:vQ},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Generation-bound page returned by every callable code query. Coverage,\nomissions, scoring, and terminal state remain in the enclosing\n[`crate::result::RetrievalEvidence`].",properties:{generation:{$ref:"#/$defs/CodeGenerationId"},items:{items:{$ref:"#/$defs/SymbolRelationRecord"},type:"array"},next_cursor:{description:"Opaque resume token; its bounded string is the public wire form.",type:["string","null"]},query_fallback:{description:"Independently hashed exact/lexical/graph subpayload. Callers preserve it\nbyte-for-byte rather than interpreting it, so the public schema admits\nthe canonical JSON it carries without re-declaring its internals."},total:{format:"uint64",minimum:0,type:["integer","null"]}},required:["generation","items"],title:"CodeQueryPage",type:"object"},{$defs:{CallableCodeSurfaceMeta:fq,ResultProjection:_H,RetrievalOrder:_Z,SymbolGraphScope:vK},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{maximum_depth:{default:3,format:"uint32",minimum:0,type:"integer"},meta:{$ref:"#/$defs/CallableCodeSurfaceMeta",default:{cursor:null,order:"source_position",projection:"evidence"}},node_id:{type:"string"},scope:{$ref:"#/$defs/SymbolGraphScope",default:{path_prefix:null}}},required:["node_id"],title:"CodeCallersSurfaceRequest",type:"object"},{$defs:{CodeGenerationId:fz,CodeGraphReadFreshnessV1:fD,PrimitiveSupportGap:_c,SymbolPrimitiveRecord:vZ,SymbolRelationRecord:vQ,UtcMicros:bs},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Bounded semantic result shared by the compatibility surfaces. Rendering,\ntransport envelopes, and MCP content blocks remain outside this contract.",properties:{freshness:{$ref:"#/$defs/CodeGraphReadFreshnessV1"},generation:{$ref:"#/$defs/CodeGenerationId"},items:{items:{$ref:"#/$defs/SymbolRelationRecord"},type:"array"},next_cursor:{description:"Opaque resume token; its bounded string is the public wire form.",type:["string","null"]},related_edge_count:{format:"uint64",minimum:0,type:["integer","null"]},support_gaps:{items:{$ref:"#/$defs/PrimitiveSupportGap"},type:"array"},total:{format:"uint64",minimum:0,type:["integer","null"]},truncated:{type:"boolean"}},required:["generation","freshness","items","truncated","support_gaps"],title:"SymbolGraphPage",type:"object"},{$defs:{CallableCodeSurfaceMeta:fq,CodeGenerationId:fz,CodeQueryScope:fZ,ResultProjection:_H,RetrievalOrder:_Z},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{meta:{$ref:"#/$defs/CallableCodeSurfaceMeta"},node_id:{type:"string"},scope:{$ref:"#/$defs/CodeQueryScope"}},required:["node_id","scope","meta"],title:"CodeNavigationSurfaceRequest",type:"object"},{$defs:{CodeGenerationId:fz,SymbolPrimitiveRecord:vZ},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Generation-bound page returned by every callable code query. Coverage,\nomissions, scoring, and terminal state remain in the enclosing\n[`crate::result::RetrievalEvidence`].",properties:{generation:{$ref:"#/$defs/CodeGenerationId"},items:{items:{$ref:"#/$defs/SymbolPrimitiveRecord"},type:"array"},next_cursor:{description:"Opaque resume token; its bounded string is the public wire form.",type:["string","null"]},query_fallback:{description:"Independently hashed exact/lexical/graph subpayload. Callers preserve it\nbyte-for-byte rather than interpreting it, so the public schema admits\nthe canonical JSON it carries without re-declaring its internals."},total:{format:"uint64",minimum:0,type:["integer","null"]}},required:["generation","items"],title:"CodeQueryPage",type:"object"},{$defs:{CallableCodeSurfaceMeta:fq,CodeGenerationId:fz,CodeQueryScope:fZ,ExactTechnicalTermKindV1:h6,ResultProjection:_H,RetrievalOrder:_Z},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{kind:{anyOf:[{$ref:"#/$defs/ExactTechnicalTermKindV1"},{type:"null"}]},literal:{type:"string"},meta:{$ref:"#/$defs/CallableCodeSurfaceMeta"},scope:{$ref:"#/$defs/CodeQueryScope"}},required:["literal","scope","meta"],title:"CodeExactOccurrenceSurfaceRequest",type:"object"},{$defs:{CodeGenerationId:fz,CodeOccurrenceRecord:fJ,CodeSearchChunkId:fQ,ExactOccurrenceRecord:{additionalProperties:!1,properties:{matched_kind:{$ref:"#/$defs/ExactTechnicalTermKindV1"},matched_literal:{type:"string"},occurrence:{$ref:"#/$defs/CodeOccurrenceRecord"}},required:["occurrence","matched_kind","matched_literal"],type:"object"},ExactTechnicalTermKindV1:h6,FileOccurrenceId:yj,SourceSpan:vF,SymbolOccurrenceId:vJ},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Generation-bound page returned by every callable code query. Coverage,\nomissions, scoring, and terminal state remain in the enclosing\n[`crate::result::RetrievalEvidence`].",properties:{generation:{$ref:"#/$defs/CodeGenerationId"},items:{items:{$ref:"#/$defs/ExactOccurrenceRecord"},type:"array"},next_cursor:{description:"Opaque resume token; its bounded string is the public wire form.",type:["string","null"]},query_fallback:{description:"Independently hashed exact/lexical/graph subpayload. Callers preserve it\nbyte-for-byte rather than interpreting it, so the public schema admits\nthe canonical JSON it carries without re-declaring its internals."},total:{format:"uint64",minimum:0,type:["integer","null"]}},required:["generation","items"],title:"CodeQueryPage",type:"object"},{$defs:{CallableCodeSurfaceMeta:fq,CodeFacetDimension:fN,CodeGenerationId:fz,CodeQueryScope:fZ,ResultProjection:_H,RetrievalOrder:_Z},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{dimension:{$ref:"#/$defs/CodeFacetDimension"},meta:{$ref:"#/$defs/CallableCodeSurfaceMeta"},scope:{$ref:"#/$defs/CodeQueryScope"}},required:["dimension","scope","meta"],title:"CodeFacetSurfaceRequest",type:"object"},{$defs:{CodeFacetDimension:fN,CodeFacetRecord:{additionalProperties:!1,properties:{count:{format:"uint64",minimum:0,type:"integer"},dimension:{$ref:"#/$defs/CodeFacetDimension"},value:{type:"string"}},required:["dimension","value","count"],type:"object"},CodeGenerationId:fz},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Generation-bound page returned by every callable code query. Coverage,\nomissions, scoring, and terminal state remain in the enclosing\n[`crate::result::RetrievalEvidence`].",properties:{generation:{$ref:"#/$defs/CodeGenerationId"},items:{items:{$ref:"#/$defs/CodeFacetRecord"},type:"array"},next_cursor:{description:"Opaque resume token; its bounded string is the public wire form.",type:["string","null"]},query_fallback:{description:"Independently hashed exact/lexical/graph subpayload. Callers preserve it\nbyte-for-byte rather than interpreting it, so the public schema admits\nthe canonical JSON it carries without re-declaring its internals."},total:{format:"uint64",minimum:0,type:["integer","null"]}},required:["generation","items"],title:"CodeQueryPage",type:"object"},{$defs:{CallableCodeSurfaceMeta:fq,ImplementationSelector:{oneOf:[{properties:{name:{type:"string"},selector:{const:"trait",type:"string"}},required:["selector","name"],type:"object"},{properties:{name:{type:"string"},selector:{const:"method",type:"string"}},required:["selector","name"],type:"object"}]},ResultProjection:_H,RetrievalOrder:_Z,SymbolGraphScope:vK},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{meta:{$ref:"#/$defs/CallableCodeSurfaceMeta",default:{cursor:null,order:"source_position",projection:"evidence"}},scope:{$ref:"#/$defs/SymbolGraphScope",default:{path_prefix:null}},selector:{$ref:"#/$defs/ImplementationSelector"}},required:["selector"],title:"CodeImplementationsSurfaceRequest",type:"object"},{$defs:{CodeGenerationId:fz,CodeGraphReadFreshnessV1:fD,ImplementationRecord:{additionalProperties:!1,description:"One implementation match with its exact source: the implementing\nimpl/class block (methods included) for a trait selector, or the function\nbody for a method selector.",properties:{body:{type:"string"},dispatch_from:{description:"Trait or interface node a trait-selector match was reached through.",type:["string","null"]},edge_kind:{type:"string"},symbol:{$ref:"#/$defs/SymbolPrimitiveRecord"}},required:["symbol","edge_kind","body"],type:"object"},PrimitiveSupportGap:_c,SymbolPrimitiveRecord:vZ,UtcMicros:bs},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Bounded semantic result shared by the compatibility surfaces. Rendering,\ntransport envelopes, and MCP content blocks remain outside this contract.",properties:{freshness:{$ref:"#/$defs/CodeGraphReadFreshnessV1"},generation:{$ref:"#/$defs/CodeGenerationId"},items:{items:{$ref:"#/$defs/ImplementationRecord"},type:"array"},next_cursor:{description:"Opaque resume token; its bounded string is the public wire form.",type:["string","null"]},related_edge_count:{format:"uint64",minimum:0,type:["integer","null"]},support_gaps:{items:{$ref:"#/$defs/PrimitiveSupportGap"},type:"array"},total:{format:"uint64",minimum:0,type:["integer","null"]},truncated:{type:"boolean"}},required:["generation","freshness","items","truncated","support_gaps"],title:"SymbolGraphPage",type:"object"},{$defs:{CallableCodeSurfaceMeta:fq,CodeGenerationId:fz,CodeLexicalField:{description:"Typed code fields accepted by the generation-owned lexical authority.",enum:["symbol_name","qualified_name","path","signature","documentation","body_text","preamble_text","exact_term","subtoken"],type:"string"},CodeLexicalFieldFilter:{additionalProperties:!1,properties:{field:{$ref:"#/$defs/CodeLexicalField"},include:{type:"boolean"}},required:["field","include"],type:"object"},CodeQueryScope:fZ,ResultProjection:_H,RetrievalOrder:_Z},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Serializable adapter DTO for the request-local phrase query view.\n\nThe callable application request deliberately keeps its sanitized query\nnon-serializable. The owning runtime supplies the exact sanitizer\nrevisions when converting this transport DTO.",properties:{field_filters:{default:[],items:{$ref:"#/$defs/CodeLexicalFieldFilter"},type:"array"},fuzzy_budget:{default:0,format:"uint32",minimum:0,type:"integer"},meta:{$ref:"#/$defs/CallableCodeSurfaceMeta"},phrases:{items:{type:"string"},type:"array"},query:{type:"string"},scope:{$ref:"#/$defs/CodeQueryScope"}},required:["query","phrases","scope","meta"],title:"CodePhraseSearchSurfaceRequest",type:"object"},{$defs:{CodeGenerationId:fz,CodeOccurrenceRecord:fJ,CodeSearchChunkId:fQ,FileOccurrenceId:yj,LexicalOccurrenceRecord:{additionalProperties:!1,properties:{matched_phrases:{items:{type:"string"},type:"array"},matched_terms:{items:{type:"string"},type:"array"},occurrence:{$ref:"#/$defs/CodeOccurrenceRecord"},score_micros:{format:"uint64",minimum:0,type:"integer"}},required:["occurrence","score_micros","matched_phrases","matched_terms"],type:"object"},SourceSpan:vF,SymbolOccurrenceId:vJ},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Generation-bound page returned by every callable code query. Coverage,\nomissions, scoring, and terminal state remain in the enclosing\n[`crate::result::RetrievalEvidence`].",properties:{generation:{$ref:"#/$defs/CodeGenerationId"},items:{items:{$ref:"#/$defs/LexicalOccurrenceRecord"},type:"array"},next_cursor:{description:"Opaque resume token; its bounded string is the public wire form.",type:["string","null"]},query_fallback:{description:"Independently hashed exact/lexical/graph subpayload. Callers preserve it\nbyte-for-byte rather than interpreting it, so the public schema admits\nthe canonical JSON it carries without re-declaring its internals."},total:{format:"uint64",minimum:0,type:["integer","null"]}},required:["generation","items"],title:"CodeQueryPage",type:"object"},{$defs:{CallableCodeSurfaceMeta:fq,ResultProjection:_H,RetrievalOrder:_Z,SymbolGraphScope:vK},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{is_async:{type:["boolean","null"]},meta:{$ref:"#/$defs/CallableCodeSurfaceMeta",default:{cursor:null,order:"source_position",projection:"evidence"}},params:{default:[],items:{type:"string"},type:"array"},returns:{type:["string","null"]},scope:{$ref:"#/$defs/SymbolGraphScope",default:{path_prefix:null}}},title:"CodeSignatureSearchSurfaceRequest",type:"object"},{$defs:{CodeGenerationId:fz,CodeGraphReadFreshnessV1:fD,PrimitiveSupportGap:_c,SymbolPrimitiveRecord:vZ,UtcMicros:bs},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Bounded semantic result shared by the compatibility surfaces. Rendering,\ntransport envelopes, and MCP content blocks remain outside this contract.",properties:{freshness:{$ref:"#/$defs/CodeGraphReadFreshnessV1"},generation:{$ref:"#/$defs/CodeGenerationId"},items:{items:{$ref:"#/$defs/SymbolPrimitiveRecord"},type:"array"},next_cursor:{description:"Opaque resume token; its bounded string is the public wire form.",type:["string","null"]},related_edge_count:{format:"uint64",minimum:0,type:["integer","null"]},support_gaps:{items:{$ref:"#/$defs/PrimitiveSupportGap"},type:"array"},total:{format:"uint64",minimum:0,type:["integer","null"]},truncated:{type:"boolean"}},required:["generation","freshness","items","truncated","support_gaps"],title:"SymbolGraphPage",type:"object"},{$defs:{CallableCodeSurfaceMeta:fq,ResultProjection:_H,RetrievalOrder:_Z,SymbolGraphScope:vK},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{lazy_index_ignored_dependencies:{type:"boolean"},meta:{$ref:"#/$defs/CallableCodeSurfaceMeta"},query:{type:"string"},scope:{$ref:"#/$defs/SymbolGraphScope"}},required:["query","scope","lazy_index_ignored_dependencies","meta"],title:"CodeSymbolSearchSurfaceRequest",type:"object"},{$defs:{CallableCodeSurfaceMeta:fq,CodeGenerationId:fz,CodeQueryScope:fZ,ResultProjection:_H,RetrievalOrder:_Z},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{meta:{$ref:"#/$defs/CallableCodeSurfaceMeta"},scope:{$ref:"#/$defs/CodeQueryScope"}},required:["scope","meta"],title:"CodeTimelineSurfaceRequest",type:"object"},{$defs:{CodeGenerationId:fz,CodeTimelineRecord:{additionalProperties:!1,properties:{file_count:{format:"uint64",minimum:0,type:"integer"},generation:{$ref:"#/$defs/CodeGenerationId"},indexed_at:{$ref:"#/$defs/UtcMicros"},symbol_count:{format:"uint64",minimum:0,type:"integer"}},required:["generation","indexed_at","file_count","symbol_count"],type:"object"},UtcMicros:bs},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Generation-bound page returned by every callable code query. Coverage,\nomissions, scoring, and terminal state remain in the enclosing\n[`crate::result::RetrievalEvidence`].",properties:{generation:{$ref:"#/$defs/CodeGenerationId"},items:{items:{$ref:"#/$defs/CodeTimelineRecord"},type:"array"},next_cursor:{description:"Opaque resume token; its bounded string is the public wire form.",type:["string","null"]},query_fallback:{description:"Independently hashed exact/lexical/graph subpayload. Callers preserve it\nbyte-for-byte rather than interpreting it, so the public schema admits\nthe canonical JSON it carries without re-declaring its internals."},total:{format:"uint64",minimum:0,type:["integer","null"]}},required:["generation","items"],title:"CodeQueryPage",type:"object"},{$defs:{CallableCodeSurfaceMeta:fq,ResultProjection:_H,RetrievalOrder:_Z,SymbolGraphScope:vK},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{maximum_depth:{default:5,format:"uint32",minimum:0,type:"integer"},meta:{$ref:"#/$defs/CallableCodeSurfaceMeta",default:{cursor:null,order:"source_position",projection:"evidence"}},node_id:{type:"string"},scope:{$ref:"#/$defs/SymbolGraphScope",default:{path_prefix:null}}},required:["node_id"],title:"CodeTypeHierarchySurfaceRequest",type:"object"},{$defs:{CodeGenerationId:fz,CodeGraphReadFreshnessV1:fD,PrimitiveSupportGap:_c,SymbolPrimitiveRecord:vZ,TypeHierarchyRecord:{additionalProperties:!1,properties:{depth:{format:"uint32",minimum:0,type:"integer"},edge_kind:{type:"string"},parent_node_id:{type:"string"},symbol:{$ref:"#/$defs/SymbolPrimitiveRecord"}},required:["symbol","parent_node_id","edge_kind","depth"],type:"object"},UtcMicros:bs},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Bounded semantic result shared by the compatibility surfaces. Rendering,\ntransport envelopes, and MCP content blocks remain outside this contract.",properties:{freshness:{$ref:"#/$defs/CodeGraphReadFreshnessV1"},generation:{$ref:"#/$defs/CodeGenerationId"},items:{items:{$ref:"#/$defs/TypeHierarchyRecord"},type:"array"},next_cursor:{description:"Opaque resume token; its bounded string is the public wire form.",type:["string","null"]},related_edge_count:{format:"uint64",minimum:0,type:["integer","null"]},support_gaps:{items:{$ref:"#/$defs/PrimitiveSupportGap"},type:"array"},total:{format:"uint64",minimum:0,type:["integer","null"]},truncated:{type:"boolean"}},required:["generation","freshness","items","truncated","support_gaps"],title:"SymbolGraphPage",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{staged_only:{description:"If true, only analyze staged changes (default: false = all uncommitted\nchanges).",type:["boolean","null"]}},title:"CommitContextSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fF,CodeIndexConvergenceParkedV1:fL,CodeIndexStalenessStateV1:fB,CommitCategoryV1:{description:"The commit category the changed file roles suggest.",enum:["feature/fix (source + tests)","feature/fix/refactor","test","chore/docs/config"],type:"string"},CommitContextSummaryV1:{additionalProperties:!1,properties:{changed_files:{items:{$ref:"#/$defs/CommitFileRoleV1"},type:"array"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},recent_commits:{items:{type:"string"},type:"array"},suggested_category:{anyOf:[{$ref:"#/$defs/CommitCategoryV1"},{type:"null"}],description:"Absent when the worktree has no changes."},summary:{type:"string"},symbols_by_role:{additionalProperties:!1,properties:{config:{items:{$ref:"#/$defs/CommitSymbolEntryV1"},type:"array"},docs:{items:{$ref:"#/$defs/CommitSymbolEntryV1"},type:"array"},source:{items:{$ref:"#/$defs/CommitSymbolEntryV1"},type:"array"},test:{items:{$ref:"#/$defs/CommitSymbolEntryV1"},type:"array"}},type:"object"}},required:["changed_files","symbols_by_role","recent_commits","summary"],type:"object"},CommitFileRoleV1:{additionalProperties:!1,properties:{file:{type:"string"},role:{$ref:"#/$defs/GitFileRoleV1"},symbols:{format:"uint",minimum:0,type:"integer"}},required:["file","role","symbols"],type:"object"},CommitSymbolEntryV1:{anyOf:[{$ref:"#/$defs/CommitSymbolV1"},{$ref:"#/$defs/ConfigSummaryV1"}]},CommitSymbolV1:{additionalProperties:!1,properties:{file:{type:"string"},kind:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},name:{type:"string"}},required:["name","kind","file","line"],type:"object"},ConfigSummaryKindV1:f4,ConfigSummaryV1:f6,GitFileRoleV1:{description:"A changed file's semantic role.",enum:["config","docs","source","test"],type:"string"},GitToolErrorKindV1:y6,GitToolErrorV1:y3,GitToolFailureV1:y9,GitToolOperationV1:y5,PrimitiveFreshnessStateV1:_i,PrimitiveIndexingStateV1:_o,PrimitiveSearchFreshnessV1:_d},$schema:"https://json-schema.org/draft/2020-12/schema",anyOf:[{$ref:"#/$defs/CommitContextSummaryV1"},{$ref:"#/$defs/GitToolFailureV1"}],title:"CommitContextResultV1"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{limit:{description:"Maximum number of results to return (default: 10, at most 100).",format:"uint32",minimum:0,type:["integer","null"]},node_kind:{description:"Filter by node kind (default: every kind).",type:["string","null"]},path:{description:"Filter to files under this directory path (e.g. 'src/main/java').",type:["string","null"]}},title:"ComplexitySurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fF,CodeIndexConvergenceParkedV1:fL,CodeIndexStalenessStateV1:fB,ComplexityAnalysisV1:f1,ComplexityReportEntryV1:{additionalProperties:!1,properties:{branches:{format:"uint32",minimum:0,type:["integer","null"]},complexity_analysis:{$ref:"#/$defs/ComplexityAnalysisV1"},cyclomatic_complexity:{description:"The counters are `None` when `complexity_analysis` reports the bounded\nwalk did not cover the body.",format:"uint32",minimum:0,type:["integer","null"]},fan_in:{format:"uint64",minimum:0,type:"integer"},fan_out:{format:"uint64",minimum:0,type:"integer"},file:{type:"string"},id:{type:"string"},kind:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},lines:{format:"uint32",minimum:0,type:"integer"},loops:{format:"uint32",minimum:0,type:["integer","null"]},max_nesting:{format:"uint32",minimum:0,type:["integer","null"]},name:{type:"string"},score:{format:"uint64",minimum:0,type:"integer"}},required:["id","name","kind","file","line","lines","complexity_analysis","fan_out","fan_in","score"],type:"object"},PrimitiveFreshnessStateV1:_i,PrimitiveIndexingStateV1:_o,PrimitiveSearchFreshnessV1:_d},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{formula:{type:"string"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},note:{type:"string"},ranking:{items:{$ref:"#/$defs/ComplexityReportEntryV1"},type:"array"},result_count:{format:"uint64",minimum:0,type:"integer"}},required:["formula","note","result_count","ranking"],title:"ComplexityReportV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Exactly one of `path` or `glob` names the files to query.",properties:{glob:{description:"Glob pattern to match multiple config files (e.g. '**/Cargo.toml').\nMutually exclusive with 'path'.",type:["string","null"]},key:{description:"Dot-separated key path (e.g. 'package.version',\n'dependencies.tokio.version').",type:"string"},path:{description:"Project-relative path to a single config file (e.g. 'Cargo.toml').\nMutually exclusive with 'glob'.",type:["string","null"]}},required:["key"],title:"ConfigSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fF,CodeIndexConvergenceParkedV1:fL,CodeIndexStalenessStateV1:fB,ConfigKeyFoundV1:{additionalProperties:!1,properties:{file:{type:"string"},key:{type:"string"},line:{description:"The first line whose text starts with the key's leaf segment.",format:"uint32",minimum:0,type:["integer","null"]},value:!0},required:["file","key","value"],type:"object"},ConfigKeyMissingV1:{additionalProperties:!1,description:"`value` is always null and `found` always false; both stay on the wire\nso a missing key reads the same as it always has.",properties:{file:{type:"string"},found:{type:"boolean"},key:{type:"string"},value:{type:"null"}},required:["file","key","value","found"],type:"object"},ConfigMatchV1:{anyOf:[{$ref:"#/$defs/ConfigParseErrorV1"},{$ref:"#/$defs/ConfigKeyMissingV1"},{$ref:"#/$defs/ConfigKeyFoundV1"}],description:"One queried config file: the file's parse error, the key's absence, or the\nkey's value and defining line.\n\nThe variants are distinguished by their exact field sets, so each one\ndenies unknown fields and the most specific shapes are tried first."},ConfigParseErrorV1:{additionalProperties:!1,properties:{error:{type:"string"},file:{type:"string"}},required:["file","error"],type:"object"},PrimitiveFreshnessStateV1:_i,PrimitiveIndexingStateV1:_o,PrimitiveSearchFreshnessV1:_d},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},match_count:{description:"Files where the key was found or that failed to parse.",format:"uint",minimum:0,type:"integer"},matches:{items:{$ref:"#/$defs/ConfigMatchV1"},type:"array"}},required:["match_count","matches"],title:"ConfigResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{cursor:{default:null,description:"The previous page's `next_cursor`, valid only with the same `limit`.",type:["string","null"]},limit:{format:"uint",minimum:0,type:"integer"}},required:["limit"],title:"ConfigurationAuditRequestV1",type:"object"},{$defs:{ActorId:mU,ConfigurationAuditEvent:{additionalProperties:!1,description:"Append-only audit record. `target_commitment` is event-scoped and cannot be\njoined across audit events; a caller must be separately authorized before\nany canonical target is resolved by the store/application layer.",properties:{actor_id:{$ref:"#/$defs/ActorId"},base_revision_id:{$ref:"#/$defs/ConfigurationRevisionId"},event_id:{$ref:"#/$defs/ConfigurationAuditEventId"},event_kind:{$ref:"#/$defs/ConfigurationAuditEventKindV1"},idempotency_key:{anyOf:[{$ref:"#/$defs/ConfigurationIdempotencyKey"},{type:"null"}]},occurred_at:{$ref:"#/$defs/UtcMicros"},operation_digest:{$ref:"#/$defs/ManifestDigest"},receipt_id:{anyOf:[{$ref:"#/$defs/ConfigurationReceiptId"},{type:"null"}]},result_revision_id:{anyOf:[{$ref:"#/$defs/ConfigurationRevisionId"},{type:"null"}]},safe_reason_code:{type:["string","null"]},target_commitment:{$ref:"#/$defs/ManifestDigest"}},required:["event_id","event_kind","actor_id","base_revision_id","operation_digest","target_commitment","occurred_at"],type:"object"},ConfigurationAuditEventId:{description:"Strongly typed canonical identity: `ConfigurationAuditEventId`.",type:"string"},ConfigurationAuditEventKindV1:{enum:["dry_run_created","applied","rejected","expired","activation_failed","rollback_dry_run_created","rollback_applied","recovered"],type:"string"},ConfigurationIdempotencyKey:f3,ConfigurationReceiptId:f5,ConfigurationRevisionId:f8,ManifestDigest:gj,UtcMicros:bs},$schema:"https://json-schema.org/draft/2020-12/schema",properties:{events:{items:{$ref:"#/$defs/ConfigurationAuditEvent"},type:"array"},next_cursor:{description:"Opaque continuation, bound to this operation and request.",type:["string","null"]}},required:["events"],title:"ConfigurationAuditPage",type:"object"},{$defs:{AccessRuleId:mL,ActorId:mU,AnalyzerEnvironmentVariable:mZ,AnalyzerExecutableId:mQ,AnalyzerExecutableReferenceV1:mX,AnalyzerLanguageId:mY,AnalyzerLanguageSelectionV1:m1,AnalyzerPrivacyClassV1:m0,AnalyzerResourceLimitsV1:m2,AnalyzerRestartPolicyV1:m4,AnalyzerSettingsV1:m6,AnalyzerStructuredValueV1:m3,AuthorityRef:m8,AutomaticWorktreeGcV1:fr,AutomationBackendV1:fi,AutomationHostModeV1:fo,AutomationSettingsV1:fl,AutomationTaskSetV1:fp,AutomationTaskSettingsV1:fu,BranchCollisionPolicyV1:fh,BranchNameComponentV1:fy,BranchNameSeparatorV1:fg,BranchNamingPolicyV1:f_,BranchTopologyKindV1:fV,BranchTopologyPolicyV1:fP,CanonicalGitRefNameV1:fC,CanonicalGitRefPrefix:fT,CapabilityId:fO,CodeIndexWorkerSelectionV1:fK,ConfigurationDirectMutationRequestV1:{oneOf:[{properties:{key:{$ref:"#/$defs/SettingKey"},layer:{$ref:"#/$defs/ConfigurationLayerIdV1"},operation:{const:"set",type:"string"},value:{$ref:"#/$defs/ConfigurationValueV1"}},required:["operation","layer","key","value"],type:"object"},{properties:{key:{$ref:"#/$defs/SettingKey"},layer:{$ref:"#/$defs/ConfigurationLayerIdV1"},operation:{const:"unset",type:"string"}},required:["operation","layer","key"],type:"object"}]},ConfigurationIdempotencyKey:f3,ConfigurationLayerIdV1:f9,ConfigurationRevisionId:f8,ConfigurationValueV1:he,ContextScoutConfigurationLimitsV1:hs,ContextScoutConfigurationModeV1:hd,ContextScoutConfigurationStateV1:hc,ContextScoutConfiguredModelPathV1:hl,ContextScoutIntentKindV1:h_,ContextScoutIntentSettingsV1:hv,ContextScoutSettingsV1:hI,CredentialReferenceId:hN,CrossMergeModeV1:hz,CrossMergePolicyV1:hD,DecisionEngineSettingsV1:hU,GitHubStackedPullRequestPolicyV1:yH,HistoryRewritePolicyV1:y7,IntentQuestionSettingsV1:go,IntentWindowSettingsV1:gn,LcmSummarizerExecutableV1:gg,LcmSummarizerExecutablesV1:g_,LocatorDigest:gk,ManifestDigest:gj,ProjectId:_m,ProtectedRefDispositionV1:_v,ProtectedRefRuleV1:_b,ProtectedRefSelectorV1:_$,ProviderId:_w,QueryCollectionId:_q,RepositoryId:_z,RepositoryPlacementScopeV1:_D,RequiredCheckExpectationV1:_F,RequiredCheckV1:_L,ReviewRequirementV1:_0,ReviewTopologyKindV1:_2,ReviewTopologyPolicyV1:_4,RuleEffect:_5,ScopeAccessRule:vi,ScopeAccessSubjectV1:vo,ScopeControlOperationV1:vn,ScopeSourceBinding:vp,SensitiveFilesystemLocatorV1:vf,SettingKey:vR,SourceBindingId:vA,SourceKindV1:vN,TopologyConcurrencyPolicyV1:be,TopologyEscalationPolicyV1:bt,TopologyGatePolicyV1:br,TopologyNotificationLevelV1:bi,UserProfileId:ba,UtcMicros:bs,WorkApprovalPolicy:bp,WorkContentLocationClassV1:bT,WorkEffortClassV1:bW,WorkEgressPolicy:bM,WorkExecutableBindingV1:bD,WorkExecutableCapabilityV1:bF,WorkExecutableReference:bL,WorkExecutionLimits:bH,WorkExpertiseCategoryV1:bB,WorkExpertiseConsentV1:bK,WorkFallbackTopology:bJ,WorkFilesystemPolicy:bQ,WorkOrdinalBandV1:$t,WorkProviderRouteId:$I,WorkProviderRouteV1:$x,WorkRouteCandidateV1:$M,WorkRouteExecutionProfileV1:$z,WorkSandboxPolicy:$H,WorkTopologyPolicyV1:$4,WorktreeCleanlinessRequirementV1:Si,WorktreePlacementModeV1:Ss,WorktreeRetentionPolicyV1:Sd,WorktreeRootPolicyV1:Sc},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{expected_revision:{$ref:"#/$defs/ConfigurationRevisionId"},idempotency_key:{$ref:"#/$defs/ConfigurationIdempotencyKey"},mutations:{items:{$ref:"#/$defs/ConfigurationDirectMutationRequestV1"},type:"array"}},required:["mutations","expected_revision","idempotency_key"],title:"ConfigurationBatchRequestV1",type:"object"},{$defs:{AccessPolicyDigest:mF,ConfigurationReceiptId:f5,ConfigurationRevisionId:f8,ConfigurationSettlementAuthorityV1:{additionalProperties:!1,description:"Original authorization evidence pinned to a durable configuration effect.\nA retry reauthorizes access separately without replacing these fields.",properties:{policy_digest:{$ref:"#/$defs/AccessPolicyDigest"},policy_epoch:{format:"uint64",minimum:0,type:"integer"},revalidated_at:{$ref:"#/$defs/UtcMicros"}},required:["policy_epoch","policy_digest","revalidated_at"],type:"object"},ConfigurationSnapshotId:f7,ManifestDigest:gj,UtcMicros:bs},$schema:"https://json-schema.org/draft/2020-12/schema",properties:{base_revision_id:{$ref:"#/$defs/ConfigurationRevisionId"},created_at:{$ref:"#/$defs/UtcMicros"},effective_deadline_at:{$ref:"#/$defs/UtcMicros"},operation_digest:{$ref:"#/$defs/ManifestDigest"},receipt_id:{$ref:"#/$defs/ConfigurationReceiptId"},result_revision_id:{$ref:"#/$defs/ConfigurationRevisionId"},settlement_authority:{$ref:"#/$defs/ConfigurationSettlementAuthorityV1"},snapshot_id:{$ref:"#/$defs/ConfigurationSnapshotId"}},required:["receipt_id","base_revision_id","result_revision_id","snapshot_id","operation_digest","settlement_authority","created_at","effective_deadline_at"],title:"ConfigurationMutationReceipt",type:"object"},{$defs:{SettingKey:vR},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{key:{$ref:"#/$defs/SettingKey"}},required:["key"],title:"ConfigurationGetRequestV1",type:"object"},{$defs:{AccessRuleId:mL,ActorId:mU,AnalyzerEnvironmentVariable:mZ,AnalyzerExecutableId:mQ,AnalyzerExecutableReferenceV1:mX,AnalyzerLanguageId:mY,AnalyzerLanguageSelectionV1:m1,AnalyzerPrivacyClassV1:m0,AnalyzerResourceLimitsV1:m2,AnalyzerRestartPolicyV1:m4,AnalyzerSettingsV1:m6,AnalyzerStructuredValueV1:m3,AuthorityRef:m8,AutomaticWorktreeGcV1:fr,AutomationBackendV1:fi,AutomationHostModeV1:fo,AutomationSettingsV1:fl,AutomationTaskSetV1:fp,AutomationTaskSettingsV1:fu,BranchCollisionPolicyV1:fh,BranchNameComponentV1:fy,BranchNameSeparatorV1:fg,BranchNamingPolicyV1:f_,BranchTopologyKindV1:fV,BranchTopologyPolicyV1:fP,CandidateDispositionV1:{enum:["winning","overridden","rejected","defaulted"],type:"string"},CanonicalGitRefNameV1:fC,CanonicalGitRefPrefix:fT,CapabilityId:fO,CodeIndexWorkerSelectionV1:fK,ConfigurationCandidateV1:{additionalProperties:!1,description:"Resolution provenance is intentionally distinct from behavior. Moving the\nsame winner between layers can change this material without changing the\neffective behavior digest.",properties:{disposition:{$ref:"#/$defs/CandidateDispositionV1"},layer:{$ref:"#/$defs/ConfigurationLayerIdV1"},revision_id:{$ref:"#/$defs/ConfigurationRevisionId"},safe_reason:{type:["string","null"]}},required:["layer","revision_id","disposition"],type:"object"},ConfigurationLayerIdV1:f9,ConfigurationRevisionId:f8,ConfigurationSettingActionV1:{enum:["set","unset"],type:"string"},ConfigurationSettingFindingV1:{description:"A stored value the running release keeps but does not apply. The value\nstays readable so `legal_actions` on the same key can replace it.",oneOf:[{additionalProperties:!1,description:"An `index.exclude.v1` / `index.include.v1` pattern that does not\ncompile. An earlier release stored it unchecked; indexing runs\nwithout it.",properties:{kind:{const:"invalid_index_path_pattern",type:"string"},legal_actions:{items:{$ref:"#/$defs/ConfigurationSettingActionV1"},type:"array"},message:{type:"string"},pattern:{type:"string"}},required:["kind","pattern","message","legal_actions"],type:"object"}]},ConfigurationSnapshotId:f7,ConfigurationValueV1:he,ContextScoutConfigurationLimitsV1:hs,ContextScoutConfigurationModeV1:hd,ContextScoutConfigurationStateV1:hc,ContextScoutConfiguredModelPathV1:hl,ContextScoutIntentKindV1:h_,ContextScoutIntentSettingsV1:hv,ContextScoutSettingsV1:hI,CredentialReferenceId:hN,CrossMergeModeV1:hz,CrossMergePolicyV1:hD,DecisionEngineSettingsV1:hU,GitHubStackedPullRequestPolicyV1:yH,HistoryRewritePolicyV1:y7,IntentQuestionSettingsV1:go,IntentWindowSettingsV1:gn,LcmSummarizerExecutableV1:gg,LcmSummarizerExecutablesV1:g_,LocatorDigest:gk,ManifestDigest:gj,ProjectId:_m,ProtectedRefDispositionV1:_v,ProtectedRefRuleV1:_b,ProtectedRefSelectorV1:_$,ProviderId:_w,QueryCollectionId:_q,RepositoryId:_z,RepositoryPlacementScopeV1:_D,RequiredCheckExpectationV1:_F,RequiredCheckV1:_L,ReviewRequirementV1:_0,ReviewTopologyKindV1:_2,ReviewTopologyPolicyV1:_4,RuleEffect:_5,ScopeAccessRule:vi,ScopeAccessSubjectV1:vo,ScopeControlOperationV1:vn,ScopeSourceBinding:vp,SensitiveFilesystemLocatorV1:vf,SettingKey:vR,SourceBindingId:vA,SourceKindV1:vN,TopologyConcurrencyPolicyV1:be,TopologyEscalationPolicyV1:bt,TopologyGatePolicyV1:br,TopologyNotificationLevelV1:bi,UserProfileId:ba,UtcMicros:bs,WorkApprovalPolicy:bp,WorkContentLocationClassV1:bT,WorkEffortClassV1:bW,WorkEgressPolicy:bM,WorkExecutableBindingV1:bD,WorkExecutableCapabilityV1:bF,WorkExecutableReference:bL,WorkExecutionLimits:bH,WorkExpertiseCategoryV1:bB,WorkExpertiseConsentV1:bK,WorkFallbackTopology:bJ,WorkFilesystemPolicy:bQ,WorkOrdinalBandV1:$t,WorkProviderRouteId:$I,WorkProviderRouteV1:$x,WorkRouteCandidateV1:$M,WorkRouteExecutionProfileV1:$z,WorkSandboxPolicy:$H,WorkTopologyPolicyV1:$4,WorktreeCleanlinessRequirementV1:Si,WorktreePlacementModeV1:Ss,WorktreeRetentionPolicyV1:Sd,WorktreeRootPolicyV1:Sc},$schema:"https://json-schema.org/draft/2020-12/schema",properties:{candidates:{items:{$ref:"#/$defs/ConfigurationCandidateV1"},type:"array"},effective_behavior_digest:{$ref:"#/$defs/ManifestDigest"},effective_value:{$ref:"#/$defs/ConfigurationValueV1"},findings:{description:"Parts of the stored value this release does not apply. Empty when the\neffective value applies in full.",items:{$ref:"#/$defs/ConfigurationSettingFindingV1"},type:"array"},key:{$ref:"#/$defs/SettingKey"},resolution_provenance_digest:{$ref:"#/$defs/ManifestDigest"},revision_id:{$ref:"#/$defs/ConfigurationRevisionId",description:"Current configuration revision accepted by mutation `expected_revision` CAS."},snapshot_id:{$ref:"#/$defs/ConfigurationSnapshotId",description:"Content identity of the fully resolved configuration snapshot."}},required:["key","effective_value","revision_id","snapshot_id","effective_behavior_digest","resolution_provenance_digest","candidates","findings"],title:"ResolvedSetting",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Typed input for the configuration list read through the daemon\ninvocation boundary.",title:"ConfigurationListRequestV1",type:"object"},{$defs:{RestartRequirementV1:{enum:["none","analyzer_restart","daemon_restart"],type:"string"},SettingKey:vR,SettingSensitivityV1:{enum:["public","sensitive"],type:"string"},SettingSummary:{properties:{key:{$ref:"#/$defs/SettingKey"},restart_requirement:{$ref:"#/$defs/RestartRequirementV1"},sensitivity:{$ref:"#/$defs/SettingSensitivityV1"}},required:["key","sensitivity","restart_requirement"],type:"object"}},$schema:"https://json-schema.org/draft/2020-12/schema",items:{$ref:"#/$defs/SettingSummary"},title:"Array_of_SettingSummary",type:"array"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,title:"ConfigurationObservedStateRequestV1",type:"object"},{$defs:{ActivationDriftV1:{enum:["current","never_activated","pending_restart","activation_failed"],type:"string"},ComponentConfigurationState:{properties:{activation_error_code:{type:["string","null"]},component:{type:"string"},desired_revision_id:{$ref:"#/$defs/ConfigurationRevisionId"},drift:{$ref:"#/$defs/ActivationDriftV1"},last_working_revision_id:{anyOf:[{$ref:"#/$defs/ConfigurationRevisionId"},{type:"null"}]},observed_revision_id:{anyOf:[{$ref:"#/$defs/ConfigurationRevisionId"},{type:"null"}]},restart_required:{type:"boolean"}},required:["component","desired_revision_id","restart_required","drift"],type:"object"},ConfigurationRevisionId:f8},$schema:"https://json-schema.org/draft/2020-12/schema",items:{$ref:"#/$defs/ComponentConfigurationState"},title:"Array_of_ComponentConfigurationState",type:"array"},{$defs:{ChangePlanId:fA,ConfigurationIdempotencyKey:f3,ConfigurationRevisionId:f8,ManifestDigest:gj},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{expected_base_revision_id:{$ref:"#/$defs/ConfigurationRevisionId"},idempotency_key:{$ref:"#/$defs/ConfigurationIdempotencyKey"},operation_digest:{$ref:"#/$defs/ManifestDigest"},plan_id:{$ref:"#/$defs/ChangePlanId"}},required:["plan_id","expected_base_revision_id","operation_digest","idempotency_key"],title:"ConfigurationProtectedApplyRequestV1",type:"object"},{$defs:{AccessRuleId:mL,ActorId:mU,AuthorityRef:m8,AutomaticWorktreeGcV1:fr,BranchCollisionPolicyV1:fh,BranchNameComponentV1:fy,BranchNameSeparatorV1:fg,BranchNamingPolicyV1:f_,BranchTopologyKindV1:fV,BranchTopologyPolicyV1:fP,CanonicalGitRefNameV1:fC,CanonicalGitRefPrefix:fT,CapabilityId:fO,ConfigurationRevisionId:f8,CrossMergeModeV1:hz,CrossMergePolicyV1:hD,GitHubStackedPullRequestPolicyV1:yH,HistoryRewritePolicyV1:y7,LocatorDigest:gk,ManifestDigest:gj,ProjectId:_m,ProtectedChange:{description:"The protected configuration operation set. Ordinary scalar mutations are\nintentionally absent; they activate directly after validation.",oneOf:[{properties:{kind:{const:"bind_source",type:"string"},value:{$ref:"#/$defs/ScopeSourceBinding"}},required:["kind","value"],type:"object"},{properties:{kind:{const:"rebind_source",type:"string"},value:{$ref:"#/$defs/ScopeSourceBinding"}},required:["kind","value"],type:"object"},{properties:{kind:{const:"unbind_source",type:"string"},value:{properties:{binding_id:{$ref:"#/$defs/SourceBindingId"}},required:["binding_id"],type:"object"}},required:["kind","value"],type:"object"},{properties:{kind:{const:"upsert_access_rule",type:"string"},value:{$ref:"#/$defs/ScopeAccessRule"}},required:["kind","value"],type:"object"},{properties:{kind:{const:"remove_access_rule",type:"string"},value:{properties:{rule_id:{$ref:"#/$defs/AccessRuleId"}},required:["rule_id"],type:"object"}},required:["kind","value"],type:"object"},{properties:{kind:{const:"replace_work_topology_policy",type:"string"},value:{$ref:"#/$defs/WorkTopologyPolicyV1"}},required:["kind","value"],type:"object"}]},ProtectedRefDispositionV1:_v,ProtectedRefRuleV1:_b,ProtectedRefSelectorV1:_$,RepositoryId:_z,RepositoryPlacementScopeV1:_D,RequiredCheckExpectationV1:_F,RequiredCheckV1:_L,ReviewRequirementV1:_0,ReviewTopologyKindV1:_2,ReviewTopologyPolicyV1:_4,RuleEffect:_5,ScopeAccessRule:vi,ScopeAccessSubjectV1:vo,ScopeControlOperationV1:vn,ScopeSourceBinding:vp,SensitiveFilesystemLocatorV1:vf,SourceBindingId:vA,SourceKindV1:vN,TopologyConcurrencyPolicyV1:be,TopologyEscalationPolicyV1:bt,TopologyGatePolicyV1:br,TopologyNotificationLevelV1:bi,UserProfileId:ba,UtcMicros:bs,WorkTopologyPolicyV1:$4,WorktreeCleanlinessRequirementV1:Si,WorktreePlacementModeV1:Ss,WorktreeRetentionPolicyV1:Sd,WorktreeRootPolicyV1:Sc},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{change:{$ref:"#/$defs/ProtectedChange"},expected_revision:{$ref:"#/$defs/ConfigurationRevisionId"}},required:["change","expected_revision"],title:"ConfigurationProtectedPreviewRequestV1",type:"object"},{$defs:{AccessPolicyDigest:mF,ActorId:mU,ChangePlanId:fA,ConfigurationRevisionId:f8,ManifestDigest:gj,RedactedConfigurationChangeV1:{additionalProperties:!1,properties:{after_digest:{anyOf:[{$ref:"#/$defs/ManifestDigest"},{type:"null"}]},before_digest:{anyOf:[{$ref:"#/$defs/ManifestDigest"},{type:"null"}]},operation:{$ref:"#/$defs/ScopeControlOperationV1"},setting_key:{$ref:"#/$defs/SettingKey"}},required:["setting_key","operation"],type:"object"},ScopeControlOperationV1:vn,SettingKey:vR,UtcMicros:bs},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Immutable dry-run result. It contains no raw locator, secret, target\nidentity, or plaintext configuration value.",properties:{actor_id:{$ref:"#/$defs/ActorId"},authorization_policy_digest:{$ref:"#/$defs/AccessPolicyDigest"},base_revision_id:{$ref:"#/$defs/ConfigurationRevisionId"},created_at:{$ref:"#/$defs/UtcMicros"},expires_at:{$ref:"#/$defs/UtcMicros"},membership_digest:{anyOf:[{$ref:"#/$defs/ManifestDigest"},{type:"null"}]},operation_digest:{$ref:"#/$defs/ManifestDigest"},plan_id:{$ref:"#/$defs/ChangePlanId"},policy_epoch:{format:"uint64",minimum:0,type:"integer"},redacted_changes:{items:{$ref:"#/$defs/RedactedConfigurationChangeV1"},type:"array"},resolved_scope_digest:{$ref:"#/$defs/ManifestDigest"}},required:["plan_id","actor_id","base_revision_id","operation_digest","resolved_scope_digest","authorization_policy_digest","policy_epoch","expires_at","created_at","redacted_changes"],title:"ProtectedChangePlan",type:"object"},{$defs:{ConfigurationRevisionId:f8,RollbackModeV1:{enum:["all_or_nothing","partial"],type:"string"}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{mode:{$ref:"#/$defs/RollbackModeV1"},target_revision_id:{$ref:"#/$defs/ConfigurationRevisionId"}},required:["target_revision_id","mode"],title:"ConfigurationRollbackPreviewRequestV1",type:"object"},{$defs:{AccessRuleId:mL,ActorId:mU,AnalyzerEnvironmentVariable:mZ,AnalyzerExecutableId:mQ,AnalyzerExecutableReferenceV1:mX,AnalyzerLanguageId:mY,AnalyzerLanguageSelectionV1:m1,AnalyzerPrivacyClassV1:m0,AnalyzerResourceLimitsV1:m2,AnalyzerRestartPolicyV1:m4,AnalyzerSettingsV1:m6,AnalyzerStructuredValueV1:m3,AuthorityRef:m8,AutomaticWorktreeGcV1:fr,AutomationBackendV1:fi,AutomationHostModeV1:fo,AutomationSettingsV1:fl,AutomationTaskSetV1:fp,AutomationTaskSettingsV1:fu,BranchCollisionPolicyV1:fh,BranchNameComponentV1:fy,BranchNameSeparatorV1:fg,BranchNamingPolicyV1:f_,BranchTopologyKindV1:fV,BranchTopologyPolicyV1:fP,CanonicalGitRefNameV1:fC,CanonicalGitRefPrefix:fT,CapabilityId:fO,CodeIndexWorkerSelectionV1:fK,ConfigurationIdempotencyKey:f3,ConfigurationLayerIdV1:f9,ConfigurationRevisionId:f8,ConfigurationValueV1:he,ContextScoutConfigurationLimitsV1:hs,ContextScoutConfigurationModeV1:hd,ContextScoutConfigurationStateV1:hc,ContextScoutConfiguredModelPathV1:hl,ContextScoutIntentKindV1:h_,ContextScoutIntentSettingsV1:hv,ContextScoutSettingsV1:hI,CredentialReferenceId:hN,CrossMergeModeV1:hz,CrossMergePolicyV1:hD,DecisionEngineSettingsV1:hU,GitHubStackedPullRequestPolicyV1:yH,HistoryRewritePolicyV1:y7,IntentQuestionSettingsV1:go,IntentWindowSettingsV1:gn,LcmSummarizerExecutableV1:gg,LcmSummarizerExecutablesV1:g_,LocatorDigest:gk,ManifestDigest:gj,ProjectId:_m,ProtectedRefDispositionV1:_v,ProtectedRefRuleV1:_b,ProtectedRefSelectorV1:_$,ProviderId:_w,QueryCollectionId:_q,RepositoryId:_z,RepositoryPlacementScopeV1:_D,RequiredCheckExpectationV1:_F,RequiredCheckV1:_L,ReviewRequirementV1:_0,ReviewTopologyKindV1:_2,ReviewTopologyPolicyV1:_4,RuleEffect:_5,ScopeAccessRule:vi,ScopeAccessSubjectV1:vo,ScopeControlOperationV1:vn,ScopeSourceBinding:vp,SensitiveFilesystemLocatorV1:vf,SettingKey:vR,SourceBindingId:vA,SourceKindV1:vN,TopologyConcurrencyPolicyV1:be,TopologyEscalationPolicyV1:bt,TopologyGatePolicyV1:br,TopologyNotificationLevelV1:bi,UserProfileId:ba,UtcMicros:bs,WorkApprovalPolicy:bp,WorkContentLocationClassV1:bT,WorkEffortClassV1:bW,WorkEgressPolicy:bM,WorkExecutableBindingV1:bD,WorkExecutableCapabilityV1:bF,WorkExecutableReference:bL,WorkExecutionLimits:bH,WorkExpertiseCategoryV1:bB,WorkExpertiseConsentV1:bK,WorkFallbackTopology:bJ,WorkFilesystemPolicy:bQ,WorkOrdinalBandV1:$t,WorkProviderRouteId:$I,WorkProviderRouteV1:$x,WorkRouteCandidateV1:$M,WorkRouteExecutionProfileV1:$z,WorkSandboxPolicy:$H,WorkTopologyPolicyV1:$4,WorktreeCleanlinessRequirementV1:Si,WorktreePlacementModeV1:Ss,WorktreeRetentionPolicyV1:Sd,WorktreeRootPolicyV1:Sc},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Typed revision-CAS input for a configuration write through the daemon\ninvocation boundary.",properties:{expected_revision:{$ref:"#/$defs/ConfigurationRevisionId"},idempotency_key:{$ref:"#/$defs/ConfigurationIdempotencyKey"},key:{$ref:"#/$defs/SettingKey"},layer:{$ref:"#/$defs/ConfigurationLayerIdV1"},value:{$ref:"#/$defs/ConfigurationValueV1"}},required:["layer","key","value","expected_revision","idempotency_key"],title:"ConfigurationSetRequestV1",type:"object"},{$defs:{ConfigurationIdempotencyKey:f3,ConfigurationLayerIdV1:f9,ConfigurationRevisionId:f8,ProjectId:_m,QueryCollectionId:_q,SettingKey:vR,UserProfileId:ba},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{expected_revision:{$ref:"#/$defs/ConfigurationRevisionId"},idempotency_key:{$ref:"#/$defs/ConfigurationIdempotencyKey"},key:{$ref:"#/$defs/SettingKey"},layer:{$ref:"#/$defs/ConfigurationLayerIdV1"}},required:["layer","key","expected_revision","idempotency_key"],title:"ConfigurationUnsetRequestV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{limit:{description:"Maximum number of literal sites to return (default: 100, max: 1000).",format:"uint32",minimum:0,type:["integer","null"]},struct:{description:"Struct name to search literal sites of (e.g. 'GraphStats', 'Config').",type:"string"}},required:["struct"],title:"ConstructorsSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fF,CodeIndexConvergenceParkedV1:fL,CodeIndexStalenessStateV1:fB,ConstructorFieldCoverageV1:{description:"Whether a literal site's field lists are complete relative to the\nstruct's graph definition.",enum:["complete","unknown"],type:"string"},ConstructorResolutionReasonV1:{enum:["ambiguous_simple_name","syntax_only_simple_name"],type:"string"},ConstructorResolutionStatusV1:{description:"Syntax alone cannot link same-name types across modules, so every\nresolution is unverified.",enum:["unverified"],type:"string"},ConstructorSiteV1:{additionalProperties:!1,properties:{field_coverage:{$ref:"#/$defs/ConstructorFieldCoverageV1"},fields:{items:{type:"string"},type:"array"},file:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},missing_fields:{items:{type:"string"},type:"array"},update_fields:{items:{type:"string"},type:"array"}},required:["file","line","fields","update_fields","missing_fields","field_coverage"],type:"object"},ConstructorsNotFoundV1:{additionalProperties:!1,properties:{found:{description:"Always `false`: no struct, class, or case class has the name.",type:"boolean"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},match_count:{format:"uint64",minimum:0,type:"integer"},message:{type:"string"},sites:{items:{$ref:"#/$defs/ConstructorSiteV1"},type:"array"},struct:{type:"string"}},required:["found","struct","message","match_count","sites"],type:"object"},ConstructorsReportV1:{additionalProperties:!1,properties:{candidate_count:{format:"uint64",minimum:0,type:"integer"},expected_fields:{description:"`None` when the name resolves to more than one definition.",items:{type:"string"},type:["array","null"]},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},match_count:{format:"uint64",minimum:0,type:"integer"},resolution_reason:{$ref:"#/$defs/ConstructorResolutionReasonV1"},resolution_status:{$ref:"#/$defs/ConstructorResolutionStatusV1"},sites:{items:{$ref:"#/$defs/ConstructorSiteV1"},type:"array"},struct:{type:"string"}},required:["struct","candidate_count","resolution_status","resolution_reason","match_count","sites"],type:"object"},PrimitiveFreshnessStateV1:_i,PrimitiveIndexingStateV1:_o,PrimitiveSearchFreshnessV1:_d},$schema:"https://json-schema.org/draft/2020-12/schema",anyOf:[{$ref:"#/$defs/ConstructorsNotFoundV1"},{$ref:"#/$defs/ConstructorsReportV1"}],title:"ConstructorsResultV1"},{$defs:{ContextModeV1:hi},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{budget_tokens:{description:"Cap the ranked sections of the answer at about this many tokens.\nQuotas are fixed shares of the budget. The cut is reported on the result.",format:"uint32",minimum:0,type:["integer","null"]},include_code:{type:["boolean","null"]},include_memory:{type:["boolean","null"]},lexical_anchors:{description:"Exact identifiers or technical terms the answer must be about. Each\nruns as its own lexical route: hits carrying an anchor outrank hits\ncarrying none, exact hits included, every anchor with matches keeps at\nleast its best sites through the lane cap, and `lexical_anchors` in the\nresult reports each anchor's outcome: the sites this result returns\nand, by reason, the admitted sites it could not carry. Bounded and\nvalidated by the retrieval kernel; a\nviolation is a typed request rejection. Identifiers the task names\n(`snake_case`, `camelCase`, `a::b`) are anchored after these.",items:{type:"string"},type:["array","null"]},max_code_blocks:{format:"uint32",minimum:0,type:["integer","null"]},max_nodes:{format:"uint32",minimum:0,type:["integer","null"]},memory_limit:{format:"uint32",minimum:0,type:["integer","null"]},memory_min_trust:{format:"double",type:["number","null"]},mode:{anyOf:[{$ref:"#/$defs/ContextModeV1"},{type:"null"}]},prefer_symbol:{description:"Add a symbol-name lexical route for the identifier-shaped words of the\ntask text.",type:["boolean","null"]},task:{type:"string"}},required:["task"],title:"ContextSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fF,CodeIndexConvergenceParkedV1:fL,CodeIndexStalenessStateV1:fB,ContextCodeBlockV1:{additionalProperties:!1,properties:{code:{type:"string"},end_line:{format:"uint32",minimum:0,type:"integer"},file:{type:"string"},node_id:{type:"string"},start_line:{format:"uint32",minimum:0,type:"integer"}},required:["node_id","file","start_line","end_line","code"],type:"object"},ContextExtensionPointV1:{additionalProperties:!1,description:"A public trait or interface among the context's selected symbols.",properties:{file:{type:"string"},implementor_count:{format:"uint",minimum:0,type:"integer"},kind:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},name:{type:"string"}},required:["name","kind","file","line","implementor_count"],type:"object"},ContextLexicalAnchorV1:hr,ContextModeV1:hi,ContextPlanV1:{additionalProperties:!1,description:"Plan-mode enrichment: where the selected code can be extended and which\ntest files reach it.",properties:{extension_points:{items:{$ref:"#/$defs/ContextExtensionPointV1"},type:"array"},test_files:{description:"Test files calling the selected symbols within two hops; absent when\nno symbol was selected to trace from.",items:{type:"string"},type:["array","null"]}},required:["extension_points"],type:"object"},ContextRelatedOmissionV1:{additionalProperties:!1,description:"Related symbols `context` ranked but did not return.",properties:{omitted:{description:"Ranked related symbols the `max_nodes` cut dropped.",format:"uint",minimum:0,type:"integer"},total:{description:"Distinct related symbols the walk found and ranked.",format:"uint",minimum:0,type:"integer"},total_is_lower_bound:{description:"The neighbor walk stopped at its row limit, so `total` is a lower\nbound.",type:"boolean"}},required:["total","omitted","total_is_lower_bound"],type:"object"},ContextRetrievalPlanV1:{additionalProperties:!1,description:"The retrieval plan `context` executed: which stages ran, what each\nadmitted, and where a budget bounded the answer. Lane-level serving state\nstays in `coverage`.",properties:{code:{$ref:"#/$defs/ContextStageV1",description:"Source bodies for selected symbols, bounded by `max_code_blocks`."},graph:{$ref:"#/$defs/ContextStageV1",description:"Candidates resolved to verified graph symbols."},memory:{$ref:"#/$defs/ContextStageV1",description:"Project memory facts, bounded by `memory_limit`."},related:{$ref:"#/$defs/ContextStageV1",description:"Ranked neighbors of the selected symbols, bounded by `max_nodes`."},search:{$ref:"#/$defs/ContextStageV1",description:"Ranked code-index candidates, bounded by `max_nodes`."}},required:["search","graph","related","code","memory"],type:"object"},ContextRetrievalRouteV1:{description:"Which retrieval route `context` ran.\n\n`name` is the preferred-symbol route. `prose` is the ordinary task\nroute. A caller that omits `prefer_symbol` gets `name` only when the\ntask is one identifier or one `Type.method` / `path::name` token.",enum:["name","prose"],type:"string"},ContextSearchMatchV1:{additionalProperties:!1,properties:{anchor_id:{type:"string"},anchors:{description:"Lexical anchors, the caller's and then the task's identifiers, whose\nroute ranked this match; the anchor receipt counts it as returned.",items:{type:"string"},type:"array"},exact_class:{type:"string"},file:{type:"string"},kind:{type:"string"},name:{type:"string"},qualified_name:{type:"string"},rank:{format:"uint32",minimum:0,type:"integer"},utility_micros:{format:"uint64",minimum:0,type:"integer"}},required:["anchor_id","name","qualified_name","kind","file","exact_class","rank","utility_micros"],type:"object"},ContextStageV1:{description:"What one `context` stage ran with and kept.",oneOf:[{description:"The request did not ask for this stage.",properties:{state:{const:"not_requested",type:"string"}},required:["state"],type:"object"},{description:"A stage this one reads from produced nothing to work on.",properties:{state:{const:"skipped",type:"string"}},required:["state"],type:"object"},{description:"The stage's authority could not answer.",properties:{state:{const:"unavailable",type:"string"}},required:["state"],type:"object"},{description:"The stage admitted `admitted` entries under `budget`. `truncated` is\ntrue when it stopped at that budget, so more entries may exist.",properties:{admitted:{format:"uint32",minimum:0,type:"integer"},budget:{format:"uint32",minimum:0,type:"integer"},state:{const:"ran",type:"string"},truncated:{type:"boolean"}},required:["state","budget","admitted","truncated"],type:"object"}]},FactAssertionId:h3,FactCategoryV1:h9,FactCommitOwnerV1:h8,FactEventId:ye,FactId:yr,FactIdentitySourceResultV1:yi,FactSearchGraphCoverageV1:ya,FactSearchGraphDegradationV1:ys,FactSearchHitV1:yd,FactSearchScoresV1:yc,FactTelemetryV1:yp,FactV1:yu,LexicalAnchorDropReasonV1:g$,LexicalAnchorDropV1:gS,LocatorDigest:gk,PrimitiveFreshnessStateV1:_i,PrimitiveIndexingStateV1:_o,PrimitiveLaneCompleteV1:_n,PrimitiveLaneStateV1:{enum:["stale","partial","unavailable"],type:"string"},PrimitiveLaneStatusV1:{anyOf:[{$ref:"#/$defs/PrimitiveLaneCompleteV1"},{properties:{generation:{type:["string","null"]},reason:{type:["string","null"]},status:{$ref:"#/$defs/PrimitiveLaneStateV1"}},required:["status"],type:"object"}]},PrimitiveRecallV1:_s,PrimitiveSearchCoverageV1:{additionalProperties:!1,properties:{exact:{$ref:"#/$defs/PrimitiveLaneStatusV1"},graph:{$ref:"#/$defs/PrimitiveLaneStatusV1"},lexical:{$ref:"#/$defs/PrimitiveLaneStatusV1"},recall:{$ref:"#/$defs/PrimitiveRecallV1"}},required:["exact","lexical","graph","recall"],type:"object"},PrimitiveSearchFreshnessV1:_d,PrimitiveSymbolLocationV1:_l,PrimitiveUnavailableEvidenceV1:_p,PrimitiveUnavailableStatusV1:_u,ProjectId:_m,ProvenanceId:_S,RetrievalAnchorId:_J,TokenBudgetCutV1:v8,TokenBudgetSectionV1:v7,UtcMicros:bs},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{code:{items:{$ref:"#/$defs/ContextCodeBlockV1"},type:"array"},code_generation:{type:["string","null"]},coverage:{$ref:"#/$defs/PrimitiveSearchCoverageV1"},freshness:{$ref:"#/$defs/PrimitiveSearchFreshnessV1",description:"Freshness of the served code generation, derived from the typed lane\ncoverage and the daemon scheduler's worktree state."},lexical_anchors:{description:"Outcome of every caller `lexical_anchors` entry, then of each\nidentifier the task names; empty when there are neither.",items:{$ref:"#/$defs/ContextLexicalAnchorV1"},type:"array"},memory_graph_coverage:{anyOf:[{$ref:"#/$defs/FactSearchGraphCoverageV1"},{type:"null"}]},memory_matches:{items:{$ref:"#/$defs/FactSearchHitV1"},type:"array"},memory_matches_error:{type:["string","null"]},mode:{$ref:"#/$defs/ContextModeV1"},oversized_symbols:{description:"Matched symbols whose declaration is larger than one code block.\nTheir code is withheld rather than served as a partial window.",items:{$ref:"#/$defs/PrimitiveSymbolLocationV1"},type:"array"},plan:{anyOf:[{$ref:"#/$defs/ContextPlanV1"},{type:"null"}],description:"Present in plan mode when the verified graph answered."},related_omission:{anyOf:[{$ref:"#/$defs/ContextRelatedOmissionV1"},{type:"null"}],description:"Present when related symbols were left out: by the `max_nodes` cut,\nor because the neighbor walk stopped at its row limit."},related_symbols:{description:"Neighbors of `symbols`, ranked before the `max_nodes` cut: best edge\nkind to a selected symbol (calls, implements, extends, `type_of`,\nreturns, receives, uses, annotates, contains), then total degree\ndescending, then qualified name.",items:{$ref:"#/$defs/PrimitiveSymbolLocationV1"},type:"array"},retrieval:{$ref:"#/$defs/ContextRetrievalPlanV1"},route:{$ref:"#/$defs/ContextRetrievalRouteV1"},search_matches:{items:{$ref:"#/$defs/ContextSearchMatchV1"},type:"array"},symbols:{items:{$ref:"#/$defs/PrimitiveSymbolLocationV1"},type:"array"},task:{type:"string"},token_budget:{anyOf:[{$ref:"#/$defs/TokenBudgetCutV1"},{type:"null"}],description:"Budget accounting when the request supplies `budget_tokens`."},verified_graph_evidence:{anyOf:[{$ref:"#/$defs/PrimitiveUnavailableEvidenceV1"},{type:"null"}]}},required:["task","route","mode","freshness","symbols","related_symbols","code","coverage","memory_matches","retrieval"],title:"ContextResultV1",type:"object"},{$defs:{ContextScoutAddressV1:ho},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{address:{$ref:"#/$defs/ContextScoutAddressV1"}},required:["address"],title:"ContextScoutExactAddressRequestV1",type:"object"},{$defs:{ContextScoutLimitsV1:hb,ContextScoutModelOutcomeV1:hS},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{exhausted:{type:"boolean"},last_estimated_cost_microusd:{format:"uint64",minimum:0,type:["integer","null"]},last_input_tokens:{format:"uint64",minimum:0,type:["integer","null"]},last_model_outcome:{anyOf:[{$ref:"#/$defs/ContextScoutModelOutcomeV1"},{type:"null"}]},last_output_tokens:{format:"uint64",minimum:0,type:["integer","null"]},limits:{$ref:"#/$defs/ContextScoutLimitsV1"}},required:["limits","exhausted"],title:"ContextScoutBudgetResultV1",type:"object"},{$defs:{ContextScoutAddressV1:ho,ContextScoutWorkV1:hT},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{address:{$ref:"#/$defs/ContextScoutAddressV1"},idempotency_key:{type:"string"},work:{$ref:"#/$defs/ContextScoutWorkV1"}},required:["address","work","idempotency_key"],title:"ContextScoutCancelRequestV1",type:"object"},{$defs:{ContextScoutStoreOutcomeV1:hx},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{outcome:{$ref:"#/$defs/ContextScoutStoreOutcomeV1"}},required:["outcome"],title:"ContextScoutMutationResultV1",type:"object"},{$defs:{ContextScoutModelBackendV1:h$,ContextScoutModelOutcomeV1:hS,ContextScoutRuntimeModeV1:hP,ContextScoutServiceStateV1:hR},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{configured_model:{anyOf:[{$ref:"#/$defs/ContextScoutModelBackendV1"},{type:"null"}]},configured_model_available:{type:"boolean"},deterministic_available:{type:"boolean"},last_model_outcome:{anyOf:[{$ref:"#/$defs/ContextScoutModelOutcomeV1"},{type:"null"}]},mode:{$ref:"#/$defs/ContextScoutRuntimeModeV1"},state:{$ref:"#/$defs/ContextScoutServiceStateV1"}},required:["state","mode","deterministic_available","configured_model_available"],title:"ContextScoutCapabilityResultV1",type:"object"},{$defs:{ContextScoutAddressV1:ho,ContextScoutClaimWindowV1:{enum:["idle_window","on_request"],type:"string"}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{address:{$ref:"#/$defs/ContextScoutAddressV1"},idempotency_key:{type:"string"},window:{$ref:"#/$defs/ContextScoutClaimWindowV1"}},required:["address","window","idempotency_key"],title:"ContextScoutClaimRequestV1",type:"object"},{$defs:{CodeGenerationId:fz,ContextScoutAddressV1:ho,ContextScoutCategoryV1:hn,ContextScoutClaimHandleV1:ha,ContextScoutDeliveryWindowV1:hm,ContextScoutEvidenceAvailabilityV1:hf,ContextScoutEvidenceProjectionV1:hh,ContextScoutModelBackendV1:h$,ContextScoutModelOutcomeV1:hS,ContextScoutModelReceiptV1:hk,ContextScoutRouteV1:hV,ContextScoutSessionWindowV1:hq,ContextScoutSuggestionProjectionV1:hj,ContextScoutWorkV1:hT,ManifestDigest:gj,RetrievalAnchorId:_J,UtcMicros:bs},$schema:"https://json-schema.org/draft/2020-12/schema",oneOf:[{properties:{claim:{$ref:"#/$defs/ContextScoutClaimHandleV1"},outcome:{const:"claimed",type:"string"},suggestion:{$ref:"#/$defs/ContextScoutSuggestionProjectionV1"}},required:["outcome","claim","suggestion"],type:"object"},{properties:{outcome:{const:"empty",type:"string"}},required:["outcome"],type:"object"}],title:"ContextScoutClaimResultV1"},{$defs:{ContextScoutAddressV1:ho,ContextScoutClaimHandleV1:ha,ContextScoutDeliveryOutcomeV1:hp,ContextScoutWorkV1:hT,UtcMicros:bs},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{address:{$ref:"#/$defs/ContextScoutAddressV1"},claim:{$ref:"#/$defs/ContextScoutClaimHandleV1"},delivered_at:{$ref:"#/$defs/UtcMicros"},idempotency_key:{type:"string"},outcome:{$ref:"#/$defs/ContextScoutDeliveryOutcomeV1"}},required:["address","claim","delivered_at","outcome","idempotency_key"],title:"ContextScoutDeliveryRequestV1",type:"object"},{$defs:{ContextScoutDeliveryOutcomeV1:hp,ContextScoutDeliveryReceiptV1:hu,ContextScoutStoreOutcomeV1:hx,UtcMicros:bs},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{outcome:{$ref:"#/$defs/ContextScoutStoreOutcomeV1"},receipt:{$ref:"#/$defs/ContextScoutDeliveryReceiptV1"}},required:["outcome","receipt"],title:"ContextScoutDeliveryResultV1",type:"object"},{$defs:{ContextScoutAddressV1:ho},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{address:{$ref:"#/$defs/ContextScoutAddressV1"},limit:{default:8,format:"uint",minimum:0,type:"integer"}},required:["address"],title:"ContextScoutRecentRequestV1",type:"object"},{$defs:{CodeGenerationId:fz,ContextScoutAddressV1:ho,ContextScoutCategoryV1:hn,ContextScoutDeliveryOutcomeV1:hp,ContextScoutDeliveryReceiptV1:hu,ContextScoutDeliveryWindowV1:hm,ContextScoutEvidenceAvailabilityV1:hf,ContextScoutEvidenceProjectionV1:hh,ContextScoutFeedbackKindV1:hy,ContextScoutFeedbackV1:hg,ContextScoutLimitsV1:hb,ContextScoutModelBackendV1:h$,ContextScoutModelOutcomeV1:hS,ContextScoutModelReceiptV1:hk,ContextScoutRecentDeliveryV1:hw,ContextScoutRecentResultV1:{additionalProperties:!1,properties:{configuration_revision:{items:{format:"uint8",maximum:255,minimum:0,type:"integer"},maxItems:32,minItems:32,type:"array"},deliveries:{items:{$ref:"#/$defs/ContextScoutRecentDeliveryV1"},type:"array"},observed_at:{$ref:"#/$defs/UtcMicros"},omitted:{format:"uint",minimum:0,type:"integer"},pending:{items:{$ref:"#/$defs/ContextScoutSuggestionProjectionV1"},type:"array"}},required:["configuration_revision","observed_at","pending","deliveries","omitted"],type:"object"},ContextScoutRouteV1:hV,ContextScoutRuntimeModeV1:hP,ContextScoutServiceStateV1:hR,ContextScoutSessionWindowV1:hq,ContextScoutStatusResultV1:{additionalProperties:!1,properties:{active_suggestions:{format:"uint",minimum:0,type:"integer"},configuration_revision:{items:{format:"uint8",maximum:255,minimum:0,type:"integer"},maxItems:32,minItems:32,type:"array"},last_delivery_outcome:{anyOf:[{$ref:"#/$defs/ContextScoutDeliveryOutcomeV1"},{type:"null"}]},last_feedback:{anyOf:[{$ref:"#/$defs/ContextScoutFeedbackKindV1"},{type:"null"}]},last_model_outcome:{anyOf:[{$ref:"#/$defs/ContextScoutModelOutcomeV1"},{type:"null"}]},last_model_receipt:{anyOf:[{$ref:"#/$defs/ContextScoutModelReceiptV1"},{type:"null"}]},last_route:{anyOf:[{$ref:"#/$defs/ContextScoutRouteV1"},{type:"null"}]},last_suppression:{anyOf:[{$ref:"#/$defs/ContextScoutSuppressionV1"},{type:"null"}]},limits:{$ref:"#/$defs/ContextScoutLimitsV1"},mode:{$ref:"#/$defs/ContextScoutRuntimeModeV1"},model_path:{anyOf:[{$ref:"#/$defs/ContextScoutModelBackendV1"},{type:"null"}]},state:{$ref:"#/$defs/ContextScoutServiceStateV1"}},required:["configuration_revision","state","mode","limits","active_suggestions"],type:"object"},ContextScoutSuggestionProjectionV1:hj,ContextScoutSuppressionV1:hC,ContextScoutWorkV1:hT,ManifestDigest:gj,RetrievalAnchorId:_J,UtcMicros:bs},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{recent:{$ref:"#/$defs/ContextScoutRecentResultV1"},status:{$ref:"#/$defs/ContextScoutStatusResultV1"}},required:["status","recent"],title:"ContextScoutExplanationResultV1",type:"object"},{$defs:{ContextScoutAddressV1:ho,ContextScoutDeliveryOutcomeV1:hp,ContextScoutDeliveryReceiptV1:hu,ContextScoutFeedbackKindV1:hy,ContextScoutFeedbackV1:hg,UtcMicros:bs},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{address:{$ref:"#/$defs/ContextScoutAddressV1"},feedback:{$ref:"#/$defs/ContextScoutFeedbackV1"},idempotency_key:{type:"string"},receipt:{$ref:"#/$defs/ContextScoutDeliveryReceiptV1"}},required:["address","receipt","feedback","idempotency_key"],title:"ContextScoutFeedbackRequestV1",type:"object"},{$defs:{ConfigurationIdempotencyKey:f3,ConfigurationRevisionId:f8,ContextScoutAddressV1:ho},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{address:{$ref:"#/$defs/ContextScoutAddressV1"},expected_revision:{$ref:"#/$defs/ConfigurationRevisionId"},idempotency_key:{$ref:"#/$defs/ConfigurationIdempotencyKey"}},required:["address","expected_revision","idempotency_key"],title:"ContextScoutControlRequestV1",type:"object"},{$defs:{CodeGenerationId:fz,ContextScoutAddressV1:ho,ContextScoutCategoryV1:hn,ContextScoutDeliveryOutcomeV1:hp,ContextScoutDeliveryReceiptV1:hu,ContextScoutDeliveryWindowV1:hm,ContextScoutEvidenceAvailabilityV1:hf,ContextScoutEvidenceProjectionV1:hh,ContextScoutFeedbackKindV1:hy,ContextScoutFeedbackV1:hg,ContextScoutModelBackendV1:h$,ContextScoutModelOutcomeV1:hS,ContextScoutModelReceiptV1:hk,ContextScoutRecentDeliveryV1:hw,ContextScoutRouteV1:hV,ContextScoutSessionWindowV1:hq,ContextScoutSuggestionProjectionV1:hj,ContextScoutWorkV1:hT,ManifestDigest:gj,RetrievalAnchorId:_J,UtcMicros:bs},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{configuration_revision:{items:{format:"uint8",maximum:255,minimum:0,type:"integer"},maxItems:32,minItems:32,type:"array"},deliveries:{items:{$ref:"#/$defs/ContextScoutRecentDeliveryV1"},type:"array"},observed_at:{$ref:"#/$defs/UtcMicros"},omitted:{format:"uint",minimum:0,type:"integer"},pending:{items:{$ref:"#/$defs/ContextScoutSuggestionProjectionV1"},type:"array"}},required:["configuration_revision","observed_at","pending","deliveries","omitted"],title:"ContextScoutRecentResultV1",type:"object"},{$defs:{ContextScoutDeliveryOutcomeV1:hp,ContextScoutFeedbackKindV1:hy,ContextScoutLimitsV1:hb,ContextScoutModelBackendV1:h$,ContextScoutModelOutcomeV1:hS,ContextScoutModelReceiptV1:hk,ContextScoutRouteV1:hV,ContextScoutRuntimeModeV1:hP,ContextScoutServiceStateV1:hR,ContextScoutSuppressionV1:hC},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{active_suggestions:{format:"uint",minimum:0,type:"integer"},configuration_revision:{items:{format:"uint8",maximum:255,minimum:0,type:"integer"},maxItems:32,minItems:32,type:"array"},last_delivery_outcome:{anyOf:[{$ref:"#/$defs/ContextScoutDeliveryOutcomeV1"},{type:"null"}]},last_feedback:{anyOf:[{$ref:"#/$defs/ContextScoutFeedbackKindV1"},{type:"null"}]},last_model_outcome:{anyOf:[{$ref:"#/$defs/ContextScoutModelOutcomeV1"},{type:"null"}]},last_model_receipt:{anyOf:[{$ref:"#/$defs/ContextScoutModelReceiptV1"},{type:"null"}]},last_route:{anyOf:[{$ref:"#/$defs/ContextScoutRouteV1"},{type:"null"}]},last_suppression:{anyOf:[{$ref:"#/$defs/ContextScoutSuppressionV1"},{type:"null"}]},limits:{$ref:"#/$defs/ContextScoutLimitsV1"},mode:{$ref:"#/$defs/ContextScoutRuntimeModeV1"},model_path:{anyOf:[{$ref:"#/$defs/ContextScoutModelBackendV1"},{type:"null"}]},state:{$ref:"#/$defs/ContextScoutServiceStateV1"}},required:["configuration_revision","state","mode","limits","active_suggestions"],title:"ContextScoutStatusResultV1",type:"object"},{$defs:{CouplingDirectionV1:hE},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{direction:{anyOf:[{$ref:"#/$defs/CouplingDirectionV1"},{type:"null"}],description:"fan_in: files depended on by the most others. fan_out: files that\ndepend on the most others (default: fan_in)."},limit:{description:"Maximum number of results to return (default: 10, at most 100).",format:"uint32",minimum:0,type:["integer","null"]},path:{description:"Filter to files under this directory path (e.g. 'src/main/java').",type:["string","null"]}},title:"CouplingSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fF,CodeIndexConvergenceParkedV1:fL,CodeIndexStalenessStateV1:fB,CouplingDirectionV1:hE,CouplingEntryV1:{additionalProperties:!1,properties:{coupled_files:{format:"uint64",minimum:0,type:"integer"},file:{type:"string"}},required:["file","coupled_files"],type:"object"},PrimitiveFreshnessStateV1:_i,PrimitiveIndexingStateV1:_o,PrimitiveSearchFreshnessV1:_d},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{direction:{$ref:"#/$defs/CouplingDirectionV1"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},ranking:{items:{$ref:"#/$defs/CouplingEntryV1"},type:"array"},result_count:{format:"uint64",minimum:0,type:"integer"}},required:["direction","result_count","ranking"],title:"CouplingResultV1",type:"object"},{$defs:{DashboardActionV1:{description:"What `tracedecay_dashboard` does.",enum:["start","stop"],type:"string"}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{action:{anyOf:[{$ref:"#/$defs/DashboardActionV1"},{type:"null"}],description:'Action to perform (default: "start"). "stop" shuts down a previously\nstarted dashboard if any.'},host:{description:'Loopback host address to bind: 127.0.0.1, localhost, or ::1\n(default: "127.0.0.1"). Wildcard, LAN, public IPs, and other\nhostnames are rejected.',type:["string","null"]},port:{description:"Port to listen on; 0 picks an ephemeral port (default: 7341).",format:"uint16",maximum:65535,minimum:0,type:["integer","null"]}},title:"DashboardSurfaceRequestV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",oneOf:[{additionalProperties:!1,properties:{host:{type:"string"},port:{format:"uint16",maximum:65535,minimum:0,type:"integer"},status:{const:"started",type:"string"},url:{type:"string"}},required:["status","url","host","port"],type:"object"},{additionalProperties:!1,description:"A dashboard that was already bound when `start` was asked again.",properties:{host:{type:"string"},port:{format:"uint16",maximum:65535,minimum:0,type:"integer"},requested_host:{type:"string"},requested_port:{format:"uint16",maximum:65535,minimum:0,type:"integer"},requested_port_honored:{description:"Whether the bound port is the one asked for (always true for 0).",type:"boolean"},status:{const:"already_running",type:"string"},url:{type:"string"}},required:["status","url","host","port","requested_host","requested_port","requested_port_honored"],type:"object"},{additionalProperties:!1,description:"The bound server is shutting down.",properties:{host:{type:"string"},port:{format:"uint16",maximum:65535,minimum:0,type:"integer"},requested_host:{type:"string"},requested_port:{format:"uint16",maximum:65535,minimum:0,type:"integer"},requested_port_honored:{description:"Whether the bound port is the one asked for (always true for 0).",type:"boolean"},status:{const:"stopping",type:"string"},url:{type:"string"}},required:["status","url","host","port","requested_host","requested_port","requested_port_honored"],type:"object"},{additionalProperties:!1,properties:{previous_url:{type:"string"},status:{const:"stopped",type:"string"}},required:["status","previous_url"],type:"object"},{additionalProperties:!1,properties:{status:{const:"not_running",type:"string"}},required:["status"],type:"object"}],title:"DashboardResultV1"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{include_public:{description:"When true, do NOT exclude pub items. Default false.",type:["boolean","null"]},kinds:{description:'Node kinds to check (default: ["function", "method"]).',items:{type:"string"},type:["array","null"]},limit:{description:"Maximum symbols to return (default: 100, max: 1000).",format:"uint32",minimum:0,type:["integer","null"]},path:{description:"Filter reported symbols to files under this directory path (e.g.\n'crates/tracedecay-mcp'). Omit for the entire codebase.",type:["string","null"]}},title:"DeadCodeSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fF,CodeIndexConvergenceParkedV1:fL,CodeIndexStalenessStateV1:fB,DeadCodeSymbolV1:{additionalProperties:!1,properties:{file:{type:"string"},id:{type:"string"},kind:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},name:{type:"string"},signature:{type:["string","null"]}},required:["id","name","kind","file","line"],type:"object"},PrimitiveFreshnessStateV1:_i,PrimitiveIndexingStateV1:_o,PrimitiveSearchFreshnessV1:_d},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{dead_code_count:{format:"uint64",minimum:0,type:"integer"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},symbols:{items:{$ref:"#/$defs/DeadCodeSymbolV1"},type:"array"}},required:["dead_code_count","symbols"],title:"DeadCodeResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{limit:{description:"Maximum number of chains to return (default: 10, at most 100).",format:"uint32",minimum:0,type:["integer","null"]},path:{description:"Filter to files under this directory path.",type:["string","null"]}},title:"DependencyDepthSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fF,CodeIndexConvergenceParkedV1:fL,CodeIndexStalenessStateV1:fB,DependencyDepthChainV1:{additionalProperties:!1,properties:{chain:{items:{type:"string"},type:"array"},depth:{format:"uint64",minimum:0,type:"integer"},file:{type:"string"}},required:["file","depth","chain"],type:"object"},PrimitiveFreshnessStateV1:_i,PrimitiveIndexingStateV1:_o,PrimitiveSearchFreshnessV1:_d},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"`ideal_depth` is `ceil(log2(file_count))`.",properties:{chains:{items:{$ref:"#/$defs/DependencyDepthChainV1"},type:"array"},depth_score:{format:"double",type:"number"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},ideal_depth:{format:"uint64",minimum:0,type:"integer"},max_depth:{format:"uint64",minimum:0,type:"integer"}},required:["max_depth","ideal_depth","depth_score","chains"],title:"DependencyDepthResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Addresses indexed symbols by node id or by qualified name; the node id\nwins when both are present.",properties:{node_id:{description:"Look up a single node by its ID instead of qualified_name.",type:["string","null"]},qualified_name:{description:"The exact, case-sensitive qualified name to look up. A bare short name\ndoes not match; resolve it with find_exact_symbol first.",type:["string","null"]}},title:"SymbolSelectorSurfaceRequestV1",type:"object"},{$defs:{DeriveAnnotationV1:{additionalProperties:!1,properties:{evidence_class:{$ref:"#/$defs/DeriveEvidenceClassV1"},name:{type:"string"},unavailable_fields:{items:{type:"string"},type:"array"}},required:["name","evidence_class","unavailable_fields"],type:"object"},DeriveEvidenceClassV1:{description:"How a derive name is known: read from the declaration's attributes, not\nfrom macro expansion.",enum:["syntax_exact"],type:"string"},DerivesSymbolV1:{additionalProperties:!1,properties:{derives:{items:{$ref:"#/$defs/DeriveAnnotationV1"},type:"array"},file:{type:"string"},kind:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},name:{type:"string"},node_id:{type:"string"},qualified_name:{type:"string"}},required:["node_id","name","qualified_name","kind","file","line","derives"],type:"object"}},$schema:"https://json-schema.org/draft/2020-12/schema",description:"Derive annotations of every addressed symbol; empty when no symbol matched.",items:{$ref:"#/$defs/DerivesSymbolV1"},title:"DerivesResultV1",type:"array"},{$defs:{DiagnoseSeverityFilterV1:{description:"Compiler severity the diagnose report keeps.",enum:["error","warning","all"],type:"string"}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{cargo_output:{description:"Raw stderr text from `cargo check` / `cargo clippy` / `rustc`.",type:"string"},include_callers:{description:"Attach up to 5 callers per diagnostic (default: true).",type:["boolean","null"]},max_diagnostics:{description:"Cap on diagnostics in the response (default: 50, at most 500).",format:"uint32",minimum:0,type:["integer","null"]},severity:{anyOf:[{$ref:"#/$defs/DiagnoseSeverityFilterV1"},{type:"null"}],description:"Filter by severity (default: all)."}},required:["cargo_output"],title:"DiagnoseSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fF,CodeIndexConvergenceParkedV1:fL,CodeIndexStalenessStateV1:fB,DiagnoseItemV1:{additionalProperties:!1,properties:{callers:{description:"Absent when the request turned caller attachment off.",items:{$ref:"#/$defs/DiagnoseSymbolV1"},type:["array","null"]},code:{type:["string","null"]},column:{format:"uint32",minimum:0,type:"integer"},file:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},message:{type:"string"},node:{anyOf:[{$ref:"#/$defs/DiagnoseSymbolV1"},{type:"null"}]},severity:{$ref:"#/$defs/DiagnoseSeverityV1"}},required:["severity","message","file","line","column"],type:"object"},DiagnosePublicationV1:{description:"Outcome of publishing the parsed diagnostics into the managed store.",oneOf:[{additionalProperties:!1,properties:{reason:{type:"string"},status:{const:"skipped",type:"string"},unresolved:{items:{type:"string"},type:["array","null"]}},required:["status","reason"],type:"object"},{additionalProperties:!1,properties:{cleared:{format:"uint64",minimum:0,type:"integer"},generation:{type:"string"},inserted:{format:"uint64",minimum:0,type:"integer"},publication_revision:{format:"uint64",minimum:0,type:"integer"},rejected:{items:{type:"string"},type:"array"},status:{const:"published",type:"string"},unresolved:{items:{type:"string"},type:"array"}},required:["status","generation","publication_revision","inserted","cleared","unresolved","rejected"],type:"object"},{additionalProperties:!1,properties:{reason:{type:"string"},status:{const:"failed",type:"string"}},required:["status","reason"],type:"object"}]},DiagnoseSeverityV1:{description:"Severity of one parsed compiler diagnostic.",enum:["error","warning","note","help"],type:"string"},DiagnoseSymbolV1:{additionalProperties:!1,description:"The graph symbol a diagnostic line falls in, or one of its callers.",properties:{end_line:{format:"uint32",minimum:0,type:"integer"},file:{type:"string"},kind:{type:"string"},line:{description:"One-based display line.",format:"uint32",minimum:0,type:"integer"},name:{type:"string"},node_id:{type:"string"},qualified_name:{type:"string"},start_line:{format:"uint32",minimum:0,type:"integer"}},required:["node_id","name","kind","qualified_name","file","line","start_line","end_line"],type:"object"},PrimitiveFreshnessStateV1:_i,PrimitiveIndexingStateV1:_o,PrimitiveSearchFreshnessV1:_d},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{diagnostics:{items:{$ref:"#/$defs/DiagnoseItemV1"},type:"array"},diagnostics_parsed:{format:"uint64",minimum:0,type:"integer"},diagnostics_returned:{format:"uint64",minimum:0,type:"integer"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},mapped_to_node:{format:"uint64",minimum:0,type:"integer"},published:{$ref:"#/$defs/DiagnosePublicationV1"},truncated:{type:"boolean"},unmapped:{format:"uint64",minimum:0,type:"integer"}},required:["diagnostics_parsed","diagnostics_returned","mapped_to_node","unmapped","truncated","published","diagnostics"],title:"DiagnoseResultV1",type:"object"},{$defs:{DiagnosticsPrimitiveScope:{oneOf:[{enum:["workspace"],type:"string"},{additionalProperties:!1,properties:{package:{type:"string"}},required:["package"],type:"object"},{additionalProperties:!1,properties:{file:{type:"string"}},required:["file"],type:"object"}]}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{cursor:{default:null,type:["string","null"]},maximum_diagnostics:{format:"uint32",minimum:0,type:"integer"},scope:{$ref:"#/$defs/DiagnosticsPrimitiveScope"}},required:["scope","maximum_diagnostics"],title:"DiagnosticsPrimitiveRequest",type:"object"},{$defs:{CodeGenerationId:fz,CommitId:fX,ComponentVersion:f2,ContentDigest:ht,DiagnosticEvidenceClassV1:{description:"Evidence class for one diagnostic record. Evidence class is part of\ncanonical diagnostic identity.",oneOf:[{const:"observed_current",description:"Directly observed against the exact clean generation it names.",type:"string"},{const:"producer_reported",description:"Reported by the cataloged producer for the exact clean generation.",type:"string"},{const:"derived_structural",description:"Derived from TraceDecay structural/graph analysis of the generation.",type:"string"},{const:"unknown_unsupported",description:"The evidence class cannot be established; the record is retained for\naudit but must not be treated as current truth.",type:"string"}]},DiagnosticPrimitiveRecord:{additionalProperties:!1,properties:{diagnostic:{$ref:"#/$defs/GenerationDiagnosticV1"},logical_path:{type:"string"}},required:["logical_path","diagnostic"],type:"object"},DiagnosticProducerKindV1:{description:"The cataloged producer kinds that may publish durable diagnostics.\nRuntime, storage, migration,\nconfiguration, session, or daemon-health findings without a truthful\nsource range are Doctor or application findings and never become\n`GenerationDiagnosticV1` records.",enum:["upstream_compiler","language_server","tracedecay_structural","tracedecay_graph_integrity","tracedecay_policy","tracedecay_code_health","generation_consistency","authorized_external_analyzer"],type:"string"},DiagnosticProvenanceV1:{additionalProperties:!1,description:"Producer provenance for one diagnostic. Diagnostic identity includes\nproducer provenance: identical findings from the same logical producer and\nrevision collapse; findings from distinct producers remain distinct.",properties:{analyzer_revision:{$ref:"#/$defs/ComponentVersion"},configuration_revision:{$ref:"#/$defs/ComponentVersion"},producer:{$ref:"#/$defs/ProviderId"},producer_kind:{$ref:"#/$defs/DiagnosticProducerKindV1"},sanitization_receipt:{anyOf:[{$ref:"#/$defs/SanitizationReceiptId"},{type:"null"}]}},required:["producer_kind","producer","analyzer_revision","configuration_revision"],type:"object"},DiagnosticRecordStateV1:{description:"Current-vs-stale typing for a durable diagnostic record. Publication is\nversion-monotone: a newer clean generation clears the prior publication\ndeterministically, and stale findings cannot cross snapshots.\nStale and historical records remain queryable through\napplication APIs but are excluded from active publication.",oneOf:[{description:"Current for exactly the clean generation named by the record.",properties:{kind:{const:"current",type:"string"}},required:["kind"],type:"object"},{description:"A clean generation completed and deterministically removed this\nfinding (resolution, deletion, source-revision drift, or content or\ngeneration change).",properties:{cleared_in_generation:{$ref:"#/$defs/CodeGenerationId"},kind:{const:"cleared",type:"string"}},required:["kind","cleared_in_generation"],type:"object"}]},DiagnosticSeverityV1:hH,FileOccurrenceId:yj,GenerationDiagnosticV1:{additionalProperties:!1,description:"One durable, generation-bound diagnostic record. Its diagnostic payload,\nscope, and producer provenance form observation identity; the display\nmessage remains sanitized product data.",properties:{code:{description:"Stable producer diagnostic code (for example `E0308`).",type:"string"},collected_at:{$ref:"#/$defs/UtcMicros",description:"Time the server first accepted this evidence observation. Compiler\noutput does not carry a trustworthy producer capture time, and an exact\nsemantic replay retains the first accepted value."},content_digest:{$ref:"#/$defs/ContentDigest",description:"Content digest of the attached file inside the generation."},diagnostic_anchor:{$ref:"#/$defs/RetrievalAnchorId",description:"Retrieval anchor addressing this record. The code index's\n`GenerationDiagnosticAttachmentV1::diagnostic_anchor` points here."},evidence_class:{$ref:"#/$defs/DiagnosticEvidenceClassV1"},file_occurrence_id:{$ref:"#/$defs/FileOccurrenceId",description:"Canonical file identity the diagnostic attaches to."},generation_id:{$ref:"#/$defs/CodeGenerationId",description:"The immutable clean code-intelligence generation this record is bound\nto. Findings never cross generations."},message:{description:"Sanitized display message; bounded by [`MAX_DIAGNOSTIC_MESSAGE_BYTES`].",type:"string"},message_digest:{$ref:"#/$defs/ManifestDigest",description:"Integrity digest over the sanitized message."},provenance:{$ref:"#/$defs/DiagnosticProvenanceV1"},reference:{anyOf:[{$ref:"#/$defs/RefId"},{type:"null"}]},repository:{$ref:"#/$defs/RepositoryId"},severity:{$ref:"#/$defs/DiagnosticSeverityV1"},source_revision:{anyOf:[{$ref:"#/$defs/CommitId"},{type:"null"}]},span:{$ref:"#/$defs/SourceSpan",description:"Range encoding inside the sanitized file (byte range; mutable line\nnumbers are never identity)."},state:{$ref:"#/$defs/DiagnosticRecordStateV1",description:"Current-vs-stale typing; publication is version-monotone."},symbol_occurrence_id:{anyOf:[{$ref:"#/$defs/SymbolOccurrenceId"},{type:"null"}],description:"Enclosing symbol occurrence, when exact attachment is possible."},worktree:{anyOf:[{$ref:"#/$defs/WorktreeId"},{type:"null"}]}},required:["diagnostic_anchor","generation_id","repository","file_occurrence_id","content_digest","span","code","severity","message","message_digest","provenance","evidence_class","collected_at","state"],type:"object"},ManifestDigest:gj,ProviderId:_w,RefId:_T,RepositoryId:_z,RetrievalAnchorId:_J,SanitizationReceiptId:{description:"Strongly typed canonical identity: `SanitizationReceiptId`.",type:"string"},SourceSpan:vF,SymbolOccurrenceId:vJ,UtcMicros:bs,WorktreeId:So},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{clean_generation:{type:"boolean"},diagnostics:{items:{$ref:"#/$defs/DiagnosticPrimitiveRecord"},type:"array"},findings_cleared:{type:"boolean"},generation_id:{$ref:"#/$defs/CodeGenerationId"},next_cursor:{type:["string","null"]}},required:["generation_id","clean_generation","findings_cleared","diagnostics"],title:"DiagnosticsPrimitiveResult",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{budget_tokens:{description:"Cap the symbol, test, and co-change sections at about this many tokens.",format:"uint32",minimum:0,type:["integer","null"]},depth:{description:"Maximum impact traversal depth (default: 2, at most 10).",format:"uint32",minimum:0,type:["integer","null"]},files:{description:"List of changed file paths.",items:{type:"string"},type:"array"}},required:["files"],title:"DiffContextSurfaceRequestV1",type:"object"},{$defs:{CoChangeUnavailableV1:fM,CodeIndexBuildBlockedReasonV1:fF,CodeIndexConvergenceParkedV1:fL,CodeIndexStalenessStateV1:fB,GitContextSymbolV1:yz,IncompatibleCallSiteV1:{additionalProperties:!1,description:"A call site whose argument count cannot invoke the new parameter list.",properties:{arguments:{format:"uint32",minimum:0,type:"integer"},file:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},name:{type:"string"}},required:["name","file","line","arguments"],type:"object"},MissingCoChangePartnerV1:gH,PrimitiveFreshnessStateV1:_i,PrimitiveIndexingStateV1:_o,PrimitiveSearchFreshnessV1:_d,SignatureEditStatusV1:{description:"How a modified function's parameter list compares with HEAD.",enum:["contract_change"],type:"string"},SignatureEditV1:{additionalProperties:!1,description:"A Rust free function whose parameter count differs from HEAD.",properties:{file:{type:"string"},incompatible:{items:{$ref:"#/$defs/IncompatibleCallSiteV1"},type:"array"},new_parameters:{format:"uint32",minimum:0,type:["integer","null"]},old_parameters:{format:"uint32",minimum:0,type:["integer","null"]},status:{$ref:"#/$defs/SignatureEditStatusV1"},symbol:{type:"string"}},required:["symbol","file","status","incompatible"],type:"object"},TestGateV1:{additionalProperties:!1,description:"Whether tests reach the symbols in a diff's blast radius.\n\n`pass` and exit 0 when every counted symbol is reached. `fail` and exit 4\nname the ones that are not. `incomplete` and exit 0 mean the caller walk\nstopped before that absence is known.",properties:{exit_code:{format:"uint8",maximum:255,minimum:0,type:"integer"},untested:{items:{type:"string"},type:"array"},verdict:{type:"string"}},required:["verdict","exit_code","untested"],type:"object"},TokenBudgetCutV1:v8,TokenBudgetSectionV1:v7},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{affected_tests:{items:{type:"string"},type:"array"},changed_files:{items:{type:"string"},type:"array"},co_change_unavailable:{anyOf:[{$ref:"#/$defs/CoChangeUnavailableV1"},{type:"null"}],description:"Present when Git history could not be mined for co-change partners."},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},impact_complete:{description:"False when the impact walk stopped at its depth or budget with callers\nstill unexplored.",type:"boolean"},impacted_symbols:{items:{$ref:"#/$defs/GitContextSymbolV1"},type:"array"},impacted_symbols_count:{format:"uint",minimum:0,type:"integer"},missing_co_change_partners:{description:"Files that usually change with a changed file, per bounded Git\nhistory, but are absent from this change set.",items:{$ref:"#/$defs/MissingCoChangePartnerV1"},type:"array"},modified_symbols:{items:{$ref:"#/$defs/GitContextSymbolV1"},type:"array"},signature_edits:{description:"Rust free functions whose parameter count changed since HEAD, with the\ncall sites that list cannot accept. Omitted when nothing changed.",items:{$ref:"#/$defs/SignatureEditV1"},type:"array"},test_gate:{$ref:"#/$defs/TestGateV1",description:"Symbols in this diff that no test reaches, and the verdict a CLI exits on."},token_budget:{anyOf:[{$ref:"#/$defs/TokenBudgetCutV1"},{type:"null"}],description:"Budget accounting when the request supplies `budget_tokens`."}},required:["changed_files","modified_symbols","impacted_symbols_count","impacted_symbols","impact_complete","affected_tests","missing_co_change_partners","test_gate"],title:"DiffContextResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{limit:{description:"Maximum number of files in the per-file breakdown, highest node count\nfirst (default: 100, max: 1000). Ignored when summary is true; the\nresponse states total_file_count and omitted_file_count.",format:"uint32",minimum:0,type:["integer","null"]},path:{description:"Directory or file path prefix to filter (e.g.\n'src/main/java/com/example'). Omit for entire codebase.",type:["string","null"]},summary:{description:"If true, aggregate counts across all matching files instead of\nper-file breakdown (default: false).",type:["boolean","null"]}},title:"DistributionSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fF,CodeIndexConvergenceParkedV1:fL,CodeIndexStalenessStateV1:fB,DistributionFileV1:{additionalProperties:!1,properties:{file:{type:"string"},kinds:{items:{$ref:"#/$defs/DistributionKindCountV1"},type:"array"}},required:["file","kinds"],type:"object"},DistributionKindCountV1:{additionalProperties:!1,properties:{count:{format:"uint64",minimum:0,type:"integer"},kind:{type:"string"}},required:["kind","count"],type:"object"},PrimitiveFreshnessStateV1:_i,PrimitiveIndexingStateV1:_o,PrimitiveSearchFreshnessV1:_d},$schema:"https://json-schema.org/draft/2020-12/schema",description:"Flattening the tagged view keeps `path_filter` ahead of `mode` on the\nwire; serde cannot deny unknown fields through a flattened member.",oneOf:[{properties:{distribution:{items:{$ref:"#/$defs/DistributionKindCountV1"},type:"array"},mode:{const:"summary",type:"string"},total_kinds:{format:"uint64",minimum:0,type:"integer"}},required:["mode","total_kinds","distribution"],type:"object"},{properties:{file_count:{format:"uint64",minimum:0,type:"integer"},files:{items:{$ref:"#/$defs/DistributionFileV1"},type:"array"},mode:{const:"per_file",type:"string"},omitted_file_count:{format:"uint64",minimum:0,type:"integer"},total_file_count:{format:"uint64",minimum:0,type:"integer"}},required:["mode","file_count","total_file_count","omitted_file_count","files"],type:"object"}],properties:{freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},path_filter:{type:["string","null"]}},title:"DistributionResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{limit:{description:"Maximum number of results to return (default: 50, at most 500).",format:"uint32",minimum:0,type:["integer","null"]},path:{description:"Directory or file path prefix to filter (e.g. 'src/main'). Omit for\nentire codebase.",type:["string","null"]}},title:"DocCoverageSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fF,CodeIndexConvergenceParkedV1:fL,CodeIndexStalenessStateV1:fB,DocCoverageFileV1:{additionalProperties:!1,properties:{count:{format:"uint64",minimum:0,type:"integer"},file:{type:"string"},symbols:{items:{$ref:"#/$defs/DocCoverageSymbolV1"},type:"array"}},required:["file","count","symbols"],type:"object"},DocCoverageSymbolV1:{additionalProperties:!1,properties:{id:{type:"string"},kind:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},name:{type:"string"},signature:{type:["string","null"]}},required:["id","name","kind","line"],type:"object"},PrimitiveFreshnessStateV1:_i,PrimitiveIndexingStateV1:_o,PrimitiveSearchFreshnessV1:_d},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{complete:{type:"boolean"},file_count:{format:"uint64",minimum:0,type:"integer"},files:{items:{$ref:"#/$defs/DocCoverageFileV1"},type:"array"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},limit:{format:"uint64",minimum:0,type:"integer"},omitted_count:{format:"uint64",minimum:0,type:"integer"},path_filter:{type:["string","null"]},returned_count:{format:"uint64",minimum:0,type:"integer"},total_undocumented:{format:"uint64",minimum:0,type:"integer"}},required:["total_undocumented","returned_count","omitted_count","complete","limit","file_count","files"],title:"DocCoverageResultV1",type:"object"},{$defs:{DsmShapeV1:hK},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{max_files:{description:"Maximum files in matrix format (default: 30, at most 200).",format:"uint32",minimum:0,type:["integer","null"]},path:{description:"Filter to files under this directory path.",type:["string","null"]},shape:{anyOf:[{$ref:"#/$defs/DsmShapeV1"},{type:"null"}],description:"DSM data shape: stats, clusters, or matrix (default: stats)."}},title:"DsmSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fF,CodeIndexConvergenceParkedV1:fL,CodeIndexStalenessStateV1:fB,DsmClusterV1:{additionalProperties:!1,properties:{boundary_edges:{format:"uint64",minimum:0,type:"integer"},directory:{type:"string"},file_count:{format:"uint64",minimum:0,type:"integer"},incoming_edges:{format:"uint64",minimum:0,type:"integer"},internal_edges:{format:"uint64",minimum:0,type:"integer"},outgoing_edges:{format:"uint64",minimum:0,type:"integer"}},required:["directory","file_count","internal_edges","outgoing_edges","incoming_edges","boundary_edges"],type:"object"},DsmMatrixV1:{additionalProperties:!1,properties:{files:{items:{type:"string"},type:"array"},matrix:{items:{items:{format:"uint8",maximum:255,minimum:0,type:"integer"},type:"array"},type:"array"},note:{type:"string"}},required:["files","matrix","note"],type:"object"},DsmShapeV1:hK,DsmStatsV1:{additionalProperties:!1,properties:{clusters:{format:"uint64",minimum:0,type:"integer"},density:{format:"double",type:"number"},edges:{format:"uint64",minimum:0,type:"integer"},files:{format:"uint64",minimum:0,type:"integer"},largest_cluster:{format:"uint64",minimum:0,type:"integer"}},required:["files","edges","density","clusters","largest_cluster"],type:"object"},PrimitiveFreshnessStateV1:_i,PrimitiveIndexingStateV1:_o,PrimitiveSearchFreshnessV1:_d},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{clusters:{items:{$ref:"#/$defs/DsmClusterV1"},type:"array"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},matrix:{anyOf:[{$ref:"#/$defs/DsmMatrixV1"},{type:"null"}]},shape:{$ref:"#/$defs/DsmShapeV1"},stats:{$ref:"#/$defs/DsmStatsV1"}},required:["shape","stats","clusters"],title:"DsmResultV1",type:"object"},{$defs:{FactEventId:ye,FactFeedbackActionV1:yt,FactId:yr,MemoryScopeV1:gT,ProjectId:_m},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{action:{$ref:"#/$defs/FactFeedbackActionV1"},expected_last_event_id:{anyOf:[{$ref:"#/$defs/FactEventId"},{type:"null"}]},fact_id:{$ref:"#/$defs/FactId"},memory_scope:{anyOf:[{$ref:"#/$defs/MemoryScopeV1"},{type:"null"}]},project_selector:{additionalProperties:!1,description:'Exact registered-project selector. Reads and fact effects run against the\nselected project.\n\nInlined so every request schema advertises the closed selector contract\n(`required: ["project_id"]`, no additional properties) directly on its\n`project_selector` property instead of behind a `$defs` reference, matching\nthe selector shape the MCP dispatch policy promises for selector-accepting\ntools.',properties:{project_id:{$ref:"#/$defs/ProjectId"}},required:["project_id"],type:["object","null"]},reason:{type:["string","null"]},source_label:{type:["string","null"]}},required:["fact_id","action"],title:"FactFeedbackRequestV1",type:"object"},{$defs:{FactAssertionId:h3,FactCategoryV1:h9,FactCommitDispositionV1:h5,FactCommitOwnerV1:h8,FactCommitReceiptV1:h7,FactEventId:ye,FactFeedbackActionV1:yt,FactFeedbackV1:{additionalProperties:!1,properties:{action:{$ref:"#/$defs/FactFeedbackActionV1"},event_id:{$ref:"#/$defs/FactEventId"},fact_id:{$ref:"#/$defs/FactId"},helpful_count:{format:"uint64",minimum:0,type:"integer"},new_trust_millionths:{format:"uint32",minimum:0,type:"integer"},old_trust_millionths:{format:"uint32",minimum:0,type:"integer"},trust_delta_millionths:{format:"int32",type:"integer"},unhelpful_count:{format:"uint64",minimum:0,type:"integer"}},required:["event_id","fact_id","action","old_trust_millionths","new_trust_millionths","trust_delta_millionths","helpful_count","unhelpful_count"],type:"object"},FactId:yr,FactIdentitySourceResultV1:yi,FactPayloadAccessV1:yo,FactProjectionV1:yn,FactStatusV1:yl,FactTelemetryV1:yp,FactV1:yu,LocatorDigest:gk,ProjectId:_m,ProvenanceId:_S,RetrievalAnchorId:_J,UtcMicros:bs},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{commit:{$ref:"#/$defs/FactCommitReceiptV1"},fact:{$ref:"#/$defs/FactProjectionV1"},feedback:{$ref:"#/$defs/FactFeedbackV1"}},required:["fact","feedback","commit"],title:"FactFeedbackResultV1",type:"object"},{$defs:{FactCategoryV1:h9,MemoryScopeV1:gT,ProjectId:_m},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{category:{anyOf:[{$ref:"#/$defs/FactCategoryV1"},{type:"null"}]},content:{type:"string"},entities:{default:[],items:{type:"string"},type:"array"},memory_scope:{anyOf:[{$ref:"#/$defs/MemoryScopeV1"},{type:"null"}]},metadata:{additionalProperties:!0,type:["object","null"]},project_selector:{additionalProperties:!1,description:'Exact registered-project selector. Reads and fact effects run against the\nselected project.\n\nInlined so every request schema advertises the closed selector contract\n(`required: ["project_id"]`, no additional properties) directly on its\n`project_selector` property instead of behind a `$defs` reference, matching\nthe selector shape the MCP dispatch policy promises for selector-accepting\ntools.',properties:{project_id:{$ref:"#/$defs/ProjectId"}},required:["project_id"],type:["object","null"]},source_label:{type:["string","null"]},tags:{default:[],items:{type:"string"},type:"array"},trust:{format:"double",type:["number","null"]}},required:["content"],title:"FactStoreAddRequestV1",type:"object"},{$defs:{FactAssertionId:h3,FactCategoryV1:h9,FactCommitDispositionV1:h5,FactCommitOwnerV1:h8,FactCommitReceiptV1:h7,FactEventId:ye,FactId:yr,FactIdentitySourceResultV1:yi,FactPayloadAccessV1:yo,FactProjectionV1:yn,FactStatusV1:yl,FactStoreAddCommitV1:{oneOf:[{additionalProperties:!1,properties:{commit:{$ref:"#/$defs/FactCommitReceiptV1"},disposition:{const:"added",type:"string"},fact:{$ref:"#/$defs/FactProjectionV1"}},required:["disposition","fact","commit"],type:"object"},{additionalProperties:!1,properties:{closest_fact_id:{$ref:"#/$defs/FactId"},commit:{$ref:"#/$defs/FactCommitReceiptV1"},disposition:{const:"near_duplicate",type:"string"},fact:{$ref:"#/$defs/FactProjectionV1"},similarity_millionths:{format:"uint32",minimum:0,type:"integer"}},required:["disposition","fact","closest_fact_id","similarity_millionths","commit"],type:"object"},{additionalProperties:!1,properties:{closest_fact_id:{$ref:"#/$defs/FactId"},commit:{$ref:"#/$defs/FactCommitReceiptV1"},disposition:{const:"possible_conflict",type:"string"},fact:{$ref:"#/$defs/FactProjectionV1"},similarity_millionths:{format:"uint32",minimum:0,type:"integer"}},required:["disposition","fact","closest_fact_id","similarity_millionths","commit"],type:"object"}]},FactTelemetryV1:yp,FactV1:yu,LocatorDigest:gk,ProjectId:_m,ProvenanceId:_S,RetrievalAnchorId:_J,UtcMicros:bs},$schema:"https://json-schema.org/draft/2020-12/schema",oneOf:[{additionalProperties:!1,properties:{outcome:{const:"secret_rejected",type:"string"}},required:["outcome"],type:"object"},{additionalProperties:!1,properties:{closest_fact_id:{$ref:"#/$defs/FactId"},fact:{$ref:"#/$defs/FactProjectionV1"},outcome:{const:"normalized_duplicate",type:"string"}},required:["outcome","fact","closest_fact_id"],type:"object"},{additionalProperties:!1,properties:{outcome:{const:"committed",type:"string"},result:{$ref:"#/$defs/FactStoreAddCommitV1"}},required:["outcome","result"],type:"object"}],title:"FactStoreAddResultV1"},{$defs:{FactCategoryV1:h9,MemoryScopeV1:gT,ProjectId:_m},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{category:{anyOf:[{$ref:"#/$defs/FactCategoryV1"},{type:"null"}]},limit:{format:"uint64",minimum:0,type:["integer","null"]},memory_scope:{anyOf:[{$ref:"#/$defs/MemoryScopeV1"},{type:"null"}]},project_selector:{additionalProperties:!1,description:'Exact registered-project selector. Reads and fact effects run against the\nselected project.\n\nInlined so every request schema advertises the closed selector contract\n(`required: ["project_id"]`, no additional properties) directly on its\n`project_selector` property instead of behind a `$defs` reference, matching\nthe selector shape the MCP dispatch policy promises for selector-accepting\ntools.',properties:{project_id:{$ref:"#/$defs/ProjectId"}},required:["project_id"],type:["object","null"]},threshold_millionths:{format:"uint32",minimum:0,type:["integer","null"]}},title:"FactStoreContradictRequestV1",type:"object"},{$defs:{FactAssertionId:h3,FactCategoryV1:h9,FactCommitOwnerV1:h8,FactContradictionV1:{additionalProperties:!1,properties:{existing_fact:{$ref:"#/$defs/FactV1"},new_content:{type:"string"},score_millionths:{format:"uint32",minimum:0,type:"integer"},why:{type:["string","null"]}},required:["existing_fact","new_content","score_millionths"],type:"object"},FactEventId:ye,FactId:yr,FactIdentitySourceResultV1:yi,FactTelemetryV1:yp,FactV1:yu,LocatorDigest:gk,ProjectId:_m,ProvenanceId:_S,RetrievalAnchorId:_J,UtcMicros:bs},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{contradictions:{items:{$ref:"#/$defs/FactContradictionV1"},type:"array"},owner:{$ref:"#/$defs/FactCommitOwnerV1"}},required:["owner","contradictions"],title:"FactStoreContradictResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Closed public launcher for the automatic Memory Curator.\n\nRun identity, task selection, operations, proposals, approval, and apply\nauthority are deliberately absent and rejected by `deny_unknown_fields`.",properties:{fact_review_limit:{default:24,format:"uint32",maximum:1e3,minimum:1,type:"integer"},min_confidence_millionths:{default:72e4,format:"uint32",maximum:1e6,minimum:0,type:"integer"}},title:"FactStoreCurateRequestV1",type:"object"},{$defs:{AutomationTaskV1:{description:"Automation capability selected after one registered application admission.",enum:["memory_curator","session_reflector","skill_writer","combined_review","user_job"],type:"string"},FactStoreCurateStateV1:{description:"Lifecycle state a `fact_store_curate` receipt reports.",oneOf:[{const:"started",description:"The run was admitted and continues on the daemon.",type:"string"}]},ManifestDigest:gj,RunId:_8},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Receipt of one admitted automatic curation.\n\nThe curator runs on the daemon after this receipt is returned. Its terminal\nis the automation run ledger record for `run_id`, read with\n`automation_run_view`.",properties:{request_digest:{$ref:"#/$defs/ManifestDigest"},run_id:{$ref:"#/$defs/RunId"},state:{$ref:"#/$defs/FactStoreCurateStateV1"},task:{$ref:"#/$defs/AutomationTaskV1"}},required:["run_id","task","request_digest","state"],title:"FactStoreCurateResultV1",type:"object"},{$defs:{FactId:yr,MemoryScopeV1:gT,ProjectId:_m},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{fact_id:{$ref:"#/$defs/FactId"},memory_scope:{anyOf:[{$ref:"#/$defs/MemoryScopeV1"},{type:"null"}]},project_selector:{additionalProperties:!1,description:'Exact registered-project selector. Reads and fact effects run against the\nselected project.\n\nInlined so every request schema advertises the closed selector contract\n(`required: ["project_id"]`, no additional properties) directly on its\n`project_selector` property instead of behind a `$defs` reference, matching\nthe selector shape the MCP dispatch policy promises for selector-accepting\ntools.',properties:{project_id:{$ref:"#/$defs/ProjectId"}},required:["project_id"],type:["object","null"]}},required:["fact_id"],title:"FactStoreGetRequestV1",type:"object"},{$defs:{FactAssertionId:h3,FactCategoryV1:h9,FactCommitOwnerV1:h8,FactEventId:ye,FactFeedbackActionV1:yt,FactFeedbackDetailsAvailabilityV1:{enum:["available","redacted","unknown"],type:"string"},FactId:yr,FactIdentitySourceResultV1:yi,FactPayloadAccessV1:yo,FactProjectionV1:yn,FactStatusV1:yl,FactTelemetryV1:yp,FactV1:yu,LocatorDigest:gk,ProjectId:_m,ProvenanceId:_S,RetrievalAnchorId:_J,TrustHistoryEntryV1:{additionalProperties:!1,properties:{action:{$ref:"#/$defs/FactFeedbackActionV1"},details_availability:{$ref:"#/$defs/FactFeedbackDetailsAvailabilityV1"},event_id:{$ref:"#/$defs/FactEventId"},new_trust_millionths:{format:"uint32",minimum:0,type:"integer"},occurred_at:{$ref:"#/$defs/UtcMicros"},old_trust_millionths:{format:"uint32",minimum:0,type:"integer"},reason:{type:["string","null"]},source_label:{type:["string","null"]}},required:["event_id","occurred_at","action","old_trust_millionths","new_trust_millionths","details_availability"],type:"object"},UtcMicros:bs},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{fact:{$ref:"#/$defs/FactProjectionV1"},trust_history:{items:{$ref:"#/$defs/TrustHistoryEntryV1"},type:"array"}},required:["fact","trust_history"],title:"FactStoreGetResultV1",type:"object"},{$defs:{FactCategoryV1:h9,MemoryScopeV1:gT,ProjectId:_m},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{after:{description:"The previous page's `next_after`, valid only with the same parameters.",type:["string","null"]},category:{anyOf:[{$ref:"#/$defs/FactCategoryV1"},{type:"null"}]},limit:{format:"uint64",minimum:0,type:["integer","null"]},memory_scope:{anyOf:[{$ref:"#/$defs/MemoryScopeV1"},{type:"null"}]},min_trust:{format:"double",type:["number","null"]},project_selector:{additionalProperties:!1,description:'Exact registered-project selector. Reads and fact effects run against the\nselected project.\n\nInlined so every request schema advertises the closed selector contract\n(`required: ["project_id"]`, no additional properties) directly on its\n`project_selector` property instead of behind a `$defs` reference, matching\nthe selector shape the MCP dispatch policy promises for selector-accepting\ntools.',properties:{project_id:{$ref:"#/$defs/ProjectId"}},required:["project_id"],type:["object","null"]}},title:"FactStoreListRequestV1",type:"object"},{$defs:{FactAssertionId:h3,FactCategoryV1:h9,FactCommitOwnerV1:h8,FactEventId:ye,FactId:yr,FactIdentitySourceResultV1:yi,FactPayloadAccessV1:yo,FactProjectionV1:yn,FactStatusV1:yl,FactTelemetryV1:yp,FactV1:yu,LocatorDigest:gk,ProjectId:_m,ProvenanceId:_S,RetrievalAnchorId:_J,UtcMicros:bs},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{facts:{items:{$ref:"#/$defs/FactProjectionV1"},type:"array"},next_after:{description:"Opaque continuation, bound to this operation and request.",type:["string","null"]},owner:{$ref:"#/$defs/FactCommitOwnerV1"}},required:["owner","facts"],title:"FactStoreListResultV1",type:"object"},{$defs:{FactCategoryV1:h9,MemoryScopeV1:gT,ProjectId:_m},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{after:{description:"The previous page's `next_after`, valid only with the same parameters.",type:["string","null"]},category:{anyOf:[{$ref:"#/$defs/FactCategoryV1"},{type:"null"}]},entity:{type:"string"},limit:{format:"uint64",minimum:0,type:["integer","null"]},memory_scope:{anyOf:[{$ref:"#/$defs/MemoryScopeV1"},{type:"null"}]},min_trust:{format:"double",type:["number","null"]},project_selector:{additionalProperties:!1,description:'Exact registered-project selector. Reads and fact effects run against the\nselected project.\n\nInlined so every request schema advertises the closed selector contract\n(`required: ["project_id"]`, no additional properties) directly on its\n`project_selector` property instead of behind a `$defs` reference, matching\nthe selector shape the MCP dispatch policy promises for selector-accepting\ntools.',properties:{project_id:{$ref:"#/$defs/ProjectId"}},required:["project_id"],type:["object","null"]}},required:["entity"],title:"FactStoreProbeRequestV1",type:"object"},{$defs:{FactAssertionId:h3,FactCategoryV1:h9,FactCommitOwnerV1:h8,FactEventId:ye,FactId:yr,FactIdentitySourceResultV1:yi,FactSearchGraphCoverageV1:ya,FactSearchGraphDegradationV1:ys,FactSearchHitV1:yd,FactSearchScoresV1:yc,FactTelemetryV1:yp,FactV1:yu,LocatorDigest:gk,ProjectId:_m,ProvenanceId:_S,RetrievalAnchorId:_J,UtcMicros:bs},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{graph_coverage:{$ref:"#/$defs/FactSearchGraphCoverageV1"},hits:{items:{$ref:"#/$defs/FactSearchHitV1"},type:"array"},next_after:{description:"Opaque continuation, bound to this operation and request.",type:["string","null"]},owner:{$ref:"#/$defs/FactCommitOwnerV1"}},required:["owner","hits","graph_coverage"],title:"FactStoreProbeResultV1",type:"object"},{$defs:{FactCategoryV1:h9,MemoryScopeV1:gT,ProjectId:_m},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{after:{description:"The previous page's `next_after`, valid only with the same parameters.",type:["string","null"]},category:{anyOf:[{$ref:"#/$defs/FactCategoryV1"},{type:"null"}]},entities:{items:{type:"string"},minItems:1,type:"array"},limit:{format:"uint64",minimum:0,type:["integer","null"]},memory_scope:{anyOf:[{$ref:"#/$defs/MemoryScopeV1"},{type:"null"}]},min_trust:{format:"double",type:["number","null"]},project_selector:{additionalProperties:!1,description:'Exact registered-project selector. Reads and fact effects run against the\nselected project.\n\nInlined so every request schema advertises the closed selector contract\n(`required: ["project_id"]`, no additional properties) directly on its\n`project_selector` property instead of behind a `$defs` reference, matching\nthe selector shape the MCP dispatch policy promises for selector-accepting\ntools.',properties:{project_id:{$ref:"#/$defs/ProjectId"}},required:["project_id"],type:["object","null"]}},required:["entities"],title:"FactStoreReasonRequestV1",type:"object"},{$defs:{FactAssertionId:h3,FactCategoryV1:h9,FactCommitOwnerV1:h8,FactEventId:ye,FactId:yr,FactIdentitySourceResultV1:yi,FactSearchGraphCoverageV1:ya,FactSearchGraphDegradationV1:ys,FactSearchHitV1:yd,FactSearchScoresV1:yc,FactTelemetryV1:yp,FactV1:yu,LocatorDigest:gk,ProjectId:_m,ProvenanceId:_S,RetrievalAnchorId:_J,UtcMicros:bs},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{graph_coverage:{$ref:"#/$defs/FactSearchGraphCoverageV1"},hits:{items:{$ref:"#/$defs/FactSearchHitV1"},type:"array"},next_after:{description:"Opaque continuation, bound to this operation and request.",type:["string","null"]},owner:{$ref:"#/$defs/FactCommitOwnerV1"}},required:["owner","hits","graph_coverage"],title:"FactStoreReasonResultV1",type:"object"},{$defs:{FactCategoryV1:h9,MemoryScopeV1:gT,ProjectId:_m},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{after:{description:"The previous page's `next_after`, valid only with the same parameters.",type:["string","null"]},category:{anyOf:[{$ref:"#/$defs/FactCategoryV1"},{type:"null"}]},entity:{type:"string"},limit:{format:"uint64",minimum:0,type:["integer","null"]},memory_scope:{anyOf:[{$ref:"#/$defs/MemoryScopeV1"},{type:"null"}]},min_trust:{format:"double",type:["number","null"]},project_selector:{additionalProperties:!1,description:'Exact registered-project selector. Reads and fact effects run against the\nselected project.\n\nInlined so every request schema advertises the closed selector contract\n(`required: ["project_id"]`, no additional properties) directly on its\n`project_selector` property instead of behind a `$defs` reference, matching\nthe selector shape the MCP dispatch policy promises for selector-accepting\ntools.',properties:{project_id:{$ref:"#/$defs/ProjectId"}},required:["project_id"],type:["object","null"]}},required:["entity"],title:"FactStoreRelatedRequestV1",type:"object"},{$defs:{FactAssertionId:h3,FactCategoryV1:h9,FactCommitOwnerV1:h8,FactEventId:ye,FactId:yr,FactIdentitySourceResultV1:yi,FactSearchGraphCoverageV1:ya,FactSearchGraphDegradationV1:ys,FactSearchHitV1:yd,FactSearchScoresV1:yc,FactTelemetryV1:yp,FactV1:yu,LocatorDigest:gk,ProjectId:_m,ProvenanceId:_S,RetrievalAnchorId:_J,UtcMicros:bs},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{graph_coverage:{$ref:"#/$defs/FactSearchGraphCoverageV1"},hits:{items:{$ref:"#/$defs/FactSearchHitV1"},type:"array"},next_after:{description:"Opaque continuation, bound to this operation and request.",type:["string","null"]},owner:{$ref:"#/$defs/FactCommitOwnerV1"}},required:["owner","hits","graph_coverage"],title:"FactStoreRelatedResultV1",type:"object"},{$defs:{FactEventId:ye,FactId:yr,MemoryScopeV1:gT,ProjectId:_m},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{expected_last_event_id:{anyOf:[{$ref:"#/$defs/FactEventId"},{type:"null"}]},fact_id:{$ref:"#/$defs/FactId"},memory_scope:{anyOf:[{$ref:"#/$defs/MemoryScopeV1"},{type:"null"}]},project_selector:{additionalProperties:!1,description:'Exact registered-project selector. Reads and fact effects run against the\nselected project.\n\nInlined so every request schema advertises the closed selector contract\n(`required: ["project_id"]`, no additional properties) directly on its\n`project_selector` property instead of behind a `$defs` reference, matching\nthe selector shape the MCP dispatch policy promises for selector-accepting\ntools.',properties:{project_id:{$ref:"#/$defs/ProjectId"}},required:["project_id"],type:["object","null"]}},required:["fact_id"],title:"FactStoreRemoveRequestV1",type:"object"},{$defs:{FactAssertionId:h3,FactCategoryV1:h9,FactCommitDispositionV1:h5,FactCommitOwnerV1:h8,FactCommitReceiptV1:h7,FactEventId:ye,FactId:yr,FactIdentitySourceResultV1:yi,FactPayloadAccessV1:yo,FactProjectionV1:yn,FactStatusV1:yl,FactTelemetryV1:yp,FactV1:yu,LocatorDigest:gk,ProjectId:_m,ProvenanceId:_S,RetrievalAnchorId:_J,UtcMicros:bs},$schema:"https://json-schema.org/draft/2020-12/schema",oneOf:[{additionalProperties:!1,properties:{commit:{$ref:"#/$defs/FactCommitReceiptV1"},fact:{$ref:"#/$defs/FactProjectionV1"},outcome:{const:"removed",type:"string"},remaining_fact_count:{format:"uint64",minimum:0,type:"integer"}},required:["outcome","fact","remaining_fact_count","commit"],type:"object"},{additionalProperties:!1,properties:{fact:{$ref:"#/$defs/FactProjectionV1"},outcome:{const:"already_removed",type:"string"},remaining_fact_count:{format:"uint64",minimum:0,type:"integer"}},required:["outcome","fact","remaining_fact_count"],type:"object"}],title:"FactStoreRemoveResultV1"},{$defs:{FactCategoryV1:h9,MemoryScopeV1:gT,ProjectId:_m},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{after:{description:"The previous page's `next_after`, valid only with the same parameters.",type:["string","null"]},category:{anyOf:[{$ref:"#/$defs/FactCategoryV1"},{type:"null"}]},limit:{format:"uint64",minimum:0,type:["integer","null"]},memory_scope:{anyOf:[{$ref:"#/$defs/MemoryScopeV1"},{type:"null"}]},min_trust:{format:"double",type:["number","null"]},project_selector:{additionalProperties:!1,description:'Exact registered-project selector. Reads and fact effects run against the\nselected project.\n\nInlined so every request schema advertises the closed selector contract\n(`required: ["project_id"]`, no additional properties) directly on its\n`project_selector` property instead of behind a `$defs` reference, matching\nthe selector shape the MCP dispatch policy promises for selector-accepting\ntools.',properties:{project_id:{$ref:"#/$defs/ProjectId"}},required:["project_id"],type:["object","null"]},query:{type:"string"}},required:["query"],title:"FactStoreSearchRequestV1",type:"object"},{$defs:{FactAssertionId:h3,FactCategoryV1:h9,FactCommitOwnerV1:h8,FactEventId:ye,FactId:yr,FactIdentitySourceResultV1:yi,FactRetrievalTelemetryDegradationV1:{enum:["unavailable","saturated"],type:"string"},FactRetrievalTelemetryV1:{description:"Whether an explicit search recorded retrieval telemetry for its hits.\n\nThe telemetry write is recall bookkeeping, not part of the returned\nevidence: when only that lane is unavailable the search still delivers its\nresult and reports the degradation here instead of refusing the read.",oneOf:[{additionalProperties:!1,description:"The result had no hits, so there was nothing to record.",properties:{kind:{const:"not_applicable",type:"string"}},required:["kind"],type:"object"},{additionalProperties:!1,description:"The selected store is mounted read-only; recording is never attempted.",properties:{kind:{const:"read_only",type:"string"}},required:["kind"],type:"object"},{additionalProperties:!1,properties:{fact_count:{format:"uint",minimum:0,type:"integer"},kind:{const:"recorded",type:"string"}},required:["kind","fact_count"],type:"object"},{additionalProperties:!1,properties:{kind:{const:"degraded",type:"string"},reason:{$ref:"#/$defs/FactRetrievalTelemetryDegradationV1"}},required:["kind","reason"],type:"object"}]},FactSearchGraphCoverageV1:ya,FactSearchGraphDegradationV1:ys,FactSearchHitV1:yd,FactSearchScoresV1:yc,FactTelemetryV1:yp,FactV1:yu,LocatorDigest:gk,ProjectId:_m,ProvenanceId:_S,RetrievalAnchorId:_J,UtcMicros:bs},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Explicit search additionally records retrieval telemetry for its returned\nhits; `retrieval_telemetry` reports whether that recall bookkeeping\nhappened, so a served result can truthfully carry a degraded write lane.",properties:{graph_coverage:{$ref:"#/$defs/FactSearchGraphCoverageV1"},hits:{items:{$ref:"#/$defs/FactSearchHitV1"},type:"array"},next_after:{description:"Opaque continuation, bound to this operation and request.",type:["string","null"]},owner:{$ref:"#/$defs/FactCommitOwnerV1"},retrieval_telemetry:{$ref:"#/$defs/FactRetrievalTelemetryV1"}},required:["owner","hits","graph_coverage","retrieval_telemetry"],title:"FactStoreSearchResultV1",type:"object"},{$defs:{FactEventId:ye,FactId:yr,MemoryScopeV1:gT,ProjectId:_m},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Mark `fact_id` as superseded by `superseded_by`. The old fact leaves the\ndefault retrieval surfaces but stays readable by id through its history;\npayload and trust are never rewritten.",properties:{expected_last_event_id:{anyOf:[{$ref:"#/$defs/FactEventId"},{type:"null"}]},fact_id:{$ref:"#/$defs/FactId"},memory_scope:{anyOf:[{$ref:"#/$defs/MemoryScopeV1"},{type:"null"}]},project_selector:{additionalProperties:!1,description:'Exact registered-project selector. Reads and fact effects run against the\nselected project.\n\nInlined so every request schema advertises the closed selector contract\n(`required: ["project_id"]`, no additional properties) directly on its\n`project_selector` property instead of behind a `$defs` reference, matching\nthe selector shape the MCP dispatch policy promises for selector-accepting\ntools.',properties:{project_id:{$ref:"#/$defs/ProjectId"}},required:["project_id"],type:["object","null"]},superseded_by:{$ref:"#/$defs/FactId"}},required:["fact_id","superseded_by"],title:"FactStoreSupersedeRequestV1",type:"object"},{$defs:{FactAssertionId:h3,FactCommitDispositionV1:h5,FactCommitOwnerV1:h8,FactCommitReceiptV1:h7,FactEventId:ye,FactId:yr,ProjectId:_m},$schema:"https://json-schema.org/draft/2020-12/schema",description:"Outcome of an explicit supersession. `superseded` carries the durable\ncommit receipt of the `Curated { SupersededBy }` lineage event;\n`already_superseded` reports the successor already recorded for the fact.",oneOf:[{additionalProperties:!1,properties:{commit:{$ref:"#/$defs/FactCommitReceiptV1"},fact_id:{$ref:"#/$defs/FactId"},outcome:{const:"superseded",type:"string"},superseded_by:{$ref:"#/$defs/FactId"}},required:["outcome","fact_id","superseded_by","commit"],type:"object"},{additionalProperties:!1,properties:{fact_id:{$ref:"#/$defs/FactId"},outcome:{const:"already_superseded",type:"string"},superseded_by:{$ref:"#/$defs/FactId"}},required:["outcome","fact_id","superseded_by"],type:"object"}],title:"FactStoreSupersedeResultV1"},{$defs:{FactCategoryV1:h9,FactEventId:ye,FactId:yr,FactSourceLabelPatchV1:{oneOf:[{additionalProperties:!1,properties:{kind:{const:"set",type:"string"},value:{type:"string"}},required:["kind","value"],type:"object"},{additionalProperties:!1,properties:{kind:{const:"clear",type:"string"}},required:["kind"],type:"object"}]},MemoryScopeV1:gT,ProjectId:_m},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{category:{anyOf:[{$ref:"#/$defs/FactCategoryV1"},{type:"null"}]},content:{type:["string","null"]},entities:{items:{type:"string"},type:["array","null"]},expected_last_event_id:{anyOf:[{$ref:"#/$defs/FactEventId"},{type:"null"}]},fact_id:{$ref:"#/$defs/FactId"},memory_scope:{anyOf:[{$ref:"#/$defs/MemoryScopeV1"},{type:"null"}]},metadata:{additionalProperties:!0,type:["object","null"]},project_selector:{additionalProperties:!1,description:'Exact registered-project selector. Reads and fact effects run against the\nselected project.\n\nInlined so every request schema advertises the closed selector contract\n(`required: ["project_id"]`, no additional properties) directly on its\n`project_selector` property instead of behind a `$defs` reference, matching\nthe selector shape the MCP dispatch policy promises for selector-accepting\ntools.',properties:{project_id:{$ref:"#/$defs/ProjectId"}},required:["project_id"],type:["object","null"]},source_label:{anyOf:[{$ref:"#/$defs/FactSourceLabelPatchV1"},{type:"null"}]},tags:{items:{type:"string"},type:["array","null"]},trust:{format:"double",type:["number","null"]}},required:["fact_id"],title:"FactStoreUpdateRequestV1",type:"object"},{$defs:{FactAssertionId:h3,FactCategoryV1:h9,FactCommitDispositionV1:h5,FactCommitOwnerV1:h8,FactCommitReceiptV1:h7,FactEventId:ye,FactId:yr,FactIdentitySourceResultV1:yi,FactPayloadAccessV1:yo,FactProjectionV1:yn,FactStatusV1:yl,FactTelemetryV1:yp,FactV1:yu,LocatorDigest:gk,ProjectId:_m,ProvenanceId:_S,RetrievalAnchorId:_J,UtcMicros:bs},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{commit:{$ref:"#/$defs/FactCommitReceiptV1"},fact:{$ref:"#/$defs/FactProjectionV1"},trust_delta_millionths:{format:"int32",type:"integer"}},required:["fact","trust_delta_millionths","commit"],title:"FactStoreUpdateResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Explicit advisory-cycle trigger for one document in the admitted project.",properties:{document_uri:{type:"string"}},required:["document_uri"],title:"FeedbackAdvisoryCycleSurfaceRequestV1",type:"object"},{$defs:{AgentInstanceId:mH,CodeGenerationId:fz,CommitId:fX,DiagnosticSeverityV1:hH,FeedbackAdvisoryCycleWireV1:{additionalProperties:!1,description:"One canonical cycle result plus whether its durable publication committed.\n\n`published` intentionally remains adjacent to the cycle fields on the\nwire: publication is a property of this exact cycle, not of a page or a\nlater lookup.",properties:{advisory_only:{type:"boolean"},advisory_provider_states:{items:{$ref:"#/$defs/FeedbackAdvisoryProviderStateV1"},type:"array"},affected_tests_state:{anyOf:[{$ref:"#/$defs/FeedbackImpactStateV1"},{type:"null"}]},baseline_states:{items:{$ref:"#/$defs/FeedbackBaselineStateV1"},type:"array"},configuration_digest:{$ref:"#/$defs/ManifestDigest"},content_identity:{anyOf:[{$ref:"#/$defs/FeedbackContentIdentityV1"},{type:"null"}]},cycle_id:{$ref:"#/$defs/FeedbackCycleId"},durability:{$ref:"#/$defs/FeedbackDurabilityV1"},findings:{items:{$ref:"#/$defs/FeedbackFindingV1"},type:"array"},impact:{anyOf:[{$ref:"#/$defs/FeedbackImpactV1"},{type:"null"}]},impact_state:{anyOf:[{$ref:"#/$defs/FeedbackImpactStateV1"},{type:"null"}]},omitted_findings:{format:"uint64",minimum:0,type:"integer"},policy_digest:{$ref:"#/$defs/ManifestDigest"},provider_states:{items:{$ref:"#/$defs/ProviderEvaluationStateV1"},type:"array"},published:{type:"boolean"},result_id:{$ref:"#/$defs/FeedbackResultId"},returned_findings:{format:"uint64",minimum:0,type:"integer"},scope:{$ref:"#/$defs/FeedbackScopeV1"},termination:{$ref:"#/$defs/FeedbackCycleTerminationV1"},total_findings:{format:"uint64",minimum:0,type:"integer"}},required:["result_id","cycle_id","scope","durability","policy_digest","configuration_digest","termination","provider_states","baseline_states","findings","total_findings","returned_findings","omitted_findings","advisory_only","published"],type:"object"},FeedbackAdvisoryFindingHandleV1:{additionalProperties:!1,description:"One daemon-minted read-handle pair for a finding in the published cycle.",properties:{expansion_handle:{type:["string","null"]},finding_id:{$ref:"#/$defs/FeedbackFindingId"},get_handle:{type:"string"},retrieval_anchor_id:{anyOf:[{$ref:"#/$defs/RetrievalAnchorId"},{type:"null"}]}},required:["finding_id","get_handle"],type:"object"},FeedbackAdvisoryProviderStateV1:ym,FeedbackAdvisoryReadHandlesV1:{additionalProperties:!1,description:"Daemon-minted handles for reads over this exact publication.",properties:{affected_tests_handle:{type:"string"},diagnostics_handle:{type:"string"},impact_handle:{type:"string"},list_handle:{type:"string"}},required:["diagnostics_handle","impact_handle","affected_tests_handle","list_handle"],type:"object"},FeedbackBaselineStateV1:yf,FeedbackContentIdentityV1:yh,FeedbackCycleId:yy,FeedbackCycleTerminationV1:yg,FeedbackDiagnosticClassificationV1:y_,FeedbackDiagnosticProducerV1:yv,FeedbackDiagnosticProjectionV1:yb,FeedbackDurabilityV1:y$,FeedbackFindingId:yS,FeedbackFindingLifecycleV1:yk,FeedbackFindingV1:yV,FeedbackImpactStateV1:yP,FeedbackImpactV1:yR,FeedbackResultId:yq,FeedbackScopeV1:yI,FeedbackTargetV1:yx,FileOccurrenceId:yj,HostInstanceId:ge,ManifestDigest:gj,ProjectId:_m,ProviderEvaluationStateV1:_k,RepositoryId:_z,RetrievalAnchorId:_J,SessionId:vv,SourceSpan:vF,SymbolOccurrenceId:vJ,WorktreeId:So},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Exact advisory-cycle payload serialized by the mounted daemon route.",properties:{cycle:{$ref:"#/$defs/FeedbackAdvisoryCycleWireV1"},finding_handles:{items:{$ref:"#/$defs/FeedbackAdvisoryFindingHandleV1"},type:"array"},read_handles:{anyOf:[{$ref:"#/$defs/FeedbackAdvisoryReadHandlesV1"},{type:"null"}]}},required:["cycle","finding_handles"],title:"FeedbackAdvisoryCycleSurfaceResultV1",type:"object"},{$defs:{AgentInstanceId:mH,CodeGenerationId:fz,CommitId:fX,DiagnosticSeverityV1:hH,FeedbackAdvisoryProviderStateV1:ym,FeedbackBaselineStateV1:yf,FeedbackContentIdentityV1:yh,FeedbackCycleId:yy,FeedbackCycleResultV1:{additionalProperties:!1,description:"One deterministic result for one trigger. The result represents a\nterminal advisory evaluation and contains no next-action execution hook.",properties:{advisory_only:{type:"boolean"},advisory_provider_states:{items:{$ref:"#/$defs/FeedbackAdvisoryProviderStateV1"},type:"array"},affected_tests_state:{anyOf:[{$ref:"#/$defs/FeedbackImpactStateV1"},{type:"null"}]},baseline_states:{items:{$ref:"#/$defs/FeedbackBaselineStateV1"},type:"array"},configuration_digest:{$ref:"#/$defs/ManifestDigest"},content_identity:{anyOf:[{$ref:"#/$defs/FeedbackContentIdentityV1"},{type:"null"}]},cycle_id:{$ref:"#/$defs/FeedbackCycleId"},durability:{$ref:"#/$defs/FeedbackDurabilityV1"},findings:{items:{$ref:"#/$defs/FeedbackFindingV1"},type:"array"},impact:{anyOf:[{$ref:"#/$defs/FeedbackImpactV1"},{type:"null"}]},impact_state:{anyOf:[{$ref:"#/$defs/FeedbackImpactStateV1"},{type:"null"}]},omitted_findings:{format:"uint64",minimum:0,type:"integer"},policy_digest:{$ref:"#/$defs/ManifestDigest"},provider_states:{items:{$ref:"#/$defs/ProviderEvaluationStateV1"},type:"array"},result_id:{$ref:"#/$defs/FeedbackResultId"},returned_findings:{format:"uint64",minimum:0,type:"integer"},scope:{$ref:"#/$defs/FeedbackScopeV1"},termination:{$ref:"#/$defs/FeedbackCycleTerminationV1"},total_findings:{format:"uint64",minimum:0,type:"integer"}},required:["result_id","cycle_id","scope","durability","policy_digest","configuration_digest","termination","provider_states","baseline_states","findings","total_findings","returned_findings","omitted_findings","advisory_only"],type:"object"},FeedbackCycleTerminationV1:yg,FeedbackDiagnosticClassificationV1:y_,FeedbackDiagnosticProducerV1:yv,FeedbackDiagnosticProjectionV1:yb,FeedbackDurabilityV1:y$,FeedbackFindingId:yS,FeedbackFindingLifecycleV1:yk,FeedbackFindingV1:yV,FeedbackImpactStateV1:yP,FeedbackImpactV1:yR,FeedbackResultId:yq,FeedbackScopeV1:yI,FeedbackTargetV1:yx,FileOccurrenceId:yj,HostInstanceId:ge,ManifestDigest:gj,ProjectId:_m,ProviderEvaluationStateV1:_k,RepositoryId:_z,RetrievalAnchorId:_J,SessionId:vv,SourceSpan:vF,SymbolOccurrenceId:vJ,WorktreeId:So},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{cycle:{$ref:"#/$defs/FeedbackCycleResultV1"}},required:["cycle"],title:"FeedbackDiagnosticsReadResultV1",type:"object"},{$defs:{AnchorExpandResult:{additionalProperties:!1,properties:{anchors:{items:{$ref:"#/$defs/RetrievalAnchorId"},type:"array"}},required:["anchors"],type:"object"},CommitId:fX,DiagnosticSeverityV1:hH,FeedbackCycleId:yy,FeedbackDiagnosticClassificationV1:y_,FeedbackDiagnosticProducerV1:yv,FeedbackDiagnosticProjectionV1:yb,FeedbackFindingId:yS,FeedbackFindingLifecycleV1:yk,FeedbackFindingReadV1:yw,FeedbackFindingV1:yV,FeedbackResultId:yq,FeedbackScopeV1:yI,FileOccurrenceId:yj,ProjectId:_m,ProviderEvaluationStateV1:_k,RepositoryId:_z,RetrievalAnchorId:_J,SourceSpan:vF,SymbolOccurrenceId:vJ,WorktreeId:So},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{expansion:{$ref:"#/$defs/AnchorExpandResult"},finding:{$ref:"#/$defs/FeedbackFindingReadV1"}},required:["finding","expansion"],title:"FeedbackExpandResultV1",type:"object"},{$defs:{CommitId:fX,DiagnosticSeverityV1:hH,FeedbackCycleId:yy,FeedbackDiagnosticClassificationV1:y_,FeedbackDiagnosticProducerV1:yv,FeedbackDiagnosticProjectionV1:yb,FeedbackFindingId:yS,FeedbackFindingLifecycleV1:yk,FeedbackFindingReadV1:yw,FeedbackFindingV1:yV,FeedbackResultId:yq,FeedbackScopeV1:yI,FileOccurrenceId:yj,ProjectId:_m,ProviderEvaluationStateV1:_k,RepositoryId:_z,RetrievalAnchorId:_J,SourceSpan:vF,SymbolOccurrenceId:vJ,WorktreeId:So},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{finding:{$ref:"#/$defs/FeedbackFindingReadV1"}},required:["finding"],title:"FeedbackGetResultV1",type:"object"},{$defs:{AgentInstanceId:mH,CodeGenerationId:fz,CommitId:fX,FeedbackContentIdentityV1:yh,FeedbackCycleId:yy,FeedbackImpactStateV1:yP,FeedbackImpactV1:yR,FeedbackResultId:yq,FeedbackScopeV1:yI,FeedbackTargetV1:yx,FileOccurrenceId:yj,HostInstanceId:ge,ManifestDigest:gj,ProjectId:_m,RepositoryId:_z,RetrievalAnchorId:_J,SessionId:vv,SourceSpan:vF,SymbolOccurrenceId:vJ,WorktreeId:So},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Canonical impact projection returned by `feedback_impact`.\n\nThe daemon-side projection owner (usecases) re-exports this type; it lives\nhere so the catalog contribution can register its schema body as the single\nRust-owned wire authority. Results project from an authorized completed\ncycle, and the canonical response wire remains consumable by typed SDKs.",properties:{content_identity:{anyOf:[{$ref:"#/$defs/FeedbackContentIdentityV1"},{type:"null"}]},cycle_id:{$ref:"#/$defs/FeedbackCycleId"},impact:{anyOf:[{$ref:"#/$defs/FeedbackImpactV1"},{type:"null"}]},result_id:{$ref:"#/$defs/FeedbackResultId"},scope:{$ref:"#/$defs/FeedbackScopeV1"},state:{anyOf:[{$ref:"#/$defs/FeedbackImpactStateV1"},{type:"null"}]}},required:["result_id","cycle_id","scope"],title:"CanonicalFeedbackImpactProjectionV1",type:"object"},{$defs:{CommitId:fX,DiagnosticSeverityV1:hH,FeedbackCycleId:yy,FeedbackDiagnosticClassificationV1:y_,FeedbackDiagnosticProducerV1:yv,FeedbackDiagnosticProjectionV1:yb,FeedbackFindingId:yS,FeedbackFindingLifecycleV1:yk,FeedbackFindingReadV1:yw,FeedbackFindingV1:yV,FeedbackResultId:yq,FeedbackScopeV1:yI,FileOccurrenceId:yj,ProjectId:_m,ProviderEvaluationStateV1:_k,RepositoryId:_z,RetrievalAnchorId:_J,SourceSpan:vF,SymbolOccurrenceId:vJ,WorktreeId:So},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{findings:{items:{$ref:"#/$defs/FeedbackFindingReadV1"},type:"array"}},required:["findings"],title:"FeedbackListResultV1",type:"object"},{$defs:{UtcMicros:bs},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{observed_at:{$ref:"#/$defs/UtcMicros"}},required:["observed_at"],title:"FeedbackProximityReadRequestV1",type:"object"},{$defs:{AgentInstanceId:mH,CodeGenerationId:fz,CommitId:fX,FeedbackProximityAccessKindV1:{enum:["read","write"],type:"string"},FeedbackProximityCloneHandleV1:{additionalProperties:!1,properties:{retrieval_anchor_ids:{items:{$ref:"#/$defs/RetrievalAnchorId"},type:"array"},source_generation:{$ref:"#/$defs/CodeGenerationId"},source_symbol:{$ref:"#/$defs/SymbolOccurrenceId"}},required:["source_generation","source_symbol","retrieval_anchor_ids"],type:"object"},FeedbackProximityConflictDifferenceV1:{additionalProperties:!1,properties:{difference_digest:{$ref:"#/$defs/ManifestDigest"},file:{$ref:"#/$defs/FileOccurrenceId"},span:{$ref:"#/$defs/SourceSpan"}},required:["file","span","difference_digest"],type:"object"},FeedbackProximityConflictHandleV1:{additionalProperties:!1,properties:{common_base_revision:{$ref:"#/$defs/CommitId"},differences:{items:{$ref:"#/$defs/FeedbackProximityConflictDifferenceV1"},type:"array"},evidence_digest:{$ref:"#/$defs/ManifestDigest"},left_head_revision:{$ref:"#/$defs/CommitId"},right_head_revision:{$ref:"#/$defs/CommitId"}},required:["common_base_revision","left_head_revision","right_head_revision","evidence_digest","differences"],type:"object"},FeedbackProximityEncounterV1:{additionalProperties:!1,properties:{coverage:{$ref:"#/$defs/ProximityCoverageV1"},encounter_id:{$ref:"#/$defs/ManifestDigest"},expires_at:{$ref:"#/$defs/UtcMicros"},interval:{$ref:"#/$defs/FeedbackProximityIntervalV1"},observed_at:{$ref:"#/$defs/UtcMicros"},participants:{items:{$ref:"#/$defs/FeedbackProximityParticipantV1"},type:"array"},relation:{$ref:"#/$defs/FeedbackProximityRelationV1"},scope:{$ref:"#/$defs/FeedbackScopeV1"}},required:["encounter_id","scope","interval","participants","relation","observed_at","expires_at","coverage"],type:"object"},FeedbackProximityIntervalV1:{additionalProperties:!1,properties:{end:{$ref:"#/$defs/UtcMicros"},start:{$ref:"#/$defs/UtcMicros"}},required:["start","end"],type:"object"},FeedbackProximityOmissionV1:{enum:["active_session_limit","session_activity_limit","recent_observation_limit","edited_path_limit","encounter_limit","missing_participant_observation","missing_participant_worktree","missing_participant_revision","missing_code_address","clone_coverage_partial","conflict_evidence_unavailable","code_index_revision_mismatch"],type:"string"},FeedbackProximityParticipantV1:{additionalProperties:!1,properties:{access:{$ref:"#/$defs/FeedbackProximityAccessKindV1"},activity:{$ref:"#/$defs/FeedbackProximityIntervalV1"},address:{$ref:"#/$defs/ProximityAddressV1"},agent_id:{$ref:"#/$defs/AgentInstanceId"},branch_ref:{anyOf:[{$ref:"#/$defs/RefId"},{type:"null"}]},head_revision:{anyOf:[{$ref:"#/$defs/CommitId"},{type:"null"}]},source:{$ref:"#/$defs/ObservationSourceIdentityV1"},worktree_id:{anyOf:[{$ref:"#/$defs/WorktreeId"},{type:"null"}]},worktree_root:{type:"string"}},required:["source","agent_id","worktree_root","access","activity","address"],type:"object"},FeedbackProximityReadPageV1:{additionalProperties:!1,properties:{encounters:{items:{$ref:"#/$defs/FeedbackProximityEncounterV1"},type:"array"},expires_at:{$ref:"#/$defs/UtcMicros"},observed_at:{$ref:"#/$defs/UtcMicros"},scope:{$ref:"#/$defs/FeedbackScopeV1"},source_generation:{$ref:"#/$defs/CodeGenerationId"}},required:["scope","source_generation","observed_at","expires_at","encounters"],type:"object"},FeedbackProximityRelationV1:{oneOf:[{additionalProperties:!1,properties:{relation_kind:{const:"code_neighborhood_candidate",type:"string"},warning_class:{$ref:"#/$defs/ProximityWarningClassV1"}},required:["relation_kind","warning_class"],type:"object"},{additionalProperties:!1,properties:{clone_handle:{$ref:"#/$defs/FeedbackProximityCloneHandleV1"},relation_kind:{const:"shared_code_candidate",type:"string"},warning_class:{$ref:"#/$defs/ProximityWarningClassV1"}},required:["relation_kind","warning_class","clone_handle"],type:"object"},{additionalProperties:!1,properties:{relation_kind:{const:"overlapping_edit",type:"string"},warning_class:{$ref:"#/$defs/ProximityWarningClassV1"}},required:["relation_kind","warning_class"],type:"object"},{additionalProperties:!1,properties:{conflict_handle:{$ref:"#/$defs/FeedbackProximityConflictHandleV1"},relation_kind:{const:"confirmed_conflict",type:"string"}},required:["relation_kind","conflict_handle"],type:"object"}]},FeedbackScopeV1:yI,FileOccurrenceId:yj,ManifestDigest:gj,ObservationSourceIdentityV1:g3,ProjectId:_m,ProviderId:_w,ProximityAddressV1:{additionalProperties:!1,description:"A privacy-scoped code address. It identifies the coarse changed-code shape\nbut carries no other actor, session, or private-source content.",properties:{file:{$ref:"#/$defs/FileOccurrenceId"},scope:{$ref:"#/$defs/FeedbackScopeV1"},span:{anyOf:[{$ref:"#/$defs/SourceSpan"},{type:"null"}]},symbol:{anyOf:[{$ref:"#/$defs/SymbolOccurrenceId"},{type:"null"}]}},required:["scope","file"],type:"object"},ProximityCoverageV1:{enum:["complete","partial","stale","unavailable","denied","private"],type:"string"},ProximityWarningClassV1:{enum:["same_file","overlapping_range","same_symbol","same_package","same_crate","neighborhood","shared_caller","shared_dependency","shared_test","incompatible_branch_worktree"],type:"string"},RefId:_T,RepositoryId:_z,RetrievalAnchorId:_J,SessionId:vv,SourceSpan:vF,SymbolOccurrenceId:vJ,UtcMicros:bs,WorktreeId:So},$schema:"https://json-schema.org/draft/2020-12/schema",oneOf:[{additionalProperties:!1,properties:{page:{$ref:"#/$defs/FeedbackProximityReadPageV1"},state:{const:"complete",type:"string"}},required:["state","page"],type:"object"},{additionalProperties:!1,properties:{page:{$ref:"#/$defs/FeedbackProximityReadPageV1"},state:{const:"complete_zero",type:"string"}},required:["state","page"],type:"object"},{additionalProperties:!1,properties:{omissions:{items:{$ref:"#/$defs/FeedbackProximityOmissionV1"},type:"array"},page:{$ref:"#/$defs/FeedbackProximityReadPageV1"},state:{const:"partial",type:"string"}},required:["state","page","omissions"],type:"object"},{additionalProperties:!1,properties:{omissions:{items:{$ref:"#/$defs/FeedbackProximityOmissionV1"},type:"array"},page:{$ref:"#/$defs/FeedbackProximityReadPageV1"},state:{const:"stale",type:"string"}},required:["state","page","omissions"],type:"object"},{additionalProperties:!1,properties:{observed_at:{$ref:"#/$defs/UtcMicros"},state:{const:"denied",type:"string"}},required:["state","observed_at"],type:"object"},{additionalProperties:!1,properties:{observed_at:{$ref:"#/$defs/UtcMicros"},state:{const:"unavailable",type:"string"}},required:["state","observed_at"],type:"object"}],title:"FeedbackProximityReadResultV1"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{field:{description:"Field name. Bare name ('last_sync_at') matches across structs;\nqualified form ('GraphStats::last_sync_at') narrows to one struct's\nfield.",type:"string"},limit:{description:"Maximum sites per kind (default: 200, max: 2000).",format:"uint32",minimum:0,type:["integer","null"]},writes_only:{description:"When true, returns only write_sites and omits reads. Default false.",type:["boolean","null"]}},required:["field"],title:"FieldSitesSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fF,CodeIndexConvergenceParkedV1:fL,CodeIndexStalenessStateV1:fB,FieldSiteV1:{additionalProperties:!1,properties:{enclosing:{type:["string","null"]},file:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},snippet:{type:"string"}},required:["file","line","snippet"],type:"object"},PrimitiveFreshnessStateV1:_i,PrimitiveIndexingStateV1:_o,PrimitiveSearchFreshnessV1:_d},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"`read_count` and `read_sites` are absent when the request asked for\nwrites only.",properties:{field:{type:"string"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},qualifier:{type:["string","null"]},qualifier_applied:{type:"boolean"},read_count:{format:"uint64",minimum:0,type:["integer","null"]},read_sites:{items:{$ref:"#/$defs/FieldSiteV1"},type:["array","null"]},write_count:{format:"uint64",minimum:0,type:"integer"},write_sites:{items:{$ref:"#/$defs/FieldSiteV1"},type:"array"}},required:["field","qualifier_applied","write_count","write_sites"],title:"FieldSitesResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{file:{type:"string"}},required:["file"],title:"FileDependentsPrimitiveRequest",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{dependent_files:{items:{type:"string"},type:"array"},file:{type:"string"}},required:["file","dependent_files"],title:"FileDependentsPrimitiveResult",type:"object"},{$defs:{FilesLayoutV1:yC},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{layout:{anyOf:[{$ref:"#/$defs/FilesLayoutV1"},{type:"null"}],description:"File listing layout: flat (one per line) or grouped by directory\n(default: grouped)."},path:{description:"Filter to files under this directory path.",type:["string","null"]},pattern:{description:"Filter files matching this glob pattern (e.g. '**/*.rs').",type:["string","null"]}},title:"FilesSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fF,CodeIndexConvergenceParkedV1:fL,CodeIndexOmittedSourceV1:fU,CodeIndexOmittedSourcesV1:fH,CodeIndexSourceOmissionReasonV1:fG,CodeIndexStalenessStateV1:fB,FilesLayoutV1:yC,IndexedFileV1:{additionalProperties:!1,properties:{bytes:{format:"uint64",minimum:0,type:"integer"},path:{type:"string"},symbols:{format:"uint64",minimum:0,type:"integer"}},required:["path","symbols","bytes"],type:"object"},PrimitiveFreshnessStateV1:_i,PrimitiveIndexingStateV1:_o,PrimitiveSearchFreshnessV1:_d},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{count:{format:"uint",minimum:0,type:"integer"},files:{items:{$ref:"#/$defs/IndexedFileV1"},type:"array"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},layout:{$ref:"#/$defs/FilesLayoutV1"},worktree_omitted_sources:{anyOf:[{$ref:"#/$defs/CodeIndexOmittedSourcesV1"},{type:"null"}],description:"Sources the serving snapshot captured for the whole worktree but does\nnot index, unfiltered by `path` or `pattern`."}},required:["count","layout","files"],title:"FilesResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{lazy_index_ignored_dependencies:{description:"Opt in to bounded indexing of ignored dependency entry files when an\nimport hint matches (default: false).",type:["boolean","null"]},limit:{description:"Maximum matches to return (default: 20, max: 200).",format:"uint32",minimum:0,type:["integer","null"]},name:{description:"Exact bare symbol name (no `::`, no glob).",type:"string"}},required:["name"],title:"FindExactSymbolSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fF,CodeIndexConvergenceParkedV1:fL,CodeIndexStalenessStateV1:fB,FindExactSymbolMatchV1:{additionalProperties:!1,properties:{file:{type:"string"},id:{type:"string"},kind:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},name:{type:"string"},qualified_name:{type:"string"},signature:{type:["string","null"]}},required:["id","name","qualified_name","kind","file","line"],type:"object"},PrimitiveFreshnessStateV1:_i,PrimitiveIndexingStateV1:_o,PrimitiveSearchFreshnessV1:_d},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{count:{format:"uint64",minimum:0,type:"integer"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},matches:{items:{$ref:"#/$defs/FindExactSymbolMatchV1"},type:"array"},name:{type:"string"},suggestions:{description:"Nearest indexed bare names when `count` is 0. Empty when the query\nmatched, or when it is not itself a bare identifier.",items:{type:"string"},type:"array"}},required:["name","count","matches"],title:"FindExactSymbolResultV1",type:"object"},{$defs:{GiniMetricV1:yA,GiniScopeV1:yW},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{limit:{description:"Number of top outliers to return (default: 10, at most 100).",format:"uint32",minimum:0,type:["integer","null"]},metric:{anyOf:[{$ref:"#/$defs/GiniMetricV1"},{type:"null"}],description:"Metric to measure inequality for (default: complexity)."},path:{description:"Filter to files under this directory path.",type:["string","null"]},scope:{anyOf:[{$ref:"#/$defs/GiniScopeV1"},{type:"null"}],description:"Aggregate per file or per symbol (default: file)."}},title:"GiniSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fF,CodeIndexConvergenceParkedV1:fL,CodeIndexStalenessStateV1:fB,GiniMetricV1:yA,GiniOutlierV1:{additionalProperties:!1,properties:{name:{type:"string"},pct_of_max:{format:"double",type:"number"},value:{format:"double",type:"number"}},required:["name","value","pct_of_max"],type:"object"},GiniScopeV1:yW,PrimitiveFreshnessStateV1:_i,PrimitiveIndexingStateV1:_o,PrimitiveSearchFreshnessV1:_d},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},gini:{format:"double",type:"number"},incomplete_complexity_symbols:{description:"Symbols left out because their bounded complexity walk did not cover\nthe body; their counters are lower bounds and measure nothing here.",format:"uint64",minimum:0,type:"integer"},interpretation:{type:"string"},metric:{$ref:"#/$defs/GiniMetricV1"},outliers:{items:{$ref:"#/$defs/GiniOutlierV1"},type:"array"},scope:{$ref:"#/$defs/GiniScopeV1"},total_items:{format:"uint64",minimum:0,type:"integer"}},required:["gini","interpretation","total_items","metric","scope","incomplete_complexity_symbols","outliers"],title:"GiniResultV1",type:"object"},{$defs:{GitIndexPreviewId:yB,ManifestDigest:gj},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Public MCP/CLI request to apply one immutable Git index preview.",properties:{idempotency_key:{type:"string"},preview_digest:{$ref:"#/$defs/ManifestDigest"},preview_id:{$ref:"#/$defs/GitIndexPreviewId"}},required:["preview_id","preview_digest","idempotency_key"],title:"GitApplySurfaceRequest",type:"object"},{$defs:{GitIndexPreviewId:yB,GitIndexReceiptId:{description:"Strongly typed canonical identity: `GitIndexReceiptId`.",type:"string"},GitIndexReceiptOutcomeV1:{description:"Terminal outcome a recovery record can prove without re-running a native\nmutation.",enum:["committed","aborted_no_change","needs_inspection"],type:"string"},GitIndexTransactionId:{description:"Strongly typed canonical identity: `GitIndexTransactionId`.",type:"string"},GitIndexTransactionOperationV1:yK,GitOidV1:yJ,ManifestDigest:gj,UtcMicros:bs},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Durable, integrity-protected receipt for one Git index transaction.",properties:{committed_at:{$ref:"#/$defs/UtcMicros"},final_snapshot_captured:{description:"Whether `final_snapshot_digest`, `new_index_tree`, and `new_head` came\nfrom a post-outcome native observation. An unavailable observation is\nvalid only for a terminal outcome that does not claim a commit.",type:"boolean"},final_snapshot_digest:{$ref:"#/$defs/ManifestDigest",description:"Digest of a snapshot that was actually captured after the terminal\nobservation. When `final_snapshot_captured` is false this retains the\nexpected snapshot digest only as a stable schema placeholder; callers\nmust not treat it as an observation."},new_head:{anyOf:[{$ref:"#/$defs/GitOidV1"},{type:"null"}]},new_index_tree:{anyOf:[{$ref:"#/$defs/GitOidV1"},{type:"null"}]},old_head:{anyOf:[{$ref:"#/$defs/GitOidV1"},{type:"null"}]},old_index_tree:{anyOf:[{$ref:"#/$defs/GitOidV1"},{type:"null"}]},old_snapshot_digest:{$ref:"#/$defs/ManifestDigest"},operation:{$ref:"#/$defs/GitIndexTransactionOperationV1"},outcome:{$ref:"#/$defs/GitIndexReceiptOutcomeV1"},preview_id:{$ref:"#/$defs/GitIndexPreviewId"},receipt_digest:{$ref:"#/$defs/ManifestDigest"},receipt_id:{$ref:"#/$defs/GitIndexReceiptId"},selected_hunk_digests:{items:{$ref:"#/$defs/ManifestDigest"},type:"array"},transaction_id:{$ref:"#/$defs/GitIndexTransactionId"}},required:["receipt_id","transaction_id","preview_id","operation","old_snapshot_digest","final_snapshot_digest","final_snapshot_captured","selected_hunk_digests","outcome","committed_at","receipt_digest"],title:"GitIndexTransactionReceiptV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Request shape for the public `git_blame` surface.",properties:{follow_renames:{default:!1,type:"boolean"},max_bytes:{format:"uint64",minimum:0,type:["integer","null"]},max_entries:{format:"uint32",minimum:0,type:["integer","null"]},path:{type:"string"}},required:["path"],title:"GitBlameSurfaceRequest",type:"object"},{$defs:{GitBlameAvailabilityV1:{description:"Why blame/line provenance is unavailable for a path.",enum:["available","path_not_tracked","unborn_branch","binary_file"],type:"string"},GitBlameLineV1:{additionalProperties:!1,description:"Line provenance for one final (current) line.",properties:{author:{$ref:"#/$defs/GitCommitIdentityV1"},boundary:{description:"True when the origin commit is a history boundary (e.g. shallow root).",type:"boolean"},commit:{$ref:"#/$defs/GitOidV1"},final_line:{description:"1-based line number in the blamed revision.",format:"uint32",minimum:0,type:"integer"},origin_line:{description:"1-based line number in the origin commit.",format:"uint32",minimum:0,type:"integer"},previous:{anyOf:[{$ref:"#/$defs/GitBlamePreviousV1"},{type:"null"}]}},required:["final_line","origin_line","commit","author","boundary"],type:"object"},GitBlamePreviousV1:{additionalProperties:!1,description:"Rename-following evidence for one blamed line (`previous` record).",properties:{commit:{$ref:"#/$defs/GitOidV1"},path:{type:"string"}},required:["commit","path"],type:"object"},GitBlameV1:{additionalProperties:!1,description:"Typed blame result: per-line provenance plus boundary, rename-following,\nand unavailable states.",properties:{availability:{$ref:"#/$defs/GitBlameAvailabilityV1"},coverage:{$ref:"#/$defs/GitCoverageV1"},lines:{items:{$ref:"#/$defs/GitBlameLineV1"},type:"array"},path:{type:"string"},repository:{$ref:"#/$defs/RepositoryId"}},required:["repository","path","lines","availability","coverage"],type:"object"},GitBlobExpectationV1:yM,GitChangeKindV1:{description:"Native change kind for one side (index or worktree) of a status entry,\nor for a whole-file diff record.",enum:["unmodified","modified","added","deleted","renamed","copied","type_changed","unmerged"],type:"string"},GitCommitIdentityV1:{additionalProperties:!1,description:"Author/committer identity and timestamp evidence for one commit.",properties:{at:{$ref:"#/$defs/UtcMicros"},email:{type:"string"},name:{type:"string"}},required:["name","email","at"],type:"object"},GitCommitMetadataV1:{additionalProperties:!1,description:"Bounded commit metadata. The full message is not retained;\n`message_digest` is its canonical digest evidence.",properties:{author:{$ref:"#/$defs/GitCommitIdentityV1"},commit:{$ref:"#/$defs/GitOidV1"},committer:{$ref:"#/$defs/GitCommitIdentityV1"},message_digest:{$ref:"#/$defs/ManifestDigest"},parents:{items:{$ref:"#/$defs/GitOidV1"},type:"array"},subject:{description:"First line of the commit message, bounded at capture.",type:"string"},tree:{$ref:"#/$defs/GitOidV1"}},required:["commit","tree","parents","author","committer","subject","message_digest"],type:"object"},GitCoverageV1:yD,GitDegradationV1:yF,GitDiffScopeV1:{description:"Diff scope: unstaged worktree changes, staged index changes, or an exact\ncommit range. Range diffs are read-only evidence and carry no index\nrelationship, so they cannot mint an applicable `HunkRefV1`.",oneOf:[{properties:{scope:{const:"working_tree",type:"string"}},required:["scope"],type:"object"},{properties:{scope:{const:"staged",type:"string"}},required:["scope"],type:"object"},{properties:{base:{$ref:"#/$defs/GitOidV1"},head:{$ref:"#/$defs/GitOidV1"},scope:{const:"commit_range",type:"string"}},required:["scope","base","head"],type:"object"}]},GitDiffV1:{additionalProperties:!1,description:"Typed diff result for one scope with explicit coverage.",properties:{coverage:{$ref:"#/$defs/GitCoverageV1"},files:{items:{$ref:"#/$defs/GitFileDiffV1"},type:"array"},repository:{$ref:"#/$defs/RepositoryId"},scope:{$ref:"#/$defs/GitDiffScopeV1"}},required:["repository","scope","files","coverage"],type:"object"},GitFileDiffV1:{additionalProperties:!1,description:"One file's structured diff record: change kind, modes, blob identities,\nbinary/submodule classification, bounded line totals, and hunks.",properties:{binary:{type:"boolean"},change:{$ref:"#/$defs/GitChangeKindV1"},deletions:{format:"uint32",minimum:0,type:["integer","null"]},hunks:{items:{$ref:"#/$defs/GitHunkV1"},type:"array"},insertions:{description:"Inserted/deleted line totals; absent for binary and submodule records.",format:"uint32",minimum:0,type:["integer","null"]},new_blob:{anyOf:[{$ref:"#/$defs/GitOidV1"},{type:"null"}]},new_mode:{anyOf:[{$ref:"#/$defs/GitFileModeV1"},{type:"null"}]},old_blob:{anyOf:[{$ref:"#/$defs/GitOidV1"},{type:"null"}]},old_mode:{anyOf:[{$ref:"#/$defs/GitFileModeV1"},{type:"null"}]},original_path:{description:"Source path for a rename or copy.",type:["string","null"]},path:{type:"string"},submodule:{description:"True when the entry is a gitlink (submodule) change.",type:"boolean"}},required:["path","change","binary","submodule","hunks"],type:"object"},GitFileModeV1:yL,GitHeadStateV1:yU,GitHistoryV1:{additionalProperties:!1,description:"Bounded commit history in native traversal order. `truncated` is true\nwhen the capture bound cut the walk; shallow/partial-clone boundaries are\ncoverage degradations, never silently clean.",properties:{commits:{items:{$ref:"#/$defs/GitCommitMetadataV1"},type:"array"},coverage:{$ref:"#/$defs/GitCoverageV1"},repository:{$ref:"#/$defs/RepositoryId"},truncated:{type:"boolean"}},required:["repository","commits","truncated","coverage"],type:"object"},GitHunkPreviewEntryV1:{additionalProperties:!1,description:"One minted hunk selection: the canonical selection digest plus the\n`HunkRef` identity evidence it selects.",properties:{digest:{$ref:"#/$defs/ManifestDigest"},hunk:{$ref:"#/$defs/HunkRefV1"}},required:["digest","hunk"],type:"object"},GitHunkPreviewInputV1:{additionalProperties:!1,description:"Bounded, expiring preview input minted by `git_hunks` from one exact\ndaemon-captured repository snapshot.",properties:{expires_at:{$ref:"#/$defs/UtcMicros"},hunks:{items:{$ref:"#/$defs/GitHunkPreviewEntryV1"},type:"array"},preview_input_id:{$ref:"#/$defs/GitIndexPreviewId"},repository_snapshot_digest:{$ref:"#/$defs/ManifestDigest"}},required:["preview_input_id","repository_snapshot_digest","expires_at","hunks"],type:"object"},GitHunkV1:{additionalProperties:!1,description:"One structured diff hunk. The hunk body is not retained; `patch_digest`\nis the canonical digest of the normalized header plus body lines, which\nis the stable hunk identity evidence.",properties:{new_lines:{format:"uint32",minimum:0,type:"integer"},new_start:{format:"uint32",minimum:0,type:"integer"},old_lines:{format:"uint32",minimum:0,type:"integer"},old_start:{format:"uint32",minimum:0,type:"integer"},patch_digest:{$ref:"#/$defs/ManifestDigest"},section:{description:"Function/section heading from the hunk header when Git emitted one.",type:["string","null"]}},required:["old_start","old_lines","new_start","new_lines","patch_digest"],type:"object"},GitIndexEntryExpectationV1:yG,GitIndexPreviewId:yB,GitOidV1:yJ,GitOperationStateV1:yZ,GitQueryEnvelopeV1:{additionalProperties:!1,description:"One typed query result with its merged coverage. `coverage` is the\nadapter-reported coverage plus any query-level degradation (entry-bound\ntruncation); `truncated_by_bound` distinguishes query-level truncation\nfrom adapter-level capture bounds.",properties:{coverage:{$ref:"#/$defs/GitCoverageV1"},truncated_by_bound:{type:"boolean"},value:{$ref:"#/$defs/GitStatusSummaryV1"}},required:["value","coverage","truncated_by_bound"],type:"object"},GitQueryEnvelopeV12:{additionalProperties:!1,description:"One typed query result with its merged coverage. `coverage` is the\nadapter-reported coverage plus any query-level degradation (entry-bound\ntruncation); `truncated_by_bound` distinguishes query-level truncation\nfrom adapter-level capture bounds.",properties:{coverage:{$ref:"#/$defs/GitCoverageV1"},truncated_by_bound:{type:"boolean"},value:{$ref:"#/$defs/GitDiffV1"}},required:["value","coverage","truncated_by_bound"],type:"object"},GitQueryEnvelopeV13:{additionalProperties:!1,description:"One typed query result with its merged coverage. `coverage` is the\nadapter-reported coverage plus any query-level degradation (entry-bound\ntruncation); `truncated_by_bound` distinguishes query-level truncation\nfrom adapter-level capture bounds.",properties:{coverage:{$ref:"#/$defs/GitCoverageV1"},truncated_by_bound:{type:"boolean"},value:{$ref:"#/$defs/GitHistoryV1"}},required:["value","coverage","truncated_by_bound"],type:"object"},GitQueryEnvelopeV14:{additionalProperties:!1,description:"One typed query result with its merged coverage. `coverage` is the\nadapter-reported coverage plus any query-level degradation (entry-bound\ntruncation); `truncated_by_bound` distinguishes query-level truncation\nfrom adapter-level capture bounds.",properties:{coverage:{$ref:"#/$defs/GitCoverageV1"},truncated_by_bound:{type:"boolean"},value:{$ref:"#/$defs/GitBlameV1"}},required:["value","coverage","truncated_by_bound"],type:"object"},GitQueryEnvelopeV15:{additionalProperties:!1,description:"One typed query result with its merged coverage. `coverage` is the\nadapter-reported coverage plus any query-level degradation (entry-bound\ntruncation); `truncated_by_bound` distinguishes query-level truncation\nfrom adapter-level capture bounds.",properties:{coverage:{$ref:"#/$defs/GitCoverageV1"},truncated_by_bound:{type:"boolean"},value:{$ref:"#/$defs/GitHunkPreviewInputV1"}},required:["value","coverage","truncated_by_bound"],type:"object"},GitStatusSummaryV1:{additionalProperties:!1,description:"Bounded status summary derived from the typed\n[`tracedecay_domain::git::GitStatusV1`]: HEAD and operation state,\nper-class counts, and a bounded sorted sample of changed paths.",properties:{changed_paths:{description:"Sorted, de-duplicated changed paths, truncated at the query entry bound.",items:{type:"string"},type:"array"},conflicted:{format:"uint32",minimum:0,type:"integer"},head:{$ref:"#/$defs/GitHeadStateV1"},ignored:{format:"uint32",minimum:0,type:"integer"},operation:{$ref:"#/$defs/GitOperationStateV1"},repository:{$ref:"#/$defs/RepositoryId"},schema_version:{type:"string"},staged:{format:"uint32",minimum:0,type:"integer"},unstaged:{format:"uint32",minimum:0,type:"integer"},untracked:{format:"uint32",minimum:0,type:"integer"}},required:["repository","head","operation","staged","unstaged","conflicted","untracked","ignored","changed_paths","schema_version"],type:"object"},HunkDirectionV1:gt,HunkRefV1:gr,ManifestDigest:gj,RepositoryId:_z,UtcMicros:bs,WorktreeId:So},$schema:"https://json-schema.org/draft/2020-12/schema",description:"Actual payload emitted by each public Git read operation.",oneOf:[{properties:{query:{const:"status",type:"string"},result:{$ref:"#/$defs/GitQueryEnvelopeV1"}},required:["query","result"],type:"object"},{properties:{query:{const:"diff",type:"string"},result:{$ref:"#/$defs/GitQueryEnvelopeV12"}},required:["query","result"],type:"object"},{properties:{query:{const:"history",type:"string"},result:{$ref:"#/$defs/GitQueryEnvelopeV13"}},required:["query","result"],type:"object"},{properties:{query:{const:"blame",type:"string"},result:{$ref:"#/$defs/GitQueryEnvelopeV14"}},required:["query","result"],type:"object"},{properties:{query:{const:"hunks",type:"string"},result:{$ref:"#/$defs/GitQueryEnvelopeV15"}},required:["query","result"],type:"object"}],title:"GitReadResultV1"},{$defs:{GitOidV1:yJ,GitSurfaceDiffScopeV1:y4},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Request shape for the public `git_diff` surface.",properties:{base:{anyOf:[{$ref:"#/$defs/GitOidV1"},{type:"null"}]},head:{anyOf:[{$ref:"#/$defs/GitOidV1"},{type:"null"}]},max_bytes:{format:"uint64",minimum:0,type:["integer","null"]},max_entries:{format:"uint32",minimum:0,type:["integer","null"]},scope:{$ref:"#/$defs/GitSurfaceDiffScopeV1",default:"working_tree"}},title:"GitDiffSurfaceRequest",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Request shape for the public `git_history` surface.",properties:{count:{format:"uint32",minimum:0,type:["integer","null"]},first_parent:{default:!1,type:"boolean"},follow:{default:!1,type:"boolean"},max_bytes:{format:"uint64",minimum:0,type:["integer","null"]},max_entries:{format:"uint32",minimum:0,type:["integer","null"]},path:{type:["string","null"]}},title:"GitHistorySurfaceRequest",type:"object"},{$defs:{GitSurfaceDiffScopeV1:y4},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Request shape for the public `git_hunks` surface.\n\nThe daemon captures exact repository state itself and injects the private\npreview binding after capture, so the public wire carries only the diff\nscope (commit ranges cannot mint applicable hunks).",properties:{max_bytes:{format:"uint64",minimum:0,type:["integer","null"]},max_entries:{format:"uint32",minimum:0,type:["integer","null"]},scope:{$ref:"#/$defs/GitSurfaceDiffScopeV1",default:"working_tree"}},title:"GitHunksSurfaceRequest",type:"object"},{$defs:{GitIndexPreviewId:yB,GitIndexTransactionOperationV1:yK,ManifestDigest:gj},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Public MCP/CLI request for one daemon-owned Git index preview.",properties:{operation:{$ref:"#/$defs/GitIndexTransactionOperationV1"},preview_input_id:{anyOf:[{$ref:"#/$defs/GitIndexPreviewId"},{type:"null"}],default:null,description:"Hunk preview input minted by `git_hunks`; required for stage/unstage."},selected_hunk_digests:{default:[],description:"Selection digests drawn from the referenced preview input.",items:{$ref:"#/$defs/ManifestDigest"},type:"array"}},required:["operation"],title:"GitPreviewSurfaceRequest",type:"object"},{$defs:{GitBlobExpectationV1:yM,GitCoverageV1:yD,GitDegradationV1:yF,GitFileModeV1:yL,GitHeadStateV1:yU,GitIndexEntryExpectationV1:yG,GitIndexPreviewDispositionV1:{description:"Whether a captured preview may reach the daemon's native apply path.",oneOf:[{properties:{state:{const:"applicable",type:"string"}},required:["state"],type:"object"},{properties:{reason:{$ref:"#/$defs/GitIndexUnsupportedStateV1"},state:{const:"unsupported",type:"string"}},required:["state","reason"],type:"object"}]},GitIndexPreviewId:yB,GitIndexTransactionOperationV1:yK,GitIndexUnsupportedStateV1:{description:"Why a preview is intentionally read-only. A caller must re-preview after\nresolving the condition; no variant grants a relaxed or partial apply.",enum:["bare_repository","detached_head","unborn_branch","index_lock_present","external_git_driver","unmerged_index","intent_to_add","split_index","sparse_index","unreadable_index","conflicted_working_tree","unreadable_working_tree","in_progress_operation","unsupported_object_format","binary_hunk","submodule","symlink","file_mode_only","rename_or_copy","filters_or_end_of_line","partial_hunk_selection"],type:"string"},GitObjectFormatV1:{description:"Repository object format, derived from object-id length.",enum:["sha1","sha256"],type:"string"},GitOidV1:yJ,GitOperationStateV1:yZ,HunkDirectionV1:gt,HunkRefV1:gr,ManifestDigest:gj,ProjectId:_m,RepositoryId:_z,RepositoryIndexSnapshotV1:{additionalProperties:!1,properties:{checksum:{$ref:"#/$defs/ManifestDigest"},state:{$ref:"#/$defs/RepositoryIndexStateV1"},tree_id:{anyOf:[{$ref:"#/$defs/GitOidV1"},{type:"null"}]},unmerged_stage_digest:{anyOf:[{$ref:"#/$defs/ManifestDigest"},{type:"null"}]}},required:["checksum","state"],type:"object"},RepositoryIndexStateV1:{enum:["clean","staged","unmerged","intent_to_add","split","sparse","unreadable"],type:"string"},RepositoryStateSnapshotV1:{additionalProperties:!1,description:"Immutable content-addressed native repository state. Missing/partial\nevidence remains typed by fields and coverage instead of being upgraded to\na guessed clean snapshot.",properties:{adapter_revision:{description:"Revision of the fixed native adapter that interpreted this state.",type:["string","null"]},attributes_digest:{anyOf:[{$ref:"#/$defs/ManifestDigest"},{type:"null"}]},captured_at:{$ref:"#/$defs/UtcMicros"},configuration_digest:{anyOf:[{$ref:"#/$defs/ManifestDigest"},{type:"null"}]},coverage:{$ref:"#/$defs/GitCoverageV1"},filesystem_capabilities_digest:{anyOf:[{$ref:"#/$defs/ManifestDigest"},{type:"null"}]},git_version:{description:"Exact native Git implementation observed by the fixed adapter. A\nread-only partial snapshot may omit this, but omitted native evidence\nis never mutation eligible.",type:["string","null"]},head:{$ref:"#/$defs/GitHeadStateV1"},index:{$ref:"#/$defs/RepositoryIndexSnapshotV1"},object_format:{$ref:"#/$defs/GitObjectFormatV1"},observation_epoch:{format:"uint64",minimum:0,type:"integer"},operation_state:{$ref:"#/$defs/GitOperationStateV1"},project_id:{$ref:"#/$defs/ProjectId"},refs_digest:{anyOf:[{$ref:"#/$defs/ManifestDigest"},{type:"null"}],description:"Digest of the complete native ref namespace at capture time."},repository_id:{$ref:"#/$defs/RepositoryId"},snapshot_id:{type:"string"},sparse_digest:{anyOf:[{$ref:"#/$defs/ManifestDigest"},{type:"null"}]},submodule_digest:{anyOf:[{$ref:"#/$defs/ManifestDigest"},{type:"null"}]},working_tree:{$ref:"#/$defs/RepositoryWorkingTreeSnapshotV1"},worktree_id:{anyOf:[{$ref:"#/$defs/WorktreeId"},{type:"null"}]}},required:["snapshot_id","project_id","repository_id","observation_epoch","object_format","head","index","working_tree","operation_state","captured_at","coverage"],type:"object"},RepositoryWorkingTreeSnapshotV1:{additionalProperties:!1,properties:{ignored_collision_digest:{anyOf:[{$ref:"#/$defs/ManifestDigest"},{type:"null"}]},state:{$ref:"#/$defs/RepositoryWorkingTreeStateV1"},tracked_digest:{$ref:"#/$defs/ManifestDigest"},untracked_name_digest:{anyOf:[{$ref:"#/$defs/ManifestDigest"},{type:"null"}]}},required:["state","tracked_digest"],type:"object"},RepositoryWorkingTreeStateV1:{enum:["clean","tracked_dirty","untracked_only","mixed","conflicted","unreadable"],type:"string"},UtcMicros:bs,WorktreeId:So},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Immutable, content-bound preview for one daemon-serialized index\ntransaction. Applicability is only a precondition: the daemon must capture\nand compare the entire snapshot and every contained `HunkRefV1` again\nimmediately before a native mutation.",properties:{candidate_index_tree:{anyOf:[{$ref:"#/$defs/GitOidV1"},{type:"null"}]},created_at:{$ref:"#/$defs/UtcMicros"},disposition:{$ref:"#/$defs/GitIndexPreviewDispositionV1"},expires_at:{$ref:"#/$defs/UtcMicros"},operation:{$ref:"#/$defs/GitIndexTransactionOperationV1"},preview_digest:{$ref:"#/$defs/ManifestDigest"},preview_id:{$ref:"#/$defs/GitIndexPreviewId"},repository_snapshot:{$ref:"#/$defs/RepositoryStateSnapshotV1"},repository_snapshot_digest:{$ref:"#/$defs/ManifestDigest"},selected_hunks:{items:{$ref:"#/$defs/HunkRefV1"},type:"array"}},required:["preview_id","operation","repository_snapshot","repository_snapshot_digest","selected_hunks","disposition","created_at","expires_at","preview_digest"],title:"GitIndexPreviewV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Request shape for the public `git_status` surface.",properties:{max_bytes:{format:"uint64",minimum:0,type:["integer","null"]},max_entries:{format:"uint32",minimum:0,type:["integer","null"]}},title:"GitStatusSurfaceRequest",type:"object"},{$defs:{StackDeliveryWatermarkId:vU,StackSignalId:vG},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"The public, transport-neutral request for one durable stack signal.",properties:{expected_watermark_id:{anyOf:[{$ref:"#/$defs/StackDeliveryWatermarkId"},{type:"null"}]},signal_id:{anyOf:[{$ref:"#/$defs/StackSignalId"},{type:"null"}]}},title:"GitHubStackSignalExpandSurfaceRequest",type:"object"},{$defs:{BranchStackRevisionId:fS,GitHubStackSignalEvidenceRefV1:{additionalProperties:!1,description:"Bounded evidence for the exact signal the coordinator authorized.\n\nProvider payloads, paths, commit bodies, and delivery recipients remain\nbehind the durable signal evidence rather than copied to this result.",properties:{github_stack_digest:{anyOf:[{$ref:"#/$defs/ManifestDigest"},{type:"null"}]},kind:{$ref:"#/$defs/StackSignalKindV1"},native_source:{$ref:"#/$defs/GitHubStackSignalNativeSourceV1"},observed_at:{$ref:"#/$defs/UtcMicros"},signal_id:{$ref:"#/$defs/StackSignalId"},stack_revision_digest:{$ref:"#/$defs/ManifestDigest"},stack_revision_id:{$ref:"#/$defs/BranchStackRevisionId"},state_digest:{$ref:"#/$defs/ManifestDigest"},watermark_id:{$ref:"#/$defs/StackDeliveryWatermarkId"}},required:["signal_id","watermark_id","kind","stack_revision_id","stack_revision_digest","state_digest","observed_at","native_source"],type:"object"},GitHubStackSignalExpandUnavailableV1:{description:"Truthful non-success outcomes for signal expansion.\n\n`Concealed` intentionally combines absent and unauthorized signal handles;\nexposing that distinction would turn this operation into a signal probe.",enum:["concealed","stale","native_evidence_unavailable","authority_unmounted","cancelled"],type:"string"},GitHubStackSignalNativePreviewV1:{additionalProperties:!1,description:"Exact branch pair and native preflight that produced the selected signal.",properties:{destination_ref:{$ref:"#/$defs/RefId"},destination_tip:{$ref:"#/$defs/GitOidV1"},direction:{$ref:"#/$defs/NativeIntegrationDirectionV1"},disposition:{$ref:"#/$defs/NativeIntegrationPreviewDispositionV1"},preview_digest:{$ref:"#/$defs/ManifestDigest"},preview_id:{$ref:"#/$defs/NativeIntegrationPreviewId"},source_ref:{$ref:"#/$defs/RefId"},source_tip:{$ref:"#/$defs/GitOidV1"}},required:["preview_id","preview_digest","direction","source_ref","destination_ref","source_tip","destination_tip","disposition"],type:"object"},GitHubStackSignalNativeSourceV1:{oneOf:[{properties:{preview:{$ref:"#/$defs/GitHubStackSignalNativePreviewV1"},source:{const:"preflight",type:"string"}},required:["source","preview"],type:"object"},{properties:{preview:{$ref:"#/$defs/GitHubStackSignalNativePreviewV1"},source:{const:"terminal",type:"string"},terminal:{$ref:"#/$defs/GitHubStackSignalNativeTerminalV1"}},required:["source","preview","terminal"],type:"object"}]},GitHubStackSignalNativeTerminalV1:{additionalProperties:!1,properties:{completed_at:{$ref:"#/$defs/UtcMicros"},final_ref_tip:{$ref:"#/$defs/GitOidV1"},outcome:{$ref:"#/$defs/NativeIntegrationTerminalOutcomeV1"},receipt_digest:{$ref:"#/$defs/ManifestDigest"},transaction_id:{$ref:"#/$defs/NativeIntegrationTransactionId"}},required:["transaction_id","receipt_digest","outcome","final_ref_tip","completed_at"],type:"object"},GitOidV1:yJ,ManifestDigest:gj,MechanicalIntegrationModeV1:gC,NativeIntegrationDirectionV1:gK,NativeIntegrationPreviewDispositionV1:gJ,NativeIntegrationPreviewId:gZ,NativeIntegrationTerminalOutcomeV1:gY,NativeIntegrationTransactionId:g1,NativeIntegrationUnavailabilityV1:g0,RefId:_T,StackDeliveryWatermarkId:vU,StackSignalId:vG,StackSignalKindV1:{description:"Durable classification of one GitHub stack transition.",enum:["dependency_ready","actual_conflict","stack_tip_drift","pull_request_drift","ci_evaluated_commit_drift","integration_committed","integration_needs_inspection"],type:"string"},UtcMicros:bs},$schema:"https://json-schema.org/draft/2020-12/schema",oneOf:[{properties:{evidence:{$ref:"#/$defs/GitHubStackSignalEvidenceRefV1"},outcome:{const:"expanded",type:"string"}},required:["outcome","evidence"],type:"object"},{properties:{outcome:{const:"unavailable",type:"string"},reason:{$ref:"#/$defs/GitHubStackSignalExpandUnavailableV1"}},required:["outcome","reason"],type:"object"}],title:"GitHubStackSignalExpandSurfaceResultV1"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{limit:{description:"Maximum number of results to return (default: 10, at most 100).",format:"uint32",minimum:0,type:["integer","null"]},path:{description:"Filter to files under this directory path (e.g. 'src/main/java').",type:["string","null"]}},title:"GodClassSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fF,CodeIndexConvergenceParkedV1:fL,CodeIndexStalenessStateV1:fB,GodClassEntryV1:{additionalProperties:!1,properties:{fields:{format:"uint64",minimum:0,type:"integer"},file:{type:"string"},id:{type:"string"},kind:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},methods:{format:"uint64",minimum:0,type:"integer"},name:{type:"string"},total_members:{format:"uint64",minimum:0,type:"integer"}},required:["id","name","kind","file","line","methods","fields","total_members"],type:"object"},PrimitiveFreshnessStateV1:_i,PrimitiveIndexingStateV1:_o,PrimitiveSearchFreshnessV1:_d},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},ranking:{items:{$ref:"#/$defs/GodClassEntryV1"},type:"array"},result_count:{format:"uint64",minimum:0,type:"integer"}},required:["result_count","ranking"],title:"GodClassResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{case_sensitive:{description:"Match case-sensitively (default: false = case-insensitive).",type:["boolean","null"]},context_lines:{description:"Lines of surrounding context to include per hit (default: 0, max: 3).",format:"uint32",minimum:0,type:["integer","null"]},fixed_strings:{description:"Treat pattern as a literal string instead of a regex (default: false).",type:["boolean","null"]},max_results:{description:"Maximum number of matching lines to return (default: 50, max: 200).",format:"uint32",minimum:0,type:["integer","null"]},path_glob:{description:"Optional glob restricting which files are searched, matched against\nproject-relative paths (e.g. 'src/**/*.rs').",type:["string","null"]},pattern:{description:"Content to search for. Treated as a regular expression unless\nfixed_strings is true.",type:"string"}},required:["pattern"],title:"GrepSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fF,CodeIndexConvergenceParkedV1:fL,CodeIndexStalenessStateV1:fB,CoverageCompleteness:hA,CoverageDomainState:hW,EvidenceCoverage:h1,EvidenceDomain:h0,GrepGraphEnrichmentV1:{description:"Whether the verified graph resolved each hit's enclosing symbol. Hits are\nthe lexical answer either way.",oneOf:[{additionalProperties:!1,properties:{enriched:{format:"uint64",minimum:0,type:"integer"},returned:{format:"uint64",minimum:0,type:"integer"},status:{const:"complete",type:"string"}},required:["status","enriched","returned"],type:"object"},{additionalProperties:!1,properties:{detail:{type:"string"},reason_code:{type:"string"},retryable:{type:"boolean"},status:{const:"unavailable",type:"string"}},required:["status","reason_code","retryable","detail"],type:"object"}]},GrepMatchV1:{additionalProperties:!1,properties:{after:{items:{type:"string"},type:"array"},before:{items:{type:"string"},type:"array"},file:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},node_id:{type:["string","null"]},symbol:{description:"The smallest verified graph symbol enclosing the hit.",type:["string","null"]},text:{type:"string"}},required:["file","line","text"],type:"object"},GrepScanOmissionsV1:{additionalProperties:!1,description:"What the bounded scan skipped, by cause; absent when it skipped nothing.",properties:{oversized_files:{description:"Files larger than the interactive scan byte limit.",format:"uint64",minimum:0,type:"integer"},oversized_lines:{description:"Lines longer than the scan line byte limit.",format:"uint64",minimum:0,type:"integer"},unavailable_sources:{description:"Source candidates that could not be read during the scan.",format:"uint64",minimum:0,type:"integer"}},required:["oversized_files","oversized_lines","unavailable_sources"],type:"object"},Omission:{additionalProperties:!1,properties:{count:{format:"uint64",minimum:0,type:"integer"},domain:{$ref:"#/$defs/EvidenceDomain"},reason:{$ref:"#/$defs/OmissionReason"}},required:["domain","count","reason"],type:"object"},OmissionReason:{description:"Safe reason why authorized requested evidence was omitted.",oneOf:[{enum:["budget","redacted","unavailable","unsupported","stale","failed","cancelled","timed_out","conflict"],type:"string"},{const:"macro_body_unparsed",description:"Evidence came from a macro body that was not expanded, so what the\nexpansion defines or calls is not covered.",type:"string"},{const:"import_unmodeled",description:"A caller sits under a `use` whose binding the index could not model\n(a glob in a block or inline module), so whether it calls the target\nis not covered.",type:"string"},{const:"cursor_expired",description:"The continuation cursor can no longer be redeemed (its lifetime ended\nor the snapshot it pages is gone); restart the request without it.",type:"string"},{const:"cursor_foreign",description:"The continuation cursor was issued for another project, worktree, or\nref; redeem it where it was issued.",type:"string"}]},PrimitiveFreshnessStateV1:_i,PrimitiveIndexingStateV1:_o,PrimitiveSearchFreshnessV1:_d},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{coverage:{$ref:"#/$defs/EvidenceCoverage"},files_scanned:{format:"uint64",minimum:0,type:"integer"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},graph_enrichment:{$ref:"#/$defs/GrepGraphEnrichmentV1"},match_count:{format:"uint64",minimum:0,type:"integer"},omissions:{items:{$ref:"#/$defs/Omission"},type:"array"},results:{items:{$ref:"#/$defs/GrepMatchV1"},type:"array"},scan_omissions:{$ref:"#/$defs/GrepScanOmissionsV1"},truncated:{type:"boolean"}},required:["results","match_count","files_scanned","truncated","coverage","omissions","graph_enrichment"],title:"GrepSearchResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{details:{description:"If true, include full dimension breakdown (default: false).",type:["boolean","null"]},path:{description:"Filter to files under this directory path.",type:["string","null"]}},title:"HealthSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fF,CodeIndexConvergenceParkedV1:fL,CodeIndexStalenessStateV1:fB,HealthAcyclicityV1:{additionalProperties:!1,properties:{edges_in_cycles:{format:"uint64",minimum:0,type:"integer"},score:{format:"double",type:"number"},source:{type:"string"}},required:["score","edges_in_cycles","source"],type:"object"},HealthCoverageDisciplineV1:{additionalProperties:!1,properties:{score:{format:"double",type:"number"},skip_test_coverage_count:{format:"uint64",minimum:0,type:"integer"},source:{type:"string"},total_fns:{format:"uint64",minimum:0,type:"integer"}},required:["score","skip_test_coverage_count","total_fns","source"],type:"object"},HealthDepthV1:{additionalProperties:!1,properties:{ideal_chain:{format:"uint64",minimum:0,type:"integer"},max_chain:{format:"uint64",minimum:0,type:"integer"},score:{format:"double",type:"number"},source:{type:"string"}},required:["score","max_chain","ideal_chain","source"],type:"object"},HealthDimensionsV1:{additionalProperties:!1,properties:{acyclicity:{$ref:"#/$defs/HealthAcyclicityV1"},coverage_discipline:{$ref:"#/$defs/HealthCoverageDisciplineV1"},depth:{$ref:"#/$defs/HealthDepthV1"},equality:{$ref:"#/$defs/HealthEqualityV1"},modularity:{$ref:"#/$defs/HealthModularityV1"},redundancy:{$ref:"#/$defs/HealthRedundancyV1"}},required:["acyclicity","depth","equality","redundancy","modularity","coverage_discipline"],type:"object"},HealthEqualityV1:{additionalProperties:!1,properties:{gini:{format:"double",type:"number"},incomplete_complexity_symbols:{format:"uint64",minimum:0,type:"integer"},interpretation:{type:"string"},score:{format:"double",type:"number"},source:{type:"string"}},required:["score","gini","interpretation","incomplete_complexity_symbols","source"],type:"object"},HealthModularityV1:{additionalProperties:!1,properties:{components_after_hub_removal:{format:"uint64",minimum:0,type:"integer"},interpretation:{type:"string"},score:{format:"double",type:"number"},source:{type:"string"}},required:["score","interpretation","components_after_hub_removal","source"],type:"object"},HealthRedundancyV1:{additionalProperties:!1,properties:{dead_count:{format:"uint64",minimum:0,type:"integer"},score:{format:"double",type:"number"},source:{type:"string"},total_fns:{format:"uint64",minimum:0,type:"integer"}},required:["score","dead_count","total_fns","source"],type:"object"},HealthWeightsV1:{additionalProperties:!1,properties:{note:{type:"string"}},required:["note"],type:"object"},PrimitiveFreshnessStateV1:_i,PrimitiveIndexingStateV1:_o,PrimitiveSearchFreshnessV1:_d},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"`dimensions` and `weights` are present exactly when the request asked for\n`details`.",properties:{dimensions:{anyOf:[{$ref:"#/$defs/HealthDimensionsV1"},{type:"null"}]},files_analyzed:{format:"uint64",minimum:0,type:"integer"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},panel:{description:"Measured dimension names, worst score first, then\n`no evidence: name (reason), ...` for the dimensions the scope gave\nnothing to measure. An empty scope reads\n`no evidence: 0 files in scope`.",type:"string"},quality_signal:{description:"Geometric mean of the dimensions, scaled to 0-10000. A breakdown of\n`panel`, not a number to maximize. Dimensions that `panel` lists under\n`no evidence:` enter it at their formula value for an empty\nmeasurement, so it does not summarize such a scope: an empty scope\nreads 10000 and one file reads 0.",format:"uint32",minimum:0,type:"integer"},weights:{anyOf:[{$ref:"#/$defs/HealthWeightsV1"},{type:"null"}]}},required:["quality_signal","files_analyzed"],title:"HealthResultV1",type:"object"},{$defs:{PageRequest:_t,ResultProjection:_H,RetrievalOrder:_Z,RetrievalRequestMeta:_Q,TemporalModeV1:v6,UtcMicros:bs},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{before_cursor:{description:"A prior result's after_cursor. A cursor recorded under another health\ndefinition, or before definitions were recorded, is refused with\n`application.health-delta.definition-mismatch` or\n`application.health-delta.definition-unrecorded`; omit it to record a\nnew baseline.",type:["string","null"]},meta:{$ref:"#/$defs/RetrievalRequestMeta"},path_prefix:{type:["string","null"]}},required:["meta"],title:"HealthDeltaRequest",type:"object"},{$defs:{HealthDeltaCoverageV1:{additionalProperties:!1,properties:{completeness:{description:"`complete` when both points analyzed files, otherwise `unknown`.",type:"string"},denominator:{format:"uint64",minimum:0,type:["integer","null"]},eligible:{description:"Files the `after` point analyzed.",format:"uint64",minimum:0,type:["integer","null"]},visited:{format:"uint64",minimum:0,type:["integer","null"]}},required:["completeness"],type:"object"},HealthDeltaCurrentnessV1:{additionalProperties:!1,properties:{observed_at:{$ref:"#/$defs/UtcMicros"},state:{type:"string"}},required:["state","observed_at"],type:"object"},HealthDeltaPointV1:{additionalProperties:!1,properties:{dimensions:{additionalProperties:{$ref:"#/$defs/HealthDimensionPointV1"},type:"object"},files_analyzed:{format:"uint64",minimum:0,type:"integer"},function_denominator:{format:"uint64",minimum:0,type:"integer"},observed_at:{$ref:"#/$defs/UtcMicros"},quality_signal:{format:"uint32",minimum:0,type:"integer"},watermark:{$ref:"#/$defs/ManifestDigest"}},required:["watermark","observed_at","quality_signal","files_analyzed","function_denominator","dimensions"],type:"object"},HealthDeltaScopeV1:{additionalProperties:!1,properties:{path_prefix:{type:["string","null"]},project_id:{type:["string","null"]},scope_digest:{$ref:"#/$defs/ManifestDigest"}},required:["scope_digest"],type:"object"},HealthDimensionDeltaV1:{additionalProperties:!1,properties:{after_denominator:{format:"uint64",minimum:0,type:["integer","null"]},after_ppm:{format:"uint64",minimum:0,type:"integer"},before_denominator:{format:"uint64",minimum:0,type:["integer","null"]},before_ppm:{format:"uint64",minimum:0,type:"integer"},delta_ppm:{format:"int64",type:"integer"},status:{description:"`improved` or `degraded` when the score moved more than 1000 ppm,\notherwise `unchanged`. `no_evidence` when either point's scope gave\nthe dimension nothing to measure, so its scores are formula values.",type:"string"}},required:["before_ppm","after_ppm","delta_ppm","status"],type:"object"},HealthDimensionPointV1:{additionalProperties:!1,properties:{denominator:{format:"uint64",minimum:0,type:["integer","null"]},score_ppm:{format:"uint64",minimum:0,type:"integer"}},required:["score_ppm"],type:"object"},ManifestDigest:gj,UtcMicros:bs},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{after:{$ref:"#/$defs/HealthDeltaPointV1"},after_cursor:{type:"string"},before:{$ref:"#/$defs/HealthDeltaPointV1"},before_cursor:{type:"string"},coverage:{$ref:"#/$defs/HealthDeltaCoverageV1"},currentness:{$ref:"#/$defs/HealthDeltaCurrentnessV1"},delta:{format:"int64",type:"integer"},dimensions:{additionalProperties:{$ref:"#/$defs/HealthDimensionDeltaV1"},type:"object"},pass:{description:"True when both points analyzed files and quality_signal did not drop.",type:"boolean"},schema_version:{format:"uint32",minimum:0,type:"integer"},scope:{$ref:"#/$defs/HealthDeltaScopeV1"}},required:["schema_version","scope","before","after","before_cursor","after_cursor","pass","delta","dimensions","coverage","currentness"],title:"HealthDeltaResult",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"The health read takes no parameters: it reports one serving status, with no\npage, projection, or temporal selection to make. The page and deadline\ncontrols every surface supplies travel in the dispatch envelope, not here.",title:"HealthReadRequest",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{status:{type:"string"}},required:["status"],title:"HealthReadResult",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{include_pending_payloads:{default:!1,description:"Include staged Hermes skill-write payloads (default: false).",type:"boolean"},include_skill_bodies:{default:!1,description:"Include bounded SKILL.md contents (default: false).",type:"boolean"}},title:"HermesSkillBridgeSurfaceRequestV1",type:"object"},{$defs:{AutomationReadStatusV1:fn,HermesPendingSkillWrite:{properties:{action:{type:["string","null"]},created_at:!0,id:{type:"string"},name:{type:["string","null"]},origin:{type:["string","null"]},payload:!0,source_path:{type:"string"},summary:{type:["string","null"]}},required:["id","source_path"],type:"object"},HermesSkillBridgeContracts:{properties:{discovery_policy:{type:"string"},lifecycle_owner:{type:"string"},mutation_policy:{type:"string"}},required:["lifecycle_owner","mutation_policy","discovery_policy"],type:"object"},HermesSkillBridgeSnapshot:{properties:{agent_home:{type:"string"},archive_count:{format:"uint",minimum:0,type:"integer"},contracts:{$ref:"#/$defs/HermesSkillBridgeContracts"},pending_skill_corrupt_count:{format:"uint",minimum:0,type:"integer"},pending_skill_count:{format:"uint",minimum:0,type:"integer"},pending_skills:{items:{$ref:"#/$defs/HermesPendingSkillWrite"},type:"array"},skill_count:{format:"uint",minimum:0,type:"integer"},skills:{items:{$ref:"#/$defs/HermesSkillSummary"},type:"array"},skills_dir:{type:"string"},usage_record_count:{format:"uint",minimum:0,type:"integer"},usage_records:{additionalProperties:!0,description:"Hermes-owned usage telemetry keyed by skill name, as Hermes wrote it.",type:"object"}},required:["agent_home","skills_dir","skill_count","pending_skill_count","pending_skill_corrupt_count","usage_record_count","archive_count","skills","pending_skills","usage_records","contracts"],type:"object"},HermesSkillSummary:{properties:{body_markdown:{type:["string","null"]},category:{type:["string","null"]},description:{type:["string","null"]},name:{type:"string"},path:{type:"string"},pending_write_ids:{items:{type:"string"},type:"array"},usage:!0},required:["name","path","pending_write_ids"],type:"object"}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{bridge:{$ref:"#/$defs/HermesSkillBridgeSnapshot"},status:{$ref:"#/$defs/AutomationReadStatusV1"}},required:["status","bridge"],title:"HermesSkillBridgeResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",oneOf:[{additionalProperties:!1,description:"Reset the project's local token counter.",properties:{action:{const:"reset_counter",type:"string"}},required:["action"],type:"object"},{additionalProperties:!1,description:"Admit one Hook V2 envelope for the bound project.",properties:{action:{const:"hook_v2_admit",type:"string"},envelope:!0,native_lifecycle:!0,native_session_id:{description:"The host's native session id; it binds only when it hashes to the\nenvelope's protected session.",type:["string","null"]}},required:["action","envelope"],type:"object"},{additionalProperties:!1,description:"Commit a Context Scout delivery receipt for guidance the last\nadmission handed out.",properties:{action:{const:"hook_v2_delivery_receipt",type:"string"},receipt:!0},required:["action","receipt"],type:"object"},{additionalProperties:!1,description:"Acknowledge delivery of an advisory feedback notice.",properties:{action:{const:"hook_v2_feedback_notice_delivery",type:"string"},envelope:!0,feedback_notice:!0},required:["action","envelope","feedback_notice"],type:"object"},{additionalProperties:!1,description:"Land a host transcript in the owning session store.",properties:{action:{const:"ingest_transcript",type:"string"},event_json:{description:"The host's raw hook event, for providers that locate the transcript\nfrom it.",type:["string","null"]},max_new_bytes:{description:"Byte budget for this pass across every scanned source.",format:"uint64",minimum:0,type:["integer","null"]},messages:{description:"One turn the host inlined instead of a source to scan.",items:!0,type:["array","null"]},provider:{type:"string"},session_id:{type:["string","null"]},user_scope:{description:"Land the transcript in the profile's user store instead of the\nproject's.",type:"boolean"}},required:["action","provider","user_scope"],type:"object"},{additionalProperties:!1,description:"Codex `PostCompact` pressure evidence.",properties:{action:{const:"codex_compact",type:"string"},event_json:{type:"string"}},required:["action","event_json"],type:"object"},{additionalProperties:!1,description:"Claude `PostCompact` pressure evidence; `user_scope` routes it to the\nprofile.",properties:{action:{const:"claude_compact",type:"string"},event_json:{type:"string"},user_scope:{type:"boolean"}},required:["action","event_json","user_scope"],type:"object"},{additionalProperties:!1,description:"Cursor `preCompact` pressure evidence.",properties:{action:{const:"cursor_compact",type:"string"},event_json:{type:"string"}},required:["action","event_json"],type:"object"},{additionalProperties:!1,description:"Record a Hermes terminal receipt without a project route.",properties:{action:{const:"hermes_receipt",type:"string"},event:!0},required:["action","event"],type:"object"},{additionalProperties:!1,description:"Admit a native event without a project route into the profile's\nHook V2 ledger.",properties:{action:{const:"hook_v2_profile_admit",type:"string"},admission:!0},required:["action","admission"],type:"object"}],title:"HookRuntimeSurfaceRequestV1"},{$defs:{ContextScoutAddressV1:ho,ContextScoutStoreStatusV1:{enum:["stored","duplicate","superseded","unavailable"],type:"string"},HermesReceiptStatusV1:{oneOf:[{const:"recorded",description:"A terminal receipt was recorded.",type:"string"},{const:"ingested",description:"The turn was marked ingested and no receipt awaits review.",type:"string"},{const:"awaiting_transcript",description:"A receipt awaits a transcript that has not landed yet.",type:"string"}]},HookIngestAdmissionV1:{additionalProperties:!1,description:"The admission authority's verdict on one transcript ingest.",properties:{reason_code:{type:["string","null"]},retryable:{type:"boolean"},status:{description:"The session host-admission status, in its wire spelling.",type:"string"}},required:["status","retryable"],type:"object"},HookOrchestrationAdmissionV1:{description:"Outcome of admitting one hook envelope into the registered orchestrator.",enum:["enqueued","backpressured","unsupported_trigger","unavailable"],type:"string"},HookRuntimeDispositionV1:{description:"How the hook transport should treat a Hook V2 envelope.",oneOf:[{enum:["accepted"],type:"string"},{const:"catchup_required",description:"The published binding no longer authorizes the envelope; the host\nmust catch up before sending again.",type:"string"}]},HookV2RejectionReasonV1:{oneOf:[{const:"admission_identity_conflict",description:"The same event identity previously carried different bytes.",type:"string"}]}},$schema:"https://json-schema.org/draft/2020-12/schema",oneOf:[{additionalProperties:!1,properties:{action:{const:"reset_counter",type:"string"},reset:{type:"boolean"}},required:["action","reset"],type:"object"},{oneOf:[{properties:{context_scout_address:{anyOf:[{$ref:"#/$defs/ContextScoutAddressV1"},{type:"null"}]},disposition:{$ref:"#/$defs/HookRuntimeDispositionV1"},feedback_notice:{description:"The advisory `AdvisoryHookLookupNoticeV1` waiting for this\nworktree."},github_stack_signal_available:{type:"boolean"},orchestration:{$ref:"#/$defs/HookOrchestrationAdmissionV1"},ready_guidance:{description:"The hook's `HookReadyGuidanceV1`, when admission claimed one."},status:{const:"accepted",type:"string"}},required:["status","disposition","orchestration","github_stack_signal_available"],type:"object"},{description:"This exact envelope was already admitted; a retry may still receive\nguidance retained before a lost host response.",properties:{context_scout_address:{anyOf:[{$ref:"#/$defs/ContextScoutAddressV1"},{type:"null"}]},disposition:{$ref:"#/$defs/HookRuntimeDispositionV1"},ready_guidance:!0,status:{const:"exact_duplicate",type:"string"}},required:["status","disposition"],type:"object"},{properties:{disposition:{$ref:"#/$defs/HookRuntimeDispositionV1"},reason:{anyOf:[{$ref:"#/$defs/HookV2RejectionReasonV1"},{type:"null"}]},status:{const:"rejected",type:"string"}},required:["status","disposition"],type:"object"},{description:"Idempotency could not be recorded, so nothing was admitted.",properties:{status:{const:"backpressured",type:"string"}},required:["status"],type:"object"},{properties:{status:{const:"unavailable",type:"string"}},required:["status"],type:"object"}],properties:{action:{const:"hook_v2_admit",type:"string"}},required:["action"],type:"object"},{additionalProperties:!1,properties:{action:{const:"hook_v2_delivery_receipt",type:"string"},status:{$ref:"#/$defs/ContextScoutStoreStatusV1"}},required:["action","status"],type:"object"},{oneOf:[{properties:{status:{const:"stored",type:"string"}},required:["status"],type:"object"},{properties:{status:{const:"unavailable",type:"string"}},required:["status"],type:"object"},{properties:{disposition:{$ref:"#/$defs/HookRuntimeDispositionV1"},status:{const:"rejected",type:"string"}},required:["status","disposition"],type:"object"}],properties:{action:{const:"hook_v2_feedback_notice_delivery",type:"string"}},required:["action"],type:"object"},{additionalProperties:!1,properties:{action:{const:"ingest_transcript",type:"string"},admission:{$ref:"#/$defs/HookIngestAdmissionV1"},bytes_consumed:{format:"uint64",minimum:0,type:["integer","null"]},completed:{description:"False when the byte budget left work for a later pass.",type:"boolean"},cursor_advances:{format:"uint64",minimum:0,type:["integer","null"]},cursor_duplicates:{format:"uint64",minimum:0,type:["integer","null"]},deferred_by_byte_cap:{type:["boolean","null"]},deferred_sources:{format:"uint64",minimum:0,type:["integer","null"]},hint_outcomes:{description:"How emitted hook hints settled against the new project activity."},messages_upserted:{format:"uint64",minimum:0,type:"integer"},observation_duplicates:{format:"uint64",minimum:0,type:["integer","null"]},observations_committed:{format:"uint64",minimum:0,type:["integer","null"]},projection_duplicates:{format:"uint64",minimum:0,type:["integer","null"]},projections_completed:{format:"uint64",minimum:0,type:["integer","null"]},projections_skipped:{format:"uint64",minimum:0,type:["integer","null"]},provider:{type:"string"},records_quarantined:{format:"uint64",minimum:0,type:["integer","null"]},records_rejected:{format:"uint64",minimum:0,type:["integer","null"]},source_bytes_scanned:{format:"uint64",minimum:0,type:["integer","null"]},status:{type:"string"},user_scope:{type:"boolean"}},required:["action","provider","user_scope","completed","status","admission","messages_upserted"],type:"object"},{anyOf:[{description:"The LCM authority settled the compaction.",properties:{authority_outcome:!0,committed_state:!0,messages_upserted:{format:"uint64",minimum:0,type:"integer"},reason:{type:"string"},relation_projection_status:!0,retry_status:{type:["string","null"]},status:{type:"string"},summary_node_ids:{items:{type:"string"},type:"array"},summary_nodes_created:{format:"uint64",minimum:0,type:"integer"}},required:["status","reason","summary_nodes_created","summary_node_ids","relation_projection_status","authority_outcome","committed_state","messages_upserted"],type:"object"},{description:"The LCM authority answered without a compaction.",properties:{authority_outcome:!0,committed_state:!0,messages_upserted:{format:"uint64",minimum:0,type:"integer"},reason:{type:"string"},status:{type:"string"},summary_node_ids:{items:{type:"string"},type:"array"},summary_nodes_created:{format:"uint64",minimum:0,type:"integer"}},required:["status","reason","authority_outcome","committed_state","summary_nodes_created","summary_node_ids","messages_upserted"],type:"object"},{description:"No compaction ran: the authority is absent, the host supplied nothing\nto compact, or its summaries have no provenance.",properties:{reason:{type:"string"},relation_projection_status:!0,status:{type:"string"},summary_node_ids:{items:{type:"string"},type:"array"},summary_nodes_created:{format:"uint64",minimum:0,type:"integer"}},required:["status","reason","summary_nodes_created","summary_node_ids"],type:"object"},{description:"The host event named no session to compact.",properties:{messages_upserted:{format:"uint64",minimum:0,type:"integer"},reason:{type:"string"},status:{type:"string"}},required:["status","reason","messages_upserted"],type:"object"}],description:"A compaction hook's outcome. Variants are distinguished by the fields\nthey carry.",properties:{action:{const:"codex_compact",type:"string"}},required:["action"],type:"object"},{anyOf:[{description:"The LCM authority settled the compaction.",properties:{authority_outcome:!0,committed_state:!0,messages_upserted:{format:"uint64",minimum:0,type:"integer"},reason:{type:"string"},relation_projection_status:!0,retry_status:{type:["string","null"]},status:{type:"string"},summary_node_ids:{items:{type:"string"},type:"array"},summary_nodes_created:{format:"uint64",minimum:0,type:"integer"}},required:["status","reason","summary_nodes_created","summary_node_ids","relation_projection_status","authority_outcome","committed_state","messages_upserted"],type:"object"},{description:"The LCM authority answered without a compaction.",properties:{authority_outcome:!0,committed_state:!0,messages_upserted:{format:"uint64",minimum:0,type:"integer"},reason:{type:"string"},status:{type:"string"},summary_node_ids:{items:{type:"string"},type:"array"},summary_nodes_created:{format:"uint64",minimum:0,type:"integer"}},required:["status","reason","authority_outcome","committed_state","summary_nodes_created","summary_node_ids","messages_upserted"],type:"object"},{description:"No compaction ran: the authority is absent, the host supplied nothing\nto compact, or its summaries have no provenance.",properties:{reason:{type:"string"},relation_projection_status:!0,status:{type:"string"},summary_node_ids:{items:{type:"string"},type:"array"},summary_nodes_created:{format:"uint64",minimum:0,type:"integer"}},required:["status","reason","summary_nodes_created","summary_node_ids"],type:"object"},{description:"The host event named no session to compact.",properties:{messages_upserted:{format:"uint64",minimum:0,type:"integer"},reason:{type:"string"},status:{type:"string"}},required:["status","reason","messages_upserted"],type:"object"}],description:"A compaction hook's outcome. Variants are distinguished by the fields\nthey carry.",properties:{action:{const:"claude_compact",type:"string"}},required:["action"],type:"object"},{anyOf:[{description:"The LCM authority settled the compaction.",properties:{authority_outcome:!0,committed_state:!0,messages_upserted:{format:"uint64",minimum:0,type:"integer"},reason:{type:"string"},relation_projection_status:!0,retry_status:{type:["string","null"]},status:{type:"string"},summary_node_ids:{items:{type:"string"},type:"array"},summary_nodes_created:{format:"uint64",minimum:0,type:"integer"}},required:["status","reason","summary_nodes_created","summary_node_ids","relation_projection_status","authority_outcome","committed_state","messages_upserted"],type:"object"},{description:"The LCM authority answered without a compaction.",properties:{authority_outcome:!0,committed_state:!0,messages_upserted:{format:"uint64",minimum:0,type:"integer"},reason:{type:"string"},status:{type:"string"},summary_node_ids:{items:{type:"string"},type:"array"},summary_nodes_created:{format:"uint64",minimum:0,type:"integer"}},required:["status","reason","authority_outcome","committed_state","summary_nodes_created","summary_node_ids","messages_upserted"],type:"object"},{description:"No compaction ran: the authority is absent, the host supplied nothing\nto compact, or its summaries have no provenance.",properties:{reason:{type:"string"},relation_projection_status:!0,status:{type:"string"},summary_node_ids:{items:{type:"string"},type:"array"},summary_nodes_created:{format:"uint64",minimum:0,type:"integer"}},required:["status","reason","summary_nodes_created","summary_node_ids"],type:"object"},{description:"The host event named no session to compact.",properties:{messages_upserted:{format:"uint64",minimum:0,type:"integer"},reason:{type:"string"},status:{type:"string"}},required:["status","reason","messages_upserted"],type:"object"}],description:"A compaction hook's outcome. Variants are distinguished by the fields\nthey carry.",properties:{action:{const:"cursor_compact",type:"string"}},required:["action"],type:"object"},{additionalProperties:!1,properties:{action:{const:"hermes_receipt",type:"string"},status:{$ref:"#/$defs/HermesReceiptStatusV1"}},required:["action","status"],type:"object"},{oneOf:[{properties:{disposition:{$ref:"#/$defs/HookRuntimeDispositionV1"},status:{const:"accepted",type:"string"}},required:["status","disposition"],type:"object"},{properties:{disposition:{$ref:"#/$defs/HookRuntimeDispositionV1"},status:{const:"exact_duplicate",type:"string"}},required:["status","disposition"],type:"object"},{properties:{disposition:{$ref:"#/$defs/HookRuntimeDispositionV1"},status:{const:"rejected",type:"string"}},required:["status","disposition"],type:"object"},{properties:{status:{const:"unavailable",type:"string"}},required:["status"],type:"object"}],properties:{action:{const:"hook_v2_profile_admit",type:"string"}},required:["action"],type:"object"}],title:"HookRuntimeResultV1"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{limit:{description:"Maximum number of hotspots to return (default: 10, at most 100).",format:"uint32",minimum:0,type:["integer","null"]}},title:"HotspotsSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fF,CodeIndexConvergenceParkedV1:fL,CodeIndexStalenessStateV1:fB,HotspotV1:{additionalProperties:!1,properties:{churn:{description:"Commits touching `file` in the last 90 days. Absent when git history\ncould not be read; `0` means the file had no commits in that window.",format:"uint64",minimum:0,type:["integer","null"]},file:{type:"string"},id:{type:"string"},incoming:{format:"uint64",minimum:0,type:"integer"},kind:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},name:{type:"string"},outgoing:{format:"uint64",minimum:0,type:"integer"},total:{format:"uint64",minimum:0,type:"integer"}},required:["id","name","kind","file","line","incoming","outgoing","total"],type:"object"},PrimitiveFreshnessStateV1:_i,PrimitiveIndexingStateV1:_o,PrimitiveSearchFreshnessV1:_d},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},hotspot_count:{format:"uint64",minimum:0,type:"integer"},hotspots:{items:{$ref:"#/$defs/HotspotV1"},type:"array"},unavailable_fields:{description:"Names a measurement this result could not make. `churn` means the\nranking is connectivity alone.",items:{type:"string"},type:"array"}},required:["hotspot_count","hotspots"],title:"HotspotsResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{max_depth:{format:"uint32",minimum:0,type:["integer","null"]},node_id:{type:"string"}},required:["node_id"],title:"NodeDepthSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fF,CodeIndexConvergenceParkedV1:fL,CodeIndexStalenessStateV1:fB,ImpactNodeV1:{additionalProperties:!1,properties:{depth:{format:"uint32",minimum:0,type:"integer"},file:{type:"string"},id:{type:"string"},kind:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},name:{type:"string"}},required:["id","name","kind","file","line","depth"],type:"object"},ImpactRadiusV1:{additionalProperties:!1,properties:{complete:{type:"boolean"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},node_count:{format:"uint",minimum:0,type:"integer"},nodes:{items:{$ref:"#/$defs/ImpactNodeV1"},type:"array"},unavailable_fields:{items:{type:"string"},type:"array"}},required:["node_count","complete","unavailable_fields","nodes"],type:"object"},PrimitiveFreshnessStateV1:_i,PrimitiveIndexingStateV1:_o,PrimitiveNotFoundV1:_a,PrimitiveSearchFreshnessV1:_d,PrimitiveSymbolLocationV1:_l},$schema:"https://json-schema.org/draft/2020-12/schema",anyOf:[{$ref:"#/$defs/ImpactRadiusV1"},{$ref:"#/$defs/PrimitiveNotFoundV1"}],title:"ImpactResultV1"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{limit:{description:"Maximum number of results to return (default: 10, at most 100).",format:"uint32",minimum:0,type:["integer","null"]},path:{description:"Filter to files under this directory path (e.g. 'src/main/java').",type:["string","null"]}},title:"InheritanceDepthSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fF,CodeIndexConvergenceParkedV1:fL,CodeIndexStalenessStateV1:fB,InheritanceDepthEntryV1:{additionalProperties:!1,properties:{depth:{format:"uint64",minimum:0,type:"integer"},file:{type:"string"},id:{type:"string"},kind:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},name:{type:"string"}},required:["id","name","kind","file","line","depth"],type:"object"},PrimitiveFreshnessStateV1:_i,PrimitiveIndexingStateV1:_o,PrimitiveSearchFreshnessV1:_d},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},ranking:{items:{$ref:"#/$defs/InheritanceDepthEntryV1"},type:"array"},result_count:{format:"uint64",minimum:0,type:"integer"}},required:["result_count","ranking"],title:"InheritanceDepthResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Exact public input accepted by `tracedecay_insert_at`.",properties:{anchor:{type:"string"},before:{default:!1,type:"boolean"},content:{type:"string"},dry_run:{default:!1,type:"boolean"},expected_state:{description:"Exact `preview_digest`/`expected_state` returned by the dry run. Apply\nre-resolves the typed plan and rejects any candidate-state drift.",type:["string","null"]},idempotency_key:{type:["string","null"]},path:{type:"string"},verify:{default:!1,type:"boolean"}},required:["path","anchor","content"],title:"InsertAtSurfaceRequestV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Exact public input accepted by `tracedecay_insert_at_symbol`.",properties:{content:{type:"string"},dry_run:{default:!1,type:"boolean"},expected_state:{description:"Exact `preview_digest`/`expected_state` returned by the dry run. Apply\nre-resolves the typed plan and rejects any candidate-state drift.",type:["string","null"]},idempotency_key:{type:["string","null"]},position:{default:"after",type:"string"},symbol:{type:"string"},verify:{default:!1,type:"boolean"}},required:["symbol","content"],title:"InsertAtSymbolSurfaceRequestV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{limit:{description:"Maximum number of results to return (default: 10, at most 100).",format:"uint32",minimum:0,type:["integer","null"]},node_kind:{description:"Filter by node kind (e.g. 'class', 'method', 'function', 'interface',\n'enum', 'struct').",type:["string","null"]},path:{description:"Filter to files under this directory path (e.g. 'src/main/java').",type:["string","null"]}},title:"LargestSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fF,CodeIndexConvergenceParkedV1:fL,CodeIndexStalenessStateV1:fB,LargestEntryV1:{additionalProperties:!1,properties:{end_line:{format:"uint32",minimum:0,type:"integer"},file:{type:"string"},id:{type:"string"},kind:{type:"string"},lines:{format:"uint32",minimum:0,type:"integer"},name:{type:"string"},start_line:{format:"uint32",minimum:0,type:"integer"}},required:["id","name","kind","file","start_line","end_line","lines"],type:"object"},PrimitiveFreshnessStateV1:_i,PrimitiveIndexingStateV1:_o,PrimitiveSearchFreshnessV1:_d},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},node_kind_filter:{type:["string","null"]},ranking:{items:{$ref:"#/$defs/LargestEntryV1"},type:"array"},result_count:{format:"uint64",minimum:0,type:"integer"}},required:["result_count","ranking"],title:"LargestResultV1",type:"object"},{$defs:{LcmDescribeTargetV1:{oneOf:[{properties:{kind:{const:"session",type:"string"}},required:["kind"],type:"object"},{properties:{kind:{const:"summary_node",type:"string"},node_id:{type:"string"}},required:["kind","node_id"],type:"object"},{properties:{kind:{const:"external_payload",type:"string"},payload_ref:{type:"string"}},required:["kind","payload_ref"],type:"object"}]}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{provider:{type:"string"},session_id:{type:"string"},target:{anyOf:[{$ref:"#/$defs/LcmDescribeTargetV1"},{type:"null"}]}},required:["provider","session_id"],title:"LcmDescribeRequestV1",type:"object"},{$defs:{ClosedUtcIntervalV1:fW,CompactLineageEdgeV1:{additionalProperties:!1,properties:{authority:{type:"string"},authorized:{type:"boolean"},kind:{type:"string"},knowledge_at:{format:"int64",type:"integer"},object_anchor_id:{type:"string"},subject_anchor_id:{type:"string"},supporting_anchor_ids:{items:{type:"string"},type:"array"}},required:["kind","subject_anchor_id","object_anchor_id","knowledge_at","authority","authorized","supporting_anchor_ids"],type:"object"},HydrationStateResultV1:gi,LcmContentRangeV1:gd,LcmDescribeExternalPayloadV1:{additionalProperties:!1,properties:{byte_count:{format:"uint64",minimum:0,type:"integer"},char_count:{format:"uint64",minimum:0,type:"integer"},content_hash:{type:"string"},content_preview:{type:"string"},created_at:{format:"int64",type:"integer"},kind:{type:"string"},message_id:{type:"string"},metadata_json:{type:["string","null"]},payload_ref:{type:"string"},provider:{type:"string"},session_id:{type:"string"}},required:["payload_ref","provider","session_id","message_id","kind","content_hash","byte_count","char_count","created_at","content_preview"],type:"object"},LcmDescribeSourceOverviewV1:{additionalProperties:!1,properties:{expand_hint:{type:["string","null"]},node_id:{type:["string","null"]},role:{type:["string","null"]},source_kind:{type:"string"},source_ref:{$ref:"#/$defs/LcmSourceRefV1"},source_token_count:{format:"int64",type:["integer","null"]},storage_kind:{anyOf:[{$ref:"#/$defs/LcmStorageKindV1"},{type:"null"}]},store_id:{format:"int64",type:["integer","null"]},summary_token_count:{format:"int64",type:["integer","null"]}},required:["source_kind","source_ref"],type:"object"},LcmDescribeSummaryNodeV1:{additionalProperties:!1,properties:{children:{items:{$ref:"#/$defs/LcmDescribeSourceOverviewV1"},type:"array"},conversation_id:{type:"string"},created_at:{format:"int64",type:"integer"},depth:{format:"int64",type:"integer"},expand_hint:{type:["string","null"]},metadata_json:{type:["string","null"]},node_id:{type:"string"},source_count:{format:"uint",minimum:0,type:"integer"},source_time_end:{format:"int64",type:["integer","null"]},source_time_start:{format:"int64",type:["integer","null"]},source_token_count:{format:"int64",type:"integer"},summary_token_count:{format:"int64",type:"integer"}},required:["node_id","conversation_id","depth","summary_token_count","source_token_count","created_at","source_count","children"],type:"object"},LcmDescriptionV1:{additionalProperties:!1,properties:{external_payload:{anyOf:[{$ref:"#/$defs/LcmDescribeExternalPayloadV1"},{type:"null"}]},external_payload_count:{format:"int64",type:"integer"},first_store_id:{format:"int64",type:["integer","null"]},last_store_id:{format:"int64",type:["integer","null"]},provider:{type:"string"},raw_message_count:{format:"int64",type:"integer"},raw_messages:{items:{$ref:"#/$defs/LcmRawMessageOverviewV1"},type:"array"},session_id:{type:"string"},session_token_estimate:{format:"int64",type:["integer","null"]},summary_node:{anyOf:[{$ref:"#/$defs/LcmDescribeSummaryNodeV1"},{type:"null"}]},summary_node_count:{format:"int64",type:"integer"},summary_nodes:{items:{$ref:"#/$defs/LcmSummaryNodeOverviewV1"},type:"array"},target:{type:"string"},unpublished_message_count:{description:"Raw messages the session's active temporal generation has not\npublished; transcript reads cannot page them yet.",format:"int64",type:"integer"}},required:["target","provider","session_id","raw_message_count","unpublished_message_count","summary_node_count","external_payload_count","raw_messages","summary_nodes"],type:"object"},LcmRawMessageOverviewV1:{additionalProperties:!1,properties:{content_preview:{type:"string"},content_range:{$ref:"#/$defs/LcmContentRangeV1"},message_id:{type:"string"},payload_ref:{type:["string","null"]},role:{type:"string"},storage_kind:{$ref:"#/$defs/LcmStorageKindV1"},store_id:{format:"int64",type:"integer"}},required:["message_id","store_id","role","storage_kind","content_preview","content_range"],type:"object"},LcmRetrievalOutcomeV1:gf,LcmSourceRefV1:gh,LcmStorageKindV1:gy,LcmSummaryNodeOverviewV1:{additionalProperties:!1,properties:{conversation_id:{type:"string"},created_at:{format:"int64",type:"integer"},depth:{format:"int64",type:"integer"},node_id:{type:"string"},source_count:{format:"uint",minimum:0,type:"integer"},summary_preview:{type:"string"}},required:["node_id","conversation_id","depth","summary_preview","source_count","created_at"],type:"object"},LcmTemporalFieldsV1:gb,RetainedErrorV1:_G,RetainedOutcomeStatusV1:_B,RetrievalWorkerStatusV1:_Y,SessionCoverageIntervalV1:vh,SessionCoverageReasonV1:vy,SessionCoverageRequestV1:vg,SessionCoverageStateV1:v_,SessionSourceCoverageV1:vP,TemporalCoverageV1:v0,TemporalExplanationV1:v2,TemporalFreshnessV1:v4,TemporalModeV1:v6,TemporalOmissionV1:v3,TemporalWatermarksV1:v9,UtcMicros:bs,ValidCoverageIntervalV1:bd},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{capped_sessions:{additionalProperties:{format:"uint",minimum:0,type:"integer"},type:["object","null"]},description:{anyOf:[{$ref:"#/$defs/LcmDescriptionV1"},{type:"null"}]},error:{anyOf:[{$ref:"#/$defs/RetainedErrorV1"},{type:"null"}]},grain:{type:["string","null"]},lineage:{items:{$ref:"#/$defs/CompactLineageEdgeV1"},type:["array","null"]},omitted:{format:"uint64",minimum:0,type:["integer","null"]},provider:{type:["string","null"]},retrieval:{anyOf:[{$ref:"#/$defs/LcmRetrievalOutcomeV1"},{type:"null"}]},service_status:{anyOf:[{$ref:"#/$defs/RetrievalWorkerStatusV1"},{type:"null"}]},session_id:{type:["string","null"]},state:{anyOf:[{$ref:"#/$defs/HydrationStateResultV1"},{type:"null"}]},status:{$ref:"#/$defs/RetainedOutcomeStatusV1"},temporal:{anyOf:[{$ref:"#/$defs/LcmTemporalFieldsV1"},{type:"null"}]}},required:["status"],title:"LcmDescribeResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,title:"LcmDoctorRequestV1",type:"object"},{$defs:{LcmAuthorityOutcomeV1:gs,LcmConvergenceStateV1:gc,LcmConvergenceV1:gl,LcmDoctorFindingKindV1:{enum:["trigger_audit_drift","occurrence_fts_corruption","summary_fts_corruption","missing_anchor","missing_receipt","invalid_generation","multi_active_generation","cursor_chain_absent","cursor_key_absent","ownership_drift","stuck_refresh","stuck_binding","stuck_progress","stuck_receipt","migration_gap","compatibility_drift","relation_graph_unavailable","relation_graph_corruption","relation_graph_cycle","stale_summary_closure"],type:"string"},LcmDoctorFindingV1:{additionalProperties:!1,properties:{count:{format:"uint64",minimum:0,type:"integer"},kind:{$ref:"#/$defs/LcmDoctorFindingKindV1"}},required:["kind","count"],type:"object"},LcmDoctorHealthStatusV1:{enum:["complete","partial","unavailable","locked"],type:"string"},LcmDoctorHealthV1:{additionalProperties:!1,properties:{findings:{items:{$ref:"#/$defs/LcmDoctorFindingV1"},type:"array"},reason:{type:["string","null"]},status:{$ref:"#/$defs/LcmDoctorHealthStatusV1"}},required:["status","findings"],type:"object"},LcmDoctorProjectionStateV1:gp,LcmDoctorProjectionV1:gu,RetainedOutcomeStatusV1:_B,RetrievalWorkerStatusV1:_Y},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{authority_outcome:{$ref:"#/$defs/LcmAuthorityOutcomeV1"},health:{anyOf:[{$ref:"#/$defs/LcmDoctorHealthV1"},{type:"null"}]},projection:{anyOf:[{$ref:"#/$defs/LcmDoctorProjectionV1"},{type:"null"}],description:"Absent when the diagnosed store has no refresh worker (profile mounts)."},reason:{type:["string","null"]},status:{$ref:"#/$defs/RetainedOutcomeStatusV1"}},required:["status","authority_outcome"],title:"LcmDoctorResultV1",type:"object"},{$defs:{LcmExpandTargetV1:{oneOf:[{properties:{kind:{const:"canonical_occurrence",type:"string"},message_id:{type:"string"}},required:["kind","message_id"],type:"object"},{properties:{kind:{const:"raw_message",type:"string"},store_id:{format:"uint64",minimum:0,type:"integer"}},required:["kind","store_id"],type:"object"},{properties:{kind:{const:"summary_node",type:"string"},node_id:{type:"string"}},required:["kind","node_id"],type:"object"},{properties:{kind:{const:"external_payload",type:"string"},payload_ref:{type:"string"}},required:["kind","payload_ref"],type:"object"}]}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{content_limit:{format:"uint64",minimum:0,type:["integer","null"]},content_offset:{format:"uint64",minimum:0,type:["integer","null"]},cursor:{type:["string","null"]},provider:{type:"string"},session_id:{type:"string"},source_limit:{format:"uint64",minimum:0,type:["integer","null"]},target:{$ref:"#/$defs/LcmExpandTargetV1"}},required:["provider","session_id","target"],title:"LcmExpandRequestV1",type:"object"},{$defs:{ClosedUtcIntervalV1:fW,HydrationStateResultV1:gi,LcmContentRangeV1:gd,LcmExpandedSourceV1:{additionalProperties:!1,properties:{content:{type:"string"},content_range:{anyOf:[{$ref:"#/$defs/LcmContentRangeV1"},{type:"null"}]},content_truncated:{type:"boolean"},raw_message:{anyOf:[{$ref:"#/$defs/LcmRawMessageV1"},{type:"null"}]},raw_message_metadata:{anyOf:[{$ref:"#/$defs/LcmRawMessageMetadataV1"},{type:"null"}]},source_ref:{$ref:"#/$defs/LcmSourceRefV1"},state:{$ref:"#/$defs/HydrationStateResultV1"},summary_node:{anyOf:[{$ref:"#/$defs/LcmSummaryNodeV1"},{type:"null"}]}},required:["source_ref","state","content","content_truncated"],type:"object"},LcmExpansionV1:{additionalProperties:!1,properties:{content:{type:"string"},content_range:{$ref:"#/$defs/LcmContentRangeV1"},from_current_session:{type:["boolean","null"]},kind:{type:"string"},payload_ref:{type:["string","null"]},raw_message:{anyOf:[{$ref:"#/$defs/LcmRawMessageV1"},{type:"null"}]},raw_message_metadata:{anyOf:[{$ref:"#/$defs/LcmRawMessageMetadataV1"},{type:"null"}]},source_pagination:{anyOf:[{$ref:"#/$defs/LcmSourcePaginationV1"},{type:"null"}]},summary_node:{anyOf:[{$ref:"#/$defs/LcmSummaryNodeV1"},{type:"null"}]},summary_sources:{items:{$ref:"#/$defs/LcmExpandedSourceV1"},type:"array"}},required:["kind","content","content_range","summary_sources"],type:"object"},LcmRawMessageMetadataV1:{additionalProperties:!1,properties:{content_hash:{type:"string"},message_id:{type:"string"},metadata_json:{type:["string","null"]},ordinal:{format:"int64",type:"integer"},payload_ref:{type:["string","null"]},provider:{type:"string"},role:{type:"string"},session_id:{type:"string"},storage_kind:{$ref:"#/$defs/LcmStorageKindV1"},store_id:{format:"int64",type:"integer"},timestamp:{format:"int64",type:["integer","null"]}},required:["provider","message_id","session_id","store_id","role","ordinal","content_hash","storage_kind"],type:"object"},LcmRawMessageV1:gm,LcmRetrievalOutcomeV1:gf,LcmSourcePaginationV1:{additionalProperties:!1,properties:{has_more:{type:"boolean"},remaining_sources:{format:"uint",minimum:0,type:"integer"},returned_sources:{format:"uint",minimum:0,type:"integer"},source_limit:{format:"uint",minimum:0,type:"integer"},total_sources:{format:"uint",minimum:0,type:"integer"}},required:["source_limit","returned_sources","total_sources","has_more","remaining_sources"],type:"object"},LcmSourceRefV1:gh,LcmStorageKindV1:gy,LcmSummaryNodeV1:gv,LcmTemporalFieldsV1:gb,RetainedErrorV1:_G,RetainedOutcomeStatusV1:_B,RetrievalWorkerStatusV1:_Y,SessionCoverageIntervalV1:vh,SessionCoverageReasonV1:vy,SessionCoverageRequestV1:vg,SessionCoverageStateV1:v_,SessionSourceCoverageV1:vP,TemporalCoverageV1:v0,TemporalExplanationV1:v2,TemporalFreshnessV1:v4,TemporalModeV1:v6,TemporalOmissionV1:v3,TemporalWatermarksV1:v9,UtcMicros:bs,ValidCoverageIntervalV1:bd},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{capped_sessions:{additionalProperties:{format:"uint",minimum:0,type:"integer"},type:["object","null"]},error:{anyOf:[{$ref:"#/$defs/RetainedErrorV1"},{type:"null"}]},expansion:{anyOf:[{$ref:"#/$defs/LcmExpansionV1"},{type:"null"}]},grain:{type:["string","null"]},omitted:{format:"uint64",minimum:0,type:["integer","null"]},provider:{type:["string","null"]},retrieval:{anyOf:[{$ref:"#/$defs/LcmRetrievalOutcomeV1"},{type:"null"}]},service_status:{anyOf:[{$ref:"#/$defs/RetrievalWorkerStatusV1"},{type:"null"}]},session_id:{type:["string","null"]},state:{anyOf:[{$ref:"#/$defs/HydrationStateResultV1"},{type:"null"}]},status:{$ref:"#/$defs/RetainedOutcomeStatusV1"},temporal:{anyOf:[{$ref:"#/$defs/LcmTemporalFieldsV1"},{type:"null"}]}},required:["status"],title:"LcmExpandResultV1",type:"object"},{$defs:{LcmNodeIdV1:{anyOf:[{type:"string"},{format:"uint64",minimum:0,type:"integer"}]}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{context_max_tokens:{format:"uint64",minimum:0,type:["integer","null"]},cursor:{type:["string","null"]},max_results:{format:"uint64",minimum:0,type:["integer","null"]},max_tokens:{format:"uint64",minimum:0,type:["integer","null"]},node_ids:{items:{$ref:"#/$defs/LcmNodeIdV1"},type:["array","null"]},prompt:{type:"string"},provider:{type:"string"},query:{type:["string","null"]},session_id:{type:"string"}},required:["provider","session_id","prompt"],title:"LcmExpandQueryRequestV1",type:"object"},{$defs:{ClosedUtcIntervalV1:fW,HydrationStateResultV1:gi,LcmContentRangeV1:gd,LcmExpandQueryBudgetV1:{additionalProperties:!1,properties:{requested_max_chars:{format:"uint",minimum:0,type:"integer"},used_chars:{format:"uint",minimum:0,type:"integer"}},required:["requested_max_chars","used_chars"],type:"object"},LcmExpandQueryContextBlockV1:{additionalProperties:!1,properties:{content:{type:"string"},content_range:{$ref:"#/$defs/LcmContentRangeV1"},kind:{type:"string"},node_id:{type:["string","null"]},raw_message:{anyOf:[{$ref:"#/$defs/LcmRawMessageV1"},{type:"null"}]},source_ref:{anyOf:[{$ref:"#/$defs/LcmSourceRefV1"},{type:"null"}]},summary_node:{anyOf:[{$ref:"#/$defs/LcmSummaryNodeV1"},{type:"null"}]}},required:["kind","content","content_range"],type:"object"},LcmExpandQueryMatchV1:{additionalProperties:!1,properties:{kind:{type:"string"},node_id:{type:["string","null"]},snippet:{type:"string"},store_id:{format:"int64",type:["integer","null"]}},required:["kind","snippet"],type:"object"},LcmExpandQueryPaginationV1:{additionalProperties:!1,properties:{has_more:{type:"boolean"},kind:{type:"string"},next_content_offset:{format:"uint64",minimum:0,type:["integer","null"]},node_id:{type:["string","null"]},source_ref:{anyOf:[{$ref:"#/$defs/LcmSourceRefV1"},{type:"null"}]},state:{anyOf:[{$ref:"#/$defs/HydrationStateResultV1"},{type:"null"}]}},required:["kind","has_more"],type:"object"},LcmExpandQuerySynthesisPromptV1:{additionalProperties:!1,properties:{system:{type:"string"},user:{type:"string"},user_prompt_truncated_for_mcp:{type:["boolean","null"]}},required:["system","user"],type:"object"},LcmRawMessageV1:gm,LcmSourceRefV1:gh,LcmStorageKindV1:gy,LcmSummaryNodeV1:gv,LcmTemporalFieldsV1:gb,RetainedErrorV1:_G,RetainedOutcomeStatusV1:_B,RetrievalWorkerStatusV1:_Y,SessionCoverageIntervalV1:vh,SessionCoverageReasonV1:vy,SessionCoverageRequestV1:vg,SessionCoverageStateV1:v_,SessionSourceCoverageV1:vP,TemporalCoverageV1:v0,TemporalExplanationV1:v2,TemporalModeV1:v6,TemporalOmissionV1:v3,TemporalWatermarksV1:v9,UtcMicros:bs,ValidCoverageIntervalV1:bd},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{answer:{type:["string","null"]},capped_sessions:{additionalProperties:{format:"uint",minimum:0,type:"integer"},type:["object","null"]},context_blocks:{items:{$ref:"#/$defs/LcmExpandQueryContextBlockV1"},type:"array"},context_budget:{anyOf:[{$ref:"#/$defs/LcmExpandQueryBudgetV1"},{type:"null"}]},context_max_tokens:{format:"uint",minimum:0,type:["integer","null"]},context_pagination:{items:{$ref:"#/$defs/LcmExpandQueryPaginationV1"},type:["array","null"]},context_truncated:{type:["boolean","null"]},contract_truncated:{type:["boolean","null"]},error:{anyOf:[{$ref:"#/$defs/RetainedErrorV1"},{type:"null"}]},matches:{items:{$ref:"#/$defs/LcmExpandQueryMatchV1"},type:["array","null"]},max_tokens:{format:"uint",minimum:0,type:["integer","null"]},mcp_response_truncated:{type:["boolean","null"]},mcp_truncation_reason:{type:["string","null"]},needs_synthesis:{type:["boolean","null"]},node_ids:{items:{type:"string"},type:["array","null"]},omitted:{format:"uint64",minimum:0,type:["integer","null"]},prompt:{type:["string","null"]},prompt_truncated_for_mcp:{type:["boolean","null"]},provider:{type:["string","null"]},query:{type:["string","null"]},query_truncated_for_mcp:{type:["boolean","null"]},service_status:{anyOf:[{$ref:"#/$defs/RetrievalWorkerStatusV1"},{type:"null"}]},session_id:{type:["string","null"]},status:{$ref:"#/$defs/RetainedOutcomeStatusV1"},synthesis_prompt:{anyOf:[{$ref:"#/$defs/LcmExpandQuerySynthesisPromptV1"},{type:"null"}]},temporal:{anyOf:[{$ref:"#/$defs/LcmTemporalFieldsV1"},{type:"null"}]}},required:["status","context_blocks"],title:"LcmExpandQueryResultV1",type:"object"},{$defs:{LcmGrepSortV1:{enum:["recency","relevance","hybrid"],type:"string"},LcmRoleV1:{enum:["system","user","assistant","tool","unknown"],type:"string"},LcmSearchScopeV1:{enum:["current","session","all"],type:"string"},MessageRelationshipScopeV1:gO,MessageTypeFilterV1:gE,RetainedTimeFilterV1:_K,TemporalModeV1:v6,UtcMicros:bs},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{branch:{type:["string","null"]},commit:{type:["string","null"]},cursor:{type:["string","null"]},end_time:{anyOf:[{$ref:"#/$defs/RetainedTimeFilterV1"},{type:"null"}]},include_summaries:{type:["boolean","null"]},limit:{format:"uint64",minimum:0,type:["integer","null"]},message_type:{anyOf:[{$ref:"#/$defs/MessageTypeFilterV1"},{type:"null"}]},provider:{type:["string","null"]},query:{type:"string"},relationship_scope:{anyOf:[{$ref:"#/$defs/MessageRelationshipScopeV1"},{type:"null"}]},role:{anyOf:[{$ref:"#/$defs/LcmRoleV1"},{type:"null"}]},scope:{anyOf:[{$ref:"#/$defs/LcmSearchScopeV1"},{type:"null"}]},session_id:{type:["string","null"]},since:{anyOf:[{$ref:"#/$defs/RetainedTimeFilterV1"},{type:"null"}]},sort:{anyOf:[{$ref:"#/$defs/LcmGrepSortV1"},{type:"null"}]},source:{type:["string","null"]},start_time:{anyOf:[{$ref:"#/$defs/RetainedTimeFilterV1"},{type:"null"}]},temporal_mode:{anyOf:[{$ref:"#/$defs/TemporalModeV1"},{type:"null"}]},until:{anyOf:[{$ref:"#/$defs/RetainedTimeFilterV1"},{type:"null"}]},worktree:{type:["string","null"]}},required:["query"],title:"LcmGrepRequestV1",type:"object"},{$defs:{ClosedUtcIntervalV1:fW,HydrationStateResultV1:gi,LcmGrepHitV1:{additionalProperties:!1,properties:{kind:{type:"string"},message_id:{type:["string","null"]},node_id:{type:["string","null"]},provider:{type:"string"},role:{type:["string","null"]},score:{format:"double",type:"number"},session_id:{type:"string"},snippet:{type:"string"},store_id:{format:"int64",type:["integer","null"]}},required:["kind","provider","session_id","snippet","score"],type:"object"},LcmTemporalFieldsV1:gb,RetainedErrorV1:_G,RetainedOutcomeStatusV1:_B,RetrievalWorkerStatusV1:_Y,SessionCoverageIntervalV1:vh,SessionCoverageReasonV1:vy,SessionCoverageRequestV1:vg,SessionCoverageStateV1:v_,SessionSourceCoverageV1:vP,TemporalCoverageV1:v0,TemporalExplanationV1:v2,TemporalModeV1:v6,TemporalOmissionV1:v3,TemporalWatermarksV1:v9,UtcMicros:bs,ValidCoverageIntervalV1:bd},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{capped_sessions:{additionalProperties:{format:"uint",minimum:0,type:"integer"},type:["object","null"]},count:{format:"uint",minimum:0,type:["integer","null"]},error:{anyOf:[{$ref:"#/$defs/RetainedErrorV1"},{type:"null"}]},hits:{items:{$ref:"#/$defs/LcmGrepHitV1"},type:"array"},message_type:{type:["string","null"]},omitted:{format:"uint64",minimum:0,type:["integer","null"]},provider:{type:["string","null"]},query:{type:["string","null"]},relationship_scope:{type:["string","null"]},service_status:{anyOf:[{$ref:"#/$defs/RetrievalWorkerStatusV1"},{type:"null"}]},sort:{type:["string","null"]},status:{$ref:"#/$defs/RetainedOutcomeStatusV1"},temporal:{anyOf:[{$ref:"#/$defs/LcmTemporalFieldsV1"},{type:"null"}]}},required:["status","hits"],title:"LcmGrepResultV1",type:"object"},{$defs:{TemporalModeV1:v6,UtcMicros:bs},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{content_limit:{format:"uint64",minimum:0,type:["integer","null"]},content_offset:{format:"uint64",minimum:0,type:["integer","null"]},cursor:{type:["string","null"]},end_time:{format:"uint64",minimum:0,type:["integer","null"]},limit:{format:"uint64",minimum:0,type:["integer","null"]},provider:{type:["string","null"]},role:{type:["string","null"]},roles:{items:{type:"string"},type:["array","null"]},session_id:{type:"string"},start_time:{format:"uint64",minimum:0,type:["integer","null"]},temporal_mode:{anyOf:[{$ref:"#/$defs/TemporalModeV1"},{type:"null"}]}},required:["session_id"],title:"LcmLoadSessionRequestV1",type:"object"},{$defs:{ClosedUtcIntervalV1:fW,HydrationStateResultV1:gi,LcmContentRangeV1:gd,LcmMessageV1:{additionalProperties:!1,properties:{content:{type:"string"},content_hash:{type:["string","null"]},content_range:{$ref:"#/$defs/LcmContentRangeV1"},message_id:{type:"string"},metadata_json:{type:["string","null"]},ordinal:{format:"int64",type:"integer"},payload_ref:{type:["string","null"]},provider:{type:"string"},role:{type:"string"},session_id:{type:"string"},storage_kind:{$ref:"#/$defs/LcmStorageKindV1"},store_id:{format:"int64",type:["integer","null"]},timestamp:{format:"int64",type:["integer","null"]}},required:["provider","message_id","session_id","role","ordinal","content","content_range","storage_kind"],type:"object"},LcmStorageKindV1:gy,LcmTemporalFieldsV1:gb,RetainedErrorV1:_G,RetainedOutcomeStatusV1:_B,RetrievalWorkerStatusV1:_Y,SessionCoverageIntervalV1:vh,SessionCoverageReasonV1:vy,SessionCoverageRequestV1:vg,SessionCoverageStateV1:v_,SessionSourceCoverageV1:vP,TemporalCoverageV1:v0,TemporalExplanationV1:v2,TemporalModeV1:v6,TemporalOmissionV1:v3,TemporalWatermarksV1:v9,UtcMicros:bs,ValidCoverageIntervalV1:bd},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{capped_sessions:{additionalProperties:{format:"uint",minimum:0,type:"integer"},type:["object","null"]},content_limit:{format:"uint",minimum:0,type:["integer","null"]},content_limit_clamped_from:{format:"uint",minimum:0,type:["integer","null"]},error:{anyOf:[{$ref:"#/$defs/RetainedErrorV1"},{type:"null"}]},messages:{items:{$ref:"#/$defs/LcmMessageV1"},type:"array"},omitted:{format:"uint64",minimum:0,type:["integer","null"]},provider:{type:["string","null"]},service_status:{anyOf:[{$ref:"#/$defs/RetrievalWorkerStatusV1"},{type:"null"}]},session_id:{type:["string","null"]},status:{$ref:"#/$defs/RetainedOutcomeStatusV1"},temporal:{anyOf:[{$ref:"#/$defs/LcmTemporalFieldsV1"},{type:"null"}]}},required:["status","messages"],title:"LcmLoadSessionResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{deep:{type:["boolean","null"]},provider:{type:["string","null"]},session_id:{type:["string","null"]}},title:"LcmStatusRequestV1",type:"object"},{$defs:{LcmAuthorityOutcomeV1:gs,LcmConfigStatusV1:{additionalProperties:!1,properties:{compression_boundary_cooldown_seconds:{format:"int64",type:"integer"},fresh_tail_count:{format:"uint",minimum:0,type:"integer"},summary_fan_in:{format:"uint",minimum:0,type:"integer"}},required:["fresh_tail_count","summary_fan_in","compression_boundary_cooldown_seconds"],type:"object"},LcmConvergenceStateV1:gc,LcmConvergenceV1:gl,LcmDagDepthStatusV1:{additionalProperties:!1,properties:{count:{format:"int64",type:"integer"},source_tokens:{format:"int64",type:"integer"},tokens:{format:"int64",type:"integer"}},required:["count","tokens","source_tokens"],type:"object"},LcmDagStatusV1:{additionalProperties:!1,properties:{compression_ratio:{type:"string"},depths:{additionalProperties:{$ref:"#/$defs/LcmDagDepthStatusV1"},type:"object"},total_nodes:{format:"int64",type:"integer"},total_source_tokens:{format:"int64",type:"integer"},total_tokens:{format:"int64",type:"integer"}},required:["total_nodes","total_tokens","total_source_tokens","compression_ratio","depths"],type:"object"},LcmDoctorProjectionStateV1:gp,LcmDoctorProjectionV1:gu,LcmLifecycleStatusV1:{additionalProperties:!1,properties:{current_frontier_store_id:{format:"int64",type:["integer","null"]},current_session_id:{type:["string","null"]},frontier_count:{format:"int64",type:"integer"},last_finalized_frontier_store_id:{format:"int64",type:["integer","null"]},last_finalized_session_id:{type:["string","null"]},lifecycle_state_count:{format:"int64",type:"integer"},maintenance_debt_count:{format:"int64",type:"integer"}},required:["lifecycle_state_count","frontier_count","maintenance_debt_count"],type:"object"},LcmPayloadCoverageStateV1:{enum:["complete","partial"],type:"string"},LcmPayloadCoverageV1:{additionalProperties:!1,properties:{reason:{type:["string","null"]},scanned_files:{format:"int64",type:"integer"},scanned_metadata_refs:{format:"int64",type:"integer"},state:{$ref:"#/$defs/LcmPayloadCoverageStateV1"}},required:["state","scanned_metadata_refs","scanned_files"],type:"object"},LcmPayloadGcStatusV1:{additionalProperties:!1,properties:{grace_seconds:{format:"int64",type:"integer"},last_gc_at:{format:"int64",type:["integer","null"]},last_gc_duration_ms:{format:"uint64",minimum:0,type:["integer","null"]},last_gc_error:{type:["string","null"]},last_gc_status:{type:["string","null"]},last_reaped_bytes:{format:"uint64",minimum:0,type:["integer","null"]},last_reaped_refs:{format:"int64",type:["integer","null"]},next_run_eligible_at:{format:"int64",type:["integer","null"]},reap_missing_metadata_after_seconds:{format:"int64",type:"integer"}},required:["grace_seconds","reap_missing_metadata_after_seconds"],type:"object"},LcmPayloadStatusV1:{additionalProperties:!1,properties:{coverage:{$ref:"#/$defs/LcmPayloadCoverageV1"},externalized_count:{format:"int64",type:"integer"},gc_candidate_count:{format:"int64",type:"integer"},integrity_mismatch_count:{format:"int64",type:["integer","null"]},missing_count:{format:"int64",type:"integer"},missing_placeholder_file_count:{format:"int64",type:"integer"},missing_placeholder_metadata_count:{format:"int64",type:"integer"},orphan_file_bytes:{format:"uint64",minimum:0,type:"integer"},orphan_file_count:{format:"int64",type:"integer"},placeholder_ref_count:{format:"int64",type:"integer"},reclaimable_bytes:{format:"uint64",minimum:0,type:"integer"},reclaimable_bytes_after_grace:{format:"uint64",minimum:0,type:"integer"},referenced_bytes:{format:"uint64",minimum:0,type:"integer"},referenced_count:{format:"int64",type:"integer"},root_contained:{type:"boolean"},tombstoned_count:{format:"int64",type:"integer"},total_bytes:{format:"uint64",minimum:0,type:"integer"},unreferenced_count:{format:"int64",type:"integer"}},required:["coverage","externalized_count","missing_count","unreferenced_count","placeholder_ref_count","missing_placeholder_metadata_count","missing_placeholder_file_count","gc_candidate_count","root_contained","orphan_file_count","tombstoned_count","referenced_count","total_bytes","referenced_bytes","orphan_file_bytes","reclaimable_bytes","reclaimable_bytes_after_grace"],type:"object"},LcmRedactionStatusV1:{additionalProperties:!1,properties:{enabled:{type:"boolean"},lossy_records:{format:"int64",type:"integer"}},required:["enabled","lossy_records"],type:"object"},LcmStatusV1:{additionalProperties:!1,properties:{config:{$ref:"#/$defs/LcmConfigStatusV1"},dag:{$ref:"#/$defs/LcmDagStatusV1"},external_payload_count:{format:"int64",type:"integer"},lifecycle:{$ref:"#/$defs/LcmLifecycleStatusV1"},maintenance_debt_count:{format:"int64",type:"integer"},missing_payload_count:{format:"int64",type:"integer"},payload:{$ref:"#/$defs/LcmPayloadStatusV1"},payload_gc:{$ref:"#/$defs/LcmPayloadGcStatusV1"},raw_message_count:{format:"int64",type:"integer"},redaction:{$ref:"#/$defs/LcmRedactionStatusV1"},schema_version:{format:"int64",type:"integer"},store:{$ref:"#/$defs/LcmStoreStatusV1"},summary_convergence:{$ref:"#/$defs/LcmSummaryConvergenceStatusV1"},summary_node_count:{format:"int64",type:"integer"},unreferenced_payload_count:{format:"int64",type:"integer"}},required:["schema_version","raw_message_count","summary_node_count","external_payload_count","missing_payload_count","unreferenced_payload_count","maintenance_debt_count","store","dag","config","payload","payload_gc","lifecycle","summary_convergence","redaction"],type:"object"},LcmStoreStatusV1:{additionalProperties:!1,properties:{estimated_tokens:{format:"int64",type:"integer"},messages:{format:"int64",type:"integer"},token_estimate:{$ref:"#/$defs/LcmStoreTokenCoverageV1"}},required:["messages","estimated_tokens","token_estimate"],type:"object"},LcmStoreTokenCoverageV1:{additionalProperties:!1,properties:{complete:{type:"boolean"},next_after_store_id:{format:"int64",type:["integer","null"]},scanned_messages:{format:"int64",type:"integer"}},required:["complete","scanned_messages"],type:"object"},LcmSummaryConvergenceReasonV1:{additionalProperties:!1,properties:{reason:{type:"string"},session_count:{format:"int64",type:"integer"},state:{$ref:"#/$defs/LcmSummaryConvergenceStateV1"}},required:["state","reason","session_count"],type:"object"},LcmSummaryConvergenceStateV1:{enum:["pending","retryable","current","unavailable","permanent"],type:"string"},LcmSummaryConvergenceStatusV1:{additionalProperties:!1,description:"Retained-session summary convergence queue: disjoint per-state session\ncounts and the reasons parked or failed sessions record.",properties:{current_session_count:{format:"int64",type:"integer"},pending_session_count:{format:"int64",type:"integer"},permanent_session_count:{format:"int64",type:"integer"},reasons:{items:{$ref:"#/$defs/LcmSummaryConvergenceReasonV1"},type:"array"},retryable_session_count:{format:"int64",type:"integer"},unavailable_session_count:{format:"int64",type:"integer"}},required:["pending_session_count","retryable_session_count","current_session_count","unavailable_session_count","permanent_session_count","reasons"],type:"object"},RetainedOutcomeStatusV1:_B,RetrievalWorkerStatusV1:_Y},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{authority_outcome:{anyOf:[{$ref:"#/$defs/LcmAuthorityOutcomeV1"},{type:"null"}]},deep:{type:["boolean","null"]},lcm:{anyOf:[{$ref:"#/$defs/LcmStatusV1"},{type:"null"}]},message:{type:["string","null"]},projection:{anyOf:[{$ref:"#/$defs/LcmDoctorProjectionV1"},{type:"null"}],description:"The store's refresh-worker serving and convergence state. Absent when\nno refresh worker serves the store."},provider:{type:["string","null"]},reason:{type:["string","null"]},session_id:{type:["string","null"]},status:{$ref:"#/$defs/RetainedOutcomeStatusV1"}},required:["status"],title:"LcmStatusResultV1",type:"object"},{$defs:{MemoryScopeV1:gT,ProjectId:_m},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{memory_scope:{anyOf:[{$ref:"#/$defs/MemoryScopeV1"},{type:"null"}]},project_selector:{additionalProperties:!1,description:'Exact registered-project selector. Reads and fact effects run against the\nselected project.\n\nInlined so every request schema advertises the closed selector contract\n(`required: ["project_id"]`, no additional properties) directly on its\n`project_selector` property instead of behind a `$defs` reference, matching\nthe selector shape the MCP dispatch policy promises for selector-accepting\ntools.',properties:{project_id:{$ref:"#/$defs/ProjectId"}},required:["project_id"],type:["object","null"]}},title:"MemoryStatusRequestV1",type:"object"},{$defs:{FactCommitOwnerV1:h8,MemoryAlgebraV1:{additionalProperties:!1,properties:{estimated_capacity:{description:"Heuristic D / ln(D) count of bound items one vector can superpose\nbefore cosine similarity degrades. Each fact has its own vector, so\nthis is neither a limit on stored facts nor a recall guarantee.",format:"uint64",minimum:0,type:"integer"},hrr_dim:{description:"Width of each encoded vector.",format:"uint64",minimum:0,type:"integer"},name:{description:"Vector algebra the fact encodings use. Current daemons report `map_c`;\nearlier releases reported `amari_fhrr` for the same encoding.",type:"string"}},required:["name","hrr_dim","estimated_capacity"],type:"object"},MemoryFeedbackFunnelV1:{additionalProperties:!1,properties:{access_count_total:{format:"uint64",minimum:0,type:"integer"},feedback_total:{format:"uint64",minimum:0,type:"integer"},rated_fact_count:{format:"uint64",minimum:0,type:"integer"},retrieval_count_total:{format:"uint64",minimum:0,type:"integer"},retrieved_fact_count:{format:"uint64",minimum:0,type:"integer"},seen_to_feedback_ratio:{format:"uint64",minimum:0,type:["integer","null"]}},required:["retrieval_count_total","access_count_total","retrieved_fact_count","rated_fact_count","feedback_total"],type:"object"},MemoryStatusV1:{additionalProperties:!1,properties:{algebra:{$ref:"#/$defs/MemoryAlgebraV1"},below_default_recall_threshold_count:{format:"uint64",minimum:0,type:"integer"},entity_count:{format:"uint64",minimum:0,type:"integer"},fact_count:{format:"uint64",minimum:0,type:"integer"},feedback_funnel:{$ref:"#/$defs/MemoryFeedbackFunnelV1"},helpful_count:{format:"uint64",minimum:0,type:"integer"},owner:{$ref:"#/$defs/FactCommitOwnerV1"},trust_025_050_count:{format:"uint64",minimum:0,type:"integer"},trust_050_075_count:{format:"uint64",minimum:0,type:"integer"},trust_075_100_count:{format:"uint64",minimum:0,type:"integer"},trust_0_025_count:{format:"uint64",minimum:0,type:"integer"},unhelpful_count:{format:"uint64",minimum:0,type:"integer"}},required:["owner","fact_count","entity_count","algebra","trust_0_025_count","trust_025_050_count","trust_050_075_count","trust_075_100_count","below_default_recall_threshold_count","helpful_count","unhelpful_count","feedback_funnel"],type:"object"},ProjectId:_m},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{memory:{$ref:"#/$defs/MemoryStatusV1"}},required:["memory"],title:"MemoryStatusResultV1",type:"object"},{$defs:{MessageRelationshipScopeV1:gO,MessageTypeFilterV1:gE,ProjectId:_m,RetainedTimeFilterV1:_K},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Exact public input accepted by `tracedecay_message_search`.",properties:{branch:{type:["string","null"]},commit:{type:["string","null"]},cursor:{type:["string","null"]},goals:{default:!1,type:"boolean"},include_subagents:{type:["boolean","null"]},limit:{format:"uint64",minimum:0,type:["integer","null"]},message_type:{anyOf:[{$ref:"#/$defs/MessageTypeFilterV1"},{type:"null"}]},parent_session_id:{type:["string","null"]},project_key:{type:["string","null"]},project_selector:{additionalProperties:!1,description:'Exact registered-project selector. Reads and fact effects run against the\nselected project.\n\nInlined so every request schema advertises the closed selector contract\n(`required: ["project_id"]`, no additional properties) directly on its\n`project_selector` property instead of behind a `$defs` reference, matching\nthe selector shape the MCP dispatch policy promises for selector-accepting\ntools.',properties:{project_id:{$ref:"#/$defs/ProjectId"}},required:["project_id"],type:["object","null"]},provider:{type:["string","null"]},query:{type:["string","null"]},require_fresh:{description:"Freshness precondition: stale or partial coverage returns\n`refresh_required` instead of stored evidence. The read never refreshes.",type:["boolean","null"]},scope:{anyOf:[{$ref:"#/$defs/MessageRelationshipScopeV1"},{type:"null"}]},since:{anyOf:[{$ref:"#/$defs/RetainedTimeFilterV1"},{type:"null"}]},until:{anyOf:[{$ref:"#/$defs/RetainedTimeFilterV1"},{type:"null"}]},workflow_agent:{type:["string","null"]},workflow_run:{type:["string","null"]},worktree:{type:["string","null"]}},title:"MessageSearchRequestV1",type:"object"},{$defs:{ClosedUtcIntervalV1:fW,GitScopeV1:y2,HydrationStateResultV1:gi,MessageSearchHitV1:{additionalProperties:!1,properties:{message:{$ref:"#/$defs/SessionMessageV1"},project_id:{type:["string","null"]},root:{type:["string","null"]},score:{format:"double",type:"number"},session:{$ref:"#/$defs/SessionRecordV1"}},required:["session","message","score"],type:"object"},RetainedErrorV1:_G,RetainedNextActionV1:{additionalProperties:!1,properties:{action:{type:"string"},kind:{type:"string"},reason:{type:"string"},tool:{type:"string"}},required:["kind","tool","action","reason"],type:"object"},RetainedOutcomeStatusV1:_B,RetrievalWorkerStatusV1:_Y,SessionCoverageIntervalV1:vh,SessionCoverageReasonV1:vy,SessionCoverageRequestV1:vg,SessionCoverageStateV1:v_,SessionMessageV1:{additionalProperties:!1,properties:{kind:{type:["string","null"]},message_id:{type:"string"},metadata_json:{type:["string","null"]},model:{type:["string","null"]},ordinal:{format:"int64",type:"integer"},provider:{type:"string"},role:{type:"string"},session_id:{type:"string"},source_offset:{format:"int64",type:["integer","null"]},source_path:{type:["string","null"]},text:{type:"string"},timestamp:{format:"int64",type:["integer","null"]},tool_names:{type:["string","null"]}},required:["provider","message_id","session_id","role","ordinal","text"],type:"object"},SessionRecordV1:{additionalProperties:!1,properties:{agent_id:{type:["string","null"]},ended_at:{format:"int64",type:["integer","null"]},is_subagent:{type:"boolean"},metadata_json:{type:["string","null"]},parent_session_id:{type:["string","null"]},parent_tool_use_id:{type:["string","null"]},project_key:{type:"string"},project_path:{type:"string"},provider:{type:"string"},session_id:{type:"string"},started_at:{format:"int64",type:["integer","null"]},title:{type:["string","null"]},transcript_path:{type:["string","null"]}},required:["provider","session_id","project_key","project_path","is_subagent"],type:"object"},SessionSourceCoverageV1:vP,TemporalCoverageOmissionV1:{oneOf:[{properties:{detail:{type:"string"},kind:{const:"root_continuation_unavailable",type:"string"},strict_population:{$ref:"#/$defs/TemporalPopulationCountV1"}},required:["kind","strict_population","detail"],type:"object"}]},TemporalCoverageV1:v0,TemporalExplanationV1:v2,TemporalFreshnessV1:v4,TemporalMetadataV1:{additionalProperties:!1,properties:{anchors:{items:{type:"string"},type:"array"},coverage:{$ref:"#/$defs/TemporalCoverageV1"},coverage_omissions:{items:{$ref:"#/$defs/TemporalCoverageOmissionV1"},type:"array"},explanations:{items:{$ref:"#/$defs/TemporalExplanationV1"},type:"array"},freshness:{anyOf:[{$ref:"#/$defs/TemporalFreshnessV1"},{type:"null"}]},next_cursor:{type:["string","null"]},omissions:{items:{$ref:"#/$defs/TemporalOmissionV1"},type:"array"},source_coverage:{items:{$ref:"#/$defs/SessionSourceCoverageV1"},type:"array"},watermarks:{$ref:"#/$defs/TemporalWatermarksV1"}},required:["anchors","watermarks","coverage","explanations"],type:"object"},TemporalModeV1:v6,TemporalOmissionV1:v3,TemporalPopulationCountV1:{oneOf:[{properties:{count:{format:"uint64",minimum:0,type:"integer"},kind:{const:"exact",type:"string"}},required:["kind","count"],type:"object"},{properties:{count:{format:"uint64",minimum:0,type:"integer"},kind:{const:"at_least",type:"string"}},required:["kind","count"],type:"object"}]},TemporalWatermarksV1:v9,UtcMicros:bs,ValidCoverageIntervalV1:bd},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{count:{format:"uint",minimum:0,type:["integer","null"]},error:{anyOf:[{$ref:"#/$defs/RetainedErrorV1"},{type:"null"}]},git_filter:{anyOf:[{$ref:"#/$defs/GitScopeV1"},{type:"null"}]},git_filter_applied:{type:["boolean","null"]},goals:{type:"boolean"},include_subagents:{type:"boolean"},message:{type:["string","null"]},message_type:{type:"string"},next_action:{anyOf:[{$ref:"#/$defs/RetainedNextActionV1"},{type:"null"}]},omitted:{format:"uint64",minimum:0,type:["integer","null"]},outcome:{$ref:"#/$defs/RetainedOutcomeStatusV1"},parent_session_id:{type:["string","null"]},project_key:{type:["string","null"]},provider:{type:"string"},query:{type:["string","null"]},refresh_required:{type:"boolean"},requested_provider:{type:["string","null"]},require_fresh:{type:"boolean"},results:{items:{$ref:"#/$defs/MessageSearchHitV1"},type:["array","null"]},scope:{type:"string"},service_status:{anyOf:[{$ref:"#/$defs/RetrievalWorkerStatusV1"},{type:"null"}]},since:{format:"int64",type:["integer","null"]},status:{$ref:"#/$defs/RetainedOutcomeStatusV1"},store_scope:{type:["string","null"]},temporal:{anyOf:[{$ref:"#/$defs/TemporalMetadataV1"},{type:"null"}]},until:{format:"int64",type:["integer","null"]},workflow_agent:{type:["string","null"]},workflow_filter_applied:{type:["boolean","null"]},workflow_run:{type:["string","null"]},workflow_run_parent_session:{type:["string","null"]}},required:["require_fresh","goals","include_subagents","message_type","outcome","provider","refresh_required","scope","status"],title:"MessageSearchResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{path:{type:"string"}},required:["path"],title:"ModuleApiPrimitiveRequest",type:"object"},{$defs:{SymbolPrimitiveRecord:vZ},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{path:{type:"string"},symbols:{items:{$ref:"#/$defs/SymbolPrimitiveRecord"},type:"array"}},required:["path","symbols"],title:"ModuleApiPrimitiveResult",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Exact public input accepted by `tracedecay_move_symbol`.",properties:{dest_file:{type:"string"},dry_run:{default:!0,type:"boolean"},expected_state:{description:"Exact `preview_digest`/`expected_state` returned by the dry run. Apply\nre-resolves the typed plan and rejects any candidate-state drift.",type:["string","null"]},idempotency_key:{type:["string","null"]},symbol:{type:"string"}},required:["symbol","dest_file"],title:"MoveSymbolSurfaceRequestV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Exact public input accepted by `tracedecay_multi_str_replace`.",properties:{dry_run:{default:!1,type:"boolean"},expected_state:{description:"Exact `preview_digest`/`expected_state` returned by the dry run. Apply\nre-resolves the typed plan and rejects any candidate-state drift.",type:["string","null"]},idempotency_key:{type:["string","null"]},path:{type:"string"},replacements:{description:"Ordered `[old, new]` pairs, matching the existing MCP tool wire form.",items:{maxItems:2,minItems:2,prefixItems:[{type:"string"},{type:"string"}],type:"array"},type:"array"},verify:{default:!1,type:"boolean"}},required:["path","replacements"],title:"MultiStrReplaceSurfaceRequestV1",type:"object"},{$defs:{NativeIntegrationTransactionId:g1},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{transaction_id:{$ref:"#/$defs/NativeIntegrationTransactionId"}},required:["transaction_id"],title:"NativeIntegrationStatusSurfaceRequest",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{node_id:{type:"string"}},required:["node_id"],title:"NodeSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fF,CodeIndexConvergenceParkedV1:fL,CodeIndexStalenessStateV1:fB,ComplexityAnalysisV1:f1,NodeDetailsV1:{additionalProperties:!1,properties:{branches:{description:"Exact counters; `None`, and listed in `unavailable_fields`, when\n`complexity_analysis` reports the bounded walk did not cover the body.",format:"uint32",minimum:0,type:["integer","null"]},complexity_analysis:{$ref:"#/$defs/ComplexityAnalysisV1"},cost_to_expand:{$ref:"#/$defs/NodeExpansionCostV1"},cyclomatic_complexity:{format:"uint32",minimum:0,type:["integer","null"]},derives:{items:{type:"string"},type:"array"},docstring:{type:["string","null"]},end_line:{format:"uint32",minimum:0,type:"integer"},file:{type:"string"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},id:{type:"string"},is_async:{type:"boolean"},kind:{type:"string"},loops:{format:"uint32",minimum:0,type:["integer","null"]},max_nesting:{format:"uint32",minimum:0,type:["integer","null"]},name:{type:"string"},qualified_name:{type:"string"},signature:{type:["string","null"]},start_line:{format:"uint32",minimum:0,type:"integer"},unavailable_fields:{items:{type:"string"},type:"array"},visibility:{type:"string"}},required:["id","name","kind","qualified_name","file","start_line","end_line","is_async","derives","visibility","complexity_analysis","cost_to_expand","unavailable_fields"],type:"object"},NodeExpansionCostV1:g4,PrimitiveFreshnessStateV1:_i,PrimitiveIndexingStateV1:_o,PrimitiveNotFoundV1:_a,PrimitiveSearchFreshnessV1:_d,PrimitiveSymbolLocationV1:_l},$schema:"https://json-schema.org/draft/2020-12/schema",anyOf:[{$ref:"#/$defs/NodeDetailsV1"},{$ref:"#/$defs/PrimitiveNotFoundV1"}],title:"NodeResultV1"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"One project-scoped horizon for the canonical Observatory and Costs models.",properties:{window_days:{default:14,format:"uint16",maximum:365,minimum:1,type:"integer"}},title:"ObservatoryReadRequestV1",type:"object"},{$defs:{AnalyticsModeReadModelV1:mB,AnalyticsModeV1:mK,ComparisonDispositionV1:fY,CostsReadModelV1:hO,CoverageStateV1:hM,LatencyDistributionReadModelV1:ga,MetricCalibrationV1:gA,MetricCohortV1:gW,MetricCoverageV1:gM,MetricEvidenceClassV1:gN,MetricProvenanceV1:gz,MetricSourceV1:gD,MetricTemporalV1:gF,MetricUncertaintyV1:gL,MetricValueV1:gU,ObservabilityHorizonV1:g6,ObservatoryReadModelV1:g9,PerformanceComparisonReadModelV1:_r,ProviderLatencyReadModelV1:_V,RejectedArgumentAnalyticsV1:_E,RejectedArgumentErrorClassV1:_A,RejectedArgumentGroupV1:_W,RejectedArgumentNameV1:_M,RejectedArgumentSurfaceV1:_N},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Canonical project-scoped observability and costs read models.",properties:{costs:{$ref:"#/$defs/CostsReadModelV1"},observatory:{$ref:"#/$defs/ObservatoryReadModelV1"}},required:["observatory","costs"],title:"ObservatoryReadResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{kinds:{items:{type:"string"},type:["array","null"]},limit:{format:"uint32",minimum:0,type:["integer","null"]},source_dir:{type:"string"}},required:["source_dir"],title:"PortOrderSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fF,CodeIndexConvergenceParkedV1:fL,CodeIndexStalenessStateV1:fB,PortCycleAnchorV1:{additionalProperties:!1,properties:{file:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},name:{type:"string"},rationale:{type:["string","null"]}},required:["name","file","line"],type:"object"},PortCycleFileV1:{additionalProperties:!1,properties:{file:{type:"string"},members_in_cycle:{format:"uint",minimum:0,type:"integer"}},required:["file","members_in_cycle"],type:"object"},PortCycleSymbolV1:{additionalProperties:!1,properties:{file:{type:"string"},in_cycle_in_degree:{format:"uint",minimum:0,type:"integer"},in_cycle_out_degree:{format:"uint",minimum:0,type:"integer"},kind:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},name:{type:"string"}},required:["name","kind","file","line","in_cycle_out_degree","in_cycle_in_degree"],type:"object"},PortCycleV1:{additionalProperties:!1,properties:{break_point_candidate:{anyOf:[{$ref:"#/$defs/PortCycleAnchorV1"},{type:"null"}]},entry_point:{anyOf:[{$ref:"#/$defs/PortCycleAnchorV1"},{type:"null"}]},files:{items:{$ref:"#/$defs/PortCycleFileV1"},type:"array"},note:{type:"string"},size:{format:"uint",minimum:0,type:"integer"},symbols:{items:{$ref:"#/$defs/PortCycleSymbolV1"},type:"array"}},required:["size","files","symbols","note"],type:"object"},PortOrderLevelV1:{additionalProperties:!1,properties:{description:{type:"string"},level:{format:"uint",minimum:0,type:"integer"},symbols:{items:{$ref:"#/$defs/PortOrderSymbolV1"},type:"array"}},required:["level","description","symbols"],type:"object"},PortOrderSymbolV1:{additionalProperties:!1,properties:{depends_on:{items:{type:"string"},type:["array","null"]},file:{type:"string"},kind:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},name:{type:"string"}},required:["name","kind","file","line"],type:"object"},PrimitiveFreshnessStateV1:_i,PrimitiveIndexingStateV1:_o,PrimitiveSearchFreshnessV1:_d},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{cycles:{items:{$ref:"#/$defs/PortCycleV1"},type:"array"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},levels:{items:{$ref:"#/$defs/PortOrderLevelV1"},type:"array"},returned:{format:"uint",minimum:0,type:"integer"},source_dir:{type:"string"},total_symbols:{format:"uint",minimum:0,type:"integer"}},required:["source_dir","total_symbols","returned","levels","cycles"],title:"PortOrderResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{kinds:{items:{type:"string"},type:["array","null"]},source_dir:{type:"string"},target_dir:{type:"string"}},required:["source_dir","target_dir"],title:"PortStatusSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fF,CodeIndexConvergenceParkedV1:fL,CodeIndexStalenessStateV1:fB,PortMatchedSymbolV1:{additionalProperties:!1,properties:{name:{type:"string"},source_file:{type:"string"},source_kind:{type:"string"},target_file:{type:"string"},target_kind:{type:"string"}},required:["name","source_kind","target_kind","source_file","target_file"],type:"object"},PortTargetOnlySymbolV1:{additionalProperties:!1,properties:{file:{type:"string"},kind:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},name:{type:"string"}},required:["name","kind","file","line"],type:"object"},PortUnmatchedSymbolV1:{additionalProperties:!1,properties:{kind:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},name:{type:"string"}},required:["name","kind","line"],type:"object"},PrimitiveFreshnessStateV1:_i,PrimitiveIndexingStateV1:_o,PrimitiveSearchFreshnessV1:_d},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{coverage_percent:{format:"double",type:"number"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},matched:{format:"uint",minimum:0,type:"integer"},matched_symbols:{items:{$ref:"#/$defs/PortMatchedSymbolV1"},type:"array"},source_count:{format:"uint",minimum:0,type:"integer"},source_dir:{type:"string"},target_count:{format:"uint",minimum:0,type:"integer"},target_dir:{type:"string"},target_only:{format:"uint",minimum:0,type:"integer"},target_only_symbols:{items:{$ref:"#/$defs/PortTargetOnlySymbolV1"},type:"array"},unmatched:{format:"uint",minimum:0,type:"integer"},unmatched_by_file:{additionalProperties:{items:{$ref:"#/$defs/PortUnmatchedSymbolV1"},type:"array"},type:"object"}},required:["source_dir","target_dir","source_count","target_count","matched","unmatched","target_only","coverage_percent","unmatched_by_file","matched_symbols","target_only_symbols"],title:"PortStatusResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{base_ref:{description:"Base branch or ref to compare against (default: detected repository\ndefault branch). A short branch name selects the descendant of its\nlocal and origin tracking tips; use an explicit ref when they diverge.",type:["string","null"]},budget_tokens:{description:"Cap the symbol, test, and module sections at about this many tokens.",format:"uint32",minimum:0,type:["integer","null"]},cursor:{description:"Authenticated continuation cursor returned by a previous page.",type:["string","null"]},head_ref:{description:"Head branch or ref (default: 'HEAD'). Accepts local branches,\nremote-tracking refs such as origin/topic, full refs, and Git revision\nexpressions.",type:["string","null"]},maximum_symbols:{description:"Maximum symbols returned on this page (default: 200, clamped to 1-500).",format:"uint32",minimum:0,type:["integer","null"]}},title:"PrContextSurfaceRequestV1",type:"object"},{$defs:{CoChangeUnavailableV1:fM,CodeIndexBuildBlockedReasonV1:fF,CodeIndexConvergenceParkedV1:fL,CodeIndexStalenessStateV1:fB,ConfigSummaryKindV1:f4,ConfigSummaryV1:f6,GitCommitSubjectV1:{additionalProperties:!1,properties:{hash:{type:"string"},subject:{type:"string"}},required:["hash","subject"],type:"object"},GitComparedSymbolV1:yN,GitContextSymbolV1:yz,GitFileChangeStatusV1:{enum:["added","deleted","modified"],type:"string"},GitFileChangeV1:{additionalProperties:!1,properties:{path:{type:"string"},status:{$ref:"#/$defs/GitFileChangeStatusV1"}},required:["path","status"],type:"object"},GitReadCompleteV1:yX,GitReadPartialV1:yY,GitReadUnavailableV1:y1,GitToolErrorKindV1:y6,GitToolErrorV1:y3,GitToolFailureV1:y9,GitToolOperationV1:y5,MissingCoChangePartnerV1:gH,PrAnalysisCoverageV1:{additionalProperties:!1,properties:{complete:{type:"boolean"},direct_call_edges_admitted:{format:"uint",minimum:0,type:"integer"},impact_bytes_admitted:{format:"uint",minimum:0,type:"integer"},impact_nodes_admitted:{format:"uint",minimum:0,type:"integer"},impact_nodes_returned:{format:"uint",minimum:0,type:"integer"},impact_partial:{type:"boolean"},seed_symbols_analyzed:{format:"uint",minimum:0,type:"integer"},symbols_complete:{type:"boolean"},symbols_returned:{format:"uint",minimum:0,type:"integer"}},required:["seed_symbols_analyzed","symbols_returned","symbols_complete","impact_nodes_admitted","impact_nodes_returned","direct_call_edges_admitted","impact_bytes_admitted","impact_partial","complete"],type:"object"},PrContextCompleteV1:{additionalProperties:!1,properties:{added:{items:{$ref:"#/$defs/PrSymbolEntryV1"},type:"array"},affected_tests:{items:{type:"string"},type:"array"},affected_tests_coverage:{$ref:"#/$defs/PrSelectionCoverageV1"},analysis_coverage:{$ref:"#/$defs/PrAnalysisCoverageV1"},base:{type:"string"},base_oid:{type:"string"},changes:{items:{$ref:"#/$defs/GitFileChangeV1"},type:"array"},co_change_unavailable:{anyOf:[{$ref:"#/$defs/CoChangeUnavailableV1"},{type:"null"}],description:"Present when Git history could not be mined for co-change partners."},commits:{items:{$ref:"#/$defs/GitCommitSubjectV1"},type:"array"},files_changed:{format:"uint",minimum:0,type:"integer"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},graph_generation:{type:"string"},head:{type:"string"},head_oid:{type:"string"},impacted_modules:{items:{type:"string"},type:"array"},impacted_modules_coverage:{$ref:"#/$defs/PrSelectionCoverageV1"},merge_base:{type:"string"},missing_co_change_partners:{description:"Files that usually change with a changed file, per bounded Git\nhistory, but are absent from this change set.",items:{$ref:"#/$defs/MissingCoChangePartnerV1"},type:"array"},modified:{items:{$ref:"#/$defs/PrSymbolEntryV1"},type:"array"},next_cursor:{type:["string","null"]},removed:{items:{$ref:"#/$defs/GitComparedSymbolV1"},type:"array"},status:{$ref:"#/$defs/GitReadCompleteV1"},symbol_changes_coverage:{$ref:"#/$defs/PrSymbolChangesCompleteV1"},symbol_page:{$ref:"#/$defs/PrSymbolPageV1"},symbols_added:{format:"uint",minimum:0,type:"integer"},symbols_modified:{format:"uint",minimum:0,type:"integer"},symbols_removed:{format:"uint",minimum:0,type:"integer"},test_files_changed:{items:{type:"string"},type:"array"},token_budget:{anyOf:[{$ref:"#/$defs/TokenBudgetCutV1"},{type:"null"}],description:"Budget accounting when the request supplies `budget_tokens`."}},required:["status","base","head","base_oid","head_oid","merge_base","graph_generation","commits","files_changed","changes","missing_co_change_partners","symbols_added","symbols_removed","symbols_modified","added","removed","modified","symbol_changes_coverage","symbol_page","analysis_coverage","test_files_changed","affected_tests","affected_tests_coverage","impacted_modules","impacted_modules_coverage"],type:"object"},PrContextGraphPendingV1:{additionalProperties:!1,description:"The git comparison while the verified graph generation is still warming.",properties:{added:{items:{$ref:"#/$defs/PrSymbolEntryV1"},type:"array"},affected_tests:{items:{type:"string"},type:"array"},affected_tests_coverage:{$ref:"#/$defs/PrSelectionCoverageV1"},analysis_coverage:{$ref:"#/$defs/PrAnalysisCoverageV1"},base:{type:"string"},base_oid:{type:"string"},changes:{items:{$ref:"#/$defs/GitFileChangeV1"},type:"array"},co_change_unavailable:{anyOf:[{$ref:"#/$defs/CoChangeUnavailableV1"},{type:"null"}],description:"Present when Git history could not be mined for co-change partners."},commits:{items:{$ref:"#/$defs/GitCommitSubjectV1"},type:"array"},files_changed:{format:"uint",minimum:0,type:"integer"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},graph_generation:{description:"No verified generation was admitted.",type:["string","null"]},head:{type:"string"},head_oid:{type:"string"},impacted_modules:{items:{type:"string"},type:"array"},impacted_modules_coverage:{$ref:"#/$defs/PrSelectionCoverageV1"},merge_base:{type:"string"},message:{type:"string"},missing_co_change_partners:{description:"Files that usually change with a changed file, per bounded Git\nhistory, but are absent from this change set.",items:{$ref:"#/$defs/MissingCoChangePartnerV1"},type:"array"},modified:{items:{$ref:"#/$defs/PrSymbolEntryV1"},type:"array"},next_cursor:{type:["string","null"]},status:{$ref:"#/$defs/GitReadPartialV1"},symbol_page:{$ref:"#/$defs/PrSymbolPageV1"},symbols_added:{format:"uint",minimum:0,type:"integer"},symbols_modified:{format:"uint",minimum:0,type:"integer"},test_files_changed:{items:{type:"string"},type:"array"},token_budget:{anyOf:[{$ref:"#/$defs/TokenBudgetCutV1"},{type:"null"}],description:"Budget accounting when the request supplies `budget_tokens`."},verified_graph_evidence:{$ref:"#/$defs/PrimitiveUnavailableEvidenceV1"}},required:["status","message","base","head","base_oid","head_oid","merge_base","commits","files_changed","changes","missing_co_change_partners","symbols_added","symbols_modified","added","modified","symbol_page","analysis_coverage","test_files_changed","affected_tests","affected_tests_coverage","impacted_modules","impacted_modules_coverage","verified_graph_evidence"],type:"object"},PrContextSymbolsUnavailableV1:{additionalProperties:!1,description:"The git comparison while exact base/head symbol comparison is unavailable\nor does not describe the verified graph's head generation.",properties:{added:{items:{$ref:"#/$defs/PrSymbolEntryV1"},type:"array"},base:{type:"string"},base_oid:{type:"string"},changes:{items:{$ref:"#/$defs/GitFileChangeV1"},type:"array"},co_change_unavailable:{anyOf:[{$ref:"#/$defs/CoChangeUnavailableV1"},{type:"null"}],description:"Present when Git history could not be mined for co-change partners."},commits:{items:{$ref:"#/$defs/GitCommitSubjectV1"},type:"array"},files_changed:{format:"uint",minimum:0,type:"integer"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},graph_generation:{type:"string"},head:{type:"string"},head_oid:{type:"string"},merge_base:{type:"string"},message:{type:"string"},missing_co_change_partners:{description:"Files that usually change with a changed file, per bounded Git\nhistory, but are absent from this change set.",items:{$ref:"#/$defs/MissingCoChangePartnerV1"},type:"array"},modified:{items:{$ref:"#/$defs/PrSymbolEntryV1"},type:"array"},next_cursor:{type:["string","null"]},removed:{items:{$ref:"#/$defs/GitComparedSymbolV1"},type:"array"},status:{$ref:"#/$defs/GitReadPartialV1"},symbol_changes_coverage:{$ref:"#/$defs/SymbolChangesUnavailableV1"},symbols_added:{format:"uint",minimum:0,type:"integer"},symbols_modified:{format:"uint",minimum:0,type:"integer"},symbols_removed:{format:"uint",minimum:0,type:"integer"},token_budget:{anyOf:[{$ref:"#/$defs/TokenBudgetCutV1"},{type:"null"}],description:"Budget accounting when the request supplies `budget_tokens`."}},required:["status","message","base","head","base_oid","head_oid","merge_base","graph_generation","commits","files_changed","changes","missing_co_change_partners","symbols_added","symbols_removed","symbols_modified","added","removed","modified","symbol_changes_coverage"],type:"object"},PrCoverageSelectionV1:{enum:["unavailable","deterministic_bounded_prefix"],type:"string"},PrSelectionCoverageV1:{additionalProperties:!1,properties:{complete:{type:"boolean"},selection:{$ref:"#/$defs/PrCoverageSelectionV1"}},required:["complete","selection"],type:"object"},PrSymbolChangesCompleteV1:{additionalProperties:!1,properties:{base_generation:{type:"string"},head_generation:{type:"string"},status:{$ref:"#/$defs/GitReadCompleteV1"}},required:["status","base_generation","head_generation"],type:"object"},PrSymbolEntryV1:{anyOf:[{$ref:"#/$defs/GitContextSymbolV1"},{$ref:"#/$defs/ConfigSummaryV1"}]},PrSymbolPageV1:{additionalProperties:!1,properties:{complete:{type:"boolean"},continuation_available:{type:"boolean"},has_more:{type:"boolean"},limit:{format:"uint",minimum:0,type:"integer"},returned:{format:"uint",minimum:0,type:"integer"},selection:{$ref:"#/$defs/PrSymbolSelectionV1"}},required:["limit","returned","has_more","complete","selection","continuation_available"],type:"object"},PrSymbolSelectionV1:{enum:["unavailable","stable_prefix"],type:"string"},PrimitiveFreshnessStateV1:_i,PrimitiveIndexingStateV1:_o,PrimitiveSearchFreshnessV1:_d,PrimitiveUnavailableEvidenceV1:_p,PrimitiveUnavailableStatusV1:_u,SymbolChangesUnavailableV1:vB,TokenBudgetCutV1:v8,TokenBudgetSectionV1:v7},$schema:"https://json-schema.org/draft/2020-12/schema",anyOf:[{$ref:"#/$defs/PrContextCompleteV1"},{$ref:"#/$defs/PrContextSymbolsUnavailableV1"},{$ref:"#/$defs/PrContextGraphPendingV1"},{$ref:"#/$defs/GitToolFailureV1"}],title:"PrContextResultV1"},{$defs:{BranchStackEdgeV1:fv,BranchStackId:fb,BranchStackNodeV1:f$,BranchStackRevisionId:fS,BranchStackRevisionV1:fk,BranchStackSourceV1:fw,CommitId:fX,ManifestDigest:gj,MechanicalIntegrationModeV1:gC,NativeIntegrationDirectionV1:gK,NativeIntegrationSealedStackSnapshotV1:gQ,NativeIntegrationSelectionBindingV1:gX,ProjectId:_m,RefId:_T,RepositoryId:_z,ResolvedScope:_U,ScopeSetId:vc,ScopeSetRevision:vl,StackNodeId:vH,WorktreeId:So,WorktreeInventoryEpoch:Sn,WorktreeInventorySnapshotId:Sa},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Read-only preflight over one frozen snapshot identity.\n\n`preferred_mode` selects only one of the three fixed mechanical encodings.\nIt cannot change topology, commit order, or the commit set.",properties:{preferred_mode:{anyOf:[{$ref:"#/$defs/MechanicalIntegrationModeV1"},{type:"null"}],default:null},snapshot:{$ref:"#/$defs/NativeIntegrationSealedStackSnapshotV1"}},required:["snapshot"],title:"NativeIntegrationPreflightSurfaceRequest",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{path:{description:"Project path or registered alias to resolve.",type:["string","null"]},project_selector:{additionalProperties:!1,default:null,description:"Registered project id to inspect. Omit to use path or the active\nproject.",properties:{project_id:{description:"Registered project id to query.",type:"string"}},required:["project_id"],type:"object"}},title:"ProjectContextSurfaceRequestV1",type:"object"},{$defs:{PublicCodeProject:_P},$schema:"https://json-schema.org/draft/2020-12/schema",description:"One registered project's context, or the registry's typed miss.",oneOf:[{additionalProperties:!1,properties:{aliases:{description:"Alias rows exactly as the registry serializes them.",items:!0,type:"array"},is_active:{type:"boolean"},project:{$ref:"#/$defs/PublicCodeProject"},registry_path:{type:"string"},status:{const:"ok",type:"string"},stores:{description:"Store rows exactly as the registry serializes them.",items:!0,type:"array"}},required:["status","is_active","registry_path","project","aliases","stores"],type:"object"},{additionalProperties:!1,description:"The registry answered and no registered project matches the selector.",properties:{aliases:{items:!0,type:"array"},project:{type:"null"},registry_path:{type:"string"},status:{const:"not_found",type:"string"},stores:{items:!0,type:"array"}},required:["status","registry_path","project","aliases","stores"],type:"object"}],title:"ProjectContextResultV1"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{limit:{description:"Maximum projects to return (default: 25, max: 100).",format:"uint",minimum:0,type:["integer","null"]}},title:"ProjectListSurfaceRequestV1",type:"object"},{$defs:{ProjectRegistryEntry:_f,ProjectRegistrySummary:_h,ProjectRepoGroup:_y,PublicCodeProject:_P},$schema:"https://json-schema.org/draft/2020-12/schema",description:"A bounded page of the profile's registered projects.",oneOf:[{additionalProperties:!1,properties:{limit:{format:"uint",minimum:0,type:"integer"},project_tree:{items:{$ref:"#/$defs/ProjectRepoGroup"},type:"array"},projects:{items:{$ref:"#/$defs/PublicCodeProject"},type:"array"},query:{type:["string","null"]},registry_path:{type:"string"},status:{const:"ok",type:"string"},summary:{$ref:"#/$defs/ProjectRegistrySummary"},title:{type:"string"},truncated:{type:"boolean"}},required:["status","title","registry_path","limit","truncated","summary","project_tree","projects"],type:"object"}],title:"ProjectRegistryListingResultV1"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{limit:{description:"Maximum projects to return (default: 10, max: 50).",format:"uint",minimum:0,type:["integer","null"]},query:{description:"Case-insensitive substring query over registry project metadata.",type:"string"}},required:["query"],title:"ProjectSearchSurfaceRequestV1",type:"object"},{$defs:{PageRequest:_t},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{page:{$ref:"#/$defs/PageRequest"},qualified_name:{type:"string"}},required:["qualified_name","page"],title:"QualifiedNamePrimitiveRequest",type:"object"},{$defs:{SymbolPrimitiveRecord:vZ},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{next_cursor:{description:"Opaque resume token; its bounded string is the public wire form.",type:["string","null"]},symbols:{items:{$ref:"#/$defs/SymbolPrimitiveRecord"},type:"array"},total:{format:"uint64",minimum:0,type:["integer","null"]}},required:["symbols"],title:"QualifiedNamePrimitiveResult",type:"object"},{$defs:{RankDirectionV1:_I,RankEdgeKindV1:_x},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{direction:{anyOf:[{$ref:"#/$defs/RankDirectionV1"},{type:"null"}],description:"Edge direction: 'incoming' ranks targets (default, e.g.\nmost-implemented interface), 'outgoing' ranks sources (e.g. class that\nimplements the most interfaces)."},edge_kind:{$ref:"#/$defs/RankEdgeKindV1",description:"The relationship type to rank by (e.g. 'implements' to find\nmost-implemented interfaces)."},limit:{description:"Maximum number of results to return (default: 10, at most 100).",format:"uint32",minimum:0,type:["integer","null"]},node_kind:{description:"Optional filter for node kind (e.g. 'interface', 'class', 'trait',\n'function', 'method').",type:["string","null"]},path:{description:"Filter to files under this directory path (e.g. 'src/main/java').",type:["string","null"]}},required:["edge_kind"],title:"RankSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fF,CodeIndexConvergenceParkedV1:fL,CodeIndexStalenessStateV1:fB,PrimitiveFreshnessStateV1:_i,PrimitiveIndexingStateV1:_o,PrimitiveSearchFreshnessV1:_d,RankDirectionV1:_I,RankEdgeKindV1:_x,RankEntryV1:{additionalProperties:!1,properties:{count:{format:"uint64",minimum:0,type:"integer"},file:{type:"string"},id:{type:"string"},kind:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},name:{type:"string"}},required:["id","name","kind","file","line","count"],type:"object"}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{direction:{$ref:"#/$defs/RankDirectionV1"},edge_kind:{$ref:"#/$defs/RankEdgeKindV1"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},node_kind_filter:{type:["string","null"]},ranking:{items:{$ref:"#/$defs/RankEntryV1"},type:"array"},result_count:{format:"uint64",minimum:0,type:"integer"}},required:["edge_kind","direction","result_count","ranking"],title:"RankResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{limit:{description:"Maximum number of cycles to return (default: 10, at most 100).",format:"uint32",minimum:0,type:["integer","null"]},path:{description:"Filter to files under this directory path (e.g. 'src/main/java').",type:["string","null"]}},title:"RecursionSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fF,CodeIndexConvergenceParkedV1:fL,CodeIndexStalenessStateV1:fB,PrimitiveFreshnessStateV1:_i,PrimitiveIndexingStateV1:_o,PrimitiveSearchFreshnessV1:_d,RecursionCycleV1:{additionalProperties:!1,description:"One call cycle; `chain` repeats its first symbol at the end.",properties:{chain:{items:{$ref:"#/$defs/RecursionSymbolV1"},type:"array"},length:{format:"uint64",minimum:0,type:"integer"}},required:["length","chain"],type:"object"},RecursionSymbolV1:{additionalProperties:!1,properties:{file:{type:"string"},id:{type:"string"},kind:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},name:{type:"string"}},required:["id","name","kind","file","line"],type:"object"}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{cycle_count:{format:"uint64",minimum:0,type:"integer"},cycles:{items:{$ref:"#/$defs/RecursionCycleV1"},type:"array"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."}},required:["cycle_count","cycles"],title:"RecursionResultV1",type:"object"},{$defs:{CommitId:fX,ProjectId:_m,ProviderId:_w,RedundancyScopeV1:{oneOf:[{additionalProperties:!1,properties:{kind:{const:"repository",type:"string"}},required:["kind"],type:"object"},{additionalProperties:!1,properties:{kind:{const:"path",type:"string"},path:{type:"string"}},required:["kind","path"],type:"object"},{additionalProperties:!1,properties:{changed_paths:{items:{type:"string"},type:"array"},head_commit_id:{$ref:"#/$defs/CommitId"},kind:{const:"pull_request",type:"string"},provider:{$ref:"#/$defs/ProviderId"},pull_request_id:{type:"string"}},required:["kind","provider","pull_request_id","head_commit_id","changed_paths"],type:"object"}]},RepositoryId:_z,SimilarMatchClassV1:vx},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{cursor:{type:["string","null"]},family_limit:{description:"Preferred family page size, 1 through 100.",format:"uint32",maximum:100,minimum:1,type:"integer"},include_generated_paths:{type:"boolean"},match_classes:{items:{$ref:"#/$defs/SimilarMatchClassV1"},type:"array"},member_limit:{description:"Members listed per family, at least 2.",format:"uint32",minimum:2,type:"integer"},project_id:{$ref:"#/$defs/ProjectId"},repository_id:{$ref:"#/$defs/RepositoryId"},scope:{$ref:"#/$defs/RedundancyScopeV1"},work_limit:{description:"Clone-index work budget for this page, 3 through 10000. A page that\nexhausts it reports partial coverage.",format:"uint32",maximum:1e4,minimum:3,type:"integer"}},required:["project_id","repository_id","match_classes","scope","include_generated_paths","family_limit","member_limit","work_limit"],title:"RedundancySurfaceRequestV1",type:"object"},{$defs:{CodeGenerationId:fz,CodeIndexBuildBlockedReasonV1:fF,CodeIndexConvergenceParkedV1:fL,CodeIndexStalenessStateV1:fB,ManifestDigest:gj,PrimitiveFreshnessStateV1:_i,PrimitiveIndexingStateV1:_o,PrimitiveSearchFreshnessV1:_d,ProjectId:_m,RedundancyCoverageV1:{oneOf:[{additionalProperties:!1,properties:{examined_families:{format:"uint",minimum:0,type:"integer"},examined_members:{format:"uint",minimum:0,type:"integer"},status:{const:"complete",type:"string"}},required:["status","examined_families","examined_members"],type:"object"},{additionalProperties:!1,properties:{examined_families:{format:"uint",minimum:0,type:"integer"},examined_members:{format:"uint",minimum:0,type:"integer"},reason:{$ref:"#/$defs/RedundancyPartialReasonV1"},status:{const:"partial",type:"string"}},required:["status","reason","examined_families","examined_members"],type:"object"}]},RedundancyFamilyV1:{additionalProperties:!1,properties:{family:{$ref:"#/$defs/SimilarFamilyV1"},generated_members:{items:{$ref:"#/$defs/SymbolOccurrenceId"},type:"array"},reviewable_source_bytes:{format:"uint64",minimum:0,type:"integer"},total_member_count:{format:"uint",minimum:0,type:"integer"}},required:["family","total_member_count","reviewable_source_bytes","generated_members"],type:"object"},RedundancyPartialReasonV1:{enum:["family_limit","work_limit"],type:"string"},RedundancyRankingV1:{enum:["reviewable_source_bytes"],type:"string"},RepositoryId:_z,SimilarFamilyV1:vI,SimilarMatchClassV1:vx,SimilarOccurrenceV1:vj,SourceSpan:vF,SymbolOccurrenceId:vJ,WorktreeId:So},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{coverage:{$ref:"#/$defs/RedundancyCoverageV1"},families:{items:{$ref:"#/$defs/RedundancyFamilyV1"},type:"array"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},next_cursor:{type:["string","null"]},ranked_by:{$ref:"#/$defs/RedundancyRankingV1"},source_generation:{$ref:"#/$defs/CodeGenerationId"}},required:["source_generation","ranked_by","families","coverage"],title:"RedundancyResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,title:"RemoteStatusSurfaceRequestV1",type:"object"},{$defs:{AuthorityEpoch:{description:"Monotonic epoch of the writer authority for a shard.",format:"uint64",minimum:0,type:"integer"},BrainId:ff,BrainNodeId:{description:"Strongly typed canonical identity: `BrainNodeId`.",type:"string"},CurrentRemoteAuthorityStateV1:{description:"Truthful authority lookup state. Missing evidence is never represented as\nan available authority or a successful empty response.",oneOf:[{properties:{state:{const:"available",type:"string"},value:{$ref:"#/$defs/CurrentRemoteAuthorityV1"}},required:["state","value"],type:"object"},{properties:{state:{const:"partial",type:"string"},value:{properties:{known_fence:{anyOf:[{$ref:"#/$defs/RemoteWriterFenceV1"},{type:"null"}]},missing:{items:{$ref:"#/$defs/RemoteAuthorityUnavailableReasonV1"},type:"array",uniqueItems:!0},observed_at:{$ref:"#/$defs/UtcMicros"}},required:["missing","observed_at"],type:"object"}},required:["state","value"],type:"object"},{properties:{state:{const:"unavailable",type:"string"},value:{properties:{observed_at:{$ref:"#/$defs/UtcMicros"},reason:{$ref:"#/$defs/RemoteAuthorityUnavailableReasonV1"}},required:["reason","observed_at"],type:"object"}},required:["state","value"],type:"object"}]},CurrentRemoteAuthorityV1:{additionalProperties:!1,description:"Authenticated current authority for a mutable shard.",properties:{credential_revision:{description:"Revision of the authority node's current enrollment credential.",format:"uint64",minimum:0,type:"integer"},fence:{$ref:"#/$defs/RemoteWriterFenceV1"},observed_at:{$ref:"#/$defs/UtcMicros"}},required:["fence","credential_revision","observed_at"],type:"object"},DoctorCoverageCompletenessV1:hB,ProjectionGenerationId:_g,RemoteAuthorityUnavailableReasonV1:{oneOf:[{enum:["registry_unavailable","placement_unknown","authority_unreachable","authority_authentication_failed","caller_authentication_failed","enrollment_expired","enrollment_revoked","insufficient_capability","scope_mismatch","fence_unverified","protocol_incompatible"],type:"string"},{const:"writer_authority_unpublished",description:"The RemoteNode store has never had a writer authority published for\nthis Brain, so no capture, replay, query, or failover can bind to one.",type:"string"}]},RemoteListenerReadV1:{enum:["serving","disabled","degraded"],type:"string"},RemoteOperationalReadinessV1:{enum:["unconfigured","partial","ready","recovery_required"],type:"string"},RemoteOperationalStatusV1:{additionalProperties:!1,properties:{authority:{$ref:"#/$defs/CurrentRemoteAuthorityStateV1"},enrollment_configured:{type:"boolean"},failover_in_progress:{type:"boolean"},observed_at:{$ref:"#/$defs/UtcMicros"},readiness:{$ref:"#/$defs/RemoteOperationalReadinessV1"},recovery_required:{type:"boolean"},replay_coverage_complete:{type:"boolean"},spool:{$ref:"#/$defs/RemoteSpoolOperationalStatusV1"}},required:["readiness","enrollment_configured","authority","spool","replay_coverage_complete","failover_in_progress","recovery_required","observed_at"],type:"object"},RemoteSpoolOperationalStatusV1:{additionalProperties:!1,properties:{has_sequence_gap:{type:"boolean"},pending_count:{format:"uint64",minimum:0,type:"integer"},quarantined_count:{format:"uint64",minimum:0,type:"integer"}},required:["pending_count","quarantined_count","has_sequence_gap"],type:"object"},RemoteWriterFenceV1:{additionalProperties:!1,description:"The complete single-writer identity for one mutable shard.",properties:{authority_epoch:{$ref:"#/$defs/AuthorityEpoch"},authority_node_id:{$ref:"#/$defs/BrainNodeId"},brain_id:{$ref:"#/$defs/BrainId"},generation_id:{$ref:"#/$defs/ProjectionGenerationId"},placement_revision:{format:"uint64",minimum:0,type:"integer"},shard_id:{$ref:"#/$defs/ShardId"}},required:["brain_id","shard_id","generation_id","placement_revision","authority_epoch","authority_node_id"],type:"object"},ShardId:{description:"Strongly typed canonical identity: `ShardId`.",type:"string"},UtcMicros:bs},$schema:"https://json-schema.org/draft/2020-12/schema",description:"Typed read of the Remote Brain operational plane as observed from the\nmounted daemon authorities. Every operator surface (Doctor, CLI, MCP,\ndashboard) reads this one shape; `Unavailable` is reserved for a genuinely\nunmounted or unreadable authority, never a rendering shortcut.",oneOf:[{properties:{coverage:{$ref:"#/$defs/DoctorCoverageCompletenessV1"},kind:{const:"observed",type:"string"},listener:{$ref:"#/$defs/RemoteListenerReadV1"},status:{$ref:"#/$defs/RemoteOperationalStatusV1"}},required:["kind","listener","status","coverage"],type:"object"},{properties:{kind:{const:"unconfigured",type:"string"}},required:["kind"],type:"object"},{properties:{kind:{const:"unavailable",type:"string"}},required:["kind"],type:"object"}],title:"RemoteOperationalStatusReadV1"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{new_name:{type:["string","null"]},node_id:{type:"string"}},required:["node_id"],title:"RenamePreviewPrimitiveRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fF,CodeIndexConvergenceParkedV1:fL,CodeIndexStalenessStateV1:fB,PrimitiveFreshnessStateV1:_i,PrimitiveIndexingStateV1:_o,PrimitiveNotFoundV1:_a,PrimitiveSearchFreshnessV1:_d,PrimitiveSymbolLocationV1:_l,RenamePreviewNodeV1:{additionalProperties:!1,properties:{file:{type:"string"},id:{type:"string"},kind:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},name:{type:"string"},qualified_name:{type:"string"},snippet:{type:["string","null"]}},required:["id","name","qualified_name","kind","file","line"],type:"object"},RenamePreviewPrimitiveResultV1:{additionalProperties:!1,properties:{freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},new_name:{type:["string","null"]},node:{$ref:"#/$defs/RenamePreviewNodeV1"},note:{type:"string"},read_only:{type:"boolean"},reference_count:{format:"uint",minimum:0,type:"integer"},references:{items:{$ref:"#/$defs/RenamePreviewReferenceV1"},type:"array"},symbol:{type:"string"},text_only_matches:{items:{$ref:"#/$defs/RenamePreviewTextOnlyMatchV1"},type:"array"}},required:["read_only","note","symbol","node","reference_count","references","text_only_matches"],type:"object"},RenamePreviewReferenceV1:{additionalProperties:!1,properties:{edge_kind:{type:"string"},file:{type:"string"},from_kind:{type:"string"},from_name:{type:"string"},from_node_id:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},snippet:{type:["string","null"]}},required:["from_node_id","from_name","from_kind","edge_kind","file","line"],type:"object"},RenamePreviewTextOnlyMatchV1:{additionalProperties:!1,properties:{file:{type:"string"},note:{type:"string"},text_only_count:{format:"uint",minimum:0,type:"integer"}},required:["file","text_only_count","note"],type:"object"}},$schema:"https://json-schema.org/draft/2020-12/schema",anyOf:[{$ref:"#/$defs/RenamePreviewPrimitiveResultV1"},{$ref:"#/$defs/PrimitiveNotFoundV1"}],title:"RenamePreviewPrimitiveOutcomeV1"},{$defs:{ManifestDigest:gj,RenamePreviewAcceptanceV1:{additionalProperties:!1,description:"Exact preview material an apply must echo. Preview calls omit this value;\napply rejects any mismatch before publishing a file.",properties:{graph_revision:{$ref:"#/$defs/ManifestDigest"},plan_digest:{$ref:"#/$defs/ManifestDigest"},preview_digest:{$ref:"#/$defs/ManifestDigest"},preview_id:{$ref:"#/$defs/ManifestDigest"},repository_revision:{default:null,type:["string","null"]}},required:["preview_id","preview_digest","plan_digest","graph_revision"],type:"object"}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Exact public input accepted by `tracedecay_rename_symbol`.\n\nThe five identity fields consume the preview's exact symbol identity; the\nflattened control consumes its exact candidate-state digest.",properties:{accepted_preview:{anyOf:[{$ref:"#/$defs/RenamePreviewAcceptanceV1"},{type:"null"}],description:"Exact output identity from the accepted dry-run preview. Required when\n`dry_run=false` and omitted when computing a preview."},dry_run:{default:!0,type:"boolean"},expected_state:{description:"Exact `preview_digest`/`expected_state` returned by the dry run. Apply\nre-resolves the typed plan and rejects any candidate-state drift.",type:["string","null"]},file:{type:"string"},idempotency_key:{type:["string","null"]},kind:{type:"string"},new_name:{type:"string"},node_id:{description:"Canonical `SymbolOccurrenceId` returned by `tracedecay_rename_preview`.",type:"string"},old_name:{type:"string"},qualified_name:{type:"string"},verify:{default:!0,type:"boolean"}},required:["node_id","qualified_name","kind","file","old_name","new_name"],title:"RenameSymbolSurfaceRequestV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Exact public input accepted by `tracedecay_replace_symbol`.",properties:{dry_run:{default:!1,type:"boolean"},expected_state:{description:"Exact `preview_digest`/`expected_state` returned by the dry run. Apply\nre-resolves the typed plan and rejects any candidate-state drift.",type:["string","null"]},idempotency_key:{type:["string","null"]},new_source:{type:"string"},symbol:{type:"string"},verify:{default:!1,type:"boolean"}},required:["symbol","new_source"],title:"ReplaceSymbolSurfaceRequestV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{handle:{description:"The required `handle` argument copied exactly from a truncated MCP\nresponse envelope.",type:"string"},max_chars:{description:"Maximum characters requested for this page. Values above the safe\nresponse-frame budget are clamped.",format:"uint64",minimum:1,type:["integer","null"]},offset:{default:0,description:"Character offset into the immutable stored response (default: 0). Use\nthe prior page's next_offset.",format:"uint64",minimum:0,type:["integer","null"]}},required:["handle"],title:"RetrieveSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fF,CodeIndexConvergenceParkedV1:fL,CodeIndexStalenessStateV1:fB,PrimitiveFreshnessStateV1:_i,PrimitiveIndexingStateV1:_o,PrimitiveSearchFreshnessV1:_d,RetrieveHandleExpiredV1:{additionalProperties:!1,description:"The record expired and was removed.",properties:{content:{description:"Always null: the expired content was removed.",type:["string","null"]},created_at:{format:"int64",type:"integer"},expired:{description:"Always `true`.",type:"boolean"},expires_at:{format:"int64",type:"integer"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},handle:{type:"string"},message:{type:"string"},reason_code:{type:"string"},retry_instruction:{type:"string"},retryable:{type:"boolean"}},required:["handle","expired","reason_code","message","retryable","retry_instruction","created_at","expires_at"],type:"object"},RetrieveHandleMissingV1:{additionalProperties:!1,description:"No record exists under the handle in this project's store.",properties:{content:{description:"Always null: nothing is stored under the handle.",type:["string","null"]},expired:{description:"Always null: an absent record has no expiry to report.",type:["boolean","null"]},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},handle:{type:"string"},message:{type:"string"},reason_code:{type:"string"},retry_instruction:{type:"string"},retryable:{type:"boolean"}},required:["handle","reason_code","message","retryable","retry_instruction"],type:"object"},RetrievedPageV1:{additionalProperties:!1,description:"One page of the stored response, sized so its response frame fits the\nresponse budget.",properties:{content:{type:"string"},created_at:{format:"int64",type:"integer"},expired:{description:"Always `false`: a page is only served from a live record.",type:"boolean"},expires_at:{format:"int64",type:"integer"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},handle:{type:"string"},has_more:{type:"boolean"},next_offset:{description:"Where the next page starts; absent on the last page.",format:"uint64",minimum:0,type:["integer","null"]},offset:{format:"uint64",minimum:0,type:"integer"},original_chars:{format:"uint64",minimum:0,type:"integer"},total_chars:{format:"uint64",minimum:0,type:"integer"}},required:["handle","expired","original_chars","total_chars","offset","has_more","created_at","expires_at","content"],type:"object"}},$schema:"https://json-schema.org/draft/2020-12/schema",anyOf:[{$ref:"#/$defs/RetrievedPageV1"},{$ref:"#/$defs/RetrieveHandleMissingV1"},{$ref:"#/$defs/RetrieveHandleExpiredV1"}],description:"What a retrieve found under the handle.",title:"RetrieveResultV1"},{$defs:{TestProfileV1:{description:"The cargo profile an affected-test run builds with.",enum:["debug","release"],type:"string"}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{changed_paths:{description:"Explicit manifest of project-relative file paths used to compute\naffected tests.",items:{type:"string"},type:"array"},max_tests:{description:"Cap on tests dispatched in a single invocation, 1 through 500\n(default: 100).",format:"uint64",maximum:500,minimum:1,type:["integer","null"]},profile:{anyOf:[{$ref:"#/$defs/TestProfileV1"},{type:"null"}],description:"Cargo profile (default: debug)."},timeout_secs:{description:"Maximum wall time in seconds before the cargo subprocess is killed,\n1 through 300 (default: 300).",format:"uint64",maximum:300,minimum:1,type:["integer","null"]}},required:["changed_paths"],title:"RunAffectedTestsSurfaceRequestV1",type:"object"},{$defs:{AffectedTestErrorV1:{additionalProperties:!1,description:"Why a run failed or was refused.",properties:{kind:{type:"string"},message:{type:"string"},operation:{type:"string"}},required:["kind","operation","message"],type:"object"},AffectedTestOutcomeV1:{additionalProperties:!1,description:"One observed libtest outcome.",properties:{covers_source_ids:{description:"Graph symbols this test was selected to cover.",items:{type:"string"},type:"array"},passed:{type:"boolean"},test:{type:"string"}},required:["test","passed","covers_source_ids"],type:"object"},AffectedTestRunV1:{additionalProperties:!1,description:"A dispatched run, completed or failed, with what it observed.",properties:{dispatched_tests:{items:{type:"string"},type:"array"},error:{anyOf:[{$ref:"#/$defs/AffectedTestErrorV1"},{type:"null"}],description:"Present when the run did not complete."},exit_code:{format:"int32",type:["integer","null"]},failed:{format:"uint64",minimum:0,type:"integer"},ignored:{description:"Dispatched tests libtest reported as ignored.",format:"uint64",minimum:0,type:"integer"},passed:{format:"uint64",minimum:0,type:"integer"},results:{items:{$ref:"#/$defs/AffectedTestOutcomeV1"},type:"array"},stderr_tail:{type:"string"},stdout_tail:{type:"string"},terminal:{$ref:"#/$defs/ManagedTestTerminalV1"},total_observed:{format:"uint64",minimum:0,type:"integer"},truncated:{description:"More affected tests existed than `max_tests` admitted.",type:"boolean"}},required:["passed","failed","ignored","total_observed","dispatched_tests","truncated","results","stderr_tail","stdout_tail","terminal"],type:"object"},AffectedTestsNotRunV1:{additionalProperties:!1,description:"No test was dispatched: nothing covers the change, or the request was\nrefused before a run began.",properties:{error:{anyOf:[{$ref:"#/$defs/AffectedTestErrorV1"},{type:"null"}]},failed:{description:"Always 0.",format:"uint64",minimum:0,type:"integer"},note:{type:["string","null"]},passed:{description:"Always 0.",format:"uint64",minimum:0,type:"integer"},results:{description:"Always empty.",items:{$ref:"#/$defs/AffectedTestOutcomeV1"},type:"array"}},required:["passed","failed","results"],type:"object"},CancellationObservation:fI,CancellationStage:fx,Deadline:hL,ManagedTestTerminalV1:{additionalProperties:!1,description:"The managed test-run operation the run was recorded under.",properties:{operation_id:{type:"string"},receipt:{$ref:"#/$defs/OperationReceipt"},result_tool:{description:"The tool that reads the recorded results back.",type:"string"},session_id:{description:"The requesting session the run is recorded against; null when the\nrequest carried no session.",type:["string","null"]}},required:["operation_id","result_tool","receipt"],type:"object"},OperationBudgetUsage:g8,OperationReceipt:g7,OperationTermination:_e,UtcMicros:bs},$schema:"https://json-schema.org/draft/2020-12/schema",anyOf:[{$ref:"#/$defs/AffectedTestRunV1"},{$ref:"#/$defs/AffectedTestsNotRunV1"}],title:"RunAffectedTestsResultV1"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{authority_audit:{default:!1,description:"Run the exhaustive observation-authority audit and include\nauthority_audit_ok (true = audit ran and passed, false = audit ran and\nfailed, null = audit did not run or finish), authority_audit_reason\n(typed: authority_invariant_failed, authority_store_unavailable,\nauthority_store_missing, authority_audit_not_run,\nauthority_audit_budget_exceeded), and\nauthority_audit_error (observed detail) in database telemetry. Also\nincludes session-temporal health. Default false.",type:"boolean"},doctor_report:{default:!1,description:"Include the daemon-owned canonical Doctor report and typed per-table\ngrowth evidence. Default false.",type:"boolean"},session_ingest_health:{default:!1,description:"Include Cursor transcript-ingest health from the daemon-retained\nproject session authority. Default false.",type:"boolean"},session_temporal_health:{default:!1,description:"Include session-temporal health without the authority audit. Default\nfalse.",type:"boolean"},startup_health:{default:!1,description:"Ask a connection's first request for only the daemon-mounted database\nintegrity telemetry, for post-update startup validation; the daemon\ncore answers that probe before a project owner exists, and a project\nowner's snapshot already carries the same telemetry. Default false.",type:"boolean"}},title:"RuntimeSurfaceRequestV1",type:"object"},{$defs:{DoctorCoverageCompletenessV1:hB,DoctorCoverageStatementV1:{description:"A bounded, human-readable coverage statement plus its completeness.",properties:{completeness:{$ref:"#/$defs/DoctorCoverageCompletenessV1"},statement:{type:"string"}},required:["completeness","statement"],type:"object"},DoctorEvidenceRefV1:{description:"A typed reference to one piece of evidence Doctor composed into a finding.\n\nThe `family` records which audited input surface produced the evidence, so\na finding may cross-cite evidence from more than one family without losing\nprovenance.",properties:{family:{$ref:"#/$defs/DoctorFindingFamilyV1"},reference:{$ref:"#/$defs/DoctorEvidenceReferenceV1"}},required:["family","reference"],type:"object"},DoctorEvidenceReferenceV1:{description:"Durable, non-disclosing reference to one owning-authority evidence\nrecord (for example a `FeedbackFindingId`, configuration revision, or\nruntime read coverage anchor). Doctor stores the reference only; the\nowning authority remains the single source of the record.",type:"string"},DoctorEvidenceStateV1:{description:"Exact Doctor evidence states.\n\nMissing, partial, or unknown truth never becomes healthy or clean. Only\n[`DoctorEvidenceStateV1::HealthyCompleteCoverage`] asserts a healthy result,\nand only when its finding carries complete coverage (see\n[`DoctorFindingV1::new`]).",oneOf:[{const:"unsupported",description:"The owning authority does not support this evidence on this platform.",type:"string"},{const:"absent",description:"The evidence source is supported but produced nothing.",type:"string"},{const:"stale",description:"The evidence exists but is behind the current generation/watermark.",type:"string"},{const:"degraded",description:"The evidence proves a degraded but observed condition.",type:"string"},{const:"partial",description:"Only part of the evidence was observed.",type:"string"},{const:"unknown",description:"The evidence state could not be determined.",type:"string"},{const:"denied",description:"Authorization to read the evidence was denied.",type:"string"},{const:"healthy_complete_coverage",description:"The evidence proves a healthy condition with complete coverage.",type:"string"}]},DoctorFamilyConsultationV1:{description:"Whether a family was consulted from an observed source or is unavailable.",oneOf:[{description:"A source produced observed evidence for this family.",properties:{status:{const:"consulted",type:"string"}},required:["status"],type:"object"},{description:"Complete family coverage was unavailable. Storage may still carry\nfindings from resolved producers when an independent producer failed.",properties:{reason:{$ref:"#/$defs/DoctorFamilyUnavailableReasonV1"},status:{const:"unavailable",type:"string"}},required:["status","reason"],type:"object"}]},DoctorFamilyCoverageV1:{description:"The consultation status of one finding family within a report.",properties:{consultation:{$ref:"#/$defs/DoctorFamilyConsultationV1"},family:{$ref:"#/$defs/DoctorFindingFamilyV1"}},required:["family","consultation"],type:"object"},DoctorFamilyUnavailableReasonV1:{description:"Why complete coverage of a finding family was unavailable.",oneOf:[{const:"unwired",description:"No source port is wired for this family in this composition.",type:"string"},{const:"unsupported",description:"The source is unsupported on this build/platform.",type:"string"},{const:"absent",description:"The source is supported but produced nothing.",type:"string"},{const:"denied",description:"The source read was denied.",type:"string"},{const:"unknown",description:"The source state could not be determined.",type:"string"},{const:"unavailable",description:"The source could not be reached. Named separately from `Unknown`: the\nsource is identified and its unreachability is an observation, not an\nundetermined state.",type:"string"},{const:"reset_required",description:"The source must be rebuilt before it can be read again.",type:"string"},{const:"corrupt",description:"The source was read and found corrupt.",type:"string"}]},DoctorFindingFamilyV1:{description:"Stable Doctor finding families.\n\nThe initial list covers advisory findings from\nBrain, Explorer, Loom, Code, and Observatory, plus the legacy\n`core_doctor` checks (graph quick-check, temporal/migration health,\nconfiguration compatibility drift, code-index mount state, session ingest).\nEach family maps to one audited typed input surface. The set is kept small\nand honest; new families are added through a future versioned enum rather\nthan by widening the meaning of an existing variant.",oneOf:[{const:"advisory",description:"advisory/scout findings (GitHub review, CI localization,\nproximity, context scout): `crate::advisory` / domain feedback.",type:"string"},{const:"configuration",description:"Desired-versus-effective configuration and compatibility drift from\n`ProjectConfigurationRuntime` / `ConfigurationControlPlane`.",type:"string"},{const:"storage_runtime",description:"Store, graph, and temporal runtime health plus migration coverage\n(`RuntimeReadOperationV1` health family, `StoreRuntimeClientLease`).",type:"string"},{const:"storage",description:"Storage retention, size, and efficiency over canonical observability\nread models. Distinct from [`Self::StorageRuntime`] health: this\nfamily surfaces over-budget stores, identity-drift orphans, incident\ndebris, and retention backlog. The typed\nsubclass vocabulary is [`DoctorStorageFindingKindV1`].",type:"string"},{const:"language_server",description:"Language-server / analyzer engine status from the LSP gateway's\n`AnalyzerState`.",type:"string"},{const:"code_index",description:"Code index mount state (mounted, indexing, stale, unmounted,\nincompatible, parked).",type:"string"},{const:"observability",description:"Denominator-safe measurement and telemetry health from analytics,\naccounting read models, and session ingest.",type:"string"},{const:"memory",description:"Retained daemon memory as the resident-memory inventory reports it:\nRSS against the admission limit and pressure line, and each retained\nowner's bytes.",type:"string"}]},DoctorFindingV1:{description:"One canonical Doctor finding.\n\nA finding pins its diagnosis `family`, its evidence `state`, the typed\nevidence it composed, and a coverage statement. Construction enforces the\ninvariants that keep unknown/partial evidence from collapsing into a\nhealthy or clean result.",properties:{coverage:{$ref:"#/$defs/DoctorCoverageStatementV1"},evidence:{items:{$ref:"#/$defs/DoctorEvidenceRefV1"},type:"array"},family:{$ref:"#/$defs/DoctorFindingFamilyV1"},state:{$ref:"#/$defs/DoctorEvidenceStateV1"}},required:["family","state","evidence","coverage"],type:"object"},DoctorReportCoverageV1:{description:"The report-wide coverage statement: which families were consulted versus\nunavailable, plus an overall completeness and a bounded human statement.",properties:{completeness:{$ref:"#/$defs/DoctorCoverageCompletenessV1"},families:{items:{$ref:"#/$defs/DoctorFamilyCoverageV1"},type:"array"},statement:{$ref:"#/$defs/DoctorCoverageStatementV1"}},required:["families","completeness","statement"],type:"object"},DoctorReportEntryV1:{description:"One entry in a Doctor report: a canonical finding plus, for the storage\nfamily, its typed subclass. The subclass is present only for storage findings\n(a non-storage entry never carries one).",properties:{finding:{$ref:"#/$defs/DoctorFindingV1"},storage_kind:{anyOf:[{$ref:"#/$defs/DoctorStorageFindingKindV1"},{type:"null"}]}},required:["finding"],type:"object"},DoctorReportV1:{description:"One composed Doctor report.\n\nThe report carries one or more entries per family (findings are never merged\nby label) plus a coverage statement that enumerates every family consulted\nversus unavailable. Severity (the finding's evidence state) and evidence\nquality (coverage completeness) are kept as separate dimensions: a degraded\nfinding with complete coverage does not weaken report completeness, and only\ngenuinely complete coverage with every finding healthy makes the whole report\nassert health.",properties:{coverage:{$ref:"#/$defs/DoctorReportCoverageV1"},entries:{items:{$ref:"#/$defs/DoctorReportEntryV1"},type:"array"}},required:["entries","coverage"],type:"object"},DoctorStorageFindingKindV1:{description:"Typed subclasses of the [`DoctorFindingFamilyV1::Storage`] finding family.\n\nThe storage family never reports a silent overage: each subclass names one\nobservable retention/size condition Doctor surfaces over canonical size\nobservability read models. The set is closed and grows only through a future\nversioned enum, never by widening an existing subclass.",oneOf:[{const:"over_budget_store",description:"A store exceeds its owner-configured soft size budget.",type:"string"},{const:"orphan_store",description:"A store whose project identity no longer resolves to a live repository\nroot (identity-drift orphan), reported with age and size.",type:"string"},{const:"incident_debris_present",description:"Recovery/corruption artifacts are present beside a store and awaiting\ndeletion.",type:"string"},{const:"retention_backlog",description:"Retention-eligible rows or stores are past their window and awaiting\noffload/collection.",type:"string"},{const:"table_growth",description:"Per-table SQLite payload growth observed between two retained\nwatermarks, including baseline and unavailable measurement states.",type:"string"},{const:"pending_schema_migration",description:"A store whose historical schema convergence has not completed: the\nmigrations whose cost scales with store size are still pending, still\nrunning, or stopped on a failure. The daemon serves while they run, so\nthis is the surface that says which store is still migrating and why.",type:"string"},{const:"wal_checkpoint_pinned",description:"A store whose WAL checkpoint cannot restart the log because a reader\nstill holds a read slot past the checkpoint fence: a wedged reader of\nthis daemon or another process, named in the evidence. Writes run\nuntil the WAL reaches its ceiling, then wait.",type:"string"}]},LanguageServerAnalyzerStateV1:{description:"State of one analyzer as the daemon owner holds it.\n\n`Inactive` is the one state the aggregate never takes: the language has no\nfiles in the project, so Doctor does not grade it, but `lsp servers` still\nlists it from this same read so both surfaces share one authority.",enum:["ready","available","refreshing","disabled","unavailable","crashed","inactive"],type:"string"},LanguageServerAnalyzerV1:{description:"Live state of one analyzer the daemon resolved for the current project.\n\n`LanguageServerStateV1` is the aggregate the finding is graded on; this is\nthe per-analyzer evidence behind it, so an operator learns *which*\nexecutable is missing and how to install it, resolved by the daemon\nprocess (the only PATH that matters, since the daemon spawns analyzers)\nrather than by whichever shell ran the CLI.",properties:{command:{description:"The configured executable, after any operator command override.",type:"string"},detail:{description:"The owner's last recorded error for this analyzer, when one exists.",type:["string","null"]},executable_found:{description:"Whether the daemon process finds `command` on its own PATH. For an\nactive analyzer `state` is the finer verdict (a rustup proxy whose\ntoolchain lacks the component is found yet `Unavailable`); for an\ninactive one this is the only availability evidence.",type:"boolean"},install:{description:"The first install command the adapter advertises, when one exists.",type:["string","null"]},language:{description:"Adapter language (`typescript`, `rust`, …).",type:"string"},state:{$ref:"#/$defs/LanguageServerAnalyzerStateV1"}},required:["language","command","state","executable_found"],type:"object"},LanguageServerReadV1:{description:"One live read from the daemon language-server/analyzer owner.",oneOf:[{description:"The owner observed all project-active analyzer states.",properties:{analyzers:{default:[],description:"Every analyzer the owner resolved, active or not; the aggregate\n`state` covers the active ones only.",items:{$ref:"#/$defs/LanguageServerAnalyzerV1"},type:"array"},coverage:{$ref:"#/$defs/DoctorCoverageCompletenessV1"},kind:{const:"observed",type:"string"},state:{$ref:"#/$defs/LanguageServerStateV1"}},required:["kind","state","coverage"],type:"object"},{description:"Language-server inspection is unsupported on this build/platform.",properties:{kind:{const:"unsupported",type:"string"}},required:["kind"],type:"object"},{description:"No project-active analyzer is configured. The owner's inactive\nanalyzers are still carried so `lsp servers` can list them.",properties:{analyzers:{default:[],items:{$ref:"#/$defs/LanguageServerAnalyzerV1"},type:"array"},kind:{const:"absent",type:"string"}},required:["kind"],type:"object"},{description:"Authorization to inspect analyzer state was denied.",properties:{kind:{const:"denied",type:"string"}},required:["kind"],type:"object"},{description:"Analyzer state could not be determined.",properties:{kind:{const:"unknown",type:"string"}},required:["kind"],type:"object"}]},LanguageServerStateV1:{description:"Aggregate state of the project-active language-server analyzers.",oneOf:[{const:"ready",description:"Every active analyzer is ready.",type:"string"},{const:"available",description:"At least one analyzer is installed but has not produced a ready snapshot.",type:"string"},{const:"refreshing",description:"At least one analyzer is currently refreshing/indexing.",type:"string"},{const:"disabled",description:"At least one project analyzer is disabled.",type:"string"},{const:"unavailable",description:"At least one project analyzer executable is unavailable.",type:"string"},{const:"crashed",description:"At least one analyzer process crashed.",type:"string"}]},RuntimeDoctorReportV1:{description:"The daemon's canonical Doctor report as this route could read it.",oneOf:[{additionalProperties:!1,properties:{kind:{const:"observed",type:"string"},language_servers:{$ref:"#/$defs/LanguageServerReadV1"},report:{$ref:"#/$defs/DoctorReportV1"},schema_convergences:{items:{$ref:"#/$defs/SchemaConvergenceFindingV1"},type:"array"},table_growth_evidence:{items:{$ref:"#/$defs/TableGrowthDoctorEvidenceV1"},type:"array"}},required:["kind","report","table_growth_evidence","schema_convergences","language_servers"],type:"object"},{additionalProperties:!1,description:"The reader is mounted and the read failed.",properties:{kind:{const:"unknown",type:"string"},language_servers:{$ref:"#/$defs/LanguageServerReadV1"},schema_convergences:{items:{$ref:"#/$defs/SchemaConvergenceFindingV1"},type:"array"},table_growth_evidence:{items:{$ref:"#/$defs/TableGrowthDoctorEvidenceV1"},type:"array"}},required:["kind","table_growth_evidence","schema_convergences","language_servers"],type:"object"},{additionalProperties:!1,description:"No Doctor reader is mounted on this route.",properties:{kind:{const:"unsupported",type:"string"},language_servers:{$ref:"#/$defs/LanguageServerReadV1"},schema_convergences:{items:{$ref:"#/$defs/SchemaConvergenceFindingV1"},type:"array"},table_growth_evidence:{items:{$ref:"#/$defs/TableGrowthDoctorEvidenceV1"},type:"array"}},required:["kind","table_growth_evidence","schema_convergences","language_servers"],type:"object"}]},SchemaConvergenceFindingV1:_7,SchemaConvergenceProgressV1:ve,SchemaConvergenceStageV1:vt,SchemaConvergenceStateV1:vr,StorageByteSizeV1:{description:"A byte size measurement. A newtype keeps sizes from being confused with\ncounts, ratios, or timestamps in the read models and producers.",format:"uint64",minimum:0,type:"integer"},StoreKeyV1:{description:"Logical name of one owner-profile store (for example `sessions.db`,\n`graph.db`, or `projects/proj_x`). Never an absolute on-disk path.",type:"string"},TableGrowthDoctorEvidenceV1:{description:"Contract-independent evidence ready to wrap in a future `TableGrowth`\nStorage finding once that generated-contract variant is available.",oneOf:[{properties:{current_bytes:{$ref:"#/$defs/StorageByteSizeV1"},current_observed_at:{$ref:"#/$defs/UtcMicros"},growth_bytes:{$ref:"#/$defs/StorageByteSizeV1"},kind:{const:"significant_growth",type:"string"},previous_bytes:{$ref:"#/$defs/StorageByteSizeV1"},previous_observed_at:{$ref:"#/$defs/UtcMicros"},store:{$ref:"#/$defs/StoreKeyV1"},table:{$ref:"#/$defs/TableNameV1"}},required:["kind","store","table","previous_bytes","current_bytes","growth_bytes","previous_observed_at","current_observed_at"],type:"object"},{properties:{kind:{const:"baseline_established",type:"string"},observed_at:{$ref:"#/$defs/UtcMicros"},store:{$ref:"#/$defs/StoreKeyV1"},tables_observed:{format:"uint64",minimum:0,type:"integer"}},required:["kind","store","observed_at","tables_observed"],type:"object"},{properties:{current_bytes:{$ref:"#/$defs/StorageByteSizeV1"},kind:{const:"table_baseline_pending",type:"string"},observed_at:{$ref:"#/$defs/UtcMicros"},store:{$ref:"#/$defs/StoreKeyV1"},table:{$ref:"#/$defs/TableNameV1"}},required:["kind","store","table","current_bytes","observed_at"],type:"object"},{properties:{kind:{const:"unsupported",type:"string"},store:{$ref:"#/$defs/StoreKeyV1"}},required:["kind","store"],type:"object"},{properties:{kind:{const:"denied",type:"string"},store:{$ref:"#/$defs/StoreKeyV1"}},required:["kind","store"],type:"object"},{properties:{kind:{const:"unknown",type:"string"},reason:{$ref:"#/$defs/TableGrowthUnavailableReasonV1"},store:{$ref:"#/$defs/StoreKeyV1"}},required:["kind","store","reason"],type:"object"}]},TableGrowthUnavailableReasonV1:{description:"Why a per-table payload-growth measurement is unavailable.",oneOf:[{const:"not_yet_measured",description:"No maintenance pass has measured this store yet.",type:"string"},{const:"reader_unavailable",description:"No reader could be leased within the measurement's wait.",type:"string"},{const:"deadline_exceeded",description:"The `dbstat` walk was interrupted by its deadline.",type:"string"},{const:"cancelled",description:"The `dbstat` walk was cancelled.",type:"string"},{const:"storage_corrupt",description:"The store reported corruption.",type:"string"},{const:"storage_infrastructure",description:"The store failed with an infrastructure error.",type:"string"},{const:"storage_other",description:"The store failed for another reason.",type:"string"},{const:"invalid_table_name",description:"`dbstat` named a table that is not a valid table identifier.",type:"string"},{const:"clock_regressed",description:"The previous watermark is later than the current measurement.",type:"string"},{const:"exceeds_measurement_budget",description:"The store is larger than the `dbstat` walk can cover within its\ndeadline.",type:"string"}]},TableNameV1:{description:"A physical table name inside a store, used for per-table growth telemetry.",type:"string"},UtcMicros:bs},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Process, database, and session-observation telemetry for the running\ndaemon, with the sections the request opted into.",properties:{captured_at:{description:"Unix epoch seconds.",format:"uint64",minimum:0,type:"integer"},cursor_session_ingest:!0,cursor_session_placeholder_paths:{items:{type:"string"},type:["array","null"]},database:{description:"Store telemetry, with the authority-audit verdict when it ran."},doctor_report:{anyOf:[{$ref:"#/$defs/RuntimeDoctorReportV1"},{type:"null"}]},host_os:{type:"string"},process:{description:"Cached process sample."},session_temporal_health:!0,tracedecay_version:{type:"string"}},required:["captured_at","tracedecay_version","host_os","process","database"],title:"RuntimeResultV1",type:"object"},{$defs:{SearchLexicalAliasV1:{additionalProperties:!1,description:"One named query-time vocabulary alias.",properties:{alternative:{maxLength:128,type:"string"},strict_query:{maxLength:128,type:"string"}},required:["strict_query","alternative"],type:"object"},SearchLexicalFieldFilterV1:{additionalProperties:!1,properties:{field:{$ref:"#/$defs/SearchLexicalFieldV1"},include:{type:"boolean"}},required:["field","include"],type:"object"},SearchLexicalFieldV1:{description:"A lexical posting field a search may include or exclude.",enum:["symbol_name","qualified_name","path","signature","documentation","body_text","preamble_text","exact_term","subtoken"],type:"string"},SearchLexicalProximityV1:{additionalProperties:!1,description:"Ordered terms that must occur in one field within `maximum_gap`\nintervening tokens of each other.",properties:{maximum_gap:{format:"uint32",maximum:8,minimum:0,type:"integer"},terms:{items:{type:"string"},maxItems:8,minItems:2,type:"array"}},required:["terms","maximum_gap"],type:"object"}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{cursor:{description:"Authenticated opaque continuation returned as next_cursor. Repeat the same query and lexical options with it.",type:["string","null"]},lazy_index_ignored_dependencies:{description:"Opt in to bounded indexing of ignored dependency entry files when an import hint matches (default: false).",type:["boolean","null"]},lexical_aliases:{description:"Named query-time vocabulary aliases. The strict query always ranks first. Alias-only hits follow it with the strict query, alternative, and configured-vocabulary reason disclosed.",items:{$ref:"#/$defs/SearchLexicalAliasV1"},maxItems:8,type:["array","null"]},lexical_anchors:{description:"Exact identifiers or technical terms (e.g. 'reserve_stock', 'Foo::bar', 'E0308') that the answer must be about. Each is ranked through the lexical lane as its own route: a hit carrying an anchor outranks every hit that carries none, exact hits included, every anchor with matches keeps at least its best sites through the lane cap, and `lexical_anchors` in the response reports each anchor's outcome (`matched` rows, `admitted` sites this response returns, `dropped` admitted sites it could not carry with the reason, `unmatched`, or `not_served`). Ranked retrieval, not exhaustive grep (use tracedecay_grep for that). Each result names the routes that ranked it. At most 8 anchors, each one whitespace-free term of at most 128 bytes, no repeats.",items:{type:"string"},maxItems:8,type:["array","null"]},lexical_field_filters:{description:"Include or exclude lexical symbol_name, qualified_name, path, signature, documentation, body_text, preamble_text, exact_term, or subtoken fields.",items:{$ref:"#/$defs/SearchLexicalFieldFilterV1"},maxItems:9,type:["array","null"]},lexical_phrases:{description:"Exact lexical phrases to rank through n-gram candidate pruning.",items:{type:"string"},maxItems:4,type:["array","null"]},lexical_proximities:{description:"Ordered lexical terms that must occur within the bounded intervening-token gap.",items:{$ref:"#/$defs/SearchLexicalProximityV1"},maxItems:4,type:["array","null"]},limit:{description:"Maximum number of results to return (default: 10)",format:"uint64",minimum:0,type:["integer","null"]},prefer_symbol:{description:"Add a lexical route restricted to symbol-name matches for the identifier-shaped words of the query. Omitted, it runs when the query is name-shaped (at least half its content words are identifiers such as 'getUserById' or 'Foo::bar'); true forces it, false suppresses it. `query_route` in the response reports the decision and its margin. Query words such as class/struct/function/find/explain are ignored; 'Foo::bar' and 'Foo.bar' contribute 'bar'.",type:["boolean","null"]},query:{description:"Search query string to match against symbol names",type:"string"}},required:["query"],title:"SearchSurfaceRequestV1",type:"object"},{$defs:{ApplicationProblemDetailV1:m9,CalibrationProfileId:fR,CandidateContribution:fj,CodeIndexBuildBlockedReasonV1:fF,CodeIndexConvergenceParkedV1:fL,CodeIndexStalenessStateV1:fB,ComponentRevision:f0,ContextLexicalAnchorV1:hr,DaemonServiceUnitObservationV1:hF,DiagnosticsSearchedTsconfigV1:hG,EvidenceRole:h2,ExactClass:h4,FileOccurrenceId:yj,FixedPointScore:yT,FreshnessCompatibilityV1:yO,FusedCandidate:yE,LexicalAnchorDropReasonV1:g$,LexicalAnchorDropV1:gS,LogicalCopyClusterId:gw,LogicalEvidenceId:gV,OccurrenceProvenance:g5,PrimitiveFreshnessStateV1:_i,PrimitiveIndexingStateV1:_o,PrimitiveLaneCompleteV1:_n,PrimitiveRecallV1:_s,PrimitiveSearchFreshnessV1:_d,PrimitiveUnavailableEvidenceV1:_p,PrimitiveUnavailableStatusV1:_u,RankingDecision:_j,RankingDecisionKind:_C,RepositoryId:_z,RetrievalAnchorId:_J,RetrievalSourceRoleV1:_X,RetrieverKind:_1,ScoreDomainId:vm,SearchCompleteV1:{additionalProperties:!1,properties:{code_generation:{type:"string"},coverage:{$ref:"#/$defs/SearchCoverageV1"},external_import_hint:{anyOf:[{$ref:"#/$defs/SearchExternalImportHintV1"},{type:"null"}]},freshness:{$ref:"#/$defs/PrimitiveSearchFreshnessV1",description:"Freshness of the served code generation, derived from the typed lane\ncoverage and the daemon scheduler's worktree state."},lexical_anchors:{description:"Outcome of every caller `lexical_anchors` entry, beside the routes.",items:{$ref:"#/$defs/ContextLexicalAnchorV1"},type:["array","null"]},lexical_routes:{description:"Every lexical route fused into this page; present only when a route\nbeyond the strict query ran or ranked a result.",items:{$ref:"#/$defs/SearchLexicalRouteV1"},type:["array","null"]},next_cursor:{description:"Authenticated continuation for the next page; null on the last page.",type:["string","null"]},query_fallback_digest:{type:"string"},query_route:{anyOf:[{$ref:"#/$defs/SearchQueryRouteV1"},{type:"null"}],description:"Which lane the query's shape selected, and its margin."},results:{items:{$ref:"#/$defs/SearchResultRowV1"},type:"array"},scope_prefix:{description:"The session's scope prefix. Ranked candidates carry no file path, so\nthe scope is reported and not applied.",type:["string","null"]},scope_prefix_applied:{type:["boolean","null"]},verified_graph_evidence:{anyOf:[{$ref:"#/$defs/PrimitiveUnavailableEvidenceV1"},{type:"null"}]}},required:["freshness","code_generation","query_fallback_digest","coverage","results"],type:"object"},SearchCoverageV1:{additionalProperties:!1,description:"Per-lane recall of one search, so a full-recall answer is told apart from\none produced while a lane was down.",properties:{exact:{$ref:"#/$defs/SearchLaneStatusV1"},graph:{$ref:"#/$defs/SearchLaneStatusV1"},lexical:{$ref:"#/$defs/SearchLaneStatusV1"},recall:{$ref:"#/$defs/PrimitiveRecallV1"}},required:["exact","lexical","graph","recall"],type:"object"},SearchDisplayUnavailableV1:{description:"Why a ranked candidate's display metadata was not hydrated: the answering\ngeneration no longer matches the request (`stale`), its record is\nincompatible or does not bind the candidate (`incompatible`, `invalid`),\nthe read failed (`internal`), the hydration budget was spent\n(`budget_exceeded`), or the request was cancelled (`cancelled`).",enum:["stale","incompatible","invalid","internal","budget_exceeded","cancelled"],type:"string"},SearchExternalImportCandidatesV1:{additionalProperties:!1,properties:{candidates:{items:{$ref:"#/$defs/SearchExternalImportV1"},type:"array"},evidence:{type:"string"},message:{type:"string"},resolution_status:{type:"string"},suggested_action:{type:"string"}},required:["message","evidence","resolution_status","candidates","suggested_action"],type:"object"},SearchExternalImportHintV1:{anyOf:[{$ref:"#/$defs/SearchExternalImportCandidatesV1"},{$ref:"#/$defs/PrimitiveUnavailableEvidenceV1"}],description:"Advisory evidence that a sparse search matched external-module imports,\nor why that evidence could not be read."},SearchExternalImportV1:{additionalProperties:!1,properties:{import_file:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},module:{type:"string"},symbol:{description:"The imported name; null for a whole-module import.",type:["string","null"]}},required:["module","import_file","line"],type:"object"},SearchLaneStateV1:{description:"A lane that did not serve the current complete generation. A partial\nlane names its generation and reason when it has them, null otherwise.",oneOf:[{additionalProperties:!1,properties:{generation:{type:"string"},status:{const:"stale",type:"string"}},required:["status","generation"],type:"object"},{additionalProperties:!1,properties:{generation:{type:["string","null"]},reason:{type:["string","null"]},status:{const:"partial",type:"string"}},required:["status"],type:"object"},{additionalProperties:!1,properties:{reason:{type:"string"},status:{const:"unavailable",type:"string"}},required:["status","reason"],type:"object"}]},SearchLaneStatusV1:{anyOf:[{$ref:"#/$defs/PrimitiveLaneCompleteV1"},{$ref:"#/$defs/SearchLaneStateV1"}]},SearchLexicalAlternativeReasonV1:{description:"Why the lexical lane tried a configured alternative.",enum:["configured_vocabulary_alias"],type:"string"},SearchLexicalRouteV1:{description:"One lexical route fused into the page, with its display label.",oneOf:[{additionalProperties:!1,description:"The caller's strict lexical query.",properties:{label:{type:"string"},route:{const:"query",type:"string"}},required:["route","label"],type:"object"},{additionalProperties:!1,description:"One caller-supplied exact identifier or term.",properties:{anchor:{type:"string"},label:{type:"string"},route:{const:"anchor",type:"string"}},required:["route","anchor","label"],type:"object"},{additionalProperties:!1,description:"Identifier-shaped tokens of the query, restricted to symbol names.",properties:{label:{type:"string"},route:{const:"preferred_symbol",type:"string"},tokens:{items:{type:"string"},type:"array"}},required:["route","tokens","label"],type:"object"},{additionalProperties:!1,description:"Identifier and path components recovered from the strict query.",properties:{label:{type:"string"},route:{const:"identifier_split",type:"string"},strict_query:{type:"string"},terms:{items:{type:"string"},type:"array"}},required:["route","strict_query","terms","label"],type:"object"},{additionalProperties:!1,description:"A configured query-time vocabulary alternative.",properties:{alternative:{type:"string"},label:{type:"string"},reason:{$ref:"#/$defs/SearchLexicalAlternativeReasonV1"},route:{const:"alias",type:"string"},strict_query:{type:"string"}},required:["route","strict_query","alternative","reason","label"],type:"object"}]},SearchQueryRouteDeciderV1:{description:"Who chose the query route: the query-shape gate or the caller's\n`prefer_symbol`.",enum:["query_shape","caller"],type:"string"},SearchQueryRouteKindV1:{description:"Which lexical lane the query's shape selected.",oneOf:[{const:"name",description:"The symbol-name route ran beside the strict query.",type:"string"},{const:"prose",description:"The strict query ran without the symbol-name route.",type:"string"}]},SearchQueryRouteV1:{additionalProperties:!1,description:"The query-shape routing decision behind a page.",properties:{decided_by:{$ref:"#/$defs/SearchQueryRouteDeciderV1"},margin:{description:"Distance from the name gate in [-0.5, 0.5]: the share of the query's\ncontent words that are identifier-shaped, minus one half. The gate\nselects `name` at or above 0. Reported when the caller decided too.\nIt describes query shape only and is not an answerability signal.",format:"double",type:"number"},route:{$ref:"#/$defs/SearchQueryRouteKindV1"}},required:["route","margin","decided_by"],type:"object"},SearchResultDisplayV1:{additionalProperties:!1,properties:{kind:{type:"string"},name:{type:"string"},path:{type:"string"},qualified_name:{type:"string"}},required:["name","qualified_name","kind","path"],type:"object"},SearchResultRowV1:{additionalProperties:!1,description:"One ranked candidate with its generation-bound display metadata.",properties:{candidate:{$ref:"#/$defs/FusedCandidate"},display:{anyOf:[{$ref:"#/$defs/SearchResultDisplayV1"},{type:"null"}]},display_unavailable:{anyOf:[{$ref:"#/$defs/SearchDisplayUnavailableV1"},{type:"null"}],description:"Why `display` is absent from this ranked candidate."},final_ordinal:{format:"uint32",minimum:0,type:"integer"},lexical_routes:{description:"The lexical routes that ranked this candidate.",items:{$ref:"#/$defs/SearchRouteMatchV1"},type:["array","null"]},node_id:{description:"The graph symbol to read with `tracedecay_source_body`.",type:["string","null"]}},required:["candidate","final_ordinal"],type:"object"},SearchRouteMatchV1:{additionalProperties:!1,description:"One route that ranked a candidate, named by its route label.",properties:{matched_terms:{items:{type:"string"},type:"array"},route:{type:"string"},score_micros:{format:"uint64",minimum:0,type:"integer"},spelling_variants:{items:{$ref:"#/$defs/SearchSpellingVariantV1"},type:"array"}},required:["route","score_micros","matched_terms"],type:"object"},SearchSpellingVariantV1:{additionalProperties:!1,properties:{alternative:{type:"string"},query:{type:"string"}},required:["query","alternative"],type:"object"},SearchUnavailableV1:{additionalProperties:!1,properties:{code_generation:{type:["string","null"]},coverage:{$ref:"#/$defs/SearchCoverageV1"},detail:{anyOf:[{$ref:"#/$defs/ApplicationProblemDetailV1"},{type:"null"}],description:"Present when indexing is parked: its cause, remedy, and wake retry."},freshness:{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},query_fallback_digest:{description:"Always null: no fallback subpayload was produced.",type:["string","null"]},reason:{type:"string"},results:{description:"Always empty: no generation answered.",items:{$ref:"#/$defs/SearchResultRowV1"},type:"array"},status:{$ref:"#/$defs/PrimitiveUnavailableStatusV1"},verified_graph_evidence:{anyOf:[{$ref:"#/$defs/PrimitiveUnavailableEvidenceV1"},{type:"null"}]}},required:["freshness","results","status","reason","coverage"],type:"object"},SessionOrThreadId:vb,SourceFreshness:vW,SourceInstanceKey:vM,SourceNamespace:vz,SourceOccurrenceId:vD,UtcMicros:bs},$schema:"https://json-schema.org/draft/2020-12/schema",anyOf:[{$ref:"#/$defs/SearchCompleteV1"},{$ref:"#/$defs/SearchUnavailableV1"}],description:"What a search served: a ranked page, or the typed reason no generation\ncould answer.",title:"SearchResultV1"},{$defs:{PageRequest:_t,ResultProjection:_H,RetrievalOrder:_Z,RetrievalRequestMeta:_Q,SessionId:vv,TemporalModeV1:v6,UtcMicros:bs},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{meta:{$ref:"#/$defs/RetrievalRequestMeta"},session_id:{$ref:"#/$defs/SessionId"}},required:["session_id","meta"],title:"SessionLookupRequest",type:"object"},{$defs:{RetrievalAnchorId:_J},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{anchors:{items:{$ref:"#/$defs/RetrievalAnchorId"},type:"array"}},required:["anchors"],title:"SessionLookupResult",type:"object"},{$defs:{SessionRefreshFrontierV1:{additionalProperties:!1,properties:{committed_through:{format:"uint64",minimum:0,type:"integer"},observed_through:{format:"uint64",minimum:0,type:"integer"}},required:["observed_through","committed_through"],type:"object"},SessionRefreshGrainV1:{enum:["occurrence","logical_message","turn","session","thread","agent","summary"],type:"string"},SessionRefreshScopeV1:{description:"Session-store owner one refresh is bound to.\n\nThe caller selects the already-mounted project or profile authority. Exact\nprofile, project, repository, worktree, branch, store, and root identities\nstay daemon-owned and are resolved from that authority during admission.",oneOf:[{additionalProperties:!1,properties:{kind:{const:"project",type:"string"}},required:["kind"],type:"object"},{additionalProperties:!1,properties:{kind:{const:"profile",type:"string"}},required:["kind"],type:"object"}]},SessionRefreshSessionV1:{additionalProperties:!1,properties:{id:{type:"string"}},required:["id"],type:"object"},SessionRefreshSourceV1:{additionalProperties:!1,properties:{scope:{type:"string"}},required:["scope"],type:"object"},SessionRefreshTargetV1:{additionalProperties:!1,properties:{frontier:{$ref:"#/$defs/SessionRefreshFrontierV1"},grain:{$ref:"#/$defs/SessionRefreshGrainV1"},temporal_mode:{$ref:"#/$defs/TemporalModeV1"}},required:["temporal_mode","grain","frontier"],type:"object"},TemporalModeV1:v6,UtcMicros:bs},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Exact route-selected session-refresh request body.\n\nEach current route selects the action itself; `scope` selects the mounted\nsession-store owner. Project-scoped requests are served under project-open\nadmission, profile-scoped requests by the authenticated profile authority.",properties:{handle:{type:["string","null"]},scope:{$ref:"#/$defs/SessionRefreshScopeV1"},session:{$ref:"#/$defs/SessionRefreshSessionV1"},source:{$ref:"#/$defs/SessionRefreshSourceV1"},target:{$ref:"#/$defs/SessionRefreshTargetV1"}},required:["scope","session","source","target"],title:"SessionRefreshActionRequestV1",type:"object"},{$defs:{ClosedUtcIntervalV1:fW,RetainedErrorV1:_G,RetainedOutcomeStatusV1:_B,SessionCoverageIntervalV1:vh,SessionCoverageReasonV1:vy,SessionCoverageRequestV1:vg,SessionCoverageStateV1:v_,SessionRefreshFrontierResultV1:v$,SessionRefreshProgressV1:vS,SessionRefreshReceiptV1:vk,SessionRefreshTerminalStateResultV1:vw,SessionSourceCoverageV1:vP,TemporalCoverageV1:v0,TemporalModeV1:v6,UtcMicros:bs,ValidCoverageIntervalV1:bd},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{accepted_at:{format:"int64",type:["integer","null"]},error:{anyOf:[{$ref:"#/$defs/RetainedErrorV1"},{type:"null"}]},handle:{type:["string","null"]},operation_id:{type:["string","null"]},outcome:{$ref:"#/$defs/RetainedOutcomeStatusV1"},progress:{anyOf:[{$ref:"#/$defs/SessionRefreshProgressV1"},{type:"null"}]},receipt:{anyOf:[{$ref:"#/$defs/SessionRefreshReceiptV1"},{type:"null"}]},scope:{type:"string"},tool:{type:"string"}},required:["outcome","scope","tool"],title:"SessionRefreshBeginResultV1",type:"object"},{$defs:{ClosedUtcIntervalV1:fW,RetainedErrorV1:_G,RetainedOutcomeStatusV1:_B,SessionCoverageIntervalV1:vh,SessionCoverageReasonV1:vy,SessionCoverageRequestV1:vg,SessionCoverageStateV1:v_,SessionRefreshFrontierResultV1:v$,SessionRefreshProgressV1:vS,SessionRefreshReceiptV1:vk,SessionRefreshTerminalStateResultV1:vw,SessionSourceCoverageV1:vP,TemporalCoverageV1:v0,TemporalModeV1:v6,UtcMicros:bs,ValidCoverageIntervalV1:bd},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{accepted_at:{format:"int64",type:["integer","null"]},error:{anyOf:[{$ref:"#/$defs/RetainedErrorV1"},{type:"null"}]},handle:{type:["string","null"]},operation_id:{type:["string","null"]},outcome:{$ref:"#/$defs/RetainedOutcomeStatusV1"},progress:{anyOf:[{$ref:"#/$defs/SessionRefreshProgressV1"},{type:"null"}]},receipt:{anyOf:[{$ref:"#/$defs/SessionRefreshReceiptV1"},{type:"null"}]},scope:{type:"string"},tool:{type:"string"}},required:["outcome","scope","tool"],title:"SessionRefreshCancelResultV1",type:"object"},{$defs:{ClosedUtcIntervalV1:fW,RetainedErrorV1:_G,RetainedOutcomeStatusV1:_B,SessionCoverageIntervalV1:vh,SessionCoverageReasonV1:vy,SessionCoverageRequestV1:vg,SessionCoverageStateV1:v_,SessionRefreshFrontierResultV1:v$,SessionRefreshProgressV1:vS,SessionRefreshReceiptV1:vk,SessionRefreshTerminalStateResultV1:vw,SessionSourceCoverageV1:vP,TemporalCoverageV1:v0,TemporalModeV1:v6,UtcMicros:bs,ValidCoverageIntervalV1:bd},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{error:{anyOf:[{$ref:"#/$defs/RetainedErrorV1"},{type:"null"}]},outcome:{$ref:"#/$defs/RetainedOutcomeStatusV1"},progress:{anyOf:[{$ref:"#/$defs/SessionRefreshProgressV1"},{type:"null"}]},receipt:{anyOf:[{$ref:"#/$defs/SessionRefreshReceiptV1"},{type:"null"}]},scope:{type:"string"},tool:{type:"string"}},required:["outcome","scope","tool"],title:"SessionRefreshStatusResultV1",type:"object"},{$defs:{RetainedTimeFilterV1:_K,SessionGitRefV1:{enum:["branch","worktree","commit"],type:"string"},SessionGitRelationV1:{enum:["produced","observed","all"],type:"string"}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{git_ref:{$ref:"#/$defs/SessionGitRefV1"},limit:{format:"uint64",minimum:0,type:["integer","null"]},relation:{anyOf:[{$ref:"#/$defs/SessionGitRelationV1"},{type:"null"}]},since:{anyOf:[{$ref:"#/$defs/RetainedTimeFilterV1"},{type:"null"}]},until:{anyOf:[{$ref:"#/$defs/RetainedTimeFilterV1"},{type:"null"}]},value:{type:"string"}},required:["git_ref","value"],title:"SessionsForRequestV1",type:"object"},{$defs:{CorrelationIndexCountModeV1:{enum:["presence_only"],type:"string"},CorrelationIndexV1:{additionalProperties:!1,properties:{backfill_watermark:{format:"int64",type:["integer","null"]},commit_count:{format:"uint64",minimum:0,type:["integer","null"]},commits_present:{type:"boolean"},count_mode:{$ref:"#/$defs/CorrelationIndexCountModeV1"},generation:{type:["string","null"]},projection_available:{type:"boolean"},source_watermark:{type:["string","null"]},span_count:{format:"uint64",minimum:0,type:["integer","null"]},spans_present:{type:"boolean"}},required:["projection_available","spans_present","commits_present","count_mode"],type:"object"},RetainedOutcomeStatusV1:_B,SessionCorrelationHitV1:{additionalProperties:!1,properties:{branch:{type:["string","null"]},commit_sha:{type:["string","null"]},committed_at:{format:"int64",type:["integer","null"]},confidence:{format:"int64",type:["integer","null"]},event_count:{format:"int64",type:"integer"},evidence:{type:["string","null"]},evidence_message_id:{type:["string","null"]},first_ts:{format:"int64",type:["integer","null"]},last_ts:{format:"int64",type:["integer","null"]},provider:{type:"string"},relation:{type:["string","null"]},session_id:{type:"string"},sources:{items:{type:"string"},type:"array"},span_count:{format:"int64",type:"integer"},span_overlap_kind:{type:["string","null"]},worktree:{type:["string","null"]}},required:["provider","session_id","event_count","span_count","sources"],type:"object"}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{count:{format:"uint",minimum:0,type:"integer"},git_ref:{type:["string","null"]},index:{anyOf:[{$ref:"#/$defs/CorrelationIndexV1"},{type:"null"}]},index_empty:{type:["boolean","null"]},message:{type:["string","null"]},observed_count:{format:"uint",minimum:0,type:["integer","null"]},observed_sessions:{items:{$ref:"#/$defs/SessionCorrelationHitV1"},type:["array","null"]},problem_code:{type:["string","null"]},relation:{type:["string","null"]},results:{items:{$ref:"#/$defs/SessionCorrelationHitV1"},type:"array"},since:{format:"int64",type:["integer","null"]},status:{$ref:"#/$defs/RetainedOutcomeStatusV1"},until:{format:"int64",type:["integer","null"]},value:{type:["string","null"]}},required:["count","results","status"],title:"SessionsForResultV1",type:"object"},{$defs:{NodeExpansionCostV1:g4,SymbolSignatureV1:{additionalProperties:!1,properties:{cost_to_expand:{$ref:"#/$defs/NodeExpansionCostV1"},docstring:{type:["string","null"]},end_line:{format:"uint32",minimum:0,type:"integer"},file:{type:"string"},is_async:{type:"boolean"},kind:{type:"string"},name:{type:"string"},node_id:{type:"string"},qualified_name:{type:"string"},signature:{type:["string","null"]},start_line:{format:"uint32",minimum:0,type:"integer"},unavailable_fields:{items:{type:"string"},type:"array"},visibility:{type:"string"}},required:["node_id","name","qualified_name","kind","visibility","is_async","file","start_line","end_line","cost_to_expand","unavailable_fields"],type:"object"}},$schema:"https://json-schema.org/draft/2020-12/schema",items:{$ref:"#/$defs/SymbolSignatureV1"},title:"Array_of_SymbolSignatureV1",type:"array"},{$defs:{ProjectId:_m,RepositoryId:_z,SimilarMatchClassV1:vx,SimilarTargetV1:{oneOf:[{additionalProperties:!1,properties:{kind:{const:"symbol_occurrence",type:"string"},symbol_occurrence_id:{$ref:"#/$defs/SymbolOccurrenceId"}},required:["kind","symbol_occurrence_id"],type:"object"},{additionalProperties:!1,properties:{kind:{const:"source_range",type:"string"},path:{type:"string"},span:{$ref:"#/$defs/SourceSpan"}},required:["kind","path","span"],type:"object"}]},SourceSpan:vF,SymbolOccurrenceId:vJ},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{cursor:{type:["string","null"]},match_classes:{items:{$ref:"#/$defs/SimilarMatchClassV1"},type:"array"},project_id:{$ref:"#/$defs/ProjectId"},repository_id:{$ref:"#/$defs/RepositoryId"},result_limit:{description:"Preferred result page size.",format:"uint32",minimum:0,type:"integer"},target:{$ref:"#/$defs/SimilarTargetV1"},work_limit:{format:"uint32",minimum:0,type:"integer"}},required:["project_id","repository_id","target","match_classes","result_limit","work_limit"],title:"SimilarSurfaceRequestV1",type:"object"},{$defs:{CodeGenerationId:fz,CodeIndexBuildBlockedReasonV1:fF,CodeIndexConvergenceParkedV1:fL,CodeIndexStalenessStateV1:fB,ManifestDigest:gj,PrimitiveFreshnessStateV1:_i,PrimitiveIndexingStateV1:_o,PrimitiveSearchFreshnessV1:_d,ProjectId:_m,RepositoryId:_z,SimilarCoverageV1:{oneOf:[{additionalProperties:!1,properties:{status:{const:"complete",type:"string"}},required:["status"],type:"object"},{additionalProperties:!1,properties:{status:{const:"partial",type:"string"}},required:["status"],type:"object"},{additionalProperties:!1,properties:{minimum_tokens:{format:"uint32",minimum:0,type:"integer"},status:{const:"excluded_too_small",type:"string"}},required:["status","minimum_tokens"],type:"object"},{additionalProperties:!1,properties:{maximum_bytes:{format:"uint64",minimum:0,type:"integer"},maximum_tokens:{format:"uint32",minimum:0,type:"integer"},status:{const:"excluded_too_large",type:"string"}},required:["status","maximum_tokens","maximum_bytes"],type:"object"},{additionalProperties:!1,properties:{status:{const:"excluded_incomplete_tokenization",type:"string"}},required:["status"],type:"object"}]},SimilarFamilyV1:vI,SimilarMatchClassV1:vx,SimilarOccurrenceV1:vj,SourceSpan:vF,SymbolOccurrenceId:vJ,WorktreeId:So},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{coverage:{$ref:"#/$defs/SimilarCoverageV1"},families:{items:{$ref:"#/$defs/SimilarFamilyV1"},type:"array"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},source:{$ref:"#/$defs/SimilarOccurrenceV1"},source_generation:{$ref:"#/$defs/CodeGenerationId"}},required:["source","families","source_generation","coverage"],title:"SimilarResultV1",type:"object"},{$defs:{ManagedSkillState:gx},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{include_body:{default:!1,description:"If true, include each skill's body_markdown in the list response\n(default: false).",type:"boolean"},state:{anyOf:[{$ref:"#/$defs/ManagedSkillState"},{type:"null"}],description:"Optional managed-skill lifecycle state filter."}},title:"SkillListSurfaceRequestV1",type:"object"},{$defs:{AutomationReadStatusV1:fn,ManagedSkillMaterializationScope:gP,ManagedSkillMetadata:gR,ManagedSkillProvenance:gq,ManagedSkillSource:gI,ManagedSkillState:gx,SkillImprovementRecommendation:vC,SkillInstallTarget:vT,SkillListEntryV1:{additionalProperties:!1,properties:{body_markdown:{description:"Present only when the request asked for bodies.",type:["string","null"]},improvement_recommendation:{anyOf:[{$ref:"#/$defs/SkillImprovementRecommendation"},{type:"null"}]},metadata:{$ref:"#/$defs/ManagedSkillMetadata"},stale_recommendation:{anyOf:[{$ref:"#/$defs/SkillStaleRecommendation"},{type:"null"}]},support_file_count:{format:"uint",minimum:0,type:"integer"},support_file_paths:{items:{type:"string"},type:"array"},usage_summary:{$ref:"#/$defs/SkillUsageRecord"}},required:["metadata","support_file_count","support_file_paths","usage_summary"],type:"object"},SkillStaleRecommendation:vO,SkillUsageRecord:vE},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{count:{format:"uint",minimum:0,type:"integer"},profile_root:{type:"string"},skills:{items:{$ref:"#/$defs/SkillListEntryV1"},type:"array"},status:{$ref:"#/$defs/AutomationReadStatusV1"}},required:["status","profile_root","count","skills"],title:"SkillListResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{id:{description:"Managed skill id to read.",type:"string"},include_support_files:{default:!1,description:"Include support-file byte payloads. Default false; the response still\nlists each path and byte length.",type:"boolean"}},required:["id"],title:"SkillViewSurfaceRequestV1",type:"object"},{$defs:{AutomationReadStatusV1:fn,ManagedSkill:{properties:{body_markdown:{type:"string"},metadata:{$ref:"#/$defs/ManagedSkillMetadata"},support_files:{items:{$ref:"#/$defs/ManagedSupportFile"},type:"array"}},required:["metadata","body_markdown","support_files"],type:"object"},ManagedSkillMaterializationScope:gP,ManagedSkillMetadata:gR,ManagedSkillProvenance:gq,ManagedSkillSource:gI,ManagedSkillState:gx,ManagedSupportFile:{properties:{bytes:{items:{format:"uint8",maximum:255,minimum:0,type:"integer"},type:"array"},path:{type:"string"}},required:["path","bytes"],type:"object"},SkillImprovementRecommendation:vC,SkillInstallTarget:vT,SkillStaleRecommendation:vO,SkillSupportFileSummaryV1:{additionalProperties:!1,properties:{byte_len:{format:"uint",minimum:0,type:"integer"},path:{type:"string"}},required:["path","byte_len"],type:"object"},SkillUsageRecord:vE},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{improvement_recommendation:{anyOf:[{$ref:"#/$defs/SkillImprovementRecommendation"},{type:"null"}]},profile_root:{type:"string"},skill:{$ref:"#/$defs/ManagedSkill",description:"The skill package; `support_files` is empty unless the request\nincluded them."},stale_recommendation:{anyOf:[{$ref:"#/$defs/SkillStaleRecommendation"},{type:"null"}]},status:{$ref:"#/$defs/AutomationReadStatusV1"},support_file_summaries:{items:{$ref:"#/$defs/SkillSupportFileSummaryV1"},type:"array"},support_files_included:{type:"boolean"},usage_summary:{$ref:"#/$defs/SkillUsageRecord"}},required:["status","profile_root","skill","usage_summary","support_files_included","support_file_summaries"],title:"SkillViewResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{node_id:{type:"string"}},required:["node_id"],title:"SourceBodyPrimitiveRequest",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{body:{type:"string"},end_line:{format:"uint32",minimum:0,type:"integer"},file:{type:"string"},node_id:{type:"string"},start_line:{format:"uint32",minimum:0,type:"integer"}},required:["node_id","file","start_line","end_line","body"],title:"SourceBodyPrimitiveResult",type:"object"},{$defs:{ManifestDigest:gj,UseCaseId:bn},$schema:"https://json-schema.org/draft/2020-12/schema",description:"Exact public input accepted by `tracedecay_source_edit_reconcile`.",oneOf:[{additionalProperties:!1,description:"Exact public input accepted by `tracedecay_source_edit_reconcile`.",properties:{attempt_idempotency_key:{type:"string"},confirm:{default:!1,type:"boolean"},disposition:{const:"inspect",type:"string"},effect_id:{type:"string"},idempotency_key:{type:"string"},input_digest:{type:"string"},original_operation:{$ref:"#/$defs/UseCaseId"}},required:["original_operation","effect_id","idempotency_key","attempt_idempotency_key","input_digest","disposition"],type:"object"},{additionalProperties:!1,description:"Exact public input accepted by `tracedecay_source_edit_reconcile`.",properties:{attempt_idempotency_key:{type:"string"},committed_state:{$ref:"#/$defs/ManifestDigest"},confirm:{default:!1,type:"boolean"},disposition:{const:"confirm_committed",type:"string"},effect_id:{type:"string"},idempotency_key:{type:"string"},input_digest:{type:"string"},original_operation:{$ref:"#/$defs/UseCaseId"}},required:["original_operation","effect_id","idempotency_key","attempt_idempotency_key","input_digest","disposition","committed_state"],type:"object"},{additionalProperties:!1,description:"Exact public input accepted by `tracedecay_source_edit_reconcile`.",properties:{attempt_idempotency_key:{type:"string"},confirm:{default:!1,type:"boolean"},disposition:{const:"confirm_unchanged",type:"string"},effect_id:{type:"string"},idempotency_key:{type:"string"},input_digest:{type:"string"},original_operation:{$ref:"#/$defs/UseCaseId"}},required:["original_operation","effect_id","idempotency_key","attempt_idempotency_key","input_digest","disposition"],type:"object"},{additionalProperties:!1,description:"Exact public input accepted by `tracedecay_source_edit_reconcile`.",properties:{attempt_idempotency_key:{type:"string"},confirm:{default:!1,type:"boolean"},disposition:{const:"acknowledge_partial",type:"string"},effect_id:{type:"string"},idempotency_key:{type:"string"},input_digest:{type:"string"},observed_state:{$ref:"#/$defs/ManifestDigest"},original_operation:{$ref:"#/$defs/UseCaseId"}},required:["original_operation","effect_id","idempotency_key","attempt_idempotency_key","input_digest","disposition","observed_state"],type:"object"}],title:"SourceEditReconcileSurfaceRequestV1",type:"object"},{$defs:{FileOccurrenceId:yj,PageRequest:_t,ResultProjection:_H,RetrievalOrder:_Z,RetrievalRequestMeta:_Q,SourceSpan:vF,TemporalModeV1:v6,UtcMicros:bs},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{file:{$ref:"#/$defs/FileOccurrenceId",description:"Canonical file occurrence from `code_exact_occurrence` at\n`items[].occurrence.file`; a logical path is not a file occurrence identity."},meta:{$ref:"#/$defs/RetrievalRequestMeta"},span:{$ref:"#/$defs/SourceSpan"}},required:["file","span","meta"],title:"SourceLinesRequest",type:"object"},{$defs:{RetrievalAnchorId:_J,SourceReference:{additionalProperties:!1,properties:{anchor:{$ref:"#/$defs/RetrievalAnchorId"},span:{$ref:"#/$defs/SourceSpan"}},required:["anchor","span"],type:"object"},SourceSpan:vF},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{body:{type:["string","null"]},file:{type:["string","null"]},references:{items:{$ref:"#/$defs/SourceReference"},type:"array"}},required:["references"],title:"SourceLinesResult",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{file:{type:"string"}},required:["file"],title:"SourceOutlinePrimitiveRequest",type:"object"},{$defs:{SymbolPrimitiveRecord:vZ},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{file:{type:"string"},symbols:{items:{$ref:"#/$defs/SymbolPrimitiveRecord"},type:"array"}},required:["file","symbols"],title:"SourceOutlinePrimitiveResult",type:"object"},{$defs:{BranchStackEdgeV1:fv,BranchStackId:fb,BranchStackNodeV1:f$,BranchStackRevisionId:fS,CommitId:fX,ManifestDigest:gj,NativeIntegrationDirectionV1:gK,NativeIntegrationSelectionDeclarationV1:{description:"Explicit caller declaration for one native-integration selection.\n\nDeclared stacks contain the visible nodes and edges, while the daemon\nderives canonical order and the revision digest through the domain\nconstructor. Callers cannot submit either derived field.",oneOf:[{additionalProperties:!1,properties:{binding:{additionalProperties:!1,properties:{destination_node_id:{$ref:"#/$defs/StackNodeId"},direction:{$ref:"#/$defs/NativeIntegrationDirectionV1"},edges:{items:{$ref:"#/$defs/BranchStackEdgeV1"},type:"array"},nodes:{items:{$ref:"#/$defs/BranchStackNodeV1"},type:"array"},revision_id:{$ref:"#/$defs/BranchStackRevisionId"},source_node_id:{$ref:"#/$defs/StackNodeId"},stack_id:{$ref:"#/$defs/BranchStackId"}},required:["stack_id","revision_id","nodes","edges","source_node_id","destination_node_id","direction"],type:"object"},kind:{const:"declared_stack_edge",type:"string"}},required:["kind","binding"],type:"object"},{additionalProperties:!1,properties:{binding:{additionalProperties:!1,properties:{destination_ref:{$ref:"#/$defs/RefId"},proposal_digest:{$ref:"#/$defs/ManifestDigest"},source_ref:{$ref:"#/$defs/RefId"}},required:["proposal_digest","source_ref","destination_ref"],type:"object"},kind:{const:"independent_branch",type:"string"}},required:["kind","binding"],type:"object"}]},ProjectId:_m,RefId:_T,RepositoryId:_z,ResolvedScope:_U,ScopeSetId:vc,ScopeSetRevision:vl,StackNodeId:vH,WorktreeId:So,WorktreeInventoryEpoch:Sn,WorktreeInventorySnapshotId:Sa},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Exact caller-supplied identity frozen by `stack_snapshot`.\n\nThis proof binds the exact authorized `ProjectId`, `RepositoryId`, source\nand destination worktree/ref identity, frozen inventory, scope/grant/policy\nrevisions, and one declared-edge or independent-branch selection. Paths,\nfree-form SHA values, branch display names, and provider topology remain\nunrepresentable.",properties:{authorized_scope_set_digest:{$ref:"#/$defs/ManifestDigest"},authorized_scope_set_id:{$ref:"#/$defs/ScopeSetId"},authorized_scope_set_revision:{$ref:"#/$defs/ScopeSetRevision"},destination:{$ref:"#/$defs/ResolvedScope"},grant_digest:{$ref:"#/$defs/ManifestDigest"},inventory_epoch:{$ref:"#/$defs/WorktreeInventoryEpoch"},inventory_snapshot_id:{$ref:"#/$defs/WorktreeInventorySnapshotId"},policy_digest:{$ref:"#/$defs/ManifestDigest"},selection:{$ref:"#/$defs/NativeIntegrationSelectionDeclarationV1"},source:{$ref:"#/$defs/ResolvedScope"}},required:["source","destination","authorized_scope_set_id","authorized_scope_set_revision","authorized_scope_set_digest","inventory_snapshot_id","inventory_epoch","selection","grant_digest","policy_digest"],title:"NativeIntegrationStackSnapshotSurfaceRequest",type:"object"},{$defs:{CodeIndexReadinessTargetV1:{description:"The readiness a status caller can wait for.",oneOf:[{const:"fresh",description:"A sealed complete generation serves exact and lexical reads for the\ncurrent source: `code_index_freshness.status` is `current`.",type:"string"},{const:"ready",description:"`fresh`, and the generation's native code graph also serves.",type:"string"},{const:"graph_ready",description:"A published generation's native code graph serves and no convergence\npark is set, whatever the source freshness. Waiting for it never\nsweeps the source, so it cannot arm the reconcile it would observe.",type:"string"}]},CodeIndexReadinessWaitV1:{additionalProperties:!1,description:"`tracedecay_status` `wait_for`: hold the status read until the worktree\nreaches `state`, for at most the caller's `timeout_ms`.",properties:{state:{$ref:"#/$defs/CodeIndexReadinessTargetV1"},timeout_ms:{format:"uint64",minimum:0,type:"integer"}},required:["state","timeout_ms"],type:"object"}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{admission_only:{default:!1,description:"Report only that the project route is admitted, reading no graph,\nindex, or session state. Default false.",type:"boolean"},include_branch_diagnostics:{default:!1,description:"Full tracked-branch diagnostic list. Default false.",type:"boolean"},include_session_ingest:{default:!1,description:"Session-ingest health. Default false.",type:"boolean"},include_staleness:{default:!1,description:"Git staleness object. Default false.",type:"boolean"},include_storage_health:{default:!1,description:"Storage-health snapshot. Default false.",type:"boolean"},wait_for:{anyOf:[{$ref:"#/$defs/CodeIndexReadinessWaitV1"},{type:"null"}],description:"Hold the status read until the code index reaches `state` (`fresh`:\nstatus `current`; `ready`: also native graph serving; `graph_ready`: a\npublished generation's native graph serves, whatever the freshness),\nfor at most `timeout_ms`. The payload's `wait` reports `reached`,\n`timed_out` with `last_state`, or `unavailable` with `reason`."}},title:"StatusSurfaceRequestV1",type:"object"},{$defs:{CodeCloneIndexBudgetsV1:{description:"Fixed automatic clone-discovery limits.",properties:{minimum_body_tokens:{format:"uint64",minimum:0,type:"integer"}},required:["minimum_body_tokens"],type:"object"},CodeCloneIndexCoverageV1:{description:"Coverage retained by one clone-index artifact or in-progress successor.\n\nCounts are `None` until the clone artifact has observed the corresponding\ndenominator. A complete empty repository reports `Some(0)`, which keeps a\ndesigned zero distinct from unavailable coverage.",properties:{conservative_normalized_bodies:{description:"Eligible bodies with a conservative exact posting.",format:"uint64",minimum:0,type:["integer","null"]},eligible_source_bodies:{description:"Source bodies admitted for automatic clone discovery.",format:"uint64",minimum:0,type:["integer","null"]},exact_postings:{description:"Conservative and rename-normalized exact posting rows.",format:"uint64",minimum:0,type:["integer","null"]},excluded_incomplete_tokenization_bodies:{description:"Bodies excluded because conservative tokenization was incomplete.",format:"uint64",minimum:0,type:["integer","null"]},excluded_too_large_bodies:{description:"Bodies excluded because they exceed the automatic-discovery token maximum.",format:"uint64",minimum:0,type:["integer","null"]},excluded_too_small_bodies:{description:"Bodies excluded because they are below the automatic-discovery minimum.",format:"uint64",minimum:0,type:["integer","null"]},payloads_reused:{description:"Current payload occurrences reused from the preceding generation.",format:"uint64",minimum:0,type:["integer","null"]},rename_normalized_bodies:{description:"Eligible bodies with a complete rename-normalized exact posting.",format:"uint64",minimum:0,type:["integer","null"]},rename_partial_bodies:{description:"Eligible bodies whose rename normalization is partial.",format:"uint64",minimum:0,type:["integer","null"]},rename_unsupported_bodies:{description:"Eligible bodies whose language has no rename normalization.",format:"uint64",minimum:0,type:["integer","null"]},source_bodies:{description:"Clone body occurrences observed in the sealed lexical source.",format:"uint64",minimum:0,type:["integer","null"]},unique_payloads:{description:"Distinct content-addressed payloads retained by the artifact.",format:"uint64",minimum:0,type:["integer","null"]}},type:"object"},CodeCloneIndexObservationV1:{description:"Generation-pinned clone-index evidence shared by non-error readiness states.",properties:{artifact_format_revision:{format:"uint32",minimum:0,type:["integer","null"]},budgets:{$ref:"#/$defs/CodeCloneIndexBudgetsV1"},conservative_normalization_revision:{format:"uint16",maximum:65535,minimum:0,type:"integer"},coverage:{$ref:"#/$defs/CodeCloneIndexCoverageV1"},generation_id:{type:"string"},rename_normalization_revision:{format:"uint16",maximum:65535,minimum:0,type:"integer"},resources:{$ref:"#/$defs/CodeCloneIndexResourcesV1"},source_revision:{type:["string","null"]}},required:["generation_id","conservative_normalization_revision","rename_normalization_revision","coverage","budgets","resources"],type:"object"},CodeCloneIndexResourcesV1:{description:"Measured resources and update accounting for one clone-index generation.",properties:{bytes_on_disk:{description:"Durable artifact bytes.",format:"uint64",minimum:0,type:["integer","null"]},changed_symbol_update_micros:{description:"Latest observed source-edit arrival through clone-ready publication.",format:"uint64",minimum:0,type:["integer","null"]},peak_scratch_memory_bytes:{description:"Largest measured clone-row serialization scratch during the build.",format:"uint64",minimum:0,type:["integer","null"]},stale_invalidations:{description:"Prior clone payload bindings invalidated by the latest publication.",format:"uint64",minimum:0,type:["integer","null"]}},type:"object"},CodeCloneIndexStatusV1:{description:"Clone readiness, independent from lexical and graph serving.",oneOf:[{description:"The sealed lexical artifact or its clone rows cannot be read.",properties:{reason:{type:"string"},state:{const:"unavailable",type:"string"}},required:["state","reason"],type:"object"},{description:"Some clone evidence is readable, but required postings are missing.",properties:{observation:{$ref:"#/$defs/CodeCloneIndexObservationV1"},omission_reasons:{items:{type:"string"},type:"array"},state:{const:"partial",type:"string"}},required:["state","observation","omission_reasons"],type:"object"},{description:"Required exact postings cover every eligible body.",properties:{observation:{$ref:"#/$defs/CodeCloneIndexObservationV1"},state:{const:"ready",type:"string"}},required:["state","observation"],type:"object"},{description:"The artifact is readable but belongs to a superseded source generation.",properties:{observation:{$ref:"#/$defs/CodeCloneIndexObservationV1"},reason:{type:"string"},state:{const:"stale",type:"string"}},required:["state","observation","reason"],type:"object"}]},CodeGraphServingReadinessV1:{description:"Interactive graph-serving state for the latest sealed generation.\n\nA sealed generation can expose truthful census statistics before its graph\nprojection is ready to serve queries, so readiness is reported separately.",oneOf:[{description:"No graph-serving authority exists for this worktree or generation.",properties:{reason:{type:"string"},state:{const:"unavailable",type:"string"}},required:["state","reason"],type:"object"},{description:"The sealed generation exists, but graph activation has not completed.",properties:{state:{const:"pending",type:"string"}},required:["state"],type:"object"},{description:"Graph activation completed without a serving projection.",properties:{reason:{type:"string"},state:{const:"refused",type:"string"}},required:["state","reason"],type:"object"},{description:"The verified graph projection is installed, but the engine or catalog\nits reads need is not resident: it is still being built, or it was\nreleased for memory. Graph reads answer the retryable warming state\nand restore it.",properties:{reason:{type:"string"},state:{const:"warming",type:"string"}},required:["state","reason"],type:"object"},{description:"The verified graph projection is installed for interactive reads.",properties:{state:{const:"ready",type:"string"}},required:["state"],type:"object"}]},CodeIndexBuildBlockedReasonV1:fF,CodeIndexBuildPhaseV1:{description:"The durable build phase whose committed boundary the dashboard is reading.\n\nA phase is not inferred from scheduler state. The mounted registry publishes\nthe exact phase that owns the active generation.",oneOf:[{enum:["source_scan","relational_preparation","bulk_commit","index_build","verification","ready"],type:"string"},{const:"graph_publication",description:"Text serving is built and the pass that sealed the generation is\nstill publishing its native graph.",type:"string"}]},CodeIndexBuildProgressV1:{description:"The latest committed progress boundary for one active code-index generation.\n\nEvery count is scoped to `generation_id`. The snapshot never includes a\nstaged page: work is reported only after the batch that owns it commits.",properties:{blocked_reason:{anyOf:[{$ref:"#/$defs/CodeIndexBuildBlockedReasonV1"},{type:"null"}],description:"Reason the active generation cannot currently advance, when known."},committed_chunks:{description:"Search chunks committed to the artifact database.",format:"uint64",minimum:0,type:"integer"},committed_imports:{description:"Import evidence rows committed to the artifact database.",format:"uint64",minimum:0,type:"integer"},committed_pages:{description:"Source pages committed to the artifact database.",format:"uint64",minimum:0,type:"integer"},committed_payload_bytes:{description:"Payload bytes committed to the artifact database.",format:"uint64",minimum:0,type:"integer"},completed_files:{description:"Authenticated sealed-source file boundary completed by committed work.",format:"uint64",minimum:0,type:"integer"},completed_lexical_units:{description:"Authenticated lexical-span boundary completed by committed work, in the\nsealed source's own advance unit.\n\nThe unit is the source's, not this surface's: a sealed-layout source\nadvances over the files-array byte span, while a published or\npartitioned source advances over file ordinals because its file records\nare not a contiguous byte range at all. Both are monotone and share the\ndenominator below, so completion and the derived estimate are truthful;\nnaming them bytes was not, and a consumer that multiplied this by an\naverage file size was wrong by orders of magnitude (issue #1205).",format:"uint64",minimum:0,type:"integer"},current_batch_pages:{description:"Source pages in the batch currently being processed.",format:"uint64",minimum:0,type:"integer"},current_batch_payload_bytes:{description:"Sealed payload bytes in the batch currently being processed.",format:"uint64",minimum:0,type:"integer"},daemon_incarnation:{description:"Durable daemon-authority epoch that produced this snapshot.\n\nThis orders snapshots across daemon restarts without relying on wall\nclock time.",format:"uint64",minimum:0,type:"integer"},elapsed_micros:{description:"Monotonic elapsed time for this process's active generation build.",format:"uint64",minimum:0,type:"integer"},estimated_remaining_seconds:{description:"Estimated remaining build duration, absent without a truthful rate.",format:"uint64",minimum:0,type:["integer","null"]},files_per_second:{description:"Rolling committed-file throughput, absent until it is established.",format:"double",type:["number","null"]},generation_id:{description:"Exact generation receiving the committed build work.",type:"string"},last_commit_latency_micros:{description:"Duration of the last committed SQLite batch, when one exists.",format:"uint64",minimum:0,type:["integer","null"]},last_progress_micros:{description:"Unix-epoch timestamp of the last durable progress publication.",format:"int64",type:"integer"},lexical_units_per_second:{description:"Rolling committed lexical-span throughput in units per second, absent\nuntil it is established. Not a byte rate; see\n[`Self::completed_lexical_units`].",format:"double",type:["number","null"]},phase:{$ref:"#/$defs/CodeIndexBuildPhaseV1",description:"Durable pipeline phase that published this snapshot."},producer_incarnation:{description:"Registry-minted scheduler incarnation within one daemon.\n\nA worktree retirement/remount creates a new value. `progress_epoch` is\ncomparable only when both incarnation fields match.",format:"uint64",minimum:0,type:"integer"},progress_epoch:{description:"Monotonic publication epoch for replacing delayed progress reads.",format:"uint64",minimum:0,type:"integer"},sealed_source_digest:{description:"Identity of the sealed source whose authenticated bounds define progress.",type:"string"},total_files:{description:"Authenticated sealed-source file bound for this generation.",format:"uint64",minimum:0,type:"integer"},total_lexical_units:{description:"Authenticated lexical-span bound for this generation, in the same unit\nas [`Self::completed_lexical_units`].",format:"uint64",minimum:0,type:"integer"}},required:["generation_id","daemon_incarnation","producer_incarnation","progress_epoch","sealed_source_digest","phase","committed_pages","committed_chunks","committed_imports","committed_payload_bytes","completed_files","total_files","completed_lexical_units","total_lexical_units","current_batch_pages","current_batch_payload_bytes","elapsed_micros","last_progress_micros"],type:"object"},CodeIndexConvergenceParkedV1:fL,CodeIndexFreshnessCoverageV1:{description:"Coverage of one freshness read. Distinct from [`CodeIndexStalenessStateV1`]:\na generation can be fresh and still omit hook-hint counts, or unverified\nwhile the ladder would otherwise say ready.\n\n`Unobserved` is only the constructed default. A projected read never emits\nit, so an absent observation cannot be mistaken for `complete`.",oneOf:[{enum:["unobserved","complete","partial_refresh_in_progress","partial_artifact_restore","partial_source_verification","partial_unverified_restore","partial_hook_hint_overflow"],type:"string"},{const:"partial_omitted_sources",description:"The sealed generation is fresh for every source it can index, and\n[`CodeIndexWorktreeFreshnessV1::omitted_sources`] names the sources it\ncannot. Waiting cannot change it.",type:"string"}]},CodeIndexGenerationRecoveryServingV1:{description:"Serving disposition of an incompatible generation during recovery.",enum:["preserved","refused"],type:"string"},CodeIndexGenerationRecoveryV1:{description:"Recovery state for a durable generation sealed under a different production\nowner configuration.",properties:{incompatibilities:{description:"Stable owner-input reason codes reported by the code-index authority.",items:{type:"string"},type:"array"},incompatible_generation_id:{description:"Generation retired from incremental reuse.",type:"string"},serving:{$ref:"#/$defs/CodeIndexGenerationRecoveryServingV1",description:"Whether the prior generation may continue serving while its replacement\nbuilds under the current configuration."}},required:["incompatible_generation_id","incompatibilities","serving"],type:"object"},CodeIndexOmittedSourceV1:fU,CodeIndexOmittedSourcesV1:fH,CodeIndexReadinessWaitOutcomeV1:{description:"How a `wait_for` status read ended. The status payload beside it is read\nafter the wait ends.",oneOf:[{properties:{outcome:{const:"reached",type:"string"}},required:["outcome"],type:"object"},{description:"The caller's budget elapsed; `last_state` is the last observed\n`code_index_freshness.status`.",properties:{last_state:{type:"string"},outcome:{const:"timed_out",type:"string"}},required:["outcome","last_state"],type:"object"},{description:"Waiting cannot reach the target: no scheduler is mounted, graph\nserving was refused, convergence is parked, or the request ended.",properties:{outcome:{const:"unavailable",type:"string"},reason:{type:"string"}},required:["outcome","reason"],type:"object"}]},CodeIndexRestoreProgressV1:{description:"Bounded authentication work required to restore one immutable lexical\nartifact as a serving reader.\n\nThe unit is a fixed restore check, not bytes or build work. Completed\nchecks are published only after they pass. `authenticated_remaining` is\nalways `authenticated_total - authenticated_completed`, so a caller can\ndistinguish bounded cold restore from an unbounded rebuild.",properties:{artifact_digest:{description:"Whole-file content address from the durable artifact descriptor.",type:"string"},authenticated_completed:{description:"Successfully completed authentication checks.",format:"uint64",minimum:0,type:"integer"},authenticated_remaining:{description:"Checks that have not completed yet.",format:"uint64",minimum:0,type:"integer"},authenticated_total:{description:"Fixed number of authentication checks for this restore.",format:"uint64",minimum:0,type:"integer"},generation_id:{description:"Generation whose lexical serving seat is being restored.",type:"string"}},required:["generation_id","artifact_digest","authenticated_completed","authenticated_total","authenticated_remaining"],type:"object"},CodeIndexSourceOmissionReasonV1:fG,CodeIndexStalenessStateV1:fB,CodeIndexWorktreeFreshnessV1:{description:"Freshness/generation state for one mounted worktree.\n\n`Deserialize` is part of the wire contract: the CLI status command decodes\nexactly this type back out of the daemon's `tracedecay_status` response,\nkeeping one authority for the freshness shape.",properties:{clone_index:{anyOf:[{$ref:"#/$defs/CodeCloneIndexStatusV1"},{type:"null"}],description:"Clone readiness from the same sealed lexical artifact."},code_graph_serving:{anyOf:[{$ref:"#/$defs/CodeGraphServingReadinessV1"},{type:"null"}],description:"Whether that generation's verified graph projection can serve reads."},coverage:{$ref:"#/$defs/CodeIndexFreshnessCoverageV1",description:"Whether this read covers the complete mounted scheduler state."},generation_recovery:{anyOf:[{$ref:"#/$defs/CodeIndexGenerationRecoveryV1"},{type:"null"}],description:"One-shot owner-configuration recovery currently replacing an\nincompatible durable generation."},hook_hint_count:{description:"Pending hook-hint count, when cheaply available.",format:"uint64",minimum:0,type:["integer","null"]},last_reconcile_micros:{description:"Last reconcile observation time (microseconds since the Unix epoch).",format:"int64",type:["integer","null"]},latest_generation_id:{description:"Latest sealed generation identity, when a complete generation exists.",type:["string","null"]},omitted_sources:{anyOf:[{$ref:"#/$defs/CodeIndexOmittedSourcesV1"},{type:"null"}],description:"Sources the serving snapshot captured but does not index, when any."},parked:{anyOf:[{$ref:"#/$defs/CodeIndexConvergenceParkedV1"},{type:"null"}],description:"Deterministic contract violation currently parking background\nconvergence, when one is observed. `staleness_state` reads `parked`\nwhile this is set and no generation serves."},progress:{anyOf:[{$ref:"#/$defs/CodeIndexBuildProgressV1"},{type:"null"}],description:"Latest committed progress for the active generation, if one is mounted."},rebuild_in_flight:{default:!1,description:"Whether the exact scheduler route owns a reconcile pass or has a\npending wake. A stale seated generation with this false is stalled,\nnot in a routine rebuild window.",type:"boolean"},repository_id:{description:"Stable repository identity resolved by the scheduler.",type:["string","null"]},restore_progress:{anyOf:[{$ref:"#/$defs/CodeIndexRestoreProgressV1"},{type:"null"}],description:"Bounded immutable-artifact restore work currently in flight. This is\nseparate from build progress because restore commits no index data."},sealed_at_micros:{description:"Time the complete generation was durably sealed.",format:"int64",type:["integer","null"]},snapshot_content_identity:{description:"Content identity of the complete source snapshot.",type:["string","null"]},source_reference:{description:"Exact source reference captured by the sealed generation.",type:["string","null"]},source_revision:{description:"Exact source revision captured by the sealed generation.",type:["string","null"]},staleness_state:{anyOf:[{$ref:"#/$defs/CodeIndexStalenessStateV1"},{type:"null"}],description:"Staleness-ladder state from the last scheduler execution. `fresh` means\nthe scheduler most recently observed a fresh source; the status read\ndoes not probe the worktree to revalidate that observation."},worktree_id:{description:"Stable worktree identity resolved by the scheduler.",type:["string","null"]},worktree_root:{description:"Display path of the mounted worktree root.",type:"string"}},required:["worktree_root","coverage"],type:"object"},LcmConvergenceStateV1:gc,LcmConvergenceV1:gl,LcmDoctorProjectionStateV1:gp,LcmDoctorProjectionV1:gu,NativeHostIdentityV1:{enum:["claude_code","cursor_desktop","cursor_cloud","codex","hermes","kiro","cline","roo_code","kilo","kimi_code","open_code","pi","factory_droid"],type:"string"},ProjectStatusV1:{additionalProperties:!1,properties:{active_branch:{type:["string","null"]},branch_diagnostics:!0,branch_drifted:{type:["boolean","null"]},branch_mismatch:{anyOf:[{$ref:"#/$defs/StatusBranchMismatchV1"},{type:"null"}]},branch_resolution:{type:["string","null"]},branch_warnings:{items:{type:"string"},type:["array","null"]},code_index_freshness:{$ref:"#/$defs/StatusCodeIndexFreshnessV1"},code_index_freshness_warning:{type:["string","null"]},current_branch:{type:["string","null"]},git_staleness:{anyOf:[{$ref:"#/$defs/StatusGitStalenessV1"},{type:"null"}]},github_source:{description:"The checkout's GitHub source as its advisory owner observed it."},graph_statistics:{description:"The exact-scope sealed-generation census."},hook_replay:{$ref:"#/$defs/StatusHookReplayV1",description:"The daemon's drain of this project's hook spools, as its last sweep\nleft it."},live_branch:{type:["string","null"]},memory:{$ref:"#/$defs/StatusMemoryV1"},parent_branch:{type:["string","null"]},project_root:{type:"string"},reset_required_stores:{description:"Registered stores this binary serves only as a typed reset-required\nrefusal, each with the command that resets it.",items:{$ref:"#/$defs/StoreResetRequiredV1"},type:"array"},retrieval_serving:{anyOf:[{$ref:"#/$defs/StatusRetrievalServingV1"},{type:"null"}],description:"Whether exact-scope retrieval can serve, when the census authority is\nattached."},schema_convergence:{$ref:"#/$defs/StatusSchemaConvergenceV1"},scope_prefix:{type:["string","null"]},server:{description:"The serving MCP server's request counters."},serving_branch:{type:["string","null"]},session_git_evidence:{$ref:"#/$defs/StatusSessionGitEvidenceV1",description:"The session↔Git evidence `tracedecay_sessions_for` and the\nbranch/commit session filters read."},session_history_catch_up:!0,session_ingest:!0,session_projection:{$ref:"#/$defs/LcmDoctorProjectionV1",description:"The project session projection's serving state, the same reading\n`tracedecay_lcm_doctor` reports."},storage_health:!0,tracked_branch_count:{format:"uint",minimum:0,type:["integer","null"]},wait:{anyOf:[{$ref:"#/$defs/CodeIndexReadinessWaitOutcomeV1"},{type:"null"}]}},required:["project_root","graph_statistics","memory","schema_convergence","reset_required_stores","code_index_freshness","github_source","session_projection","session_git_evidence","hook_replay"],type:"object"},ResidentMemoryHolderReadV1:{description:"One worktree holding a retained owner's memory, and what it holds: a\ngeneration id, or an LSP session id.",properties:{holding:{type:"string"},worktree_id:{type:"string"}},required:["worktree_id","holding"],type:"object"},RetrievalWorkerStatusV1:_Y,SchemaConvergenceFindingV1:_7,SchemaConvergenceProgressV1:ve,SchemaConvergenceStageV1:vt,SchemaConvergenceStateV1:vr,StatusAdmissionV1:{additionalProperties:!1,properties:{project_admitted:{type:"boolean"},project_root:{type:"string"},scope_prefix:{type:["string","null"]},server:{description:"The serving MCP server's request counters."}},required:["project_admitted","project_root"],type:"object"},StatusBranchMismatchV1:{additionalProperties:!1,properties:{git_branch:{type:["string","null"]},indexed_branch:{type:["string","null"]},serving_branch:{type:["string","null"]}},type:"object"},StatusCodeIndexFreshnessV1:{description:"The code-index freshness of the served worktree, labeled the way readiness\nwaits report their last state.",oneOf:[{additionalProperties:!1,properties:{status:{const:"current",type:"string"},worktree:{$ref:"#/$defs/CodeIndexWorktreeFreshnessV1"}},required:["status","worktree"],type:"object"},{additionalProperties:!1,properties:{status:{const:"stale",type:"string"},worktree:{$ref:"#/$defs/CodeIndexWorktreeFreshnessV1"}},required:["status","worktree"],type:"object"},{additionalProperties:!1,properties:{status:{const:"restoring",type:"string"},worktree:{$ref:"#/$defs/CodeIndexWorktreeFreshnessV1"}},required:["status","worktree"],type:"object"},{additionalProperties:!1,properties:{status:{const:"warming",type:"string"},worktree:{$ref:"#/$defs/CodeIndexWorktreeFreshnessV1"}},required:["status","worktree"],type:"object"},{additionalProperties:!1,properties:{status:{const:"parked",type:"string"},worktree:{$ref:"#/$defs/CodeIndexWorktreeFreshnessV1"}},required:["status","worktree"],type:"object"},{additionalProperties:!1,description:"The last code-index mount failed; explicit reconciliation can retry it.",properties:{message:{type:"string"},remediation:{type:"string"},status:{const:"mount_failed",type:"string"}},required:["status","message","remediation"],type:"object"},{additionalProperties:!1,properties:{reason:{type:"string"},status:{const:"unavailable",type:"string"}},required:["status","reason"],type:"object"}]},StatusGitStalenessUnavailableV1:{oneOf:[{const:"no_sealed_generation",description:"No complete generation has sealed for the worktree yet.",type:"string"},{const:"sealed_generation_has_no_commit",description:"The sealed generation captured no commit, as in an unborn repository.",type:"string"},{const:"git_head_unreadable",description:"The worktree's checked-out commit could not be read.",type:"string"}]},StatusGitStalenessV1:{description:"The sealed generation's Git watermark, the commit its source snapshot was\ncaptured from, against the worktree's checked-out commit.",oneOf:[{additionalProperties:!1,description:"HEAD is the commit the sealed generation was built from.",properties:{status:{const:"current",type:"string"},watermark:{type:"string"}},required:["status","watermark"],type:"object"},{additionalProperties:!1,description:"HEAD has moved off the commit the sealed generation was built from.",properties:{head:{type:"string"},status:{const:"stale",type:"string"},watermark:{type:"string"}},required:["status","watermark","head"],type:"object"},{additionalProperties:!1,description:"No watermark or no HEAD to compare it with.",properties:{reason:{$ref:"#/$defs/StatusGitStalenessUnavailableV1"},status:{const:"unavailable",type:"string"}},required:["status","reason"],type:"object"}]},StatusHookReplayFailureV1:{additionalProperties:!1,description:"One hook spool the last replay sweep could not drain.",properties:{cause:{type:"string"},host:{$ref:"#/$defs/NativeHostIdentityV1"},spool:{$ref:"#/$defs/StatusHookReplaySpoolV1"}},required:["host","spool","cause"],type:"object"},StatusHookReplaySpoolV1:{oneOf:[{const:"records",description:"The host's spooled hook events.",type:"string"},{const:"delivery_receipts",description:"The host's hook delivery receipts.",type:"string"},{const:"pending_work",description:"The producer work the host's admission ledger still owes.",type:"string"}]},StatusHookReplayV1:{description:"The daemon's hook spool drain for one project.",oneOf:[{additionalProperties:!1,description:"No replay consumer drains this project's hook spools in this daemon.",properties:{status:{const:"unowned",type:"string"}},required:["status"],type:"object"},{additionalProperties:!1,description:"The replay consumer has not finished its first sweep.",properties:{status:{const:"starting",type:"string"}},required:["status"],type:"object"},{additionalProperties:!1,description:"The last sweep drained every hook spool it found.",properties:{status:{const:"drained",type:"string"}},required:["status"],type:"object"},{additionalProperties:!1,description:"The last sweep could not drain these spools. Their records stay\ndurable and the next sweep retries them.",properties:{failures:{items:{$ref:"#/$defs/StatusHookReplayFailureV1"},type:"array"},status:{const:"failed",type:"string"}},required:["status","failures"],type:"object"}]},StatusMemoryOwnerV1:{additionalProperties:!1,properties:{bytes:{format:"uint64",minimum:0,type:["integer","null"]},content_digest:{type:["string","null"]},holders:{items:{$ref:"#/$defs/ResidentMemoryHolderReadV1"},type:"array"},idle_seconds:{format:"uint64",minimum:0,type:"integer"},kind:{type:"string"},measured:{type:"boolean"},project_id:{type:"string"},protected:{type:"boolean"}},required:["project_id","kind","holders","measured","idle_seconds","protected"],type:"object"},StatusMemoryPressureV1:{enum:["unobserved","nominal","over_budget"],type:"string"},StatusMemoryReservationV1:{additionalProperties:!1,properties:{bytes:{format:"uint64",minimum:0,type:"integer"},component:{type:"string"}},required:["component","bytes"],type:"object"},StatusMemoryV1:{additionalProperties:!1,description:"The daemon's memory admission and resident accounting as one project sees it.",properties:{high_watermark_bytes:{format:"uint64",minimum:0,type:"integer"},idle_window_seconds:{format:"uint64",minimum:0,type:"integer"},limit_bytes:{format:"uint64",minimum:0,type:"integer"},low_watermark_bytes:{format:"uint64",minimum:0,type:"integer"},owners:{description:"This project's retained owners; other projects' belong to the\ndaemon-wide Doctor inventory.",items:{$ref:"#/$defs/StatusMemoryOwnerV1"},type:"array"},psi_some_avg10:{format:"double",type:["number","null"]},reservations:{description:"`reserved_bytes` per component, largest first.",items:{$ref:"#/$defs/StatusMemoryReservationV1"},type:"array"},reserved_bytes:{description:"Bytes admitted work has reserved daemon-wide: the admission model of\nin-flight builds and decodes, not a measurement.",format:"uint64",minimum:0,type:"integer"},resident_bytes:{description:"Observed admission occupancy: anonymous/shared process pages plus swap,\nconstrained by shared cgroup headroom. This is not raw process RSS.",format:"uint64",minimum:0,type:["integer","null"]},retained_bytes:{format:"uint64",minimum:0,type:"integer"},shed_order:{items:{type:"string"},type:"array"},status:{$ref:"#/$defs/StatusMemoryPressureV1"},unattributed_bytes:{description:"Raw process RSS from the last successful canonical sample minus the\ndaemon-wide measured `retained_bytes`, saturating at zero. Unlike\n`resident_bytes`, this excludes swap and shared cgroup pressure. Work in\nflight, runtime allocations, SQLite page caches, and allocator-held pages\ncan contribute. `None` until a resident sample has been published.",format:"uint64",minimum:0,type:["integer","null"]},unmeasured_owners:{format:"uint",minimum:0,type:"integer"}},required:["status","limit_bytes","high_watermark_bytes","low_watermark_bytes","idle_window_seconds","shed_order","retained_bytes","unmeasured_owners","reserved_bytes","reservations","owners"],type:"object"},StatusRetrievalServingV1:{oneOf:[{additionalProperties:!1,description:"A sealed complete generation serves the exact worktree. The ages tell a\nroutine rebuild window from a wedged route.",properties:{condition:{anyOf:[{$ref:"#/$defs/StatusServingConditionV1"},{type:"null"}]},freshness:{$ref:"#/$defs/StatusServingFreshnessV1"},last_reconcile_age_seconds:{format:"int64",type:["integer","null"]},seated_generation_age_seconds:{format:"int64",type:["integer","null"]},status:{const:"serving",type:"string"}},required:["status","freshness"],type:"object"},{additionalProperties:!1,description:"The census answered and nothing is servable yet.",properties:{reason:{type:"string"},status:{const:"unavailable",type:"string"}},required:["status","reason"],type:"object"}]},StatusSchemaConvergenceStateV1:{enum:["completed","in_progress","degraded"],type:"string"},StatusSchemaConvergenceV1:{additionalProperties:!1,properties:{findings:{items:{$ref:"#/$defs/SchemaConvergenceFindingV1"},type:"array"},status:{$ref:"#/$defs/StatusSchemaConvergenceStateV1"}},required:["status","findings"],type:"object"},StatusServingConditionV1:{enum:["artifact_restore","source_verification","rebuilding","stalled"],type:"string"},StatusServingFreshnessV1:{enum:["current","restoring","last_complete_stale","unknown"],type:"string"},StatusSessionGitEvidenceUnavailableV1:{oneOf:[{const:"session_store_denied",description:"This request holds no project session store.",type:"string"},{const:"read_failed",description:"The session store refused the evidence read.",type:"string"}]},StatusSessionGitEvidenceV1:{description:"The project's session↔Git evidence generation.",oneOf:[{additionalProperties:!1,description:"A convergence pass installed this generation.",properties:{backfill_watermark:{format:"int64",type:["integer","null"]},commit_count:{format:"uint64",minimum:0,type:"integer"},generation:{type:"string"},source_watermark:{type:"string"},span_count:{format:"uint64",minimum:0,type:"integer"},status:{const:"recorded",type:"string"}},required:["status","generation","source_watermark","span_count","commit_count"],type:"object"},{additionalProperties:!1,description:"No convergence pass has written evidence for this project yet.",properties:{backfill_watermark:{format:"int64",type:["integer","null"]},status:{const:"unrecorded",type:"string"}},required:["status"],type:"object"},{additionalProperties:!1,description:"The evidence could not be read.",properties:{message:{type:["string","null"]},reason:{$ref:"#/$defs/StatusSessionGitEvidenceUnavailableV1"},status:{const:"unavailable",type:"string"}},required:["status","reason"],type:"object"}]},StoreResetRequiredV1:{description:"A persisted store the daemon keeps mounted in a typed reset-required state\ninstead of refusing to serve: every read against it returns the typed\nrefusal, stores that admit keep serving, and `remedy` is the exact command\nthe operator runs to reset it.",properties:{authority:{type:"string"},found_version:{format:"int64",type:["integer","null"]},reason:{type:"string"},remedy:{type:"string"},required_version:{format:"int64",type:["integer","null"]},store:{type:"string"}},required:["store","authority","reason","remedy"],type:"object"}},$schema:"https://json-schema.org/draft/2020-12/schema",anyOf:[{$ref:"#/$defs/StatusAdmissionV1"},{$ref:"#/$defs/ProjectStatusV1"}],description:"`tracedecay_status` for an `admission_only` read, or the project's status.",title:"StatusResultV1"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{include_details:{default:!1,type:"boolean"}},title:"StorageStatusPrimitiveRequest",type:"object"},{$defs:{StorageStatusHistoryPointV1:{additionalProperties:!1,properties:{database_bytes:{format:"uint64",minimum:0,type:"integer"},observed_at:{format:"int64",type:"integer"}},required:["observed_at","database_bytes"],type:"object"}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{database_bytes:{format:"uint64",minimum:0,type:["integer","null"]},details:{items:{type:"string"},type:"array"},freelist_pages:{default:null,format:"uint64",minimum:0,type:["integer","null"]},history:{default:[],items:{$ref:"#/$defs/StorageStatusHistoryPointV1"},type:"array"},history_coverage:{default:null,type:["string","null"]},page_count:{default:null,format:"uint64",minimum:0,type:["integer","null"]},page_size_bytes:{default:null,format:"uint32",minimum:0,type:["integer","null"]},project_id:{default:null,type:["string","null"]},read_only:{type:"boolean"},status:{type:"string"},store_path:{default:null,type:["string","null"]}},required:["status","read_only","details"],title:"StorageStatusPrimitiveResult",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Exact public input accepted by `tracedecay_str_replace`.",properties:{dry_run:{default:!1,type:"boolean"},expected_state:{description:"Exact `preview_digest`/`expected_state` returned by the dry run. Apply\nre-resolves the typed plan and rejects any candidate-state drift.",type:["string","null"]},idempotency_key:{type:["string","null"]},new_str:{type:"string"},old_str:{type:"string"},path:{type:"string"},verify:{default:!1,type:"boolean"}},required:["path","old_str","new_str"],title:"StrReplaceSurfaceRequestV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{file:{description:"Source file path to find test coverage for.",type:["string","null"]},node_id:{description:"Specific node ID to find test coverage for (alternative to file).",type:["string","null"]}},title:"TestMapSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fF,CodeIndexConvergenceParkedV1:fL,CodeIndexStalenessStateV1:fB,PrimitiveFreshnessStateV1:_i,PrimitiveIndexingStateV1:_o,PrimitiveSearchFreshnessV1:_d,TestMapSourceCoverageV1:{additionalProperties:!1,properties:{source_file:{type:"string"},source_id:{type:"string"},source_line:{format:"uint32",minimum:0,type:"integer"},source_name:{type:"string"},tests:{items:{$ref:"#/$defs/TestMapTestV1"},type:"array"}},required:["source_name","source_id","source_file","source_line","tests"],type:"object"},TestMapTestV1:{additionalProperties:!1,properties:{attribution_depth:{format:"uint32",minimum:0,type:"integer"},test_file:{type:"string"},test_line:{format:"uint32",minimum:0,type:"integer"},test_name:{type:"string"}},required:["test_name","test_file","test_line","attribution_depth"],type:"object"},TestMapUncoveredV1:{additionalProperties:!1,properties:{file:{type:"string"},id:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},name:{type:"string"}},required:["id","name","file","line"],type:"object"}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{coverage:{items:{$ref:"#/$defs/TestMapSourceCoverageV1"},type:"array"},covered_symbols:{format:"uint64",minimum:0,type:"integer"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},test_files:{items:{type:"string"},type:"array"},uncovered:{items:{$ref:"#/$defs/TestMapUncoveredV1"},type:"array"},uncovered_symbols:{format:"uint64",minimum:0,type:"integer"}},required:["covered_symbols","uncovered_symbols","test_files","coverage","uncovered"],title:"TestMapResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"The admitted project selects the retained managed test run, so this exact\nrequest intentionally carries no caller-selectable scope or identity.",title:"TestResultsSurfaceRequestV1",type:"object"},{$defs:{CancellationObservation:fI,CancellationStage:fx,CodeGenerationId:fz,CommitId:fX,Deadline:hL,OperationBudgetUsage:g8,OperationReceipt:g7,OperationTermination:_e,TestResultProjectionV1:{additionalProperties:!1,description:"One result emitted by the daemon-managed test-run authority.",properties:{passed:{type:"boolean"},test:{type:"string"}},required:["test","passed"],type:"object"},UtcMicros:bs},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Exact retained managed-test-run projection returned by `test_results`.\n\nThe daemon resolves the admitted project, reads its newest durable managed\nrun, and verifies that the run's head and code generation are current\nbefore it serializes this payload. `result_offset` and `available_results`\nretain the authoritative page position. The outcome fields (`finished_at`,\n`exit_code`, the counts, `termination`, `receipt`) are present only after\nthe managed run terminates.",properties:{available_results:{format:"uint64",minimum:0,type:"integer"},code_generation_id:{anyOf:[{$ref:"#/$defs/CodeGenerationId"},{type:"null"}]},completed:{format:"uint64",minimum:0,type:"integer"},exit_code:{format:"int32",type:["integer","null"]},failed:{format:"uint64",minimum:0,type:["integer","null"]},finished_at:{anyOf:[{$ref:"#/$defs/UtcMicros"},{type:"null"}]},head_commit_id:{anyOf:[{$ref:"#/$defs/CommitId"},{type:"null"}]},ignored:{format:"uint64",minimum:0,type:["integer","null"]},operation_id:{type:"string"},passed:{format:"uint64",minimum:0,type:["integer","null"]},receipt:{anyOf:[{$ref:"#/$defs/OperationReceipt"},{type:"null"}]},result_offset:{format:"uint64",minimum:0,type:"integer"},results:{items:{$ref:"#/$defs/TestResultProjectionV1"},type:"array"},session_id:{description:"The session the run was requested by; null when the request named none.",type:["string","null"]},started_at:{$ref:"#/$defs/UtcMicros"},termination:{anyOf:[{$ref:"#/$defs/OperationTermination"},{type:"null"}]},total:{format:"uint64",minimum:0,type:["integer","null"]}},required:["operation_id","started_at","results","completed","result_offset","available_results"],title:"TestResultsResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{include_tested:{description:"Include already-tested functions in results (default: false).",type:["boolean","null"]},limit:{description:"Maximum number of results to return (default: 20, at most 200).",format:"uint32",minimum:0,type:["integer","null"]},path:{description:"Filter to files under this directory path.",type:["string","null"]}},title:"TestRiskSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fF,CodeIndexConvergenceParkedV1:fL,CodeIndexStalenessStateV1:fB,ComplexityAnalysisV1:f1,PrimitiveFreshnessStateV1:_i,PrimitiveIndexingStateV1:_o,PrimitiveSearchFreshnessV1:_d,TestAttributionMethodV1:{description:"How a source symbol's static test evidence was attributed.",enum:["none","direct_unit","closure"],type:"string"},TestRiskAttributionSummaryV1:{additionalProperties:!1,properties:{cli_entry_attributed:{format:"uint64",minimum:0,type:"integer"},closure_attributed:{format:"uint64",minimum:0,type:"integer"},depth:{format:"uint64",minimum:0,type:"integer"},direct_unit_attributed:{format:"uint64",minimum:0,type:"integer"},public_api_attributed:{format:"uint64",minimum:0,type:"integer"},total_attributed:{format:"uint64",minimum:0,type:"integer"},trait_resolved_attributed:{format:"uint64",minimum:0,type:"integer"}},required:["depth","direct_unit_attributed","closure_attributed","trait_resolved_attributed","public_api_attributed","cli_entry_attributed","total_attributed"],type:"object"},TestRiskBucketSummaryV1:{additionalProperties:!1,properties:{attributed:{format:"uint64",minimum:0,type:"integer"},excluded:{format:"uint64",minimum:0,type:"integer"},orphan_entry:{format:"uint64",minimum:0,type:"integer"},reachable_unattributed:{format:"uint64",minimum:0,type:"integer"}},required:["attributed","reachable_unattributed","orphan_entry","excluded"],type:"object"},TestRiskConfidenceV1:{description:"What the reported coverage percentage bounds.",enum:["static_lower_bound"],type:"string"},TestRiskEntryV1:{additionalProperties:!1,properties:{attribution_depth:{format:"uint64",minimum:0,type:["integer","null"]},attribution_method:{$ref:"#/$defs/TestAttributionMethodV1"},churn:{format:"uint64",minimum:0,type:"integer"},complexity:{description:"`None` when `complexity_analysis` reports the bounded walk did not\ncover the body; `risk` then weighs the lower-bound counters.",format:"uint32",minimum:0,type:["integer","null"]},complexity_analysis:{$ref:"#/$defs/ComplexityAnalysisV1"},fan_in:{format:"uint64",minimum:0,type:"integer"},file:{type:"string"},has_test:{type:"boolean"},id:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},name:{type:"string"},risk:{format:"double",type:"number"}},required:["id","name","file","line","complexity_analysis","fan_in","has_test","attribution_method","risk","churn"],type:"object"},TestRiskSummaryV1:{additionalProperties:!1,properties:{attribution:{$ref:"#/$defs/TestRiskAttributionSummaryV1"},buckets:{$ref:"#/$defs/TestRiskBucketSummaryV1"},confidence:{$ref:"#/$defs/TestRiskConfidenceV1"},confidence_note:{type:"string"},coverage_pct:{format:"double",type:"number"},skipped:{format:"uint64",minimum:0,type:"integer"},tested:{format:"uint64",minimum:0,type:"integer"},top_risk_unattributed:{type:"string"},top_risk_untested:{type:"string"},total_functions:{format:"uint64",minimum:0,type:"integer"}},required:["total_functions","tested","skipped","coverage_pct","top_risk_untested","top_risk_unattributed","attribution","buckets","confidence","confidence_note"],type:"object"}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},risks:{items:{$ref:"#/$defs/TestRiskEntryV1"},type:"array"},summary:{$ref:"#/$defs/TestRiskSummaryV1"}},required:["risks","summary"],title:"TestRiskResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{kinds:{items:{type:"string"},type:["array","null"]},limit:{format:"uint32",minimum:0,type:["integer","null"]},path:{type:["string","null"]}},title:"TodosSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fF,CodeIndexConvergenceParkedV1:fL,CodeIndexStalenessStateV1:fB,PrimitiveFreshnessStateV1:_i,PrimitiveIndexingStateV1:_o,PrimitiveSearchFreshnessV1:_d,TodoMarkerV1:{additionalProperties:!1,properties:{enclosing:{type:["string","null"]},file:{type:"string"},kind:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},text:{type:"string"}},required:["kind","file","line","text"],type:"object"}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{by_kind:{additionalProperties:{format:"uint64",minimum:0,type:"integer"},type:"object"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},markers:{items:{$ref:"#/$defs/TodoMarkerV1"},type:"array"},match_count:{format:"uint",minimum:0,type:"integer"}},required:["match_count","by_kind","markers"],title:"TodosResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{ecosystem:{description:"Filter findings to one ecosystem ('rust' or 'typescript'). Every\necosystem section is still reported, so the scope of the answer stays\nvisible.",type:["string","null"]},limit:{description:"Maximum unmounted files to return (default: 200, max: 2000). The\nresponse always states the true total and how many rows were omitted.",format:"uint32",minimum:0,type:["integer","null"]},path:{description:"Filter findings to files under this directory path (e.g. 'src/daemon').\nThe whole project is still walked, reachability is not a per-directory\nquestion.",type:["string","null"]}},title:"UnmountedFilesSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fF,CodeIndexConvergenceParkedV1:fL,CodeIndexStalenessStateV1:fB,PrimitiveFreshnessStateV1:_i,PrimitiveIndexingStateV1:_o,PrimitiveSearchFreshnessV1:_d,UnmountedEcosystemStatusV1:{description:"Whether an ecosystem was audited, absent, or recognised but unmodelled.",enum:["audited","partial","not_present","unsupported"],type:"string"},UnmountedEcosystemV1:{additionalProperties:!1,properties:{blind_spots:{items:{type:"string"},type:"array"},ecosystem:{type:"string"},entry_point_count:{format:"uint64",minimum:0,type:"integer"},excluded_path_globs:{items:{type:"string"},type:"array"},mounted_file_count:{format:"uint64",minimum:0,type:"integer"},note:{type:["string","null"]},package_count:{format:"uint64",minimum:0,type:"integer"},scanned_file_count:{format:"uint64",minimum:0,type:"integer"},status:{$ref:"#/$defs/UnmountedEcosystemStatusV1"},unclaimed_file_count:{format:"uint64",minimum:0,type:"integer"},unmounted_file_count:{format:"uint64",minimum:0,type:"integer"},verdict:{type:"string"}},required:["ecosystem","status","package_count","entry_point_count","scanned_file_count","mounted_file_count","unclaimed_file_count","unmounted_file_count","verdict","blind_spots","excluded_path_globs"],type:"object"},UnmountedFileV1:{additionalProperties:!1,properties:{ecosystem:{type:"string"},file:{type:"string"},manifest:{type:"string"},nearest_mounted_parent:{type:["string","null"]},package:{type:"string"},suggested_declaration:{type:["string","null"]}},required:["file","ecosystem","package","manifest"],type:"object"}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{complete:{type:"boolean"},ecosystem:{type:["string","null"]},ecosystems:{items:{$ref:"#/$defs/UnmountedEcosystemV1"},type:"array"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},limit:{format:"uint64",minimum:0,type:"integer"},omitted_count:{format:"uint64",minimum:0,type:"integer"},path:{type:["string","null"]},returned_count:{format:"uint64",minimum:0,type:"integer"},unmounted:{items:{$ref:"#/$defs/UnmountedFileV1"},type:"array"},unmounted_file_count:{format:"uint64",minimum:0,type:"integer"}},required:["unmounted_file_count","returned_count","omitted_count","complete","ecosystems","limit","unmounted"],title:"UnmountedFilesResultV1",type:"object"},{$defs:{UnsafePatternKindV1:bo},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{exclude_tests:{description:"When true, skips files whose path looks like a test (default: false).",type:["boolean","null"]},kinds:{description:"Subset of patterns to search. Default (or an empty list): every kind.",items:{$ref:"#/$defs/UnsafePatternKindV1"},type:["array","null"]},limit:{description:"Maximum number of matches to return (default: 200, max: 2000).",format:"uint32",minimum:0,type:["integer","null"]},path:{description:"Filter to files under this directory (relative to project root).",type:["string","null"]}},title:"UnsafePatternsSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fF,CodeIndexConvergenceParkedV1:fL,CodeIndexStalenessStateV1:fB,CoverageCompleteness:hA,PrimitiveFreshnessStateV1:_i,PrimitiveIndexingStateV1:_o,PrimitiveSearchFreshnessV1:_d,UnsafePatternFileOmissionV1:{additionalProperties:!1,description:"One scanned file whose sites are not reported as verified matches.",properties:{cause:{$ref:"#/$defs/UnsafePatternOmissionCauseV1"},file:{type:"string"},reason:{$ref:"#/$defs/UnsafePatternOmissionReasonV1"},withheld_match_count:{description:"Sites of the requested kinds found in the file and withheld.",format:"uint64",minimum:0,type:"integer"}},required:["file","reason","cause","withheld_match_count"],type:"object"},UnsafePatternKindV1:bo,UnsafePatternMatchV1:{additionalProperties:!1,properties:{enclosing:{type:["string","null"]},file:{type:"string"},in_test:{type:"boolean"},kind:{$ref:"#/$defs/UnsafePatternKindV1"},line:{format:"uint32",minimum:0,type:"integer"},snippet:{type:"string"}},required:["kind","file","line","snippet","in_test"],type:"object"},UnsafePatternOmissionCauseV1:{description:"What prevented the file from being classified.",oneOf:[{const:"syntax_errors",description:"The Rust grammar parsed the file with error nodes. Valid Rust it only\npartly parses (heavy `macro_rules!`) lands here.",type:"string"}]},UnsafePatternOmissionReasonV1:{description:"Why a file's risky-pattern sites are withheld from the verified result.",oneOf:[{const:"test_scope_unclassified",description:"Whether a site is test-only cannot be decided for this file.",type:"string"}]}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{by_kind:{additionalProperties:{format:"uint64",minimum:0,type:"integer"},description:"Match count per pattern kind, keyed by its wire spelling.",type:"object"},coverage:{$ref:"#/$defs/CoverageCompleteness",description:"`partial` exactly when `omissions` names a file whose sites are withheld."},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},match_count:{format:"uint64",minimum:0,type:"integer"},matches:{items:{$ref:"#/$defs/UnsafePatternMatchV1"},type:"array"},omissions:{items:{$ref:"#/$defs/UnsafePatternFileOmissionV1"},type:"array"}},required:["match_count","by_kind","matches","coverage","omissions"],title:"UnsafePatternsResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{agent_label:{type:["string","null"]},branch:{type:["string","null"]},commit:{type:["string","null"]},limit:{format:"uint64",minimum:0,type:["integer","null"]},run_id:{type:["string","null"]},session_id:{type:["string","null"]},worktree:{type:["string","null"]}},title:"WorkflowsRequestV1",type:"object"},{$defs:{GitScopeV1:y2,RetainedErrorV1:_G,RetainedOutcomeStatusV1:_B,WorkflowAgentV1:{additionalProperties:!1,properties:{agent_id:{type:"string"},agent_label:{type:"string"},agent_session_id:{type:["string","null"]},ended_ts:{format:"int64",type:["integer","null"]},model:{type:["string","null"]},phase:{type:["string","null"]},run_id:{type:"string"},started_ts:{format:"int64",type:["integer","null"]},status:{$ref:"#/$defs/WorkflowStatusV1"},tokens:{format:"int64",type:"integer"},transcript_path:{type:["string","null"]}},required:["run_id","agent_label","agent_id","status"],type:"object"},WorkflowCoverageV1:{enum:["complete","conclusive","bounded_prefix"],type:"string"},WorkflowQueryModeV1:{enum:["session","git_scope","run","agent"],type:"string"},WorkflowRunV1:{additionalProperties:!1,properties:{agent_count:{format:"int64",type:"integer"},description:{type:["string","null"]},ended_ts:{format:"int64",type:["integer","null"]},name:{type:["string","null"]},parent_session_id:{type:"string"},phase_json:{type:["string","null"]},result_summary:{type:["string","null"]},run_id:{type:"string"},started_ts:{format:"int64",type:["integer","null"]},status:{$ref:"#/$defs/WorkflowStatusV1"}},required:["run_id","parent_session_id","status"],type:"object"},WorkflowStatusV1:{enum:["running","completed","failed","unknown"],type:"string"}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{agent:{anyOf:[{$ref:"#/$defs/WorkflowAgentV1"},{type:"null"}]},agent_count:{format:"int64",type:["integer","null"]},agent_label:{type:["string","null"]},agents:{items:{$ref:"#/$defs/WorkflowAgentV1"},type:["array","null"]},agents_complete:{type:["boolean","null"]},agents_coverage:{anyOf:[{$ref:"#/$defs/WorkflowCoverageV1"},{type:"null"}]},agents_returned:{format:"uint",minimum:0,type:["integer","null"]},count:{format:"uint",minimum:0,type:["integer","null"]},error:{anyOf:[{$ref:"#/$defs/RetainedErrorV1"},{type:"null"}]},found:{type:["boolean","null"]},git_filter:{anyOf:[{$ref:"#/$defs/GitScopeV1"},{type:"null"}]},lookup_complete:{type:["boolean","null"]},lookup_coverage:{anyOf:[{$ref:"#/$defs/WorkflowCoverageV1"},{type:"null"}]},message:{type:["string","null"]},mode:{anyOf:[{$ref:"#/$defs/WorkflowQueryModeV1"},{type:"null"}]},run:{anyOf:[{$ref:"#/$defs/WorkflowRunV1"},{type:"null"}]},run_id:{type:["string","null"]},runs:{items:{$ref:"#/$defs/WorkflowRunV1"},type:["array","null"]},session_id:{type:["string","null"]},status:{$ref:"#/$defs/RetainedOutcomeStatusV1"}},required:["status"],title:"WorkflowsResultV1",type:"object"},{$defs:{ManifestDigest:gj,NativeWorktreeTargetV1:g2,ProjectId:_m,RepositoryId:_z,ScopeSetId:vc,ScopeSetRevision:vl,WorktreeId:So},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Confirmation names the exact inspection digest, not a worktree id alone.",properties:{inspection_digest:{$ref:"#/$defs/ManifestDigest"},scope_set_digest:{$ref:"#/$defs/ManifestDigest"},scope_set_id:{$ref:"#/$defs/ScopeSetId"},scope_set_revision:{$ref:"#/$defs/ScopeSetRevision"},target:{$ref:"#/$defs/NativeWorktreeTargetV1"}},required:["scope_set_id","scope_set_revision","scope_set_digest","target","inspection_digest"],title:"WorktreeCleanupConfirmRequestV1",type:"object"},{$defs:{ManifestDigest:gj,NativeWorktreeTargetV1:g2,ProjectId:_m,RepositoryId:_z,ScopeSetId:vc,ScopeSetRevision:vl,WorktreeId:So},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{scope_set_digest:{$ref:"#/$defs/ManifestDigest"},scope_set_id:{$ref:"#/$defs/ScopeSetId"},scope_set_revision:{$ref:"#/$defs/ScopeSetRevision"},target:{$ref:"#/$defs/NativeWorktreeTargetV1"}},required:["scope_set_id","scope_set_revision","scope_set_digest","target"],title:"WorktreeCleanupInspectRequestV1",type:"object"},{$defs:{ManifestDigest:gj,NativeWorktreeTargetV1:g2,ProjectId:_m,RepositoryId:_z,ScopeSetId:vc,ScopeSetRevision:vl,WorktreeId:So},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{confirmation_digest:{$ref:"#/$defs/ManifestDigest"},scope_set_digest:{$ref:"#/$defs/ManifestDigest"},scope_set_id:{$ref:"#/$defs/ScopeSetId"},scope_set_revision:{$ref:"#/$defs/ScopeSetRevision"},target:{$ref:"#/$defs/NativeWorktreeTargetV1"}},required:["scope_set_id","scope_set_revision","scope_set_digest","target","confirmation_digest"],title:"WorktreeCleanupReconcileRequestV1",type:"object"},{$defs:{ManifestDigest:gj,NativeWorktreeTargetV1:g2,ProjectId:_m,RepositoryId:_z,ScopeSetId:vc,ScopeSetRevision:vl,UtcMicros:bs,WorktreeId:So},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Removal carries both proofs so a stale confirmation cannot be replayed\nagainst another inspection of the same opaque worktree identity.",properties:{confirmation_digest:{$ref:"#/$defs/ManifestDigest"},confirmed_at:{$ref:"#/$defs/UtcMicros"},inspection_digest:{$ref:"#/$defs/ManifestDigest"},scope_set_digest:{$ref:"#/$defs/ManifestDigest"},scope_set_id:{$ref:"#/$defs/ScopeSetId"},scope_set_revision:{$ref:"#/$defs/ScopeSetRevision"},target:{$ref:"#/$defs/NativeWorktreeTargetV1"}},required:["scope_set_id","scope_set_revision","scope_set_digest","target","inspection_digest","confirmed_at","confirmation_digest"],title:"WorktreeCleanupRemoveRequestV1",type:"object"},{$defs:{ManifestDigest:gj,NativeWorktreeTargetV1:g2,ProjectId:_m,RepositoryId:_z,ScopeSetId:vc,ScopeSetRevision:vl,WorktreeId:So},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{scope_set_digest:{$ref:"#/$defs/ManifestDigest"},scope_set_id:{$ref:"#/$defs/ScopeSetId"},scope_set_revision:{$ref:"#/$defs/ScopeSetRevision"},target:{$ref:"#/$defs/NativeWorktreeTargetV1"}},required:["scope_set_id","scope_set_revision","scope_set_digest","target"],title:"WorktreeInventoryRequestV1",type:"object"},{$defs:{ActorId:mU,TaskId:v1},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Issues a short-lived, version-bound task-opening token.\n\nIdentity, scope, authority revisions, issuance time, and expiry are all\nsupplied by the admitted daemon request. The caller supplies only the\nbearer, destination session, exact task version, and enrolled recipient\nprincipal it intends to authorize.",properties:{recipient_actor_id:{$ref:"#/$defs/ActorId"},session_id:{type:"string"},task_id:{$ref:"#/$defs/TaskId"},token:{type:"string"},version:{format:"uint64",minimum:0,type:"integer"}},required:["token","session_id","task_id","version","recipient_actor_id"],title:"IssueTaskHandoffRequestV1",type:"object"},{$defs:{ManifestDigest:gj,TaskId:v1,UtcMicros:bs},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Flat public receipt for a committed task-handoff issue.\n\nThe complete binding remains inside the daemon authority. Publishing only\nthese exact identifiers avoids turning mutable grant and policy internals\ninto a second public wire authority.",properties:{expires_at:{$ref:"#/$defs/UtcMicros"},issued_at:{$ref:"#/$defs/UtcMicros"},issued_request_id:{type:"string"},session_id:{type:"string"},task_id:{$ref:"#/$defs/TaskId"},token_digest:{$ref:"#/$defs/ManifestDigest"},version:{format:"uint64",minimum:0,type:"integer"}},required:["token_digest","issued_request_id","session_id","task_id","version","issued_at","expires_at"],title:"IssueTaskHandoffResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:'Enumerates the handoff tokens this caller could redeem in one session.\n\nThe two `open_*` operations redeem a bearer the caller already holds; they\ncannot answer "what has been handed to me and not yet taken up". This one\ncan, and it does so without any bearer: the request carries no token, and\nthe result carries only digests.',properties:{session_id:{type:"string"}},required:["session_id"],title:"ListTaskHandoffsRequestV1",type:"object"},{$defs:{FeedbackFindingId:yS,HandoffOpenKindV1:{enum:["investigation","task"],type:"string"},HandoffOpenTargetV1:{oneOf:[{properties:{finding_id:{$ref:"#/$defs/FeedbackFindingId"},kind:{const:"investigation",type:"string"},owner_version_digest:{$ref:"#/$defs/ManifestDigest"}},required:["kind","finding_id","owner_version_digest"],type:"object"},{properties:{kind:{const:"task",type:"string"},owner_version_digest:{$ref:"#/$defs/ManifestDigest"},task_id:{$ref:"#/$defs/TaskId"},version:{format:"uint64",minimum:0,type:"integer"}},required:["kind","task_id","version","owner_version_digest"],type:"object"}]},ListedTaskHandoffV1:{additionalProperties:!1,description:"One handoff token, projected for public reading.\n\nMirrors [`IssueTaskHandoffResultV1`]'s doctrine: the complete binding stays\ninside the daemon authority, and only these identifiers cross the wire. No\nbearer secret exists to leak here. The authority never stored one, and the\nissuer's grant identity and policy digests stay concealed.",properties:{consumed_at:{anyOf:[{$ref:"#/$defs/UtcMicros"},{type:"null"}],description:"Set only when `state` is `consumed`."},expires_at:{$ref:"#/$defs/UtcMicros"},issued_at:{$ref:"#/$defs/UtcMicros"},issued_request_id:{type:"string"},kind:{$ref:"#/$defs/HandoffOpenKindV1"},session_id:{type:"string"},state:{$ref:"#/$defs/TaskHandoffTokenStateV1"},target:{$ref:"#/$defs/HandoffOpenTargetV1"},token_digest:{$ref:"#/$defs/ManifestDigest"}},required:["token_digest","issued_request_id","session_id","kind","target","issued_at","expires_at","state"],type:"object"},ManifestDigest:gj,TaskHandoffTokenStateV1:{description:"Where one enumerated token stands at the observed instant.",oneOf:[{const:"open",description:"Not yet redeemed, and not yet expired: the live frontier.",type:"string"},{const:"consumed",description:"Redeemed. Single-use, so it can never be redeemed again.",type:"string"},{const:"expired",description:"Its window closed with no redemption. A dropped handoff, which is\nexactly the fact a frontier exists to surface.",type:"string"}]},TaskId:v1,UtcMicros:bs},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"The handoff-token frontier for one session.",properties:{consumed_count:{format:"uint32",minimum:0,type:"integer"},expired_count:{format:"uint32",minimum:0,type:"integer"},handoffs:{items:{$ref:"#/$defs/ListedTaskHandoffV1"},type:"array"},observed_at:{$ref:"#/$defs/UtcMicros",description:"The instant the states below were decided at. Without it, `open` and\n`expired` are claims with no clock behind them."},open_count:{format:"uint32",minimum:0,type:"integer"},truncated:{description:"True when the enumeration ceiling was reached, so the counts describe a\nprefix of the frontier rather than all of it.",type:"boolean"}},required:["observed_at","handoffs","open_count","consumed_count","expired_count","truncated"],title:"ListTaskHandoffsResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{session_id:{type:"string"},token:{type:"string"}},required:["token","session_id"],title:"OpenInvestigationHandoffRequestV1",type:"object"},{$defs:{FeedbackFindingId:yS,HandoffOpenReceiptV1:y8,InvestigationHandoffSurfaceV1:{additionalProperties:!1,properties:{finding_id:{$ref:"#/$defs/FeedbackFindingId"},owner_version_digest:{$ref:"#/$defs/ManifestDigest"}},required:["finding_id","owner_version_digest"],type:"object"},ManifestDigest:gj,UtcMicros:bs},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{receipt:{$ref:"#/$defs/HandoffOpenReceiptV1"},surface:{$ref:"#/$defs/InvestigationHandoffSurfaceV1"}},required:["surface","receipt"],title:"OpenInvestigationHandoffResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{session_id:{type:"string"},token:{type:"string"}},required:["token","session_id"],title:"OpenTaskHandoffRequestV1",type:"object"},{$defs:{HandoffOpenReceiptV1:y8,ManifestDigest:gj,TaskHandoffSurfaceV1:{additionalProperties:!1,properties:{task_id:{$ref:"#/$defs/TaskId"},version:{format:"uint64",minimum:0,type:"integer"}},required:["task_id","version"],type:"object"},TaskId:v1,UtcMicros:bs},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{receipt:{$ref:"#/$defs/HandoffOpenReceiptV1"},surface:{$ref:"#/$defs/TaskHandoffSurfaceV1"}},required:["surface","receipt"],title:"OpenTaskHandoffResultV1",type:"object"},{$defs:{ManifestDigest:gj,MultiRootContinuationV1:gG,MultiRootOperationV1:{description:"Closed federated read families. The family is typed while its existing\noperation-specific request remains the canonical JSON payload owned by that\napplication surface.",oneOf:[{properties:{kind:{const:"work",type:"string"},request:!0},required:["kind","request"],type:"object"},{properties:{kind:{const:"git",type:"string"},request:!0},required:["kind","request"],type:"object"},{properties:{kind:{const:"feedback",type:"string"},request:!0},required:["kind","request"],type:"object"},{properties:{kind:{const:"impact",type:"string"},request:!0},required:["kind","request"],type:"object"},{properties:{kind:{const:"query",type:"string"},request:!0},required:["kind","request"],type:"object"}]},RootGenerationV1:_6,RootScopeOutcomeV1_for_Nullable_RootGenerationV1:_3,RootScopeOutcomeV1_for_Nullable_string:_9,ScopeOutcome_for_Nullable_RootGenerationV1:va,ScopeOutcome_for_Nullable_string:vs,ScopePartialReasonV1:vd,ScopeSetId:vc,ScopeSetRevision:vl,ScopeUnavailableReasonV1:vu},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"External federated request bound to one persisted scope-set revision and\ndigest. Query/order digests and root generations are server-derived.",properties:{continuation:{anyOf:[{$ref:"#/$defs/MultiRootContinuationV1"},{type:"null"}]},operation:{$ref:"#/$defs/MultiRootOperationV1"},page:{format:"uint64",minimum:0,type:"integer"},scope_set_digest:{$ref:"#/$defs/ManifestDigest"},scope_set_id:{$ref:"#/$defs/ScopeSetId"},scope_set_revision:{$ref:"#/$defs/ScopeSetRevision"}},required:["scope_set_id","scope_set_revision","scope_set_digest","operation","page"],title:"MultiRootExecuteRequestV1",type:"object"},{$defs:{ManifestDigest:gj,MultiRootContinuationV1:gG,RootGenerationV1:_6,RootScopeOutcomeV1_for_Array_of_AnyValue:{additionalProperties:!1,description:"One typed outcome pinned to the digest of an exact resolved root.",properties:{outcome:{$ref:"#/$defs/ScopeOutcome_for_Array_of_AnyValue"},scope_digest:{$ref:"#/$defs/ManifestDigest"}},required:["scope_digest","outcome"],type:"object"},RootScopeOutcomeV1_for_Nullable_RootGenerationV1:_3,RootScopeOutcomeV1_for_Nullable_string:_9,ScopeOutcome_for_Array_of_AnyValue:{description:"Truthful outcome for one authorized root or an aggregate over roots.\n\n`Denied` and `Unavailable` carry no value and therefore cannot be confused\nwith a successful empty result.",oneOf:[{properties:{outcome:{const:"exact",type:"string"},value:{items:!0,type:"array"}},required:["outcome","value"],type:"object"},{properties:{outcome:{const:"partial",type:"string"},value:{properties:{reason:{$ref:"#/$defs/ScopePartialReasonV1"},value:{items:!0,type:"array"}},required:["value","reason"],type:"object"}},required:["outcome","value"],type:"object"},{properties:{outcome:{const:"denied",type:"string"}},required:["outcome"],type:"object"},{properties:{outcome:{const:"unavailable",type:"string"},value:{properties:{reason:{$ref:"#/$defs/ScopeUnavailableReasonV1"}},required:["reason"],type:"object"}},required:["outcome","value"],type:"object"}]},ScopeOutcome_for_Nullable_RootGenerationV1:va,ScopeOutcome_for_Nullable_string:vs,ScopePartialReasonV1:vd,ScopeSetId:vc,ScopeSetRevision:vl,ScopeUnavailableReasonV1:vu},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Federated page preserving each root outcome and aggregate partial truth.",properties:{aggregate:{$ref:"#/$defs/ScopeOutcome_for_Array_of_AnyValue"},continuation:{anyOf:[{$ref:"#/$defs/MultiRootContinuationV1"},{type:"null"}]},roots:{items:{$ref:"#/$defs/RootScopeOutcomeV1_for_Array_of_AnyValue"},type:"array"},scope_set_digest:{$ref:"#/$defs/ManifestDigest"},scope_set_id:{$ref:"#/$defs/ScopeSetId"},scope_set_revision:{$ref:"#/$defs/ScopeSetRevision"}},required:["scope_set_id","scope_set_revision","scope_set_digest","roots","aggregate"],title:"MultiRootQueryPageV1_for_AnyValue",type:"object"},{$defs:{ProjectId:_m,RegisteredRootSelectorV1:{additionalProperties:!1,description:"Exact registered-root selector accepted by scope-set CAS.",properties:{project_id:{$ref:"#/$defs/ProjectId"},root:{type:"string"}},required:["project_id","root"],type:"object"},ScopeSetId:vc,ScopeSetRevision:vl},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Canonical external selector for creating or updating an authorized scope\nset. Every member names one exact registered root; project-only selection\ncannot silently widen to an active or first-mounted graph.",properties:{expected_revision:{anyOf:[{$ref:"#/$defs/ScopeSetRevision"},{type:"null"}]},roots:{items:{$ref:"#/$defs/RegisteredRootSelectorV1"},type:"array"},scope_set_id:{$ref:"#/$defs/ScopeSetId"}},required:["scope_set_id","roots"],title:"MultiRootScopeSetCasRequestV1",type:"object"},{$defs:{ActorId:mU,AuthorizedRoot:m7,AuthorizedScopeSet:fe,BrainId:ff,ManifestDigest:gj,MultiRootScopeSetCasStatusV1:{enum:["applied","conflict"],type:"string"},ProjectId:_m,RefId:_T,RegisteredRootLocatorV1:_O,RepositoryId:_z,ResolvedScope:_U,ScopeSetId:vc,ScopeSetRevision:vl,SharedProfileStoreLocatorV1:vq,UserProfileId:ba,WorktreeId:So},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{scope_set:{anyOf:[{$ref:"#/$defs/AuthorizedScopeSet"},{type:"null"}]},status:{$ref:"#/$defs/MultiRootScopeSetCasStatusV1"}},required:["status"],title:"MultiRootScopeSetCasResultV1",type:"object"},{$defs:{ScopeSetId:vc},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{scope_set_id:{$ref:"#/$defs/ScopeSetId"}},required:["scope_set_id"],title:"MultiRootScopeSetReadRequestV1",type:"object"},{$defs:{ActorId:mU,AuthorizedRoot:m7,AuthorizedScopeSet:fe,BrainId:ff,ManifestDigest:gj,ProjectId:_m,RefId:_T,RegisteredRootLocatorV1:_O,RepositoryId:_z,ResolvedScope:_U,ScopeSetId:vc,ScopeSetRevision:vl,SharedProfileStoreLocatorV1:vq,UserProfileId:ba,WorktreeId:So},$schema:"https://json-schema.org/draft/2020-12/schema",anyOf:[{$ref:"#/$defs/AuthorizedScopeSet"},{type:"null"}],title:"Nullable_AuthorizedScopeSet"},{$defs:{AcceptWorkProposalDispositionV1:{description:"The accept-proposal operation can commit acceptance only.",enum:["accepted"],type:"string"},CatalogGenerationId:fE,ConfigurationRevisionId:f8,ManifestDigest:gj,ProjectId:_m,ProposalId:__,ProviderId:_w,RepositoryId:_z,RetrievalAnchorId:_J,SourceStoreId:vL,TaskId:v1,UtcMicros:bs,VerifiedWorkGraphVersionV1:bc,WorkCommandId:bC,WorkProductAuthorizedRelationScopeV1:$c,WorkProductEventEvidenceV1:$l,WorkProductExpectedAuthorityV1:$m,WorkProductMutationIdentityV1:$h,WorkProductRevisionPinsV1:$v,WorkProductSelectionScopeV1:$b,WorkProposalV1:$k,WorkProposedChildV1:$w,WorkProviderRouteId:$I,WorkProviderRouteV1:$x,WorkRouteDecisionV1:$N,WorkScoreKindV1:$G,WorkShapeAssessmentV1:$B,WorkSizingV1:$K},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{disposition:{$ref:"#/$defs/AcceptWorkProposalDispositionV1"},mutation:{$ref:"#/$defs/WorkProductMutationIdentityV1"},proposal:{$ref:"#/$defs/WorkProposalV1"},selection:{$ref:"#/$defs/WorkProductSelectionScopeV1"}},required:["selection","proposal","disposition","mutation"],title:"AcceptWorkProposalRequestV1",type:"object"},{$defs:{ActorId:mU,AttemptId:m5,BrainId:ff,CatalogGenerationId:fE,ConfigurationRevisionId:f8,ManifestDigest:gj,ProjectId:_m,ProposalId:__,ProviderId:_w,RepositoryId:_z,RetrievalAnchorId:_J,RunId:_8,SourceStoreId:vL,TaskEvidenceLinkV1:vX,TaskId:v1,UserProfileId:ba,UtcMicros:bs,VerifiedWorkGraphVersionV1:bc,WorkAcceptanceCriterionV1:bl,WorkAttemptIdentityV1:bh,WorkCommandId:bC,WorkGraphChangeV1:bX,WorkHandoffV1:b2,WorkHierarchyV1:b4,WorkInitiativeV1:b6,WorkItemInputV1:b3,WorkItemV1:b9,WorkMilestoneV1:$e,WorkPlanV1:$d,WorkProductAuthorizedRelationScopeV1:$c,WorkProductEventEvidenceV1:$l,WorkProductEventPayloadV1:$p,WorkProductEventV1:$u,WorkProductGraphV1:$f,WorkProductProfileScopeV1:$g,WorkProposalDecisionV1:$$,WorkProposalDispositionV1:$S,WorkProposalV1:$k,WorkProposedChildV1:$w,WorkProviderRouteId:$I,WorkProviderRouteV1:$x,WorkRelationReplanDecisionV1:$C,WorkRelationReplanProposalV1:$T,WorkRouteDecisionV1:$N,WorkScoreKindV1:$G,WorkShapeAssessmentV1:$B,WorkSizingV1:$K},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{event:{$ref:"#/$defs/WorkProductEventV1"},replayed:{type:"boolean"},verified_graph_version:{$ref:"#/$defs/VerifiedWorkGraphVersionV1"}},required:["event","verified_graph_version","replayed"],title:"WorkProductMutationReceiptV1",type:"object"},{$defs:{AttemptId:m5,CoverageStateV1:hM,DuplicateEffectOutcomeV1:hJ,DuplicateEffortKindV1:hZ,ProjectionGenerationId:_g,QuantityEvidenceClassV1:_R,RunId:_8,TaskId:v1,UtcMicros:bs,WorkAttemptIdentityV1:bh,WorkCommandId:bC,WorkDuplicateAdjudicationEvidenceV1:bO,WorkDuplicateAdjudicationQuantitiesV1:bE,WorkTopologyGenerationRefV1:$2},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{command_id:{$ref:"#/$defs/WorkCommandId"},evidence:{$ref:"#/$defs/WorkDuplicateAdjudicationEvidenceV1"},expected_revision:{format:"uint64",minimum:0,type:["integer","null"]},first_attempt:{$ref:"#/$defs/WorkAttemptIdentityV1"},occurred_at:{$ref:"#/$defs/UtcMicros"},quantities:{$ref:"#/$defs/WorkDuplicateAdjudicationQuantitiesV1"},reason:{type:"string"},second_attempt:{$ref:"#/$defs/WorkAttemptIdentityV1"},verdict:{$ref:"#/$defs/DuplicateEffortKindV1"}},required:["first_attempt","second_attempt","evidence","verdict","quantities","reason","command_id","occurred_at"],title:"WorkDuplicateAdjudicationCommandV1",type:"object"},{$defs:{ActorId:mU,AttemptId:m5,CoverageStateV1:hM,DuplicateEffectOutcomeV1:hJ,DuplicateEffortKindV1:hZ,ManifestDigest:gj,ProjectionGenerationId:_g,QuantityEvidenceClassV1:_R,RunId:_8,TaskId:v1,UtcMicros:bs,WorkAttemptIdentityV1:bh,WorkCommandId:bC,WorkDuplicateAdjudicationCommandV1:{additionalProperties:!1,properties:{command_id:{$ref:"#/$defs/WorkCommandId"},evidence:{$ref:"#/$defs/WorkDuplicateAdjudicationEvidenceV1"},expected_revision:{format:"uint64",minimum:0,type:["integer","null"]},first_attempt:{$ref:"#/$defs/WorkAttemptIdentityV1"},occurred_at:{$ref:"#/$defs/UtcMicros"},quantities:{$ref:"#/$defs/WorkDuplicateAdjudicationQuantitiesV1"},reason:{type:"string"},second_attempt:{$ref:"#/$defs/WorkAttemptIdentityV1"},verdict:{$ref:"#/$defs/DuplicateEffortKindV1"}},required:["first_attempt","second_attempt","evidence","verdict","quantities","reason","command_id","occurred_at"],type:"object"},WorkDuplicateAdjudicationEvidenceV1:bO,WorkDuplicateAdjudicationQuantitiesV1:bE,WorkDuplicateAdjudicationReceiptV1:{additionalProperties:!1,properties:{actor_id:{$ref:"#/$defs/ActorId"},adjudication_ref:{$ref:"#/$defs/ManifestDigest"},canonical_input_digest:{$ref:"#/$defs/ManifestDigest"},command:{$ref:"#/$defs/WorkDuplicateAdjudicationCommandV1"},revision:{format:"uint64",minimum:0,type:"integer"}},required:["command","revision","actor_id","canonical_input_digest","adjudication_ref"],type:"object"},WorkTopologyGenerationRefV1:$2},$schema:"https://json-schema.org/draft/2020-12/schema",oneOf:[{properties:{outcome:{const:"appended",type:"string"},receipt:{$ref:"#/$defs/WorkDuplicateAdjudicationReceiptV1"}},required:["outcome","receipt"],type:"object"},{properties:{outcome:{const:"replayed",type:"string"},receipt:{$ref:"#/$defs/WorkDuplicateAdjudicationReceiptV1"}},required:["outcome","receipt"],type:"object"}],title:"WorkDuplicateAdjudicationAppendOutcomeV1"},{$defs:{AttemptId:m5,RunId:_8,TaskId:v1,WorkAttemptIdentityV1:bh,WorkCommandId:bC},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{adjudication_id:{type:"string"},attempt:{$ref:"#/$defs/WorkAttemptIdentityV1"},command_id:{$ref:"#/$defs/WorkCommandId"},detection_horizon_micros:{format:"uint64",minimum:0,type:"integer"},expected_revision:{format:"uint64",minimum:0,type:["integer","null"]}},required:["adjudication_id","attempt","detection_horizon_micros","command_id"],title:"AdjudicateWorkLeakCommandV1",type:"object"},{$defs:{AdjudicateWorkLeakCommandV1:{additionalProperties:!1,properties:{adjudication_id:{type:"string"},attempt:{$ref:"#/$defs/WorkAttemptIdentityV1"},command_id:{$ref:"#/$defs/WorkCommandId"},detection_horizon_micros:{format:"uint64",minimum:0,type:"integer"},expected_revision:{format:"uint64",minimum:0,type:["integer","null"]}},required:["adjudication_id","attempt","detection_horizon_micros","command_id"],title:"AdjudicateWorkLeakCommandV1",type:"object"},AttemptId:m5,CoverageStateV1:hM,LeakOwnerClassV1:{enum:["work","workflow","git","delivery","unknown"],type:"string"},ManifestDigest:gj,RunId:_8,TaskId:v1,UtcMicros:bs,VerifiedWorkLeakEvidenceV1:{additionalProperties:!1,description:"Exact result of one scan by the canonical lease/process/effect/placement/\ndelivery evidence owner. Evidence references are opaque local anchors;\ntheir owning records remain behind normal authorization.",properties:{attempt:{$ref:"#/$defs/WorkAttemptIdentityV1"},coverage:{$ref:"#/$defs/CoverageStateV1"},detection_horizon_micros:{format:"uint64",minimum:0,type:"integer"},evidence_refs:{items:{type:"string"},type:"array"},kind:{$ref:"#/$defs/WorkExecutionLeakKindV1"},owner_class:{$ref:"#/$defs/LeakOwnerClassV1"},recovery:{$ref:"#/$defs/WorkExecutionLeakRecoveryV1"},scan_completed_at:{$ref:"#/$defs/UtcMicros"},scan_started_at:{$ref:"#/$defs/UtcMicros"}},required:["attempt","kind","recovery","owner_class","coverage","detection_horizon_micros","scan_started_at","scan_completed_at","evidence_refs"],type:"object"},WorkAttemptIdentityV1:bh,WorkCommandId:bC,WorkExecutionLeakKindV1:{enum:["lease_after_terminal","attempt_without_live_owner","effect_unknown_past_deadline","missing_worktree_binding","unbounded_delivery","none","unknown"],type:"string"},WorkExecutionLeakRecoveryV1:{enum:["not_required","pending","recovered","failed","unknown"],type:"string"},WorkLeakAdjudicationReceiptV1:{additionalProperties:!1,properties:{canonical_input_digest:{$ref:"#/$defs/ManifestDigest"},command:{$ref:"#/$defs/AdjudicateWorkLeakCommandV1"},evidence:{$ref:"#/$defs/VerifiedWorkLeakEvidenceV1"},revision:{format:"uint64",minimum:0,type:"integer"},scan_deadline:{$ref:"#/$defs/UtcMicros",description:"Daemon/request-owned deadline that bounded the source scan."}},required:["command","revision","evidence","scan_deadline","canonical_input_digest"],type:"object"}},$schema:"https://json-schema.org/draft/2020-12/schema",oneOf:[{properties:{outcome:{const:"appended",type:"string"},receipt:{$ref:"#/$defs/WorkLeakAdjudicationReceiptV1"}},required:["outcome","receipt"],type:"object"},{properties:{outcome:{const:"replayed",type:"string"},receipt:{$ref:"#/$defs/WorkLeakAdjudicationReceiptV1"}},required:["outcome","receipt"],type:"object"}],title:"WorkLeakAdjudicationOutcomeV1"},{$defs:{CatalogGenerationId:fE,ConfigurationRevisionId:f8,ManifestDigest:gj,ProjectId:_m,RepositoryId:_z,RetrievalAnchorId:_J,SourceStoreId:vL,TaskId:v1,UtcMicros:bs,VerifiedWorkGraphVersionV1:bc,WorkCommandId:bC,WorkProductAuthorizedRelationScopeV1:$c,WorkProductEventEvidenceV1:$l,WorkProductExpectedAuthorityV1:$m,WorkProductMutationIdentityV1:$h,WorkProductRevisionPinsV1:$v,WorkProductSelectionScopeV1:$b},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{based_on_version:{format:"uint64",minimum:0,type:"integer"},mutation:{$ref:"#/$defs/WorkProductMutationIdentityV1"},selection:{$ref:"#/$defs/WorkProductSelectionScopeV1"},task_id:{$ref:"#/$defs/TaskId"}},required:["selection","task_id","based_on_version","mutation"],title:"AdmitWorkExecutionRequestV1",type:"object"},{$defs:{ActorId:mU,AttemptId:m5,AutomaticWorktreeGcV1:fr,BrainId:ff,BranchCollisionPolicyV1:fh,BranchNameComponentV1:fy,BranchNameSeparatorV1:fg,BranchNamingPolicyV1:f_,BranchTopologyKindV1:fV,BranchTopologyPolicyV1:fP,CanonicalGitRefNameV1:fC,CanonicalGitRefPrefix:fT,CapabilityId:fO,CatalogGenerationId:fE,ConfigurationRevisionId:f8,ConfigurationSnapshotId:f7,CredentialReferenceId:hN,CrossMergeModeV1:hz,CrossMergePolicyV1:hD,GitHubStackedPullRequestPolicyV1:yH,HistoryRewritePolicyV1:y7,LocatorDigest:gk,ManifestDigest:gj,ProjectId:_m,ProposalId:__,ProtectedRefDispositionV1:_v,ProtectedRefRuleV1:_b,ProtectedRefSelectorV1:_$,ProviderId:_w,RepositoryId:_z,RepositoryPlacementScopeV1:_D,RequiredCheckExpectationV1:_F,RequiredCheckV1:_L,RetrievalAnchorId:_J,ReviewRequirementV1:_0,ReviewTopologyKindV1:_2,ReviewTopologyPolicyV1:_4,RunId:_8,SensitiveFilesystemLocatorV1:vf,SourceStoreId:vL,TaskEvidenceLinkV1:vX,TaskId:v1,TopologyConcurrencyPolicyV1:be,TopologyEscalationPolicyV1:bt,TopologyGatePolicyV1:br,TopologyNotificationLevelV1:bi,UserProfileId:ba,UtcMicros:bs,VerifiedWorkGraphVersionV1:bc,WorkAcceptanceCriterionV1:bl,WorkApprovalPolicy:bp,WorkAttemptIdentityV1:bh,WorkCommandId:bC,WorkEgressPolicy:bM,WorkExecutableReference:bL,WorkExecutionLimits:bH,WorkExecutionSnapshot:bG,WorkFallbackTopology:bJ,WorkFilesystemPolicy:bQ,WorkGraphChangeV1:bX,WorkHandoffV1:b2,WorkHierarchyV1:b4,WorkInitiativeV1:b6,WorkItemInputV1:b3,WorkItemV1:b9,WorkMilestoneV1:$e,WorkPlanV1:$d,WorkProductAuthorizedRelationScopeV1:$c,WorkProductEventEvidenceV1:$l,WorkProductEventPayloadV1:$p,WorkProductEventV1:$u,WorkProductGraphV1:$f,WorkProductMutationReceiptV1:$y,WorkProductProfileScopeV1:$g,WorkProposalDecisionV1:$$,WorkProposalDispositionV1:$S,WorkProposalV1:$k,WorkProposedChildV1:$w,WorkProviderBackendV1:$P,WorkProviderProtocol:$q,WorkProviderRouteId:$I,WorkProviderRouteV1:$x,WorkRelationReplanDecisionV1:$C,WorkRelationReplanProposalV1:$T,WorkRouteDecisionV1:$N,WorkSandboxPolicy:$H,WorkScoreKindV1:$G,WorkShapeAssessmentV1:$B,WorkSizingV1:$K,WorkTopologyPolicyV1:$4,WorktreeCleanlinessRequirementV1:Si,WorktreePlacementModeV1:Ss,WorktreeRetentionPolicyV1:Sd,WorktreeRootPolicyV1:Sc},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Execution admission together with the immutable provider snapshot licensed\nby the accepted proposal and current configuration authority.",properties:{execution_snapshot:{$ref:"#/$defs/WorkExecutionSnapshot"},mutation:{$ref:"#/$defs/WorkProductMutationReceiptV1"}},required:["mutation","execution_snapshot"],title:"AdmittedWorkExecutionV1",type:"object"},{$defs:{RunId:_8,TaskId:v1,UtcMicros:bs,WorkPlacementKindV1:$o,WorkPlacementTargetV1:$a},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{occurred_at:{$ref:"#/$defs/UtcMicros"},retention_eligible_at:{anyOf:[{$ref:"#/$defs/UtcMicros"},{type:"null"}],default:null,description:"When retention makes this placement eligible for a fresh cleanup\npreflight. Eligibility is not delete authority."},run_id:{$ref:"#/$defs/RunId"},target:{$ref:"#/$defs/WorkPlacementTargetV1"},task_id:{$ref:"#/$defs/TaskId"}},required:["task_id","run_id","target","occurred_at"],title:"AdmitWorkPlacementCommand",type:"object"},{$defs:{RunId:_8,TaskId:v1,UtcMicros:bs,WorkPlacementBlockerV1:$r,WorkPlacementIdentityV1:$i,WorkPlacementKindV1:$o,WorkPlacementStateV1:$n,WorkPlacementTargetV1:$a},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"One run's durable placement relation.",properties:{authority_version:{format:"uint64",minimum:0,type:"integer"},blockers:{items:{$ref:"#/$defs/WorkPlacementBlockerV1"},type:"array",uniqueItems:!0},identity:{$ref:"#/$defs/WorkPlacementIdentityV1"},retention_eligible_at:{anyOf:[{$ref:"#/$defs/UtcMicros"},{type:"null"}],description:"When retention makes this placement *eligible* for a fresh cleanup\npreflight. Eligibility is not delete authority."},state:{$ref:"#/$defs/WorkPlacementStateV1"},target:{$ref:"#/$defs/WorkPlacementTargetV1"},transitioned_at:{$ref:"#/$defs/UtcMicros"}},required:["identity","target","state","authority_version","transitioned_at","blockers"],title:"WorkPlacementV1",type:"object"},{$defs:{CommitId:fX,RefId:_T,WorkEffectStateV1:bA,WorkJobBaseV1:{additionalProperties:!1,description:"The source revision every attempt in the job starts from.",properties:{commit:{$ref:"#/$defs/CommitId"},reference:{anyOf:[{$ref:"#/$defs/RefId"},{type:"null"}]}},required:["commit"],type:"object"},WorkJobKeyV1:b5,WorkJobNameV1:{description:"A job name: `[a-z0-9-]`, 1 to 48 bytes. Identities derive from it.",type:"string"},WorkJobSynthesisV1:{additionalProperties:!1,properties:{instructions:{type:"string"},output_name:{$ref:"#/$defs/WorkflowOutputName"},task:{$ref:"#/$defs/WorkJobKeyV1",description:"The synthesis attempt runs under this task's run and execution snapshot."}},required:["task","output_name","instructions"],type:"object"},WorkJobTaskV1:{additionalProperties:!1,properties:{instructions:{type:"string"},key:{$ref:"#/$defs/WorkJobKeyV1"},placement:{$ref:"#/$defs/WorkPlacementTargetV1"},title:{type:"string"}},required:["key","title","instructions","placement"],type:"object"},WorkPlacementKindV1:$o,WorkPlacementTargetV1:$a,WorkflowOutputName:$8},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"One guided job: the tasks to run in parallel, where each runs, and the\nsynthesis that reviews them.",properties:{base:{$ref:"#/$defs/WorkJobBaseV1"},effect_state:{$ref:"#/$defs/WorkEffectStateV1"},job:{$ref:"#/$defs/WorkJobNameV1"},synthesis:{$ref:"#/$defs/WorkJobSynthesisV1"},tasks:{items:{$ref:"#/$defs/WorkJobTaskV1"},type:"array"},title:{type:"string"}},required:["job","title","base","effect_state","tasks","synthesis"],title:"AdvanceWorkJobRequestV1",type:"object"},{$defs:{ActorId:mU,AdmittedWorkExecutionV1:{additionalProperties:!1,description:"Execution admission together with the immutable provider snapshot licensed\nby the accepted proposal and current configuration authority.",properties:{execution_snapshot:{$ref:"#/$defs/WorkExecutionSnapshot"},mutation:{$ref:"#/$defs/WorkProductMutationReceiptV1"}},required:["mutation","execution_snapshot"],type:"object"},ApplicationExecutionFailureClassV1:{description:"Stable non-retryable class for an admitted execution failure.",enum:["denied","malformed_output","permanent"],type:"string"},ApplicationProblemDetailV1:m9,ApplicationProblemKind:{description:"Stable problem-code taxonomy for request failures and admitted terminals.",enum:["invalid_request","not_found_or_not_authorized","conflict","partial_effect","stale","unsupported","unavailable","execution_failed","reset_required","saturated","cancelled","timed_out"],type:"string"},ApplicationProblemRecord:{additionalProperties:!1,description:"Stable application problem record shared verbatim by every adapter.",properties:{cancellation_stage:{$ref:"#/$defs/RequiredNullable3"},code:{type:"string"},committed_receipt:{$ref:"#/$defs/RequiredNullable2",description:"A committed effect is present only for an admitted partial effect.\nThe nullable field is always serialized: omitting it would create a\ncompatibility/default path that could hide a missing receipt."},coverage:{anyOf:[{$ref:"#/$defs/EvidenceCoverage"},{type:"null"}]},detail:{$ref:"#/$defs/RequiredNullable",description:"The structured facts `message` is rendered from, when the problem has\nany. Always serialized so a client never mistakes an omitted detail\nfor a problem without one."},details:{items:{$ref:"#/$defs/SafeDiagnostic"},type:"array"},diagnostic:{anyOf:[{$ref:"#/$defs/SafeDiagnostic"},{type:"null"}]},execution_failure_classification:{$ref:"#/$defs/RequiredNullable5"},kind:{$ref:"#/$defs/ApplicationProblemKind"},legal_actions:{items:{$ref:"#/$defs/LegalAction"},type:"array"},message:{type:"string"},owning_layer:{$ref:"#/$defs/ProblemOwningLayer"},request_id:{type:"string"},retry:{$ref:"#/$defs/RetryDirective"},retry_after_millis:{format:"uint64",minimum:0,type:["integer","null"]},retry_scope:{anyOf:[{$ref:"#/$defs/RetryScope"},{type:"null"}]},retryable:{type:"boolean"},revision:{format:"uint32",minimum:0,type:"integer"},terminality:{$ref:"#/$defs/ProblemTerminality"},trace_id:{type:"string"},unavailable_classification:{$ref:"#/$defs/RequiredNullable4"}},required:["revision","kind","code","message","detail","committed_receipt","owning_layer","terminality","retryable","retry","cancellation_stage","unavailable_classification","execution_failure_classification","request_id","trace_id","details","legal_actions"],type:"object"},ApplicationUnavailableClassV1:{description:"Stable reason an application authority is unavailable.",enum:["authority","backend_unavailable","backend_disconnected","backend_retryable"],type:"string"},AttemptId:m5,AutomaticWorktreeGcV1:fr,BrainId:ff,BranchCollisionPolicyV1:fh,BranchNameComponentV1:fy,BranchNameSeparatorV1:fg,BranchNamingPolicyV1:f_,BranchTopologyKindV1:fV,BranchTopologyPolicyV1:fP,CancellationStage:fx,CanonicalGitRefNameV1:fC,CanonicalGitRefPrefix:fT,CapabilityId:fO,CatalogGenerationId:fE,CommitId:fX,ConfigurationRevisionId:f8,ConfigurationSnapshotId:f7,CoverageCompleteness:hA,CoverageDomainState:hW,CredentialReferenceId:hN,CrossMergeModeV1:hz,CrossMergePolicyV1:hD,DaemonServiceUnitObservationV1:hF,DiagnosticsSearchedTsconfigV1:hG,EffectClass:hQ,EffectReceipt:hX,EffectTermination:hY,EvidenceCoverage:h1,EvidenceDomain:h0,GitHubStackedPullRequestPolicyV1:yH,HistoryRewritePolicyV1:y7,LegalAction:{description:"Bounded action an adapter may offer without inferring executable authority.",enum:["correct_request","reauthorize","refresh","retry","reconcile","reset","restart_without_cursor","contact_administrator"],type:"string"},LocatorDigest:gk,ManifestDigest:gj,ProblemOwningLayer:{description:"Layer that owns resolving the problem rather than merely presenting it.",enum:["adapter","application","runtime","port"],type:"string"},ProblemTerminality:{description:"Whether the problem occurred before admission or is an admitted terminal.",enum:["pre_admission","admitted_terminal"],type:"string"},ProjectId:_m,ProposalId:__,ProtectedRefDispositionV1:_v,ProtectedRefRuleV1:_b,ProtectedRefSelectorV1:_$,ProviderId:_w,RefId:_T,RepositoryId:_z,RepositoryPlacementScopeV1:_D,RequiredCheckExpectationV1:_F,RequiredCheckV1:_L,RequiredNullable:{anyOf:[{$ref:"#/$defs/ApplicationProblemDetailV1"},{type:"null"}],description:"Unlike `Option`, this wrapper distinguishes an explicit JSON `null`\nfrom an omitted field. New terminal-state fields must be present on every\nrecord so a missing committed receipt cannot be mistaken for `None`."},RequiredNullable2:{anyOf:[{$ref:"#/$defs/EffectReceipt"},{type:"null"}],description:"Unlike `Option`, this wrapper distinguishes an explicit JSON `null`\nfrom an omitted field. New terminal-state fields must be present on every\nrecord so a missing committed receipt cannot be mistaken for `None`."},RequiredNullable3:{anyOf:[{$ref:"#/$defs/CancellationStage"},{type:"null"}],description:"Unlike `Option`, this wrapper distinguishes an explicit JSON `null`\nfrom an omitted field. New terminal-state fields must be present on every\nrecord so a missing committed receipt cannot be mistaken for `None`."},RequiredNullable4:{anyOf:[{$ref:"#/$defs/ApplicationUnavailableClassV1"},{type:"null"}],description:"Unlike `Option`, this wrapper distinguishes an explicit JSON `null`\nfrom an omitted field. New terminal-state fields must be present on every\nrecord so a missing committed receipt cannot be mistaken for `None`."},RequiredNullable5:{anyOf:[{$ref:"#/$defs/ApplicationExecutionFailureClassV1"},{type:"null"}],description:"Unlike `Option`, this wrapper distinguishes an explicit JSON `null`\nfrom an omitted field. New terminal-state fields must be present on every\nrecord so a missing committed receipt cannot be mistaken for `None`."},ResolvedScope:_U,RetrievalAnchorId:_J,RetryDirective:{description:"Safe adapter-independent retry instruction. Adapters preserve it verbatim.",enum:["never","same_request","after_delay","after_revalidate","after_reconcile"],type:"string"},RetryScope:{description:"Request identity boundary within which a retry remains valid.",enum:["same_request","same_operation","fresh_request"],type:"string"},ReviewRequirementV1:_0,ReviewTopologyKindV1:_2,ReviewTopologyPolicyV1:_4,RunId:_8,SafeDiagnostic:{additionalProperties:!1,description:"Sanitized detail that may cross the application boundary.",properties:{code:{type:"string"},message:{type:"string"}},required:["code","message"],type:"object"},SensitiveFilesystemLocatorV1:vf,SourceStoreId:vL,TaskEvidenceLinkV1:vX,TaskId:v1,TopologyConcurrencyPolicyV1:be,TopologyEscalationPolicyV1:bt,TopologyGatePolicyV1:br,TopologyNotificationLevelV1:bi,UseCaseId:bn,UserProfileId:ba,UtcMicros:bs,VerifiedWorkGraphVersionV1:bc,WorkAcceptanceCriterionV1:bl,WorkApprovalPolicy:bp,WorkArtifactId:bu,WorkArtifactRefV1:bm,WorkAttemptIdentityV1:bh,WorkAttemptProgressV1:b_,WorkAttemptProjectionBindingV1:bv,WorkAttemptStateV1:bS,WorkAttemptV1:bP,WorkCancellationAcknowledgementV1:bR,WorkCancellationEscalationV1:bq,WorkCancellationRequestId:bI,WorkCancellationRequestV1:bx,WorkCancellationStateV1:bj,WorkCommandId:bC,WorkEffectStateV1:bA,WorkEgressPolicy:bM,WorkExecutableReference:bL,WorkExecutionEnvelopeV1:bU,WorkExecutionLimits:bH,WorkExecutionSnapshot:bG,WorkFallbackTopology:bJ,WorkFenceEpochV1:bZ,WorkFilesystemPolicy:bQ,WorkGraphChangeV1:bX,WorkHandoffV1:b2,WorkHierarchyV1:b4,WorkInitiativeV1:b6,WorkItemInputV1:b3,WorkItemV1:b9,WorkJobIdentitiesV1:{additionalProperties:!1,properties:{operation:{$ref:"#/$defs/WorkflowOperationRef"},synthesis:{$ref:"#/$defs/WorkAttemptIdentityV1"},tasks:{items:{$ref:"#/$defs/WorkJobTaskIdentitiesV1"},type:"array"}},required:["operation","tasks","synthesis"],type:"object"},WorkJobKeyV1:b5,WorkJobStateV1:{oneOf:[{additionalProperties:!1,description:"The call's deadline floor arrived with work left; call again now.",properties:{state:{const:"advancing",type:"string"}},required:["state"],type:"object"},{additionalProperties:!1,description:"Nothing can move until providers, routing, or capacity progress.",properties:{on:{items:{$ref:"#/$defs/WorkJobWaitV1"},type:"array"},state:{const:"waiting",type:"string"}},required:["state","on"],type:"object"},{additionalProperties:!1,description:"The chain stopped at `step`. `problem` is the record the step's own\noperation produced, or a guided refusal naming the job-level cause.",properties:{problem:{$ref:"#/$defs/ApplicationProblemRecord"},state:{const:"refused",type:"string"},step:{$ref:"#/$defs/WorkJobStepV1"}},required:["state","step","problem"],type:"object"},{additionalProperties:!1,properties:{sources:{items:{$ref:"#/$defs/WorkAttemptV1"},type:"array"},state:{const:"completed",type:"string"},synthesis:{$ref:"#/$defs/WorkAttemptV1"}},required:["state","sources","synthesis"],type:"object"}]},WorkJobStepRecordV1:{additionalProperties:!1,description:"A step this call executed, with its operation's own effect receipt.",properties:{receipt:{$ref:"#/$defs/EffectReceipt"},request_id:{type:"string"},result:{$ref:"#/$defs/WorkJobStepResultV1"},step:{$ref:"#/$defs/WorkJobStepV1"}},required:["step","request_id","receipt","result"],type:"object"},WorkJobStepResultV1:{description:"Every arm is an existing Work operation's own output.",oneOf:[{properties:{result:{const:"graph",type:"string"},value:{$ref:"#/$defs/WorkProductMutationReceiptV1"}},required:["result","value"],type:"object"},{properties:{result:{const:"execution",type:"string"},value:{$ref:"#/$defs/AdmittedWorkExecutionV1"}},required:["result","value"],type:"object"},{properties:{result:{const:"placement",type:"string"},value:{$ref:"#/$defs/WorkPlacementV1"}},required:["result","value"],type:"object"},{properties:{result:{const:"attempt",type:"string"},value:{$ref:"#/$defs/WorkAttemptV1"}},required:["result","value"],type:"object"},{properties:{result:{const:"synthesis",type:"string"},value:{$ref:"#/$defs/WorkSynthesisAttemptV1"}},required:["result","value"],type:"object"}]},WorkJobStepV1:{description:"One existing Work operation the guided job runs. There is deliberately no\narm that advances a job, so a step can never recurse into the guided path.",oneOf:[{additionalProperties:!1,properties:{step:{const:"create_task",type:"string"},task:{$ref:"#/$defs/WorkJobKeyV1"}},required:["step","task"],type:"object"},{additionalProperties:!1,properties:{step:{const:"accept_proposal",type:"string"},task:{$ref:"#/$defs/WorkJobKeyV1"}},required:["step","task"],type:"object"},{additionalProperties:!1,properties:{step:{const:"admit_execution",type:"string"},task:{$ref:"#/$defs/WorkJobKeyV1"}},required:["step","task"],type:"object"},{additionalProperties:!1,properties:{step:{const:"admit_placement",type:"string"},task:{$ref:"#/$defs/WorkJobKeyV1"}},required:["step","task"],type:"object"},{additionalProperties:!1,properties:{step:{const:"start_source",type:"string"},task:{$ref:"#/$defs/WorkJobKeyV1"}},required:["step","task"],type:"object"},{additionalProperties:!1,properties:{step:{const:"await_sources",type:"string"}},required:["step"],type:"object"},{additionalProperties:!1,properties:{step:{const:"synthesize",type:"string"}},required:["step"],type:"object"},{additionalProperties:!1,properties:{step:{const:"await_synthesis",type:"string"}},required:["step"],type:"object"},{additionalProperties:!1,properties:{step:{const:"release_placement",type:"string"},task:{$ref:"#/$defs/WorkJobKeyV1"}},required:["step","task"],type:"object"}]},WorkJobTaskIdentitiesV1:{additionalProperties:!1,properties:{key:{$ref:"#/$defs/WorkJobKeyV1"},proposal_id:{$ref:"#/$defs/ProposalId"},source:{$ref:"#/$defs/WorkAttemptIdentityV1"}},required:["key","proposal_id","source"],type:"object"},WorkJobWaitV1:{oneOf:[{additionalProperties:!1,description:"The proposal route abstained, as it does while routing warms.",properties:{reason:{type:"string"},task:{$ref:"#/$defs/WorkJobKeyV1"},wait:{const:"proposal_route",type:"string"}},required:["wait","task","reason"],type:"object"},{additionalProperties:!1,properties:{identity:{$ref:"#/$defs/WorkAttemptIdentityV1"},state:{$ref:"#/$defs/WorkAttemptStateV1"},wait:{const:"attempt",type:"string"}},required:["wait","identity","state"],type:"object"},{additionalProperties:!1,description:"The registered topology has no free attempt slot for this task.",properties:{problem:{$ref:"#/$defs/ApplicationProblemRecord"},task:{$ref:"#/$defs/WorkJobKeyV1"},wait:{const:"capacity",type:"string"}},required:["wait","task","problem"],type:"object"}]},WorkLeaseFenceV1:b8,WorkLeaseId:b7,WorkMilestoneV1:$e,WorkPlacementBlockerV1:$r,WorkPlacementIdentityV1:$i,WorkPlacementKindV1:$o,WorkPlacementStateV1:$n,WorkPlacementTargetV1:$a,WorkPlacementV1:$s,WorkPlanV1:$d,WorkProductAuthorizedRelationScopeV1:$c,WorkProductEventEvidenceV1:$l,WorkProductEventPayloadV1:$p,WorkProductEventV1:$u,WorkProductGraphV1:$f,WorkProductMutationReceiptV1:$y,WorkProductProfileScopeV1:$g,WorkProposalDecisionV1:$$,WorkProposalDispositionV1:$S,WorkProposalV1:$k,WorkProposedChildV1:$w,WorkProviderBackendV1:$P,WorkProviderProtocol:$q,WorkProviderRouteId:$I,WorkProviderRouteV1:$x,WorkRecoveryStateV1:$j,WorkRelationReplanDecisionV1:$C,WorkRelationReplanProposalV1:$T,WorkRestartReasonV1:$O,WorkRouteDecisionV1:$N,WorkSandboxPolicy:$H,WorkScoreKindV1:$G,WorkShapeAssessmentV1:$B,WorkSizingV1:$K,WorkSynthesisAttemptV1:{description:"The typed outcome of a synthesis request: an admitted attempt, or the\nsealed unsynthesized set when synthesis could not truthfully begin.",oneOf:[{additionalProperties:!1,description:"The admitted synthesis attempt and everything it is accountable to.",properties:{attempt:{$ref:"#/$defs/WorkAttemptV1",description:"The leased (or idempotently replayed) synthesis attempt."},draft:{$ref:"#/$defs/WorkflowSynthesisDraft",description:"The citation obligation, complete by construction: the draft cites\nevery citable source digest and is verified downstream by\n[`crate::workflow_synthesis::verify_workflow_synthesis_draft`]."},groups:{description:"Disagreement structure over the succeeded sources.",items:{$ref:"#/$defs/WorkSynthesisEvidenceGroupV1"},type:"array"},source_set:{$ref:"#/$defs/WorkSynthesisSourceSetV1",description:"The sealed source envelopes the attempt was admitted against."},synthesis:{const:"admitted",type:"string"},uncited:{description:"Sources preserved without citations: failures, unknowns, and\nartifact-less successes, in the caller's requested order.",items:{$ref:"#/$defs/WorkAttemptIdentityV1"},type:"array"}},required:["synthesis","attempt","source_set","groups","draft","uncited"],type:"object"},{properties:{refusal:{$ref:"#/$defs/WorkSynthesisRefusalV1"},sources:{$ref:"#/$defs/WorkSynthesisSourceSetV1"},synthesis:{const:"unsynthesized",type:"string"}},required:["synthesis","sources","refusal"],type:"object"}]},WorkSynthesisEvidenceGroupV1:$J,WorkSynthesisRefusalV1:$Z,WorkSynthesisSourceEnvelopeV1:$Q,WorkSynthesisSourceOutcomeV1:$X,WorkSynthesisSourceSetV1:$Y,WorkTerminalEvidenceV1:$0,WorkTopologyPolicyV1:$4,WorkflowOperationRef:$5,WorkflowOutputName:$8,WorkflowSynthesisDraft:Sr,WorktreeCleanlinessRequirementV1:Si,WorktreeId:So,WorktreePlacementModeV1:Ss,WorktreeRetentionPolicyV1:Sd,WorktreeRootPolicyV1:Sc},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"What one call did and where the job now stands.",properties:{job:{$ref:"#/$defs/WorkJobIdentitiesV1",description:"The derived identities, so the advanced operations can target them."},performed:{description:"Only the steps this call executed, in order.",items:{$ref:"#/$defs/WorkJobStepRecordV1"},type:"array"},state:{$ref:"#/$defs/WorkJobStateV1"}},required:["job","performed","state"],title:"AdvanceWorkJobResultV1",type:"object"},{$defs:{AttemptId:m5,RunId:_8,TaskId:v1},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{attempt_id:{$ref:"#/$defs/AttemptId"},run_id:{$ref:"#/$defs/RunId"},task_id:{$ref:"#/$defs/TaskId"}},required:["task_id","run_id","attempt_id"],title:"WorkAttemptStatusRequestV1",type:"object"},{$defs:{AttemptId:m5,AutomaticWorktreeGcV1:fr,BranchCollisionPolicyV1:fh,BranchNameComponentV1:fy,BranchNameSeparatorV1:fg,BranchNamingPolicyV1:f_,BranchTopologyKindV1:fV,BranchTopologyPolicyV1:fP,CanonicalGitRefNameV1:fC,CanonicalGitRefPrefix:fT,CapabilityId:fO,CommitId:fX,ConfigurationRevisionId:f8,ConfigurationSnapshotId:f7,CredentialReferenceId:hN,CrossMergeModeV1:hz,CrossMergePolicyV1:hD,GitHubStackedPullRequestPolicyV1:yH,HistoryRewritePolicyV1:y7,LocatorDigest:gk,ManifestDigest:gj,ProjectId:_m,ProposalId:__,ProtectedRefDispositionV1:_v,ProtectedRefRuleV1:_b,ProtectedRefSelectorV1:_$,ProviderId:_w,RefId:_T,RepositoryId:_z,RepositoryPlacementScopeV1:_D,RequiredCheckExpectationV1:_F,RequiredCheckV1:_L,ReviewRequirementV1:_0,ReviewTopologyKindV1:_2,ReviewTopologyPolicyV1:_4,RunId:_8,SensitiveFilesystemLocatorV1:vf,TaskId:v1,TopologyConcurrencyPolicyV1:be,TopologyEscalationPolicyV1:bt,TopologyGatePolicyV1:br,TopologyNotificationLevelV1:bi,UtcMicros:bs,WorkApprovalPolicy:bp,WorkArtifactId:bu,WorkArtifactRefV1:bm,WorkAttemptIdentityV1:bh,WorkAttemptProgressV1:b_,WorkAttemptProjectionBindingV1:bv,WorkAttemptStateV1:bS,WorkCancellationAcknowledgementV1:bR,WorkCancellationEscalationV1:bq,WorkCancellationRequestId:bI,WorkCancellationRequestV1:bx,WorkCancellationStateV1:bj,WorkEffectStateV1:bA,WorkEgressPolicy:bM,WorkExecutableReference:bL,WorkExecutionEnvelopeV1:bU,WorkExecutionLimits:bH,WorkExecutionSnapshot:bG,WorkFallbackTopology:bJ,WorkFenceEpochV1:bZ,WorkFilesystemPolicy:bQ,WorkLeaseFenceV1:b8,WorkLeaseId:b7,WorkProviderBackendV1:$P,WorkProviderProtocol:$q,WorkProviderRouteId:$I,WorkProviderRouteV1:$x,WorkRecoveryStateV1:$j,WorkRestartReasonV1:$O,WorkSandboxPolicy:$H,WorkTerminalEvidenceV1:$0,WorkTopologyPolicyV1:$4,WorkflowOperationRef:$5,WorktreeCleanlinessRequirementV1:Si,WorktreeId:So,WorktreePlacementModeV1:Ss,WorktreeRetentionPolicyV1:Sd,WorktreeRootPolicyV1:Sc},$schema:"https://json-schema.org/draft/2020-12/schema",properties:{actual_route:{anyOf:[{$ref:"#/$defs/WorkProviderRouteV1"},{type:"null"}]},artifacts:{items:{$ref:"#/$defs/WorkArtifactRefV1"},type:"array"},cancellation:{$ref:"#/$defs/WorkCancellationStateV1"},execution:{$ref:"#/$defs/WorkExecutionEnvelopeV1"},identity:{$ref:"#/$defs/WorkAttemptIdentityV1"},lease:{$ref:"#/$defs/WorkLeaseFenceV1"},progress:{anyOf:[{$ref:"#/$defs/WorkAttemptProgressV1"},{type:"null"}]},projection_binding:{$ref:"#/$defs/WorkAttemptProjectionBindingV1"},recovery:{$ref:"#/$defs/WorkRecoveryStateV1"},requested_route:{$ref:"#/$defs/WorkProviderRouteV1"},state:{$ref:"#/$defs/WorkAttemptStateV1"},terminal:{anyOf:[{$ref:"#/$defs/WorkTerminalEvidenceV1"},{type:"null"}]}},required:["identity","projection_binding","execution","lease","state","artifacts","cancellation","recovery","requested_route"],title:"WorkAttemptV1",type:"object"},{$defs:{AttemptId:m5,RunId:_8,TaskId:v1,UtcMicros:bs,WorkCancellationRequestId:bI},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{attempt_id:{$ref:"#/$defs/AttemptId"},occurred_at:{$ref:"#/$defs/UtcMicros"},request_id:{$ref:"#/$defs/WorkCancellationRequestId"},run_id:{$ref:"#/$defs/RunId"},task_id:{$ref:"#/$defs/TaskId"}},required:["task_id","run_id","attempt_id","request_id","occurred_at"],title:"CancelWorkAttemptCommand",type:"object"},{$defs:{ManifestDigest:gj,ProjectId:_m,RepositoryId:_z,TaskId:v1,UtcMicros:bs,VerifiedWorkGraphVersionV1:bc,WorkProductAuthorizedRelationScopeV1:$c,WorkProductSelectionScopeV1:$b},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{new_version:{$ref:"#/$defs/VerifiedWorkGraphVersionV1"},observed_at:{$ref:"#/$defs/UtcMicros"},old_version:{$ref:"#/$defs/VerifiedWorkGraphVersionV1"},selection:{$ref:"#/$defs/WorkProductSelectionScopeV1"},task_id:{$ref:"#/$defs/TaskId"}},required:["selection","task_id","old_version","new_version","observed_at"],title:"WorkProposalComparisonRequestV1",type:"object"},{$defs:{ActorId:mU,AttemptId:m5,ManifestDigest:gj,ProposalId:__,ProviderId:_w,RetrievalAnchorId:_J,RunId:_8,TaskEvidenceLinkV1:vX,TaskId:v1,UtcMicros:bs,VerifiedWorkEvidenceRootV1:{additionalProperties:!1,properties:{item:{$ref:"#/$defs/WorkItemV1"},links:{items:{$ref:"#/$defs/TaskEvidenceLinkV1"},type:"array"},proposal_decisions:{items:{$ref:"#/$defs/WorkProposalDecisionV1"},type:"array"},relation_replan_decisions:{items:{$ref:"#/$defs/WorkRelationReplanDecisionV1"},type:"array"},relations:{items:{$ref:"#/$defs/WorkProductRelationV1"},type:"array"},verified_version:{$ref:"#/$defs/VerifiedWorkGraphVersionV1"}},required:["verified_version","item","relations","proposal_decisions","relation_replan_decisions","links"],type:"object"},VerifiedWorkGraphVersionV1:bc,WorkAcceptanceCriterionV1:bl,WorkAttemptIdentityV1:bh,WorkHandoffV1:b2,WorkHierarchyV1:b4,WorkItemInputV1:b3,WorkItemV1:b9,WorkProductRelationV1:$_,WorkProposalComparisonEffectV1:{oneOf:[{const:"advisory_only",description:"Comparison is evidence only. There is no apply edge from this result.",type:"string"}]},WorkProposalDecisionV1:$$,WorkProposalDispositionV1:$S,WorkProposalV1:$k,WorkProposedChildV1:$w,WorkProviderRouteId:$I,WorkProviderRouteV1:$x,WorkRelationReplanDecisionV1:$C,WorkRelationReplanProposalV1:$T,WorkRouteDecisionV1:$N,WorkScoreKindV1:$G,WorkShapeAssessmentV1:$B,WorkSizingV1:$K},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{added_evidence:{items:{$ref:"#/$defs/TaskEvidenceLinkV1"},type:"array"},added_relations:{items:{$ref:"#/$defs/WorkProductRelationV1"},type:"array"},effect:{$ref:"#/$defs/WorkProposalComparisonEffectV1"},item_changed:{type:"boolean"},new:{$ref:"#/$defs/VerifiedWorkEvidenceRootV1"},old:{$ref:"#/$defs/VerifiedWorkEvidenceRootV1"},removed_evidence:{items:{$ref:"#/$defs/TaskEvidenceLinkV1"},type:"array"},removed_relations:{items:{$ref:"#/$defs/WorkProductRelationV1"},type:"array"},task_id:{$ref:"#/$defs/TaskId"}},required:["task_id","old","new","added_relations","removed_relations","added_evidence","removed_evidence","item_changed","effect"],title:"WorkProposalComparisonV1",type:"object"},{$defs:{ActorId:mU,AttemptId:m5,CatalogGenerationId:fE,ConfigurationRevisionId:f8,ManifestDigest:gj,ProjectId:_m,ProposalId:__,ProviderId:_w,RepositoryId:_z,RetrievalAnchorId:_J,RunId:_8,SourceStoreId:vL,TaskId:v1,UtcMicros:bs,VerifiedWorkGraphVersionV1:bc,WorkAcceptanceCriterionV1:bl,WorkAttemptIdentityV1:bh,WorkCommandId:bC,WorkHandoffV1:b2,WorkHierarchyV1:b4,WorkInitiativeV1:b6,WorkItemInputV1:b3,WorkItemV1:b9,WorkMilestoneV1:$e,WorkPlanV1:$d,WorkProductAuthorizedRelationScopeV1:$c,WorkProductEventEvidenceV1:$l,WorkProductExpectedAuthorityV1:$m,WorkProductMutationIdentityV1:$h,WorkProductRevisionPinsV1:$v,WorkProductSelectionScopeV1:$b,WorkProviderRouteId:$I,WorkProviderRouteV1:$x,WorkRouteDecisionV1:$N},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{initiative:{$ref:"#/$defs/WorkInitiativeV1"},item:{$ref:"#/$defs/WorkItemV1"},milestone:{$ref:"#/$defs/WorkMilestoneV1"},mutation:{$ref:"#/$defs/WorkProductMutationIdentityV1"},plan:{$ref:"#/$defs/WorkPlanV1"},selection:{$ref:"#/$defs/WorkProductSelectionScopeV1"}},required:["selection","initiative","plan","milestone","item","mutation"],title:"CreateWorkTaskRequestV1",type:"object"},{$defs:{WorkAttemptListCursorV1:bg},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{cursor:{anyOf:[{$ref:"#/$defs/WorkAttemptListCursorV1"},{type:"null"}],default:null},page_size:{format:"uint32",minimum:0,type:"integer"}},required:["page_size"],title:"WorkAttemptListRequestV1",type:"object"},{$defs:{AttemptId:m5,ManifestDigest:gj,RunId:_8,TaskId:v1,UtcMicros:bs,WorkAttemptIdentityV1:bh,WorkAttemptListCoverageV1:by,WorkAttemptListCursorV1:bg,WorkAttemptStateV1:bS,WorkEffectStateV1:bA,WorkExecutionSpanV1:{additionalProperties:!1,properties:{admitted_projection_sequence:{description:"Durable Work projection sequence under which execution was admitted.",format:"uint64",minimum:0,type:"integer"},effect_state:{$ref:"#/$defs/WorkEffectStateV1"},ended_at:{anyOf:[{$ref:"#/$defs/UtcMicros"},{type:"null"}]},identity:{$ref:"#/$defs/WorkAttemptIdentityV1"},started_at:{$ref:"#/$defs/UtcMicros"},state:{$ref:"#/$defs/WorkAttemptStateV1"},terminal_evidence_digest:{anyOf:[{$ref:"#/$defs/ManifestDigest"},{type:"null"}]},wall_micros:{description:"Present only when both owner instants form a valid non-negative span.",format:"uint64",minimum:0,type:["integer","null"]}},required:["identity","admitted_projection_sequence","state","effect_state","started_at"],type:"object"},WorkExecutionTimingCoverageV1:{oneOf:[{additionalProperties:!1,properties:{coverage:{const:"complete",type:"string"}},required:["coverage"],type:"object"},{additionalProperties:!1,properties:{coverage:{const:"partial",type:"string"},invalid_terminal_span:{items:{$ref:"#/$defs/WorkAttemptIdentityV1"},type:"array"},missing_dispatch:{items:{$ref:"#/$defs/WorkAttemptIdentityV1"},type:"array"}},required:["coverage","missing_dispatch","invalid_terminal_span"],type:"object"}]},WorkObservedExecutionOrderBasisV1:{enum:["terminal_observed_at_then_admitted_projection_sequence_then_attempt_identity"],type:"string"},WorkObservedExecutionV1:{additionalProperties:!1,properties:{admitted_projection_sequence:{format:"uint64",minimum:0,type:"integer"},evidence_digest:{$ref:"#/$defs/ManifestDigest"},identity:{$ref:"#/$defs/WorkAttemptIdentityV1"},observed_at:{$ref:"#/$defs/UtcMicros"},ordinal:{description:"One-based order assigned after sorting the durable terminal instants.",format:"uint32",minimum:0,type:"integer"},state:{$ref:"#/$defs/WorkAttemptStateV1"}},required:["ordinal","identity","admitted_projection_sequence","observed_at","state","evidence_digest"],type:"object"}},$schema:"https://json-schema.org/draft/2020-12/schema",oneOf:[{additionalProperties:!1,properties:{state:{const:"absent",type:"string"}},required:["state"],type:"object"},{additionalProperties:!1,properties:{attempt_coverage:{$ref:"#/$defs/WorkAttemptListCoverageV1"},observed_order:{items:{$ref:"#/$defs/WorkObservedExecutionV1"},type:"array"},order_basis:{$ref:"#/$defs/WorkObservedExecutionOrderBasisV1"},spans:{items:{$ref:"#/$defs/WorkExecutionSpanV1"},type:"array"},state:{const:"listed",type:"string"},timing_coverage:{$ref:"#/$defs/WorkExecutionTimingCoverageV1"}},required:["state","spans","observed_order","order_basis","attempt_coverage","timing_coverage"],type:"object"}],title:"WorkExecutionHistoryV1"},{$defs:{ManifestDigest:gj,ProjectId:_m,RepositoryId:_z,TaskId:v1,UtcMicros:bs,VerifiedWorkGraphVersionV1:bc,WorkExpertiseCategoryV1:bB,WorkProductAuthorizedRelationScopeV1:$c,WorkProductSelectionScopeV1:$b},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{evidence_not_before:{$ref:"#/$defs/UtcMicros",description:"Evidence before this owner-supplied horizon is excluded as stale."},expertise_categories:{description:"Categories for which the returned context will be used ephemerally.",items:{$ref:"#/$defs/WorkExpertiseCategoryV1"},type:"array",uniqueItems:!0},limit:{format:"uint32",minimum:0,type:"integer"},observed_at:{$ref:"#/$defs/UtcMicros"},selection:{$ref:"#/$defs/WorkProductSelectionScopeV1"},task_id:{$ref:"#/$defs/TaskId"},verified_version:{$ref:"#/$defs/VerifiedWorkGraphVersionV1"}},required:["selection","task_id","verified_version","evidence_not_before","expertise_categories","limit","observed_at"],title:"WorkExperienceRequestV1",type:"object"},{$defs:{ActorId:mU,AttemptId:m5,ConfigurationRevisionId:f8,ConfigurationSnapshotId:f7,ManifestDigest:gj,ObservationSourceIdentityV1:g3,ProposalId:__,ProviderId:_w,RetrievalAnchorId:_J,RunId:_8,SessionId:vv,TaskEvidenceLinkV1:vX,TaskId:v1,UtcMicros:bs,VerifiedWorkGraphVersionV1:bc,WorkAcceptanceCriterionV1:bl,WorkArtifactId:bu,WorkArtifactRefV1:bm,WorkAttemptEvidenceRecordV1:bf,WorkAttemptIdentityV1:bh,WorkAttemptProviderOutcomeV1:bb,WorkAttemptReceiptV1:b$,WorkAttemptStreamChannelV1:bk,WorkAttemptStreamSummaryV1:bw,WorkExperienceApplicabilityV1:{enum:["same_accepted_route","same_milestone"],type:"string"},WorkExperienceCandidateV1:{additionalProperties:!1,properties:{applicability:{description:"Separate declared applicability facts. This is intentionally not a\nscore and candidates remain in canonical TaskId order.",items:{$ref:"#/$defs/WorkExperienceApplicabilityV1"},type:"array",uniqueItems:!0},attempt_receipts:{description:"Exact receipts for accepted successful attempts whose sealed provider\nevidence and declared artifacts establish reusable observed work. The\nidentity is also the canonical `work_retrieve_evidence` drill target.",items:{$ref:"#/$defs/WorkAttemptReceiptV1"},type:"array"},evidence:{description:"Exact anchored evidence establishing that this is observed experience.",items:{$ref:"#/$defs/TaskEvidenceLinkV1"},type:"array"},item:{$ref:"#/$defs/WorkItemV1"}},required:["item","evidence","attempt_receipts","applicability"],type:"object"},WorkExperienceCoverageV1:{oneOf:[{additionalProperties:!1,properties:{coverage:{const:"unavailable",type:"string"}},required:["coverage"],type:"object"},{additionalProperties:!1,properties:{applicable:{format:"uint32",minimum:0,type:"integer"},coverage:{const:"complete",type:"string"},returned:{format:"uint32",minimum:0,type:"integer"},stale_excluded:{format:"uint32",minimum:0,type:"integer"}},required:["coverage","returned","applicable","stale_excluded"],type:"object"},{additionalProperties:!1,properties:{applicable:{format:"uint32",minimum:0,type:"integer"},coverage:{const:"partial",type:"string"},omitted_by_limit:{format:"uint32",minimum:0,type:"integer"},returned:{format:"uint32",minimum:0,type:"integer"},stale_excluded:{format:"uint32",minimum:0,type:"integer"}},required:["coverage","returned","applicable","stale_excluded","omitted_by_limit"],type:"object"}]},WorkExpertiseAuthorizationV1:{oneOf:[{additionalProperties:!1,properties:{availability:{const:"available",type:"string"},categories:{items:{$ref:"#/$defs/WorkExpertiseCategoryV1"},type:"array",uniqueItems:!0},durability:{$ref:"#/$defs/WorkExpertiseContextDurabilityV1"},expires_at:{$ref:"#/$defs/UtcMicros"},pin:{$ref:"#/$defs/WorkExpertiseConsentPinV1"}},required:["availability","categories","expires_at","pin","durability"],type:"object"},{additionalProperties:!1,properties:{availability:{const:"unavailable",type:"string"},legal_actions:{items:{$ref:"#/$defs/WorkExpertiseLegalActionV1"},type:"array",uniqueItems:!0},pin:{$ref:"#/$defs/WorkExpertiseConsentPinV1"},reasons:{items:{$ref:"#/$defs/WorkExpertiseUnavailableReasonV1"},type:"array",uniqueItems:!0}},required:["availability","reasons","legal_actions","pin"],type:"object"}]},WorkExpertiseCategoryV1:bB,WorkExpertiseConsentPinV1:{additionalProperties:!1,properties:{configuration_digest:{$ref:"#/$defs/ManifestDigest"},configuration_revision:{$ref:"#/$defs/ConfigurationRevisionId"},configuration_snapshot:{$ref:"#/$defs/ConfigurationSnapshotId"},provenance_digest:{$ref:"#/$defs/ManifestDigest"}},required:["configuration_revision","configuration_snapshot","configuration_digest","provenance_digest"],type:"object"},WorkExpertiseContextDurabilityV1:{oneOf:[{const:"ephemeral_only",description:"Context is returned for this read only and cannot establish evidence,\nrouting, proposal acceptance, execution admission, or completion.",type:"string"}]},WorkExpertiseLegalActionV1:{enum:["grant_user_consent","grant_project_consent","renew_user_consent","renew_project_consent","allow_requested_categories"],type:"string"},WorkExpertiseUnavailableReasonV1:{enum:["user_consent_disabled","project_consent_disabled","user_consent_not_yet_effective","project_consent_not_yet_effective","user_consent_expired","project_consent_expired","requested_category_not_allowed"],type:"string"},WorkHandoffV1:b2,WorkHierarchyV1:b4,WorkItemInputV1:b3,WorkItemV1:b9,WorkProviderAvailabilityV1:$V,WorkProviderBackendV1:$P,WorkProviderFallbackRecordV1:$R,WorkProviderRouteId:$I,WorkProviderRouteV1:$x,WorkRouteDecisionV1:$N},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{candidates:{items:{$ref:"#/$defs/WorkExperienceCandidateV1"},type:"array"},coverage:{$ref:"#/$defs/WorkExperienceCoverageV1"},evidence_not_before:{$ref:"#/$defs/UtcMicros"},expertise:{$ref:"#/$defs/WorkExpertiseAuthorizationV1"},observed_at:{$ref:"#/$defs/UtcMicros"},task_id:{$ref:"#/$defs/TaskId"},verified_version:{$ref:"#/$defs/VerifiedWorkGraphVersionV1"}},required:["task_id","verified_version","evidence_not_before","observed_at","expertise","candidates","coverage"],title:"WorkExperienceV1",type:"object"},{$defs:{ManifestDigest:gj,ProjectId:_m,ProposalId:__,RepositoryId:_z,TaskId:v1,UtcMicros:bs,WorkEvidenceFrontierV1:bz,WorkProductAuthorizedRelationScopeV1:$c,WorkProductSelectionScopeV1:$b},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Read-only proposal generation over one exact current product graph.",properties:{live_git_evidence:{anyOf:[{$ref:"#/$defs/WorkEvidenceFrontierV1"},{type:"null"}],default:null},occurred_at:{$ref:"#/$defs/UtcMicros"},proposal_id:{$ref:"#/$defs/ProposalId"},selection:{$ref:"#/$defs/WorkProductSelectionScopeV1"},task_id:{$ref:"#/$defs/TaskId"}},required:["selection","task_id","proposal_id","occurred_at"],title:"GenerateProposalRequest",type:"object"},{$defs:{ConfigurationRevisionId:f8,ManifestDigest:gj,PolicyIdentifierV1:{description:"A bounded, canonical identifier owned by the policy input schema.\n\nIt represents immutable references only; it is never a path, display\nlabel, provider account, branch name, or native object identifier.",type:"string"},ProposalId:__,ProviderId:_w,TaskId:v1,UtcMicros:bs,VerifiedWorkGraphVersionV1:bc,WorkCalibratedSizingV1:{additionalProperties:!1,description:"Calibrated sizing. Emitted ONLY when support >= floor. Every field is\nnamed separately (Plan 06); `support_floor` carries the governing floor\ninto the record.",properties:{band:{$ref:"#/$defs/WorkOrdinalBandV1",description:"The sizing band itself: the stronger of the route's declared effort and\nthe derived shape magnitude, widened when the cohort error is high."},cohort:{description:"Identity of the cohort the sizing was calibrated over: the top-ranked\nroute id. Sizing from one cohort is never reused for another.",type:"string"},drift_valid:{description:"False when the cohort contains incomparable or stale observations, so a\nconsumer can refuse a sizing that drifted rather than silently trust it.",type:"boolean"},error:{$ref:"#/$defs/WorkOrdinalBandV1",description:"Observed adverse-outcome band over the cohort. An ordinal band, never a\nrate and never a probability."},horizon:{$ref:"#/$defs/UtcMicros",description:"Latest comparable observation in the cohort. Nothing after\n`evaluated_at` contributes, so the horizon never runs ahead of the input."},support:{description:"Count of comparable in-cohort outcomes backing this sizing.",format:"uint32",minimum:0,type:"integer"},support_floor:{description:"The floor that governed this emission, carried so replay shows which\nfloor applied rather than assuming the current constant.",format:"uint32",minimum:0,type:"integer"}},required:["cohort","horizon","support","support_floor","error","drift_valid","band"],type:"object"},WorkCalibrationEvidenceV1:{additionalProperties:!1,description:"Raw calibration values and their exact decision provenance.\n\nNo rate, probability, or composite score is derived here. Consumers see\nthe authority-supplied outcome rows, categorical uncertainty, and exact\ndenominator counts that produced the proposal's existing calibrated sizing.",properties:{cohort_route:{type:["string","null"]},comparable_outcomes:{format:"uint32",minimum:0,type:"integer"},eligible_route_count:{format:"uint32",minimum:0,type:"integer"},incomparable_outcomes:{format:"uint32",minimum:0,type:"integer"},provenance:{$ref:"#/$defs/WorkCalibrationProvenanceV1"},raw_outcomes:{items:{$ref:"#/$defs/WorkPriorOutcomeV1"},type:"array"},routes_with_outcomes:{format:"uint32",minimum:0,type:"integer"},uncertainty:{$ref:"#/$defs/WorkCalibrationUncertaintyV1"}},required:["raw_outcomes","eligible_route_count","routes_with_outcomes","comparable_outcomes","incomparable_outcomes","uncertainty","provenance"],type:"object"},WorkCalibrationProvenanceV1:{additionalProperties:!1,properties:{configuration_digest:{$ref:"#/$defs/ManifestDigest"},configuration_revision:{anyOf:[{$ref:"#/$defs/ConfigurationRevisionId"},{type:"null"}]},evaluated_at:{$ref:"#/$defs/UtcMicros"},evaluator_id:{type:"string"},evaluator_revision:{format:"uint64",minimum:0,type:"integer"},input_digest:{$ref:"#/$defs/ManifestDigest"},local_evidence:{anyOf:[{$ref:"#/$defs/WorkEvidenceFrontierV1"},{type:"null"}]}},required:["evaluator_id","evaluator_revision","input_digest","configuration_digest","evaluated_at"],type:"object"},WorkCalibrationUncertaintyV1:{enum:["supported","sparse","stale","incomparable"],type:"string"},WorkDecompositionProposalV1:{additionalProperties:!1,description:"A one-level decomposition proposal. Never recursive: a deeper split is a\nseparate sequenced capability, not something this evaluator may invent.",properties:{candidates:{description:"The proposed sketches, ordinal ascending from 0.",items:{$ref:"#/$defs/WorkSubtaskSketchV1"},type:"array"},rationale:{description:"Why the proposal was emitted, in the same ordered reason vocabulary the\ndecision uses.",items:{$ref:"#/$defs/WorkProposalReasonV1"},type:"array"}},required:["candidates","rationale"],type:"object"},WorkEvidenceFrontierV1:bz,WorkFrontierComparisonV1:{description:"Recorded relation between the two supplied frontiers. `Incomparable` means\nat least one side was absent; it is not collapsed into agreement.",enum:["agree","disagree","incomparable"],type:"string"},WorkOrdinalBandV1:$t,WorkPriorOutcomeV1:{additionalProperties:!1,description:"Cohort denominator. APPLICATION-supplied, never worker-supplied.\n\nA worker cannot widen its own calibration cohort, so a route cannot earn\ncalibrated sizing by reporting its own successes.",properties:{accepted:{description:"Whether the produced work was accepted.",type:"boolean"},escaped_defect:{description:"Whether a defect escaped review.",type:"boolean"},observed_at:{$ref:"#/$defs/UtcMicros",description:"When the outcome was observed. Outcomes later than `evaluated_at` are\nINCOMPARABLE and are excluded from support rather than trusted."},rework:{description:"Whether the accepted work required rework.",type:"boolean"},route_id:{description:"The route this outcome belongs to. May name a retired route; only\noutcomes matching the top-ranked route form the sizing cohort.",type:"string"},terminal:{$ref:"#/$defs/WorkPriorTerminalV1",description:"How the attempt terminated."}},required:["route_id","accepted","rework","escaped_defect","terminal","observed_at"],type:"object"},WorkPriorTerminalV1:{description:"How a prior attempt on a route ended. Recorded, never inferred.",enum:["succeeded","failed","timed_out","cancelled"],type:"string"},WorkProposalActionV1:{description:"The explicit command the decision recommends next. A recommendation never\nexecutes; each action names a separate version-checked application command.",enum:["proceed_to_acceptance","hold_for_dependencies","admit_execution","replan"],type:"string"},WorkProposalDecisionV1:{additionalProperties:!1,description:"One explained, replayable work-loop decision.",properties:{based_on_version:{format:"uint64",minimum:0,type:"integer"},configuration_digest:{$ref:"#/$defs/ManifestDigest"},configuration_revision:{anyOf:[{$ref:"#/$defs/ConfigurationRevisionId"},{type:"null"}]},decomposition:{anyOf:[{$ref:"#/$defs/WorkDecompositionProposalV1"},{type:"null"}],description:"One-level decomposition sketch, present only when more than one\ndependency is unresolved."},deterministic_fallback:{description:"True when the recommendation is the declared deterministic baseline\nselected because the evidence cannot support a stronger claim.",type:"boolean"},disposition:{$ref:"#/$defs/WorkProposalDispositionV1"},evaluator_id:{$ref:"#/$defs/PolicyIdentifierV1"},evaluator_revision:{format:"uint64",minimum:0,type:"integer"},frontier_comparison:{$ref:"#/$defs/WorkFrontierComparisonV1"},input_digest:{$ref:"#/$defs/ManifestDigest"},live_git_evidence:{anyOf:[{$ref:"#/$defs/WorkEvidenceFrontierV1"},{type:"null"}],description:"The live Git frontier, returned exactly as supplied."},local_evidence:{anyOf:[{$ref:"#/$defs/WorkEvidenceFrontierV1"},{type:"null"}],description:"The local code/session frontier, returned exactly as supplied."},ordered_reason_codes:{items:{$ref:"#/$defs/WorkProposalReasonV1"},type:"array"},policy_digest:{$ref:"#/$defs/ManifestDigest"},policy_revision:{format:"uint64",minimum:0,type:"integer"},recommended_action:{anyOf:[{$ref:"#/$defs/WorkProposalActionV1"},{type:"null"}]},route_plan:{anyOf:[{$ref:"#/$defs/WorkRoutePlanV1"},{type:"null"}],description:"The explained route plan. Present on every evaluation that reached the\ngates, including the one that found no eligible route."},shape:{anyOf:[{$ref:"#/$defs/WorkTaskShapeV1"},{type:"null"}],description:"Derived task shape. Absent on the invalid, cancelled, and deadline\nshort-circuits, where no planner claim is licensed."},sizing:{anyOf:[{$ref:"#/$defs/WorkCalibratedSizingV1"},{type:"null"}],description:"Calibrated sizing, present only when in-cohort support reached the\ngoverning floor. Absence is a recorded fact, never a fabricated estimate."},task_id:{$ref:"#/$defs/TaskId"}},required:["evaluator_id","evaluator_revision","input_digest","task_id","based_on_version","policy_revision","policy_digest","configuration_digest","disposition","deterministic_fallback","ordered_reason_codes","frontier_comparison"],type:"object"},WorkProposalDispositionV1:{description:"Exactly one disposition per decision.",enum:["allow","deny","abstain","indeterminate"],type:"string"},WorkProposalReasonV1:{enum:["invalid_request","request_cancelled","deadline_exceeded","frontier_agreement","frontier_disagreement","frontier_incomparable","task_accepted","runtime_coverage_partial","runtime_coverage_unavailable","terminal_evidence_observed","execution_in_flight","proposal_accepted","dependencies_unresolved","ready","insufficient_calibration_support","route_budget_exceeded","route_content_location_refused","route_evidence_sparse","route_evidence_stale","human_override_applied","no_eligible_routes","deterministic_baseline_selected"],type:"string"},WorkProposalV1:$k,WorkProposedChildV1:$w,WorkProviderRouteId:$I,WorkProviderRouteV1:$x,WorkRankedRouteV1:{additionalProperties:!1,description:"Ranked route. Dimensions stay SEPARATE. No scalar score field is permitted here.",properties:{autonomy:{$ref:"#/$defs/WorkOrdinalBandV1",description:"Autonomy fitness, echoed unmerged."},correctness:{$ref:"#/$defs/WorkOrdinalBandV1",description:"Correctness fitness, echoed so the ranking can be audited without the input."},cost:{$ref:"#/$defs/WorkOrdinalBandV1",description:"Cost fitness, oriented so `Highest` is best-fitting."},evidence_quality:{$ref:"#/$defs/WorkOrdinalBandV1",description:"Evidence-quality fitness, echoed unmerged."},latency:{$ref:"#/$defs/WorkOrdinalBandV1",description:"Latency fitness, oriented so `Highest` is best-fitting."},rank:{description:"Position in the ranking, ascending from 1.",format:"uint32",minimum:0,type:"integer"},route_id:{description:"The ranked route's identity.",type:"string"},sensitive_data_fitness:{$ref:"#/$defs/WorkOrdinalBandV1",description:"Sensitive-data fitness, echoed unmerged."}},required:["rank","route_id","correctness","sensitive_data_fitness","latency","cost","autonomy","evidence_quality"],type:"object"},WorkRouteDecisionV1:$N,WorkRouteExclusionV1:{additionalProperties:!1,description:"One refused route and the single reason that refused it. Exclusion is\nrecorded rather than silent so a missing route is always explained.",properties:{reason:{$ref:"#/$defs/WorkProposalReasonV1",description:"The first limit the route failed, in the declared exclusion order."},route_id:{description:"The refused route's identity.",type:"string"}},required:["route_id","reason"],type:"object"},WorkRoutePlanV1:{additionalProperties:!1,description:"The explained route plan for one decision. Recommends; never dispatches.",properties:{coverage:{$ref:"#/$defs/WorkOrdinalBandV1",description:"Fraction-free ordinal coverage of the cohort evidence over the ranked set."},deterministic_baseline:{description:"The declared deterministic baseline, selected when evidence cannot support a\nstronger claim. Always names a route that survived exclusion, or None when none did.",type:["string","null"]},exclusions:{description:"Every refused route with its reason, in supplied order.",items:{$ref:"#/$defs/WorkRouteExclusionV1"},type:"array"},human_override_applied:{description:"True only when a recorded human override named a route that survived\nexclusion. An excluded or unknown override leaves ranking untouched.",type:"boolean"},ranked:{description:"Surviving routes in total, deterministic order, rank ascending from 1.",items:{$ref:"#/$defs/WorkRankedRouteV1"},type:"array"},uncertainty:{$ref:"#/$defs/WorkOrdinalBandV1",description:"Widens on sparse / stale / incomparable evidence."}},required:["ranked","exclusions","coverage","uncertainty","human_override_applied"],type:"object"},WorkScoreKindV1:$G,WorkShapeAssessmentV1:$B,WorkSizingV1:$K,WorkSubtaskSketchV1:{additionalProperties:!1,description:"One level only (Q3). Read-only sketch; accepting it stays a separate version-checked command.",properties:{ordinal:{description:"Position in the proposal, ascending from 0. Stable across replays of the\nsame input.",format:"uint32",minimum:0,type:"integer"},shape:{$ref:"#/$defs/WorkTaskShapeKindV1",description:"Kind the sketch would carry if it were accepted as its own task."},summary:{description:"What the sketch covers, phrased from the declared counts alone.",type:"string"}},required:["ordinal","summary","shape"],type:"object"},WorkTaskShapeKindV1:{description:"Kind of work the snapshot facts describe. Derived only from facts already in\nthe input; `Unclassified` when those facts do not distinguish a kind.",enum:["investigation","change","synthesis","unclassified"],type:"string"},WorkTaskShapeV1:{additionalProperties:!1,description:"The derived shape of the task: what kind of work it is and how large the\ndeclared dependency and evidence counts make it.",properties:{band:{$ref:"#/$defs/WorkOrdinalBandV1",description:"Magnitude band derived from the declared dependency and evidence counts."},kind:{$ref:"#/$defs/WorkTaskShapeKindV1",description:"Kind derived from the gate booleans and counts. No new discovery."}},required:["kind","band"],type:"object"}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"A canonical product proposal and the exact verified graph that licensed it.\n\n`proposal` can be moved directly into a `DecideWorkProposalRequestV1`;\ncallers use `verified_graph_version` to construct that mutation's CAS pin.",properties:{calibration:{$ref:"#/$defs/WorkCalibrationEvidenceV1"},decision:{$ref:"#/$defs/WorkProposalDecisionV1"},proposal:{$ref:"#/$defs/WorkProposalV1"},verified_graph_version:{$ref:"#/$defs/VerifiedWorkGraphVersionV1"}},required:["proposal","verified_graph_version","decision","calibration"],title:"GeneratedWorkProposal",type:"object"},{$defs:{WorkAttemptListCursorV1:bg},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"One authority-scoped artifact hydration request, paged like the attempt\nlist and pinned to the same verified topology generation.",properties:{cursor:{anyOf:[{$ref:"#/$defs/WorkAttemptListCursorV1"},{type:"null"}],default:null},page_size:{format:"uint32",minimum:0,type:"integer"}},required:["page_size"],title:"WorkArtifactHydrationRequestV1",type:"object"},{$defs:{AttemptId:m5,ManifestDigest:gj,ObservationSourceIdentityV1:g3,ProviderId:_w,RunId:_8,SessionId:vv,TaskId:v1,UtcMicros:bs,WorkArtifactId:bu,WorkArtifactRefV1:bm,WorkAttemptArtifactsV1:{additionalProperties:!1,description:"The artifacts and evidence one attempt declared.",properties:{artifacts:{description:"Every artifact reference the attempt declared, in its canonical\nstored order. References carry digest and byte length; bytes are\nnever part of this read.",items:{$ref:"#/$defs/WorkArtifactRefV1"},type:"array"},evidence:{$ref:"#/$defs/WorkAttemptEvidenceStateV1"},identity:{$ref:"#/$defs/WorkAttemptIdentityV1"}},required:["identity","artifacts","evidence"],type:"object"},WorkAttemptEvidenceRecordV1:bf,WorkAttemptEvidenceStateV1:{description:"Whether an attempt's terminal evidence has been sealed. An attempt that\nhas not reported an outcome yet is a typed state, not a missing record.",oneOf:[{additionalProperties:!1,description:"The attempt has not sealed terminal evidence yet.",properties:{state:{const:"pending",type:"string"}},required:["state"],type:"object"},{additionalProperties:!1,description:"The sealed terminal evidence record, exactly as it was written.",properties:{record:{$ref:"#/$defs/WorkAttemptEvidenceRecordV1"},state:{const:"sealed",type:"string"}},required:["state","record"],type:"object"}]},WorkAttemptIdentityV1:bh,WorkAttemptListCoverageV1:by,WorkAttemptListCursorV1:bg,WorkAttemptProviderOutcomeV1:bb,WorkAttemptStreamChannelV1:bk,WorkAttemptStreamSummaryV1:bw,WorkAttemptTopologyBindingV1:bV,WorkProviderAvailabilityV1:$V,WorkProviderBackendV1:$P,WorkProviderFallbackRecordV1:$R,WorkProviderRouteId:$I,WorkProviderRouteV1:$x},$schema:"https://json-schema.org/draft/2020-12/schema",description:"One authority-scoped artifact hydration read. Absence of any Work in\nscope is a typed state, distinct from an authorized-but-empty page.",oneOf:[{additionalProperties:!1,description:"No Work exists in this authority scope, so there is no attempt set to\nhydrate. Concealed scopes never reach this state: they are refused as\nnot-found-or-not-authorized before any read.",properties:{state:{const:"absent",type:"string"}},required:["state"],type:"object"},{additionalProperties:!1,description:"One page of attempt artifact sets under the verified topology\nsnapshot.",properties:{attempts:{items:{$ref:"#/$defs/WorkAttemptArtifactsV1"},type:"array"},coverage:{$ref:"#/$defs/WorkAttemptListCoverageV1"},state:{const:"hydrated",type:"string"},topology:{$ref:"#/$defs/WorkAttemptTopologyBindingV1"}},required:["state","topology","attempts","coverage"],type:"object"}],title:"WorkArtifactHydrationV1"},{$defs:{AttemptId:m5,AutomaticWorktreeGcV1:fr,BranchCollisionPolicyV1:fh,BranchNameComponentV1:fy,BranchNameSeparatorV1:fg,BranchNamingPolicyV1:f_,BranchTopologyKindV1:fV,BranchTopologyPolicyV1:fP,CanonicalGitRefNameV1:fC,CanonicalGitRefPrefix:fT,CapabilityId:fO,CommitId:fX,ConfigurationRevisionId:f8,ConfigurationSnapshotId:f7,CredentialReferenceId:hN,CrossMergeModeV1:hz,CrossMergePolicyV1:hD,GitHubStackedPullRequestPolicyV1:yH,HistoryRewritePolicyV1:y7,LocatorDigest:gk,ManifestDigest:gj,ProjectId:_m,ProposalId:__,ProtectedRefDispositionV1:_v,ProtectedRefRuleV1:_b,ProtectedRefSelectorV1:_$,ProviderId:_w,RefId:_T,RepositoryId:_z,RepositoryPlacementScopeV1:_D,RequiredCheckExpectationV1:_F,RequiredCheckV1:_L,ReviewRequirementV1:_0,ReviewTopologyKindV1:_2,ReviewTopologyPolicyV1:_4,RunId:_8,SensitiveFilesystemLocatorV1:vf,TaskId:v1,TopologyConcurrencyPolicyV1:be,TopologyEscalationPolicyV1:bt,TopologyGatePolicyV1:br,TopologyNotificationLevelV1:bi,UtcMicros:bs,WorkApprovalPolicy:bp,WorkArtifactId:bu,WorkArtifactRefV1:bm,WorkAttemptIdentityV1:bh,WorkAttemptListCoverageV1:by,WorkAttemptListCursorV1:bg,WorkAttemptProgressV1:b_,WorkAttemptProjectionBindingV1:bv,WorkAttemptStateV1:bS,WorkAttemptTopologyBindingV1:bV,WorkAttemptV1:bP,WorkCancellationAcknowledgementV1:bR,WorkCancellationEscalationV1:bq,WorkCancellationRequestId:bI,WorkCancellationRequestV1:bx,WorkCancellationStateV1:bj,WorkEffectStateV1:bA,WorkEgressPolicy:bM,WorkExecutableReference:bL,WorkExecutionEnvelopeV1:bU,WorkExecutionLimits:bH,WorkExecutionSnapshot:bG,WorkFallbackTopology:bJ,WorkFenceEpochV1:bZ,WorkFilesystemPolicy:bQ,WorkLeaseFenceV1:b8,WorkLeaseId:b7,WorkProviderBackendV1:$P,WorkProviderProtocol:$q,WorkProviderRouteId:$I,WorkProviderRouteV1:$x,WorkRecoveryStateV1:$j,WorkRestartReasonV1:$O,WorkSandboxPolicy:$H,WorkTerminalEvidenceV1:$0,WorkTopologyPolicyV1:$4,WorkflowOperationRef:$5,WorktreeCleanlinessRequirementV1:Si,WorktreeId:So,WorktreePlacementModeV1:Ss,WorktreeRetentionPolicyV1:Sd,WorktreeRootPolicyV1:Sc},$schema:"https://json-schema.org/draft/2020-12/schema",description:"One authority-scoped attempt-list read. Absence of any Work in scope is a\ntyped state, distinct from an authorized-but-empty page.",oneOf:[{additionalProperties:!1,description:"No Work exists in this authority scope, so there is no attempt set to\npage. Concealed scopes never reach this state: they are refused as\nnot-found-or-not-authorized before any read.",properties:{state:{const:"absent",type:"string"}},required:["state"],type:"object"},{additionalProperties:!1,description:"One page of durable attempts under the verified topology snapshot.",properties:{attempts:{items:{$ref:"#/$defs/WorkAttemptV1"},type:"array"},coverage:{$ref:"#/$defs/WorkAttemptListCoverageV1"},state:{const:"listed",type:"string"},topology:{$ref:"#/$defs/WorkAttemptTopologyBindingV1"}},required:["state","topology","attempts","coverage"],type:"object"}],title:"WorkAttemptListV1"},{$defs:{AcceptWorkTaskRequestV1:{additionalProperties:!1,properties:{evidence_by_criterion:{additionalProperties:{type:"string"},type:"object"},mutation:{$ref:"#/$defs/WorkProductMutationIdentityV1"},selection:{$ref:"#/$defs/WorkProductSelectionScopeV1"},task_id:{$ref:"#/$defs/TaskId"}},required:["selection","task_id","evidence_by_criterion","mutation"],type:"object"},ActorId:mU,AddWorkTaskRequestV1:{additionalProperties:!1,properties:{item:{$ref:"#/$defs/WorkItemV1"},mutation:{$ref:"#/$defs/WorkProductMutationIdentityV1"},selection:{$ref:"#/$defs/WorkProductSelectionScopeV1"}},required:["selection","item","mutation"],type:"object"},AdmitWorkExecutionRequestV1:{additionalProperties:!1,properties:{based_on_version:{format:"uint64",minimum:0,type:"integer"},mutation:{$ref:"#/$defs/WorkProductMutationIdentityV1"},selection:{$ref:"#/$defs/WorkProductSelectionScopeV1"},task_id:{$ref:"#/$defs/TaskId"}},required:["selection","task_id","based_on_version","mutation"],type:"object"},ApplyWorkRelationReplanRequestV1:{additionalProperties:!1,properties:{mutation:{$ref:"#/$defs/WorkProductMutationIdentityV1"},proposal_id:{$ref:"#/$defs/ProposalId"},selection:{$ref:"#/$defs/WorkProductSelectionScopeV1"}},required:["selection","proposal_id","mutation"],type:"object"},AttemptId:m5,CatalogGenerationId:fE,ConfigurationRevisionId:f8,CreateWorkProductRequestV1:{additionalProperties:!1,properties:{initial_graph:{$ref:"#/$defs/WorkProductGraphV1"},mutation:{$ref:"#/$defs/WorkProductMutationIdentityV1"},selection:{$ref:"#/$defs/WorkProductSelectionScopeV1"}},required:["selection","initial_graph","mutation"],type:"object"},CreateWorkTaskRequestV1:{additionalProperties:!1,properties:{initiative:{$ref:"#/$defs/WorkInitiativeV1"},item:{$ref:"#/$defs/WorkItemV1"},milestone:{$ref:"#/$defs/WorkMilestoneV1"},mutation:{$ref:"#/$defs/WorkProductMutationIdentityV1"},plan:{$ref:"#/$defs/WorkPlanV1"},selection:{$ref:"#/$defs/WorkProductSelectionScopeV1"}},required:["selection","initiative","plan","milestone","item","mutation"],type:"object"},DecideWorkProposalRequestV1:{additionalProperties:!1,properties:{disposition:{$ref:"#/$defs/WorkProposalDispositionV1"},mutation:{$ref:"#/$defs/WorkProductMutationIdentityV1"},proposal:{$ref:"#/$defs/WorkProposalV1"},selection:{$ref:"#/$defs/WorkProductSelectionScopeV1"}},required:["selection","proposal","disposition","mutation"],type:"object"},DecideWorkRelationReplanRequestV1:{additionalProperties:!1,properties:{disposition:{$ref:"#/$defs/WorkProposalDispositionV1"},mutation:{$ref:"#/$defs/WorkProductMutationIdentityV1"},proposal:{$ref:"#/$defs/WorkRelationReplanProposalV1"},selection:{$ref:"#/$defs/WorkProductSelectionScopeV1"}},required:["selection","proposal","disposition","mutation"],type:"object"},LinkAcceptedWorkAttemptRequestV1:{additionalProperties:!1,properties:{based_on_version:{format:"uint64",minimum:0,type:"integer"},identity:{$ref:"#/$defs/WorkAttemptIdentityV1"},mutation:{$ref:"#/$defs/WorkProductMutationIdentityV1"},selection:{$ref:"#/$defs/WorkProductSelectionScopeV1"},task_id:{$ref:"#/$defs/TaskId"}},required:["selection","task_id","based_on_version","identity","mutation"],type:"object"},ManifestDigest:gj,ProjectId:_m,ProposalId:__,ProviderId:_w,RecordWorkHandoffRequestV1:{additionalProperties:!1,properties:{handoff:{$ref:"#/$defs/WorkHandoffV1"},mutation:{$ref:"#/$defs/WorkProductMutationIdentityV1"},selection:{$ref:"#/$defs/WorkProductSelectionScopeV1"}},required:["selection","handoff","mutation"],type:"object"},RepositoryId:_z,RetrievalAnchorId:_J,RunId:_8,SourceStoreId:vL,TaskEvidenceLinkV1:vX,TaskId:v1,UtcMicros:bs,VerifiedWorkGraphVersionV1:bc,WorkAcceptanceCriterionV1:bl,WorkAttemptIdentityV1:bh,WorkCommandId:bC,WorkHandoffV1:b2,WorkHierarchyV1:b4,WorkInitiativeV1:b6,WorkItemInputV1:b3,WorkItemV1:b9,WorkMilestoneV1:$e,WorkPlanV1:$d,WorkProductAuthorizedRelationScopeV1:$c,WorkProductEventEvidenceV1:$l,WorkProductExpectedAuthorityV1:$m,WorkProductGraphV1:$f,WorkProductMutationIdentityV1:$h,WorkProductRevisionPinsV1:$v,WorkProductSelectionScopeV1:$b,WorkProposalDecisionV1:$$,WorkProposalDispositionV1:$S,WorkProposalV1:$k,WorkProposedChildV1:$w,WorkProviderRouteId:$I,WorkProviderRouteV1:$x,WorkRelationReplanDecisionV1:$C,WorkRelationReplanProposalV1:$T,WorkRouteDecisionV1:$N,WorkScoreKindV1:$G,WorkShapeAssessmentV1:$B,WorkSizingV1:$K},$schema:"https://json-schema.org/draft/2020-12/schema",description:"Closed public mutation surface for the Work-product graph authority.",oneOf:[{properties:{mutation:{const:"create",type:"string"},request:{$ref:"#/$defs/CreateWorkProductRequestV1"}},required:["mutation","request"],type:"object"},{properties:{mutation:{const:"add_task",type:"string"},request:{$ref:"#/$defs/AddWorkTaskRequestV1"}},required:["mutation","request"],type:"object"},{properties:{mutation:{const:"create_task",type:"string"},request:{$ref:"#/$defs/CreateWorkTaskRequestV1"}},required:["mutation","request"],type:"object"},{properties:{mutation:{const:"decide_proposal",type:"string"},request:{$ref:"#/$defs/DecideWorkProposalRequestV1"}},required:["mutation","request"],type:"object"},{properties:{mutation:{const:"decide_relation_replan",type:"string"},request:{$ref:"#/$defs/DecideWorkRelationReplanRequestV1"}},required:["mutation","request"],type:"object"},{properties:{mutation:{const:"apply_relation_replan",type:"string"},request:{$ref:"#/$defs/ApplyWorkRelationReplanRequestV1"}},required:["mutation","request"],type:"object"},{properties:{mutation:{const:"accept_task",type:"string"},request:{$ref:"#/$defs/AcceptWorkTaskRequestV1"}},required:["mutation","request"],type:"object"},{properties:{mutation:{const:"admit_execution",type:"string"},request:{$ref:"#/$defs/AdmitWorkExecutionRequestV1"}},required:["mutation","request"],type:"object"},{properties:{mutation:{const:"link_accepted_attempt",type:"string"},request:{$ref:"#/$defs/LinkAcceptedWorkAttemptRequestV1"}},required:["mutation","request"],type:"object"},{properties:{mutation:{const:"record_handoff",type:"string"},request:{$ref:"#/$defs/RecordWorkHandoffRequestV1"}},required:["mutation","request"],type:"object"}],title:"WorkProductMutationRequestV1",type:"object"},{$defs:{RunId:_8,TaskId:v1,UtcMicros:bs,WorkRunControlReasonV1:$F},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{expected_authority_version:{default:null,description:'The authority version the caller read. Absent means "no control row was\npublished yet"; a mismatch is a conflict, never an overwrite.',format:"uint64",minimum:0,type:["integer","null"]},occurred_at:{$ref:"#/$defs/UtcMicros"},reason:{$ref:"#/$defs/WorkRunControlReasonV1"},run_id:{$ref:"#/$defs/RunId"},task_id:{$ref:"#/$defs/TaskId"}},required:["task_id","run_id","reason","occurred_at"],title:"PauseWorkRunCommand",type:"object"},{$defs:{AttemptId:m5,RunId:_8,TaskId:v1,UtcMicros:bs,WorkRunControlAuthorityV1:$D,WorkRunControlReasonV1:$F,WorkRunControlStateV1:$L,WorkRunDeadlineCheckpointV1:$U},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"One run's durable control aggregate.",properties:{authority:{$ref:"#/$defs/WorkRunControlAuthorityV1"},deadline:{$ref:"#/$defs/WorkRunDeadlineCheckpointV1"},fenced_attempts:{description:'The exact attempts that were live when the current state published.\nEmpty means "none were live", never "we did not look".',items:{$ref:"#/$defs/AttemptId"},type:"array"},reason:{anyOf:[{$ref:"#/$defs/WorkRunControlReasonV1"},{type:"null"}]},run_id:{$ref:"#/$defs/RunId"},state:{$ref:"#/$defs/WorkRunControlStateV1"},task_id:{$ref:"#/$defs/TaskId"},transitioned_at:{$ref:"#/$defs/UtcMicros"}},required:["task_id","run_id","state","authority","deadline","transitioned_at","fenced_attempts"],title:"WorkRunControlV1",type:"object"},{$defs:{RunId:_8,TaskId:v1,UtcMicros:bs,WorkPlacementKindV1:$o,WorkPlacementTargetV1:$a},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{occurred_at:{$ref:"#/$defs/UtcMicros"},run_id:{$ref:"#/$defs/RunId"},target:{$ref:"#/$defs/WorkPlacementTargetV1"},task_id:{$ref:"#/$defs/TaskId"}},required:["task_id","run_id","target","occurred_at"],title:"WorkPlacementPreflightRequestV1",type:"object"},{$defs:{RunId:_8,TaskId:v1,UtcMicros:bs,WorkPlacementBlockerV1:$r,WorkPlacementIdentityV1:$i,WorkPlacementKindV1:$o,WorkPlacementObservationV1:{additionalProperties:!1,description:'What was actually observed at the target, in counts rather than prose.\n\nCounts are measurements: a zero is "we looked and found none", and\n`readable: false` is the separate state for "we could not look". Collapsing\nthem would let an unreadable target read as a clean one.',properties:{active_holder:{description:"Whether another admitted placement already holds this target.",type:"boolean"},dirty_tracked_paths:{description:"Tracked paths that differ from the index or HEAD.",format:"uint32",minimum:0,type:"integer"},network_required:{description:"Whether the declared network-free placement would require network.",type:"boolean"},observed_at:{$ref:"#/$defs/UtcMicros"},readable:{description:"Whether the target could be read at all.",type:"boolean"},unique_commits:{description:'Commits in the target reachable from nowhere else.\n\n`None` means reachability was not measured, and it blocks removal\nexactly as a positive count does: an unmeasured target is "unknown"\nand is retained rather than assumed worthless. Only removal consults\nthis; admission does not.',format:"uint32",minimum:0,type:["integer","null"]},untracked_paths:{description:"Untracked paths present in the target.",format:"uint32",minimum:0,type:"integer"}},required:["dirty_tracked_paths","untracked_paths","readable","active_holder","network_required","observed_at"],title:"WorkPlacementObservationV1",type:"object"},WorkPlacementTargetV1:$a},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"One placement preflight reading: what was asked for, what was seen, and\nexactly what blocks it.",properties:{blockers:{items:{$ref:"#/$defs/WorkPlacementBlockerV1"},type:"array",uniqueItems:!0},identity:{$ref:"#/$defs/WorkPlacementIdentityV1"},observation:{$ref:"#/$defs/WorkPlacementObservationV1"},target:{$ref:"#/$defs/WorkPlacementTargetV1"}},required:["identity","target","observation","blockers"],title:"WorkPlacementPreflightV1",type:"object"},{$defs:{RunId:_8,TaskId:v1},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{run_id:{$ref:"#/$defs/RunId"},task_id:{$ref:"#/$defs/TaskId"}},required:["task_id","run_id"],title:"WorkPlacementStatusRequestV1",type:"object"},{$defs:{RunId:_8,TaskId:v1,UtcMicros:bs,WorkPlacementBlockerV1:$r,WorkPlacementIdentityV1:$i,WorkPlacementKindV1:$o,WorkPlacementStateV1:$n,WorkPlacementTargetV1:$a,WorkPlacementV1:$s},$schema:"https://json-schema.org/draft/2020-12/schema",description:"One placement reading. Absence is a state, not an empty placement.",oneOf:[{additionalProperties:!1,description:"No placement was ever admitted for this run.",properties:{state:{const:"absent",type:"string"}},required:["state"],type:"object"},{additionalProperties:!1,description:"The durable placement relation.",properties:{placement:{$ref:"#/$defs/WorkPlacementV1"},state:{const:"placed",type:"string"}},required:["state","placement"],type:"object"}],title:"WorkPlacementReadingV1"},{$defs:{AttemptId:m5,CoverageStateV1:hM,DuplicateEffectOutcomeV1:hJ,DuplicateEffortKindV1:hZ,QuantityEvidenceClassV1:_R,RunId:_8,TaskId:v1,WorkAttemptIdentityV1:bh,WorkDuplicateAdjudicationQuantitiesV1:bE},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Operator judgment before the owning Work authority binds exact current\ngenerations, relation revision, command identity, and observation time.",properties:{first_attempt:{$ref:"#/$defs/WorkAttemptIdentityV1"},quantities:{$ref:"#/$defs/WorkDuplicateAdjudicationQuantitiesV1"},reason:{type:"string"},second_attempt:{$ref:"#/$defs/WorkAttemptIdentityV1"},verdict:{$ref:"#/$defs/DuplicateEffortKindV1"}},required:["first_attempt","second_attempt","verdict","quantities","reason"],title:"PrepareWorkDuplicateAdjudicationRequestV1",type:"object"},{$defs:{ActorId:mU,AttemptId:m5,ManifestDigest:gj,ProjectId:_m,ProposalId:__,ProviderId:_w,RepositoryId:_z,RetrievalAnchorId:_J,RunId:_8,SourceStoreId:vL,TaskId:v1,UtcMicros:bs,WorkAcceptanceCriterionV1:bl,WorkAttemptIdentityV1:bh,WorkHandoffV1:b2,WorkHierarchyV1:b4,WorkInitiativeV1:b6,WorkItemInputV1:b3,WorkItemV1:b9,WorkMilestoneV1:$e,WorkPlanV1:$d,WorkProductAuthorizedRelationScopeV1:$c,WorkProductChangeDraftV1:{description:"Operator-selected graph change before the owning Work authority binds the\ncurrent verified head and revision authorities.",oneOf:[{properties:{change:{const:"add_task",type:"string"},item:{$ref:"#/$defs/WorkItemV1"}},required:["change","item"],type:"object"},{properties:{change:{const:"create_task",type:"string"},initiative:{$ref:"#/$defs/WorkInitiativeV1"},item:{$ref:"#/$defs/WorkItemV1"},milestone:{$ref:"#/$defs/WorkMilestoneV1"},plan:{$ref:"#/$defs/WorkPlanV1"}},required:["change","initiative","plan","milestone","item"],type:"object"},{properties:{change:{const:"decide_proposal",type:"string"},disposition:{$ref:"#/$defs/WorkProposalDispositionV1"},proposal:{$ref:"#/$defs/WorkProposalV1"}},required:["change","proposal","disposition"],type:"object"},{properties:{change:{const:"decide_relation_replan",type:"string"},disposition:{$ref:"#/$defs/WorkProposalDispositionV1"},proposal:{$ref:"#/$defs/WorkRelationReplanProposalV1"}},required:["change","proposal","disposition"],type:"object"},{properties:{change:{const:"apply_relation_replan",type:"string"},proposal_id:{$ref:"#/$defs/ProposalId"}},required:["change","proposal_id"],type:"object"},{properties:{change:{const:"accept_task",type:"string"},evidence_by_criterion:{additionalProperties:{type:"string"},type:"object"},task_id:{$ref:"#/$defs/TaskId"}},required:["change","task_id","evidence_by_criterion"],type:"object"},{properties:{change:{const:"admit_execution",type:"string"},task_id:{$ref:"#/$defs/TaskId"}},required:["change","task_id"],type:"object"},{properties:{change:{const:"link_accepted_attempt",type:"string"},identity:{$ref:"#/$defs/WorkAttemptIdentityV1"},task_id:{$ref:"#/$defs/TaskId"}},required:["change","task_id","identity"],type:"object"},{properties:{change:{const:"record_handoff",type:"string"},handoff:{$ref:"#/$defs/WorkHandoffV1"}},required:["change","handoff"],type:"object"}]},WorkProductEventEvidenceV1:$l,WorkProductSelectionScopeV1:$b,WorkProposalDispositionV1:$S,WorkProposalV1:$k,WorkProposedChildV1:$w,WorkProviderRouteId:$I,WorkProviderRouteV1:$x,WorkRelationReplanProposalV1:$T,WorkRouteDecisionV1:$N,WorkScoreKindV1:$G,WorkShapeAssessmentV1:$B,WorkSizingV1:$K},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Read-only preparation input. Authority identities, clocks, and revision\npins are deliberately absent because the backend owns them.",properties:{causation_event_id:{type:["string","null"]},change:{$ref:"#/$defs/WorkProductChangeDraftV1"},evidence:{items:{$ref:"#/$defs/WorkProductEventEvidenceV1"},type:"array"},selection:{$ref:"#/$defs/WorkProductSelectionScopeV1"}},required:["selection","change","evidence"],title:"PrepareWorkProductMutationRequestV1",type:"object"},{$defs:{RunId:_8,TaskId:v1,UtcMicros:bs},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{expected_authority_version:{format:"uint64",minimum:0,type:"integer"},occurred_at:{$ref:"#/$defs/UtcMicros"},run_id:{$ref:"#/$defs/RunId"},task_id:{$ref:"#/$defs/TaskId"}},required:["task_id","run_id","expected_authority_version","occurred_at"],title:"ReleaseWorkPlacementCommand",type:"object"},{$defs:{UtcMicros:bs},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{occurred_at:{$ref:"#/$defs/UtcMicros"}},required:["occurred_at"],title:"ResumeWorkAttemptsCommand",type:"object"},{$defs:{AttemptId:m5,AutomaticWorktreeGcV1:fr,BranchCollisionPolicyV1:fh,BranchNameComponentV1:fy,BranchNameSeparatorV1:fg,BranchNamingPolicyV1:f_,BranchTopologyKindV1:fV,BranchTopologyPolicyV1:fP,CanonicalGitRefNameV1:fC,CanonicalGitRefPrefix:fT,CapabilityId:fO,CommitId:fX,ConfigurationRevisionId:f8,ConfigurationSnapshotId:f7,CredentialReferenceId:hN,CrossMergeModeV1:hz,CrossMergePolicyV1:hD,GitHubStackedPullRequestPolicyV1:yH,HistoryRewritePolicyV1:y7,LocatorDigest:gk,ManifestDigest:gj,ProjectId:_m,ProposalId:__,ProtectedRefDispositionV1:_v,ProtectedRefRuleV1:_b,ProtectedRefSelectorV1:_$,ProviderId:_w,RefId:_T,RepositoryId:_z,RepositoryPlacementScopeV1:_D,RequiredCheckExpectationV1:_F,RequiredCheckV1:_L,ReviewRequirementV1:_0,ReviewTopologyKindV1:_2,ReviewTopologyPolicyV1:_4,RunId:_8,SensitiveFilesystemLocatorV1:vf,TaskId:v1,TopologyConcurrencyPolicyV1:be,TopologyEscalationPolicyV1:bt,TopologyGatePolicyV1:br,TopologyNotificationLevelV1:bi,UtcMicros:bs,WorkApprovalPolicy:bp,WorkArtifactId:bu,WorkArtifactRefV1:bm,WorkAttemptIdentityV1:bh,WorkAttemptProgressV1:b_,WorkAttemptProjectionBindingV1:bv,WorkAttemptStateV1:bS,WorkAttemptV1:bP,WorkCancellationAcknowledgementV1:bR,WorkCancellationEscalationV1:bq,WorkCancellationRequestId:bI,WorkCancellationRequestV1:bx,WorkCancellationStateV1:bj,WorkEffectStateV1:bA,WorkEgressPolicy:bM,WorkExecutableReference:bL,WorkExecutionEnvelopeV1:bU,WorkExecutionLimits:bH,WorkExecutionSnapshot:bG,WorkFallbackTopology:bJ,WorkFenceEpochV1:bZ,WorkFilesystemPolicy:bQ,WorkLeaseFenceV1:b8,WorkLeaseId:b7,WorkProviderBackendV1:$P,WorkProviderProtocol:$q,WorkProviderRouteId:$I,WorkProviderRouteV1:$x,WorkRecoveryStateV1:$j,WorkRestartReasonV1:$O,WorkSandboxPolicy:$H,WorkTerminalEvidenceV1:$0,WorkTopologyPolicyV1:$4,WorkflowOperationRef:$5,WorktreeCleanlinessRequirementV1:Si,WorktreeId:So,WorktreePlacementModeV1:Ss,WorktreeRetentionPolicyV1:Sd,WorktreeRootPolicyV1:Sc},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"What restart recovery did to each open attempt.\n\nThis report never claims that a provider resumed. An attempt in\n`recovery_required` remains fenced under its original identity. This report\ndoes not authorize another launch; an explicit `retry_attempt` must verify\nthe exact recovery fence and effect safety before it can atomically admit a\nnew identity.",properties:{cancelled:{description:"Attempts whose in-flight cancellation was completed during recovery.",items:{$ref:"#/$defs/WorkAttemptV1"},type:"array"},recovery_required:{description:"Attempts fenced onto a new epoch and awaiting an explicit recovery\ndecision.",items:{$ref:"#/$defs/WorkAttemptV1"},type:"array"}},required:["recovery_required","cancelled"],title:"WorkAttemptRecoveryReportV1",type:"object"},{$defs:{RunId:_8,TaskId:v1,UtcMicros:bs,WorkRunControlReasonV1:$F},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{expected_authority_version:{format:"uint64",minimum:0,type:"integer"},occurred_at:{$ref:"#/$defs/UtcMicros"},reason:{$ref:"#/$defs/WorkRunControlReasonV1"},run_id:{$ref:"#/$defs/RunId"},task_id:{$ref:"#/$defs/TaskId"}},required:["task_id","run_id","reason","expected_authority_version","occurred_at"],title:"ResumeWorkRunCommand",type:"object"},{$defs:{AttemptId:m5,ManifestDigest:gj,ObservationSourceIdentityV1:g3,ProjectId:_m,ProviderId:_w,RepositoryId:_z,RunId:_8,SessionId:vv,TaskId:v1,TemporalModeV1:v6,UtcMicros:bs,VerifiedWorkGraphVersionV1:bc,WorkAttemptIdentityV1:bh,WorkEvidenceContinuationV1:bN,WorkEvidenceExpansionSelectorV1:{oneOf:[{additionalProperties:!1,properties:{kind:{const:"anchor",type:"string"},link_id:{type:"string"}},required:["kind","link_id"],type:"object"},{additionalProperties:!1,properties:{attempt:{$ref:"#/$defs/WorkAttemptIdentityV1"},kind:{const:"task_session",type:"string"}},required:["kind","attempt"],type:"object"}]},WorkProductAuthorizedRelationScopeV1:$c,WorkProductSelectionScopeV1:$b,WorkTaskSessionContinuationV1:$1},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"One TaskId-rooted read. The exact Work graph identity remains mandatory on\ncontinuation and expansion requests, so neither an anchor nor a cursor is\nauthority by possession.",properties:{continuation:{anyOf:[{$ref:"#/$defs/WorkEvidenceContinuationV1"},{type:"null"}],default:null},expansion:{anyOf:[{$ref:"#/$defs/WorkEvidenceExpansionSelectorV1"},{type:"null"}],default:null},observed_at:{$ref:"#/$defs/UtcMicros"},page_size:{format:"uint32",minimum:0,type:"integer"},selection:{$ref:"#/$defs/WorkProductSelectionScopeV1"},task_id:{$ref:"#/$defs/TaskId"},temporal:{$ref:"#/$defs/TemporalModeV1"},verified_version:{$ref:"#/$defs/VerifiedWorkGraphVersionV1"}},required:["selection","task_id","verified_version","temporal","page_size","observed_at"],title:"WorkEvidenceRetrieveRequestV1",type:"object"},{$defs:{ActorId:mU,AttemptId:m5,ManifestDigest:gj,ObservationSourceIdentityV1:g3,ProposalId:__,ProviderId:_w,RetrievalAnchorId:_J,RunId:_8,SessionId:vv,SessionRetrievalBudgetAccountingV1:{additionalProperties:!1,description:"The ceiling and count behind a budget refusal.\n\n`stage` names which budget refused; this is what tells an oversized request\napart from a read whose cost was mis-sized for it. The ceiling value also\ndistinguishes the resources inside one stage: a record read that stopped at\n1024 hit the item count, one that stopped at 16 MiB hit the byte total, so\nthe kernel's resource spelling stays in the kernel instead of becoming a\nsecond wire vocabulary to keep in step.",properties:{limit:{format:"uint64",minimum:0,type:"integer"},observed:{$ref:"#/$defs/SessionRetrievalBudgetObservationV1"}},required:["limit","observed"],type:"object"},SessionRetrievalBudgetObservationV1:{description:"What a refusing budget boundary had counted.\n\nBoth variants are exact. A bounded read never counts the rows it declined to\nread, so an exhausted read reports what it consumed and that storage held\nmore, never a total it would have to run the refused scan to learn.",oneOf:[{additionalProperties:!1,description:"The request asked for more units than the admitted maximum.",properties:{observation:{const:"requested",type:"string"},units:{format:"uint64",minimum:0,type:"integer"}},required:["observation","units"],type:"object"},{additionalProperties:!1,description:"The read consumed its whole budget and storage still held more.",properties:{observation:{const:"consumed_with_more_available",type:"string"},units:{format:"uint64",minimum:0,type:"integer"}},required:["observation","units"],type:"object"}]},SessionRetrievalBudgetStageV1:vV,SessionRetrievalStructuralRefusalV1:{oneOf:[{additionalProperties:!1,properties:{kind:{type:"string"},maximum:{format:"uint",minimum:0,type:"integer"},observed:{format:"uint",minimum:0,type:"integer"},refusal:{const:"cursor_manifest_limit_exceeded",type:"string"}},required:["refusal","kind","observed","maximum"],type:"object"},{additionalProperties:!1,properties:{accounting:{anyOf:[{$ref:"#/$defs/SessionRetrievalBudgetAccountingV1"},{type:"null"}],description:"Present when the refusing boundary keeps a counter. A request-shape\ncheck has none and reports `None` rather than inventing numbers."},refusal:{const:"budget_exhausted",type:"string"},stage:{$ref:"#/$defs/SessionRetrievalBudgetStageV1"}},required:["refusal","stage"],type:"object"}]},TaskEvidenceLinkV1:vX,TaskId:v1,UtcMicros:bs,VerifiedWorkGraphVersionV1:bc,WorkAcceptanceCriterionV1:bl,WorkAnchorHydrationV1:{additionalProperties:!1,properties:{anchor_id:{$ref:"#/$defs/RetrievalAnchorId"},content:{items:{type:"string"},type:"array"},continuation:{type:["string","null"]},coverage:{$ref:"#/$defs/WorkEvidenceCoverageStateV1"},exact_anchors:{items:{$ref:"#/$defs/RetrievalAnchorId"},type:"array"},freshness:{$ref:"#/$defs/WorkEvidenceFreshnessV1"},redacted:{type:"boolean"}},required:["anchor_id","exact_anchors","content","coverage","freshness","redacted"],type:"object"},WorkArtifactId:bu,WorkArtifactRefV1:bm,WorkAttemptEvidenceRecordV1:bf,WorkAttemptIdentityV1:bh,WorkAttemptProviderOutcomeV1:bb,WorkAttemptReceiptV1:b$,WorkAttemptStreamChannelV1:bk,WorkAttemptStreamSummaryV1:bw,WorkEvidenceContinuationV1:bN,WorkEvidenceCoverageStateV1:{enum:["complete","partial","unknown"],type:"string"},WorkEvidenceCoverageV1:{additionalProperties:!1,properties:{hydrated:{format:"uint32",minimum:0,type:"integer"},omitted:{format:"uint32",minimum:0,type:"integer"},selected:{format:"uint32",minimum:0,type:"integer"},state:{$ref:"#/$defs/WorkEvidenceCoverageStateV1"}},required:["state","selected","hydrated","omitted"],type:"object"},WorkEvidenceFreshnessV1:{enum:["current","stale","unknown"],type:"string"},WorkEvidenceOmissionReasonV1:{oneOf:[{enum:["limit_reached","pending","not_found_or_not_authorized","unavailable","reset_required","stale","cancelled","timed_out","redacted"],type:"string"},{additionalProperties:!1,properties:{structural_refusal:{$ref:"#/$defs/SessionRetrievalStructuralRefusalV1"}},required:["structural_refusal"],type:"object"}]},WorkEvidenceOmissionV1:{additionalProperties:!1,properties:{reason:{$ref:"#/$defs/WorkEvidenceOmissionReasonV1"},relation:{type:"string"}},required:["relation","reason"],type:"object"},WorkEvidenceSourceV1:{oneOf:[{additionalProperties:!1,properties:{kind:{const:"attempt_receipt",type:"string"},receipt:{$ref:"#/$defs/WorkAttemptReceiptV1"}},required:["kind","receipt"],type:"object"},{additionalProperties:!1,properties:{attempt:{$ref:"#/$defs/WorkAttemptIdentityV1"},evidence:{$ref:"#/$defs/WorkTaskSessionEvidenceV1"},kind:{const:"task_session",type:"string"}},required:["kind","attempt","evidence"],type:"object"},{additionalProperties:!1,properties:{hydration:{$ref:"#/$defs/WorkAnchorHydrationV1"},kind:{const:"anchor",type:"string"},link:{$ref:"#/$defs/TaskEvidenceLinkV1"}},required:["kind","link","hydration"],type:"object"}]},WorkHandoffV1:b2,WorkHierarchyV1:b4,WorkItemInputV1:b3,WorkItemV1:b9,WorkProductRelationV1:$_,WorkProposalDecisionV1:$$,WorkProposalDispositionV1:$S,WorkProposalV1:$k,WorkProposedChildV1:$w,WorkProviderAvailabilityV1:$V,WorkProviderBackendV1:$P,WorkProviderFallbackRecordV1:$R,WorkProviderRouteId:$I,WorkProviderRouteV1:$x,WorkRelationReplanDecisionV1:$C,WorkRelationReplanProposalV1:$T,WorkRouteDecisionV1:$N,WorkScoreKindV1:$G,WorkShapeAssessmentV1:$B,WorkSizingV1:$K,WorkTaskSessionContinuationV1:$1,WorkTaskSessionCoverageV1:{additionalProperties:!1,properties:{hidden:{format:"uint64",minimum:0,type:"integer"},redacted:{format:"uint64",minimum:0,type:"integer"},unknown:{format:"uint64",minimum:0,type:"integer"},visible:{format:"uint64",minimum:0,type:"integer"}},required:["visible","hidden","unknown","redacted"],type:"object"},WorkTaskSessionEvidenceV1:{additionalProperties:!1,properties:{attempt:{$ref:"#/$defs/WorkAttemptIdentityV1"},continuation:{anyOf:[{$ref:"#/$defs/WorkTaskSessionContinuationV1"},{type:"null"}]},coverage:{$ref:"#/$defs/WorkEvidenceCoverageStateV1"},coverage_counts:{$ref:"#/$defs/WorkTaskSessionCoverageV1"},freshness:{$ref:"#/$defs/WorkEvidenceFreshnessV1"},hydrated:{items:{$ref:"#/$defs/WorkTaskSessionHydrationV1"},type:"array"},participant_epoch:{$ref:"#/$defs/ManifestDigest"},ranked_anchors:{items:{$ref:"#/$defs/WorkTaskSessionRankedAnchorV1"},type:"array"},redacted:{type:"boolean"},source:{$ref:"#/$defs/ObservationSourceIdentityV1"},task_id:{$ref:"#/$defs/TaskId"},verified_version:{$ref:"#/$defs/VerifiedWorkGraphVersionV1"}},required:["task_id","verified_version","attempt","source","participant_epoch","ranked_anchors","hydrated","coverage","coverage_counts","freshness","redacted"],type:"object"},WorkTaskSessionHydrationStateV1:{enum:["available","retained_but_unavailable","redacted","deleted","retention_expired","unauthorized","locked","unverifiable"],type:"string"},WorkTaskSessionHydrationV1:{additionalProperties:!1,properties:{anchor_id:{$ref:"#/$defs/RetrievalAnchorId"},content:{items:{format:"uint8",maximum:255,minimum:0,type:"integer"},type:["array","null"]},rank:{format:"uint32",minimum:0,type:"integer"},state:{$ref:"#/$defs/WorkTaskSessionHydrationStateV1"}},required:["rank","anchor_id","state"],type:"object"},WorkTaskSessionRankContributionV1:{additionalProperties:!1,properties:{calibrated_feature_micros:{format:"uint32",minimum:0,type:"integer"},calibration_profile:{type:"string"},ordinal_rank:{format:"uint32",minimum:0,type:"integer"},raw_score_micros:{format:"int64",type:"integer"},retriever:{type:"string"},retriever_revision:{type:"string"},score_domain:{type:"string"},source_occurrence:{type:"string"},weight_micros:{format:"uint32",minimum:0,type:"integer"},weighted_contribution_micros:{format:"uint64",minimum:0,type:"integer"}},required:["retriever","retriever_revision","source_occurrence","ordinal_rank","raw_score_micros","score_domain","calibration_profile","calibrated_feature_micros","weight_micros","weighted_contribution_micros"],type:"object"},WorkTaskSessionRankedAnchorV1:{additionalProperties:!1,properties:{anchor_id:{$ref:"#/$defs/RetrievalAnchorId"},contributions:{items:{$ref:"#/$defs/WorkTaskSessionRankContributionV1"},type:"array"},final_ordinal:{format:"uint32",minimum:0,type:"integer"},utility_micros:{format:"uint64",minimum:0,type:"integer"}},required:["anchor_id","final_ordinal","utility_micros","contributions"],type:"object"}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{continuations:{items:{$ref:"#/$defs/WorkEvidenceContinuationV1"},type:"array"},coverage:{$ref:"#/$defs/WorkEvidenceCoverageV1"},freshness:{$ref:"#/$defs/WorkEvidenceFreshnessV1"},item:{$ref:"#/$defs/WorkItemV1"},omissions:{items:{$ref:"#/$defs/WorkEvidenceOmissionV1"},type:"array"},proposal_decisions:{items:{$ref:"#/$defs/WorkProposalDecisionV1"},type:"array"},redacted:{type:"boolean"},relation_replan_decisions:{items:{$ref:"#/$defs/WorkRelationReplanDecisionV1"},type:"array"},relations:{items:{$ref:"#/$defs/WorkProductRelationV1"},type:"array"},sources:{items:{$ref:"#/$defs/WorkEvidenceSourceV1"},type:"array"},task_id:{$ref:"#/$defs/TaskId"},verified_version:{$ref:"#/$defs/VerifiedWorkGraphVersionV1"}},required:["task_id","verified_version","item","relations","proposal_decisions","relation_replan_decisions","sources","coverage","omissions","freshness","redacted","continuations"],title:"WorkEvidenceRetrievalV1",type:"object"},{$defs:{AttemptId:m5,RunId:_8,TaskId:v1,WorkAttemptIdentityV1:bh,WorkCommandId:bC,WorkRetryCauseV1:$E,WorkRetryFailureSelectorV1:$A,WorkRetrySourceV1:$W},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{command_id:{$ref:"#/$defs/WorkCommandId"},failure:{$ref:"#/$defs/WorkRetryFailureSelectorV1"},new_attempt_id:{$ref:"#/$defs/AttemptId"},original_attempt:{$ref:"#/$defs/WorkAttemptIdentityV1"}},required:["original_attempt","new_attempt_id","failure","command_id"],title:"RetryWorkAttemptCommandV1",type:"object"},{$defs:{AttemptId:m5,AutomaticWorktreeGcV1:fr,BranchCollisionPolicyV1:fh,BranchNameComponentV1:fy,BranchNameSeparatorV1:fg,BranchNamingPolicyV1:f_,BranchTopologyKindV1:fV,BranchTopologyPolicyV1:fP,CanonicalGitRefNameV1:fC,CanonicalGitRefPrefix:fT,CapabilityId:fO,CommitId:fX,ConfigurationRevisionId:f8,ConfigurationSnapshotId:f7,CredentialReferenceId:hN,CrossMergeModeV1:hz,CrossMergePolicyV1:hD,GitHubStackedPullRequestPolicyV1:yH,HistoryRewritePolicyV1:y7,LocatorDigest:gk,ManifestDigest:gj,ProjectId:_m,ProposalId:__,ProtectedRefDispositionV1:_v,ProtectedRefRuleV1:_b,ProtectedRefSelectorV1:_$,ProviderId:_w,RefId:_T,RepositoryId:_z,RepositoryPlacementScopeV1:_D,RequiredCheckExpectationV1:_F,RequiredCheckV1:_L,RetryWorkAttemptCommandV1:{additionalProperties:!1,properties:{command_id:{$ref:"#/$defs/WorkCommandId"},failure:{$ref:"#/$defs/WorkRetryFailureSelectorV1"},new_attempt_id:{$ref:"#/$defs/AttemptId"},original_attempt:{$ref:"#/$defs/WorkAttemptIdentityV1"}},required:["original_attempt","new_attempt_id","failure","command_id"],title:"RetryWorkAttemptCommandV1",type:"object"},ReviewRequirementV1:_0,ReviewTopologyKindV1:_2,ReviewTopologyPolicyV1:_4,RunId:_8,SensitiveFilesystemLocatorV1:vf,TaskId:v1,TopologyConcurrencyPolicyV1:be,TopologyEscalationPolicyV1:bt,TopologyGatePolicyV1:br,TopologyNotificationLevelV1:bi,UtcMicros:bs,VerifiedWorkRetryFailureV1:{additionalProperties:!1,description:"Failure fact returned by a canonical evidence authority.",properties:{evidence_digest:{$ref:"#/$defs/ManifestDigest"},observed_at:{$ref:"#/$defs/UtcMicros"},selector:{$ref:"#/$defs/WorkRetryFailureSelectorV1"}},required:["selector","evidence_digest","observed_at"],type:"object"},WorkApprovalPolicy:bp,WorkArtifactId:bu,WorkArtifactRefV1:bm,WorkAttemptIdentityV1:bh,WorkAttemptProgressV1:b_,WorkAttemptProjectionBindingV1:bv,WorkAttemptStateV1:bS,WorkAttemptV1:bP,WorkCancellationAcknowledgementV1:bR,WorkCancellationEscalationV1:bq,WorkCancellationRequestId:bI,WorkCancellationRequestV1:bx,WorkCancellationStateV1:bj,WorkCommandId:bC,WorkEffectStateV1:bA,WorkEgressPolicy:bM,WorkExecutableReference:bL,WorkExecutionEnvelopeV1:bU,WorkExecutionLimits:bH,WorkExecutionSnapshot:bG,WorkFallbackTopology:bJ,WorkFenceEpochV1:bZ,WorkFilesystemPolicy:bQ,WorkLeaseFenceV1:b8,WorkLeaseId:b7,WorkProviderBackendV1:$P,WorkProviderProtocol:$q,WorkProviderRouteId:$I,WorkProviderRouteV1:$x,WorkRecoveryStateV1:$j,WorkRestartReasonV1:$O,WorkRetryCauseV1:$E,WorkRetryFailureSelectorV1:$A,WorkRetryReceiptV1:{additionalProperties:!1,properties:{canonical_input_digest:{$ref:"#/$defs/ManifestDigest"},command:{$ref:"#/$defs/RetryWorkAttemptCommandV1"},failure:{$ref:"#/$defs/VerifiedWorkRetryFailureV1"},new_attempt:{$ref:"#/$defs/WorkAttemptIdentityV1"},owner_receipt_digest:{$ref:"#/$defs/ManifestDigest"},restarted_at:{$ref:"#/$defs/UtcMicros",description:"Daemon-owned admission time at which the new attempt was created."},retry_required_at:{$ref:"#/$defs/UtcMicros",description:"Exact source-owned time at which the failure made a retry necessary."}},required:["command","failure","new_attempt","retry_required_at","restarted_at","canonical_input_digest","owner_receipt_digest"],type:"object"},WorkRetrySourceV1:$W,WorkSandboxPolicy:$H,WorkTerminalEvidenceV1:$0,WorkTopologyPolicyV1:$4,WorkflowOperationRef:$5,WorktreeCleanlinessRequirementV1:Si,WorktreeId:So,WorktreePlacementModeV1:Ss,WorktreeRetentionPolicyV1:Sd,WorktreeRootPolicyV1:Sc},$schema:"https://json-schema.org/draft/2020-12/schema",oneOf:[{additionalProperties:!1,properties:{attempt:{$ref:"#/$defs/WorkAttemptV1"},outcome:{const:"created",type:"string"},receipt:{$ref:"#/$defs/WorkRetryReceiptV1"}},required:["outcome","receipt","attempt"],type:"object"},{additionalProperties:!1,properties:{attempt:{$ref:"#/$defs/WorkAttemptV1"},outcome:{const:"replayed",type:"string"},receipt:{$ref:"#/$defs/WorkRetryReceiptV1"}},required:["outcome","receipt","attempt"],type:"object"}],title:"WorkRetryAttemptOutcomeV1"},{$defs:{CatalogGenerationId:fE,ConfigurationRevisionId:f8,ManifestDigest:gj,ProjectId:_m,ProposalId:__,ProviderId:_w,RepositoryId:_z,RetrievalAnchorId:_J,ReviewWorkProposalDispositionV1:{description:"The only non-accepting dispositions the proposal-review operation can\ncommit. The broader decision request remains available to the graph\nmutation operation, which owns all decision forms.",enum:["rejected","superseded"],type:"string"},SourceStoreId:vL,TaskId:v1,UtcMicros:bs,VerifiedWorkGraphVersionV1:bc,WorkCommandId:bC,WorkProductAuthorizedRelationScopeV1:$c,WorkProductEventEvidenceV1:$l,WorkProductExpectedAuthorityV1:$m,WorkProductMutationIdentityV1:$h,WorkProductRevisionPinsV1:$v,WorkProductSelectionScopeV1:$b,WorkProposalV1:$k,WorkProposedChildV1:$w,WorkProviderRouteId:$I,WorkProviderRouteV1:$x,WorkRouteDecisionV1:$N,WorkScoreKindV1:$G,WorkShapeAssessmentV1:$B,WorkSizingV1:$K},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{disposition:{$ref:"#/$defs/ReviewWorkProposalDispositionV1"},mutation:{$ref:"#/$defs/WorkProductMutationIdentityV1"},proposal:{$ref:"#/$defs/WorkProposalV1"},selection:{$ref:"#/$defs/WorkProductSelectionScopeV1"}},required:["selection","proposal","disposition","mutation"],title:"ReviewWorkProposalRequestV1",type:"object"},{$defs:{RunId:_8,TaskId:v1},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{run_id:{$ref:"#/$defs/RunId"},task_id:{$ref:"#/$defs/TaskId"}},required:["task_id","run_id"],title:"WorkRunControlRequestV1",type:"object"},{$defs:{AttemptId:m5,RunId:_8,TaskId:v1,UtcMicros:bs,WorkRunControlAuthorityV1:$D,WorkRunControlReasonV1:$F,WorkRunControlStateV1:$L,WorkRunControlV1:{additionalProperties:!1,description:"One run's durable control aggregate.",properties:{authority:{$ref:"#/$defs/WorkRunControlAuthorityV1"},deadline:{$ref:"#/$defs/WorkRunDeadlineCheckpointV1"},fenced_attempts:{description:'The exact attempts that were live when the current state published.\nEmpty means "none were live", never "we did not look".',items:{$ref:"#/$defs/AttemptId"},type:"array"},reason:{anyOf:[{$ref:"#/$defs/WorkRunControlReasonV1"},{type:"null"}]},run_id:{$ref:"#/$defs/RunId"},state:{$ref:"#/$defs/WorkRunControlStateV1"},task_id:{$ref:"#/$defs/TaskId"},transitioned_at:{$ref:"#/$defs/UtcMicros"}},required:["task_id","run_id","state","authority","deadline","transitioned_at","fenced_attempts"],title:"WorkRunControlV1",type:"object"},WorkRunDeadlineCheckpointV1:$U},$schema:"https://json-schema.org/draft/2020-12/schema",description:"One run's control reading.\n\n`Uncontrolled` is a distinct answer from `Controlled`: it says the run is\nadmitted and running under its admitted deadline with no control transition\never published, which is not the same as a control row that happens to say\n`Running`.",oneOf:[{additionalProperties:!1,description:"The run holds durable attempts but no control transition has ever been\npublished for it.",properties:{deadline:{$ref:"#/$defs/UtcMicros",description:"The admitted deadline the run is running against."},live_attempts:{description:"Attempts that have not reached a terminal state.",items:{$ref:"#/$defs/AttemptId"},type:"array"},state:{const:"uncontrolled",type:"string"},total_attempts:{format:"uint32",minimum:0,type:"integer"}},required:["state","deadline","live_attempts","total_attempts"],type:"object"},{additionalProperties:!1,description:"The published control aggregate, plus the live frontier as of this\nread (which may differ from the frontier the transition fenced).",properties:{control:{$ref:"#/$defs/WorkRunControlV1"},live_attempts:{items:{$ref:"#/$defs/AttemptId"},type:"array"},state:{const:"controlled",type:"string"},total_attempts:{format:"uint32",minimum:0,type:"integer"}},required:["state","control","live_attempts","total_attempts"],type:"object"}],title:"WorkRunControlReadingV1"},{$defs:{AttemptId:m5,AutomaticWorktreeGcV1:fr,BranchCollisionPolicyV1:fh,BranchNameComponentV1:fy,BranchNameSeparatorV1:fg,BranchNamingPolicyV1:f_,BranchTopologyKindV1:fV,BranchTopologyPolicyV1:fP,CanonicalGitRefNameV1:fC,CanonicalGitRefPrefix:fT,CapabilityId:fO,CommitId:fX,ConfigurationRevisionId:f8,ConfigurationSnapshotId:f7,CredentialReferenceId:hN,CrossMergeModeV1:hz,CrossMergePolicyV1:hD,GitHubStackedPullRequestPolicyV1:yH,HistoryRewritePolicyV1:y7,LocatorDigest:gk,ManifestDigest:gj,ProtectedRefDispositionV1:_v,ProtectedRefRuleV1:_b,ProtectedRefSelectorV1:_$,ProviderId:_w,RefId:_T,RepositoryId:_z,RepositoryPlacementScopeV1:_D,RequiredCheckExpectationV1:_F,RequiredCheckV1:_L,ReviewRequirementV1:_0,ReviewTopologyKindV1:_2,ReviewTopologyPolicyV1:_4,RunId:_8,SensitiveFilesystemLocatorV1:vf,TaskId:v1,TopologyConcurrencyPolicyV1:be,TopologyEscalationPolicyV1:bt,TopologyGatePolicyV1:br,TopologyNotificationLevelV1:bi,UtcMicros:bs,WorkApprovalPolicy:bp,WorkEffectStateV1:bA,WorkEgressPolicy:bM,WorkExecutableReference:bL,WorkExecutionLimits:bH,WorkExecutionSnapshot:bG,WorkFallbackTopology:bJ,WorkFilesystemPolicy:bQ,WorkProviderBackendV1:$P,WorkProviderProtocol:$q,WorkProviderRouteId:$I,WorkProviderRouteV1:$x,WorkSandboxPolicy:$H,WorkTopologyPolicyV1:$4,WorkflowOperationRef:$5,WorktreeCleanlinessRequirementV1:Si,WorktreePlacementModeV1:Ss,WorktreeRetentionPolicyV1:Sd,WorktreeRootPolicyV1:Sc},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Starts one admitted provider attempt. Every field is a typed fact; there\nis no argv, environment entry, executable path, or shell string here. The\nprojection binding and admission facts are re-read from the canonical Work\nauthority, never trusted from the caller.",properties:{attempt_id:{$ref:"#/$defs/AttemptId"},commit:{$ref:"#/$defs/CommitId"},effect_state:{$ref:"#/$defs/WorkEffectStateV1"},execution_snapshot:{$ref:"#/$defs/WorkExecutionSnapshot"},instructions:{type:"string"},occurred_at:{$ref:"#/$defs/UtcMicros"},operation:{$ref:"#/$defs/WorkflowOperationRef"},reference:{anyOf:[{$ref:"#/$defs/RefId"},{type:"null"}]},run_id:{$ref:"#/$defs/RunId"},task_id:{$ref:"#/$defs/TaskId"},worktree_root:{type:"string"}},required:["task_id","run_id","attempt_id","operation","execution_snapshot","worktree_root","commit","instructions","effect_state","occurred_at"],title:"StartWorkAttemptCommand",type:"object"},{$defs:{AttemptId:m5,AutomaticWorktreeGcV1:fr,BranchCollisionPolicyV1:fh,BranchNameComponentV1:fy,BranchNameSeparatorV1:fg,BranchNamingPolicyV1:f_,BranchTopologyKindV1:fV,BranchTopologyPolicyV1:fP,CanonicalGitRefNameV1:fC,CanonicalGitRefPrefix:fT,CapabilityId:fO,CommitId:fX,ConfigurationRevisionId:f8,ConfigurationSnapshotId:f7,CredentialReferenceId:hN,CrossMergeModeV1:hz,CrossMergePolicyV1:hD,GitHubStackedPullRequestPolicyV1:yH,HistoryRewritePolicyV1:y7,LocatorDigest:gk,ManifestDigest:gj,ProtectedRefDispositionV1:_v,ProtectedRefRuleV1:_b,ProtectedRefSelectorV1:_$,ProviderId:_w,RefId:_T,RepositoryId:_z,RepositoryPlacementScopeV1:_D,RequiredCheckExpectationV1:_F,RequiredCheckV1:_L,ReviewRequirementV1:_0,ReviewTopologyKindV1:_2,ReviewTopologyPolicyV1:_4,RunId:_8,SensitiveFilesystemLocatorV1:vf,StartWorkAttemptCommand:{additionalProperties:!1,description:"Starts one admitted provider attempt. Every field is a typed fact; there\nis no argv, environment entry, executable path, or shell string here. The\nprojection binding and admission facts are re-read from the canonical Work\nauthority, never trusted from the caller.",properties:{attempt_id:{$ref:"#/$defs/AttemptId"},commit:{$ref:"#/$defs/CommitId"},effect_state:{$ref:"#/$defs/WorkEffectStateV1"},execution_snapshot:{$ref:"#/$defs/WorkExecutionSnapshot"},instructions:{type:"string"},occurred_at:{$ref:"#/$defs/UtcMicros"},operation:{$ref:"#/$defs/WorkflowOperationRef"},reference:{anyOf:[{$ref:"#/$defs/RefId"},{type:"null"}]},run_id:{$ref:"#/$defs/RunId"},task_id:{$ref:"#/$defs/TaskId"},worktree_root:{type:"string"}},required:["task_id","run_id","attempt_id","operation","execution_snapshot","worktree_root","commit","instructions","effect_state","occurred_at"],type:"object"},TaskId:v1,TopologyConcurrencyPolicyV1:be,TopologyEscalationPolicyV1:bt,TopologyGatePolicyV1:br,TopologyNotificationLevelV1:bi,UtcMicros:bs,WorkApprovalPolicy:bp,WorkAttemptIdentityV1:bh,WorkEffectStateV1:bA,WorkEgressPolicy:bM,WorkExecutableReference:bL,WorkExecutionLimits:bH,WorkExecutionSnapshot:bG,WorkFallbackTopology:bJ,WorkFilesystemPolicy:bQ,WorkProviderBackendV1:$P,WorkProviderProtocol:$q,WorkProviderRouteId:$I,WorkProviderRouteV1:$x,WorkSandboxPolicy:$H,WorkTopologyPolicyV1:$4,WorkflowOperationRef:$5,WorkflowOutputName:$8,WorktreeCleanlinessRequirementV1:Si,WorktreePlacementModeV1:Ss,WorktreeRetentionPolicyV1:Sd,WorktreeRootPolicyV1:Sc},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Admits one synthesis attempt over an ordered set of sibling sources.",properties:{output_name:{$ref:"#/$defs/WorkflowOutputName",description:"The fan-out output the synthesis belongs to, carried into the draft\nthe workflow completion path verifies."},sources:{description:"The ordered sibling sources the synthesis consumes.",items:{$ref:"#/$defs/WorkAttemptIdentityV1"},type:"array"},start:{$ref:"#/$defs/StartWorkAttemptCommand",description:"The synthesis attempt's own admission facts; it is started through\nthe same admission machinery as any other attempt."}},required:["start","output_name","sources"],title:"AdmitWorkSynthesisCommand",type:"object"},{$defs:{AttemptId:m5,AutomaticWorktreeGcV1:fr,BranchCollisionPolicyV1:fh,BranchNameComponentV1:fy,BranchNameSeparatorV1:fg,BranchNamingPolicyV1:f_,BranchTopologyKindV1:fV,BranchTopologyPolicyV1:fP,CanonicalGitRefNameV1:fC,CanonicalGitRefPrefix:fT,CapabilityId:fO,CommitId:fX,ConfigurationRevisionId:f8,ConfigurationSnapshotId:f7,CredentialReferenceId:hN,CrossMergeModeV1:hz,CrossMergePolicyV1:hD,GitHubStackedPullRequestPolicyV1:yH,HistoryRewritePolicyV1:y7,LocatorDigest:gk,ManifestDigest:gj,ProjectId:_m,ProposalId:__,ProtectedRefDispositionV1:_v,ProtectedRefRuleV1:_b,ProtectedRefSelectorV1:_$,ProviderId:_w,RefId:_T,RepositoryId:_z,RepositoryPlacementScopeV1:_D,RequiredCheckExpectationV1:_F,RequiredCheckV1:_L,ReviewRequirementV1:_0,ReviewTopologyKindV1:_2,ReviewTopologyPolicyV1:_4,RunId:_8,SensitiveFilesystemLocatorV1:vf,TaskId:v1,TopologyConcurrencyPolicyV1:be,TopologyEscalationPolicyV1:bt,TopologyGatePolicyV1:br,TopologyNotificationLevelV1:bi,UtcMicros:bs,WorkApprovalPolicy:bp,WorkArtifactId:bu,WorkArtifactRefV1:bm,WorkAttemptIdentityV1:bh,WorkAttemptProgressV1:b_,WorkAttemptProjectionBindingV1:bv,WorkAttemptStateV1:bS,WorkAttemptV1:bP,WorkCancellationAcknowledgementV1:bR,WorkCancellationEscalationV1:bq,WorkCancellationRequestId:bI,WorkCancellationRequestV1:bx,WorkCancellationStateV1:bj,WorkEffectStateV1:bA,WorkEgressPolicy:bM,WorkExecutableReference:bL,WorkExecutionEnvelopeV1:bU,WorkExecutionLimits:bH,WorkExecutionSnapshot:bG,WorkFallbackTopology:bJ,WorkFenceEpochV1:bZ,WorkFilesystemPolicy:bQ,WorkLeaseFenceV1:b8,WorkLeaseId:b7,WorkProviderBackendV1:$P,WorkProviderProtocol:$q,WorkProviderRouteId:$I,WorkProviderRouteV1:$x,WorkRecoveryStateV1:$j,WorkRestartReasonV1:$O,WorkSandboxPolicy:$H,WorkSynthesisEvidenceGroupV1:$J,WorkSynthesisRefusalV1:$Z,WorkSynthesisSourceEnvelopeV1:$Q,WorkSynthesisSourceOutcomeV1:$X,WorkSynthesisSourceSetV1:$Y,WorkTerminalEvidenceV1:$0,WorkTopologyPolicyV1:$4,WorkflowOperationRef:$5,WorkflowOutputName:$8,WorkflowSynthesisDraft:Sr,WorktreeCleanlinessRequirementV1:Si,WorktreeId:So,WorktreePlacementModeV1:Ss,WorktreeRetentionPolicyV1:Sd,WorktreeRootPolicyV1:Sc},$schema:"https://json-schema.org/draft/2020-12/schema",description:"The typed outcome of a synthesis request: an admitted attempt, or the\nsealed unsynthesized set when synthesis could not truthfully begin.",oneOf:[{additionalProperties:!1,description:"The admitted synthesis attempt and everything it is accountable to.",properties:{attempt:{$ref:"#/$defs/WorkAttemptV1",description:"The leased (or idempotently replayed) synthesis attempt."},draft:{$ref:"#/$defs/WorkflowSynthesisDraft",description:"The citation obligation, complete by construction: the draft cites\nevery citable source digest and is verified downstream by\n[`crate::workflow_synthesis::verify_workflow_synthesis_draft`]."},groups:{description:"Disagreement structure over the succeeded sources.",items:{$ref:"#/$defs/WorkSynthesisEvidenceGroupV1"},type:"array"},source_set:{$ref:"#/$defs/WorkSynthesisSourceSetV1",description:"The sealed source envelopes the attempt was admitted against."},synthesis:{const:"admitted",type:"string"},uncited:{description:"Sources preserved without citations: failures, unknowns, and\nartifact-less successes, in the caller's requested order.",items:{$ref:"#/$defs/WorkAttemptIdentityV1"},type:"array"}},required:["synthesis","attempt","source_set","groups","draft","uncited"],type:"object"},{properties:{refusal:{$ref:"#/$defs/WorkSynthesisRefusalV1"},sources:{$ref:"#/$defs/WorkSynthesisSourceSetV1"},synthesis:{const:"unsynthesized",type:"string"}},required:["synthesis","sources","refusal"],type:"object"}],title:"WorkSynthesisAttemptV1"},{$defs:{WorkAttemptListCursorV1:bg},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"One page-bounded topology view read. The cursor vocabulary is the attempt\nlist's: a cursor minted under a superseded topology generation is a typed\nstaleness refusal, never a silently different page.",properties:{cursor:{anyOf:[{$ref:"#/$defs/WorkAttemptListCursorV1"},{type:"null"}],default:null},page_size:{format:"uint32",minimum:0,type:"integer"}},required:["page_size"],title:"WorkTopologyViewRequestV1",type:"object"},{$defs:{BranchTopologyKindV1:fV,BranchTopologyPolicyV1:fP,CanonicalGitRefNameV1:fC,CanonicalGitRefPrefix:fT,CapabilityId:fO,CrossMergeModeV1:hz,CrossMergePolicyV1:hD,GitHubStackedPullRequestPolicyV1:yH,ProtectedRefDispositionV1:_v,ProtectedRefRuleV1:_b,ProtectedRefSelectorV1:_$,RequiredCheckExpectationV1:_F,RequiredCheckV1:_L,ReviewRequirementV1:_0,ReviewTopologyKindV1:_2,ReviewTopologyPolicyV1:_4,RunId:_8,TaskId:v1,TopologyGatePolicyV1:br,UtcMicros:bs,WorkAttemptListCoverageV1:by,WorkAttemptListCursorV1:bg,WorkAttemptTopologyBindingV1:bV,WorkPlacementBlockerV1:$r,WorkPlacementIdentityV1:$i,WorkPlacementKindV1:$o,WorkPlacementReadingV1:{description:"One placement reading. Absence is a state, not an empty placement.",oneOf:[{additionalProperties:!1,description:"No placement was ever admitted for this run.",properties:{state:{const:"absent",type:"string"}},required:["state"],type:"object"},{additionalProperties:!1,description:"The durable placement relation.",properties:{placement:{$ref:"#/$defs/WorkPlacementV1"},state:{const:"placed",type:"string"}},required:["state","placement"],type:"object"}],title:"WorkPlacementReadingV1"},WorkPlacementStateV1:$n,WorkPlacementTargetV1:$a,WorkPlacementV1:$s,WorkTopologyExecutionPlacementV1:{additionalProperties:!1,description:"The execution-placement dimension: the policy's placement mode plus one\nlane per distinct `(task, run)` pair in page order.",properties:{lanes:{items:{$ref:"#/$defs/WorkTopologyPlacementLaneV1"},type:"array"},mode:{$ref:"#/$defs/WorktreePlacementModeV1"}},required:["mode","lanes"],title:"WorkTopologyExecutionPlacementV1",type:"object"},WorkTopologyIntegrationStrategyV1:{additionalProperties:!1,description:"The integration-strategy dimension, read verbatim from the resolved work\ntopology policy the runs in scope are admitted against.",properties:{cross_merge:{$ref:"#/$defs/CrossMergePolicyV1"},gates:{$ref:"#/$defs/TopologyGatePolicyV1"},protected_refs:{items:{$ref:"#/$defs/ProtectedRefRuleV1"},type:"array"}},required:["cross_merge","gates","protected_refs"],title:"WorkTopologyIntegrationStrategyV1",type:"object"},WorkTopologyPlacementLaneV1:{additionalProperties:!1,description:"One execution-placement lane: a distinct `(task, run)` pair from the\nattempt page joined to its durable placement reading. Placement absence is\na state on the lane, not a dropped lane.",properties:{attempt_count:{description:"Attempts this lane carried within the requested page.",format:"uint32",minimum:0,type:"integer"},placement:{$ref:"#/$defs/WorkPlacementReadingV1"},run_id:{$ref:"#/$defs/RunId"},task_id:{$ref:"#/$defs/TaskId"}},required:["task_id","run_id","attempt_count","placement"],title:"WorkTopologyPlacementLaneV1",type:"object"},WorktreeCleanlinessRequirementV1:Si,WorktreePlacementModeV1:Ss},$schema:"https://json-schema.org/draft/2020-12/schema",description:"The application-owned execution-topology view. Absence of any Work in\nscope is a typed state, distinct from an authorized-but-empty page.",oneOf:[{additionalProperties:!1,description:"No Work exists in this authority scope, so there is no topology to\ndraw. Concealed scopes are refused before any read.",properties:{state:{const:"absent",type:"string"}},required:["state"],type:"object"},{additionalProperties:!1,description:"The four dimensions, pinned to one verified topology generation.",properties:{branch_topology:{$ref:"#/$defs/BranchTopologyPolicyV1"},coverage:{$ref:"#/$defs/WorkAttemptListCoverageV1"},execution_placement:{$ref:"#/$defs/WorkTopologyExecutionPlacementV1"},integration_strategy:{$ref:"#/$defs/WorkTopologyIntegrationStrategyV1"},review_topology:{$ref:"#/$defs/ReviewTopologyPolicyV1"},state:{const:"view",type:"string"},topology:{$ref:"#/$defs/WorkAttemptTopologyBindingV1"}},required:["state","topology","coverage","execution_placement","branch_topology","review_topology","integration_strategy"],type:"object"}],title:"ExecutionTopologyViewV1"},{$defs:{ObservabilityHorizonV1:g6},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"One horizon-bounded execution-topology metrics read. The authorized scope\nis taken from the request context, not from the request, so a caller can\nnever widen the population it reads.",properties:{horizon:{$ref:"#/$defs/ObservabilityHorizonV1"},max_events:{description:"Event budget for this read, at most\n[`MAX_EXECUTION_TOPOLOGY_EVENTS_V1`].",format:"uint32",minimum:0,type:"integer"}},required:["horizon","max_events"],title:"ExecutionTopologyMetricsRequestV1",type:"object"},{$defs:{CoverageStateV1:hM,ExecutionBlockedCauseV1:{description:"Cause a work item was blocked for.",enum:["dependency","needs_input","capability","policy","scope","conflict","lease","backpressure","test","ci","review","effect_unknown","other","unknown"],type:"string"},ExecutionConcurrencyPhaseV1:{description:"Concurrency-width phase. `Useful` counts only distinct admitted\nattempts that advanced a committed progress frontier; heartbeats,\nqueued work, child processes, and transport fanout never reach it.",enum:["requested","accepted","admitted","active","useful"],type:"string"},ExecutionConflictKindV1:{description:"Conflict prediction kind. Mechanical and semantic keep separate\ndenominators because their adjudicators are not interchangeable.",enum:["mechanical","semantic","combined"],type:"string"},ExecutionConflictOutcomeV1:{description:"Independently observed conflict outcome. `Censored` and `Unknown`\nnever enter a confusion-matrix denominator.",enum:["conflict","no_conflict","censored","unknown"],type:"string"},ExecutionDeliveryOutcomeV1:{description:"Per-surface delivery outcome. A multi-surface delivery is never a\nduplicate of product work; only `Deduplicated` is.",enum:["delivered","deduplicated","dropped","unknown"],type:"string"},ExecutionDuplicateKindV1:{description:"Adjudicated duplicate-work relation. Similarity, proximity, shared\npaths, and concurrency never produce one of these.",enum:["exact_duplicate","superseded_overlap","repeated_investigation","duplicate_effect","not_duplicate","censored","unknown"],type:"string"},ExecutionDuplicateOutcomeV1:{description:"Whether a duplicate effect was prevented or actually committed. The\ntwo never collapse into one count.",enum:["prevented","committed","unknown","not_applicable"],type:"string"},ExecutionDurationBucketV1:{description:"Fixed duration buckets shared by stale stack age, blocked time, and\nrerun latency. Raw timestamps and exact durations stay authorized\nlocal detail.",enum:["under1m","from1m_to5m","from5m_to15m","from15m_to1h","from1h_to4h","from4h_to24h","from1d_to7d","over7d"],type:"string"},ExecutionFanoutPhaseV1:{description:"Fan-out width phase. `PeakActive` is the sampled active width; the\nfan-out distribution is unweighted so serialized and blocked samples,\nwhich carry no interval, are preserved rather than dropped.",enum:["requested","accepted","admitted","peak_active","useful"],type:"string"},ExecutionGitHubStackCapabilityReadingV1:{additionalProperties:!1,description:"Latest trustworthy GitHub stacked-PR capability observation in the\nhorizon. It is a typed operational state, not a metric or success claim.",properties:{capability:{anyOf:[{$ref:"#/$defs/ExecutionGitHubStackCapabilityV1"},{type:"null"}]},coverage:{$ref:"#/$defs/MetricCoverageV1"},other_forge_fallback_available:{type:["boolean","null"]},standard_git_fallback_available:{type:["boolean","null"]},unavailable:{anyOf:[{$ref:"#/$defs/ExecutionMetricUnavailableV1"},{type:"null"}]}},required:["coverage"],title:"ExecutionGitHubStackCapabilityReadingV1",type:"object"},ExecutionGitHubStackCapabilityV1:{description:"Last bounded GitHub stacked-PR capability state observed in the\nhorizon. This remains orthogonal to GitHub ingress and item lifecycle.",enum:["unavailable","private_preview_disabled","enabled","degraded"],type:"string"},ExecutionIntegrationKindV1:{description:"Integration operation kind. Rebase remains external observation only.",enum:["fast_forward","merge_commit","rebase","cherry_pick","stack_retarget","graph_only","external_observed","unknown"],type:"string"},ExecutionIntegrationOutcomeV1:{description:"Terminal result of an observed native integration.",enum:["succeeded","conflicted","rejected","denied","stale","locked","cancelled","timed_out","failed","partial","effect_unknown","unsupported","unknown"],type:"string"},ExecutionIntervalStateV1:{description:"Whether the owning drift interval is still open or exactly closed.",enum:["open","closed"],type:"string"},ExecutionLeakKindV1:{description:"Independently proved execution-leak class.",enum:["lease_after_terminal","attempt_without_live_owner","effect_unknown_past_deadline","missing_worktree_binding","unbounded_delivery","none","unknown"],type:"string"},ExecutionLeakOutcomeV1:{description:"Recovery state a proved leak reached.",enum:["not_required","pending","recovered","failed","unknown"],type:"string"},ExecutionMetricUnavailableV1:{description:"Why a measurement carries no value. Absence is always one of these typed\nreasons; it is never an empty string, a zero, or a silently dropped row.",oneOf:[{const:"store_unavailable",description:"The observation store could not be read at all for this horizon.",type:"string"},{const:"event_budget_exceeded",description:"The horizon holds more events than one read may draw, so every\ndenominator here would be a partial count presented as a total.",type:"string"},{const:"cell_budget_exceeded",description:"The bounded projection would exceed the Plan 26 result-cell ceiling.\nThe whole read refuses rather than returning a misleading subset.",type:"string"},{const:"no_eligible_evidence",description:"No recorded event in the family supplies this metric's numerator or\ndenominator.",type:"string"},{const:"support_floor_unmet",description:"Eligible cases exist but fall below the metric's support floor.",type:"string"},{const:"coverage_floor_unmet",description:"Observed cases cover less of the eligible population than the metric's\ncoverage floor allows.",type:"string"},{const:"censoring_ceiling_exceeded",description:"More of the eligible population is censored than the metric admits.",type:"string"},{const:"unbounded_interval",description:"The interval this metric integrates over has no proved upper bound, so\nits duration cannot be measured without inventing a terminal.",type:"string"}]},ExecutionQuantityUnitV1:{description:"Quantity unit for duplicate-effort accounting. Each unit is reported\nseparately: wall time, tokens, cost, tests, and effects are never\nsummed into one number.",enum:["wall_micros","tokens","cost_micros","tests","effects"],type:"string"},ExecutionRerunCauseV1:{description:"Typed rerun cause. Repeated logs and transport redelivery are not\nreruns and never carry one of these.",enum:["runtime_retry","runtime_fallback","test_rerun","ci_rerun","recovery","human_requested","unknown"],type:"string"},ExecutionRerunSourceV1:{description:"Which independent system observed the rerun.",enum:["runtime","test","ci"],type:"string"},ExecutionStackDriftKindV1:{description:"Exact reason a stack became stale. The enum is bounded and never\ncarries a branch, ref, worktree, repository, or provider identity.",enum:["head_advanced","base_advanced","merge_base_changed","retargeted","superseded"],type:"string"},ExecutionSurfaceFamilyV1:{description:"Delivery surface family. Addresses, payloads, principals, and\nrecipients are never observed, so the family is the whole label.",enum:["hook","mcp","lsp","dashboard","cli","other"],type:"string"},ExecutionTopologyDimensionV1:{description:"One allowed local grouping dimension. The set is closed by construction:\nevery value is produced by an exhaustive match over a bounded domain class,\nso no person, agent, task, project, repository, worktree, branch, ref,\ncommit, model version, or route can ever appear as a label.",oneOf:[{properties:{dimension:{const:"concurrency_phase",type:"string"},value:{$ref:"#/$defs/ExecutionConcurrencyPhaseV1"}},required:["dimension","value"],type:"object"},{properties:{dimension:{const:"fanout_phase",type:"string"},value:{$ref:"#/$defs/ExecutionFanoutPhaseV1"}},required:["dimension","value"],type:"object"},{properties:{dimension:{const:"width_bucket",type:"string"},value:{$ref:"#/$defs/ExecutionWidthBucketV1"}},required:["dimension","value"],type:"object"},{properties:{dimension:{const:"duration_bucket",type:"string"},value:{$ref:"#/$defs/ExecutionDurationBucketV1"}},required:["dimension","value"],type:"object"},{properties:{dimension:{const:"duplicate_kind",type:"string"},value:{$ref:"#/$defs/ExecutionDuplicateKindV1"}},required:["dimension","value"],type:"object"},{properties:{dimension:{const:"unit",type:"string"},value:{$ref:"#/$defs/ExecutionQuantityUnitV1"}},required:["dimension","value"],type:"object"},{properties:{dimension:{const:"duplicate_outcome",type:"string"},value:{$ref:"#/$defs/ExecutionDuplicateOutcomeV1"}},required:["dimension","value"],type:"object"},{properties:{dimension:{const:"conflict_kind",type:"string"},value:{$ref:"#/$defs/ExecutionConflictKindV1"}},required:["dimension","value"],type:"object"},{properties:{dimension:{const:"conflict_outcome",type:"string"},value:{$ref:"#/$defs/ExecutionConflictOutcomeV1"}},required:["dimension","value"],type:"object"},{properties:{dimension:{const:"integration_kind",type:"string"},value:{$ref:"#/$defs/ExecutionIntegrationKindV1"}},required:["dimension","value"],type:"object"},{properties:{dimension:{const:"integration_outcome",type:"string"},value:{$ref:"#/$defs/ExecutionIntegrationOutcomeV1"}},required:["dimension","value"],type:"object"},{properties:{dimension:{const:"stack_drift_kind",type:"string"},value:{$ref:"#/$defs/ExecutionStackDriftKindV1"}},required:["dimension","value"],type:"object"},{properties:{dimension:{const:"interval_state",type:"string"},value:{$ref:"#/$defs/ExecutionIntervalStateV1"}},required:["dimension","value"],type:"object"},{properties:{dimension:{const:"blocked_cause",type:"string"},value:{$ref:"#/$defs/ExecutionBlockedCauseV1"}},required:["dimension","value"],type:"object"},{properties:{dimension:{const:"rerun_source",type:"string"},value:{$ref:"#/$defs/ExecutionRerunSourceV1"}},required:["dimension","value"],type:"object"},{properties:{dimension:{const:"rerun_cause",type:"string"},value:{$ref:"#/$defs/ExecutionRerunCauseV1"}},required:["dimension","value"],type:"object"},{properties:{dimension:{const:"leak_kind",type:"string"},value:{$ref:"#/$defs/ExecutionLeakKindV1"}},required:["dimension","value"],type:"object"},{properties:{dimension:{const:"leak_outcome",type:"string"},value:{$ref:"#/$defs/ExecutionLeakOutcomeV1"}},required:["dimension","value"],type:"object"},{properties:{dimension:{const:"surface",type:"string"},value:{$ref:"#/$defs/ExecutionSurfaceFamilyV1"}},required:["dimension","value"],type:"object"},{properties:{dimension:{const:"delivery_outcome",type:"string"},value:{$ref:"#/$defs/ExecutionDeliveryOutcomeV1"}},required:["dimension","value"],type:"object"}]},ExecutionTopologyDrillAnchorV1:{additionalProperties:!1,description:"An opaque cursor minted by the registered observation authority. It can be\nresolved only through that same authorized local query boundary and is not\na metric dimension or exportable identity.",properties:{cursor:{type:"string"}},required:["cursor"],title:"ExecutionTopologyDrillAnchorV1",type:"object"},ExecutionTopologyEmissionCoverageV1:{additionalProperties:!1,description:"Envelope-level delivery evidence for this read. `None` means the store did\nnot answer, so no zero may be inferred. `dropped` is the proved lower bound\nfrom the bound producer scope, deduplicated across explicit loss receipts\nand their next-envelope carriers; it is not attributed to a topology\nfamily. Sampling stays a count of sampled topology envelopes and is never\nexpanded into a fabricated population estimate.",properties:{delayed:{format:"uint64",minimum:0,type:["integer","null"]},dropped:{format:"uint64",minimum:0,type:["integer","null"]},emitted:{format:"uint64",minimum:0,type:["integer","null"]},sampled_events:{format:"uint64",minimum:0,type:["integer","null"]}},title:"ExecutionTopologyEmissionCoverageV1",type:"object"},ExecutionTopologyMeasurementV1:{additionalProperties:!1,description:"One descriptor cell: the Plan 26 descriptor name, its grouping dimensions,\nand the landed metric envelope carrying value, denominator, coverage, and\nprovenance.",properties:{dimensions:{description:"Allowed local grouping dimensions, at most\n[`MAX_METRIC_DIMENSIONS_V1`], in a fixed order per descriptor.",items:{$ref:"#/$defs/ExecutionTopologyDimensionV1"},type:"array"},unavailable:{anyOf:[{$ref:"#/$defs/ExecutionMetricUnavailableV1"},{type:"null"}],description:"Typed absence reason. It is `Some` exactly when `value.value` is\n`None`, so a reader can never mistake a refused metric for a zero."},value:{$ref:"#/$defs/MetricValueV1"}},required:["dimensions","value"],title:"ExecutionTopologyMeasurementV1",type:"object"},ExecutionWidthBucketV1:{description:"Fixed width buckets. Raw widths stay authorized local detail; only\nbucket counts leave the projection.",enum:["zero","one","two","from3_to4","from5_to8","from9_to16","from17_to32","from33_to64","over64"],type:"string"},MetricCalibrationV1:gA,MetricCohortV1:gW,MetricCoverageV1:gM,MetricEvidenceClassV1:gN,MetricProvenanceV1:gz,MetricSourceV1:gD,MetricTemporalV1:gF,MetricUncertaintyV1:gL,MetricValueV1:gU,ObservabilityHorizonV1:g6},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"The canonical execution-topology read model. Observatory and Costs render\nthis without local formulas; CLI, MCP, and HTTP return the same bytes.",properties:{authorized_scope_ref:{description:"Local authorization anchor the read was admitted under. It is derived\nfrom the resolved scope, never from a caller-supplied string.",type:"string"},coverage:{$ref:"#/$defs/MetricCoverageV1",description:"Family-level coverage over the event population, independent of any\nsingle descriptor's denominator."},current:{description:"True only when the whole family was read with `Known` coverage. A\nfalse value means at least one descriptor below is a typed absence.",type:"boolean"},drill_anchors:{description:"Bounded registered source cursors for authorized local drill-down.\nPayload anchors, traces, and scope identifiers never enter this list.",items:{$ref:"#/$defs/ExecutionTopologyDrillAnchorV1"},type:"array"},emission_coverage:{$ref:"#/$defs/ExecutionTopologyEmissionCoverageV1"},github_stack_capability:{$ref:"#/$defs/ExecutionGitHubStackCapabilityReadingV1"},horizon:{$ref:"#/$defs/ObservabilityHorizonV1"},measurements:{items:{$ref:"#/$defs/ExecutionTopologyMeasurementV1"},type:"array"},observed_at_micros:{format:"int64",type:"integer"},watermark:{description:"Watermark of the last event this projection consumed. A rebuild at the\nsame watermark yields the same values.",type:"string"}},required:["authorized_scope_ref","horizon","watermark","observed_at_micros","current","coverage","emission_coverage","github_stack_capability","drill_anchors","measurements"],title:"ExecutionTopologyMetricsV1",type:"object"},{$defs:{ProjectId:_m,RepositoryId:_z,UtcMicros:bs,WorkGraphReadModeV1:{oneOf:[{properties:{mode:{const:"current",type:"string"}},required:["mode"],type:"object"},{properties:{mode:{const:"as_of",type:"string"},valid_at:{$ref:"#/$defs/UtcMicros"}},required:["mode","valid_at"],type:"object"},{properties:{from_valid_at:{$ref:"#/$defs/UtcMicros"},mode:{const:"evolution",type:"string"},through_valid_at:{$ref:"#/$defs/UtcMicros"}},required:["mode","from_valid_at","through_valid_at"],type:"object"},{properties:{from_observed_at:{$ref:"#/$defs/UtcMicros"},mode:{const:"forensic",type:"string"},through_observed_at:{$ref:"#/$defs/UtcMicros"}},required:["mode","from_observed_at","through_observed_at"],type:"object"}]},WorkProductAuthorizedRelationScopeV1:$c,WorkProductSelectionScopeV1:$b},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{continuation:{type:["string","null"]},mode:{$ref:"#/$defs/WorkGraphReadModeV1"},observed_at:{$ref:"#/$defs/UtcMicros"},selection:{$ref:"#/$defs/WorkProductSelectionScopeV1"}},required:["selection","mode","observed_at"],title:"WorkGraphReadRequestV1",type:"object"},{$defs:{ActorId:mU,AttemptId:m5,AuthorizedWorkProductScopeV1:{additionalProperties:!1,description:"Owner identity resolved by the registered profile authority. It is never\naccepted from a Work request.",properties:{owner_brain_id:{$ref:"#/$defs/BrainId"},owner_profile_id:{$ref:"#/$defs/UserProfileId"},selection:{$ref:"#/$defs/WorkProductSelectionScopeV1"}},required:["owner_brain_id","owner_profile_id","selection"],type:"object"},BrainId:ff,ManifestDigest:gj,ProjectId:_m,ProjectionGenerationId:_g,ProposalId:__,ProviderId:_w,RepositoryId:_z,RetrievalAnchorId:_J,RunId:_8,TaskEvidenceLinkV1:vX,TaskId:v1,UserProfileId:ba,UtcMicros:bs,VerifiedWorkGraphVersionV1:bc,WorkAcceptanceCriterionV1:bl,WorkAttemptIdentityV1:bh,WorkAttemptStateV1:bS,WorkCausalProjectionV1:{additionalProperties:!1,properties:{candidate_edges:{items:{$ref:"#/$defs/WorkDagEdgeV1"},type:"array"},graph_version:{format:"uint64",minimum:0,type:"integer"}},required:["graph_version","candidate_edges"],type:"object"},WorkCriticalPathProjectionV1:{additionalProperties:!1,properties:{graph_version:{format:"uint64",minimum:0,type:"integer"},task_ids:{items:{$ref:"#/$defs/TaskId"},type:"array"},total_effort:{format:"uint32",minimum:0,type:"integer"}},required:["graph_version","task_ids","total_effort"],type:"object"},WorkDagEdgeV1:{additionalProperties:!1,properties:{dependency:{$ref:"#/$defs/TaskId"},dependent:{$ref:"#/$defs/TaskId"}},required:["dependency","dependent"],type:"object"},WorkDagProjectionV1:{additionalProperties:!1,properties:{gating_edges:{items:{$ref:"#/$defs/WorkDagEdgeV1"},type:"array"},graph_version:{format:"uint64",minimum:0,type:"integer"},task_ids:{items:{$ref:"#/$defs/TaskId"},type:"array"}},required:["graph_version","task_ids","gating_edges"],type:"object"},WorkGraphSelectionCoverageV1:{description:"How much of the owner's journal the read's selection actually covers.\n\nA selection names a slice of the owner's work, not the whole journal: an\nevent records the relation scopes it was admitted under, and a selection\nthat does not name them puts that event *outside* the slice. The events\noutside a selection do not poison the ones inside it, but they must never be\nconcealed either, a caller who is shown the covered slice with no way to\nlearn that more exists is reading a silently incomplete graph.\n\nSo the read answers over the covered slice and says so, in the same\n`Complete`/`Partial` vocabulary [`WorkGraphTimelineCoverageV1`] and\n[`WorkHistoryCoverageV1`](crate::WorkHistoryCoverageV1) already use.\n\nThe covered slice is always a *prefix* of the journal, and that is a\nproperty of folding rather than a simplification. A graph version is folded\nfrom every event up to its own sequence, so the first event a selection does\nnot cover ends the readable slice: every later version, whatever scopes its\nown event named, would have to be folded across that event to exist at all.\n`excluded_events` therefore counts every event from the first uncovered one\nonward.",oneOf:[{description:"The selection covers the owner's whole journal. Nothing was withheld.",properties:{coverage:{const:"complete",type:"string"},covered_events:{format:"uint32",minimum:0,type:"integer"}},required:["coverage","covered_events"],type:"object"},{description:"The selection covers `covered_events` events and `excluded_events`\nevents lie outside it, starting at `first_excluded_sequence`. Every\nentry this read returned was folded from covered events alone.",properties:{coverage:{const:"partial",type:"string"},covered_events:{format:"uint32",minimum:0,type:"integer"},excluded_events:{format:"uint32",minimum:0,type:"integer"},first_excluded_sequence:{format:"uint64",minimum:0,type:"integer"}},required:["coverage","covered_events","excluded_events","first_excluded_sequence"],type:"object"}]},WorkGraphTimelineCoverageV1:{oneOf:[{properties:{coverage:{const:"complete",type:"string"},returned:{format:"uint32",minimum:0,type:"integer"}},required:["coverage","returned"],type:"object"},{properties:{continuation:{type:"string"},coverage:{const:"partial",type:"string"},returned:{format:"uint32",minimum:0,type:"integer"}},required:["coverage","returned","continuation"],type:"object"}]},WorkGraphTimelineV1:{additionalProperties:!1,properties:{coverage:{$ref:"#/$defs/WorkGraphTimelineCoverageV1"},entries:{items:{$ref:"#/$defs/WorkGraphVersionEntryV1"},type:"array"}},required:["entries","coverage"],type:"object"},WorkGraphVersionEntryV1:{additionalProperties:!1,description:"One immutable graph version and every Work projection derived from that\nsame version at the caller's explicit observation time.",properties:{graph:{$ref:"#/$defs/WorkProductGraphV1"},observed_at:{$ref:"#/$defs/UtcMicros"},projected_at:{$ref:"#/$defs/UtcMicros"},projections:{$ref:"#/$defs/WorkProductProjectionBundleV1"},runtime:{$ref:"#/$defs/WorkRuntimeProjectionV1"},valid_at:{$ref:"#/$defs/UtcMicros"},verified_version:{$ref:"#/$defs/VerifiedWorkGraphVersionV1"}},required:["valid_at","observed_at","projected_at","verified_version","graph","runtime","projections"],type:"object"},WorkHandoffV1:b2,WorkHierarchyV1:b4,WorkInitiativeV1:b6,WorkItemInputV1:b3,WorkItemV1:b9,WorkKanbanCardV1:{additionalProperties:!1,properties:{effort:{format:"uint32",minimum:0,type:"integer"},lane:{$ref:"#/$defs/WorkTimelineLaneV1"},legal_actions:{items:{$ref:"#/$defs/WorkLegalActionV1"},type:"array",uniqueItems:!0},task_id:{$ref:"#/$defs/TaskId"}},required:["task_id","lane","effort","legal_actions"],type:"object"},WorkKanbanProjectionV1:{additionalProperties:!1,properties:{cards:{items:{$ref:"#/$defs/WorkKanbanCardV1"},type:"array"},graph_version:{format:"uint64",minimum:0,type:"integer"}},required:["graph_version","cards"],type:"object"},WorkLegalActionV1:{enum:["view_evidence","generate_proposal","accept_proposal","link_accepted_attempt","accept_task","handoff","archive"],type:"string"},WorkMilestoneV1:$e,WorkPlanV1:$d,WorkProductAuthorizedRelationScopeV1:$c,WorkProductGraphV1:$f,WorkProductProjectionBundleV1:{additionalProperties:!1,properties:{causal:{$ref:"#/$defs/WorkCausalProjectionV1"},critical_path:{$ref:"#/$defs/WorkCriticalPathProjectionV1"},dag:{$ref:"#/$defs/WorkDagProjectionV1"},graph_version:{format:"uint64",minimum:0,type:"integer"},kanban:{$ref:"#/$defs/WorkKanbanProjectionV1"},runtime:{$ref:"#/$defs/WorkRuntimeProjectionV1"},timeline:{$ref:"#/$defs/WorkTimelineProjectionV1"},workload:{$ref:"#/$defs/WorkWorkloadProjectionV1"}},required:["graph_version","runtime","kanban","dag","timeline","causal","critical_path","workload"],type:"object"},WorkProductSelectionScopeV1:$b,WorkProjectionSequenceV1:{format:"uint64",minimum:0,title:"WorkProjectionSequenceV1",type:"integer"},WorkProposalDecisionV1:$$,WorkProposalDispositionV1:$S,WorkProposalV1:$k,WorkProposedChildV1:$w,WorkProviderRouteId:$I,WorkProviderRouteV1:$x,WorkRelationReplanDecisionV1:$C,WorkRelationReplanProposalV1:$T,WorkRouteDecisionV1:$N,WorkRuntimeAttemptProjectionV1:{additionalProperties:!1,properties:{identity:{$ref:"#/$defs/WorkAttemptIdentityV1"},state:{$ref:"#/$defs/WorkAttemptStateV1"}},required:["identity","state"],type:"object"},WorkRuntimeProjectionCoverageV1:{oneOf:[{additionalProperties:!1,properties:{coverage:{const:"complete",type:"string"}},required:["coverage"],type:"object"},{additionalProperties:!1,properties:{coverage:{const:"partial",type:"string"},unavailable_attempts:{items:{$ref:"#/$defs/WorkAttemptIdentityV1"},type:"array",uniqueItems:!0}},required:["coverage","unavailable_attempts"],type:"object"},{additionalProperties:!1,properties:{coverage:{const:"unavailable",type:"string"}},required:["coverage"],type:"object"}]},WorkRuntimeProjectionV1:{additionalProperties:!1,properties:{attempts:{items:{$ref:"#/$defs/WorkRuntimeAttemptProjectionV1"},type:"array"},coverage:{$ref:"#/$defs/WorkRuntimeProjectionCoverageV1"},generation_id:{$ref:"#/$defs/ProjectionGenerationId"},graph_version:{format:"uint64",minimum:0,type:"integer"},observed_at:{$ref:"#/$defs/UtcMicros"},sequence:{$ref:"#/$defs/WorkProjectionSequenceV1"}},required:["graph_version","generation_id","sequence","observed_at","attempts","coverage"],type:"object"},WorkScoreKindV1:$G,WorkShapeAssessmentV1:$B,WorkSizingV1:$K,WorkTimelineEntryV1:{additionalProperties:!1,properties:{created_at:{$ref:"#/$defs/UtcMicros"},deadline:{anyOf:[{$ref:"#/$defs/UtcMicros"},{type:"null"}]},scheduled_at:{anyOf:[{$ref:"#/$defs/UtcMicros"},{type:"null"}]},task_id:{$ref:"#/$defs/TaskId"},updated_at:{$ref:"#/$defs/UtcMicros"}},required:["task_id","created_at","updated_at"],type:"object"},WorkTimelineLaneV1:{enum:["triage","todo","scheduled","ready","running","blocked","review","done","archived","cancelled","unavailable"],type:"string"},WorkTimelineProjectionV1:{additionalProperties:!1,properties:{entries:{items:{$ref:"#/$defs/WorkTimelineEntryV1"},type:"array"},graph_version:{format:"uint64",minimum:0,type:"integer"}},required:["graph_version","entries"],type:"object"},WorkWorkloadProjectionV1:{additionalProperties:!1,properties:{actual_concurrency:{format:"uint32",minimum:0,type:["integer","null"]},blocked_effort:{format:"uint32",minimum:0,type:["integer","null"]},graph_version:{format:"uint64",minimum:0,type:"integer"},ready_effort:{format:"uint32",minimum:0,type:["integer","null"]},requested_concurrency:{format:"uint32",minimum:0,type:["integer","null"]},running_effort:{format:"uint32",minimum:0,type:["integer","null"]},total_effort:{format:"uint32",minimum:0,type:"integer"}},required:["graph_version","total_effort"],type:"object"}},$schema:"https://json-schema.org/draft/2020-12/schema",oneOf:[{properties:{authorized_scope:{$ref:"#/$defs/AuthorizedWorkProductScopeV1"},mode:{const:"current",type:"string"},selection_coverage:{$ref:"#/$defs/WorkGraphSelectionCoverageV1"},snapshot:{$ref:"#/$defs/WorkGraphVersionEntryV1"}},required:["mode","authorized_scope","selection_coverage","snapshot"],type:"object"},{properties:{authorized_scope:{$ref:"#/$defs/AuthorizedWorkProductScopeV1"},mode:{const:"as_of",type:"string"},selection_coverage:{$ref:"#/$defs/WorkGraphSelectionCoverageV1"},snapshot:{$ref:"#/$defs/WorkGraphVersionEntryV1"}},required:["mode","authorized_scope","selection_coverage","snapshot"],type:"object"},{properties:{authorized_scope:{$ref:"#/$defs/AuthorizedWorkProductScopeV1"},mode:{const:"evolution",type:"string"},selection_coverage:{$ref:"#/$defs/WorkGraphSelectionCoverageV1"},timeline:{$ref:"#/$defs/WorkGraphTimelineV1"}},required:["mode","authorized_scope","selection_coverage","timeline"],type:"object"},{properties:{authorized_scope:{$ref:"#/$defs/AuthorizedWorkProductScopeV1"},mode:{const:"forensic",type:"string"},selection_coverage:{$ref:"#/$defs/WorkGraphSelectionCoverageV1"},timeline:{$ref:"#/$defs/WorkGraphTimelineV1"}},required:["mode","authorized_scope","selection_coverage","timeline"],type:"object"},{description:"A `Current` or `AsOf` point read under an authorized selection that has\nno published graph version at that point: no task has been created yet.\nThe caller was authorized; the legal next action is creating a task.",properties:{authorized_scope:{$ref:"#/$defs/AuthorizedWorkProductScopeV1"},mode:{const:"absent",type:"string"},selection_coverage:{$ref:"#/$defs/WorkGraphSelectionCoverageV1"}},required:["mode","authorized_scope","selection_coverage"],type:"object"}],title:"WorkGraphReadV1"},{$defs:{WorkflowDefinitionId:$3},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Wire request for [`WorkflowDefinitionService::activate`].",properties:{definition_id:{$ref:"#/$defs/WorkflowDefinitionId"},definition_version:{format:"uint64",minimum:1,type:"integer"},expected_revision:{description:"Current candidate disposition revision. A newly registered candidate\nstarts at revision 1; activation reports expected and observed values\nwhen this compare-and-swap precondition is stale.",format:"uint64",minimum:1,type:"integer"}},required:["definition_id","definition_version","expected_revision"],title:"WorkflowDefinitionActivateRequest",type:"object"},{$defs:{UtcMicros:bs,WorkflowDefinitionId:$3,WorkflowDefinitionLifecycleState:{description:'Durable lifecycle disposition of one immutable workflow definition version.\n\nPlan 32 ("Typed workflow definitions"): "Lifecycle retains candidate,\nvalidate, activate, retire, reject, list, get, diff, and history operations\nthrough the same application surfaces." The definition payload itself stays\nimmutable, "Editing creates a new version; admitted runs remain pinned",\nso the disposition is a separate revisioned aggregate keyed by the same\ndefinition identity.',enum:["candidate","validated","active","retired","rejected"],type:"string"}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Revisioned lifecycle disposition of one definition version.",properties:{definition_id:{$ref:"#/$defs/WorkflowDefinitionId"},definition_version:{format:"uint64",minimum:1,type:"integer"},revision:{format:"uint64",minimum:1,type:"integer"},state:{$ref:"#/$defs/WorkflowDefinitionLifecycleState"},transitioned_at:{$ref:"#/$defs/UtcMicros"}},required:["definition_id","definition_version","state","revision","transitioned_at"],title:"WorkflowDefinitionDisposition",type:"object"},{$defs:{RunId:_8,WorkCommandId:bC},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Requests cooperative cancellation as a durable typed transition; the run\nsettles to `Cancelled` when the runtime reconciles in-flight steps.",properties:{command_id:{$ref:"#/$defs/WorkCommandId"},expected_sequence:{format:"uint64",minimum:0,type:"integer"},run_id:{$ref:"#/$defs/RunId"}},required:["run_id","expected_sequence","command_id"],title:"WorkflowRunCancelRequest",type:"object"},{$defs:{ActorId:mU,AttemptId:m5,AutomaticWorktreeGcV1:fr,BranchCollisionPolicyV1:fh,BranchNameComponentV1:fy,BranchNameSeparatorV1:fg,BranchNamingPolicyV1:f_,BranchTopologyKindV1:fV,BranchTopologyPolicyV1:fP,CanonicalGitRefNameV1:fC,CanonicalGitRefPrefix:fT,CapabilityId:fO,CommitId:fX,ConfigurationRevisionId:f8,ConfigurationSnapshotId:f7,CredentialReferenceId:hN,CrossMergeModeV1:hz,CrossMergePolicyV1:hD,GitHubStackedPullRequestPolicyV1:yH,HistoryRewritePolicyV1:y7,LocatorDigest:gk,ManifestDigest:gj,ProjectId:_m,ProposalId:__,ProtectedRefDispositionV1:_v,ProtectedRefRuleV1:_b,ProtectedRefSelectorV1:_$,ProviderId:_w,RefId:_T,RepositoryId:_z,RepositoryPlacementScopeV1:_D,RequiredCheckExpectationV1:_F,RequiredCheckV1:_L,ReviewRequirementV1:_0,ReviewTopologyKindV1:_2,ReviewTopologyPolicyV1:_4,RunId:_8,SensitiveFilesystemLocatorV1:vf,TaskId:v1,TopologyConcurrencyPolicyV1:be,TopologyEscalationPolicyV1:bt,TopologyGatePolicyV1:br,TopologyNotificationLevelV1:bi,UtcMicros:bs,WorkAcceptanceCriterionV1:bl,WorkApprovalPolicy:bp,WorkArtifactId:bu,WorkArtifactRefV1:bm,WorkAttemptIdentityV1:bh,WorkAuthority:{additionalProperties:!1,properties:{actor_id:{$ref:"#/$defs/ActorId"},policy_digest:{$ref:"#/$defs/ManifestDigest"},project_id:{$ref:"#/$defs/ProjectId"},repository_id:{$ref:"#/$defs/RepositoryId"},worktree_id:{$ref:"#/$defs/WorktreeId"}},required:["project_id","repository_id","worktree_id","actor_id","policy_digest"],type:"object"},WorkCommandId:bC,WorkEffectStateV1:bA,WorkEgressPolicy:bM,WorkExecutableReference:bL,WorkExecutionLimits:bH,WorkExecutionSnapshot:bG,WorkFallbackTopology:bJ,WorkFilesystemPolicy:bQ,WorkHandoffV1:b2,WorkHierarchyV1:b4,WorkInitiativeV1:b6,WorkItemInputV1:b3,WorkItemV1:b9,WorkMilestoneV1:$e,WorkPlanV1:$d,WorkProposalV1:$k,WorkProposedChildV1:$w,WorkProviderBackendV1:$P,WorkProviderProtocol:$q,WorkProviderRouteId:$I,WorkProviderRouteV1:$x,WorkRouteDecisionV1:$N,WorkSandboxPolicy:$H,WorkScoreKindV1:$G,WorkShapeAssessmentV1:$B,WorkSizingV1:$K,WorkTopologyPolicyV1:$4,WorkflowDefinition:$6,WorkflowDefinitionId:$3,WorkflowFanOut:$9,WorkflowFanOutChildPlanV1:{additionalProperties:!1,properties:{admit_command_id:{$ref:"#/$defs/WorkCommandId"},attempt_identity:{$ref:"#/$defs/WorkAttemptIdentityV1"},create_command_id:{$ref:"#/$defs/WorkCommandId"},initiative:{$ref:"#/$defs/WorkInitiativeV1"},instructions:{type:"string"},item:{$ref:"#/$defs/WorkItemV1"},milestone:{$ref:"#/$defs/WorkMilestoneV1"},plan:{$ref:"#/$defs/WorkPlanV1"},proposal:{$ref:"#/$defs/WorkProposalV1"},proposal_command_id:{$ref:"#/$defs/WorkCommandId"},task_id:{$ref:"#/$defs/TaskId"}},required:["task_id","attempt_identity","create_command_id","proposal_command_id","admit_command_id","initiative","plan","milestone","item","proposal","instructions"],type:"object"},WorkflowFanOutFailurePolicyV1:{oneOf:[{properties:{policy:{const:"fail_fast",type:"string"}},required:["policy"],type:"object"},{properties:{policy:{const:"collect",type:"string"}},required:["policy"],type:"object"},{properties:{policy:{const:"require_at_least",type:"string"},successes:{format:"uint16",maximum:65535,minimum:1,type:"integer"}},required:["policy","successes"],type:"object"}]},WorkflowFanOutPlanV1:{additionalProperties:!1,properties:{admitted_at:{$ref:"#/$defs/UtcMicros"},authority:{$ref:"#/$defs/WorkAuthority",description:"Exact Work authority that admitted this plan. Recovery may execute the\nplan only from a runtime with this byte-identical authority."},children:{items:{$ref:"#/$defs/WorkflowFanOutChildPlanV1"},type:"array"},commit:{$ref:"#/$defs/CommitId"},effect_state:{$ref:"#/$defs/WorkEffectStateV1"},execution_snapshot:{$ref:"#/$defs/WorkExecutionSnapshot"},failure_policy:{$ref:"#/$defs/WorkflowFanOutFailurePolicyV1"},maximum_parallel:{format:"uint16",maximum:65535,minimum:1,type:"integer"},operation:{$ref:"#/$defs/WorkflowOperationRef"},plan_digest:{$ref:"#/$defs/ManifestDigest"},reference:{anyOf:[{$ref:"#/$defs/RefId"},{type:"null"}]},step_id:{$ref:"#/$defs/WorkflowStepId"}},required:["authority","step_id","operation","plan_digest","admitted_at","maximum_parallel","failure_policy","execution_snapshot","commit","effect_state","children"],type:"object"},WorkflowOperationRef:$5,WorkflowOutputArtifact:{additionalProperties:!1,properties:{artifact:{$ref:"#/$defs/WorkArtifactRefV1"},attempt_identity:{$ref:"#/$defs/WorkAttemptIdentityV1"}},required:["attempt_identity","artifact"],type:"object"},WorkflowOutputName:$8,WorkflowOutputReference:$7,WorkflowPlacementReceipt:{additionalProperties:!1,properties:{backend:{$ref:"#/$defs/WorkProviderBackendV1"},configuration_digest:{$ref:"#/$defs/ManifestDigest"},model:{type:"string"},placement_digest:{$ref:"#/$defs/ManifestDigest"},provider_registry_digest:{$ref:"#/$defs/ManifestDigest"},route:{$ref:"#/$defs/WorkProviderRouteV1"},run_id:{$ref:"#/$defs/RunId"},step_id:{$ref:"#/$defs/WorkflowStepId"},topology_digest:{$ref:"#/$defs/ManifestDigest"},worktree_placement:{$ref:"#/$defs/WorktreePlacementModeV1"}},required:["run_id","step_id","route","backend","model","configuration_digest","topology_digest","provider_registry_digest","worktree_placement","placement_digest"],type:"object"},WorkflowRunEvent:{additionalProperties:!1,properties:{command_id:{$ref:"#/$defs/WorkCommandId"},event:{$ref:"#/$defs/WorkflowRunEventKind"},input_digest:{$ref:"#/$defs/ManifestDigest"},occurred_at:{$ref:"#/$defs/UtcMicros"},run_id:{$ref:"#/$defs/RunId"},sequence:{format:"uint64",minimum:0,type:"integer"}},required:["run_id","sequence","command_id","input_digest","occurred_at","event"],type:"object"},WorkflowRunEventKind:{oneOf:[{properties:{definition:{$ref:"#/$defs/WorkflowDefinition"},fan_out_plans:{default:[],items:{$ref:"#/$defs/WorkflowFanOutPlanV1"},type:"array"},pinned_provider_registry_digest:{$ref:"#/$defs/ManifestDigest"},pinned_topology_digest:{$ref:"#/$defs/ManifestDigest"},type:{const:"admitted",type:"string"}},required:["type","definition","pinned_topology_digest","pinned_provider_registry_digest"],type:"object"},{properties:{attempts:{items:{$ref:"#/$defs/WorkAttemptIdentityV1"},type:"array"},step_id:{$ref:"#/$defs/WorkflowStepId"},type:{const:"fan_out_children_released",type:"string"}},required:["type","step_id","attempts"],type:"object"},{properties:{attempts:{items:{$ref:"#/$defs/WorkAttemptIdentityV1"},type:"array"},step_id:{$ref:"#/$defs/WorkflowStepId"},type:{const:"fan_out_children_settled",type:"string"}},required:["type","step_id","attempts"],type:"object"},{properties:{planned_attempt:{$ref:"#/$defs/WorkAttemptIdentityV1"},prior_attempt:{$ref:"#/$defs/WorkAttemptIdentityV1"},replacement_attempt:{$ref:"#/$defs/WorkAttemptIdentityV1"},retry_receipt_digest:{$ref:"#/$defs/ManifestDigest"},step_id:{$ref:"#/$defs/WorkflowStepId"},type:{const:"fan_out_child_retry_rebound",type:"string"}},required:["type","step_id","planned_attempt","prior_attempt","replacement_attempt","retry_receipt_digest"],type:"object"},{properties:{placement:{$ref:"#/$defs/WorkflowPlacementReceipt"},step_id:{$ref:"#/$defs/WorkflowStepId"},type:{const:"step_started",type:"string"}},required:["type","step_id","placement"],type:"object"},{properties:{effect_receipt:{$ref:"#/$defs/WorkflowStepEffectReceipt"},outputs:{items:{$ref:"#/$defs/WorkflowStepOutput"},type:"array"},step_id:{$ref:"#/$defs/WorkflowStepId"},type:{const:"step_completed",type:"string"}},required:["type","step_id","outputs","effect_receipt"],type:"object"},{properties:{effect_receipt:{$ref:"#/$defs/WorkflowStepEffectReceipt"},outputs:{items:{$ref:"#/$defs/WorkflowStepOutput"},type:"array"},step_id:{$ref:"#/$defs/WorkflowStepId"},type:{const:"step_failed",type:"string"}},required:["type","step_id","outputs","effect_receipt"],type:"object"},{properties:{type:{const:"paused",type:"string"}},required:["type"],type:"object"},{properties:{type:{const:"resumed",type:"string"}},required:["type"],type:"object"},{properties:{type:{const:"cancellation_requested",type:"string"}},required:["type"],type:"object"},{properties:{type:{const:"cancelled",type:"string"}},required:["type"],type:"object"}]},WorkflowRunStatus:{enum:["running","paused","cancelling","completed","failed","cancelled"],type:"string"},WorkflowStep:Se,WorkflowStepEffectOutcome:{enum:["completed","failed","cancelled","timed_out","unknown"],type:"string"},WorkflowStepEffectReceipt:{additionalProperties:!1,properties:{effect_digest:{$ref:"#/$defs/ManifestDigest"},outcome:{$ref:"#/$defs/WorkflowStepEffectOutcome"},output_set_digest:{$ref:"#/$defs/ManifestDigest"},placement_digest:{$ref:"#/$defs/ManifestDigest"},receipt_digest:{$ref:"#/$defs/ManifestDigest"},run_id:{$ref:"#/$defs/RunId"},step_id:{$ref:"#/$defs/WorkflowStepId"}},required:["run_id","step_id","placement_digest","outcome","effect_digest","output_set_digest","receipt_digest"],type:"object"},WorkflowStepId:St,WorkflowStepOutput:{additionalProperties:!1,properties:{artifacts:{items:{$ref:"#/$defs/WorkflowOutputArtifact"},type:"array"},output_name:{$ref:"#/$defs/WorkflowOutputName"}},required:["output_name","artifacts"],type:"object"},WorkflowStepRunProjection:{additionalProperties:!1,properties:{effect_receipt:{anyOf:[{$ref:"#/$defs/WorkflowStepEffectReceipt"},{type:"null"}]},outputs:{additionalProperties:{$ref:"#/$defs/WorkflowStepOutput"},type:"object"},placement_receipt:{anyOf:[{$ref:"#/$defs/WorkflowPlacementReceipt"},{type:"null"}]},status:{$ref:"#/$defs/WorkflowStepStatus"}},required:["status","outputs"],type:"object"},WorkflowStepStatus:{enum:["blocked","ready","running","succeeded","failed","cancelled"],type:"string"},WorktreeCleanlinessRequirementV1:Si,WorktreeId:So,WorktreePlacementModeV1:Ss,WorktreeRetentionPolicyV1:Sd,WorktreeRootPolicyV1:Sc},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{definition:{$ref:"#/$defs/WorkflowDefinition"},fan_out_plans:{additionalProperties:{$ref:"#/$defs/WorkflowFanOutPlanV1"},type:"object"},history:{items:{$ref:"#/$defs/WorkflowRunEvent"},type:"array"},pinned_provider_registry_digest:{$ref:"#/$defs/ManifestDigest"},pinned_topology_digest:{$ref:"#/$defs/ManifestDigest"},released_fan_out_attempts:{items:{$ref:"#/$defs/WorkAttemptIdentityV1"},type:"array",uniqueItems:!0},run_id:{$ref:"#/$defs/RunId"},sequence:{format:"uint64",minimum:0,type:"integer"},settled_fan_out_attempts:{items:{$ref:"#/$defs/WorkAttemptIdentityV1"},type:"array",uniqueItems:!0},status:{$ref:"#/$defs/WorkflowRunStatus"},steps:{additionalProperties:{$ref:"#/$defs/WorkflowStepRunProjection"},type:"object"}},required:["run_id","definition","pinned_topology_digest","pinned_provider_registry_digest","status","sequence","steps","fan_out_plans","released_fan_out_attempts","settled_fan_out_attempts","history"],title:"WorkflowRunProjection",type:"object"},{$defs:{WorkflowDefinitionId:$3},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Wire request for [`WorkflowDefinitionService::history`].",properties:{definition_id:{$ref:"#/$defs/WorkflowDefinitionId"}},required:["definition_id"],title:"WorkflowDefinitionHistoryRequest",type:"object"},{$defs:{ManifestDigest:gj,ProjectId:_m,WorkflowDefinition:$6,WorkflowDefinitionId:$3,WorkflowFanOut:$9,WorkflowOperationRef:$5,WorkflowOutputName:$8,WorkflowOutputReference:$7,WorkflowStep:Se,WorkflowStepId:St},$schema:"https://json-schema.org/draft/2020-12/schema",items:{$ref:"#/$defs/WorkflowDefinition"},title:"Array_of_WorkflowDefinition",type:"array"},{$defs:{WorkflowDefinitionId:$3},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Wire request for [`WorkflowDefinitionService::diff`].",properties:{definition_id:{$ref:"#/$defs/WorkflowDefinitionId"},from_version:{format:"uint64",minimum:1,type:"integer"},to_version:{format:"uint64",minimum:1,type:"integer"}},required:["definition_id","from_version","to_version"],title:"WorkflowDefinitionDiffRequest",type:"object"},{$defs:{WorkflowDefinitionId:$3,WorkflowStepId:St},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{catalog_changed:{type:"boolean"},changed_steps:{items:{$ref:"#/$defs/WorkflowStepId"},type:"array",uniqueItems:!0},configuration_changed:{type:"boolean"},definition_id:{$ref:"#/$defs/WorkflowDefinitionId"},from_version:{format:"uint64",minimum:0,type:"integer"},policy_changed:{type:"boolean"},to_version:{format:"uint64",minimum:0,type:"integer"}},required:["definition_id","from_version","to_version","changed_steps","policy_changed","configuration_changed","catalog_changed"],title:"WorkflowDefinitionDiff",type:"object"},{$defs:{WorkflowDefinitionId:$3},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Wire request for [`WorkflowDefinitionService::get`].",properties:{definition_id:{$ref:"#/$defs/WorkflowDefinitionId"},definition_version:{format:"uint64",minimum:1,type:"integer"}},required:["definition_id","definition_version"],title:"WorkflowDefinitionGetRequest",type:"object"},{$defs:{ManifestDigest:gj,ProjectId:_m,WorkflowDefinitionId:$3,WorkflowFanOut:$9,WorkflowOperationRef:$5,WorkflowOutputName:$8,WorkflowOutputReference:$7,WorkflowStep:Se,WorkflowStepId:St},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{definition_id:{$ref:"#/$defs/WorkflowDefinitionId"},definition_version:{format:"uint64",minimum:0,type:"integer"},pinned_catalog_digest:{$ref:"#/$defs/ManifestDigest",description:"Must equal the live Work executable catalog digest. Validation and\nactivation report the current digest when this pin is stale."},pinned_configuration_digest:{$ref:"#/$defs/ManifestDigest"},pinned_policy_digest:{$ref:"#/$defs/ManifestDigest"},project_id:{$ref:"#/$defs/ProjectId"},steps:{items:{$ref:"#/$defs/WorkflowStep"},type:"array"}},required:["definition_id","definition_version","project_id","steps","pinned_policy_digest","pinned_configuration_digest","pinned_catalog_digest"],title:"WorkflowDefinition",type:"object"},{$defs:{RunId:_8},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{run_id:{$ref:"#/$defs/RunId"}},required:["run_id"],title:"WorkflowRunGetRequest",type:"object"},{$defs:{ActorId:mU,AttemptId:m5,ManifestDigest:gj,ProjectId:_m,RepositoryId:_z,RunId:_8,TaskHandoffScope:vY,TaskId:v1,ThreadId:v5,UtcMicros:bs,WorkAttemptIdentityV1:bh,WorkAttemptStateV1:bS,WorkHandoffAttemptFrontierV1:bY,WorkHandoffFrontierV1:b1,WorkHandoffLineageV1:b0,WorkflowDefinitionId:$3,WorkflowStepId:St,WorktreeId:So},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Wire request for [`TaskHandoffService::issue`].\n\n`secret` is the caller-supplied bearer token; the authority persists only\nits digest, never the secret itself. The scope must name a step the\nActive definition version declares and a run admitted from that version;\nany other scope is refused as not found and journals no grant.",properties:{frontier:{$ref:"#/$defs/WorkHandoffFrontierV1",description:"The exact work/evidence frontier this handoff records (Plan 24)."},scope:{$ref:"#/$defs/TaskHandoffScope"},secret:{type:"string"}},required:["scope","secret","frontier"],title:"TaskHandoffIssueRequest",type:"object"},{$defs:{ActorId:mU,AttemptId:m5,ManifestDigest:gj,ProjectId:_m,RepositoryId:_z,RunId:_8,TaskHandoffScope:vY,TaskId:v1,ThreadId:v5,UtcMicros:bs,WorkAttemptIdentityV1:bh,WorkAttemptStateV1:bS,WorkHandoffAttemptFrontierV1:bY,WorkHandoffFrontierV1:b1,WorkHandoffLineageV1:b0,WorkflowDefinitionId:$3,WorkflowStepId:St,WorktreeId:So},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{expires_at:{$ref:"#/$defs/UtcMicros"},frontier:{$ref:"#/$defs/WorkHandoffFrontierV1",description:"The exact work/evidence frontier this handoff records (Plan 24)."},frontier_digest:{$ref:"#/$defs/ManifestDigest",description:"The canonical digest of `frontier`; lineage chains hold this value."},issued_at:{$ref:"#/$defs/UtcMicros"},scope:{$ref:"#/$defs/TaskHandoffScope"},token_digest:{$ref:"#/$defs/ManifestDigest"}},required:["scope","token_digest","issued_at","expires_at","frontier","frontier_digest"],title:"TaskHandoffGrant",type:"object"},{$defs:{ActorId:mU,ProjectId:_m,RepositoryId:_z,RunId:_8,TaskHandoffScope:vY,TaskId:v1,ThreadId:v5,WorkflowDefinitionId:$3,WorkflowStepId:St,WorktreeId:So},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Wire request for [`TaskHandoffService::redeem`].",properties:{expected_scope:{$ref:"#/$defs/TaskHandoffScope"},secret:{type:"string"}},required:["secret","expected_scope"],title:"TaskHandoffRedeemRequest",type:"object"},{$defs:{ActorId:mU,AttemptId:m5,ManifestDigest:gj,ProjectId:_m,RepositoryId:_z,RunId:_8,TaskHandoffScope:vY,TaskId:v1,ThreadId:v5,UtcMicros:bs,WorkAttemptIdentityV1:bh,WorkAttemptStateV1:bS,WorkHandoffAttemptFrontierV1:bY,WorkHandoffFrontierV1:b1,WorkHandoffLineageV1:b0,WorkflowDefinitionId:$3,WorkflowStepId:St,WorktreeId:So},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Wire response for [`TaskHandoffService::redeem`]: the redemption receipt,\nonce and only once, for the caller that actually consumed the grant.\n\nThe receipt is checkpoint evidence only. It deliberately carries no\nlease, fence, or acceptance authority: redeeming a handoff cannot renew\na lease, establish task acceptance, or mutate graph or runtime state\n(Plan 24). The redeemer must earn runtime authority through the normal\nadmission and lease paths.",properties:{frontier:{$ref:"#/$defs/WorkHandoffFrontierV1",description:"The frontier exactly as the issuer recorded it."},frontier_digest:{$ref:"#/$defs/ManifestDigest",description:"The canonical digest of `frontier`, for lineage chaining."},redeemed_at:{$ref:"#/$defs/UtcMicros"},scope:{$ref:"#/$defs/TaskHandoffScope"}},required:["scope","frontier","frontier_digest","redeemed_at"],title:"TaskHandoffRedeemed",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Wire request for [`WorkflowDefinitionService::list`].",title:"WorkflowDefinitionListRequest",type:"object"},{$defs:{RunId:_8,WorkCommandId:bC},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{command_id:{$ref:"#/$defs/WorkCommandId"},expected_sequence:{format:"uint64",minimum:0,type:"integer"},run_id:{$ref:"#/$defs/RunId"}},required:["run_id","expected_sequence","command_id"],title:"WorkflowRunPauseRequest",type:"object"},{$defs:{ManifestDigest:gj,ProjectId:_m,WorkflowDefinition:$6,WorkflowDefinitionId:$3,WorkflowFanOut:$9,WorkflowOperationRef:$5,WorkflowOutputName:$8,WorkflowOutputReference:$7,WorkflowStep:Se,WorkflowStepId:St},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Wire request for [`WorkflowDefinitionService::register`].",properties:{definition:{$ref:"#/$defs/WorkflowDefinition"}},required:["definition"],title:"WorkflowDefinitionRegisterRequest",type:"object"},{$defs:{WorkflowDefinitionId:$3},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Wire request for [`WorkflowDefinitionService::reject`].",properties:{definition_id:{$ref:"#/$defs/WorkflowDefinitionId"},definition_version:{format:"uint64",minimum:1,type:"integer"},expected_revision:{format:"uint64",minimum:1,type:"integer"}},required:["definition_id","definition_version","expected_revision"],title:"WorkflowDefinitionRejectRequest",type:"object"},{$defs:{RunId:_8,WorkCommandId:bC},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{command_id:{$ref:"#/$defs/WorkCommandId"},expected_sequence:{format:"uint64",minimum:0,type:"integer"},run_id:{$ref:"#/$defs/RunId"}},required:["run_id","expected_sequence","command_id"],title:"WorkflowRunResumeRequest",type:"object"},{$defs:{WorkflowDefinitionId:$3},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Wire request for [`WorkflowDefinitionService::retire`].",properties:{definition_id:{$ref:"#/$defs/WorkflowDefinitionId"},definition_version:{format:"uint64",minimum:1,type:"integer"},expected_revision:{format:"uint64",minimum:1,type:"integer"}},required:["definition_id","definition_version","expected_revision"],title:"WorkflowDefinitionRetireRequest",type:"object"},{$defs:{ActorId:mU,AttemptId:m5,AutomaticWorktreeGcV1:fr,BranchCollisionPolicyV1:fh,BranchNameComponentV1:fy,BranchNameSeparatorV1:fg,BranchNamingPolicyV1:f_,BranchTopologyKindV1:fV,BranchTopologyPolicyV1:fP,CanonicalGitRefNameV1:fC,CanonicalGitRefPrefix:fT,CapabilityId:fO,CommitId:fX,ConfigurationRevisionId:f8,ConfigurationSnapshotId:f7,CredentialReferenceId:hN,CrossMergeModeV1:hz,CrossMergePolicyV1:hD,GitHubStackedPullRequestPolicyV1:yH,HistoryRewritePolicyV1:y7,LocatorDigest:gk,ManifestDigest:gj,ProposalId:__,ProtectedRefDispositionV1:_v,ProtectedRefRuleV1:_b,ProtectedRefSelectorV1:_$,ProviderId:_w,RefId:_T,RepositoryId:_z,RepositoryPlacementScopeV1:_D,RequiredCheckExpectationV1:_F,RequiredCheckV1:_L,ReviewRequirementV1:_0,ReviewTopologyKindV1:_2,ReviewTopologyPolicyV1:_4,RunId:_8,SensitiveFilesystemLocatorV1:vf,TaskId:v1,TopologyConcurrencyPolicyV1:be,TopologyEscalationPolicyV1:bt,TopologyGatePolicyV1:br,TopologyNotificationLevelV1:bi,UtcMicros:bs,WorkAcceptanceCriterionV1:bl,WorkApprovalPolicy:bp,WorkAttemptIdentityV1:bh,WorkCommandId:bC,WorkEffectStateV1:bA,WorkEgressPolicy:bM,WorkExecutableReference:bL,WorkExecutionLimits:bH,WorkExecutionSnapshot:bG,WorkFallbackTopology:bJ,WorkFenceEpochV1:bZ,WorkFilesystemPolicy:bQ,WorkHandoffV1:b2,WorkHierarchyV1:b4,WorkInitiativeV1:b6,WorkItemInputV1:b3,WorkItemV1:b9,WorkLeaseFenceV1:b8,WorkLeaseId:b7,WorkMilestoneV1:$e,WorkPlanV1:$d,WorkProposalV1:$k,WorkProposedChildV1:$w,WorkProviderBackendV1:$P,WorkProviderProtocol:$q,WorkProviderRouteId:$I,WorkProviderRouteV1:$x,WorkRouteDecisionV1:$N,WorkSandboxPolicy:$H,WorkScoreKindV1:$G,WorkShapeAssessmentV1:$B,WorkSizingV1:$K,WorkTopologyPolicyV1:$4,WorkflowDefinitionId:$3,WorkflowExecutionFence:{additionalProperties:!1,properties:{attempt_id:{$ref:"#/$defs/AttemptId"},lease:{$ref:"#/$defs/WorkLeaseFenceV1"}},required:["attempt_id","lease"],type:"object"},WorkflowFailurePolicy:{oneOf:[{properties:{policy:{const:"fail_fast",type:"string"}},required:["policy"],type:"object"},{properties:{policy:{const:"collect",type:"string"}},required:["policy"],type:"object"},{properties:{policy:{const:"require_at_least",type:"string"},successes:{format:"uint32",minimum:1,type:"integer"}},required:["policy","successes"],type:"object"}]},WorkflowFanOutInput:{additionalProperties:!1,properties:{initiative:{$ref:"#/$defs/WorkInitiativeV1"},input_digest:{$ref:"#/$defs/ManifestDigest"},instructions:{type:"string"},item:{$ref:"#/$defs/WorkItemV1"},milestone:{$ref:"#/$defs/WorkMilestoneV1"},plan:{$ref:"#/$defs/WorkPlanV1"},proposal:{$ref:"#/$defs/WorkProposalV1"}},required:["instructions","input_digest","initiative","plan","milestone","item","proposal"],type:"object"},WorkflowFanOutStartV1:{additionalProperties:!1,description:"Caller input required to durably plan the entry fan-out of a workflow run.\nDaemon-owned registration and topology digests are resolved at admission.",properties:{commit:{$ref:"#/$defs/CommitId"},effect_state:{$ref:"#/$defs/WorkEffectStateV1"},execution_snapshot:{$ref:"#/$defs/WorkExecutionSnapshot"},failure_policy:{$ref:"#/$defs/WorkflowFailurePolicy"},fence:{$ref:"#/$defs/WorkflowExecutionFence"},inputs:{items:{$ref:"#/$defs/WorkflowFanOutInput"},type:"array"},max_parallel:{format:"uint32",minimum:1,type:"integer"},reference:{anyOf:[{$ref:"#/$defs/RefId"},{type:"null"}]}},required:["fence","max_parallel","failure_policy","execution_snapshot","commit","effect_state","inputs"],type:"object"},WorkflowProviderRegistration:{additionalProperties:!1,properties:{backend:{$ref:"#/$defs/WorkProviderBackendV1"},model:{type:"string"},priority:{format:"uint32",minimum:0,type:"integer"},route:{$ref:"#/$defs/WorkProviderRouteV1"}},required:["route","backend","model","priority"],type:"object"},WorktreeCleanlinessRequirementV1:Si,WorktreePlacementModeV1:Ss,WorktreeRetentionPolicyV1:Sd,WorktreeRootPolicyV1:Sc},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Starts (admits) a journaled workflow run from an active definition.\n\nThe daemon derives every admission digest itself: the definition's own\npinned policy/configuration/catalog digests are checked against the live\nenvironment, the topology digest comes from the evaluated topology policy,\nand the provider registry digest is computed from this registration. The\ncaller never supplies a digest the runtime must trust.",properties:{command_id:{$ref:"#/$defs/WorkCommandId"},definition_id:{$ref:"#/$defs/WorkflowDefinitionId"},definition_version:{format:"uint64",minimum:1,type:"integer"},fan_out:{anyOf:[{$ref:"#/$defs/WorkflowFanOutStartV1"},{type:"null"}]},provider:{$ref:"#/$defs/WorkflowProviderRegistration"},run_id:{$ref:"#/$defs/RunId"}},required:["run_id","definition_id","definition_version","provider","command_id"],title:"WorkflowRunStartRequest",type:"object"},{$defs:{ManifestDigest:gj,ProjectId:_m,WorkflowDefinition:$6,WorkflowDefinitionId:$3,WorkflowFanOut:$9,WorkflowOperationRef:$5,WorkflowOutputName:$8,WorkflowOutputReference:$7,WorkflowStep:Se,WorkflowStepId:St},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Wire request for [`WorkflowDefinitionService::validate`].",properties:{definition:{$ref:"#/$defs/WorkflowDefinition"}},required:["definition"],title:"WorkflowDefinitionValidateRequest",type:"object"},{$defs:{ManifestDigest:gj,ProjectId:_m,WorkflowDefinition:$6,WorkflowDefinitionId:$3,WorkflowFanOut:$9,WorkflowOperationRef:$5,WorkflowOutputName:$8,WorkflowOutputReference:$7,WorkflowStep:Se,WorkflowStepId:St},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{definition:{$ref:"#/$defs/WorkflowDefinition"}},required:["definition"],title:"WorkflowDefinitionValidation",type:"object"}].map(e=>t=>(!function e(t,r,i,o,n){var a;if("boolean"==typeof r){if(!r)throw TypeError(`${o} is rejected by the canonical schema`);return}let s=mV(r,o);if("string"==typeof s.$ref){if(n.has(s.$ref))throw TypeError(`cyclic canonical schema reference: ${s.$ref}`);n.add(s.$ref),e(t,function(e,t){if(!t.startsWith("#/"))throw TypeError(`unsupported canonical schema reference: ${t}`);let r=e;for(let e of t.slice(2).split("/")){let i=e.replaceAll("~1","/").replaceAll("~0","~");r=mV(r,t)[i]}return mV(r,t)}(i,s.$ref),i,o,n),n.delete(s.$ref);return}if("const"in s&&(a=s.const,mw(t)!==mw(a)))throw TypeError(`${o} does not match the canonical constant`);if(Array.isArray(s.enum)&&!s.enum.some(e=>mw(t)===mw(e)))throw TypeError(`${o} is not a canonical enum value`);if(Array.isArray(s.allOf))for(let r of s.allOf)e(t,r,i,o,new Set(n));if(Array.isArray(s.anyOf)&&!s.anyOf.some(r=>{try{return e(t,r,i,o,new Set(n)),!0}catch{return!1}}))throw TypeError(`${o} does not match any canonical variant`);if(Array.isArray(s.oneOf)&&1!==s.oneOf.filter(r=>{try{return e(t,r,i,o,new Set(n)),!0}catch{return!1}}).length)throw TypeError(`${o} must match exactly one canonical variant`);let d=s.type;if("string"==typeof d&&!mP(t,d))throw TypeError(`${o} must be ${d}`);if(Array.isArray(d)&&!d.some(e=>"string"==typeof e&&mP(t,e)))throw TypeError(`${o} has no canonical type`);if("string"==typeof t){if("number"==typeof s.minLength&&t.lengths.maxLength)throw TypeError(`${o} exceeds maxLength`);if("string"==typeof s.pattern&&!RegExp(s.pattern,"u").test(t))throw TypeError(`${o} does not match the canonical pattern`)}if("number"==typeof t){if("integer"===s.type){if("uint32"===s.format&&(t<0||t>0xffffffff))throw TypeError(`${o} is outside uint32`);if("uint64"===s.format&&(t<0||t>Number.MAX_SAFE_INTEGER))throw TypeError(`${o} is outside safely representable uint64`);if("int64"===s.format&&(tNumber.MAX_SAFE_INTEGER))throw TypeError(`${o} is outside safely representable int64`)}if("number"==typeof s.minimum&&ts.maximum)throw TypeError(`${o} exceeds maximum`)}if(Array.isArray(t)){if("number"==typeof s.minItems&&t.lengths.maxItems)throw TypeError(`${o} has too many items`);if(!0===s.uniqueItems){let e=new Set;for(let r of t){let t=mw(r);if(e.has(t))throw TypeError(`${o} contains duplicate items`);e.add(t)}}Array.isArray(s.prefixItems)&&s.prefixItems.forEach((r,n)=>{ne(t,s.items,i,`${o}[${r}]`,new Set))}if("object"==typeof t&&null!==t&&!Array.isArray(t)){let r=void 0===s.properties?{}:mV(s.properties,`${o}.properties`);if(Array.isArray(s.required)){for(let e of s.required)if("string"==typeof e&&!(e in t))throw TypeError(`${o}.${e} is required`)}for(let[n,a]of Object.entries(t))if(n in r)e(a,r[n],i,`${o}.${n}`,new Set);else if(!1===s.additionalProperties)throw TypeError(`${o}.${n} is not allowed`);else"object"==typeof s.additionalProperties&&e(a,s.additionalProperties,i,`${o}.${n}`,new Set)}}(t,e,e,"value",new Set),t));function Sp(e){let t=Sl[e];if(void 0===t)throw TypeError(`generated canonical schema ${e} is missing`);return t}let Su=[{operation:"active_project",operationId:"operation.application.active_project",transport:{kind:"mcp_tool",toolName:"tracedecay_active_project"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.active_project.v1",requestSchema:{schemaId:"schema.application.primitive.active-project.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.active-project.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(0),decodeResult:Sp(1)},{operation:"admin_cli",operationId:"operation.application.admin_cli",transport:{kind:"mcp_tool",toolName:"tracedecay_admin_cli"},effect:"maintains_profile_state",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.admin_cli.v1",requestSchema:{schemaId:"schema.application.primitive.admin-cli.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.admin-cli.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","effect_in_flight"]},deadline:{behavior:"return_operation_receipt",maximum_millis:6e5},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(2),decodeResult:Sp(3)},{operation:"admin_project",operationId:"operation.application.admin_project",transport:{kind:"mcp_tool",toolName:"tracedecay_admin_project"},effect:"maintains_owner_state",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.admin_project.v1",requestSchema:{schemaId:"schema.application.primitive.admin-project.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.admin-project.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_operation_receipt",maximum_millis:6e5},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","timed_out","failed","unavailable","partial"],decodeRequest:Sp(4),decodeResult:Sp(5)},{operation:"admin_sync",operationId:"operation.application.admin_sync",transport:{kind:"mcp_tool",toolName:"tracedecay_admin_sync"},effect:"schedules_work",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.admin_sync.v1",requestSchema:{schemaId:"schema.application.primitive.admin-sync.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.admin-sync.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_operation_receipt",maximum_millis:6e5},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","timed_out","failed","unavailable","partial"],decodeRequest:Sp(6),decodeResult:Sp(7)},{operation:"affected",operationId:"operation.application.affected",transport:{kind:"mcp_tool",toolName:"tracedecay_affected"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.affected.v1",requestSchema:{schemaId:"schema.application.primitive.affected.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.affected.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(8),decodeResult:Sp(9)},{operation:"application_affected_tests",operationId:"operation.application.affected_tests",transport:{kind:"http",route:"/application/tests/affected",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.affected_tests.v1",requestSchema:{schemaId:"schema.application.feedback.affected-tests.request",revision:1},resultSchema:{schemaId:"schema.application.feedback.affected-tests.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:15e3},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(10),decodeResult:Sp(11),decodeSuccess:e=>mE(e,"binding.http.affected_tests.v1","schema.application.feedback.affected-tests.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(11))},{operation:"analytics",operationId:"operation.application.analytics",transport:{kind:"mcp_tool",toolName:"tracedecay_analytics"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.analytics.v1",requestSchema:{schemaId:"schema.application.primitive.analytics.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.analytics.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(12),decodeResult:Sp(13)},{operation:"apply_native_integration",operationId:"operation.application.apply_native_integration",transport:{kind:"mcp_tool",toolName:"tracedecay_apply_native_integration"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.apply_native_integration.v1",requestSchema:{schemaId:"schema.application.native-integration.apply.request",revision:1},resultSchema:{schemaId:"schema.application.native-integration.apply.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:Sp(14),decodeResult:Sp(15)},{operation:"approve_native_integration",operationId:"operation.application.approve_native_integration",transport:{kind:"mcp_tool",toolName:"tracedecay_approve_native_integration"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.approve_native_integration.v1",requestSchema:{schemaId:"schema.application.native-integration.approve.request",revision:1},resultSchema:{schemaId:"schema.application.native-integration.approve.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:Sp(16),decodeResult:Sp(15)},{operation:"ast_grep_rewrite",operationId:"operation.application.ast_grep_rewrite",transport:{kind:"mcp_tool",toolName:"tracedecay_ast_grep_rewrite"},effect:"source_edit",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.ast_grep_rewrite.v1",requestSchema:{schemaId:"schema.application.source-edit.ast-grep-rewrite.request",revision:1},resultSchema:{schemaId:"schema.application.source-edit.ast-grep-rewrite.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:Sp(17),decodeResult:Sp(18)},{operation:"ast_grep_search",operationId:"operation.application.ast_grep_search",transport:{kind:"mcp_tool",toolName:"tracedecay_ast_grep_search"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.ast_grep_search.v1",requestSchema:{schemaId:"schema.application.primitive.ast-grep-search.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.ast-grep-search.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(19),decodeResult:Sp(20)},{operation:"automation_run_artifact_view",operationId:"operation.application.automation_run_artifact_view",transport:{kind:"mcp_tool",toolName:"tracedecay_automation_run_artifact_view"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.automation_run_artifact_view.v1",requestSchema:{schemaId:"schema.application.primitive.automation-run-artifact-view.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.automation-run-artifact-view.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(21),decodeResult:Sp(22)},{operation:"automation_run_list",operationId:"operation.application.automation_run_list",transport:{kind:"mcp_tool",toolName:"tracedecay_automation_run_list"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.automation_run_list.v1",requestSchema:{schemaId:"schema.application.primitive.automation-run-list.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.automation-run-list.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(23),decodeResult:Sp(24)},{operation:"automation_run_view",operationId:"operation.application.automation_run_view",transport:{kind:"mcp_tool",toolName:"tracedecay_automation_run_view"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.automation_run_view.v1",requestSchema:{schemaId:"schema.application.primitive.automation-run-view.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.automation-run-view.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(25),decodeResult:Sp(26)},{operation:"branch_diff",operationId:"operation.application.branch_diff",transport:{kind:"mcp_tool",toolName:"tracedecay_branch_diff"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.branch_diff.v1",requestSchema:{schemaId:"schema.application.primitive.branch-diff.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.branch-diff.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(27),decodeResult:Sp(28)},{operation:"branch_list",operationId:"operation.application.branch_list",transport:{kind:"mcp_tool",toolName:"tracedecay_branch_list"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.branch_list.v1",requestSchema:{schemaId:"schema.application.primitive.branch-list.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.branch-list.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(29),decodeResult:Sp(30)},{operation:"branch_search",operationId:"operation.application.branch_search",transport:{kind:"mcp_tool",toolName:"tracedecay_branch_search"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.branch_search.v1",requestSchema:{schemaId:"schema.application.primitive.branch-search.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.branch-search.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(31),decodeResult:Sp(32)},{operation:"by_qualified_name",operationId:"operation.application.by_qualified_name",transport:{kind:"mcp_tool",toolName:"tracedecay_by_qualified_name"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.by_qualified_name.v1",requestSchema:{schemaId:"schema.application.primitive.by-qualified-name.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.by-qualified-name.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(33),decodeResult:Sp(34)},{operation:"application_call_chain",operationId:"operation.application.call_chain",transport:{kind:"http",route:"/application/primitives/call_chain",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.call_chain.v1",requestSchema:{schemaId:"schema.application.primitive.call-chain.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.call-chain.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(35),decodeResult:Sp(36),decodeSuccess:e=>mE(e,"binding.http.call_chain.v1","schema.application.primitive.call-chain.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(36))},{operation:"cancel_native_integration",operationId:"operation.application.cancel_native_integration",transport:{kind:"mcp_tool",toolName:"tracedecay_cancel_native_integration"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.cancel_native_integration.v1",requestSchema:{schemaId:"schema.application.native-integration.cancel.request",revision:1},resultSchema:{schemaId:"schema.application.native-integration.cancel.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:Sp(37),decodeResult:Sp(15)},{operation:"changelog",operationId:"operation.application.changelog",transport:{kind:"mcp_tool",toolName:"tracedecay_changelog"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.changelog.v1",requestSchema:{schemaId:"schema.application.primitive.changelog.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.changelog.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(38),decodeResult:Sp(39)},{operation:"circular",operationId:"operation.application.circular",transport:{kind:"mcp_tool",toolName:"tracedecay_circular"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.circular.v1",requestSchema:{schemaId:"schema.application.primitive.circular.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.circular.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(40),decodeResult:Sp(41)},{operation:"code_callees",operationId:"operation.application.code_callees",transport:{kind:"http",route:"/application/code/code_callees",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.code_callees.v1",requestSchema:{schemaId:"schema.application.code-query.callees.request",revision:1},resultSchema:{schemaId:"schema.application.code-query.callees.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(42),decodeResult:Sp(43),decodeSuccess:e=>mE(e,"binding.http.code_callees.v1","schema.application.code-query.callees.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(43))},{operation:"code_callers",operationId:"operation.application.code_callers",transport:{kind:"http",route:"/application/code/code_callers",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.code_callers.v1",requestSchema:{schemaId:"schema.application.primitive.code-callers.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.code-callers.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(44),decodeResult:Sp(45),decodeSuccess:e=>mE(e,"binding.http.code_callers.v1","schema.application.primitive.code-callers.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(45))},{operation:"code_declaration",operationId:"operation.application.code_declaration",transport:{kind:"http",route:"/application/code/code_declaration",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.code_declaration.v1",requestSchema:{schemaId:"schema.application.code-query.declaration.request",revision:1},resultSchema:{schemaId:"schema.application.code-query.declaration.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(46),decodeResult:Sp(47),decodeSuccess:e=>mE(e,"binding.http.code_declaration.v1","schema.application.code-query.declaration.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(47))},{operation:"code_exact_occurrence",operationId:"operation.application.code_exact_occurrence",transport:{kind:"http",route:"/application/code/code_exact_occurrence",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.code_exact_occurrence.v1",requestSchema:{schemaId:"schema.application.code-query.exact-occurrence.request",revision:1},resultSchema:{schemaId:"schema.application.code-query.exact-occurrence.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(48),decodeResult:Sp(49),decodeSuccess:e=>mE(e,"binding.http.code_exact_occurrence.v1","schema.application.code-query.exact-occurrence.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(49))},{operation:"code_facets",operationId:"operation.application.code_facets",transport:{kind:"http",route:"/application/code/code_facets",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.code_facets.v1",requestSchema:{schemaId:"schema.application.code-query.facets.request",revision:1},resultSchema:{schemaId:"schema.application.code-query.facets.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(50),decodeResult:Sp(51),decodeSuccess:e=>mE(e,"binding.http.code_facets.v1","schema.application.code-query.facets.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(51))},{operation:"code_implementations",operationId:"operation.application.code_implementations",transport:{kind:"http",route:"/application/code/code_implementations",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.code_implementations.v1",requestSchema:{schemaId:"schema.application.primitive.code-implementations.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.code-implementations.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(52),decodeResult:Sp(53),decodeSuccess:e=>mE(e,"binding.http.code_implementations.v1","schema.application.primitive.code-implementations.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(53))},{operation:"code_phrase_search",operationId:"operation.application.code_phrase_search",transport:{kind:"http",route:"/application/code/code_phrase_search",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.code_phrase_search.v1",requestSchema:{schemaId:"schema.application.code-query.phrase-search.request",revision:1},resultSchema:{schemaId:"schema.application.code-query.phrase-search.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(54),decodeResult:Sp(55),decodeSuccess:e=>mE(e,"binding.http.code_phrase_search.v1","schema.application.code-query.phrase-search.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(55))},{operation:"code_references",operationId:"operation.application.code_references",transport:{kind:"http",route:"/application/code/code_references",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.code_references.v1",requestSchema:{schemaId:"schema.application.code-query.references.request",revision:1},resultSchema:{schemaId:"schema.application.code-query.references.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(46),decodeResult:Sp(43),decodeSuccess:e=>mE(e,"binding.http.code_references.v1","schema.application.code-query.references.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(43))},{operation:"code_signature_search",operationId:"operation.application.code_signature_search",transport:{kind:"http",route:"/application/code/code_signature_search",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.code_signature_search.v1",requestSchema:{schemaId:"schema.application.primitive.code-signature-search.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.code-signature-search.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(56),decodeResult:Sp(57),decodeSuccess:e=>mE(e,"binding.http.code_signature_search.v1","schema.application.primitive.code-signature-search.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(57))},{operation:"code_symbol_search",operationId:"operation.application.code_symbol_search",transport:{kind:"http",route:"/application/code/code_symbol_search",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.code_symbol_search.v1",requestSchema:{schemaId:"schema.application.symbol-search.request",revision:1},resultSchema:{schemaId:"schema.application.symbol-search.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(58),decodeResult:Sp(57),decodeSuccess:e=>mE(e,"binding.http.code_symbol_search.v1","schema.application.symbol-search.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(57))},{operation:"code_timeline",operationId:"operation.application.code_timeline",transport:{kind:"http",route:"/application/code/code_timeline",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.code_timeline.v1",requestSchema:{schemaId:"schema.application.code-query.timeline.request",revision:1},resultSchema:{schemaId:"schema.application.code-query.timeline.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(59),decodeResult:Sp(60),decodeSuccess:e=>mE(e,"binding.http.code_timeline.v1","schema.application.code-query.timeline.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(60))},{operation:"code_type_definition",operationId:"operation.application.code_type_definition",transport:{kind:"http",route:"/application/code/code_type_definition",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.code_type_definition.v1",requestSchema:{schemaId:"schema.application.code-query.type-definition.request",revision:1},resultSchema:{schemaId:"schema.application.code-query.type-definition.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(46),decodeResult:Sp(47),decodeSuccess:e=>mE(e,"binding.http.code_type_definition.v1","schema.application.code-query.type-definition.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(47))},{operation:"code_type_hierarchy",operationId:"operation.application.code_type_hierarchy",transport:{kind:"http",route:"/application/code/code_type_hierarchy",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.code_type_hierarchy.v1",requestSchema:{schemaId:"schema.application.primitive.code-type-hierarchy.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.code-type-hierarchy.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(61),decodeResult:Sp(62),decodeSuccess:e=>mE(e,"binding.http.code_type_hierarchy.v1","schema.application.primitive.code-type-hierarchy.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(62))},{operation:"commit_context",operationId:"operation.application.commit_context",transport:{kind:"mcp_tool",toolName:"tracedecay_commit_context"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.commit_context.v1",requestSchema:{schemaId:"schema.application.primitive.commit-context.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.commit-context.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(63),decodeResult:Sp(64)},{operation:"complexity",operationId:"operation.application.complexity",transport:{kind:"mcp_tool",toolName:"tracedecay_complexity"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.complexity.v1",requestSchema:{schemaId:"schema.application.primitive.complexity.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.complexity.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(65),decodeResult:Sp(66)},{operation:"config",operationId:"operation.application.config",transport:{kind:"mcp_tool",toolName:"tracedecay_config"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.config.v1",requestSchema:{schemaId:"schema.application.primitive.config.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.config.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(67),decodeResult:Sp(68)},{operation:"application_configuration_audit",operationId:"operation.application.configuration_audit",transport:{kind:"http",route:"/application/configuration/configuration_audit",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.configuration_audit.v1",requestSchema:{schemaId:"schema.application.configuration.configuration_audit.request",revision:1},resultSchema:{schemaId:"schema.application.configuration.configuration_audit.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:15e3},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:Sp(69),decodeResult:Sp(70),decodeSuccess:e=>mE(e,"binding.http.configuration_audit.v1","schema.application.configuration.configuration_audit.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(70))},{operation:"application_configuration_batch",operationId:"operation.application.configuration_batch",transport:{kind:"http",route:"/application/configuration/configuration_batch",method:"POST"},effect:"configuration_write",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.configuration_batch.v1",requestSchema:{schemaId:"schema.application.configuration.configuration_batch.request",revision:1},resultSchema:{schemaId:"schema.application.configuration.configuration_batch.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_effect_receipt",maximum_millis:15e3},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","timed_out","failed","effect_unknown","partial"],decodeRequest:Sp(71),decodeResult:Sp(72),decodeSuccess:e=>mE(e,"binding.http.configuration_batch.v1","schema.application.configuration.configuration_batch.result",1,["completed","timed_out","failed","effect_unknown","partial"],{mode:"not_cancellable"},"durable_effect","required",Sp(72))},{operation:"application_configuration_get",operationId:"operation.application.configuration_get",transport:{kind:"http",route:"/application/configuration/configuration_get",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.configuration_get.v1",requestSchema:{schemaId:"schema.application.configuration.configuration_get.request",revision:1},resultSchema:{schemaId:"schema.application.configuration.configuration_get.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:15e3},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:Sp(73),decodeResult:Sp(74),decodeSuccess:e=>mE(e,"binding.http.configuration_get.v1","schema.application.configuration.configuration_get.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(74))},{operation:"application_configuration_list",operationId:"operation.application.configuration_list",transport:{kind:"http",route:"/application/configuration/configuration_list",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.configuration_list.v1",requestSchema:{schemaId:"schema.application.configuration.configuration_list.request",revision:1},resultSchema:{schemaId:"schema.application.configuration.configuration_list.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:15e3},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:Sp(75),decodeResult:Sp(76),decodeSuccess:e=>mE(e,"binding.http.configuration_list.v1","schema.application.configuration.configuration_list.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(76))},{operation:"application_configuration_observed_state",operationId:"operation.application.configuration_observed_state",transport:{kind:"http",route:"/application/configuration/configuration_observed_state",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.configuration_observed_state.v1",requestSchema:{schemaId:"schema.application.configuration.configuration_observed_state.request",revision:1},resultSchema:{schemaId:"schema.application.configuration.configuration_observed_state.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:15e3},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:Sp(77),decodeResult:Sp(78),decodeSuccess:e=>mE(e,"binding.http.configuration_observed_state.v1","schema.application.configuration.configuration_observed_state.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(78))},{operation:"application_configuration_protected_apply",operationId:"operation.application.configuration_protected_apply",transport:{kind:"http",route:"/application/configuration/configuration_protected_apply",method:"POST"},effect:"configuration_write",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.configuration_protected_apply.v1",requestSchema:{schemaId:"schema.application.configuration.configuration_protected_apply.request",revision:1},resultSchema:{schemaId:"schema.application.configuration.configuration_protected_apply.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_effect_receipt",maximum_millis:15e3},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","timed_out","failed","effect_unknown","partial"],decodeRequest:Sp(79),decodeResult:Sp(72),decodeSuccess:e=>mE(e,"binding.http.configuration_protected_apply.v1","schema.application.configuration.configuration_protected_apply.result",1,["completed","timed_out","failed","effect_unknown","partial"],{mode:"not_cancellable"},"durable_effect","required",Sp(72))},{operation:"application_configuration_protected_preview",operationId:"operation.application.configuration_protected_preview",transport:{kind:"http",route:"/application/configuration/configuration_protected_preview",method:"POST"},effect:"preview",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.configuration_protected_preview.v1",requestSchema:{schemaId:"schema.application.configuration.configuration_protected_preview.request",revision:1},resultSchema:{schemaId:"schema.application.configuration.configuration_protected_preview.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:15e3},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:Sp(80),decodeResult:Sp(81),decodeSuccess:e=>mE(e,"binding.http.configuration_protected_preview.v1","schema.application.configuration.configuration_protected_preview.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(81))},{operation:"application_configuration_rollback_apply",operationId:"operation.application.configuration_rollback_apply",transport:{kind:"http",route:"/application/configuration/configuration_rollback_apply",method:"POST"},effect:"configuration_write",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.configuration_rollback_apply.v1",requestSchema:{schemaId:"schema.application.configuration.configuration_rollback_apply.request",revision:1},resultSchema:{schemaId:"schema.application.configuration.configuration_rollback_apply.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_effect_receipt",maximum_millis:15e3},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","timed_out","failed","effect_unknown","partial"],decodeRequest:Sp(79),decodeResult:Sp(72),decodeSuccess:e=>mE(e,"binding.http.configuration_rollback_apply.v1","schema.application.configuration.configuration_rollback_apply.result",1,["completed","timed_out","failed","effect_unknown","partial"],{mode:"not_cancellable"},"durable_effect","required",Sp(72))},{operation:"application_configuration_rollback_preview",operationId:"operation.application.configuration_rollback_preview",transport:{kind:"http",route:"/application/configuration/configuration_rollback_preview",method:"POST"},effect:"preview",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.configuration_rollback_preview.v1",requestSchema:{schemaId:"schema.application.configuration.configuration_rollback_preview.request",revision:1},resultSchema:{schemaId:"schema.application.configuration.configuration_rollback_preview.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:15e3},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:Sp(82),decodeResult:Sp(81),decodeSuccess:e=>mE(e,"binding.http.configuration_rollback_preview.v1","schema.application.configuration.configuration_rollback_preview.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(81))},{operation:"application_configuration_set",operationId:"operation.application.configuration_set",transport:{kind:"http",route:"/application/configuration/configuration_set",method:"POST"},effect:"configuration_write",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.configuration_set.v1",requestSchema:{schemaId:"schema.application.configuration.configuration_set.request",revision:1},resultSchema:{schemaId:"schema.application.configuration.configuration_set.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_effect_receipt",maximum_millis:15e3},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","timed_out","failed","effect_unknown","partial"],decodeRequest:Sp(83),decodeResult:Sp(72),decodeSuccess:e=>mE(e,"binding.http.configuration_set.v1","schema.application.configuration.configuration_set.result",1,["completed","timed_out","failed","effect_unknown","partial"],{mode:"not_cancellable"},"durable_effect","required",Sp(72))},{operation:"application_configuration_unset",operationId:"operation.application.configuration_unset",transport:{kind:"http",route:"/application/configuration/configuration_unset",method:"POST"},effect:"configuration_write",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.configuration_unset.v1",requestSchema:{schemaId:"schema.application.configuration.configuration_unset.request",revision:1},resultSchema:{schemaId:"schema.application.configuration.configuration_unset.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_effect_receipt",maximum_millis:15e3},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","timed_out","failed","effect_unknown","partial"],decodeRequest:Sp(84),decodeResult:Sp(72),decodeSuccess:e=>mE(e,"binding.http.configuration_unset.v1","schema.application.configuration.configuration_unset.result",1,["completed","timed_out","failed","effect_unknown","partial"],{mode:"not_cancellable"},"durable_effect","required",Sp(72))},{operation:"constructors",operationId:"operation.application.constructors",transport:{kind:"mcp_tool",toolName:"tracedecay_constructors"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.constructors.v1",requestSchema:{schemaId:"schema.application.primitive.constructors.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.constructors.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(85),decodeResult:Sp(86)},{operation:"context",operationId:"operation.application.context",transport:{kind:"mcp_tool",toolName:"tracedecay_context"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.context.v1",requestSchema:{schemaId:"schema.application.primitive.context.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.context.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(87),decodeResult:Sp(88)},{operation:"application_context_scout_budget",operationId:"operation.application.context_scout_budget",transport:{kind:"http",route:"/application/context-scout/context_scout_budget",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.context_scout_budget.v1",requestSchema:{schemaId:"schema.application.context-scout-budget.request",revision:1},resultSchema:{schemaId:"schema.application.context-scout-budget.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:15e3},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:Sp(89),decodeResult:Sp(90),decodeSuccess:e=>mE(e,"binding.http.context_scout_budget.v1","schema.application.context-scout-budget.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(90))},{operation:"application_context_scout_cancel",operationId:"operation.application.context_scout_cancel",transport:{kind:"http",route:"/application/context-scout/context_scout_cancel",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.context_scout_cancel.v1",requestSchema:{schemaId:"schema.application.context-scout-cancel.request",revision:1},resultSchema:{schemaId:"schema.application.context-scout-cancel.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_effect_receipt",maximum_millis:15e3},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","timed_out","failed","effect_unknown","partial"],decodeRequest:Sp(91),decodeResult:Sp(92),decodeSuccess:e=>mE(e,"binding.http.context_scout_cancel.v1","schema.application.context-scout-cancel.result",1,["completed","timed_out","failed","effect_unknown","partial"],{mode:"not_cancellable"},"durable_effect","required",Sp(92))},{operation:"application_context_scout_capability",operationId:"operation.application.context_scout_capability",transport:{kind:"http",route:"/application/context-scout/context_scout_capability",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.context_scout_capability.v1",requestSchema:{schemaId:"schema.application.context-scout-capability.request",revision:1},resultSchema:{schemaId:"schema.application.context-scout-capability.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:15e3},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:Sp(89),decodeResult:Sp(93),decodeSuccess:e=>mE(e,"binding.http.context_scout_capability.v1","schema.application.context-scout-capability.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(93))},{operation:"application_context_scout_claim",operationId:"operation.application.context_scout_claim",transport:{kind:"http",route:"/application/context-scout/context_scout_claim",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.context_scout_claim.v1",requestSchema:{schemaId:"schema.application.context-scout-claim.request",revision:1},resultSchema:{schemaId:"schema.application.context-scout-claim.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_effect_receipt",maximum_millis:15e3},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","timed_out","failed","effect_unknown","partial"],decodeRequest:Sp(94),decodeResult:Sp(95),decodeSuccess:e=>mE(e,"binding.http.context_scout_claim.v1","schema.application.context-scout-claim.result",1,["completed","timed_out","failed","effect_unknown","partial"],{mode:"not_cancellable"},"durable_effect","required",Sp(95))},{operation:"application_context_scout_delivery",operationId:"operation.application.context_scout_delivery",transport:{kind:"http",route:"/application/context-scout/context_scout_delivery",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.context_scout_delivery.v1",requestSchema:{schemaId:"schema.application.context-scout-delivery.request",revision:1},resultSchema:{schemaId:"schema.application.context-scout-delivery.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_effect_receipt",maximum_millis:15e3},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","timed_out","failed","effect_unknown","partial"],decodeRequest:Sp(96),decodeResult:Sp(97),decodeSuccess:e=>mE(e,"binding.http.context_scout_delivery.v1","schema.application.context-scout-delivery.result",1,["completed","timed_out","failed","effect_unknown","partial"],{mode:"not_cancellable"},"durable_effect","required",Sp(97))},{operation:"application_context_scout_explain",operationId:"operation.application.context_scout_explain",transport:{kind:"http",route:"/application/context-scout/context_scout_explain",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.context_scout_explain.v1",requestSchema:{schemaId:"schema.application.context-scout-explain.request",revision:1},resultSchema:{schemaId:"schema.application.context-scout-explain.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:15e3},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:Sp(98),decodeResult:Sp(99),decodeSuccess:e=>mE(e,"binding.http.context_scout_explain.v1","schema.application.context-scout-explain.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(99))},{operation:"application_context_scout_feedback",operationId:"operation.application.context_scout_feedback",transport:{kind:"http",route:"/application/context-scout/context_scout_feedback",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.context_scout_feedback.v1",requestSchema:{schemaId:"schema.application.context-scout-feedback.request",revision:1},resultSchema:{schemaId:"schema.application.context-scout-feedback.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_effect_receipt",maximum_millis:15e3},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","timed_out","failed","effect_unknown","partial"],decodeRequest:Sp(100),decodeResult:Sp(92),decodeSuccess:e=>mE(e,"binding.http.context_scout_feedback.v1","schema.application.context-scout-feedback.result",1,["completed","timed_out","failed","effect_unknown","partial"],{mode:"not_cancellable"},"durable_effect","required",Sp(92))},{operation:"application_context_scout_pause",operationId:"operation.application.context_scout_pause",transport:{kind:"http",route:"/application/context-scout/context_scout_pause",method:"POST"},effect:"configuration_write",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.context_scout_pause.v1",requestSchema:{schemaId:"schema.application.context-scout-pause.request",revision:1},resultSchema:{schemaId:"schema.application.context-scout-pause.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_effect_receipt",maximum_millis:15e3},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","timed_out","failed","effect_unknown","partial"],decodeRequest:Sp(101),decodeResult:Sp(72),decodeSuccess:e=>mE(e,"binding.http.context_scout_pause.v1","schema.application.context-scout-pause.result",1,["completed","timed_out","failed","effect_unknown","partial"],{mode:"not_cancellable"},"durable_effect","required",Sp(72))},{operation:"application_context_scout_recent",operationId:"operation.application.context_scout_recent",transport:{kind:"http",route:"/application/context-scout/context_scout_recent",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.context_scout_recent.v1",requestSchema:{schemaId:"schema.application.context-scout-recent.request",revision:1},resultSchema:{schemaId:"schema.application.context-scout-recent.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:15e3},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:Sp(98),decodeResult:Sp(102),decodeSuccess:e=>mE(e,"binding.http.context_scout_recent.v1","schema.application.context-scout-recent.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(102))},{operation:"application_context_scout_resume",operationId:"operation.application.context_scout_resume",transport:{kind:"http",route:"/application/context-scout/context_scout_resume",method:"POST"},effect:"configuration_write",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.context_scout_resume.v1",requestSchema:{schemaId:"schema.application.context-scout-resume.request",revision:1},resultSchema:{schemaId:"schema.application.context-scout-resume.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_effect_receipt",maximum_millis:15e3},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","timed_out","failed","effect_unknown","partial"],decodeRequest:Sp(101),decodeResult:Sp(72),decodeSuccess:e=>mE(e,"binding.http.context_scout_resume.v1","schema.application.context-scout-resume.result",1,["completed","timed_out","failed","effect_unknown","partial"],{mode:"not_cancellable"},"durable_effect","required",Sp(72))},{operation:"application_context_scout_status",operationId:"operation.application.context_scout_status",transport:{kind:"http",route:"/application/context-scout/context_scout_status",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.context_scout_status.v1",requestSchema:{schemaId:"schema.application.context-scout-status.request",revision:1},resultSchema:{schemaId:"schema.application.context-scout-status.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:15e3},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:Sp(89),decodeResult:Sp(103),decodeSuccess:e=>mE(e,"binding.http.context_scout_status.v1","schema.application.context-scout-status.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(103))},{operation:"coupling",operationId:"operation.application.coupling",transport:{kind:"mcp_tool",toolName:"tracedecay_coupling"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.coupling.v1",requestSchema:{schemaId:"schema.application.primitive.coupling.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.coupling.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(104),decodeResult:Sp(105)},{operation:"dashboard",operationId:"operation.application.dashboard",transport:{kind:"mcp_tool",toolName:"tracedecay_dashboard"},effect:"binds_server",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.dashboard.v1",requestSchema:{schemaId:"schema.application.primitive.dashboard.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.dashboard.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","timed_out","failed","unavailable","partial"],decodeRequest:Sp(106),decodeResult:Sp(107)},{operation:"dead_code",operationId:"operation.application.dead_code",transport:{kind:"mcp_tool",toolName:"tracedecay_dead_code"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.dead_code.v1",requestSchema:{schemaId:"schema.application.primitive.dead-code.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.dead-code.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(108),decodeResult:Sp(109)},{operation:"dependency_depth",operationId:"operation.application.dependency_depth",transport:{kind:"mcp_tool",toolName:"tracedecay_dependency_depth"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.dependency_depth.v1",requestSchema:{schemaId:"schema.application.primitive.dependency-depth.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.dependency-depth.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(110),decodeResult:Sp(111)},{operation:"derives",operationId:"operation.application.derives",transport:{kind:"mcp_tool",toolName:"tracedecay_derives"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.derives.v1",requestSchema:{schemaId:"schema.application.primitive.derives.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.derives.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(112),decodeResult:Sp(113)},{operation:"diagnose",operationId:"operation.application.diagnose",transport:{kind:"mcp_tool",toolName:"tracedecay_diagnose"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.diagnose.v1",requestSchema:{schemaId:"schema.application.primitive.diagnose.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.diagnose.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(114),decodeResult:Sp(115)},{operation:"application_diagnostics_read",operationId:"operation.application.diagnostics_read",transport:{kind:"http",route:"/application/primitives/diagnostics_read",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.diagnostics_read.v1",requestSchema:{schemaId:"schema.application.primitive.diagnostics-read.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.diagnostics-read.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(116),decodeResult:Sp(117),decodeSuccess:e=>mE(e,"binding.http.diagnostics_read.v1","schema.application.primitive.diagnostics-read.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(117))},{operation:"diff_context",operationId:"operation.application.diff_context",transport:{kind:"mcp_tool",toolName:"tracedecay_diff_context"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.diff_context.v1",requestSchema:{schemaId:"schema.application.primitive.diff-context.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.diff-context.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(118),decodeResult:Sp(119)},{operation:"distribution",operationId:"operation.application.distribution",transport:{kind:"mcp_tool",toolName:"tracedecay_distribution"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.distribution.v1",requestSchema:{schemaId:"schema.application.primitive.distribution.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.distribution.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(120),decodeResult:Sp(121)},{operation:"doc_coverage",operationId:"operation.application.doc_coverage",transport:{kind:"mcp_tool",toolName:"tracedecay_doc_coverage"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.doc_coverage.v1",requestSchema:{schemaId:"schema.application.primitive.doc-coverage.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.doc-coverage.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(122),decodeResult:Sp(123)},{operation:"dsm",operationId:"operation.application.dsm",transport:{kind:"mcp_tool",toolName:"tracedecay_dsm"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.dsm.v1",requestSchema:{schemaId:"schema.application.primitive.dsm.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.dsm.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(124),decodeResult:Sp(125)},{operation:"application_fact_feedback",operationId:"operation.application.fact_feedback",transport:{kind:"http",route:"/application/retained/fact_feedback",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.fact_feedback.v1",requestSchema:{schemaId:"schema.application.retained.fact-feedback.request",revision:1},resultSchema:{schemaId:"schema.application.retained.fact-feedback.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","reconciling","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","unavailable","effect_unknown","partial"],decodeRequest:Sp(126),decodeResult:Sp(127),decodeSuccess:e=>mE(e,"binding.http.fact_feedback.v1","schema.application.retained.fact-feedback.result",1,["completed","cancelled","timed_out","failed","unavailable","effect_unknown","partial"],{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","reconciling","after_commit"]},"durable_effect","required",Sp(127))},{operation:"application_fact_store_add",operationId:"operation.application.fact_store_add",transport:{kind:"http",route:"/application/retained/fact_store_add",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.fact_store_add.v1",requestSchema:{schemaId:"schema.application.retained.fact-store-add.request",revision:1},resultSchema:{schemaId:"schema.application.retained.fact-store-add.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","reconciling","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","unavailable","effect_unknown","partial"],decodeRequest:Sp(128),decodeResult:Sp(129),decodeSuccess:e=>mE(e,"binding.http.fact_store_add.v1","schema.application.retained.fact-store-add.result",1,["completed","cancelled","timed_out","failed","unavailable","effect_unknown","partial"],{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","reconciling","after_commit"]},"durable_effect","required",Sp(129))},{operation:"application_fact_store_contradict",operationId:"operation.application.fact_store_contradict",transport:{kind:"http",route:"/application/retained/fact_store_contradict",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.fact_store_contradict.v1",requestSchema:{schemaId:"schema.application.retained.fact-store-contradict.request",revision:1},resultSchema:{schemaId:"schema.application.retained.fact-store-contradict.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(130),decodeResult:Sp(131),decodeSuccess:e=>mE(e,"binding.http.fact_store_contradict.v1","schema.application.retained.fact-store-contradict.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(131))},{operation:"application_fact_store_curate",operationId:"operation.application.fact_store_curate",transport:{kind:"http",route:"/application/retained/fact_store_curate",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"required",resultSemantics:"fact_store_curate_receipt",bindingId:"binding.http.fact_store_curate.v1",requestSchema:{schemaId:"schema.application.retained.fact-store-curate.request",revision:1},resultSchema:{schemaId:"schema.application.retained.fact-store-curate.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","reconciling","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:9e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","unavailable","effect_unknown","partial"],decodeRequest:Sp(132),decodeResult:Sp(133),decodeSuccess:e=>mE(e,"binding.http.fact_store_curate.v1","schema.application.retained.fact-store-curate.result",1,["completed","cancelled","timed_out","failed","unavailable","effect_unknown","partial"],{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","reconciling","after_commit"]},"durable_effect","required",Sp(133))},{operation:"application_fact_store_get",operationId:"operation.application.fact_store_get",transport:{kind:"http",route:"/application/retained/fact_store_get",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.fact_store_get.v1",requestSchema:{schemaId:"schema.application.retained.fact-store-get.request",revision:1},resultSchema:{schemaId:"schema.application.retained.fact-store-get.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(134),decodeResult:Sp(135),decodeSuccess:e=>mE(e,"binding.http.fact_store_get.v1","schema.application.retained.fact-store-get.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(135))},{operation:"application_fact_store_list",operationId:"operation.application.fact_store_list",transport:{kind:"http",route:"/application/retained/fact_store_list",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.fact_store_list.v1",requestSchema:{schemaId:"schema.application.retained.fact-store-list.request",revision:1},resultSchema:{schemaId:"schema.application.retained.fact-store-list.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(136),decodeResult:Sp(137),decodeSuccess:e=>mE(e,"binding.http.fact_store_list.v1","schema.application.retained.fact-store-list.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(137))},{operation:"application_fact_store_probe",operationId:"operation.application.fact_store_probe",transport:{kind:"http",route:"/application/retained/fact_store_probe",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.fact_store_probe.v1",requestSchema:{schemaId:"schema.application.retained.fact-store-probe.request",revision:1},resultSchema:{schemaId:"schema.application.retained.fact-store-probe.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(138),decodeResult:Sp(139),decodeSuccess:e=>mE(e,"binding.http.fact_store_probe.v1","schema.application.retained.fact-store-probe.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(139))},{operation:"application_fact_store_reason",operationId:"operation.application.fact_store_reason",transport:{kind:"http",route:"/application/retained/fact_store_reason",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.fact_store_reason.v1",requestSchema:{schemaId:"schema.application.retained.fact-store-reason.request",revision:1},resultSchema:{schemaId:"schema.application.retained.fact-store-reason.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(140),decodeResult:Sp(141),decodeSuccess:e=>mE(e,"binding.http.fact_store_reason.v1","schema.application.retained.fact-store-reason.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(141))},{operation:"application_fact_store_related",operationId:"operation.application.fact_store_related",transport:{kind:"http",route:"/application/retained/fact_store_related",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.fact_store_related.v1",requestSchema:{schemaId:"schema.application.retained.fact-store-related.request",revision:1},resultSchema:{schemaId:"schema.application.retained.fact-store-related.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(142),decodeResult:Sp(143),decodeSuccess:e=>mE(e,"binding.http.fact_store_related.v1","schema.application.retained.fact-store-related.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(143))},{operation:"application_fact_store_remove",operationId:"operation.application.fact_store_remove",transport:{kind:"http",route:"/application/retained/fact_store_remove",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.fact_store_remove.v1",requestSchema:{schemaId:"schema.application.retained.fact-store-remove.request",revision:1},resultSchema:{schemaId:"schema.application.retained.fact-store-remove.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","reconciling","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","unavailable","effect_unknown","partial"],decodeRequest:Sp(144),decodeResult:Sp(145),decodeSuccess:e=>mE(e,"binding.http.fact_store_remove.v1","schema.application.retained.fact-store-remove.result",1,["completed","cancelled","timed_out","failed","unavailable","effect_unknown","partial"],{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","reconciling","after_commit"]},"durable_effect","required",Sp(145))},{operation:"application_fact_store_search",operationId:"operation.application.fact_store_search",transport:{kind:"http",route:"/application/retained/fact_store_search",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.fact_store_search.v1",requestSchema:{schemaId:"schema.application.retained.fact-store-search.request",revision:1},resultSchema:{schemaId:"schema.application.retained.fact-store-search.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(146),decodeResult:Sp(147),decodeSuccess:e=>mE(e,"binding.http.fact_store_search.v1","schema.application.retained.fact-store-search.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(147))},{operation:"application_fact_store_supersede",operationId:"operation.application.fact_store_supersede",transport:{kind:"http",route:"/application/retained/fact_store_supersede",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.fact_store_supersede.v1",requestSchema:{schemaId:"schema.application.retained.fact-store-supersede.request",revision:1},resultSchema:{schemaId:"schema.application.retained.fact-store-supersede.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","reconciling","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","unavailable","effect_unknown","partial"],decodeRequest:Sp(148),decodeResult:Sp(149),decodeSuccess:e=>mE(e,"binding.http.fact_store_supersede.v1","schema.application.retained.fact-store-supersede.result",1,["completed","cancelled","timed_out","failed","unavailable","effect_unknown","partial"],{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","reconciling","after_commit"]},"durable_effect","required",Sp(149))},{operation:"application_fact_store_update",operationId:"operation.application.fact_store_update",transport:{kind:"http",route:"/application/retained/fact_store_update",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.fact_store_update.v1",requestSchema:{schemaId:"schema.application.retained.fact-store-update.request",revision:1},resultSchema:{schemaId:"schema.application.retained.fact-store-update.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","reconciling","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","unavailable","effect_unknown","partial"],decodeRequest:Sp(150),decodeResult:Sp(151),decodeSuccess:e=>mE(e,"binding.http.fact_store_update.v1","schema.application.retained.fact-store-update.result",1,["completed","cancelled","timed_out","failed","unavailable","effect_unknown","partial"],{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","reconciling","after_commit"]},"durable_effect","required",Sp(151))},{operation:"application_feedback_advisory_cycle",operationId:"operation.application.feedback_advisory_cycle",transport:{kind:"http",route:"/application/feedback/advisory_cycle",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.feedback_advisory_cycle.v1",requestSchema:{schemaId:"schema.application.feedback.advisory-cycle.request",revision:1},resultSchema:{schemaId:"schema.application.feedback.advisory-cycle.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:15e3},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(152),decodeResult:Sp(153),decodeSuccess:e=>mE(e,"binding.http.feedback_advisory_cycle.v1","schema.application.feedback.advisory-cycle.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(153))},{operation:"application_feedback_diagnostics",operationId:"operation.application.feedback_diagnostics",transport:{kind:"http",route:"/application/feedback/diagnostics",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.feedback_diagnostics.v1",requestSchema:{schemaId:"schema.application.feedback.diagnostics.request",revision:1},resultSchema:{schemaId:"schema.application.feedback.diagnostics.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:15e3},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(10),decodeResult:Sp(154),decodeSuccess:e=>mE(e,"binding.http.feedback_diagnostics.v1","schema.application.feedback.diagnostics.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(154))},{operation:"application_feedback_expand",operationId:"operation.application.feedback_expand",transport:{kind:"http",route:"/application/feedback/expand",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.feedback_expand.v1",requestSchema:{schemaId:"schema.application.feedback.expand.request",revision:1},resultSchema:{schemaId:"schema.application.feedback.expand.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:15e3},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(10),decodeResult:Sp(155),decodeSuccess:e=>mE(e,"binding.http.feedback_expand.v1","schema.application.feedback.expand.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(155))},{operation:"application_feedback_get",operationId:"operation.application.feedback_get",transport:{kind:"http",route:"/application/feedback/get",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.feedback_get.v1",requestSchema:{schemaId:"schema.application.feedback.get.request",revision:1},resultSchema:{schemaId:"schema.application.feedback.get.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:15e3},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(10),decodeResult:Sp(156),decodeSuccess:e=>mE(e,"binding.http.feedback_get.v1","schema.application.feedback.get.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(156))},{operation:"application_feedback_impact",operationId:"operation.application.feedback_impact",transport:{kind:"http",route:"/application/feedback/impact",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.feedback_impact.v1",requestSchema:{schemaId:"schema.application.feedback.impact.request",revision:1},resultSchema:{schemaId:"schema.application.feedback.impact.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:15e3},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(10),decodeResult:Sp(157),decodeSuccess:e=>mE(e,"binding.http.feedback_impact.v1","schema.application.feedback.impact.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(157))},{operation:"application_feedback_list",operationId:"operation.application.feedback_list",transport:{kind:"http",route:"/application/feedback/list",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.feedback_list.v1",requestSchema:{schemaId:"schema.application.feedback.list.request",revision:1},resultSchema:{schemaId:"schema.application.feedback.list.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:15e3},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(10),decodeResult:Sp(158),decodeSuccess:e=>mE(e,"binding.http.feedback_list.v1","schema.application.feedback.list.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(158))},{operation:"application_feedback_proximity",operationId:"operation.application.feedback_proximity",transport:{kind:"http",route:"/application/feedback/proximity",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.feedback_proximity.v1",requestSchema:{schemaId:"schema.application.feedback.proximity.request",revision:1},resultSchema:{schemaId:"schema.application.feedback.proximity.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:15e3},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(159),decodeResult:Sp(160),decodeSuccess:e=>mE(e,"binding.http.feedback_proximity.v1","schema.application.feedback.proximity.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(160))},{operation:"field_sites",operationId:"operation.application.field_sites",transport:{kind:"mcp_tool",toolName:"tracedecay_field_sites"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.field_sites.v1",requestSchema:{schemaId:"schema.application.primitive.field-sites.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.field-sites.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(161),decodeResult:Sp(162)},{operation:"application_file_dependents",operationId:"operation.application.file_dependents",transport:{kind:"http",route:"/application/primitives/file_dependents",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.file_dependents.v1",requestSchema:{schemaId:"schema.application.primitive.file-dependents.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.file-dependents.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(163),decodeResult:Sp(164),decodeSuccess:e=>mE(e,"binding.http.file_dependents.v1","schema.application.primitive.file-dependents.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(164))},{operation:"files",operationId:"operation.application.files",transport:{kind:"mcp_tool",toolName:"tracedecay_files"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.files.v1",requestSchema:{schemaId:"schema.application.primitive.files.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.files.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(165),decodeResult:Sp(166)},{operation:"find_exact_symbol",operationId:"operation.application.find_exact_symbol",transport:{kind:"mcp_tool",toolName:"tracedecay_find_exact_symbol"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.find_exact_symbol.v1",requestSchema:{schemaId:"schema.application.primitive.find-exact-symbol.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.find-exact-symbol.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(167),decodeResult:Sp(168)},{operation:"gini",operationId:"operation.application.gini",transport:{kind:"mcp_tool",toolName:"tracedecay_gini"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.gini.v1",requestSchema:{schemaId:"schema.application.primitive.gini.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.gini.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(169),decodeResult:Sp(170)},{operation:"git_apply",operationId:"operation.application.git_apply",transport:{kind:"mcp_tool",toolName:"tracedecay_git_apply"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.git_apply.v1",requestSchema:{schemaId:"schema.application.git.apply.request",revision:1},resultSchema:{schemaId:"schema.application.git.apply.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:Sp(171),decodeResult:Sp(172)},{operation:"application_git_blame",operationId:"operation.application.git_blame",transport:{kind:"http",route:"/application/git/blame",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.git_blame.v1",requestSchema:{schemaId:"schema.application.git.blame.request",revision:1},resultSchema:{schemaId:"schema.application.git.blame.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:Sp(173),decodeResult:Sp(174),decodeSuccess:e=>mE(e,"binding.http.git_blame.v1","schema.application.git.blame.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(174))},{operation:"application_git_diff",operationId:"operation.application.git_diff",transport:{kind:"http",route:"/application/git/diff",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.git_diff.v1",requestSchema:{schemaId:"schema.application.git.diff.request",revision:1},resultSchema:{schemaId:"schema.application.git.diff.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:Sp(175),decodeResult:Sp(174),decodeSuccess:e=>mE(e,"binding.http.git_diff.v1","schema.application.git.diff.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(174))},{operation:"application_git_history",operationId:"operation.application.git_history",transport:{kind:"http",route:"/application/git/history",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.git_history.v1",requestSchema:{schemaId:"schema.application.git.history.request",revision:1},resultSchema:{schemaId:"schema.application.git.history.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:Sp(176),decodeResult:Sp(174),decodeSuccess:e=>mE(e,"binding.http.git_history.v1","schema.application.git.history.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(174))},{operation:"application_git_hunks",operationId:"operation.application.git_hunks",transport:{kind:"http",route:"/application/git/hunks",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.git_hunks.v1",requestSchema:{schemaId:"schema.application.git.hunks.request",revision:1},resultSchema:{schemaId:"schema.application.git.hunks.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:Sp(177),decodeResult:Sp(174),decodeSuccess:e=>mE(e,"binding.http.git_hunks.v1","schema.application.git.hunks.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(174))},{operation:"git_preview",operationId:"operation.application.git_preview",transport:{kind:"mcp_tool",toolName:"tracedecay_git_preview"},effect:"preview",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.git_preview.v1",requestSchema:{schemaId:"schema.application.git.preview.request",revision:1},resultSchema:{schemaId:"schema.application.git.preview.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:Sp(178),decodeResult:Sp(179)},{operation:"application_git_status",operationId:"operation.application.git_status",transport:{kind:"http",route:"/application/git/status",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.git_status.v1",requestSchema:{schemaId:"schema.application.git.status.request",revision:1},resultSchema:{schemaId:"schema.application.git.status.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:Sp(180),decodeResult:Sp(174),decodeSuccess:e=>mE(e,"binding.http.git_status.v1","schema.application.git.status.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(174))},{operation:"application_github_stack_signal_expand",operationId:"operation.application.github_stack_signal_expand",transport:{kind:"http",route:"/application/github-stack/signal-expand",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.github_stack_signal_expand.v1",requestSchema:{schemaId:"schema.application.github-stack.signal-expand.request",revision:1},resultSchema:{schemaId:"schema.application.github-stack.signal-expand.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:Sp(181),decodeResult:Sp(182),decodeSuccess:e=>mE(e,"binding.http.github_stack_signal_expand.v1","schema.application.github-stack.signal-expand.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(182))},{operation:"god_class",operationId:"operation.application.god_class",transport:{kind:"mcp_tool",toolName:"tracedecay_god_class"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.god_class.v1",requestSchema:{schemaId:"schema.application.primitive.god-class.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.god-class.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(183),decodeResult:Sp(184)},{operation:"grep",operationId:"operation.application.grep",transport:{kind:"mcp_tool",toolName:"tracedecay_grep"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.grep.v1",requestSchema:{schemaId:"schema.application.primitive.grep.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.grep.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(185),decodeResult:Sp(186)},{operation:"health",operationId:"operation.application.health",transport:{kind:"mcp_tool",toolName:"tracedecay_health"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.health.v1",requestSchema:{schemaId:"schema.application.primitive.health.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.health.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(187),decodeResult:Sp(188)},{operation:"application_health_delta",operationId:"operation.application.health_delta",transport:{kind:"http",route:"/application/primitives/health_delta",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.health_delta.v1",requestSchema:{schemaId:"schema.application.primitive.health-delta.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.health-delta.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(189),decodeResult:Sp(190),decodeSuccess:e=>mE(e,"binding.http.health_delta.v1","schema.application.primitive.health-delta.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(190))},{operation:"application_health_read",operationId:"operation.application.health_read",transport:{kind:"http",route:"/application/primitives/health_read",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.health_read.v1",requestSchema:{schemaId:"schema.application.primitive.health-read.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.health-read.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(191),decodeResult:Sp(192),decodeSuccess:e=>mE(e,"binding.http.health_read.v1","schema.application.primitive.health-read.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(192))},{operation:"hermes_skill_bridge",operationId:"operation.application.hermes_skill_bridge",transport:{kind:"mcp_tool",toolName:"tracedecay_hermes_skill_bridge"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.hermes_skill_bridge.v1",requestSchema:{schemaId:"schema.application.primitive.hermes-skill-bridge.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.hermes-skill-bridge.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(193),decodeResult:Sp(194)},{operation:"hook_runtime",operationId:"operation.application.hook_runtime",transport:{kind:"mcp_tool",toolName:"tracedecay_hook_runtime"},effect:"records_host_evidence",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.hook_runtime.v1",requestSchema:{schemaId:"schema.application.primitive.hook-runtime.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.hook-runtime.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","timed_out","failed","unavailable","partial"],decodeRequest:Sp(195),decodeResult:Sp(196)},{operation:"hotspots",operationId:"operation.application.hotspots",transport:{kind:"mcp_tool",toolName:"tracedecay_hotspots"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.hotspots.v1",requestSchema:{schemaId:"schema.application.primitive.hotspots.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.hotspots.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(197),decodeResult:Sp(198)},{operation:"impact",operationId:"operation.application.impact",transport:{kind:"mcp_tool",toolName:"tracedecay_impact"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.impact.v1",requestSchema:{schemaId:"schema.application.primitive.impact.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.impact.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(199),decodeResult:Sp(200)},{operation:"inheritance_depth",operationId:"operation.application.inheritance_depth",transport:{kind:"mcp_tool",toolName:"tracedecay_inheritance_depth"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.inheritance_depth.v1",requestSchema:{schemaId:"schema.application.primitive.inheritance-depth.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.inheritance-depth.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(201),decodeResult:Sp(202)},{operation:"insert_at",operationId:"operation.application.insert_at",transport:{kind:"mcp_tool",toolName:"tracedecay_insert_at"},effect:"source_edit",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.insert_at.v1",requestSchema:{schemaId:"schema.application.source-edit.insert-at.request",revision:1},resultSchema:{schemaId:"schema.application.source-edit.insert-at.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:Sp(203),decodeResult:Sp(18)},{operation:"insert_at_symbol",operationId:"operation.application.insert_at_symbol",transport:{kind:"mcp_tool",toolName:"tracedecay_insert_at_symbol"},effect:"source_edit",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.insert_at_symbol.v1",requestSchema:{schemaId:"schema.application.source-edit.insert-at-symbol.request",revision:1},resultSchema:{schemaId:"schema.application.source-edit.insert-at-symbol.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:Sp(204),decodeResult:Sp(18)},{operation:"largest",operationId:"operation.application.largest",transport:{kind:"mcp_tool",toolName:"tracedecay_largest"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.largest.v1",requestSchema:{schemaId:"schema.application.primitive.largest.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.largest.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(205),decodeResult:Sp(206)},{operation:"application_lcm_describe",operationId:"operation.application.lcm_describe",transport:{kind:"http",route:"/application/retained/lcm_describe",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.lcm_describe.v1",requestSchema:{schemaId:"schema.application.retained.lcm-describe.request",revision:1},resultSchema:{schemaId:"schema.application.retained.lcm-describe.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(207),decodeResult:Sp(208),decodeSuccess:e=>mE(e,"binding.http.lcm_describe.v1","schema.application.retained.lcm-describe.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(208))},{operation:"application_lcm_doctor",operationId:"operation.application.lcm_doctor",transport:{kind:"http",route:"/application/retained/lcm_doctor",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.lcm_doctor.v1",requestSchema:{schemaId:"schema.application.retained.lcm-doctor.request",revision:1},resultSchema:{schemaId:"schema.application.retained.lcm-doctor.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(209),decodeResult:Sp(210),decodeSuccess:e=>mE(e,"binding.http.lcm_doctor.v1","schema.application.retained.lcm-doctor.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(210))},{operation:"application_lcm_expand",operationId:"operation.application.lcm_expand",transport:{kind:"http",route:"/application/retained/lcm_expand",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.lcm_expand.v1",requestSchema:{schemaId:"schema.application.retained.lcm-expand.request",revision:1},resultSchema:{schemaId:"schema.application.retained.lcm-expand.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(211),decodeResult:Sp(212),decodeSuccess:e=>mE(e,"binding.http.lcm_expand.v1","schema.application.retained.lcm-expand.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(212))},{operation:"application_lcm_expand_query",operationId:"operation.application.lcm_expand_query",transport:{kind:"http",route:"/application/retained/lcm_expand_query",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.lcm_expand_query.v1",requestSchema:{schemaId:"schema.application.retained.lcm-expand-query.request",revision:1},resultSchema:{schemaId:"schema.application.retained.lcm-expand-query.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(213),decodeResult:Sp(214),decodeSuccess:e=>mE(e,"binding.http.lcm_expand_query.v1","schema.application.retained.lcm-expand-query.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(214))},{operation:"application_lcm_grep",operationId:"operation.application.lcm_grep",transport:{kind:"http",route:"/application/retained/lcm_grep",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.lcm_grep.v1",requestSchema:{schemaId:"schema.application.retained.lcm-grep.request",revision:1},resultSchema:{schemaId:"schema.application.retained.lcm-grep.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(215),decodeResult:Sp(216),decodeSuccess:e=>mE(e,"binding.http.lcm_grep.v1","schema.application.retained.lcm-grep.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(216))},{operation:"application_lcm_load_session",operationId:"operation.application.lcm_load_session",transport:{kind:"http",route:"/application/retained/lcm_load_session",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.lcm_load_session.v1",requestSchema:{schemaId:"schema.application.retained.lcm-load-session.request",revision:1},resultSchema:{schemaId:"schema.application.retained.lcm-load-session.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(217),decodeResult:Sp(218),decodeSuccess:e=>mE(e,"binding.http.lcm_load_session.v1","schema.application.retained.lcm-load-session.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(218))},{operation:"application_lcm_status",operationId:"operation.application.lcm_status",transport:{kind:"http",route:"/application/retained/lcm_status",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.lcm_status.v1",requestSchema:{schemaId:"schema.application.retained.lcm-status.request",revision:1},resultSchema:{schemaId:"schema.application.retained.lcm-status.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(219),decodeResult:Sp(220),decodeSuccess:e=>mE(e,"binding.http.lcm_status.v1","schema.application.retained.lcm-status.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(220))},{operation:"application_memory_status",operationId:"operation.application.memory_status",transport:{kind:"http",route:"/application/retained/memory_status",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.memory_status.v1",requestSchema:{schemaId:"schema.application.retained.memory-status.request",revision:1},resultSchema:{schemaId:"schema.application.retained.memory-status.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(221),decodeResult:Sp(222),decodeSuccess:e=>mE(e,"binding.http.memory_status.v1","schema.application.retained.memory-status.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(222))},{operation:"application_message_search",operationId:"operation.application.message_search",transport:{kind:"http",route:"/application/retained/message_search",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.message_search.v1",requestSchema:{schemaId:"schema.application.retained.message-search.request",revision:1},resultSchema:{schemaId:"schema.application.retained.message-search.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(223),decodeResult:Sp(224),decodeSuccess:e=>mE(e,"binding.http.message_search.v1","schema.application.retained.message-search.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(224))},{operation:"application_module_api",operationId:"operation.application.module_api",transport:{kind:"http",route:"/application/primitives/module_api",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.module_api.v1",requestSchema:{schemaId:"schema.application.primitive.module-api.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.module-api.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(225),decodeResult:Sp(226),decodeSuccess:e=>mE(e,"binding.http.module_api.v1","schema.application.primitive.module-api.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(226))},{operation:"move_symbol",operationId:"operation.application.move_symbol",transport:{kind:"mcp_tool",toolName:"tracedecay_move_symbol"},effect:"source_edit",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.move_symbol.v1",requestSchema:{schemaId:"schema.application.source-edit.move-symbol.request",revision:1},resultSchema:{schemaId:"schema.application.source-edit.move-symbol.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:Sp(227),decodeResult:Sp(18)},{operation:"multi_str_replace",operationId:"operation.application.multi_str_replace",transport:{kind:"mcp_tool",toolName:"tracedecay_multi_str_replace"},effect:"source_edit",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.multi_str_replace.v1",requestSchema:{schemaId:"schema.application.source-edit.multi-str-replace.request",revision:1},resultSchema:{schemaId:"schema.application.source-edit.multi-str-replace.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:Sp(228),decodeResult:Sp(18)},{operation:"native_integration_status",operationId:"operation.application.native_integration_status",transport:{kind:"mcp_tool",toolName:"tracedecay_native_integration_status"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.native_integration_status.v1",requestSchema:{schemaId:"schema.application.native-integration.status.request",revision:1},resultSchema:{schemaId:"schema.application.native-integration.status.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:Sp(229),decodeResult:Sp(15)},{operation:"node",operationId:"operation.application.node",transport:{kind:"mcp_tool",toolName:"tracedecay_node"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.node.v1",requestSchema:{schemaId:"schema.application.primitive.node.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.node.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(230),decodeResult:Sp(231)},{operation:"observatory_read",operationId:"operation.application.observatory_read",transport:{kind:"mcp_tool",toolName:"tracedecay_observatory_read"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.observatory_read.v1",requestSchema:{schemaId:"schema.application.observatory-read.request",revision:1},resultSchema:{schemaId:"schema.application.observatory-read.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:15e3},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(232),decodeResult:Sp(233)},{operation:"port_order",operationId:"operation.application.port_order",transport:{kind:"mcp_tool",toolName:"tracedecay_port_order"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.port_order.v1",requestSchema:{schemaId:"schema.application.primitive.port-order.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.port-order.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(234),decodeResult:Sp(235)},{operation:"port_status",operationId:"operation.application.port_status",transport:{kind:"mcp_tool",toolName:"tracedecay_port_status"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.port_status.v1",requestSchema:{schemaId:"schema.application.primitive.port-status.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.port-status.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(236),decodeResult:Sp(237)},{operation:"pr_context",operationId:"operation.application.pr_context",transport:{kind:"mcp_tool",toolName:"tracedecay_pr_context"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.pr_context.v1",requestSchema:{schemaId:"schema.application.primitive.pr-context.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.pr-context.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(238),decodeResult:Sp(239)},{operation:"preflight_native_integration",operationId:"operation.application.preflight_native_integration",transport:{kind:"mcp_tool",toolName:"tracedecay_preflight_native_integration"},effect:"preview",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.preflight_native_integration.v1",requestSchema:{schemaId:"schema.application.native-integration.preflight.request",revision:1},resultSchema:{schemaId:"schema.application.native-integration.preflight.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:Sp(240),decodeResult:Sp(15)},{operation:"project_context",operationId:"operation.application.project_context",transport:{kind:"mcp_tool",toolName:"tracedecay_project_context"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.project_context.v1",requestSchema:{schemaId:"schema.application.primitive.project-context.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.project-context.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(241),decodeResult:Sp(242)},{operation:"project_list",operationId:"operation.application.project_list",transport:{kind:"mcp_tool",toolName:"tracedecay_project_list"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.project_list.v1",requestSchema:{schemaId:"schema.application.primitive.project-list.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.project-list.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(243),decodeResult:Sp(244)},{operation:"project_search",operationId:"operation.application.project_search",transport:{kind:"mcp_tool",toolName:"tracedecay_project_search"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.project_search.v1",requestSchema:{schemaId:"schema.application.primitive.project-search.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.project-search.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(245),decodeResult:Sp(244)},{operation:"application_qualified_name",operationId:"operation.application.qualified_name",transport:{kind:"http",route:"/application/primitives/qualified_name",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.qualified_name.v1",requestSchema:{schemaId:"schema.application.primitive.qualified-name.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.qualified-name.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(246),decodeResult:Sp(247),decodeSuccess:e=>mE(e,"binding.http.qualified_name.v1","schema.application.primitive.qualified-name.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(247))},{operation:"rank",operationId:"operation.application.rank",transport:{kind:"mcp_tool",toolName:"tracedecay_rank"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.rank.v1",requestSchema:{schemaId:"schema.application.primitive.rank.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.rank.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(248),decodeResult:Sp(249)},{operation:"recursion",operationId:"operation.application.recursion",transport:{kind:"mcp_tool",toolName:"tracedecay_recursion"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.recursion.v1",requestSchema:{schemaId:"schema.application.primitive.recursion.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.recursion.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(250),decodeResult:Sp(251)},{operation:"redundancy",operationId:"operation.application.redundancy",transport:{kind:"mcp_tool",toolName:"tracedecay_redundancy"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.redundancy.v1",requestSchema:{schemaId:"schema.application.primitive.redundancy.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.redundancy.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(252),decodeResult:Sp(253)},{operation:"remote_status",operationId:"operation.application.remote_status",transport:{kind:"mcp_tool",toolName:"tracedecay_remote_status"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.remote_status.v1",requestSchema:{schemaId:"schema.application.primitive.remote-status.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.remote-status.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(254),decodeResult:Sp(255)},{operation:"rename_preview",operationId:"operation.application.rename_preview",transport:{kind:"mcp_tool",toolName:"tracedecay_rename_preview"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.rename_preview.v1",requestSchema:{schemaId:"schema.application.primitive.rename-preview.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.rename-preview.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(256),decodeResult:Sp(257)},{operation:"rename_symbol",operationId:"operation.application.rename_symbol",transport:{kind:"mcp_tool",toolName:"tracedecay_rename_symbol"},effect:"source_edit",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.rename_symbol.v1",requestSchema:{schemaId:"schema.application.source-edit.rename-symbol.request",revision:1},resultSchema:{schemaId:"schema.application.source-edit.rename-symbol.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:Sp(258),decodeResult:Sp(18)},{operation:"replace_symbol",operationId:"operation.application.replace_symbol",transport:{kind:"mcp_tool",toolName:"tracedecay_replace_symbol"},effect:"source_edit",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.replace_symbol.v1",requestSchema:{schemaId:"schema.application.source-edit.replace-symbol.request",revision:1},resultSchema:{schemaId:"schema.application.source-edit.replace-symbol.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:Sp(259),decodeResult:Sp(18)},{operation:"retrieve",operationId:"operation.application.retrieve",transport:{kind:"mcp_tool",toolName:"tracedecay_retrieve"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.retrieve.v1",requestSchema:{schemaId:"schema.application.primitive.retrieve.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.retrieve.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(260),decodeResult:Sp(261)},{operation:"run_affected_tests",operationId:"operation.application.run_affected_tests",transport:{kind:"mcp_tool",toolName:"tracedecay_run_affected_tests"},effect:"spawns_process",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.run_affected_tests.v1",requestSchema:{schemaId:"schema.application.primitive.run-affected-tests.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.run-affected-tests.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","effect_in_flight"]},deadline:{behavior:"return_operation_receipt",maximum_millis:6e5},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(262),decodeResult:Sp(263)},{operation:"runtime",operationId:"operation.application.runtime",transport:{kind:"mcp_tool",toolName:"tracedecay_runtime"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.runtime.v1",requestSchema:{schemaId:"schema.application.primitive.runtime.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.runtime.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(264),decodeResult:Sp(265)},{operation:"search",operationId:"operation.application.search",transport:{kind:"mcp_tool",toolName:"tracedecay_search"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.search.v1",requestSchema:{schemaId:"schema.application.primitive.search.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.search.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(266),decodeResult:Sp(267)},{operation:"session_lookup",operationId:"operation.application.session_lookup",transport:{kind:"mcp_tool",toolName:"tracedecay_session_lookup"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.session_lookup.v1",requestSchema:{schemaId:"schema.application.primitive.session-lookup.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.session-lookup.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(268),decodeResult:Sp(269)},{operation:"application_session_refresh_begin",operationId:"operation.application.session_refresh_begin",transport:{kind:"http",route:"/application/retained/session_refresh_begin",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.session_refresh_begin.v1",requestSchema:{schemaId:"schema.application.retained.session-refresh-begin.request",revision:1},resultSchema:{schemaId:"schema.application.retained.session-refresh-begin.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","reconciling","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","unavailable","effect_unknown","partial"],decodeRequest:Sp(270),decodeResult:Sp(271),decodeSuccess:e=>mE(e,"binding.http.session_refresh_begin.v1","schema.application.retained.session-refresh-begin.result",1,["completed","cancelled","timed_out","failed","unavailable","effect_unknown","partial"],{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","reconciling","after_commit"]},"durable_effect","required",Sp(271))},{operation:"application_session_refresh_cancel",operationId:"operation.application.session_refresh_cancel",transport:{kind:"http",route:"/application/retained/session_refresh_cancel",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.session_refresh_cancel.v1",requestSchema:{schemaId:"schema.application.retained.session-refresh-cancel.request",revision:1},resultSchema:{schemaId:"schema.application.retained.session-refresh-cancel.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","reconciling","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","unavailable","effect_unknown","partial"],decodeRequest:Sp(270),decodeResult:Sp(272),decodeSuccess:e=>mE(e,"binding.http.session_refresh_cancel.v1","schema.application.retained.session-refresh-cancel.result",1,["completed","cancelled","timed_out","failed","unavailable","effect_unknown","partial"],{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","reconciling","after_commit"]},"durable_effect","required",Sp(272))},{operation:"application_session_refresh_status",operationId:"operation.application.session_refresh_status",transport:{kind:"http",route:"/application/retained/session_refresh_status",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.session_refresh_status.v1",requestSchema:{schemaId:"schema.application.retained.session-refresh-status.request",revision:1},resultSchema:{schemaId:"schema.application.retained.session-refresh-status.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(270),decodeResult:Sp(273),decodeSuccess:e=>mE(e,"binding.http.session_refresh_status.v1","schema.application.retained.session-refresh-status.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(273))},{operation:"application_sessions_for",operationId:"operation.application.sessions_for",transport:{kind:"http",route:"/application/retained/sessions_for",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.sessions_for.v1",requestSchema:{schemaId:"schema.application.retained.sessions-for.request",revision:1},resultSchema:{schemaId:"schema.application.retained.sessions-for.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(274),decodeResult:Sp(275),decodeSuccess:e=>mE(e,"binding.http.sessions_for.v1","schema.application.retained.sessions-for.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(275))},{operation:"signature",operationId:"operation.application.signature",transport:{kind:"mcp_tool",toolName:"tracedecay_signature"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.signature.v1",requestSchema:{schemaId:"schema.application.primitive.signature.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.signature.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(112),decodeResult:Sp(276)},{operation:"similar",operationId:"operation.application.similar",transport:{kind:"mcp_tool",toolName:"tracedecay_similar"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.similar.v1",requestSchema:{schemaId:"schema.application.primitive.similar.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.similar.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(277),decodeResult:Sp(278)},{operation:"skill_list",operationId:"operation.application.skill_list",transport:{kind:"mcp_tool",toolName:"tracedecay_skill_list"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.skill_list.v1",requestSchema:{schemaId:"schema.application.primitive.skill-list.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.skill-list.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(279),decodeResult:Sp(280)},{operation:"skill_view",operationId:"operation.application.skill_view",transport:{kind:"mcp_tool",toolName:"tracedecay_skill_view"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.skill_view.v1",requestSchema:{schemaId:"schema.application.primitive.skill-view.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.skill-view.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(281),decodeResult:Sp(282)},{operation:"application_source_body",operationId:"operation.application.source_body",transport:{kind:"http",route:"/application/primitives/source_body",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.source_body.v1",requestSchema:{schemaId:"schema.application.primitive.source-body.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.source-body.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(283),decodeResult:Sp(284),decodeSuccess:e=>mE(e,"binding.http.source_body.v1","schema.application.primitive.source-body.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(284))},{operation:"source_edit_reconcile",operationId:"operation.application.source_edit_reconcile",transport:{kind:"mcp_tool",toolName:"tracedecay_source_edit_reconcile"},effect:"source_edit",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.source_edit_reconcile.v1",requestSchema:{schemaId:"schema.application.source-edit.reconcile.request",revision:1},resultSchema:{schemaId:"schema.application.source-edit.reconcile.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:Sp(285),decodeResult:Sp(18)},{operation:"application_source_lines",operationId:"operation.application.source_lines",transport:{kind:"http",route:"/application/primitives/source_lines",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.source_lines.v1",requestSchema:{schemaId:"schema.application.primitive.source-lines.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.source-lines.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(286),decodeResult:Sp(287),decodeSuccess:e=>mE(e,"binding.http.source_lines.v1","schema.application.primitive.source-lines.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(287))},{operation:"application_source_outline",operationId:"operation.application.source_outline",transport:{kind:"http",route:"/application/primitives/source_outline",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.source_outline.v1",requestSchema:{schemaId:"schema.application.primitive.source-outline.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.source-outline.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(288),decodeResult:Sp(289),decodeSuccess:e=>mE(e,"binding.http.source_outline.v1","schema.application.primitive.source-outline.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(289))},{operation:"stack_snapshot",operationId:"operation.application.stack_snapshot",transport:{kind:"mcp_tool",toolName:"tracedecay_stack_snapshot"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.stack_snapshot.v1",requestSchema:{schemaId:"schema.application.native-integration.stack-snapshot.request",revision:1},resultSchema:{schemaId:"schema.application.native-integration.stack-snapshot.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:Sp(290),decodeResult:Sp(15)},{operation:"status",operationId:"operation.application.status",transport:{kind:"mcp_tool",toolName:"tracedecay_status"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.status.v1",requestSchema:{schemaId:"schema.application.primitive.status.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.status.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(291),decodeResult:Sp(292)},{operation:"application_storage_status",operationId:"operation.application.storage_status",transport:{kind:"http",route:"/application/primitives/storage_status",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.storage_status.v1",requestSchema:{schemaId:"schema.application.primitive.storage-status.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.storage-status.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(293),decodeResult:Sp(294),decodeSuccess:e=>mE(e,"binding.http.storage_status.v1","schema.application.primitive.storage-status.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(294))},{operation:"str_replace",operationId:"operation.application.str_replace",transport:{kind:"mcp_tool",toolName:"tracedecay_str_replace"},effect:"source_edit",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.str_replace.v1",requestSchema:{schemaId:"schema.application.source-edit.str-replace.request",revision:1},resultSchema:{schemaId:"schema.application.source-edit.str-replace.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:Sp(295),decodeResult:Sp(18)},{operation:"test_map",operationId:"operation.application.test_map",transport:{kind:"mcp_tool",toolName:"tracedecay_test_map"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.test_map.v1",requestSchema:{schemaId:"schema.application.primitive.test-map.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.test-map.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(296),decodeResult:Sp(297)},{operation:"application_test_results",operationId:"operation.application.test_results",transport:{kind:"http",route:"/application/tests/results",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.test_results.v1",requestSchema:{schemaId:"schema.application.feedback.test-results.request",revision:1},resultSchema:{schemaId:"schema.application.feedback.test-results.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:15e3},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(298),decodeResult:Sp(299),decodeSuccess:e=>mE(e,"binding.http.test_results.v1","schema.application.feedback.test-results.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(299))},{operation:"test_risk",operationId:"operation.application.test_risk",transport:{kind:"mcp_tool",toolName:"tracedecay_test_risk"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.test_risk.v1",requestSchema:{schemaId:"schema.application.primitive.test-risk.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.test-risk.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(300),decodeResult:Sp(301)},{operation:"todos",operationId:"operation.application.todos",transport:{kind:"mcp_tool",toolName:"tracedecay_todos"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.todos.v1",requestSchema:{schemaId:"schema.application.primitive.todos.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.todos.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(302),decodeResult:Sp(303)},{operation:"unmounted_files",operationId:"operation.application.unmounted_files",transport:{kind:"mcp_tool",toolName:"tracedecay_unmounted_files"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.unmounted_files.v1",requestSchema:{schemaId:"schema.application.primitive.unmounted-files.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.unmounted-files.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(304),decodeResult:Sp(305)},{operation:"unsafe_patterns",operationId:"operation.application.unsafe_patterns",transport:{kind:"mcp_tool",toolName:"tracedecay_unsafe_patterns"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.unsafe_patterns.v1",requestSchema:{schemaId:"schema.application.primitive.unsafe-patterns.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.unsafe-patterns.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(306),decodeResult:Sp(307)},{operation:"application_workflows",operationId:"operation.application.workflows",transport:{kind:"http",route:"/application/retained/workflows",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.workflows.v1",requestSchema:{schemaId:"schema.application.retained.workflows.request",revision:1},resultSchema:{schemaId:"schema.application.retained.workflows.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(308),decodeResult:Sp(309),decodeSuccess:e=>mE(e,"binding.http.workflows.v1","schema.application.retained.workflows.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(309))},{operation:"application_worktree_cleanup_confirm",operationId:"operation.application.worktree_cleanup_confirm",transport:{kind:"http",route:"/application/native-integration/worktree_cleanup_confirm",method:"POST"},effect:"preview",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.worktree_cleanup_confirm.v1",requestSchema:{schemaId:"schema.application.native-integration.worktree-cleanup-confirm.request",revision:1},resultSchema:{schemaId:"schema.application.native-integration.worktree-cleanup-confirm.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:Sp(310),decodeResult:Sp(15),decodeSuccess:e=>mE(e,"binding.http.worktree_cleanup_confirm.v1","schema.application.native-integration.worktree-cleanup-confirm.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(15))},{operation:"application_worktree_cleanup_inspect",operationId:"operation.application.worktree_cleanup_inspect",transport:{kind:"http",route:"/application/native-integration/worktree_cleanup_inspect",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.worktree_cleanup_inspect.v1",requestSchema:{schemaId:"schema.application.native-integration.worktree-cleanup-inspect.request",revision:1},resultSchema:{schemaId:"schema.application.native-integration.worktree-cleanup-inspect.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:Sp(311),decodeResult:Sp(15),decodeSuccess:e=>mE(e,"binding.http.worktree_cleanup_inspect.v1","schema.application.native-integration.worktree-cleanup-inspect.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(15))},{operation:"application_worktree_cleanup_reconcile",operationId:"operation.application.worktree_cleanup_reconcile",transport:{kind:"http",route:"/application/native-integration/worktree_cleanup_reconcile",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.worktree_cleanup_reconcile.v1",requestSchema:{schemaId:"schema.application.native-integration.worktree-cleanup-reconcile.request",revision:1},resultSchema:{schemaId:"schema.application.native-integration.worktree-cleanup-reconcile.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:Sp(312),decodeResult:Sp(15),decodeSuccess:e=>mE(e,"binding.http.worktree_cleanup_reconcile.v1","schema.application.native-integration.worktree-cleanup-reconcile.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(15))},{operation:"application_worktree_cleanup_remove",operationId:"operation.application.worktree_cleanup_remove",transport:{kind:"http",route:"/application/native-integration/worktree_cleanup_remove",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.worktree_cleanup_remove.v1",requestSchema:{schemaId:"schema.application.native-integration.worktree-cleanup-remove.request",revision:1},resultSchema:{schemaId:"schema.application.native-integration.worktree-cleanup-remove.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:Sp(313),decodeResult:Sp(15),decodeSuccess:e=>mE(e,"binding.http.worktree_cleanup_remove.v1","schema.application.native-integration.worktree-cleanup-remove.result",1,["completed","cancelled","timed_out","failed","effect_unknown","partial"],{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},"durable_effect","required",Sp(15))},{operation:"application_worktree_inventory",operationId:"operation.application.worktree_inventory",transport:{kind:"http",route:"/application/native-integration/worktree_inventory",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.worktree_inventory.v1",requestSchema:{schemaId:"schema.application.native-integration.worktree-inventory.request",revision:1},resultSchema:{schemaId:"schema.application.native-integration.worktree-inventory.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:Sp(314),decodeResult:Sp(15),decodeSuccess:e=>mE(e,"binding.http.worktree_inventory.v1","schema.application.native-integration.worktree-inventory.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(15))},{operation:"handoff_issue_task_handoff",operationId:"operation.handoff.issue_task_handoff",transport:{kind:"http",route:"/application/handoff/issue-task",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.handoff.issue_task_handoff",requestSchema:{schemaId:"schema.handoff.issue_task_handoff.request",revision:1},resultSchema:{schemaId:"schema.handoff.issue_task_handoff.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","timed_out","failed","effect_unknown","partial"],decodeRequest:Sp(315),decodeResult:Sp(316),decodeSuccess:e=>mE(e,"binding.http.handoff.issue_task_handoff","schema.handoff.issue_task_handoff.result",1,["completed","timed_out","failed","effect_unknown","partial"],{mode:"not_cancellable"},"durable_effect","required",Sp(316))},{operation:"handoff_list_task_handoffs",operationId:"operation.handoff.list_task_handoffs",transport:{kind:"http",route:"/application/handoff/list-task",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.handoff.list_task_handoffs",requestSchema:{schemaId:"schema.handoff.list_task_handoffs.request",revision:1},resultSchema:{schemaId:"schema.handoff.list_task_handoffs.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","timed_out","failed","partial"],decodeRequest:Sp(317),decodeResult:Sp(318),decodeSuccess:e=>mE(e,"binding.http.handoff.list_task_handoffs","schema.handoff.list_task_handoffs.result",1,["completed","timed_out","failed","partial"],{mode:"not_cancellable"},"operation","not_required",Sp(318))},{operation:"handoff_open_investigation_handoff",operationId:"operation.handoff.open_investigation_handoff",transport:{kind:"http",route:"/application/handoff/open-investigation",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.handoff.open_investigation_handoff",requestSchema:{schemaId:"schema.handoff.open_investigation_handoff.request",revision:1},resultSchema:{schemaId:"schema.handoff.open_investigation_handoff.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","timed_out","failed","effect_unknown","partial"],decodeRequest:Sp(319),decodeResult:Sp(320),decodeSuccess:e=>mE(e,"binding.http.handoff.open_investigation_handoff","schema.handoff.open_investigation_handoff.result",1,["completed","timed_out","failed","effect_unknown","partial"],{mode:"not_cancellable"},"durable_effect","required",Sp(320))},{operation:"handoff_open_task_handoff",operationId:"operation.handoff.open_task_handoff",transport:{kind:"http",route:"/application/handoff/open-task",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.handoff.open_task_handoff",requestSchema:{schemaId:"schema.handoff.open_task_handoff.request",revision:1},resultSchema:{schemaId:"schema.handoff.open_task_handoff.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","timed_out","failed","effect_unknown","partial"],decodeRequest:Sp(321),decodeResult:Sp(322),decodeSuccess:e=>mE(e,"binding.http.handoff.open_task_handoff","schema.handoff.open_task_handoff.result",1,["completed","timed_out","failed","effect_unknown","partial"],{mode:"not_cancellable"},"durable_effect","required",Sp(322))},{operation:"multi_root_execute",operationId:"operation.multi_root.execute",transport:{kind:"http",route:"/application/multi-root/execute",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.multi_root.execute.v1",requestSchema:{schemaId:"schema.tracedecay.multi-root.execute-request.v1",revision:1},resultSchema:{schemaId:"schema.tracedecay.multi-root.execute-result.v1",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:Sp(323),decodeResult:Sp(324),decodeSuccess:e=>mE(e,"binding.http.multi_root.execute.v1","schema.tracedecay.multi-root.execute-result.v1",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(324))},{operation:"multi_root_scope_set_compare_and_swap",operationId:"operation.multi_root.scope_set_compare_and_swap",transport:{kind:"http",route:"/application/multi-root/scope-set/compare-and-swap",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.multi_root.scope_set_compare_and_swap.v1",requestSchema:{schemaId:"schema.tracedecay.multi-root.scope-set-compare-and-swap-request.v1",revision:1},resultSchema:{schemaId:"schema.tracedecay.multi-root.scope-set-compare-and-swap-result.v1",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:Sp(325),decodeResult:Sp(326),decodeSuccess:e=>mE(e,"binding.http.multi_root.scope_set_compare_and_swap.v1","schema.tracedecay.multi-root.scope-set-compare-and-swap-result.v1",1,["completed","cancelled","timed_out","failed","effect_unknown","partial"],{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},"durable_effect","required",Sp(326))},{operation:"multi_root_scope_set_read",operationId:"operation.multi_root.scope_set_read",transport:{kind:"http",route:"/application/multi-root/scope-set/read",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.multi_root.scope_set_read.v1",requestSchema:{schemaId:"schema.tracedecay.multi-root.scope-set-read-request.v1",revision:1},resultSchema:{schemaId:"schema.tracedecay.multi-root.scope-set-read-result.v1",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:Sp(327),decodeResult:Sp(328),decodeSuccess:e=>mE(e,"binding.http.multi_root.scope_set_read.v1","schema.tracedecay.multi-root.scope-set-read-result.v1",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(328))},{operation:"work_accept_proposal",operationId:"operation.work.accept_proposal",transport:{kind:"http",route:"/application/work/accept-proposal",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.accept_proposal",requestSchema:{schemaId:"schema.work.accept_proposal.request",revision:1},resultSchema:{schemaId:"schema.work.accept_proposal.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:Sp(329),decodeResult:Sp(330),decodeSuccess:e=>mE(e,"binding.http.work.accept_proposal","schema.work.accept_proposal.result",1,["completed","cancelled","timed_out","failed","effect_unknown","partial"],{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},"durable_effect","required",Sp(330))},{operation:"work_adjudicate_duplicate",operationId:"operation.work.adjudicate_duplicate",transport:{kind:"http",route:"/application/work/adjudicate-duplicate",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.adjudicate_duplicate",requestSchema:{schemaId:"schema.work.adjudicate_duplicate.request",revision:1},resultSchema:{schemaId:"schema.work.adjudicate_duplicate.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:Sp(331),decodeResult:Sp(332),decodeSuccess:e=>mE(e,"binding.http.work.adjudicate_duplicate","schema.work.adjudicate_duplicate.result",1,["completed","cancelled","timed_out","failed","effect_unknown","partial"],{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},"durable_effect","required",Sp(332))},{operation:"work_adjudicate_leak",operationId:"operation.work.adjudicate_leak",transport:{kind:"http",route:"/application/work/adjudicate-leak",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.adjudicate_leak",requestSchema:{schemaId:"schema.work.adjudicate_leak.request",revision:1},resultSchema:{schemaId:"schema.work.adjudicate_leak.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:Sp(333),decodeResult:Sp(334),decodeSuccess:e=>mE(e,"binding.http.work.adjudicate_leak","schema.work.adjudicate_leak.result",1,["completed","cancelled","timed_out","failed","effect_unknown","partial"],{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},"durable_effect","required",Sp(334))},{operation:"work_admit_execution",operationId:"operation.work.admit_execution",transport:{kind:"http",route:"/application/work/admit-execution",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.admit_execution",requestSchema:{schemaId:"schema.work.admit_execution.request",revision:1},resultSchema:{schemaId:"schema.work.admit_execution.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:Sp(335),decodeResult:Sp(336),decodeSuccess:e=>mE(e,"binding.http.work.admit_execution","schema.work.admit_execution.result",1,["completed","cancelled","timed_out","failed","effect_unknown","partial"],{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},"durable_effect","required",Sp(336))},{operation:"work_admit_placement",operationId:"operation.work.admit_placement",transport:{kind:"http",route:"/application/work/admit-placement",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.admit_placement",requestSchema:{schemaId:"schema.work.admit_placement.request",revision:1},resultSchema:{schemaId:"schema.work.admit_placement.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:Sp(337),decodeResult:Sp(338),decodeSuccess:e=>mE(e,"binding.http.work.admit_placement","schema.work.admit_placement.result",1,["completed","cancelled","timed_out","failed","effect_unknown","partial"],{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},"durable_effect","required",Sp(338))},{operation:"work_advance_job",operationId:"operation.work.advance_job",transport:{kind:"http",route:"/application/work/advance-job",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.advance_job",requestSchema:{schemaId:"schema.work.advance_job.request",revision:1},resultSchema:{schemaId:"schema.work.advance_job.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:Sp(339),decodeResult:Sp(340),decodeSuccess:e=>mE(e,"binding.http.work.advance_job","schema.work.advance_job.result",1,["completed","cancelled","timed_out","failed","effect_unknown","partial"],{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},"durable_effect","required",Sp(340))},{operation:"work_attempt_status",operationId:"operation.work.attempt_status",transport:{kind:"http",route:"/application/work/attempt-status",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.attempt_status",requestSchema:{schemaId:"schema.work.attempt_status.request",revision:1},resultSchema:{schemaId:"schema.work.attempt_status.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:Sp(341),decodeResult:Sp(342),decodeSuccess:e=>mE(e,"binding.http.work.attempt_status","schema.work.attempt_status.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(342))},{operation:"work_cancel_attempt",operationId:"operation.work.cancel_attempt",transport:{kind:"http",route:"/application/work/cancel-attempt",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.cancel_attempt",requestSchema:{schemaId:"schema.work.cancel_attempt.request",revision:1},resultSchema:{schemaId:"schema.work.cancel_attempt.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:Sp(343),decodeResult:Sp(342),decodeSuccess:e=>mE(e,"binding.http.work.cancel_attempt","schema.work.cancel_attempt.result",1,["completed","cancelled","timed_out","failed","effect_unknown","partial"],{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},"durable_effect","required",Sp(342))},{operation:"work_compare_proposal",operationId:"operation.work.compare_proposal",transport:{kind:"http",route:"/application/work/compare-proposal",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.compare_proposal",requestSchema:{schemaId:"schema.work.compare_proposal.request",revision:1},resultSchema:{schemaId:"schema.work.compare_proposal.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:Sp(344),decodeResult:Sp(345),decodeSuccess:e=>mE(e,"binding.http.work.compare_proposal","schema.work.compare_proposal.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(345))},{operation:"work_create",operationId:"operation.work.create",transport:{kind:"http",route:"/application/work/create",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.create",requestSchema:{schemaId:"schema.work.create.request",revision:1},resultSchema:{schemaId:"schema.work.create.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:Sp(346),decodeResult:Sp(330),decodeSuccess:e=>mE(e,"binding.http.work.create","schema.work.create.result",1,["completed","cancelled","timed_out","failed","effect_unknown","partial"],{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},"durable_effect","required",Sp(330))},{operation:"work_execution_history",operationId:"operation.work.execution_history",transport:{kind:"http",route:"/application/work/execution-history",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.execution_history",requestSchema:{schemaId:"schema.work.execution_history.request",revision:1},resultSchema:{schemaId:"schema.work.execution_history.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:Sp(347),decodeResult:Sp(348),decodeSuccess:e=>mE(e,"binding.http.work.execution_history","schema.work.execution_history.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(348))},{operation:"work_experience",operationId:"operation.work.experience",transport:{kind:"http",route:"/application/work/experience",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.experience",requestSchema:{schemaId:"schema.work.experience.request",revision:1},resultSchema:{schemaId:"schema.work.experience.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:Sp(349),decodeResult:Sp(350),decodeSuccess:e=>mE(e,"binding.http.work.experience","schema.work.experience.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(350))},{operation:"work_generate_proposal",operationId:"operation.work.generate_proposal",transport:{kind:"http",route:"/application/work/generate-proposal",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.generate_proposal",requestSchema:{schemaId:"schema.work.generate_proposal.request",revision:1},resultSchema:{schemaId:"schema.work.generate_proposal.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:Sp(351),decodeResult:Sp(352),decodeSuccess:e=>mE(e,"binding.http.work.generate_proposal","schema.work.generate_proposal.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(352))},{operation:"work_hydrate_artifacts",operationId:"operation.work.hydrate_artifacts",transport:{kind:"http",route:"/application/work/hydrate-artifacts",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.hydrate_artifacts",requestSchema:{schemaId:"schema.work.hydrate_artifacts.request",revision:1},resultSchema:{schemaId:"schema.work.hydrate_artifacts.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:Sp(353),decodeResult:Sp(354),decodeSuccess:e=>mE(e,"binding.http.work.hydrate_artifacts","schema.work.hydrate_artifacts.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(354))},{operation:"work_list_attempts",operationId:"operation.work.list_attempts",transport:{kind:"http",route:"/application/work/list-attempts",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.list_attempts",requestSchema:{schemaId:"schema.work.list_attempts.request",revision:1},resultSchema:{schemaId:"schema.work.list_attempts.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:Sp(347),decodeResult:Sp(355),decodeSuccess:e=>mE(e,"binding.http.work.list_attempts","schema.work.list_attempts.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(355))},{operation:"work_mutate_graph",operationId:"operation.work.mutate_graph",transport:{kind:"http",route:"/application/work/mutate-graph",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.mutate_graph",requestSchema:{schemaId:"schema.work.mutate_graph.request",revision:1},resultSchema:{schemaId:"schema.work.mutate_graph.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:Sp(356),decodeResult:Sp(330),decodeSuccess:e=>mE(e,"binding.http.work.mutate_graph","schema.work.mutate_graph.result",1,["completed","cancelled","timed_out","failed","effect_unknown","partial"],{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},"durable_effect","required",Sp(330))},{operation:"work_pause_run",operationId:"operation.work.pause_run",transport:{kind:"http",route:"/application/work/pause-run",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.pause_run",requestSchema:{schemaId:"schema.work.pause_run.request",revision:1},resultSchema:{schemaId:"schema.work.pause_run.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:Sp(357),decodeResult:Sp(358),decodeSuccess:e=>mE(e,"binding.http.work.pause_run","schema.work.pause_run.result",1,["completed","cancelled","timed_out","failed","effect_unknown","partial"],{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},"durable_effect","required",Sp(358))},{operation:"work_placement_preflight",operationId:"operation.work.placement_preflight",transport:{kind:"http",route:"/application/work/placement-preflight",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.placement_preflight",requestSchema:{schemaId:"schema.work.placement_preflight.request",revision:1},resultSchema:{schemaId:"schema.work.placement_preflight.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:Sp(359),decodeResult:Sp(360),decodeSuccess:e=>mE(e,"binding.http.work.placement_preflight","schema.work.placement_preflight.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(360))},{operation:"work_placement_status",operationId:"operation.work.placement_status",transport:{kind:"http",route:"/application/work/placement-status",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.placement_status",requestSchema:{schemaId:"schema.work.placement_status.request",revision:1},resultSchema:{schemaId:"schema.work.placement_status.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:Sp(361),decodeResult:Sp(362),decodeSuccess:e=>mE(e,"binding.http.work.placement_status","schema.work.placement_status.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(362))},{operation:"work_prepare_duplicate_adjudication",operationId:"operation.work.prepare_duplicate_adjudication",transport:{kind:"http",route:"/application/work/prepare-duplicate-adjudication",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.prepare_duplicate_adjudication",requestSchema:{schemaId:"schema.work.prepare_duplicate_adjudication.request",revision:1},resultSchema:{schemaId:"schema.work.prepare_duplicate_adjudication.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:Sp(363),decodeResult:Sp(331),decodeSuccess:e=>mE(e,"binding.http.work.prepare_duplicate_adjudication","schema.work.prepare_duplicate_adjudication.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(331))},{operation:"work_prepare_graph_mutation",operationId:"operation.work.prepare_graph_mutation",transport:{kind:"http",route:"/application/work/prepare-graph-mutation",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.prepare_graph_mutation",requestSchema:{schemaId:"schema.work.prepare_graph_mutation.request",revision:1},resultSchema:{schemaId:"schema.work.prepare_graph_mutation.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:Sp(364),decodeResult:Sp(356),decodeSuccess:e=>mE(e,"binding.http.work.prepare_graph_mutation","schema.work.prepare_graph_mutation.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(356))},{operation:"work_release_placement",operationId:"operation.work.release_placement",transport:{kind:"http",route:"/application/work/release-placement",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.release_placement",requestSchema:{schemaId:"schema.work.release_placement.request",revision:1},resultSchema:{schemaId:"schema.work.release_placement.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:Sp(365),decodeResult:Sp(338),decodeSuccess:e=>mE(e,"binding.http.work.release_placement","schema.work.release_placement.result",1,["completed","cancelled","timed_out","failed","effect_unknown","partial"],{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},"durable_effect","required",Sp(338))},{operation:"work_resume_attempts",operationId:"operation.work.resume_attempts",transport:{kind:"http",route:"/application/work/resume-attempts",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.resume_attempts",requestSchema:{schemaId:"schema.work.resume_attempts.request",revision:1},resultSchema:{schemaId:"schema.work.resume_attempts.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:Sp(366),decodeResult:Sp(367),decodeSuccess:e=>mE(e,"binding.http.work.resume_attempts","schema.work.resume_attempts.result",1,["completed","cancelled","timed_out","failed","effect_unknown","partial"],{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},"durable_effect","required",Sp(367))},{operation:"work_resume_run",operationId:"operation.work.resume_run",transport:{kind:"http",route:"/application/work/resume-run",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.resume_run",requestSchema:{schemaId:"schema.work.resume_run.request",revision:1},resultSchema:{schemaId:"schema.work.resume_run.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:Sp(368),decodeResult:Sp(358),decodeSuccess:e=>mE(e,"binding.http.work.resume_run","schema.work.resume_run.result",1,["completed","cancelled","timed_out","failed","effect_unknown","partial"],{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},"durable_effect","required",Sp(358))},{operation:"work_retrieve_evidence",operationId:"operation.work.retrieve_evidence",transport:{kind:"http",route:"/application/work/retrieve-evidence",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.retrieve_evidence",requestSchema:{schemaId:"schema.work.retrieve_evidence.request",revision:1},resultSchema:{schemaId:"schema.work.retrieve_evidence.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:Sp(369),decodeResult:Sp(370),decodeSuccess:e=>mE(e,"binding.http.work.retrieve_evidence","schema.work.retrieve_evidence.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(370))},{operation:"work_retry_attempt",operationId:"operation.work.retry_attempt",transport:{kind:"http",route:"/application/work/retry-attempt",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.retry_attempt",requestSchema:{schemaId:"schema.work.retry_attempt.request",revision:1},resultSchema:{schemaId:"schema.work.retry_attempt.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:Sp(371),decodeResult:Sp(372),decodeSuccess:e=>mE(e,"binding.http.work.retry_attempt","schema.work.retry_attempt.result",1,["completed","cancelled","timed_out","failed","effect_unknown","partial"],{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},"durable_effect","required",Sp(372))},{operation:"work_review_proposal",operationId:"operation.work.review_proposal",transport:{kind:"http",route:"/application/work/review-proposal",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.review_proposal",requestSchema:{schemaId:"schema.work.review_proposal.request",revision:1},resultSchema:{schemaId:"schema.work.review_proposal.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:Sp(373),decodeResult:Sp(330),decodeSuccess:e=>mE(e,"binding.http.work.review_proposal","schema.work.review_proposal.result",1,["completed","cancelled","timed_out","failed","effect_unknown","partial"],{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},"durable_effect","required",Sp(330))},{operation:"work_run_control",operationId:"operation.work.run_control",transport:{kind:"http",route:"/application/work/run-control",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.run_control",requestSchema:{schemaId:"schema.work.run_control.request",revision:1},resultSchema:{schemaId:"schema.work.run_control.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:Sp(374),decodeResult:Sp(375),decodeSuccess:e=>mE(e,"binding.http.work.run_control","schema.work.run_control.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(375))},{operation:"work_start_attempt",operationId:"operation.work.start_attempt",transport:{kind:"http",route:"/application/work/start-attempt",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.start_attempt",requestSchema:{schemaId:"schema.work.start_attempt.request",revision:1},resultSchema:{schemaId:"schema.work.start_attempt.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:Sp(376),decodeResult:Sp(342),decodeSuccess:e=>mE(e,"binding.http.work.start_attempt","schema.work.start_attempt.result",1,["completed","cancelled","timed_out","failed","effect_unknown","partial"],{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},"durable_effect","required",Sp(342))},{operation:"work_synthesize",operationId:"operation.work.synthesize",transport:{kind:"http",route:"/application/work/synthesize",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.synthesize",requestSchema:{schemaId:"schema.work.synthesize.request",revision:1},resultSchema:{schemaId:"schema.work.synthesize.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:Sp(377),decodeResult:Sp(378),decodeSuccess:e=>mE(e,"binding.http.work.synthesize","schema.work.synthesize.result",1,["completed","cancelled","timed_out","failed","effect_unknown","partial"],{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},"durable_effect","required",Sp(378))},{operation:"work_topology",operationId:"operation.work.topology",transport:{kind:"http",route:"/application/work/topology",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.topology",requestSchema:{schemaId:"schema.work.topology.request",revision:1},resultSchema:{schemaId:"schema.work.topology.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:Sp(379),decodeResult:Sp(380),decodeSuccess:e=>mE(e,"binding.http.work.topology","schema.work.topology.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(380))},{operation:"work_topology_metrics",operationId:"operation.work.topology_metrics",transport:{kind:"http",route:"/application/work/topology-metrics",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.topology_metrics",requestSchema:{schemaId:"schema.work.topology_metrics.request",revision:1},resultSchema:{schemaId:"schema.work.topology_metrics.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:Sp(381),decodeResult:Sp(382),decodeSuccess:e=>mE(e,"binding.http.work.topology_metrics","schema.work.topology_metrics.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(382))},{operation:"work_views",operationId:"operation.work.views",transport:{kind:"http",route:"/application/work/views",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.views",requestSchema:{schemaId:"schema.work.views.request",revision:1},resultSchema:{schemaId:"schema.work.views.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:Sp(383),decodeResult:Sp(384),decodeSuccess:e=>mE(e,"binding.http.work.views","schema.work.views.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(384))},{operation:"workflow_activate_definition",operationId:"operation.workflow.activate_definition",transport:{kind:"http",route:"/application/workflow/activate-definition",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.workflow.activate_definition",requestSchema:{schemaId:"schema.workflow.activate_definition.request",revision:1},resultSchema:{schemaId:"schema.workflow.activate_definition.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","timed_out","failed","effect_unknown","partial"],decodeRequest:Sp(385),decodeResult:Sp(386),decodeSuccess:e=>mE(e,"binding.http.workflow.activate_definition","schema.workflow.activate_definition.result",1,["completed","timed_out","failed","effect_unknown","partial"],{mode:"not_cancellable"},"durable_effect","required",Sp(386))},{operation:"workflow_cancel_run",operationId:"operation.workflow.cancel_run",transport:{kind:"http",route:"/application/workflow/cancel-run",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.workflow.cancel_run",requestSchema:{schemaId:"schema.workflow.cancel_run.request",revision:1},resultSchema:{schemaId:"schema.workflow.cancel_run.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","timed_out","failed","effect_unknown","partial"],decodeRequest:Sp(387),decodeResult:Sp(388),decodeSuccess:e=>mE(e,"binding.http.workflow.cancel_run","schema.workflow.cancel_run.result",1,["completed","timed_out","failed","effect_unknown","partial"],{mode:"not_cancellable"},"durable_effect","required",Sp(388))},{operation:"workflow_definition_history",operationId:"operation.workflow.definition_history",transport:{kind:"http",route:"/application/workflow/definition-history",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.workflow.definition_history",requestSchema:{schemaId:"schema.workflow.definition_history.request",revision:1},resultSchema:{schemaId:"schema.workflow.definition_history.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:Sp(389),decodeResult:Sp(390),decodeSuccess:e=>mE(e,"binding.http.workflow.definition_history","schema.workflow.definition_history.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(390))},{operation:"workflow_diff_definition",operationId:"operation.workflow.diff_definition",transport:{kind:"http",route:"/application/workflow/diff-definition",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.workflow.diff_definition",requestSchema:{schemaId:"schema.workflow.diff_definition.request",revision:1},resultSchema:{schemaId:"schema.workflow.diff_definition.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:Sp(391),decodeResult:Sp(392),decodeSuccess:e=>mE(e,"binding.http.workflow.diff_definition","schema.workflow.diff_definition.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(392))},{operation:"workflow_get_definition",operationId:"operation.workflow.get_definition",transport:{kind:"http",route:"/application/workflow/get-definition",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.workflow.get_definition",requestSchema:{schemaId:"schema.workflow.get_definition.request",revision:1},resultSchema:{schemaId:"schema.workflow.get_definition.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:Sp(393),decodeResult:Sp(394),decodeSuccess:e=>mE(e,"binding.http.workflow.get_definition","schema.workflow.get_definition.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(394))},{operation:"workflow_get_run",operationId:"operation.workflow.get_run",transport:{kind:"http",route:"/application/workflow/get-run",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.workflow.get_run",requestSchema:{schemaId:"schema.workflow.get_run.request",revision:1},resultSchema:{schemaId:"schema.workflow.get_run.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:Sp(395),decodeResult:Sp(388),decodeSuccess:e=>mE(e,"binding.http.workflow.get_run","schema.workflow.get_run.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(388))},{operation:"workflow_handoff_issue",operationId:"operation.workflow.handoff_issue",transport:{kind:"http",route:"/application/workflow/handoff-issue",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.workflow.handoff_issue",requestSchema:{schemaId:"schema.workflow.handoff_issue.request",revision:1},resultSchema:{schemaId:"schema.workflow.handoff_issue.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","timed_out","failed","effect_unknown","partial"],decodeRequest:Sp(396),decodeResult:Sp(397),decodeSuccess:e=>mE(e,"binding.http.workflow.handoff_issue","schema.workflow.handoff_issue.result",1,["completed","timed_out","failed","effect_unknown","partial"],{mode:"not_cancellable"},"durable_effect","required",Sp(397))},{operation:"workflow_handoff_redeem",operationId:"operation.workflow.handoff_redeem",transport:{kind:"http",route:"/application/workflow/handoff-redeem",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.workflow.handoff_redeem",requestSchema:{schemaId:"schema.workflow.handoff_redeem.request",revision:1},resultSchema:{schemaId:"schema.workflow.handoff_redeem.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","timed_out","failed","effect_unknown","partial"],decodeRequest:Sp(398),decodeResult:Sp(399),decodeSuccess:e=>mE(e,"binding.http.workflow.handoff_redeem","schema.workflow.handoff_redeem.result",1,["completed","timed_out","failed","effect_unknown","partial"],{mode:"not_cancellable"},"durable_effect","required",Sp(399))},{operation:"workflow_list_definitions",operationId:"operation.workflow.list_definitions",transport:{kind:"http",route:"/application/workflow/list-definitions",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.workflow.list_definitions",requestSchema:{schemaId:"schema.workflow.list_definitions.request",revision:1},resultSchema:{schemaId:"schema.workflow.list_definitions.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:Sp(400),decodeResult:Sp(390),decodeSuccess:e=>mE(e,"binding.http.workflow.list_definitions","schema.workflow.list_definitions.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(390))},{operation:"workflow_pause_run",operationId:"operation.workflow.pause_run",transport:{kind:"http",route:"/application/workflow/pause-run",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.workflow.pause_run",requestSchema:{schemaId:"schema.workflow.pause_run.request",revision:1},resultSchema:{schemaId:"schema.workflow.pause_run.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","timed_out","failed","effect_unknown","partial"],decodeRequest:Sp(401),decodeResult:Sp(388),decodeSuccess:e=>mE(e,"binding.http.workflow.pause_run","schema.workflow.pause_run.result",1,["completed","timed_out","failed","effect_unknown","partial"],{mode:"not_cancellable"},"durable_effect","required",Sp(388))},{operation:"workflow_register_definition",operationId:"operation.workflow.register_definition",transport:{kind:"http",route:"/application/workflow/register-definition",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.workflow.register_definition",requestSchema:{schemaId:"schema.workflow.register_definition.request",revision:1},resultSchema:{schemaId:"schema.workflow.register_definition.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","timed_out","failed","effect_unknown","partial"],decodeRequest:Sp(402),decodeResult:Sp(394),decodeSuccess:e=>mE(e,"binding.http.workflow.register_definition","schema.workflow.register_definition.result",1,["completed","timed_out","failed","effect_unknown","partial"],{mode:"not_cancellable"},"durable_effect","required",Sp(394))},{operation:"workflow_reject_definition",operationId:"operation.workflow.reject_definition",transport:{kind:"http",route:"/application/workflow/reject-definition",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.workflow.reject_definition",requestSchema:{schemaId:"schema.workflow.reject_definition.request",revision:1},resultSchema:{schemaId:"schema.workflow.reject_definition.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","timed_out","failed","effect_unknown","partial"],decodeRequest:Sp(403),decodeResult:Sp(386),decodeSuccess:e=>mE(e,"binding.http.workflow.reject_definition","schema.workflow.reject_definition.result",1,["completed","timed_out","failed","effect_unknown","partial"],{mode:"not_cancellable"},"durable_effect","required",Sp(386))},{operation:"workflow_resume_run",operationId:"operation.workflow.resume_run",transport:{kind:"http",route:"/application/workflow/resume-run",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.workflow.resume_run",requestSchema:{schemaId:"schema.workflow.resume_run.request",revision:1},resultSchema:{schemaId:"schema.workflow.resume_run.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","timed_out","failed","effect_unknown","partial"],decodeRequest:Sp(404),decodeResult:Sp(388),decodeSuccess:e=>mE(e,"binding.http.workflow.resume_run","schema.workflow.resume_run.result",1,["completed","timed_out","failed","effect_unknown","partial"],{mode:"not_cancellable"},"durable_effect","required",Sp(388))},{operation:"workflow_retire_definition",operationId:"operation.workflow.retire_definition",transport:{kind:"http",route:"/application/workflow/retire-definition",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.workflow.retire_definition",requestSchema:{schemaId:"schema.workflow.retire_definition.request",revision:1},resultSchema:{schemaId:"schema.workflow.retire_definition.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","timed_out","failed","effect_unknown","partial"],decodeRequest:Sp(405),decodeResult:Sp(386),decodeSuccess:e=>mE(e,"binding.http.workflow.retire_definition","schema.workflow.retire_definition.result",1,["completed","timed_out","failed","effect_unknown","partial"],{mode:"not_cancellable"},"durable_effect","required",Sp(386))},{operation:"workflow_start_run",operationId:"operation.workflow.start_run",transport:{kind:"http",route:"/application/workflow/start-run",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.workflow.start_run",requestSchema:{schemaId:"schema.workflow.start_run.request",revision:1},resultSchema:{schemaId:"schema.workflow.start_run.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","timed_out","failed","effect_unknown","partial"],decodeRequest:Sp(406),decodeResult:Sp(388),decodeSuccess:e=>mE(e,"binding.http.workflow.start_run","schema.workflow.start_run.result",1,["completed","timed_out","failed","effect_unknown","partial"],{mode:"not_cancellable"},"durable_effect","required",Sp(388))},{operation:"workflow_validate_definition",operationId:"operation.workflow.validate_definition",transport:{kind:"http",route:"/application/workflow/validate-definition",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.workflow.validate_definition",requestSchema:{schemaId:"schema.workflow.validate_definition.request",revision:1},resultSchema:{schemaId:"schema.workflow.validate_definition.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:Sp(407),decodeResult:Sp(408),decodeSuccess:e=>mE(e,"binding.http.workflow.validate_definition","schema.workflow.validate_definition.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(408))}],Sm=new TextEncoder;class Sf extends Error{cause;constructor(e,t){super(e),this.name=new.target.name,this.cause=t}}class Sh extends Sf{constructor(e){super("the caller aborted the request",e)}}class Sy extends Sf{}class Sg extends Sf{status;constructor(e){super(401===e?"the daemon rejected HTTP authentication":"the daemon rejected the HTTP origin"),this.status=e}}class S_ extends Error{status;payload;constructor(e,t={}){super(e),this.name=new.target.name,this.status=t.status,this.payload=t.payload}}class Sv extends S_{}class Sb extends Error{status;envelope;problem;constructor(e,t){super(`${t.problem.kind}/${t.problem.code}: ${t.problem.message}`),this.name=new.target.name,this.status=e,this.envelope=t,this.problem=t.problem}}class S$ extends Sb{}class SS extends Sb{}class Sk extends Sb{}class Sw extends Sb{}class SV extends Sb{}class SP extends Sb{}class SR extends Sb{}class Sq extends Sb{}class SI extends Sb{}class Sx extends Sb{}class Sj extends Sb{}let SC=new Set(["completed","cancelled","timed_out","failed","unavailable","effect_unknown","partial"]),ST=new TextEncoder;function SO(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}function SE(e){return"number"==typeof e&&Number.isSafeInteger(e)&&e>=0}function SA(e){return"number"==typeof e&&Number.isSafeInteger(e)}function SW(e,t){return"string"==typeof e&&e.length>0&&e.trim()===e&&ST.encode(e).byteLength<=t&&!/\p{Cc}/u.test(e)}function SM(e,t){let r=e.headers.get("content-type");return null!==r&&r.split(";",1)[0]?.trim().toLowerCase()===t}function SN(e){return!!SO(e)&&!!SA(e.started_at)&&!!SA(e.ended_at)&&!(e.ended_at{let o=setTimeout(()=>{t?.removeEventListener("abort",n),r()},e),n=()=>{clearTimeout(o),i(new Sh(t?.reason))};t?.addEventListener("abort",n,{once:!0})})}async function*SL(e,t){let r,i=e.getReader(),o=new TextDecoder("utf-8",{fatal:!0}),n="",a="",s=t??"",d=[],c=!1,l=e=>{if(""===e){if(c=!1,0===d.length)return a="",null;let e={event:""===a?"message":a,id:""===s?null:s,data:d.join("\n"),...void 0===r?{}:{retryDelayMs:r}};return a="",d=[],e}if(e.startsWith(":"))return null;c=!0;let t=e.indexOf(":"),i=t<0?e:e.slice(0,t),o=t<0?"":e.slice(t+1);switch(o.startsWith(" ")&&(o=o.slice(1)),i){case"event":a=o;break;case"id":o.includes("\0")||(s=o);break;case"data":d.push(o);break;case"retry":if(/^[0-9]+$/.test(o)){let e=BigInt(o);r=e>2147483647n?0x7fffffff:Number(e)}}return null},p=function*(e){for(;;){let t=-1;for(let e=0;e0||c||d.length>0)throw new Sy("operation stream ended with an incomplete SSE event")}catch(e){if(e instanceof S_||e instanceof Sf)throw e;throw new Sy("operation stream transport was interrupted",e)}finally{i.releaseLock()}}class SU{operations;projectRoot;applicationRoot;token;origin;doFetch;mcp;constructor(e){let t=new URL(e.baseUrl);if("http:"!==t.protocol&&"https:"!==t.protocol||""!==t.username||""!==t.password||""!==t.search||""!==t.hash)throw new S_("baseUrl must be an absolute HTTP URL without credentials, query, or fragment");let r=t.toString().replace(/\/+$/u,"");this.projectRoot=`${r}/projects/${encodeURIComponent(e.projectId)}`,this.applicationRoot=`${this.projectRoot}/application`,this.token=e.token,this.origin=e.origin??t.origin,this.doFetch=e.fetch??globalThis.fetch.bind(globalThis),this.mcp=e.mcp;let i={};for(let e of Su)i[e.operation]=(t,r)=>this.#r(e,t,r);this.operations=Object.freeze(i)}headers(e){return new Headers({accept:e,authorization:`Bearer ${this.token}`,origin:this.origin})}operationUrl(e,t){if(t?.size!==void 0&&(!Number.isSafeInteger(t.size)||t.size<1||t.size>1e3))throw new S_("page size must be an integer between 1 and 1000");if(t?.cursor!==void 0&&!SW(t.cursor,4096))throw new S_("page cursor is not a canonical opaque cursor");let r=new URL(`${this.projectRoot}${e}`);return t?.size!==void 0&&r.searchParams.set("page_size",String(t.size)),t?.cursor!==void 0&&r.searchParams.set("cursor",t.cursor),r}lifecycleUrl(e,t){if(!SW(e,512))throw new S_("operationId is not a canonical request handle");return new URL(`${this.applicationRoot}/operations/${encodeURIComponent(e)}/${t}`)}async fetchResponse(e,t,r){try{return await this.doFetch(e,t)}catch(t){if(r?.aborted)throw new Sh(r.reason);throw new Sy(`transport failure requesting ${e.pathname}`,t)}}async readJson(e,t,r,i){let o,n,a=!1,s=()=>n??=o?.cancel(i?.reason)??e.body?.cancel(i?.reason)??Promise.resolve(),d=()=>{s().catch(()=>void 0)};try{if(i?.aborted)throw new Sh(i.reason);if(401===e.status||403===e.status)throw new Sg(e.status);if(!SM(e,"application/json"))throw new Sv("the daemon returned JSON with an invalid media type",{status:e.status});let n="";try{if(o=e.body?.getReader(),i?.addEventListener("abort",d,{once:!0}),i?.aborted)throw new Sh(i.reason);if(void 0!==o){let e=new TextDecoder;for(;;){let{done:t,value:r}=await o.read();if(i?.aborted)throw new Sh(i.reason);if(t)break;n+=e.decode(r,{stream:!0})}n+=e.decode()}a=!0}catch(e){if(i?.aborted)throw new Sh(i.reason);throw new Sy("transport failure reading the daemon response body",e)}let s=Sz(n,e.status);if(SO(s)&&"problem"===s.kind){var c;let i=s.value;if(!function(e){var t,r,i;if(!mA(e)||void 0!==e.binding_id&&"string"!=typeof e.binding_id||!(mA(t=e.contract)&&mN(t.schema_id,512)&&mW(t.schema_revision)&&t.schema_revision>0)||!mN(e.request_id,512)||!mA(e.problem))return!1;let o=e.problem,n=Array.isArray(o.legal_actions)?o.legal_actions:null,a="never"===o.retry?null:"same_request"===o.retry||"after_delay"===o.retry?"same_request":"after_revalidate"===o.retry?"fresh_request":"after_reconcile"===o.retry?"same_operation":void 0;if(!(1===o.revision&&"string"==typeof o.kind&&["invalid_request","not_found_or_not_authorized","conflict","partial_effect","stale","unsupported","unavailable","execution_failed","reset_required","saturated","cancelled","timed_out"].includes(o.kind)&&"string"==typeof o.code&&"string"==typeof o.message&&(null===o.diagnostic||mD(o.diagnostic))&&"detail"in o&&(null===o.detail||function(e){if(!mA(e))return!1;switch(e.kind){case"parked":return"string"==typeof e.cause&&"string"==typeof e.remedy&&"boolean"==typeof e.retries_on_wake;case"stale_refresh_frontier":return mW(e.requested)&&mW(e.committed)&&mW(e.active);case"stale_precondition":return"string"==typeof e.field&&mW(e.requested)&&mW(e.current);case"lock_deadline":return"string"==typeof e.resource&&mW(e.deadline_ms);case"diagnostics_unsupported":return(null===e.file||"string"==typeof e.file)&&Array.isArray(e.searched)&&e.searched.every(e=>mA(e)&&"string"==typeof e.path&&"boolean"==typeof e.present);case"diagnostics_pending":return"string"==typeof e.producer&&(null===e.generation||"string"==typeof e.generation);case"code_graph_rewarming":return mW(e.retry_after_millis);case"reset_required":return"string"==typeof e.authority&&(null===e.found_version||mM(e.found_version))&&(null===e.required_version||mM(e.required_version))&&"string"==typeof e.reason&&"string"==typeof e.remedy;default:return!1}}(o.detail))&&"committed_receipt"in o&&"string"==typeof o.owning_layer&&"string"==typeof o.terminality&&"boolean"==typeof o.retryable&&"string"==typeof o.retry&&(null===o.retry_scope||"string"==typeof o.retry_scope)&&(null===o.retry_after_millis||mW(o.retry_after_millis))&&"cancellation_stage"in o&&(null===o.cancellation_stage||"string"==typeof o.cancellation_stage&&["before_admission","before_read","during_read","before_effect","effect_in_flight"].includes(o.cancellation_stage))&&"unavailable_classification"in o&&(null===o.unavailable_classification||"string"==typeof o.unavailable_classification&&["authority","backend_unavailable","backend_disconnected","backend_retryable"].includes(o.unavailable_classification))&&"execution_failure_classification"in o&&(null===o.execution_failure_classification||"string"==typeof o.execution_failure_classification&&["denied","malformed_output","permanent"].includes(o.execution_failure_classification))&&o.request_id===e.request_id&&mN(o.trace_id,512)&&Array.isArray(o.details)&&o.details.every(mD)&&null!==n&&n.every(e=>"string"==typeof e)&&"coverage"in o)||null===n)return!1;let s=null!==o.cancellation_stage&&"before_admission"!==o.cancellation_stage,d=null!==o.unavailable_classification&&"authority"!==o.unavailable_classification,c="partial_effect"===o.kind||"reset_required"===o.kind||"execution_failed"===o.kind||s||d;return o.terminality===(c?"admitted_terminal":"pre_admission")&&"unavailable"===o.kind==(null!==o.unavailable_classification)&&"execution_failed"===o.kind==(null!==o.execution_failure_classification)&&("cancelled"===o.kind||"timed_out"===o.kind)==(null!==o.cancellation_stage)&&null!==o.diagnostic===("string"==typeof o.kind&&["invalid_request","conflict","partial_effect","stale","unsupported","unavailable","execution_failed","reset_required","saturated"].includes(o.kind))&&(null===o.detail||!!("string"==typeof o.kind&&["stale","unsupported","unavailable","reset_required","saturated"].includes(o.kind)))&&o.retryable===("never"!==o.retry)&&void 0!==a&&o.retry_scope===a&&"after_delay"===o.retry==(null!==o.retry_after_millis)&&("partial_effect"===o.kind?"admitted_terminal"===o.terminality&&!1===o.retryable&&"never"===o.retry&&(r=o.committed_receipt,i=e.request_id,mA(r)&&r.request_id===i&&"partial"===r.outcome&&"string"==typeof r.operation&&"string"==typeof r.effect_class&&"string"==typeof r.idempotency_key&&"string"==typeof r.input_digest&&("string"==typeof r.committed_state||"string"==typeof r.external_proof))&&1===n.length&&"reconcile"===n[0]:"reset_required"===o.kind?"admitted_terminal"===o.terminality&&!1===o.retryable&&"never"===o.retry&&null===o.committed_receipt&&1===n.length&&"reset"===n[0]:"unavailable"===o.kind&&"authority"!==o.unavailable_classification?"admitted_terminal"===o.terminality&&!0===o.retryable&&"after_revalidate"===o.retry&&null===o.committed_receipt&&1===n.length&&"retry"===n[0]:"execution_failed"===o.kind?"admitted_terminal"===o.terminality&&!1===o.retryable&&"never"===o.retry&&null===o.committed_receipt&&1===n.length&&"contact_administrator"===n[0]:null===o.committed_receipt)}(i))throw new Sv("the daemon returned a malformed problem envelope",{status:e.status,payload:i});let o=void 0===t||(c=[t],"not_found_or_not_authorized"===i.problem.kind?void 0===i.binding_id:c.some(e=>e===i.binding_id));if(e.ok||!o||void 0!==r&&i.request_id!==r||!function(e,t){switch(t){case"invalid_request":return 400===e;case"not_found_or_not_authorized":return 404===e;case"conflict":case"partial_effect":case"stale":return 409===e;case"unsupported":return 422===e;case"unavailable":case"reset_required":return 503===e;case"execution_failed":return 500===e;case"saturated":return 429===e;case"cancelled":return 408===e;case"timed_out":return 504===e;default:return!1}}(e.status,i.problem.kind))throw new Sv("the daemon returned a malformed problem envelope",{status:e.status,payload:i});throw function(e,t){switch(t.problem.kind){case"not_found_or_not_authorized":return new S$(e,t);case"unavailable":return new SS(e,t);case"unsupported":return new Sk(e,t);case"stale":return new Sw(e,t);case"conflict":return new SV(e,t);case"partial_effect":return new SP(e,t);case"reset_required":return new SR(e,t);case"saturated":return new Sq(e,t);case"cancelled":return new SI(e,t);case"timed_out":return new Sx(e,t);case"invalid_request":return new Sj(e,t);default:return new Sb(e,t)}}(e.status,i)}return s}finally{i?.removeEventListener("abort",d);try{a||await s()}catch{}finally{o?.releaseLock()}}}async #r(e,t,r={}){var i,o,n,a;let s=e.decodeRequest(t);if("http"!==e.transport.kind){let t;if(void 0!==r.page||void 0!==r.deadlineMicros||void 0!==r.requestId)throw new S_(`${e.operation} does not accept HTTP transport options`);if(void 0===this.mcp)throw new Sf(`${e.operation} requires an MCP tool adapter`);try{t=await this.mcp.callTool(e.transport.toolName,s,{signal:r.signal})}catch(t){if(r.signal?.aborted)throw new Sh(r.signal.reason??t);throw new Sf(`MCP tool ${e.transport.toolName} failed`,t)}try{return e.decodeResult(t)}catch(r){throw new Sv(`MCP tool ${e.transport.toolName} returned an invalid ${e.operation} result`,{payload:{response:t,cause:r}})}}let d=this.operationUrl(e.transport.route,r.page),c=JSON.stringify(s);if(void 0===c)throw new S_(`${e.operation} request decoder returned a non-JSON value`);let l=this.headers("application/json");l.set("content-type","application/json");let p=(i=l,o=e,void 0!==(n=r).deadlineMicros&&(!Number.isSafeInteger(n.deadlineMicros)||n.deadlineMicros<=0)?"deadlineMicros must be a positive safe integer":"required"===o.requestIdControl&&void 0===n.requestId?`${o.operation} requires a stable requestId replay handle`:"server_minted"===o.requestIdControl&&void 0!==n.requestId?`${o.operation} uses a server-minted request ID`:void 0===n.requestId||(a=n.requestId).length>0&&a.trim()===a&&Sm.encode(a).byteLength<=512&&!/\p{Cc}/u.test(a)?void(void 0!==n.deadlineMicros&&i.set("x-tracedecay-deadline-micros",String(n.deadlineMicros)),void 0!==n.requestId&&i.set("x-tracedecay-request-id",n.requestId)):"requestId is not a canonical request identity");if(void 0!==p)throw new S_(p);let u=await this.fetchResponse(d,{method:e.transport.method,headers:l,body:c,signal:r.signal},r.signal),m=await this.readJson(u,e.bindingId,r.requestId,r.signal);if(!SO(m)||"success"!==m.kind)throw new Sv("the daemon returned an unknown HTTP envelope",{status:u.status,payload:m});if(!u.ok)throw new Sv("the daemon returned success with a failing HTTP status",{status:u.status,payload:m});try{let t=e.decodeSuccess(m.value);if(!(SO(t)&&SO(t.outcome)&&SO(t.outcome.value)&&"payload"in t.outcome.value&&SN(t.outcome.value.execution))||("evidence"===t.outcome.outcome?"completed"===t.outcome.value.execution.termination&&null===t.outcome.value.payload:"preview"!==t.outcome.outcome&&"effect"!==t.outcome.outcome))throw TypeError("decoded application success invariants are invalid");if(void 0!==r.requestId&&t.request_id!==r.requestId)throw TypeError("daemon returned a different application request ID");if("fact_store_curate_receipt"===e.resultSemantics&&!await async function(e,t){if(!mA(e)||!mA(t)||!mA(t.outcome))return!1;let r=t.outcome,i=mA(r.value)?r.value.payload:void 0;if("effect"!==r.outcome||!mA(i)||!mN(t.request_id,512)||"request_digest,run_id,state,task"!==Object.keys(i).sort().join(",")||i.run_id!==t.request_id||"memory_curator"!==i.task||"started"!==i.state)return!1;let o=e.fact_review_limit??24,n=e.min_confidence_millionths??72e4;return!!mW(o)&&!(o<1)&&!(o>1e3)&&!!mW(n)&&!(n>1e6)&&!!await async function(e){return!!mA(e)&&"project_id,reference,repository_id,scope_digest,worktree_id"===Object.keys(e).sort().join(",")&&!!mN(e.project_id,512)&&!!mN(e.repository_id,512)&&!!mN(e.worktree_id,512)&&(null===e.reference||!!mN(e.reference,512))&&e.scope_digest===await mz(["tracedecay.application.scope.v1",e.project_id,e.repository_id,e.worktree_id,e.reference])}(t.scope)&&i.request_digest===await mz(["tracedecay.automation-run.request-identity.v1",{kind:"memory_curator",options:{fact_review_limit:o,min_confidence_millionths:n}}])}(s,t))throw TypeError("automatic curation receipt invariants are invalid");return t}catch(t){throw new Sv(`the daemon returned an invalid ${e.operation} success envelope`,{status:u.status,payload:{envelope:m.value,cause:t}})}}async *streamOperation(e,t={}){let r=t.resume?.resumeToken,i=t.resume?.nextSequence===void 0?void 0:function(e,t){let r;if("number"==typeof e){if(!SE(e))throw new S_(`${t} must be an unsigned safe integer`);r=BigInt(e)}else if("bigint"==typeof e)r=e;else if(/^[0-9]+$/.test(e))r=BigInt(e);else throw new S_(`${t} must be unsigned decimal`);if(r<0n||r>0xffffffffffffffffn)throw new S_(`${t} exceeds the canonical u64 range`);return r.toString()}(t.resume.nextSequence,"resume nextSequence");if(void 0!==r&&!SW(r,4096))throw new S_("resumeToken is not a canonical stream resume token");let o=t.maxReconnects??0;if(!Number.isSafeInteger(o)||o<0)throw new S_("maxReconnects must be a non-negative integer");let n=0,a=void 0===i||"0"===i?void 0:(BigInt(i)-1n).toString(),s=0;for(;;){let d;if(t.signal?.aborted)throw new Sh(t.signal.reason);let c=this.lifecycleUrl(e,"events");void 0!==i&&c.searchParams.set("next_sequence",i),void 0!==r&&c.searchParams.set("resume_token",r);try{d=await this.fetchResponse(c,{method:"GET",headers:this.headers("text/event-stream"),signal:t.signal},t.signal)}catch(e){if(0===n||n>=o||!(e instanceof Sy))throw e;n+=1,await SF(s,t.signal);continue}let l=!1;try{if(!d.ok||null===d.body)throw await this.readJson(d,void 0,void 0,t.signal),new Sv("the daemon did not open an SSE stream",{status:d.status});if(!SM(d,"text/event-stream"))throw new Sv("the daemon opened an operation stream with an invalid media type",{status:d.status});try{for await(let t of SL(d.body)){void 0!==t.retryDelayMs&&(s=t.retryDelayMs);let o=function(e,t,r){let i=Sz(e.data,t);if(!SO(i)||"string"!=typeof i.event||i.event!==e.event||!SO(i.data))throw new Sv("the daemon returned a malformed SSE event",{status:t,payload:i});let o=i.event,n=i.data;if("open"===o){let e=n.frontier;if(n.correlation_id!==r||!SO(e)||!SE(e.next_sequence)||!SE(e.retained_from_sequence)||null!==e.resume_token&&"string"!=typeof e.resume_token)throw new Sv("the daemon returned a malformed SSE open frontier",{status:t,payload:i});return{event:{...i,event:o,data:n},frontier:{nextSequence:String(e.next_sequence),..."string"==typeof e.resume_token?{resumeToken:e.resume_token}:{}}}}if(!SE(n.sequence)||null===e.id)throw new Sv("the daemon returned an SSE event without a valid sequence",{status:t,payload:i});let a=String(n.sequence);if(e.id!==a)throw new Sv("the SSE event ID does not match its canonical sequence",{status:t,payload:i});if("item"===o&&!("item"in n))throw new Sv("the SSE item payload is missing",{status:t,payload:i});if("progress"===o&&(!SE(n.completed)||null!==n.total&&!SE(n.total)))throw new Sv("the SSE progress payload is malformed",{status:t,payload:i});if("resume_gap"===o){let e=n.gap;if(!SO(e)||!SE(e.first_missing_sequence)||!SE(e.last_missing_sequence)||e.first_missing_sequence!==n.sequence||e.first_missing_sequence>e.last_missing_sequence||!SO(e.frontier)||!SE(e.frontier.next_sequence)||!SE(e.frontier.retained_from_sequence)||null!==e.frontier.resume_token&&"string"!=typeof e.frontier.resume_token)throw new Sv("the SSE resume gap is malformed",{status:t,payload:i})}if(SC.has(o)){let e=n.terminal;if(!SO(e)||!SN(e.receipt))throw new Sv("the SSE terminal event is malformed",{status:t,payload:i});if(e.termination!==o||e.receipt.termination!==o)throw new Sv("the SSE terminal event is inconsistent",{status:t,payload:i})}let s={...i,event:o,data:n};if("resume_gap"===o){let e=n.gap,t=e.frontier;return{event:s,sequence:a,lastSequence:String(e.last_missing_sequence),frontier:{nextSequence:(BigInt(e.last_missing_sequence)+1n).toString(),..."string"==typeof t.resume_token?{resumeToken:t.resume_token}:{}}}}return{event:s,sequence:a}}(t,d.status,e);if(void 0!==o.frontier&&(i=o.frontier.nextSequence,r=o.frontier.resumeToken),void 0!==o.sequence){if(void 0!==a&&BigInt(o.sequence)<=BigInt(a))continue;let e=void 0===a?void 0:SD(a);if(void 0!==e&&o.sequence!==e)throw new Sv("the daemon returned a non-contiguous SSE sequence",{status:d.status,payload:o.event});a=o.lastSequence??o.sequence,i=SD(a)}if(yield{event:t.event,id:o.sequence??null,data:o.event},SC.has(t.event))return}}catch(e){if(l=!0,e instanceof S_)throw e;if(t.signal?.aborted)throw new Sh(t.signal.reason??e);if(n>=o){if(e instanceof Sy)throw e;throw new Sy(`operation stream disconnected after ${n} reconnects`,e)}}}catch(e){throw l=!0,e}finally{try{await d.body?.cancel()}catch(e){if(!l)throw new Sy("failed to close operation stream transport",e)}}if(n>=o)throw new Sy(`operation stream ended before a terminal event after ${n} reconnects`);if(void 0===i||void 0===r)throw new Sy("operation stream ended before exposing a resumable frontier");n+=1,await SF(s,t.signal)}}async cancelOperation(e,t={}){let r=await this.fetchResponse(this.lifecycleUrl(e,"cancel"),{method:"POST",headers:this.headers("application/json"),signal:t.signal},t.signal),i=await this.readJson(r,void 0,void 0,t.signal);if(!SO(i))throw new Sv("the daemon returned a malformed cancellation response",{status:r.status,payload:i});let o=i.status,n="requested"===o&&202===r.status||("already_requested"===o||"already_terminal"===o)&&200===r.status;if(!r.ok||"requested"!==o&&"already_requested"!==o&&"already_terminal"!==o||!n)throw new Sv("the daemon returned a malformed cancellation response",{status:r.status,payload:i});return{...i,status:o}}}function SH(e){let t=Su.find(t=>t.operation===e);if(void 0===t||"mcp_tool"!==t.transport.kind)throw TypeError(`${e} is not an MCP-backed operation in the canonical catalog`);return t}let SG=SH("project_list"),SB=SH("project_context");class SK{#i;constructor(e){this.#i=e}projectList(e,t){return this.#o(SG,e,t)}projectContext(e,t){return this.#o(SB,e,t)}async #o(e,t,r){let i,o=e.transport.toolName,n=e.decodeRequest(t);try{i=await this.#i(o,n,r)}catch(e){if(r?.aborted)throw new Sh(r.reason??e);throw new Sf(`MCP tool ${o} failed`,e)}try{return e.decodeResult(i)}catch(t){throw new Sv(`MCP tool ${o} returned an invalid ${e.operation} result`,{payload:{response:i,cause:t}})}}}var SJ=Object.create,SZ=Object.defineProperty,SQ=Object.getOwnPropertyDescriptor,SX=Object.getOwnPropertyNames,SY=Object.getPrototypeOf,S1=Object.prototype.hasOwnProperty,S0=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);let S2=new Set(["https://json-schema.org/draft/2020-12/schema","http://json-schema.org/draft/2020-12/schema"]),S4=new Set(["https://json-schema.org/draft/2019-09/schema","http://json-schema.org/draft/2019-09/schema"]),S6=new Set(["https://json-schema.org/draft-07/schema","http://json-schema.org/draft-07/schema"]),S3=new Set(["https://json-schema.org/draft-06/schema","http://json-schema.org/draft-06/schema"]),S9=["2025-11-25","2025-06-18","2025-03-26","2024-11-05","2024-10-07"],S5="io.modelcontextprotocol/protocolVersion",S8="io.modelcontextprotocol/clientInfo",S7="io.modelcontextprotocol/serverInfo",ke="io.modelcontextprotocol/clientCapabilities",kt="io.modelcontextprotocol/subscriptionId",kr="io.modelcontextprotocol/logLevel",ki=aa(()=>nL([o7(),nV(),nI(),nj(),nJ(o7(),ki),nM(ki)])),ko=nJ(o7(),ki),kn=nM(ki),ka=nL([o7(),nV().int()]),ks=o7(),kd=nz({ttl:nV().optional()}),kc=nz({taskId:o7()}),kl=nD({progressToken:ka.optional(),"io.modelcontextprotocol/related-task":kc.optional()}),kp=nz({_meta:kl.optional()}),ku=kp.extend({task:kd.optional()}),km=nz({method:o7(),params:kp.loose().optional()}),kf=nz({_meta:kl.optional()}),kh=nz({method:o7(),params:kf.loose().optional()}),ky=nD({get[S7](){return kj.optional().catch(void 0)}}),kg=nD({_meta:ky.optional()}),k_=nL([o7(),nV().int()]),kv=nz({jsonrpc:nY("2.0"),id:k_,...km.shape}).strict(),kb=nz({jsonrpc:nY("2.0"),...kh.shape}).strict(),k$=nz({jsonrpc:nY("2.0"),id:k_,result:kg}).strict(),kS=nz({jsonrpc:nY("2.0"),id:k_.optional(),error:nz({code:nV().int(),message:o7(),data:nE().optional()})}).strict(),kk=nL([kv,kb,k$,kS]),kw=nL([k$,kS]),kV=kg.strict(),kP=kf.extend({requestId:k_.optional(),reason:o7().optional()}),kR=kh.extend({method:nY("notifications/cancelled"),params:kP}),kq=nz({src:o7(),mimeType:o7().optional(),sizes:nM(o7()).optional(),theme:nQ(["light","dark"]).optional()}),kI=nz({icons:nM(kq).optional()}),kx=nz({name:o7(),title:o7().optional()}),kj=kx.extend({...kx.shape,...kI.shape,version:o7(),websiteUrl:o7().optional(),description:o7().optional()}),kC=nB(nz({applyDefaults:nI().optional()}),ko),kT=ad(e=>e&&"object"==typeof e&&!Array.isArray(e)&&0===Object.keys(e).length?{form:{}}:e,nB(nz({form:kC.optional(),url:ko.optional()}),ko.optional())),kO=nD({list:ko.optional(),cancel:ko.optional(),requests:nD({sampling:nD({createMessage:ko.optional()}).optional(),elicitation:nD({create:ko.optional()}).optional()}).optional()}),kE=nD({list:ko.optional(),cancel:ko.optional(),requests:nD({tools:nD({call:ko.optional()}).optional()}).optional()}),kA=nz({experimental:nJ(o7(),ko).optional(),sampling:nz({context:ko.optional(),tools:ko.optional()}).optional(),elicitation:kT.optional(),roots:nz({listChanged:nI().optional()}).optional(),tasks:kO.optional(),extensions:nJ(o7(),ko).optional()}),kW=kp.extend({protocolVersion:o7(),capabilities:kA,clientInfo:kj}),kM=km.extend({method:nY("initialize"),params:kW}),kN=nz({experimental:nJ(o7(),ko).optional(),logging:ko.optional(),completions:ko.optional(),prompts:nz({listChanged:nI().optional()}).optional(),resources:nz({subscribe:nI().optional(),listChanged:nI().optional()}).optional(),tools:nz({listChanged:nI().optional()}).optional(),tasks:kE.optional(),extensions:nJ(o7(),ko).optional()}),kz=kg.extend({protocolVersion:o7(),capabilities:kN,serverInfo:kj,instructions:o7().optional()}),kD=kh.extend({method:nY("notifications/initialized"),params:kf.optional()}),kF=km.extend({method:nY("server/discover"),params:kp.optional()}),kL=kg.extend({supportedVersions:nM(o7()),capabilities:kN,instructions:o7().optional()}),kU=km.extend({method:nY("ping"),params:kp.optional()}),kH=nz({progress:nV(),total:n4(nV()),message:n4(o7())}),kG=nz({...kf.shape,...kH.shape,progressToken:ka}),kB=kh.extend({method:nY("notifications/progress"),params:kG}),kK=kp.extend({cursor:ks.optional()}),kJ=km.extend({params:kK.optional()}),kZ=kg.extend({nextCursor:ks.optional()}),kQ=nz({uri:o7(),mimeType:n4(o7()),_meta:nJ(o7(),nE()).optional()}),kX=kQ.extend({text:o7()}),kY=o7().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:"Invalid Base64 string"}),k1=kQ.extend({blob:kY}),k0=nQ(["user","assistant"]),k2=nz({audience:nM(k0).optional(),priority:nV().min(0).max(1).optional(),lastModified:ac({offset:!0}).optional()}),k4=nz({...kx.shape,...kI.shape,uri:o7(),description:n4(o7()),mimeType:n4(o7()),size:n4(nV()),annotations:k2.optional(),_meta:n4(nD({}))}),k6=nz({...kx.shape,...kI.shape,uriTemplate:o7(),description:n4(o7()),mimeType:n4(o7()),annotations:k2.optional(),_meta:n4(nD({}))}),k3=kJ.extend({method:nY("resources/list")}),k9=kZ.extend({resources:nM(k4)}),k5=kJ.extend({method:nY("resources/templates/list")}),k8=kZ.extend({resourceTemplates:nM(k6)}),k7=kp.extend({uri:o7()}),we=km.extend({method:nY("resources/read"),params:k7}),wt=kg.extend({contents:nM(nL([kX,k1]))}),wr=kh.extend({method:nY("notifications/resources/list_changed"),params:kf.optional()}),wi=km.extend({method:nY("resources/subscribe"),params:k7}),wo=km.extend({method:nY("resources/unsubscribe"),params:k7}),wn=nz({toolsListChanged:nI().optional(),promptsListChanged:nI().optional(),resourcesListChanged:nI().optional(),resourceSubscriptions:nM(o7()).optional()}),wa=kp.extend({notifications:wn}),ws=km.extend({method:nY("subscriptions/listen"),params:wa}),wd=kf.extend({notifications:wn}),wc=kh.extend({method:nY("notifications/subscriptions/acknowledged"),params:wd}),wl=ky.extend({[kt]:k_}),wp=kg.extend({_meta:wl}),wu=kf.extend({uri:o7()}),wm=kh.extend({method:nY("notifications/resources/updated"),params:wu}),wf=nz({name:o7(),description:n4(o7()),required:n4(nI())}),wh=nz({...kx.shape,...kI.shape,description:n4(o7()),arguments:n4(nM(wf)),_meta:n4(nD({}))}),wy=kJ.extend({method:nY("prompts/list")}),wg=kZ.extend({prompts:nM(wh)}),w_=kp.extend({name:o7(),arguments:nJ(o7(),o7()).optional()}),wv=km.extend({method:nY("prompts/get"),params:w_}),wb=nz({type:nY("text"),text:o7(),annotations:k2.optional(),_meta:nJ(o7(),nE()).optional()}),w$=nz({type:nY("image"),data:kY,mimeType:o7(),annotations:k2.optional(),_meta:nJ(o7(),nE()).optional()}),wS=nz({type:nY("audio"),data:kY,mimeType:o7(),annotations:k2.optional(),_meta:nJ(o7(),nE()).optional()}),wk=nz({type:nY("tool_use"),name:o7(),id:o7(),input:nJ(o7(),nE()),_meta:nJ(o7(),nE()).optional()}),ww=nz({type:nY("resource"),resource:nL([kX,k1]),annotations:k2.optional(),_meta:nJ(o7(),nE()).optional()}),wV=k4.extend({type:nY("resource_link")}),wP=nL([wb,w$,wS,wV,ww]),wR=nz({role:k0,content:wP}),wq=kg.extend({description:o7().optional(),messages:nM(wR)}),wI=kh.extend({method:nY("notifications/prompts/list_changed"),params:kf.optional()}),wx=nz({title:o7().optional(),readOnlyHint:nI().optional(),destructiveHint:nI().optional(),idempotentHint:nI().optional(),openWorldHint:nI().optional()}),wj=nz({taskSupport:nQ(["required","optional","forbidden"]).optional()}),wC=nz({...kx.shape,...kI.shape,description:o7().optional(),inputSchema:nz({type:nY("object"),properties:nJ(o7(),ki).optional(),required:nM(o7()).optional()}).catchall(nE()),outputSchema:nD({$schema:o7().optional()}).optional(),annotations:wx.optional(),execution:wj.optional(),_meta:nJ(o7(),nE()).optional()}),wT=kJ.extend({method:nY("tools/list")}),wO=kZ.extend({tools:nM(wC)}),wE=kg.extend({content:nM(wP).default([]),structuredContent:nE().optional(),isError:nI().optional()}),wA=wE.or(kg.extend({toolResult:nE()})),wW=ku.extend({name:o7(),arguments:nJ(o7(),nE()).optional()}),wM=km.extend({method:nY("tools/call"),params:wW}),wN=kh.extend({method:nY("notifications/tools/list_changed"),params:kf.optional()}),wz=nz({autoRefresh:nI().default(!0),debounceMs:nV().int().nonnegative().default(300)}),wD=nQ(["debug","info","notice","warning","error","critical","alert","emergency"]),wF=kp.extend({level:wD}),wL=km.extend({method:nY("logging/setLevel"),params:wF}),wU=kf.extend({level:wD,logger:o7().optional(),data:nE()}),wH=kh.extend({method:nY("notifications/message"),params:wU}),wG=nz({name:o7().optional()}),wB=nz({hints:nM(wG).optional(),costPriority:nV().min(0).max(1).optional(),speedPriority:nV().min(0).max(1).optional(),intelligencePriority:nV().min(0).max(1).optional()}),wK=nz({mode:nQ(["auto","required","none"]).optional()}),wJ=nz({type:nY("tool_result"),toolUseId:o7().describe("The unique identifier for the corresponding tool call."),content:nM(wP),structuredContent:nE().optional(),isError:nI().optional(),_meta:nJ(o7(),nE()).optional()}),wZ=nH("type",[wb,w$,wS]),wQ=nH("type",[wb,w$,wS,wk,wJ]),wX=nz({role:k0,content:nL([wQ,nM(wQ)]),_meta:nJ(o7(),nE()).optional()}),wY=ku.extend({messages:nM(wX),modelPreferences:wB.optional(),systemPrompt:o7().optional(),includeContext:nQ(["none","thisServer","allServers"]).optional(),temperature:nV().optional(),maxTokens:nV().int(),stopSequences:nM(o7()).optional(),metadata:ko.optional(),tools:nM(wC).optional(),toolChoice:wK.optional()}),w1=km.extend({method:nY("sampling/createMessage"),params:wY}),w0=kg.extend({model:o7(),stopReason:n4(nQ(["endTurn","stopSequence","maxTokens"]).or(o7())),role:k0,content:wZ}),w2=kg.extend({model:o7(),stopReason:n4(nQ(["endTurn","stopSequence","maxTokens","toolUse"]).or(o7())),role:k0,content:nL([wQ,nM(wQ)])}),w4=nz({type:nY("boolean"),title:o7().optional(),description:o7().optional(),default:nI().optional()}),w6=nz({type:nY("string"),title:o7().optional(),description:o7().optional(),minLength:nV().optional(),maxLength:nV().optional(),format:nQ(["email","uri","date","date-time"]).optional(),default:o7().optional()}),w3=nz({type:nQ(["number","integer"]),title:o7().optional(),description:o7().optional(),minimum:nV().optional(),maximum:nV().optional(),default:nV().optional()}),w9=nz({type:nY("string"),title:o7().optional(),description:o7().optional(),enum:nM(o7()),default:o7().optional()}),w5=nz({type:nY("string"),title:o7().optional(),description:o7().optional(),oneOf:nM(nz({const:o7(),title:o7()})),default:o7().optional()}),w8=nz({type:nY("string"),title:o7().optional(),description:o7().optional(),enum:nM(o7()),enumNames:nM(o7()).optional(),default:o7().optional()}),w7=nL([w9,w5]),Ve=nz({type:nY("array"),title:o7().optional(),description:o7().optional(),minItems:nV().optional(),maxItems:nV().optional(),items:nz({type:nY("string"),enum:nM(o7())}),default:nM(o7()).optional()}),Vt=nz({type:nY("array"),title:o7().optional(),description:o7().optional(),minItems:nV().optional(),maxItems:nV().optional(),items:nz({anyOf:nM(nz({const:o7(),title:o7()}))}),default:nM(o7()).optional()}),Vr=nL([Ve,Vt]),Vi=nL([w8,w7,Vr]),Vo=nL([Vi,w4,w6,w3]),Vn=ku.extend({mode:nY("form").optional(),message:o7(),requestedSchema:nz({type:nY("object"),properties:nJ(o7(),Vo),required:nM(o7()).optional()}).catchall(nE())}),Va=ku.extend({mode:nY("url"),message:o7(),elicitationId:o7(),url:o7().url()}),Vs=nL([Vn,Va]),Vd=km.extend({method:nY("elicitation/create"),params:Vs}),Vc=kf.extend({elicitationId:o7()}),Vl=kh.extend({method:nY("notifications/elicitation/complete"),params:Vc}),Vp=kg.extend({action:nQ(["accept","decline","cancel"]),content:ad(e=>null===e?void 0:e,nJ(o7(),nL([o7(),nV(),nI(),nM(o7())])).optional())}),Vu=nz({type:nY("ref/resource"),uri:o7()}),Vm=nz({type:nY("ref/prompt"),name:o7()}),Vf=kp.extend({ref:nL([Vm,Vu]),argument:nz({name:o7(),value:o7()}),context:nz({arguments:nJ(o7(),o7()).optional()}).optional()}),Vh=km.extend({method:nY("completion/complete"),params:Vf}),Vy=kg.extend({completion:nD({values:nM(o7()).max(100),total:n4(nV().int()),hasMore:n4(nI())})}),Vg=nz({uri:o7().startsWith("file://"),name:o7().optional(),_meta:nJ(o7(),nE()).optional()}),V_=km.extend({method:nY("roots/list"),params:kp.optional()}),Vv=kg.extend({roots:nM(Vg)}),Vb=kh.extend({method:nY("notifications/roots/list_changed"),params:kf.optional()}),V$=nD({ttl:nV().optional(),pollInterval:nV().optional()}),VS=nQ(["working","input_required","completed","failed","cancelled"]),Vk=nz({taskId:o7(),status:VS,ttl:nL([nV(),nj()]),createdAt:o7(),lastUpdatedAt:o7(),pollInterval:n4(nV()),statusMessage:n4(o7())}),Vw=kg.extend({task:Vk}),VV=kf.merge(Vk),VP=kh.extend({method:nY("notifications/tasks/status"),params:VV}),VR=km.extend({method:nY("tasks/get"),params:kp.extend({taskId:o7()})}),Vq=kg.merge(Vk),VI=km.extend({method:nY("tasks/result"),params:kp.extend({taskId:o7()})}),Vx=kg.loose(),Vj=kJ.extend({method:nY("tasks/list")}),VC=kZ.extend({tasks:nM(Vk)}),VT=km.extend({method:nY("tasks/cancel"),params:kp.extend({taskId:o7()})}),VO=kg.merge(Vk),VE=nL([kU,kM,kF,Vh,wL,wv,wy,k3,k5,we,wi,wo,ws,wM,wT]),VA=nL([kR,kB,kD,Vb]),VW=nL([kV,w0,w2,Vp,Vv]),VM=nL([kU,w1,Vd,V_]),VN=nL([kR,kB,wH,wm,wr,wN,wI,wc,Vl]),Vz=nL([kV,kz,kL,Vy,wq,wg,k9,k8,wt,wE,wO,wp]),VD=iV(nd,void 0).superRefine((e,t)=>{if(!URL.canParse(e))return t.addIssue({code:d2,message:"URL must be parseable",fatal:!0}),ta}).refine(e=>{let t=new URL(e);return"javascript:"!==t.protocol&&"data:"!==t.protocol&&"vbscript:"!==t.protocol},{message:"URL cannot use javascript:, data:, or vbscript: scheme"}),VF=nD({resource:o7().url(),authorization_servers:nM(VD).optional(),jwks_uri:o7().url().optional(),scopes_supported:nM(o7()).optional(),bearer_methods_supported:nM(o7()).optional(),resource_signing_alg_values_supported:nM(o7()).optional(),resource_name:o7().optional(),resource_documentation:o7().optional(),resource_policy_uri:o7().url().optional(),resource_tos_uri:o7().url().optional(),tls_client_certificate_bound_access_tokens:nI().optional(),authorization_details_types_supported:nM(o7()).optional(),dpop_signing_alg_values_supported:nM(o7()).optional(),dpop_bound_access_tokens_required:nI().optional()}),VL=nD({issuer:o7(),authorization_endpoint:VD,token_endpoint:VD,registration_endpoint:VD.optional(),scopes_supported:nM(o7()).optional(),response_types_supported:nM(o7()),response_modes_supported:nM(o7()).optional(),grant_types_supported:nM(o7()).optional(),token_endpoint_auth_methods_supported:nM(o7()).optional(),token_endpoint_auth_signing_alg_values_supported:nM(o7()).optional(),service_documentation:VD.optional(),revocation_endpoint:VD.optional(),revocation_endpoint_auth_methods_supported:nM(o7()).optional(),revocation_endpoint_auth_signing_alg_values_supported:nM(o7()).optional(),introspection_endpoint:o7().optional(),introspection_endpoint_auth_methods_supported:nM(o7()).optional(),introspection_endpoint_auth_signing_alg_values_supported:nM(o7()).optional(),code_challenge_methods_supported:nM(o7()).optional(),client_id_metadata_document_supported:nI().optional(),authorization_response_iss_parameter_supported:nI().optional().catch(void 0),dpop_signing_alg_values_supported:nM(o7()).optional()}),VU=nD({issuer:o7(),authorization_endpoint:VD,token_endpoint:VD,userinfo_endpoint:VD.optional(),jwks_uri:VD,registration_endpoint:VD.optional(),scopes_supported:nM(o7()).optional(),response_types_supported:nM(o7()),response_modes_supported:nM(o7()).optional(),grant_types_supported:nM(o7()).optional(),acr_values_supported:nM(o7()).optional(),subject_types_supported:nM(o7()),id_token_signing_alg_values_supported:nM(o7()),id_token_encryption_alg_values_supported:nM(o7()).optional(),id_token_encryption_enc_values_supported:nM(o7()).optional(),userinfo_signing_alg_values_supported:nM(o7()).optional(),userinfo_encryption_alg_values_supported:nM(o7()).optional(),userinfo_encryption_enc_values_supported:nM(o7()).optional(),request_object_signing_alg_values_supported:nM(o7()).optional(),request_object_encryption_alg_values_supported:nM(o7()).optional(),request_object_encryption_enc_values_supported:nM(o7()).optional(),token_endpoint_auth_methods_supported:nM(o7()).optional(),token_endpoint_auth_signing_alg_values_supported:nM(o7()).optional(),display_values_supported:nM(o7()).optional(),claim_types_supported:nM(o7()).optional(),claims_supported:nM(o7()).optional(),service_documentation:o7().optional(),claims_locales_supported:nM(o7()).optional(),ui_locales_supported:nM(o7()).optional(),claims_parameter_supported:nI().optional(),request_parameter_supported:nI().optional(),request_uri_parameter_supported:nI().optional(),require_request_uri_registration:nI().optional(),op_policy_uri:VD.optional(),op_tos_uri:VD.optional(),client_id_metadata_document_supported:nI().optional(),authorization_response_iss_parameter_supported:nI().optional().catch(void 0)}),VH=nz({...VU.shape,...VL.pick({code_challenge_methods_supported:!0}).shape}),VG=nz({access_token:o7(),id_token:o7().optional(),token_type:o7(),expires_in:d4().optional(),scope:o7().optional(),refresh_token:o7().optional(),issuer:o7().optional().catch(void 0)}).strip(),VB=nz({issued_token_type:nY("urn:ietf:params:oauth:token-type:id-jag"),access_token:o7(),token_type:o7().optional(),expires_in:nV().optional(),scope:o7().optional()}).strip(),VK=nz({error:o7(),error_description:o7().optional(),error_uri:o7().optional()}),VJ=VD.optional().or(nY("").transform(()=>void 0)),VZ=nz({redirect_uris:nM(VD),token_endpoint_auth_method:o7().optional(),grant_types:nM(o7()).optional(),response_types:nM(o7()).optional(),application_type:o7().optional(),client_name:o7().optional(),client_uri:VD.optional(),logo_uri:VJ,scope:o7().optional(),contacts:nM(o7()).optional(),tos_uri:VJ,policy_uri:o7().optional(),jwks_uri:VD.optional(),jwks:nT().optional(),software_id:o7().optional(),software_version:o7().optional(),software_statement:o7().optional()}).strip(),VQ=nz({client_id:o7(),client_secret:o7().optional(),client_id_issued_at:nV().optional(),client_secret_expires_at:nV().optional(),issuer:o7().optional().catch(void 0)}).strip(),VX=VZ.merge(VQ),VY=nz({error:o7(),error_description:o7().optional()}).strip(),V1=nz({token:o7(),token_type_hint:o7().optional()}).strip(),V0=Symbol.for("mcp.sdk.errorBrands");function V2(e,t){let r=new Set,i=t;for(;"function"==typeof i;){let e=i.mcpBrand;Object.prototype.hasOwnProperty.call(i,"mcpBrand")&&"string"==typeof e&&r.add(e),i=Object.getPrototypeOf(i)}0!==r.size&&Object.defineProperty(e,V0,{value:r,enumerable:!1,configurable:!0})}function V4(e,t){try{if("object"==typeof t&&null!==t&&Object.prototype.hasOwnProperty.call(e,"mcpBrand")&&"string"==typeof e.mcpBrand&&Object.prototype.hasOwnProperty.call(t,V0)){let r=t[V0];if(r&&"function"==typeof r.has&&r.has(e.mcpBrand))return!0}}catch{}return Function.prototype[Symbol.hasInstance].call(e,t)}(class e extends Error{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.OAuthError"})}static[Symbol.hasInstance](e){return V4(this,e)}static isInstance(e){if("function"!=typeof this)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return V4(this,e)}constructor(e,t,r){super(t),this.code=e,this.errorUri=r,this.name="OAuthError",V2(this,new.target)}toResponseObject(){let e={error:this.code,error_description:this.message};return this.errorUri&&(e.error_uri=this.errorUri),e}static fromResponse(t){return new e(t.error,t.error_description??t.error,t.error_uri)}});let V6=((X={}).NotConnected="NOT_CONNECTED",X.AlreadyConnected="ALREADY_CONNECTED",X.NotInitialized="NOT_INITIALIZED",X.CapabilityNotSupported="CAPABILITY_NOT_SUPPORTED",X.RequestTimeout="REQUEST_TIMEOUT",X.ConnectionClosed="CONNECTION_CLOSED",X.SendFailed="SEND_FAILED",X.InvalidResult="INVALID_RESULT",X.UnsupportedResultType="UNSUPPORTED_RESULT_TYPE",X.InputRequiredRoundsExceeded="INPUT_REQUIRED_ROUNDS_EXCEEDED",X.ListPaginationExceeded="LIST_PAGINATION_EXCEEDED",X.MethodNotSupportedByProtocolVersion="METHOD_NOT_SUPPORTED_BY_PROTOCOL_VERSION",X.EraNegotiationFailed="ERA_NEGOTIATION_FAILED",X.ClientHttpNotImplemented="CLIENT_HTTP_NOT_IMPLEMENTED",X.ClientHttpAuthentication="CLIENT_HTTP_AUTHENTICATION",X.ClientHttpForbidden="CLIENT_HTTP_FORBIDDEN",X.ClientHttpUnexpectedContent="CLIENT_HTTP_UNEXPECTED_CONTENT",X.ClientHttpFailedToOpenStream="CLIENT_HTTP_FAILED_TO_OPEN_STREAM",X.ClientHttpFailedToTerminateSession="CLIENT_HTTP_FAILED_TO_TERMINATE_SESSION",X);var V3=class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.SdkError"})}static[Symbol.hasInstance](e){return V4(this,e)}static isInstance(e){if("function"!=typeof this)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return V4(this,e)}constructor(e,t,r,i){super(t,i),this.code=e,this.data=r,this.name="SdkError",V2(this,new.target)}},V9=class extends V3{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.SdkHttpError"})}constructor(e,t,r,i){super(e,t,r,i),this.name="SdkHttpError"}get status(){return this.data.status}get statusText(){return this.data.statusText}};let V5="2026-07-28",V8=[V5];function V7(e){return e.filter(e=>!(e>=V5))}function Pe(e){return e.filter(e=>e>=V5)}function Pt(e){let t=e.structuredContent;return void 0===t||!("object"!=typeof t||null===t||Array.isArray(t))||e.content?.some(e=>"text"===e.type)?e:{...e,content:[...e.content??[],{type:"text",text:JSON.stringify(t)}]}}let Pr=["task","inputRequests","requestState"];function Pi(e){return null===e||"object"!=typeof e||Array.isArray(e)||void 0!==e.content||Pr.some(t=>t in e)?e:{...e,content:[]}}function Po(){let e,t,r,i,o,n,a,s,c,l,p,u,m,f,h,y,g,_,v,b,$,S,k,w,V,P,R,q,I,x,j,C,T,O,E,A,W,M,N,z,D,F,L,U,H,G,B,K,J,Z,Q,X,Y,ee,et,er,ei,eo,en,ea,es,ed,ec,el,ep,eu,em,ef,eh,ey,eg,e_,ev,eb,e$,eS,ek,ew,eV,eP,eR,eq,eI,ex,ej,eC,eT,eO,eE,eA,eW,eM,eN,ez,eD,eF,eL,eU,eH,eG,eB,eK,eJ,eZ,eQ,eX,eY,e1,e0,e2,e4,e6,e3,e9,e5,e8,e7,te,tt,tr,ti,to,tn,ta,ts,td,tc,tl,tp,tu,tm,tf,th,ty,tg,t_,tv,tb,t$,tS;return d??=(e=aa(()=>nL([o7(),nV(),nI(),nj(),nJ(o7(),e),nM(e)])),t=nJ(o7(),e),r=nL([o7(),nV().int()]),i=o7(),o=nz({ttl:nV().optional()}),n=nz({taskId:o7()}),c=(s=nz({_meta:(a=nD({progressToken:r.optional(),"io.modelcontextprotocol/related-task":n.optional()})).optional()})).extend({task:o.optional()}),l=nz({method:o7(),params:s.loose().optional()}),p=nz({_meta:a.optional()}),u=nz({method:o7(),params:p.loose().optional()}),m=nD({_meta:a.optional()}),f=nL([o7(),nV().int()]),h=m.strict(),y=p.extend({requestId:f.optional(),reason:o7().optional()}),g=u.extend({method:nY("notifications/cancelled"),params:y}),_=nz({src:o7(),mimeType:o7().optional(),sizes:nM(o7()).optional(),theme:nQ(["light","dark"]).optional()}),v=nz({icons:nM(_).optional()}),$=(b=nz({name:o7(),title:o7().optional()})).extend({...b.shape,...v.shape,version:o7(),websiteUrl:o7().optional(),description:o7().optional()}),S=nB(nz({applyDefaults:nI().optional()}),t),k=ad(e=>e&&"object"==typeof e&&!Array.isArray(e)&&0===Object.keys(e).length?{form:{}}:e,nB(nz({form:S.optional(),url:t.optional()}),t.optional())),w=nD({list:t.optional(),cancel:t.optional(),requests:nD({sampling:nD({createMessage:t.optional()}).optional(),elicitation:nD({create:t.optional()}).optional()}).optional()}),V=nD({list:t.optional(),cancel:t.optional(),requests:nD({tools:nD({call:t.optional()}).optional()}).optional()}),P=nz({experimental:nJ(o7(),t).optional(),sampling:nz({context:t.optional(),tools:t.optional()}).optional(),elicitation:k.optional(),roots:nz({listChanged:nI().optional()}).optional(),tasks:w.optional(),extensions:nJ(o7(),t).optional()}),R=s.extend({protocolVersion:o7(),capabilities:P,clientInfo:$}),q=l.extend({method:nY("initialize"),params:R}),I=nz({experimental:nJ(o7(),t).optional(),logging:t.optional(),completions:t.optional(),prompts:nz({listChanged:nI().optional()}).optional(),resources:nz({subscribe:nI().optional(),listChanged:nI().optional()}).optional(),tools:nz({listChanged:nI().optional()}).optional(),tasks:V.optional(),extensions:nJ(o7(),t).optional()}),x=m.extend({protocolVersion:o7(),capabilities:I,serverInfo:$,instructions:o7().optional()}),j=u.extend({method:nY("notifications/initialized"),params:p.optional()}),C=l.extend({method:nY("ping"),params:s.optional()}),T=nz({progress:nV(),total:n4(nV()),message:n4(o7())}),O=nz({...p.shape,...T.shape,progressToken:r}),E=u.extend({method:nY("notifications/progress"),params:O}),A=s.extend({cursor:i.optional()}),W=l.extend({params:A.optional()}),M=m.extend({nextCursor:i.optional()}),z=(N=nz({uri:o7(),mimeType:n4(o7()),_meta:nJ(o7(),nE()).optional()})).extend({text:o7()}),D=o7().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:"Invalid Base64 string"}),F=N.extend({blob:D}),U=nz({audience:nM(L=nQ(["user","assistant"])).optional(),priority:nV().min(0).max(1).optional(),lastModified:ac({offset:!0}).optional()}),H=nz({...b.shape,...v.shape,uri:o7(),description:n4(o7()),mimeType:n4(o7()),size:n4(nV()),annotations:U.optional(),_meta:n4(nD({}))}),G=nz({...b.shape,...v.shape,uriTemplate:o7(),description:n4(o7()),mimeType:n4(o7()),annotations:U.optional(),_meta:n4(nD({}))}),B=W.extend({method:nY("resources/list")}),K=M.extend({resources:nM(H)}),J=W.extend({method:nY("resources/templates/list")}),Z=M.extend({resourceTemplates:nM(G)}),Q=s.extend({uri:o7()}),X=l.extend({method:nY("resources/read"),params:Q}),Y=m.extend({contents:nM(nL([z,F]))}),ee=u.extend({method:nY("notifications/resources/list_changed"),params:p.optional()}),et=l.extend({method:nY("resources/subscribe"),params:Q}),er=l.extend({method:nY("resources/unsubscribe"),params:Q}),ei=p.extend({uri:o7()}),eo=u.extend({method:nY("notifications/resources/updated"),params:ei}),en=nz({name:o7(),description:n4(o7()),required:n4(nI())}),ea=nz({...b.shape,...v.shape,description:n4(o7()),arguments:n4(nM(en)),_meta:n4(nD({}))}),es=W.extend({method:nY("prompts/list")}),ed=M.extend({prompts:nM(ea)}),ec=s.extend({name:o7(),arguments:nJ(o7(),o7()).optional()}),el=l.extend({method:nY("prompts/get"),params:ec}),ep=nz({type:nY("text"),text:o7(),annotations:U.optional(),_meta:nJ(o7(),nE()).optional()}),eu=nz({type:nY("image"),data:D,mimeType:o7(),annotations:U.optional(),_meta:nJ(o7(),nE()).optional()}),em=nz({type:nY("audio"),data:D,mimeType:o7(),annotations:U.optional(),_meta:nJ(o7(),nE()).optional()}),ef=nz({type:nY("tool_use"),name:o7(),id:o7(),input:nJ(o7(),nE()),_meta:nJ(o7(),nE()).optional()}),eh=nz({type:nY("resource"),resource:nL([z,F]),annotations:U.optional(),_meta:nJ(o7(),nE()).optional()}),e_=nz({role:L,content:eg=nL([ep,eu,em,ey=H.extend({type:nY("resource_link")}),eh])}),ev=m.extend({description:o7().optional(),messages:nM(e_)}),eb=u.extend({method:nY("notifications/prompts/list_changed"),params:p.optional()}),e$=nz({title:o7().optional(),readOnlyHint:nI().optional(),destructiveHint:nI().optional(),idempotentHint:nI().optional(),openWorldHint:nI().optional()}),eS=nz({taskSupport:nQ(["required","optional","forbidden"]).optional()}),ek=nz({...b.shape,...v.shape,description:o7().optional(),inputSchema:nz({type:nY("object"),properties:nJ(o7(),e).optional(),required:nM(o7()).optional()}).catchall(nE()),outputSchema:nz({type:nY("object"),properties:nJ(o7(),e).optional(),required:nM(o7()).optional()}).catchall(nE()).optional(),annotations:e$.optional(),execution:eS.optional(),_meta:nJ(o7(),nE()).optional()}),ew=W.extend({method:nY("tools/list")}),eV=M.extend({tools:nM(ek)}),eP=m.extend({content:nM(eg),structuredContent:nJ(o7(),nE()).optional(),isError:nI().optional()}),eR=c.extend({name:o7(),arguments:nJ(o7(),nE()).optional()}),eq=l.extend({method:nY("tools/call"),params:eR}),eI=u.extend({method:nY("notifications/tools/list_changed"),params:p.optional()}),ex=nQ(["debug","info","notice","warning","error","critical","alert","emergency"]),ej=s.extend({level:ex}),eC=l.extend({method:nY("logging/setLevel"),params:ej}),eT=p.extend({level:ex,logger:o7().optional(),data:nE()}),eO=u.extend({method:nY("notifications/message"),params:eT}),eE=nz({name:o7().optional()}),eA=nz({hints:nM(eE).optional(),costPriority:nV().min(0).max(1).optional(),speedPriority:nV().min(0).max(1).optional(),intelligencePriority:nV().min(0).max(1).optional()}),eW=nz({mode:nQ(["auto","required","none"]).optional()}),eM=nz({type:nY("tool_result"),toolUseId:o7().describe("The unique identifier for the corresponding tool call."),content:nM(eg),structuredContent:nz({}).loose().optional(),isError:nI().optional(),_meta:nJ(o7(),nE()).optional()}),eN=nH("type",[ep,eu,em]),eD=nz({role:L,content:nL([ez=nH("type",[ep,eu,em,ef,eM]),nM(ez)]),_meta:nJ(o7(),nE()).optional()}),eF=c.extend({messages:nM(eD),modelPreferences:eA.optional(),systemPrompt:o7().optional(),includeContext:nQ(["none","thisServer","allServers"]).optional(),temperature:nV().optional(),maxTokens:nV().int(),stopSequences:nM(o7()).optional(),metadata:t.optional(),tools:nM(ek).optional(),toolChoice:eW.optional()}),eL=l.extend({method:nY("sampling/createMessage"),params:eF}),eU=m.extend({model:o7(),stopReason:n4(nQ(["endTurn","stopSequence","maxTokens"]).or(o7())),role:L,content:eN}),eH=m.extend({model:o7(),stopReason:n4(nQ(["endTurn","stopSequence","maxTokens","toolUse"]).or(o7())),role:L,content:nL([ez,nM(ez)])}),eG=nz({type:nY("boolean"),title:o7().optional(),description:o7().optional(),default:nI().optional()}),eB=nz({type:nY("string"),title:o7().optional(),description:o7().optional(),minLength:nV().optional(),maxLength:nV().optional(),format:nQ(["email","uri","date","date-time"]).optional(),default:o7().optional()}),eK=nz({type:nQ(["number","integer"]),title:o7().optional(),description:o7().optional(),minimum:nV().optional(),maximum:nV().optional(),default:nV().optional()}),eJ=nz({type:nY("string"),title:o7().optional(),description:o7().optional(),enum:nM(o7()),default:o7().optional()}),eZ=nz({type:nY("string"),title:o7().optional(),description:o7().optional(),oneOf:nM(nz({const:o7(),title:o7()})),default:o7().optional()}),eQ=nz({type:nY("string"),title:o7().optional(),description:o7().optional(),enum:nM(o7()),enumNames:nM(o7()).optional(),default:o7().optional()}),eX=nL([eJ,eZ]),eY=nz({type:nY("array"),title:o7().optional(),description:o7().optional(),minItems:nV().optional(),maxItems:nV().optional(),items:nz({type:nY("string"),enum:nM(o7())}),default:nM(o7()).optional()}),e0=nL([eY,e1=nz({type:nY("array"),title:o7().optional(),description:o7().optional(),minItems:nV().optional(),maxItems:nV().optional(),items:nz({anyOf:nM(nz({const:o7(),title:o7()}))}),default:nM(o7()).optional()})]),e2=nL([eQ,eX,e0]),e4=nL([e2,eG,eB,eK]),e6=c.extend({mode:nY("form").optional(),message:o7(),requestedSchema:nz({type:nY("object"),properties:nJ(o7(),e4),required:nM(o7()).optional()}).catchall(nE())}),e9=nL([e6,e3=c.extend({mode:nY("url"),message:o7(),elicitationId:o7(),url:o7().url()})]),e5=l.extend({method:nY("elicitation/create"),params:e9}),e8=p.extend({elicitationId:o7()}),e7=u.extend({method:nY("notifications/elicitation/complete"),params:e8}),te=m.extend({action:nQ(["accept","decline","cancel"]),content:ad(e=>null===e?void 0:e,nJ(o7(),nL([o7(),nV(),nI(),nM(o7())])).optional())}),tt=nz({type:nY("ref/resource"),uri:o7()}),tr=nz({type:nY("ref/prompt"),name:o7()}),ti=s.extend({ref:nL([tr,tt]),argument:nz({name:o7(),value:o7()}),context:nz({arguments:nJ(o7(),o7()).optional()}).optional()}),to=l.extend({method:nY("completion/complete"),params:ti}),tn=m.extend({completion:nD({values:nM(o7()).max(100),total:n4(nV().int()),hasMore:n4(nI())})}),ta=nz({uri:o7().startsWith("file://"),name:o7().optional(),_meta:nJ(o7(),nE()).optional()}),ts=l.extend({method:nY("roots/list"),params:s.optional()}),td=m.extend({roots:nM(ta)}),tc=u.extend({method:nY("notifications/roots/list_changed"),params:p.optional()}),tl=nD({ttl:nV().optional(),pollInterval:nV().optional()}),tp=nQ(["working","input_required","completed","failed","cancelled"]),tu=nz({taskId:o7(),status:tp,ttl:nL([nV(),nj()]),createdAt:o7(),lastUpdatedAt:o7(),pollInterval:n4(nV()),statusMessage:n4(o7())}),tm=m.extend({task:tu}),tf=p.merge(tu),th=u.extend({method:nY("notifications/tasks/status"),params:tf}),ty=l.extend({method:nY("tasks/get"),params:s.extend({taskId:o7()})}),tg=m.merge(tu),t_=l.extend({method:nY("tasks/result"),params:s.extend({taskId:o7()})}),tv=m.loose(),tb=W.extend({method:nY("tasks/list")}),t$=M.extend({tasks:nM(tu)}),tS=l.extend({method:nY("tasks/cancel"),params:s.extend({taskId:o7()})}),{JSONValueSchema:e,JSONObjectSchema:t,ProgressTokenSchema:r,CursorSchema:i,TaskMetadataSchema:o,RelatedTaskMetadataSchema:n,RequestMetaSchema:a,BaseRequestParamsSchema:s,TaskAugmentedRequestParamsSchema:c,RequestSchema:l,NotificationsParamsSchema:p,NotificationSchema:u,ResultSchema:m,RequestIdSchema:f,EmptyResultSchema:h,CancelledNotificationParamsSchema:y,CancelledNotificationSchema:g,IconSchema:_,IconsSchema:v,BaseMetadataSchema:b,ImplementationSchema:$,ClientTasksCapabilitySchema:w,ServerTasksCapabilitySchema:V,ClientCapabilitiesSchema:P,InitializeRequestParamsSchema:R,InitializeRequestSchema:q,ServerCapabilitiesSchema:I,InitializeResultSchema:x,InitializedNotificationSchema:j,PingRequestSchema:C,ProgressSchema:T,ProgressNotificationParamsSchema:O,ProgressNotificationSchema:E,PaginatedRequestParamsSchema:A,PaginatedRequestSchema:W,PaginatedResultSchema:M,ResourceContentsSchema:N,TextResourceContentsSchema:z,BlobResourceContentsSchema:F,RoleSchema:L,AnnotationsSchema:U,ResourceSchema:H,ResourceTemplateSchema:G,ListResourcesRequestSchema:B,ListResourcesResultSchema:K,ListResourceTemplatesRequestSchema:J,ListResourceTemplatesResultSchema:Z,ResourceRequestParamsSchema:Q,ReadResourceRequestParamsSchema:Q,ReadResourceRequestSchema:X,ReadResourceResultSchema:Y,ResourceListChangedNotificationSchema:ee,SubscribeRequestParamsSchema:Q,SubscribeRequestSchema:et,UnsubscribeRequestParamsSchema:Q,UnsubscribeRequestSchema:er,ResourceUpdatedNotificationParamsSchema:ei,ResourceUpdatedNotificationSchema:eo,PromptArgumentSchema:en,PromptSchema:ea,ListPromptsRequestSchema:es,ListPromptsResultSchema:ed,GetPromptRequestParamsSchema:ec,GetPromptRequestSchema:el,TextContentSchema:ep,ImageContentSchema:eu,AudioContentSchema:em,ToolUseContentSchema:ef,EmbeddedResourceSchema:eh,ResourceLinkSchema:ey,ContentBlockSchema:eg,PromptMessageSchema:e_,GetPromptResultSchema:ev,PromptListChangedNotificationSchema:eb,ToolAnnotationsSchema:e$,ToolExecutionSchema:eS,ToolSchema:ek,ListToolsRequestSchema:ew,ListToolsResultSchema:eV,CallToolResultSchema:eP,CallToolRequestParamsSchema:eR,CallToolRequestSchema:eq,ToolListChangedNotificationSchema:eI,LoggingLevelSchema:ex,SetLevelRequestParamsSchema:ej,SetLevelRequestSchema:eC,LoggingMessageNotificationParamsSchema:eT,LoggingMessageNotificationSchema:eO,ModelHintSchema:eE,ModelPreferencesSchema:eA,ToolChoiceSchema:eW,ToolResultContentSchema:eM,SamplingContentSchema:eN,SamplingMessageContentBlockSchema:ez,SamplingMessageSchema:eD,CreateMessageRequestParamsSchema:eF,CreateMessageRequestSchema:eL,CreateMessageResultSchema:eU,CreateMessageResultWithToolsSchema:eH,BooleanSchemaSchema:eG,StringSchemaSchema:eB,NumberSchemaSchema:eK,UntitledSingleSelectEnumSchemaSchema:eJ,TitledSingleSelectEnumSchemaSchema:eZ,LegacyTitledEnumSchemaSchema:eQ,SingleSelectEnumSchemaSchema:eX,UntitledMultiSelectEnumSchemaSchema:eY,TitledMultiSelectEnumSchemaSchema:e1,MultiSelectEnumSchemaSchema:e0,EnumSchemaSchema:e2,PrimitiveSchemaDefinitionSchema:e4,ElicitRequestFormParamsSchema:e6,ElicitRequestURLParamsSchema:e3,ElicitRequestParamsSchema:e9,ElicitRequestSchema:e5,ElicitationCompleteNotificationParamsSchema:e8,ElicitationCompleteNotificationSchema:e7,ElicitResultSchema:te,ResourceTemplateReferenceSchema:tt,PromptReferenceSchema:tr,CompleteRequestParamsSchema:ti,CompleteRequestSchema:to,CompleteResultSchema:tn,RootSchema:ta,ListRootsRequestSchema:ts,ListRootsResultSchema:td,RootsListChangedNotificationSchema:tc,TaskCreationParamsSchema:tl,TaskStatusSchema:tp,TaskSchema:tu,CreateTaskResultSchema:tm,TaskStatusNotificationParamsSchema:tf,TaskStatusNotificationSchema:th,GetTaskRequestSchema:ty,GetTaskResultSchema:tg,GetTaskPayloadRequestSchema:t_,GetTaskPayloadResultSchema:tv,ListTasksRequestSchema:tb,ListTasksResultSchema:t$,CancelTaskRequestSchema:tS,CancelTaskResultSchema:m.merge(tu),ClientRequestSchema:nL([C,q,to,eC,el,es,B,J,X,et,er,eq,ew,ty,t_,tb,tS]),ClientNotificationSchema:nL([g,E,j,tc,th]),ClientResultSchema:nL([h,eU,eH,te,td,tg,t$,tm]),ServerRequestSchema:nL([C,eL,e5,ts,ty,t_,tb,tS]),ServerNotificationSchema:nL([g,E,eO,eo,ee,eI,eb,th,e7]),ServerResultSchema:nL([h,x,tn,ev,ed,K,Z,Y,eP,eV,tg,t$,tm]),CallToolResultWireSchema:nE().superRefine((e,t)=>{if(!("object"!=typeof e||null===e||Array.isArray(e))&&void 0===e.content){for(let r of Pr)if(r in e)return void t.addIssue({code:"custom",message:`content is required when the body carries '${r}' — another result family cannot default into an empty tools/call success`})}}).transform(Pi).pipe(eP)})}function Pn(e){return"object"!==e.type}let Pa=new Set(["const","enum","default","examples"]),Ps=new Set(["properties","patternProperties","$defs","definitions","dependentSchemas","dependencies"]);function Pd(e){return void 0!==e&&!("string"==typeof e&&e.startsWith("#"))}let Pc={ping:null,initialize:null,"completion/complete":null,"logging/setLevel":null,"prompts/get":null,"prompts/list":null,"resources/list":null,"resources/templates/list":null,"resources/read":null,"resources/subscribe":null,"resources/unsubscribe":null,"tools/call":null,"tools/list":null,"tasks/get":null,"tasks/result":null,"tasks/list":null,"tasks/cancel":null,"sampling/createMessage":null,"elicitation/create":null,"roots/list":null},Pl={"notifications/cancelled":null,"notifications/progress":null,"notifications/initialized":null,"notifications/roots/list_changed":null,"notifications/tasks/status":null,"notifications/message":null,"notifications/resources/updated":null,"notifications/resources/list_changed":null,"notifications/tools/list_changed":null,"notifications/prompts/list_changed":null,"notifications/elicitation/complete":null},Pp={ping:null,initialize:null,"completion/complete":null,"logging/setLevel":null,"prompts/get":null,"prompts/list":null,"resources/list":null,"resources/templates/list":null,"resources/read":null,"resources/subscribe":null,"resources/unsubscribe":null,"tools/call":null,"tools/list":null,"sampling/createMessage":null,"elicitation/create":null,"roots/list":null};function Pu(){if(c)return c;let e=Po();return c={requestSchemas:{ping:e.PingRequestSchema,initialize:e.InitializeRequestSchema,"completion/complete":e.CompleteRequestSchema,"logging/setLevel":e.SetLevelRequestSchema,"prompts/get":e.GetPromptRequestSchema,"prompts/list":e.ListPromptsRequestSchema,"resources/list":e.ListResourcesRequestSchema,"resources/templates/list":e.ListResourceTemplatesRequestSchema,"resources/read":e.ReadResourceRequestSchema,"resources/subscribe":e.SubscribeRequestSchema,"resources/unsubscribe":e.UnsubscribeRequestSchema,"tools/call":e.CallToolRequestSchema,"tools/list":e.ListToolsRequestSchema,"tasks/get":e.GetTaskRequestSchema,"tasks/result":e.GetTaskPayloadRequestSchema,"tasks/list":e.ListTasksRequestSchema,"tasks/cancel":e.CancelTaskRequestSchema,"sampling/createMessage":e.CreateMessageRequestSchema,"elicitation/create":e.ElicitRequestSchema,"roots/list":e.ListRootsRequestSchema},notificationSchemas:{"notifications/cancelled":e.CancelledNotificationSchema,"notifications/progress":e.ProgressNotificationSchema,"notifications/initialized":e.InitializedNotificationSchema,"notifications/roots/list_changed":e.RootsListChangedNotificationSchema,"notifications/tasks/status":e.TaskStatusNotificationSchema,"notifications/message":e.LoggingMessageNotificationSchema,"notifications/resources/updated":e.ResourceUpdatedNotificationSchema,"notifications/resources/list_changed":e.ResourceListChangedNotificationSchema,"notifications/tools/list_changed":e.ToolListChangedNotificationSchema,"notifications/prompts/list_changed":e.PromptListChangedNotificationSchema,"notifications/elicitation/complete":e.ElicitationCompleteNotificationSchema},resultSchemas:{ping:e.EmptyResultSchema,initialize:e.InitializeResultSchema,"completion/complete":e.CompleteResultSchema,"logging/setLevel":e.EmptyResultSchema,"prompts/get":e.GetPromptResultSchema,"prompts/list":e.ListPromptsResultSchema,"resources/list":e.ListResourcesResultSchema,"resources/templates/list":e.ListResourceTemplatesResultSchema,"resources/read":e.ReadResourceResultSchema,"resources/subscribe":e.EmptyResultSchema,"resources/unsubscribe":e.EmptyResultSchema,"tools/call":e.CallToolResultWireSchema,"tools/list":e.ListToolsResultSchema,"sampling/createMessage":e.CreateMessageResultWithToolsSchema,"elicitation/create":e.ElicitResultSchema,"roots/list":e.ListRootsResultSchema}}}function Pm(e){return Object.prototype.hasOwnProperty.call(Pc,e)}function Pf(e){return Object.prototype.hasOwnProperty.call(Pl,e)}function Ph(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)}function Py(e,t){if(void 0===e)return{ok:!1,reason:"not-in-era"};let r=e.safeParse(t);return r.success?{ok:!0,value:r.data}:{ok:!1,reason:"invalid",message:String(r.error)}}Object.keys(Pc),Object.keys(Pl);let Pg={ok:!1,reason:"not-in-era"};function P_(e){return Ph(e)&&Ph(e.outputSchema)&&Pn(e.outputSchema)}let Pv={era:"2025-11-25",hasRequestMethod:Pm,hasNotificationMethod:Pf,validateRequest:(e,t)=>Py(Pm(e)?Pu().requestSchemas[e]:void 0,t),validateResult:(e,t)=>Py(Object.prototype.hasOwnProperty.call(Pp,e)?Pu().resultSchemas[e]:void 0,t),validateNotification:(e,t)=>Py(Pf(e)?Pu().notificationSchemas[e]:void 0,t),hasInputRequestMethod:()=>!1,validateInputRequest:()=>Pg,validateInputResponse:()=>Pg,samplingResultVariant:(e,t)=>{let r=Po();return Py(e?r.CreateMessageResultWithToolsSchema:r.CreateMessageResultSchema,t)},outboundEnvelope:e=>void 0,validateEnvelopeMeta:e=>[],projectCallToolResult(e,t){let r=Pt(e),i=r.structuredContent;if(void 0===i)return r;let o="object"!=typeof i||null===i||Array.isArray(i),n=void 0!==t&&Pn(t);return o||n?{...r,structuredContent:{result:i}}:r},decodeResult(e,t){if(Ph(t)&&"resultType"in t){let e={...t};return delete e.resultType,{kind:"complete",result:e}}return{kind:"complete",result:t}},encodeResult(e,t){if("tools/list"!==e)return t;let r=t.tools;return Array.isArray(r)&&r.some(e=>P_(e))?{...t,tools:r.map(e=>P_(e)?{...e,outputSchema:function(e){var t;let r="string"==typeof e.$schema?e.$schema:void 0;if(Pd(e.$id))return{...void 0!==r&&{$schema:r},type:"object",properties:{result:e},required:["result"]};let i="string"==typeof(t=e.$schema)&&S4.has(t.replace(/#$/,""))&&!0!==e.$recursiveAnchor,o=(e,t)=>{if(Array.isArray(e))return e.map(e=>o(e,!1));if(null===e||"object"!=typeof e||!t&&Pd(e.$id))return e;let r={},n=!1;for(let[a,s]of Object.entries(e))t?r[a]=o(s,!1):("$ref"===a||"$dynamicRef"===a)&&"string"==typeof s?r[a]="#"===s?"#/properties/result":s.startsWith("#/")?`#/properties/result${s.slice(1)}`:s:"$recursiveRef"===a&&"#"===s&&i?n=!0:Pa.has(a)?r[a]=s:Ps.has(a)?r[a]=o(s,!0):r[a]=o(s,!1);return n&&("$ref"in r?r.allOf=[...Array.isArray(r.allOf)?r.allOf:[],{$ref:"#/properties/result"}]:r.$ref="#/properties/result"),r};return{...void 0!==r&&{$schema:r},type:"object",properties:{result:o(e,!1)},required:["result"]}}(e.outputSchema)}:e)}:t},encodeErrorCode:e=>-32002===e?-32602:e,checkInboundEnvelope:e=>void 0};function Pb(){return l??=function(){let e=aa(()=>nL([o7(),nV(),nI(),nj(),nJ(o7(),e),nM(e)])),t=nJ(o7(),e),r=nL([o7(),nV().int()]),i=o7(),o=nL([o7(),nV().int()]),n=nQ(["user","assistant"]),a=nQ(["debug","info","notice","warning","error","critical","alert","emergency"]),s=o7().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:"Invalid Base64 string"}),d=nz({ttl:nV().optional()}),c=nz({taskId:o7()}),l=nD({progressToken:r.optional(),"io.modelcontextprotocol/related-task":c.optional()}),p=nz({_meta:l.optional()}),u=p.extend({task:d.optional()}),m=nz({_meta:l.optional()}),f=nz({method:o7(),params:m.loose().optional()}),h=nz({src:o7(),mimeType:o7().optional(),sizes:nM(o7()).optional(),theme:nQ(["light","dark"]).optional()}),y=nz({icons:nM(h).optional()}),g=nz({name:o7(),title:o7().optional()}),_=g.extend({...g.shape,...y.shape,version:o7(),websiteUrl:o7().optional(),description:o7().optional()}),v=nB(nz({applyDefaults:nI().optional()}),t),b=ad(e=>e&&"object"==typeof e&&!Array.isArray(e)&&0===Object.keys(e).length?{form:{}}:e,nB(nz({form:v.optional(),url:t.optional()}),t.optional())),$=nD({list:t.optional(),cancel:t.optional(),requests:nD({sampling:nD({createMessage:t.optional()}).optional(),elicitation:nD({create:t.optional()}).optional()}).optional()}),S=nD({list:t.optional(),cancel:t.optional(),requests:nD({tools:nD({call:t.optional()}).optional()}).optional()}),k=nz({experimental:nJ(o7(),t).optional(),sampling:nz({context:t.optional(),tools:t.optional()}).optional(),elicitation:b.optional(),roots:nz({listChanged:nI().optional()}).optional(),tasks:$.optional(),extensions:nJ(o7(),t).optional()}),w=nz({experimental:nJ(o7(),t).optional(),logging:t.optional(),completions:t.optional(),prompts:nz({listChanged:nI().optional()}).optional(),resources:nz({subscribe:nI().optional(),listChanged:nI().optional()}).optional(),tools:nz({listChanged:nI().optional()}).optional(),tasks:S.optional(),extensions:nJ(o7(),t).optional()}),V=nz({progress:nV(),total:n4(nV()),message:n4(o7())}),P=nz({...m.shape,...V.shape,progressToken:r}),R=f.extend({method:nY("notifications/progress"),params:P}),q=m.extend({level:a,logger:o7().optional(),data:nE()}),I=f.extend({method:nY("notifications/message"),params:q}),x=nz({uri:o7(),mimeType:n4(o7()),_meta:nJ(o7(),nE()).optional()}),j=x.extend({text:o7()}),C=x.extend({blob:s}),T=nz({audience:nM(n).optional(),priority:nV().min(0).max(1).optional(),lastModified:ac({offset:!0}).optional()}),O=nz({...g.shape,...y.shape,uri:o7(),description:n4(o7()),mimeType:n4(o7()),size:n4(nV()),annotations:T.optional(),_meta:n4(nD({}))}),E=nz({...g.shape,...y.shape,uriTemplate:o7(),description:n4(o7()),mimeType:n4(o7()),annotations:T.optional(),_meta:n4(nD({}))}),A=f.extend({method:nY("notifications/resources/list_changed"),params:m.optional()}),W=m.extend({uri:o7()}),M=f.extend({method:nY("notifications/resources/updated"),params:W}),N=nz({name:o7(),description:n4(o7()),required:n4(nI())}),z=nz({...g.shape,...y.shape,description:n4(o7()),arguments:n4(nM(N)),_meta:n4(nD({}))}),D=f.extend({method:nY("notifications/prompts/list_changed"),params:m.optional()}),F=nz({type:nY("text"),text:o7(),annotations:T.optional(),_meta:nJ(o7(),nE()).optional()}),L=nz({type:nY("image"),data:s,mimeType:o7(),annotations:T.optional(),_meta:nJ(o7(),nE()).optional()}),U=nz({type:nY("audio"),data:s,mimeType:o7(),annotations:T.optional(),_meta:nJ(o7(),nE()).optional()}),H=nz({type:nY("tool_use"),name:o7(),id:o7(),input:nJ(o7(),nE()),_meta:nJ(o7(),nE()).optional()}),G=nz({type:nY("resource"),resource:nL([j,C]),annotations:T.optional(),_meta:nJ(o7(),nE()).optional()}),B=O.extend({type:nY("resource_link")}),K=nL([F,L,U,B,G]),J=nz({role:n,content:K}),Z=nz({title:o7().optional(),readOnlyHint:nI().optional(),destructiveHint:nI().optional(),idempotentHint:nI().optional(),openWorldHint:nI().optional()}),Q=f.extend({method:nY("notifications/tools/list_changed"),params:m.optional()}),X=nz({name:o7().optional()}),Y=nz({hints:nM(X).optional(),costPriority:nV().min(0).max(1).optional(),speedPriority:nV().min(0).max(1).optional(),intelligencePriority:nV().min(0).max(1).optional()}),ee=nz({mode:nQ(["auto","required","none"]).optional()}),et=nz({type:nY("boolean"),title:o7().optional(),description:o7().optional(),default:nI().optional()}),er=nz({type:nY("string"),title:o7().optional(),description:o7().optional(),minLength:nV().optional(),maxLength:nV().optional(),format:nQ(["email","uri","date","date-time"]).optional(),default:o7().optional()}),ei=nz({type:nQ(["number","integer"]),title:o7().optional(),description:o7().optional(),minimum:nV().optional(),maximum:nV().optional(),default:nV().optional()}),eo=nz({type:nY("string"),title:o7().optional(),description:o7().optional(),enum:nM(o7()),default:o7().optional()}),en=nz({type:nY("string"),title:o7().optional(),description:o7().optional(),oneOf:nM(nz({const:o7(),title:o7()})),default:o7().optional()}),ea=nz({type:nY("string"),title:o7().optional(),description:o7().optional(),enum:nM(o7()),enumNames:nM(o7()).optional(),default:o7().optional()}),es=nL([eo,en]),ed=nz({type:nY("array"),title:o7().optional(),description:o7().optional(),minItems:nV().optional(),maxItems:nV().optional(),items:nz({type:nY("string"),enum:nM(o7())}),default:nM(o7()).optional()}),ec=nz({type:nY("array"),title:o7().optional(),description:o7().optional(),minItems:nV().optional(),maxItems:nV().optional(),items:nz({anyOf:nM(nz({const:o7(),title:o7()}))}),default:nM(o7()).optional()}),el=nL([ed,ec]),ep=nL([ea,es,el]),eu=nL([ep,et,er,ei]),em=u.extend({mode:nY("form").optional(),message:o7(),requestedSchema:nz({type:nY("object"),properties:nJ(o7(),eu),required:nM(o7()).optional()}).catchall(nE())}),ef=nz({type:nY("ref/resource"),uri:o7()}),eh=nz({type:nY("ref/prompt"),name:o7()}),ey=nz({uri:o7().startsWith("file://"),name:o7().optional(),_meta:nJ(o7(),nE()).optional()}),eg=k.shape,e_=nz({experimental:eg.experimental,sampling:eg.sampling,elicitation:eg.elicitation,roots:eg.roots,extensions:eg.extensions}),ev=w.shape,eb=nz({experimental:ev.experimental,logging:ev.logging,completions:ev.completions,prompts:ev.prompts,resources:ev.resources,tools:ev.tools,extensions:ev.extensions}),e$=nD({progressToken:r.optional(),[S5]:o7(),[S8]:_.optional(),[ke]:e_,[kr]:a.optional()}),eS=nz({...g.shape,...y.shape,description:o7().optional(),inputSchema:nD({$schema:o7().optional(),type:nY("object")}),outputSchema:nD({$schema:o7().optional()}).optional(),annotations:Z.optional(),_meta:nJ(o7(),nE()).optional()}),ek=nz({type:nY("tool_result"),toolUseId:o7(),content:nM(K),structuredContent:nE().optional(),isError:nI().optional(),_meta:nJ(o7(),nE()).optional()}),ew=nL([F,L,U,H,ek]),eV=nz({role:n,content:nL([ew,nM(ew)]),_meta:nJ(o7(),nE()).optional()}),eP=o7(),eR=nD({[S7]:_.optional().catch(void 0)}),eq=eR.optional();function eI(e){return nD({_meta:eq,resultType:eP.default("complete"),...e})}let ex=eI({}),ej=eI({nextCursor:i.optional()}),eC=eI({content:nM(K),structuredContent:nE().optional(),isError:nI().optional()}),eT=eI({ttlMs:nV().int().min(0),cacheScope:nQ(["public","private"]),tools:nM(eS),nextCursor:i.optional()}),eO=eI({ttlMs:nV().int().min(0),cacheScope:nQ(["public","private"]),prompts:nM(z),nextCursor:i.optional()}),eE=eI({description:o7().optional(),messages:nM(J)}),eA=eI({ttlMs:nV().int().min(0),cacheScope:nQ(["public","private"]),resources:nM(O),nextCursor:i.optional()}),eW=eI({ttlMs:nV().int().min(0),cacheScope:nQ(["public","private"]),resourceTemplates:nM(E),nextCursor:i.optional()}),eM=eI({ttlMs:nV().int().min(0),cacheScope:nQ(["public","private"]),contents:nM(nL([j,C]))}),eN=eI({completion:nz({values:nM(o7()).max(100),total:nV().int().optional(),hasMore:nI().optional()}).loose()}),ez=eI({ttlMs:nV().int().min(0),cacheScope:nQ(["public","private"])}),eD=eI({ttlMs:nV().int().min(0).catch(0),cacheScope:nQ(["public","private"]).catch("private"),supportedVersions:nM(o7()),capabilities:eb,instructions:o7().optional()}),eF=nz({messages:nM(eV),modelPreferences:Y.optional(),systemPrompt:o7().optional(),includeContext:nQ(["none","thisServer","allServers"]).optional(),temperature:nV().optional(),maxTokens:nV().int(),stopSequences:nM(o7()).optional(),metadata:t.optional(),tools:nM(eS).optional(),toolChoice:ee.optional()}),eL=nz({method:nY("sampling/createMessage"),params:eF}),eU=nz({method:nY("roots/list"),params:nz({_meta:nJ(o7(),nE()).optional()}).optional()}),eH=nz({...eV.shape,model:o7(),stopReason:o7().optional()}),eG=nz({roots:nM(ey)}),eB=nz({action:nQ(["accept","decline","cancel"]),content:nJ(o7(),nL([o7(),nV(),nI(),nM(o7())])).optional()}),eK=nz({mode:nY("url"),message:o7(),url:o7().url()}),eJ=nL([em,eK]),eZ=nz({method:nY("elicitation/create"),params:eJ}),eQ=nL([eL,eU,eZ]),eX=nL([eH,eG,eB]),eY=nJ(o7(),eQ),e1=nJ(o7(),eX),e0=eI({inputRequests:eY.optional(),requestState:o7().optional()}),e2={inputResponses:e1.optional(),requestState:o7().optional()},e4=nz({_meta:e$,...e2}),e6=nD({progressToken:r.optional()});function e3(e,t){return nz({method:nY(e),params:nz({_meta:e$,...t})})}function e9(e,t){return nz({method:nY(e),params:nz({_meta:e6.optional(),...t}).optional()})}let e5={name:o7(),arguments:nJ(o7(),nE()).optional(),...e2},e8={cursor:i.optional()},e7=e3("tools/call",e5),te=e3("tools/list",e8),tt=e3("prompts/list",e8),tr=e3("prompts/get",{name:o7(),arguments:nJ(o7(),o7()).optional(),...e2}),ti=e3("resources/list",e8),to=e3("resources/templates/list",e8),tn=e3("resources/read",{uri:o7(),...e2}),ta={ref:nL([eh,ef]),argument:nz({name:o7(),value:o7()}),context:nz({arguments:nJ(o7(),o7()).optional()}).optional()},ts=e3("completion/complete",ta),td=e3("server/discover",{}),tc=nz({toolsListChanged:nI().optional(),promptsListChanged:nI().optional(),resourcesListChanged:nI().optional(),resourceSubscriptions:nM(o7()).optional()}),tl={notifications:tc},tp=e3("subscriptions/listen",tl),tu=eR.extend({"io.modelcontextprotocol/subscriptionId":o}),tm=nD({_meta:tu,resultType:eP.default("complete")}),tf={"tools/call":e9("tools/call",e5),"tools/list":e9("tools/list",e8),"prompts/get":e9("prompts/get",{name:o7(),arguments:nJ(o7(),o7()).optional()}),"prompts/list":e9("prompts/list",e8),"resources/list":e9("resources/list",e8),"resources/templates/list":e9("resources/templates/list",e8),"resources/read":e9("resources/read",{uri:o7()}),"completion/complete":e9("completion/complete",ta),"server/discover":e9("server/discover",{}),"subscriptions/listen":e9("subscriptions/listen",tl)};function th(e){return nD({_meta:eq,...e})}let ty={"tools/call":th({content:nM(K),structuredContent:nE().optional(),isError:nI().optional()}),"tools/list":th({ttlMs:nV().int().min(0),cacheScope:nQ(["public","private"]),tools:nM(eS),nextCursor:i.optional()}),"prompts/get":th({description:o7().optional(),messages:nM(J)}),"prompts/list":th({ttlMs:nV().int().min(0),cacheScope:nQ(["public","private"]),prompts:nM(z),nextCursor:i.optional()}),"resources/list":th({ttlMs:nV().int().min(0),cacheScope:nQ(["public","private"]),resources:nM(O),nextCursor:i.optional()}),"resources/templates/list":th({ttlMs:nV().int().min(0),cacheScope:nQ(["public","private"]),resourceTemplates:nM(E),nextCursor:i.optional()}),"resources/read":th({ttlMs:nV().int().min(0),cacheScope:nQ(["public","private"]),contents:nM(nL([j,C]))}),"completion/complete":th({completion:nz({values:nM(o7()).max(100),total:nV().int().optional(),hasMore:nI().optional()}).loose()}),"server/discover":th({ttlMs:nV().int().min(0).catch(0),cacheScope:nQ(["public","private"]).catch("private"),supportedVersions:nM(o7()),capabilities:eb,instructions:o7().optional()}),"subscriptions/listen":th({})},tg=nD({"io.modelcontextprotocol/subscriptionId":o.optional()}),t_=nz({method:nY("notifications/subscriptions/acknowledged"),params:nz({_meta:tg.optional(),notifications:tc})}),tv=nz({_meta:tg.optional(),requestId:o,reason:o7().optional()}),tb=nz({method:nY("notifications/cancelled"),params:tv}),t$=e=>nz({jsonrpc:nY("2.0"),id:nL([o7(),nV().int()]),result:e}).strict();return{JSONValueSchema:e,JSONObjectSchema:t,ProgressTokenSchema:r,CursorSchema:i,RequestIdSchema:o,RoleSchema:n,LoggingLevelSchema:a,TaskMetadataSchema:d,RelatedTaskMetadataSchema:c,RequestMetaSchema:l,BaseRequestParamsSchema:p,TaskAugmentedRequestParamsSchema:u,NotificationsParamsSchema:m,NotificationSchema:f,IconSchema:h,IconsSchema:y,BaseMetadataSchema:g,ImplementationSchema:_,ClientTasksCapabilitySchema:$,ServerTasksCapabilitySchema:S,ClientCapabilitiesSchema:k,ServerCapabilitiesSchema:w,ProgressSchema:V,ProgressNotificationParamsSchema:P,ProgressNotificationSchema:R,LoggingMessageNotificationParamsSchema:q,LoggingMessageNotificationSchema:I,ResourceContentsSchema:x,TextResourceContentsSchema:j,BlobResourceContentsSchema:C,AnnotationsSchema:T,ResourceSchema:O,ResourceTemplateSchema:E,ResourceListChangedNotificationSchema:A,ResourceUpdatedNotificationParamsSchema:W,ResourceUpdatedNotificationSchema:M,PromptArgumentSchema:N,PromptSchema:z,PromptListChangedNotificationSchema:D,TextContentSchema:F,ImageContentSchema:L,AudioContentSchema:U,ToolUseContentSchema:H,EmbeddedResourceSchema:G,ResourceLinkSchema:B,ContentBlockSchema:K,PromptMessageSchema:J,ToolAnnotationsSchema:Z,ToolListChangedNotificationSchema:Q,ModelHintSchema:X,ModelPreferencesSchema:Y,ToolChoiceSchema:ee,BooleanSchemaSchema:et,StringSchemaSchema:er,NumberSchemaSchema:ei,UntitledSingleSelectEnumSchemaSchema:eo,TitledSingleSelectEnumSchemaSchema:en,LegacyTitledEnumSchemaSchema:ea,SingleSelectEnumSchemaSchema:es,UntitledMultiSelectEnumSchemaSchema:ed,TitledMultiSelectEnumSchemaSchema:ec,MultiSelectEnumSchemaSchema:el,EnumSchemaSchema:ep,PrimitiveSchemaDefinitionSchema:eu,ElicitRequestFormParamsSchema:em,ResourceTemplateReferenceSchema:ef,PromptReferenceSchema:eh,RootSchema:ey,ClientCapabilities2026Schema:e_,ServerCapabilities2026Schema:eb,RequestMetaEnvelopeSchema:e$,ToolSchema:eS,ToolResultContentSchema:ek,SamplingMessageContentBlockSchema:ew,SamplingMessageSchema:eV,ResultTypeSchema:eP,ResultMetaSchema:eR,ResultSchema:ex,PaginatedResultSchema:ej,CallToolResultSchema:eC,ListToolsResultSchema:eT,ListPromptsResultSchema:eO,GetPromptResultSchema:eE,ListResourcesResultSchema:eA,ListResourceTemplatesResultSchema:eW,ReadResourceResultSchema:eM,CompleteResultSchema:eN,CacheableResultSchema:ez,DiscoverResultSchema:eD,CreateMessageRequestParamsSchema:eF,CreateMessageRequestSchema:eL,ListRootsRequestSchema:eU,CreateMessageResultSchema:eH,ListRootsResultSchema:eG,ElicitResultSchema:eB,ElicitRequestURLParamsSchema:eK,ElicitRequestParamsSchema:eJ,ElicitRequestSchema:eZ,InputRequestSchema:eQ,InputResponseSchema:eX,InputRequestsSchema:eY,InputResponsesSchema:e1,InputRequiredResultSchema:e0,InputResponseRequestParamsSchema:e4,CallToolRequestSchema:e7,ListToolsRequestSchema:te,ListPromptsRequestSchema:tt,GetPromptRequestSchema:tr,ListResourcesRequestSchema:ti,ListResourceTemplatesRequestSchema:to,ReadResourceRequestSchema:tn,CompleteRequestSchema:ts,DiscoverRequestSchema:td,SubscriptionFilterSchema:tc,SubscriptionsListenRequestSchema:tp,SubscriptionsListenResultMetaSchema:tu,SubscriptionsListenResultSchema:tm,dispatchRequestSchemas:tf,dispatchResultSchemas:ty,NotificationMetaSchema:tg,SubscriptionsAcknowledgedNotificationSchema:t_,CancelledNotificationParamsSchema:tv,CancelledNotificationSchema:tb,notificationSchemas2026:{"notifications/cancelled":tb,"notifications/progress":R,"notifications/message":I,"notifications/resources/updated":M,"notifications/resources/list_changed":A,"notifications/tools/list_changed":Q,"notifications/prompts/list_changed":D,"notifications/subscriptions/acknowledged":t_},JSONRPCResultResponseSchema:t$(ex),CallToolResultResponseSchema:t$(nL([eC,e0])),ListToolsResultResponseSchema:t$(eT),ListPromptsResultResponseSchema:t$(eO),GetPromptResultResponseSchema:t$(nL([eE,e0])),ListResourcesResultResponseSchema:t$(eA),ListResourceTemplatesResultResponseSchema:t$(eW),ReadResourceResultResponseSchema:t$(nL([eM,e0])),CompleteResultResponseSchema:t$(eN),DiscoverResultResponseSchema:t$(eD),SubscriptionsListenResultResponseSchema:t$(tm)}}()}let P$=["tools/list","prompts/list","resources/list","resources/templates/list","resources/read","server/discover"],PS=Symbol("modelcontextprotocol.resultCacheHintFallback");function Pk(e){return"number"==typeof e&&Number.isSafeInteger(e)&&e>=0}function Pw(e){return"public"===e||"private"===e}let PV=((Y={})[Y.ParseError=-32700]="ParseError",Y[Y.InvalidRequest=-32600]="InvalidRequest",Y[Y.MethodNotFound=-32601]="MethodNotFound",Y[Y.InvalidParams=-32602]="InvalidParams",Y[Y.InternalError=-32603]="InternalError",Y[Y.ResourceNotFound=-32002]="ResourceNotFound",Y[Y.MissingRequiredClientCapability=-32021]="MissingRequiredClientCapability",Y[Y.UnsupportedProtocolVersion=-32022]="UnsupportedProtocolVersion",Y[Y.UrlElicitationRequired=-32042]="UrlElicitationRequired",Y);var PP=class e extends Error{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.ProtocolError"})}static[Symbol.hasInstance](e){return V4(this,e)}static isInstance(e){if("function"!=typeof this)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return V4(this,e)}constructor(e,t,r){super(t),this.code=e,this.data=r,this.name="ProtocolError",V2(this,new.target)}static fromError(t,r,i){return t===PV.UrlElicitationRequired&&i&&i.elicitations?new Pq(i.elicitations,r):t===PV.UnsupportedProtocolVersion&&i&&Array.isArray(i.supported)&&"string"==typeof i.requested?new PI({supported:i.supported,requested:i.requested},r):(t===PV.InvalidParams||t===PV.ResourceNotFound)&&"string"==typeof i?.uri&&(t===PV.ResourceNotFound||1===Object.keys(i).length)?new PR(i.uri,r):t===PV.MissingRequiredClientCapability&&i&&null!==i.requiredCapabilities&&"object"==typeof i.requiredCapabilities&&!Array.isArray(i.requiredCapabilities)?new Px({requiredCapabilities:i.requiredCapabilities},r):new e(t,r,i)}},PR=class extends PP{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.ResourceNotFoundError"})}constructor(e,t=`Resource not found: ${e}`){super(PV.InvalidParams,t,{uri:e})}get uri(){return this.data.uri}},Pq=class extends PP{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.UrlElicitationRequiredError"})}constructor(e,t=`URL elicitation${e.length>1?"s":""} required`){super(PV.UrlElicitationRequired,t,{elicitations:e})}get elicitations(){return this.data?.elicitations??[]}},PI=class extends PP{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.UnsupportedProtocolVersionError"})}constructor(e,t=`Unsupported protocol version: ${e.requested}`){super(PV.UnsupportedProtocolVersion,t,e)}get supported(){return this.data.supported}get requested(){return this.data.requested}},Px=class extends PP{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.MissingRequiredClientCapabilityError"})}constructor(e,t=`Missing required client capabilities: ${Object.keys(e.requiredCapabilities).join(", ")}`){super(PV.MissingRequiredClientCapability,t,e)}get requiredCapabilities(){return this.data.requiredCapabilities}};let Pj=["tools/call","prompts/get","resources/read"],PC=["elicitation/create","sampling/createMessage","roots/list"];function PT(){if(p)return p;let e=Pb();return p={request:{"elicitation/create":nz({method:nY("elicitation/create"),params:e.ElicitRequestParamsSchema}),"sampling/createMessage":nz({method:nY("sampling/createMessage"),params:e.CreateMessageRequestParamsSchema}),"roots/list":nz({method:nY("roots/list"),params:nD({}).optional()})},response:{"elicitation/create":e.ElicitResultSchema,"sampling/createMessage":e.CreateMessageResultSchema,"roots/list":e.ListRootsResultSchema}}}function PO(e){return PC.includes(e)}function PE(e){return PO(e)?PT().request[e]:void 0}let PA={"tools/call":null,"tools/list":null,"prompts/get":null,"prompts/list":null,"resources/list":null,"resources/templates/list":null,"resources/read":null,"completion/complete":null,"server/discover":null,"subscriptions/listen":null},PW={"notifications/cancelled":null,"notifications/progress":null,"notifications/message":null,"notifications/resources/updated":null,"notifications/resources/list_changed":null,"notifications/tools/list_changed":null,"notifications/prompts/list_changed":null,"notifications/subscriptions/acknowledged":null};function PM(e){return Object.prototype.hasOwnProperty.call(PA,e)}function PN(e){return Object.prototype.hasOwnProperty.call(PW,e)}function Pz(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)}function PD(e,t){if(void 0===e)return{ok:!1,reason:"not-in-era"};let r=e.safeParse(t);return r.success?{ok:!0,value:r.data}:{ok:!1,reason:"invalid",message:String(r.error)}}Object.keys(PA),Object.keys(PW);let PF={ok:!1,reason:"not-in-era"},PL=[S5,ke],PU={era:"2026-07-28",hasRequestMethod:PM,hasNotificationMethod:PN,hasInputRequestMethod:e=>void 0!==PE(e),validateRequest:(e,t)=>PD(PM(e)?Pb().dispatchRequestSchemas[e]:void 0,t),validateResult:(e,t)=>PD(Object.prototype.hasOwnProperty.call(PA,e)?Pb().dispatchResultSchemas[e]:void 0,t),validateNotification:(e,t)=>PD(PN(e)?Pb().notificationSchemas2026[e]:void 0,t),validateInputRequest:(e,t)=>PD(PE(e),t),validateInputResponse:(e,t)=>PD(PO(e)?PT().response[e]:void 0,t),samplingResultVariant:()=>PF,outboundEnvelope:e=>({[S5]:e.protocolVersion,[S8]:e.clientInfo,[ke]:e.clientCapabilities,...void 0!==e.logLevel&&{[kr]:e.logLevel}}),validateEnvelopeMeta(e){let t=[];for(let r of PL)r in e||t.push({key:r,problem:"missing"});let r=Pb().RequestMetaEnvelopeSchema.safeParse(e);if(!r.success)for(let e of r.error.issues){let r=e.path.map(String),i=r.length>0?r.join("."):"_meta";1===r.length&&t.some(e=>e.key===i&&"missing"===e.problem)||t.push({key:i,problem:e.message})}return t},projectCallToolResult:e=>Pt(e),inputRequestSchema:PE,decodeResult(e,t){if(!Pz(t))return{kind:"invalid",error:new V3(V6.InvalidResult,`Invalid result for ${e}: not an object`,{method:e})};let r=t.resultType;if(void 0===r)return{kind:"invalid",error:new V3(V6.InvalidResult,`Invalid result for ${e}: missing required resultType — servers implementing protocol revision 2026-07-28 MUST include it (the absent-means-complete bridge applies only to earlier-revision servers)`,{method:e,violation:"missing-resultType"})};if("string"!=typeof r)return{kind:"invalid",error:new V3(V6.InvalidResult,`Invalid result for ${e}: non-string resultType`,{method:e,resultType:r})};if("input_required"===r){let r=t.inputRequests,i=Pz(r)?r:{},o=t.requestState,n=void 0===t._meta?void 0:Pb().ResultMetaSchema.safeParse(t._meta),a=n?.success?n.data:void 0;return 0===Object.keys(i).length&&"string"!=typeof o?{kind:"invalid",error:new V3(V6.InvalidResult,`Invalid result for ${e}: input_required carries neither inputRequests nor requestState (every input_required result must include at least one of the two)`,{method:e,violation:"input-required-missing-both"})}:{kind:"input_required",inputRequests:i,..."string"==typeof o&&{requestState:o},...void 0!==a&&{_meta:a}}}if("complete"!==r)return{kind:"invalid",error:new V3(V6.UnsupportedResultType,`Unsupported result type '${r}' for ${e}`,{resultType:r,method:e})};let i=function(){if(u)return u;let e=Pb();return u={"tools/call":e.CallToolResultSchema,"tools/list":e.ListToolsResultSchema,"prompts/get":e.GetPromptResultSchema,"prompts/list":e.ListPromptsResultSchema,"resources/list":e.ListResourcesResultSchema,"resources/templates/list":e.ListResourceTemplatesResultSchema,"resources/read":e.ReadResourceResultSchema,"completion/complete":e.CompleteResultSchema,"server/discover":e.DiscoverResultSchema}}(),o=Object.hasOwn(i,e)?i[e]:void 0;if(void 0!==o){let r=o.safeParse(t);if(!r.success)return{kind:"invalid",error:new V3(V6.InvalidResult,`Invalid result for ${e}: ${r.error}`,{method:e})}}let n={...t};return delete n.resultType,{kind:"complete",result:n}},encodeResult:(e,t,r)=>(function(e,t){if(void 0===t)return e;let r=e._meta;return void 0===r?{...e,_meta:{[S7]:t}}:null===r||"object"!=typeof r||Array.isArray(r)||void 0!==r[S7]?e:{...e,_meta:{...r,[S7]:t}}})(function(e,t){var r,i;let o=t[PS];if("complete"!==t.resultType||!P$.includes(e)){let e;return void 0===o?t:(e={...t},delete e[PS],e)}let n=Pk(t.ttlMs)?t.ttlMs:void 0!==(r=o)&&Pk(r.ttlMs)?r.ttlMs:0,a=Pw(t.cacheScope)?t.cacheScope:void 0!==(i=o)&&Pw(i.cacheScope)?i.cacheScope:"private",s={...t,ttlMs:n,cacheScope:a};return delete s[PS],s}(e,function(e,t){let r=t.resultType;if(void 0===r)return{...t,resultType:"complete"};if("complete"===r||Pj.includes(e))return t;throw new PP(PV.InternalError,`Handler for ${e} returned resultType '${String(r)}', but results of ${e} only support 'complete' on protocol revision 2026-07-28`)}(e,function(e,t){let r=t,i=!1,o=()=>(i||(r={...r},i=!0),r),n=t.tools;"tools/list"===e&&Array.isArray(n)&&n.some(e=>Pz(e)&&"execution"in e)&&(o().tools=n.map(e=>{if(!Pz(e)||!("execution"in e))return e;let t={...e};return delete t.execution,t}));let a=t.capabilities;if(Pz(a)&&"tasks"in a){let e={...a};delete e.tasks,o().capabilities=e}return r}(e,t))),r),encodeErrorCode:e=>-32002===e?-32602:e,checkInboundEnvelope(e){if(void 0===e.envelope)return"Request is missing the required _meta envelope for protocol revision 2026-07-28 (io.modelcontextprotocol/protocolVersion, io.modelcontextprotocol/clientCapabilities)";let t=Pb().RequestMetaEnvelopeSchema.safeParse(e.envelope);if(!t.success)return`Invalid _meta envelope for protocol revision 2026-07-28: ${t.error.issues.map(e=>e.message).join("; ")}`}},PH="2026-07-28";function PG(e){return void 0!==e&&e>=V5?PU:Pv}function PB(e){return void 0!==e.revision?PG(e.revision).era:"modern"===e.era?PU.era:Pv.era}function PK(e){return PQ.some(t=>t.hasRequestMethod(e))}function PJ(e){return PQ.some(t=>t.hasNotificationMethod(e))}function PZ(e){return"tasks/get"===e||"tasks/cancel"===e}let PQ=[Pv,PU];var PX=(e=>{let t={};for(var r in e)SZ(t,r,{get:e[r],enumerable:!0});return t})({AnnotationsSchema:()=>k2,AudioContentSchema:()=>wS,BaseMetadataSchema:()=>kx,BaseRequestParamsSchema:()=>kp,BlobResourceContentsSchema:()=>k1,BooleanSchemaSchema:()=>w4,CallToolRequestParamsSchema:()=>wW,CallToolRequestSchema:()=>wM,CallToolResultSchema:()=>wE,CancelTaskRequestSchema:()=>VT,CancelTaskResultSchema:()=>VO,CancelledNotificationParamsSchema:()=>kP,CancelledNotificationSchema:()=>kR,ClientCapabilitiesSchema:()=>kA,ClientNotificationSchema:()=>VA,ClientRequestSchema:()=>VE,ClientResultSchema:()=>VW,ClientTasksCapabilitySchema:()=>kO,CompatibilityCallToolResultSchema:()=>wA,CompleteRequestParamsSchema:()=>Vf,CompleteRequestSchema:()=>Vh,CompleteResultSchema:()=>Vy,ContentBlockSchema:()=>wP,CreateMessageRequestParamsSchema:()=>wY,CreateMessageRequestSchema:()=>w1,CreateMessageResultSchema:()=>w0,CreateMessageResultWithToolsSchema:()=>w2,CreateTaskResultSchema:()=>Vw,CursorSchema:()=>ks,DiscoverRequestSchema:()=>kF,DiscoverResultSchema:()=>kL,ElicitRequestFormParamsSchema:()=>Vn,ElicitRequestParamsSchema:()=>Vs,ElicitRequestSchema:()=>Vd,ElicitRequestURLParamsSchema:()=>Va,ElicitResultSchema:()=>Vp,ElicitationCompleteNotificationParamsSchema:()=>Vc,ElicitationCompleteNotificationSchema:()=>Vl,EmbeddedResourceSchema:()=>ww,EmptyResultSchema:()=>kV,EnumSchemaSchema:()=>Vi,GetPromptRequestParamsSchema:()=>w_,GetPromptRequestSchema:()=>wv,GetPromptResultSchema:()=>wq,GetTaskPayloadRequestSchema:()=>VI,GetTaskPayloadResultSchema:()=>Vx,GetTaskRequestSchema:()=>VR,GetTaskResultSchema:()=>Vq,IconSchema:()=>kq,IconsSchema:()=>kI,ImageContentSchema:()=>w$,ImplementationSchema:()=>kj,InitializeRequestParamsSchema:()=>kW,InitializeRequestSchema:()=>kM,InitializeResultSchema:()=>kz,InitializedNotificationSchema:()=>kD,JSONArraySchema:()=>kn,JSONObjectSchema:()=>ko,JSONRPCErrorResponseSchema:()=>kS,JSONRPCMessageSchema:()=>kk,JSONRPCNotificationSchema:()=>kb,JSONRPCRequestSchema:()=>kv,JSONRPCResponseSchema:()=>kw,JSONRPCResultResponseSchema:()=>k$,JSONValueSchema:()=>ki,LegacyTitledEnumSchemaSchema:()=>w8,ListChangedOptionsBaseSchema:()=>wz,ListPromptsRequestSchema:()=>wy,ListPromptsResultSchema:()=>wg,ListResourceTemplatesRequestSchema:()=>k5,ListResourceTemplatesResultSchema:()=>k8,ListResourcesRequestSchema:()=>k3,ListResourcesResultSchema:()=>k9,ListRootsRequestSchema:()=>V_,ListRootsResultSchema:()=>Vv,ListTasksRequestSchema:()=>Vj,ListTasksResultSchema:()=>VC,ListToolsRequestSchema:()=>wT,ListToolsResultSchema:()=>wO,LoggingLevelSchema:()=>wD,LoggingMessageNotificationParamsSchema:()=>wU,LoggingMessageNotificationSchema:()=>wH,ModelHintSchema:()=>wG,ModelPreferencesSchema:()=>wB,MultiSelectEnumSchemaSchema:()=>Vr,NotificationSchema:()=>kh,NotificationsParamsSchema:()=>kf,NumberSchemaSchema:()=>w3,PaginatedRequestParamsSchema:()=>kK,PaginatedRequestSchema:()=>kJ,PaginatedResultSchema:()=>kZ,PingRequestSchema:()=>kU,PrimitiveSchemaDefinitionSchema:()=>Vo,ProgressNotificationParamsSchema:()=>kG,ProgressNotificationSchema:()=>kB,ProgressSchema:()=>kH,ProgressTokenSchema:()=>ka,PromptArgumentSchema:()=>wf,PromptListChangedNotificationSchema:()=>wI,PromptMessageSchema:()=>wR,PromptReferenceSchema:()=>Vm,PromptSchema:()=>wh,ReadResourceRequestParamsSchema:()=>k7,ReadResourceRequestSchema:()=>we,ReadResourceResultSchema:()=>wt,RelatedTaskMetadataSchema:()=>kc,RequestIdSchema:()=>k_,RequestMetaSchema:()=>kl,RequestSchema:()=>km,ResourceContentsSchema:()=>kQ,ResourceLinkSchema:()=>wV,ResourceListChangedNotificationSchema:()=>wr,ResourceRequestParamsSchema:()=>k7,ResourceSchema:()=>k4,ResourceTemplateReferenceSchema:()=>Vu,ResourceTemplateSchema:()=>k6,ResourceUpdatedNotificationParamsSchema:()=>wu,ResourceUpdatedNotificationSchema:()=>wm,ResultMetaObjectSchema:()=>ky,ResultSchema:()=>kg,RoleSchema:()=>k0,RootSchema:()=>Vg,RootsListChangedNotificationSchema:()=>Vb,SamplingContentSchema:()=>wZ,SamplingMessageContentBlockSchema:()=>wQ,SamplingMessageSchema:()=>wX,ServerCapabilitiesSchema:()=>kN,ServerNotificationSchema:()=>VN,ServerRequestSchema:()=>VM,ServerResultSchema:()=>Vz,ServerTasksCapabilitySchema:()=>kE,SetLevelRequestParamsSchema:()=>wF,SetLevelRequestSchema:()=>wL,SingleSelectEnumSchemaSchema:()=>w7,StringSchemaSchema:()=>w6,SubscribeRequestParamsSchema:()=>k7,SubscribeRequestSchema:()=>wi,SubscriptionFilterSchema:()=>wn,SubscriptionsAcknowledgedNotificationParamsSchema:()=>wd,SubscriptionsAcknowledgedNotificationSchema:()=>wc,SubscriptionsListenRequestParamsSchema:()=>wa,SubscriptionsListenRequestSchema:()=>ws,SubscriptionsListenResultMetaSchema:()=>wl,SubscriptionsListenResultSchema:()=>wp,TaskAugmentedRequestParamsSchema:()=>ku,TaskCreationParamsSchema:()=>V$,TaskMetadataSchema:()=>kd,TaskSchema:()=>Vk,TaskStatusNotificationParamsSchema:()=>VV,TaskStatusNotificationSchema:()=>VP,TaskStatusSchema:()=>VS,TextContentSchema:()=>wb,TextResourceContentsSchema:()=>kX,TitledMultiSelectEnumSchemaSchema:()=>Vt,TitledSingleSelectEnumSchemaSchema:()=>w5,ToolAnnotationsSchema:()=>wx,ToolChoiceSchema:()=>wK,ToolExecutionSchema:()=>wj,ToolListChangedNotificationSchema:()=>wN,ToolResultContentSchema:()=>wJ,ToolSchema:()=>wC,ToolUseContentSchema:()=>wk,UnsubscribeRequestParamsSchema:()=>k7,UnsubscribeRequestSchema:()=>wo,UntitledMultiSelectEnumSchemaSchema:()=>Ve,UntitledSingleSelectEnumSchemaSchema:()=>w9});let PY=e=>"object"==typeof e&&null!==e&&!Array.isArray(e)&&"input_required"===e.resultType,P1="x-mcp-header",P0=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/,P2=new Set(["string","integer","boolean","number"]);function P4(e){let t=[],r=new Map,i=(e,o,n)=>{if(null===e||"object"!=typeof e)return;if(P1 in e){if(!n||0===o.length)return`${P9(o)}: x-mcp-header is only permitted on properties statically reachable via a chain of 'properties' keys (not under items, additionalProperties, oneOf/anyOf/allOf/not, if/then/else, or $ref)`;let i=e[P1];if("string"!=typeof i||0===i.length)return`${P9(o)}: x-mcp-header MUST be a non-empty string`;if(!P0.test(i))return`${P9(o)}: x-mcp-header '${i}' is not a valid RFC 9110 token (no spaces, control characters or HTTP delimiters)`;let a="string"==typeof e.type?e.type:void 0;if(void 0===a||!P2.has(a))return`${P9(o)}: x-mcp-header is only permitted on primitive-typed properties (string, integer, boolean); got ${a??""}`;let s=i.toLowerCase(),d=r.get(s);if(void 0!==d)return`x-mcp-header '${i}' is not case-insensitively unique (also declared as '${d}')`;r.set(s,i),t.push({path:o,headerName:i,type:a})}let a=e.properties;if(null!==a&&"object"==typeof a)for(let[e,t]of Object.entries(a)){let r=i(t,[...o,e],n);if(void 0!==r)return r}for(let t of P6){let r=e[t];if(void 0!==r)for(let e of Array.isArray(r)?r:null!==r&&"object"==typeof r&&P3.has(t)?Object.values(r):[r]){let r=i(e,[...o,`<${t}>`],!1);if(void 0!==r)return r}}},o=i(e,[],!0);return void 0===o?{valid:!0,declarations:t}:{valid:!1,reason:o}}let P6=["items","prefixItems","contains","additionalProperties","unevaluatedProperties","unevaluatedItems","propertyNames","patternProperties","dependentSchemas","oneOf","anyOf","allOf","not","if","then","else","$defs","definitions"],P3=new Set(["patternProperties","dependentSchemas","$defs","definitions"]);function P9(e){return 0===e.length?"":e.join(".")}let P5="=?base64?";function P8(e){return new Set(e.flatMap(e=>Object.keys(e.shape)))}function P7(e){if(null==e)return!1;let t=typeof e;return("object"===t||"function"===t)&&"~standard"in e&&"function"==typeof e["~standard"]?.validate}PV.InvalidRequest,PV.UnsupportedProtocolVersion,PV.InvalidParams,PV.MethodNotFound,PV.InvalidParams,PV.MissingRequiredClientCapability,PV.ParseError,PV.InvalidRequest,PV.MethodNotFound,PV.UnsupportedProtocolVersion,PV.MissingRequiredClientCapability;let Re=!1,Rt="draft-2020-12";async function Rr(e,t){let r=await e["~standard"].validate(t);return r.issues&&r.issues.length>0?{success:!1,error:r.issues.map(e=>e.path?.length?`${e.path.map(e=>String("object"==typeof e?e.key:e)).join(".")}: ${e.message}`:e.message).join(", ")}:{success:!0,data:r.value}}let Ri=/\\\.\\d\{(\d+)\}/;function Ro(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}let Rn=new Set(["$comment","deprecated","description","examples","readOnly","title","writeOnly"]);function Ra(e){return Rn.has(e)||e.startsWith("x-")}let Rs=new Set(["$schema",...Object.keys(Vn.shape.requestedSchema.shape)]),Rd={string:P8([w6,w9,w5,w8]),number:P8([w3]),integer:P8([w3]),boolean:P8([w4]),array:P8([Ve,Vt])},Rc=new Set(w6.shape.format.unwrap().options);Object.assign(function(e){let t=void 0!==e.inputRequests&&Object.keys(e.inputRequests).length>0,r="string"==typeof e.requestState;if(!t&&!r)throw TypeError("inputRequired() requires at least one of inputRequests (with at least one entry) or requestState (spec: every InputRequiredResult MUST include at least one of the two)");return{resultType:"input_required",...void 0!==e.inputRequests&&{inputRequests:e.inputRequests},...void 0!==e.requestState&&{requestState:e.requestState}}},{elicit(e){try{return{method:"elicitation/create",params:function(e){var t;if(!P7(e.requestedSchema))return{...e,mode:"form",requestedSchema:e.requestedSchema};let r=e.requestedSchema["~standard"].vendor,i=function(e,t){let r={},i=[];for(let[o,n]of Object.entries(e))"properties"===o&&Ro(n)?r[o]=Object.fromEntries(Object.entries(n).map(([e,r])=>[e,function(e,t,r,i){if(!Ro(e))return e;let o="string"==typeof e.type&&Object.hasOwn(Rd,e.type)?Rd[e.type]:void 0;if(void 0===o)return e;let n={};for(let[s,d]of Object.entries(e))if(o.has(s)||Ra(s))n[s]=d;else if("pattern"===s&&"string"===e.type&&"string"==typeof e.format)if(Rc.has(e.format)){var a;"string"==typeof d&&(a=e.format,"zod"!==r||(function(e,t){let r;switch(e){case"email":r=[iw(nn,void 0)];break;case"uri":r=[iV(nd,void 0)];break;case"date":r=[iR(nr,void 0)];break;case"date-time":let i,o;i=Ri.exec(t),o=[void 0,-1,0],i&&o.push(Number(i[1])),r=[!1,!0].flatMap(e=>[!1,!0].flatMap(t=>o.map(r=>ac({local:e,offset:t,precision:r}))))}return new Set(r.map(e=>{let t;return t=ox(e,{target:Rt,io:"input"}),"string"==typeof t.pattern?t.pattern:void 0}).filter(e=>void 0!==e))})(a,d).has(d))||i.push(`${t}.${s}`)}else n[s]=d;else i.push(`${t}.${s}`);return n}(r,`properties.${e}`,t,i)])):Rs.has(o)?r[o]=n:Ra(o)||i.push(o);if(i.length>0)throw new PP(PV.InvalidParams,`Elicitation requestedSchema contains unsupported JSON Schema constraint(s) after Standard Schema conversion: ${i.join(", ")}`);return r}(function(e){try{return function(e,t="input"){let r,i=e["~standard"];if(i.jsonSchema)r=i.jsonSchema[t]({target:Rt});else if("zod"===i.vendor){if(!("_zod"in e))throw Error("Schema appears to be from zod 3, which the SDK cannot convert to JSON Schema. Upgrade to zod >=4.2.0, or wrap your JSON Schema with fromJsonSchema().");Re||(Re=!0,console.warn("[mcp-sdk] Your zod version does not implement `~standard.jsonSchema` (added in zod 4.2.0). Falling back to z.toJSONSchema(). Upgrade to zod >=4.2.0 to silence this warning.")),r=ox(e,{target:Rt,io:t})}else throw Error(`Schema library "${i.vendor}" does not implement StandardJSONSchemaV1 (\`~standard.jsonSchema\`). Upgrade to a version that does, or wrap your JSON Schema with fromJsonSchema().`);if("output"===t)return void 0!==r.type||!function e(t){if("properties"in t||"patternProperties"in t||"additionalProperties"in t||"required"in t)return!0;for(let r of["oneOf","anyOf","allOf"]){let i=t[r];if(Array.isArray(i)&&i.length>0)return i.every(t=>null!==t&&"object"==typeof t&&("object"===t.type||e(t)))}return!1}(r)?r:{type:"object",...r};if(void 0!==r.type&&"object"!==r.type)throw Error(`MCP tool and prompt schemas must describe objects (got type: ${JSON.stringify(r.type)}). Wrap your schema in z.object({...}) or equivalent.`);return{type:"object",...r}}(e,"input")}catch(t){let e=t instanceof Error?t.message:String(t);throw new PP(PV.InvalidParams,`Elicitation requestedSchema must describe an object with flat primitive properties: ${e}`)}}(e.requestedSchema),r),o=(t=Vn.shape.requestedSchema,oJ(t,i));if(!o.success)throw new PP(PV.InvalidParams,`Elicitation requestedSchema only supports flat primitive properties (string, number, integer, boolean, and string enums): ${function(e,t){if(!Ro(e.properties))return t;let r=Object.entries(e.properties).filter(([,e])=>!oJ(Vo,e).success).map(([e])=>`properties.${e}`);return r.length>0?r.join(", "):t}(i,o.error.message)}`);let n=function e(t,r,i=""){return Array.isArray(t)&&Array.isArray(r)?t.flatMap((t,o)=>e(t,r[o],`${i}[${o}]`)):Ro(t)&&Ro(r)?Object.entries(t).flatMap(([t,o])=>{let n=i?`${i}.${t}`:t;return Object.prototype.hasOwnProperty.call(r,t)?e(o,r[t],n):Ra(t)?[]:[n]}):[]}(i,o.data);if(n.length>0)throw new PP(PV.InvalidParams,`Elicitation requestedSchema contains unsupported JSON Schema constraint(s) after Standard Schema conversion: ${n.join(", ")}`);let a=(o.data.required??[]).filter(e=>!Object.prototype.hasOwnProperty.call(o.data.properties,e));if(a.length>0)throw new PP(PV.InvalidParams,`Elicitation requestedSchema lists required properties that are not defined in properties: ${a.join(", ")}`);return{...e,mode:"form",requestedSchema:o.data}}(e)}}catch(e){throw e instanceof PP?TypeError(e.message,{cause:e}):e}},elicitUrl:e=>({method:"elicitation/create",params:{...e,mode:"url"}}),createMessage:e=>({method:"sampling/createMessage",params:e}),listRoots:()=>({method:"roots/list"})});let Rl={},Rp={};function Ru(e,t){let r=e.slice(0,-6);Rl[r]=t,Rp[r]=e=>t.safeParse(e).success}for(let e of["AnnotationsSchema","AudioContentSchema","BaseMetadataSchema","BlobResourceContentsSchema","BooleanSchemaSchema","CallToolRequestSchema","CallToolRequestParamsSchema","CallToolResultSchema","CancelledNotificationSchema","CancelledNotificationParamsSchema","CancelTaskRequestSchema","CancelTaskResultSchema","ClientCapabilitiesSchema","ClientNotificationSchema","ClientRequestSchema","ClientResultSchema","CompatibilityCallToolResultSchema","CompleteRequestSchema","CompleteRequestParamsSchema","CompleteResultSchema","ContentBlockSchema","CreateMessageRequestSchema","CreateMessageRequestParamsSchema","CreateMessageResultSchema","CreateMessageResultWithToolsSchema","CreateTaskResultSchema","CursorSchema","DiscoverRequestSchema","DiscoverResultSchema","ElicitationCompleteNotificationSchema","ElicitationCompleteNotificationParamsSchema","ElicitRequestSchema","ElicitRequestFormParamsSchema","ElicitRequestParamsSchema","ElicitRequestURLParamsSchema","ElicitResultSchema","EmbeddedResourceSchema","EmptyResultSchema","EnumSchemaSchema","GetPromptRequestSchema","GetPromptRequestParamsSchema","GetPromptResultSchema","GetTaskPayloadRequestSchema","GetTaskPayloadResultSchema","GetTaskRequestSchema","GetTaskResultSchema","IconSchema","IconsSchema","ImageContentSchema","ImplementationSchema","InitializedNotificationSchema","InitializeRequestSchema","InitializeRequestParamsSchema","InitializeResultSchema","JSONArraySchema","JSONObjectSchema","JSONRPCErrorResponseSchema","JSONRPCMessageSchema","JSONRPCNotificationSchema","JSONRPCRequestSchema","JSONRPCResponseSchema","JSONRPCResultResponseSchema","JSONValueSchema","LegacyTitledEnumSchemaSchema","ListPromptsRequestSchema","ListPromptsResultSchema","ListResourcesRequestSchema","ListResourcesResultSchema","ListResourceTemplatesRequestSchema","ListResourceTemplatesResultSchema","ListRootsRequestSchema","ListRootsResultSchema","ListTasksRequestSchema","ListTasksResultSchema","ListToolsRequestSchema","ListToolsResultSchema","LoggingLevelSchema","LoggingMessageNotificationSchema","LoggingMessageNotificationParamsSchema","ModelHintSchema","ModelPreferencesSchema","MultiSelectEnumSchemaSchema","NotificationSchema","NumberSchemaSchema","PaginatedRequestSchema","PaginatedRequestParamsSchema","PaginatedResultSchema","PingRequestSchema","PrimitiveSchemaDefinitionSchema","ProgressSchema","ProgressNotificationSchema","ProgressNotificationParamsSchema","ProgressTokenSchema","PromptSchema","PromptArgumentSchema","PromptListChangedNotificationSchema","PromptMessageSchema","PromptReferenceSchema","ReadResourceRequestSchema","ReadResourceRequestParamsSchema","ReadResourceResultSchema","RelatedTaskMetadataSchema","RequestSchema","RequestIdSchema","RequestMetaSchema","ResourceSchema","ResourceContentsSchema","ResourceLinkSchema","ResourceListChangedNotificationSchema","ResourceRequestParamsSchema","ResourceTemplateSchema","ResourceTemplateReferenceSchema","ResourceUpdatedNotificationSchema","ResourceUpdatedNotificationParamsSchema","ResultMetaObjectSchema","ResultSchema","RoleSchema","RootSchema","RootsListChangedNotificationSchema","SamplingContentSchema","SamplingMessageSchema","SamplingMessageContentBlockSchema","ServerCapabilitiesSchema","ServerNotificationSchema","ServerRequestSchema","ServerResultSchema","SetLevelRequestSchema","SetLevelRequestParamsSchema","SingleSelectEnumSchemaSchema","StringSchemaSchema","SubscribeRequestSchema","SubscribeRequestParamsSchema","SubscriptionFilterSchema","SubscriptionsAcknowledgedNotificationSchema","SubscriptionsAcknowledgedNotificationParamsSchema","SubscriptionsListenRequestSchema","SubscriptionsListenRequestParamsSchema","SubscriptionsListenResultSchema","SubscriptionsListenResultMetaSchema","TaskAugmentedRequestParamsSchema","TaskCreationParamsSchema","TaskMetadataSchema","TaskSchema","TaskStatusSchema","TaskStatusNotificationSchema","TaskStatusNotificationParamsSchema","TextContentSchema","TextResourceContentsSchema","TitledMultiSelectEnumSchemaSchema","TitledSingleSelectEnumSchemaSchema","ToolSchema","ToolAnnotationsSchema","ToolChoiceSchema","ToolExecutionSchema","ToolListChangedNotificationSchema","ToolResultContentSchema","ToolUseContentSchema","UnsubscribeRequestSchema","UnsubscribeRequestParamsSchema","UntitledMultiSelectEnumSchemaSchema","UntitledSingleSelectEnumSchemaSchema"])Ru(e,PX[e]);for(let[e,t]of Object.entries({IdJagTokenExchangeResponseSchema:VB,OAuthClientInformationFullSchema:VX,OAuthClientInformationSchema:VQ,OAuthClientMetadataSchema:VZ,OAuthClientRegistrationErrorSchema:VY,OAuthErrorResponseSchema:VK,OAuthMetadataSchema:VL,OAuthProtectedResourceMetadataSchema:VF,OAuthTokenRevocationRequestSchema:V1,OAuthTokensSchema:VG,OpenIdProviderDiscoveryMetadataSchema:VH,OpenIdProviderMetadataSchema:VU}))Ru(e,t);Object.freeze(Rl);let Rm=Object.freeze(Rp),Rf=[S5,S8,ke,kr],Rh=["inputResponses","requestState"];function Ry(e,t){let r=e.params;if(!Rb(r))return{message:e,lifted:{}};let i=r._meta,o=Rb(i)?Rf.filter(e=>e in i):[],n="request"===t?Rh.filter(e=>e in r):[];if(0===o.length&&0===n.length)return{message:e,lifted:{}};let a={},s={...r};if(o.length>0&&Rb(i)){let e={},t={...i};for(let r of o)e[r]=i[r],delete t[r];a.envelope=e,Object.keys(t).length>0?s._meta=t:delete s._meta}for(let e of n)"inputResponses"===e&&(a.inputResponses=s[e]),"requestState"===e&&(a.requestState=s[e]),delete s[e];return{message:{...e,params:s},lifted:a}}function Rg(e,t){let r=e.validateResult(t,void 0);if(r.ok||"not-in-era"!==r.reason)return{"~standard":{version:1,vendor:"mcp-wire-codec",validate(r){let i=e.validateResult(t,r);return i.ok?{value:i.value}:{issues:[{message:"invalid"===i.reason?i.message:`not-in-era: ${t}`}]}}}}}let R_=(ee=void 0,()=>ee);var Rv=class{_transport;_requestMessageId=0;_requestHandlers=new Map;_customSchemaRequestMethods=new Set;_requestHandlerAbortControllers=new Map;_notificationHandlers=new Map;_responseHandlers=new Map;_progressHandlers=new Map;_timeoutInfo=new Map;_pendingDebouncedNotifications=new Set;_negotiatedProtocolVersion;_supportedProtocolVersions;onclose;onerror;fallbackRequestHandler;fallbackNotificationHandler;constructor(e){this._options=e,this._supportedProtocolVersions=e?.supportedProtocolVersions??S9,this.setNotificationHandler("notifications/cancelled",e=>{this._oncancel(e)}),this.setNotificationHandler("notifications/progress",e=>{this._onprogress(e)}),this.setRequestHandler("ping",e=>({}))}_shouldDropInbound(e){}_outboundMetaEnvelope(){}_envelopeOutbound(e){let t=this._outboundMetaEnvelope();if(void 0===t)return e;let r=e.params??{};return{...e,params:{...r,_meta:{...t,...r._meta}}}}_resolveNonCompleteResult(e,t){return Promise.reject(new V3(V6.UnsupportedResultType,`Unsupported result type '${e.kind}' for ${t.request.method}`,{resultType:e.kind,method:t.request.method}))}_getRequestHandler(e){return this._requestHandlers.get(e)}async _oncancel(e){void 0!==e.params.requestId&&this._requestHandlerAbortControllers.get(e.params.requestId)?.abort(e.params.reason)}_setupTimeout(e,t,r,i,o=!1){this._timeoutInfo.set(e,{timeoutId:setTimeout(i,t),startTime:Date.now(),timeout:t,maxTotalTimeout:r,resetTimeoutOnProgress:o,onTimeout:i})}_resetTimeout(e){let t=this._timeoutInfo.get(e);if(!t)return!1;let r=Date.now()-t.startTime;if(t.maxTotalTimeout&&r>=t.maxTotalTimeout)throw this._timeoutInfo.delete(e),new V3(V6.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:t.maxTotalTimeout,totalElapsed:r});return clearTimeout(t.timeoutId),t.timeoutId=setTimeout(t.onTimeout,t.timeout),!0}_cleanupTimeout(e){let t=this._timeoutInfo.get(e);t&&(clearTimeout(t.timeoutId),this._timeoutInfo.delete(e))}async connect(e){this._transport=e;let t=this.transport?.onclose;this._transport.onclose=()=>{try{t?.()}finally{this._onclose()}};let r=this.transport?.onerror;this._transport.onerror=e=>{r?.(e),this._onerror(e)};let i=this._transport?.onmessage;this._transport.onmessage=(e,t)=>{if(i?.(e,t),k$.safeParse(e).success||kS.safeParse(e).success)this._onresponse(e);else if(kv.safeParse(e).success)this._onrequest(e,t);else kb.safeParse(e).success?this._onnotification(e,t):this._onerror(Error(`Unknown message type: ${JSON.stringify(e)}`))},e.setSupportedProtocolVersions?.(this._supportedProtocolVersions),await this._transport.start()}_onclose(){let e=this._responseHandlers;for(let e of(this._responseHandlers=new Map,this._progressHandlers.clear(),this._pendingDebouncedNotifications.clear(),this._timeoutInfo.values()))clearTimeout(e.timeoutId);this._timeoutInfo.clear();let t=this._requestHandlerAbortControllers;this._requestHandlerAbortControllers=new Map;let r=new V3(V6.ConnectionClosed,"Connection closed");this._transport=void 0;try{this.onclose?.()}finally{for(let t of e.values())t(r);for(let e of t.values())e.abort(r)}}_onerror(e){this.onerror?.(e)}_onnotification(e,t){let{message:r}=Ry(e,"notification"),i=this._negotiatedWireCodec();if(t?.classification===void 0&&"drop"===this._shouldDropInbound(e))return;if(t?.classification!==void 0){let e=PB(t.classification);if(e!==i.era)return void this._onerror(Error(`Era mismatch on inbound notification '${r.method}': classified as ${e} but this instance serves ${i.era}`))}if(PJ(r.method)&&!i.hasNotificationMethod(r.method))return;let o=this._notificationHandlers.get(r.method),n=this.fallbackNotificationHandler;(void 0!==o||void 0!==n)&&Promise.resolve().then(()=>void 0===o?n(r):o(r,i)).catch(e=>this._onerror(Error(`Uncaught error in notification handler: ${e}`)))}_onrequest(e,t){var r;let{message:i,lifted:o}=Ry(e,"request"),n=this._negotiatedWireCodec();if(t?.classification===void 0&&"drop"===this._shouldDropInbound(e))return void this._onerror(Error(`Dropped inbound request '${e.method}': not servable on this connection's protocol era`));let a=this._transport,s=(e,t,r)=>{let o={jsonrpc:"2.0",id:i.id,error:{code:e,message:t,...void 0!==r&&{data:r}}};a?.send(o).catch(e=>this._onerror(Error(`Failed to send an error response: ${e}`)))};if(t?.classification!==void 0){let e=PB(t.classification);if(e!==n.era){this._onerror(Error(`Era mismatch on inbound request '${i.method}': classified as ${e} but this instance serves ${n.era}`));let r=t.classification.revision??e;s(PV.UnsupportedProtocolVersion,`Unsupported protocol version: ${r}`,{supported:this._supportedProtocolVersions,requested:r});return}}if(PK(i.method)&&!n.hasRequestMethod(i.method)&&!(PZ(i.method)&&this._customSchemaRequestMethods.has(i.method)))return void s(PV.MethodNotFound,"Method not found");let d=this._requestHandlers.get(i.method)??this.fallbackRequestHandler;if(void 0===d)return void s(PV.MethodNotFound,"Method not found");let c=n.checkInboundEnvelope(o);if(void 0!==c)return void s(PV.InvalidParams,c);let l=(e,t)=>this._notificationViaCodec(this._resolveOutboundCodec(e.method),e,{...t,relatedRequestId:i.id}),p=(e,t,r)=>this._requestWithSchemaViaCodec(this._resolveOutboundCodec(e.method),e,t,{...r,relatedRequestId:i.id}),u=new AbortController;this._requestHandlerAbortControllers.set(i.id,u);let m=void 0===o.inputResponses?void 0:function(e){let t={},r=[];if(!R$(e))return{accepted:t,droppedKeys:r};for(let[i,o]of Object.entries(e)){if(!R$(o)||"method"in o||"result"in o){r.push(i);continue}t[i]=o}return{accepted:t,droppedKeys:r}}(o.inputResponses),f={sessionId:a?.sessionId,mcpReq:{id:i.id,method:i.method,_meta:i.params?._meta,...void 0!==o.envelope&&{envelope:o.envelope},...void 0!==m&&{inputResponses:m.accepted},...void 0!==m&&m.droppedKeys.length>0&&{droppedInputResponseKeys:m.droppedKeys},requestState:void 0===o.requestState?R_:(r=o.requestState,()=>r),signal:u.signal,send:(e,t,r)=>{let i=this._resolveOutboundCodec(e.method);if(this._assertOutboundRequestInEra(i,e.method),P7(t))return p(e,t,r);let o=Rg(i,e.method);if(void 0===o)throw TypeError(`'${e.method}' is not a spec method; pass a result schema as the second argument to ctx.mcpReq.send().`);return p(e,o,t)},notify:l},http:t?.authInfo?{authInfo:t.authInfo}:void 0},h=this.buildContext(f,t);Promise.resolve().then(()=>d(i,h)).then(async e=>{let t;if(u.signal.aborted)return;try{t=n.encodeResult(i.method,e,this._outboundServerInfo())}catch(e){this._onerror(Error(`Failed to encode result for ${i.method}: ${e}`)),s(PV.InternalError,"Internal error");return}let r={result:t,jsonrpc:"2.0",id:i.id};await a?.send(r)},async e=>{if(u.signal.aborted)return;let t=Number.isSafeInteger(e.code)?e.code:PV.InternalError,r={jsonrpc:"2.0",id:i.id,error:{code:n.encodeErrorCode(t),message:e.message??"Internal error",...void 0!==e.data&&{data:e.data}}};await a?.send(r)}).catch(e=>this._onerror(Error(`Failed to send response: ${e}`))).finally(()=>{this._requestHandlerAbortControllers.get(i.id)===u&&this._requestHandlerAbortControllers.delete(i.id)})}_onprogress(e){let{progressToken:t,...r}=e.params,i=Number(t),o=this._progressHandlers.get(i);if(!o)return void this._onerror(Error(`Received a progress notification for an unknown token: ${JSON.stringify(e)}`));let n=this._responseHandlers.get(i),a=this._timeoutInfo.get(i);if(a&&n&&a.resetTimeoutOnProgress)try{this._resetTimeout(i)}catch(e){this._responseHandlers.delete(i),this._progressHandlers.delete(i),this._cleanupTimeout(i),n(e);return}o(r)}_onresponse(e){let t=Number(e.id),r=this._responseHandlers.get(t);void 0===r?this._onerror(Error(`Received a response for an unknown message ID: ${JSON.stringify(e)}`)):(this._responseHandlers.delete(t),this._cleanupTimeout(t),this._progressHandlers.delete(t),r(k$.safeParse(e).success?e:PP.fromError(e.error.code,e.error.message,e.error.data)))}get transport(){return this._transport}async close(){await this._transport?.close()}request(e,t,r){let i=this._resolveOutboundCodec(e.method);if(P7(t))return PZ(e.method)||this._assertOutboundRequestInEra(i,e.method),this._requestWithSchemaViaCodec(i,e,t,r);this._assertOutboundRequestInEra(i,e.method);let o=Rg(i,e.method);if(void 0===o)throw TypeError(`'${e.method}' is not a spec method; pass a result schema as the second argument to request().`);return this._requestWithSchemaViaCodec(i,e,o,t)}_negotiatedWireCodec(){return PG(this._negotiatedProtocolVersion)}_wireCodec(){return this._negotiatedWireCodec()}_resolveOutboundCodec(e){if(void 0===this._negotiatedProtocolVersion){let t=function(e){switch(e){case"initialize":case"notifications/initialized":return PG(void 0);case"server/discover":return PG(PH);default:return}}(e);if(t)return t}return this._negotiatedWireCodec()}_assertOutboundRequestInEra(e,t){if(PK(t)&&!e.hasRequestMethod(t))throw new V3(V6.MethodNotSupportedByProtocolVersion,`Method '${t}' is not supported by the negotiated protocol version (wire era ${e.era})`,{method:t,era:e.era})}_requestWithSchema(e,t,r){let i=this._resolveOutboundCodec(e.method);return this._assertOutboundRequestInEra(i,e.method),this._requestWithSchemaViaCodec(i,e,t,r)}_requestWithSchemaViaCodec(e,t,r,i){let o,n,{relatedRequestId:a,resumptionToken:s,onresumptiontoken:d,headers:c}=i??{},l=Date.now();return new Promise((p,u)=>{let m=e=>{u(e)};if(!this._transport)return void m(Error("Not connected"));if(this._options?.enforceStrictCapabilities===!0)try{this.assertCapabilityForMethod(t.method)}catch(e){m(e);return}if(i?.signal?.aborted){let e=i.signal.reason;throw e instanceof V3?e:new V3(V6.RequestTimeout,String(e))}let f=e.era===PH&&!0===this._transport.hasPerRequestStream?new AbortController:void 0,h=this._requestMessageId++;n=h;let y={...t,jsonrpc:"2.0",id:h};i?.onprogress&&(this._progressHandlers.set(h,i.onprogress),y.params={...t.params,_meta:{...t.params?._meta,progressToken:h}});let g=this._envelopeOutbound(y),_=!1,v=e=>{_||(this._progressHandlers.delete(h),void 0===f?"initialize"!==t.method&&this._transport?.send(this._envelopeOutbound({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:h,reason:String(e)}}),{relatedRequestId:a,resumptionToken:s,onresumptiontoken:d}).catch(e=>this._onerror(Error(`Failed to send cancellation: ${e}`))):f.abort(),u(e instanceof V3?e:new V3(V6.RequestTimeout,String(e))))};this._responseHandlers.set(h,o=>{let n;if(!i?.signal?.aborted){if(_=!0,o instanceof Error)return u(o);try{n=e.decodeResult(t.method,o.result)}catch(e){return u(e instanceof Error?e:Error(String(e)))}if("invalid"===n.kind)return u(n.error);if("input_required"===n.kind){var a;return i?.allowInputRequired===!0?p({resultType:"input_required",inputRequests:(a=n).inputRequests,...void 0!==a.requestState&&{requestState:a.requestState},...void 0!==a._meta&&{_meta:a._meta}}):p(this._resolveNonCompleteResult(n,{codec:e,request:t,resultSchema:r,options:i,flowStartedAt:l,retry:(i,o)=>this._requestWithSchemaViaCodec(e,void 0===i?{method:t.method}:{method:t.method,params:i},r,o)}))}Rr(r,n.result).then(e=>{e.success?p(e.data):u(new V3(V6.InvalidResult,`Invalid result for ${t.method}: ${e.error}`))},u)}}),o=()=>v(i?.signal?.reason),i?.signal?.addEventListener("abort",o,{once:!0});let b=i?.timeout??6e4;this._setupTimeout(h,b,i?.maxTotalTimeout,()=>v(new V3(V6.RequestTimeout,"Request timed out",{timeout:b})),i?.resetTimeoutOnProgress??!1),this._transport.send(g,{relatedRequestId:a,resumptionToken:s,onresumptiontoken:d,headers:c,requestSignal:f?.signal}).catch(e=>{this._progressHandlers.delete(h),u(e)})}).finally(()=>{o&&i?.signal?.removeEventListener("abort",o),void 0!==n&&(this._responseHandlers.delete(n),this._cleanupTimeout(n))})}async notification(e,t){return await this._notificationViaCodec(this._resolveOutboundCodec(e.method),e,t)}async _notificationViaCodec(e,t,r){if(!this._transport)throw new V3(V6.NotConnected,"Not connected");if(PJ(t.method)&&!e.hasNotificationMethod(t.method))throw new V3(V6.MethodNotSupportedByProtocolVersion,`Notification '${t.method}' is not supported by the negotiated protocol version (wire era ${e.era})`,{method:t.method,era:e.era});this.assertNotificationCapability(t.method);let i=this._envelopeOutbound({jsonrpc:"2.0",...t});if((this._options?.debouncedNotificationMethods??[]).includes(t.method)&&!t.params&&r?.relatedRequestId===void 0){if(this._pendingDebouncedNotifications.has(t.method))return;this._pendingDebouncedNotifications.add(t.method),Promise.resolve().then(()=>{this._pendingDebouncedNotifications.delete(t.method),this._transport&&this._transport?.send(i,r).catch(e=>this._onerror(e))});return}await this._transport.send(i,r)}setRequestHandler(e,t,r){let i;if(this.assertRequestHandlerCapability(e),"function"==typeof t){if(!PK(e))throw TypeError(`'${e}' is not a spec request method; pass schemas as the second argument to setRequestHandler().`);i=(r,i)=>{let o=this._negotiatedWireCodec(),n=o.validateRequest(e,r);if(n.ok||"not-in-era"!==n.reason||(n=o.validateInputRequest(e,r)),!n.ok){if("not-in-era"===n.reason)throw new PP(PV.InternalError,`No wire schema for ${e} in the resolved era`);throw Error(n.message)}return Promise.resolve(t(n.value,i))}}else if(r)i=async(i,o)=>{let n=await Rr(t.params,{...i.params});if(!n.success)throw new PP(PV.InvalidParams,`Invalid params for ${e}: ${n.error}`);return r(n.data,o)};else throw TypeError("setRequestHandler: handler is required");"function"==typeof t?this._customSchemaRequestMethods.delete(e):this._customSchemaRequestMethods.add(e),this._requestHandlers.set(e,this._wrapHandler(e,i))}_wrapHandler(e,t){return t}_outboundServerInfo(){}removeRequestHandler(e){this._requestHandlers.delete(e),this._customSchemaRequestMethods.delete(e)}assertCanSetRequestHandler(e){if(this._requestHandlers.has(e))throw Error(`A request handler for ${e} already exists, which would be overridden`)}setNotificationHandler(e,t,r){if("function"==typeof t){if(!PJ(e))throw TypeError(`'${e}' is not a spec notification method; pass schemas as the second argument to setNotificationHandler().`);this._notificationHandlers.set(e,(r,i)=>{let o=i.validateNotification(e,r);if(!o.ok){if("not-in-era"===o.reason)throw new PP(PV.InternalError,`No wire schema for ${e} in the resolved era`);throw Error(o.message)}return Promise.resolve(t(o.value))});return}if(!r)throw TypeError("setNotificationHandler: handler is required");this._notificationHandlers.set(e,async i=>{let o=await Rr(t.params,{...i.params});if(!o.success)throw new PP(PV.InvalidParams,`Invalid params for notification ${e}: ${o.error}`);await r(o.data,i)})}removeNotificationHandler(e){this._notificationHandlers.delete(e)}};function Rb(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)}function R$(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}function RS(e){throw new V3(V6.SendFailed,`ctx.mcpReq.${e} is not available while fulfilling an embedded input request: the request is fulfilled locally and has no related peer request`)}(S0(e=>{var t=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,r=/\\([\u000b\u0020-\u00ff])/g,i=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;function o(e){this.parameters=Object.create(null),this.type=e}e.parse=function(e){if(!e)throw TypeError("argument string is required");var n,a,s,d="object"==typeof e?function(e){var t;if("function"==typeof e.getHeader?t=e.getHeader("content-type"):"object"==typeof e.headers&&(t=e.headers&&e.headers["content-type"]),"string"!=typeof t)throw TypeError("content-type header is missing from object");return t}(e):e;if("string"!=typeof d)throw TypeError("argument string is required to be a string");var c=d.indexOf(";"),l=-1!==c?d.slice(0,c).trim():d.trim();if(!i.test(l))throw TypeError("invalid media type");var p=new o(l.toLowerCase());if(-1!==c){for(t.lastIndex=c;a=t.exec(d);){if(a.index!==c)throw TypeError("invalid parameter format");c+=a[0].length,n=a[1].toLowerCase(),34===(s=a[2]).charCodeAt(0)&&-1!==(s=s.slice(1,-1)).indexOf("\\")&&(s=s.replace(r,"$1")),p.parameters[n]=s}if(c!==d.length)throw TypeError("invalid parameter format")}return p}}))();var Rk=class{_buffer;_maxBufferSize;constructor(e){this._maxBufferSize=e?.maxBufferSize??0xa00000}append(e){if((this._buffer?.length??0)+e.length>this._maxBufferSize)throw this.clear(),Error(`ReadBuffer exceeded maximum size of ${this._maxBufferSize} bytes`);this._buffer=this._buffer?Buffer.concat([this._buffer,e]):e}readMessage(){for(;this._buffer;){let t=this._buffer.indexOf("\n");if(-1===t)break;let r=this._buffer.toString("utf8",0,t).replace(/\r$/,"");this._buffer=this._buffer.subarray(t+1);try{var e;return e=r,kk.parse(JSON.parse(e))}catch(e){if(e instanceof SyntaxError)continue;throw e}}return null}clear(){this._buffer=void 0}};let Rw=el("../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/index.js"),RV="win32"===M.platform?["APPDATA","COMSPEC","HOMEDRIVE","HOMEPATH","LOCALAPPDATA","PATH","PATHEXT","PROCESSOR_ARCHITECTURE","PROGRAMDATA","PROGRAMFILES","PROGRAMFILES(X86)","PROGRAMW6432","SYSTEMDRIVE","SYSTEMROOT","TEMP","USERNAME","USERPROFILE","WINDIR"]:["HOME","LOGNAME","PATH","SHELL","TERM","USER"];var RP=class{_process;_readBuffer;_serverParams;_stderrStream=null;onclose;onerror;onmessage;constructor(e){this._serverParams=e,this._readBuffer=new Rk({maxBufferSize:e.maxBufferSize}),("pipe"===e.stderr||"overlapped"===e.stderr)&&(this._stderrStream=new H)}async start(){if(this._process)throw Error("StdioClientTransport already started! If using Client class, note that connect() calls start() automatically.");return new Promise((e,t)=>{this._process=Rw(this._serverParams.command,this._serverParams.args??[],{env:{...function(){let e={};for(let t of RV){let r=M.env[t];void 0!==r&&(r.startsWith("()")||(e[t]=r))}return e}(),...this._serverParams.env},stdio:["pipe","pipe",this._serverParams.stderr??"inherit"],shell:!1,windowsHide:"win32"===M.platform,cwd:this._serverParams.cwd}),this._process.on("error",e=>{t(e),this.onerror?.(e)}),this._process.on("spawn",()=>{e()}),this._process.on("close",e=>{this._process=void 0,this.onclose?.()}),this._process.stdin?.on("error",e=>{this.onerror?.(e)}),this._process.stdout?.on("data",e=>{try{this._readBuffer.append(e),this.processReadBuffer()}catch(e){this.onerror?.(e),this.close().catch(()=>{})}}),this._process.stdout?.on("error",e=>{this.onerror?.(e)}),this._stderrStream&&this._process.stderr&&this._process.stderr.pipe(this._stderrStream)})}get stderr(){return this._stderrStream?this._stderrStream:this._process?.stderr??null}get pid(){return this._process?.pid??null}processReadBuffer(){for(;;)try{let e=this._readBuffer.readMessage();if(null===e)break;this.onmessage?.(e)}catch(e){this.onerror?.(e)}}async _dispose(){let e=this._process;if(this._process=void 0,e&&null===e.exitCode&&null===e.signalCode){let t=new Promise(t=>e.once("exit",()=>t()));try{e.stdin?.end()}catch{}try{e.kill("SIGTERM")}catch{}if(await Promise.race([t,new Promise(e=>setTimeout(e,1e3).unref())]),null===e.exitCode&&null===e.signalCode)try{e.kill("SIGKILL")}catch{}await t}try{e?.stdout?.destroy()}catch{}try{e?.stdin?.destroy()}catch{}try{e?.stderr?.destroy()}catch{}this._readBuffer.clear()}async close(){if(this._process){let e=this._process;this._process=void 0;let t=new Promise(t=>{e.once("close",()=>{t()})});try{e.stdin?.end()}catch{}if(await Promise.race([t,new Promise(e=>setTimeout(e,2e3).unref())]),null===e.exitCode){try{e.kill("SIGTERM")}catch{}await Promise.race([t,new Promise(e=>setTimeout(e,2e3).unref())])}if(null===e.exitCode)try{e.kill("SIGKILL")}catch{}}this._readBuffer.clear()}send(e){return new Promise(t=>{if(!this._process?.stdin)throw new V3(V6.NotConnected,"Not connected");let r=JSON.stringify(e)+"\n";this._process.stdin.write(r)?t():this._process.stdin.once("drain",t)})}};let RR=new TextEncoder,Rq=new TextDecoder,RI=new TextDecoder("utf-8",{fatal:!0});function Rx(...e){let t=new Uint8Array(e.reduce((e,{length:t})=>e+t,0)),r=0;for(let i of e)t.set(i,r),r+=i.length;return t}function Rj(e,t,r){if(t<0||t>=0x100000000)throw RangeError(`value must be >= 0 and <= 4294967295. Received ${t}`);e.set([t>>>24,t>>>16,t>>>8,255&t],r)}function RC(e){let t=Math.floor(e/0x100000000),r=new Uint8Array(8);return Rj(r,t,0),Rj(r,e%0x100000000,4),r}function RT(e){let t=new Uint8Array(4);return Rj(t,e),t}let RO=/[^\x00-\x7f]/;function RE(e){if("string"==typeof e&&e.length>=128){if(RO.test(e))throw TypeError("non-ASCII string encountered in encode()");return RR.encode(e)}let t=new Uint8Array(e.length);for(let r=0;r127)throw TypeError("non-ASCII string encountered in encode()");t[r]=i}return t}function RA(e,t=!1){if(Uint8Array.prototype.toBase64)return e.toBase64({alphabet:t?"base64url":"base64",omitPadding:t});let r=[];for(let t=0;t"string"!=typeof e)))throw TypeError(`"${e}" option must be an array of strings`);return void 0===t?void 0:new Set(t)}function qi(e,t){let{crit:r}=t??{};if(Array.isArray(r)&&new Set(r).size!==r.length)throw new e('"crit" (Critical) Header Parameter MUST NOT contain duplicate values')}function qo(e,t,r,i,o){if(void 0!==o.crit&&i?.crit===void 0)throw new e('"crit" (Critical) Header Parameter MUST be integrity protected');if(!i||void 0===i.crit)return[];if(!Array.isArray(i.crit)||0===i.crit.length||i.crit.some(e=>"string"!=typeof e||0===e.length))throw new e('"crit" (Critical) Header Parameter MUST be an array of non-empty strings when present');let n=void 0===r?t:{__proto__:null,...r,...t};for(let t of i.crit){if(!(t in n))throw new RL(`Extension Header Parameter "${t}" is not recognized`);if(!Object.hasOwn(o,t)||void 0===o[t])throw new e(`Extension Header Parameter "${t}" is missing`);if(n[t]&&(!Object.hasOwn(i,t)||void 0===i[t]))throw new e(`Extension Header Parameter "${t}" MUST be integrity protected`)}return i.crit}function qn(e,t){if(t.includes("b64")){let t=e.b64;if("boolean"!=typeof t)throw new RG('The "b64" (base64url-encode payload) Header Parameter must be a boolean');return t}return!0}function qa(e,t){let r,i;try{r=JSON.stringify(t),i=JSON.parse(r)}catch(t){throw new e("JOSE Header is not valid JSON",{cause:t})}if(!R4(i))throw new e("JOSE Header is not a JSON object");return[i,r]}async function qs(e,t,r){let i,o,{alg:n,secret:a}=e,s="decrypt"===r||"sign"===r;if(a&&t instanceof Uint8Array)return t;if(R4(t)){if("string"!=typeof(i=q$(t)).kty)throw qh(n,t,a);if(!(a?"oct"===i.kty&&"string"==typeof i.k:"oct"!==i.kty&&(s?"AKP"===i.kty&&"string"==typeof i.priv||"string"==typeof i.d:void 0===i.d&&void 0===i.priv)))throw TypeError(a?'JSON Web Key for symmetric algorithms must have JWK "kty" (Key Type) equal to "oct" and the JWK "k" (Key Value) present':`JSON Web Key for this operation must be a ${s?"private":"public"} JWK`);if(((e,t,r)=>{let{alg:i}=e;if(void 0!==t.use){let e="sign"===r||"verify"===r?"sig":"enc";if(t.use!==e)throw TypeError(`Invalid key for this operation, its "use" must be "${e}" when present`)}if(void 0!==t.alg&&t.alg!==i)throw TypeError(`Invalid key for this operation, its "alg" must be "${i}" when present`);if(Array.isArray(t.key_ops)){let i="encrypt"===r||"decrypt"===r?e.ops?.[+("encrypt"!==r)]:r;if(i&&!t.key_ops.includes(i))throw TypeError(`Invalid key for this operation, its "key_ops" must include "${i}" when present`)}})(e,i,r),"oct"===i.kty)return R1(i.k);if(!Object.isFrozen(t)){let{key_ops:e}=t;Array.isArray(e)&&Object.freeze(e),Object.freeze(t)}}else{if(!qu(t))throw qh(n,t,a);let e=a?"secret":s?"private":"public";if(t.type!==e&&(a||["secret","public","private"].includes(t.type)))throw TypeError(`${t[Symbol.toStringTag]} instances must be of type "${e}" for the ${n} algorithm`);if(ql(t))return t;if("secret"===(o=t).type)return o.export()}let d=(m||=new WeakMap).get(t);if(d?.[n])return d[n];if(d||m.set(t,d={}),o&&"function"==typeof o.toCryptoKey){let t="public"===o.type,r=qd[o.asymmetricKeyDetails?.namedCurve],i=e.resolve?.({crv:r,asymmetricKeyType:o.asymmetricKeyType})??e.subtle;return d[n]=o.toCryptoKey(i,t,e.usages[+!t])}return(i??=o.export({format:"jwk"})).alg=n,d[n]=await qk(e,i)}let qd={__proto__:null,prime256v1:"P-256",secp384r1:"P-384",secp521r1:"P-521"};function qc(e){if(!ql(e))throw Error("CryptoKey instance expected")}let ql=e=>{if(e?.[Symbol.toStringTag]==="CryptoKey")return!0;try{return e instanceof CryptoKey}catch{return!1}},qp=e=>e?.[Symbol.toStringTag]==="KeyObject",qu=e=>ql(e)||qp(e);function qm(e,t,...r){if(r.length>2){let t=r.pop();e+=`one of type ${r.join(", ")}, or ${t}.`}else 2===r.length?e+=`one of type ${r[0]} or ${r[1]}.`:e+=`of type ${r[0]}.`;return null==t?e+=` Received ${t}`:"function"==typeof t&&t.name?e+=` Received function ${t.name}`:"object"==typeof t&&null!=t&&t.constructor?.name&&(e+=` Received an instance of ${t.constructor.name}`),e}let qf=(e,...t)=>qm("Key must be ",e,...t);function qh(e,t,r){let i=["CryptoKey","KeyObject","JSON Web Key"];return r&&i.push("Uint8Array"),TypeError(qm(`Key for the ${e} algorithm must be `,t,...i))}let qy=(e,t="algorithm.name")=>TypeError(`CryptoKey does not support this operation, its ${t} must be ${e}`);function qg(e,t){if(t&&!e.usages.includes(t))throw TypeError(`CryptoKey does not support this operation, its usages must include ${t}.`)}function q_(e,t){let{modulusLength:r}=t.algorithm;if("number"!=typeof r||r<2048)throw TypeError(`${e} requires key modulusLength to be 2048 bits or larger`)}function qv(e,t,r){let i=e.algorithm;if(i.name!==t.name)throw qy(t.name);if(t.hash&&i.hash?.name!==t.hash)throw qy(t.hash,"algorithm.hash");if(t.namedCurve&&i.namedCurve!==t.namedCurve)throw qy(t.namedCurve,"algorithm.namedCurve");if(void 0!==t.length&&i.length!==t.length)throw qy(t.length,"algorithm.length");qg(e,r)}function qb(e){return{__proto__:null,...e}}function q$(e){let t=qb(e);if(void 0!==t.ext&&"boolean"!=typeof t.ext)throw TypeError('"ext" (Extractable) Parameter must be a boolean');if(void 0!==t.key_ops){let e=t.key_ops,r=Array.isArray(e)?[...e]:void 0;if(!r||r.some(e=>"string"!=typeof e)||new Set(r).size!==r.length)throw TypeError('"key_ops" (Key Operations) Parameter must be an array of unique strings');t.key_ops=r}return t}function qS(e){if(void 0!==e&&"boolean"!=typeof e)throw TypeError('"extractable" option must be a boolean');return e}async function qk(e,t,r){if(!e.kty.includes(t.kty))throw new RL('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');let i=e.resolve?.({kty:t.kty,crv:t.crv})??e.subtle,o=!!(t.d||t.priv),n={...t,ext:r??t.ext};return"AKP"!==n.kty&&delete n.alg,delete n.use,crypto.subtle.importKey("jwk",n,i,n.ext??!o,t.key_ops??e.usages[+!!o])}async function qw(e,t,r,i=!1){return e instanceof Uint8Array&&(e=await crypto.subtle.importKey("raw",e,t,i,[r])),qv(e,t,r),e}let qV=e=>crypto.getRandomValues(new Uint8Array(e.cekBits>>3));function qP(e,t){let r=e.byteLength<<3;if(r!==t)throw new RH(`Invalid Content Encryption Key length. Expected ${t} bits, got ${r} bits`)}function qR(e,t){if(t.length<<3!==e.ivBits)throw new RH("Invalid Initialization Vector length")}async function qq(e,t,r){if(!(t instanceof Uint8Array))throw TypeError(qf(t,"Uint8Array"));let i=e.cekBits>>1;return[await crypto.subtle.importKey("raw",t.subarray(i>>3),"AES-CBC",!1,[r]),await crypto.subtle.importKey("raw",t.subarray(0,i>>3),{hash:`SHA-${i<<1}`,name:"HMAC"},!1,["sign"]),i]}async function qI(e,t,r){return new Uint8Array((await crypto.subtle.sign("HMAC",e,t)).slice(0,r>>3))}async function qx(e,t,r,i,o){if(!ql(r)&&!(r instanceof Uint8Array))throw TypeError(qf(r,"CryptoKey","KeyObject","Uint8Array","JSON Web Key"));if(i?qR(e,i):i=crypto.getRandomValues(new Uint8Array(e.ivBits>>3)),r instanceof Uint8Array&&qP(r,e.cekBits),e.cbc)return async function(e,t,r,i,o){let[n,a,s]=await qq(e,r,"encrypt"),d=new Uint8Array(await crypto.subtle.encrypt({iv:i,name:"AES-CBC"},n,t)),c=Rx(o,i,d,RC(8*o.length));return{ciphertext:d,tag:await qI(a,c,s),iv:i}}(e,t,r,i,o);let n=await qw(r,e.subtle,"encrypt"),a=new Uint8Array(await crypto.subtle.encrypt({additionalData:o,iv:i,name:"AES-GCM",tagLength:128},n,t));return{ciphertext:a.subarray(0,-16),tag:a.subarray(-16),iv:i}}async function qj(e,t,r,i,o,n){if(!ql(t)&&!(t instanceof Uint8Array))throw TypeError(qf(t,"CryptoKey","KeyObject","Uint8Array","JSON Web Key"));if(!i)throw new RH("JWE Initialization Vector missing");if(!o)throw new RH("JWE Authentication Tag missing");if(!e.cbc&&16!==o.length)throw new RH("Invalid Authentication Tag length");if(qR(e,i),t instanceof Uint8Array&&qP(t,e.cekBits),e.cbc)return async function(e,t,r,i,o,n){let[a,s,d]=await qq(e,t,"decrypt"),c=Rx(n,i,r,RC(8*n.length)),l=await qI(s,c,d);try{if(await async function(e,t){let r={name:"HMAC",hash:"SHA-256"},i=await crypto.subtle.generateKey(r,!1,["sign","verify"]),o=await crypto.subtle.sign(r,i,e);return crypto.subtle.verify(r,i,o,t)}(o,l))return new Uint8Array(await crypto.subtle.decrypt({iv:i,name:"AES-CBC"},a,r))}catch{}throw new RU}(e,t,r,i,o,n);let a=await qw(t,e.subtle,"decrypt");try{return new Uint8Array(await crypto.subtle.decrypt({additionalData:n,iv:i,name:"AES-GCM",tagLength:128},a,Rx(r,o)))}catch{throw new RU}}function qC(e){let t={__proto__:null};for(let r in e)t[r]={...e[r],alg:r};return t}let qT=[["encrypt","wrapKey"],["decrypt","unwrapKey"]],qO=[[],["deriveBits"]],qE=[[],[]];function qA(e){return{kty:["RSA"],mode:"key-encryption",subtle:{name:"RSA-OAEP",hash:`SHA-${e}`},usages:qT,ops:["wrapKey","unwrapKey"]}}function qW(e){return{kty:["EC","OKP"],mode:e,subtle:{name:"ECDH"},resolve:({kty:e,crv:t,asymmetricKeyType:r})=>{if("X25519"===t||"x25519"===r)return{name:"X25519"};if("OKP"===e)throw new RL('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');return{name:"ECDH",namedCurve:t}},usages:qO,ops:[void 0,"deriveBits"]}}function qM(e,t=!1){return{kty:["oct"],mode:"key-wrapping",secret:!0,subtle:{name:t?"AES-GCM":"AES-KW",length:e},usages:qE,ops:t?["encrypt","decrypt"]:["wrapKey","unwrapKey"]}}function qN(){return{kty:["oct"],mode:"key-wrapping",secret:!0,subtle:{name:"PBKDF2"},usages:qE,ops:["deriveBits","deriveBits"]}}let qz=qC({dir:{kty:["oct"],mode:"direct-encryption",secret:!0,subtle:{name:"AES-GCM"},usages:qE,ops:["encrypt","decrypt"]},"RSA-OAEP":qA(1),"RSA-OAEP-256":qA(256),"RSA-OAEP-384":qA(384),"RSA-OAEP-512":qA(512),"ECDH-ES":qW("direct-key-agreement"),"ECDH-ES+A128KW":qW("key-agreement-with-key-wrapping"),"ECDH-ES+A192KW":qW("key-agreement-with-key-wrapping"),"ECDH-ES+A256KW":qW("key-agreement-with-key-wrapping"),A128KW:qM(128),A192KW:qM(192),A256KW:qM(256),A128GCMKW:qM(128,!0),A192GCMKW:qM(192,!0),A256GCMKW:qM(256,!0),"PBES2-HS256+A128KW":qN(),"PBES2-HS384+A192KW":qN(),"PBES2-HS512+A256KW":qN()}),qD=["encrypt","decrypt"];function qF(e,t=!1){return{kty:["oct"],secret:!0,subtle:{name:t?"AES-CBC":"AES-GCM",length:e},usages:qE,ops:qD,cekBits:e,ivBits:t?128:96,cbc:t}}let qL=qC({A128GCM:qF(128),A192GCM:qF(192),A256GCM:qF(256),"A128CBC-HS256":qF(256,!0),"A192CBC-HS384":qF(384,!0),"A256CBC-HS512":qF(512,!0)});function qU(e,t){throw new RL(`Invalid or unsupported "${e}" (JWE ${t}) header value`)}function qH(e){return("string"==typeof e?qz[e]:void 0)??qU("alg","Algorithm")}function qG(e){return"key-wrapping"===e.mode||"key-encryption"===e.mode||"key-agreement-with-key-wrapping"===e.mode}function qB(e){return("string"==typeof e?qL[e]:void 0)??qU("enc","Encryption Algorithm")}function qK(e,t){if("ECDH"!==e.algorithm.name&&"X25519"!==e.algorithm.name)throw TypeError("CryptoKey does not support this operation, its algorithm.name must be ECDH or X25519");qg(e,t)}function qJ(e,t,r){qv(t,qH(e).subtle,r),q_(e,t)}async function qZ(e,t,r,i){if(!(e instanceof Uint8Array)||e.length<8)throw new RH("PBES2 Salt Input must be 8 or more octets");if(!Number.isSafeInteger(r)||1!==Math.sign(r))throw new RH("PBES2 Count Input must be a positive integer");let o=Rx(RE(t),Uint8Array.of(0),e),n=parseInt(t.slice(13,16),10),a={hash:`SHA-${t.slice(8,11)}`,iterations:r,name:"PBKDF2",salt:o},s=await qw(i,qH(t).subtle,"deriveBits");return new Uint8Array(await crypto.subtle.deriveBits(a,s,n))}function qQ(e){return Rx(RT(e.length),e)}async function qX(e,t,r,i,o=new Uint8Array,n=new Uint8Array){qK(e),qK(t,"deriveBits");let a=Rx(qQ(RE(r)),qQ(o),qQ(n),RT(i));return async function(e,t,r){let i=t>>3,o=Math.ceil(i/32),n=new Uint8Array(32*o);for(let t=1;t<=o;t++){let i=await RM("sha256",Rx(RT(t),e,r));n.set(i,(t-1)*32)}return n.slice(0,i)}(new Uint8Array(await crypto.subtle.deriveBits({name:e.algorithm.name,public:e},t,"X25519"===e.algorithm.name?256:Math.ceil(parseInt(e.algorithm.namedCurve.slice(-3),10)/8)<<3)),i,a)}function qY(e){qc(e);let t=e.algorithm.namedCurve;if("P-256"!==t&&"P-384"!==t&&"P-521"!==t&&"X25519"!==e.algorithm.name)throw new RL("ECDH with the provided key is not allowed or not supported by your javascript runtime")}function q1(e,t){let r=e[t];if(void 0!==r){if("string"!=typeof r)throw new RH(`JOSE Header "${t}" (Agreement Party${"apu"===t?"U":"V"}Info) invalid`);return R5(r,t,RH)}}function q0(e,t){if(void 0!==e&&void 0!==t&&e.byteLength===t.byteLength){for(let r=0;r"u")throw new RL(`JWE "zip" (Compression Algorithm) Header Parameter requires the ${e} API.`)}async function q9(e,t,r=1/0){let i=e.writable.getWriter();i.write(t).catch(()=>{}),i.close().catch(()=>{});let o=[],n=0,a=e.readable.getReader();for(;;){let{value:e,done:t}=await a.read();if(t)break;if(o.push(e),n+=e.byteLength,1/0!==r&&n>r)throw new RH("Decompressed plaintext exceeded the configured limit")}return Rx(...o)}function q5(e){let{aad:t,ciphertext:r,iv:i,protected:o,tag:n,unprotected:a}=e;if(void 0!==i&&("string"!=typeof i||!i))throw new RH("JWE Initialization Vector incorrect type");if("string"!=typeof r)throw new RH("JWE Ciphertext missing or incorrect type");if(void 0!==n&&("string"!=typeof n||!n))throw new RH("JWE Authentication Tag incorrect type");if(void 0!==o&&"string"!=typeof o)throw new RH("JWE Protected Header incorrect type");if(void 0!==t&&("string"!=typeof t||!t))throw new RH("JWE AAD incorrect type");if(void 0!==a&&!R4(a))throw new RH("JWE Shared Unprotected Header incorrect type");return{aad:t,ciphertext:r,iv:i,protected:o,tag:n,unprotected:void 0===a?void 0:{...a}}}function q8(e){let t,r;try{let{header:i}=e;if(R4(i)){r=i.alg;let e=Object.keys(i);e.includes("alg")||(r=void 0),t=Object.fromEntries(e.map(e=>[e,"alg"===e?r:i[e]]))}else t=i;let{encrypted_key:o}=e;return[{encrypted_key:o,header:t},r]}catch(e){return[void 0,r,e]}}function q7(e){let{encrypted_key:t,header:r}=e;if(void 0!==t&&"string"!=typeof t)throw new RH("JWE Encrypted Key incorrect type");if(void 0!==r&&!R4(r))throw new RH("JWE Per-Recipient Unprotected Header incorrect type");if(void 0===e.protected&&void 0===r&&void 0===e.unprotected)throw new RH("JOSE Header missing")}function Ie(e){let t,{protected:r,ciphertext:i,iv:o,tag:n,aad:a}=e;return void 0!==r&&(t=R7(r,RH,"JWE Protected Header is invalid")),[t,R5(i,"ciphertext",RH),void 0!==o?R5(o,"iv",RH):void 0,void 0!==n?R5(n,"tag",RH):void 0,R8((r??"")+(void 0!==a?`.${a}`:""),"aad",RH)]}function It(e){return[e&&qr("keyManagementAlgorithms",e.keyManagementAlgorithms),e&&qr("contentEncryptionAlgorithms",e.contentEncryptionAlgorithms),e?.crit,e?.maxPBES2Count,e?.maxDecompressedLength]}async function Ir(e,t,r,i=Ie(e)){let o,n,a,s,[d,c,l,p,u]=i,{header:m,unprotected:f,aad:h}=e;if(void 0!==m||void 0!==f){if(!R3(d,m,f))throw new RH("JWE Protected, JWE Unprotected Header, and JWE Per-Recipient Unprotected Header Parameter names must be disjoint");o={...d,...m,...f}}else o=d??{};let[y,g,_,v,b]=t,{encrypted_key:$}=e;qo(RH,qt,_,d,o),q6(o,d);let{alg:S,enc:k}=o;if("string"!=typeof S||!S)throw new RH("missing JWE Algorithm (alg) in JWE Header");let w=qz[S];if(""===$&&(!w||!qG(w)))throw new RH("JWE Encrypted Key incorrect type");let V=w?.mode==="integrated-encryption";if(!V&&("string"!=typeof k||!k))throw new RH("missing JWE Encryption Algorithm (enc) in JWE Header");if(y&&!y.has(S)||!y&&S.startsWith("PBES2"))throw new RF('"alg" (Algorithm) Header Parameter value not allowed');if(V){if(void 0!==k)throw new RH('JWE "enc" (Encryption Algorithm) Header Parameter must not be present for integrated encryption');if(l?.byteLength)throw new RH("JWE Initialization Vector must be empty for integrated encryption");if(p?.byteLength)throw new RH("JWE Authentication Tag must be empty for integrated encryption")}else{if(g&&!g.has(k))throw new RF('"enc" (Encryption Algorithm) Header Parameter value not allowed');n=qB(k)}if(void 0!==$)try{a=R5($,"encrypted_key",RH)}catch(e){if(!w||!qG(w))throw e;a=new Uint8Array}let P=!1;"function"==typeof r&&(r=await r(d,e),P=!0);let R=w??qH(S);qG(R)&&void 0===a&&(a=new Uint8Array);let q=await qs("direct-encryption"===R.mode?n:R,r,"decrypt");if("integrated-encryption"===R.mode)s=await R.decrypt(q,a,c,u,d,o);else{let e,t=n;try{e=await async function(e,t,r,i,o,n){let{alg:a}=e,s=e.mode;if("direct-encryption"===s)return q2(i),r;let d="direct-key-agreement"===s;switch(d?q2(i):function(e){if(void 0===e)throw new RH("JWE Encrypted Key missing")}(i),e.subtle.name){case"ECDH":{let{epk:i}=o;if(!R4(i)||["d","k","p","q","dp","dq","qi","oth","priv"].some(e=>Object.hasOwn(i,e)))throw new RH('JOSE Header "epk" (Ephemeral Public Key) missing or invalid');qY(r);let n=await qk(e,i),s=q1(o,"apu"),c=q1(o,"apv");q0(s,c);let l=await qX(n,r,d?t.alg:a,d?t.cekBits:parseInt(a.slice(-5,-2),10),s,c);if(d)return l;r=l;break}case"RSA-OAEP":return qc(r),qJ(a,r,"decrypt"),new Uint8Array(await crypto.subtle.decrypt("RSA-OAEP",r,i));case"PBKDF2":{if("number"!=typeof o.p2c)throw new RH('JOSE Header "p2c" (PBES2 Count) missing or invalid');if(void 0!==n&&1/0!==n&&(!Number.isSafeInteger(n)||n<1))throw TypeError("maxPBES2Count must be a positive safe integer or Infinity");if(o.p2c>(n??1e4))throw new RH('JOSE Header "p2c" (PBES2 Count) out is of acceptable bounds');if("string"!=typeof o.p2s)throw new RH('JOSE Header "p2s" (PBES2 Salt) missing or invalid');let e=R5(o.p2s,"p2s",RH);r=await qZ(e,a,o.p2c,r);break}case"AES-GCM":{if("string"!=typeof o.iv)throw new RH('JOSE Header "iv" (Initialization Vector) missing or invalid');if("string"!=typeof o.tag)throw new RH('JOSE Header "tag" (Authentication Tag) missing or invalid');let e=R5(o.iv,"iv",RH),t=R5(o.tag,"tag",RH);if(12!==e.byteLength)throw new RH("Invalid Initialization Vector length");if(16!==t.byteLength)throw new RH("Invalid Authentication Tag length");return qj(qB(a.slice(0,-2)),r,i,e,t,new Uint8Array)}}return async function(e,t,r){let i=await qw(t,qH(e).subtle,"unwrapKey",!0),o=await crypto.subtle.unwrapKey("raw",r,i,"AES-KW",{hash:"SHA-256",name:"HMAC"},!0,["sign"]);return new Uint8Array(await crypto.subtle.exportKey("raw",o))}(a.slice(-6),r,i)}(R,t,q,a,o,v),qG(R)&&e instanceof Uint8Array&&e.byteLength<<3!==t.cekBits&&(e=qV(t))}catch(r){if(r instanceof TypeError||r instanceof RH||r instanceof RL)throw r;e=qV(t)}s=await qj(t,e,c,l,p,u)}if("DEF"===o.zip){let e=b??25e4;if(0===e)throw new RL('JWE "zip" (Compression Algorithm) Header Parameter is not supported.');if(1/0!==e&&(!Number.isSafeInteger(e)||e<1))throw TypeError("maxDecompressedLength must be 0, a positive safe integer, or Infinity");s=await (async function(e,t){return q3("DecompressionStream"),q9(new DecompressionStream("deflate-raw"),e,t)})(s,e).catch(e=>{throw e instanceof RH?e:new RH("Failed to decompress plaintext",{cause:e})})}return{plaintext:s,...d&&{protectedHeader:d},...void 0!==h&&{additionalAuthenticatedData:R5(h,"aad",RH)},...f&&{sharedUnprotectedHeader:f},...m&&{unprotectedHeader:m},...P&&{key:q}}}async function Ii(e,t,r){if(e instanceof Uint8Array&&(e=Rq.decode(e)),"string"!=typeof e)throw new RH("Compact JWE must be a string or Uint8Array");let{0:i,1:o,2:n,3:a,4:s,length:d}=e.split(".");if(5!==d)throw new RH("Invalid Compact JWE");return Ir({ciphertext:a,iv:n||void 0,protected:i,tag:s||void 0,encrypted_key:o||void 0},t,r)}async function Io(e,t,r){return Ii(e,It(r),t)}async function In(e,t,r){if(!R4(e))throw new RH("Flattened JWE must be an object");let i=q5(e),[o,,n]=q8(e);if(!o)throw n;let a={...i,...o};return q7(a),Ir(a,It(r),t)}async function Ia(e,t,r){let i,o,n;if(!R4(e))throw new RH("General JWE must be an object");let a=e.recipients;if(!Array.isArray(a))throw new RH("JWE Recipients missing or incorrect type");let s=Array.from(a);if(!s.every(R4))throw new RH("JWE Recipients missing or incorrect type");if(!s.length)throw new RH("JWE Recipients has no members");try{i=It(r),o=q5(e),n=Ie(o)}catch{throw new RU}let d=s.map(e=>q8(e));if(s.length>1)for(let[,e]of d){let t=n[0]?.alg??e??o.unprotected?.alg,r="string"==typeof t?qz[t]:void 0;if(r&&!qG(r))throw new RH(`"${t}" alg may only have a single recipient`)}for(let[e]of d)if(e)try{let r={...o,...e};return q7(r),await Ir(r,i,t,n)}catch{}throw new RU}function Is(e,t,r){if(!R3(e,t,r))throw new RH("JWE Protected, JWE Shared Unprotected and JWE Per-Recipient Header Parameter names must be disjoint")}function Id(e,t,r=!1){if(!e[1]&&!e[2]&&!e[3])throw new RH("either setProtectedHeader, setUnprotectedHeader, or sharedUnprotectedHeader must be called before #encrypt()");void 0!==t&&(e[8]=t?.crit);let[,i,o,n,a,s,d,c,l]=e;if(void 0!==a&&R2(a,"JWE Additional Authenticated Data"),void 0!==s&&R2(s,"JWE Content Encryption Key"),void 0!==d&&R2(d,"JWE Initialization Vector"),r||void 0===i||(i=qa(RH,i)[0],e[1]=i),void 0!==o&&(o=qa(RH,o)[0],e[2]=o),r||void 0===n||(n=qa(RH,n)[0],e[3]=n),void 0!==c&&!R4(c))throw TypeError("JWE Key Management Parameters must be an object");Is(i,o,n);let p={...i,...o,...n};qi(RH,i),qo(RH,qt,l,i,p),q6(p,i);let{alg:u,enc:m}=p;if("string"!=typeof u||!u)throw new RH('JWE "alg" (Algorithm) Header Parameter missing or invalid');let f=qz[u];if(f?.mode==="integrated-encryption"){if(void 0!==m)throw new RH('JWE "enc" (Encryption Algorithm) Header Parameter must not be present for integrated encryption');if(void 0!==s)throw TypeError(`setContentEncryptionKey cannot be called with JWE "alg" (Algorithm) Header ${u}`);if(void 0!==d)throw TypeError(`setInitializationVector cannot be called with JWE "alg" (Algorithm) Header ${u}`);return[p,void 0,f]}if("string"!=typeof m||!m)throw new RH('JWE "enc" (Encryption Algorithm) Header Parameter missing or invalid');return[p,qB(m),f]}async function Ic(e,t,r){let i,o,n,a,s,d,[c,l,p]=t,[u,m,f,h,y,g,_,v,,b]=e,$=m,S=f,k=p??qH(c.alg);"integrated-encryption"===k.mode?n=await qs(k,r,"encrypt"):[n,i,o]=await q4(k,l,r,c,g,v),o&&(b?S=S?{...S,...o}:o:$=$?{...$,...o}:o,Is($,S,h));let w=$?R0(JSON.stringify($)):"",V=y?.byteLength?R0(y):void 0,P=RE(V?`${w}.${V}`:w),R=u;"DEF"===c.zip&&(R=await (async function(e){return q3("CompressionStream"),q9(new CompressionStream("deflate-raw"),e)})(R).catch(e=>{throw new RH("Failed to compress plaintext",{cause:e})})),"integrated-encryption"===k.mode?[i,a]=await k.encrypt(n,R,P,$,c,v):{ciphertext:a,tag:s,iv:d}=await qx(l,R,n,_,P);let q={ciphertext:R0(a)};return d&&(q.iv=R0(d)),s&&(q.tag=R0(s)),i?.byteLength&&(q.encrypted_key=R0(i)),V&&(q.aad=V),$&&(q.protected=w),h&&(q.unprotected=h),S&&(q.header=S),q}async function Il(e,t,r){return Ic(e,Id(e,r),t)}function Ip(e){return[e.protected,e.encrypted_key,e.iv,e.ciphertext,e.tag].join(".")}class Iu{#n;state;constructor(e,t,r){this.#n=e,this.state=[void 0,void 0,t,r]}setUnprotectedHeader(e){return R9(this.state[0],"setUnprotectedHeader"),this.state[0]=e,this}setKeyManagementParameters(e){return R9(this.state[1],"setKeyManagementParameters"),this.state[1]=e,this}addRecipient(...e){return this.#n.addRecipient(...e)}encrypt(...e){return this.#n.encrypt(...e)}done(){return this.#n}}class Im{#a;#s=[];#d;#c;#l;constructor(e){this.#a=e}addRecipient(e,t){let r=new Iu(this,e,t?.crit);return this.#s.push(r),r}setProtectedHeader(e){return R9(this.#d,"setProtectedHeader"),this.#d=e,this}setSharedUnprotectedHeader(e){return R9(this.#c,"setSharedUnprotectedHeader"),this.#c=e,this}setAdditionalAuthenticatedData(e){return this.#l=e,this}async encrypt(){if(!this.#s.length)throw new RH("at least one recipient must be added");R2(this.#a,"plaintext");let e=this.#s.length>1,t,r=this.#d,i=this.#c,o=[];for(let n of this.#s){let[a,s,d,c]=n.state,l=[this.#a,r,a,i,this.#l,void 0,void 0,s,c,e],p=Id(l,void 0,o.length>0);o.length||(r=l[1],i=l[3]),o.push([l,p,d]);let[{alg:u,enc:m},,f]=p;if(e&&f&&!qG(f))throw new RH(`"${u}" alg may only have a single recipient`);if(t){if(t!==m)throw new RH('JWE "enc" (Encryption Algorithm) Header Parameter must be the same for all recipients')}else t=m}for(let[,e]of o)e[2]??=qH(e[0].alg);let[n,a,s]=o[0],d=e?qV(a[1]):void 0;n[5]=d;let{encrypted_key:c,header:l,...p}=await Ic(n,a,s),u={...p,recipients:[{}]};c&&(u.recipients[0].encrypted_key=c),l&&(u.recipients[0].header=l);for(let e=1;e(function(e,t){try{let r=IS(e,[t]),i=Iw(r.protected),{b64:o,crit:n}=i;return[r,i,Array.isArray(n)&&n.includes("b64")?"boolean"==typeof o?o?1:2:0:1]}catch{return}})(e,s)).filter(e=>void 0!==e),c=0;for(let[,,e]of d)if(3==(c|=e))throw new RG("inconsistent use of JWS Unencoded Payload (RFC7797)");for(let e of d)try{let[r]=await IR(e[0],i,t,IV,e[1]);return r}catch{}throw new RY}let IC=e=>Math.floor(e.getTime()/1e3),IT={s:1,m:60,h:3600,d:86400,w:604800,y:0x1e187e0},IO=/^(\+|\-)? ?(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)(?: (ago|from now))?$/i,IE="check_failed";function IA(){throw TypeError("Invalid time period format")}function IW(e){"string"!=typeof e&&IA();let t=IO.exec(e);(!t||t[4]&&t[1])&&IA();let r=Math.round(parseFloat(t[2])*IT[t[3][0].toLowerCase()]);return Number.isFinite(r)||IA(),"-"===t[1]||"ago"===t[4]?-r:r}function IM(e,t){if(!Number.isFinite(t))throw TypeError(`Invalid ${e} input`);return t}function IN(e,t){if("string"!=typeof t)throw TypeError(`"${e}" claim must be a string`)}function Iz(e,t){return"number"==typeof e?IM(t,e):e instanceof Date?IM(t,IC(e)):IC(new Date)+IW(e)}let ID=e=>{let t=e.toLowerCase();return e.includes("/")?t:`application/${t}`};function IF(e,t,r=!1){let i=e[t];if(!(void 0===i&&!r)){if("number"!=typeof i)throw new Rz(`"${t}" claim must be a number`,e,t,"invalid");return i}}function IL(e,t){throw new Rz(`unexpected "${t}" claim value`,e,t,IE)}function IU(e,t,r={}){let i,o,n;try{i=JSON.parse(RI.decode(t))}catch{}if(!R4(i))throw new RB("JWT Claims Set must be a top-level JSON object");let{typ:a}=r;if(void 0!==a&&("string"!=typeof e.typ||ID(e.typ)!==ID(a)))throw new Rz('unexpected "typ" JWT header value',i,"typ",IE);let{requiredClaims:s=[],issuer:d,subject:c,audience:l,maxTokenAge:p}=r,u=[...s];for(let e of(void 0!==p&&u.push("iat"),void 0!==l&&u.push("aud"),void 0!==c&&u.push("sub"),void 0!==d&&u.push("iss"),new Set(u.reverse())))if(!Object.hasOwn(i,e))throw new Rz(`missing required "${e}" claim`,i,e,"missing");void 0===d||(Array.isArray(d)?d:[d]).includes(i.iss)||IL(i,"iss"),void 0!==c&&i.sub!==c&&IL(i,"sub"),void 0===l||(o=i.aud,n="string"==typeof l?[l]:l,"string"==typeof o?n.includes(o):!!Array.isArray(o)&&n.some(e=>o.includes(e)))||IL(i,"aud");let{clockTolerance:m}=r,f=0;if("string"==typeof m)f=IW(m);else if(void 0!==m){if("number"!=typeof m)throw TypeError("Invalid clockTolerance option type");f=m}IM("clockTolerance option",f);let{currentDate:h}=r,y=IM("currentDate option",IC(void 0===h?new Date:h)),g=IF(i,"iat",void 0!==p),_=IF(i,"nbf");if(void 0!==_&&_>y+f)throw new Rz('"nbf" claim timestamp check failed',i,"nbf",IE);let v=IF(i,"exp");if(void 0!==v&&v<=y-f)throw new RD('"exp" claim timestamp check failed',i,"exp",IE);if(void 0!==p){let e=y-g;if(e-f>IM("maxTokenAge option","number"==typeof p?p:IW(p)))throw new RD('"iat" claim timestamp check failed (too far in the past)',i,"iat",IE);if(e<-f)throw new Rz('"iat" claim timestamp check failed (it should be in the past)',i,"iat",IE)}return i}function IH(e){return f.get(e)}function IG(e){let t=IH(e);for(let e of["iat","nbf","exp"]){let r=t[e];if("number"==typeof r&&!Number.isFinite(r))throw TypeError(`"${e}" claim must be a finite number`)}return RR.encode(JSON.stringify(t))}class IB{constructor(e={}){if(!R4(e))throw TypeError("JWT Claims Set MUST be an object");(f||=new WeakMap).set(this,structuredClone(e))}setIssuer(e){return IN("iss",e),IH(this).iss=e,this}setSubject(e){return IN("sub",e),IH(this).sub=e,this}setAudience(e){return function(e){if("string"!=typeof e&&(!Array.isArray(e)||Array.from(e).some(e=>"string"!=typeof e)))throw TypeError('"aud" claim must be a string or an array of strings')}(e),IH(this).aud=e,this}setJti(e){return IN("jti",e),IH(this).jti=e,this}setNotBefore(e){return IH(this).nbf=Iz(e,"setNotBefore"),this}setExpirationTime(e){return IH(this).exp=Iz(e,"setExpirationTime"),this}setIssuedAt(e){let t=IH(this);return void 0===e?t.iat=IC(new Date):"string"==typeof e?t.iat=IM("setIssuedAt",IC(new Date)+IW(e)):t.iat=Iz(e,"setIssuedAt"),this}}async function IK(e,t,r){let[i,o]=await Iq(e,Ik(r),t);if(!o)throw new RB("JWTs MUST NOT use unencoded payload");let n=IU(i.protectedHeader,i.payload,r);return{...i,payload:n}}async function IJ(e,t,r){let{plaintext:i,...o}=await Ii(e,It(r),t),{protectedHeader:n}=o,a=IU(n,i,r);for(let e of["iss","sub","aud"])if(void 0!==n[e]&&("aud"===e?JSON.stringify(n.aud)!==JSON.stringify(a.aud):n[e]!==a[e]))throw new Rz(`replicated "${e}" claim header parameter mismatch`,a,e,"mismatch");return{payload:a,...o}}class IZ{#p;constructor(e){R2(e,"plaintext"),this.#p=[e]}setContentEncryptionKey(e){return R9(this.#p[5],"setContentEncryptionKey"),this.#p[5]=e,this}setInitializationVector(e){return R9(this.#p[6],"setInitializationVector"),this.#p[6]=e,this}setProtectedHeader(e){return R9(this.#p[1],"setProtectedHeader"),this.#p[1]=e,this}setKeyManagementParameters(e){return R9(this.#p[7],"setKeyManagementParameters"),this.#p[7]=e,this}async encrypt(e,t){return Ip(await Il([...this.#p],e,t))}}class IQ{#p;constructor(e){R2(e,"plaintext"),this.#p=[e]}setKeyManagementParameters(e){return R9(this.#p[7],"setKeyManagementParameters"),this.#p[7]=e,this}setProtectedHeader(e){return R9(this.#p[1],"setProtectedHeader"),this.#p[1]=e,this}setSharedUnprotectedHeader(e){return R9(this.#p[3],"setSharedUnprotectedHeader"),this.#p[3]=e,this}setUnprotectedHeader(e){return R9(this.#p[2],"setUnprotectedHeader"),this.#p[2]=e,this}setAdditionalAuthenticatedData(e){return this.#p[4]=e,this}setContentEncryptionKey(e){return R9(this.#p[5],"setContentEncryptionKey"),this.#p[5]=e,this}setInitializationVector(e){return R9(this.#p[6],"setInitializationVector"),this.#p[6]=e,this}async encrypt(e,t){return Il([...this.#p],e,t)}}async function IX(e,t,r){let[i,o,n,a]=e,s="";if(void 0!==o){let e=qa(RG,o);o=e[0],s=R0(e[1])}if(void 0!==n&&(n=qa(RG,n)[0]),!o&&!n)throw new RG("either setProtectedHeader or setUnprotectedHeader must be called before #sign()");if(!R3(o,n))throw new RG("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");let d={...o,...n};qi(RG,o);let c=qn(o,qo(RG,qe,a,o,d));c||r?.();let{alg:l}=d;if("string"!=typeof l||!l)throw new RG('JWS "alg" (Algorithm) Header Parameter missing or invalid');let p=I$(l),u="",m=i,f;if(c){let t=e[4];t?(u=t[0]??=R0(i),m=t[1]??=RE(u)):(u=R0(i),f=RR.encode(`${s}.${u}`))}f??=Rx(RE(s),RE("."),m);let h=await qw(await qs(p,t,"sign"),p.subtle,"sign");p.minRsaBits&&q_(p.alg,h);let y={signature:R0(new Uint8Array(await crypto.subtle.sign(p.signing,h,f))),payload:u};return o&&(y.protected=s),n&&(y.header=n),[y,c]}async function IY(e,t,r,i,o){let[n]=await IX([e,t,void 0,r],i,o);return`${n.protected}.${n.payload}.${n.signature}`}class I1{#u;#d;constructor(e){R2(e,"payload"),this.#u=e}setProtectedHeader(e){return R9(this.#d,"setProtectedHeader"),this.#d=e,this}async sign(e,t){return IY(this.#u,this.#d,t?.crit,e,()=>{throw TypeError("use the flattened module for creating JWS with b64: false")})}}class I0{#p;constructor(e){R2(e,"payload"),this.#p=[e]}setProtectedHeader(e){return R9(this.#p[1],"setProtectedHeader"),this.#p[1]=e,this}setUnprotectedHeader(e){return R9(this.#p[2],"setUnprotectedHeader"),this.#p[2]=e,this}async sign(e,t){let r=[...this.#p];r[3]=t?.crit;let[i]=await IX(r,e);return i}}class I2{#n;state;constructor(e,t,r){this.#n=e,this.state=[void 0,void 0,t,r?.crit]}setProtectedHeader(e){return R9(this.state[0],"setProtectedHeader"),this.state[0]=e,this}setUnprotectedHeader(e){return R9(this.state[1],"setUnprotectedHeader"),this.state[1]=e,this}addSignature(...e){return this.#n.addSignature(...e)}sign(...e){return this.#n.sign(...e)}done(){return this.#n}}class I4{#u;#m=[];constructor(e){this.#u=e}addSignature(e,t){let r=new I2(this,e,t);return this.#m.push(r),r}async sign(){let e;if(!this.#m.length)throw new RG("at least one signature must be added");R2(this.#u,"payload");let t={signatures:[],payload:""},r=[];for(let i of this.#m){let[o,n,a,s]=i.state,[{payload:d,...c},l]=await IX([this.#u,o,n,s,r],a);if(void 0===e)e=l,t.payload=d;else if(e!==l)throw new RG("inconsistent use of JWS Unencoded Payload (RFC7797)");t.signatures.push(c)}return t}}let I6=IB;class I3 extends I6{#d;setProtectedHeader(e){return R9(this.#d,"setProtectedHeader"),this.#d=e,this}async sign(e,t){return IY(IG(this),this.#d,t?.crit,e,()=>{throw new RB("JWTs MUST NOT use unencoded payload")})}}let I9=IB;class I5 extends I9{#p=[void 0];#f;#h;#y;setProtectedHeader(e){return R9(this.#p[1],"setProtectedHeader"),this.#p[1]=e,this}setKeyManagementParameters(e){return R9(this.#p[7],"setKeyManagementParameters"),this.#p[7]=e,this}setContentEncryptionKey(e){return R9(this.#p[5],"setContentEncryptionKey"),this.#p[5]=e,this}setInitializationVector(e){return R9(this.#p[6],"setInitializationVector"),this.#p[6]=e,this}replicateIssuerAsHeader(){return this.#f=!0,this}replicateSubjectAsHeader(){return this.#h=!0,this}replicateAudienceAsHeader(){return this.#y=!0,this}async encrypt(e,t){let r=IG(this);this.#p[1]&&(this.#f||this.#h||this.#y)&&(this.#p[1]={...this.#p[1],iss:this.#f?IH(this).iss:void 0,sub:this.#h?IH(this).sub:void 0,aud:this.#y?IH(this).aud:void 0});let i=[...this.#p];return i[0]=r,Ip(await Il(i,e,t))}}let I8='"alg" (Algorithm)';function I7(e='JWK "alg" (Algorithm) Parameter'){throw new RL(`Invalid or unsupported ${e} value`)}function xe(e,t){return("string"==typeof e?Ib[e]??qz[e]:void 0)??I7(t)}let xt=async(e,t,r)=>{var i,o;let n;if(qp(r)){if(r.type!==e)throw TypeError(`key is not a ${e} key`);return r.export({format:"pem",type:t})}if(!ql(r))throw TypeError(qf(r,"CryptoKey","KeyObject"));if(!r.extractable)throw TypeError("CryptoKey is not extractable");if(r.type!==e)throw TypeError(`key is not a ${e} key`);return i=RA(new Uint8Array(await crypto.subtle.exportKey(t,r))),o=`${e.toUpperCase()} KEY`,n=(i.match(/.{1,64}/g)||[]).join(` +`,e.enqueue(t.encode(o)),!0}catch(e){return this.onerror?.(e),!1}}handleUnsupportedRequest(){return this.onerror?.(Error("Method not allowed.")),Response.json({jsonrpc:"2.0",error:{code:-32e3,message:"Method not allowed."},id:null},{status:405,headers:{Allow:"GET, POST, DELETE","Content-Type":"application/json"}})}async handlePostRequest(e,t){try{var r,i;let o,n,a,s,d,c=e.headers.get("accept");if(!c?.includes("application/json")||!c.includes("text/event-stream"))return this.onerror?.(Error("Not Acceptable: Client must accept both application/json and text/event-stream")),this.createJsonErrorResponse(406,-32e3,"Not Acceptable: Client must accept both application/json and text/event-stream");if(r=e.headers.get("content-type"),"application/json"!==r&&"application/json"!==function(e){if(e)try{return lH.parse(e).type}catch{let t=(e.split(";",1)[0]??"").trim().toLowerCase();if(""===t||e.slice(t.length).includes(","))return;return t}}(r))return this.onerror?.(Error("Unsupported Media Type: Content-Type must be application/json")),this.createJsonErrorResponse(415,-32e3,"Unsupported Media Type: Content-Type must be application/json");if(t?.parsedBody===void 0)try{let t=await async function(e,t=4194304){if(Number(e.headers.get("content-length"))>t)return{tooLarge:!0};if(null===e.body)return{tooLarge:!1,text:""};let r=e.body.getReader(),i=new TextDecoder,o=0,n="";try{for(;;){let{done:e,value:a}=await r.read();if(e)break;if((o+=a.byteLength)>t)return{tooLarge:!0};n+=i.decode(a,{stream:!0})}}finally{r.releaseLock()}return{tooLarge:!1,text:n+i.decode()}}(e,this._maxRequestBodySize);if(t.tooLarge){let e=(i=this._maxRequestBodySize,`Payload Too Large: Request body must not exceed ${i} bytes`);return this.onerror?.(Error(e)),this.createJsonErrorResponse(413,-32e3,e)}o=JSON.parse(t.text)}catch(e){return this.onerror?.(e),this.createJsonErrorResponse(400,-32700,"Parse error: Invalid JSON")}else o=t.parsedBody;if(Array.isArray(o)&&o.length>100)return this.onerror?.(Error("Invalid Request: Batch must not exceed 100 messages")),this.createJsonErrorResponse(400,-32600,"Invalid Request: Batch must not exceed 100 messages");try{n=Array.isArray(o)?o.map(e=>aM.parse(e)):[aM.parse(o)]}catch(e){return this.onerror?.(e),this.createJsonErrorResponse(400,-32700,"Parse error: Invalid JSON-RPC message")}if(this._closed)return this.createJsonErrorResponse(404,-32001,"Session not found");let l=n.some(e=>aX.safeParse(e).success);if(l){if(this._initialized&&void 0!==this.sessionId)return this.onerror?.(Error("Invalid Request: Server already initialized")),this.createJsonErrorResponse(400,-32600,"Invalid Request: Server already initialized");if(n.length>1)return this.onerror?.(Error("Invalid Request: Only one initialization request is allowed")),this.createJsonErrorResponse(400,-32600,"Invalid Request: Only one initialization request is allowed");this.sessionId=this.sessionIdGenerator?.(),this._initialized=!0,this.sessionId&&this._onsessioninitialized&&await Promise.resolve(this._onsessioninitialized(this.sessionId))}if(!l){let t=this.validateSession(e);if(t)return t;let r=this.validateProtocolVersion(e);if(r)return r}if(this._closed)return this.createJsonErrorResponse(404,-32001,"Session not found");try{a=await this._checkScopeChallenge(n,t?.authInfo)}catch(e){return this.onerror?.(e),this.createJsonErrorResponse(500,-32603,"Internal server error")}if(a)return a;if(!n.some(e=>ll(e))){for(let r of n)this.onmessage?.(r,{authInfo:t?.authInfo,request:e});return new Response(null,{status:202})}let p=crypto.randomUUID(),u=n.find(e=>aX.safeParse(e).success),m=u?u.params.protocolVersion:e.headers.get("mcp-protocol-version")??"2025-03-26";if(this._enableJsonResponse)return new Promise(r=>{for(let e of(this._streamMapping.set(p,{resolveJson:r,cleanup:()=>{this._streamMapping.delete(p)}}),n))ll(e)&&this._requestToStreamMapping.set(e.id,p);for(let r of n)this.onmessage?.(r,{authInfo:t?.authInfo,request:e})});let f=new TextEncoder,h=new ReadableStream({start:e=>{s=e},cancel:()=>{void 0!==d&&clearInterval(d),this._streamMapping.get(p)?.controller===s&&this._streamMapping.delete(p)}}),y={"Content-Type":"text/event-stream","Cache-Control":"no-cache, no-transform",Connection:"keep-alive","X-Accel-Buffering":"no"};for(let e of(void 0!==this.sessionId&&(y["mcp-session-id"]=this.sessionId),n))ll(e)&&(this._streamMapping.set(p,{controller:s,encoder:f,cleanup:()=>{void 0!==d&&clearInterval(d),this._streamMapping.delete(p);try{s.close()}catch{}}}),this._requestToStreamMapping.set(e.id,p));for(let r of(await this.writePrimingEvent(s,f,p,m),n)){let i,o;ll(r)&&this._eventStore&&this.supportsEmptySSEData(m)&&(i=()=>{this.closeSSEStream(r.id)},o=()=>{this.closeStandaloneSSEStream()}),this.onmessage?.(r,{authInfo:t?.authInfo,request:e,closeSSEStream:i,closeStandaloneSSEStream:o})}return this._streamMapping.get(p)?.controller===s&&(d=this.startKeepAlive(s,f)),new Response(h,{status:200,headers:y})}catch(e){return this.onerror?.(e),this.createJsonErrorResponse(400,-32700,"Parse error",{data:String(e)})}}async handleDeleteRequest(e){let t=this.validateSession(e);if(t)return t;let r=this.validateProtocolVersion(e);if(r)return r;try{return await Promise.resolve(this._onsessionclosed?.(this.sessionId)),new Response(null,{status:200})}finally{await this.close()}}validateSession(e){if(void 0===this.sessionIdGenerator)return;if(!this._initialized)return this.onerror?.(Error("Bad Request: Server not initialized")),this.createJsonErrorResponse(400,-32e3,"Bad Request: Server not initialized");let t=e.headers.get("mcp-session-id");return t?t!==this.sessionId?(this.onerror?.(Error("Session not found")),this.createJsonErrorResponse(404,-32001,"Session not found")):void 0:(this.onerror?.(Error("Bad Request: Mcp-Session-Id header is required")),this.createJsonErrorResponse(400,-32e3,"Bad Request: Mcp-Session-Id header is required"))}validateProtocolVersion(e){let t=e.headers.get("mcp-protocol-version");if(null!==t&&!this._supportedProtocolVersions.includes(t)){let e=`Bad Request: Unsupported protocol version: ${t} (supported versions: ${this._supportedProtocolVersions.join(", ")})`;return this.onerror?.(Error(e)),this.createJsonErrorResponse(400,-32e3,e)}}async close(){if(!this._closed){for(let{cleanup:e}of(this._closed=!0,this._streamMapping.values()))e();this._streamMapping.clear(),this._requestResponseMap.clear(),this.onclose?.()}}closeSSEStream(e){let t=this._requestToStreamMapping.get(e);if(!t)return;let r=this._streamMapping.get(t);r&&r.cleanup()}closeStandaloneSSEStream(){let e=this._streamMapping.get(this._standaloneSseStreamId);e&&e.cleanup()}async send(e,t){let r=t?.relatedRequestId;if((aE.safeParse(e).success||aA.safeParse(e).success)&&(r=e.id),void 0===r){let t;if(aE.safeParse(e).success||aA.safeParse(e).success)throw Error("Cannot send a response on a standalone SSE stream unless resuming a previous client request");this._eventStore&&(t=await this._eventStore.storeEvent(this._standaloneSseStreamId,e));let r=this._streamMapping.get(this._standaloneSseStreamId);if(void 0===r)return;r.controller&&r.encoder&&(void 0===t||!r.replayedEventIds?.has(t))&&this.writeSSEEvent(r.controller,r.encoder,e,t);return}let i=this._requestToStreamMapping.get(r);if(!i)throw Error(`No connection established for request ID: ${String(r)}`);let o=this._streamMapping.get(i);if(!this._enableJsonResponse){let t;this._eventStore&&(t=await this._eventStore.storeEvent(i,e),o=this._streamMapping.get(i)),o?.controller&&o?.encoder&&(void 0===t||!o.replayedEventIds?.has(t))&&this.writeSSEEvent(o.controller,o.encoder,e,t)}if(aE.safeParse(e).success||aA.safeParse(e).success){this._requestResponseMap.set(r,e);let t=[...this._requestToStreamMapping.entries()].filter(([e,t])=>t===i).map(([e])=>e);if(t.every(e=>this._requestResponseMap.has(e))){if(!o){if(this._enableJsonResponse)throw Error(`No connection established for request ID: ${String(r)}`);if(!this._eventStore){for(let e of(this.onerror?.(Error(`Response for request ID ${String(r)} is undeliverable: per-request stream is disconnected and no eventStore is configured`)),t))this._requestResponseMap.delete(e),this._requestToStreamMapping.delete(e);return}for(let e of t)this._requestResponseMap.delete(e),this._requestToStreamMapping.delete(e);return}if(this._enableJsonResponse&&o.resolveJson){let e={"Content-Type":"application/json"};void 0!==this.sessionId&&(e["mcp-session-id"]=this.sessionId);let r=t.map(e=>this._requestResponseMap.get(e));1===r.length?o.resolveJson(Response.json(r[0],{status:200,headers:e})):o.resolveJson(Response.json(r,{status:200,headers:e})),o.cleanup()}else o.cleanup();for(let e of t)this._requestResponseMap.delete(e),this._requestToStreamMapping.delete(e)}}}};let u1=Symbol("swallowsErrorsAfterClose");var u0=class{_readBuffer;_started=!1;_closed=!1;constructor(e=W.stdin,t=W.stdout,r){this._stdin=e,this._stdout=t,this._readBuffer=new lG({maxBufferSize:r?.maxBufferSize})}onclose;onerror;onmessage;_ondata=e=>{try{this._readBuffer.append(e),this.processReadBuffer()}catch(e){this.onerror?.(e),this.close().catch(()=>{})}};_onerror=e=>{this.onerror?.(e)};_onstdouterror=e=>{this._closed||(this.onerror?.(e),this.close().catch(()=>{}))};_onstdinclose=()=>{this.close().catch(()=>{})};async start(){if(this._started)throw Error("StdioServerTransport already started! If using Server class, note that connect() calls start() automatically.");for(let e of(this._started=!0,this._stdout.listeners("error")))e[u1]&&this._stdout.off("error",e);(this._stdin.readableEnded||this._stdin.destroyed)&&setImmediate(this._onstdinclose),this._stdin.on("data",this._ondata),this._stdin.on("error",this._onerror),this._stdin.on("end",this._onstdinclose),this._stdin.on("close",this._onstdinclose),this._stdout.on("error",this._onstdouterror)}processReadBuffer(){for(;;)try{let e=this._readBuffer.readMessage();if(null===e)break;this.onmessage?.(e)}catch(e){this.onerror?.(e)}}async close(){this._closed||(this._closed=!0,this._stdin.off("data",this._ondata),this._stdin.off("error",this._onerror),this._stdin.off("end",this._onstdinclose),this._stdin.off("close",this._onstdinclose),this._onstdouterror[u1]=!0,0===this._stdin.listenerCount("data")&&this._stdin.pause(),this._readBuffer.clear(),this.onclose?.())}send(e){return this._closed?Promise.reject(Error("StdioServerTransport is closed")):new Promise((t,r)=>{let i=JSON.stringify(e)+"\n",o=!1,n=e=>{o||(o=!0,this._stdout.off("error",n),this._stdout.off("drain",a),r(e))},a=()=>{o||(o=!0,this._stdout.off("error",n),this._stdout.off("drain",a),t())};if(this._stdout.once("error",n),this._stdout.write(i)){if(o)return;o=!0,this._stdout.off("error",n),t()}else o||this._stdout.once("drain",a)})}},u2=class extends Error{constructor(e,t){super(e,t),this.name="RequestError"}},u4=global.Request,u6=class extends u4{constructor(e,t){"object"==typeof e&&u9 in e&&(e=e[u9]()),void 0!==t?.body?.getReader&&(t.duplex??="half"),super(e,t)}},u3=Symbol("wrapBodyStream"),u9=Symbol("getRequestCache"),u5=Symbol("requestCache"),u8=Symbol("incomingKey"),u7=Symbol("urlKey"),me=Symbol("headersKey"),mt=Symbol("abortControllerKey"),mr=Symbol("getAbortController"),mi={get method(){return this[u8].method||"GET"},get url(){return this[u7]},get headers(){return this[me]||=(e=>{let t=[],r=e.rawHeaders;for(let e=0;e{let n={method:e,headers:r,signal:o.signal};if("TRACE"===e){n.method="GET";let e=new u6(t,n);return Object.defineProperty(e,"method",{get:()=>"TRACE"}),e}if("GET"!==e&&"HEAD"!==e)if("rawBody"in i&&i.rawBody instanceof Buffer)n.body=new ReadableStream({start(e){e.enqueue(i.rawBody),e.close()}});else if(i[u3]){let e;n.body=new ReadableStream({async pull(t){try{e||=D.toWeb(i).getReader();let{done:r,value:o}=await e.read();r?t.close():t.enqueue(o)}catch(e){t.error(e)}}})}else n.body=D.toWeb(i);return new u6(t,n)})(this.method,this[u7],this.headers,this[u8],this[mt])}};["body","bodyUsed","cache","credentials","destination","integrity","mode","redirect","referrer","referrerPolicy","signal","keepalive"].forEach(e=>{Object.defineProperty(mi,e,{get(){return this[u9]()[e]}})}),["arrayBuffer","blob","clone","formData","json","text"].forEach(e=>{Object.defineProperty(mi,e,{value:function(){return this[u9]()[e]()}})}),Object.defineProperty(mi,Symbol.for("nodejs.util.inspect.custom"),{value:function(e,t,r){let i={method:this.method,url:this.url,headers:this.headers,nativeRequest:this[u5]};return`Request (lightweight) ${r(i,{...t,depth:null==e?null:e-1})}`}}),Object.setPrototypeOf(mi,u6.prototype);var mo=Symbol("responseCache"),mn=Symbol("getResponseCache"),ma=Symbol("cache"),ms=global.Response,md=class e{#e;#t;[mn](){return delete this[ma],this[mo]||=new ms(this.#e,this.#t)}constructor(t,r){let i;if(this.#e=t,r instanceof e){let e=r[mo];if(e){this.#t=e,this[mn]();return}this.#t=r.#t,i=new Headers(r.#t.headers)}else this.#t=r;("string"==typeof t||void 0!==t?.getReader||t instanceof Blob||t instanceof Uint8Array)&&(this[ma]=[r?.status||200,t,i||r?.headers])}get headers(){let e=this[ma];return e?(e[2]instanceof Headers||(e[2]=new Headers(e[2]||{"content-type":"text/plain; charset=UTF-8"})),e[2]):this[mn]().headers}get status(){return this[ma]?.[0]??this[mn]().status}get ok(){let e=this.status;return e>=200&&e<300}};function mc(e,t,r){let i=t=>{e.cancel(t).catch(()=>{})};return t.on("close",i),t.on("error",i),(r??e.read()).then(a,o),e.closed.finally(()=>{t.off("close",i),t.off("error",i)});function o(e){e&&t.destroy(e)}function n(){e.read().then(a,o)}function a({done:r,value:i}){try{if(r)t.end();else{if(t.write(i))return e.read().then(a,o);t.once("drain",n)}}catch(e){o(e)}}}["body","bodyUsed","redirected","statusText","trailers","type","url"].forEach(e=>{Object.defineProperty(md.prototype,e,{get(){return this[mn]()[e]}})}),["arrayBuffer","blob","clone","formData","json","text"].forEach(e=>{Object.defineProperty(md.prototype,e,{value:function(){return this[mn]()[e]()}})}),Object.defineProperty(md.prototype,Symbol.for("nodejs.util.inspect.custom"),{value:function(e,t,r){let i={status:this.status,headers:this.headers,ok:this.ok,nativeResponse:this[mo]};return`Response (lightweight) ${r(i,{...t,depth:null==e?null:e-1})}`}}),Object.setPrototypeOf(md,ms),Object.setPrototypeOf(md.prototype,ms.prototype);var ml=e=>{let t={};e instanceof Headers||(e=new Headers(e??void 0));let r=[];for(let[i,o]of e)"set-cookie"===i?r.push(o):t[i]=o;return r.length>0&&(t["set-cookie"]=r),t["content-type"]??="text/plain; charset=UTF-8",t};void 0===global.crypto&&(global.crypto=F);var mp=Symbol("outgoingEnded"),mu=Symbol("incomingDraining"),mm=e=>{if(e.destroyed||e[mu])return;if(e[mu]=!0,e instanceof N){try{e.stream?.close?.(z.NGHTTP2_NO_ERROR)}catch{}return}let t=0,r=()=>{clearTimeout(o),e.off("data",n),e.off("end",r),e.off("error",r)},i=()=>{r();let t=e.socket;t&&!t.destroyed&&t.destroySoon()},o=setTimeout(i,500);o.unref?.();let n=e=>{(t+=e.length)>0x4000000&&i()};e.on("data",n),e.on("end",r),e.on("error",r),e.resume()},mf=e=>new Response(null,{status:e instanceof Error&&("TimeoutError"===e.name||"TimeoutError"===e.constructor.name)?504:500}),mh=(e,t)=>{let r=e instanceof Error?e:Error("unknown error",{cause:e});"ERR_STREAM_PREMATURE_CLOSE"===r.code?console.info("The user aborted a request."):(console.error(e),t.headersSent||t.writeHead(500,{"Content-Type":"text/plain"}),t.end(`Error: ${r.message}`),t.destroy(r))},my=e=>{"flushHeaders"in e&&e.writable&&e.flushHeaders()},mg=async(e,t)=>{let[r,i,o]=e[ma],n=!1;if(o){if(o instanceof Headers)n=o.has("content-length"),o=ml(o);else if(Array.isArray(o)){let e=new Headers(o);n=e.has("content-length"),o=ml(e)}else for(let e in o)if(14===e.length&&"content-length"===e.toLowerCase()){n=!0;break}}else o={"content-type":"text/plain; charset=UTF-8"};!n&&("string"==typeof i?o["Content-Length"]=Buffer.byteLength(i):i instanceof Uint8Array?o["Content-Length"]=i.byteLength:i instanceof Blob&&(o["Content-Length"]=i.size)),t.writeHead(r,o),"string"==typeof i||i instanceof Uint8Array?t.end(i):i instanceof Blob?t.end(new Uint8Array(await i.arrayBuffer())):(my(t),await (function(e,t){if(e.locked)throw TypeError("ReadableStream is locked.");if(!t.destroyed)return mc(e.getReader(),t)})(i,t)?.catch(e=>mh(e,t))),t[mp]?.()},m_=(e,t={})=>{let r=t.autoCleanupIncoming??!0;return!1!==t.overrideGlobalObjects&&global.Request!==u6&&(Object.defineProperty(global,"Request",{value:u6}),Object.defineProperty(global,"Response",{value:md})),async(i,o)=>{let n,a;try{a=((e,t)=>{let r,i=Object.create(mi);i[u8]=e;let o=e.url||"";if("/"!==o[0]&&(o.startsWith("http://")||o.startsWith("https://"))){if(e instanceof N)throw new u2("Absolute URL for :path is not allowed in HTTP/2");try{let e=new URL(o);i[u7]=e.href}catch(e){throw new u2("Invalid absolute URL",{cause:e})}return i}let n=(e instanceof N?e.authority:e.headers.host)||t;if(!n)throw new u2("Missing host header");if(e instanceof N){if("http"!==(r=e.scheme)&&"https"!==r)throw new u2("Unsupported scheme")}else r=e.socket&&e.socket.encrypted?"https":"http";let a=new URL(`${r}://${n}${o}`);if(a.hostname.length!==n.length&&a.hostname!==n.replace(/:\d+$/,""))throw new u2("Invalid host header");return i[u7]=a.href,i})(i,t.hostname);let s=!r||"GET"===i.method||"HEAD"===i.method;if(s||(i[u3]=!0,i.on("end",()=>{s=!0}),i instanceof N&&(o[mp]=()=>{s||setTimeout(()=>{s||setTimeout(()=>{mm(i)})})}),o.on("finish",()=>{s||mm(i)})),o.on("close",()=>{a[mt]&&(i.errored?a[mt].abort(i.errored.toString()):o.writableFinished||a[mt].abort("Client connection prematurely closed.")),s||setTimeout(()=>{s||setTimeout(()=>{mm(i)})})}),n=e(a,{incoming:i,outgoing:o}),ma in n)return mg(n,o)}catch(e){if(n)return mh(e,o);if(t.errorHandler){if(!(n=await t.errorHandler(a||e instanceof u2?e:new u2(e.message,{cause:e}))))return}else n=a?mf(e):new Response(null,{status:400})}try{return await (async(e,t,r={})=>{if("function"==typeof e.then)if(r.errorHandler)try{e=await e}catch(i){let t=await r.errorHandler(i);if(!t)return;e=t}else e=await e.catch(mf);if(ma in e)return mg(e,t);let i=ml(e.headers);if(e.body){let r,o=e.body.getReader(),n=[],a=!1;if("chunked"!==i["transfer-encoding"]){let e=2;for(let t=0;tPromise.resolve(void 0))])})(r).catch(e=>{console.error(e),a=!0});if(!i){if(1===t){await new Promise(e=>setTimeout(e)),e=3;continue}break}if(r=void 0,i.value&&n.push(i.value),i.done){a=!0;break}}!a||"content-length"in i||(i["content-length"]=n.reduce((e,t)=>e+t.length,0))}t.writeHead(e.status,i),n.forEach(e=>{t.write(e)}),a?t.end():(0===n.length&&my(t),await mc(o,t,r))}else i["x-hono-already-sent"]||(t.writeHead(e.status,i),t.end());t[mp]?.()})(n,o,t)}catch(e){return mh(e,o)}}},mv=class{_webStandardTransport;_requestListener;_requestContext=new WeakMap;constructor(e={}){this._webStandardTransport=new uY(e),this._requestListener=m_(async e=>{let t=this._requestContext.get(e);return this._webStandardTransport.handleRequest(e,{authInfo:t?.authInfo,parsedBody:t?.parsedBody})},{overrideGlobalObjects:!1})}get sessionId(){return this._webStandardTransport.sessionId}set onclose(e){this._webStandardTransport.onclose=e}get onclose(){return this._webStandardTransport.onclose}set onerror(e){this._webStandardTransport.onerror=e}get onerror(){return this._webStandardTransport.onerror}set onmessage(e){this._webStandardTransport.onmessage=e}get onmessage(){return this._webStandardTransport.onmessage}async start(){return this._webStandardTransport.start()}async close(){return this._webStandardTransport.close()}async send(e,t){return this._webStandardTransport.send(e,t)}setSupportedProtocolVersions(e){this._webStandardTransport.setSupportedProtocolVersions(e)}setScopeChallengeResolver(e){this._webStandardTransport.setScopeChallengeResolver(e)}async handleRequest(e,t,r){let i=e.auth;await m_(async e=>this._webStandardTransport.handleRequest(e,{authInfo:i,parsedBody:r}),{overrideGlobalObjects:!1})(e,t)}closeSSEStream(e){this._webStandardTransport.closeSSEStream(e)}closeStandaloneSSEStream(){this._webStandardTransport.closeStandaloneSSEStream()}};function mb(e=process.env){let t=e.TRACEDECAY_DATA_DIR;if(void 0!==t&&t.length>0)return O.resolve(t);let r="win32"===process.platform?e.USERPROFILE:e.HOME,i=void 0!==r&&r.length>0?r:L.homedir();return O.join(i,".tracedecay")}let m$=o7().min(1),mS=nz({pid:nR().int().nonnegative(),process_run_id:o7(),started_at_unix_secs:nR().int(),epoch:nR().int().nonnegative(),version:o7(),endpoint:nE(),http_application_endpoint:m$.nullable().optional(),auth_token:o7().min(1),profile_root:o7().min(1)});function mk(e){let t=e.http_application_endpoint;return null==t?null:`http://${t}`}function mw(e){let t=JSON.stringify(function e(t){return Array.isArray(t)?t.map(e):"object"==typeof t&&null!==t?Object.fromEntries(Object.entries(t).sort(([e],[t])=>et)).map(([t,r])=>[t,e(r)])):t}(e));if(void 0===t)throw TypeError("value is not canonical JSON");return t}function mR(e,t){if("object"!=typeof e||null===e||Array.isArray(e))throw TypeError(`malformed canonical schema: ${t} must be an object`);return e}function mP(e,t){switch(t){case"null":return null===e;case"boolean":return"boolean"==typeof e;case"integer":return"number"==typeof e&&Number.isSafeInteger(e);case"number":return"number"==typeof e&&Number.isFinite(e);case"string":return"string"==typeof e;case"array":return Array.isArray(e);case"object":return"object"==typeof e&&null!==e&&!Array.isArray(e);default:throw TypeError(`unsupported canonical schema type: ${t}`)}}function mV(e,t){if("object"!=typeof e||null===e||Array.isArray(e))throw TypeError(`malformed canonical envelope: ${t} must be an object`);return e}function mq(e,t){if("string"!=typeof e)throw TypeError(`malformed canonical envelope: ${t} must be a string`);return e}function mI(e,t){if("number"!=typeof e||!Number.isFinite(e))throw TypeError(`malformed canonical envelope: ${t} must be a finite number`);return e}function mx(e,t){if(!Array.isArray(e))throw TypeError(`malformed canonical envelope: ${t} must be an array`);return e}function mj(e,t){let r=mI(e,t);if(!Number.isSafeInteger(r))throw TypeError(`malformed canonical envelope: ${t} must be a safe integer`);return r}function mC(e,t){let r=mj(e,t);if(r<0)throw TypeError(`malformed canonical envelope: ${t} must be non-negative`);return r}let mT=new TextEncoder;function mO(e,t,r){let i=mq(e,t);if(0===i.length||i.trim()!==i||mT.encode(i).byteLength>r||/\p{Cc}/u.test(i))throw TypeError(`malformed canonical envelope: ${t} is not a bounded identifier`);return i}function mE(e,t,r,i,o,n,a,s,d){let c=mV(e,"success envelope");if(mq(c.binding_id,"binding_id")!==t)throw TypeError("malformed canonical envelope: binding mismatch");let l=mV(c.contract,"contract");if(mq(l.schema_id,"contract.schema_id")!==r||mI(l.schema_revision,"contract.schema_revision")!==i)throw TypeError("malformed canonical envelope: result contract mismatch");mq(c.request_id,"request_id"),mV(c.scope,"scope");let p=mV(c.outcome,"outcome"),u=mq(p.outcome,"outcome.outcome");return{...c,outcome:{...p,outcome:u,value:function(e,t,r,i,o,n,a){let s=mV(t,"outcome.value");if(!("payload"in s))throw TypeError("malformed canonical envelope: outcome.value.payload is required");if(("durable_effect"!==o||"required"!==n||"effect"!==e)&&("operation"!==o||"not_required"!==n||"evidence"!==e&&"preview"!==e))throw TypeError(`malformed canonical envelope: outcome ${e} is outside the operation receipt contract`);if(!function(e,t,r){let i=mV(e,"outcome.value.execution");if(mI(i.started_at,"execution.started_at"),mI(i.ended_at,"execution.ended_at"),!("effective_deadline"in i)||!("cancellation"in i))throw TypeError("malformed canonical envelope: receipt fields are required");let o=mV(i.budget,"execution.budget");mI(o.units_consumed,"budget.units_consumed"),mI(o.bytes_consumed,"budget.bytes_consumed"),mI(o.elapsed_micros,"budget.elapsed_micros");let n=mq(i.termination,"execution.termination");if(!t.includes(n))throw TypeError(`malformed canonical envelope: termination ${n} is not legal for this operation`);if(null!==i.cancellation){let e=mV(r,"operation.cancellation");if("not_cancellable"===mq(e.mode,"operation.cancellation.mode"))throw TypeError("malformed canonical envelope: non-cancellable operation returned cancellation evidence");let t=mq(mV(i.cancellation,"execution.cancellation").stage,"execution.cancellation.stage");if(!mx(e.points,"operation.cancellation.points").includes(t))throw TypeError(`malformed canonical envelope: cancellation stage ${t} is not legal for this operation`)}}(s.execution,r,i),"evidence"===e)mV(s.temporal,"temporal"),mV(s.authority,"authority"),mx(s.evidence_authorities,"evidence_authorities"),mV(s.coverage,"coverage"),mx(s.omissions,"omissions"),mx(s.scores,"scores"),mx(s.contributions,"contributions"),function(e){let t=mV(e,"outcome.value.page");if(mO(t.sort_contract_id,"page.sort_contract_id",192),1>mC(t.sort_revision,"page.sort_revision"))throw TypeError("malformed canonical envelope: page sort_revision must be positive");let r=null===t.total?null:mC(t.total,"page.total"),i=mC(t.returned,"page.returned");if(null!==r&&i>r)throw TypeError("malformed canonical envelope: page returned exceeds total");null!==t.cursor&&function(e){let t=mV(e,"page.cursor"),r=mq(t.kind,"page.cursor.kind");if("opaque"===r)mO(t.cursor,"page.cursor.cursor",4096);else throw TypeError(`malformed canonical envelope: unsupported page cursor kind ${r}`)}(t.cursor),null!==t.expires_at&&mj(t.expires_at,"page.expires_at")}(s.page);else if("preview"===e)mq(s.preview_id,"preview_id"),mq(s.preview_digest,"preview_digest"),mq(s.effect_class,"effect_class"),mV(s.authority,"authority"),mq(s.expected_state,"expected_state");else if("effect"===e)mq(s.effect_id,"effect_id"),mq(s.effect_class,"effect_class"),mq(s.idempotency_key,"idempotency_key"),mV(s.authority,"authority"),mq(s.expected_state,"expected_state"),mq(s.reconciliation,"reconciliation"),mV(s.receipt,"receipt");else throw TypeError(`malformed canonical envelope: unsupported outcome ${e}`);return{...s,payload:null===s.payload?null:a(s.payload)}}(u,p.value,o,n,a,s,d)}}}let mA={description:"Strongly typed algorithm-tagged integrity digest: `AccessPolicyDigest`.",type:"string"},mM={description:"Strongly typed canonical identity: `AccessRuleId`.",type:"string"},mW={description:"Strongly typed canonical identity: `ActorId`.",type:"string"},mN={description:"Strongly typed canonical identity: `AgentInstanceId`.",type:"string"},mz={enum:["memory_curator","session_reflector","skill_writer","combined_review","user_job"],type:"string"},mD={properties:{coverage:{$ref:"#/$defs/MetricCoverageV1"},current:{anyOf:[{$ref:"#/$defs/AnalyticsModeV1"},{type:"null"}]},transition_watermark:{type:["string","null"]},unavailable_reason:{type:["string","null"]}},required:["coverage"],type:"object"},mF={enum:["off","local_only","aggregate_share"],type:"string"},mL={oneOf:[{const:"project",description:"Analytics events of the resolved project.",type:"string"},{const:"all",description:"Analytics events of every registered project.",type:"string"}]},mU={description:"Strongly typed canonical identity: `AnalyzerEnvironmentVariable`.",type:"string"},mH={description:"Strongly typed canonical identity: `AnalyzerExecutableId`.",type:"string"},mG={oneOf:[{properties:{executable_id:{$ref:"#/$defs/AnalyzerExecutableId"},kind:{const:"built_in",type:"string"}},required:["kind","executable_id"],type:"object"},{properties:{executable_digest:{$ref:"#/$defs/ManifestDigest"},kind:{const:"approved_external",type:"string"}},required:["kind","executable_digest"],type:"object"}]},mB={description:"Strongly typed canonical identity: `AnalyzerLanguageId`.",type:"string"},mK={additionalProperties:!1,description:"One language's analyzer selection. Host registration may project only the\nnon-sensitive `language_id`/`enabled` pair; all other fields remain in the\nconfiguration authority.",properties:{arguments:{items:{type:"string"},type:"array"},enabled:{type:"boolean"},environment_allowlist:{items:{$ref:"#/$defs/AnalyzerEnvironmentVariable"},type:"array",uniqueItems:!0},executable:{$ref:"#/$defs/AnalyzerExecutableReferenceV1"},initialization_options:{additionalProperties:{$ref:"#/$defs/AnalyzerStructuredValueV1"},type:"object"},language_id:{$ref:"#/$defs/AnalyzerLanguageId"},privacy_class:{$ref:"#/$defs/AnalyzerPrivacyClassV1"},resource_limits:{$ref:"#/$defs/AnalyzerResourceLimitsV1"},restart_policy:{$ref:"#/$defs/AnalyzerRestartPolicyV1"},settings:{additionalProperties:{$ref:"#/$defs/AnalyzerStructuredValueV1"},type:"object"}},required:["language_id","enabled","executable","arguments","initialization_options","settings","environment_allowlist","privacy_class","resource_limits","restart_policy"],type:"object"},mJ={enum:["non_sensitive","sensitive","restricted"],type:"string"},mZ={additionalProperties:!1,properties:{maximum_memory_mib:{format:"uint32",minimum:0,type:"integer"},request_timeout_millis:{format:"uint64",minimum:0,type:"integer"},startup_timeout_millis:{format:"uint64",minimum:0,type:"integer"}},required:["maximum_memory_mib","startup_timeout_millis","request_timeout_millis"],type:"object"},mQ={enum:["restart_on_configuration_change","manual_restart_only"],type:"string"},mX={additionalProperties:!1,description:"Canonical analyzer settings. A changed selection produces a new\nconfiguration revision/digest; cache invalidation remains owned elsewhere.",properties:{schema_version:{format:"uint16",maximum:65535,minimum:0,type:"integer"},selections:{items:{$ref:"#/$defs/AnalyzerLanguageSelectionV1"},type:"array"}},required:["schema_version","selections"],type:"object"},mY={description:"A structured analyzer option value. This deliberately excludes raw\nenvironment values, commands, credential material, and transport blobs.",oneOf:[{properties:{kind:{const:"boolean",type:"string"},value:{type:"boolean"}},required:["kind","value"],type:"object"},{properties:{kind:{const:"integer",type:"string"},value:{format:"int64",type:"integer"}},required:["kind","value"],type:"object"},{properties:{kind:{const:"text",type:"string"},value:{type:"string"}},required:["kind","value"],type:"object"},{properties:{kind:{const:"text_list",type:"string"},value:{items:{type:"string"},type:"array"}},required:["kind","value"],type:"object"},{properties:{kind:{const:"object",type:"string"},value:{additionalProperties:{$ref:"#/$defs/AnalyzerStructuredValueV1"},type:"object"}},required:["kind","value"],type:"object"}]},m1={description:"Strongly typed canonical identity: `AttemptId`.",type:"string"},m0={description:"Authoritative scope of a source binding. A mutable path, label, or host\nprofile cannot be represented as authority.",oneOf:[{properties:{id:{$ref:"#/$defs/ProjectId"},kind:{const:"project",type:"string"}},required:["kind","id"],type:"object"},{properties:{id:{$ref:"#/$defs/UserProfileId"},kind:{const:"projectless_hermes",type:"string"}},required:["kind","id"],type:"object"}]},m2={additionalProperties:!1,description:"One exact application scope paired with its registered physical locator.\n\nThe scope remains the identity authority. The locator is retained only so\na later read or restart can reopen the exact registered root without an\nactive-graph or CWD fallback.",properties:{locator:{anyOf:[{$ref:"#/$defs/RegisteredRootLocatorV1"},{type:"null"}]},scope:{$ref:"#/$defs/ResolvedScope"}},required:["scope"],type:"object"},m4={additionalProperties:!1,description:"Immutable canonical set of exact roots admitted by their existing request\ncontexts. A registered locator participates only as frozen reopening\nevidence; its paired [`ResolvedScope`](crate::context::ResolvedScope) remains\nthe root identity authority.",properties:{actor_id:{$ref:"#/$defs/ActorId"},digest:{$ref:"#/$defs/ManifestDigest"},revision:{$ref:"#/$defs/ScopeSetRevision"},roots:{items:{$ref:"#/$defs/AuthorizedRoot"},type:"array"},scope_set_id:{$ref:"#/$defs/ScopeSetId"}},required:["scope_set_id","revision","actor_id","roots","digest"],type:"object"},m6={description:"A terminal automatic-fact receipt state.",enum:["applied","quarantined"],type:"string"},m3={oneOf:[{properties:{kind:{const:"disabled",type:"string"}},required:["kind"],type:"object"},{properties:{kind:{const:"eligible_only",type:"string"},maximum_per_run:{format:"uint16",maximum:65535,minimum:1,type:"integer"},minimum_idle_seconds:{format:"uint64",minimum:1,type:"integer"}},required:["kind","minimum_idle_seconds","maximum_per_run"],type:"object"}]},m9={enum:["disabled","codex_app_server"],type:"string"},m5={enum:["standalone","delegated_host"],type:"string"},m8={description:"The settled status every successful read in this family reports.",enum:["ok"],type:"string"},m7={description:"Which owner's automation schedulers a reconcile covers.",oneOf:[{const:"project",description:"The served project's scheduler, answered by the project's owner.",type:"string"},{const:"profile",description:"Every cached project scheduler of the profile, answered by the\ndaemon's profile owner.",type:"string"}]},fe={properties:{created_at:{type:"string"},kind:{type:"string"},path:{type:"string"},schema_version:{format:"uint32",minimum:0,type:"integer"},sha256:{type:"string"},summary:{type:["string","null"]}},required:["schema_version","kind","path","sha256","created_at"],type:"object"},ft={description:"Automation run reads answer from the active project's ledger only.",enum:["active_project"],type:"string"},fr={enum:["queued","running","succeeded","failed","skipped"],type:"string"},fi={additionalProperties:!1,properties:{allow_job_commands:{type:"boolean"},backend:{$ref:"#/$defs/AutomationBackendV1"},combine_due_tasks:{type:"boolean"},enabled:{type:"boolean"},host_mode:{$ref:"#/$defs/AutomationHostModeV1"},model_id:{type:["string","null"]},scheduler_tick_secs:{format:"uint64",minimum:0,type:"integer"},schema_version:{format:"uint16",maximum:65535,minimum:0,type:"integer"},tasks:{$ref:"#/$defs/AutomationTaskSetV1"},timeout_secs:{format:"uint64",minimum:0,type:"integer"}},required:["schema_version","enabled","backend","host_mode","timeout_secs","scheduler_tick_secs","combine_due_tasks","allow_job_commands","tasks"],type:"object"},fo={additionalProperties:!1,properties:{memory_curator:{$ref:"#/$defs/AutomationTaskSettingsV1"},session_reflector:{$ref:"#/$defs/AutomationTaskSettingsV1"},skill_writer:{$ref:"#/$defs/AutomationTaskSettingsV1"}},required:["memory_curator","session_reflector","skill_writer"],type:"object"},fn={additionalProperties:!1,properties:{cooldown_secs:{format:"uint64",minimum:0,type:["integer","null"]},enabled:{type:"boolean"},interval_secs:{format:"uint64",minimum:0,type:["integer","null"]},min_idle_secs:{format:"uint64",minimum:0,type:["integer","null"]},schedule:{type:["string","null"]},session_evidence_budget_backoff_secs:{description:"Suppression window between session-evidence retrieval attempts while\nthe evidence budget stays exhausted. Unset uses the automation crate's\none-hour default. Distinct from `cooldown_secs`, which paces retries\nafter failed runs; budget exhaustion is a skip, not a failure.",format:"uint64",minimum:0,type:["integer","null"]},stale_lock_secs:{format:"uint64",minimum:0,type:["integer","null"]}},required:["enabled"],type:"object"},fa={enum:["manual_cli","manual_mcp","dashboard","application","scheduler","host_receipt"],type:"string"},fs={description:"Strongly typed canonical identity: `BrainId`.",type:"string"},fd={oneOf:[{properties:{kind:{const:"reject",type:"string"}},required:["kind"],type:"object"},{properties:{kind:{const:"append_monotonic_ordinal",type:"string"},maximum_attempts:{format:"uint16",maximum:65535,minimum:1,type:"integer"}},required:["kind","maximum_attempts"],type:"object"}]},fc={oneOf:[{properties:{bytes:{format:"uint8",maximum:255,minimum:1,type:"integer"},kind:{const:"task_id_digest_prefix",type:"string"}},required:["kind","bytes"],type:"object"},{properties:{kind:{const:"repository_slug",type:"string"}},required:["kind"],type:"object"},{properties:{kind:{const:"work_class",type:"string"}},required:["kind"],type:"object"},{properties:{kind:{const:"monotonic_collision_ordinal",type:"string"}},required:["kind"],type:"object"}]},fl={enum:["hyphen","underscore","slash"],type:"string"},fp={additionalProperties:!1,properties:{collision:{$ref:"#/$defs/BranchCollisionPolicyV1"},components:{items:{$ref:"#/$defs/BranchNameComponentV1"},type:"array"},maximum_bytes:{format:"uint16",maximum:65535,minimum:1,type:"integer"},prefix:{$ref:"#/$defs/CanonicalGitRefPrefix"},separator:{$ref:"#/$defs/BranchNameSeparatorV1"}},required:["prefix","components","separator","maximum_bytes","collision"],type:"object"},fu={additionalProperties:!1,description:"A declared dependency edge; propagation direction remains an application\ndecision and is never inferred from this edge.",properties:{dependency:{$ref:"#/$defs/StackNodeId"},dependent:{$ref:"#/$defs/StackNodeId"}},required:["dependency","dependent"],type:"object"},fm={description:"Strongly typed canonical identity: `BranchStackId`.",type:"string"},ff={additionalProperties:!1,description:"One visible branch/ref at one immutable tip.",properties:{node_id:{$ref:"#/$defs/StackNodeId"},project_id:{$ref:"#/$defs/ProjectId"},reference:{$ref:"#/$defs/RefId"},repository_id:{$ref:"#/$defs/RepositoryId"},tip:{$ref:"#/$defs/CommitId"},worktree_id:{anyOf:[{$ref:"#/$defs/WorktreeId"},{type:"null"}]}},required:["node_id","project_id","repository_id","reference","tip"],type:"object"},fh={description:"Strongly typed canonical identity: `BranchStackRevisionId`.",type:"string"},fy={additionalProperties:!1,description:"Immutable branch-stack projection at one exact inventory revision.",properties:{canonical_order:{items:{$ref:"#/$defs/StackNodeId"},type:"array"},digest:{$ref:"#/$defs/ManifestDigest"},edges:{items:{$ref:"#/$defs/BranchStackEdgeV1"},type:"array"},inventory_epoch:{$ref:"#/$defs/WorktreeInventoryEpoch"},inventory_snapshot_id:{$ref:"#/$defs/WorktreeInventorySnapshotId"},nodes:{items:{$ref:"#/$defs/BranchStackNodeV1"},type:"array"},revision_id:{$ref:"#/$defs/BranchStackRevisionId"},source:{$ref:"#/$defs/BranchStackSourceV1"},stack_id:{$ref:"#/$defs/BranchStackId"}},required:["stack_id","revision_id","inventory_snapshot_id","inventory_epoch","source","nodes","edges","canonical_order","digest"],type:"object"},fg={description:"Authoritative source that declared the exact stack topology.",enum:["explicit_declaration","accepted_task_branch_topology"],type:"string"},f_={enum:["no_branches","unbranched","independent_branches","local_stack"],type:"string"},fv={additionalProperties:!1,properties:{allowed:{items:{$ref:"#/$defs/BranchTopologyKindV1"},type:"array",uniqueItems:!0}},required:["allowed"],type:"object"},fb={description:"Strongly typed canonical identity: `CalibrationProfileId`.",type:"string"},f$={additionalProperties:!1,description:"Surface-owned query semantics. Page size remains an invocation control, but\ncontinuation is a request field so CLI, MCP, and HTTP callers all have the\nsame channel for spending a `next_cursor`.",properties:{cursor:{default:null,type:["string","null"]},order:{$ref:"#/$defs/RetrievalOrder"},projection:{$ref:"#/$defs/ResultProjection"}},required:["projection","order"],type:"object"},fS={additionalProperties:!1,properties:{observed_at:{$ref:"#/$defs/UtcMicros"},stage:{$ref:"#/$defs/CancellationStage"}},required:["stage","observed_at"],type:"object"},fk={description:"Exact stage at which cancellation or deadline state was observed.",enum:["before_admission","before_read","during_read","before_effect","effect_in_flight","reconciling","after_commit"],type:"string"},fw={additionalProperties:!1,description:"One retriever's scored contribution to a fused candidate. Every ranked\ncandidate retains every retriever's raw score domain, ordinal rank,\ncalibrated feature, weight, and weighted contribution.",properties:{calibrated_feature_micros:{format:"uint32",minimum:0,type:"integer"},calibration_profile_id:{$ref:"#/$defs/CalibrationProfileId"},ordinal_rank:{format:"uint32",minimum:0,type:"integer"},raw_score:{$ref:"#/$defs/FixedPointScore"},retriever:{$ref:"#/$defs/RetrieverKind"},retriever_revision:{$ref:"#/$defs/ComponentRevision"},score_domain:{$ref:"#/$defs/ScoreDomainId"},source_occurrence_id:{$ref:"#/$defs/SourceOccurrenceId"},weight_micros:{format:"uint32",minimum:0,type:"integer"},weighted_contribution_micros:{format:"uint64",minimum:0,type:"integer"}},required:["retriever","retriever_revision","source_occurrence_id","ordinal_rank","raw_score","score_domain","calibration_profile_id","calibrated_feature_micros","weight_micros","weighted_contribution_micros"],type:"object"},fR={description:"A validated full native Git ref name, such as `refs/heads/main`.",type:"string"},fP={description:"A validated ref/branch prefix. Branch naming accepts a short branch prefix\n(for example `tracedecay/`) while protected-ref selectors use full\n`refs/.../` prefixes.",type:"string"},fV={description:"Strongly typed canonical identity: `CapabilityId`.",type:"string"},fq={description:"Strongly typed canonical identity: `CatalogGenerationId`.",type:"string"},fI={description:"Strongly typed canonical identity: `ChangePlanId`.",type:"string"},fx={additionalProperties:!1,properties:{from_inclusive:{format:"int64",type:["integer","null"]},through_inclusive:{format:"int64",type:["integer","null"]}},type:"object"},fj={additionalProperties:!1,description:'Why co-change mining produced no answer, so an empty\n`missing_co_change_partners` does not read as "no partner is missing".',properties:{reason:{type:"string"},retryable:{type:"boolean"}},required:["reason","retryable"],type:"object"},fC={enum:["kind","language","path"],type:"string"},fT={description:"Strongly typed canonical identity: `CodeGenerationId`.",type:"string"},fO={description:"Freshness of the generation a verified graph read serves.",oneOf:[{properties:{state:{const:"current",type:"string"}},required:["state"],type:"object"},{properties:{rebuild_in_flight:{type:"boolean"},sealed_at:{$ref:"#/$defs/UtcMicros"},state:{const:"last_complete_stale",type:"string"}},required:["state","sealed_at","rebuild_in_flight"],type:"object"}]},fE={description:"A typed reason an otherwise active generation cannot make durable progress.",enum:["resident_memory","source_unavailable","artifact_store_unavailable","retry_backoff","publication_authority_corrupt"],type:"string"},fA={description:'A deterministic contract violation that parked background convergence.\n\nParked is not dead: the worker keeps re-observing the violation on its\nordinary wake cadence, so an operator fix (for example restoring an\nowner-private mode) is picked up on the next wake without a restart. The\nstate exists so `status`, doctor, and the dashboard report the violation\ntyped instead of an indefinite "warming".',properties:{blocked_reason:{anyOf:[{$ref:"#/$defs/CodeIndexBuildBlockedReasonV1"},{type:"null"}],description:"Stable class for callers that must decide whether new work is admissible."},observed_passes:{description:"Background passes that re-observed the violation since parking.",format:"uint64",minimum:0,type:"integer"},parked_at_micros:{description:"When the violation was first observed (microseconds since the Unix epoch).",format:"int64",type:"integer"},reason:{description:"Exact typed failure that parked convergence.",type:"string"},remediation:{description:"Operator action that clears the violation.",type:"string"},retries_on_wake:{description:"Whether the worker re-checks this violation on every ordinary wake.\nTrue for filesystem/contract violations an operator fix clears in\nplace; false for an abnormal task failure that only changed input (a\nnew sealed generation) retries.",type:"boolean"}},required:["reason","remediation","parked_at_micros","observed_passes","retries_on_wake"],type:"object"},fM={properties:{display_path:{description:"`git_path_bytes` decoded for display, invalid UTF-8 replaced.",type:"string"},git_path_bytes:{description:"The exact Git path bytes, which need not be UTF-8.",items:{format:"uint8",maximum:255,minimum:0,type:"integer"},type:"array"},reason:{$ref:"#/$defs/CodeIndexSourceOmissionReasonV1"}},required:["git_path_bytes","display_path","reason"],type:"object"},fW={description:"Sources a sealed snapshot captured but does not index.",properties:{count:{description:"Every omitted source in the snapshot.",format:"uint64",minimum:0,type:"integer"},sources:{description:"The first omitted sources in Git path order, at most\n[`CODE_INDEX_OMITTED_SOURCE_LIST_LIMIT`].",items:{$ref:"#/$defs/CodeIndexOmittedSourceV1"},type:"array"}},required:["count","sources"],type:"object"},fN={oneOf:[{description:"No logical path can carry the Git path: not UTF-8, a backslash, a\ncontrol character, or leading or trailing whitespace.",properties:{kind:{const:"unrepresentable_path",type:"string"}},required:["kind"],type:"object"},{description:"The privacy boundary withheld the file's bytes.",properties:{detail:{type:"string"},kind:{const:"privacy_withheld",type:"string"}},required:["kind","detail"],type:"object"}]},fz={description:"Closed staleness ladder for one mounted worktree.\n\nThe scheduler publishes one of these tokens. MCP, the dashboard, and the\nCLI must match the variant, not a hand-copied string, so a new ladder\nstate cannot appear at one caller and be missed at the others.",enum:["fresh","stale","indexing","refreshing","restoring","verifying","parked"],type:"string"},fD={description:"Profile-level worker-count intent for the process-wide code-index pool.\n`Automatic` delegates the concrete count to runtime resource admission;\n`Exact` persists an operator-requested positive worker count.",oneOf:[{additionalProperties:!1,properties:{mode:{const:"automatic",type:"string"}},required:["mode"],type:"object"},{additionalProperties:!1,properties:{mode:{const:"exact",type:"string"},workers:{format:"uint16",maximum:65535,minimum:0,type:"integer"}},required:["mode","workers"],type:"object"}]},fF={additionalProperties:!1,properties:{chunk:{anyOf:[{$ref:"#/$defs/CodeSearchChunkId"},{type:"null"}]},file:{$ref:"#/$defs/FileOccurrenceId"},path:{type:"string"},span:{$ref:"#/$defs/SourceSpan"},symbol:{anyOf:[{$ref:"#/$defs/SymbolOccurrenceId"},{type:"null"}]}},required:["file","path","span"],type:"object"},fL={additionalProperties:!1,description:"One immutable code-index generation inside the authorized single root.\nThe path prefix narrows a query but never establishes project identity.",properties:{generation:{$ref:"#/$defs/CodeGenerationId"},path_prefix:{type:["string","null"]}},required:["generation"],type:"object"},fU={description:"Strongly typed canonical identity: `CodeSearchChunkId`.",type:"string"},fH={description:"Strongly typed canonical identity: `CommitId`.",type:"string"},fG={enum:["promote","reject","insufficient_evidence"],type:"string"},fB={description:"Whether the bounded complexity walk over a symbol's body ran to the end.\n\nThe extractor stops walking a body once its traversal budget is spent. The\ncounters accumulated by then are lower bounds over the visited prefix, not\nfacts about the whole body, so every surface that prints, ranks, or\naggregates complexity must render this state instead of treating those\ncounters as exact.",oneOf:[{enum:["complete"],type:"string"},{const:"traversal_budget_exhausted",description:"The walk stopped when the traversal budget ran out.",type:"string"}]},fK={description:"Strongly typed canonical identity: `ComponentRevision`.",type:"string"},fJ={description:"Strongly typed canonical identity: `ComponentVersion`.",type:"string"},fZ={enum:["config_summary"],type:"string"},fQ={additionalProperties:!1,description:"One entry per changed config file instead of one per config key.",properties:{config_keys:{format:"uint",minimum:0,type:"integer"},file:{type:"string"},kind:{$ref:"#/$defs/ConfigSummaryKindV1"}},required:["file","kind","config_keys"],type:"object"},fX={description:"Strongly typed canonical identity: `ConfigurationIdempotencyKey`.",type:"string"},fY={description:"A typed configuration layer identity. The default layer intentionally has\nno caller-controlled identifier.",oneOf:[{properties:{kind:{const:"default",type:"string"}},required:["kind"],type:"object"},{properties:{kind:{const:"user_profile",type:"string"},profile_id:{$ref:"#/$defs/UserProfileId"}},required:["kind","profile_id"],type:"object"},{properties:{kind:{const:"project",type:"string"},project_id:{$ref:"#/$defs/ProjectId"}},required:["kind","project_id"],type:"object"},{properties:{collection_id:{$ref:"#/$defs/QueryCollectionId"},kind:{const:"collection",type:"string"}},required:["kind","collection_id"],type:"object"}]},f1={description:"Strongly typed canonical identity: `ConfigurationReceiptId`.",type:"string"},f0={description:"Strongly typed canonical identity: `ConfigurationRevisionId`.",type:"string"},f2={description:"Strongly typed canonical identity: `ConfigurationSnapshotId`.",type:"string"},f4={description:"Values that the typed registry can accept.",oneOf:[{properties:{kind:{const:"boolean",type:"string"},value:{type:"boolean"}},required:["kind","value"],type:"object"},{properties:{kind:{const:"unsigned",type:"string"},value:{format:"uint64",minimum:0,type:"integer"}},required:["kind","value"],type:"object"},{properties:{kind:{const:"code_index_worker_selection",type:"string"},value:{$ref:"#/$defs/CodeIndexWorkerSelectionV1"}},required:["kind","value"],type:"object"},{properties:{kind:{const:"text",type:"string"},value:{type:"string"}},required:["kind","value"],type:"object"},{properties:{kind:{const:"string_list",type:"string"},value:{items:{type:"string"},type:"array"}},required:["kind","value"],type:"object"},{properties:{kind:{const:"source_bindings",type:"string"},value:{items:{$ref:"#/$defs/ScopeSourceBinding"},type:"array"}},required:["kind","value"],type:"object"},{properties:{kind:{const:"access_rules",type:"string"},value:{items:{$ref:"#/$defs/ScopeAccessRule"},type:"array"}},required:["kind","value"],type:"object"},{properties:{kind:{const:"analyzer_settings",type:"string"},value:{$ref:"#/$defs/AnalyzerSettingsV1"}},required:["kind","value"],type:"object"},{properties:{kind:{const:"work_topology_policy",type:"string"},value:{$ref:"#/$defs/WorkTopologyPolicyV1"}},required:["kind","value"],type:"object"},{properties:{kind:{const:"work_executable_bindings",type:"string"},value:{items:{$ref:"#/$defs/WorkExecutableBindingV1"},type:"array"}},required:["kind","value"],type:"object"},{properties:{kind:{const:"work_expertise_consent",type:"string"},value:{$ref:"#/$defs/WorkExpertiseConsentV1"}},required:["kind","value"],type:"object"},{properties:{kind:{const:"context_scout_settings",type:"string"},value:{$ref:"#/$defs/ContextScoutSettingsV1"}},required:["kind","value"],type:"object"},{properties:{kind:{const:"automation_settings",type:"string"},value:{$ref:"#/$defs/AutomationSettingsV1"}},required:["kind","value"],type:"object"},{properties:{kind:{const:"lcm_summarizer_executables",type:"string"},value:{$ref:"#/$defs/LcmSummarizerExecutablesV1"}},required:["kind","value"],type:"object"}]},f6={description:"Strongly typed algorithm-tagged integrity digest: `ContentDigest`.",type:"string"},f3={description:"What one caller `lexical_anchors` entry contributed to the response, in\ncaller order.",oneOf:[{additionalProperties:!1,description:"`matched` indexed rows carried the anchor; `admitted` result sites\ncarrying it are in this response, and `dropped` counts the sites the\nlexical lane admitted that a later stage removed, by reason.",properties:{admitted:{format:"uint64",minimum:0,type:"integer"},anchor:{type:"string"},dropped:{items:{$ref:"#/$defs/LexicalAnchorDropV1"},type:"array"},matched:{format:"uint64",minimum:0,type:"integer"},outcome:{const:"matched",type:"string"}},required:["outcome","anchor","matched","admitted"],type:"object"},{additionalProperties:!1,description:"No indexed row carries the anchor.",properties:{anchor:{type:"string"},outcome:{const:"unmatched",type:"string"}},required:["outcome","anchor"],type:"object"},{additionalProperties:!1,description:"The anchor's route did not serve; `coverage` names the lane state.",properties:{anchor:{type:"string"},outcome:{const:"not_served",type:"string"}},required:["outcome","anchor"],type:"object"}]},f9={enum:["explore","plan"],type:"string"},f5={additionalProperties:!1,description:"Exact opaque destination for one public Context Scout operation.\n\nThe daemon converts this transport-neutral address into its runtime value\nonly after catalog admission. Keeping the public wire here makes CLI, MCP,\nHTTP, and both SDKs share one generated schema authority.",properties:{agent_id:{items:{format:"uint8",maximum:255,minimum:0,type:"integer"},maxItems:16,minItems:16,type:"array"},logical_message_id:{items:{format:"uint8",maximum:255,minimum:0,type:"integer"},maxItems:16,minItems:16,type:"array"},profile_id:{items:{format:"uint8",maximum:255,minimum:0,type:"integer"},maxItems:16,minItems:16,type:"array"},project_id:{items:{format:"uint8",maximum:255,minimum:0,type:"integer"},maxItems:16,minItems:16,type:"array"},protected_session_id:{items:{format:"uint8",maximum:255,minimum:0,type:"integer"},maxItems:32,minItems:32,type:"array"},provider_id:{items:{format:"uint8",maximum:255,minimum:0,type:"integer"},maxItems:16,minItems:16,type:"array"},thread_id:{items:{format:"uint8",maximum:255,minimum:0,type:"integer"},maxItems:16,minItems:16,type:"array"},turn_id:{items:{format:"uint8",maximum:255,minimum:0,type:"integer"},maxItems:16,minItems:16,type:"array"}},required:["profile_id","provider_id","protected_session_id","thread_id","turn_id","agent_id","logical_message_id","project_id"],type:"object"},f8={enum:["retrieval","diagnostic","coordination","verification"],type:"string"},f7={additionalProperties:!1,description:"Public lease proof. It carries only opaque identities; the daemon resolves\nit back to the durable queue row before recording delivery.",properties:{envelope_id:{items:{format:"uint8",maximum:255,minimum:0,type:"integer"},maxItems:16,minItems:16,type:"array"},lease_expires_at:{$ref:"#/$defs/UtcMicros"},lease_id:{items:{format:"uint8",maximum:255,minimum:0,type:"integer"},maxItems:16,minItems:16,type:"array"},work:{$ref:"#/$defs/ContextScoutWorkV1"}},required:["work","envelope_id","lease_id","lease_expires_at"],type:"object"},he={additionalProperties:!1,properties:{max_candidates:{format:"uint32",minimum:0,type:"integer"},max_evidence:{format:"uint32",minimum:0,type:"integer"},max_model_input_tokens:{format:"uint32",minimum:0,type:"integer"},max_model_output_tokens:{format:"uint32",minimum:0,type:"integer"},max_text_bytes:{format:"uint32",minimum:0,type:"integer"}},required:["max_candidates","max_evidence","max_text_bytes","max_model_input_tokens","max_model_output_tokens"],type:"object"},ht={enum:["deterministic","configured_model"],type:"string"},hr={enum:["active","paused","disabled"],type:"string"},hi={enum:["codex_app_server"],type:"string"},ho={enum:["attempted","delayed","displayed","expanded","explicitly_accepted","explicitly_rejected","dismissed","expired_unseen","corrected","unknown"],type:"string"},hn={additionalProperties:!1,properties:{delivered_at:{$ref:"#/$defs/UtcMicros"},envelope_id:{items:{format:"uint8",maximum:255,minimum:0,type:"integer"},maxItems:16,minItems:16,type:"array"},outcome:{$ref:"#/$defs/ContextScoutDeliveryOutcomeV1"},receipt_id:{items:{format:"uint8",maximum:255,minimum:0,type:"integer"},maxItems:16,minItems:16,type:"array"}},required:["receipt_id","envelope_id","delivered_at","outcome"],type:"object"},ha={enum:["immediate","next_boundary","idle_window","on_request","suppressed"],type:"string"},hs={enum:["complete","partial","stale","cancelled","unavailable"],type:"string"},hd={additionalProperties:!1,properties:{anchor_ids:{items:{$ref:"#/$defs/RetrievalAnchorId"},type:"array"},availability:{$ref:"#/$defs/ContextScoutEvidenceAvailabilityV1"},claim_digest:{$ref:"#/$defs/ManifestDigest"},content_generation:{$ref:"#/$defs/CodeGenerationId"}},required:["content_generation","availability","anchor_ids","claim_digest"],type:"object"},hc={enum:["explicitly_accepted","explicitly_rejected","dismissed","corrected"],type:"string"},hl={additionalProperties:!1,properties:{kind:{$ref:"#/$defs/ContextScoutFeedbackKindV1"},receipt_id:{items:{format:"uint8",maximum:255,minimum:0,type:"integer"},maxItems:16,minItems:16,type:"array"}},required:["receipt_id","kind"],type:"object"},hp={additionalProperties:!1,properties:{max_candidates:{format:"uint",minimum:0,type:"integer"},max_evidence:{format:"uint",minimum:0,type:"integer"},max_model_input_tokens:{format:"uint",minimum:0,type:"integer"},max_model_output_tokens:{format:"uint",minimum:0,type:"integer"},max_text_bytes:{format:"uint",minimum:0,type:"integer"}},required:["max_candidates","max_evidence","max_text_bytes","max_model_input_tokens","max_model_output_tokens"],type:"object"},hu={enum:["disabled","codex_app_server","unsupported"],type:"string"},hm={enum:["not_requested","succeeded","disabled","unavailable","denied","disconnected","cancelled","deadline_exceeded","token_budget_exceeded","invalid_output"],type:"string"},hf={additionalProperties:!1,properties:{actual_model:{type:["string","null"]},actual_provider:{type:["string","null"]},estimated_cost_microusd:{format:"uint64",minimum:0,type:["integer","null"]},input_tokens:{format:"uint64",minimum:0,type:["integer","null"]},output_tokens:{format:"uint64",minimum:0,type:["integer","null"]},requested_backend:{$ref:"#/$defs/ContextScoutModelBackendV1"}},required:["requested_backend"],type:"object"},hh={additionalProperties:!1,properties:{feedback:{anyOf:[{$ref:"#/$defs/ContextScoutFeedbackV1"},{type:"null"}]},receipt:{$ref:"#/$defs/ContextScoutDeliveryReceiptV1"},suggestion:{$ref:"#/$defs/ContextScoutSuggestionProjectionV1"}},required:["suggestion","receipt"],type:"object"},hy={enum:["deterministic","model_assisted","deterministic_fallback"],type:"string"},hg={enum:["deterministic","configured_model"],type:"string"},h_={enum:["active","paused","disabled"],type:"string"},hv={additionalProperties:!1,description:"Canonical Context Scout control-plane value. Disabled is the only stock\nstate; deterministic or configured-model execution requires an explicit\nconfiguration revision.",properties:{limits:{$ref:"#/$defs/ContextScoutConfigurationLimitsV1"},mode:{$ref:"#/$defs/ContextScoutConfigurationModeV1"},model_id:{type:["string","null"]},model_path:{anyOf:[{$ref:"#/$defs/ContextScoutConfiguredModelPathV1"},{type:"null"}]},model_timeout_secs:{format:"uint64",minimum:0,type:["integer","null"]},schema_version:{format:"uint16",maximum:65535,minimum:0,type:"integer"},state:{$ref:"#/$defs/ContextScoutConfigurationStateV1"}},required:["schema_version","state","mode","limits"],type:"object"},hb={enum:["stored","duplicate","superseded"],type:"string"},h$={additionalProperties:!1,properties:{category:{$ref:"#/$defs/ContextScoutCategoryV1"},configuration_revision:{items:{format:"uint8",maximum:255,minimum:0,type:"integer"},maxItems:32,minItems:32,type:"array"},dedupe_key:{items:{format:"uint8",maximum:255,minimum:0,type:"integer"},maxItems:32,minItems:32,type:"array"},delivery_window:{$ref:"#/$defs/ContextScoutDeliveryWindowV1"},envelope_id:{items:{format:"uint8",maximum:255,minimum:0,type:"integer"},maxItems:16,minItems:16,type:"array"},evidence:{$ref:"#/$defs/ContextScoutEvidenceProjectionV1"},expires_at:{$ref:"#/$defs/UtcMicros"},model_outcome:{$ref:"#/$defs/ContextScoutModelOutcomeV1"},model_receipt:{anyOf:[{$ref:"#/$defs/ContextScoutModelReceiptV1"},{type:"null"}]},relevance_score:{format:"uint16",maximum:65535,minimum:0,type:"integer"},route:{$ref:"#/$defs/ContextScoutRouteV1"},suggestion_text:{type:"string"},work:{$ref:"#/$defs/ContextScoutWorkV1"}},required:["work","envelope_id","configuration_revision","delivery_window","route","model_outcome","dedupe_key","category","relevance_score","suggestion_text","evidence","expires_at"],type:"object"},hS={enum:["disabled","paused","dirty_overlay","quiet_or_unreceptive","no_eligible_candidate","expired","duplicate","cancelled","model_output_invalid","evidence_partial","evidence_stale","evidence_unavailable"],type:"string"},hk={additionalProperties:!1,properties:{address:{$ref:"#/$defs/ContextScoutAddressV1"},generation:{format:"uint64",minimum:0,type:"integer"},input_watermark:{items:{format:"uint8",maximum:255,minimum:0,type:"integer"},maxItems:32,minItems:32,type:"array"}},required:["address","generation","input_watermark"],type:"object"},hw={properties:{authorized_scope_ref:{type:"string"},current:{type:"boolean"},estimated_cost:{items:{$ref:"#/$defs/MetricValueV1"},type:"array"},horizon:{$ref:"#/$defs/ObservabilityHorizonV1"},latency:{description:"Provider-backed operation latency, projected from the same retained\nPlan 26 operation-resource events as Observatory. Each entry keeps\nprovider/model identity explicit; `None` is a real uncorrelated state,\nnever a client-side guess.",items:{$ref:"#/$defs/ProviderLatencyReadModelV1"},type:"array"},observed_at_micros:{format:"int64",type:"integer"},pricing_revision:{type:["string","null"]},usage:{items:{$ref:"#/$defs/MetricValueV1"},type:"array"},watermark:{type:"string"}},required:["authorized_scope_ref","horizon","watermark","observed_at_micros","current","usage","estimated_cost","latency"],type:"object"},hR={description:"Which side of a file dependency the coupling report counts.",enum:["fan_in","fan_out"],type:"string"},hP={description:"Completeness is explicit; unknown never renders as clean.",enum:["complete","partial","unknown"],type:"string"},hV={enum:["known","partial","stale","unknown","sampled","capped"],type:"string"},hq={description:"Strongly typed canonical identity: `CredentialReferenceId`.",type:"string"},hI={enum:["disabled","manual_receipt_only","fast_forward_only","merge_commit","cherry_pick_exact_commits"],type:"string"},hx={additionalProperties:!1,properties:{allow_cross_repository:{type:"boolean"},allowed_modes:{items:{$ref:"#/$defs/CrossMergeModeV1"},type:"array",uniqueItems:!0},default_mode:{$ref:"#/$defs/CrossMergeModeV1"}},required:["allowed_modes","default_mode","allow_cross_repository"],type:"object"},hj={additionalProperties:!1,description:"One immutable deadline supplied by the caller or upstream admission layer.",properties:{expires_at:{$ref:"#/$defs/UtcMicros"}},required:["expires_at"],type:"object"},hC={description:"Diagnostic severity. Source severity is preserved exactly; TraceDecay\nnever raises severity because several producers agree.",enum:["error","warning","information","hint"],type:"string"},hT={description:"Whether Doctor observed all of a family's evidence sources.",oneOf:[{const:"complete",description:"Every relevant evidence source for the family was observed.",type:"string"},{const:"partial",description:"Some evidence sources were observed; others were omitted.",type:"string"},{const:"unknown",description:"Whether coverage is complete could not be determined.",type:"string"}]},hO={description:"Shape of the design-structure-matrix report.",enum:["stats","clusters","matrix"],type:"string"},hE={enum:["prevented","committed","unknown","not_applicable"],type:"string"},hA={enum:["exact_duplicate","superseded_overlap","repeated_investigation","duplicate_effect","not_duplicate","censored","unknown"],type:"string"},hM={description:"Evidence role used by dedupe/diversity caps. Independent corroboration\nand contradictions are preserved.",enum:["primary","corroboration","contradiction","context"],type:"string"},hW={description:"The exact tiers, lexicographically ordered above all approximate\ncandidates. Fusion derives this only from a validated [`ExactAdmissionProof`].",enum:["exact_message","exact_literal_phrase","approximate"],type:"string"},hN={description:"The classification of one whole exact technical term. Whole exact terms\nand language-profiled subtokens are distinct fields.",enum:["whole_symbol","qualified_name","path","compiler_error_code","compiler_error_text","runtime_error_code","runtime_error_text","cli_flag","tool_name","configuration_key","commit_identifier"],type:"string"},hz={description:"Strongly typed canonical identity: `FactAssertionId`.",type:"string"},hD={enum:["general","user_pref","project","tool","decision","code_area"],type:"string"},hF={enum:["committed","idempotent_replay"],type:"string"},hL={oneOf:[{additionalProperties:!1,properties:{kind:{const:"profile",type:"string"}},required:["kind"],type:"object"},{additionalProperties:!1,properties:{kind:{const:"project",type:"string"},project_id:{$ref:"#/$defs/ProjectId"}},required:["kind","project_id"],type:"object"}]},hU={additionalProperties:!1,properties:{active_assertion_id:{anyOf:[{$ref:"#/$defs/FactAssertionId"},{type:"null"}]},committed_event_ids:{items:{$ref:"#/$defs/FactEventId"},type:"array"},disposition:{$ref:"#/$defs/FactCommitDispositionV1"},fact_id:{$ref:"#/$defs/FactId"},last_event_id:{$ref:"#/$defs/FactEventId"},owner:{$ref:"#/$defs/FactCommitOwnerV1"}},required:["disposition","fact_id","owner","committed_event_ids","last_event_id"],type:"object"},hH={description:"Strongly typed canonical identity: `FactEventId`.",type:"string"},hG={enum:["helpful","unhelpful"],type:"string"},hB={description:"Strongly typed canonical identity: `FactId`.",type:"string"},hK={oneOf:[{additionalProperties:!1,properties:{anchor_id:{$ref:"#/$defs/RetrievalAnchorId"},kind:{const:"evidence",type:"string"},stable_key:{$ref:"#/$defs/LocatorDigest"}},required:["kind","anchor_id","stable_key"],type:"object"},{additionalProperties:!1,properties:{kind:{const:"application",type:"string"},operation_id:{$ref:"#/$defs/ProvenanceId"}},required:["kind","operation_id"],type:"object"}]},hJ={description:"Payload states that structurally cannot expose an available fact payload.",enum:["redacted","quarantined","retention_expired","deleted","unavailable","ambiguous"],type:"string"},hZ={oneOf:[{additionalProperties:!1,properties:{fact:{$ref:"#/$defs/FactV1"},kind:{const:"available",type:"string"}},required:["kind","fact"],type:"object"},{additionalProperties:!1,properties:{fact:{$ref:"#/$defs/FactV1"},kind:{const:"superseded",type:"string"},superseded_by:{$ref:"#/$defs/FactId"}},required:["kind","fact","superseded_by"],type:"object"},{additionalProperties:!1,properties:{kind:{const:"unavailable",type:"string"},status:{$ref:"#/$defs/FactStatusV1"}},required:["kind","status"],type:"object"}]},hQ={oneOf:[{additionalProperties:!1,properties:{kind:{const:"not_applicable",type:"string"}},required:["kind"],type:"object"},{additionalProperties:!1,properties:{kind:{const:"not_mounted",type:"string"}},required:["kind"],type:"object"},{additionalProperties:!1,properties:{expanded_fact_count:{format:"uint",minimum:0,type:"integer"},kind:{const:"complete",type:"string"},relation_count:{format:"uint",minimum:0,type:"integer"},root_count:{format:"uint",minimum:0,type:"integer"}},required:["kind","root_count","relation_count","expanded_fact_count"],type:"object"},{additionalProperties:!1,properties:{kind:{const:"degraded",type:"string"},reason:{$ref:"#/$defs/FactSearchGraphDegradationV1"}},required:["kind","reason"],type:"object"}]},hX={enum:["conflict","unavailable","budget_exhausted","deadline_exceeded"],type:"string"},hY={additionalProperties:!1,properties:{fact:{$ref:"#/$defs/FactV1"},scores:{$ref:"#/$defs/FactSearchScoresV1"},why:{type:["string","null"]}},required:["fact","scores"],type:"object"},h1={additionalProperties:!1,properties:{fts_score_millionths:{format:"uint32",minimum:0,type:"integer"},holographic_score_millionths:{format:"uint32",minimum:0,type:"integer"},jaccard_score_millionths:{format:"uint32",minimum:0,type:"integer"},score_millionths:{format:"uint32",minimum:0,type:"integer"},trust_score_millionths:{format:"uint32",minimum:0,type:"integer"}},required:["score_millionths","fts_score_millionths","jaccard_score_millionths","holographic_score_millionths","trust_score_millionths"],type:"object"},h0={additionalProperties:!1,properties:{fact_id:{$ref:"#/$defs/FactId"},owner:{$ref:"#/$defs/FactCommitOwnerV1"},payload_access:{$ref:"#/$defs/FactPayloadAccessV1"},projected_as_of:{$ref:"#/$defs/UtcMicros"}},required:["owner","fact_id","payload_access","projected_as_of"],type:"object"},h2={additionalProperties:!1,properties:{access_count:{format:"uint64",minimum:0,type:"integer"},created_at:{$ref:"#/$defs/UtcMicros"},helpful_count:{format:"uint64",minimum:0,type:"integer"},last_feedback_at:{anyOf:[{$ref:"#/$defs/UtcMicros"},{type:"null"}]},last_recalled_at:{anyOf:[{$ref:"#/$defs/UtcMicros"},{type:"null"}]},last_retrieved_at:{anyOf:[{$ref:"#/$defs/UtcMicros"},{type:"null"}]},retrieval_count:{format:"uint64",minimum:0,type:"integer"},unhelpful_count:{format:"uint64",minimum:0,type:"integer"},updated_at:{$ref:"#/$defs/UtcMicros"}},required:["retrieval_count","access_count","helpful_count","unhelpful_count","created_at","updated_at"],type:"object"},h4={additionalProperties:!1,description:"Available fact projection. Unavailable payload states use\n[`FactProjectionV1::Unavailable`] and cannot fabricate payload fields.",properties:{active_assertion_id:{$ref:"#/$defs/FactAssertionId"},category:{$ref:"#/$defs/FactCategoryV1"},content:{type:"string"},entities:{items:{type:"string"},type:"array"},fact_id:{$ref:"#/$defs/FactId"},last_event_id:{$ref:"#/$defs/FactEventId"},metadata:{additionalProperties:!0,type:"object"},owner:{$ref:"#/$defs/FactCommitOwnerV1"},projected_as_of:{$ref:"#/$defs/UtcMicros"},source:{$ref:"#/$defs/FactIdentitySourceResultV1"},source_label:{type:["string","null"]},tags:{items:{type:"string"},type:"array"},telemetry:{$ref:"#/$defs/FactTelemetryV1"},trust_score_millionths:{format:"uint32",minimum:0,type:"integer"}},required:["owner","fact_id","content","category","tags","entities","trust_score_millionths","source","active_assertion_id","last_event_id","projected_as_of","telemetry","metadata"],type:"object"},h6={additionalProperties:!1,description:"Exact source-owned state for one advisory producer in a composed feedback\ncycle. The producer tag is part of the durable cycle result so consumers\nnever infer provenance from the position of an aggregate provider state.",properties:{producer:{$ref:"#/$defs/FeedbackDiagnosticProducerV1"},state:{$ref:"#/$defs/ProviderEvaluationStateV1"}},required:["producer","state"],type:"object"},h3={description:"Availability of the canonical baseline used to classify a current\ndiagnostic. An unavailable or partial baseline never upgrades a finding\nto `New`; only an authoritative `NoPriorBaseline` state may do so without\na baseline record.",oneOf:[{enum:["complete","partial","stale","unavailable"],type:"string"},{const:"no_prior_baseline",description:"The authoritative runtime confirmed that there is no prior saved\ngeneration to compare. This is authoritative empty history, not an\ninvented horizon and not unavailable/partial coverage.",type:"string"}]},h9={description:"Content identity distinguishes durable saved content from an authorized\nephemeral document overlay. Overlay identity is deliberately local to its\nowning session and cannot be made durable by converting it to a digest.",oneOf:[{properties:{file_digest:{$ref:"#/$defs/ManifestDigest"},generation_digest:{$ref:"#/$defs/ManifestDigest"},kind:{const:"saved_content",type:"string"}},required:["kind","generation_digest","file_digest"],type:"object"},{properties:{agent_id:{anyOf:[{$ref:"#/$defs/AgentInstanceId"},{type:"null"}]},document_version:{format:"uint64",minimum:0,type:"integer"},kind:{const:"ephemeral_overlay",type:"string"},overlay_digest:{$ref:"#/$defs/ManifestDigest"},owner_client_id:{$ref:"#/$defs/HostInstanceId"},session_id:{$ref:"#/$defs/SessionId"}},required:["kind","session_id","owner_client_id","document_version","overlay_digest"],type:"object"}]},h5={description:"Strongly typed canonical identity: `FeedbackCycleId`.",type:"string"},h8={enum:["clean","duplicate_noop","blocked","incomplete_coverage","stale_replan_required","budget_exceeded","cancelled","user_stop","daemon_unavailable"],type:"string"},h7={enum:["new","pre_existing","unknown"],type:"string"},ye={description:"Closed producer vocabulary for standard diagnostic projection.",enum:["code_diagnostic","git_hub_review","ci_localization","proximity"],type:"string"},yt={additionalProperties:!1,description:"Bounded code location used only to project an anchored advisory finding\ninto an editor. The finding's `retrieval_anchor_id` remains the evidence\nexpansion authority; this value carries no source body or provider payload.",properties:{code:{type:"string"},code_description_uri:{type:["string","null"]},file:{$ref:"#/$defs/FileOccurrenceId"},producer:{$ref:"#/$defs/FeedbackDiagnosticProducerV1"},safe_bounded_message:{type:"string"},severity:{$ref:"#/$defs/DiagnosticSeverityV1"},span:{$ref:"#/$defs/SourceSpan"},symbol:{anyOf:[{$ref:"#/$defs/SymbolOccurrenceId"},{type:"null"}]}},required:["file","span","code","severity","safe_bounded_message","producer"],type:"object"},yr={enum:["durable","session_only"],type:"string"},yi={description:"Strongly typed canonical identity: `FeedbackFindingId`.",type:"string"},yo={enum:["active","superseded","resolved","cleared"],type:"string"},yn={additionalProperties:!1,properties:{cycle_id:{$ref:"#/$defs/FeedbackCycleId"},expand_handle:{description:"Server-minted request handle for `feedback_expand`, present only when\nthe canonical finding has a retained retrieval anchor.",type:["string","null"]},finding:{$ref:"#/$defs/FeedbackFindingV1"},get_handle:{description:"Server-minted request handle for `feedback_get`; durable identity remains\n`finding.finding_id`.\n\nCursor identity types are deliberately absent from the generated schema\nsurface; the public wire form is the bounded opaque string.",type:"string"},result_id:{$ref:"#/$defs/FeedbackResultId"},scope:{$ref:"#/$defs/FeedbackScopeV1"}},required:["result_id","cycle_id","scope","finding","get_handle"],type:"object"},ya={additionalProperties:!1,description:"Reference-only post-edit feedback finding. The safe preview is bounded display framing,\nnever a source-text copy or a second diagnostic store.",properties:{classification:{$ref:"#/$defs/FeedbackDiagnosticClassificationV1"},diagnostic_projection:{anyOf:[{$ref:"#/$defs/FeedbackDiagnosticProjectionV1"},{type:"null"}]},finding_id:{$ref:"#/$defs/FeedbackFindingId"},lifecycle:{$ref:"#/$defs/FeedbackFindingLifecycleV1"},provider_state:{$ref:"#/$defs/ProviderEvaluationStateV1"},retrieval_anchor_id:{anyOf:[{$ref:"#/$defs/RetrievalAnchorId"},{type:"null"}]},safe_bounded_preview:{type:["string","null"]}},required:["finding_id","classification","lifecycle","provider_state"],type:"object"},ys={description:"Coverage state for graph impact and affected-test evidence. An empty impact\nset is clean only when its state is complete.",enum:["complete","partial","stale","unavailable"],type:"string"},yd={additionalProperties:!1,description:"Reference-only graph and test impact for one feedback target. The owning\ngraph/query layer supplies these identities; this contract does not create\nanother graph, test map, or evidence store.",properties:{affected_callers:{items:{$ref:"#/$defs/SymbolOccurrenceId"},type:"array"},affected_files:{items:{$ref:"#/$defs/FileOccurrenceId"},type:"array"},affected_tests:{items:{$ref:"#/$defs/SymbolOccurrenceId"},type:"array"},affected_tests_state:{$ref:"#/$defs/FeedbackImpactStateV1"},evidence_anchors:{items:{$ref:"#/$defs/RetrievalAnchorId"},type:"array"},state:{$ref:"#/$defs/FeedbackImpactStateV1"},target:{$ref:"#/$defs/FeedbackTargetV1"}},required:["target","affected_files","affected_callers","affected_tests","evidence_anchors","state","affected_tests_state"],type:"object"},yc={description:"Strongly typed canonical identity: `FeedbackResultId`.",type:"string"},yl={additionalProperties:!1,description:"Exact repository scope used for a feedback evaluation. A path, current\nworking directory, repository display name, or mutable branch label is not\na substitute for this identity.",properties:{branch_ref:{type:"string"},head_commit_id:{$ref:"#/$defs/CommitId"},project_id:{$ref:"#/$defs/ProjectId"},repository_id:{$ref:"#/$defs/RepositoryId"},worktree_id:{$ref:"#/$defs/WorktreeId"}},required:["project_id","repository_id","worktree_id","branch_ref","head_commit_id"],type:"object"},yp={additionalProperties:!1,description:"Exact changed-code address for one single-root feedback evaluation. The\naddress carries canonical file/range/symbol identities, never a path or\nmutable line number.",properties:{file:{$ref:"#/$defs/FileOccurrenceId"},generation_id:{anyOf:[{$ref:"#/$defs/CodeGenerationId"},{type:"null"}]},span:{anyOf:[{$ref:"#/$defs/SourceSpan"},{type:"null"}]},symbol:{anyOf:[{$ref:"#/$defs/SymbolOccurrenceId"},{type:"null"}]}},required:["file"],type:"object"},yu={description:"Strongly typed canonical identity: `FileOccurrenceId`.",type:"string"},ym={description:"How `tracedecay_files` lays out its listing.",oneOf:[{const:"flat",description:"One file per line.",type:"string"},{const:"grouped",description:"Grouped by directory.",type:"string"}]},yf={description:"Deterministic fixed-point score in millionths. No floating point crosses\nthis boundary.",format:"uint64",minimum:0,type:"integer"},yh={description:"Compatibility state of one source/projection pair.",enum:["current","stale","incompatible","missing","unknown"],type:"string"},yy={additionalProperties:!1,description:"A candidate after contribution grouping and fixed-point fusion.",properties:{anchor_id:{$ref:"#/$defs/RetrievalAnchorId"},contributions:{items:{$ref:"#/$defs/CandidateContribution"},type:"array"},decisions:{items:{$ref:"#/$defs/RankingDecision"},type:"array"},exact_class:{$ref:"#/$defs/ExactClass"},freshness:{items:{$ref:"#/$defs/SourceFreshness"},type:"array"},logical_evidence_id:{$ref:"#/$defs/LogicalEvidenceId"},occurrences:{items:{$ref:"#/$defs/OccurrenceProvenance"},type:"array"},utility_micros:{format:"uint64",minimum:0,type:"integer"}},required:["anchor_id","logical_evidence_id","occurrences","exact_class","utility_micros","contributions","freshness","decisions"],type:"object"},yg={description:"Metric whose distribution the Gini report measures.",enum:["complexity","lines","fan_in","fan_out","members"],type:"string"},y_={description:"Unit the Gini report aggregates its metric over.",enum:["file","symbol"],type:"string"},yv={description:"Expected blob identity, or explicit absent-file state.",oneOf:[{enum:["absent_file"],type:"string"},{additionalProperties:!1,properties:{present:{$ref:"#/$defs/GitOidV1"}},required:["present"],type:"object"}]},yb={additionalProperties:!1,description:"A symbol the exact base/head branch-generation comparison reports.",properties:{content_digest:{type:"string"},file:{type:"string"},id:{type:"string"},kind:{type:"string"},name:{type:"string"},qualified_name:{type:"string"}},required:["id","name","qualified_name","kind","file","content_digest"],type:"object"},y$={additionalProperties:!1,description:"A verified-graph symbol a git-context read reports.",properties:{file:{type:"string"},id:{type:"string"},kind:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},name:{type:"string"}},required:["id","name","kind","file","line"],type:"object"},yS={additionalProperties:!1,description:"Typed coverage of a read-only Git result: the sorted, de-duplicated set\nof degradations observed while capturing it.",properties:{degradations:{items:{$ref:"#/$defs/GitDegradationV1"},type:"array"}},required:["degradations"],type:"object"},yk={description:"Typed coverage/degradation reasons for a read-only Git result. A result\ncarrying any degradation is truthful but not complete; callers must not\ntreat it as a clean full view.",oneOf:[{enum:["detached_head","unborn_branch","sparse_checkout","split_index","unreadable_state","unsupported_object_format","in_progress_operation","shallow_boundary","truncated_output"],type:"string"},{const:"ignored_collision",description:"Ignored content shares a directory with live tracked/untracked\nentries, so the untracked/ignored view may be collapsed by Git.",type:"string"},{const:"conflicted_state",description:"Unmerged index stages are present.",type:"string"},{const:"submodule_state",description:"Submodule entries exist; the adapter does not recurse into them.",type:"string"}]},yw={description:"A native Git file mode as stored in tree/index records (six octal digits,\ne.g. `100644`, `100755`, `120000` symlink, `160000` gitlink/submodule).",type:"string"},yR={description:"Native HEAD state. Missing, unborn, and detached states are explicit,\nnever guessed.",oneOf:[{properties:{branch:{type:"string"},commit:{$ref:"#/$defs/GitOidV1"},state:{const:"attached",type:"string"}},required:["state","branch","commit"],type:"object"},{properties:{commit:{$ref:"#/$defs/GitOidV1"},state:{const:"detached",type:"string"}},required:["state","commit"],type:"object"},{properties:{branch:{type:"string"},state:{const:"unborn",type:"string"}},required:["state","branch"],type:"object"}]},yP={enum:["disabled","probe_private_preview"],type:"string"},yV={additionalProperties:!1,description:"Expected index entry state for compare-and-swap: blob identity (or\nabsent), mode, and unmerged-stage state. `unmerged_stage` is `None` for a\nmerged (stage-0) entry.",properties:{blob:{$ref:"#/$defs/GitBlobExpectationV1"},mode:{anyOf:[{$ref:"#/$defs/GitFileModeV1"},{type:"null"}]},unmerged_stage:{format:"uint8",maximum:255,minimum:0,type:["integer","null"]}},required:["blob"],type:"object"},yq={description:"Strongly typed canonical identity: `GitIndexPreviewId`.",type:"string"},yI={description:"The only native Git mutations represented by the index-transaction runtime. Generic Git execution,\nref rewrites, commits, merge/rebase/cherry-pick, push, and worktree writes are\ndeliberately absent.",enum:["stage_hunks","unstage_hunks"],type:"string"},yx={description:"A native Git object id (commit, tree, or blob), lowercase hex, SHA-1 or\nSHA-256 length. This is identity evidence only; it never authorizes\nobject reconstruction or traversal outside native Git.",type:"string"},yj={description:"In-progress native Git operation state, read from repository metadata.",enum:["none","merge","rebase","cherry_pick","revert","bisect","sequencer","unknown"],type:"string"},yC={description:"Whether a bounded page holds every answer or stopped at its limit.",enum:["complete","partial"],type:"string"},yT={enum:["complete"],type:"string"},yO={enum:["partial"],type:"string"},yE={enum:["unavailable"],type:"string"},yA={enum:["result_limit"],type:"string"},yM={additionalProperties:!1,properties:{branch:{type:["string","null"]},commit:{type:["string","null"]},worktree:{type:["string","null"]}},type:"object"},yW={description:"Flat public selector for an admitted Git diff scope.\n\nThis intentionally differs from [`tracedecay_domain::GitDiffScopeV1`]: MCP\nand CLI accept `scope`, `base`, and `head` as sibling fields, then\ntransport parsing builds the canonical domain scope after checking their\nlegal combinations.",enum:["working_tree","staged","commit_range"],type:"string"},yN={enum:["git"],type:"string"},yz={additionalProperties:!1,properties:{kind:{$ref:"#/$defs/GitToolErrorKindV1"},message:{type:"string"},operation:{$ref:"#/$defs/GitToolOperationV1"}},required:["kind","operation","message"],type:"object"},yD={additionalProperties:!1,description:"Git itself refused the refs, worktree status, or history the tool reads.",properties:{error:{$ref:"#/$defs/GitToolErrorV1"}},required:["error"],type:"object"},yF={description:"The git step that refused the read.",enum:["diff","status","log"],type:"string"},yL={additionalProperties:!1,properties:{binding_digest:{$ref:"#/$defs/ManifestDigest"},consumed_at:{$ref:"#/$defs/UtcMicros"},input_digest:{$ref:"#/$defs/ManifestDigest"},receipt_digest:{$ref:"#/$defs/ManifestDigest"},request_id:{type:"string"},token_digest:{$ref:"#/$defs/ManifestDigest"}},required:["binding_digest","token_digest","request_id","input_digest","consumed_at","receipt_digest"],type:"object"},yU={enum:["forbid_force_and_rebase"],type:"string"},yH={description:"Strongly typed canonical identity: `HostInstanceId`.",type:"string"},yG={description:"`HunkRef` operation direction: working tree to index, or index to\nHEAD/base. No other direction is encodable.",enum:["working_tree_to_index","index_to_head"],type:"string"},yB={additionalProperties:!1,description:"Immutable hunk identity for compare-and-swap. A hunk is identified by exact repository,\ndirection, path, expected base/index/worktree identity, normalized hunk\nheader, context and patch digests, and the preview that issued the\nreference, never by display ordinal or line number alone.\n\nquery mints these as read-only identity evidence only. Applying them is a\ndaemon Git mutation path and is not representable here.",properties:{attributes_digest:{anyOf:[{$ref:"#/$defs/ManifestDigest"},{type:"null"}],description:"Attributes/filter identity relevant to clean/smudge and EOL handling."},context_digest:{$ref:"#/$defs/ManifestDigest"},direction:{$ref:"#/$defs/HunkDirectionV1"},expected_base_blob:{$ref:"#/$defs/GitBlobExpectationV1"},expected_index_entry:{$ref:"#/$defs/GitIndexEntryExpectationV1"},expected_worktree_blob:{anyOf:[{$ref:"#/$defs/GitBlobExpectationV1"},{type:"null"}],description:"Expected working-tree identity when the operation reads the worktree:\na native content digest or explicit absent-file state. `None` means\nthe operation direction does not read the worktree."},expected_worktree_mode:{anyOf:[{$ref:"#/$defs/GitFileModeV1"},{type:"null"}]},hunk_header:{description:"Normalized `@@ -o,l +n,m @@` header text.",type:"string"},original_path:{description:"Old path for a rename or copy.",type:["string","null"]},patch_digest:{$ref:"#/$defs/ManifestDigest"},path:{type:"string"},preview_id:{type:"string"},repository:{$ref:"#/$defs/RepositoryId"},schema_version:{type:"string"},selected_line_bitmap:{description:"Selected hunk-line bitmap (little-endian word order, line 1 = bit 0\nof word 0). Full-hunk identity covers the larger old/new side so\ndeletion-only hunks remain representable.",items:{format:"uint64",minimum:0,type:"integer"},type:"array"},snapshot_digest:{$ref:"#/$defs/ManifestDigest"},worktree:{$ref:"#/$defs/WorktreeId"}},required:["repository","worktree","direction","path","expected_base_blob","expected_index_entry","hunk_header","context_digest","patch_digest","selected_line_bitmap","preview_id","schema_version","snapshot_digest"],type:"object"},yK={enum:["available","retained_but_unavailable","redacted","deleted","retention_expired","unauthorized","locked","unverifiable"],type:"string"},yJ={description:"p50/p95/p99 for one provider operation latency stage.",properties:{p50:{$ref:"#/$defs/MetricValueV1"},p95:{$ref:"#/$defs/MetricValueV1"},p99:{$ref:"#/$defs/MetricValueV1"}},required:["p50","p95","p99"],type:"object"},yZ={oneOf:[{properties:{state:{const:"ready",type:"string"}},required:["state"],type:"object"},{properties:{state:{const:"denied",type:"string"}},required:["state"],type:"object"},{properties:{state:{const:"cancelled",type:"string"}},required:["state"],type:"object"},{properties:{state:{const:"timed_out",type:"string"}},required:["state"],type:"object"},{properties:{reason:{type:"string"},state:{const:"unavailable",type:"string"}},required:["state","reason"],type:"object"},{properties:{diagnostic:{type:"string"},state:{const:"failed",type:"string"}},required:["state","diagnostic"],type:"object"}]},yQ={additionalProperties:!1,properties:{limit:{format:"uint64",minimum:0,type:"integer"},offset:{format:"uint64",minimum:0,type:"integer"},returned_chars:{format:"uint64",minimum:0,type:"integer"},total_chars:{format:"uint64",minimum:0,type:"integer"},truncated:{type:"boolean"}},required:["offset","limit","returned_chars","total_chars","truncated"],type:"object"},yX={description:"Whether historical discovery, projection publication, and summary\nconvergence have all settled for everything the store's sources hold.",oneOf:[{const:"converging",description:"A stage still owes committed work.",type:"string"},{const:"converged",description:"The worker committed the last owed item and has nothing pending.",type:"string"},{const:"blocked",description:"Every runnable stage settled, but historical discovery is blocked.",type:"string"},{const:"unavailable",description:"No worker is serving the store.",type:"string"}]},yY={additionalProperties:!1,properties:{converged_at_unix_micros:{description:"When the latest convergence event was published.",format:"int64",type:["integer","null"]},epoch:{description:"Convergence events this worker has published; a larger value is a\nnewer event.",format:"uint64",minimum:0,type:"integer"},reason:{description:"The historical discovery blocker when `state` is `blocked`.",type:["string","null"]},state:{$ref:"#/$defs/LcmConvergenceStateV1"}},required:["state","epoch"],type:"object"},y1={description:"Whether the refresh worker that serves this store's temporal projection\nis current, still converging history, or not serving at all.",enum:["current","stale","unavailable"],type:"string"},y0={additionalProperties:!1,description:"The temporal projection's serving state at diagnosis time. A store whose\nschema is healthy can still have nothing to serve while history is being\nre-derived (for example on a fresh profile); this is where\nthat state is named instead of being read as absent data.",properties:{convergence:{$ref:"#/$defs/LcmConvergenceV1"},reason:{description:"Machine reason for a non-current state: `historical_convergence`,\n`historical_retry:`, `historical_blocked:`, or the worker\nunavailability (`worker_missing`, `worker_recovering`, `worker_stalled`,\n`worker_stopped`).",type:["string","null"]},state:{$ref:"#/$defs/LcmDoctorProjectionStateV1"},worker:{$ref:"#/$defs/RetrievalWorkerStatusV1"}},required:["state","worker","convergence"],type:"object"},y2={additionalProperties:!1,properties:{content:{type:"string"},content_hash:{type:"string"},message_id:{type:"string"},metadata_json:{type:["string","null"]},ordinal:{format:"int64",type:"integer"},payload_ref:{type:["string","null"]},provider:{type:"string"},role:{type:"string"},session_id:{type:"string"},storage_kind:{$ref:"#/$defs/LcmStorageKindV1"},store_id:{format:"int64",type:"integer"},timestamp:{format:"int64",type:["integer","null"]}},required:["provider","message_id","session_id","store_id","role","ordinal","content","content_hash","storage_kind"],type:"object"},y4={oneOf:[{properties:{freshness:{$ref:"#/$defs/TemporalFreshnessV1"},outcome:{const:"complete",type:"string"}},required:["outcome","freshness"],type:"object"},{properties:{freshness:{$ref:"#/$defs/TemporalFreshnessV1"},omitted:{format:"uint64",minimum:0,type:"integer"},outcome:{const:"partial",type:"string"}},required:["outcome","freshness","omitted"],type:"object"},{properties:{freshness:{$ref:"#/$defs/TemporalFreshnessV1"},outcome:{const:"stale",type:"string"}},required:["outcome","freshness"],type:"object"}]},y6={oneOf:[{properties:{kind:{const:"raw_message",type:"string"},store_id:{format:"int64",type:"integer"}},required:["kind","store_id"],type:"object"},{properties:{kind:{const:"summary_node",type:"string"},node_id:{type:"string"}},required:["kind","node_id"],type:"object"}]},y3={enum:["inline","external","canonical_occurrence"],type:"string"},y9={description:"One provider's summarizer executable: absent by default, or the exact\nabsolute path the operator configured with its optional tuning.",oneOf:[{properties:{state:{const:"unconfigured",type:"string"}},required:["state"],type:"object"},{properties:{canonical_path:{type:"string"},model:{description:"Model requested for summary turns; the provider default when absent.",type:["string","null"]},state:{const:"configured",type:"string"},timeout_secs:{description:"Wall-clock budget for one summary run, within\n[`LCM_SUMMARIZER_TIMEOUT_SECS_RANGE`]; the caller's default when absent.",format:"uint64",minimum:0,type:["integer","null"]}},required:["state","canonical_path"],type:"object"}]},y5={additionalProperties:!1,description:"The per-provider summarizer executables one configuration snapshot admits.",properties:{codex:{$ref:"#/$defs/LcmSummarizerExecutableV1",default:{state:"unconfigured"},description:"`codex`, driven over app-server JSON-RPC for Codex sessions."},cursor_agent:{$ref:"#/$defs/LcmSummarizerExecutableV1",default:{state:"unconfigured"},description:"`cursor-agent`, asked for a summary of Cursor sessions."}},type:"object"},y8={additionalProperties:!1,properties:{conversation_id:{type:"string"},created_at:{format:"int64",type:"integer"},depth:{format:"int64",type:"integer"},expand_hint:{type:["string","null"]},metadata_json:{type:["string","null"]},node_id:{type:"string"},provider:{type:"string"},session_id:{type:"string"},source_refs:{items:{$ref:"#/$defs/LcmSourceRefV1"},type:"array"},source_time_end:{format:"int64",type:["integer","null"]},source_time_start:{format:"int64",type:["integer","null"]},source_token_count:{format:"int64",type:"integer"},summary_hash:{type:"string"},summary_text:{type:"string"},summary_token_count:{format:"int64",type:"integer"}},required:["node_id","provider","conversation_id","session_id","depth","summary_text","summary_hash","source_refs","summary_token_count","source_token_count","created_at"],type:"object"},y7={additionalProperties:!1,properties:{anchors:{items:{type:"string"},type:"array"},authorized_root:{type:["string","null"]},coverage:{$ref:"#/$defs/TemporalCoverageV1"},explanations:{items:{$ref:"#/$defs/TemporalExplanationV1"},type:"array"},next_cursor:{type:["string","null"]},omissions:{items:{$ref:"#/$defs/TemporalOmissionV1"},type:"array"},source_coverage:{items:{$ref:"#/$defs/SessionSourceCoverageV1"},type:"array"},watermarks:{$ref:"#/$defs/TemporalWatermarksV1"}},required:["anchors","watermarks","coverage","explanations"],type:"object"},ge={description:"Why a site the lexical lane admitted for a caller anchor is absent from\nthe response.",oneOf:[{const:"diversity_cap",description:"Collapsed as a duplicate or held back by the per-file diversity cap.",type:"string"},{const:"outside_page",description:"Ranked, but outside the returned page: an earlier page, or behind\n`next_cursor`.",type:"string"},{const:"not_hydrated",description:"On the page, but late hydration returned no source for it.",type:"string"},{const:"out_of_scope",description:"Outside the caller's scope prefix.",type:"string"}]},gt={additionalProperties:!1,description:"Anchor sites one serving stage removed from the response.",properties:{reason:{$ref:"#/$defs/LexicalAnchorDropReasonV1"},sites:{format:"uint64",minimum:0,type:"integer"}},required:["reason","sites"],type:"object"},gr={description:"Strongly typed algorithm-tagged integrity digest: `LocatorDigest`.",type:"string"},gi={description:"Strongly typed canonical identity: `LogicalCopyClusterId`.",type:"string"},go={description:"Strongly typed canonical identity: `LogicalEvidenceId`.",type:"string"},gn={enum:["global","project"],type:"string"},ga={properties:{absorbed_into:{type:["string","null"]},activated_at:{format:"int64",type:["integer","null"]},archived_reason:{type:["string","null"]},category:{type:"string"},checksum:{type:"string"},created_at:{format:"int64",type:"integer"},id:{type:"string"},materialization_scope:{$ref:"#/$defs/ManagedSkillMaterializationScope"},pinned:{type:"boolean"},provenance:{$ref:"#/$defs/ManagedSkillProvenance"},routing_description:{type:"string"},state:{$ref:"#/$defs/ManagedSkillState"},summary:{type:"string"},targets:{default:["cursor","codex","claude","agents","opencode","kimi","kiro","hermes"],items:{$ref:"#/$defs/SkillInstallTarget"},type:"array"},title:{type:"string"},updated_at:{format:"int64",type:"integer"}},required:["id","title","summary","routing_description","category","state","pinned","checksum","created_at","updated_at","provenance"],type:"object"},gs={properties:{actor:{type:"string"},run_id:{type:["string","null"]},source:{$ref:"#/$defs/ManagedSkillSource"}},required:["source","actor"],type:"object"},gd={enum:["automation_run","user","import"],type:"string"},gc={enum:["active","disabled","archived"],type:"string"},gl={description:"Strongly typed algorithm-tagged integrity digest: `ManifestDigest`.",type:"string"},gp={description:"The only Git histories this product operation can create.",enum:["fast_forward","two_parent_merge","cherry_pick_exact_commits"],type:"string"},gu={enum:["project","user"],type:"string"},gm={enum:["all","parents_only","subagents_only"],type:"string"},gf={enum:["all","direct_user","tool_result"],type:"string"},gh={properties:{calibration_revision:{type:"string"},cohort_revision:{type:"string"},drift_valid:{type:"boolean"},estimator_revision:{type:"string"},support:{format:"uint64",minimum:0,type:"integer"}},required:["estimator_revision","calibration_revision","cohort_revision","support","drift_valid"],type:"object"},gy={properties:{descriptor_revision:{type:"string"},eligible_population:{type:"string"}},required:["descriptor_revision","eligible_population"],type:"object"},gg={properties:{censored:{format:"uint64",minimum:0,type:"integer"},completed:{format:"uint64",minimum:0,type:"integer"},eligible:{description:"Exact denominator cardinality. `None` means the denominator is unknown.",format:"uint64",minimum:0,type:["integer","null"]},excluded:{format:"uint64",minimum:0,type:"integer"},observed:{format:"uint64",minimum:0,type:"integer"},state:{$ref:"#/$defs/CoverageStateV1"},unknown:{format:"uint64",minimum:0,type:"integer"}},required:["observed","completed","censored","unknown","excluded","state"],type:"object"},g_={enum:["measurement","association","calibrated_prediction"],type:"string"},gv={properties:{projector_revision:{type:"string"},source:{$ref:"#/$defs/MetricSourceV1"},source_revision:{type:"string"},watermark:{type:"string"}},required:["source","source_revision","projector_revision","watermark"],type:"object"},gb={enum:["observability_envelope","feedback_observations","provider_usage_observation","savings_ledger"],type:"string"},g$={properties:{baseline_watermark:{type:["string","null"]},delta:{format:"double",type:["number","null"]},horizon:{$ref:"#/$defs/ObservabilityHorizonV1"}},required:["horizon"],type:"object"},gS={properties:{lower:{format:"double",type:["number","null"]},reason:{type:["string","null"]},upper:{format:"double",type:["number","null"]}},type:"object"},gk={properties:{calibration:{anyOf:[{$ref:"#/$defs/MetricCalibrationV1"},{type:"null"}]},cohort:{$ref:"#/$defs/MetricCohortV1"},coverage:{$ref:"#/$defs/MetricCoverageV1"},denominator:{type:"string"},denominator_value:{format:"uint64",minimum:0,type:["integer","null"]},descriptor_revision:{type:"string"},evidence_class:{$ref:"#/$defs/MetricEvidenceClassV1"},metric:{type:"string"},provenance:{$ref:"#/$defs/MetricProvenanceV1"},temporal:{$ref:"#/$defs/MetricTemporalV1"},unavailable_reason:{type:["string","null"]},uncertainty:{$ref:"#/$defs/MetricUncertaintyV1"},unit:{type:"string"},value:{description:"Aggregate value. It is absent whenever its denominator or coverage is\ninsufficient; observed lower bounds remain available in `coverage`.",format:"double",type:["number","null"]}},required:["descriptor_revision","metric","unit","denominator","coverage","evidence_class","provenance","cohort","temporal","uncertainty"],type:"object"},gw={additionalProperties:!1,description:"A file that historically changes with `partner_of` but is missing from the\nchange set under review, e.g. a migration beside its schema.",properties:{co_changes:{description:"Commits that changed both `partner_of` and `file`.",format:"uint64",minimum:0,type:"integer"},file:{type:"string"},partner_of:{type:"string"},partner_of_changes:{description:"Commits that changed `partner_of`.",format:"uint64",minimum:0,type:"integer"}},required:["file","partner_of","co_changes","partner_of_changes"],type:"object"},gR={additionalProperties:!1,description:"Frozen continuation identity shared by all participating roots.",properties:{digest:{$ref:"#/$defs/ManifestDigest"},next_page:{format:"uint64",minimum:1,type:"integer"},order_digest:{$ref:"#/$defs/ManifestDigest"},query_digest:{$ref:"#/$defs/ManifestDigest"},root_cursors:{items:{$ref:"#/$defs/RootScopeOutcomeV1_for_Nullable_string"},type:"array"},root_generations:{items:{$ref:"#/$defs/RootScopeOutcomeV1_for_Nullable_RootGenerationV1"},type:"array"},scope_set_digest:{$ref:"#/$defs/ManifestDigest"}},required:["scope_set_digest","root_generations","root_cursors","query_digest","order_digest","next_page","digest"],type:"object"},gP={description:"Strongly typed canonical identity: `NativeIntegrationApprovalId`.",type:"string"},gV={description:"Explicit direction of one integration. Stack meaning is never inferred.",enum:["propagate_dependency_to_dependent","land_dependent_into_dependency","integrate_independent_branch"],type:"string"},gq={description:"Truthful preview classification. Only `MechanicalIntegrationEligible`\ncarries apply-eligible evidence.",oneOf:[{properties:{detail:{$ref:"#/$defs/MechanicalIntegrationModeV1"},state:{const:"mechanical_integration_eligible",type:"string"}},required:["state","detail"],type:"object"},{properties:{state:{const:"already_integrated",type:"string"}},required:["state"],type:"object"},{properties:{detail:{properties:{conflict_digest:{$ref:"#/$defs/ManifestDigest"}},required:["conflict_digest"],type:"object"},state:{const:"native_conflict",type:"string"}},required:["state","detail"],type:"object"},{properties:{detail:{properties:{evidence_digest:{$ref:"#/$defs/ManifestDigest"}},required:["evidence_digest"],type:"object"},state:{const:"semantic_review_required",type:"string"}},required:["state","detail"],type:"object"},{properties:{detail:{properties:{reason:{$ref:"#/$defs/NativeIntegrationUnavailabilityV1"}},required:["reason"],type:"object"},state:{const:"partial",type:"string"}},required:["state","detail"],type:"object"},{properties:{detail:{properties:{reason:{$ref:"#/$defs/NativeIntegrationUnavailabilityV1"}},required:["reason"],type:"object"},state:{const:"unavailable",type:"string"}},required:["state","detail"],type:"object"}]},gI={description:"Strongly typed canonical identity: `NativeIntegrationPreviewId`.",type:"string"},gx={additionalProperties:!1,description:"Canonical stack-snapshot proof returned by `stack_snapshot` and consumed\nverbatim by preflight.",properties:{authorized_scope_set_digest:{$ref:"#/$defs/ManifestDigest"},authorized_scope_set_id:{$ref:"#/$defs/ScopeSetId"},authorized_scope_set_revision:{$ref:"#/$defs/ScopeSetRevision"},destination:{$ref:"#/$defs/ResolvedScope"},grant_digest:{$ref:"#/$defs/ManifestDigest"},inventory_epoch:{$ref:"#/$defs/WorktreeInventoryEpoch"},inventory_snapshot_id:{$ref:"#/$defs/WorktreeInventorySnapshotId"},policy_digest:{$ref:"#/$defs/ManifestDigest"},selection:{$ref:"#/$defs/NativeIntegrationSelectionBindingV1"},source:{$ref:"#/$defs/ResolvedScope"}},required:["source","destination","authorized_scope_set_id","authorized_scope_set_revision","authorized_scope_set_digest","inventory_snapshot_id","inventory_epoch","selection","grant_digest","policy_digest"],type:"object"},gj={description:"Canonically sealed selection passed to the topology authority.\n\n`stack_snapshot` requests carry declaration content; its boundary seals\nthat declaration into this proof, and preflight accepts the proof verbatim.\nThe topology authority never discovers roots or edges.",oneOf:[{properties:{binding:{properties:{declared_revision:{$ref:"#/$defs/BranchStackRevisionV1"},destination_node_id:{$ref:"#/$defs/StackNodeId"},direction:{$ref:"#/$defs/NativeIntegrationDirectionV1"},revision_digest:{$ref:"#/$defs/ManifestDigest"},revision_id:{$ref:"#/$defs/BranchStackRevisionId"},source_node_id:{$ref:"#/$defs/StackNodeId"},stack_id:{$ref:"#/$defs/BranchStackId"}},required:["stack_id","revision_id","revision_digest","declared_revision","source_node_id","destination_node_id","direction"],type:"object"},kind:{const:"declared_stack_edge",type:"string"}},required:["kind","binding"],type:"object"},{properties:{binding:{properties:{destination_ref:{$ref:"#/$defs/RefId"},proposal_digest:{$ref:"#/$defs/ManifestDigest"},source_ref:{$ref:"#/$defs/RefId"}},required:["proposal_digest","source_ref","destination_ref"],type:"object"},kind:{const:"independent_branch",type:"string"}},required:["kind","binding"],type:"object"}]},gC={description:"The only truthful terminal outcomes after recovery.",enum:["committed","aborted_no_change","rolled_back","needs_inspection"],type:"string"},gT={description:"Strongly typed canonical identity: `NativeIntegrationTransactionId`.",type:"string"},gO={description:"Why a preflight cannot authorize apply.",enum:["partial_evidence","stale_scope","denied","native_state_unavailable","reset_required","durability_uncertain","unsupported_hooks","signing_required","destination_occupied"],type:"string"},gE={description:"A target selected by exact registered identity. Repository inventory names\none repository; cleanup names one worktree within that repository.",oneOf:[{properties:{kind:{const:"repository",type:"string"},project_id:{$ref:"#/$defs/ProjectId"},repository_id:{$ref:"#/$defs/RepositoryId"}},required:["kind","project_id","repository_id"],type:"object"},{properties:{kind:{const:"worktree",type:"string"},project_id:{$ref:"#/$defs/ProjectId"},repository_id:{$ref:"#/$defs/RepositoryId"},worktree_id:{$ref:"#/$defs/WorktreeId"}},required:["kind","project_id","repository_id","worktree_id"],type:"object"}]},gA={additionalProperties:!1,properties:{body:{format:"uint64",minimum:0,type:"integer"},full_file:{format:"uint64",minimum:0,type:"integer"}},required:["body","full_file"],type:"object"},gM={properties:{since_micros:{format:"int64",type:"integer"},until_micros:{format:"int64",type:"integer"}},required:["since_micros","until_micros"],type:"object"},gW={additionalProperties:!1,description:"Stable logical identity of one provider observation source.\n\nThe session identity is provider-native evidence. The physical file identity\nis represented separately by [`ObservationSourceGenerationV1`].",properties:{provider:{$ref:"#/$defs/ProviderId"},session_id:{$ref:"#/$defs/SessionId"},source_key:{anyOf:[{$ref:"#/$defs/SessionId"},{type:"null"}]}},required:["provider","session_id"],type:"object"},gN={properties:{analytics_mode:{$ref:"#/$defs/AnalyticsModeReadModelV1"},authorized_scope_ref:{type:"string"},comparison:{$ref:"#/$defs/PerformanceComparisonReadModelV1"},current:{type:"boolean"},horizon:{$ref:"#/$defs/ObservabilityHorizonV1"},metrics:{items:{$ref:"#/$defs/MetricValueV1"},type:"array"},observed_at_micros:{format:"int64",type:"integer"},rejected_arguments:{$ref:"#/$defs/RejectedArgumentAnalyticsV1"},watermark:{type:"string"}},required:["authorized_scope_ref","horizon","watermark","observed_at_micros","current","metrics","analytics_mode","comparison","rejected_arguments"],type:"object"},gz={additionalProperties:!1,description:"Structured occurrence provenance retained through fusion. Fusion\npreserves each exact `(source_occurrence_id, retriever_evidence_anchor)`\npair; parallel unassociated provenance vectors are forbidden.",properties:{evidence_role:{$ref:"#/$defs/EvidenceRole"},file_occurrence_id:{anyOf:[{$ref:"#/$defs/FileOccurrenceId"},{type:"null"}]},freshness:{$ref:"#/$defs/SourceFreshness"},logical_copy_cluster_id:{anyOf:[{$ref:"#/$defs/LogicalCopyClusterId"},{type:"null"}]},logical_copy_evidence_anchor:{anyOf:[{$ref:"#/$defs/RetrievalAnchorId"},{type:"null"}]},repository_id:{anyOf:[{$ref:"#/$defs/RepositoryId"},{type:"null"}]},retriever_evidence_anchor:{$ref:"#/$defs/RetrievalAnchorId"},session_or_thread_id:{anyOf:[{$ref:"#/$defs/SessionOrThreadId"},{type:"null"}]},source_namespace:{$ref:"#/$defs/SourceNamespace"},source_occurrence_id:{$ref:"#/$defs/SourceOccurrenceId"}},required:["source_occurrence_id","retriever_evidence_anchor","source_namespace","evidence_role","freshness"],type:"object"},gD={additionalProperties:!1,description:"Bounded work accounting supplied by an owning port or transaction.",properties:{bytes_consumed:{format:"uint64",minimum:0,type:"integer"},elapsed_micros:{format:"uint64",minimum:0,type:"integer"},units_consumed:{format:"uint64",minimum:0,type:"integer"}},required:["units_consumed","bytes_consumed","elapsed_micros"],type:"object"},gF={additionalProperties:!1,description:"Canonical operation evidence. An admitted failure remains represented here\nrather than being replaced by a transport exception.",properties:{budget:{$ref:"#/$defs/OperationBudgetUsage"},cancellation:{anyOf:[{$ref:"#/$defs/CancellationObservation"},{type:"null"}]},effective_deadline:{$ref:"#/$defs/Deadline"},ended_at:{$ref:"#/$defs/UtcMicros"},started_at:{$ref:"#/$defs/UtcMicros"},termination:{$ref:"#/$defs/OperationTermination"}},required:["started_at","ended_at","effective_deadline","budget","termination"],type:"object"},gL={description:"Terminal state after an operation has been admitted.",enum:["completed","cancelled","timed_out","failed","unavailable","partial","effect_unknown"],type:"string"},gU={additionalProperties:!1,description:"Bounded opaque page request. Resume authorization occurs before an adapter\ndecodes or hydrates the cursor.",properties:{cursor:{description:"Opaque resume token. The identifier type is deliberately absent from the\ngenerated schema surface, so the public wire form is its bounded string.",type:["string","null"]},page_size:{format:"uint32",minimum:0,type:"integer"}},required:["page_size"],type:"object"},gH={properties:{baseline_build:{type:["string","null"]},candidate_build:{type:["string","null"]},configuration:{type:["string","null"]},corpus:{type:["string","null"]},coverage:{$ref:"#/$defs/MetricCoverageV1"},disposition:{$ref:"#/$defs/ComparisonDispositionV1"},eligible_outcomes:{format:"uint64",minimum:0,type:["integer","null"]},environment:{type:["string","null"]},oracle:{type:["string","null"]},paired_outcomes:{format:"uint64",minimum:0,type:["integer","null"]},platform:{type:["string","null"]},regression_observed:{type:["boolean","null"]},rollback_profile:{type:["string","null"]},unavailable_reason:{type:["string","null"]},workload:{type:["string","null"]}},required:["disposition","coverage"],type:"object"},gG={description:"Whether the served code generation is known current at serve time.",enum:["fresh","possibly_stale"],type:"string"},gB={additionalProperties:!1,description:"The indexing state behind a `possibly_stale` verdict: the served\ngeneration, the scheduler's latest sealed generation, its staleness-ladder\nstate, and the lanes that answered from an older generation. `summary` is\nthe one-line rendering agents read.",properties:{latest_generation:{type:["string","null"]},parked:{anyOf:[{$ref:"#/$defs/CodeIndexConvergenceParkedV1"},{type:"null"}],description:"The park holding convergence until the operator applies its remedy.\nNo wake retries it, so repeating the request cannot change the answer."},reason:{type:["string","null"]},rebuild_in_flight:{type:["boolean","null"]},served_generation:{type:["string","null"]},stale_lanes:{items:{type:"string"},type:"array"},staleness_state:{anyOf:[{$ref:"#/$defs/CodeIndexStalenessStateV1"},{type:"null"}]},summary:{type:"string"}},required:["summary"],type:"object"},gK={enum:["complete"],type:"string"},gJ={additionalProperties:!1,properties:{freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},message:{type:"string"},node_id:{type:"string"},reason_code:{type:"string"},status:{type:"string"},suggestions:{description:"Nearest served symbols by edit distance to the requested id, by id,\nsimple name, or qualified name.",items:{$ref:"#/$defs/PrimitiveSymbolLocationV1"},type:"array"}},required:["status","reason_code","node_id","message"],type:"object"},gZ={enum:["full","partial"],type:"string"},gQ={additionalProperties:!1,description:"Freshness verdict carried by every search and context response. `indexing`\nis present exactly when the state is `possibly_stale`.",properties:{indexing:{anyOf:[{$ref:"#/$defs/PrimitiveIndexingStateV1"},{type:"null"}]},state:{$ref:"#/$defs/PrimitiveFreshnessStateV1"}},required:["state"],type:"object"},gX={additionalProperties:!1,properties:{language:{type:["string","null"]},provider:{type:["string","null"]},reason:{type:"string"}},required:["reason"],type:"object"},gY={additionalProperties:!1,properties:{end_line:{format:"uint32",minimum:0,type:"integer"},file:{type:"string"},kind:{type:"string"},name:{type:"string"},node_id:{type:"string"},qualified_name:{type:"string"},start_line:{format:"uint32",minimum:0,type:"integer"},unavailable_fields:{items:{type:"string"},type:"array"}},required:["node_id","name","qualified_name","kind","file","start_line","end_line","unavailable_fields"],type:"object"},g1={additionalProperties:!1,properties:{detail:{type:"string"},reason_code:{type:"string"},retryable:{type:"boolean"},status:{$ref:"#/$defs/PrimitiveUnavailableStatusV1"}},required:["status","reason_code","retryable","detail"],type:"object"},g0={enum:["unavailable"],type:"string"},g2={description:"Strongly typed canonical identity: `ProjectId`.",type:"string"},g4={properties:{alias_count:{format:"uint",minimum:0,type:"integer"},artifact_count:{format:"uint",minimum:0,type:"integer"},branches:{items:{type:"string"},type:"array"},canonical_root:{type:"string"},default_branch:{description:"Repository default branch recorded at registration.",type:["string","null"]},head_branch:{description:"Branch the checkout's HEAD names now; `None` when HEAD is detached or\nno checkout of this project could be read.",type:["string","null"]},is_active:{type:["boolean","null"]},kind:{type:"string"},label:{type:"string"},last_seen_at:{format:"int64",type:"integer"},project_id:{type:"string"},project_root:{type:"string"},store_count:{format:"uint",minimum:0,type:"integer"}},required:["project_id","label","project_root","canonical_root","kind","branches","store_count","artifact_count","alias_count","last_seen_at"],type:"object"},g6={properties:{project_count:{format:"uint",minimum:0,type:"integer"},repo_count:{format:"uint",minimum:0,type:"integer"},truncated:{type:"boolean"}},required:["project_count","repo_count","truncated"],type:"object"},g3={properties:{branches:{items:{type:"string"},type:"array"},git_common_dir:{type:["string","null"]},label:{type:"string"},project_count:{format:"uint",minimum:0,type:"integer"},projects:{items:{$ref:"#/$defs/ProjectRegistryEntry"},type:"array"}},required:["label","project_count","branches","projects"],type:"object"},g9={description:"Strongly typed canonical identity: `ProjectionGenerationId`.",type:"string"},g5={description:"Strongly typed canonical identity: `ProposalId`.",type:"string"},g8={enum:["reject","require_human_approval_and_independent_review"],type:"string"},g7={additionalProperties:!1,properties:{disposition:{$ref:"#/$defs/ProtectedRefDispositionV1"},selector:{$ref:"#/$defs/ProtectedRefSelectorV1"}},required:["selector","disposition"],type:"object"},_e={oneOf:[{properties:{kind:{const:"native_default_branch",type:"string"}},required:["kind"],type:"object"},{properties:{kind:{const:"exact",type:"string"},value:{$ref:"#/$defs/CanonicalGitRefNameV1"}},required:["kind","value"],type:"object"},{properties:{kind:{const:"prefix",type:"string"},value:{$ref:"#/$defs/CanonicalGitRefPrefix"}},required:["kind","value"],type:"object"}]},_t={description:"Strongly typed canonical identity: `ProvenanceId`.",type:"string"},_r={description:"Complete provider states remain distinct. Empty findings are clean only\nwhen every requested provider completed with complete supported coverage.",enum:["supported_completed_complete","unsupported","absent","indexing","stale","cancelled","timed_out","failed","partial","unavailable"],type:"string"},_i={description:"Strongly typed canonical identity: `ProviderId`.",type:"string"},_o={description:"One provider/model cohort in the Costs latency read model.\n\nThe percentile cells are ordinary canonical metrics so every value carries\nits exact unit, horizon, denominator, coverage/censoring, and projector\nprovenance. Identity provenance is kept separately because latency is\nmeasured by `OperationResourceObservedV1`, while provider/model identity\nmay be joined from an exact `ProviderUsageObservationV1` request/session.",properties:{first_progress:{$ref:"#/$defs/LatencyDistributionReadModelV1"},identity_provenance:{$ref:"#/$defs/MetricProvenanceV1"},identity_unavailable_reason:{type:["string","null"]},model:{type:["string","null"]},provider:{type:["string","null"]},queue:{$ref:"#/$defs/LatencyDistributionReadModelV1"},service:{$ref:"#/$defs/LatencyDistributionReadModelV1"},start:{$ref:"#/$defs/LatencyDistributionReadModelV1"},terminal:{$ref:"#/$defs/LatencyDistributionReadModelV1"}},required:["identity_provenance","queue","start","first_progress","service","terminal"],type:"object"},_n={properties:{canonical_root:{type:"string"},created_at:{format:"int64",type:"integer"},default_branch:{description:"Repository default branch recorded at registration.",type:["string","null"]},display_root:{type:"string"},git_common_dir:{type:["string","null"]},head_branch:{description:"Branch the checkout's HEAD names now; `None` when HEAD is detached or\nno checkout of this project could be read.",type:["string","null"]},is_active:{type:["boolean","null"]},label:{type:"string"},last_seen_at:{format:"int64",type:"integer"},project_id:{type:"string"},project_root:{type:"string"}},required:["project_id","label","project_root","display_root","canonical_root","created_at","last_seen_at"],type:"object"},_a={enum:["owner_receipt","locally_measured","estimated","unknown"],type:"string"},_s={description:"Strongly typed canonical identity: `QueryCollectionId`.",type:"string"},_d={description:"Which endpoint of each counted edge the rank report ranks.",enum:["incoming","outgoing"],type:"string"},_c={description:"Relationship the rank report counts.",enum:["implements","extends","calls","uses","contains","annotates","derives_macro","type_of","returns","receives"],type:"string"},_l={additionalProperties:!1,description:"One recorded ranking decision. Explanations are rendered from this\nprovenance, never reconstructed from a final scalar score.",properties:{detail:{type:"string"},evidence_anchor:{anyOf:[{$ref:"#/$defs/RetrievalAnchorId"},{type:"null"}]},kind:{$ref:"#/$defs/RankingDecisionKind"},policy_anchor:{anyOf:[{$ref:"#/$defs/RetrievalAnchorId"},{type:"null"}]},retriever:{anyOf:[{$ref:"#/$defs/RetrieverKind"},{type:"null"}]}},required:["kind","detail"],type:"object"},_p={description:"The decision kinds the pipeline must record.",enum:["exact_tier_admission","same_source_duplicate_collapse","logical_copy_representative_selection","contradiction_preservation","diversity_cap","comparator_provenance","fallback"],type:"string"},_u={description:"Strongly typed canonical identity: `RefId`.",type:"string"},_m={additionalProperties:!1,description:"Exact registered root locator retained with an authorized scope.\n\n`canonical_root` is routing evidence for the already-resolved\n[`ResolvedScope`]. It cannot replace or manufacture that scope identity.",properties:{canonical_root:{type:"string"},profile:{$ref:"#/$defs/SharedProfileStoreLocatorV1"},project_id:{$ref:"#/$defs/ProjectId"}},required:["project_id","profile","canonical_root"],type:"object"},_f={description:"Frequency and rate projection for dispatcher rejected-argument observations.\n\nCounts may be known while `rejection_rate` stays absent: Plan 26 forbids\nfabricating a rate when the eligible-attempt denominator is unknown.",properties:{coverage:{$ref:"#/$defs/MetricCoverageV1"},eligible_attempts:{format:"uint64",minimum:0,type:["integer","null"]},groups:{items:{$ref:"#/$defs/RejectedArgumentGroupV1"},type:"array"},projector_revision:{type:"string"},redacted_name_count:{format:"uint64",minimum:0,type:"integer"},rejected_total:{format:"uint64",minimum:0,type:["integer","null"]},rejection_rate:{format:"double",type:["number","null"]},unavailable_reason:{type:["string","null"]},watermark:{type:"string"}},required:["coverage","projector_revision","watermark","redacted_name_count","groups"],type:"object"},_h={description:"Closed error class for a rejected surface argument.",enum:["missing","invalid_shape","out_of_bounds","unsupported","unauthorized","stale","unknown"],type:"string"},_y={description:"One surface \xd7 operation \xd7 argument \xd7 error-class cell in the rejected-argument view.",properties:{argument:{$ref:"#/$defs/RejectedArgumentNameV1"},count:{format:"uint64",minimum:0,type:"integer"},error_class:{$ref:"#/$defs/RejectedArgumentErrorClassV1"},operation:{type:"string"},rate:{description:"Eligible-attempt rate for this cell. Absent when the attempt\ndenominator or coverage is insufficient.",format:"double",type:["number","null"]},surface:{$ref:"#/$defs/RejectedArgumentSurfaceV1"}},required:["surface","operation","argument","error_class","count"],type:"object"},_g={description:"Normalized rejected-argument name. Raw flags, values, and tokens never\nenter this vocabulary.",enum:["request_body","pagination","request_handle","operation","lifecycle","unknown"],type:"string"},__={description:"Transport that rejected a surface argument. Unknown preserves missing\nattribution instead of inventing cli/mcp/http.",enum:["cli","mcp","http","unknown"],type:"string"},_v={description:"Strongly typed canonical identity: `RepositoryId`.",type:"string"},_b={oneOf:[{properties:{kind:{const:"all_authorized",type:"string"}},required:["kind"],type:"object"},{properties:{kind:{const:"allowlist",type:"string"},repositories:{items:{$ref:"#/$defs/RepositoryId"},type:"array",uniqueItems:!0}},required:["kind","repositories"],type:"object"}]},_$={enum:["successful_terminal"],type:"string"},_S={additionalProperties:!1,properties:{capability_id:{$ref:"#/$defs/CapabilityId"},expectation:{$ref:"#/$defs/RequiredCheckExpectationV1"},maximum_age_seconds:{format:"uint32",minimum:1,type:"integer"}},required:["capability_id","expectation","maximum_age_seconds"],type:"object"},_k={additionalProperties:!1,description:"The resolved configuration scope is one exact project/repository/worktree root.\n\nPaths, CWDs, labels, and mutable branch spellings are deliberately absent.",properties:{project_id:{$ref:"#/$defs/ProjectId"},reference:{anyOf:[{$ref:"#/$defs/RefId"},{type:"null"}]},repository_id:{$ref:"#/$defs/RepositoryId"},scope_digest:{$ref:"#/$defs/ManifestDigest"},worktree_id:{$ref:"#/$defs/WorktreeId"}},required:["project_id","repository_id","worktree_id","scope_digest"],type:"object"},_w={description:"Bounded output projection chosen by a concrete use case.",enum:["summary","evidence","references_only"],type:"string"},_R={additionalProperties:!1,properties:{code:{type:"string"},kind:{type:["string","null"]},maximum:{format:"uint",minimum:0,type:["integer","null"]},message:{type:"string"},observed:{format:"uint",minimum:0,type:["integer","null"]},reason:{type:["string","null"]},retryable:{type:["boolean","null"]}},required:["code","message"],type:"object"},_P={enum:["aborted","budget_exhausted","busy","cancelled","complete","complete_zero","cursor_manifest_limit_exceeded","deadline_exceeded","deleted","denied","error","failed","joined","locked","not_found","ok","partial","recorded","redacted","running","stale","started","unavailable","unsupported_filter","wrong_scope"],type:"string"},_V={anyOf:[{format:"uint64",minimum:0,type:"integer"},{type:"string"}],description:"The temporal filter intentionally retains the established integer-or-text\nwire form (Unix timestamps, RFC3339, and relative expressions)."},_q={description:"Strongly typed canonical identity: `RetrievalAnchorId`.",type:"string"},_I={description:"Stable semantic ordering; adapters may not replace it with transport order.",enum:["relevance","source_position","temporal_descending","stable_identity"],type:"string"},_x={additionalProperties:!1,properties:{order:{$ref:"#/$defs/RetrievalOrder"},page:{$ref:"#/$defs/PageRequest"},projection:{$ref:"#/$defs/ResultProjection"},temporal:{$ref:"#/$defs/TemporalModeV1"}},required:["temporal","page","projection","order"],type:"object"},_j={additionalProperties:!1,properties:{backlog:{format:"uint",minimum:0,type:"integer"},blocker:{type:["string","null"]},last_progress_at_unix_micros:{format:"int64",type:["integer","null"]},retry_class:{type:["string","null"]}},required:["backlog"],type:"object"},_C={description:"Runtime-backed retrieval lanes. Each lane is independently testable,\ndisableable, budgeted, and attributable; one lane is never an alias over\nanother.",enum:["exact_literal","lexical","graph","temporal","task_session","diagnostic"],type:"string"},_T={oneOf:[{properties:{kind:{const:"none",type:"string"}},required:["kind"],type:"object"},{properties:{count:{format:"uint16",maximum:65535,minimum:1,type:"integer"},kind:{const:"independent_review_count",type:"string"}},required:["kind","count"],type:"object"},{properties:{kind:{const:"code_owner_and_independent_review",type:"string"}},required:["kind"],type:"object"}]},_O={enum:["no_review","independent_review","standard_pull_requests","git_hub_stacked_pull_requests"],type:"string"},_E={additionalProperties:!1,properties:{allowed:{items:{$ref:"#/$defs/ReviewTopologyKindV1"},type:"array",uniqueItems:!0},github_stacked_prs:{$ref:"#/$defs/GitHubStackedPullRequestPolicyV1"}},required:["allowed","github_stacked_prs"],type:"object"},_A={additionalProperties:!1,description:"Immutable collection and stack revisions for one exact resolved root.",properties:{collection_revision:{$ref:"#/$defs/ManifestDigest"},generation_digest:{$ref:"#/$defs/ManifestDigest"},scope_digest:{$ref:"#/$defs/ManifestDigest"},stack_revision:{$ref:"#/$defs/ManifestDigest"}},required:["scope_digest","collection_revision","stack_revision","generation_digest"],type:"object"},_M={additionalProperties:!1,description:"One typed outcome pinned to the digest of an exact resolved root.",properties:{outcome:{$ref:"#/$defs/ScopeOutcome_for_Nullable_RootGenerationV1"},scope_digest:{$ref:"#/$defs/ManifestDigest"}},required:["scope_digest","outcome"],type:"object"},_W={additionalProperties:!1,description:"One typed outcome pinned to the digest of an exact resolved root.",properties:{outcome:{$ref:"#/$defs/ScopeOutcome_for_Nullable_string"},scope_digest:{$ref:"#/$defs/ManifestDigest"}},required:["scope_digest","outcome"],type:"object"},_N={enum:["allow","deny"],type:"string"},_z={description:"Strongly typed canonical identity: `RunId`.",type:"string"},_D={additionalProperties:!1,properties:{degraded_row:{type:["string","null"]},progress:{anyOf:[{$ref:"#/$defs/SchemaConvergenceProgressV1"},{type:"null"}]},stage:{$ref:"#/$defs/SchemaConvergenceStageV1"},started_at_micros:{format:"int64",type:"integer"},state:{$ref:"#/$defs/SchemaConvergenceStateV1"},store:{type:"string"}},required:["store","stage","state","started_at_micros"],type:"object"},_F={oneOf:[{additionalProperties:!1,properties:{done:{format:"uint64",minimum:0,type:"integer"},remaining:{format:"uint64",minimum:0,type:"integer"},unit:{const:"rows",type:"string"}},required:["unit","done","remaining"],type:"object"},{additionalProperties:!1,properties:{done:{format:"uint64",minimum:0,type:"integer"},remaining:{format:"uint64",minimum:0,type:"integer"},unit:{const:"pages",type:"string"}},required:["unit","done","remaining"],type:"object"}]},_L={enum:["registered_schema"],type:"string"},_U={enum:["pending_schema_migration","released_shape_convergence_in_progress","degraded","completed"],type:"string"},_H={additionalProperties:!1,description:"Restrictive policy input. An allow never grants capabilities absent from\nthe independently authorized capability set passed to the resolver.",properties:{authority:{$ref:"#/$defs/AuthorityRef"},capabilities:{items:{$ref:"#/$defs/CapabilityId"},type:"array",uniqueItems:!0},effect:{$ref:"#/$defs/RuleEffect"},expires_at:{anyOf:[{$ref:"#/$defs/UtcMicros"},{type:"null"}]},rule_id:{$ref:"#/$defs/AccessRuleId"},subject:{$ref:"#/$defs/ScopeAccessSubjectV1"}},required:["rule_id","subject","authority","capabilities","effect"],type:"object"},_G={additionalProperties:!1,description:"Typed rule selectors. Unset dimensions match all values at that dimension,\nbut at least one dimension must be constrained. Free-form paths, labels,\ncollection names, and branch names are deliberately absent.",properties:{actor:{anyOf:[{$ref:"#/$defs/ActorId"},{type:"null"}]},operation:{anyOf:[{$ref:"#/$defs/ScopeControlOperationV1"},{type:"null"}]},source_kind:{anyOf:[{$ref:"#/$defs/SourceKindV1"},{type:"null"}]}},type:"object"},_B={enum:["read","source_bind","source_rebind","source_unbind","access_rule_upsert","access_rule_remove","replace_topology_policy","rollback"],type:"string"},_K={description:"Truthful outcome for one authorized root or an aggregate over roots.\n\n`Denied` and `Unavailable` carry no value and therefore cannot be confused\nwith a successful empty result.",oneOf:[{properties:{outcome:{const:"exact",type:"string"},value:{anyOf:[{$ref:"#/$defs/RootGenerationV1"},{type:"null"}]}},required:["outcome","value"],type:"object"},{properties:{outcome:{const:"partial",type:"string"},value:{properties:{reason:{$ref:"#/$defs/ScopePartialReasonV1"},value:{anyOf:[{$ref:"#/$defs/RootGenerationV1"},{type:"null"}]}},required:["reason"],type:"object"}},required:["outcome","value"],type:"object"},{properties:{outcome:{const:"denied",type:"string"}},required:["outcome"],type:"object"},{properties:{outcome:{const:"unavailable",type:"string"},value:{properties:{reason:{$ref:"#/$defs/ScopeUnavailableReasonV1"}},required:["reason"],type:"object"}},required:["outcome","value"],type:"object"}]},_J={description:"Truthful outcome for one authorized root or an aggregate over roots.\n\n`Denied` and `Unavailable` carry no value and therefore cannot be confused\nwith a successful empty result.",oneOf:[{properties:{outcome:{const:"exact",type:"string"},value:{type:["string","null"]}},required:["outcome","value"],type:"object"},{properties:{outcome:{const:"partial",type:"string"},value:{properties:{reason:{$ref:"#/$defs/ScopePartialReasonV1"},value:{type:["string","null"]}},required:["reason"],type:"object"}},required:["outcome","value"],type:"object"},{properties:{outcome:{const:"denied",type:"string"}},required:["outcome"],type:"object"},{properties:{outcome:{const:"unavailable",type:"string"},value:{properties:{reason:{$ref:"#/$defs/ScopeUnavailableReasonV1"}},required:["reason"],type:"object"}},required:["outcome","value"],type:"object"}]},_Z={description:"Typed explanation for a root that returned usable but incomplete data.",enum:["incomplete","stale","budget_exceeded","root_denied","root_unavailable"],type:"string"},_Q={description:"Stable identity of one authorized scope-set record.",type:"string"},_X={description:"Monotonic optimistic-concurrency revision of one scope set.",format:"uint64",minimum:1,type:"integer"},_Y={additionalProperties:!1,description:"A source-to-authority binding. It stores only the source kind, a redacted\nlocator digest, and the pre-resolved authority reference.",properties:{authority:{$ref:"#/$defs/AuthorityRef"},binding_id:{$ref:"#/$defs/SourceBindingId"},source_kind:{$ref:"#/$defs/SourceKindV1"},source_locator_digest:{$ref:"#/$defs/LocatorDigest"}},required:["binding_id","source_kind","source_locator_digest","authority"],type:"object"},_1={description:"Typed explanation for a root that could not return usable data.",enum:["authority_unavailable","root_missing","store_unavailable"],type:"string"},_0={description:"Strongly typed canonical identity: `ScoreDomainId`.",type:"string"},_2={additionalProperties:!1,description:"Reference-only filesystem locator. The raw path is sealed outside this\ncontract; only the privacy-bound locator digest and sealed-value digest are\nrepresentable here.",properties:{locator_digest:{$ref:"#/$defs/LocatorDigest"},sealed_value_digest:{$ref:"#/$defs/ManifestDigest"}},required:["locator_digest","sealed_value_digest"],type:"object"},_4={additionalProperties:!1,properties:{knowledge:{$ref:"#/$defs/ClosedUtcIntervalV1"},valid:{$ref:"#/$defs/ValidCoverageIntervalV1"}},required:["knowledge","valid"],type:"object"},_6={oneOf:[{properties:{kind:{const:"caught_up",type:"string"}},required:["kind"],type:"object"},{properties:{kind:{const:"projection_behind_source",type:"string"},lag:{format:"uint64",minimum:0,type:"integer"}},required:["kind","lag"],type:"object"},{properties:{kind:{const:"source_behind_target",type:"string"},lag:{format:"uint64",minimum:0,type:"integer"}},required:["kind","lag"],type:"object"},{properties:{kind:{const:"projection_and_source_behind",type:"string"},projection_lag:{format:"uint64",minimum:0,type:"integer"},source_lag:{format:"uint64",minimum:0,type:"integer"}},required:["kind","projection_lag","source_lag"],type:"object"},{properties:{kind:{const:"locked",type:"string"}},required:["kind"],type:"object"},{properties:{kind:{const:"redacted",type:"string"}},required:["kind"],type:"object"},{properties:{kind:{const:"retention_withheld",type:"string"}},required:["kind"],type:"object"},{properties:{kind:{const:"unavailable",type:"string"}},required:["kind"],type:"object"}]},_3={additionalProperties:!1,properties:{mode:{$ref:"#/$defs/TemporalModeV1"}},required:["mode"],type:"object"},_9={enum:["fresh","stale","partial","locked","redacted","retention_withheld","unavailable"],type:"string"},_5={description:"Strongly typed canonical identity: `SessionId`.",type:"string"},_8={description:"Strongly typed canonical identity: `SessionOrThreadId`.",type:"string"},_7={additionalProperties:!1,properties:{committed_through:{format:"uint64",minimum:0,type:"integer"},observed_through:{format:"uint64",minimum:0,type:"integer"}},required:["observed_through","committed_through"],type:"object"},ve={additionalProperties:!1,properties:{committed_batches:{format:"uint64",minimum:0,type:"integer"},committed_records:{format:"uint64",minimum:0,type:"integer"},coverage:{$ref:"#/$defs/TemporalCoverageV1"},frontier:{$ref:"#/$defs/SessionRefreshFrontierResultV1"},operation_id:{type:"string"},session_id:{type:"string"},source_coverage:{items:{$ref:"#/$defs/SessionSourceCoverageV1"},type:"array"},updated_at:{format:"int64",type:"integer"}},required:["operation_id","session_id","frontier","coverage","committed_batches","committed_records","updated_at"],type:"object"},vt={additionalProperties:!1,properties:{coverage:{$ref:"#/$defs/TemporalCoverageV1"},failure_code:{type:["string","null"]},frontier:{$ref:"#/$defs/SessionRefreshFrontierResultV1"},operation_id:{type:"string"},session_id:{type:"string"},source_coverage:{items:{$ref:"#/$defs/SessionSourceCoverageV1"},type:"array"},state:{$ref:"#/$defs/SessionRefreshTerminalStateResultV1"},terminal_at:{format:"int64",type:"integer"}},required:["operation_id","session_id","frontier","coverage","state","terminal_at"],type:"object"},vr={enum:["complete","failed","cancelled"],type:"string"},vi={description:"Structural budget boundary that rejected a session retrieval request.\nThese causes are non-retryable request corrections; concurrent permit or\nqueue pressure remains a separate capacity-saturation failure.",enum:["request_result_limit","request_hydration_limit","request_context_bytes","request_candidate_bytes","request_record_bytes","request_hydration_bytes","estimator_version_mismatch","execution_work_exhausted","candidate_read_exhausted","record_read_exhausted","kernel_result_limit","participant_manifest_participants","participant_manifest_canonical_bytes","cursor_manifest_limit","hydration_bytes","context_bytes","context_tokens"],type:"string"},vo={additionalProperties:!1,properties:{committed_frontier:{format:"uint64",minimum:0,type:"integer"},covered_intervals:{items:{$ref:"#/$defs/SessionCoverageIntervalV1"},type:"array"},missing_intervals:{items:{$ref:"#/$defs/SessionCoverageIntervalV1"},type:"array"},observed_frontier:{format:"uint64",minimum:0,type:"integer"},reason:{$ref:"#/$defs/SessionCoverageReasonV1"},request:{$ref:"#/$defs/SessionCoverageRequestV1"},source_id:{type:"string"},state:{$ref:"#/$defs/SessionCoverageStateV1"},target_watermark:{format:"uint64",minimum:0,type:"integer"}},required:["source_id","observed_frontier","committed_frontier","target_watermark","request","covered_intervals","missing_intervals","state","reason"],type:"object"},vn={description:"Typed configuration key. Keys are lowercase, dotted product identifiers;\nuntyped host/adapter keys are not representable.",type:"string"},va={additionalProperties:!1,description:"Logical and verified physical identity of the shared Profile shard.\n\nBrain and profile IDs select the shard; the verified store locator binds its\nphysical store. Lease incarnations and authority epochs remain runtime fences.",properties:{brain_id:{$ref:"#/$defs/BrainId"},profile_id:{$ref:"#/$defs/UserProfileId"},store_id:{type:"string"}},required:["brain_id","profile_id","store_id"],type:"object"},vs={additionalProperties:!1,properties:{complete:{type:"boolean"},family_digest:{$ref:"#/$defs/ManifestDigest"},match_class:{$ref:"#/$defs/SimilarMatchClassV1"},member_count:{format:"uint",minimum:0,type:"integer"},members:{items:{$ref:"#/$defs/SimilarOccurrenceV1"},type:"array"},next_cursor:{type:["string","null"]},normalization_revision:{format:"uint16",maximum:65535,minimum:0,type:"integer"},representative_payload_digest:{$ref:"#/$defs/ManifestDigest"}},required:["match_class","normalization_revision","family_digest","representative_payload_digest","member_count","members","complete"],type:"object"},vd={enum:["conservative_exact","rename_normalized_exact"],type:"string"},vc={additionalProperties:!1,properties:{body_span:{$ref:"#/$defs/SourceSpan"},path:{type:"string"},project_id:{$ref:"#/$defs/ProjectId"},repository_id:{$ref:"#/$defs/RepositoryId"},snapshot_digest:{$ref:"#/$defs/ManifestDigest"},source_generation:{$ref:"#/$defs/CodeGenerationId"},symbol_occurrence_id:{$ref:"#/$defs/SymbolOccurrenceId"},worktree_id:{anyOf:[{$ref:"#/$defs/WorktreeId"},{type:"null"}]}},required:["project_id","repository_id","source_generation","snapshot_digest","symbol_occurrence_id","path","body_span"],type:"object"},vl={properties:{evidence:{default:[],items:{type:"string"},type:"array"},improvement:{type:"boolean"},priority:{type:"string"},reason:{type:"string"},recommendation:{type:"string"},skill_id:{type:"string"}},required:["skill_id","improvement","recommendation","reason","priority"],type:"object"},vp={enum:["cursor","codex","claude","agents","opencode","kimi","kiro","hermes"],type:"string"},vu={properties:{evidence:{default:[],items:{type:"string"},type:"array"},reason:{type:"string"},recommendation:{type:"string"},skill_id:{type:"string"},stale:{type:"boolean"}},required:["skill_id","stale","recommendation","reason"],type:"object"},vm={description:"One skill's durable usage counters. The ledger stores one per skill; a\nsummary is the same record merged with the skill's current metadata.",properties:{activated_at:{description:"When the skill last transitioned into the active state; mirrors the\nmanaged skill metadata so outcome scoring works from summaries alone.",format:"int64",type:["integer","null"]},category:{type:["string","null"]},created_by:{type:["string","null"]},first_seen_at:{format:"int64",type:"integer"},imported_analytics_events:{description:"Import keys that already counted toward this skill. They are not a\nstore-wide set: each key names this skill, so another skill must not\nshare the write.",items:{type:"string"},type:"array",uniqueItems:!0},last_activity_at:{format:"int64",type:"integer"},last_patched_at:{format:"int64",type:["integer","null"]},last_used_at:{format:"int64",type:["integer","null"]},last_viewed_at:{format:"int64",type:["integer","null"]},patch_count:{format:"uint64",minimum:0,type:"integer"},pinned:{type:"boolean"},provenance_source:{anyOf:[{$ref:"#/$defs/ManagedSkillSource"},{type:"null"}]},schema_version:{format:"uint32",minimum:0,type:"integer"},skill_id:{type:"string"},state:{anyOf:[{$ref:"#/$defs/ManagedSkillState"},{type:"null"}]},targets:{default:[],items:{type:"string"},type:"array"},title:{type:["string","null"]},use_count:{format:"uint64",minimum:0,type:"integer"},use_count_at_activation:{format:"uint64",minimum:0,type:["integer","null"]},view_count:{format:"uint64",minimum:0,type:"integer"},view_count_at_activation:{description:"View/use totals captured at activation time so activity since activation\nis an exact delta rather than a heuristic.",format:"uint64",minimum:0,type:["integer","null"]}},required:["schema_version","skill_id","pinned","view_count","use_count","patch_count","first_seen_at","last_activity_at"],type:"object"},vf={description:"Strongly typed canonical identity: `SourceBindingId`.",type:"string"},vh={additionalProperties:!1,description:"Source freshness is source- and retriever-specific: there is no global\nage-decay multiplier. Missing, stale, incompatible, and current are\ndistinct states.",properties:{compatibility:{$ref:"#/$defs/FreshnessCompatibilityV1"},generation_lag:{format:"uint64",minimum:0,type:["integer","null"]},observed_at:{$ref:"#/$defs/UtcMicros"},policy_revision:{$ref:"#/$defs/ComponentRevision"},projection_watermark:{format:"uint64",minimum:0,type:["integer","null"]},source_generation:{format:"uint64",minimum:0,type:["integer","null"]},source_instance:{$ref:"#/$defs/SourceInstanceKey"},source_namespace:{$ref:"#/$defs/SourceNamespace"},source_watermark:{format:"uint64",minimum:0,type:["integer","null"]}},required:["source_namespace","source_instance","observed_at","compatibility","policy_revision"],type:"object"},vy={description:"Strongly typed canonical identity: `SourceInstanceKey`.",type:"string"},vg={enum:["claude","codex","cursor","git_hub","hermes","kiro"],type:"string"},v_={description:"Strongly typed canonical identity: `SourceNamespace`.",type:"string"},vv={description:"Strongly typed canonical identity: `SourceOccurrenceId`.",type:"string"},vb={additionalProperties:!1,description:"Byte range inside one sanitized source file. Mutable line numbers are\nnever part of identity.",properties:{end_byte:{format:"uint64",minimum:0,type:"integer"},start_byte:{format:"uint64",minimum:0,type:"integer"}},required:["start_byte","end_byte"],type:"object"},v$={description:"Strongly typed canonical identity: `SourceStoreId`.",type:"string"},vS={description:"Strongly typed canonical identity: `StackDeliveryWatermarkId`.",type:"string"},vk={description:"Strongly typed canonical identity: `StackNodeId`.",type:"string"},vw={description:"Strongly typed canonical identity: `StackSignalId`.",type:"string"},vR={additionalProperties:!1,description:"Exact base/head symbol comparison was unavailable; the git evidence beside\nit is still the answer.",properties:{reason:{type:"string"},retryable:{type:"boolean"},status:{$ref:"#/$defs/GitReadUnavailableV1"}},required:["status","reason","retryable"],type:"object"},vP={additionalProperties:!1,description:"Optional narrowing inside the immutable project/repository/worktree scope\ncarried by [`RequestContext`]. A path prefix never establishes identity or\nauthorization.",properties:{path_prefix:{type:["string","null"]}},type:"object"},vV={description:"Strongly typed canonical identity: `SymbolOccurrenceId`.",type:"string"},vq={additionalProperties:!1,properties:{end_line:{format:"uint32",minimum:0,type:"integer"},file:{type:"string"},is_async:{type:"boolean"},kind:{type:"string"},line:{description:"One-based user-facing line.",format:"uint32",minimum:0,type:"integer"},name:{type:"string"},node_id:{type:"string"},qualified_name:{type:"string"},score:{format:"double",type:["number","null"]},signature:{type:["string","null"]}},required:["node_id","name","qualified_name","kind","file","line","end_line","is_async"],type:"object"},vI={additionalProperties:!1,properties:{depth:{format:"uint32",minimum:0,type:["integer","null"]},dispatch_from:{type:["string","null"]},dispatch_via_trait:{type:"boolean"},edge_kind:{type:"string"},symbol:{$ref:"#/$defs/SymbolPrimitiveRecord"}},required:["symbol","edge_kind","dispatch_via_trait"],type:"object"},vx={additionalProperties:!1,properties:{anchor_id:{$ref:"#/$defs/RetrievalAnchorId"},evidence_digest:{$ref:"#/$defs/ManifestDigest"},link_id:{type:"string"},observed_at:{$ref:"#/$defs/UtcMicros"},revision:{format:"uint64",minimum:0,type:"integer"},task_id:{$ref:"#/$defs/TaskId"}},required:["link_id","revision","task_id","anchor_id","evidence_digest","observed_at"],type:"object"},vj={additionalProperties:!1,properties:{definition_id:{$ref:"#/$defs/WorkflowDefinitionId"},definition_version:{format:"uint64",minimum:1,type:"integer"},from_actor_id:{$ref:"#/$defs/ActorId"},project_id:{$ref:"#/$defs/ProjectId"},repository_id:{$ref:"#/$defs/RepositoryId"},run_id:{$ref:"#/$defs/RunId"},step_id:{$ref:"#/$defs/WorkflowStepId"},task_id:{$ref:"#/$defs/TaskId"},thread_id:{$ref:"#/$defs/ThreadId"},to_actor_id:{$ref:"#/$defs/ActorId"},worktree_id:{$ref:"#/$defs/WorktreeId"}},required:["project_id","repository_id","worktree_id","definition_id","definition_version","step_id","task_id","thread_id","run_id","from_actor_id","to_actor_id"],type:"object"},vC={description:"Strongly typed canonical identity: `TaskId`.",type:"string"},vT={additionalProperties:!1,properties:{hidden:{format:"uint64",minimum:0,type:"integer"},redacted:{format:"uint64",minimum:0,type:"integer"},unknown:{format:"uint64",minimum:0,type:"integer"},visible:{format:"uint64",minimum:0,type:"integer"}},required:["visible","hidden","unknown","redacted"],type:"object"},vO={additionalProperties:!1,properties:{anchor:{type:"string"},summary:{type:"string"}},required:["anchor","summary"],type:"object"},vE={oneOf:[{properties:{state:{const:"fresh",type:"string"}},required:["state"],type:"object"},{properties:{generation_lag:{format:"uint64",minimum:0,type:"integer"},state:{const:"stored",type:"string"}},required:["state","generation_lag"],type:"object"},{properties:{generation_lag:{format:"uint64",minimum:0,type:"integer"},state:{const:"partial",type:"string"}},required:["state","generation_lag"],type:"object"}]},vA={description:"Requested temporal interpretation.",oneOf:[{additionalProperties:!1,properties:{kind:{const:"current",type:"string"}},required:["kind"],type:"object"},{additionalProperties:!1,properties:{cutoff:{$ref:"#/$defs/UtcMicros"},kind:{const:"as_of",type:"string"}},required:["kind","cutoff"],type:"object"},{additionalProperties:!1,properties:{kind:{const:"evolution",type:"string"}},required:["kind"],type:"object"},{additionalProperties:!1,properties:{kind:{const:"forensic",type:"string"}},required:["kind"],type:"object"}]},vM={additionalProperties:!1,properties:{anchor:{type:"string"},rank:{format:"uint32",minimum:0,type:"integer"},reason:{$ref:"#/$defs/HydrationStateResultV1"}},required:["rank","anchor","reason"],type:"object"},vW={additionalProperties:!1,properties:{generation:{format:"uint64",minimum:0,type:"integer"},index:{format:"uint64",minimum:0,type:"integer"},projection:{format:"uint64",minimum:0,type:"integer"},source:{format:"uint64",minimum:0,type:"integer"},summary:{format:"uint64",minimum:0,type:"integer"}},required:["generation","source","projection","index","summary"],type:"object"},vN={description:"Strongly typed canonical identity: `ThreadId`.",type:"string"},vz={additionalProperties:!1,description:"What a token budget did to an answer. `est_tokens` is the kept rows.\n`over_ceiling` means a single row was larger than its section quota and\nwas kept anyway.",properties:{budget_tokens:{format:"uint32",minimum:0,type:"integer"},est_tokens:{format:"uint32",minimum:0,type:"integer"},over_ceiling:{type:"boolean"},sections:{items:{$ref:"#/$defs/TokenBudgetSectionV1"},type:"array"}},required:["budget_tokens","est_tokens","over_ceiling","sections"],type:"object"},vD={additionalProperties:!1,description:"One section a token budget kept or cut.",properties:{section:{type:"string"},shown:{format:"uint32",minimum:0,type:"integer"},total:{format:"uint32",minimum:0,type:"integer"}},required:["section","total","shown"],type:"object"},vF={additionalProperties:!1,properties:{maximum_active_per_repository:{format:"uint16",maximum:65535,minimum:1,type:"integer"},maximum_global_active:{format:"uint16",maximum:65535,minimum:1,type:"integer"},maximum_parallel_per_task:{format:"uint16",maximum:65535,minimum:1,type:"integer"},maximum_stack_depth:{format:"uint16",maximum:65535,minimum:1,type:"integer"}},required:["maximum_active_per_repository","maximum_parallel_per_task","maximum_global_active","maximum_stack_depth"],type:"object"},vL={enum:["reject","require_explicit_human_approval","require_human_approval_and_independent_review"],type:"string"},vU={additionalProperties:!1,properties:{cleanliness:{$ref:"#/$defs/WorktreeCleanlinessRequirementV1"},maximum_preflight_age_seconds:{format:"uint32",minimum:1,type:"integer"},require_fresh_preflight:{type:"boolean"},review:{$ref:"#/$defs/ReviewRequirementV1"},tests:{items:{$ref:"#/$defs/RequiredCheckV1"},type:"array"}},required:["cleanliness","tests","review","require_fresh_preflight","maximum_preflight_age_seconds"],type:"object"},vH={enum:["critical_only","lifecycle","verbose"],type:"string"},vG={description:"Risky construct the pattern scan looks for.",enum:["unwrap","expect","panic","todo","unimplemented","unsafe_block"],type:"string"},vB={description:"Strongly typed canonical identity: `UserProfileId`.",type:"string"},vK={description:"UTC timestamp represented as microseconds from the Unix epoch.",format:"int64",type:"integer"},vJ={oneOf:[{properties:{interval:{$ref:"#/$defs/ClosedUtcIntervalV1"},kind:{const:"known",type:"string"}},required:["kind","interval"],type:"object"},{properties:{kind:{const:"unknown",type:"string"}},required:["kind"],type:"object"}]},vZ={additionalProperties:!1,description:"One exact verified graph snapshot identity.",properties:{event_sequence:{format:"uint64",minimum:0,type:"integer"},graph_version:{format:"uint64",minimum:0,type:"integer"},recovered_graph_digest:{$ref:"#/$defs/ManifestDigest"},source_watermark:{additionalProperties:{format:"uint64",minimum:0,type:"integer"},type:"object"}},required:["graph_version","event_sequence","source_watermark","recovered_graph_digest"],type:"object"},vQ={additionalProperties:!1,properties:{criterion_id:{type:"string"},description:{type:"string"},evidence_required:{type:"boolean"}},required:["criterion_id","description","evidence_required"],type:"object"},vX={enum:["never","on_request"],type:"string"},vY={description:"Strongly typed canonical identity: `WorkArtifactId`.",type:"string"},v1={additionalProperties:!1,properties:{artifact_id:{$ref:"#/$defs/WorkArtifactId"},byte_length:{format:"uint64",minimum:0,type:"integer"},digest:{$ref:"#/$defs/ManifestDigest"}},required:["artifact_id","digest","byte_length"],type:"object"},v0={additionalProperties:!1,description:"Sealed terminal evidence for one provider attempt. The digest of this\nrecord is the evidence digest carried by [`WorkTerminalEvidenceV1`] and by\nthe `RuntimeEvidenceRef` attached to the Work projection, so the receipt\nin Work always names an inspectable record.",properties:{actual_route:{anyOf:[{$ref:"#/$defs/WorkProviderRouteV1"},{type:"null"}]},identity:{$ref:"#/$defs/WorkAttemptIdentityV1"},observed_at:{$ref:"#/$defs/UtcMicros"},outcome:{$ref:"#/$defs/WorkAttemptProviderOutcomeV1"},provider_fallback:{anyOf:[{$ref:"#/$defs/WorkProviderFallbackRecordV1"},{type:"null"}],description:"Present only when the pinned preferred backend was disqualified before\nstartup. `None` means the attempt ran on its first-choice backend."},provider_session:{anyOf:[{$ref:"#/$defs/ObservationSourceIdentityV1"},{type:"null"}],description:"Native provider-qualified session/thread identity, when the provider\nreported one. Admission cannot supply this value and no fallback is\nfabricated."},requested_route:{$ref:"#/$defs/WorkProviderRouteV1"},stderr:{anyOf:[{$ref:"#/$defs/WorkAttemptStreamSummaryV1"},{type:"null"}]},stdout:{anyOf:[{$ref:"#/$defs/WorkAttemptStreamSummaryV1"},{type:"null"}]}},required:["identity","requested_route","outcome","observed_at"],type:"object"},v2={additionalProperties:!1,properties:{attempt_id:{$ref:"#/$defs/AttemptId"},run_id:{$ref:"#/$defs/RunId"},task_id:{$ref:"#/$defs/TaskId"}},required:["task_id","run_id","attempt_id"],type:"object"},v4={description:"How much of the authorized attempt set one page covers.",oneOf:[{additionalProperties:!1,description:"Every attempt after the page start was returned; zero returned is the\nexplicit empty authorized result, not a concealment.",properties:{coverage:{const:"complete",type:"string"},returned:{format:"uint32",minimum:0,type:"integer"}},required:["coverage","returned"],type:"object"},{additionalProperties:!1,description:"The page cap was reached; `resume` continues under the same verified\ntopology generation.",properties:{coverage:{const:"capped",type:"string"},remaining:{format:"uint32",minimum:0,type:"integer"},resume:{$ref:"#/$defs/WorkAttemptListCursorV1"},returned:{format:"uint32",minimum:0,type:"integer"}},required:["coverage","returned","remaining","resume"],type:"object"}]},v6={description:"Opaque resume point for the next page of one attempt-list-family read,\nbound to the operation and `page_size` that minted it and pinned to the\nverified topology generation the page was read under.",type:"string"},v3={additionalProperties:!1,properties:{completed:{format:"uint64",minimum:0,type:"integer"},total:{format:"uint64",minimum:0,type:"integer"}},required:["completed","total"],type:"object"},v9={additionalProperties:!1,properties:{accepted_proposal:{$ref:"#/$defs/ProposalId",description:"Exact accepted proposal the attempt was admitted against. A superseded\nor cleared proposal is a different binding, not a compatible refresh."},event_sequence:{description:"Exact immutable product event that verified this graph version.",format:"uint64",minimum:0,type:"integer"},graph_version:{format:"uint64",minimum:0,type:"integer"},recovered_graph_digest:{$ref:"#/$defs/ManifestDigest",description:"Digest of the graph recovered and verified at admission."},source_watermark:{additionalProperties:{format:"uint64",minimum:0,type:"integer"},description:"Source-frontier identity preserved from the verified product graph.",type:"object"}},required:["graph_version","event_sequence","source_watermark","recovered_graph_digest","accepted_proposal"],type:"object"},v5={description:"How one provider attempt ended, as observed by the daemon runtime.",oneOf:[{properties:{code:{format:"int32",type:"integer"},outcome:{const:"exited",type:"string"}},required:["outcome","code"],type:"object"},{properties:{outcome:{const:"signalled",type:"string"},signal:{format:"int32",type:"integer"}},required:["outcome","signal"],type:"object"},{properties:{outcome:{const:"timed_out",type:"string"}},required:["outcome"],type:"object"},{properties:{outcome:{const:"cancelled",type:"string"}},required:["outcome"],type:"object"},{properties:{outcome:{const:"provider_unavailable",type:"string"},state:{$ref:"#/$defs/WorkProviderAvailabilityV1"}},required:["outcome","state"],type:"object"},{properties:{channel:{$ref:"#/$defs/WorkAttemptStreamChannelV1"},outcome:{const:"stream_overflow",type:"string"}},required:["outcome","channel"],type:"object"},{properties:{outcome:{const:"launch_failed",type:"string"}},required:["outcome"],type:"object"},{description:"The provider started but its typed protocol session did not reach a\nterminal answer: a malformed, out-of-order, oversized, or lost frame.\nPlan 32 requires such a stream to seal failed evidence rather than a\ntext-scraped success.",properties:{outcome:{const:"protocol_failed",type:"string"}},required:["outcome"],type:"object"}]},v8={additionalProperties:!1,properties:{artifacts:{items:{$ref:"#/$defs/WorkArtifactRefV1"},type:"array"},evidence:{anyOf:[{$ref:"#/$defs/WorkAttemptEvidenceRecordV1"},{type:"null"}]},identity:{$ref:"#/$defs/WorkAttemptIdentityV1"}},required:["identity","artifacts"],type:"object"},v7={enum:["leased","running","cancellation_requested","cancellation_acknowledged","cancellation_escalated","recovery_required","succeeded","failed","timed_out","cancelled"],type:"string"},be={enum:["stdout","stderr"],type:"string"},bt={additionalProperties:!1,description:"Bounded summary of one captured provider stream.",properties:{byte_length:{format:"uint64",minimum:0,type:"integer"},digest:{$ref:"#/$defs/ManifestDigest"},truncated:{type:"boolean"}},required:["byte_length","truncated","digest"],type:"object"},br={additionalProperties:!1,description:"The verified Work topology snapshot one attempt-list page was read under.",properties:{generation:{description:"The verified graph generation the topology snapshot is published under.",type:"string"},task_count:{description:"The number of tasks in the verified topology.",format:"uint32",minimum:0,type:"integer"}},required:["generation","task_count"],type:"object"},bi={properties:{actual_route:{anyOf:[{$ref:"#/$defs/WorkProviderRouteV1"},{type:"null"}]},artifacts:{items:{$ref:"#/$defs/WorkArtifactRefV1"},type:"array"},cancellation:{$ref:"#/$defs/WorkCancellationStateV1"},execution:{$ref:"#/$defs/WorkExecutionEnvelopeV1"},identity:{$ref:"#/$defs/WorkAttemptIdentityV1"},lease:{$ref:"#/$defs/WorkLeaseFenceV1"},progress:{anyOf:[{$ref:"#/$defs/WorkAttemptProgressV1"},{type:"null"}]},projection_binding:{$ref:"#/$defs/WorkAttemptProjectionBindingV1"},recovery:{$ref:"#/$defs/WorkRecoveryStateV1"},requested_route:{$ref:"#/$defs/WorkProviderRouteV1"},state:{$ref:"#/$defs/WorkAttemptStateV1"},terminal:{anyOf:[{$ref:"#/$defs/WorkTerminalEvidenceV1"},{type:"null"}]}},required:["identity","projection_binding","execution","lease","state","artifacts","cancellation","recovery","requested_route"],type:"object"},bo={additionalProperties:!1,properties:{acknowledged_at:{$ref:"#/$defs/UtcMicros"},request:{$ref:"#/$defs/WorkCancellationRequestV1"}},required:["request","acknowledged_at"],type:"object"},bn={additionalProperties:!1,properties:{acknowledgement:{$ref:"#/$defs/WorkCancellationAcknowledgementV1"},escalated_at:{$ref:"#/$defs/UtcMicros"}},required:["acknowledgement","escalated_at"],type:"object"},ba={description:"Strongly typed canonical identity: `WorkCancellationRequestId`.",type:"string"},bs={additionalProperties:!1,properties:{request_id:{$ref:"#/$defs/WorkCancellationRequestId"},requested_at:{$ref:"#/$defs/UtcMicros"}},required:["request_id","requested_at"],type:"object"},bd={oneOf:[{properties:{state:{const:"none",type:"string"}},required:["state"],type:"object"},{properties:{state:{const:"requested",type:"string"},value:{$ref:"#/$defs/WorkCancellationRequestV1"}},required:["state","value"],type:"object"},{properties:{state:{const:"acknowledged",type:"string"},value:{$ref:"#/$defs/WorkCancellationAcknowledgementV1"}},required:["state","value"],type:"object"},{properties:{state:{const:"escalated",type:"string"},value:{$ref:"#/$defs/WorkCancellationEscalationV1"}},required:["state","value"],type:"object"}]},bc={description:"Strongly typed canonical identity: `WorkCommandId`.",type:"string"},bl={description:"Where a configured route places task content.",enum:["local","tenant","external"],type:"string"},bp={additionalProperties:!1,properties:{topology_generation:{$ref:"#/$defs/WorkTopologyGenerationRefV1"},work_generation:{$ref:"#/$defs/ProjectionGenerationId"}},required:["work_generation","topology_generation"],type:"object"},bu={additionalProperties:!1,properties:{cost_micros:{format:"uint64",minimum:0,type:["integer","null"]},coverage:{$ref:"#/$defs/CoverageStateV1"},effect_count:{format:"uint64",minimum:0,type:["integer","null"]},effect_outcome:{$ref:"#/$defs/DuplicateEffectOutcomeV1"},evidence:{$ref:"#/$defs/QuantityEvidenceClassV1"},test_count:{format:"uint64",minimum:0,type:["integer","null"]},token_count:{format:"uint64",minimum:0,type:["integer","null"]},wall_micros:{format:"uint64",minimum:0,type:["integer","null"]}},required:["evidence","effect_outcome","coverage"],type:"object"},bm={description:"Effect semantics admitted for one provider attempt.",enum:["observational","intercepted","compound_non_repeatable"],type:"string"},bf={description:"Declared effort class of a configured route.",enum:["minimal","standard","extended"],type:"string"},bh={enum:["deny","allowlisted"],type:"string"},by={oneOf:[{additionalProperties:!1,properties:{cursor:{type:"string"},kind:{const:"anchor",type:"string"},link_id:{type:"string"}},required:["kind","link_id","cursor"],type:"object"},{additionalProperties:!1,properties:{continuation:{$ref:"#/$defs/WorkTaskSessionContinuationV1"},kind:{const:"task_session",type:"string"}},required:["kind","continuation"],type:"object"}]},bg={additionalProperties:!1,description:"One immutable evidence frontier. Local code/session evidence and live Git\nevidence each carry their own frontier; the evaluator never merges,\nsubstitutes, or advances one from the other.",properties:{digest:{$ref:"#/$defs/ManifestDigest"},watermark:{$ref:"#/$defs/UtcMicros"}},required:["watermark","digest"],type:"object"},b_={additionalProperties:!1,description:"Exact on-disk executable selected for one opaque executable identity.\n\nThe path is configuration data, never a lookup hint. Runtime admission\ncanonicalizes it again and verifies the file bytes against\n`executable.artifact_digest` before returning an executable binding.",properties:{canonical_path:{type:"string"},capabilities:{items:{$ref:"#/$defs/WorkExecutableCapabilityV1"},type:"array"},executable:{$ref:"#/$defs/WorkExecutableReference"},routes:{items:{$ref:"#/$defs/WorkRouteCandidateV1"},type:"array"}},required:["executable","canonical_path","capabilities","routes"],type:"object"},bv={description:"One executable capability admitted by a configured artifact binding.\n\nThe closed variants bind a provider backend to its exact wire protocol.\nCallers cannot claim an arbitrary backend/protocol combination.",enum:["claude_code_stream_json","codex_app_server_json_rpc","codex_cli_exec_json"],type:"string"},bb={additionalProperties:!1,properties:{artifact_digest:{$ref:"#/$defs/ManifestDigest"},executable_id:{type:"string"}},required:["executable_id","artifact_digest"],type:"object"},b$={additionalProperties:!1,description:"Exact immutable provider admission attached to the durable Work attempt.\n\nCallers name typed route and scope facts, never argv, environment entries,\nor executable paths. The daemon resolves the registered executable only\nafter this envelope has been persisted and admitted to the canonical queue.",properties:{attempt_identity:{$ref:"#/$defs/WorkAttemptIdentityV1"},cancellation_generation:{format:"uint64",minimum:0,type:"integer"},commit:{$ref:"#/$defs/CommitId"},effect_state:{$ref:"#/$defs/WorkEffectStateV1"},execution_snapshot:{$ref:"#/$defs/WorkExecutionSnapshot"},instructions:{description:"Exact provider instructions admitted with this attempt. The adapter\ndelivers these bytes verbatim on the provider's typed input channel;\nthey are never interpolated into argv or an ambient prompt source.",type:"string"},operation:{$ref:"#/$defs/WorkflowOperationRef"},project_id:{$ref:"#/$defs/ProjectId"},projection_binding:{$ref:"#/$defs/WorkAttemptProjectionBindingV1"},reference:{anyOf:[{$ref:"#/$defs/RefId"},{type:"null"}]},repository_id:{$ref:"#/$defs/RepositoryId"},worktree_id:{$ref:"#/$defs/WorktreeId"},worktree_root:{type:"string"}},required:["attempt_identity","projection_binding","operation","execution_snapshot","project_id","repository_id","worktree_id","worktree_root","commit","instructions","cancellation_generation","effect_state"],type:"object"},bS={additionalProperties:!1,properties:{max_concurrency:{format:"uint32",minimum:0,type:"integer"},max_input_tokens:{format:"uint64",minimum:0,type:"integer"},max_output_tokens:{format:"uint64",minimum:0,type:"integer"},max_protocol_bytes:{format:"uint64",minimum:0,type:"integer"},max_stderr_bytes:{format:"uint64",minimum:0,type:"integer"},max_stdout_bytes:{format:"uint64",minimum:0,type:"integer"}},required:["max_input_tokens","max_output_tokens","max_stdout_bytes","max_stderr_bytes","max_protocol_bytes","max_concurrency"],type:"object"},bk={additionalProperties:!1,description:"Immutable provider and topology authority pinned for exactly one Work\nexecution. Every constraint the execution is governed by is named here;\nnothing in this value is an opaque stand-in that a reader must resolve\nagainst a mutable store.",properties:{approval:{$ref:"#/$defs/WorkApprovalPolicy"},backend:{$ref:"#/$defs/WorkProviderBackendV1"},configuration_revision_id:{$ref:"#/$defs/ConfigurationRevisionId"},configuration_snapshot_id:{$ref:"#/$defs/ConfigurationSnapshotId"},credential_references:{items:{$ref:"#/$defs/CredentialReferenceId"},type:"array",uniqueItems:!0},deadline:{$ref:"#/$defs/UtcMicros"},effective_behavior_digest:{$ref:"#/$defs/ManifestDigest"},egress:{$ref:"#/$defs/WorkEgressPolicy"},environment_allowlist:{items:{type:"string"},type:"array",uniqueItems:!0},executable:{$ref:"#/$defs/WorkExecutableReference"},fallback:{$ref:"#/$defs/WorkFallbackTopology"},filesystem:{$ref:"#/$defs/WorkFilesystemPolicy"},limits:{$ref:"#/$defs/WorkExecutionLimits"},model:{type:"string"},protocol:{$ref:"#/$defs/WorkProviderProtocol"},resolution_provenance_digest:{$ref:"#/$defs/ManifestDigest"},route:{$ref:"#/$defs/WorkProviderRouteV1"},sandbox:{$ref:"#/$defs/WorkSandboxPolicy"},topology:{$ref:"#/$defs/WorkTopologyPolicyV1",description:"See [`WorkExecutionSnapshotInput::topology`]. Validated on construction,\nso an admitted snapshot can never pin a topology that weakens the\nprotected-ref floor or permits a native integration without its gates."}},required:["configuration_revision_id","configuration_snapshot_id","effective_behavior_digest","resolution_provenance_digest","route","backend","protocol","model","executable","sandbox","approval","filesystem","egress","environment_allowlist","credential_references","limits","deadline","fallback","topology"],type:"object"},bw={enum:["language","framework","architecture","testing","operations","security","domain"],type:"string"},bR={additionalProperties:!1,description:"Explicit, expiring consent for ephemeral expertise context.\n\nUser-profile and project authorization are separate registered settings;\nWork requires both and uses only their category intersection.",properties:{allowed_categories:{items:{$ref:"#/$defs/WorkExpertiseCategoryV1"},type:"array",uniqueItems:!0},enabled:{type:"boolean"},expires_at:{anyOf:[{$ref:"#/$defs/UtcMicros"},{type:"null"}]},granted_at:{anyOf:[{$ref:"#/$defs/UtcMicros"},{type:"null"}]},schema_version:{format:"uint16",maximum:65535,minimum:0,type:"integer"}},required:["schema_version","enabled","allowed_categories"],type:"object"},bP={oneOf:[{additionalProperties:!1,properties:{kind:{const:"disabled",type:"string"}},required:["kind"],type:"object"},{additionalProperties:!1,properties:{executable:{$ref:"#/$defs/WorkExecutableReference"},kind:{const:"codex_cli",type:"string"},route:{$ref:"#/$defs/WorkProviderRouteV1"}},required:["kind","route","executable"],type:"object"}]},bV={format:"uint64",minimum:0,title:"WorkFenceEpochV1",type:"integer"},bq={enum:["read_only","workspace_write"],type:"string"},bI={oneOf:[{additionalProperties:!1,properties:{item:{$ref:"#/$defs/WorkItemV1"},kind:{const:"task_added",type:"string"}},required:["kind","item"],type:"object"},{additionalProperties:!1,properties:{initiative:{$ref:"#/$defs/WorkInitiativeV1"},item:{$ref:"#/$defs/WorkItemV1"},kind:{const:"task_created",type:"string"},milestone:{$ref:"#/$defs/WorkMilestoneV1"},plan:{$ref:"#/$defs/WorkPlanV1"}},required:["kind","initiative","plan","milestone","item"],type:"object"},{additionalProperties:!1,properties:{decided_at:{$ref:"#/$defs/UtcMicros"},disposition:{$ref:"#/$defs/WorkProposalDispositionV1"},kind:{const:"relation_replan_decided",type:"string"},proposal:{$ref:"#/$defs/WorkRelationReplanProposalV1"}},required:["kind","proposal","disposition","decided_at"],type:"object"},{additionalProperties:!1,properties:{applied_at:{$ref:"#/$defs/UtcMicros"},kind:{const:"task_relations_replanned",type:"string"},proposal_id:{$ref:"#/$defs/ProposalId"}},required:["kind","proposal_id","applied_at"],type:"object"},{additionalProperties:!1,properties:{evidence:{$ref:"#/$defs/TaskEvidenceLinkV1"},kind:{const:"evidence_linked",type:"string"},task_id:{$ref:"#/$defs/TaskId"}},required:["kind","task_id","evidence"],type:"object"},{additionalProperties:!1,properties:{decided_at:{$ref:"#/$defs/UtcMicros"},disposition:{$ref:"#/$defs/WorkProposalDispositionV1"},kind:{const:"proposal_decided",type:"string"},proposal:{$ref:"#/$defs/WorkProposalV1"}},required:["kind","proposal","disposition","decided_at"],type:"object"},{additionalProperties:!1,properties:{accepted_at:{$ref:"#/$defs/UtcMicros"},kind:{const:"proposal_accepted",type:"string"},proposal:{$ref:"#/$defs/WorkProposalV1"}},required:["kind","proposal","accepted_at"],type:"object"},{additionalProperties:!1,properties:{admitted_at:{$ref:"#/$defs/UtcMicros"},based_on_version:{format:"uint64",minimum:0,type:"integer"},kind:{const:"execution_admitted",type:"string"},task_id:{$ref:"#/$defs/TaskId"}},required:["kind","task_id","based_on_version","admitted_at"],type:"object"},{additionalProperties:!1,properties:{based_on_version:{format:"uint64",minimum:0,type:"integer"},identity:{$ref:"#/$defs/WorkAttemptIdentityV1"},kind:{const:"accepted_attempt_linked",type:"string"},linked_at:{$ref:"#/$defs/UtcMicros"},task_id:{$ref:"#/$defs/TaskId"}},required:["kind","task_id","based_on_version","identity","linked_at"],type:"object"},{additionalProperties:!1,properties:{accepted_at:{$ref:"#/$defs/UtcMicros"},evidence_by_criterion:{additionalProperties:{type:"string"},type:"object"},kind:{const:"task_accepted",type:"string"},task_id:{$ref:"#/$defs/TaskId"}},required:["kind","task_id","evidence_by_criterion","accepted_at"],type:"object"},{additionalProperties:!1,properties:{handoff:{$ref:"#/$defs/WorkHandoffV1"},kind:{const:"handoff_recorded",type:"string"}},required:["kind","handoff"],type:"object"}]},bx={additionalProperties:!1,description:"One attempt on the evidence frontier: exactly which attempt, in which\nstate, backed by which sealed evidence digest (when the attempt has\nreported one). No lease or fence is part of the frontier. Those are\nruntime authority, not checkpoint evidence.",properties:{evidence_digest:{anyOf:[{$ref:"#/$defs/ManifestDigest"},{type:"null"}],description:"The digest of the sealed terminal evidence record, when the attempt\nhas one. `None` is the typed not-yet-reported state."},identity:{$ref:"#/$defs/WorkAttemptIdentityV1"},state:{$ref:"#/$defs/WorkAttemptStateV1"}},required:["identity","state"],type:"object"},bj={additionalProperties:!1,description:"The exact work/evidence frontier one handoff records.",properties:{attempts:{description:"The evidence frontier: every attempt the issuer knows about, in\nstable identity order.",items:{$ref:"#/$defs/WorkHandoffAttemptFrontierV1"},type:"array"},blockers:{description:"What is blocking progress. Bounded, non-empty entries.",items:{type:"string"},type:"array"},legal_actions:{description:"The actions the issuer believes are legal next steps.",items:{type:"string"},type:"array"},lineage:{$ref:"#/$defs/WorkHandoffLineageV1"},task_id:{$ref:"#/$defs/TaskId"},unknowns:{description:"What the issuer does not know yet. Bounded, non-empty entries.",items:{type:"string"},type:"array"},work_version:{description:"The exact Work version the frontier was cut at.",format:"uint64",minimum:0,type:"integer"}},required:["task_id","work_version","attempts","unknowns","blockers","legal_actions","lineage"],type:"object"},bC={additionalProperties:!1,description:"Who issued this frontier and what it supersedes.",properties:{issued_at:{$ref:"#/$defs/UtcMicros"},issued_by:{$ref:"#/$defs/ActorId"},prior_frontier_digest:{anyOf:[{$ref:"#/$defs/ManifestDigest"},{type:"null"}],description:"The canonical digest of the frontier this one supersedes, when the\ntask has been handed off before. `None` states a first handoff."}},required:["issued_by","issued_at"],type:"object"},bT={additionalProperties:!1,properties:{evidence_frontier:{items:{type:"string"},type:"array",uniqueItems:!0},from_actor:{$ref:"#/$defs/ActorId"},handed_off_at:{$ref:"#/$defs/UtcMicros"},handoff_id:{type:"string"},task_id:{$ref:"#/$defs/TaskId"},to_actor:{$ref:"#/$defs/ActorId"},unknowns:{items:{type:"string"},type:"array",uniqueItems:!0}},required:["handoff_id","task_id","from_actor","to_actor","evidence_frontier","unknowns","handed_off_at"],type:"object"},bO={additionalProperties:!1,properties:{initiative_id:{type:"string"},milestone_id:{type:"string"},plan_id:{type:"string"}},required:["initiative_id","plan_id","milestone_id"],type:"object"},bE={additionalProperties:!1,properties:{created_at:{$ref:"#/$defs/UtcMicros"},id:{type:"string"},title:{type:"string"}},required:["id","title","created_at"],type:"object"},bA={additionalProperties:!1,properties:{acceptance_criteria:{items:{$ref:"#/$defs/WorkAcceptanceCriterionV1"},type:"array"},causal_candidates:{items:{$ref:"#/$defs/TaskId"},type:"array",uniqueItems:!0},created_at:{$ref:"#/$defs/UtcMicros"},deadline:{anyOf:[{$ref:"#/$defs/UtcMicros"},{type:"null"}]},dependencies:{items:{$ref:"#/$defs/TaskId"},type:"array",uniqueItems:!0},effort:{format:"uint32",minimum:0,type:"integer"},hierarchy:{$ref:"#/$defs/WorkHierarchyV1"},informational_relations:{items:{$ref:"#/$defs/TaskId"},type:"array",uniqueItems:!0},scheduled_at:{anyOf:[{$ref:"#/$defs/UtcMicros"},{type:"null"}]},task_id:{$ref:"#/$defs/TaskId"},title:{type:"string"},updated_at:{$ref:"#/$defs/UtcMicros"}},required:["task_id","hierarchy","title","dependencies","informational_relations","causal_candidates","acceptance_criteria","effort","created_at","updated_at"],type:"object"},bM={additionalProperties:!1,properties:{accepted_at:{anyOf:[{$ref:"#/$defs/UtcMicros"},{type:"null"}]},accepted_attempts:{items:{$ref:"#/$defs/WorkAttemptIdentityV1"},type:"array"},accepted_criteria:{additionalProperties:{type:"string"},type:"object"},accepted_proposal:{anyOf:[{$ref:"#/$defs/ProposalId"},{type:"null"}]},accepted_route:{anyOf:[{$ref:"#/$defs/WorkRouteDecisionV1"},{type:"null"}]},archived_at:{anyOf:[{$ref:"#/$defs/UtcMicros"},{type:"null"}]},evidence_links:{items:{type:"string"},type:"array",uniqueItems:!0},execution_admitted_at:{anyOf:[{$ref:"#/$defs/UtcMicros"},{type:"null"}]},handoffs:{items:{$ref:"#/$defs/WorkHandoffV1"},type:"array"},input:{$ref:"#/$defs/WorkItemInputV1"}},required:["input","evidence_links","accepted_criteria","accepted_attempts","handoffs"],type:"object"},bW={additionalProperties:!1,properties:{epoch:{$ref:"#/$defs/WorkFenceEpochV1"},lease_id:{$ref:"#/$defs/WorkLeaseId"}},required:["lease_id","epoch"],type:"object"},bN={description:"Strongly typed canonical identity: `WorkLeaseId`.",type:"string"},bz={additionalProperties:!1,properties:{created_at:{$ref:"#/$defs/UtcMicros"},id:{type:"string"},plan_id:{type:"string"},title:{type:"string"}},required:["id","plan_id","title","created_at"],type:"object"},bD={description:"Ordinal band. Never a probability, never a scalar score.\n\nBands are ordered `Lowest` .. `Highest`. Comparison is the only operation\nconsumers perform over them, so no weighted sum can be reconstructed from\na recorded decision.",enum:["lowest","low","moderate","high","highest"],type:"string"},bF={description:"Closed set of conditions that block admission or removal.",oneOf:[{const:"dirty_tracked_files",description:"Tracked files differ from the index or HEAD.",type:"string"},{const:"untracked_data",description:"Untracked data is present in the target.",type:"string"},{const:"unique_commits",description:"The target holds commits reachable from nowhere else.",type:"string"},{const:"active_holder",description:"Another admitted placement holds this target.",type:"string"},{const:"unresolved_effect",description:"An effect against this placement is unresolved.",type:"string"},{const:"unacknowledged_receipt",description:"A receipt produced against this placement is unacknowledged.",type:"string"},{const:"uncertain_pull_request",description:"A pull request produced from this placement is in an uncertain state.",type:"string"},{const:"shared_ref",description:"A ref in this target is shared with another holder.",type:"string"},{const:"missing_anchor",description:"A retrieval or evidence anchor this placement referenced is missing.",type:"string"},{const:"stale_scope",description:"The authorized scope no longer matches the placement.",type:"string"},{const:"authorization_lost",description:"Authorization for this placement was lost.",type:"string"},{const:"target_unreadable",description:"The target could not be read, so its state is unknown.",type:"string"},{const:"network_required",description:"The placement declared itself network-free but the action needs network.",type:"string"}],title:"WorkPlacementBlockerV1"},bL={additionalProperties:!1,description:"Which run a placement belongs to. Placement never redefines TaskId.",properties:{run_id:{$ref:"#/$defs/RunId"},task_id:{$ref:"#/$defs/TaskId"}},required:["task_id","run_id"],title:"WorkPlacementIdentityV1",type:"object"},bU={description:"The supported placement choices, and only those.",oneOf:[{const:"no_managed_placement",description:"TraceDecay manages no checkout for this run. No-Git work is first class.",type:"string"},{const:"clean_in_place",description:"The caller's own strictly clean checkout, explicitly acknowledged.",type:"string"},{const:"linked_worktree",description:"A linked worktree of the same repository.",type:"string"},{const:"isolated_clone",description:"An isolated local clone.",type:"string"}],title:"WorkPlacementKindV1"},bH={description:"The durable state of one admitted placement.",oneOf:[{const:"admitted",description:"The placement holds its target.",type:"string"},{const:"released",description:"The placement gave its target up cleanly. Nothing was deleted by this\ntransition; removal is a separate cleanup preflight.",type:"string"},{const:"quarantined",description:"The placement was retained because removal is blocked.",type:"string"}],title:"WorkPlacementStateV1"},bG={additionalProperties:!1,description:"The exact placement a caller asked for.",properties:{in_place_acknowledged:{description:"Set only for `CleanInPlace`: the caller states it accepts running in\nits own checkout. Acknowledgement is explicit, never inferred.",type:"boolean"},kind:{$ref:"#/$defs/WorkPlacementKindV1"},network_free:{description:"The placement declares it needs no network. Declared, not detected.",type:"boolean"},root:{description:"Absolute root, present exactly when the kind manages one.",type:["string","null"]}},required:["kind","in_place_acknowledged","network_free"],title:"WorkPlacementTargetV1",type:"object"},bB={additionalProperties:!1,description:"One run's durable placement relation.",properties:{authority_version:{format:"uint64",minimum:0,type:"integer"},blockers:{items:{$ref:"#/$defs/WorkPlacementBlockerV1"},type:"array",uniqueItems:!0},identity:{$ref:"#/$defs/WorkPlacementIdentityV1"},retention_eligible_at:{anyOf:[{$ref:"#/$defs/UtcMicros"},{type:"null"}],description:"When retention makes this placement *eligible* for a fresh cleanup\npreflight. Eligibility is not delete authority."},state:{$ref:"#/$defs/WorkPlacementStateV1"},target:{$ref:"#/$defs/WorkPlacementTargetV1"},transitioned_at:{$ref:"#/$defs/UtcMicros"}},required:["identity","target","state","authority_version","transitioned_at","blockers"],title:"WorkPlacementV1",type:"object"},bK={additionalProperties:!1,properties:{created_at:{$ref:"#/$defs/UtcMicros"},id:{type:"string"},initiative_id:{type:"string"},title:{type:"string"}},required:["id","initiative_id","title","created_at"],type:"object"},bJ={oneOf:[{additionalProperties:!1,properties:{kind:{const:"project",type:"string"},project_id:{$ref:"#/$defs/ProjectId"}},required:["kind","project_id"],type:"object"},{additionalProperties:!1,properties:{kind:{const:"repository",type:"string"},project_id:{$ref:"#/$defs/ProjectId"},repository_id:{$ref:"#/$defs/RepositoryId"}},required:["kind","project_id","repository_id"],type:"object"}]},bZ={additionalProperties:!1,properties:{anchor_id:{$ref:"#/$defs/RetrievalAnchorId"},evidence_digest:{$ref:"#/$defs/ManifestDigest"},source_store_id:{$ref:"#/$defs/SourceStoreId"}},required:["source_store_id","anchor_id","evidence_digest"],type:"object"},bQ={oneOf:[{additionalProperties:!1,properties:{graph:{$ref:"#/$defs/WorkProductGraphV1"},kind:{const:"created",type:"string"}},required:["kind","graph"],type:"object"},{additionalProperties:!1,properties:{change:{$ref:"#/$defs/WorkGraphChangeV1"},kind:{const:"changed",type:"string"}},required:["kind","change"],type:"object"}]},bX={additionalProperties:!1,properties:{actor_id:{$ref:"#/$defs/ActorId"},authorized_relation_scopes:{items:{$ref:"#/$defs/WorkProductAuthorizedRelationScopeV1"},type:"array"},canonical_input_digest:{$ref:"#/$defs/ManifestDigest"},catalog_generation_id:{$ref:"#/$defs/CatalogGenerationId"},causation_event_id:{type:["string","null"]},command_id:{$ref:"#/$defs/WorkCommandId"},configuration_revision_id:{$ref:"#/$defs/ConfigurationRevisionId"},event_id:{type:"string"},evidence:{items:{$ref:"#/$defs/WorkProductEventEvidenceV1"},type:"array"},expected_graph_version:{format:"uint64",minimum:0,type:["integer","null"]},occurred_at:{$ref:"#/$defs/UtcMicros"},owner_scope:{$ref:"#/$defs/WorkProductProfileScopeV1"},payload:{$ref:"#/$defs/WorkProductEventPayloadV1"},policy_revision_id:{type:"string"},result_graph_version:{format:"uint64",minimum:0,type:"integer"},sequence:{format:"uint64",minimum:0,type:"integer"},source_watermark:{additionalProperties:{format:"uint64",minimum:0,type:"integer"},type:"object"}},required:["event_id","sequence","actor_id","owner_scope","authorized_relation_scopes","result_graph_version","command_id","canonical_input_digest","evidence","source_watermark","occurred_at","policy_revision_id","configuration_revision_id","catalog_generation_id","payload"],type:"object"},bY={oneOf:[{additionalProperties:!1,properties:{authority:{const:"no_prior_graph",type:"string"}},required:["authority"],type:"object"},{additionalProperties:!1,properties:{authority:{const:"verified",type:"string"},verified_version:{$ref:"#/$defs/VerifiedWorkGraphVersionV1"}},required:["authority","verified_version"],type:"object"}]},b1={additionalProperties:!1,properties:{evidence:{items:{$ref:"#/$defs/TaskEvidenceLinkV1"},type:"array"},initiatives:{items:{$ref:"#/$defs/WorkInitiativeV1"},type:"array"},items:{items:{$ref:"#/$defs/WorkItemV1"},type:"array"},milestones:{items:{$ref:"#/$defs/WorkMilestoneV1"},type:"array"},plans:{items:{$ref:"#/$defs/WorkPlanV1"},type:"array"},proposal_decisions:{items:{$ref:"#/$defs/WorkProposalDecisionV1"},type:"array"},relation_replan_decisions:{items:{$ref:"#/$defs/WorkRelationReplanDecisionV1"},type:"array"},version:{format:"uint64",minimum:0,type:"integer"}},required:["version","initiatives","plans","milestones","items","proposal_decisions","relation_replan_decisions","evidence"],type:"object"},b0={additionalProperties:!1,properties:{causation_event_id:{type:["string","null"]},command_id:{$ref:"#/$defs/WorkCommandId"},evidence:{items:{$ref:"#/$defs/WorkProductEventEvidenceV1"},type:"array"},expected_authority:{$ref:"#/$defs/WorkProductExpectedAuthorityV1"},occurred_at:{$ref:"#/$defs/UtcMicros"},revisions:{$ref:"#/$defs/WorkProductRevisionPinsV1"}},required:["expected_authority","command_id","evidence","occurred_at","revisions"],type:"object"},b2={additionalProperties:!1,properties:{brain_id:{$ref:"#/$defs/BrainId"},profile_id:{$ref:"#/$defs/UserProfileId"}},required:["brain_id","profile_id"],type:"object"},b4={oneOf:[{properties:{initiative_id:{type:"string"},kind:{const:"initiative_contains_plan",type:"string"},plan_id:{type:"string"}},required:["kind","initiative_id","plan_id"],type:"object"},{properties:{kind:{const:"plan_contains_milestone",type:"string"},milestone_id:{type:"string"},plan_id:{type:"string"}},required:["kind","plan_id","milestone_id"],type:"object"},{properties:{kind:{const:"milestone_contains_task",type:"string"},milestone_id:{type:"string"},task_id:{$ref:"#/$defs/TaskId"}},required:["kind","milestone_id","task_id"],type:"object"},{properties:{dependency:{$ref:"#/$defs/TaskId"},dependent:{$ref:"#/$defs/TaskId"},kind:{const:"gates",type:"string"}},required:["kind","dependency","dependent"],type:"object"},{properties:{kind:{const:"informational",type:"string"},source:{$ref:"#/$defs/TaskId"},target:{$ref:"#/$defs/TaskId"}},required:["kind","source","target"],type:"object"},{properties:{cause:{$ref:"#/$defs/TaskId"},effect:{$ref:"#/$defs/TaskId"},kind:{const:"causal_candidate",type:"string"}},required:["kind","cause","effect"],type:"object"},{properties:{kind:{const:"evidence",type:"string"},link_id:{type:"string"},task_id:{$ref:"#/$defs/TaskId"}},required:["kind","task_id","link_id"],type:"object"},{properties:{identity:{$ref:"#/$defs/WorkAttemptIdentityV1"},kind:{const:"accepted_attempt",type:"string"},task_id:{$ref:"#/$defs/TaskId"}},required:["kind","task_id","identity"],type:"object"},{properties:{handoff_id:{type:"string"},kind:{const:"handoff",type:"string"},task_id:{$ref:"#/$defs/TaskId"}},required:["kind","task_id","handoff_id"],type:"object"},{properties:{kind:{const:"proposal_decision",type:"string"},proposal_id:{$ref:"#/$defs/ProposalId"},task_id:{$ref:"#/$defs/TaskId"}},required:["kind","task_id","proposal_id"],type:"object"}]},b6={additionalProperties:!1,properties:{catalog_generation_id:{$ref:"#/$defs/CatalogGenerationId"},configuration_revision_id:{$ref:"#/$defs/ConfigurationRevisionId"},policy_revision_id:{type:"string"}},required:["policy_revision_id","configuration_revision_id","catalog_generation_id"],type:"object"},b3={description:"The exact owner-relative relation set selected for a canonical Work graph.\n\nThis identity lives in the domain because attempt admission must retain\nit byte-for-byte through provider settlement. Reconstructing it from a\nproject context would conflate explicit no-Git work with a scoped\nrepository relation.",oneOf:[{properties:{selection:{const:"profile_owned_no_git",type:"string"}},required:["selection"],type:"object"},{properties:{relation_scopes:{items:{$ref:"#/$defs/WorkProductAuthorizedRelationScopeV1"},type:"array",uniqueItems:!0},selection:{const:"relations",type:"string"}},required:["selection","relation_scopes"],type:"object"}]},b9={additionalProperties:!1,properties:{decided_at:{$ref:"#/$defs/UtcMicros"},disposition:{$ref:"#/$defs/WorkProposalDispositionV1"},proposal:{$ref:"#/$defs/WorkProposalV1"}},required:["proposal","disposition","decided_at"],type:"object"},b5={enum:["accepted","rejected","superseded"],type:"string"},b8={additionalProperties:!1,properties:{based_on_version:{format:"uint64",minimum:0,type:"integer"},children:{items:{$ref:"#/$defs/WorkProposedChildV1"},type:"array"},configuration_digest:{$ref:"#/$defs/ManifestDigest"},evidence_digest:{$ref:"#/$defs/ManifestDigest"},explanation:{type:"string"},proposal_id:{$ref:"#/$defs/ProposalId"},route:{$ref:"#/$defs/WorkRouteDecisionV1"},shape:{$ref:"#/$defs/WorkShapeAssessmentV1"},sizing:{$ref:"#/$defs/WorkSizingV1"},task_id:{$ref:"#/$defs/TaskId"}},required:["proposal_id","task_id","based_on_version","shape","sizing","children","route","explanation","evidence_digest","configuration_digest"],type:"object"},b7={additionalProperties:!1,properties:{dependencies:{items:{$ref:"#/$defs/TaskId"},type:"array",uniqueItems:!0},effort:{format:"uint32",minimum:0,type:"integer"},task_id:{$ref:"#/$defs/TaskId"},title:{type:"string"}},required:["task_id","title","effort","dependencies"],type:"object"},$e={description:"Typed provider availability observed at negotiation. These are product\nstates, not transport errors: each one names why the configured native\nprovider could not run, without inventing a fallback.",oneOf:[{const:"absent",description:"No executable binding is configured for the pinned executable identity.",type:"string"},{const:"stale",description:"The configured binding no longer matches the pinned reference.",type:"string"},{const:"unsupported",description:"The configured binding does not admit the pinned backend/protocol.",type:"string"},{const:"digest_mismatch",description:"The on-disk executable bytes do not match the pinned digest.",type:"string"},{const:"unavailable",description:"The configured executable could not be read or is not executable.",type:"string"}]},$t={description:"Provider protocol selected by the pinned Work configuration snapshot.",enum:["claude_code_cli","codex_app_server","codex_cli"],type:"string"},$r={additionalProperties:!1,description:'Why an admitted attempt did not run on the backend its pinned execution\nsnapshot preferred.\n\nPlan 32 (`docs/plans/tracedecay-v2/32-dynamic-workflow-runtime-and-sdk.md`,\n"Native provider execution") admits the Codex CLI "only when app-server is\nunsupported or absent before session start and the pinned Plan 20 snapshot\nexplicitly allows that fallback", and the plan index requires that fallback\nto be "reported rather than hidden". This record is that report: it names\nthe preferred backend, the typed state that disqualified it, and the\nconfiguration-bounded fallback that was selected, so a fallback run can\nnever be read as a first choice.\n\nIt is also written when the fallback itself was refused, so a denial keeps\nboth failures instead of collapsing them into one state.',properties:{fallback_backend:{$ref:"#/$defs/WorkProviderBackendV1",description:"The backend named by the snapshot's configured fallback topology."},fallback_route:{$ref:"#/$defs/WorkProviderRouteV1",description:"The route that fallback runs on."},fallback_state:{anyOf:[{$ref:"#/$defs/WorkProviderAvailabilityV1"},{type:"null"}],description:"`None` when the fallback actually started; `Some(state)` when the\nfallback was itself refused."},preferred_backend:{$ref:"#/$defs/WorkProviderBackendV1",description:"The backend the pinned snapshot named first."},preferred_route:{$ref:"#/$defs/WorkProviderRouteV1",description:"The route that backend would have run on."},preferred_state:{$ref:"#/$defs/WorkProviderAvailabilityV1",description:"Why the preferred backend could not be used."}},required:["preferred_backend","preferred_route","preferred_state","fallback_backend","fallback_route"],type:"object"},$i={enum:["claude_stream_json","codex_app_server_json_rpc","codex_exec_json"],type:"string"},$o={description:"Strongly typed canonical identity: `WorkProviderRouteId`.",type:"string"},$n={additionalProperties:!1,properties:{provider_id:{$ref:"#/$defs/ProviderId"},route_id:{$ref:"#/$defs/WorkProviderRouteId"}},required:["provider_id","route_id"],type:"object"},$a={oneOf:[{properties:{state:{const:"fresh",type:"string"}},required:["state"],type:"object"},{properties:{checkpoint:{anyOf:[{$ref:"#/$defs/WorkArtifactRefV1"},{type:"null"}]},source_attempt_id:{$ref:"#/$defs/AttemptId"},state:{const:"resumed",type:"string"}},required:["state","source_attempt_id"],type:"object"},{properties:{reason:{$ref:"#/$defs/WorkRestartReasonV1"},source_attempt_id:{$ref:"#/$defs/AttemptId"},state:{const:"restarted",type:"string"}},required:["state","source_attempt_id","reason"],type:"object"},{description:"The attempt cannot continue and must be recovered. A first attempt\nlost before it ever resumed anything has no predecessor, so the source\nis absent rather than pointing at the attempt itself.",properties:{observed_at:{$ref:"#/$defs/UtcMicros"},reason:{$ref:"#/$defs/WorkRestartReasonV1"},source_attempt_id:{anyOf:[{$ref:"#/$defs/AttemptId"},{type:"null"}],default:null},state:{const:"recovery_required",type:"string"}},required:["state","reason","observed_at"],type:"object"}]},$s={additionalProperties:!1,properties:{decided_at:{$ref:"#/$defs/UtcMicros"},disposition:{$ref:"#/$defs/WorkProposalDispositionV1"},proposal:{$ref:"#/$defs/WorkRelationReplanProposalV1"}},required:["proposal","disposition","decided_at"],type:"object"},$d={additionalProperties:!1,properties:{based_on_version:{format:"uint64",minimum:0,type:"integer"},causal_candidates:{items:{$ref:"#/$defs/TaskId"},type:"array",uniqueItems:!0},dependencies:{items:{$ref:"#/$defs/TaskId"},type:"array",uniqueItems:!0},informational_relations:{items:{$ref:"#/$defs/TaskId"},type:"array",uniqueItems:!0},payload_digest:{$ref:"#/$defs/ManifestDigest"},proposal_id:{$ref:"#/$defs/ProposalId"},task_id:{$ref:"#/$defs/TaskId"}},required:["proposal_id","task_id","based_on_version","dependencies","informational_relations","causal_candidates","payload_digest"],type:"object"},$c={enum:["lease_lost","provider_unavailable","process_lost","failure_observed"],type:"string"},$l={enum:["runtime_failure","restart_recovery_required"],type:"string"},$p={additionalProperties:!1,description:"A selector into the owning runtime-terminal evidence authority.\n\n`evidence_ref` is an opaque local reference. The Work retry owner resolves\nit through [`WorkRetryEvidencePortV1`]; callers never submit the evidence\ndigest, outcome, or observation time that decides eligibility.",properties:{cause:{$ref:"#/$defs/WorkRetryCauseV1"},evidence_ref:{type:"string"},source:{$ref:"#/$defs/WorkRetrySourceV1"}},required:["source","cause","evidence_ref"],type:"object"},$u={enum:["runtime"],type:"string"},$m={additionalProperties:!1,description:"One eligible route supplied by the authorized configuration snapshot.\n\nThe application filters these candidates by the current request grant and\nverifies the exact pinned executable before policy evaluates them.",properties:{autonomy:{$ref:"#/$defs/WorkOrdinalBandV1"},content_location:{$ref:"#/$defs/WorkContentLocationClassV1"},correctness:{$ref:"#/$defs/WorkOrdinalBandV1"},cost:{$ref:"#/$defs/WorkOrdinalBandV1"},declared_budget_ceiling:{format:"uint64",minimum:0,type:"integer"},effort:{$ref:"#/$defs/WorkEffortClassV1"},evidence_quality:{$ref:"#/$defs/WorkOrdinalBandV1"},execution:{$ref:"#/$defs/WorkRouteExecutionProfileV1"},latency:{$ref:"#/$defs/WorkOrdinalBandV1"},model_id:{type:"string"},provider_capability_id:{type:"string"},route_id:{type:"string"},sensitive_data_fitness:{$ref:"#/$defs/WorkOrdinalBandV1"}},required:["route_id","provider_capability_id","model_id","effort","declared_budget_ceiling","content_location","correctness","sensitive_data_fitness","latency","cost","autonomy","evidence_quality","execution"],type:"object"},$f={oneOf:[{properties:{alternatives:{items:{$ref:"#/$defs/WorkProviderRouteV1"},type:"array"},decision:{const:"selected",type:"string"},exclusions:{items:{type:"string"},type:"array",uniqueItems:!0},fallback:{type:"string"},recommended:{$ref:"#/$defs/WorkProviderRouteV1"}},required:["decision","recommended","alternatives","exclusions","fallback"],type:"object"},{properties:{decision:{const:"abstained",type:"string"},reason:{type:"string"}},required:["decision","reason"],type:"object"}]},$h={additionalProperties:!1,description:"Complete execution constraints configured for one provider route.\n\nThe route candidate is the configuration authority for these values. Work\nadmission copies them into the immutable execution snapshot; provider\nadapters never supply defaults.",properties:{approval:{$ref:"#/$defs/WorkApprovalPolicy"},credential_references:{items:{$ref:"#/$defs/CredentialReferenceId"},type:"array",uniqueItems:!0},egress:{$ref:"#/$defs/WorkEgressPolicy"},environment_allowlist:{items:{type:"string"},type:"array",uniqueItems:!0},fallback:{$ref:"#/$defs/WorkFallbackTopology"},filesystem:{$ref:"#/$defs/WorkFilesystemPolicy"},limits:{$ref:"#/$defs/WorkExecutionLimits"},maximum_duration_micros:{description:"Maximum elapsed time from execution admission to provider completion.",format:"uint64",minimum:0,type:"integer"},sandbox:{$ref:"#/$defs/WorkSandboxPolicy"}},required:["sandbox","approval","filesystem","egress","environment_allowlist","credential_references","limits","maximum_duration_micros","fallback"],type:"object"},$y={description:"A monotonically versioned control authority.",format:"uint64",minimum:0,title:"WorkRunControlAuthorityV1",type:"integer"},$g={description:"Why a run was paused or resumed. A closed vocabulary keeps the reason out\nof free text so it can be read by a projection without being a prompt.",oneOf:[{const:"operator_request",description:"An authorized operator asked for the transition.",type:"string"},{const:"human_wait",description:"The run is waiting on a human approval or answer.",type:"string"},{const:"budget_exhausted",description:"The shared budget ledger is exhausted for now.",type:"string"},{const:"recovery",description:"Recovery or failover is reconciling the run.",type:"string"}],title:"WorkRunControlReasonV1"},$_={description:'The published control state of one run.\n\nThere is no `Cancelled` here: cancellation is an attempt-level authority\nowned through the lease fence, and duplicating it as a run state would\ncreate a second place a run could be "over".',oneOf:[{const:"running",description:"New reservations are admitted.",type:"string"},{const:"paused",description:"New reservations are fenced; committed evidence is preserved.",type:"string"}],title:"WorkRunControlStateV1"},$v={additionalProperties:!1,description:"The run's deadline as of the last control transition.\n\n`remaining_micros` is the authority; `deadline` is the absolute instant that\nremaining resolves to while the run is running. Both are recorded so a\nreader never has to recompute one from a clock it does not trust.",properties:{checkpoint_at:{$ref:"#/$defs/UtcMicros",description:"The instant the checkpoint was taken."},deadline:{$ref:"#/$defs/UtcMicros",description:"The absolute deadline the run is measured against right now."},remaining_micros:{description:"Micros left against that deadline at `checkpoint_at`. Never negative,\nand never larger than the value the previous checkpoint carried.",format:"int64",type:"integer"}},required:["deadline","remaining_micros","checkpoint_at"],title:"WorkRunDeadlineCheckpointV1",type:"object"},$b={enum:["required"],type:"string"},$$={enum:["ordinal","heuristic","calibrated_range"],type:"string"},$S={additionalProperties:!1,properties:{ambiguity:{format:"uint8",maximum:255,minimum:0,type:"integer"},blast_radius:{format:"uint8",maximum:255,minimum:0,type:"integer"},complexity:{format:"uint8",maximum:255,minimum:0,type:"integer"},integration_overhead:{format:"uint8",maximum:255,minimum:0,type:"integer"},score_kind:{$ref:"#/$defs/WorkScoreKindV1"}},required:["score_kind","complexity","ambiguity","blast_radius","integration_overhead"],type:"object"},$k={additionalProperties:!1,properties:{coverage:{type:"string"},high:{format:"uint32",minimum:0,type:"integer"},likely:{format:"uint32",minimum:0,type:"integer"},low:{format:"uint32",minimum:0,type:"integer"},score_kind:{$ref:"#/$defs/WorkScoreKindV1"}},required:["score_kind","low","likely","high","coverage"],type:"object"},$w={additionalProperties:!1,properties:{attempt:{$ref:"#/$defs/WorkAttemptIdentityV1"},binding:{description:"Binds the continuation to the retrieve-evidence operation and the\nresult-shaping request fields the envelope does not echo.",type:"string"},participant_epoch:{$ref:"#/$defs/ManifestDigest"},ranking_cursor:{type:["string","null"]},source:{$ref:"#/$defs/ObservationSourceIdentityV1"},temporal_cursor:{type:["string","null"]},verified_version:{$ref:"#/$defs/VerifiedWorkGraphVersionV1"}},required:["verified_version","attempt","source","participant_epoch","binding"],type:"object"},$R={oneOf:[{properties:{evidence_digest:{$ref:"#/$defs/ManifestDigest"},observed_at:{$ref:"#/$defs/UtcMicros"},outcome:{const:"succeeded",type:"string"}},required:["outcome","evidence_digest","observed_at"],type:"object"},{properties:{evidence_digest:{$ref:"#/$defs/ManifestDigest"},observed_at:{$ref:"#/$defs/UtcMicros"},outcome:{const:"failed",type:"string"}},required:["outcome","evidence_digest","observed_at"],type:"object"},{properties:{evidence_digest:{$ref:"#/$defs/ManifestDigest"},observed_at:{$ref:"#/$defs/UtcMicros"},outcome:{const:"timed_out",type:"string"}},required:["outcome","evidence_digest","observed_at"],type:"object"},{properties:{evidence_digest:{$ref:"#/$defs/ManifestDigest"},observed_at:{$ref:"#/$defs/UtcMicros"},outcome:{const:"cancelled",type:"string"}},required:["outcome","evidence_digest","observed_at"],type:"object"}]},$P={description:"Strongly typed algorithm-tagged integrity digest: `WorkTopologyGenerationRefV1`.",type:"string"},$V={additionalProperties:!1,description:"Complete V1 policy. Partial values are intentionally impossible: callers\nmust provide the entire policy and validation rejects adapter-local defaults.",properties:{branch_naming:{$ref:"#/$defs/BranchNamingPolicyV1"},branch_topology:{$ref:"#/$defs/BranchTopologyPolicyV1"},concurrency:{$ref:"#/$defs/TopologyConcurrencyPolicyV1"},cross_merge:{$ref:"#/$defs/CrossMergePolicyV1"},escalation:{$ref:"#/$defs/TopologyEscalationPolicyV1"},gates:{$ref:"#/$defs/TopologyGatePolicyV1"},history_rewrite:{$ref:"#/$defs/HistoryRewritePolicyV1"},notifications:{$ref:"#/$defs/TopologyNotificationLevelV1"},placement:{$ref:"#/$defs/WorktreePlacementModeV1"},protected_refs:{items:{$ref:"#/$defs/ProtectedRefRuleV1"},type:"array"},retention:{$ref:"#/$defs/WorktreeRetentionPolicyV1"},review_topology:{$ref:"#/$defs/ReviewTopologyPolicyV1"},roots:{items:{$ref:"#/$defs/WorktreeRootPolicyV1"},type:"array"},schema_version:{format:"uint16",maximum:65535,minimum:0,type:"integer"}},required:["schema_version","placement","roots","branch_topology","review_topology","branch_naming","concurrency","cross_merge","gates","protected_refs","history_rewrite","escalation","retention","notifications"],type:"object"},$q={additionalProperties:!1,properties:{definition_id:{$ref:"#/$defs/WorkflowDefinitionId"},definition_version:{format:"uint64",minimum:0,type:"integer"},pinned_catalog_digest:{$ref:"#/$defs/ManifestDigest",description:"Must equal the live Work executable catalog digest. Validation and\nactivation report the current digest when this pin is stale."},pinned_configuration_digest:{$ref:"#/$defs/ManifestDigest"},pinned_policy_digest:{$ref:"#/$defs/ManifestDigest"},project_id:{$ref:"#/$defs/ProjectId"},steps:{items:{$ref:"#/$defs/WorkflowStep"},type:"array"}},required:["definition_id","definition_version","project_id","steps","pinned_policy_digest","pinned_configuration_digest","pinned_catalog_digest"],type:"object"},$I={description:"Strongly typed canonical identity: `WorkflowDefinitionId`.",type:"string"},$x={additionalProperties:!1,properties:{max_width:{format:"uint32",minimum:0,type:"integer"}},required:["max_width"],type:"object"},$j={description:"Strongly typed canonical identity: `WorkflowOperationRef`.",type:"string"},$C={description:"Strongly typed canonical identity: `WorkflowOutputName`.",type:"string"},$T={additionalProperties:!1,properties:{output_name:{$ref:"#/$defs/WorkflowOutputName"},producer_step_id:{$ref:"#/$defs/WorkflowStepId"}},required:["producer_step_id","output_name"],type:"object"},$O={additionalProperties:!1,properties:{fan_out:{anyOf:[{$ref:"#/$defs/WorkflowFanOut"},{type:"null"}]},inputs:{items:{$ref:"#/$defs/WorkflowOutputReference"},type:"array"},operation:{$ref:"#/$defs/WorkflowOperationRef"},outputs:{items:{$ref:"#/$defs/WorkflowOutputName"},type:"array"},predecessors:{items:{$ref:"#/$defs/WorkflowStepId"},type:"array",uniqueItems:!0},step_id:{$ref:"#/$defs/WorkflowStepId"}},required:["step_id","operation","predecessors","inputs","outputs"],type:"object"},$E={description:"Strongly typed canonical identity: `WorkflowStepId`.",type:"string"},$A={enum:["require_clean","allow_untracked_only_for_preflight","read_only_preflight_only"],type:"string"},$M={description:"Strongly typed canonical identity: `WorktreeId`.",type:"string"},$W={description:"Monotonic epoch of the worktree inventory frozen into a stack revision.",format:"uint64",minimum:0,type:"integer"},$N={description:"Strongly typed canonical identity: `WorktreeInventorySnapshotId`.",type:"string"},$z={oneOf:[{properties:{kind:{const:"existing_worktree_only",type:"string"}},required:["kind"],type:"object"},{properties:{kind:{const:"sibling_of_primary_checkout",type:"string"}},required:["kind"],type:"object"},{properties:{kind:{const:"repository_local_root",type:"string"}},required:["kind"],type:"object"},{properties:{kind:{const:"configured_root",type:"string"},root_id:{type:"string"}},required:["kind","root_id"],type:"object"}]},$D={additionalProperties:!1,properties:{abandoned_retention_seconds:{format:"uint64",minimum:1,type:["integer","null"]},automatic_gc:{$ref:"#/$defs/AutomaticWorktreeGcV1"},maximum_retained_per_repository:{format:"uint16",maximum:65535,minimum:1,type:["integer","null"]},terminal_retention_seconds:{format:"uint64",minimum:1,type:["integer","null"]}},required:["automatic_gc"],type:"object"},$F={additionalProperties:!1,properties:{locator:{$ref:"#/$defs/SensitiveFilesystemLocatorV1"},maximum_active_worktrees:{format:"uint16",maximum:65535,minimum:1,type:"integer"},repository_scope:{$ref:"#/$defs/RepositoryPlacementScopeV1"},root_id:{type:"string"}},required:["root_id","locator","repository_scope","maximum_active_worktrees"],type:"object"},$L=[{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,title:"ActiveProjectSurfaceRequestV1",type:"object"},{$defs:{ActiveProjectBranchV1:{additionalProperties:!1,properties:{branch_drifted:{type:"boolean"},branch_resolution:{type:"string"},current_branch:{type:["string","null"]},open_active_branch:{type:["string","null"]},serving_branch:{type:["string","null"]},tracked_branch_count:{format:"uint",minimum:0,type:"integer"},warnings:{items:{type:"string"},type:"array"}},required:["branch_resolution","branch_drifted","tracked_branch_count","warnings"],type:"object"},ActiveProjectResolutionSourceV1:{enum:["active_project"],type:"string"},ActiveProjectStorageV1:{additionalProperties:!1,properties:{class:{type:"string"},data_root:{type:"string"},graph_db_exists:{type:"boolean"},graph_db_path:{type:"string"},graph_db_size_bytes:{format:"uint64",minimum:0,type:"integer"},lcm_payload_root:{type:"string"},mode:{type:"string"},response_handle_root:{type:"string"},sessions_db_path:{type:"string"}},required:["class","mode","data_root","graph_db_path","graph_db_exists","graph_db_size_bytes","sessions_db_path","response_handle_root","lcm_payload_root"],type:"object"}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"The resolved active project of this MCP session.",properties:{branch:{$ref:"#/$defs/ActiveProjectBranchV1"},project_id:{type:["string","null"]},project_root:{type:"string"},repository_id:{type:"string"},resolution_source:{$ref:"#/$defs/ActiveProjectResolutionSourceV1"},scope_prefix:{type:["string","null"]},storage:{$ref:"#/$defs/ActiveProjectStorageV1"}},required:["repository_id","project_root","resolution_source","storage","branch"],title:"ActiveProjectResultV1",type:"object"},{$defs:{AdminCliScopeV1:{description:"What a cost or analytics action reads: the served project's ledgers and\nsessions, or the whole profile's.",enum:["project","profile"],type:"string"}},$schema:"https://json-schema.org/draft/2020-12/schema",oneOf:[{additionalProperties:!1,description:"Savings and provider-usage cost over `range` (`today`, `7d`, ...).",properties:{action:{const:"cost_summary",type:"string"},range:{type:"string"},scope:{$ref:"#/$defs/AdminCliScopeV1"}},required:["action","range","scope"],type:"object"},{additionalProperties:!1,description:"Import every host's transcripts into the project's session store.",properties:{action:{const:"sessions_import",type:"string"}},required:["action"],type:"object"},{additionalProperties:!1,description:"Converge project sessions with Git history.",properties:{action:{const:"sessions_git_sync",type:"string"},dry_run:{type:"boolean"},limit_sessions:{format:"uint",minimum:0,type:"integer"},since:{format:"int64",type:"integer"}},required:["action","since","limit_sessions","dry_run"],type:"object"},{additionalProperties:!1,properties:{action:{const:"sessions_sync_status",type:"string"},idempotency_key:{type:"string"}},required:["action","idempotency_key"],type:"object"},{additionalProperties:!1,properties:{action:{const:"sessions_sync_cancel",type:"string"},idempotency_key:{type:"string"}},required:["action","idempotency_key"],type:"object"},{additionalProperties:!1,properties:{action:{const:"sessions_unfinished",type:"string"},limit:{format:"uint",minimum:0,type:"integer"}},required:["action","limit"],type:"object"},{additionalProperties:!1,description:"Import hook analytics JSONL into the accounting ledger.",properties:{action:{const:"analytics_sync",type:"string"},scope:{$ref:"#/$defs/AdminCliScopeV1"}},required:["action","scope"],type:"object"},{additionalProperties:!1,properties:{action:{const:"analytics_diagnostics",type:"string"},all:{type:"boolean"},no_sync:{type:"boolean"},scope:{$ref:"#/$defs/AdminCliScopeV1"}},required:["action","scope","all","no_sync"],type:"object"},{additionalProperties:!1,description:"Record the served project's saved-token total.",properties:{action:{const:"registry_update",type:"string"},tokens:{format:"uint64",minimum:0,type:"integer"}},required:["action","tokens"],type:"object"},{additionalProperties:!1,properties:{action:{const:"registry_list",type:"string"},limit:{format:"uint",minimum:0,type:"integer"},project_arg:{description:"Checkout to mark active when the caller's connection names no\nproject.",type:["string","null"]},query:{type:["string","null"]}},required:["action","limit"],type:"object"},{additionalProperties:!1,properties:{action:{const:"registry_context",type:"string"},project_arg:{description:"Project path or alias; the caller's project when omitted.",type:["string","null"]}},required:["action"],type:"object"},{additionalProperties:!1,properties:{action:{const:"registry_empty",type:"string"}},required:["action"],type:"object"},{additionalProperties:!1,properties:{action:{const:"registry_project_tokens",type:"string"},project_args:{items:{type:"string"},type:"array"}},required:["action","project_args"],type:"object"},{additionalProperties:!1,description:"Plan, or with `apply` execute, collection of registry rows whose\ncheckout is gone.",properties:{action:{const:"registry_gc",type:"string"},apply:{type:"boolean"},prefix:{type:["string","null"]}},required:["action","apply"],type:"object"},{additionalProperties:!1,description:"One project's storage (`project_id` with `project_root`), or one page\nof the profile's.",properties:{action:{const:"storage_report",type:"string"},cursor:{default:null,type:["string","null"]},limit:{default:8,format:"uint",minimum:0,type:"integer"},project_id:{type:["string","null"]},project_root:{type:["string","null"]}},required:["action"],type:"object"},{additionalProperties:!1,properties:{action:{const:"gain_query",type:"string"},history:{type:"boolean"},project_arg:{type:["string","null"]},since:{format:"int64",type:"integer"}},required:["action","since","history"],type:"object"}],title:"AdminCliSurfaceRequestV1"},{$defs:{AdminCliAnalyticsImportV1:{additionalProperties:!1,properties:{imported:{format:"uint64",minimum:0,type:"integer"},sources:{description:"One row per hook JSONL source: `path`, `imported`, `skipped`, `error`.",items:!0,type:"array"}},required:["imported","sources"],type:"object"},AdminCliCostSummaryV1:{additionalProperties:!1,properties:{range:{type:"string"},summary:{$ref:"#/$defs/AdminCliCostTotalsV1"},today:{$ref:"#/$defs/AdminCliCostTodayV1"}},required:["range","summary","today"],type:"object"},AdminCliCostTodayV1:{additionalProperties:!1,properties:{provider_usage:!0},required:["provider_usage"],type:"object"},AdminCliCostTotalsV1:{additionalProperties:!1,properties:{efficiency_ratio:{description:"Saved over saved-plus-consumed; null when consumption is unmeasured.",format:"double",type:["number","null"]},provider_usage:{description:"The provider-usage cost summary as the session memory prices it."},tokens_saved:{format:"uint64",minimum:0,type:"integer"}},required:["provider_usage","tokens_saved"],type:"object"},AdminCliGainDayV1:{additionalProperties:!1,properties:{calls:{format:"uint64",minimum:0,type:"integer"},day:{description:"Start-of-day epoch seconds (UTC).",format:"int64",type:"integer"},saved_tokens:{format:"uint64",minimum:0,type:"integer"}},required:["day","saved_tokens","calls"],type:"object"},AdminCliGainHistoryV1:{additionalProperties:!1,properties:{history:{items:{$ref:"#/$defs/AdminCliGainDayV1"},type:"array"}},required:["history"],type:"object"},AdminCliGainTotalV1:{additionalProperties:!1,properties:{calls:{format:"uint64",minimum:0,type:"integer"},saved_tokens:{format:"uint64",minimum:0,type:"integer"}},required:["saved_tokens","calls"],type:"object"},AdminCliProjectTokenTotalV1:{additionalProperties:!1,description:"A project whose ledger could not be read reports a null total and the\nreason, never a measured zero.",properties:{error:{type:["string","null"]},project:{type:"string"},tokens:{format:"uint64",minimum:0,type:["integer","null"]}},required:["project"],type:"object"},AdminCliProjectTokensV1:{additionalProperties:!1,properties:{projects:{items:{$ref:"#/$defs/AdminCliProjectTokenTotalV1"},type:"array"}},required:["projects"],type:"object"},AdminCliRegistryContextV1:{oneOf:[{additionalProperties:!1,properties:{aliases:{description:"Alias rows exactly as the registry serializes them.",items:!0,type:"array"},profile_id:{type:"string"},project:{$ref:"#/$defs/PublicCodeProject"},status:{const:"ok",type:"string"},stores:{description:"Store rows exactly as the registry serializes them.",items:!0,type:"array"}},required:["status","profile_id","project","aliases","stores"],type:"object"},{additionalProperties:!1,description:"The call named no project and its connection has none.",properties:{project:{type:"null"},status:{const:"invalid",type:"string"}},required:["status","project"],type:"object"},{additionalProperties:!1,properties:{project:{type:"null"},status:{const:"not_found",type:"string"}},required:["status","project"],type:"object"}]},AdminCliRegistryEmptyV1:{additionalProperties:!1,properties:{empty:{type:"boolean"}},required:["empty"],type:"object"},AdminCliRegistryGcV1:{additionalProperties:!1,description:"The registry collection plan, with its deletion counters filled when it\nwas applied.",properties:{apply:{type:"boolean"},candidate_count:{format:"uint",minimum:0,type:"integer"},candidate_paths:{items:{type:"string"},type:"array"},candidates:{description:"Registry project rows exactly as the registry serializes them.",items:!0,type:"array"},code_project_candidate_count:{format:"uint",minimum:0,type:"integer"},deleted_code_project_count:{format:"uint",minimum:0,type:"integer"},deleted_count:{format:"uint",minimum:0,type:"integer"},deleted_storage_project_count:{format:"uint",minimum:0,type:"integer"},metadata_candidate_count:{format:"uint",minimum:0,type:"integer"},prefix:{type:["string","null"]},protected_code_project_count:{format:"uint",minimum:0,type:"integer"},protected_code_projects:{items:!0,type:"array"},storage_project_candidate_count:{format:"uint",minimum:0,type:"integer"},storage_project_candidates:{items:{type:"string"},type:"array"}},required:["apply","candidate_count","metadata_candidate_count","code_project_candidate_count","storage_project_candidate_count","protected_code_project_count","deleted_count","deleted_code_project_count","deleted_storage_project_count","candidate_paths","candidates","protected_code_projects","storage_project_candidates"],type:"object"},AdminCliRegistryListV1:{oneOf:[{additionalProperties:!1,properties:{limit:{format:"uint",minimum:0,type:"integer"},project_tree:{items:{$ref:"#/$defs/ProjectRepoGroup"},type:"array"},projects:{items:{$ref:"#/$defs/PublicCodeProject"},type:"array"},query:{type:["string","null"]},status:{const:"ok",type:"string"},summary:{$ref:"#/$defs/ProjectRegistrySummary"},truncated:{type:"boolean"}},required:["status","limit","truncated","summary","project_tree","projects"],type:"object"}]},AdminCliRegistryUpdateV1:{additionalProperties:!1,properties:{current:{format:"uint64",minimum:0,type:"integer"},previous:{description:"The total before this write; null when the ledger could not be read.",format:"uint64",minimum:0,type:["integer","null"]},previous_error:{type:["string","null"]}},required:["current"],type:"object"},AdminCliSessionSyncV1:{description:"The daemon session-sync owner's answer.",oneOf:[{additionalProperties:!1,properties:{accepted_at:{$ref:"#/$defs/UtcMicros"},idempotency_key:{type:"string"},operation_id:{type:"string"},status:{const:"accepted",type:"string"}},required:["status","operation_id","idempotency_key","accepted_at"],type:"object"},{additionalProperties:!1,description:"An identical sync was already running; this call joined it.",properties:{accepted_at:{$ref:"#/$defs/UtcMicros"},idempotency_key:{type:"string"},operation_id:{type:"string"},status:{const:"joined",type:"string"}},required:["status","operation_id","idempotency_key","accepted_at"],type:"object"},{additionalProperties:!1,properties:{coalesced_primary:{type:["string","null"]},completed_at:{$ref:"#/$defs/UtcMicros"},coverage:{items:{$ref:"#/$defs/SessionSyncSourceCoverageV1"},type:"array"},failure_codes:{items:{type:"string"},type:"array"},idempotency_key:{type:"string"},operation_id:{type:"string"},source:{$ref:"#/$defs/SessionSyncSourceV1"},source_frontiers:{items:{$ref:"#/$defs/SessionSyncSourceFrontierV1"},type:"array"},stats:{$ref:"#/$defs/SessionSyncStatsV1"},status:{const:"complete",type:"string"},termination:{$ref:"#/$defs/OperationTermination"}},required:["status","operation_id","idempotency_key","source","termination","stats","coverage","source_frontiers","failure_codes","completed_at"],type:"object"},{additionalProperties:!1,properties:{status:{const:"cancelled",type:"string"}},required:["status"],type:"object"},{additionalProperties:!1,properties:{status:{const:"deadline_exceeded",type:"string"}},required:["status"],type:"object"},{additionalProperties:!1,properties:{status:{const:"wrong_scope",type:"string"}},required:["status"],type:"object"},{additionalProperties:!1,properties:{reason_code:{type:"string"},status:{const:"unavailable",type:"string"}},required:["status","reason_code"],type:"object"}]},AdminCliStorageReportV1:{additionalProperties:!1,description:"One storage report page, or one project's report.",properties:{code_generation_retention:{items:!0,type:"array"},code_generation_retention_availability:{items:!0,type:"array"},coverage:!0,full_profile_size:!0,global_db_bytes:{format:"uint64",minimum:0,type:"integer"},profile_root:{type:"string"},stores:{description:"Report rows exactly as the retention report serializes them.",items:!0,type:"array"},unregistered_bytes:{format:"uint64",minimum:0,type:"integer"},unregistered_dir_count:{format:"uint",minimum:0,type:"integer"}},required:["profile_root","stores","code_generation_retention","code_generation_retention_availability","unregistered_dir_count","unregistered_bytes","global_db_bytes","coverage"],type:"object"},AdminCliUnfinishedSessionsV1:{additionalProperties:!1,properties:{items:{description:"Workflow state rows exactly as the session store serializes them.",items:!0,type:"array"}},required:["items"],type:"object"},OperationTermination:gL,ProjectRegistryEntry:g4,ProjectRegistrySummary:g6,ProjectRepoGroup:g3,PublicCodeProject:_n,SessionSyncCoverageV1:{oneOf:[{properties:{outcome:{const:"complete",type:"string"}},required:["outcome"],type:"object"},{properties:{deferred_units:{format:"uint64",minimum:0,type:"integer"},outcome:{const:"partial",type:"string"}},required:["outcome","deferred_units"],type:"object"},{properties:{admitted_units:{format:"uint64",minimum:0,type:"integer"},outcome:{const:"backpressured",type:"string"},rejected_units:{format:"uint64",minimum:0,type:"integer"}},required:["outcome","admitted_units","rejected_units"],type:"object"}]},SessionSyncSourceCoverageV1:{properties:{coverage:{$ref:"#/$defs/SessionSyncCoverageV1"},store_scope:{type:"string"}},required:["store_scope","coverage"],type:"object"},SessionSyncSourceFrontierV1:{description:"Exact canonical observation cursor committed by one source/store authority.",properties:{committed_cursor_json:{type:"string"},scope_json:{type:"string"},source_json:{type:"string"},store_scope:{type:"string"}},required:["store_scope","source_json","scope_json","committed_cursor_json"],type:"object"},SessionSyncSourceV1:{description:"The command that started a session sync, without its options.",oneOf:[{const:"import_transcripts",description:"Hands its remaining historical catch-up to the background refresh\nworkers.",type:"string"},{const:"synchronize_git",description:"A bounded foreground pass; nothing resumes its unfinished coverage.",type:"string"}]},SessionSyncStatsV1:{properties:{commits_attributed:{format:"uint64",minimum:0,type:"integer"},messages_imported:{format:"uint64",minimum:0,type:"integer"},sessions_imported:{format:"uint64",minimum:0,type:"integer"},sessions_scanned:{format:"uint64",minimum:0,type:"integer"},skipped:{format:"uint64",minimum:0,type:"integer"},spans_written:{format:"uint64",minimum:0,type:"integer"}},required:["sessions_imported","messages_imported","sessions_scanned","spans_written","commits_attributed","skipped"],type:"object"},UtcMicros:vK},$schema:"https://json-schema.org/draft/2020-12/schema",anyOf:[{$ref:"#/$defs/AdminCliCostSummaryV1"},{$ref:"#/$defs/AdminCliSessionSyncV1"},{$ref:"#/$defs/AdminCliUnfinishedSessionsV1"},{$ref:"#/$defs/AdminCliAnalyticsImportV1"},{$ref:"#/$defs/AdminCliRegistryUpdateV1"},{$ref:"#/$defs/AdminCliRegistryListV1"},{$ref:"#/$defs/AdminCliRegistryContextV1"},{$ref:"#/$defs/AdminCliRegistryEmptyV1"},{$ref:"#/$defs/AdminCliProjectTokensV1"},{$ref:"#/$defs/AdminCliRegistryGcV1"},{$ref:"#/$defs/AdminCliStorageReportV1"},{$ref:"#/$defs/AdminCliGainHistoryV1"},{$ref:"#/$defs/AdminCliGainTotalV1"},{description:"The diagnostics report is the analytics bridge's open document; it\ndecodes last so it never claims another action's body."}],description:"One action's answer.",title:"AdminCliResultV1"},{$defs:{AutomaticFactReceiptStateV1:m6,AutomationReconcileScope:m7},$schema:"https://json-schema.org/draft/2020-12/schema",description:"Every action is a struct variant: an internally tagged unit variant would\nignore keys beside its tag instead of refusing them.",oneOf:[{additionalProperties:!1,description:"Read the project's local usage counter.",properties:{action:{const:"counter_get",type:"string"}},required:["action"],type:"object"},{additionalProperties:!1,description:"Reset the project's local usage counter to zero.",properties:{action:{const:"counter_reset",type:"string"}},required:["action"],type:"object"},{additionalProperties:!1,description:"Record the project's saved-token total in the profile registry and\nread it back beside the other projects' total.",properties:{action:{const:"status_accounting",type:"string"}},required:["action"],type:"object"},{additionalProperties:!1,description:"List terminal automatic-fact receipts.",properties:{action:{const:"automatic_fact_receipt_list",type:"string"},limit:{format:"uint",minimum:0,type:"integer"},state:{anyOf:[{$ref:"#/$defs/AutomaticFactReceiptStateV1"},{type:"null"}],description:"Only receipts in this state (default: every state)."}},required:["action","limit"],type:"object"},{additionalProperties:!1,description:"Read one automatic-fact receipt by its apply id.",properties:{action:{const:"automatic_fact_receipt_view",type:"string"},id:{type:"string"}},required:["action","id"],type:"object"},{additionalProperties:!1,description:"Reconcile automation schedulers with the saved configuration.",properties:{action:{const:"automation_reconcile",type:"string"},scope:{$ref:"#/$defs/AutomationReconcileScope"}},required:["action","scope"],type:"object"}],title:"AdminProjectSurfaceRequestV1"},{$defs:{AdminProjectCounterResetV1:{additionalProperties:!1,properties:{reset:{description:"Always true: a reset that did not settle is a refusal.",type:"boolean"}},required:["reset"],type:"object"},AdminProjectCounterV1:{additionalProperties:!1,properties:{counter:{format:"uint64",minimum:0,type:"integer"}},required:["counter"],type:"object"},AdminProjectStatusAccountingV1:{additionalProperties:!1,properties:{global_tokens_saved:{description:"Tokens the profile's other projects saved; null when they saved none.",format:"uint64",minimum:0,type:["integer","null"]},tokens_saved:{format:"uint64",minimum:0,type:"integer"}},required:["tokens_saved"],type:"object"},AutomaticFactAddRequestV1:{additionalProperties:!1,description:"The add-fact request an automatic apply recorded.",properties:{category:{$ref:"#/$defs/FactCategoryV1"},content:{type:"string"},entities:{items:{type:"string"},type:"array"},metadata:!0,source_label:{type:["string","null"]},tags:{items:{type:"string"},type:"array"},trust:{format:"double",type:"number"}},required:["content","category","tags","entities","trust","metadata"],type:"object"},AutomaticFactEvidenceV1:{additionalProperties:!1,description:"Automation evidence retained with the receipt.",properties:{evidence_hash:{type:["string","null"]},item:!0,validation:!0},type:"object"},AutomaticFactReceiptAvailabilityV1:{oneOf:[{additionalProperties:!1,properties:{state:{const:"available",type:"string"}},required:["state"],type:"object"}]},AutomaticFactReceiptListV1:{additionalProperties:!1,properties:{availability:{$ref:"#/$defs/AutomaticFactReceiptAvailabilityV1"},count:{format:"uint",minimum:0,type:"integer"},next_after_apply_id:{description:"Continue after this apply id; null on the last page.",type:["string","null"]},receipts:{items:{$ref:"#/$defs/AutomaticFactReceiptV1"},type:"array"}},required:["availability","count","receipts"],type:"object"},AutomaticFactReceiptStateV1:m6,AutomaticFactReceiptV1:{additionalProperties:!1,description:"One terminal automatic-fact apply receipt.",properties:{add_fact_request:{$ref:"#/$defs/AutomaticFactAddRequestV1"},applied_fact_id:{description:"Present when the fact was applied.",type:["string","null"]},apply_id:{type:"string"},evidence:{$ref:"#/$defs/AutomaticFactEvidenceV1"},operation_id:{type:"string"},quarantine_reason:{description:"Present when the fact was quarantined.",type:["string","null"]},recorded_at_micros:{format:"int64",type:"integer"},state:{$ref:"#/$defs/AutomaticFactReceiptStateV1"}},required:["apply_id","state","operation_id","add_fact_request","evidence","recorded_at_micros"],type:"object"},AutomaticFactReceiptViewV1:{additionalProperties:!1,properties:{receipt:{$ref:"#/$defs/AutomaticFactReceiptV1"}},required:["receipt"],type:"object"},AutomationReconcileScope:m7,AutomationSchedulerOwnerReconcileOutcome:{additionalProperties:!1,properties:{graph_db_path:{type:"string"},outcome:{$ref:"#/$defs/AutomationSchedulerReconcileOutcome"},project_id:{type:["string","null"]},scope_prefix:{type:["string","null"]},store_root:{type:"string"}},required:["store_root","graph_db_path","outcome"],type:"object"},AutomationSchedulerReconcileOutcome:{description:"What reconciling one automation scheduler did.",enum:["started","running_notified","exiting","finished","retiring","not_configured","lifecycle_inactive","owner_unavailable"],type:"string"},FactCategoryV1:hD,ProfileAutomationReconcileReport:{additionalProperties:!1,description:"Every cached project scheduler of the profile, reconciled.",properties:{cached_owners:{format:"uint",minimum:0,type:"integer"},outcomes:{items:{$ref:"#/$defs/AutomationSchedulerOwnerReconcileOutcome"},type:"array"},scope:{$ref:"#/$defs/AutomationReconcileScope",description:"Always `profile`."},uncached_projects:{$ref:"#/$defs/UncachedProjectReconcileOutcome"}},required:["scope","cached_owners","outcomes","uncached_projects"],type:"object"},ProjectAutomationReconcileReport:{additionalProperties:!1,description:"The served project's scheduler reconcile.",properties:{outcome:{$ref:"#/$defs/AutomationSchedulerReconcileOutcome"},scope:{$ref:"#/$defs/AutomationReconcileScope",description:"Always `project`."}},required:["scope","outcome"],type:"object"},UncachedProjectReconcileOutcome:{description:"A project whose scheduler is not cached reconciles when it next starts.",enum:["deferred_until_project_startup"],type:"string"}},$schema:"https://json-schema.org/draft/2020-12/schema",anyOf:[{$ref:"#/$defs/AdminProjectCounterV1"},{$ref:"#/$defs/AdminProjectCounterResetV1"},{$ref:"#/$defs/AdminProjectStatusAccountingV1"},{$ref:"#/$defs/AutomaticFactReceiptListV1"},{$ref:"#/$defs/AutomaticFactReceiptViewV1"},{$ref:"#/$defs/ProjectAutomationReconcileReport"},{$ref:"#/$defs/ProfileAutomationReconcileReport"}],description:"One action's result, in the shape the action has always answered.",title:"AdminProjectResultV1"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"`tracedecay_admin_sync` takes no arguments: it reconciles the served\nproject.",title:"AdminSyncSurfaceRequestV1",type:"object"},{$defs:{AdminSyncAdmissionV1:{description:"The code-index scheduler's admission of the reconcile.",oneOf:[{enum:["queued"],type:"string"},{const:"not_applicable",description:"Code indexing does not apply to this project.",type:"string"}]},AdminSyncReconcileScopeV1:{description:"What the reconcile covers.",enum:["authoritative_project"],type:"string"}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{project_root:{type:"string"},reconcile_scope:{$ref:"#/$defs/AdminSyncReconcileScopeV1"},status:{$ref:"#/$defs/AdminSyncAdmissionV1"}},required:["reconcile_scope","status","project_root"],title:"AdminSyncResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{depth:{description:"Maximum dependency traversal depth (default: 5, at most 10).",format:"uint32",minimum:0,type:["integer","null"]},files:{description:"List of changed file paths to analyze.",items:{type:"string"},type:"array"},filter:{description:"Custom glob pattern for test files (default: common test patterns).",type:["string","null"]}},required:["files"],title:"AffectedSurfaceRequestV1",type:"object"},{$defs:{AffectedRankingMetadataV1:{additionalProperties:!1,properties:{compatibility_field:{type:"string"},distance:{type:"string"},recommended_proximity:{items:{type:"string"},type:"array"},strategy:{type:"string"}},required:["strategy","distance","recommended_proximity","compatibility_field"],type:"object"},CodeIndexBuildBlockedReasonV1:fE,CodeIndexConvergenceParkedV1:fA,CodeIndexStalenessStateV1:fz,PrimitiveFreshnessStateV1:gG,PrimitiveIndexingStateV1:gB,PrimitiveSearchFreshnessV1:gQ,RankedAffectedTestV1:{additionalProperties:!1,properties:{distance:{format:"uint",minimum:0,type:"integer"},path:{type:"string"},proximity:{type:"string"},rank:{format:"uint",minimum:0,type:"integer"}},required:["path","rank","distance","proximity"],type:"object"}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{affected_tests:{items:{type:"string"},type:"array"},changed_files:{items:{type:"string"},type:"array"},count:{format:"uint",minimum:0,type:"integer"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},ranked_tests:{items:{$ref:"#/$defs/RankedAffectedTestV1"},type:"array"},ranking_metadata:{$ref:"#/$defs/AffectedRankingMetadataV1"},recommended_tests:{description:"Tests within two dependency hops of a changed file.",items:{type:"string"},type:"array"}},required:["changed_files","affected_tests","count","ranked_tests","recommended_tests","ranking_metadata"],title:"AffectedResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Opaque daemon-minted handle accepted by the first feedback read invocation.",properties:{request_handle:{type:"string"}},required:["request_handle"],title:"FeedbackHandleRequestV1",type:"object"},{$defs:{AgentInstanceId:mN,CodeGenerationId:fT,CommitId:fH,FeedbackContentIdentityV1:h9,FeedbackCycleId:h5,FeedbackImpactStateV1:ys,FeedbackResultId:yc,FeedbackScopeV1:yl,FeedbackTargetV1:yp,FileOccurrenceId:yu,HostInstanceId:yH,ManifestDigest:gl,ProjectId:g2,RepositoryId:_v,RetrievalAnchorId:_q,SessionId:_5,SourceSpan:vb,SymbolOccurrenceId:vV,WorktreeId:$M},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Canonical affected-tests projection returned by `affected_tests`.",properties:{affected_tests:{items:{$ref:"#/$defs/SymbolOccurrenceId"},type:"array"},content_identity:{anyOf:[{$ref:"#/$defs/FeedbackContentIdentityV1"},{type:"null"}]},cycle_id:{$ref:"#/$defs/FeedbackCycleId"},evidence_anchors:{items:{$ref:"#/$defs/RetrievalAnchorId"},type:"array"},result_id:{$ref:"#/$defs/FeedbackResultId"},scope:{$ref:"#/$defs/FeedbackScopeV1"},state:{anyOf:[{$ref:"#/$defs/FeedbackImpactStateV1"},{type:"null"}]},target:{anyOf:[{$ref:"#/$defs/FeedbackTargetV1"},{type:"null"}]}},required:["result_id","cycle_id","scope","affected_tests","evidence_anchors"],title:"CanonicalAffectedTestsProjectionV1",type:"object"},{$defs:{AnalyticsScopeV1:mL,AnalyticsSectionV1:{enum:["tools","hints","facts","automation"],type:"string"}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{scope:{anyOf:[{$ref:"#/$defs/AnalyticsScopeV1"},{type:"null"}],description:'"project" (default) scopes analytics_events to the resolved project;\n"all" reports across every registered project.'},section:{anyOf:[{$ref:"#/$defs/AnalyticsSectionV1"},{type:"null"}],description:"Optional filter to a single section. Omit to return all sections."},window_days:{description:"Lookback window in days for events and automation runs (default: 14,\n1-365).",format:"uint32",maximum:365,minimum:1,type:["integer","null"]}},title:"AnalyticsSurfaceRequestV1",type:"object"},{$defs:{AnalyticsAutomationJobOutcomesV1:{additionalProperties:!1,properties:{failed:{format:"int64",type:"integer"},job:{type:"string"},other:{format:"int64",type:"integer"},skipped:{format:"int64",type:"integer"},succeeded:{format:"int64",type:"integer"}},required:["job","succeeded","failed","skipped","other"],type:"object"},AnalyticsAutomationOutcomesV1:{additionalProperties:!1,description:"`available` is always `true`.",properties:{available:{type:"boolean"},by_job:{items:{$ref:"#/$defs/AnalyticsAutomationJobOutcomesV1"},type:"array"},dashboard_root:{type:"string"},records_considered:{format:"uint",minimum:0,type:"integer"},records_in_window:{format:"uint",minimum:0,type:"integer"},records_truncated:{type:"boolean"}},required:["available","dashboard_root","records_considered","records_in_window","records_truncated","by_job"],type:"object"},AnalyticsAutomationSectionV1:{anyOf:[{$ref:"#/$defs/AnalyticsAutomationOutcomesV1"},{$ref:"#/$defs/AnalyticsLedgerUnavailableV1"},{$ref:"#/$defs/AnalyticsSectionUnavailableV1"}],description:"The automation run outcomes of the resolved project's ledger, or why the\nledger is unavailable."},AnalyticsCanonicalCallNameV1:{additionalProperties:!1,description:"A recorded event name that resolved to a canonical tool under another\nspelling.",properties:{calls:{format:"int64",type:"integer"},canonical_tool_name:{type:"string"},errors:{format:"int64",type:"integer"},event_name:{type:"string"}},required:["event_name","canonical_tool_name","calls","errors"],type:"object"},AnalyticsEventCallNameV1:{additionalProperties:!1,description:"A recorded event name with no advertised canonical tool.",properties:{calls:{format:"int64",type:"integer"},errors:{format:"int64",type:"integer"},event_name:{type:"string"}},required:["event_name","calls","errors"],type:"object"},AnalyticsFactFunnelV1:{additionalProperties:!1,description:"`available` is always `true`.",properties:{available:{type:"boolean"},facts:{format:"uint64",minimum:0,type:"integer"},facts_rated:{format:"uint64",minimum:0,type:"integer"},facts_retrieved:{format:"uint64",minimum:0,type:"integer"},helpful_feedback:{format:"uint64",minimum:0,type:"integer"},project_root:{type:"string"},retrievals:{format:"uint64",minimum:0,type:"integer"},unhelpful_feedback:{format:"uint64",minimum:0,type:"integer"}},required:["available","project_root","facts","retrievals","facts_retrieved","helpful_feedback","unhelpful_feedback","facts_rated"],type:"object"},AnalyticsFactsSectionV1:{anyOf:[{$ref:"#/$defs/AnalyticsFactFunnelV1"},{$ref:"#/$defs/AnalyticsProjectSectionUnavailableV1"},{$ref:"#/$defs/AnalyticsSectionUnavailableV1"}],description:"The fact-store funnel of the resolved project, or why it is unavailable.\n\nThe variants are distinguished by their exact field sets, so each one\ndenies unknown fields and the most specific shape is tried first."},AnalyticsHintCategoryV1:{properties:{category:{type:"string"},emitted:{format:"int64",type:"integer"},followed:{format:"int64",type:"integer"},ignored:{format:"int64",type:"integer"},suppressed:{format:"int64",type:"integer"}},required:["category","emitted","followed","ignored","suppressed"],type:"object"},AnalyticsHintsPayloadV1:{properties:{available:{type:"boolean"},by_category:{items:{$ref:"#/$defs/AnalyticsHintCategoryV1"},type:"array"},error:{default:null,type:["string","null"]},source:{type:"string"}},required:["available","source","by_category"],type:"object"},AnalyticsLedgerUnavailableV1:{additionalProperties:!1,description:"The ledger exists but failed to read. `available` is always `false`.",properties:{available:{type:"boolean"},dashboard_root:{type:"string"},reason:{type:"string"}},required:["available","reason","dashboard_root"],type:"object"},AnalyticsModeReadModelV1:mD,AnalyticsModeV1:mF,AnalyticsProjectSectionUnavailableV1:{additionalProperties:!1,description:"A project-scoped section whose store failed to read. `available` is\nalways `false`.",properties:{available:{type:"boolean"},project_root:{type:"string"},reason:{type:"string"}},required:["available","reason","project_root"],type:"object"},AnalyticsReportStatusV1:{description:"The settled status of an analytics report.",enum:["ok"],type:"string"},AnalyticsScopeV1:mL,AnalyticsSectionUnavailableV1:{additionalProperties:!1,description:"A section the report could not read. `available` is always `false`.",properties:{available:{type:"boolean"},reason:{type:"string"}},required:["available","reason"],type:"object"},AnalyticsTierCountsV1:{additionalProperties:!1,properties:{calls:{format:"int64",type:"integer"},errors:{format:"int64",type:"integer"},tier:{type:"string"}},required:["tier","calls","errors"],type:"object"},AnalyticsToolsSectionV1:{additionalProperties:!1,properties:{aliased_call_names:{items:{$ref:"#/$defs/AnalyticsCanonicalCallNameV1"},type:"array"},available:{type:"boolean"},available_defined_tool_count:{format:"uint",minimum:0,type:"integer"},bound_internal_call_names:{items:{$ref:"#/$defs/AnalyticsEventCallNameV1"},type:"array"},called_available_defined_tool_count:{format:"uint",minimum:0,type:"integer"},maximal_defined_tool_count:{format:"uint",minimum:0,type:"integer"},raw_distinct_event_name_count:{format:"uint",minimum:0,type:"integer"},tiers:{items:{$ref:"#/$defs/AnalyticsTierCountsV1"},type:"array"},top_tools:{items:{$ref:"#/$defs/AnalyticsTopToolV1"},type:"array"},unavailable_public_call_names:{items:{$ref:"#/$defs/AnalyticsCanonicalCallNameV1"},type:"array"},unknown_or_retired_call_names:{items:{$ref:"#/$defs/AnalyticsEventCallNameV1"},type:"array"},zero_call_available_defined_tools:{$ref:"#/$defs/AnalyticsZeroCallToolsV1"}},required:["available","tiers","top_tools","raw_distinct_event_name_count","called_available_defined_tool_count","available_defined_tool_count","maximal_defined_tool_count","aliased_call_names","bound_internal_call_names","unavailable_public_call_names","unknown_or_retired_call_names","zero_call_available_defined_tools"],type:"object"},AnalyticsTopToolV1:{additionalProperties:!1,properties:{calls:{format:"int64",type:"integer"},errors:{format:"int64",type:"integer"},tier:{type:"string"},tool_name:{type:"string"}},required:["tool_name","tier","calls","errors"],type:"object"},AnalyticsZeroCallToolsV1:{additionalProperties:!1,properties:{count:{format:"uint",minimum:0,type:"integer"},sample:{items:{type:"string"},type:"array"},sample_truncated:{type:"boolean"}},required:["count","sample","sample_truncated"],type:"object"},ComparisonDispositionV1:fG,CostsReadModelV1:hw,CoverageStateV1:hV,LatencyDistributionReadModelV1:yJ,MetricCalibrationV1:gh,MetricCohortV1:gy,MetricCoverageV1:gg,MetricEvidenceClassV1:g_,MetricProvenanceV1:gv,MetricSourceV1:gb,MetricTemporalV1:g$,MetricUncertaintyV1:gS,MetricValueV1:gk,ObservabilityHorizonV1:gM,ObservatoryReadModelV1:gN,PerformanceComparisonReadModelV1:gH,ProviderLatencyReadModelV1:_o,RejectedArgumentAnalyticsV1:_f,RejectedArgumentErrorClassV1:_h,RejectedArgumentGroupV1:_y,RejectedArgumentNameV1:_g,RejectedArgumentSurfaceV1:__},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{automation:{anyOf:[{$ref:"#/$defs/AnalyticsAutomationSectionV1"},{type:"null"}]},costs:{anyOf:[{$ref:"#/$defs/CostsReadModelV1"},{type:"null"}],description:"Present only when no section filter was requested."},event_count:{format:"int64",type:"integer"},event_count_truncated:{type:"boolean"},facts:{anyOf:[{$ref:"#/$defs/AnalyticsFactsSectionV1"},{type:"null"}]},hints:{anyOf:[{$ref:"#/$defs/AnalyticsHintsPayloadV1"},{type:"null"}]},observatory:{anyOf:[{$ref:"#/$defs/ObservatoryReadModelV1"},{type:"null"}],description:"Present only when no section filter was requested."},project_id:{description:'The canonical analytics project key; `None` for `scope: "all"`.',type:["string","null"]},project_root:{type:"string"},scope:{$ref:"#/$defs/AnalyticsScopeV1"},since:{format:"int64",type:"integer"},status:{$ref:"#/$defs/AnalyticsReportStatusV1"},tools:{anyOf:[{$ref:"#/$defs/AnalyticsToolsSectionV1"},{type:"null"}]},window_days:{format:"uint32",minimum:0,type:"integer"}},required:["status","scope","project_root","window_days","since","event_count","event_count_truncated"],title:"AnalyticsResultV1",type:"object"},{$defs:{ManifestDigest:gl,NativeIntegrationApprovalId:gP,NativeIntegrationPreviewId:gI,NativeIntegrationTransactionId:gT},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Exact one-use apply request.\n\nApply accepts only an unexpired preview identity/digest plus a one-use\ncontent-bound approval. Arbitrary Git arguments, caller-supplied paths,\nSHAs, patches, commit lists, messages, environment, or config are\nunrepresentable.",properties:{approval_digest:{$ref:"#/$defs/ManifestDigest"},approval_id:{$ref:"#/$defs/NativeIntegrationApprovalId"},preview_digest:{$ref:"#/$defs/ManifestDigest"},preview_id:{$ref:"#/$defs/NativeIntegrationPreviewId"},transaction_id:{$ref:"#/$defs/NativeIntegrationTransactionId"}},required:["preview_id","preview_digest","approval_id","approval_digest","transaction_id"],title:"NativeIntegrationApplySurfaceRequest",type:"object"},{$defs:{ActorId:mW,BranchStackEdgeV1:fu,BranchStackId:fm,BranchStackNodeV1:ff,BranchStackRevisionId:fh,BranchStackRevisionV1:fy,BranchStackSourceV1:fg,CapabilityId:fV,CodeGenerationId:fT,CommitId:fH,ContentDigest:f6,GitOidV1:yx,GitOperationStateV1:yj,ManifestDigest:gl,MechanicalIntegrationModeV1:gp,NativeIntegrationAnalysisAnchorV1:{additionalProperties:!1,description:"Source-local anchor for a semantic conflict finding.",properties:{generation_id:{$ref:"#/$defs/CodeGenerationId"},logical_path:{type:"string"},source_span:{$ref:"#/$defs/SourceSpan"}},required:["generation_id","logical_path","source_span"],type:"object"},NativeIntegrationAnalysisCoverageV1:{description:"Completeness of one independently evaluated semantic evidence lane.",enum:["complete","partial","unsupported"],type:"string"},NativeIntegrationAnalysisGapV1:{description:"Why one semantic evidence lane cannot authorize integration.",enum:["parser_failure","unresolved_required_edge","withheld_source","stale_evidence","unsupported_language","dynamic_schema","unbound_migration_order","capacity_unavailable","authority_unavailable"],type:"string"},NativeIntegrationAnalysisLaneV1:{additionalProperties:!1,description:"Coverage and exact gaps for one independently evaluated analysis lane.",properties:{coverage:{$ref:"#/$defs/NativeIntegrationAnalysisCoverageV1"},gaps:{items:{$ref:"#/$defs/NativeIntegrationAnalysisGapV1"},type:"array"}},required:["coverage","gaps"],type:"object"},NativeIntegrationAnalysisReportV1:{additionalProperties:!1,description:"Daemon-produced semantic evidence for one exact native candidate tree.",properties:{analyzer_revision:{type:"string"},candidate:{$ref:"#/$defs/NativeIntegrationGenerationBindingV1"},conflicts:{items:{$ref:"#/$defs/NativeIntegrationSemanticConflictV1"},type:"array"},destination:{$ref:"#/$defs/NativeIntegrationGenerationBindingV1"},digest:{$ref:"#/$defs/ManifestDigest"},graph:{$ref:"#/$defs/NativeIntegrationAnalysisLaneV1"},merge_base:{$ref:"#/$defs/NativeIntegrationGenerationBindingV1"},migrations:{$ref:"#/$defs/NativeIntegrationAnalysisLaneV1"},schema:{$ref:"#/$defs/NativeIntegrationAnalysisLaneV1"},source:{$ref:"#/$defs/NativeIntegrationGenerationBindingV1"},tests:{$ref:"#/$defs/NativeIntegrationAnalysisLaneV1"}},required:["merge_base","source","destination","candidate","graph","tests","schema","migrations","conflicts","analyzer_revision","digest"],type:"object"},NativeIntegrationApprovalId:gP,NativeIntegrationDirectionV1:gV,NativeIntegrationGenerationBindingV1:{additionalProperties:!1,description:"One immutable code-generation binding used by native integration analysis.",properties:{content_identity:{$ref:"#/$defs/ContentDigest"},generation_id:{$ref:"#/$defs/CodeGenerationId"},project_id:{$ref:"#/$defs/ProjectId"},reference:{anyOf:[{$ref:"#/$defs/RefId"},{type:"null"}]},repository_id:{$ref:"#/$defs/RepositoryId"},seal_digest:{$ref:"#/$defs/ManifestDigest"},snapshot_digest:{$ref:"#/$defs/ManifestDigest"},source_revision:{anyOf:[{$ref:"#/$defs/GitOidV1"},{type:"null"}]},source_tree:{$ref:"#/$defs/GitOidV1"},worktree_id:{anyOf:[{$ref:"#/$defs/WorktreeId"},{type:"null"}]}},required:["generation_id","project_id","repository_id","snapshot_digest","content_identity","source_tree","seal_digest"],type:"object"},NativeIntegrationPhaseV1:{description:"Durable transaction phase. `RefCommitStarted` is the cancellation boundary.",enum:["prepared","candidate_verified","ref_commit_started","final_state_verification","terminal"],type:"string"},NativeIntegrationPreviewDispositionV1:gq,NativeIntegrationPreviewId:gI,NativeIntegrationSealedStackSnapshotV1:gx,NativeIntegrationSelectionBindingV1:gj,NativeIntegrationSemanticConflictKindV1:{description:"Static conflict class produced from canonical generation evidence.",enum:["divergent_symbol","signature_dependent","test_write_interaction","divergent_schema","migration_order"],type:"string"},NativeIntegrationSemanticConflictV1:{additionalProperties:!1,description:"One deterministic conflict finding with source evidence from both branches.",properties:{destination:{$ref:"#/$defs/NativeIntegrationAnalysisAnchorV1"},evidence_digest:{$ref:"#/$defs/ManifestDigest"},kind:{$ref:"#/$defs/NativeIntegrationSemanticConflictKindV1"},source:{$ref:"#/$defs/NativeIntegrationAnalysisAnchorV1"}},required:["kind","source","destination","evidence_digest"],type:"object"},NativeIntegrationSnapshotProjectionV1:{additionalProperties:!1,description:"Bounded projection of one frozen selection.",properties:{destination_ref:{$ref:"#/$defs/RefId"},frozen_at:{$ref:"#/$defs/UtcMicros"},inventory_epoch:{$ref:"#/$defs/WorktreeInventoryEpoch"},project_id:{$ref:"#/$defs/ProjectId"},repository_id:{$ref:"#/$defs/RepositoryId"},selection_digest:{$ref:"#/$defs/ManifestDigest"},source_ref:{$ref:"#/$defs/RefId"}},required:["selection_digest","project_id","repository_id","source_ref","destination_ref","inventory_epoch","frozen_at"],type:"object"},NativeIntegrationStatusProjectionV1:{additionalProperties:!1,description:"Bounded projection of one durable transaction status.",properties:{cancellation_requested:{type:"boolean"},destination_ref:{$ref:"#/$defs/RefId"},phase:{$ref:"#/$defs/NativeIntegrationPhaseV1"},phase_revision:{format:"uint64",minimum:0,type:"integer"},preview_digest:{$ref:"#/$defs/ManifestDigest"},preview_id:{$ref:"#/$defs/NativeIntegrationPreviewId"},repository_id:{$ref:"#/$defs/RepositoryId"},terminal_outcome:{anyOf:[{$ref:"#/$defs/NativeIntegrationTerminalOutcomeV1"},{type:"null"}]},transaction_id:{$ref:"#/$defs/NativeIntegrationTransactionId"},updated_at:{$ref:"#/$defs/UtcMicros"}},required:["transaction_id","preview_id","preview_digest","repository_id","destination_ref","phase","phase_revision","cancellation_requested","updated_at"],type:"object"},NativeIntegrationSurfaceUnavailableV1:{description:"Why a native-integration operation produced no advancing state.\n\nEvery variant is read-only and truthful. None of them authorizes apply, and\na denied or absent target is reported indistinguishably from an unavailable\nauthority so no identity, path, count, or topology leaks.",oneOf:[{enum:["partial","stale","denied","reset_required","durability_uncertain","cancelled","approval_conflict","transaction_conflict","recovery_required","needs_inspection","unknown_transaction"],type:"string"},{const:"authority_unmounted",description:"No native-integration runtime authority is mounted for this daemon.",type:"string"}]},NativeIntegrationTerminalOutcomeV1:gC,NativeIntegrationTransactionId:gT,NativeIntegrationUnavailabilityV1:gO,NativeWorktreeSurfaceResultV1:{oneOf:[{oneOf:[{properties:{coverage:{$ref:"#/$defs/WorktreeCoverageV1"},digest:{$ref:"#/$defs/ManifestDigest"},entries:{items:{$ref:"#/$defs/WorktreeInventoryEntryV1"},type:"array"},epoch:{$ref:"#/$defs/WorktreeInventoryEpoch"},observed_at:{$ref:"#/$defs/UtcMicros"},scope_set_digest:{$ref:"#/$defs/ManifestDigest"},scope_set_id:{$ref:"#/$defs/ScopeSetId"},scope_set_revision:{$ref:"#/$defs/ScopeSetRevision"},snapshot_id:{$ref:"#/$defs/WorktreeInventorySnapshotId"},state:{const:"snapshot",type:"string"}},required:["state","scope_set_id","scope_set_revision","scope_set_digest","snapshot_id","epoch","entries","coverage","observed_at","digest"],type:"object"},{properties:{state:{const:"stale",type:"string"}},required:["state"],type:"object"},{properties:{state:{const:"denied",type:"string"}},required:["state"],type:"object"},{properties:{state:{const:"unavailable",type:"string"}},required:["state"],type:"object"}],properties:{operation:{const:"inventory",type:"string"}},required:["operation"],type:"object"},{oneOf:[{properties:{clean:{$ref:"#/$defs/WorktreeObservationV1",description:"Whether Git status contains no tracked or untracked changes."},head:{anyOf:[{$ref:"#/$defs/GitOidV1"},{type:"null"}]},holder:{$ref:"#/$defs/WorktreeObservationV1"},inspection_digest:{$ref:"#/$defs/ManifestDigest"},kind:{anyOf:[{$ref:"#/$defs/WorktreeKindV1"},{type:"null"}]},locked:{$ref:"#/$defs/WorktreeObservationV1"},observed_at:{$ref:"#/$defs/UtcMicros"},operation_state:{anyOf:[{$ref:"#/$defs/GitOperationStateV1"},{type:"null"}]},presence:{$ref:"#/$defs/WorktreePresenceV1"},reference:{anyOf:[{$ref:"#/$defs/RefId"},{type:"null"}]},state:{const:"inspection",type:"string"},target:{$ref:"#/$defs/NativeWorktreeTargetV1"},unique_data:{$ref:"#/$defs/WorktreeObservationV1"},worktree_id:{$ref:"#/$defs/WorktreeId"}},required:["state","target","presence","worktree_id","clean","locked","holder","unique_data","observed_at","inspection_digest"],type:"object"},{properties:{state:{const:"stale",type:"string"}},required:["state"],type:"object"},{properties:{state:{const:"foreign",type:"string"}},required:["state"],type:"object"},{properties:{state:{const:"denied",type:"string"}},required:["state"],type:"object"},{properties:{state:{const:"unavailable",type:"string"}},required:["state"],type:"object"}],properties:{operation:{const:"inspection",type:"string"}},required:["operation"],type:"object"},{oneOf:[{properties:{confirmation_digest:{$ref:"#/$defs/ManifestDigest"},confirmed_at:{$ref:"#/$defs/UtcMicros"},inspection_digest:{$ref:"#/$defs/ManifestDigest"},state:{const:"confirmed",type:"string"},target:{$ref:"#/$defs/NativeWorktreeTargetV1"}},required:["state","target","inspection_digest","confirmation_digest","confirmed_at"],type:"object"},{properties:{state:{const:"stale",type:"string"}},required:["state"],type:"object"},{properties:{state:{const:"denied",type:"string"}},required:["state"],type:"object"},{properties:{state:{const:"needs_inspection",type:"string"}},required:["state"],type:"object"},{properties:{state:{const:"unavailable",type:"string"}},required:["state"],type:"object"}],properties:{operation:{const:"confirmation",type:"string"}},required:["operation"],type:"object"},{$ref:"#/$defs/WorktreeCleanupRemovalV1",properties:{operation:{const:"removal",type:"string"}},required:["operation"],type:"object"},{$ref:"#/$defs/WorktreeCleanupReconciliationV1",properties:{operation:{const:"reconciliation",type:"string"}},required:["operation"],type:"object"}]},NativeWorktreeTargetV1:gE,ProjectId:g2,RefId:_u,RepositoryId:_v,ResolvedScope:_k,ScopeSetId:_Q,ScopeSetRevision:_X,SourceSpan:vb,StackNodeId:vk,UtcMicros:vK,WorktreeCleanupReconciliationV1:{oneOf:[{properties:{confirmation_digest:{$ref:"#/$defs/ManifestDigest"},observed_at:{$ref:"#/$defs/UtcMicros"},state:{const:"removed",type:"string"}},required:["state","confirmation_digest","observed_at"],type:"object"},{properties:{state:{const:"still_present",type:"string"}},required:["state"],type:"object"},{properties:{state:{const:"durability_uncertain",type:"string"}},required:["state"],type:"object"},{properties:{state:{const:"stale",type:"string"}},required:["state"],type:"object"},{properties:{state:{const:"denied",type:"string"}},required:["state"],type:"object"},{properties:{state:{const:"unavailable",type:"string"}},required:["state"],type:"object"}]},WorktreeCleanupRemovalV1:{oneOf:[{properties:{confirmation_digest:{$ref:"#/$defs/ManifestDigest"},observed_at:{$ref:"#/$defs/UtcMicros"},state:{const:"removed",type:"string"}},required:["state","confirmation_digest","observed_at"],type:"object"},{properties:{confirmation_digest:{$ref:"#/$defs/ManifestDigest"},observed_at:{$ref:"#/$defs/UtcMicros"},state:{const:"already_removed",type:"string"}},required:["state","confirmation_digest","observed_at"],type:"object"},{properties:{state:{const:"denied",type:"string"}},required:["state"],type:"object"},{properties:{state:{const:"stale",type:"string"}},required:["state"],type:"object"},{properties:{state:{const:"durability_uncertain",type:"string"}},required:["state"],type:"object"},{properties:{state:{const:"unavailable",type:"string"}},required:["state"],type:"object"}]},WorktreeCoverageV1:{enum:["complete","partial"],type:"string"},WorktreeId:$M,WorktreeInventoryEntryV1:{additionalProperties:!1,properties:{clean:{$ref:"#/$defs/WorktreeObservationV1",description:"Whether Git status contains no tracked or untracked changes."},evidence_digest:{$ref:"#/$defs/ManifestDigest"},head:{anyOf:[{$ref:"#/$defs/GitOidV1"},{type:"null"}]},holder:{$ref:"#/$defs/WorktreeObservationV1"},kind:{anyOf:[{$ref:"#/$defs/WorktreeKindV1"},{type:"null"}]},locked:{$ref:"#/$defs/WorktreeObservationV1"},observed_at:{$ref:"#/$defs/UtcMicros"},operation:{anyOf:[{$ref:"#/$defs/GitOperationStateV1"},{type:"null"}]},presence:{$ref:"#/$defs/WorktreePresenceV1"},reference:{anyOf:[{$ref:"#/$defs/RefId"},{type:"null"}]},target:{$ref:"#/$defs/NativeWorktreeTargetV1"},unique_data:{$ref:"#/$defs/WorktreeObservationV1"},worktree_id:{anyOf:[{$ref:"#/$defs/WorktreeId"},{type:"null"}]}},required:["target","presence","clean","locked","holder","unique_data","observed_at","evidence_digest"],type:"object"},WorktreeInventoryEpoch:$W,WorktreeInventorySnapshotId:$N,WorktreeKindV1:{description:"Native Git worktree kind visible to an authorized caller.",enum:["main","linked","bare"],type:"string"},WorktreeObservationV1:{enum:["yes","no","unknown"],type:"string"},WorktreePresenceV1:{description:"Presence is intentionally not a bool: stale, unavailable and foreign are\npolicy-safe states with different reconciliation consequences.",enum:["present","stale","unavailable","foreign"],type:"string"}},$schema:"https://json-schema.org/draft/2020-12/schema",description:"One typed result for every native-integration surface operation.",oneOf:[{additionalProperties:!1,description:"Frozen selection summary plus the exact sealed proof preflight accepts.",properties:{outcome:{const:"stack_snapshot",type:"string"},sealed_snapshot:{$ref:"#/$defs/NativeIntegrationSealedStackSnapshotV1"},selection:{$ref:"#/$defs/NativeIntegrationSnapshotProjectionV1"}},required:["outcome","selection","sealed_snapshot"],type:"object"},{additionalProperties:!1,description:"Bounded projection of one immutable preview.\n\nCandidate trees, conflict bodies, and ordered commit objects stay behind the\npreview digest: the surface reports identity, classification, and expiry so\na caller can approve exactly this preview and nothing else.",properties:{analysis:{anyOf:[{$ref:"#/$defs/NativeIntegrationAnalysisReportV1"},{type:"null"}]},created_at:{$ref:"#/$defs/UtcMicros"},disposition:{$ref:"#/$defs/NativeIntegrationPreviewDispositionV1"},expires_at:{$ref:"#/$defs/UtcMicros"},ordered_commit_count:{format:"uint32",minimum:0,type:"integer"},outcome:{const:"preview",type:"string"},preview_digest:{$ref:"#/$defs/ManifestDigest"},preview_id:{$ref:"#/$defs/NativeIntegrationPreviewId"},selection:{$ref:"#/$defs/NativeIntegrationSnapshotProjectionV1"}},required:["outcome","preview_id","preview_digest","selection","disposition","ordered_commit_count","created_at","expires_at"],type:"object"},{additionalProperties:!1,description:"Bounded projection of one issued one-use approval.\n\nThe approval digest is the caller's proof-of-issuance handle for apply;\nthe preview binding and expiry are audit metadata. No preview body,\ncandidate tree, or commit content crosses this boundary.",properties:{approval_digest:{$ref:"#/$defs/ManifestDigest"},approval_id:{$ref:"#/$defs/NativeIntegrationApprovalId"},capability:{$ref:"#/$defs/CapabilityId"},expires_at:{$ref:"#/$defs/UtcMicros"},issued_at:{$ref:"#/$defs/UtcMicros"},outcome:{const:"approval",type:"string"},preview_digest:{$ref:"#/$defs/ManifestDigest"},preview_id:{$ref:"#/$defs/NativeIntegrationPreviewId"},principal:{$ref:"#/$defs/ActorId"},transaction_id:{$ref:"#/$defs/NativeIntegrationTransactionId",description:"Daemon-minted identity consumed verbatim by apply, status, and cancel."}},required:["outcome","transaction_id","approval_id","preview_id","preview_digest","principal","capability","issued_at","expires_at","approval_digest"],type:"object"},{additionalProperties:!1,description:"Bounded projection of one durable terminal receipt.\n\nThe receipt digest and final ref/tree identity are audit metadata; no patch,\nworktree body, or source content crosses this boundary.",properties:{completed_at:{$ref:"#/$defs/UtcMicros"},final_ref_tip:{type:"string"},final_tree:{type:"string"},outcome:{const:"receipt",type:"string"},receipt_digest:{$ref:"#/$defs/ManifestDigest"},status:{$ref:"#/$defs/NativeIntegrationStatusProjectionV1"},terminal_outcome:{$ref:"#/$defs/NativeIntegrationTerminalOutcomeV1"}},required:["outcome","status","terminal_outcome","final_ref_tip","final_tree","completed_at","receipt_digest"],type:"object"},{additionalProperties:!1,description:"Bounded projection of one durable transaction status.",properties:{cancellation_requested:{type:"boolean"},destination_ref:{$ref:"#/$defs/RefId"},outcome:{const:"status",type:"string"},phase:{$ref:"#/$defs/NativeIntegrationPhaseV1"},phase_revision:{format:"uint64",minimum:0,type:"integer"},preview_digest:{$ref:"#/$defs/ManifestDigest"},preview_id:{$ref:"#/$defs/NativeIntegrationPreviewId"},repository_id:{$ref:"#/$defs/RepositoryId"},terminal_outcome:{anyOf:[{$ref:"#/$defs/NativeIntegrationTerminalOutcomeV1"},{type:"null"}]},transaction_id:{$ref:"#/$defs/NativeIntegrationTransactionId"},updated_at:{$ref:"#/$defs/UtcMicros"}},required:["outcome","transaction_id","preview_id","preview_digest","repository_id","destination_ref","phase","phase_revision","cancellation_requested","updated_at"],type:"object"},{description:"Cancellation disposition. After the native commit point the committed\nreceipt is returned instead of a cancellation claim.",oneOf:[{enum:["cancellation_requested","commit_point_passed"],type:"string"},{properties:{already_terminal:{$ref:"#/$defs/NativeIntegrationTerminalOutcomeV1"}},required:["already_terminal"],type:"object"}],properties:{outcome:{const:"cancellation",type:"string"}},required:["outcome"],type:"object"},{$ref:"#/$defs/NativeWorktreeSurfaceResultV1",properties:{outcome:{const:"worktree",type:"string"}},required:["outcome"],type:"object"},{properties:{outcome:{const:"unavailable",type:"string"},reason:{$ref:"#/$defs/NativeIntegrationSurfaceUnavailableV1"}},required:["outcome","reason"],type:"object"}],title:"NativeIntegrationSurfaceResultV1"},{$defs:{ManifestDigest:gl,NativeIntegrationPreviewId:gI},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Exact approval-issuance request (the owner-decided sixth operation).\n\nThe caller names one unexpired preview by exact identity *and* digest;\napproving an identity without its content digest is unrepresentable. The\ndaemon mints the one-use approval bound to the requesting principal, the\napply capability, the current grant lineage, and a bounded expiry, none\nof which the caller can choose.",properties:{preview_digest:{$ref:"#/$defs/ManifestDigest"},preview_id:{$ref:"#/$defs/NativeIntegrationPreviewId"}},required:["preview_id","preview_digest"],title:"NativeIntegrationApproveSurfaceRequest",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Exact public input accepted by `tracedecay_ast_grep_rewrite`.",properties:{dry_run:{default:!1,type:"boolean"},expected_state:{description:"Exact `preview_digest`/`expected_state` returned by the dry run. Apply\nre-resolves the typed plan and rejects any candidate-state drift.",type:["string","null"]},idempotency_key:{type:["string","null"]},path:{type:"string"},pattern:{type:"string"},rewrite:{type:"string"},verify:{default:!1,type:"boolean"}},required:["path","pattern","rewrite"],title:"AstGrepRewriteSurfaceRequestV1",type:"object"},{$defs:{ActorId:mW,AstGrepResult:{description:"Result of an ast-grep rewrite operation.",properties:{diff:{description:"Bounded preview of the would-be change. Populated only on a successful\ndry run; `None` for real edits and for failures.",type:["string","null"]},dry_run:{description:"True when this was a dry run: the rewrite was resolved (via the built-in\nliteral fallback or an ast-grep preview run) but nothing was written.",type:"boolean"},file_path:{type:"string"},message:{type:"string"},pattern:{type:"string"},rewrite:{type:"string"},success:{type:"boolean"}},required:["success","file_path","pattern","rewrite","message"],type:"object"},AuthorityReceipt:{additionalProperties:!1,description:"Proof that this request crossed the current authorization boundary.",properties:{authorized_scope_digest:{$ref:"#/$defs/ManifestDigest"},disclosure:{$ref:"#/$defs/DisclosureClass"},grant_digest:{$ref:"#/$defs/ManifestDigest"},grant_id:{type:"string"},grant_revision:{format:"uint64",minimum:0,type:"integer"},policy:{$ref:"#/$defs/PolicyDecisionRef"},revalidated_at:{$ref:"#/$defs/UtcMicros"}},required:["grant_id","grant_revision","grant_digest","authorized_scope_digest","disclosure","policy","revalidated_at"],type:"object"},CancellationObservation:fS,CancellationStage:fk,ComponentVersion:fJ,Deadline:hj,DisclosureClass:{description:"Disclosure ceiling carried by an immutable grant and revalidated at sinks.",enum:["metadata","evidence","sensitive"],type:"string"},EditResult:{description:"Result of a single string replacement edit.",properties:{diff:{description:"Bounded preview diff of the would-be change. Populated only on a\nsuccessful dry run; `None` for real edits and for failures.",type:["string","null"]},dry_run:{description:"True when this was a dry run: validation, spans, and the resulting\ncontent were all computed, but nothing was written to disk.",type:"boolean"},file_path:{type:"string"},matched_str:{type:"string"},message:{type:"string"},new_str:{type:"string"},replaced_span:{description:"The exact source text that was replaced. For `replace_symbol` this is\nthe item's full span, including any leading doc-comment / attribute\nblock, so callers can recover its docs/attrs if the replacement\ndropped them; for `str_replace` it is the matched `old_str` text.\n`None` only on a failed edit, where nothing was resolved to replace.",type:["string","null"]},success:{type:"boolean"}},required:["success","file_path","matched_str","new_str","message"],type:"object"},EffectClass:{description:"The stable effect classification of one application operation.\n\nGit index writes remain separate classes so policy cannot accidentally\nsubstitute one index mutation for another.",oneOf:[{enum:["read","preview","source_edit","git_index_stage","git_index_unstage","configuration_write","administrative"],type:"string"},{const:"spawns_process",description:"Runs a child process in the project (e.g. the project's test runner).",type:"string"},{const:"binds_server",description:"Binds a listening server in the daemon process.",type:"string"},{const:"schedules_work",description:"Queues work on a daemon-owned scheduler; the call answers with the\nscheduler's admission, not the finished work.",type:"string"},{const:"maintains_owner_state",description:"Maintains bookkeeping the daemon keeps for the project or profile it\nserves: resets a usage counter, records registry token accounting, or\nreconciles automation schedulers with the saved configuration. Each\nwrite settles within the call and answers its new state.",type:"string"},{const:"maintains_profile_state",description:"Reads and rewrites the daemon profile's own state: its project\nregistry, accounting ledgers, and session stores. Unlike bookkeeping,\nit includes long work, a registry collection or a transcript import,\nthat a cancelled call stops.",type:"string"},{const:"records_host_evidence",description:"Records a host's session evidence (transcripts, hook admissions,\nreceipts) in daemon-owned session stores.",type:"string"}]},EffectReceipt:{additionalProperties:!1,description:"Durable effect proof. It records identities and receipts, never credentials\nor arbitrary command text.",properties:{actor:{$ref:"#/$defs/ActorId"},catalog_digest:{$ref:"#/$defs/ManifestDigest"},committed_state:{anyOf:[{$ref:"#/$defs/ManifestDigest"},{type:"null"}]},configuration_digest:{$ref:"#/$defs/ManifestDigest"},effect_class:{$ref:"#/$defs/EffectClass"},expected_state:{$ref:"#/$defs/ManifestDigest"},external_proof:{anyOf:[{$ref:"#/$defs/RetrievalAnchorId"},{type:"null"}]},idempotency_key:{type:"string"},input_digest:{$ref:"#/$defs/ManifestDigest"},operation:{$ref:"#/$defs/UseCaseId"},outcome:{$ref:"#/$defs/EffectTermination"},policy_digest:{$ref:"#/$defs/ManifestDigest"},privacy_digest:{$ref:"#/$defs/ManifestDigest"},request_id:{type:"string"},scope:{$ref:"#/$defs/ResolvedScope"}},required:["operation","request_id","actor","scope","effect_class","idempotency_key","input_digest","expected_state","policy_digest","configuration_digest","catalog_digest","privacy_digest","outcome"],type:"object"},EffectResult:{additionalProperties:!1,description:"Result of an admitted effect. `EffectUnknown` remains a receipt state and\ncannot be remapped into a pre-admission problem.",properties:{authority:{$ref:"#/$defs/AuthorityReceipt"},effect_class:{$ref:"#/$defs/EffectClass"},effect_id:{type:"string"},execution:{$ref:"#/$defs/OperationReceipt"},expected_state:{$ref:"#/$defs/ManifestDigest"},idempotency_key:{type:"string"},payload:{anyOf:[{$ref:"#/$defs/SourceEditDurableEffectPayloadV1"},{type:"null"}]},receipt:{$ref:"#/$defs/EffectReceipt"},reconciliation:{$ref:"#/$defs/ReconciliationState"}},required:["effect_id","effect_class","idempotency_key","authority","expected_state","execution","reconciliation","receipt"],type:"object"},EffectTermination:{description:"Durable effect receipt terminal state.",enum:["completed","cancelled","timed_out","failed","partial","effect_unknown"],type:"string"},InsertResult:{description:"Result of an insert-at operation.",properties:{anchor_line:{format:"uint32",minimum:0,type:"integer"},before:{type:"boolean"},content:{type:"string"},diff:{description:"Bounded preview diff of the would-be change. Populated only on a\nsuccessful dry run; `None` for real edits and for failures.",type:["string","null"]},dry_run:{description:"True when this was a dry run: the insertion point was resolved and the\nresulting content computed, but nothing was written to disk.",type:"boolean"},file_path:{type:"string"},message:{type:"string"},success:{type:"boolean"}},required:["success","file_path","anchor_line","content","before","message"],type:"object"},ManifestDigest:gl,MoveHint:{description:"One evidence-based, actionable finding produced by the `move_symbol` impact\nengine. Each hint points at a concrete file/line and carries a suggestion\nthe caller (or a follow-up refactor) can act on. Hints are derived from graph\nedges (callers/callees) and parse-level facts (identifiers, `use` lines,\nmodule declarations), never speculative noise.",properties:{detail:{description:"Human-readable description of what the move breaks or affects.",type:"string"},file:{description:"File the finding concerns (the caller's file, the destination, or the\nsource), project-relative.",type:"string"},kind:{description:"Taxonomy tag: `caller_reference`, `dependency_broken`, `import_needed`,\n`visibility_required`, `collision`, `module_missing`, `cycle_risk`,\n`orphaned_import`, or `cfg_context`.",type:"string"},line:{description:"1-based line the finding concerns, when a specific site is known.",format:"uint32",minimum:0,type:["integer","null"]},suggestion:{description:"The exact change to make (e.g. a `use` line to add, a path to rewrite, a\nvisibility to escalate). `None` when no single mechanical fix applies.",type:["string","null"]}},required:["kind","file","detail"],type:"object"},MoveResult:{description:"Result of a `move_symbol` operation: the moved span, a dry-run diff of the\nsource + destination files, and the centerpiece, the impact report of\neverything the move breaks or that needs attention.",properties:{applied_imports:{description:"`use` lines auto-inserted at the destination because the moved body's\ndependency on them was unambiguous. Reported so the caller sees exactly\nwhat the move added.",items:{type:"string"},type:"array"},dest_file:{type:"string"},diff:{description:"Combined preview diff of the source (removal) and destination (insertion)\nfiles. Populated on a successful dry run; `None` for real moves.",type:["string","null"]},dry_run:{description:"True when this was a dry run: spans, the destination shape, and the\nimpact report were all computed, but nothing was written to disk.",type:"boolean"},impact:{description:"The impact report: every actionable finding. Empty on a truly clean\nmove.",items:{$ref:"#/$defs/MoveHint"},type:"array"},message:{type:"string"},moved_span:{description:"The exact source span that was moved, including its leading\ndoc-comment / attribute block. `None` on failure.",type:["string","null"]},source_file:{type:"string"},success:{type:"boolean"},symbol:{description:"The resolved symbol that was (or would be) moved, `name (kind)`.",type:"string"}},required:["success","symbol","source_file","dest_file","message"],type:"object"},MultiEditResult:{description:"Result of a multi-string replacement edit.",properties:{applied_count:{format:"uint",minimum:0,type:"integer"},diff:{description:"Bounded preview diff of the would-be change. Populated only on a\nsuccessful dry run; `None` for real edits and for failures.",type:["string","null"]},dry_run:{description:"True when this was a dry run: replacements were validated and the\nresulting content computed, but nothing was written to disk.",type:"boolean"},file_path:{type:"string"},message:{type:"string"},success:{type:"boolean"}},required:["success","file_path","applied_count","message"],type:"object"},OperationBudgetUsage:gD,OperationReceipt:gF,OperationTermination:gL,PolicyDecisionRef:{additionalProperties:!1,description:"A policy decision pinned into a receipt or provider identity.",properties:{decision_id:{type:"string"},digest:{$ref:"#/$defs/ManifestDigest"},evaluator_revision:{$ref:"#/$defs/ComponentVersion"},revision:{format:"uint64",minimum:0,type:"integer"}},required:["decision_id","revision","digest","evaluator_revision"],type:"object"},ProjectId:g2,ReconciliationState:{description:"Reconciliation state retained after an admitted effect.",enum:["pending","reconciled","failed"],type:"string"},RefId:_u,RenameDispositionCountsV1:{additionalProperties:!1,properties:{blocked:{format:"uint",minimum:0,type:"integer"},changed:{format:"uint",minimum:0,type:"integer"},skipped:{format:"uint",minimum:0,type:"integer"},unchanged:{format:"uint",minimum:0,type:"integer"}},required:["changed","unchanged","skipped","blocked"],type:"object"},RenameFileEditV1:{additionalProperties:!1,description:"One file a rename changed (or would change), with the exact bound-site count.",properties:{file:{type:"string"},replaced_count:{format:"uint",minimum:0,type:"integer"}},required:["file","replaced_count"],type:"object"},RenameHazardKindV1:{enum:["invalid_identifier","stale_evidence","ambiguous_symbol","namespace_collision","changed_resolution","shadowing","unsupported_syntax","macro_expansion","generated_source","overlapping_site"],type:"string"},RenameHazardV1:{additionalProperties:!1,properties:{blocking:{type:"boolean"},kind:{$ref:"#/$defs/RenameHazardKindV1"},message:{type:"string"},site_id:{type:["string","null"]}},required:["kind","blocking","message"],type:"object"},RenameImpactV1:{additionalProperties:!1,properties:{affected_files:{items:{type:"string"},type:"array"},affected_tests:{items:{type:"string"},type:"array"},callers:{items:{type:"string"},type:"array"},reexports:{items:{type:"string"},type:"array"}},required:["callers","reexports","affected_files","affected_tests"],type:"object"},RenameProtectedValueCategoryV1:{enum:["wire_value","serialized_name","sql_identifier","persisted_name","schema_epoch","hash_domain","protocol_name","contract_snapshot","string_literal","byte_literal"],type:"string"},RenameProtectedValueV1:{additionalProperties:!1,description:"A byte-exact stable value deliberately preserved by the rename.",properties:{category:{$ref:"#/$defs/RenameProtectedValueCategoryV1"},end_byte:{format:"uint64",minimum:0,type:"integer"},exact_bytes:{type:"string"},file:{type:"string"},site_id:{type:"string"},start_byte:{format:"uint64",minimum:0,type:"integer"}},required:["site_id","file","start_byte","end_byte","category","exact_bytes"],type:"object"},RenameResult:{description:"The same typed payload is serialized by application, CLI, and MCP paths.",properties:{diff:{type:["string","null"]},dispositions:{$ref:"#/$defs/RenameDispositionCountsV1"},dry_run:{type:"boolean"},files:{items:{$ref:"#/$defs/RenameFileEditV1"},type:"array"},graph_revision:{anyOf:[{$ref:"#/$defs/ManifestDigest"},{type:"null"}],description:"Digest of the admitted generation, exact target, same-name symbols,\nand graph edges used to classify bound and protected sites."},hazards:{items:{$ref:"#/$defs/RenameHazardV1"},type:"array"},impact:{$ref:"#/$defs/RenameImpactV1"},message:{type:"string"},new_name:{type:"string"},old_name:{type:"string"},plan_digest:{anyOf:[{$ref:"#/$defs/ManifestDigest"},{type:"null"}],description:"Digest of the complete typed site/hazard/protected-value manifest."},preview_digest:{anyOf:[{$ref:"#/$defs/ManifestDigest"},{type:"null"}],description:"Exact candidate-state digest that apply must echo as `expected_state`."},preview_id:{anyOf:[{$ref:"#/$defs/ManifestDigest"},{type:"null"}],description:"Digest-addressed identity of the bound symbol plus proposed name."},protected_values:{items:{$ref:"#/$defs/RenameProtectedValueV1"},type:"array"},reference_count:{format:"uint",minimum:0,type:"integer"},repository_revision:{default:null,description:"Current Git HEAD when the worktree has one; dirty bytes remain bound by\n`preview_digest` independently of this revision.",type:["string","null"]},rolled_back:{description:"True only when apply published the accepted edit and post-apply\nverification then restored every exact preimage.",type:"boolean"},sites:{items:{$ref:"#/$defs/RenameSiteV1"},type:"array"},success:{type:"boolean"},symbol:{description:"Qualified name of the renamed symbol at plan time.",type:"string"}},required:["success","symbol","old_name","new_name","reference_count","dispositions","impact","message"],type:"object"},RenameSiteDispositionV1:{enum:["changed","unchanged","skipped","blocked"],type:"string"},RenameSiteKindV1:{enum:["declaration","import","reexport","qualified_path","unqualified_path","annotation","generic_argument","constructor","pattern","trait_declaration","trait_implementation","resolved_call","inherent_method","enum_variant","test","example","documentation","protected_value","unresolved_text"],type:"string"},RenameSiteV1:{additionalProperties:!1,description:"One exact old-name occurrence and the rename planner's disposition.",properties:{disposition:{$ref:"#/$defs/RenameSiteDispositionV1"},end_byte:{format:"uint64",minimum:0,type:"integer"},expected_bytes:{type:"string"},file:{type:"string"},kind:{$ref:"#/$defs/RenameSiteKindV1"},line:{format:"uint32",minimum:0,type:"integer"},reason:{type:"string"},replacement_bytes:{type:"string"},site_id:{type:"string"},source_node_id:{description:"Canonical source `SymbolOccurrenceId` that attested this site.",type:["string","null"]},start_byte:{format:"uint64",minimum:0,type:"integer"}},required:["site_id","kind","disposition","file","line","start_byte","end_byte","expected_bytes","replacement_bytes","reason"],type:"object"},RepositoryId:_v,ResolvedScope:_k,RetrievalAnchorId:_q,SourceEditCancelledResultV1:{description:"Terminal payload when cancellation is observed before an edit commits.",properties:{cancelled:{type:"boolean"},message:{type:"string"},success:{type:"boolean"}},required:["success","cancelled","message"],type:"object"},SourceEditDiagnosticV1:{properties:{code:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},message:{type:"string"}},required:["line","code","message"],type:"object"},SourceEditDurableEffectPayloadV1:{additionalProperties:!1,description:"Body-free source-edit evidence retained inside durable effect receipts.\n\nThis payload intentionally contains no caller-supplied edit text, preview\ndiff, moved span, import, diagnostic, or impact detail. It is also the\nexact replay outcome, so replay never fabricates a live edit body.",properties:{before:{type:["boolean","null"]},cancelled:{type:"boolean"},change_count:{format:"uint",minimum:0,type:["integer","null"]},durable_metadata_only:{type:"boolean"},effect_unknown:{type:"boolean"},failed:{type:"boolean"},files:{items:{type:"string"},type:"array"},finding_count:{format:"uint",minimum:0,type:["integer","null"]},import_count:{format:"uint",minimum:0,type:["integer","null"]},line:{format:"uint32",minimum:0,type:["integer","null"]},message:{type:"string"},operation:{$ref:"#/$defs/UseCaseId"},reconciled:{type:"boolean"},success:{type:"boolean"},timed_out:{type:"boolean"}},required:["operation","success","files","failed","cancelled","timed_out","effect_unknown","reconciled","durable_metadata_only","message"],type:"object"},SourceEditEffectUnknownResultV1:{description:"Terminal payload when publication may have occurred and inspection is required.",properties:{effect_unknown:{type:"boolean"},message:{type:"string"},success:{type:"boolean"}},required:["success","effect_unknown","message"],type:"object"},SourceEditFailedResultV1:{description:"Terminal payload when an edit is refused before it can publish an effect.",properties:{failed:{type:"boolean"},message:{type:"string"},success:{type:"boolean"}},required:["success","failed","message"],type:"object"},SourceEditReconciledResultV1:{description:"Terminal payload returned by explicit reconciliation and rollback.",properties:{message:{type:"string"},reconciled:{type:"boolean"},success:{type:"boolean"}},required:["success","reconciled","message"],type:"object"},SourceEditTimedOutResultV1:{description:"Terminal payload when an edit deadline expires before commit.",properties:{message:{type:"string"},success:{type:"boolean"},timed_out:{type:"boolean"}},required:["success","timed_out","message"],type:"object"},SourceEditVerificationStateV1:{enum:["clean","errors","unavailable","failed","cancelled"],type:"string"},SourceEditVerificationV1:{properties:{error_count:{format:"uint",minimum:0,type:"integer"},first_errors:{items:{$ref:"#/$defs/SourceEditDiagnosticV1"},type:"array"},message:{type:["string","null"]},state:{$ref:"#/$defs/SourceEditVerificationStateV1"},verdict:{type:"string"},warning_count:{format:"uint",minimum:0,type:"integer"}},required:["state","verdict","error_count","warning_count","first_errors"],type:"object"},UseCaseId:{description:"Stable, canonical catalog identity for `UseCaseId`.",type:"string"},UtcMicros:vK,WorktreeId:$M},$schema:"https://json-schema.org/draft/2020-12/schema",anyOf:[{$ref:"#/$defs/EditResult"},{$ref:"#/$defs/MultiEditResult"},{$ref:"#/$defs/InsertResult"},{$ref:"#/$defs/AstGrepResult"},{$ref:"#/$defs/MoveResult"},{$ref:"#/$defs/RenameResult"},{$ref:"#/$defs/SourceEditFailedResultV1"},{$ref:"#/$defs/SourceEditCancelledResultV1"},{$ref:"#/$defs/SourceEditTimedOutResultV1"},{$ref:"#/$defs/SourceEditEffectUnknownResultV1"},{$ref:"#/$defs/SourceEditReconciledResultV1"},{$ref:"#/$defs/SourceEditDurableEffectPayloadV1"}],description:"Canonical result returned directly by every source-edit use case.",properties:{effect:{anyOf:[{$ref:"#/$defs/EffectResult"},{type:"null"}]},expected_state:{$ref:"#/$defs/ManifestDigest"},predicted_state:{anyOf:[{$ref:"#/$defs/ManifestDigest"},{type:"null"}]},replayed:{type:"boolean"},verification:{anyOf:[{$ref:"#/$defs/SourceEditVerificationV1"},{type:"null"}]}},required:["expected_state","replayed"],title:"SourceEditSurfaceResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{lang:{description:"Optional language key to force (e.g. 'rust', 'typescript', 'python').\nOmit to auto-detect each file from its extension.",type:["string","null"]},max_results:{description:"Maximum number of matches to return (default: 50, max: 200).",format:"uint32",minimum:0,type:["integer","null"]},path_glob:{description:"Optional glob restricting which files are searched, matched against\nproject-relative paths (e.g. 'src/**/*.rs').",type:["string","null"]},pattern:{description:"ast-grep structural pattern (SGPattern syntax), e.g.\n'reserve_stock($$$)' or 'Result<$T, $E>'.",type:"string"}},required:["pattern"],title:"AstGrepSearchSurfaceRequestV1",type:"object"},{$defs:{AstGrepSearchMatchV1:{additionalProperties:!1,properties:{column:{format:"uint32",minimum:0,type:"integer"},file:{type:"string"},lang:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},line_text:{type:"string"},match:{type:"string"}},required:["file","line","column","lang","match","line_text"],type:"object"},CodeIndexBuildBlockedReasonV1:fE,CodeIndexConvergenceParkedV1:fA,CodeIndexStalenessStateV1:fz,PrimitiveFreshnessStateV1:gG,PrimitiveIndexingStateV1:gB,PrimitiveSearchFreshnessV1:gQ},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{files_scanned:{format:"uint64",minimum:0,type:"integer"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},match_count:{format:"uint64",minimum:0,type:"integer"},results:{items:{$ref:"#/$defs/AstGrepSearchMatchV1"},type:"array"},truncated:{type:"boolean"}},required:["results","match_count","files_scanned","truncated"],title:"AstGrepSearchResultV1",type:"object"},{$defs:{AutomationRunArtifactKind:{enum:["traces","feedback","generated_evals","validation_gate","optimizer_diagnosis","codex_handoff"],type:"string"}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{kind:{$ref:"#/$defs/AutomationRunArtifactKind",description:"Artifact kind to read."},run_id:{description:"Automation run id to inspect.",type:"string"}},required:["run_id","kind"],title:"AutomationRunArtifactViewSurfaceRequestV1",type:"object"},{$defs:{AutomationReadStatusV1:m8,AutomationRunArtifact:fe},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{artifact:{$ref:"#/$defs/AutomationRunArtifact"},payload:{description:"The hash-verified artifact document, as the run wrote it."},run_id:{type:"string"},status:{$ref:"#/$defs/AutomationReadStatusV1"}},required:["status","run_id","artifact","payload"],title:"AutomationRunArtifactViewResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{limit:{description:"Maximum run records to return (default: 50, max: 200).",format:"uint32",maximum:200,minimum:1,type:["integer","null"]}},title:"AutomationRunListSurfaceRequestV1",type:"object"},{$defs:{AgentTaskKind:mz,AutomationReadStatusV1:m8,AutomationRunListEntryV1:{additionalProperties:!1,description:"One run as the list shows it: the ledger record's identity, outcome and\nartifact kinds, without the artifact payloads or operation bodies.",properties:{accepted_count:{format:"uint",minimum:0,type:"integer"},artifact_kinds:{items:{type:"string"},type:"array"},backend:{type:"string"},completed_at:{type:"string"},error:{type:["string","null"]},model:{type:["string","null"]},rejected_count:{format:"uint",minimum:0,type:"integer"},reviewed_count:{format:"uint",minimum:0,type:"integer"},run_id:{type:"string"},skipped_count:{format:"uint",minimum:0,type:"integer"},started_at:{type:"string"},status:{$ref:"#/$defs/AutomationRunStatus"},task:{$ref:"#/$defs/AgentTaskKind"},task_key:{type:["string","null"]},trigger:{$ref:"#/$defs/AutomationTrigger"}},required:["run_id","task","trigger","backend","status","reviewed_count","accepted_count","rejected_count","skipped_count","started_at","completed_at","artifact_kinds"],type:"object"},AutomationRunPageCompletenessV1:{description:"Whether a run page read every ledger row it examined.",oneOf:[{const:"known",description:"Every examined row decoded.",type:"string"},{const:"partial",description:"The page skipped malformed rows or more runs exist past it.",type:"string"}]},AutomationRunScopeV1:ft,AutomationRunStatus:fr,AutomationTrigger:fa},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{completeness:{$ref:"#/$defs/AutomationRunPageCompletenessV1"},count:{format:"uint",minimum:0,type:"integer"},has_more:{type:"boolean"},limit:{format:"uint32",minimum:0,type:"integer"},malformed_row_count:{format:"uint",minimum:0,type:"integer"},runs:{items:{$ref:"#/$defs/AutomationRunListEntryV1"},type:"array"},scope:{$ref:"#/$defs/AutomationRunScopeV1"},status:{$ref:"#/$defs/AutomationReadStatusV1"}},required:["status","scope","runs","count","limit","has_more","malformed_row_count","completeness"],title:"AutomationRunListResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{run_id:{description:"Exact automation run id to inspect.",minLength:1,type:"string"}},required:["run_id"],title:"AutomationRunViewSurfaceRequestV1",type:"object"},{$defs:{AgentTaskFailureClass:{oneOf:[{enum:["retryable","permanent","timeout","unavailable","denied","disconnected","malformed_output"],type:"string"},{const:"input_too_large",description:"The backend refused the request because it exceeds its input or\ncontext-window limit.",type:"string"}]},AgentTaskKind:mz,AgentTaskRetryAttempt:{properties:{attempt:{format:"uint32",minimum:0,type:"integer"},backoff_millis:{format:"uint64",minimum:0,type:"integer"},failure_classification:{anyOf:[{$ref:"#/$defs/AgentTaskFailureClass"},{type:"null"}]},succeeded:{type:"boolean"}},required:["attempt","succeeded","backoff_millis"],type:"object"},AutomationReadStatusV1:m8,AutomationRunArtifact:fe,AutomationRunLedgerRecord:{properties:{accepted_count:{format:"uint",minimum:0,type:"integer"},applied_ops:!0,artifacts:{items:{$ref:"#/$defs/AutomationRunArtifact"},type:"array"},backend:{type:"string"},backend_attempt_count:{default:0,format:"uint",minimum:0,type:"integer"},backend_attempts:{items:{$ref:"#/$defs/AgentTaskRetryAttempt"},type:"array"},backend_identity:{description:"The durable backend/configuration identity this run executed under.\n\nA settled deterministic failure stays suppressed only while this\nmatches the identity now configured, so the scheduler can re-admit the\ntask the moment the backend or configuration changes. Records written\nbefore this field existed carry `None` and never suppress: an\nunidentified failure cannot be shown to have failed under the current\nidentity.",type:["string","null"]},completed_at:{type:"string"},completed_at_micros:{format:"int64",type:["integer","null"]},error:{type:["string","null"]},error_classification:{anyOf:[{$ref:"#/$defs/AgentTaskFailureClass"},{type:"null"}]},error_retryable:{type:["boolean","null"]},evidence_hash:{type:["string","null"]},fallback_status:{type:["string","null"]},host_mode:{type:["string","null"]},input_hash:{type:["string","null"]},model:{type:["string","null"]},output_hash:{type:["string","null"]},prompt_version:{type:["string","null"]},proposed_ops:!0,rejected_count:{format:"uint",minimum:0,type:"integer"},rejected_ops:!0,report_ref:!0,response_schema:!0,reviewed_count:{default:0,format:"uint",minimum:0,type:"integer"},run_id:{type:"string"},schema_version:{format:"uint32",minimum:0,type:"integer"},session_evidence_budget_stage:{anyOf:[{$ref:"#/$defs/SessionRetrievalBudgetStageV1"},{type:"null"}],description:"Exhausted retrieval boundary of a `session_evidence_budget_exhausted`\nskip; present exactly on those skips."},skipped_count:{default:0,format:"uint",minimum:0,type:"integer"},started_at:{type:"string"},status:{$ref:"#/$defs/AutomationRunStatus"},strict_json:{type:["boolean","null"]},task:{$ref:"#/$defs/AgentTaskKind"},task_key:{type:["string","null"]},trigger:{$ref:"#/$defs/AutomationTrigger"},validation_report:!0},required:["schema_version","run_id","trigger","task","backend","status","accepted_count","rejected_count","started_at","completed_at"],type:"object"},AutomationRunScopeV1:ft,AutomationRunStatus:fr,AutomationTrigger:fa,SessionRetrievalBudgetStageV1:vi},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{run:{$ref:"#/$defs/AutomationRunLedgerRecord"},scope:{$ref:"#/$defs/AutomationRunScopeV1"},status:{$ref:"#/$defs/AutomationReadStatusV1"}},required:["status","scope","run"],title:"AutomationRunViewResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{base:{description:"Base local branch name (e.g. 'main').",type:"string"},cursor:{description:"Authenticated continuation cursor returned by the preceding exact\nbranch-diff page.",type:["string","null"]},file:{description:"Optional file path filter, only show diffs for symbols in this file.",type:["string","null"]},head:{description:"Head local branch name (e.g. 'feature/foo'). Defaults to the current\nbranch.",type:["string","null"]},kind:{description:"Optional kind filter, only show diffs for this symbol kind (e.g.\n'function', 'struct').",type:["string","null"]},limit:{description:"Maximum combined added, removed, and changed results (default: 100,\nat most 256).",format:"uint32",minimum:0,type:["integer","null"]}},required:["base"],title:"BranchDiffSurfaceRequestV1",type:"object"},{$defs:{BranchDiffCompleteV1:{additionalProperties:!1,properties:{base:{type:"string"},base_generation:{type:"string"},base_revision:{type:"string"},base_tree:{type:"string"},changes:{items:{$ref:"#/$defs/BranchSymbolChangeV1"},type:"array"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},head:{type:"string"},head_generation:{type:"string"},head_revision:{type:"string"},head_tree:{type:"string"},status:{$ref:"#/$defs/GitReadCompleteV1"},summary:{$ref:"#/$defs/BranchDiffSummaryV1"},total_changes:{format:"uint",minimum:0,type:"integer"}},required:["status","base","head","base_revision","base_tree","head_revision","head_tree","base_generation","head_generation","total_changes","summary","changes"],type:"object"},BranchDiffPartialV1:{additionalProperties:!1,properties:{base:{type:"string"},base_generation:{type:"string"},base_revision:{type:"string"},base_tree:{type:"string"},changes:{items:{$ref:"#/$defs/BranchSymbolChangeV1"},type:"array"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},head:{type:"string"},head_generation:{type:"string"},head_revision:{type:"string"},head_tree:{type:"string"},next_cursor:{type:"string"},reason:{$ref:"#/$defs/GitResultLimitV1"},status:{$ref:"#/$defs/GitReadPartialV1"},summary:{$ref:"#/$defs/BranchDiffSummaryV1"},total_changes:{format:"uint",minimum:0,type:"integer"}},required:["status","reason","base","head","base_revision","base_tree","head_revision","head_tree","base_generation","head_generation","total_changes","next_cursor","summary","changes"],type:"object"},BranchDiffReferenceUnavailableV1:{additionalProperties:!1,description:"Either branch of `base..head` does not resolve to a local commit.",properties:{base_or_head:{description:"The requested range, `base..head`.",type:"string"},reason:{type:"string"},retryable:{type:"boolean"},status:{$ref:"#/$defs/GitReadUnavailableV1"}},required:["status","base_or_head","reason","retryable"],type:"object"},BranchDiffSummaryV1:{additionalProperties:!1,properties:{added:{format:"uint",minimum:0,type:"integer"},changed:{format:"uint",minimum:0,type:"integer"},removed:{format:"uint",minimum:0,type:"integer"}},required:["added","removed","changed"],type:"object"},BranchDiffUnavailableV1:{additionalProperties:!1,description:"No sealed code-index generations compare the two branches' commits.",properties:{base:{type:"string"},base_generation:{type:["string","null"]},base_revision:{type:"string"},head:{type:"string"},head_generation:{type:["string","null"]},head_revision:{type:"string"},reason:{type:"string"},retryable:{type:"boolean"},status:{$ref:"#/$defs/GitReadUnavailableV1"}},required:["status","base","head","base_revision","head_revision","reason","retryable"],type:"object"},BranchSymbolChangeV1:{oneOf:[{additionalProperties:!1,properties:{change:{const:"added",type:"string"},symbol:{$ref:"#/$defs/BranchSymbolV1"}},required:["change","symbol"],type:"object"},{additionalProperties:!1,properties:{change:{const:"removed",type:"string"},symbol:{$ref:"#/$defs/BranchSymbolV1"}},required:["change","symbol"],type:"object"},{additionalProperties:!1,properties:{base:{$ref:"#/$defs/BranchSymbolV1"},change:{const:"changed",type:"string"},head:{$ref:"#/$defs/BranchSymbolV1"}},required:["change","base","head"],type:"object"}]},BranchSymbolV1:{additionalProperties:!1,description:"A symbol in one branch's sealed generation.",properties:{content_digest:{type:"string"},file:{type:"string"},file_identity:{type:"string"},file_occurrence_id:{type:"string"},kind:{type:"string"},name:{type:"string"},qualified_name:{type:"string"},symbol_identity:{type:"string"},symbol_occurrence_id:{type:"string"}},required:["symbol_identity","symbol_occurrence_id","file_identity","file_occurrence_id","name","qualified_name","kind","file","content_digest"],type:"object"},CodeIndexBuildBlockedReasonV1:fE,CodeIndexConvergenceParkedV1:fA,CodeIndexStalenessStateV1:fz,GitReadCompleteV1:yT,GitReadPartialV1:yO,GitReadUnavailableV1:yE,GitResultLimitV1:yA,PrimitiveFreshnessStateV1:gG,PrimitiveIndexingStateV1:gB,PrimitiveSearchFreshnessV1:gQ},$schema:"https://json-schema.org/draft/2020-12/schema",anyOf:[{$ref:"#/$defs/BranchDiffCompleteV1"},{$ref:"#/$defs/BranchDiffPartialV1"},{$ref:"#/$defs/BranchDiffUnavailableV1"},{$ref:"#/$defs/BranchDiffReferenceUnavailableV1"}],title:"BranchDiffResultV1"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{cursor:{description:"Continuation cursor returned as `next_cursor` by the preceding page\nwith the same `limit`.",type:["string","null"]},limit:{description:"Maximum local refs to return (default: 100, at most 128).",format:"uint32",minimum:0,type:["integer","null"]}},title:"BranchListSurfaceRequestV1",type:"object"},{$defs:{BranchListPageV1:{additionalProperties:!1,properties:{examined:{format:"uint",minimum:0,type:"integer"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},limit:{format:"uint",minimum:0,type:"integer"},next_cursor:{type:["string","null"]},reason:{anyOf:[{$ref:"#/$defs/GitReferenceLimitV1"},{type:"null"}]},snapshot_count:{format:"uint",minimum:0,type:"integer"},snapshots:{items:{$ref:"#/$defs/BranchSnapshotEntryV1"},type:"array"},status:{$ref:"#/$defs/GitPageStatusV1"}},required:["status","snapshot_count","examined","limit","snapshots"],type:"object"},BranchReadUnavailableV1:{additionalProperties:!1,description:"A local branch read refused before any snapshot was taken.",properties:{reason:{type:"string"},retryable:{type:"boolean"},status:{$ref:"#/$defs/GitReadUnavailableV1"}},required:["status","reason","retryable"],type:"object"},BranchSnapshotEntryV1:{additionalProperties:!1,properties:{branch:{type:"string"},source_revision:{type:"string"},source_tree:{type:"string"}},required:["branch","source_revision","source_tree"],type:"object"},CodeIndexBuildBlockedReasonV1:fE,CodeIndexConvergenceParkedV1:fA,CodeIndexStalenessStateV1:fz,GitPageStatusV1:yC,GitReadUnavailableV1:yE,GitReferenceLimitV1:{enum:["reference_limit"],type:"string"},PrimitiveFreshnessStateV1:gG,PrimitiveIndexingStateV1:gB,PrimitiveSearchFreshnessV1:gQ},$schema:"https://json-schema.org/draft/2020-12/schema",anyOf:[{$ref:"#/$defs/BranchListPageV1"},{$ref:"#/$defs/BranchReadUnavailableV1"}],title:"BranchListResultV1"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{branch:{description:"Exact local branch name to search.",type:"string"},cursor:{description:"Authenticated continuation cursor returned by the preceding exact\nbranch-search page.",type:["string","null"]},limit:{description:"Maximum number of results to return (default: 10, at most 500).",format:"uint32",minimum:0,type:["integer","null"]},query:{description:"Search query string to match against symbol names.",type:"string"}},required:["branch","query"],title:"BranchSearchSurfaceRequestV1",type:"object"},{$defs:{BranchReferenceUnavailableV1:{additionalProperties:!1,description:"The named branch does not resolve to a local commit.",properties:{branch:{type:"string"},reason:{type:"string"},retryable:{type:"boolean"},status:{$ref:"#/$defs/GitReadUnavailableV1"}},required:["status","branch","reason","retryable"],type:"object"},BranchSearchHitV1:{additionalProperties:!1,properties:{branch:{type:"string"},candidate:{$ref:"#/$defs/RankedCandidate"},code_generation:{type:"string"},kind:{type:["string","null"]},name:{type:["string","null"]},path:{type:["string","null"]},qualified_name:{type:["string","null"]},source_reference:{type:"string"},source_revision:{type:"string"},source_tree:{type:"string"}},required:["candidate","branch","source_reference","source_revision","source_tree","code_generation"],type:"object"},BranchSearchPageV1:{additionalProperties:!1,properties:{branch:{type:"string"},code_generation:{type:"string"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},next_cursor:{type:["string","null"]},reason:{anyOf:[{$ref:"#/$defs/GitResultLimitV1"},{type:"null"}]},results:{items:{$ref:"#/$defs/BranchSearchHitV1"},type:"array"},source_reference:{type:"string"},source_revision:{type:"string"},source_tree:{type:"string"},status:{$ref:"#/$defs/GitPageStatusV1"}},required:["status","branch","source_reference","source_revision","source_tree","code_generation","results"],type:"object"},BranchSearchUnavailableV1:{additionalProperties:!1,description:"No sealed code-index generation answers for the branch's commit.",properties:{branch:{type:"string"},code_generation:{type:["string","null"]},reason:{type:"string"},retryable:{type:"boolean"},source_revision:{type:"string"},status:{$ref:"#/$defs/GitReadUnavailableV1"}},required:["status","branch","source_revision","reason","retryable"],type:"object"},CalibrationProfileId:fb,CandidateContribution:fw,CodeIndexBuildBlockedReasonV1:fE,CodeIndexConvergenceParkedV1:fA,CodeIndexStalenessStateV1:fz,ComponentRevision:fK,EvidenceRole:hM,ExactClass:hW,FileOccurrenceId:yu,FixedPointScore:yf,FreshnessCompatibilityV1:yh,FusedCandidate:yy,GitPageStatusV1:yC,GitReadUnavailableV1:yE,GitResultLimitV1:yA,LogicalCopyClusterId:gi,LogicalEvidenceId:go,OccurrenceProvenance:gz,PrimitiveFreshnessStateV1:gG,PrimitiveIndexingStateV1:gB,PrimitiveSearchFreshnessV1:gQ,RankedCandidate:{additionalProperties:!1,description:"A fused candidate with its final deterministic ordinal.",properties:{candidate:{$ref:"#/$defs/FusedCandidate"},final_ordinal:{format:"uint32",minimum:0,type:"integer"}},required:["candidate","final_ordinal"],type:"object"},RankingDecision:_l,RankingDecisionKind:_p,RepositoryId:_v,RetrievalAnchorId:_q,RetrieverKind:_C,ScoreDomainId:_0,SessionOrThreadId:_8,SourceFreshness:vh,SourceInstanceKey:vy,SourceNamespace:v_,SourceOccurrenceId:vv,UtcMicros:vK},$schema:"https://json-schema.org/draft/2020-12/schema",anyOf:[{$ref:"#/$defs/BranchSearchPageV1"},{$ref:"#/$defs/BranchSearchUnavailableV1"},{$ref:"#/$defs/BranchReferenceUnavailableV1"}],title:"BranchSearchResultV1"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{qualified_name:{description:"The exact qualified name to look up.",type:"string"}},required:["qualified_name"],title:"ByQualifiedNameSurfaceRequestV1",type:"object"},{$defs:{PrimitiveSymbolLocationV1:gY},$schema:"https://json-schema.org/draft/2020-12/schema",description:"Every indexed symbol sharing one qualified name (overloads, generics,\nseparate impl blocks).",items:{$ref:"#/$defs/PrimitiveSymbolLocationV1"},title:"ByQualifiedNameResultV1",type:"array"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{from_node_id:{type:"string"},maximum_depth:{default:8,format:"uint32",minimum:0,type:"integer"},to_node_id:{type:"string"}},required:["from_node_id","to_node_id"],title:"CallChainPrimitiveRequest",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{edge_kinds:{items:{type:"string"},type:"array"},node_ids:{items:{type:"string"},type:"array"}},required:["node_ids","edge_kinds"],title:"CallChainPrimitiveResult",type:"object"},{$defs:{NativeIntegrationTransactionId:gT},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{transaction_id:{$ref:"#/$defs/NativeIntegrationTransactionId"}},required:["transaction_id"],title:"NativeIntegrationCancelSurfaceRequest",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{from_ref:{description:"Starting git ref (commit, branch, tag).",type:"string"},to_ref:{description:"Ending git ref (commit, branch, tag).",type:"string"}},required:["from_ref","to_ref"],title:"ChangelogSurfaceRequestV1",type:"object"},{$defs:{ChangelogCompleteV1:{additionalProperties:!1,properties:{base_generation:{type:"string"},changed_file_count:{format:"uint",minimum:0,type:"integer"},changed_files:{items:{type:"string"},type:"array"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},from_ref:{type:"string"},head_generation:{type:"string"},status:{$ref:"#/$defs/GitReadCompleteV1"},symbol_changes_coverage:{$ref:"#/$defs/SymbolChangesCompleteV1"},symbols_added:{items:{$ref:"#/$defs/GitComparedSymbolV1"},type:"array"},symbols_modified:{items:{$ref:"#/$defs/GitComparedSymbolV1"},type:"array"},symbols_removed:{items:{$ref:"#/$defs/GitComparedSymbolV1"},type:"array"},to_ref:{type:"string"}},required:["status","from_ref","to_ref","changed_file_count","changed_files","base_generation","head_generation","symbols_added","symbols_removed","symbols_modified","symbol_changes_coverage"],type:"object"},ChangelogPartialV1:{additionalProperties:!1,description:"The tree diff without symbol changes: the refs are not both exact local\nbranches with sealed generations.",properties:{changed_file_count:{format:"uint",minimum:0,type:"integer"},changed_files:{items:{type:"string"},type:"array"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},from_ref:{type:"string"},status:{$ref:"#/$defs/GitReadPartialV1"},symbol_changes_coverage:{$ref:"#/$defs/SymbolChangesUnavailableV1"},symbols_added:{items:{$ref:"#/$defs/GitComparedSymbolV1"},type:"array"},symbols_modified:{items:{$ref:"#/$defs/GitComparedSymbolV1"},type:"array"},symbols_removed:{items:{$ref:"#/$defs/GitComparedSymbolV1"},type:"array"},to_ref:{type:"string"}},required:["status","from_ref","to_ref","changed_file_count","changed_files","symbols_added","symbols_removed","symbols_modified","symbol_changes_coverage"],type:"object"},CodeIndexBuildBlockedReasonV1:fE,CodeIndexConvergenceParkedV1:fA,CodeIndexStalenessStateV1:fz,GitComparedSymbolV1:yb,GitReadCompleteV1:yT,GitReadPartialV1:yO,GitReadUnavailableV1:yE,GitToolErrorKindV1:yN,GitToolErrorV1:yz,GitToolFailureV1:yD,GitToolOperationV1:yF,PrimitiveFreshnessStateV1:gG,PrimitiveIndexingStateV1:gB,PrimitiveSearchFreshnessV1:gQ,SymbolChangesCompleteV1:{additionalProperties:!1,properties:{status:{$ref:"#/$defs/GitReadCompleteV1"}},required:["status"],type:"object"},SymbolChangesUnavailableV1:vR},$schema:"https://json-schema.org/draft/2020-12/schema",anyOf:[{$ref:"#/$defs/ChangelogCompleteV1"},{$ref:"#/$defs/ChangelogPartialV1"},{$ref:"#/$defs/GitToolFailureV1"}],title:"ChangelogResultV1"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{limit:{description:"Maximum number of cycles to report, largest first (default: 25, max:\n200). The response always states the total detected and how many were\nomitted.",format:"uint32",minimum:0,type:["integer","null"]},member_limit:{description:"Maximum member files listed per reported cycle (default: 12, max:\n200). Each entry states its true member_count and\nomitted_member_count.",format:"uint32",minimum:0,type:["integer","null"]}},title:"CircularSurfaceRequestV1",type:"object"},{$defs:{CircularCycleV1:{additionalProperties:!1,description:"One reported file cycle: the members that fit the member bound, plus the\ncomponent's true size so the omission is stated rather than hidden.",properties:{member_count:{format:"uint64",minimum:0,type:"integer"},members:{items:{type:"string"},type:"array"},omitted_member_count:{format:"uint64",minimum:0,type:"integer"}},required:["members","member_count","omitted_member_count"],type:"object"},CodeIndexBuildBlockedReasonV1:fE,CodeIndexConvergenceParkedV1:fA,CodeIndexStalenessStateV1:fz,PrimitiveFreshnessStateV1:gG,PrimitiveIndexingStateV1:gB,PrimitiveSearchFreshnessV1:gQ},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{cycle_count:{format:"uint64",minimum:0,type:"integer"},cycles:{items:{$ref:"#/$defs/CircularCycleV1"},type:"array"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},limit:{format:"uint64",minimum:0,type:"integer"},member_limit:{format:"uint64",minimum:0,type:"integer"},omitted_cycle_count:{format:"uint64",minimum:0,type:"integer"},reported_cycle_count:{format:"uint64",minimum:0,type:"integer"}},required:["cycle_count","reported_cycle_count","omitted_cycle_count","limit","member_limit","cycles"],title:"CircularResultV1",type:"object"},{$defs:{CallableCodeSurfaceMeta:f$,CodeGenerationId:fT,CodeQueryScope:fL,ResultProjection:_w,RetrievalOrder:_I},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{maximum_depth:{default:3,format:"uint32",minimum:0,type:"integer"},meta:{$ref:"#/$defs/CallableCodeSurfaceMeta",default:{cursor:null,order:"source_position",projection:"evidence"}},node_id:{type:"string"},resolve_trait_dispatch:{default:!0,type:"boolean"},scope:{$ref:"#/$defs/CodeQueryScope",default:{generation:"code-generation:unpinned-latest.v1",path_prefix:null}}},required:["node_id"],title:"CodeCalleesSurfaceRequest",type:"object"},{$defs:{CodeGenerationId:fT,SymbolPrimitiveRecord:vq,SymbolRelationRecord:vI},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Generation-bound page returned by every callable code query. Coverage,\nomissions, scoring, and terminal state remain in the enclosing\n[`crate::result::RetrievalEvidence`].",properties:{generation:{$ref:"#/$defs/CodeGenerationId"},items:{items:{$ref:"#/$defs/SymbolRelationRecord"},type:"array"},next_cursor:{description:"Opaque resume token; its bounded string is the public wire form.",type:["string","null"]},query_fallback:{description:"Independently hashed exact/lexical/graph subpayload. Callers preserve it\nbyte-for-byte rather than interpreting it, so the public schema admits\nthe canonical JSON it carries without re-declaring its internals."},total:{format:"uint64",minimum:0,type:["integer","null"]}},required:["generation","items"],title:"CodeQueryPage",type:"object"},{$defs:{CallableCodeSurfaceMeta:f$,ResultProjection:_w,RetrievalOrder:_I,SymbolGraphScope:vP},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{maximum_depth:{default:3,format:"uint32",minimum:0,type:"integer"},meta:{$ref:"#/$defs/CallableCodeSurfaceMeta",default:{cursor:null,order:"source_position",projection:"evidence"}},node_id:{type:"string"},scope:{$ref:"#/$defs/SymbolGraphScope",default:{path_prefix:null}}},required:["node_id"],title:"CodeCallersSurfaceRequest",type:"object"},{$defs:{CodeGenerationId:fT,CodeGraphReadFreshnessV1:fO,PrimitiveSupportGap:gX,SymbolPrimitiveRecord:vq,SymbolRelationRecord:vI,UtcMicros:vK},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Bounded semantic result shared by the compatibility surfaces. Rendering,\ntransport envelopes, and MCP content blocks remain outside this contract.",properties:{freshness:{$ref:"#/$defs/CodeGraphReadFreshnessV1"},generation:{$ref:"#/$defs/CodeGenerationId"},items:{items:{$ref:"#/$defs/SymbolRelationRecord"},type:"array"},next_cursor:{description:"Opaque resume token; its bounded string is the public wire form.",type:["string","null"]},related_edge_count:{format:"uint64",minimum:0,type:["integer","null"]},support_gaps:{items:{$ref:"#/$defs/PrimitiveSupportGap"},type:"array"},total:{format:"uint64",minimum:0,type:["integer","null"]},truncated:{type:"boolean"}},required:["generation","freshness","items","truncated","support_gaps"],title:"SymbolGraphPage",type:"object"},{$defs:{CallableCodeSurfaceMeta:f$,CodeGenerationId:fT,CodeQueryScope:fL,ResultProjection:_w,RetrievalOrder:_I},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{meta:{$ref:"#/$defs/CallableCodeSurfaceMeta"},node_id:{type:"string"},scope:{$ref:"#/$defs/CodeQueryScope"}},required:["node_id","scope","meta"],title:"CodeNavigationSurfaceRequest",type:"object"},{$defs:{CodeGenerationId:fT,SymbolPrimitiveRecord:vq},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Generation-bound page returned by every callable code query. Coverage,\nomissions, scoring, and terminal state remain in the enclosing\n[`crate::result::RetrievalEvidence`].",properties:{generation:{$ref:"#/$defs/CodeGenerationId"},items:{items:{$ref:"#/$defs/SymbolPrimitiveRecord"},type:"array"},next_cursor:{description:"Opaque resume token; its bounded string is the public wire form.",type:["string","null"]},query_fallback:{description:"Independently hashed exact/lexical/graph subpayload. Callers preserve it\nbyte-for-byte rather than interpreting it, so the public schema admits\nthe canonical JSON it carries without re-declaring its internals."},total:{format:"uint64",minimum:0,type:["integer","null"]}},required:["generation","items"],title:"CodeQueryPage",type:"object"},{$defs:{CallableCodeSurfaceMeta:f$,CodeGenerationId:fT,CodeQueryScope:fL,ExactTechnicalTermKindV1:hN,ResultProjection:_w,RetrievalOrder:_I},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{kind:{anyOf:[{$ref:"#/$defs/ExactTechnicalTermKindV1"},{type:"null"}]},literal:{type:"string"},meta:{$ref:"#/$defs/CallableCodeSurfaceMeta"},scope:{$ref:"#/$defs/CodeQueryScope"}},required:["literal","scope","meta"],title:"CodeExactOccurrenceSurfaceRequest",type:"object"},{$defs:{CodeGenerationId:fT,CodeOccurrenceRecord:fF,CodeSearchChunkId:fU,ExactOccurrenceRecord:{additionalProperties:!1,properties:{matched_kind:{$ref:"#/$defs/ExactTechnicalTermKindV1"},matched_literal:{type:"string"},occurrence:{$ref:"#/$defs/CodeOccurrenceRecord"}},required:["occurrence","matched_kind","matched_literal"],type:"object"},ExactTechnicalTermKindV1:hN,FileOccurrenceId:yu,SourceSpan:vb,SymbolOccurrenceId:vV},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Generation-bound page returned by every callable code query. Coverage,\nomissions, scoring, and terminal state remain in the enclosing\n[`crate::result::RetrievalEvidence`].",properties:{generation:{$ref:"#/$defs/CodeGenerationId"},items:{items:{$ref:"#/$defs/ExactOccurrenceRecord"},type:"array"},next_cursor:{description:"Opaque resume token; its bounded string is the public wire form.",type:["string","null"]},query_fallback:{description:"Independently hashed exact/lexical/graph subpayload. Callers preserve it\nbyte-for-byte rather than interpreting it, so the public schema admits\nthe canonical JSON it carries without re-declaring its internals."},total:{format:"uint64",minimum:0,type:["integer","null"]}},required:["generation","items"],title:"CodeQueryPage",type:"object"},{$defs:{CallableCodeSurfaceMeta:f$,CodeFacetDimension:fC,CodeGenerationId:fT,CodeQueryScope:fL,ResultProjection:_w,RetrievalOrder:_I},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{dimension:{$ref:"#/$defs/CodeFacetDimension"},meta:{$ref:"#/$defs/CallableCodeSurfaceMeta"},scope:{$ref:"#/$defs/CodeQueryScope"}},required:["dimension","scope","meta"],title:"CodeFacetSurfaceRequest",type:"object"},{$defs:{CodeFacetDimension:fC,CodeFacetRecord:{additionalProperties:!1,properties:{count:{format:"uint64",minimum:0,type:"integer"},dimension:{$ref:"#/$defs/CodeFacetDimension"},value:{type:"string"}},required:["dimension","value","count"],type:"object"},CodeGenerationId:fT},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Generation-bound page returned by every callable code query. Coverage,\nomissions, scoring, and terminal state remain in the enclosing\n[`crate::result::RetrievalEvidence`].",properties:{generation:{$ref:"#/$defs/CodeGenerationId"},items:{items:{$ref:"#/$defs/CodeFacetRecord"},type:"array"},next_cursor:{description:"Opaque resume token; its bounded string is the public wire form.",type:["string","null"]},query_fallback:{description:"Independently hashed exact/lexical/graph subpayload. Callers preserve it\nbyte-for-byte rather than interpreting it, so the public schema admits\nthe canonical JSON it carries without re-declaring its internals."},total:{format:"uint64",minimum:0,type:["integer","null"]}},required:["generation","items"],title:"CodeQueryPage",type:"object"},{$defs:{CallableCodeSurfaceMeta:f$,ImplementationSelector:{oneOf:[{properties:{name:{type:"string"},selector:{const:"trait",type:"string"}},required:["selector","name"],type:"object"},{properties:{name:{type:"string"},selector:{const:"method",type:"string"}},required:["selector","name"],type:"object"}]},ResultProjection:_w,RetrievalOrder:_I,SymbolGraphScope:vP},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{meta:{$ref:"#/$defs/CallableCodeSurfaceMeta",default:{cursor:null,order:"source_position",projection:"evidence"}},scope:{$ref:"#/$defs/SymbolGraphScope",default:{path_prefix:null}},selector:{$ref:"#/$defs/ImplementationSelector"}},required:["selector"],title:"CodeImplementationsSurfaceRequest",type:"object"},{$defs:{CodeGenerationId:fT,CodeGraphReadFreshnessV1:fO,ImplementationRecord:{additionalProperties:!1,description:"One implementation match with its exact source: the implementing\nimpl/class block (methods included) for a trait selector, or the function\nbody for a method selector.",properties:{body:{type:"string"},dispatch_from:{description:"Trait or interface node a trait-selector match was reached through.",type:["string","null"]},edge_kind:{type:"string"},symbol:{$ref:"#/$defs/SymbolPrimitiveRecord"}},required:["symbol","edge_kind","body"],type:"object"},PrimitiveSupportGap:gX,SymbolPrimitiveRecord:vq,UtcMicros:vK},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Bounded semantic result shared by the compatibility surfaces. Rendering,\ntransport envelopes, and MCP content blocks remain outside this contract.",properties:{freshness:{$ref:"#/$defs/CodeGraphReadFreshnessV1"},generation:{$ref:"#/$defs/CodeGenerationId"},items:{items:{$ref:"#/$defs/ImplementationRecord"},type:"array"},next_cursor:{description:"Opaque resume token; its bounded string is the public wire form.",type:["string","null"]},related_edge_count:{format:"uint64",minimum:0,type:["integer","null"]},support_gaps:{items:{$ref:"#/$defs/PrimitiveSupportGap"},type:"array"},total:{format:"uint64",minimum:0,type:["integer","null"]},truncated:{type:"boolean"}},required:["generation","freshness","items","truncated","support_gaps"],title:"SymbolGraphPage",type:"object"},{$defs:{CallableCodeSurfaceMeta:f$,CodeGenerationId:fT,CodeLexicalField:{description:"Typed code fields accepted by the generation-owned lexical authority.",enum:["symbol_name","qualified_name","path","signature","documentation","body_text","preamble_text","exact_term","subtoken"],type:"string"},CodeLexicalFieldFilter:{additionalProperties:!1,properties:{field:{$ref:"#/$defs/CodeLexicalField"},include:{type:"boolean"}},required:["field","include"],type:"object"},CodeQueryScope:fL,ResultProjection:_w,RetrievalOrder:_I},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Serializable adapter DTO for the request-local phrase query view.\n\nThe callable application request deliberately keeps its sanitized query\nnon-serializable. The owning runtime supplies the exact sanitizer\nrevisions when converting this transport DTO.",properties:{field_filters:{default:[],items:{$ref:"#/$defs/CodeLexicalFieldFilter"},type:"array"},fuzzy_budget:{default:0,format:"uint32",minimum:0,type:"integer"},meta:{$ref:"#/$defs/CallableCodeSurfaceMeta"},phrases:{items:{type:"string"},type:"array"},query:{type:"string"},scope:{$ref:"#/$defs/CodeQueryScope"}},required:["query","phrases","scope","meta"],title:"CodePhraseSearchSurfaceRequest",type:"object"},{$defs:{CodeGenerationId:fT,CodeOccurrenceRecord:fF,CodeSearchChunkId:fU,FileOccurrenceId:yu,LexicalOccurrenceRecord:{additionalProperties:!1,properties:{matched_phrases:{items:{type:"string"},type:"array"},matched_terms:{items:{type:"string"},type:"array"},occurrence:{$ref:"#/$defs/CodeOccurrenceRecord"},score_micros:{format:"uint64",minimum:0,type:"integer"}},required:["occurrence","score_micros","matched_phrases","matched_terms"],type:"object"},SourceSpan:vb,SymbolOccurrenceId:vV},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Generation-bound page returned by every callable code query. Coverage,\nomissions, scoring, and terminal state remain in the enclosing\n[`crate::result::RetrievalEvidence`].",properties:{generation:{$ref:"#/$defs/CodeGenerationId"},items:{items:{$ref:"#/$defs/LexicalOccurrenceRecord"},type:"array"},next_cursor:{description:"Opaque resume token; its bounded string is the public wire form.",type:["string","null"]},query_fallback:{description:"Independently hashed exact/lexical/graph subpayload. Callers preserve it\nbyte-for-byte rather than interpreting it, so the public schema admits\nthe canonical JSON it carries without re-declaring its internals."},total:{format:"uint64",minimum:0,type:["integer","null"]}},required:["generation","items"],title:"CodeQueryPage",type:"object"},{$defs:{CallableCodeSurfaceMeta:f$,ResultProjection:_w,RetrievalOrder:_I,SymbolGraphScope:vP},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{is_async:{type:["boolean","null"]},meta:{$ref:"#/$defs/CallableCodeSurfaceMeta",default:{cursor:null,order:"source_position",projection:"evidence"}},params:{default:[],items:{type:"string"},type:"array"},returns:{type:["string","null"]},scope:{$ref:"#/$defs/SymbolGraphScope",default:{path_prefix:null}}},title:"CodeSignatureSearchSurfaceRequest",type:"object"},{$defs:{CodeGenerationId:fT,CodeGraphReadFreshnessV1:fO,PrimitiveSupportGap:gX,SymbolPrimitiveRecord:vq,UtcMicros:vK},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Bounded semantic result shared by the compatibility surfaces. Rendering,\ntransport envelopes, and MCP content blocks remain outside this contract.",properties:{freshness:{$ref:"#/$defs/CodeGraphReadFreshnessV1"},generation:{$ref:"#/$defs/CodeGenerationId"},items:{items:{$ref:"#/$defs/SymbolPrimitiveRecord"},type:"array"},next_cursor:{description:"Opaque resume token; its bounded string is the public wire form.",type:["string","null"]},related_edge_count:{format:"uint64",minimum:0,type:["integer","null"]},support_gaps:{items:{$ref:"#/$defs/PrimitiveSupportGap"},type:"array"},total:{format:"uint64",minimum:0,type:["integer","null"]},truncated:{type:"boolean"}},required:["generation","freshness","items","truncated","support_gaps"],title:"SymbolGraphPage",type:"object"},{$defs:{CallableCodeSurfaceMeta:f$,ResultProjection:_w,RetrievalOrder:_I,SymbolGraphScope:vP},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{lazy_index_ignored_dependencies:{type:"boolean"},meta:{$ref:"#/$defs/CallableCodeSurfaceMeta"},query:{type:"string"},scope:{$ref:"#/$defs/SymbolGraphScope"}},required:["query","scope","lazy_index_ignored_dependencies","meta"],title:"CodeSymbolSearchSurfaceRequest",type:"object"},{$defs:{CallableCodeSurfaceMeta:f$,CodeGenerationId:fT,CodeQueryScope:fL,ResultProjection:_w,RetrievalOrder:_I},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{meta:{$ref:"#/$defs/CallableCodeSurfaceMeta"},scope:{$ref:"#/$defs/CodeQueryScope"}},required:["scope","meta"],title:"CodeTimelineSurfaceRequest",type:"object"},{$defs:{CodeGenerationId:fT,CodeTimelineRecord:{additionalProperties:!1,properties:{file_count:{format:"uint64",minimum:0,type:"integer"},generation:{$ref:"#/$defs/CodeGenerationId"},indexed_at:{$ref:"#/$defs/UtcMicros"},symbol_count:{format:"uint64",minimum:0,type:"integer"}},required:["generation","indexed_at","file_count","symbol_count"],type:"object"},UtcMicros:vK},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Generation-bound page returned by every callable code query. Coverage,\nomissions, scoring, and terminal state remain in the enclosing\n[`crate::result::RetrievalEvidence`].",properties:{generation:{$ref:"#/$defs/CodeGenerationId"},items:{items:{$ref:"#/$defs/CodeTimelineRecord"},type:"array"},next_cursor:{description:"Opaque resume token; its bounded string is the public wire form.",type:["string","null"]},query_fallback:{description:"Independently hashed exact/lexical/graph subpayload. Callers preserve it\nbyte-for-byte rather than interpreting it, so the public schema admits\nthe canonical JSON it carries without re-declaring its internals."},total:{format:"uint64",minimum:0,type:["integer","null"]}},required:["generation","items"],title:"CodeQueryPage",type:"object"},{$defs:{CallableCodeSurfaceMeta:f$,ResultProjection:_w,RetrievalOrder:_I,SymbolGraphScope:vP},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{maximum_depth:{default:5,format:"uint32",minimum:0,type:"integer"},meta:{$ref:"#/$defs/CallableCodeSurfaceMeta",default:{cursor:null,order:"source_position",projection:"evidence"}},node_id:{type:"string"},scope:{$ref:"#/$defs/SymbolGraphScope",default:{path_prefix:null}}},required:["node_id"],title:"CodeTypeHierarchySurfaceRequest",type:"object"},{$defs:{CodeGenerationId:fT,CodeGraphReadFreshnessV1:fO,PrimitiveSupportGap:gX,SymbolPrimitiveRecord:vq,TypeHierarchyRecord:{additionalProperties:!1,properties:{depth:{format:"uint32",minimum:0,type:"integer"},edge_kind:{type:"string"},parent_node_id:{type:"string"},symbol:{$ref:"#/$defs/SymbolPrimitiveRecord"}},required:["symbol","parent_node_id","edge_kind","depth"],type:"object"},UtcMicros:vK},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Bounded semantic result shared by the compatibility surfaces. Rendering,\ntransport envelopes, and MCP content blocks remain outside this contract.",properties:{freshness:{$ref:"#/$defs/CodeGraphReadFreshnessV1"},generation:{$ref:"#/$defs/CodeGenerationId"},items:{items:{$ref:"#/$defs/TypeHierarchyRecord"},type:"array"},next_cursor:{description:"Opaque resume token; its bounded string is the public wire form.",type:["string","null"]},related_edge_count:{format:"uint64",minimum:0,type:["integer","null"]},support_gaps:{items:{$ref:"#/$defs/PrimitiveSupportGap"},type:"array"},total:{format:"uint64",minimum:0,type:["integer","null"]},truncated:{type:"boolean"}},required:["generation","freshness","items","truncated","support_gaps"],title:"SymbolGraphPage",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{staged_only:{description:"If true, only analyze staged changes (default: false = all uncommitted\nchanges).",type:["boolean","null"]}},title:"CommitContextSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fE,CodeIndexConvergenceParkedV1:fA,CodeIndexStalenessStateV1:fz,CommitCategoryV1:{description:"The commit category the changed file roles suggest.",enum:["feature/fix (source + tests)","feature/fix/refactor","test","chore/docs/config"],type:"string"},CommitContextSummaryV1:{additionalProperties:!1,properties:{changed_files:{items:{$ref:"#/$defs/CommitFileRoleV1"},type:"array"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},recent_commits:{items:{type:"string"},type:"array"},suggested_category:{anyOf:[{$ref:"#/$defs/CommitCategoryV1"},{type:"null"}],description:"Absent when the worktree has no changes."},summary:{type:"string"},symbols_by_role:{additionalProperties:!1,properties:{config:{items:{$ref:"#/$defs/CommitSymbolEntryV1"},type:"array"},docs:{items:{$ref:"#/$defs/CommitSymbolEntryV1"},type:"array"},source:{items:{$ref:"#/$defs/CommitSymbolEntryV1"},type:"array"},test:{items:{$ref:"#/$defs/CommitSymbolEntryV1"},type:"array"}},type:"object"}},required:["changed_files","symbols_by_role","recent_commits","summary"],type:"object"},CommitFileRoleV1:{additionalProperties:!1,properties:{file:{type:"string"},role:{$ref:"#/$defs/GitFileRoleV1"},symbols:{format:"uint",minimum:0,type:"integer"}},required:["file","role","symbols"],type:"object"},CommitSymbolEntryV1:{anyOf:[{$ref:"#/$defs/CommitSymbolV1"},{$ref:"#/$defs/ConfigSummaryV1"}]},CommitSymbolV1:{additionalProperties:!1,properties:{file:{type:"string"},kind:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},name:{type:"string"}},required:["name","kind","file","line"],type:"object"},ConfigSummaryKindV1:fZ,ConfigSummaryV1:fQ,GitFileRoleV1:{description:"A changed file's semantic role.",enum:["config","docs","source","test"],type:"string"},GitToolErrorKindV1:yN,GitToolErrorV1:yz,GitToolFailureV1:yD,GitToolOperationV1:yF,PrimitiveFreshnessStateV1:gG,PrimitiveIndexingStateV1:gB,PrimitiveSearchFreshnessV1:gQ},$schema:"https://json-schema.org/draft/2020-12/schema",anyOf:[{$ref:"#/$defs/CommitContextSummaryV1"},{$ref:"#/$defs/GitToolFailureV1"}],title:"CommitContextResultV1"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{limit:{description:"Maximum number of results to return (default: 10, at most 100).",format:"uint32",minimum:0,type:["integer","null"]},node_kind:{description:"Filter by node kind (default: every kind).",type:["string","null"]},path:{description:"Filter to files under this directory path (e.g. 'src/main/java').",type:["string","null"]}},title:"ComplexitySurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fE,CodeIndexConvergenceParkedV1:fA,CodeIndexStalenessStateV1:fz,ComplexityAnalysisV1:fB,ComplexityReportEntryV1:{additionalProperties:!1,properties:{branches:{format:"uint32",minimum:0,type:["integer","null"]},complexity_analysis:{$ref:"#/$defs/ComplexityAnalysisV1"},cyclomatic_complexity:{description:"The counters are `None` when `complexity_analysis` reports the bounded\nwalk did not cover the body.",format:"uint32",minimum:0,type:["integer","null"]},fan_in:{format:"uint64",minimum:0,type:"integer"},fan_out:{format:"uint64",minimum:0,type:"integer"},file:{type:"string"},id:{type:"string"},kind:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},lines:{format:"uint32",minimum:0,type:"integer"},loops:{format:"uint32",minimum:0,type:["integer","null"]},max_nesting:{format:"uint32",minimum:0,type:["integer","null"]},name:{type:"string"},score:{format:"uint64",minimum:0,type:"integer"}},required:["id","name","kind","file","line","lines","complexity_analysis","fan_out","fan_in","score"],type:"object"},PrimitiveFreshnessStateV1:gG,PrimitiveIndexingStateV1:gB,PrimitiveSearchFreshnessV1:gQ},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{formula:{type:"string"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},note:{type:"string"},ranking:{items:{$ref:"#/$defs/ComplexityReportEntryV1"},type:"array"},result_count:{format:"uint64",minimum:0,type:"integer"}},required:["formula","note","result_count","ranking"],title:"ComplexityReportV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Exactly one of `path` or `glob` names the files to query.",properties:{glob:{description:"Glob pattern to match multiple config files (e.g. '**/Cargo.toml').\nMutually exclusive with 'path'.",type:["string","null"]},key:{description:"Dot-separated key path (e.g. 'package.version',\n'dependencies.tokio.version').",type:"string"},path:{description:"Project-relative path to a single config file (e.g. 'Cargo.toml').\nMutually exclusive with 'glob'.",type:["string","null"]}},required:["key"],title:"ConfigSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fE,CodeIndexConvergenceParkedV1:fA,CodeIndexStalenessStateV1:fz,ConfigKeyFoundV1:{additionalProperties:!1,properties:{file:{type:"string"},key:{type:"string"},line:{description:"The first line whose text starts with the key's leaf segment.",format:"uint32",minimum:0,type:["integer","null"]},value:!0},required:["file","key","value"],type:"object"},ConfigKeyMissingV1:{additionalProperties:!1,description:"`value` is always null and `found` always false; both stay on the wire\nso a missing key reads the same as it always has.",properties:{file:{type:"string"},found:{type:"boolean"},key:{type:"string"},value:{type:"null"}},required:["file","key","value","found"],type:"object"},ConfigMatchV1:{anyOf:[{$ref:"#/$defs/ConfigParseErrorV1"},{$ref:"#/$defs/ConfigKeyMissingV1"},{$ref:"#/$defs/ConfigKeyFoundV1"}],description:"One queried config file: the file's parse error, the key's absence, or the\nkey's value and defining line.\n\nThe variants are distinguished by their exact field sets, so each one\ndenies unknown fields and the most specific shapes are tried first."},ConfigParseErrorV1:{additionalProperties:!1,properties:{error:{type:"string"},file:{type:"string"}},required:["file","error"],type:"object"},PrimitiveFreshnessStateV1:gG,PrimitiveIndexingStateV1:gB,PrimitiveSearchFreshnessV1:gQ},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},match_count:{description:"Files where the key was found or that failed to parse.",format:"uint",minimum:0,type:"integer"},matches:{items:{$ref:"#/$defs/ConfigMatchV1"},type:"array"}},required:["match_count","matches"],title:"ConfigResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{cursor:{default:null,description:"The previous page's `next_cursor`, valid only with the same `limit`.",type:["string","null"]},limit:{format:"uint",minimum:0,type:"integer"}},required:["limit"],title:"ConfigurationAuditRequestV1",type:"object"},{$defs:{ActorId:mW,ConfigurationAuditEvent:{additionalProperties:!1,description:"Append-only audit record. `target_commitment` is event-scoped and cannot be\njoined across audit events; a caller must be separately authorized before\nany canonical target is resolved by the store/application layer.",properties:{actor_id:{$ref:"#/$defs/ActorId"},base_revision_id:{$ref:"#/$defs/ConfigurationRevisionId"},event_id:{$ref:"#/$defs/ConfigurationAuditEventId"},event_kind:{$ref:"#/$defs/ConfigurationAuditEventKindV1"},idempotency_key:{anyOf:[{$ref:"#/$defs/ConfigurationIdempotencyKey"},{type:"null"}]},occurred_at:{$ref:"#/$defs/UtcMicros"},operation_digest:{$ref:"#/$defs/ManifestDigest"},receipt_id:{anyOf:[{$ref:"#/$defs/ConfigurationReceiptId"},{type:"null"}]},result_revision_id:{anyOf:[{$ref:"#/$defs/ConfigurationRevisionId"},{type:"null"}]},safe_reason_code:{type:["string","null"]},target_commitment:{$ref:"#/$defs/ManifestDigest"}},required:["event_id","event_kind","actor_id","base_revision_id","operation_digest","target_commitment","occurred_at"],type:"object"},ConfigurationAuditEventId:{description:"Strongly typed canonical identity: `ConfigurationAuditEventId`.",type:"string"},ConfigurationAuditEventKindV1:{enum:["dry_run_created","applied","rejected","expired","activation_failed","rollback_dry_run_created","rollback_applied","recovered"],type:"string"},ConfigurationIdempotencyKey:fX,ConfigurationReceiptId:f1,ConfigurationRevisionId:f0,ManifestDigest:gl,UtcMicros:vK},$schema:"https://json-schema.org/draft/2020-12/schema",properties:{events:{items:{$ref:"#/$defs/ConfigurationAuditEvent"},type:"array"},next_cursor:{description:"Opaque continuation, bound to this operation and request.",type:["string","null"]}},required:["events"],title:"ConfigurationAuditPage",type:"object"},{$defs:{AccessRuleId:mM,ActorId:mW,AnalyzerEnvironmentVariable:mU,AnalyzerExecutableId:mH,AnalyzerExecutableReferenceV1:mG,AnalyzerLanguageId:mB,AnalyzerLanguageSelectionV1:mK,AnalyzerPrivacyClassV1:mJ,AnalyzerResourceLimitsV1:mZ,AnalyzerRestartPolicyV1:mQ,AnalyzerSettingsV1:mX,AnalyzerStructuredValueV1:mY,AuthorityRef:m0,AutomaticWorktreeGcV1:m3,AutomationBackendV1:m9,AutomationHostModeV1:m5,AutomationSettingsV1:fi,AutomationTaskSetV1:fo,AutomationTaskSettingsV1:fn,BranchCollisionPolicyV1:fd,BranchNameComponentV1:fc,BranchNameSeparatorV1:fl,BranchNamingPolicyV1:fp,BranchTopologyKindV1:f_,BranchTopologyPolicyV1:fv,CanonicalGitRefNameV1:fR,CanonicalGitRefPrefix:fP,CapabilityId:fV,CodeIndexWorkerSelectionV1:fD,ConfigurationDirectMutationRequestV1:{oneOf:[{properties:{key:{$ref:"#/$defs/SettingKey"},layer:{$ref:"#/$defs/ConfigurationLayerIdV1"},operation:{const:"set",type:"string"},value:{$ref:"#/$defs/ConfigurationValueV1"}},required:["operation","layer","key","value"],type:"object"},{properties:{key:{$ref:"#/$defs/SettingKey"},layer:{$ref:"#/$defs/ConfigurationLayerIdV1"},operation:{const:"unset",type:"string"}},required:["operation","layer","key"],type:"object"}]},ConfigurationIdempotencyKey:fX,ConfigurationLayerIdV1:fY,ConfigurationRevisionId:f0,ConfigurationValueV1:f4,ContextScoutConfigurationLimitsV1:he,ContextScoutConfigurationModeV1:ht,ContextScoutConfigurationStateV1:hr,ContextScoutConfiguredModelPathV1:hi,ContextScoutSettingsV1:hv,CredentialReferenceId:hq,CrossMergeModeV1:hI,CrossMergePolicyV1:hx,GitHubStackedPullRequestPolicyV1:yP,HistoryRewritePolicyV1:yU,LcmSummarizerExecutableV1:y9,LcmSummarizerExecutablesV1:y5,LocatorDigest:gr,ManifestDigest:gl,ProjectId:g2,ProtectedRefDispositionV1:g8,ProtectedRefRuleV1:g7,ProtectedRefSelectorV1:_e,ProviderId:_i,QueryCollectionId:_s,RepositoryId:_v,RepositoryPlacementScopeV1:_b,RequiredCheckExpectationV1:_$,RequiredCheckV1:_S,ReviewRequirementV1:_T,ReviewTopologyKindV1:_O,ReviewTopologyPolicyV1:_E,RuleEffect:_N,ScopeAccessRule:_H,ScopeAccessSubjectV1:_G,ScopeControlOperationV1:_B,ScopeSourceBinding:_Y,SensitiveFilesystemLocatorV1:_2,SettingKey:vn,SourceBindingId:vf,SourceKindV1:vg,TopologyConcurrencyPolicyV1:vF,TopologyEscalationPolicyV1:vL,TopologyGatePolicyV1:vU,TopologyNotificationLevelV1:vH,UserProfileId:vB,UtcMicros:vK,WorkApprovalPolicy:vX,WorkContentLocationClassV1:bl,WorkEffortClassV1:bf,WorkEgressPolicy:bh,WorkExecutableBindingV1:b_,WorkExecutableCapabilityV1:bv,WorkExecutableReference:bb,WorkExecutionLimits:bS,WorkExpertiseCategoryV1:bw,WorkExpertiseConsentV1:bR,WorkFallbackTopology:bP,WorkFilesystemPolicy:bq,WorkOrdinalBandV1:bD,WorkProviderRouteId:$o,WorkProviderRouteV1:$n,WorkRouteCandidateV1:$m,WorkRouteExecutionProfileV1:$h,WorkSandboxPolicy:$b,WorkTopologyPolicyV1:$V,WorktreeCleanlinessRequirementV1:$A,WorktreePlacementModeV1:$z,WorktreeRetentionPolicyV1:$D,WorktreeRootPolicyV1:$F},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{expected_revision:{$ref:"#/$defs/ConfigurationRevisionId"},idempotency_key:{$ref:"#/$defs/ConfigurationIdempotencyKey"},mutations:{items:{$ref:"#/$defs/ConfigurationDirectMutationRequestV1"},type:"array"}},required:["mutations","expected_revision","idempotency_key"],title:"ConfigurationBatchRequestV1",type:"object"},{$defs:{AccessPolicyDigest:mA,ConfigurationReceiptId:f1,ConfigurationRevisionId:f0,ConfigurationSettlementAuthorityV1:{additionalProperties:!1,description:"Original authorization evidence pinned to a durable configuration effect.\nA retry reauthorizes access separately without replacing these fields.",properties:{policy_digest:{$ref:"#/$defs/AccessPolicyDigest"},policy_epoch:{format:"uint64",minimum:0,type:"integer"},revalidated_at:{$ref:"#/$defs/UtcMicros"}},required:["policy_epoch","policy_digest","revalidated_at"],type:"object"},ConfigurationSnapshotId:f2,ManifestDigest:gl,UtcMicros:vK},$schema:"https://json-schema.org/draft/2020-12/schema",properties:{base_revision_id:{$ref:"#/$defs/ConfigurationRevisionId"},created_at:{$ref:"#/$defs/UtcMicros"},effective_deadline_at:{$ref:"#/$defs/UtcMicros"},operation_digest:{$ref:"#/$defs/ManifestDigest"},receipt_id:{$ref:"#/$defs/ConfigurationReceiptId"},result_revision_id:{$ref:"#/$defs/ConfigurationRevisionId"},settlement_authority:{$ref:"#/$defs/ConfigurationSettlementAuthorityV1"},snapshot_id:{$ref:"#/$defs/ConfigurationSnapshotId"}},required:["receipt_id","base_revision_id","result_revision_id","snapshot_id","operation_digest","settlement_authority","created_at","effective_deadline_at"],title:"ConfigurationMutationReceipt",type:"object"},{$defs:{SettingKey:vn},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{key:{$ref:"#/$defs/SettingKey"}},required:["key"],title:"ConfigurationGetRequestV1",type:"object"},{$defs:{AccessRuleId:mM,ActorId:mW,AnalyzerEnvironmentVariable:mU,AnalyzerExecutableId:mH,AnalyzerExecutableReferenceV1:mG,AnalyzerLanguageId:mB,AnalyzerLanguageSelectionV1:mK,AnalyzerPrivacyClassV1:mJ,AnalyzerResourceLimitsV1:mZ,AnalyzerRestartPolicyV1:mQ,AnalyzerSettingsV1:mX,AnalyzerStructuredValueV1:mY,AuthorityRef:m0,AutomaticWorktreeGcV1:m3,AutomationBackendV1:m9,AutomationHostModeV1:m5,AutomationSettingsV1:fi,AutomationTaskSetV1:fo,AutomationTaskSettingsV1:fn,BranchCollisionPolicyV1:fd,BranchNameComponentV1:fc,BranchNameSeparatorV1:fl,BranchNamingPolicyV1:fp,BranchTopologyKindV1:f_,BranchTopologyPolicyV1:fv,CandidateDispositionV1:{enum:["winning","overridden","rejected","defaulted"],type:"string"},CanonicalGitRefNameV1:fR,CanonicalGitRefPrefix:fP,CapabilityId:fV,CodeIndexWorkerSelectionV1:fD,ConfigurationCandidateV1:{additionalProperties:!1,description:"Resolution provenance is intentionally distinct from behavior. Moving the\nsame winner between layers can change this material without changing the\neffective behavior digest.",properties:{disposition:{$ref:"#/$defs/CandidateDispositionV1"},layer:{$ref:"#/$defs/ConfigurationLayerIdV1"},revision_id:{$ref:"#/$defs/ConfigurationRevisionId"},safe_reason:{type:["string","null"]}},required:["layer","revision_id","disposition"],type:"object"},ConfigurationLayerIdV1:fY,ConfigurationRevisionId:f0,ConfigurationSettingActionV1:{enum:["set","unset"],type:"string"},ConfigurationSettingFindingV1:{description:"A stored value the running release keeps but does not apply. The value\nstays readable so `legal_actions` on the same key can replace it.",oneOf:[{additionalProperties:!1,description:"An `index.exclude.v1` / `index.include.v1` pattern that does not\ncompile. An earlier release stored it unchecked; indexing runs\nwithout it.",properties:{kind:{const:"invalid_index_path_pattern",type:"string"},legal_actions:{items:{$ref:"#/$defs/ConfigurationSettingActionV1"},type:"array"},message:{type:"string"},pattern:{type:"string"}},required:["kind","pattern","message","legal_actions"],type:"object"}]},ConfigurationSnapshotId:f2,ConfigurationValueV1:f4,ContextScoutConfigurationLimitsV1:he,ContextScoutConfigurationModeV1:ht,ContextScoutConfigurationStateV1:hr,ContextScoutConfiguredModelPathV1:hi,ContextScoutSettingsV1:hv,CredentialReferenceId:hq,CrossMergeModeV1:hI,CrossMergePolicyV1:hx,GitHubStackedPullRequestPolicyV1:yP,HistoryRewritePolicyV1:yU,LcmSummarizerExecutableV1:y9,LcmSummarizerExecutablesV1:y5,LocatorDigest:gr,ManifestDigest:gl,ProjectId:g2,ProtectedRefDispositionV1:g8,ProtectedRefRuleV1:g7,ProtectedRefSelectorV1:_e,ProviderId:_i,QueryCollectionId:_s,RepositoryId:_v,RepositoryPlacementScopeV1:_b,RequiredCheckExpectationV1:_$,RequiredCheckV1:_S,ReviewRequirementV1:_T,ReviewTopologyKindV1:_O,ReviewTopologyPolicyV1:_E,RuleEffect:_N,ScopeAccessRule:_H,ScopeAccessSubjectV1:_G,ScopeControlOperationV1:_B,ScopeSourceBinding:_Y,SensitiveFilesystemLocatorV1:_2,SettingKey:vn,SourceBindingId:vf,SourceKindV1:vg,TopologyConcurrencyPolicyV1:vF,TopologyEscalationPolicyV1:vL,TopologyGatePolicyV1:vU,TopologyNotificationLevelV1:vH,UserProfileId:vB,UtcMicros:vK,WorkApprovalPolicy:vX,WorkContentLocationClassV1:bl,WorkEffortClassV1:bf,WorkEgressPolicy:bh,WorkExecutableBindingV1:b_,WorkExecutableCapabilityV1:bv,WorkExecutableReference:bb,WorkExecutionLimits:bS,WorkExpertiseCategoryV1:bw,WorkExpertiseConsentV1:bR,WorkFallbackTopology:bP,WorkFilesystemPolicy:bq,WorkOrdinalBandV1:bD,WorkProviderRouteId:$o,WorkProviderRouteV1:$n,WorkRouteCandidateV1:$m,WorkRouteExecutionProfileV1:$h,WorkSandboxPolicy:$b,WorkTopologyPolicyV1:$V,WorktreeCleanlinessRequirementV1:$A,WorktreePlacementModeV1:$z,WorktreeRetentionPolicyV1:$D,WorktreeRootPolicyV1:$F},$schema:"https://json-schema.org/draft/2020-12/schema",properties:{candidates:{items:{$ref:"#/$defs/ConfigurationCandidateV1"},type:"array"},effective_behavior_digest:{$ref:"#/$defs/ManifestDigest"},effective_value:{$ref:"#/$defs/ConfigurationValueV1"},findings:{description:"Parts of the stored value this release does not apply. Empty when the\neffective value applies in full.",items:{$ref:"#/$defs/ConfigurationSettingFindingV1"},type:"array"},key:{$ref:"#/$defs/SettingKey"},resolution_provenance_digest:{$ref:"#/$defs/ManifestDigest"},revision_id:{$ref:"#/$defs/ConfigurationRevisionId",description:"Current configuration revision accepted by mutation `expected_revision` CAS."},snapshot_id:{$ref:"#/$defs/ConfigurationSnapshotId",description:"Content identity of the fully resolved configuration snapshot."}},required:["key","effective_value","revision_id","snapshot_id","effective_behavior_digest","resolution_provenance_digest","candidates","findings"],title:"ResolvedSetting",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Typed input for the configuration list read through the daemon\ninvocation boundary.",title:"ConfigurationListRequestV1",type:"object"},{$defs:{RestartRequirementV1:{enum:["none","analyzer_restart","daemon_restart"],type:"string"},SettingKey:vn,SettingSensitivityV1:{enum:["public","sensitive"],type:"string"},SettingSummary:{properties:{key:{$ref:"#/$defs/SettingKey"},restart_requirement:{$ref:"#/$defs/RestartRequirementV1"},sensitivity:{$ref:"#/$defs/SettingSensitivityV1"}},required:["key","sensitivity","restart_requirement"],type:"object"}},$schema:"https://json-schema.org/draft/2020-12/schema",items:{$ref:"#/$defs/SettingSummary"},title:"Array_of_SettingSummary",type:"array"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,title:"ConfigurationObservedStateRequestV1",type:"object"},{$defs:{ActivationDriftV1:{enum:["current","never_activated","pending_restart","activation_failed"],type:"string"},ComponentConfigurationState:{properties:{activation_error_code:{type:["string","null"]},component:{type:"string"},desired_revision_id:{$ref:"#/$defs/ConfigurationRevisionId"},drift:{$ref:"#/$defs/ActivationDriftV1"},last_working_revision_id:{anyOf:[{$ref:"#/$defs/ConfigurationRevisionId"},{type:"null"}]},observed_revision_id:{anyOf:[{$ref:"#/$defs/ConfigurationRevisionId"},{type:"null"}]},restart_required:{type:"boolean"}},required:["component","desired_revision_id","restart_required","drift"],type:"object"},ConfigurationRevisionId:f0},$schema:"https://json-schema.org/draft/2020-12/schema",items:{$ref:"#/$defs/ComponentConfigurationState"},title:"Array_of_ComponentConfigurationState",type:"array"},{$defs:{ChangePlanId:fI,ConfigurationIdempotencyKey:fX,ConfigurationRevisionId:f0,ManifestDigest:gl},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{expected_base_revision_id:{$ref:"#/$defs/ConfigurationRevisionId"},idempotency_key:{$ref:"#/$defs/ConfigurationIdempotencyKey"},operation_digest:{$ref:"#/$defs/ManifestDigest"},plan_id:{$ref:"#/$defs/ChangePlanId"}},required:["plan_id","expected_base_revision_id","operation_digest","idempotency_key"],title:"ConfigurationProtectedApplyRequestV1",type:"object"},{$defs:{AccessRuleId:mM,ActorId:mW,AuthorityRef:m0,AutomaticWorktreeGcV1:m3,BranchCollisionPolicyV1:fd,BranchNameComponentV1:fc,BranchNameSeparatorV1:fl,BranchNamingPolicyV1:fp,BranchTopologyKindV1:f_,BranchTopologyPolicyV1:fv,CanonicalGitRefNameV1:fR,CanonicalGitRefPrefix:fP,CapabilityId:fV,ConfigurationRevisionId:f0,CrossMergeModeV1:hI,CrossMergePolicyV1:hx,GitHubStackedPullRequestPolicyV1:yP,HistoryRewritePolicyV1:yU,LocatorDigest:gr,ManifestDigest:gl,ProjectId:g2,ProtectedChange:{description:"The protected configuration operation set. Ordinary scalar mutations are\nintentionally absent; they activate directly after validation.",oneOf:[{properties:{kind:{const:"bind_source",type:"string"},value:{$ref:"#/$defs/ScopeSourceBinding"}},required:["kind","value"],type:"object"},{properties:{kind:{const:"rebind_source",type:"string"},value:{$ref:"#/$defs/ScopeSourceBinding"}},required:["kind","value"],type:"object"},{properties:{kind:{const:"unbind_source",type:"string"},value:{properties:{binding_id:{$ref:"#/$defs/SourceBindingId"}},required:["binding_id"],type:"object"}},required:["kind","value"],type:"object"},{properties:{kind:{const:"upsert_access_rule",type:"string"},value:{$ref:"#/$defs/ScopeAccessRule"}},required:["kind","value"],type:"object"},{properties:{kind:{const:"remove_access_rule",type:"string"},value:{properties:{rule_id:{$ref:"#/$defs/AccessRuleId"}},required:["rule_id"],type:"object"}},required:["kind","value"],type:"object"},{properties:{kind:{const:"replace_work_topology_policy",type:"string"},value:{$ref:"#/$defs/WorkTopologyPolicyV1"}},required:["kind","value"],type:"object"}]},ProtectedRefDispositionV1:g8,ProtectedRefRuleV1:g7,ProtectedRefSelectorV1:_e,RepositoryId:_v,RepositoryPlacementScopeV1:_b,RequiredCheckExpectationV1:_$,RequiredCheckV1:_S,ReviewRequirementV1:_T,ReviewTopologyKindV1:_O,ReviewTopologyPolicyV1:_E,RuleEffect:_N,ScopeAccessRule:_H,ScopeAccessSubjectV1:_G,ScopeControlOperationV1:_B,ScopeSourceBinding:_Y,SensitiveFilesystemLocatorV1:_2,SourceBindingId:vf,SourceKindV1:vg,TopologyConcurrencyPolicyV1:vF,TopologyEscalationPolicyV1:vL,TopologyGatePolicyV1:vU,TopologyNotificationLevelV1:vH,UserProfileId:vB,UtcMicros:vK,WorkTopologyPolicyV1:$V,WorktreeCleanlinessRequirementV1:$A,WorktreePlacementModeV1:$z,WorktreeRetentionPolicyV1:$D,WorktreeRootPolicyV1:$F},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{change:{$ref:"#/$defs/ProtectedChange"},expected_revision:{$ref:"#/$defs/ConfigurationRevisionId"}},required:["change","expected_revision"],title:"ConfigurationProtectedPreviewRequestV1",type:"object"},{$defs:{AccessPolicyDigest:mA,ActorId:mW,ChangePlanId:fI,ConfigurationRevisionId:f0,ManifestDigest:gl,RedactedConfigurationChangeV1:{additionalProperties:!1,properties:{after_digest:{anyOf:[{$ref:"#/$defs/ManifestDigest"},{type:"null"}]},before_digest:{anyOf:[{$ref:"#/$defs/ManifestDigest"},{type:"null"}]},operation:{$ref:"#/$defs/ScopeControlOperationV1"},setting_key:{$ref:"#/$defs/SettingKey"}},required:["setting_key","operation"],type:"object"},ScopeControlOperationV1:_B,SettingKey:vn,UtcMicros:vK},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Immutable dry-run result. It contains no raw locator, secret, target\nidentity, or plaintext configuration value.",properties:{actor_id:{$ref:"#/$defs/ActorId"},authorization_policy_digest:{$ref:"#/$defs/AccessPolicyDigest"},base_revision_id:{$ref:"#/$defs/ConfigurationRevisionId"},created_at:{$ref:"#/$defs/UtcMicros"},expires_at:{$ref:"#/$defs/UtcMicros"},membership_digest:{anyOf:[{$ref:"#/$defs/ManifestDigest"},{type:"null"}]},operation_digest:{$ref:"#/$defs/ManifestDigest"},plan_id:{$ref:"#/$defs/ChangePlanId"},policy_epoch:{format:"uint64",minimum:0,type:"integer"},redacted_changes:{items:{$ref:"#/$defs/RedactedConfigurationChangeV1"},type:"array"},resolved_scope_digest:{$ref:"#/$defs/ManifestDigest"}},required:["plan_id","actor_id","base_revision_id","operation_digest","resolved_scope_digest","authorization_policy_digest","policy_epoch","expires_at","created_at","redacted_changes"],title:"ProtectedChangePlan",type:"object"},{$defs:{ConfigurationRevisionId:f0,RollbackModeV1:{enum:["all_or_nothing","partial"],type:"string"}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{mode:{$ref:"#/$defs/RollbackModeV1"},target_revision_id:{$ref:"#/$defs/ConfigurationRevisionId"}},required:["target_revision_id","mode"],title:"ConfigurationRollbackPreviewRequestV1",type:"object"},{$defs:{AccessRuleId:mM,ActorId:mW,AnalyzerEnvironmentVariable:mU,AnalyzerExecutableId:mH,AnalyzerExecutableReferenceV1:mG,AnalyzerLanguageId:mB,AnalyzerLanguageSelectionV1:mK,AnalyzerPrivacyClassV1:mJ,AnalyzerResourceLimitsV1:mZ,AnalyzerRestartPolicyV1:mQ,AnalyzerSettingsV1:mX,AnalyzerStructuredValueV1:mY,AuthorityRef:m0,AutomaticWorktreeGcV1:m3,AutomationBackendV1:m9,AutomationHostModeV1:m5,AutomationSettingsV1:fi,AutomationTaskSetV1:fo,AutomationTaskSettingsV1:fn,BranchCollisionPolicyV1:fd,BranchNameComponentV1:fc,BranchNameSeparatorV1:fl,BranchNamingPolicyV1:fp,BranchTopologyKindV1:f_,BranchTopologyPolicyV1:fv,CanonicalGitRefNameV1:fR,CanonicalGitRefPrefix:fP,CapabilityId:fV,CodeIndexWorkerSelectionV1:fD,ConfigurationIdempotencyKey:fX,ConfigurationLayerIdV1:fY,ConfigurationRevisionId:f0,ConfigurationValueV1:f4,ContextScoutConfigurationLimitsV1:he,ContextScoutConfigurationModeV1:ht,ContextScoutConfigurationStateV1:hr,ContextScoutConfiguredModelPathV1:hi,ContextScoutSettingsV1:hv,CredentialReferenceId:hq,CrossMergeModeV1:hI,CrossMergePolicyV1:hx,GitHubStackedPullRequestPolicyV1:yP,HistoryRewritePolicyV1:yU,LcmSummarizerExecutableV1:y9,LcmSummarizerExecutablesV1:y5,LocatorDigest:gr,ManifestDigest:gl,ProjectId:g2,ProtectedRefDispositionV1:g8,ProtectedRefRuleV1:g7,ProtectedRefSelectorV1:_e,ProviderId:_i,QueryCollectionId:_s,RepositoryId:_v,RepositoryPlacementScopeV1:_b,RequiredCheckExpectationV1:_$,RequiredCheckV1:_S,ReviewRequirementV1:_T,ReviewTopologyKindV1:_O,ReviewTopologyPolicyV1:_E,RuleEffect:_N,ScopeAccessRule:_H,ScopeAccessSubjectV1:_G,ScopeControlOperationV1:_B,ScopeSourceBinding:_Y,SensitiveFilesystemLocatorV1:_2,SettingKey:vn,SourceBindingId:vf,SourceKindV1:vg,TopologyConcurrencyPolicyV1:vF,TopologyEscalationPolicyV1:vL,TopologyGatePolicyV1:vU,TopologyNotificationLevelV1:vH,UserProfileId:vB,UtcMicros:vK,WorkApprovalPolicy:vX,WorkContentLocationClassV1:bl,WorkEffortClassV1:bf,WorkEgressPolicy:bh,WorkExecutableBindingV1:b_,WorkExecutableCapabilityV1:bv,WorkExecutableReference:bb,WorkExecutionLimits:bS,WorkExpertiseCategoryV1:bw,WorkExpertiseConsentV1:bR,WorkFallbackTopology:bP,WorkFilesystemPolicy:bq,WorkOrdinalBandV1:bD,WorkProviderRouteId:$o,WorkProviderRouteV1:$n,WorkRouteCandidateV1:$m,WorkRouteExecutionProfileV1:$h,WorkSandboxPolicy:$b,WorkTopologyPolicyV1:$V,WorktreeCleanlinessRequirementV1:$A,WorktreePlacementModeV1:$z,WorktreeRetentionPolicyV1:$D,WorktreeRootPolicyV1:$F},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Typed revision-CAS input for a configuration write through the daemon\ninvocation boundary.",properties:{expected_revision:{$ref:"#/$defs/ConfigurationRevisionId"},idempotency_key:{$ref:"#/$defs/ConfigurationIdempotencyKey"},key:{$ref:"#/$defs/SettingKey"},layer:{$ref:"#/$defs/ConfigurationLayerIdV1"},value:{$ref:"#/$defs/ConfigurationValueV1"}},required:["layer","key","value","expected_revision","idempotency_key"],title:"ConfigurationSetRequestV1",type:"object"},{$defs:{ConfigurationIdempotencyKey:fX,ConfigurationLayerIdV1:fY,ConfigurationRevisionId:f0,ProjectId:g2,QueryCollectionId:_s,SettingKey:vn,UserProfileId:vB},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{expected_revision:{$ref:"#/$defs/ConfigurationRevisionId"},idempotency_key:{$ref:"#/$defs/ConfigurationIdempotencyKey"},key:{$ref:"#/$defs/SettingKey"},layer:{$ref:"#/$defs/ConfigurationLayerIdV1"}},required:["layer","key","expected_revision","idempotency_key"],title:"ConfigurationUnsetRequestV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{limit:{description:"Maximum number of literal sites to return (default: 100, max: 1000).",format:"uint32",minimum:0,type:["integer","null"]},struct:{description:"Struct name to search literal sites of (e.g. 'GraphStats', 'Config').",type:"string"}},required:["struct"],title:"ConstructorsSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fE,CodeIndexConvergenceParkedV1:fA,CodeIndexStalenessStateV1:fz,ConstructorFieldCoverageV1:{description:"Whether a literal site's field lists are complete relative to the\nstruct's graph definition.",enum:["complete","unknown"],type:"string"},ConstructorResolutionReasonV1:{enum:["ambiguous_simple_name","syntax_only_simple_name"],type:"string"},ConstructorResolutionStatusV1:{description:"Syntax alone cannot link same-name types across modules, so every\nresolution is unverified.",enum:["unverified"],type:"string"},ConstructorSiteV1:{additionalProperties:!1,properties:{field_coverage:{$ref:"#/$defs/ConstructorFieldCoverageV1"},fields:{items:{type:"string"},type:"array"},file:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},missing_fields:{items:{type:"string"},type:"array"},update_fields:{items:{type:"string"},type:"array"}},required:["file","line","fields","update_fields","missing_fields","field_coverage"],type:"object"},ConstructorsNotFoundV1:{additionalProperties:!1,properties:{found:{description:"Always `false`: no struct, class, or case class has the name.",type:"boolean"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},match_count:{format:"uint64",minimum:0,type:"integer"},message:{type:"string"},sites:{items:{$ref:"#/$defs/ConstructorSiteV1"},type:"array"},struct:{type:"string"}},required:["found","struct","message","match_count","sites"],type:"object"},ConstructorsReportV1:{additionalProperties:!1,properties:{candidate_count:{format:"uint64",minimum:0,type:"integer"},expected_fields:{description:"`None` when the name resolves to more than one definition.",items:{type:"string"},type:["array","null"]},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},match_count:{format:"uint64",minimum:0,type:"integer"},resolution_reason:{$ref:"#/$defs/ConstructorResolutionReasonV1"},resolution_status:{$ref:"#/$defs/ConstructorResolutionStatusV1"},sites:{items:{$ref:"#/$defs/ConstructorSiteV1"},type:"array"},struct:{type:"string"}},required:["struct","candidate_count","resolution_status","resolution_reason","match_count","sites"],type:"object"},PrimitiveFreshnessStateV1:gG,PrimitiveIndexingStateV1:gB,PrimitiveSearchFreshnessV1:gQ},$schema:"https://json-schema.org/draft/2020-12/schema",anyOf:[{$ref:"#/$defs/ConstructorsNotFoundV1"},{$ref:"#/$defs/ConstructorsReportV1"}],title:"ConstructorsResultV1"},{$defs:{ContextModeV1:f9},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{budget_tokens:{description:"Cap the ranked sections of the answer at about this many tokens.\nQuotas are fixed shares of the budget. The cut is reported on the result.",format:"uint32",minimum:0,type:["integer","null"]},include_code:{type:["boolean","null"]},include_memory:{type:["boolean","null"]},lexical_anchors:{description:"Exact identifiers or technical terms the answer must be about. Each\nruns as its own lexical route: hits carrying an anchor outrank hits\ncarrying none, exact hits included, every anchor with matches keeps at\nleast its best sites through the lane cap, and `lexical_anchors` in the\nresult reports each anchor's outcome: the sites this result returns\nand, by reason, the admitted sites it could not carry. Bounded and\nvalidated by the retrieval kernel; a\nviolation is a typed request rejection. Identifiers the task names\n(`snake_case`, `camelCase`, `a::b`) are anchored after these.",items:{type:"string"},type:["array","null"]},max_code_blocks:{format:"uint32",minimum:0,type:["integer","null"]},max_nodes:{format:"uint32",minimum:0,type:["integer","null"]},memory_limit:{format:"uint32",minimum:0,type:["integer","null"]},memory_min_trust:{format:"double",type:["number","null"]},mode:{anyOf:[{$ref:"#/$defs/ContextModeV1"},{type:"null"}]},prefer_symbol:{description:"Add a symbol-name lexical route for the identifier-shaped words of the\ntask text.",type:["boolean","null"]},task:{type:"string"}},required:["task"],title:"ContextSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fE,CodeIndexConvergenceParkedV1:fA,CodeIndexStalenessStateV1:fz,ContextCodeBlockV1:{additionalProperties:!1,properties:{code:{type:"string"},end_line:{format:"uint32",minimum:0,type:"integer"},file:{type:"string"},node_id:{type:"string"},start_line:{format:"uint32",minimum:0,type:"integer"}},required:["node_id","file","start_line","end_line","code"],type:"object"},ContextExtensionPointV1:{additionalProperties:!1,description:"A public trait or interface among the context's selected symbols.",properties:{file:{type:"string"},implementor_count:{format:"uint",minimum:0,type:"integer"},kind:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},name:{type:"string"}},required:["name","kind","file","line","implementor_count"],type:"object"},ContextLexicalAnchorV1:f3,ContextModeV1:f9,ContextPlanV1:{additionalProperties:!1,description:"Plan-mode enrichment: where the selected code can be extended and which\ntest files reach it.",properties:{extension_points:{items:{$ref:"#/$defs/ContextExtensionPointV1"},type:"array"},test_files:{description:"Test files calling the selected symbols within two hops; absent when\nno symbol was selected to trace from.",items:{type:"string"},type:["array","null"]}},required:["extension_points"],type:"object"},ContextRelatedOmissionV1:{additionalProperties:!1,description:"Related symbols `context` ranked but did not return.",properties:{omitted:{description:"Ranked related symbols the `max_nodes` cut dropped.",format:"uint",minimum:0,type:"integer"},total:{description:"Distinct related symbols the walk found and ranked.",format:"uint",minimum:0,type:"integer"},total_is_lower_bound:{description:"The neighbor walk stopped at its row limit, so `total` is a lower\nbound.",type:"boolean"}},required:["total","omitted","total_is_lower_bound"],type:"object"},ContextRetrievalPlanV1:{additionalProperties:!1,description:"The retrieval plan `context` executed: which stages ran, what each\nadmitted, and where a budget bounded the answer. Lane-level serving state\nstays in `coverage`.",properties:{code:{$ref:"#/$defs/ContextStageV1",description:"Source bodies for selected symbols, bounded by `max_code_blocks`."},graph:{$ref:"#/$defs/ContextStageV1",description:"Candidates resolved to verified graph symbols."},memory:{$ref:"#/$defs/ContextStageV1",description:"Project memory facts, bounded by `memory_limit`."},related:{$ref:"#/$defs/ContextStageV1",description:"Ranked neighbors of the selected symbols, bounded by `max_nodes`."},search:{$ref:"#/$defs/ContextStageV1",description:"Ranked code-index candidates, bounded by `max_nodes`."}},required:["search","graph","related","code","memory"],type:"object"},ContextRetrievalRouteV1:{description:"Which retrieval route `context` ran.\n\n`name` is the preferred-symbol route. `prose` is the ordinary task\nroute. A caller that omits `prefer_symbol` gets `name` only when the\ntask is one identifier or one `Type.method` / `path::name` token.",enum:["name","prose"],type:"string"},ContextSearchMatchV1:{additionalProperties:!1,properties:{anchor_id:{type:"string"},exact_class:{type:"string"},file:{type:"string"},kind:{type:"string"},name:{type:"string"},qualified_name:{type:"string"},rank:{format:"uint32",minimum:0,type:"integer"},utility_micros:{format:"uint64",minimum:0,type:"integer"}},required:["anchor_id","name","qualified_name","kind","file","exact_class","rank","utility_micros"],type:"object"},ContextStageV1:{description:"What one `context` stage ran with and kept.",oneOf:[{description:"The request did not ask for this stage.",properties:{state:{const:"not_requested",type:"string"}},required:["state"],type:"object"},{description:"A stage this one reads from produced nothing to work on.",properties:{state:{const:"skipped",type:"string"}},required:["state"],type:"object"},{description:"The stage's authority could not answer.",properties:{state:{const:"unavailable",type:"string"}},required:["state"],type:"object"},{description:"The stage admitted `admitted` entries under `budget`. `truncated` is\ntrue when it stopped at that budget, so more entries may exist.",properties:{admitted:{format:"uint32",minimum:0,type:"integer"},budget:{format:"uint32",minimum:0,type:"integer"},state:{const:"ran",type:"string"},truncated:{type:"boolean"}},required:["state","budget","admitted","truncated"],type:"object"}]},FactAssertionId:hz,FactCategoryV1:hD,FactCommitOwnerV1:hL,FactEventId:hH,FactId:hB,FactIdentitySourceResultV1:hK,FactSearchGraphCoverageV1:hQ,FactSearchGraphDegradationV1:hX,FactSearchHitV1:hY,FactSearchScoresV1:h1,FactTelemetryV1:h2,FactV1:h4,LexicalAnchorDropReasonV1:ge,LexicalAnchorDropV1:gt,LocatorDigest:gr,PrimitiveFreshnessStateV1:gG,PrimitiveIndexingStateV1:gB,PrimitiveLaneCompleteV1:gK,PrimitiveLaneStateV1:{enum:["stale","partial","unavailable"],type:"string"},PrimitiveLaneStatusV1:{anyOf:[{$ref:"#/$defs/PrimitiveLaneCompleteV1"},{properties:{generation:{type:["string","null"]},reason:{type:["string","null"]},status:{$ref:"#/$defs/PrimitiveLaneStateV1"}},required:["status"],type:"object"}]},PrimitiveRecallV1:gZ,PrimitiveSearchCoverageV1:{additionalProperties:!1,properties:{exact:{$ref:"#/$defs/PrimitiveLaneStatusV1"},graph:{$ref:"#/$defs/PrimitiveLaneStatusV1"},lexical:{$ref:"#/$defs/PrimitiveLaneStatusV1"},recall:{$ref:"#/$defs/PrimitiveRecallV1"}},required:["exact","lexical","graph","recall"],type:"object"},PrimitiveSearchFreshnessV1:gQ,PrimitiveSymbolLocationV1:gY,PrimitiveUnavailableEvidenceV1:g1,PrimitiveUnavailableStatusV1:g0,ProjectId:g2,ProvenanceId:_t,RetrievalAnchorId:_q,TokenBudgetCutV1:vz,TokenBudgetSectionV1:vD,UtcMicros:vK},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{code:{items:{$ref:"#/$defs/ContextCodeBlockV1"},type:"array"},code_generation:{type:["string","null"]},coverage:{$ref:"#/$defs/PrimitiveSearchCoverageV1"},freshness:{$ref:"#/$defs/PrimitiveSearchFreshnessV1",description:"Freshness of the served code generation, derived from the typed lane\ncoverage and the daemon scheduler's worktree state."},lexical_anchors:{description:"Outcome of every caller `lexical_anchors` entry, then of each\nidentifier the task names; empty when there are neither.",items:{$ref:"#/$defs/ContextLexicalAnchorV1"},type:"array"},memory_graph_coverage:{anyOf:[{$ref:"#/$defs/FactSearchGraphCoverageV1"},{type:"null"}]},memory_matches:{items:{$ref:"#/$defs/FactSearchHitV1"},type:"array"},memory_matches_error:{type:["string","null"]},mode:{$ref:"#/$defs/ContextModeV1"},plan:{anyOf:[{$ref:"#/$defs/ContextPlanV1"},{type:"null"}],description:"Present in plan mode when the verified graph answered."},related_omission:{anyOf:[{$ref:"#/$defs/ContextRelatedOmissionV1"},{type:"null"}],description:"Present when related symbols were left out: by the `max_nodes` cut,\nor because the neighbor walk stopped at its row limit."},related_symbols:{description:"Neighbors of `symbols`, ranked before the `max_nodes` cut: best edge\nkind to a selected symbol (calls, implements, extends, `type_of`,\nreturns, receives, uses, annotates, contains), then total degree\ndescending, then qualified name.",items:{$ref:"#/$defs/PrimitiveSymbolLocationV1"},type:"array"},retrieval:{$ref:"#/$defs/ContextRetrievalPlanV1"},route:{$ref:"#/$defs/ContextRetrievalRouteV1"},search_matches:{items:{$ref:"#/$defs/ContextSearchMatchV1"},type:"array"},symbols:{items:{$ref:"#/$defs/PrimitiveSymbolLocationV1"},type:"array"},task:{type:"string"},token_budget:{anyOf:[{$ref:"#/$defs/TokenBudgetCutV1"},{type:"null"}],description:"Budget accounting when the request supplies `budget_tokens`."},verified_graph_evidence:{anyOf:[{$ref:"#/$defs/PrimitiveUnavailableEvidenceV1"},{type:"null"}]}},required:["task","route","mode","freshness","symbols","related_symbols","code","coverage","memory_matches","retrieval"],title:"ContextResultV1",type:"object"},{$defs:{ContextScoutAddressV1:f5},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{address:{$ref:"#/$defs/ContextScoutAddressV1"}},required:["address"],title:"ContextScoutExactAddressRequestV1",type:"object"},{$defs:{ContextScoutLimitsV1:hp,ContextScoutModelOutcomeV1:hm},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{exhausted:{type:"boolean"},last_estimated_cost_microusd:{format:"uint64",minimum:0,type:["integer","null"]},last_input_tokens:{format:"uint64",minimum:0,type:["integer","null"]},last_model_outcome:{anyOf:[{$ref:"#/$defs/ContextScoutModelOutcomeV1"},{type:"null"}]},last_output_tokens:{format:"uint64",minimum:0,type:["integer","null"]},limits:{$ref:"#/$defs/ContextScoutLimitsV1"}},required:["limits","exhausted"],title:"ContextScoutBudgetResultV1",type:"object"},{$defs:{ContextScoutAddressV1:f5,ContextScoutWorkV1:hk},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{address:{$ref:"#/$defs/ContextScoutAddressV1"},idempotency_key:{type:"string"},work:{$ref:"#/$defs/ContextScoutWorkV1"}},required:["address","work","idempotency_key"],title:"ContextScoutCancelRequestV1",type:"object"},{$defs:{ContextScoutStoreOutcomeV1:hb},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{outcome:{$ref:"#/$defs/ContextScoutStoreOutcomeV1"}},required:["outcome"],title:"ContextScoutMutationResultV1",type:"object"},{$defs:{ContextScoutModelBackendV1:hu,ContextScoutModelOutcomeV1:hm,ContextScoutRuntimeModeV1:hg,ContextScoutServiceStateV1:h_},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{configured_model:{anyOf:[{$ref:"#/$defs/ContextScoutModelBackendV1"},{type:"null"}]},configured_model_available:{type:"boolean"},deterministic_available:{type:"boolean"},last_model_outcome:{anyOf:[{$ref:"#/$defs/ContextScoutModelOutcomeV1"},{type:"null"}]},mode:{$ref:"#/$defs/ContextScoutRuntimeModeV1"},state:{$ref:"#/$defs/ContextScoutServiceStateV1"}},required:["state","mode","deterministic_available","configured_model_available"],title:"ContextScoutCapabilityResultV1",type:"object"},{$defs:{ContextScoutAddressV1:f5,ContextScoutClaimWindowV1:{enum:["idle_window","on_request"],type:"string"}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{address:{$ref:"#/$defs/ContextScoutAddressV1"},idempotency_key:{type:"string"},window:{$ref:"#/$defs/ContextScoutClaimWindowV1"}},required:["address","window","idempotency_key"],title:"ContextScoutClaimRequestV1",type:"object"},{$defs:{CodeGenerationId:fT,ContextScoutAddressV1:f5,ContextScoutCategoryV1:f8,ContextScoutClaimHandleV1:f7,ContextScoutDeliveryWindowV1:ha,ContextScoutEvidenceAvailabilityV1:hs,ContextScoutEvidenceProjectionV1:hd,ContextScoutModelBackendV1:hu,ContextScoutModelOutcomeV1:hm,ContextScoutModelReceiptV1:hf,ContextScoutRouteV1:hy,ContextScoutSuggestionProjectionV1:h$,ContextScoutWorkV1:hk,ManifestDigest:gl,RetrievalAnchorId:_q,UtcMicros:vK},$schema:"https://json-schema.org/draft/2020-12/schema",oneOf:[{properties:{claim:{$ref:"#/$defs/ContextScoutClaimHandleV1"},outcome:{const:"claimed",type:"string"},suggestion:{$ref:"#/$defs/ContextScoutSuggestionProjectionV1"}},required:["outcome","claim","suggestion"],type:"object"},{properties:{outcome:{const:"empty",type:"string"}},required:["outcome"],type:"object"}],title:"ContextScoutClaimResultV1"},{$defs:{ContextScoutAddressV1:f5,ContextScoutClaimHandleV1:f7,ContextScoutDeliveryOutcomeV1:ho,ContextScoutWorkV1:hk,UtcMicros:vK},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{address:{$ref:"#/$defs/ContextScoutAddressV1"},claim:{$ref:"#/$defs/ContextScoutClaimHandleV1"},delivered_at:{$ref:"#/$defs/UtcMicros"},idempotency_key:{type:"string"},outcome:{$ref:"#/$defs/ContextScoutDeliveryOutcomeV1"}},required:["address","claim","delivered_at","outcome","idempotency_key"],title:"ContextScoutDeliveryRequestV1",type:"object"},{$defs:{ContextScoutDeliveryOutcomeV1:ho,ContextScoutDeliveryReceiptV1:hn,ContextScoutStoreOutcomeV1:hb,UtcMicros:vK},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{outcome:{$ref:"#/$defs/ContextScoutStoreOutcomeV1"},receipt:{$ref:"#/$defs/ContextScoutDeliveryReceiptV1"}},required:["outcome","receipt"],title:"ContextScoutDeliveryResultV1",type:"object"},{$defs:{ContextScoutAddressV1:f5},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{address:{$ref:"#/$defs/ContextScoutAddressV1"},limit:{default:8,format:"uint",minimum:0,type:"integer"}},required:["address"],title:"ContextScoutRecentRequestV1",type:"object"},{$defs:{CodeGenerationId:fT,ContextScoutAddressV1:f5,ContextScoutCategoryV1:f8,ContextScoutDeliveryOutcomeV1:ho,ContextScoutDeliveryReceiptV1:hn,ContextScoutDeliveryWindowV1:ha,ContextScoutEvidenceAvailabilityV1:hs,ContextScoutEvidenceProjectionV1:hd,ContextScoutFeedbackKindV1:hc,ContextScoutFeedbackV1:hl,ContextScoutLimitsV1:hp,ContextScoutModelBackendV1:hu,ContextScoutModelOutcomeV1:hm,ContextScoutModelReceiptV1:hf,ContextScoutRecentDeliveryV1:hh,ContextScoutRecentResultV1:{additionalProperties:!1,properties:{configuration_revision:{items:{format:"uint8",maximum:255,minimum:0,type:"integer"},maxItems:32,minItems:32,type:"array"},deliveries:{items:{$ref:"#/$defs/ContextScoutRecentDeliveryV1"},type:"array"},observed_at:{$ref:"#/$defs/UtcMicros"},omitted:{format:"uint",minimum:0,type:"integer"},pending:{items:{$ref:"#/$defs/ContextScoutSuggestionProjectionV1"},type:"array"}},required:["configuration_revision","observed_at","pending","deliveries","omitted"],type:"object"},ContextScoutRouteV1:hy,ContextScoutRuntimeModeV1:hg,ContextScoutServiceStateV1:h_,ContextScoutStatusResultV1:{additionalProperties:!1,properties:{active_suggestions:{format:"uint",minimum:0,type:"integer"},configuration_revision:{items:{format:"uint8",maximum:255,minimum:0,type:"integer"},maxItems:32,minItems:32,type:"array"},last_delivery_outcome:{anyOf:[{$ref:"#/$defs/ContextScoutDeliveryOutcomeV1"},{type:"null"}]},last_feedback:{anyOf:[{$ref:"#/$defs/ContextScoutFeedbackKindV1"},{type:"null"}]},last_model_outcome:{anyOf:[{$ref:"#/$defs/ContextScoutModelOutcomeV1"},{type:"null"}]},last_model_receipt:{anyOf:[{$ref:"#/$defs/ContextScoutModelReceiptV1"},{type:"null"}]},last_route:{anyOf:[{$ref:"#/$defs/ContextScoutRouteV1"},{type:"null"}]},last_suppression:{anyOf:[{$ref:"#/$defs/ContextScoutSuppressionV1"},{type:"null"}]},limits:{$ref:"#/$defs/ContextScoutLimitsV1"},mode:{$ref:"#/$defs/ContextScoutRuntimeModeV1"},model_path:{anyOf:[{$ref:"#/$defs/ContextScoutModelBackendV1"},{type:"null"}]},state:{$ref:"#/$defs/ContextScoutServiceStateV1"}},required:["configuration_revision","state","mode","limits","active_suggestions"],type:"object"},ContextScoutSuggestionProjectionV1:h$,ContextScoutSuppressionV1:hS,ContextScoutWorkV1:hk,ManifestDigest:gl,RetrievalAnchorId:_q,UtcMicros:vK},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{recent:{$ref:"#/$defs/ContextScoutRecentResultV1"},status:{$ref:"#/$defs/ContextScoutStatusResultV1"}},required:["status","recent"],title:"ContextScoutExplanationResultV1",type:"object"},{$defs:{ContextScoutAddressV1:f5,ContextScoutDeliveryOutcomeV1:ho,ContextScoutDeliveryReceiptV1:hn,ContextScoutFeedbackKindV1:hc,ContextScoutFeedbackV1:hl,UtcMicros:vK},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{address:{$ref:"#/$defs/ContextScoutAddressV1"},feedback:{$ref:"#/$defs/ContextScoutFeedbackV1"},idempotency_key:{type:"string"},receipt:{$ref:"#/$defs/ContextScoutDeliveryReceiptV1"}},required:["address","receipt","feedback","idempotency_key"],title:"ContextScoutFeedbackRequestV1",type:"object"},{$defs:{ConfigurationIdempotencyKey:fX,ConfigurationRevisionId:f0,ContextScoutAddressV1:f5},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{address:{$ref:"#/$defs/ContextScoutAddressV1"},expected_revision:{$ref:"#/$defs/ConfigurationRevisionId"},idempotency_key:{$ref:"#/$defs/ConfigurationIdempotencyKey"}},required:["address","expected_revision","idempotency_key"],title:"ContextScoutControlRequestV1",type:"object"},{$defs:{CodeGenerationId:fT,ContextScoutAddressV1:f5,ContextScoutCategoryV1:f8,ContextScoutDeliveryOutcomeV1:ho,ContextScoutDeliveryReceiptV1:hn,ContextScoutDeliveryWindowV1:ha,ContextScoutEvidenceAvailabilityV1:hs,ContextScoutEvidenceProjectionV1:hd,ContextScoutFeedbackKindV1:hc,ContextScoutFeedbackV1:hl,ContextScoutModelBackendV1:hu,ContextScoutModelOutcomeV1:hm,ContextScoutModelReceiptV1:hf,ContextScoutRecentDeliveryV1:hh,ContextScoutRouteV1:hy,ContextScoutSuggestionProjectionV1:h$,ContextScoutWorkV1:hk,ManifestDigest:gl,RetrievalAnchorId:_q,UtcMicros:vK},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{configuration_revision:{items:{format:"uint8",maximum:255,minimum:0,type:"integer"},maxItems:32,minItems:32,type:"array"},deliveries:{items:{$ref:"#/$defs/ContextScoutRecentDeliveryV1"},type:"array"},observed_at:{$ref:"#/$defs/UtcMicros"},omitted:{format:"uint",minimum:0,type:"integer"},pending:{items:{$ref:"#/$defs/ContextScoutSuggestionProjectionV1"},type:"array"}},required:["configuration_revision","observed_at","pending","deliveries","omitted"],title:"ContextScoutRecentResultV1",type:"object"},{$defs:{ContextScoutDeliveryOutcomeV1:ho,ContextScoutFeedbackKindV1:hc,ContextScoutLimitsV1:hp,ContextScoutModelBackendV1:hu,ContextScoutModelOutcomeV1:hm,ContextScoutModelReceiptV1:hf,ContextScoutRouteV1:hy,ContextScoutRuntimeModeV1:hg,ContextScoutServiceStateV1:h_,ContextScoutSuppressionV1:hS},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{active_suggestions:{format:"uint",minimum:0,type:"integer"},configuration_revision:{items:{format:"uint8",maximum:255,minimum:0,type:"integer"},maxItems:32,minItems:32,type:"array"},last_delivery_outcome:{anyOf:[{$ref:"#/$defs/ContextScoutDeliveryOutcomeV1"},{type:"null"}]},last_feedback:{anyOf:[{$ref:"#/$defs/ContextScoutFeedbackKindV1"},{type:"null"}]},last_model_outcome:{anyOf:[{$ref:"#/$defs/ContextScoutModelOutcomeV1"},{type:"null"}]},last_model_receipt:{anyOf:[{$ref:"#/$defs/ContextScoutModelReceiptV1"},{type:"null"}]},last_route:{anyOf:[{$ref:"#/$defs/ContextScoutRouteV1"},{type:"null"}]},last_suppression:{anyOf:[{$ref:"#/$defs/ContextScoutSuppressionV1"},{type:"null"}]},limits:{$ref:"#/$defs/ContextScoutLimitsV1"},mode:{$ref:"#/$defs/ContextScoutRuntimeModeV1"},model_path:{anyOf:[{$ref:"#/$defs/ContextScoutModelBackendV1"},{type:"null"}]},state:{$ref:"#/$defs/ContextScoutServiceStateV1"}},required:["configuration_revision","state","mode","limits","active_suggestions"],title:"ContextScoutStatusResultV1",type:"object"},{$defs:{CouplingDirectionV1:hR},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{direction:{anyOf:[{$ref:"#/$defs/CouplingDirectionV1"},{type:"null"}],description:"fan_in: files depended on by the most others. fan_out: files that\ndepend on the most others (default: fan_in)."},limit:{description:"Maximum number of results to return (default: 10, at most 100).",format:"uint32",minimum:0,type:["integer","null"]},path:{description:"Filter to files under this directory path (e.g. 'src/main/java').",type:["string","null"]}},title:"CouplingSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fE,CodeIndexConvergenceParkedV1:fA,CodeIndexStalenessStateV1:fz,CouplingDirectionV1:hR,CouplingEntryV1:{additionalProperties:!1,properties:{coupled_files:{format:"uint64",minimum:0,type:"integer"},file:{type:"string"}},required:["file","coupled_files"],type:"object"},PrimitiveFreshnessStateV1:gG,PrimitiveIndexingStateV1:gB,PrimitiveSearchFreshnessV1:gQ},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{direction:{$ref:"#/$defs/CouplingDirectionV1"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},ranking:{items:{$ref:"#/$defs/CouplingEntryV1"},type:"array"},result_count:{format:"uint64",minimum:0,type:"integer"}},required:["direction","result_count","ranking"],title:"CouplingResultV1",type:"object"},{$defs:{DashboardActionV1:{description:"What `tracedecay_dashboard` does.",enum:["start","stop"],type:"string"}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{action:{anyOf:[{$ref:"#/$defs/DashboardActionV1"},{type:"null"}],description:'Action to perform (default: "start"). "stop" shuts down a previously\nstarted dashboard if any.'},host:{description:'Loopback host address to bind: 127.0.0.1, localhost, or ::1\n(default: "127.0.0.1"). Wildcard, LAN, public IPs, and other\nhostnames are rejected.',type:["string","null"]},port:{description:"Port to listen on; 0 picks an ephemeral port (default: 7341).",format:"uint16",maximum:65535,minimum:0,type:["integer","null"]}},title:"DashboardSurfaceRequestV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",oneOf:[{additionalProperties:!1,properties:{host:{type:"string"},port:{format:"uint16",maximum:65535,minimum:0,type:"integer"},status:{const:"started",type:"string"},url:{type:"string"}},required:["status","url","host","port"],type:"object"},{additionalProperties:!1,description:"A dashboard that was already bound when `start` was asked again.",properties:{host:{type:"string"},port:{format:"uint16",maximum:65535,minimum:0,type:"integer"},requested_host:{type:"string"},requested_port:{format:"uint16",maximum:65535,minimum:0,type:"integer"},requested_port_honored:{description:"Whether the bound port is the one asked for (always true for 0).",type:"boolean"},status:{const:"already_running",type:"string"},url:{type:"string"}},required:["status","url","host","port","requested_host","requested_port","requested_port_honored"],type:"object"},{additionalProperties:!1,description:"The bound server is shutting down.",properties:{host:{type:"string"},port:{format:"uint16",maximum:65535,minimum:0,type:"integer"},requested_host:{type:"string"},requested_port:{format:"uint16",maximum:65535,minimum:0,type:"integer"},requested_port_honored:{description:"Whether the bound port is the one asked for (always true for 0).",type:"boolean"},status:{const:"stopping",type:"string"},url:{type:"string"}},required:["status","url","host","port","requested_host","requested_port","requested_port_honored"],type:"object"},{additionalProperties:!1,properties:{previous_url:{type:"string"},status:{const:"stopped",type:"string"}},required:["status","previous_url"],type:"object"},{additionalProperties:!1,properties:{status:{const:"not_running",type:"string"}},required:["status"],type:"object"}],title:"DashboardResultV1"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{include_public:{description:"When true, do NOT exclude pub items. Default false.",type:["boolean","null"]},kinds:{description:'Node kinds to check (default: ["function", "method"]).',items:{type:"string"},type:["array","null"]},limit:{description:"Maximum symbols to return (default: 100, max: 1000).",format:"uint32",minimum:0,type:["integer","null"]},path:{description:"Filter reported symbols to files under this directory path (e.g.\n'crates/tracedecay-mcp'). Omit for the entire codebase.",type:["string","null"]}},title:"DeadCodeSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fE,CodeIndexConvergenceParkedV1:fA,CodeIndexStalenessStateV1:fz,DeadCodeSymbolV1:{additionalProperties:!1,properties:{file:{type:"string"},id:{type:"string"},kind:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},name:{type:"string"},signature:{type:["string","null"]}},required:["id","name","kind","file","line"],type:"object"},PrimitiveFreshnessStateV1:gG,PrimitiveIndexingStateV1:gB,PrimitiveSearchFreshnessV1:gQ},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{dead_code_count:{format:"uint64",minimum:0,type:"integer"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},symbols:{items:{$ref:"#/$defs/DeadCodeSymbolV1"},type:"array"}},required:["dead_code_count","symbols"],title:"DeadCodeResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{limit:{description:"Maximum number of chains to return (default: 10, at most 100).",format:"uint32",minimum:0,type:["integer","null"]},path:{description:"Filter to files under this directory path.",type:["string","null"]}},title:"DependencyDepthSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fE,CodeIndexConvergenceParkedV1:fA,CodeIndexStalenessStateV1:fz,DependencyDepthChainV1:{additionalProperties:!1,properties:{chain:{items:{type:"string"},type:"array"},depth:{format:"uint64",minimum:0,type:"integer"},file:{type:"string"}},required:["file","depth","chain"],type:"object"},PrimitiveFreshnessStateV1:gG,PrimitiveIndexingStateV1:gB,PrimitiveSearchFreshnessV1:gQ},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"`ideal_depth` is `ceil(log2(file_count))`.",properties:{chains:{items:{$ref:"#/$defs/DependencyDepthChainV1"},type:"array"},depth_score:{format:"double",type:"number"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},ideal_depth:{format:"uint64",minimum:0,type:"integer"},max_depth:{format:"uint64",minimum:0,type:"integer"}},required:["max_depth","ideal_depth","depth_score","chains"],title:"DependencyDepthResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Addresses indexed symbols by node id or by qualified name; the node id\nwins when both are present.",properties:{node_id:{description:"Look up a single node by its ID instead of qualified_name.",type:["string","null"]},qualified_name:{description:"The exact qualified name (or short name) to look up.",type:["string","null"]}},title:"SymbolSelectorSurfaceRequestV1",type:"object"},{$defs:{DeriveAnnotationV1:{additionalProperties:!1,properties:{evidence_class:{$ref:"#/$defs/DeriveEvidenceClassV1"},name:{type:"string"},unavailable_fields:{items:{type:"string"},type:"array"}},required:["name","evidence_class","unavailable_fields"],type:"object"},DeriveEvidenceClassV1:{description:"How a derive name is known: read from the declaration's attributes, not\nfrom macro expansion.",enum:["syntax_exact"],type:"string"},DerivesSymbolV1:{additionalProperties:!1,properties:{derives:{items:{$ref:"#/$defs/DeriveAnnotationV1"},type:"array"},file:{type:"string"},kind:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},name:{type:"string"},node_id:{type:"string"},qualified_name:{type:"string"}},required:["node_id","name","qualified_name","kind","file","line","derives"],type:"object"}},$schema:"https://json-schema.org/draft/2020-12/schema",description:"Derive annotations of every addressed symbol; empty when no symbol matched.",items:{$ref:"#/$defs/DerivesSymbolV1"},title:"DerivesResultV1",type:"array"},{$defs:{DiagnoseSeverityFilterV1:{description:"Compiler severity the diagnose report keeps.",enum:["error","warning","all"],type:"string"}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{cargo_output:{description:"Raw stderr text from `cargo check` / `cargo clippy` / `rustc`.",type:"string"},include_callers:{description:"Attach up to 5 callers per diagnostic (default: true).",type:["boolean","null"]},max_diagnostics:{description:"Cap on diagnostics in the response (default: 50, at most 500).",format:"uint32",minimum:0,type:["integer","null"]},severity:{anyOf:[{$ref:"#/$defs/DiagnoseSeverityFilterV1"},{type:"null"}],description:"Filter by severity (default: all)."}},required:["cargo_output"],title:"DiagnoseSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fE,CodeIndexConvergenceParkedV1:fA,CodeIndexStalenessStateV1:fz,DiagnoseItemV1:{additionalProperties:!1,properties:{callers:{description:"Absent when the request turned caller attachment off.",items:{$ref:"#/$defs/DiagnoseSymbolV1"},type:["array","null"]},code:{type:["string","null"]},column:{format:"uint32",minimum:0,type:"integer"},file:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},message:{type:"string"},node:{anyOf:[{$ref:"#/$defs/DiagnoseSymbolV1"},{type:"null"}]},severity:{$ref:"#/$defs/DiagnoseSeverityV1"}},required:["severity","message","file","line","column"],type:"object"},DiagnosePublicationV1:{description:"Outcome of publishing the parsed diagnostics into the managed store.",oneOf:[{additionalProperties:!1,properties:{reason:{type:"string"},status:{const:"skipped",type:"string"},unresolved:{items:{type:"string"},type:["array","null"]}},required:["status","reason"],type:"object"},{additionalProperties:!1,properties:{cleared:{format:"uint64",minimum:0,type:"integer"},generation:{type:"string"},inserted:{format:"uint64",minimum:0,type:"integer"},publication_revision:{format:"uint64",minimum:0,type:"integer"},rejected:{items:{type:"string"},type:"array"},status:{const:"published",type:"string"},unresolved:{items:{type:"string"},type:"array"}},required:["status","generation","publication_revision","inserted","cleared","unresolved","rejected"],type:"object"},{additionalProperties:!1,properties:{reason:{type:"string"},status:{const:"failed",type:"string"}},required:["status","reason"],type:"object"}]},DiagnoseSeverityV1:{description:"Severity of one parsed compiler diagnostic.",enum:["error","warning","note","help"],type:"string"},DiagnoseSymbolV1:{additionalProperties:!1,description:"The graph symbol a diagnostic line falls in, or one of its callers.",properties:{end_line:{format:"uint32",minimum:0,type:"integer"},file:{type:"string"},kind:{type:"string"},line:{description:"One-based display line.",format:"uint32",minimum:0,type:"integer"},name:{type:"string"},node_id:{type:"string"},qualified_name:{type:"string"},start_line:{format:"uint32",minimum:0,type:"integer"}},required:["node_id","name","kind","qualified_name","file","line","start_line","end_line"],type:"object"},PrimitiveFreshnessStateV1:gG,PrimitiveIndexingStateV1:gB,PrimitiveSearchFreshnessV1:gQ},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{diagnostics:{items:{$ref:"#/$defs/DiagnoseItemV1"},type:"array"},diagnostics_parsed:{format:"uint64",minimum:0,type:"integer"},diagnostics_returned:{format:"uint64",minimum:0,type:"integer"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},mapped_to_node:{format:"uint64",minimum:0,type:"integer"},published:{$ref:"#/$defs/DiagnosePublicationV1"},truncated:{type:"boolean"},unmapped:{format:"uint64",minimum:0,type:"integer"}},required:["diagnostics_parsed","diagnostics_returned","mapped_to_node","unmapped","truncated","published","diagnostics"],title:"DiagnoseResultV1",type:"object"},{$defs:{DiagnosticsPrimitiveScope:{oneOf:[{enum:["workspace"],type:"string"},{additionalProperties:!1,properties:{package:{type:"string"}},required:["package"],type:"object"},{additionalProperties:!1,properties:{file:{type:"string"}},required:["file"],type:"object"}]}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{cursor:{default:null,type:["string","null"]},maximum_diagnostics:{format:"uint32",minimum:0,type:"integer"},scope:{$ref:"#/$defs/DiagnosticsPrimitiveScope"}},required:["scope","maximum_diagnostics"],title:"DiagnosticsPrimitiveRequest",type:"object"},{$defs:{CodeGenerationId:fT,CommitId:fH,ComponentVersion:fJ,ContentDigest:f6,DiagnosticEvidenceClassV1:{description:"Evidence class for one diagnostic record. Evidence class is part of\ncanonical diagnostic identity.",oneOf:[{const:"observed_current",description:"Directly observed against the exact clean generation it names.",type:"string"},{const:"producer_reported",description:"Reported by the cataloged producer for the exact clean generation.",type:"string"},{const:"derived_structural",description:"Derived from TraceDecay structural/graph analysis of the generation.",type:"string"},{const:"unknown_unsupported",description:"The evidence class cannot be established; the record is retained for\naudit but must not be treated as current truth.",type:"string"}]},DiagnosticPrimitiveRecord:{additionalProperties:!1,properties:{diagnostic:{$ref:"#/$defs/GenerationDiagnosticV1"},logical_path:{type:"string"}},required:["logical_path","diagnostic"],type:"object"},DiagnosticProducerKindV1:{description:"The cataloged producer kinds that may publish durable diagnostics.\nRuntime, storage, migration,\nconfiguration, session, or daemon-health findings without a truthful\nsource range are Doctor or application findings and never become\n`GenerationDiagnosticV1` records.",enum:["upstream_compiler","language_server","tracedecay_structural","tracedecay_graph_integrity","tracedecay_policy","tracedecay_code_health","generation_consistency","authorized_external_analyzer"],type:"string"},DiagnosticProvenanceV1:{additionalProperties:!1,description:"Producer provenance for one diagnostic. Diagnostic identity includes\nproducer provenance: identical findings from the same logical producer and\nrevision collapse; findings from distinct producers remain distinct.",properties:{analyzer_revision:{$ref:"#/$defs/ComponentVersion"},configuration_revision:{$ref:"#/$defs/ComponentVersion"},producer:{$ref:"#/$defs/ProviderId"},producer_kind:{$ref:"#/$defs/DiagnosticProducerKindV1"},sanitization_receipt:{anyOf:[{$ref:"#/$defs/SanitizationReceiptId"},{type:"null"}]}},required:["producer_kind","producer","analyzer_revision","configuration_revision"],type:"object"},DiagnosticRecordStateV1:{description:"Current-vs-stale typing for a durable diagnostic record. Publication is\nversion-monotone: a newer clean generation clears the prior publication\ndeterministically, and stale findings cannot cross snapshots.\nStale and historical records remain queryable through\napplication APIs but are excluded from active publication.",oneOf:[{description:"Current for exactly the clean generation named by the record.",properties:{kind:{const:"current",type:"string"}},required:["kind"],type:"object"},{description:"A clean generation completed and deterministically removed this\nfinding (resolution, deletion, source-revision drift, or content or\ngeneration change).",properties:{cleared_in_generation:{$ref:"#/$defs/CodeGenerationId"},kind:{const:"cleared",type:"string"}},required:["kind","cleared_in_generation"],type:"object"}]},DiagnosticSeverityV1:hC,FileOccurrenceId:yu,GenerationDiagnosticV1:{additionalProperties:!1,description:"One durable, generation-bound diagnostic record. Its diagnostic payload,\nscope, and producer provenance form observation identity; the display\nmessage remains sanitized product data.",properties:{code:{description:"Stable producer diagnostic code (for example `E0308`).",type:"string"},collected_at:{$ref:"#/$defs/UtcMicros",description:"Time the server first accepted this evidence observation. Compiler\noutput does not carry a trustworthy producer capture time, and an exact\nsemantic replay retains the first accepted value."},content_digest:{$ref:"#/$defs/ContentDigest",description:"Content digest of the attached file inside the generation."},diagnostic_anchor:{$ref:"#/$defs/RetrievalAnchorId",description:"Retrieval anchor addressing this record. The code index's\n`GenerationDiagnosticAttachmentV1::diagnostic_anchor` points here."},evidence_class:{$ref:"#/$defs/DiagnosticEvidenceClassV1"},file_occurrence_id:{$ref:"#/$defs/FileOccurrenceId",description:"Canonical file identity the diagnostic attaches to."},generation_id:{$ref:"#/$defs/CodeGenerationId",description:"The immutable clean code-intelligence generation this record is bound\nto. Findings never cross generations."},message:{description:"Sanitized display message; bounded by [`MAX_DIAGNOSTIC_MESSAGE_BYTES`].",type:"string"},message_digest:{$ref:"#/$defs/ManifestDigest",description:"Integrity digest over the sanitized message."},provenance:{$ref:"#/$defs/DiagnosticProvenanceV1"},reference:{anyOf:[{$ref:"#/$defs/RefId"},{type:"null"}]},repository:{$ref:"#/$defs/RepositoryId"},severity:{$ref:"#/$defs/DiagnosticSeverityV1"},source_revision:{anyOf:[{$ref:"#/$defs/CommitId"},{type:"null"}]},span:{$ref:"#/$defs/SourceSpan",description:"Range encoding inside the sanitized file (byte range; mutable line\nnumbers are never identity)."},state:{$ref:"#/$defs/DiagnosticRecordStateV1",description:"Current-vs-stale typing; publication is version-monotone."},symbol_occurrence_id:{anyOf:[{$ref:"#/$defs/SymbolOccurrenceId"},{type:"null"}],description:"Enclosing symbol occurrence, when exact attachment is possible."},worktree:{anyOf:[{$ref:"#/$defs/WorktreeId"},{type:"null"}]}},required:["diagnostic_anchor","generation_id","repository","file_occurrence_id","content_digest","span","code","severity","message","message_digest","provenance","evidence_class","collected_at","state"],type:"object"},ManifestDigest:gl,ProviderId:_i,RefId:_u,RepositoryId:_v,RetrievalAnchorId:_q,SanitizationReceiptId:{description:"Strongly typed canonical identity: `SanitizationReceiptId`.",type:"string"},SourceSpan:vb,SymbolOccurrenceId:vV,UtcMicros:vK,WorktreeId:$M},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{clean_generation:{type:"boolean"},diagnostics:{items:{$ref:"#/$defs/DiagnosticPrimitiveRecord"},type:"array"},findings_cleared:{type:"boolean"},generation_id:{$ref:"#/$defs/CodeGenerationId"},next_cursor:{type:["string","null"]}},required:["generation_id","clean_generation","findings_cleared","diagnostics"],title:"DiagnosticsPrimitiveResult",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{budget_tokens:{description:"Cap the symbol, test, and co-change sections at about this many tokens.",format:"uint32",minimum:0,type:["integer","null"]},depth:{description:"Maximum impact traversal depth (default: 2, at most 10).",format:"uint32",minimum:0,type:["integer","null"]},files:{description:"List of changed file paths.",items:{type:"string"},type:"array"}},required:["files"],title:"DiffContextSurfaceRequestV1",type:"object"},{$defs:{CoChangeUnavailableV1:fj,CodeIndexBuildBlockedReasonV1:fE,CodeIndexConvergenceParkedV1:fA,CodeIndexStalenessStateV1:fz,GitContextSymbolV1:y$,IncompatibleCallSiteV1:{additionalProperties:!1,description:"A call site whose argument count cannot invoke the new parameter list.",properties:{arguments:{format:"uint32",minimum:0,type:"integer"},file:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},name:{type:"string"}},required:["name","file","line","arguments"],type:"object"},MissingCoChangePartnerV1:gw,PrimitiveFreshnessStateV1:gG,PrimitiveIndexingStateV1:gB,PrimitiveSearchFreshnessV1:gQ,SignatureEditStatusV1:{description:"How a modified function's parameter list compares with HEAD.",enum:["contract_change"],type:"string"},SignatureEditV1:{additionalProperties:!1,description:"A Rust free function whose parameter count differs from HEAD.",properties:{file:{type:"string"},incompatible:{items:{$ref:"#/$defs/IncompatibleCallSiteV1"},type:"array"},new_parameters:{format:"uint32",minimum:0,type:["integer","null"]},old_parameters:{format:"uint32",minimum:0,type:["integer","null"]},status:{$ref:"#/$defs/SignatureEditStatusV1"},symbol:{type:"string"}},required:["symbol","file","status","incompatible"],type:"object"},TestGateV1:{additionalProperties:!1,description:"Whether tests reach the symbols in a diff's blast radius.\n\n`pass` and exit 0 when every counted symbol is reached. `fail` and exit 4\nname the ones that are not. `incomplete` and exit 0 mean the caller walk\nstopped before that absence is known.",properties:{exit_code:{format:"uint8",maximum:255,minimum:0,type:"integer"},untested:{items:{type:"string"},type:"array"},verdict:{type:"string"}},required:["verdict","exit_code","untested"],type:"object"},TokenBudgetCutV1:vz,TokenBudgetSectionV1:vD},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{affected_tests:{items:{type:"string"},type:"array"},changed_files:{items:{type:"string"},type:"array"},co_change_unavailable:{anyOf:[{$ref:"#/$defs/CoChangeUnavailableV1"},{type:"null"}],description:"Present when Git history could not be mined for co-change partners."},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},impact_complete:{description:"False when the impact walk stopped at its depth or budget with callers\nstill unexplored.",type:"boolean"},impacted_symbols:{items:{$ref:"#/$defs/GitContextSymbolV1"},type:"array"},impacted_symbols_count:{format:"uint",minimum:0,type:"integer"},missing_co_change_partners:{description:"Files that usually change with a changed file, per bounded Git\nhistory, but are absent from this change set.",items:{$ref:"#/$defs/MissingCoChangePartnerV1"},type:"array"},modified_symbols:{items:{$ref:"#/$defs/GitContextSymbolV1"},type:"array"},signature_edits:{description:"Rust free functions whose parameter count changed since HEAD, with the\ncall sites that list cannot accept. Omitted when nothing changed.",items:{$ref:"#/$defs/SignatureEditV1"},type:"array"},test_gate:{$ref:"#/$defs/TestGateV1",description:"Symbols in this diff that no test reaches, and the verdict a CLI exits on."},token_budget:{anyOf:[{$ref:"#/$defs/TokenBudgetCutV1"},{type:"null"}],description:"Budget accounting when the request supplies `budget_tokens`."}},required:["changed_files","modified_symbols","impacted_symbols_count","impacted_symbols","impact_complete","affected_tests","missing_co_change_partners","test_gate"],title:"DiffContextResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{limit:{description:"Maximum number of files in the per-file breakdown, highest node count\nfirst (default: 100, max: 1000). Ignored when summary is true; the\nresponse states total_file_count and omitted_file_count.",format:"uint32",minimum:0,type:["integer","null"]},path:{description:"Directory or file path prefix to filter (e.g.\n'src/main/java/com/example'). Omit for entire codebase.",type:["string","null"]},summary:{description:"If true, aggregate counts across all matching files instead of\nper-file breakdown (default: false).",type:["boolean","null"]}},title:"DistributionSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fE,CodeIndexConvergenceParkedV1:fA,CodeIndexStalenessStateV1:fz,DistributionFileV1:{additionalProperties:!1,properties:{file:{type:"string"},kinds:{items:{$ref:"#/$defs/DistributionKindCountV1"},type:"array"}},required:["file","kinds"],type:"object"},DistributionKindCountV1:{additionalProperties:!1,properties:{count:{format:"uint64",minimum:0,type:"integer"},kind:{type:"string"}},required:["kind","count"],type:"object"},PrimitiveFreshnessStateV1:gG,PrimitiveIndexingStateV1:gB,PrimitiveSearchFreshnessV1:gQ},$schema:"https://json-schema.org/draft/2020-12/schema",description:"Flattening the tagged view keeps `path_filter` ahead of `mode` on the\nwire; serde cannot deny unknown fields through a flattened member.",oneOf:[{properties:{distribution:{items:{$ref:"#/$defs/DistributionKindCountV1"},type:"array"},mode:{const:"summary",type:"string"},total_kinds:{format:"uint64",minimum:0,type:"integer"}},required:["mode","total_kinds","distribution"],type:"object"},{properties:{file_count:{format:"uint64",minimum:0,type:"integer"},files:{items:{$ref:"#/$defs/DistributionFileV1"},type:"array"},mode:{const:"per_file",type:"string"},omitted_file_count:{format:"uint64",minimum:0,type:"integer"},total_file_count:{format:"uint64",minimum:0,type:"integer"}},required:["mode","file_count","total_file_count","omitted_file_count","files"],type:"object"}],properties:{freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},path_filter:{type:["string","null"]}},title:"DistributionResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{limit:{description:"Maximum number of results to return (default: 50, at most 500).",format:"uint32",minimum:0,type:["integer","null"]},path:{description:"Directory or file path prefix to filter (e.g. 'src/main'). Omit for\nentire codebase.",type:["string","null"]}},title:"DocCoverageSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fE,CodeIndexConvergenceParkedV1:fA,CodeIndexStalenessStateV1:fz,DocCoverageFileV1:{additionalProperties:!1,properties:{count:{format:"uint64",minimum:0,type:"integer"},file:{type:"string"},symbols:{items:{$ref:"#/$defs/DocCoverageSymbolV1"},type:"array"}},required:["file","count","symbols"],type:"object"},DocCoverageSymbolV1:{additionalProperties:!1,properties:{id:{type:"string"},kind:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},name:{type:"string"},signature:{type:["string","null"]}},required:["id","name","kind","line"],type:"object"},PrimitiveFreshnessStateV1:gG,PrimitiveIndexingStateV1:gB,PrimitiveSearchFreshnessV1:gQ},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{complete:{type:"boolean"},file_count:{format:"uint64",minimum:0,type:"integer"},files:{items:{$ref:"#/$defs/DocCoverageFileV1"},type:"array"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},limit:{format:"uint64",minimum:0,type:"integer"},omitted_count:{format:"uint64",minimum:0,type:"integer"},path_filter:{type:["string","null"]},returned_count:{format:"uint64",minimum:0,type:"integer"},total_undocumented:{format:"uint64",minimum:0,type:"integer"}},required:["total_undocumented","returned_count","omitted_count","complete","limit","file_count","files"],title:"DocCoverageResultV1",type:"object"},{$defs:{DsmShapeV1:hO},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{max_files:{description:"Maximum files in matrix format (default: 30, at most 200).",format:"uint32",minimum:0,type:["integer","null"]},path:{description:"Filter to files under this directory path.",type:["string","null"]},shape:{anyOf:[{$ref:"#/$defs/DsmShapeV1"},{type:"null"}],description:"DSM data shape: stats, clusters, or matrix (default: stats)."}},title:"DsmSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fE,CodeIndexConvergenceParkedV1:fA,CodeIndexStalenessStateV1:fz,DsmClusterV1:{additionalProperties:!1,properties:{boundary_edges:{format:"uint64",minimum:0,type:"integer"},directory:{type:"string"},file_count:{format:"uint64",minimum:0,type:"integer"},incoming_edges:{format:"uint64",minimum:0,type:"integer"},internal_edges:{format:"uint64",minimum:0,type:"integer"},outgoing_edges:{format:"uint64",minimum:0,type:"integer"}},required:["directory","file_count","internal_edges","outgoing_edges","incoming_edges","boundary_edges"],type:"object"},DsmMatrixV1:{additionalProperties:!1,properties:{files:{items:{type:"string"},type:"array"},matrix:{items:{items:{format:"uint8",maximum:255,minimum:0,type:"integer"},type:"array"},type:"array"},note:{type:"string"}},required:["files","matrix","note"],type:"object"},DsmShapeV1:hO,DsmStatsV1:{additionalProperties:!1,properties:{clusters:{format:"uint64",minimum:0,type:"integer"},density:{format:"double",type:"number"},edges:{format:"uint64",minimum:0,type:"integer"},files:{format:"uint64",minimum:0,type:"integer"},largest_cluster:{format:"uint64",minimum:0,type:"integer"}},required:["files","edges","density","clusters","largest_cluster"],type:"object"},PrimitiveFreshnessStateV1:gG,PrimitiveIndexingStateV1:gB,PrimitiveSearchFreshnessV1:gQ},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{clusters:{items:{$ref:"#/$defs/DsmClusterV1"},type:"array"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},matrix:{anyOf:[{$ref:"#/$defs/DsmMatrixV1"},{type:"null"}]},shape:{$ref:"#/$defs/DsmShapeV1"},stats:{$ref:"#/$defs/DsmStatsV1"}},required:["shape","stats","clusters"],title:"DsmResultV1",type:"object"},{$defs:{FactEventId:hH,FactFeedbackActionV1:hG,FactId:hB,MemoryScopeV1:gu,ProjectId:g2},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{action:{$ref:"#/$defs/FactFeedbackActionV1"},expected_last_event_id:{anyOf:[{$ref:"#/$defs/FactEventId"},{type:"null"}]},fact_id:{$ref:"#/$defs/FactId"},memory_scope:{anyOf:[{$ref:"#/$defs/MemoryScopeV1"},{type:"null"}]},project_selector:{additionalProperties:!1,description:'Exact registered-project selector. Reads and fact effects run against the\nselected project.\n\nInlined so every request schema advertises the closed selector contract\n(`required: ["project_id"]`, no additional properties) directly on its\n`project_selector` property instead of behind a `$defs` reference, matching\nthe selector shape the MCP dispatch policy promises for selector-accepting\ntools.',properties:{project_id:{$ref:"#/$defs/ProjectId"}},required:["project_id"],type:["object","null"]},reason:{type:["string","null"]},source_label:{type:["string","null"]}},required:["fact_id","action"],title:"FactFeedbackRequestV1",type:"object"},{$defs:{FactAssertionId:hz,FactCategoryV1:hD,FactCommitDispositionV1:hF,FactCommitOwnerV1:hL,FactCommitReceiptV1:hU,FactEventId:hH,FactFeedbackActionV1:hG,FactFeedbackV1:{additionalProperties:!1,properties:{action:{$ref:"#/$defs/FactFeedbackActionV1"},event_id:{$ref:"#/$defs/FactEventId"},fact_id:{$ref:"#/$defs/FactId"},helpful_count:{format:"uint64",minimum:0,type:"integer"},new_trust_millionths:{format:"uint32",minimum:0,type:"integer"},old_trust_millionths:{format:"uint32",minimum:0,type:"integer"},trust_delta_millionths:{format:"int32",type:"integer"},unhelpful_count:{format:"uint64",minimum:0,type:"integer"}},required:["event_id","fact_id","action","old_trust_millionths","new_trust_millionths","trust_delta_millionths","helpful_count","unhelpful_count"],type:"object"},FactId:hB,FactIdentitySourceResultV1:hK,FactPayloadAccessV1:hJ,FactProjectionV1:hZ,FactStatusV1:h0,FactTelemetryV1:h2,FactV1:h4,LocatorDigest:gr,ProjectId:g2,ProvenanceId:_t,RetrievalAnchorId:_q,UtcMicros:vK},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{commit:{$ref:"#/$defs/FactCommitReceiptV1"},fact:{$ref:"#/$defs/FactProjectionV1"},feedback:{$ref:"#/$defs/FactFeedbackV1"}},required:["fact","feedback","commit"],title:"FactFeedbackResultV1",type:"object"},{$defs:{FactCategoryV1:hD,MemoryScopeV1:gu,ProjectId:g2},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{category:{anyOf:[{$ref:"#/$defs/FactCategoryV1"},{type:"null"}]},content:{type:"string"},entities:{default:[],items:{type:"string"},type:"array"},memory_scope:{anyOf:[{$ref:"#/$defs/MemoryScopeV1"},{type:"null"}]},metadata:{additionalProperties:!0,type:["object","null"]},project_selector:{additionalProperties:!1,description:'Exact registered-project selector. Reads and fact effects run against the\nselected project.\n\nInlined so every request schema advertises the closed selector contract\n(`required: ["project_id"]`, no additional properties) directly on its\n`project_selector` property instead of behind a `$defs` reference, matching\nthe selector shape the MCP dispatch policy promises for selector-accepting\ntools.',properties:{project_id:{$ref:"#/$defs/ProjectId"}},required:["project_id"],type:["object","null"]},source_label:{type:["string","null"]},tags:{default:[],items:{type:"string"},type:"array"},trust:{format:"double",type:["number","null"]}},required:["content"],title:"FactStoreAddRequestV1",type:"object"},{$defs:{FactAssertionId:hz,FactCategoryV1:hD,FactCommitDispositionV1:hF,FactCommitOwnerV1:hL,FactCommitReceiptV1:hU,FactEventId:hH,FactId:hB,FactIdentitySourceResultV1:hK,FactPayloadAccessV1:hJ,FactProjectionV1:hZ,FactStatusV1:h0,FactStoreAddCommitV1:{oneOf:[{additionalProperties:!1,properties:{commit:{$ref:"#/$defs/FactCommitReceiptV1"},disposition:{const:"added",type:"string"},fact:{$ref:"#/$defs/FactProjectionV1"}},required:["disposition","fact","commit"],type:"object"},{additionalProperties:!1,properties:{closest_fact_id:{$ref:"#/$defs/FactId"},commit:{$ref:"#/$defs/FactCommitReceiptV1"},disposition:{const:"near_duplicate",type:"string"},fact:{$ref:"#/$defs/FactProjectionV1"},similarity_millionths:{format:"uint32",minimum:0,type:"integer"}},required:["disposition","fact","closest_fact_id","similarity_millionths","commit"],type:"object"},{additionalProperties:!1,properties:{closest_fact_id:{$ref:"#/$defs/FactId"},commit:{$ref:"#/$defs/FactCommitReceiptV1"},disposition:{const:"possible_conflict",type:"string"},fact:{$ref:"#/$defs/FactProjectionV1"},similarity_millionths:{format:"uint32",minimum:0,type:"integer"}},required:["disposition","fact","closest_fact_id","similarity_millionths","commit"],type:"object"}]},FactTelemetryV1:h2,FactV1:h4,LocatorDigest:gr,ProjectId:g2,ProvenanceId:_t,RetrievalAnchorId:_q,UtcMicros:vK},$schema:"https://json-schema.org/draft/2020-12/schema",oneOf:[{additionalProperties:!1,properties:{outcome:{const:"secret_rejected",type:"string"}},required:["outcome"],type:"object"},{additionalProperties:!1,properties:{closest_fact_id:{$ref:"#/$defs/FactId"},fact:{$ref:"#/$defs/FactProjectionV1"},outcome:{const:"normalized_duplicate",type:"string"}},required:["outcome","fact","closest_fact_id"],type:"object"},{additionalProperties:!1,properties:{outcome:{const:"committed",type:"string"},result:{$ref:"#/$defs/FactStoreAddCommitV1"}},required:["outcome","result"],type:"object"}],title:"FactStoreAddResultV1"},{$defs:{FactCategoryV1:hD,MemoryScopeV1:gu,ProjectId:g2},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{category:{anyOf:[{$ref:"#/$defs/FactCategoryV1"},{type:"null"}]},limit:{format:"uint64",minimum:0,type:["integer","null"]},memory_scope:{anyOf:[{$ref:"#/$defs/MemoryScopeV1"},{type:"null"}]},project_selector:{additionalProperties:!1,description:'Exact registered-project selector. Reads and fact effects run against the\nselected project.\n\nInlined so every request schema advertises the closed selector contract\n(`required: ["project_id"]`, no additional properties) directly on its\n`project_selector` property instead of behind a `$defs` reference, matching\nthe selector shape the MCP dispatch policy promises for selector-accepting\ntools.',properties:{project_id:{$ref:"#/$defs/ProjectId"}},required:["project_id"],type:["object","null"]},threshold_millionths:{format:"uint32",minimum:0,type:["integer","null"]}},title:"FactStoreContradictRequestV1",type:"object"},{$defs:{FactAssertionId:hz,FactCategoryV1:hD,FactCommitOwnerV1:hL,FactContradictionV1:{additionalProperties:!1,properties:{existing_fact:{$ref:"#/$defs/FactV1"},new_content:{type:"string"},score_millionths:{format:"uint32",minimum:0,type:"integer"},why:{type:["string","null"]}},required:["existing_fact","new_content","score_millionths"],type:"object"},FactEventId:hH,FactId:hB,FactIdentitySourceResultV1:hK,FactTelemetryV1:h2,FactV1:h4,LocatorDigest:gr,ProjectId:g2,ProvenanceId:_t,RetrievalAnchorId:_q,UtcMicros:vK},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{contradictions:{items:{$ref:"#/$defs/FactContradictionV1"},type:"array"},owner:{$ref:"#/$defs/FactCommitOwnerV1"}},required:["owner","contradictions"],title:"FactStoreContradictResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Closed public launcher for the automatic Memory Curator.\n\nRun identity, task selection, operations, proposals, approval, and apply\nauthority are deliberately absent and rejected by `deny_unknown_fields`.",properties:{fact_review_limit:{default:24,format:"uint32",maximum:1e3,minimum:1,type:"integer"},min_confidence_millionths:{default:72e4,format:"uint32",maximum:1e6,minimum:0,type:"integer"}},title:"FactStoreCurateRequestV1",type:"object"},{$defs:{AutomationTaskV1:{description:"Automation capability selected after one registered application admission.",enum:["memory_curator","session_reflector","skill_writer","combined_review","user_job"],type:"string"},FactStoreCurateStateV1:{description:"Lifecycle state a `fact_store_curate` receipt reports.",oneOf:[{const:"started",description:"The run was admitted and continues on the daemon.",type:"string"}]},ManifestDigest:gl,RunId:_z},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Receipt of one admitted automatic curation.\n\nThe curator runs on the daemon after this receipt is returned. Its terminal\nis the automation run ledger record for `run_id`, read with\n`automation_run_view`.",properties:{request_digest:{$ref:"#/$defs/ManifestDigest"},run_id:{$ref:"#/$defs/RunId"},state:{$ref:"#/$defs/FactStoreCurateStateV1"},task:{$ref:"#/$defs/AutomationTaskV1"}},required:["run_id","task","request_digest","state"],title:"FactStoreCurateResultV1",type:"object"},{$defs:{FactId:hB,MemoryScopeV1:gu,ProjectId:g2},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{fact_id:{$ref:"#/$defs/FactId"},memory_scope:{anyOf:[{$ref:"#/$defs/MemoryScopeV1"},{type:"null"}]},project_selector:{additionalProperties:!1,description:'Exact registered-project selector. Reads and fact effects run against the\nselected project.\n\nInlined so every request schema advertises the closed selector contract\n(`required: ["project_id"]`, no additional properties) directly on its\n`project_selector` property instead of behind a `$defs` reference, matching\nthe selector shape the MCP dispatch policy promises for selector-accepting\ntools.',properties:{project_id:{$ref:"#/$defs/ProjectId"}},required:["project_id"],type:["object","null"]}},required:["fact_id"],title:"FactStoreGetRequestV1",type:"object"},{$defs:{FactAssertionId:hz,FactCategoryV1:hD,FactCommitOwnerV1:hL,FactEventId:hH,FactFeedbackActionV1:hG,FactFeedbackDetailsAvailabilityV1:{enum:["available","redacted","unknown"],type:"string"},FactId:hB,FactIdentitySourceResultV1:hK,FactPayloadAccessV1:hJ,FactProjectionV1:hZ,FactStatusV1:h0,FactTelemetryV1:h2,FactV1:h4,LocatorDigest:gr,ProjectId:g2,ProvenanceId:_t,RetrievalAnchorId:_q,TrustHistoryEntryV1:{additionalProperties:!1,properties:{action:{$ref:"#/$defs/FactFeedbackActionV1"},details_availability:{$ref:"#/$defs/FactFeedbackDetailsAvailabilityV1"},event_id:{$ref:"#/$defs/FactEventId"},new_trust_millionths:{format:"uint32",minimum:0,type:"integer"},occurred_at:{$ref:"#/$defs/UtcMicros"},old_trust_millionths:{format:"uint32",minimum:0,type:"integer"},reason:{type:["string","null"]},source_label:{type:["string","null"]}},required:["event_id","occurred_at","action","old_trust_millionths","new_trust_millionths","details_availability"],type:"object"},UtcMicros:vK},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{fact:{$ref:"#/$defs/FactProjectionV1"},trust_history:{items:{$ref:"#/$defs/TrustHistoryEntryV1"},type:"array"}},required:["fact","trust_history"],title:"FactStoreGetResultV1",type:"object"},{$defs:{FactCategoryV1:hD,MemoryScopeV1:gu,ProjectId:g2},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{after:{description:"The previous page's `next_after`, valid only with the same parameters.",type:["string","null"]},category:{anyOf:[{$ref:"#/$defs/FactCategoryV1"},{type:"null"}]},limit:{format:"uint64",minimum:0,type:["integer","null"]},memory_scope:{anyOf:[{$ref:"#/$defs/MemoryScopeV1"},{type:"null"}]},min_trust:{format:"double",type:["number","null"]},project_selector:{additionalProperties:!1,description:'Exact registered-project selector. Reads and fact effects run against the\nselected project.\n\nInlined so every request schema advertises the closed selector contract\n(`required: ["project_id"]`, no additional properties) directly on its\n`project_selector` property instead of behind a `$defs` reference, matching\nthe selector shape the MCP dispatch policy promises for selector-accepting\ntools.',properties:{project_id:{$ref:"#/$defs/ProjectId"}},required:["project_id"],type:["object","null"]}},title:"FactStoreListRequestV1",type:"object"},{$defs:{FactAssertionId:hz,FactCategoryV1:hD,FactCommitOwnerV1:hL,FactEventId:hH,FactId:hB,FactIdentitySourceResultV1:hK,FactPayloadAccessV1:hJ,FactProjectionV1:hZ,FactStatusV1:h0,FactTelemetryV1:h2,FactV1:h4,LocatorDigest:gr,ProjectId:g2,ProvenanceId:_t,RetrievalAnchorId:_q,UtcMicros:vK},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{facts:{items:{$ref:"#/$defs/FactProjectionV1"},type:"array"},next_after:{description:"Opaque continuation, bound to this operation and request.",type:["string","null"]},owner:{$ref:"#/$defs/FactCommitOwnerV1"}},required:["owner","facts"],title:"FactStoreListResultV1",type:"object"},{$defs:{FactCategoryV1:hD,MemoryScopeV1:gu,ProjectId:g2},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{after:{description:"The previous page's `next_after`, valid only with the same parameters.",type:["string","null"]},category:{anyOf:[{$ref:"#/$defs/FactCategoryV1"},{type:"null"}]},entity:{type:"string"},limit:{format:"uint64",minimum:0,type:["integer","null"]},memory_scope:{anyOf:[{$ref:"#/$defs/MemoryScopeV1"},{type:"null"}]},min_trust:{format:"double",type:["number","null"]},project_selector:{additionalProperties:!1,description:'Exact registered-project selector. Reads and fact effects run against the\nselected project.\n\nInlined so every request schema advertises the closed selector contract\n(`required: ["project_id"]`, no additional properties) directly on its\n`project_selector` property instead of behind a `$defs` reference, matching\nthe selector shape the MCP dispatch policy promises for selector-accepting\ntools.',properties:{project_id:{$ref:"#/$defs/ProjectId"}},required:["project_id"],type:["object","null"]}},required:["entity"],title:"FactStoreProbeRequestV1",type:"object"},{$defs:{FactAssertionId:hz,FactCategoryV1:hD,FactCommitOwnerV1:hL,FactEventId:hH,FactId:hB,FactIdentitySourceResultV1:hK,FactSearchGraphCoverageV1:hQ,FactSearchGraphDegradationV1:hX,FactSearchHitV1:hY,FactSearchScoresV1:h1,FactTelemetryV1:h2,FactV1:h4,LocatorDigest:gr,ProjectId:g2,ProvenanceId:_t,RetrievalAnchorId:_q,UtcMicros:vK},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{graph_coverage:{$ref:"#/$defs/FactSearchGraphCoverageV1"},hits:{items:{$ref:"#/$defs/FactSearchHitV1"},type:"array"},next_after:{description:"Opaque continuation, bound to this operation and request.",type:["string","null"]},owner:{$ref:"#/$defs/FactCommitOwnerV1"}},required:["owner","hits","graph_coverage"],title:"FactStoreProbeResultV1",type:"object"},{$defs:{FactCategoryV1:hD,MemoryScopeV1:gu,ProjectId:g2},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{after:{description:"The previous page's `next_after`, valid only with the same parameters.",type:["string","null"]},category:{anyOf:[{$ref:"#/$defs/FactCategoryV1"},{type:"null"}]},entities:{items:{type:"string"},minItems:1,type:"array"},limit:{format:"uint64",minimum:0,type:["integer","null"]},memory_scope:{anyOf:[{$ref:"#/$defs/MemoryScopeV1"},{type:"null"}]},min_trust:{format:"double",type:["number","null"]},project_selector:{additionalProperties:!1,description:'Exact registered-project selector. Reads and fact effects run against the\nselected project.\n\nInlined so every request schema advertises the closed selector contract\n(`required: ["project_id"]`, no additional properties) directly on its\n`project_selector` property instead of behind a `$defs` reference, matching\nthe selector shape the MCP dispatch policy promises for selector-accepting\ntools.',properties:{project_id:{$ref:"#/$defs/ProjectId"}},required:["project_id"],type:["object","null"]}},required:["entities"],title:"FactStoreReasonRequestV1",type:"object"},{$defs:{FactAssertionId:hz,FactCategoryV1:hD,FactCommitOwnerV1:hL,FactEventId:hH,FactId:hB,FactIdentitySourceResultV1:hK,FactSearchGraphCoverageV1:hQ,FactSearchGraphDegradationV1:hX,FactSearchHitV1:hY,FactSearchScoresV1:h1,FactTelemetryV1:h2,FactV1:h4,LocatorDigest:gr,ProjectId:g2,ProvenanceId:_t,RetrievalAnchorId:_q,UtcMicros:vK},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{graph_coverage:{$ref:"#/$defs/FactSearchGraphCoverageV1"},hits:{items:{$ref:"#/$defs/FactSearchHitV1"},type:"array"},next_after:{description:"Opaque continuation, bound to this operation and request.",type:["string","null"]},owner:{$ref:"#/$defs/FactCommitOwnerV1"}},required:["owner","hits","graph_coverage"],title:"FactStoreReasonResultV1",type:"object"},{$defs:{FactCategoryV1:hD,MemoryScopeV1:gu,ProjectId:g2},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{after:{description:"The previous page's `next_after`, valid only with the same parameters.",type:["string","null"]},category:{anyOf:[{$ref:"#/$defs/FactCategoryV1"},{type:"null"}]},entity:{type:"string"},limit:{format:"uint64",minimum:0,type:["integer","null"]},memory_scope:{anyOf:[{$ref:"#/$defs/MemoryScopeV1"},{type:"null"}]},min_trust:{format:"double",type:["number","null"]},project_selector:{additionalProperties:!1,description:'Exact registered-project selector. Reads and fact effects run against the\nselected project.\n\nInlined so every request schema advertises the closed selector contract\n(`required: ["project_id"]`, no additional properties) directly on its\n`project_selector` property instead of behind a `$defs` reference, matching\nthe selector shape the MCP dispatch policy promises for selector-accepting\ntools.',properties:{project_id:{$ref:"#/$defs/ProjectId"}},required:["project_id"],type:["object","null"]}},required:["entity"],title:"FactStoreRelatedRequestV1",type:"object"},{$defs:{FactAssertionId:hz,FactCategoryV1:hD,FactCommitOwnerV1:hL,FactEventId:hH,FactId:hB,FactIdentitySourceResultV1:hK,FactSearchGraphCoverageV1:hQ,FactSearchGraphDegradationV1:hX,FactSearchHitV1:hY,FactSearchScoresV1:h1,FactTelemetryV1:h2,FactV1:h4,LocatorDigest:gr,ProjectId:g2,ProvenanceId:_t,RetrievalAnchorId:_q,UtcMicros:vK},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{graph_coverage:{$ref:"#/$defs/FactSearchGraphCoverageV1"},hits:{items:{$ref:"#/$defs/FactSearchHitV1"},type:"array"},next_after:{description:"Opaque continuation, bound to this operation and request.",type:["string","null"]},owner:{$ref:"#/$defs/FactCommitOwnerV1"}},required:["owner","hits","graph_coverage"],title:"FactStoreRelatedResultV1",type:"object"},{$defs:{FactEventId:hH,FactId:hB,MemoryScopeV1:gu,ProjectId:g2},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{expected_last_event_id:{anyOf:[{$ref:"#/$defs/FactEventId"},{type:"null"}]},fact_id:{$ref:"#/$defs/FactId"},memory_scope:{anyOf:[{$ref:"#/$defs/MemoryScopeV1"},{type:"null"}]},project_selector:{additionalProperties:!1,description:'Exact registered-project selector. Reads and fact effects run against the\nselected project.\n\nInlined so every request schema advertises the closed selector contract\n(`required: ["project_id"]`, no additional properties) directly on its\n`project_selector` property instead of behind a `$defs` reference, matching\nthe selector shape the MCP dispatch policy promises for selector-accepting\ntools.',properties:{project_id:{$ref:"#/$defs/ProjectId"}},required:["project_id"],type:["object","null"]}},required:["fact_id"],title:"FactStoreRemoveRequestV1",type:"object"},{$defs:{FactAssertionId:hz,FactCategoryV1:hD,FactCommitDispositionV1:hF,FactCommitOwnerV1:hL,FactCommitReceiptV1:hU,FactEventId:hH,FactId:hB,FactIdentitySourceResultV1:hK,FactPayloadAccessV1:hJ,FactProjectionV1:hZ,FactStatusV1:h0,FactTelemetryV1:h2,FactV1:h4,LocatorDigest:gr,ProjectId:g2,ProvenanceId:_t,RetrievalAnchorId:_q,UtcMicros:vK},$schema:"https://json-schema.org/draft/2020-12/schema",oneOf:[{additionalProperties:!1,properties:{commit:{$ref:"#/$defs/FactCommitReceiptV1"},fact:{$ref:"#/$defs/FactProjectionV1"},outcome:{const:"removed",type:"string"},remaining_fact_count:{format:"uint64",minimum:0,type:"integer"}},required:["outcome","fact","remaining_fact_count","commit"],type:"object"},{additionalProperties:!1,properties:{fact:{$ref:"#/$defs/FactProjectionV1"},outcome:{const:"already_removed",type:"string"},remaining_fact_count:{format:"uint64",minimum:0,type:"integer"}},required:["outcome","fact","remaining_fact_count"],type:"object"}],title:"FactStoreRemoveResultV1"},{$defs:{FactCategoryV1:hD,MemoryScopeV1:gu,ProjectId:g2},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{after:{description:"The previous page's `next_after`, valid only with the same parameters.",type:["string","null"]},category:{anyOf:[{$ref:"#/$defs/FactCategoryV1"},{type:"null"}]},limit:{format:"uint64",minimum:0,type:["integer","null"]},memory_scope:{anyOf:[{$ref:"#/$defs/MemoryScopeV1"},{type:"null"}]},min_trust:{format:"double",type:["number","null"]},project_selector:{additionalProperties:!1,description:'Exact registered-project selector. Reads and fact effects run against the\nselected project.\n\nInlined so every request schema advertises the closed selector contract\n(`required: ["project_id"]`, no additional properties) directly on its\n`project_selector` property instead of behind a `$defs` reference, matching\nthe selector shape the MCP dispatch policy promises for selector-accepting\ntools.',properties:{project_id:{$ref:"#/$defs/ProjectId"}},required:["project_id"],type:["object","null"]},query:{type:"string"}},required:["query"],title:"FactStoreSearchRequestV1",type:"object"},{$defs:{FactAssertionId:hz,FactCategoryV1:hD,FactCommitOwnerV1:hL,FactEventId:hH,FactId:hB,FactIdentitySourceResultV1:hK,FactRetrievalTelemetryDegradationV1:{enum:["unavailable","saturated"],type:"string"},FactRetrievalTelemetryV1:{description:"Whether an explicit search recorded retrieval telemetry for its hits.\n\nThe telemetry write is recall bookkeeping, not part of the returned\nevidence: when only that lane is unavailable the search still delivers its\nresult and reports the degradation here instead of refusing the read.",oneOf:[{additionalProperties:!1,description:"The result had no hits, so there was nothing to record.",properties:{kind:{const:"not_applicable",type:"string"}},required:["kind"],type:"object"},{additionalProperties:!1,description:"The selected store is mounted read-only; recording is never attempted.",properties:{kind:{const:"read_only",type:"string"}},required:["kind"],type:"object"},{additionalProperties:!1,properties:{fact_count:{format:"uint",minimum:0,type:"integer"},kind:{const:"recorded",type:"string"}},required:["kind","fact_count"],type:"object"},{additionalProperties:!1,properties:{kind:{const:"degraded",type:"string"},reason:{$ref:"#/$defs/FactRetrievalTelemetryDegradationV1"}},required:["kind","reason"],type:"object"}]},FactSearchGraphCoverageV1:hQ,FactSearchGraphDegradationV1:hX,FactSearchHitV1:hY,FactSearchScoresV1:h1,FactTelemetryV1:h2,FactV1:h4,LocatorDigest:gr,ProjectId:g2,ProvenanceId:_t,RetrievalAnchorId:_q,UtcMicros:vK},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Explicit search additionally records retrieval telemetry for its returned\nhits; `retrieval_telemetry` reports whether that recall bookkeeping\nhappened, so a served result can truthfully carry a degraded write lane.",properties:{graph_coverage:{$ref:"#/$defs/FactSearchGraphCoverageV1"},hits:{items:{$ref:"#/$defs/FactSearchHitV1"},type:"array"},next_after:{description:"Opaque continuation, bound to this operation and request.",type:["string","null"]},owner:{$ref:"#/$defs/FactCommitOwnerV1"},retrieval_telemetry:{$ref:"#/$defs/FactRetrievalTelemetryV1"}},required:["owner","hits","graph_coverage","retrieval_telemetry"],title:"FactStoreSearchResultV1",type:"object"},{$defs:{FactEventId:hH,FactId:hB,MemoryScopeV1:gu,ProjectId:g2},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Mark `fact_id` as superseded by `superseded_by`. The old fact leaves the\ndefault retrieval surfaces but stays readable by id through its history;\npayload and trust are never rewritten.",properties:{expected_last_event_id:{anyOf:[{$ref:"#/$defs/FactEventId"},{type:"null"}]},fact_id:{$ref:"#/$defs/FactId"},memory_scope:{anyOf:[{$ref:"#/$defs/MemoryScopeV1"},{type:"null"}]},project_selector:{additionalProperties:!1,description:'Exact registered-project selector. Reads and fact effects run against the\nselected project.\n\nInlined so every request schema advertises the closed selector contract\n(`required: ["project_id"]`, no additional properties) directly on its\n`project_selector` property instead of behind a `$defs` reference, matching\nthe selector shape the MCP dispatch policy promises for selector-accepting\ntools.',properties:{project_id:{$ref:"#/$defs/ProjectId"}},required:["project_id"],type:["object","null"]},superseded_by:{$ref:"#/$defs/FactId"}},required:["fact_id","superseded_by"],title:"FactStoreSupersedeRequestV1",type:"object"},{$defs:{FactAssertionId:hz,FactCommitDispositionV1:hF,FactCommitOwnerV1:hL,FactCommitReceiptV1:hU,FactEventId:hH,FactId:hB,ProjectId:g2},$schema:"https://json-schema.org/draft/2020-12/schema",description:"Outcome of an explicit supersession. `superseded` carries the durable\ncommit receipt of the `Curated { SupersededBy }` lineage event;\n`already_superseded` reports the successor already recorded for the fact.",oneOf:[{additionalProperties:!1,properties:{commit:{$ref:"#/$defs/FactCommitReceiptV1"},fact_id:{$ref:"#/$defs/FactId"},outcome:{const:"superseded",type:"string"},superseded_by:{$ref:"#/$defs/FactId"}},required:["outcome","fact_id","superseded_by","commit"],type:"object"},{additionalProperties:!1,properties:{fact_id:{$ref:"#/$defs/FactId"},outcome:{const:"already_superseded",type:"string"},superseded_by:{$ref:"#/$defs/FactId"}},required:["outcome","fact_id","superseded_by"],type:"object"}],title:"FactStoreSupersedeResultV1"},{$defs:{FactCategoryV1:hD,FactEventId:hH,FactId:hB,FactSourceLabelPatchV1:{oneOf:[{additionalProperties:!1,properties:{kind:{const:"set",type:"string"},value:{type:"string"}},required:["kind","value"],type:"object"},{additionalProperties:!1,properties:{kind:{const:"clear",type:"string"}},required:["kind"],type:"object"}]},MemoryScopeV1:gu,ProjectId:g2},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{category:{anyOf:[{$ref:"#/$defs/FactCategoryV1"},{type:"null"}]},content:{type:["string","null"]},entities:{items:{type:"string"},type:["array","null"]},expected_last_event_id:{anyOf:[{$ref:"#/$defs/FactEventId"},{type:"null"}]},fact_id:{$ref:"#/$defs/FactId"},memory_scope:{anyOf:[{$ref:"#/$defs/MemoryScopeV1"},{type:"null"}]},metadata:{additionalProperties:!0,type:["object","null"]},project_selector:{additionalProperties:!1,description:'Exact registered-project selector. Reads and fact effects run against the\nselected project.\n\nInlined so every request schema advertises the closed selector contract\n(`required: ["project_id"]`, no additional properties) directly on its\n`project_selector` property instead of behind a `$defs` reference, matching\nthe selector shape the MCP dispatch policy promises for selector-accepting\ntools.',properties:{project_id:{$ref:"#/$defs/ProjectId"}},required:["project_id"],type:["object","null"]},source_label:{anyOf:[{$ref:"#/$defs/FactSourceLabelPatchV1"},{type:"null"}]},tags:{items:{type:"string"},type:["array","null"]},trust:{format:"double",type:["number","null"]}},required:["fact_id"],title:"FactStoreUpdateRequestV1",type:"object"},{$defs:{FactAssertionId:hz,FactCategoryV1:hD,FactCommitDispositionV1:hF,FactCommitOwnerV1:hL,FactCommitReceiptV1:hU,FactEventId:hH,FactId:hB,FactIdentitySourceResultV1:hK,FactPayloadAccessV1:hJ,FactProjectionV1:hZ,FactStatusV1:h0,FactTelemetryV1:h2,FactV1:h4,LocatorDigest:gr,ProjectId:g2,ProvenanceId:_t,RetrievalAnchorId:_q,UtcMicros:vK},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{commit:{$ref:"#/$defs/FactCommitReceiptV1"},fact:{$ref:"#/$defs/FactProjectionV1"},trust_delta_millionths:{format:"int32",type:"integer"}},required:["fact","trust_delta_millionths","commit"],title:"FactStoreUpdateResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Explicit advisory-cycle trigger for one document in the admitted project.",properties:{document_uri:{type:"string"}},required:["document_uri"],title:"FeedbackAdvisoryCycleSurfaceRequestV1",type:"object"},{$defs:{AgentInstanceId:mN,CodeGenerationId:fT,CommitId:fH,DiagnosticSeverityV1:hC,FeedbackAdvisoryCycleWireV1:{additionalProperties:!1,description:"One canonical cycle result plus whether its durable publication committed.\n\n`published` intentionally remains adjacent to the cycle fields on the\nwire: publication is a property of this exact cycle, not of a page or a\nlater lookup.",properties:{advisory_only:{type:"boolean"},advisory_provider_states:{items:{$ref:"#/$defs/FeedbackAdvisoryProviderStateV1"},type:"array"},affected_tests_state:{anyOf:[{$ref:"#/$defs/FeedbackImpactStateV1"},{type:"null"}]},baseline_states:{items:{$ref:"#/$defs/FeedbackBaselineStateV1"},type:"array"},configuration_digest:{$ref:"#/$defs/ManifestDigest"},content_identity:{anyOf:[{$ref:"#/$defs/FeedbackContentIdentityV1"},{type:"null"}]},cycle_id:{$ref:"#/$defs/FeedbackCycleId"},durability:{$ref:"#/$defs/FeedbackDurabilityV1"},findings:{items:{$ref:"#/$defs/FeedbackFindingV1"},type:"array"},impact:{anyOf:[{$ref:"#/$defs/FeedbackImpactV1"},{type:"null"}]},impact_state:{anyOf:[{$ref:"#/$defs/FeedbackImpactStateV1"},{type:"null"}]},omitted_findings:{format:"uint64",minimum:0,type:"integer"},policy_digest:{$ref:"#/$defs/ManifestDigest"},provider_states:{items:{$ref:"#/$defs/ProviderEvaluationStateV1"},type:"array"},published:{type:"boolean"},result_id:{$ref:"#/$defs/FeedbackResultId"},returned_findings:{format:"uint64",minimum:0,type:"integer"},scope:{$ref:"#/$defs/FeedbackScopeV1"},termination:{$ref:"#/$defs/FeedbackCycleTerminationV1"},total_findings:{format:"uint64",minimum:0,type:"integer"}},required:["result_id","cycle_id","scope","durability","policy_digest","configuration_digest","termination","provider_states","baseline_states","findings","total_findings","returned_findings","omitted_findings","advisory_only","published"],type:"object"},FeedbackAdvisoryFindingHandleV1:{additionalProperties:!1,description:"One daemon-minted read-handle pair for a finding in the published cycle.",properties:{expansion_handle:{type:["string","null"]},finding_id:{$ref:"#/$defs/FeedbackFindingId"},get_handle:{type:"string"},retrieval_anchor_id:{anyOf:[{$ref:"#/$defs/RetrievalAnchorId"},{type:"null"}]}},required:["finding_id","get_handle"],type:"object"},FeedbackAdvisoryProviderStateV1:h6,FeedbackAdvisoryReadHandlesV1:{additionalProperties:!1,description:"Daemon-minted handles for reads over this exact publication.",properties:{affected_tests_handle:{type:"string"},diagnostics_handle:{type:"string"},impact_handle:{type:"string"},list_handle:{type:"string"}},required:["diagnostics_handle","impact_handle","affected_tests_handle","list_handle"],type:"object"},FeedbackBaselineStateV1:h3,FeedbackContentIdentityV1:h9,FeedbackCycleId:h5,FeedbackCycleTerminationV1:h8,FeedbackDiagnosticClassificationV1:h7,FeedbackDiagnosticProducerV1:ye,FeedbackDiagnosticProjectionV1:yt,FeedbackDurabilityV1:yr,FeedbackFindingId:yi,FeedbackFindingLifecycleV1:yo,FeedbackFindingV1:ya,FeedbackImpactStateV1:ys,FeedbackImpactV1:yd,FeedbackResultId:yc,FeedbackScopeV1:yl,FeedbackTargetV1:yp,FileOccurrenceId:yu,HostInstanceId:yH,ManifestDigest:gl,ProjectId:g2,ProviderEvaluationStateV1:_r,RepositoryId:_v,RetrievalAnchorId:_q,SessionId:_5,SourceSpan:vb,SymbolOccurrenceId:vV,WorktreeId:$M},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Exact advisory-cycle payload serialized by the mounted daemon route.",properties:{cycle:{$ref:"#/$defs/FeedbackAdvisoryCycleWireV1"},finding_handles:{items:{$ref:"#/$defs/FeedbackAdvisoryFindingHandleV1"},type:"array"},read_handles:{anyOf:[{$ref:"#/$defs/FeedbackAdvisoryReadHandlesV1"},{type:"null"}]}},required:["cycle","finding_handles"],title:"FeedbackAdvisoryCycleSurfaceResultV1",type:"object"},{$defs:{AgentInstanceId:mN,CodeGenerationId:fT,CommitId:fH,DiagnosticSeverityV1:hC,FeedbackAdvisoryProviderStateV1:h6,FeedbackBaselineStateV1:h3,FeedbackContentIdentityV1:h9,FeedbackCycleId:h5,FeedbackCycleResultV1:{additionalProperties:!1,description:"One deterministic result for one trigger. The result represents a\nterminal advisory evaluation and contains no next-action execution hook.",properties:{advisory_only:{type:"boolean"},advisory_provider_states:{items:{$ref:"#/$defs/FeedbackAdvisoryProviderStateV1"},type:"array"},affected_tests_state:{anyOf:[{$ref:"#/$defs/FeedbackImpactStateV1"},{type:"null"}]},baseline_states:{items:{$ref:"#/$defs/FeedbackBaselineStateV1"},type:"array"},configuration_digest:{$ref:"#/$defs/ManifestDigest"},content_identity:{anyOf:[{$ref:"#/$defs/FeedbackContentIdentityV1"},{type:"null"}]},cycle_id:{$ref:"#/$defs/FeedbackCycleId"},durability:{$ref:"#/$defs/FeedbackDurabilityV1"},findings:{items:{$ref:"#/$defs/FeedbackFindingV1"},type:"array"},impact:{anyOf:[{$ref:"#/$defs/FeedbackImpactV1"},{type:"null"}]},impact_state:{anyOf:[{$ref:"#/$defs/FeedbackImpactStateV1"},{type:"null"}]},omitted_findings:{format:"uint64",minimum:0,type:"integer"},policy_digest:{$ref:"#/$defs/ManifestDigest"},provider_states:{items:{$ref:"#/$defs/ProviderEvaluationStateV1"},type:"array"},result_id:{$ref:"#/$defs/FeedbackResultId"},returned_findings:{format:"uint64",minimum:0,type:"integer"},scope:{$ref:"#/$defs/FeedbackScopeV1"},termination:{$ref:"#/$defs/FeedbackCycleTerminationV1"},total_findings:{format:"uint64",minimum:0,type:"integer"}},required:["result_id","cycle_id","scope","durability","policy_digest","configuration_digest","termination","provider_states","baseline_states","findings","total_findings","returned_findings","omitted_findings","advisory_only"],type:"object"},FeedbackCycleTerminationV1:h8,FeedbackDiagnosticClassificationV1:h7,FeedbackDiagnosticProducerV1:ye,FeedbackDiagnosticProjectionV1:yt,FeedbackDurabilityV1:yr,FeedbackFindingId:yi,FeedbackFindingLifecycleV1:yo,FeedbackFindingV1:ya,FeedbackImpactStateV1:ys,FeedbackImpactV1:yd,FeedbackResultId:yc,FeedbackScopeV1:yl,FeedbackTargetV1:yp,FileOccurrenceId:yu,HostInstanceId:yH,ManifestDigest:gl,ProjectId:g2,ProviderEvaluationStateV1:_r,RepositoryId:_v,RetrievalAnchorId:_q,SessionId:_5,SourceSpan:vb,SymbolOccurrenceId:vV,WorktreeId:$M},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{cycle:{$ref:"#/$defs/FeedbackCycleResultV1"}},required:["cycle"],title:"FeedbackDiagnosticsReadResultV1",type:"object"},{$defs:{AnchorExpandResult:{additionalProperties:!1,properties:{anchors:{items:{$ref:"#/$defs/RetrievalAnchorId"},type:"array"}},required:["anchors"],type:"object"},CommitId:fH,DiagnosticSeverityV1:hC,FeedbackCycleId:h5,FeedbackDiagnosticClassificationV1:h7,FeedbackDiagnosticProducerV1:ye,FeedbackDiagnosticProjectionV1:yt,FeedbackFindingId:yi,FeedbackFindingLifecycleV1:yo,FeedbackFindingReadV1:yn,FeedbackFindingV1:ya,FeedbackResultId:yc,FeedbackScopeV1:yl,FileOccurrenceId:yu,ProjectId:g2,ProviderEvaluationStateV1:_r,RepositoryId:_v,RetrievalAnchorId:_q,SourceSpan:vb,SymbolOccurrenceId:vV,WorktreeId:$M},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{expansion:{$ref:"#/$defs/AnchorExpandResult"},finding:{$ref:"#/$defs/FeedbackFindingReadV1"}},required:["finding","expansion"],title:"FeedbackExpandResultV1",type:"object"},{$defs:{CommitId:fH,DiagnosticSeverityV1:hC,FeedbackCycleId:h5,FeedbackDiagnosticClassificationV1:h7,FeedbackDiagnosticProducerV1:ye,FeedbackDiagnosticProjectionV1:yt,FeedbackFindingId:yi,FeedbackFindingLifecycleV1:yo,FeedbackFindingReadV1:yn,FeedbackFindingV1:ya,FeedbackResultId:yc,FeedbackScopeV1:yl,FileOccurrenceId:yu,ProjectId:g2,ProviderEvaluationStateV1:_r,RepositoryId:_v,RetrievalAnchorId:_q,SourceSpan:vb,SymbolOccurrenceId:vV,WorktreeId:$M},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{finding:{$ref:"#/$defs/FeedbackFindingReadV1"}},required:["finding"],title:"FeedbackGetResultV1",type:"object"},{$defs:{AgentInstanceId:mN,CodeGenerationId:fT,CommitId:fH,FeedbackContentIdentityV1:h9,FeedbackCycleId:h5,FeedbackImpactStateV1:ys,FeedbackImpactV1:yd,FeedbackResultId:yc,FeedbackScopeV1:yl,FeedbackTargetV1:yp,FileOccurrenceId:yu,HostInstanceId:yH,ManifestDigest:gl,ProjectId:g2,RepositoryId:_v,RetrievalAnchorId:_q,SessionId:_5,SourceSpan:vb,SymbolOccurrenceId:vV,WorktreeId:$M},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Canonical impact projection returned by `feedback_impact`.\n\nThe daemon-side projection owner (usecases) re-exports this type; it lives\nhere so the catalog contribution can register its schema body as the single\nRust-owned wire authority. Results project from an authorized completed\ncycle, and the canonical response wire remains consumable by typed SDKs.",properties:{content_identity:{anyOf:[{$ref:"#/$defs/FeedbackContentIdentityV1"},{type:"null"}]},cycle_id:{$ref:"#/$defs/FeedbackCycleId"},impact:{anyOf:[{$ref:"#/$defs/FeedbackImpactV1"},{type:"null"}]},result_id:{$ref:"#/$defs/FeedbackResultId"},scope:{$ref:"#/$defs/FeedbackScopeV1"},state:{anyOf:[{$ref:"#/$defs/FeedbackImpactStateV1"},{type:"null"}]}},required:["result_id","cycle_id","scope"],title:"CanonicalFeedbackImpactProjectionV1",type:"object"},{$defs:{CommitId:fH,DiagnosticSeverityV1:hC,FeedbackCycleId:h5,FeedbackDiagnosticClassificationV1:h7,FeedbackDiagnosticProducerV1:ye,FeedbackDiagnosticProjectionV1:yt,FeedbackFindingId:yi,FeedbackFindingLifecycleV1:yo,FeedbackFindingReadV1:yn,FeedbackFindingV1:ya,FeedbackResultId:yc,FeedbackScopeV1:yl,FileOccurrenceId:yu,ProjectId:g2,ProviderEvaluationStateV1:_r,RepositoryId:_v,RetrievalAnchorId:_q,SourceSpan:vb,SymbolOccurrenceId:vV,WorktreeId:$M},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{findings:{items:{$ref:"#/$defs/FeedbackFindingReadV1"},type:"array"}},required:["findings"],title:"FeedbackListResultV1",type:"object"},{$defs:{UtcMicros:vK},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{observed_at:{$ref:"#/$defs/UtcMicros"}},required:["observed_at"],title:"FeedbackProximityReadRequestV1",type:"object"},{$defs:{AgentInstanceId:mN,CodeGenerationId:fT,CommitId:fH,FeedbackProximityAccessKindV1:{enum:["read","write"],type:"string"},FeedbackProximityCloneHandleV1:{additionalProperties:!1,properties:{retrieval_anchor_ids:{items:{$ref:"#/$defs/RetrievalAnchorId"},type:"array"},source_generation:{$ref:"#/$defs/CodeGenerationId"},source_symbol:{$ref:"#/$defs/SymbolOccurrenceId"}},required:["source_generation","source_symbol","retrieval_anchor_ids"],type:"object"},FeedbackProximityConflictDifferenceV1:{additionalProperties:!1,properties:{difference_digest:{$ref:"#/$defs/ManifestDigest"},file:{$ref:"#/$defs/FileOccurrenceId"},span:{$ref:"#/$defs/SourceSpan"}},required:["file","span","difference_digest"],type:"object"},FeedbackProximityConflictHandleV1:{additionalProperties:!1,properties:{common_base_revision:{$ref:"#/$defs/CommitId"},differences:{items:{$ref:"#/$defs/FeedbackProximityConflictDifferenceV1"},type:"array"},evidence_digest:{$ref:"#/$defs/ManifestDigest"},left_head_revision:{$ref:"#/$defs/CommitId"},right_head_revision:{$ref:"#/$defs/CommitId"}},required:["common_base_revision","left_head_revision","right_head_revision","evidence_digest","differences"],type:"object"},FeedbackProximityEncounterV1:{additionalProperties:!1,properties:{coverage:{$ref:"#/$defs/ProximityCoverageV1"},encounter_id:{$ref:"#/$defs/ManifestDigest"},expires_at:{$ref:"#/$defs/UtcMicros"},interval:{$ref:"#/$defs/FeedbackProximityIntervalV1"},observed_at:{$ref:"#/$defs/UtcMicros"},participants:{items:{$ref:"#/$defs/FeedbackProximityParticipantV1"},type:"array"},relation:{$ref:"#/$defs/FeedbackProximityRelationV1"},scope:{$ref:"#/$defs/FeedbackScopeV1"}},required:["encounter_id","scope","interval","participants","relation","observed_at","expires_at","coverage"],type:"object"},FeedbackProximityIntervalV1:{additionalProperties:!1,properties:{end:{$ref:"#/$defs/UtcMicros"},start:{$ref:"#/$defs/UtcMicros"}},required:["start","end"],type:"object"},FeedbackProximityOmissionV1:{enum:["active_session_limit","session_activity_limit","recent_observation_limit","edited_path_limit","encounter_limit","missing_participant_observation","missing_participant_worktree","missing_participant_revision","missing_code_address","clone_coverage_partial","conflict_evidence_unavailable","code_index_revision_mismatch"],type:"string"},FeedbackProximityParticipantV1:{additionalProperties:!1,properties:{access:{$ref:"#/$defs/FeedbackProximityAccessKindV1"},activity:{$ref:"#/$defs/FeedbackProximityIntervalV1"},address:{$ref:"#/$defs/ProximityAddressV1"},agent_id:{$ref:"#/$defs/AgentInstanceId"},branch_ref:{anyOf:[{$ref:"#/$defs/RefId"},{type:"null"}]},head_revision:{anyOf:[{$ref:"#/$defs/CommitId"},{type:"null"}]},source:{$ref:"#/$defs/ObservationSourceIdentityV1"},worktree_id:{anyOf:[{$ref:"#/$defs/WorktreeId"},{type:"null"}]},worktree_root:{type:"string"}},required:["source","agent_id","worktree_root","access","activity","address"],type:"object"},FeedbackProximityReadPageV1:{additionalProperties:!1,properties:{encounters:{items:{$ref:"#/$defs/FeedbackProximityEncounterV1"},type:"array"},expires_at:{$ref:"#/$defs/UtcMicros"},observed_at:{$ref:"#/$defs/UtcMicros"},scope:{$ref:"#/$defs/FeedbackScopeV1"},source_generation:{$ref:"#/$defs/CodeGenerationId"}},required:["scope","source_generation","observed_at","expires_at","encounters"],type:"object"},FeedbackProximityRelationV1:{oneOf:[{additionalProperties:!1,properties:{relation_kind:{const:"code_neighborhood_candidate",type:"string"},warning_class:{$ref:"#/$defs/ProximityWarningClassV1"}},required:["relation_kind","warning_class"],type:"object"},{additionalProperties:!1,properties:{clone_handle:{$ref:"#/$defs/FeedbackProximityCloneHandleV1"},relation_kind:{const:"shared_code_candidate",type:"string"},warning_class:{$ref:"#/$defs/ProximityWarningClassV1"}},required:["relation_kind","warning_class","clone_handle"],type:"object"},{additionalProperties:!1,properties:{relation_kind:{const:"overlapping_edit",type:"string"},warning_class:{$ref:"#/$defs/ProximityWarningClassV1"}},required:["relation_kind","warning_class"],type:"object"},{additionalProperties:!1,properties:{conflict_handle:{$ref:"#/$defs/FeedbackProximityConflictHandleV1"},relation_kind:{const:"confirmed_conflict",type:"string"}},required:["relation_kind","conflict_handle"],type:"object"}]},FeedbackScopeV1:yl,FileOccurrenceId:yu,ManifestDigest:gl,ObservationSourceIdentityV1:gW,ProjectId:g2,ProviderId:_i,ProximityAddressV1:{additionalProperties:!1,description:"A privacy-scoped code address. It identifies the coarse changed-code shape\nbut carries no other actor, session, or private-source content.",properties:{file:{$ref:"#/$defs/FileOccurrenceId"},scope:{$ref:"#/$defs/FeedbackScopeV1"},span:{anyOf:[{$ref:"#/$defs/SourceSpan"},{type:"null"}]},symbol:{anyOf:[{$ref:"#/$defs/SymbolOccurrenceId"},{type:"null"}]}},required:["scope","file"],type:"object"},ProximityCoverageV1:{enum:["complete","partial","stale","unavailable","denied","private"],type:"string"},ProximityWarningClassV1:{enum:["same_file","overlapping_range","same_symbol","same_package","same_crate","neighborhood","shared_caller","shared_dependency","shared_test","incompatible_branch_worktree"],type:"string"},RefId:_u,RepositoryId:_v,RetrievalAnchorId:_q,SessionId:_5,SourceSpan:vb,SymbolOccurrenceId:vV,UtcMicros:vK,WorktreeId:$M},$schema:"https://json-schema.org/draft/2020-12/schema",oneOf:[{additionalProperties:!1,properties:{page:{$ref:"#/$defs/FeedbackProximityReadPageV1"},state:{const:"complete",type:"string"}},required:["state","page"],type:"object"},{additionalProperties:!1,properties:{page:{$ref:"#/$defs/FeedbackProximityReadPageV1"},state:{const:"complete_zero",type:"string"}},required:["state","page"],type:"object"},{additionalProperties:!1,properties:{omissions:{items:{$ref:"#/$defs/FeedbackProximityOmissionV1"},type:"array"},page:{$ref:"#/$defs/FeedbackProximityReadPageV1"},state:{const:"partial",type:"string"}},required:["state","page","omissions"],type:"object"},{additionalProperties:!1,properties:{omissions:{items:{$ref:"#/$defs/FeedbackProximityOmissionV1"},type:"array"},page:{$ref:"#/$defs/FeedbackProximityReadPageV1"},state:{const:"stale",type:"string"}},required:["state","page","omissions"],type:"object"},{additionalProperties:!1,properties:{observed_at:{$ref:"#/$defs/UtcMicros"},state:{const:"denied",type:"string"}},required:["state","observed_at"],type:"object"},{additionalProperties:!1,properties:{observed_at:{$ref:"#/$defs/UtcMicros"},state:{const:"unavailable",type:"string"}},required:["state","observed_at"],type:"object"}],title:"FeedbackProximityReadResultV1"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{field:{description:"Field name. Bare name ('last_sync_at') matches across structs;\nqualified form ('GraphStats::last_sync_at') narrows to one struct's\nfield.",type:"string"},limit:{description:"Maximum sites per kind (default: 200, max: 2000).",format:"uint32",minimum:0,type:["integer","null"]},writes_only:{description:"When true, returns only write_sites and omits reads. Default false.",type:["boolean","null"]}},required:["field"],title:"FieldSitesSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fE,CodeIndexConvergenceParkedV1:fA,CodeIndexStalenessStateV1:fz,FieldSiteV1:{additionalProperties:!1,properties:{enclosing:{type:["string","null"]},file:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},snippet:{type:"string"}},required:["file","line","snippet"],type:"object"},PrimitiveFreshnessStateV1:gG,PrimitiveIndexingStateV1:gB,PrimitiveSearchFreshnessV1:gQ},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"`read_count` and `read_sites` are absent when the request asked for\nwrites only.",properties:{field:{type:"string"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},qualifier:{type:["string","null"]},qualifier_applied:{type:"boolean"},read_count:{format:"uint64",minimum:0,type:["integer","null"]},read_sites:{items:{$ref:"#/$defs/FieldSiteV1"},type:["array","null"]},write_count:{format:"uint64",minimum:0,type:"integer"},write_sites:{items:{$ref:"#/$defs/FieldSiteV1"},type:"array"}},required:["field","qualifier_applied","write_count","write_sites"],title:"FieldSitesResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{file:{type:"string"}},required:["file"],title:"FileDependentsPrimitiveRequest",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{dependent_files:{items:{type:"string"},type:"array"},file:{type:"string"}},required:["file","dependent_files"],title:"FileDependentsPrimitiveResult",type:"object"},{$defs:{FilesLayoutV1:ym},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{layout:{anyOf:[{$ref:"#/$defs/FilesLayoutV1"},{type:"null"}],description:"File listing layout: flat (one per line) or grouped by directory\n(default: grouped)."},path:{description:"Filter to files under this directory path.",type:["string","null"]},pattern:{description:"Filter files matching this glob pattern (e.g. '**/*.rs').",type:["string","null"]}},title:"FilesSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fE,CodeIndexConvergenceParkedV1:fA,CodeIndexOmittedSourceV1:fM,CodeIndexOmittedSourcesV1:fW,CodeIndexSourceOmissionReasonV1:fN,CodeIndexStalenessStateV1:fz,FilesLayoutV1:ym,IndexedFileV1:{additionalProperties:!1,properties:{bytes:{format:"uint64",minimum:0,type:"integer"},path:{type:"string"},symbols:{format:"uint64",minimum:0,type:"integer"}},required:["path","symbols","bytes"],type:"object"},PrimitiveFreshnessStateV1:gG,PrimitiveIndexingStateV1:gB,PrimitiveSearchFreshnessV1:gQ},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{count:{format:"uint",minimum:0,type:"integer"},files:{items:{$ref:"#/$defs/IndexedFileV1"},type:"array"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},layout:{$ref:"#/$defs/FilesLayoutV1"},worktree_omitted_sources:{anyOf:[{$ref:"#/$defs/CodeIndexOmittedSourcesV1"},{type:"null"}],description:"Sources the serving snapshot captured for the whole worktree but does\nnot index, unfiltered by `path` or `pattern`."}},required:["count","layout","files"],title:"FilesResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{lazy_index_ignored_dependencies:{description:"Opt in to bounded indexing of ignored dependency entry files when an\nimport hint matches (default: false).",type:["boolean","null"]},limit:{description:"Maximum matches to return (default: 20, max: 200).",format:"uint32",minimum:0,type:["integer","null"]},name:{description:"Exact bare symbol name (no `::`, no glob).",type:"string"}},required:["name"],title:"FindExactSymbolSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fE,CodeIndexConvergenceParkedV1:fA,CodeIndexStalenessStateV1:fz,FindExactSymbolMatchV1:{additionalProperties:!1,properties:{file:{type:"string"},id:{type:"string"},kind:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},name:{type:"string"},qualified_name:{type:"string"},signature:{type:["string","null"]}},required:["id","name","qualified_name","kind","file","line"],type:"object"},PrimitiveFreshnessStateV1:gG,PrimitiveIndexingStateV1:gB,PrimitiveSearchFreshnessV1:gQ},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{count:{format:"uint64",minimum:0,type:"integer"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},matches:{items:{$ref:"#/$defs/FindExactSymbolMatchV1"},type:"array"},name:{type:"string"},suggestions:{description:"Nearest indexed bare names when `count` is 0. Empty when the query\nmatched, or when it is not itself a bare identifier.",items:{type:"string"},type:"array"}},required:["name","count","matches"],title:"FindExactSymbolResultV1",type:"object"},{$defs:{GiniMetricV1:yg,GiniScopeV1:y_},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{limit:{description:"Number of top outliers to return (default: 10, at most 100).",format:"uint32",minimum:0,type:["integer","null"]},metric:{anyOf:[{$ref:"#/$defs/GiniMetricV1"},{type:"null"}],description:"Metric to measure inequality for (default: complexity)."},path:{description:"Filter to files under this directory path.",type:["string","null"]},scope:{anyOf:[{$ref:"#/$defs/GiniScopeV1"},{type:"null"}],description:"Aggregate per file or per symbol (default: file)."}},title:"GiniSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fE,CodeIndexConvergenceParkedV1:fA,CodeIndexStalenessStateV1:fz,GiniMetricV1:yg,GiniOutlierV1:{additionalProperties:!1,properties:{name:{type:"string"},pct_of_max:{format:"double",type:"number"},value:{format:"double",type:"number"}},required:["name","value","pct_of_max"],type:"object"},GiniScopeV1:y_,PrimitiveFreshnessStateV1:gG,PrimitiveIndexingStateV1:gB,PrimitiveSearchFreshnessV1:gQ},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},gini:{format:"double",type:"number"},incomplete_complexity_symbols:{description:"Symbols left out because their bounded complexity walk did not cover\nthe body; their counters are lower bounds and measure nothing here.",format:"uint64",minimum:0,type:"integer"},interpretation:{type:"string"},metric:{$ref:"#/$defs/GiniMetricV1"},outliers:{items:{$ref:"#/$defs/GiniOutlierV1"},type:"array"},scope:{$ref:"#/$defs/GiniScopeV1"},total_items:{format:"uint64",minimum:0,type:"integer"}},required:["gini","interpretation","total_items","metric","scope","incomplete_complexity_symbols","outliers"],title:"GiniResultV1",type:"object"},{$defs:{GitIndexPreviewId:yq,ManifestDigest:gl},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Public MCP/CLI request to apply one immutable Git index preview.",properties:{idempotency_key:{type:"string"},preview_digest:{$ref:"#/$defs/ManifestDigest"},preview_id:{$ref:"#/$defs/GitIndexPreviewId"}},required:["preview_id","preview_digest","idempotency_key"],title:"GitApplySurfaceRequest",type:"object"},{$defs:{GitIndexPreviewId:yq,GitIndexReceiptId:{description:"Strongly typed canonical identity: `GitIndexReceiptId`.",type:"string"},GitIndexReceiptOutcomeV1:{description:"Terminal outcome a recovery record can prove without re-running a native\nmutation.",enum:["committed","aborted_no_change","needs_inspection"],type:"string"},GitIndexTransactionId:{description:"Strongly typed canonical identity: `GitIndexTransactionId`.",type:"string"},GitIndexTransactionOperationV1:yI,GitOidV1:yx,ManifestDigest:gl,UtcMicros:vK},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Durable, integrity-protected receipt for one Git index transaction.",properties:{committed_at:{$ref:"#/$defs/UtcMicros"},final_snapshot_captured:{description:"Whether `final_snapshot_digest`, `new_index_tree`, and `new_head` came\nfrom a post-outcome native observation. An unavailable observation is\nvalid only for a terminal outcome that does not claim a commit.",type:"boolean"},final_snapshot_digest:{$ref:"#/$defs/ManifestDigest",description:"Digest of a snapshot that was actually captured after the terminal\nobservation. When `final_snapshot_captured` is false this retains the\nexpected snapshot digest only as a stable schema placeholder; callers\nmust not treat it as an observation."},new_head:{anyOf:[{$ref:"#/$defs/GitOidV1"},{type:"null"}]},new_index_tree:{anyOf:[{$ref:"#/$defs/GitOidV1"},{type:"null"}]},old_head:{anyOf:[{$ref:"#/$defs/GitOidV1"},{type:"null"}]},old_index_tree:{anyOf:[{$ref:"#/$defs/GitOidV1"},{type:"null"}]},old_snapshot_digest:{$ref:"#/$defs/ManifestDigest"},operation:{$ref:"#/$defs/GitIndexTransactionOperationV1"},outcome:{$ref:"#/$defs/GitIndexReceiptOutcomeV1"},preview_id:{$ref:"#/$defs/GitIndexPreviewId"},receipt_digest:{$ref:"#/$defs/ManifestDigest"},receipt_id:{$ref:"#/$defs/GitIndexReceiptId"},selected_hunk_digests:{items:{$ref:"#/$defs/ManifestDigest"},type:"array"},transaction_id:{$ref:"#/$defs/GitIndexTransactionId"}},required:["receipt_id","transaction_id","preview_id","operation","old_snapshot_digest","final_snapshot_digest","final_snapshot_captured","selected_hunk_digests","outcome","committed_at","receipt_digest"],title:"GitIndexTransactionReceiptV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Request shape for the public `git_blame` surface.",properties:{follow_renames:{default:!1,type:"boolean"},max_bytes:{format:"uint64",minimum:0,type:["integer","null"]},max_entries:{format:"uint32",minimum:0,type:["integer","null"]},path:{type:"string"}},required:["path"],title:"GitBlameSurfaceRequest",type:"object"},{$defs:{GitBlameAvailabilityV1:{description:"Why blame/line provenance is unavailable for a path.",enum:["available","path_not_tracked","unborn_branch","binary_file"],type:"string"},GitBlameLineV1:{additionalProperties:!1,description:"Line provenance for one final (current) line.",properties:{author:{$ref:"#/$defs/GitCommitIdentityV1"},boundary:{description:"True when the origin commit is a history boundary (e.g. shallow root).",type:"boolean"},commit:{$ref:"#/$defs/GitOidV1"},final_line:{description:"1-based line number in the blamed revision.",format:"uint32",minimum:0,type:"integer"},origin_line:{description:"1-based line number in the origin commit.",format:"uint32",minimum:0,type:"integer"},previous:{anyOf:[{$ref:"#/$defs/GitBlamePreviousV1"},{type:"null"}]}},required:["final_line","origin_line","commit","author","boundary"],type:"object"},GitBlamePreviousV1:{additionalProperties:!1,description:"Rename-following evidence for one blamed line (`previous` record).",properties:{commit:{$ref:"#/$defs/GitOidV1"},path:{type:"string"}},required:["commit","path"],type:"object"},GitBlameV1:{additionalProperties:!1,description:"Typed blame result: per-line provenance plus boundary, rename-following,\nand unavailable states.",properties:{availability:{$ref:"#/$defs/GitBlameAvailabilityV1"},coverage:{$ref:"#/$defs/GitCoverageV1"},lines:{items:{$ref:"#/$defs/GitBlameLineV1"},type:"array"},path:{type:"string"},repository:{$ref:"#/$defs/RepositoryId"}},required:["repository","path","lines","availability","coverage"],type:"object"},GitBlobExpectationV1:yv,GitChangeKindV1:{description:"Native change kind for one side (index or worktree) of a status entry,\nor for a whole-file diff record.",enum:["unmodified","modified","added","deleted","renamed","copied","type_changed","unmerged"],type:"string"},GitCommitIdentityV1:{additionalProperties:!1,description:"Author/committer identity and timestamp evidence for one commit.",properties:{at:{$ref:"#/$defs/UtcMicros"},email:{type:"string"},name:{type:"string"}},required:["name","email","at"],type:"object"},GitCommitMetadataV1:{additionalProperties:!1,description:"Bounded commit metadata. The full message is not retained;\n`message_digest` is its canonical digest evidence.",properties:{author:{$ref:"#/$defs/GitCommitIdentityV1"},commit:{$ref:"#/$defs/GitOidV1"},committer:{$ref:"#/$defs/GitCommitIdentityV1"},message_digest:{$ref:"#/$defs/ManifestDigest"},parents:{items:{$ref:"#/$defs/GitOidV1"},type:"array"},subject:{description:"First line of the commit message, bounded at capture.",type:"string"},tree:{$ref:"#/$defs/GitOidV1"}},required:["commit","tree","parents","author","committer","subject","message_digest"],type:"object"},GitCoverageV1:yS,GitDegradationV1:yk,GitDiffScopeV1:{description:"Diff scope: unstaged worktree changes, staged index changes, or an exact\ncommit range. Range diffs are read-only evidence and carry no index\nrelationship, so they cannot mint an applicable `HunkRefV1`.",oneOf:[{properties:{scope:{const:"working_tree",type:"string"}},required:["scope"],type:"object"},{properties:{scope:{const:"staged",type:"string"}},required:["scope"],type:"object"},{properties:{base:{$ref:"#/$defs/GitOidV1"},head:{$ref:"#/$defs/GitOidV1"},scope:{const:"commit_range",type:"string"}},required:["scope","base","head"],type:"object"}]},GitDiffV1:{additionalProperties:!1,description:"Typed diff result for one scope with explicit coverage.",properties:{coverage:{$ref:"#/$defs/GitCoverageV1"},files:{items:{$ref:"#/$defs/GitFileDiffV1"},type:"array"},repository:{$ref:"#/$defs/RepositoryId"},scope:{$ref:"#/$defs/GitDiffScopeV1"}},required:["repository","scope","files","coverage"],type:"object"},GitFileDiffV1:{additionalProperties:!1,description:"One file's structured diff record: change kind, modes, blob identities,\nbinary/submodule classification, bounded line totals, and hunks.",properties:{binary:{type:"boolean"},change:{$ref:"#/$defs/GitChangeKindV1"},deletions:{format:"uint32",minimum:0,type:["integer","null"]},hunks:{items:{$ref:"#/$defs/GitHunkV1"},type:"array"},insertions:{description:"Inserted/deleted line totals; absent for binary and submodule records.",format:"uint32",minimum:0,type:["integer","null"]},new_blob:{anyOf:[{$ref:"#/$defs/GitOidV1"},{type:"null"}]},new_mode:{anyOf:[{$ref:"#/$defs/GitFileModeV1"},{type:"null"}]},old_blob:{anyOf:[{$ref:"#/$defs/GitOidV1"},{type:"null"}]},old_mode:{anyOf:[{$ref:"#/$defs/GitFileModeV1"},{type:"null"}]},original_path:{description:"Source path for a rename or copy.",type:["string","null"]},path:{type:"string"},submodule:{description:"True when the entry is a gitlink (submodule) change.",type:"boolean"}},required:["path","change","binary","submodule","hunks"],type:"object"},GitFileModeV1:yw,GitHeadStateV1:yR,GitHistoryV1:{additionalProperties:!1,description:"Bounded commit history in native traversal order. `truncated` is true\nwhen the capture bound cut the walk; shallow/partial-clone boundaries are\ncoverage degradations, never silently clean.",properties:{commits:{items:{$ref:"#/$defs/GitCommitMetadataV1"},type:"array"},coverage:{$ref:"#/$defs/GitCoverageV1"},repository:{$ref:"#/$defs/RepositoryId"},truncated:{type:"boolean"}},required:["repository","commits","truncated","coverage"],type:"object"},GitHunkPreviewEntryV1:{additionalProperties:!1,description:"One minted hunk selection: the canonical selection digest plus the\n`HunkRef` identity evidence it selects.",properties:{digest:{$ref:"#/$defs/ManifestDigest"},hunk:{$ref:"#/$defs/HunkRefV1"}},required:["digest","hunk"],type:"object"},GitHunkPreviewInputV1:{additionalProperties:!1,description:"Bounded, expiring preview input minted by `git_hunks` from one exact\ndaemon-captured repository snapshot.",properties:{expires_at:{$ref:"#/$defs/UtcMicros"},hunks:{items:{$ref:"#/$defs/GitHunkPreviewEntryV1"},type:"array"},preview_input_id:{$ref:"#/$defs/GitIndexPreviewId"},repository_snapshot_digest:{$ref:"#/$defs/ManifestDigest"}},required:["preview_input_id","repository_snapshot_digest","expires_at","hunks"],type:"object"},GitHunkV1:{additionalProperties:!1,description:"One structured diff hunk. The hunk body is not retained; `patch_digest`\nis the canonical digest of the normalized header plus body lines, which\nis the stable hunk identity evidence.",properties:{new_lines:{format:"uint32",minimum:0,type:"integer"},new_start:{format:"uint32",minimum:0,type:"integer"},old_lines:{format:"uint32",minimum:0,type:"integer"},old_start:{format:"uint32",minimum:0,type:"integer"},patch_digest:{$ref:"#/$defs/ManifestDigest"},section:{description:"Function/section heading from the hunk header when Git emitted one.",type:["string","null"]}},required:["old_start","old_lines","new_start","new_lines","patch_digest"],type:"object"},GitIndexEntryExpectationV1:yV,GitIndexPreviewId:yq,GitOidV1:yx,GitOperationStateV1:yj,GitQueryEnvelopeV1:{additionalProperties:!1,description:"One typed query result with its merged coverage. `coverage` is the\nadapter-reported coverage plus any query-level degradation (entry-bound\ntruncation); `truncated_by_bound` distinguishes query-level truncation\nfrom adapter-level capture bounds.",properties:{coverage:{$ref:"#/$defs/GitCoverageV1"},truncated_by_bound:{type:"boolean"},value:{$ref:"#/$defs/GitStatusSummaryV1"}},required:["value","coverage","truncated_by_bound"],type:"object"},GitQueryEnvelopeV12:{additionalProperties:!1,description:"One typed query result with its merged coverage. `coverage` is the\nadapter-reported coverage plus any query-level degradation (entry-bound\ntruncation); `truncated_by_bound` distinguishes query-level truncation\nfrom adapter-level capture bounds.",properties:{coverage:{$ref:"#/$defs/GitCoverageV1"},truncated_by_bound:{type:"boolean"},value:{$ref:"#/$defs/GitDiffV1"}},required:["value","coverage","truncated_by_bound"],type:"object"},GitQueryEnvelopeV13:{additionalProperties:!1,description:"One typed query result with its merged coverage. `coverage` is the\nadapter-reported coverage plus any query-level degradation (entry-bound\ntruncation); `truncated_by_bound` distinguishes query-level truncation\nfrom adapter-level capture bounds.",properties:{coverage:{$ref:"#/$defs/GitCoverageV1"},truncated_by_bound:{type:"boolean"},value:{$ref:"#/$defs/GitHistoryV1"}},required:["value","coverage","truncated_by_bound"],type:"object"},GitQueryEnvelopeV14:{additionalProperties:!1,description:"One typed query result with its merged coverage. `coverage` is the\nadapter-reported coverage plus any query-level degradation (entry-bound\ntruncation); `truncated_by_bound` distinguishes query-level truncation\nfrom adapter-level capture bounds.",properties:{coverage:{$ref:"#/$defs/GitCoverageV1"},truncated_by_bound:{type:"boolean"},value:{$ref:"#/$defs/GitBlameV1"}},required:["value","coverage","truncated_by_bound"],type:"object"},GitQueryEnvelopeV15:{additionalProperties:!1,description:"One typed query result with its merged coverage. `coverage` is the\nadapter-reported coverage plus any query-level degradation (entry-bound\ntruncation); `truncated_by_bound` distinguishes query-level truncation\nfrom adapter-level capture bounds.",properties:{coverage:{$ref:"#/$defs/GitCoverageV1"},truncated_by_bound:{type:"boolean"},value:{$ref:"#/$defs/GitHunkPreviewInputV1"}},required:["value","coverage","truncated_by_bound"],type:"object"},GitStatusSummaryV1:{additionalProperties:!1,description:"Bounded status summary derived from the typed\n[`tracedecay_domain::git::GitStatusV1`]: HEAD and operation state,\nper-class counts, and a bounded sorted sample of changed paths.",properties:{changed_paths:{description:"Sorted, de-duplicated changed paths, truncated at the query entry bound.",items:{type:"string"},type:"array"},conflicted:{format:"uint32",minimum:0,type:"integer"},head:{$ref:"#/$defs/GitHeadStateV1"},ignored:{format:"uint32",minimum:0,type:"integer"},operation:{$ref:"#/$defs/GitOperationStateV1"},repository:{$ref:"#/$defs/RepositoryId"},schema_version:{type:"string"},staged:{format:"uint32",minimum:0,type:"integer"},unstaged:{format:"uint32",minimum:0,type:"integer"},untracked:{format:"uint32",minimum:0,type:"integer"}},required:["repository","head","operation","staged","unstaged","conflicted","untracked","ignored","changed_paths","schema_version"],type:"object"},HunkDirectionV1:yG,HunkRefV1:yB,ManifestDigest:gl,RepositoryId:_v,UtcMicros:vK,WorktreeId:$M},$schema:"https://json-schema.org/draft/2020-12/schema",description:"Actual payload emitted by each public Git read operation.",oneOf:[{properties:{query:{const:"status",type:"string"},result:{$ref:"#/$defs/GitQueryEnvelopeV1"}},required:["query","result"],type:"object"},{properties:{query:{const:"diff",type:"string"},result:{$ref:"#/$defs/GitQueryEnvelopeV12"}},required:["query","result"],type:"object"},{properties:{query:{const:"history",type:"string"},result:{$ref:"#/$defs/GitQueryEnvelopeV13"}},required:["query","result"],type:"object"},{properties:{query:{const:"blame",type:"string"},result:{$ref:"#/$defs/GitQueryEnvelopeV14"}},required:["query","result"],type:"object"},{properties:{query:{const:"hunks",type:"string"},result:{$ref:"#/$defs/GitQueryEnvelopeV15"}},required:["query","result"],type:"object"}],title:"GitReadResultV1"},{$defs:{GitOidV1:yx,GitSurfaceDiffScopeV1:yW},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Request shape for the public `git_diff` surface.",properties:{base:{anyOf:[{$ref:"#/$defs/GitOidV1"},{type:"null"}]},head:{anyOf:[{$ref:"#/$defs/GitOidV1"},{type:"null"}]},max_bytes:{format:"uint64",minimum:0,type:["integer","null"]},max_entries:{format:"uint32",minimum:0,type:["integer","null"]},scope:{$ref:"#/$defs/GitSurfaceDiffScopeV1",default:"working_tree"}},title:"GitDiffSurfaceRequest",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Request shape for the public `git_history` surface.",properties:{count:{format:"uint32",minimum:0,type:["integer","null"]},first_parent:{default:!1,type:"boolean"},follow:{default:!1,type:"boolean"},max_bytes:{format:"uint64",minimum:0,type:["integer","null"]},max_entries:{format:"uint32",minimum:0,type:["integer","null"]},path:{type:["string","null"]}},title:"GitHistorySurfaceRequest",type:"object"},{$defs:{GitSurfaceDiffScopeV1:yW},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Request shape for the public `git_hunks` surface.\n\nThe daemon captures exact repository state itself and injects the private\npreview binding after capture, so the public wire carries only the diff\nscope (commit ranges cannot mint applicable hunks).",properties:{max_bytes:{format:"uint64",minimum:0,type:["integer","null"]},max_entries:{format:"uint32",minimum:0,type:["integer","null"]},scope:{$ref:"#/$defs/GitSurfaceDiffScopeV1",default:"working_tree"}},title:"GitHunksSurfaceRequest",type:"object"},{$defs:{GitIndexPreviewId:yq,GitIndexTransactionOperationV1:yI,ManifestDigest:gl},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Public MCP/CLI request for one daemon-owned Git index preview.",properties:{operation:{$ref:"#/$defs/GitIndexTransactionOperationV1"},preview_input_id:{anyOf:[{$ref:"#/$defs/GitIndexPreviewId"},{type:"null"}],default:null,description:"Hunk preview input minted by `git_hunks`; required for stage/unstage."},selected_hunk_digests:{default:[],description:"Selection digests drawn from the referenced preview input.",items:{$ref:"#/$defs/ManifestDigest"},type:"array"}},required:["operation"],title:"GitPreviewSurfaceRequest",type:"object"},{$defs:{GitBlobExpectationV1:yv,GitCoverageV1:yS,GitDegradationV1:yk,GitFileModeV1:yw,GitHeadStateV1:yR,GitIndexEntryExpectationV1:yV,GitIndexPreviewDispositionV1:{description:"Whether a captured preview may reach the daemon's native apply path.",oneOf:[{properties:{state:{const:"applicable",type:"string"}},required:["state"],type:"object"},{properties:{reason:{$ref:"#/$defs/GitIndexUnsupportedStateV1"},state:{const:"unsupported",type:"string"}},required:["state","reason"],type:"object"}]},GitIndexPreviewId:yq,GitIndexTransactionOperationV1:yI,GitIndexUnsupportedStateV1:{description:"Why a preview is intentionally read-only. A caller must re-preview after\nresolving the condition; no variant grants a relaxed or partial apply.",enum:["bare_repository","detached_head","unborn_branch","index_lock_present","external_git_driver","unmerged_index","intent_to_add","split_index","sparse_index","unreadable_index","conflicted_working_tree","unreadable_working_tree","in_progress_operation","unsupported_object_format","binary_hunk","submodule","symlink","file_mode_only","rename_or_copy","filters_or_end_of_line","partial_hunk_selection"],type:"string"},GitObjectFormatV1:{description:"Repository object format, derived from object-id length.",enum:["sha1","sha256"],type:"string"},GitOidV1:yx,GitOperationStateV1:yj,HunkDirectionV1:yG,HunkRefV1:yB,ManifestDigest:gl,ProjectId:g2,RepositoryId:_v,RepositoryIndexSnapshotV1:{additionalProperties:!1,properties:{checksum:{$ref:"#/$defs/ManifestDigest"},state:{$ref:"#/$defs/RepositoryIndexStateV1"},tree_id:{anyOf:[{$ref:"#/$defs/GitOidV1"},{type:"null"}]},unmerged_stage_digest:{anyOf:[{$ref:"#/$defs/ManifestDigest"},{type:"null"}]}},required:["checksum","state"],type:"object"},RepositoryIndexStateV1:{enum:["clean","staged","unmerged","intent_to_add","split","sparse","unreadable"],type:"string"},RepositoryStateSnapshotV1:{additionalProperties:!1,description:"Immutable content-addressed native repository state. Missing/partial\nevidence remains typed by fields and coverage instead of being upgraded to\na guessed clean snapshot.",properties:{adapter_revision:{description:"Revision of the fixed native adapter that interpreted this state.",type:["string","null"]},attributes_digest:{anyOf:[{$ref:"#/$defs/ManifestDigest"},{type:"null"}]},captured_at:{$ref:"#/$defs/UtcMicros"},configuration_digest:{anyOf:[{$ref:"#/$defs/ManifestDigest"},{type:"null"}]},coverage:{$ref:"#/$defs/GitCoverageV1"},filesystem_capabilities_digest:{anyOf:[{$ref:"#/$defs/ManifestDigest"},{type:"null"}]},git_version:{description:"Exact native Git implementation observed by the fixed adapter. A\nread-only partial snapshot may omit this, but omitted native evidence\nis never mutation eligible.",type:["string","null"]},head:{$ref:"#/$defs/GitHeadStateV1"},index:{$ref:"#/$defs/RepositoryIndexSnapshotV1"},object_format:{$ref:"#/$defs/GitObjectFormatV1"},observation_epoch:{format:"uint64",minimum:0,type:"integer"},operation_state:{$ref:"#/$defs/GitOperationStateV1"},project_id:{$ref:"#/$defs/ProjectId"},refs_digest:{anyOf:[{$ref:"#/$defs/ManifestDigest"},{type:"null"}],description:"Digest of the complete native ref namespace at capture time."},repository_id:{$ref:"#/$defs/RepositoryId"},snapshot_id:{type:"string"},sparse_digest:{anyOf:[{$ref:"#/$defs/ManifestDigest"},{type:"null"}]},submodule_digest:{anyOf:[{$ref:"#/$defs/ManifestDigest"},{type:"null"}]},working_tree:{$ref:"#/$defs/RepositoryWorkingTreeSnapshotV1"},worktree_id:{anyOf:[{$ref:"#/$defs/WorktreeId"},{type:"null"}]}},required:["snapshot_id","project_id","repository_id","observation_epoch","object_format","head","index","working_tree","operation_state","captured_at","coverage"],type:"object"},RepositoryWorkingTreeSnapshotV1:{additionalProperties:!1,properties:{ignored_collision_digest:{anyOf:[{$ref:"#/$defs/ManifestDigest"},{type:"null"}]},state:{$ref:"#/$defs/RepositoryWorkingTreeStateV1"},tracked_digest:{$ref:"#/$defs/ManifestDigest"},untracked_name_digest:{anyOf:[{$ref:"#/$defs/ManifestDigest"},{type:"null"}]}},required:["state","tracked_digest"],type:"object"},RepositoryWorkingTreeStateV1:{enum:["clean","tracked_dirty","untracked_only","mixed","conflicted","unreadable"],type:"string"},UtcMicros:vK,WorktreeId:$M},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Immutable, content-bound preview for one daemon-serialized index\ntransaction. Applicability is only a precondition: the daemon must capture\nand compare the entire snapshot and every contained `HunkRefV1` again\nimmediately before a native mutation.",properties:{candidate_index_tree:{anyOf:[{$ref:"#/$defs/GitOidV1"},{type:"null"}]},created_at:{$ref:"#/$defs/UtcMicros"},disposition:{$ref:"#/$defs/GitIndexPreviewDispositionV1"},expires_at:{$ref:"#/$defs/UtcMicros"},operation:{$ref:"#/$defs/GitIndexTransactionOperationV1"},preview_digest:{$ref:"#/$defs/ManifestDigest"},preview_id:{$ref:"#/$defs/GitIndexPreviewId"},repository_snapshot:{$ref:"#/$defs/RepositoryStateSnapshotV1"},repository_snapshot_digest:{$ref:"#/$defs/ManifestDigest"},selected_hunks:{items:{$ref:"#/$defs/HunkRefV1"},type:"array"}},required:["preview_id","operation","repository_snapshot","repository_snapshot_digest","selected_hunks","disposition","created_at","expires_at","preview_digest"],title:"GitIndexPreviewV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Request shape for the public `git_status` surface.",properties:{max_bytes:{format:"uint64",minimum:0,type:["integer","null"]},max_entries:{format:"uint32",minimum:0,type:["integer","null"]}},title:"GitStatusSurfaceRequest",type:"object"},{$defs:{StackDeliveryWatermarkId:vS,StackSignalId:vw},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"The public, transport-neutral request for one durable stack signal.",properties:{expected_watermark_id:{anyOf:[{$ref:"#/$defs/StackDeliveryWatermarkId"},{type:"null"}]},signal_id:{anyOf:[{$ref:"#/$defs/StackSignalId"},{type:"null"}]}},title:"GitHubStackSignalExpandSurfaceRequest",type:"object"},{$defs:{BranchStackRevisionId:fh,GitHubStackSignalEvidenceRefV1:{additionalProperties:!1,description:"Bounded evidence for the exact signal the coordinator authorized.\n\nProvider payloads, paths, commit bodies, and delivery recipients remain\nbehind the durable signal evidence rather than copied to this result.",properties:{github_stack_digest:{anyOf:[{$ref:"#/$defs/ManifestDigest"},{type:"null"}]},kind:{$ref:"#/$defs/StackSignalKindV1"},native_source:{$ref:"#/$defs/GitHubStackSignalNativeSourceV1"},observed_at:{$ref:"#/$defs/UtcMicros"},signal_id:{$ref:"#/$defs/StackSignalId"},stack_revision_digest:{$ref:"#/$defs/ManifestDigest"},stack_revision_id:{$ref:"#/$defs/BranchStackRevisionId"},state_digest:{$ref:"#/$defs/ManifestDigest"},watermark_id:{$ref:"#/$defs/StackDeliveryWatermarkId"}},required:["signal_id","watermark_id","kind","stack_revision_id","stack_revision_digest","state_digest","observed_at","native_source"],type:"object"},GitHubStackSignalExpandUnavailableV1:{description:"Truthful non-success outcomes for signal expansion.\n\n`Concealed` intentionally combines absent and unauthorized signal handles;\nexposing that distinction would turn this operation into a signal probe.",enum:["concealed","stale","native_evidence_unavailable","authority_unmounted","cancelled"],type:"string"},GitHubStackSignalNativePreviewV1:{additionalProperties:!1,description:"Exact branch pair and native preflight that produced the selected signal.",properties:{destination_ref:{$ref:"#/$defs/RefId"},destination_tip:{$ref:"#/$defs/GitOidV1"},direction:{$ref:"#/$defs/NativeIntegrationDirectionV1"},disposition:{$ref:"#/$defs/NativeIntegrationPreviewDispositionV1"},preview_digest:{$ref:"#/$defs/ManifestDigest"},preview_id:{$ref:"#/$defs/NativeIntegrationPreviewId"},source_ref:{$ref:"#/$defs/RefId"},source_tip:{$ref:"#/$defs/GitOidV1"}},required:["preview_id","preview_digest","direction","source_ref","destination_ref","source_tip","destination_tip","disposition"],type:"object"},GitHubStackSignalNativeSourceV1:{oneOf:[{properties:{preview:{$ref:"#/$defs/GitHubStackSignalNativePreviewV1"},source:{const:"preflight",type:"string"}},required:["source","preview"],type:"object"},{properties:{preview:{$ref:"#/$defs/GitHubStackSignalNativePreviewV1"},source:{const:"terminal",type:"string"},terminal:{$ref:"#/$defs/GitHubStackSignalNativeTerminalV1"}},required:["source","preview","terminal"],type:"object"}]},GitHubStackSignalNativeTerminalV1:{additionalProperties:!1,properties:{completed_at:{$ref:"#/$defs/UtcMicros"},final_ref_tip:{$ref:"#/$defs/GitOidV1"},outcome:{$ref:"#/$defs/NativeIntegrationTerminalOutcomeV1"},receipt_digest:{$ref:"#/$defs/ManifestDigest"},transaction_id:{$ref:"#/$defs/NativeIntegrationTransactionId"}},required:["transaction_id","receipt_digest","outcome","final_ref_tip","completed_at"],type:"object"},GitOidV1:yx,ManifestDigest:gl,MechanicalIntegrationModeV1:gp,NativeIntegrationDirectionV1:gV,NativeIntegrationPreviewDispositionV1:gq,NativeIntegrationPreviewId:gI,NativeIntegrationTerminalOutcomeV1:gC,NativeIntegrationTransactionId:gT,NativeIntegrationUnavailabilityV1:gO,RefId:_u,StackDeliveryWatermarkId:vS,StackSignalId:vw,StackSignalKindV1:{description:"Durable classification of one GitHub stack transition.",enum:["dependency_ready","actual_conflict","stack_tip_drift","pull_request_drift","ci_evaluated_commit_drift","integration_committed","integration_needs_inspection"],type:"string"},UtcMicros:vK},$schema:"https://json-schema.org/draft/2020-12/schema",oneOf:[{properties:{evidence:{$ref:"#/$defs/GitHubStackSignalEvidenceRefV1"},outcome:{const:"expanded",type:"string"}},required:["outcome","evidence"],type:"object"},{properties:{outcome:{const:"unavailable",type:"string"},reason:{$ref:"#/$defs/GitHubStackSignalExpandUnavailableV1"}},required:["outcome","reason"],type:"object"}],title:"GitHubStackSignalExpandSurfaceResultV1"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{limit:{description:"Maximum number of results to return (default: 10, at most 100).",format:"uint32",minimum:0,type:["integer","null"]},path:{description:"Filter to files under this directory path (e.g. 'src/main/java').",type:["string","null"]}},title:"GodClassSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fE,CodeIndexConvergenceParkedV1:fA,CodeIndexStalenessStateV1:fz,GodClassEntryV1:{additionalProperties:!1,properties:{fields:{format:"uint64",minimum:0,type:"integer"},file:{type:"string"},id:{type:"string"},kind:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},methods:{format:"uint64",minimum:0,type:"integer"},name:{type:"string"},total_members:{format:"uint64",minimum:0,type:"integer"}},required:["id","name","kind","file","line","methods","fields","total_members"],type:"object"},PrimitiveFreshnessStateV1:gG,PrimitiveIndexingStateV1:gB,PrimitiveSearchFreshnessV1:gQ},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},ranking:{items:{$ref:"#/$defs/GodClassEntryV1"},type:"array"},result_count:{format:"uint64",minimum:0,type:"integer"}},required:["result_count","ranking"],title:"GodClassResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{case_sensitive:{description:"Match case-sensitively (default: false = case-insensitive).",type:["boolean","null"]},context_lines:{description:"Lines of surrounding context to include per hit (default: 0, max: 3).",format:"uint32",minimum:0,type:["integer","null"]},fixed_strings:{description:"Treat pattern as a literal string instead of a regex (default: false).",type:["boolean","null"]},max_results:{description:"Maximum number of matching lines to return (default: 50, max: 200).",format:"uint32",minimum:0,type:["integer","null"]},path_glob:{description:"Optional glob restricting which files are searched, matched against\nproject-relative paths (e.g. 'src/**/*.rs').",type:["string","null"]},pattern:{description:"Content to search for. Treated as a regular expression unless\nfixed_strings is true.",type:"string"}},required:["pattern"],title:"GrepSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fE,CodeIndexConvergenceParkedV1:fA,CodeIndexStalenessStateV1:fz,CoverageCompleteness:hP,CoverageDomainState:{additionalProperties:!1,properties:{completeness:{$ref:"#/$defs/CoverageCompleteness"},domain:{$ref:"#/$defs/EvidenceDomain"}},required:["domain","completeness"],type:"object"},EvidenceCoverage:{additionalProperties:!1,description:"Deterministic coverage fold input for an evidence packet.",properties:{completeness:{$ref:"#/$defs/CoverageCompleteness"},domains:{items:{$ref:"#/$defs/CoverageDomainState"},type:"array"},eligible:{format:"uint64",minimum:0,type:["integer","null"]},requested_domains:{items:{$ref:"#/$defs/EvidenceDomain"},type:"array"},returned:{format:"uint64",minimum:0,type:"integer"},visited:{format:"uint64",minimum:0,type:["integer","null"]}},required:["requested_domains","returned","completeness","domains"],type:"object"},EvidenceDomain:{description:"Requested evidence domain for bounded coverage and omissions.",enum:["symbol","source","graph","test","temporal","anchor","operational","diagnostic"],type:"string"},GrepGraphEnrichmentV1:{description:"Whether the verified graph resolved each hit's enclosing symbol. Hits are\nthe lexical answer either way.",oneOf:[{additionalProperties:!1,properties:{enriched:{format:"uint64",minimum:0,type:"integer"},returned:{format:"uint64",minimum:0,type:"integer"},status:{const:"complete",type:"string"}},required:["status","enriched","returned"],type:"object"},{additionalProperties:!1,properties:{detail:{type:"string"},reason_code:{type:"string"},retryable:{type:"boolean"},status:{const:"unavailable",type:"string"}},required:["status","reason_code","retryable","detail"],type:"object"}]},GrepMatchV1:{additionalProperties:!1,properties:{after:{items:{type:"string"},type:"array"},before:{items:{type:"string"},type:"array"},file:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},node_id:{type:["string","null"]},symbol:{description:"The smallest verified graph symbol enclosing the hit.",type:["string","null"]},text:{type:"string"}},required:["file","line","text"],type:"object"},GrepScanOmissionsV1:{additionalProperties:!1,description:"What the bounded scan skipped, by cause; absent when it skipped nothing.",properties:{oversized_files:{description:"Files larger than the interactive scan byte limit.",format:"uint64",minimum:0,type:"integer"},oversized_lines:{description:"Lines longer than the scan line byte limit.",format:"uint64",minimum:0,type:"integer"},unavailable_sources:{description:"Source candidates that could not be read during the scan.",format:"uint64",minimum:0,type:"integer"}},required:["oversized_files","oversized_lines","unavailable_sources"],type:"object"},Omission:{additionalProperties:!1,properties:{count:{format:"uint64",minimum:0,type:"integer"},domain:{$ref:"#/$defs/EvidenceDomain"},reason:{$ref:"#/$defs/OmissionReason"}},required:["domain","count","reason"],type:"object"},OmissionReason:{description:"Safe reason why authorized requested evidence was omitted.",oneOf:[{enum:["budget","redacted","unavailable","unsupported","stale","failed","cancelled","timed_out","conflict"],type:"string"},{const:"macro_body_unparsed",description:"Evidence came from a macro body that was not expanded, so what the\nexpansion defines or calls is not covered.",type:"string"},{const:"import_unmodeled",description:"A caller sits under a `use` whose binding the index could not model\n(a glob in a block or inline module), so whether it calls the target\nis not covered.",type:"string"},{const:"cursor_expired",description:"The continuation cursor can no longer be redeemed (its lifetime ended\nor the snapshot it pages is gone); restart the request without it.",type:"string"},{const:"cursor_foreign",description:"The continuation cursor was issued for another project, worktree, or\nref; redeem it where it was issued.",type:"string"}]},PrimitiveFreshnessStateV1:gG,PrimitiveIndexingStateV1:gB,PrimitiveSearchFreshnessV1:gQ},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{coverage:{$ref:"#/$defs/EvidenceCoverage"},files_scanned:{format:"uint64",minimum:0,type:"integer"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},graph_enrichment:{$ref:"#/$defs/GrepGraphEnrichmentV1"},match_count:{format:"uint64",minimum:0,type:"integer"},omissions:{items:{$ref:"#/$defs/Omission"},type:"array"},results:{items:{$ref:"#/$defs/GrepMatchV1"},type:"array"},scan_omissions:{$ref:"#/$defs/GrepScanOmissionsV1"},truncated:{type:"boolean"}},required:["results","match_count","files_scanned","truncated","coverage","omissions","graph_enrichment"],title:"GrepSearchResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{details:{description:"If true, include full dimension breakdown (default: false).",type:["boolean","null"]},path:{description:"Filter to files under this directory path.",type:["string","null"]}},title:"HealthSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fE,CodeIndexConvergenceParkedV1:fA,CodeIndexStalenessStateV1:fz,HealthAcyclicityV1:{additionalProperties:!1,properties:{edges_in_cycles:{format:"uint64",minimum:0,type:"integer"},score:{format:"double",type:"number"},source:{type:"string"}},required:["score","edges_in_cycles","source"],type:"object"},HealthCoverageDisciplineV1:{additionalProperties:!1,properties:{score:{format:"double",type:"number"},skip_test_coverage_count:{format:"uint64",minimum:0,type:"integer"},source:{type:"string"},total_fns:{format:"uint64",minimum:0,type:"integer"}},required:["score","skip_test_coverage_count","total_fns","source"],type:"object"},HealthDepthV1:{additionalProperties:!1,properties:{ideal_chain:{format:"uint64",minimum:0,type:"integer"},max_chain:{format:"uint64",minimum:0,type:"integer"},score:{format:"double",type:"number"},source:{type:"string"}},required:["score","max_chain","ideal_chain","source"],type:"object"},HealthDimensionsV1:{additionalProperties:!1,properties:{acyclicity:{$ref:"#/$defs/HealthAcyclicityV1"},coverage_discipline:{$ref:"#/$defs/HealthCoverageDisciplineV1"},depth:{$ref:"#/$defs/HealthDepthV1"},equality:{$ref:"#/$defs/HealthEqualityV1"},modularity:{$ref:"#/$defs/HealthModularityV1"},redundancy:{$ref:"#/$defs/HealthRedundancyV1"}},required:["acyclicity","depth","equality","redundancy","modularity","coverage_discipline"],type:"object"},HealthEqualityV1:{additionalProperties:!1,properties:{gini:{format:"double",type:"number"},incomplete_complexity_symbols:{format:"uint64",minimum:0,type:"integer"},interpretation:{type:"string"},score:{format:"double",type:"number"},source:{type:"string"}},required:["score","gini","interpretation","incomplete_complexity_symbols","source"],type:"object"},HealthModularityV1:{additionalProperties:!1,properties:{components_after_hub_removal:{format:"uint64",minimum:0,type:"integer"},interpretation:{type:"string"},score:{format:"double",type:"number"},source:{type:"string"}},required:["score","interpretation","components_after_hub_removal","source"],type:"object"},HealthRedundancyV1:{additionalProperties:!1,properties:{dead_count:{format:"uint64",minimum:0,type:"integer"},score:{format:"double",type:"number"},source:{type:"string"},total_fns:{format:"uint64",minimum:0,type:"integer"}},required:["score","dead_count","total_fns","source"],type:"object"},HealthWeightsV1:{additionalProperties:!1,properties:{note:{type:"string"}},required:["note"],type:"object"},PrimitiveFreshnessStateV1:gG,PrimitiveIndexingStateV1:gB,PrimitiveSearchFreshnessV1:gQ},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"`dimensions` and `weights` are present exactly when the request asked for\n`details`.",properties:{dimensions:{anyOf:[{$ref:"#/$defs/HealthDimensionsV1"},{type:"null"}]},files_analyzed:{format:"uint64",minimum:0,type:"integer"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},panel:{description:"Dimension names, worst score first.",type:"string"},quality_signal:{description:"Geometric mean of the dimensions, scaled to 0-10000. A breakdown of\n`panel`, not a number to maximize.",format:"uint32",minimum:0,type:"integer"},weights:{anyOf:[{$ref:"#/$defs/HealthWeightsV1"},{type:"null"}]}},required:["quality_signal","files_analyzed"],title:"HealthResultV1",type:"object"},{$defs:{PageRequest:gU,ResultProjection:_w,RetrievalOrder:_I,RetrievalRequestMeta:_x,TemporalModeV1:vA,UtcMicros:vK},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{before_cursor:{type:["string","null"]},meta:{$ref:"#/$defs/RetrievalRequestMeta"},path_prefix:{type:["string","null"]}},required:["meta"],title:"HealthDeltaRequest",type:"object"},{$defs:{HealthDeltaCoverageV1:{additionalProperties:!1,properties:{completeness:{type:"string"},denominator:{format:"uint64",minimum:0,type:["integer","null"]},eligible:{format:"uint64",minimum:0,type:["integer","null"]},visited:{format:"uint64",minimum:0,type:["integer","null"]}},required:["completeness"],type:"object"},HealthDeltaCurrentnessV1:{additionalProperties:!1,properties:{observed_at:{$ref:"#/$defs/UtcMicros"},state:{type:"string"}},required:["state","observed_at"],type:"object"},HealthDeltaPointV1:{additionalProperties:!1,properties:{dimensions:{additionalProperties:{$ref:"#/$defs/HealthDimensionPointV1"},type:"object"},files_analyzed:{format:"uint64",minimum:0,type:"integer"},function_denominator:{format:"uint64",minimum:0,type:"integer"},observed_at:{$ref:"#/$defs/UtcMicros"},quality_signal:{format:"uint32",minimum:0,type:"integer"},watermark:{$ref:"#/$defs/ManifestDigest"}},required:["watermark","observed_at","quality_signal","files_analyzed","function_denominator","dimensions"],type:"object"},HealthDeltaScopeV1:{additionalProperties:!1,properties:{path_prefix:{type:["string","null"]},project_id:{type:["string","null"]},scope_digest:{$ref:"#/$defs/ManifestDigest"}},required:["scope_digest"],type:"object"},HealthDimensionDeltaV1:{additionalProperties:!1,properties:{after_denominator:{format:"uint64",minimum:0,type:["integer","null"]},after_ppm:{format:"uint64",minimum:0,type:"integer"},before_denominator:{format:"uint64",minimum:0,type:["integer","null"]},before_ppm:{format:"uint64",minimum:0,type:"integer"},delta_ppm:{format:"int64",type:"integer"},status:{type:"string"}},required:["before_ppm","after_ppm","delta_ppm","status"],type:"object"},HealthDimensionPointV1:{additionalProperties:!1,properties:{denominator:{format:"uint64",minimum:0,type:["integer","null"]},score_ppm:{format:"uint64",minimum:0,type:"integer"}},required:["score_ppm"],type:"object"},ManifestDigest:gl,UtcMicros:vK},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{after:{$ref:"#/$defs/HealthDeltaPointV1"},after_cursor:{type:"string"},before:{$ref:"#/$defs/HealthDeltaPointV1"},before_cursor:{type:"string"},coverage:{$ref:"#/$defs/HealthDeltaCoverageV1"},currentness:{$ref:"#/$defs/HealthDeltaCurrentnessV1"},delta:{format:"int64",type:"integer"},dimensions:{additionalProperties:{$ref:"#/$defs/HealthDimensionDeltaV1"},type:"object"},pass:{type:"boolean"},schema_version:{format:"uint32",minimum:0,type:"integer"},scope:{$ref:"#/$defs/HealthDeltaScopeV1"}},required:["schema_version","scope","before","after","before_cursor","after_cursor","pass","delta","dimensions","coverage","currentness"],title:"HealthDeltaResult",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"The health read takes no parameters: it reports one serving status, with no\npage, projection, or temporal selection to make. The page and deadline\ncontrols every surface supplies travel in the dispatch envelope, not here.",title:"HealthReadRequest",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{status:{type:"string"}},required:["status"],title:"HealthReadResult",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{include_pending_payloads:{default:!1,description:"Include staged Hermes skill-write payloads (default: false).",type:"boolean"},include_skill_bodies:{default:!1,description:"Include bounded SKILL.md contents (default: false).",type:"boolean"}},title:"HermesSkillBridgeSurfaceRequestV1",type:"object"},{$defs:{AutomationReadStatusV1:m8,HermesPendingSkillWrite:{properties:{action:{type:["string","null"]},created_at:!0,id:{type:"string"},name:{type:["string","null"]},origin:{type:["string","null"]},payload:!0,source_path:{type:"string"},summary:{type:["string","null"]}},required:["id","source_path"],type:"object"},HermesSkillBridgeContracts:{properties:{discovery_policy:{type:"string"},lifecycle_owner:{type:"string"},mutation_policy:{type:"string"}},required:["lifecycle_owner","mutation_policy","discovery_policy"],type:"object"},HermesSkillBridgeSnapshot:{properties:{agent_home:{type:"string"},archive_count:{format:"uint",minimum:0,type:"integer"},contracts:{$ref:"#/$defs/HermesSkillBridgeContracts"},pending_skill_corrupt_count:{format:"uint",minimum:0,type:"integer"},pending_skill_count:{format:"uint",minimum:0,type:"integer"},pending_skills:{items:{$ref:"#/$defs/HermesPendingSkillWrite"},type:"array"},skill_count:{format:"uint",minimum:0,type:"integer"},skills:{items:{$ref:"#/$defs/HermesSkillSummary"},type:"array"},skills_dir:{type:"string"},usage_record_count:{format:"uint",minimum:0,type:"integer"},usage_records:{additionalProperties:!0,description:"Hermes-owned usage telemetry keyed by skill name, as Hermes wrote it.",type:"object"}},required:["agent_home","skills_dir","skill_count","pending_skill_count","pending_skill_corrupt_count","usage_record_count","archive_count","skills","pending_skills","usage_records","contracts"],type:"object"},HermesSkillSummary:{properties:{body_markdown:{type:["string","null"]},category:{type:["string","null"]},description:{type:["string","null"]},name:{type:"string"},path:{type:"string"},pending_write_ids:{items:{type:"string"},type:"array"},usage:!0},required:["name","path","pending_write_ids"],type:"object"}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{bridge:{$ref:"#/$defs/HermesSkillBridgeSnapshot"},status:{$ref:"#/$defs/AutomationReadStatusV1"}},required:["status","bridge"],title:"HermesSkillBridgeResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",oneOf:[{additionalProperties:!1,description:"Reset the project's local token counter.",properties:{action:{const:"reset_counter",type:"string"}},required:["action"],type:"object"},{additionalProperties:!1,description:"Admit one Hook V2 envelope for the bound project.",properties:{action:{const:"hook_v2_admit",type:"string"},envelope:!0,native_lifecycle:!0,native_session_id:{description:"The host's native session id; it binds only when it hashes to the\nenvelope's protected session.",type:["string","null"]}},required:["action","envelope"],type:"object"},{additionalProperties:!1,description:"Commit a Context Scout delivery receipt for guidance the last\nadmission handed out.",properties:{action:{const:"hook_v2_delivery_receipt",type:"string"},receipt:!0},required:["action","receipt"],type:"object"},{additionalProperties:!1,description:"Acknowledge delivery of an advisory feedback notice.",properties:{action:{const:"hook_v2_feedback_notice_delivery",type:"string"},envelope:!0,feedback_notice:!0},required:["action","envelope","feedback_notice"],type:"object"},{additionalProperties:!1,description:"Land a host transcript in the owning session store.",properties:{action:{const:"ingest_transcript",type:"string"},event_json:{description:"The host's raw hook event, for providers that locate the transcript\nfrom it.",type:["string","null"]},max_new_bytes:{description:"Byte budget for this pass across every scanned source.",format:"uint64",minimum:0,type:["integer","null"]},messages:{description:"One turn the host inlined instead of a source to scan.",items:!0,type:["array","null"]},provider:{type:"string"},session_id:{type:["string","null"]},user_scope:{description:"Land the transcript in the profile's user store instead of the\nproject's.",type:"boolean"}},required:["action","provider","user_scope"],type:"object"},{additionalProperties:!1,description:"Codex `PostCompact` pressure evidence.",properties:{action:{const:"codex_compact",type:"string"},event_json:{type:"string"}},required:["action","event_json"],type:"object"},{additionalProperties:!1,description:"Claude `PostCompact` pressure evidence; `user_scope` routes it to the\nprofile.",properties:{action:{const:"claude_compact",type:"string"},event_json:{type:"string"},user_scope:{type:"boolean"}},required:["action","event_json","user_scope"],type:"object"},{additionalProperties:!1,description:"Cursor `preCompact` pressure evidence.",properties:{action:{const:"cursor_compact",type:"string"},event_json:{type:"string"}},required:["action","event_json"],type:"object"},{additionalProperties:!1,description:"Review a finished user session.",properties:{action:{const:"user_review",type:"string"},provider:{type:"string"},session_id:{type:["string","null"]}},required:["action","provider"],type:"object"},{additionalProperties:!1,description:"Record a Hermes terminal receipt without a project route.",properties:{action:{const:"hermes_receipt",type:"string"},event:!0},required:["action","event"],type:"object"},{additionalProperties:!1,description:"Admit a native event without a project route into the profile's\nHook V2 ledger.",properties:{action:{const:"hook_v2_profile_admit",type:"string"},admission:!0},required:["action","admission"],type:"object"}],title:"HookRuntimeSurfaceRequestV1"},{$defs:{ContextScoutAddressV1:f5,ContextScoutStoreStatusV1:{enum:["stored","duplicate","superseded","unavailable"],type:"string"},HermesReceiptStatusV1:{oneOf:[{const:"recorded",description:"A terminal receipt was recorded.",type:"string"},{const:"ingested",description:"The turn was marked ingested and no receipt awaits review.",type:"string"},{const:"awaiting_transcript",description:"A receipt awaits a transcript that has not landed yet.",type:"string"}]},HookIngestAdmissionV1:{additionalProperties:!1,description:"The admission authority's verdict on one transcript ingest.",properties:{reason_code:{type:["string","null"]},retryable:{type:"boolean"},status:{description:"The session host-admission status, in its wire spelling.",type:"string"}},required:["status","retryable"],type:"object"},HookOrchestrationAdmissionV1:{description:"Outcome of admitting one hook envelope into the registered orchestrator.",enum:["enqueued","backpressured","unsupported_trigger","unavailable"],type:"string"},HookRuntimeDispositionV1:{description:"How the hook transport should treat a Hook V2 envelope.",oneOf:[{enum:["accepted"],type:"string"},{const:"catchup_required",description:"The published binding no longer authorizes the envelope; the host\nmust catch up before sending again.",type:"string"}]},HookV2RejectionReasonV1:{oneOf:[{const:"admission_identity_conflict",description:"The same event identity previously carried different bytes.",type:"string"}]}},$schema:"https://json-schema.org/draft/2020-12/schema",oneOf:[{additionalProperties:!1,properties:{action:{const:"reset_counter",type:"string"},reset:{type:"boolean"}},required:["action","reset"],type:"object"},{oneOf:[{properties:{context_scout_address:{anyOf:[{$ref:"#/$defs/ContextScoutAddressV1"},{type:"null"}]},disposition:{$ref:"#/$defs/HookRuntimeDispositionV1"},feedback_notice:{description:"The advisory `AdvisoryHookLookupNoticeV1` waiting for this\nworktree."},github_stack_signal_available:{type:"boolean"},orchestration:{$ref:"#/$defs/HookOrchestrationAdmissionV1"},ready_guidance:{description:"The hook's `HookReadyGuidanceV1`, when admission claimed one."},status:{const:"accepted",type:"string"}},required:["status","disposition","orchestration","github_stack_signal_available"],type:"object"},{description:"This exact envelope was already admitted; a retry may still receive\nguidance retained before a lost host response.",properties:{context_scout_address:{anyOf:[{$ref:"#/$defs/ContextScoutAddressV1"},{type:"null"}]},disposition:{$ref:"#/$defs/HookRuntimeDispositionV1"},ready_guidance:!0,status:{const:"exact_duplicate",type:"string"}},required:["status","disposition"],type:"object"},{properties:{disposition:{$ref:"#/$defs/HookRuntimeDispositionV1"},reason:{anyOf:[{$ref:"#/$defs/HookV2RejectionReasonV1"},{type:"null"}]},status:{const:"rejected",type:"string"}},required:["status","disposition"],type:"object"},{description:"Idempotency could not be recorded, so nothing was admitted.",properties:{status:{const:"backpressured",type:"string"}},required:["status"],type:"object"},{properties:{status:{const:"unavailable",type:"string"}},required:["status"],type:"object"}],properties:{action:{const:"hook_v2_admit",type:"string"}},required:["action"],type:"object"},{additionalProperties:!1,properties:{action:{const:"hook_v2_delivery_receipt",type:"string"},status:{$ref:"#/$defs/ContextScoutStoreStatusV1"}},required:["action","status"],type:"object"},{oneOf:[{properties:{status:{const:"stored",type:"string"}},required:["status"],type:"object"},{properties:{status:{const:"unavailable",type:"string"}},required:["status"],type:"object"},{properties:{disposition:{$ref:"#/$defs/HookRuntimeDispositionV1"},status:{const:"rejected",type:"string"}},required:["status","disposition"],type:"object"}],properties:{action:{const:"hook_v2_feedback_notice_delivery",type:"string"}},required:["action"],type:"object"},{additionalProperties:!1,properties:{action:{const:"ingest_transcript",type:"string"},admission:{$ref:"#/$defs/HookIngestAdmissionV1"},bytes_consumed:{format:"uint64",minimum:0,type:["integer","null"]},completed:{description:"False when the byte budget left work for a later pass.",type:"boolean"},cursor_advances:{format:"uint64",minimum:0,type:["integer","null"]},cursor_duplicates:{format:"uint64",minimum:0,type:["integer","null"]},deferred_by_byte_cap:{type:["boolean","null"]},deferred_sources:{format:"uint64",minimum:0,type:["integer","null"]},hint_outcomes:{description:"How emitted hook hints settled against the new project activity."},messages_upserted:{format:"uint64",minimum:0,type:"integer"},observation_duplicates:{format:"uint64",minimum:0,type:["integer","null"]},observations_committed:{format:"uint64",minimum:0,type:["integer","null"]},projection_duplicates:{format:"uint64",minimum:0,type:["integer","null"]},projections_completed:{format:"uint64",minimum:0,type:["integer","null"]},projections_skipped:{format:"uint64",minimum:0,type:["integer","null"]},provider:{type:"string"},records_quarantined:{format:"uint64",minimum:0,type:["integer","null"]},records_rejected:{format:"uint64",minimum:0,type:["integer","null"]},source_bytes_scanned:{format:"uint64",minimum:0,type:["integer","null"]},status:{type:"string"},user_scope:{type:"boolean"}},required:["action","provider","user_scope","completed","status","admission","messages_upserted"],type:"object"},{anyOf:[{description:"The LCM authority settled the compaction.",properties:{authority_outcome:!0,committed_state:!0,messages_upserted:{format:"uint64",minimum:0,type:"integer"},reason:{type:"string"},relation_projection_status:!0,retry_status:{type:["string","null"]},status:{type:"string"},summary_node_ids:{items:{type:"string"},type:"array"},summary_nodes_created:{format:"uint64",minimum:0,type:"integer"}},required:["status","reason","summary_nodes_created","summary_node_ids","relation_projection_status","authority_outcome","committed_state","messages_upserted"],type:"object"},{description:"The LCM authority answered without a compaction.",properties:{authority_outcome:!0,committed_state:!0,messages_upserted:{format:"uint64",minimum:0,type:"integer"},reason:{type:"string"},status:{type:"string"},summary_node_ids:{items:{type:"string"},type:"array"},summary_nodes_created:{format:"uint64",minimum:0,type:"integer"}},required:["status","reason","authority_outcome","committed_state","summary_nodes_created","summary_node_ids","messages_upserted"],type:"object"},{description:"No compaction ran: the authority is absent, the host supplied nothing\nto compact, or its summaries have no provenance.",properties:{reason:{type:"string"},relation_projection_status:!0,status:{type:"string"},summary_node_ids:{items:{type:"string"},type:"array"},summary_nodes_created:{format:"uint64",minimum:0,type:"integer"}},required:["status","reason","summary_nodes_created","summary_node_ids"],type:"object"},{description:"The host event named no session to compact.",properties:{messages_upserted:{format:"uint64",minimum:0,type:"integer"},reason:{type:"string"},status:{type:"string"}},required:["status","reason","messages_upserted"],type:"object"}],description:"A compaction hook's outcome. Variants are distinguished by the fields\nthey carry.",properties:{action:{const:"codex_compact",type:"string"}},required:["action"],type:"object"},{anyOf:[{description:"The LCM authority settled the compaction.",properties:{authority_outcome:!0,committed_state:!0,messages_upserted:{format:"uint64",minimum:0,type:"integer"},reason:{type:"string"},relation_projection_status:!0,retry_status:{type:["string","null"]},status:{type:"string"},summary_node_ids:{items:{type:"string"},type:"array"},summary_nodes_created:{format:"uint64",minimum:0,type:"integer"}},required:["status","reason","summary_nodes_created","summary_node_ids","relation_projection_status","authority_outcome","committed_state","messages_upserted"],type:"object"},{description:"The LCM authority answered without a compaction.",properties:{authority_outcome:!0,committed_state:!0,messages_upserted:{format:"uint64",minimum:0,type:"integer"},reason:{type:"string"},status:{type:"string"},summary_node_ids:{items:{type:"string"},type:"array"},summary_nodes_created:{format:"uint64",minimum:0,type:"integer"}},required:["status","reason","authority_outcome","committed_state","summary_nodes_created","summary_node_ids","messages_upserted"],type:"object"},{description:"No compaction ran: the authority is absent, the host supplied nothing\nto compact, or its summaries have no provenance.",properties:{reason:{type:"string"},relation_projection_status:!0,status:{type:"string"},summary_node_ids:{items:{type:"string"},type:"array"},summary_nodes_created:{format:"uint64",minimum:0,type:"integer"}},required:["status","reason","summary_nodes_created","summary_node_ids"],type:"object"},{description:"The host event named no session to compact.",properties:{messages_upserted:{format:"uint64",minimum:0,type:"integer"},reason:{type:"string"},status:{type:"string"}},required:["status","reason","messages_upserted"],type:"object"}],description:"A compaction hook's outcome. Variants are distinguished by the fields\nthey carry.",properties:{action:{const:"claude_compact",type:"string"}},required:["action"],type:"object"},{anyOf:[{description:"The LCM authority settled the compaction.",properties:{authority_outcome:!0,committed_state:!0,messages_upserted:{format:"uint64",minimum:0,type:"integer"},reason:{type:"string"},relation_projection_status:!0,retry_status:{type:["string","null"]},status:{type:"string"},summary_node_ids:{items:{type:"string"},type:"array"},summary_nodes_created:{format:"uint64",minimum:0,type:"integer"}},required:["status","reason","summary_nodes_created","summary_node_ids","relation_projection_status","authority_outcome","committed_state","messages_upserted"],type:"object"},{description:"The LCM authority answered without a compaction.",properties:{authority_outcome:!0,committed_state:!0,messages_upserted:{format:"uint64",minimum:0,type:"integer"},reason:{type:"string"},status:{type:"string"},summary_node_ids:{items:{type:"string"},type:"array"},summary_nodes_created:{format:"uint64",minimum:0,type:"integer"}},required:["status","reason","authority_outcome","committed_state","summary_nodes_created","summary_node_ids","messages_upserted"],type:"object"},{description:"No compaction ran: the authority is absent, the host supplied nothing\nto compact, or its summaries have no provenance.",properties:{reason:{type:"string"},relation_projection_status:!0,status:{type:"string"},summary_node_ids:{items:{type:"string"},type:"array"},summary_nodes_created:{format:"uint64",minimum:0,type:"integer"}},required:["status","reason","summary_nodes_created","summary_node_ids"],type:"object"},{description:"The host event named no session to compact.",properties:{messages_upserted:{format:"uint64",minimum:0,type:"integer"},reason:{type:"string"},status:{type:"string"}},required:["status","reason","messages_upserted"],type:"object"}],description:"A compaction hook's outcome. Variants are distinguished by the fields\nthey carry.",properties:{action:{const:"cursor_compact",type:"string"}},required:["action"],type:"object"},{additionalProperties:!1,properties:{action:{const:"hermes_receipt",type:"string"},status:{$ref:"#/$defs/HermesReceiptStatusV1"}},required:["action","status"],type:"object"},{oneOf:[{properties:{disposition:{$ref:"#/$defs/HookRuntimeDispositionV1"},status:{const:"accepted",type:"string"}},required:["status","disposition"],type:"object"},{properties:{disposition:{$ref:"#/$defs/HookRuntimeDispositionV1"},status:{const:"exact_duplicate",type:"string"}},required:["status","disposition"],type:"object"},{properties:{disposition:{$ref:"#/$defs/HookRuntimeDispositionV1"},status:{const:"rejected",type:"string"}},required:["status","disposition"],type:"object"},{properties:{status:{const:"unavailable",type:"string"}},required:["status"],type:"object"}],properties:{action:{const:"hook_v2_profile_admit",type:"string"}},required:["action"],type:"object"}],title:"HookRuntimeResultV1"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{limit:{description:"Maximum number of hotspots to return (default: 10, at most 100).",format:"uint32",minimum:0,type:["integer","null"]}},title:"HotspotsSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fE,CodeIndexConvergenceParkedV1:fA,CodeIndexStalenessStateV1:fz,HotspotV1:{additionalProperties:!1,properties:{churn:{description:"Commits touching `file` in the last 90 days. Absent when git history\ncould not be read; `0` means the file had no commits in that window.",format:"uint64",minimum:0,type:["integer","null"]},file:{type:"string"},id:{type:"string"},incoming:{format:"uint64",minimum:0,type:"integer"},kind:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},name:{type:"string"},outgoing:{format:"uint64",minimum:0,type:"integer"},total:{format:"uint64",minimum:0,type:"integer"}},required:["id","name","kind","file","line","incoming","outgoing","total"],type:"object"},PrimitiveFreshnessStateV1:gG,PrimitiveIndexingStateV1:gB,PrimitiveSearchFreshnessV1:gQ},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},hotspot_count:{format:"uint64",minimum:0,type:"integer"},hotspots:{items:{$ref:"#/$defs/HotspotV1"},type:"array"},unavailable_fields:{description:"Names a measurement this result could not make. `churn` means the\nranking is connectivity alone.",items:{type:"string"},type:"array"}},required:["hotspot_count","hotspots"],title:"HotspotsResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{max_depth:{format:"uint32",minimum:0,type:["integer","null"]},node_id:{type:"string"}},required:["node_id"],title:"NodeDepthSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fE,CodeIndexConvergenceParkedV1:fA,CodeIndexStalenessStateV1:fz,ImpactNodeV1:{additionalProperties:!1,properties:{depth:{format:"uint32",minimum:0,type:"integer"},file:{type:"string"},id:{type:"string"},kind:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},name:{type:"string"}},required:["id","name","kind","file","line","depth"],type:"object"},ImpactRadiusV1:{additionalProperties:!1,properties:{complete:{type:"boolean"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},node_count:{format:"uint",minimum:0,type:"integer"},nodes:{items:{$ref:"#/$defs/ImpactNodeV1"},type:"array"},unavailable_fields:{items:{type:"string"},type:"array"}},required:["node_count","complete","unavailable_fields","nodes"],type:"object"},PrimitiveFreshnessStateV1:gG,PrimitiveIndexingStateV1:gB,PrimitiveNotFoundV1:gJ,PrimitiveSearchFreshnessV1:gQ,PrimitiveSymbolLocationV1:gY},$schema:"https://json-schema.org/draft/2020-12/schema",anyOf:[{$ref:"#/$defs/ImpactRadiusV1"},{$ref:"#/$defs/PrimitiveNotFoundV1"}],title:"ImpactResultV1"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{limit:{description:"Maximum number of results to return (default: 10, at most 100).",format:"uint32",minimum:0,type:["integer","null"]},path:{description:"Filter to files under this directory path (e.g. 'src/main/java').",type:["string","null"]}},title:"InheritanceDepthSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fE,CodeIndexConvergenceParkedV1:fA,CodeIndexStalenessStateV1:fz,InheritanceDepthEntryV1:{additionalProperties:!1,properties:{depth:{format:"uint64",minimum:0,type:"integer"},file:{type:"string"},id:{type:"string"},kind:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},name:{type:"string"}},required:["id","name","kind","file","line","depth"],type:"object"},PrimitiveFreshnessStateV1:gG,PrimitiveIndexingStateV1:gB,PrimitiveSearchFreshnessV1:gQ},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},ranking:{items:{$ref:"#/$defs/InheritanceDepthEntryV1"},type:"array"},result_count:{format:"uint64",minimum:0,type:"integer"}},required:["result_count","ranking"],title:"InheritanceDepthResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Exact public input accepted by `tracedecay_insert_at`.",properties:{anchor:{type:"string"},before:{default:!1,type:"boolean"},content:{type:"string"},dry_run:{default:!1,type:"boolean"},expected_state:{description:"Exact `preview_digest`/`expected_state` returned by the dry run. Apply\nre-resolves the typed plan and rejects any candidate-state drift.",type:["string","null"]},idempotency_key:{type:["string","null"]},path:{type:"string"},verify:{default:!1,type:"boolean"}},required:["path","anchor","content"],title:"InsertAtSurfaceRequestV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Exact public input accepted by `tracedecay_insert_at_symbol`.",properties:{content:{type:"string"},dry_run:{default:!1,type:"boolean"},expected_state:{description:"Exact `preview_digest`/`expected_state` returned by the dry run. Apply\nre-resolves the typed plan and rejects any candidate-state drift.",type:["string","null"]},idempotency_key:{type:["string","null"]},position:{default:"after",type:"string"},symbol:{type:"string"},verify:{default:!1,type:"boolean"}},required:["symbol","content"],title:"InsertAtSymbolSurfaceRequestV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{limit:{description:"Maximum number of results to return (default: 10, at most 100).",format:"uint32",minimum:0,type:["integer","null"]},node_kind:{description:"Filter by node kind (e.g. 'class', 'method', 'function', 'interface',\n'enum', 'struct').",type:["string","null"]},path:{description:"Filter to files under this directory path (e.g. 'src/main/java').",type:["string","null"]}},title:"LargestSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fE,CodeIndexConvergenceParkedV1:fA,CodeIndexStalenessStateV1:fz,LargestEntryV1:{additionalProperties:!1,properties:{end_line:{format:"uint32",minimum:0,type:"integer"},file:{type:"string"},id:{type:"string"},kind:{type:"string"},lines:{format:"uint32",minimum:0,type:"integer"},name:{type:"string"},start_line:{format:"uint32",minimum:0,type:"integer"}},required:["id","name","kind","file","start_line","end_line","lines"],type:"object"},PrimitiveFreshnessStateV1:gG,PrimitiveIndexingStateV1:gB,PrimitiveSearchFreshnessV1:gQ},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},node_kind_filter:{type:["string","null"]},ranking:{items:{$ref:"#/$defs/LargestEntryV1"},type:"array"},result_count:{format:"uint64",minimum:0,type:"integer"}},required:["result_count","ranking"],title:"LargestResultV1",type:"object"},{$defs:{LcmDescribeTargetV1:{oneOf:[{properties:{kind:{const:"session",type:"string"}},required:["kind"],type:"object"},{properties:{kind:{const:"summary_node",type:"string"},node_id:{type:"string"}},required:["kind","node_id"],type:"object"},{properties:{kind:{const:"external_payload",type:"string"},payload_ref:{type:"string"}},required:["kind","payload_ref"],type:"object"}]}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{provider:{type:"string"},session_id:{type:"string"},target:{anyOf:[{$ref:"#/$defs/LcmDescribeTargetV1"},{type:"null"}]}},required:["provider","session_id"],title:"LcmDescribeRequestV1",type:"object"},{$defs:{ClosedUtcIntervalV1:fx,CompactLineageEdgeV1:{additionalProperties:!1,properties:{authority:{type:"string"},authorized:{type:"boolean"},kind:{type:"string"},knowledge_at:{format:"int64",type:"integer"},object_anchor_id:{type:"string"},subject_anchor_id:{type:"string"},supporting_anchor_ids:{items:{type:"string"},type:"array"}},required:["kind","subject_anchor_id","object_anchor_id","knowledge_at","authority","authorized","supporting_anchor_ids"],type:"object"},HydrationStateResultV1:yK,LcmContentRangeV1:yQ,LcmDescribeExternalPayloadV1:{additionalProperties:!1,properties:{byte_count:{format:"uint64",minimum:0,type:"integer"},char_count:{format:"uint64",minimum:0,type:"integer"},content_hash:{type:"string"},content_preview:{type:"string"},created_at:{format:"int64",type:"integer"},kind:{type:"string"},message_id:{type:"string"},metadata_json:{type:["string","null"]},payload_ref:{type:"string"},provider:{type:"string"},session_id:{type:"string"}},required:["payload_ref","provider","session_id","message_id","kind","content_hash","byte_count","char_count","created_at","content_preview"],type:"object"},LcmDescribeSourceOverviewV1:{additionalProperties:!1,properties:{expand_hint:{type:["string","null"]},node_id:{type:["string","null"]},role:{type:["string","null"]},source_kind:{type:"string"},source_ref:{$ref:"#/$defs/LcmSourceRefV1"},source_token_count:{format:"int64",type:["integer","null"]},storage_kind:{anyOf:[{$ref:"#/$defs/LcmStorageKindV1"},{type:"null"}]},store_id:{format:"int64",type:["integer","null"]},summary_token_count:{format:"int64",type:["integer","null"]}},required:["source_kind","source_ref"],type:"object"},LcmDescribeSummaryNodeV1:{additionalProperties:!1,properties:{children:{items:{$ref:"#/$defs/LcmDescribeSourceOverviewV1"},type:"array"},conversation_id:{type:"string"},created_at:{format:"int64",type:"integer"},depth:{format:"int64",type:"integer"},expand_hint:{type:["string","null"]},metadata_json:{type:["string","null"]},node_id:{type:"string"},source_count:{format:"uint",minimum:0,type:"integer"},source_time_end:{format:"int64",type:["integer","null"]},source_time_start:{format:"int64",type:["integer","null"]},source_token_count:{format:"int64",type:"integer"},summary_token_count:{format:"int64",type:"integer"}},required:["node_id","conversation_id","depth","summary_token_count","source_token_count","created_at","source_count","children"],type:"object"},LcmDescriptionV1:{additionalProperties:!1,properties:{external_payload:{anyOf:[{$ref:"#/$defs/LcmDescribeExternalPayloadV1"},{type:"null"}]},external_payload_count:{format:"int64",type:"integer"},first_store_id:{format:"int64",type:["integer","null"]},last_store_id:{format:"int64",type:["integer","null"]},provider:{type:"string"},raw_message_count:{format:"int64",type:"integer"},raw_messages:{items:{$ref:"#/$defs/LcmRawMessageOverviewV1"},type:"array"},session_id:{type:"string"},session_token_estimate:{format:"int64",type:["integer","null"]},summary_node:{anyOf:[{$ref:"#/$defs/LcmDescribeSummaryNodeV1"},{type:"null"}]},summary_node_count:{format:"int64",type:"integer"},summary_nodes:{items:{$ref:"#/$defs/LcmSummaryNodeOverviewV1"},type:"array"},target:{type:"string"}},required:["target","provider","session_id","raw_message_count","summary_node_count","external_payload_count","raw_messages","summary_nodes"],type:"object"},LcmRawMessageOverviewV1:{additionalProperties:!1,properties:{content_preview:{type:"string"},content_range:{$ref:"#/$defs/LcmContentRangeV1"},message_id:{type:"string"},payload_ref:{type:["string","null"]},role:{type:"string"},storage_kind:{$ref:"#/$defs/LcmStorageKindV1"},store_id:{format:"int64",type:"integer"}},required:["message_id","store_id","role","storage_kind","content_preview","content_range"],type:"object"},LcmRetrievalOutcomeV1:y4,LcmSourceRefV1:y6,LcmStorageKindV1:y3,LcmSummaryNodeOverviewV1:{additionalProperties:!1,properties:{conversation_id:{type:"string"},created_at:{format:"int64",type:"integer"},depth:{format:"int64",type:"integer"},node_id:{type:"string"},source_count:{format:"uint",minimum:0,type:"integer"},summary_preview:{type:"string"}},required:["node_id","conversation_id","depth","summary_preview","source_count","created_at"],type:"object"},LcmTemporalFieldsV1:y7,RetainedErrorV1:_R,RetainedOutcomeStatusV1:_P,RetrievalWorkerStatusV1:_j,SessionCoverageIntervalV1:_4,SessionCoverageReasonV1:_6,SessionCoverageRequestV1:_3,SessionCoverageStateV1:_9,SessionSourceCoverageV1:vo,TemporalCoverageV1:vT,TemporalExplanationV1:vO,TemporalFreshnessV1:vE,TemporalModeV1:vA,TemporalOmissionV1:vM,TemporalWatermarksV1:vW,UtcMicros:vK,ValidCoverageIntervalV1:vJ},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{capped_sessions:{additionalProperties:{format:"uint",minimum:0,type:"integer"},type:["object","null"]},description:{anyOf:[{$ref:"#/$defs/LcmDescriptionV1"},{type:"null"}]},error:{anyOf:[{$ref:"#/$defs/RetainedErrorV1"},{type:"null"}]},grain:{type:["string","null"]},lineage:{items:{$ref:"#/$defs/CompactLineageEdgeV1"},type:["array","null"]},omitted:{format:"uint64",minimum:0,type:["integer","null"]},provider:{type:["string","null"]},retrieval:{anyOf:[{$ref:"#/$defs/LcmRetrievalOutcomeV1"},{type:"null"}]},service_status:{anyOf:[{$ref:"#/$defs/RetrievalWorkerStatusV1"},{type:"null"}]},session_id:{type:["string","null"]},state:{anyOf:[{$ref:"#/$defs/HydrationStateResultV1"},{type:"null"}]},status:{$ref:"#/$defs/RetainedOutcomeStatusV1"},temporal:{anyOf:[{$ref:"#/$defs/LcmTemporalFieldsV1"},{type:"null"}]}},required:["status"],title:"LcmDescribeResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,title:"LcmDoctorRequestV1",type:"object"},{$defs:{LcmAuthorityOutcomeV1:yZ,LcmConvergenceStateV1:yX,LcmConvergenceV1:yY,LcmDoctorFindingKindV1:{enum:["trigger_audit_drift","occurrence_fts_corruption","summary_fts_corruption","missing_anchor","missing_receipt","invalid_generation","multi_active_generation","cursor_chain_absent","cursor_key_absent","ownership_drift","stuck_refresh","stuck_binding","stuck_progress","stuck_receipt","migration_gap","compatibility_drift","relation_graph_unavailable","relation_graph_corruption","relation_graph_cycle","stale_summary_closure"],type:"string"},LcmDoctorFindingV1:{additionalProperties:!1,properties:{count:{format:"uint64",minimum:0,type:"integer"},kind:{$ref:"#/$defs/LcmDoctorFindingKindV1"}},required:["kind","count"],type:"object"},LcmDoctorHealthStatusV1:{enum:["complete","partial","unavailable","locked"],type:"string"},LcmDoctorHealthV1:{additionalProperties:!1,properties:{findings:{items:{$ref:"#/$defs/LcmDoctorFindingV1"},type:"array"},reason:{type:["string","null"]},status:{$ref:"#/$defs/LcmDoctorHealthStatusV1"}},required:["status","findings"],type:"object"},LcmDoctorProjectionStateV1:y1,LcmDoctorProjectionV1:y0,RetainedOutcomeStatusV1:_P,RetrievalWorkerStatusV1:_j},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{authority_outcome:{$ref:"#/$defs/LcmAuthorityOutcomeV1"},health:{anyOf:[{$ref:"#/$defs/LcmDoctorHealthV1"},{type:"null"}]},projection:{anyOf:[{$ref:"#/$defs/LcmDoctorProjectionV1"},{type:"null"}],description:"Absent when the diagnosed store has no refresh worker (profile mounts)."},reason:{type:["string","null"]},status:{$ref:"#/$defs/RetainedOutcomeStatusV1"}},required:["status","authority_outcome"],title:"LcmDoctorResultV1",type:"object"},{$defs:{LcmExpandTargetV1:{oneOf:[{properties:{kind:{const:"canonical_occurrence",type:"string"},message_id:{type:"string"}},required:["kind","message_id"],type:"object"},{properties:{kind:{const:"raw_message",type:"string"},store_id:{format:"uint64",minimum:0,type:"integer"}},required:["kind","store_id"],type:"object"},{properties:{kind:{const:"summary_node",type:"string"},node_id:{type:"string"}},required:["kind","node_id"],type:"object"},{properties:{kind:{const:"external_payload",type:"string"},payload_ref:{type:"string"}},required:["kind","payload_ref"],type:"object"}]}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{content_limit:{format:"uint64",minimum:0,type:["integer","null"]},content_offset:{format:"uint64",minimum:0,type:["integer","null"]},cursor:{type:["string","null"]},provider:{type:"string"},session_id:{type:"string"},source_limit:{format:"uint64",minimum:0,type:["integer","null"]},target:{$ref:"#/$defs/LcmExpandTargetV1"}},required:["provider","session_id","target"],title:"LcmExpandRequestV1",type:"object"},{$defs:{ClosedUtcIntervalV1:fx,HydrationStateResultV1:yK,LcmContentRangeV1:yQ,LcmExpandedSourceV1:{additionalProperties:!1,properties:{content:{type:"string"},content_range:{anyOf:[{$ref:"#/$defs/LcmContentRangeV1"},{type:"null"}]},content_truncated:{type:"boolean"},raw_message:{anyOf:[{$ref:"#/$defs/LcmRawMessageV1"},{type:"null"}]},raw_message_metadata:{anyOf:[{$ref:"#/$defs/LcmRawMessageMetadataV1"},{type:"null"}]},source_ref:{$ref:"#/$defs/LcmSourceRefV1"},state:{$ref:"#/$defs/HydrationStateResultV1"},summary_node:{anyOf:[{$ref:"#/$defs/LcmSummaryNodeV1"},{type:"null"}]}},required:["source_ref","state","content","content_truncated"],type:"object"},LcmExpansionV1:{additionalProperties:!1,properties:{content:{type:"string"},content_range:{$ref:"#/$defs/LcmContentRangeV1"},from_current_session:{type:["boolean","null"]},kind:{type:"string"},payload_ref:{type:["string","null"]},raw_message:{anyOf:[{$ref:"#/$defs/LcmRawMessageV1"},{type:"null"}]},raw_message_metadata:{anyOf:[{$ref:"#/$defs/LcmRawMessageMetadataV1"},{type:"null"}]},source_pagination:{anyOf:[{$ref:"#/$defs/LcmSourcePaginationV1"},{type:"null"}]},summary_node:{anyOf:[{$ref:"#/$defs/LcmSummaryNodeV1"},{type:"null"}]},summary_sources:{items:{$ref:"#/$defs/LcmExpandedSourceV1"},type:"array"}},required:["kind","content","content_range","summary_sources"],type:"object"},LcmRawMessageMetadataV1:{additionalProperties:!1,properties:{content_hash:{type:"string"},message_id:{type:"string"},metadata_json:{type:["string","null"]},ordinal:{format:"int64",type:"integer"},payload_ref:{type:["string","null"]},provider:{type:"string"},role:{type:"string"},session_id:{type:"string"},storage_kind:{$ref:"#/$defs/LcmStorageKindV1"},store_id:{format:"int64",type:"integer"},timestamp:{format:"int64",type:["integer","null"]}},required:["provider","message_id","session_id","store_id","role","ordinal","content_hash","storage_kind"],type:"object"},LcmRawMessageV1:y2,LcmRetrievalOutcomeV1:y4,LcmSourcePaginationV1:{additionalProperties:!1,properties:{has_more:{type:"boolean"},remaining_sources:{format:"uint",minimum:0,type:"integer"},returned_sources:{format:"uint",minimum:0,type:"integer"},source_limit:{format:"uint",minimum:0,type:"integer"},total_sources:{format:"uint",minimum:0,type:"integer"}},required:["source_limit","returned_sources","total_sources","has_more","remaining_sources"],type:"object"},LcmSourceRefV1:y6,LcmStorageKindV1:y3,LcmSummaryNodeV1:y8,LcmTemporalFieldsV1:y7,RetainedErrorV1:_R,RetainedOutcomeStatusV1:_P,RetrievalWorkerStatusV1:_j,SessionCoverageIntervalV1:_4,SessionCoverageReasonV1:_6,SessionCoverageRequestV1:_3,SessionCoverageStateV1:_9,SessionSourceCoverageV1:vo,TemporalCoverageV1:vT,TemporalExplanationV1:vO,TemporalFreshnessV1:vE,TemporalModeV1:vA,TemporalOmissionV1:vM,TemporalWatermarksV1:vW,UtcMicros:vK,ValidCoverageIntervalV1:vJ},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{capped_sessions:{additionalProperties:{format:"uint",minimum:0,type:"integer"},type:["object","null"]},error:{anyOf:[{$ref:"#/$defs/RetainedErrorV1"},{type:"null"}]},expansion:{anyOf:[{$ref:"#/$defs/LcmExpansionV1"},{type:"null"}]},grain:{type:["string","null"]},omitted:{format:"uint64",minimum:0,type:["integer","null"]},provider:{type:["string","null"]},retrieval:{anyOf:[{$ref:"#/$defs/LcmRetrievalOutcomeV1"},{type:"null"}]},service_status:{anyOf:[{$ref:"#/$defs/RetrievalWorkerStatusV1"},{type:"null"}]},session_id:{type:["string","null"]},state:{anyOf:[{$ref:"#/$defs/HydrationStateResultV1"},{type:"null"}]},status:{$ref:"#/$defs/RetainedOutcomeStatusV1"},temporal:{anyOf:[{$ref:"#/$defs/LcmTemporalFieldsV1"},{type:"null"}]}},required:["status"],title:"LcmExpandResultV1",type:"object"},{$defs:{LcmNodeIdV1:{anyOf:[{type:"string"},{format:"uint64",minimum:0,type:"integer"}]}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{context_max_tokens:{format:"uint64",minimum:0,type:["integer","null"]},cursor:{type:["string","null"]},max_results:{format:"uint64",minimum:0,type:["integer","null"]},max_tokens:{format:"uint64",minimum:0,type:["integer","null"]},node_ids:{items:{$ref:"#/$defs/LcmNodeIdV1"},type:["array","null"]},prompt:{type:"string"},provider:{type:"string"},query:{type:["string","null"]},session_id:{type:"string"}},required:["provider","session_id","prompt"],title:"LcmExpandQueryRequestV1",type:"object"},{$defs:{ClosedUtcIntervalV1:fx,HydrationStateResultV1:yK,LcmContentRangeV1:yQ,LcmExpandQueryBudgetV1:{additionalProperties:!1,properties:{requested_max_chars:{format:"uint",minimum:0,type:"integer"},used_chars:{format:"uint",minimum:0,type:"integer"}},required:["requested_max_chars","used_chars"],type:"object"},LcmExpandQueryContextBlockV1:{additionalProperties:!1,properties:{content:{type:"string"},content_range:{$ref:"#/$defs/LcmContentRangeV1"},kind:{type:"string"},node_id:{type:["string","null"]},raw_message:{anyOf:[{$ref:"#/$defs/LcmRawMessageV1"},{type:"null"}]},source_ref:{anyOf:[{$ref:"#/$defs/LcmSourceRefV1"},{type:"null"}]},summary_node:{anyOf:[{$ref:"#/$defs/LcmSummaryNodeV1"},{type:"null"}]}},required:["kind","content","content_range"],type:"object"},LcmExpandQueryMatchV1:{additionalProperties:!1,properties:{kind:{type:"string"},node_id:{type:["string","null"]},snippet:{type:"string"},store_id:{format:"int64",type:["integer","null"]}},required:["kind","snippet"],type:"object"},LcmExpandQueryPaginationV1:{additionalProperties:!1,properties:{has_more:{type:"boolean"},kind:{type:"string"},next_content_offset:{format:"uint64",minimum:0,type:["integer","null"]},node_id:{type:["string","null"]},source_ref:{anyOf:[{$ref:"#/$defs/LcmSourceRefV1"},{type:"null"}]},state:{anyOf:[{$ref:"#/$defs/HydrationStateResultV1"},{type:"null"}]}},required:["kind","has_more"],type:"object"},LcmExpandQuerySynthesisPromptV1:{additionalProperties:!1,properties:{system:{type:"string"},user:{type:"string"},user_prompt_truncated_for_mcp:{type:["boolean","null"]}},required:["system","user"],type:"object"},LcmRawMessageV1:y2,LcmSourceRefV1:y6,LcmStorageKindV1:y3,LcmSummaryNodeV1:y8,LcmTemporalFieldsV1:y7,RetainedErrorV1:_R,RetainedOutcomeStatusV1:_P,RetrievalWorkerStatusV1:_j,SessionCoverageIntervalV1:_4,SessionCoverageReasonV1:_6,SessionCoverageRequestV1:_3,SessionCoverageStateV1:_9,SessionSourceCoverageV1:vo,TemporalCoverageV1:vT,TemporalExplanationV1:vO,TemporalModeV1:vA,TemporalOmissionV1:vM,TemporalWatermarksV1:vW,UtcMicros:vK,ValidCoverageIntervalV1:vJ},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{answer:{type:["string","null"]},capped_sessions:{additionalProperties:{format:"uint",minimum:0,type:"integer"},type:["object","null"]},context_blocks:{items:{$ref:"#/$defs/LcmExpandQueryContextBlockV1"},type:"array"},context_budget:{anyOf:[{$ref:"#/$defs/LcmExpandQueryBudgetV1"},{type:"null"}]},context_max_tokens:{format:"uint",minimum:0,type:["integer","null"]},context_pagination:{items:{$ref:"#/$defs/LcmExpandQueryPaginationV1"},type:["array","null"]},context_truncated:{type:["boolean","null"]},contract_truncated:{type:["boolean","null"]},error:{anyOf:[{$ref:"#/$defs/RetainedErrorV1"},{type:"null"}]},matches:{items:{$ref:"#/$defs/LcmExpandQueryMatchV1"},type:["array","null"]},max_tokens:{format:"uint",minimum:0,type:["integer","null"]},mcp_response_truncated:{type:["boolean","null"]},mcp_truncation_reason:{type:["string","null"]},needs_synthesis:{type:["boolean","null"]},node_ids:{items:{type:"string"},type:["array","null"]},omitted:{format:"uint64",minimum:0,type:["integer","null"]},prompt:{type:["string","null"]},prompt_truncated_for_mcp:{type:["boolean","null"]},provider:{type:["string","null"]},query:{type:["string","null"]},query_truncated_for_mcp:{type:["boolean","null"]},service_status:{anyOf:[{$ref:"#/$defs/RetrievalWorkerStatusV1"},{type:"null"}]},session_id:{type:["string","null"]},status:{$ref:"#/$defs/RetainedOutcomeStatusV1"},synthesis_prompt:{anyOf:[{$ref:"#/$defs/LcmExpandQuerySynthesisPromptV1"},{type:"null"}]},temporal:{anyOf:[{$ref:"#/$defs/LcmTemporalFieldsV1"},{type:"null"}]}},required:["status","context_blocks"],title:"LcmExpandQueryResultV1",type:"object"},{$defs:{LcmGrepSortV1:{enum:["recency","relevance","hybrid"],type:"string"},LcmRoleV1:{enum:["system","user","assistant","tool","unknown"],type:"string"},LcmSearchScopeV1:{enum:["current","session","all"],type:"string"},MessageRelationshipScopeV1:gm,MessageTypeFilterV1:gf,RetainedTimeFilterV1:_V,TemporalModeV1:vA,UtcMicros:vK},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{branch:{type:["string","null"]},commit:{type:["string","null"]},cursor:{type:["string","null"]},end_time:{anyOf:[{$ref:"#/$defs/RetainedTimeFilterV1"},{type:"null"}]},include_summaries:{type:["boolean","null"]},limit:{format:"uint64",minimum:0,type:["integer","null"]},message_type:{anyOf:[{$ref:"#/$defs/MessageTypeFilterV1"},{type:"null"}]},provider:{type:["string","null"]},query:{type:"string"},relationship_scope:{anyOf:[{$ref:"#/$defs/MessageRelationshipScopeV1"},{type:"null"}]},role:{anyOf:[{$ref:"#/$defs/LcmRoleV1"},{type:"null"}]},scope:{anyOf:[{$ref:"#/$defs/LcmSearchScopeV1"},{type:"null"}]},session_id:{type:["string","null"]},since:{anyOf:[{$ref:"#/$defs/RetainedTimeFilterV1"},{type:"null"}]},sort:{anyOf:[{$ref:"#/$defs/LcmGrepSortV1"},{type:"null"}]},source:{type:["string","null"]},start_time:{anyOf:[{$ref:"#/$defs/RetainedTimeFilterV1"},{type:"null"}]},temporal_mode:{anyOf:[{$ref:"#/$defs/TemporalModeV1"},{type:"null"}]},until:{anyOf:[{$ref:"#/$defs/RetainedTimeFilterV1"},{type:"null"}]},worktree:{type:["string","null"]}},required:["query"],title:"LcmGrepRequestV1",type:"object"},{$defs:{ClosedUtcIntervalV1:fx,HydrationStateResultV1:yK,LcmGrepHitV1:{additionalProperties:!1,properties:{kind:{type:"string"},message_id:{type:["string","null"]},node_id:{type:["string","null"]},provider:{type:"string"},role:{type:["string","null"]},score:{format:"double",type:"number"},session_id:{type:"string"},snippet:{type:"string"},store_id:{format:"int64",type:["integer","null"]}},required:["kind","provider","session_id","snippet","score"],type:"object"},LcmTemporalFieldsV1:y7,RetainedErrorV1:_R,RetainedOutcomeStatusV1:_P,RetrievalWorkerStatusV1:_j,SessionCoverageIntervalV1:_4,SessionCoverageReasonV1:_6,SessionCoverageRequestV1:_3,SessionCoverageStateV1:_9,SessionSourceCoverageV1:vo,TemporalCoverageV1:vT,TemporalExplanationV1:vO,TemporalModeV1:vA,TemporalOmissionV1:vM,TemporalWatermarksV1:vW,UtcMicros:vK,ValidCoverageIntervalV1:vJ},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{capped_sessions:{additionalProperties:{format:"uint",minimum:0,type:"integer"},type:["object","null"]},count:{format:"uint",minimum:0,type:["integer","null"]},error:{anyOf:[{$ref:"#/$defs/RetainedErrorV1"},{type:"null"}]},hits:{items:{$ref:"#/$defs/LcmGrepHitV1"},type:"array"},message_type:{type:["string","null"]},omitted:{format:"uint64",minimum:0,type:["integer","null"]},provider:{type:["string","null"]},query:{type:["string","null"]},relationship_scope:{type:["string","null"]},service_status:{anyOf:[{$ref:"#/$defs/RetrievalWorkerStatusV1"},{type:"null"}]},sort:{type:["string","null"]},status:{$ref:"#/$defs/RetainedOutcomeStatusV1"},temporal:{anyOf:[{$ref:"#/$defs/LcmTemporalFieldsV1"},{type:"null"}]}},required:["status","hits"],title:"LcmGrepResultV1",type:"object"},{$defs:{TemporalModeV1:vA,UtcMicros:vK},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{content_limit:{format:"uint64",minimum:0,type:["integer","null"]},content_offset:{format:"uint64",minimum:0,type:["integer","null"]},cursor:{type:["string","null"]},end_time:{format:"uint64",minimum:0,type:["integer","null"]},limit:{format:"uint64",minimum:0,type:["integer","null"]},provider:{type:["string","null"]},role:{type:["string","null"]},roles:{items:{type:"string"},type:["array","null"]},session_id:{type:"string"},start_time:{format:"uint64",minimum:0,type:["integer","null"]},temporal_mode:{anyOf:[{$ref:"#/$defs/TemporalModeV1"},{type:"null"}]}},required:["session_id"],title:"LcmLoadSessionRequestV1",type:"object"},{$defs:{ClosedUtcIntervalV1:fx,HydrationStateResultV1:yK,LcmContentRangeV1:yQ,LcmMessageV1:{additionalProperties:!1,properties:{content:{type:"string"},content_hash:{type:["string","null"]},content_range:{$ref:"#/$defs/LcmContentRangeV1"},message_id:{type:"string"},metadata_json:{type:["string","null"]},ordinal:{format:"int64",type:"integer"},payload_ref:{type:["string","null"]},provider:{type:"string"},role:{type:"string"},session_id:{type:"string"},storage_kind:{$ref:"#/$defs/LcmStorageKindV1"},store_id:{format:"int64",type:["integer","null"]},timestamp:{format:"int64",type:["integer","null"]}},required:["provider","message_id","session_id","role","ordinal","content","content_range","storage_kind"],type:"object"},LcmStorageKindV1:y3,LcmTemporalFieldsV1:y7,RetainedErrorV1:_R,RetainedOutcomeStatusV1:_P,RetrievalWorkerStatusV1:_j,SessionCoverageIntervalV1:_4,SessionCoverageReasonV1:_6,SessionCoverageRequestV1:_3,SessionCoverageStateV1:_9,SessionSourceCoverageV1:vo,TemporalCoverageV1:vT,TemporalExplanationV1:vO,TemporalModeV1:vA,TemporalOmissionV1:vM,TemporalWatermarksV1:vW,UtcMicros:vK,ValidCoverageIntervalV1:vJ},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{capped_sessions:{additionalProperties:{format:"uint",minimum:0,type:"integer"},type:["object","null"]},content_limit:{format:"uint",minimum:0,type:["integer","null"]},content_limit_clamped_from:{format:"uint",minimum:0,type:["integer","null"]},error:{anyOf:[{$ref:"#/$defs/RetainedErrorV1"},{type:"null"}]},messages:{items:{$ref:"#/$defs/LcmMessageV1"},type:"array"},omitted:{format:"uint64",minimum:0,type:["integer","null"]},provider:{type:["string","null"]},service_status:{anyOf:[{$ref:"#/$defs/RetrievalWorkerStatusV1"},{type:"null"}]},session_id:{type:["string","null"]},status:{$ref:"#/$defs/RetainedOutcomeStatusV1"},temporal:{anyOf:[{$ref:"#/$defs/LcmTemporalFieldsV1"},{type:"null"}]}},required:["status","messages"],title:"LcmLoadSessionResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{deep:{type:["boolean","null"]},provider:{type:["string","null"]},session_id:{type:["string","null"]}},title:"LcmStatusRequestV1",type:"object"},{$defs:{LcmAuthorityOutcomeV1:yZ,LcmConfigStatusV1:{additionalProperties:!1,properties:{compression_boundary_cooldown_seconds:{format:"int64",type:"integer"},fresh_tail_count:{format:"uint",minimum:0,type:"integer"},summary_fan_in:{format:"uint",minimum:0,type:"integer"}},required:["fresh_tail_count","summary_fan_in","compression_boundary_cooldown_seconds"],type:"object"},LcmConvergenceStateV1:yX,LcmConvergenceV1:yY,LcmDagDepthStatusV1:{additionalProperties:!1,properties:{count:{format:"int64",type:"integer"},source_tokens:{format:"int64",type:"integer"},tokens:{format:"int64",type:"integer"}},required:["count","tokens","source_tokens"],type:"object"},LcmDagStatusV1:{additionalProperties:!1,properties:{compression_ratio:{type:"string"},depths:{additionalProperties:{$ref:"#/$defs/LcmDagDepthStatusV1"},type:"object"},total_nodes:{format:"int64",type:"integer"},total_source_tokens:{format:"int64",type:"integer"},total_tokens:{format:"int64",type:"integer"}},required:["total_nodes","total_tokens","total_source_tokens","compression_ratio","depths"],type:"object"},LcmDoctorProjectionStateV1:y1,LcmDoctorProjectionV1:y0,LcmLifecycleStatusV1:{additionalProperties:!1,properties:{current_frontier_store_id:{format:"int64",type:["integer","null"]},current_session_id:{type:["string","null"]},frontier_count:{format:"int64",type:"integer"},last_finalized_frontier_store_id:{format:"int64",type:["integer","null"]},last_finalized_session_id:{type:["string","null"]},lifecycle_state_count:{format:"int64",type:"integer"},maintenance_debt_count:{format:"int64",type:"integer"}},required:["lifecycle_state_count","frontier_count","maintenance_debt_count"],type:"object"},LcmPayloadCoverageStateV1:{enum:["complete","partial"],type:"string"},LcmPayloadCoverageV1:{additionalProperties:!1,properties:{reason:{type:["string","null"]},scanned_files:{format:"int64",type:"integer"},scanned_metadata_refs:{format:"int64",type:"integer"},state:{$ref:"#/$defs/LcmPayloadCoverageStateV1"}},required:["state","scanned_metadata_refs","scanned_files"],type:"object"},LcmPayloadGcStatusV1:{additionalProperties:!1,properties:{grace_seconds:{format:"int64",type:"integer"},last_gc_at:{format:"int64",type:["integer","null"]},last_gc_duration_ms:{format:"uint64",minimum:0,type:["integer","null"]},last_gc_error:{type:["string","null"]},last_gc_status:{type:["string","null"]},last_reaped_bytes:{format:"uint64",minimum:0,type:["integer","null"]},last_reaped_refs:{format:"int64",type:["integer","null"]},next_run_eligible_at:{format:"int64",type:["integer","null"]},reap_missing_metadata_after_seconds:{format:"int64",type:"integer"}},required:["grace_seconds","reap_missing_metadata_after_seconds"],type:"object"},LcmPayloadStatusV1:{additionalProperties:!1,properties:{coverage:{$ref:"#/$defs/LcmPayloadCoverageV1"},externalized_count:{format:"int64",type:"integer"},gc_candidate_count:{format:"int64",type:"integer"},integrity_mismatch_count:{format:"int64",type:["integer","null"]},missing_count:{format:"int64",type:"integer"},missing_placeholder_file_count:{format:"int64",type:"integer"},missing_placeholder_metadata_count:{format:"int64",type:"integer"},orphan_file_bytes:{format:"uint64",minimum:0,type:"integer"},orphan_file_count:{format:"int64",type:"integer"},placeholder_ref_count:{format:"int64",type:"integer"},reclaimable_bytes:{format:"uint64",minimum:0,type:"integer"},reclaimable_bytes_after_grace:{format:"uint64",minimum:0,type:"integer"},referenced_bytes:{format:"uint64",minimum:0,type:"integer"},referenced_count:{format:"int64",type:"integer"},root_contained:{type:"boolean"},tombstoned_count:{format:"int64",type:"integer"},total_bytes:{format:"uint64",minimum:0,type:"integer"},unreferenced_count:{format:"int64",type:"integer"}},required:["coverage","externalized_count","missing_count","unreferenced_count","placeholder_ref_count","missing_placeholder_metadata_count","missing_placeholder_file_count","gc_candidate_count","root_contained","orphan_file_count","tombstoned_count","referenced_count","total_bytes","referenced_bytes","orphan_file_bytes","reclaimable_bytes","reclaimable_bytes_after_grace"],type:"object"},LcmRedactionStatusV1:{additionalProperties:!1,properties:{enabled:{type:"boolean"},lossy_records:{format:"int64",type:"integer"}},required:["enabled","lossy_records"],type:"object"},LcmStatusV1:{additionalProperties:!1,properties:{config:{$ref:"#/$defs/LcmConfigStatusV1"},dag:{$ref:"#/$defs/LcmDagStatusV1"},external_payload_count:{format:"int64",type:"integer"},lifecycle:{$ref:"#/$defs/LcmLifecycleStatusV1"},maintenance_debt_count:{format:"int64",type:"integer"},missing_payload_count:{format:"int64",type:"integer"},payload:{$ref:"#/$defs/LcmPayloadStatusV1"},payload_gc:{$ref:"#/$defs/LcmPayloadGcStatusV1"},raw_message_count:{format:"int64",type:"integer"},redaction:{$ref:"#/$defs/LcmRedactionStatusV1"},schema_version:{format:"int64",type:"integer"},store:{$ref:"#/$defs/LcmStoreStatusV1"},summary_convergence:{$ref:"#/$defs/LcmSummaryConvergenceStatusV1"},summary_node_count:{format:"int64",type:"integer"},unreferenced_payload_count:{format:"int64",type:"integer"}},required:["schema_version","raw_message_count","summary_node_count","external_payload_count","missing_payload_count","unreferenced_payload_count","maintenance_debt_count","store","dag","config","payload","payload_gc","lifecycle","summary_convergence","redaction"],type:"object"},LcmStoreStatusV1:{additionalProperties:!1,properties:{estimated_tokens:{format:"int64",type:"integer"},messages:{format:"int64",type:"integer"},token_estimate:{$ref:"#/$defs/LcmStoreTokenCoverageV1"}},required:["messages","estimated_tokens","token_estimate"],type:"object"},LcmStoreTokenCoverageV1:{additionalProperties:!1,properties:{complete:{type:"boolean"},next_after_store_id:{format:"int64",type:["integer","null"]},scanned_messages:{format:"int64",type:"integer"}},required:["complete","scanned_messages"],type:"object"},LcmSummaryConvergenceReasonV1:{additionalProperties:!1,properties:{reason:{type:"string"},session_count:{format:"int64",type:"integer"},state:{$ref:"#/$defs/LcmSummaryConvergenceStateV1"}},required:["state","reason","session_count"],type:"object"},LcmSummaryConvergenceStateV1:{enum:["pending","retryable","current","unavailable","permanent"],type:"string"},LcmSummaryConvergenceStatusV1:{additionalProperties:!1,description:"Retained-session summary convergence queue: disjoint per-state session\ncounts and the reasons parked or failed sessions record.",properties:{current_session_count:{format:"int64",type:"integer"},pending_session_count:{format:"int64",type:"integer"},permanent_session_count:{format:"int64",type:"integer"},reasons:{items:{$ref:"#/$defs/LcmSummaryConvergenceReasonV1"},type:"array"},retryable_session_count:{format:"int64",type:"integer"},unavailable_session_count:{format:"int64",type:"integer"}},required:["pending_session_count","retryable_session_count","current_session_count","unavailable_session_count","permanent_session_count","reasons"],type:"object"},RetainedOutcomeStatusV1:_P,RetrievalWorkerStatusV1:_j},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{authority_outcome:{anyOf:[{$ref:"#/$defs/LcmAuthorityOutcomeV1"},{type:"null"}]},deep:{type:["boolean","null"]},lcm:{anyOf:[{$ref:"#/$defs/LcmStatusV1"},{type:"null"}]},message:{type:["string","null"]},projection:{anyOf:[{$ref:"#/$defs/LcmDoctorProjectionV1"},{type:"null"}],description:"The store's refresh-worker serving and convergence state. Absent when\nno refresh worker serves the store."},provider:{type:["string","null"]},reason:{type:["string","null"]},session_id:{type:["string","null"]},status:{$ref:"#/$defs/RetainedOutcomeStatusV1"}},required:["status"],title:"LcmStatusResultV1",type:"object"},{$defs:{MemoryScopeV1:gu,ProjectId:g2},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{memory_scope:{anyOf:[{$ref:"#/$defs/MemoryScopeV1"},{type:"null"}]},project_selector:{additionalProperties:!1,description:'Exact registered-project selector. Reads and fact effects run against the\nselected project.\n\nInlined so every request schema advertises the closed selector contract\n(`required: ["project_id"]`, no additional properties) directly on its\n`project_selector` property instead of behind a `$defs` reference, matching\nthe selector shape the MCP dispatch policy promises for selector-accepting\ntools.',properties:{project_id:{$ref:"#/$defs/ProjectId"}},required:["project_id"],type:["object","null"]}},title:"MemoryStatusRequestV1",type:"object"},{$defs:{FactCommitOwnerV1:hL,MemoryAlgebraV1:{additionalProperties:!1,properties:{estimated_capacity:{format:"uint64",minimum:0,type:"integer"},hrr_dim:{format:"uint64",minimum:0,type:"integer"},name:{type:"string"}},required:["name","hrr_dim","estimated_capacity"],type:"object"},MemoryFeedbackFunnelV1:{additionalProperties:!1,properties:{access_count_total:{format:"uint64",minimum:0,type:"integer"},feedback_total:{format:"uint64",minimum:0,type:"integer"},rated_fact_count:{format:"uint64",minimum:0,type:"integer"},retrieval_count_total:{format:"uint64",minimum:0,type:"integer"},retrieved_fact_count:{format:"uint64",minimum:0,type:"integer"},seen_to_feedback_ratio:{format:"uint64",minimum:0,type:["integer","null"]}},required:["retrieval_count_total","access_count_total","retrieved_fact_count","rated_fact_count","feedback_total"],type:"object"},MemoryStatusV1:{additionalProperties:!1,properties:{algebra:{$ref:"#/$defs/MemoryAlgebraV1"},below_default_recall_threshold_count:{format:"uint64",minimum:0,type:"integer"},entity_count:{format:"uint64",minimum:0,type:"integer"},fact_count:{format:"uint64",minimum:0,type:"integer"},feedback_funnel:{$ref:"#/$defs/MemoryFeedbackFunnelV1"},helpful_count:{format:"uint64",minimum:0,type:"integer"},owner:{$ref:"#/$defs/FactCommitOwnerV1"},trust_025_050_count:{format:"uint64",minimum:0,type:"integer"},trust_050_075_count:{format:"uint64",minimum:0,type:"integer"},trust_075_100_count:{format:"uint64",minimum:0,type:"integer"},trust_0_025_count:{format:"uint64",minimum:0,type:"integer"},unhelpful_count:{format:"uint64",minimum:0,type:"integer"}},required:["owner","fact_count","entity_count","algebra","trust_0_025_count","trust_025_050_count","trust_050_075_count","trust_075_100_count","below_default_recall_threshold_count","helpful_count","unhelpful_count","feedback_funnel"],type:"object"},ProjectId:g2},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{memory:{$ref:"#/$defs/MemoryStatusV1"}},required:["memory"],title:"MemoryStatusResultV1",type:"object"},{$defs:{MessageRelationshipScopeV1:gm,MessageTypeFilterV1:gf,ProjectId:g2,RetainedTimeFilterV1:_V},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Exact public input accepted by `tracedecay_message_search`.",properties:{branch:{type:["string","null"]},commit:{type:["string","null"]},cursor:{type:["string","null"]},goals:{default:!1,type:"boolean"},include_subagents:{type:["boolean","null"]},limit:{format:"uint64",minimum:0,type:["integer","null"]},message_type:{anyOf:[{$ref:"#/$defs/MessageTypeFilterV1"},{type:"null"}]},parent_session_id:{type:["string","null"]},project_key:{type:["string","null"]},project_selector:{additionalProperties:!1,description:'Exact registered-project selector. Reads and fact effects run against the\nselected project.\n\nInlined so every request schema advertises the closed selector contract\n(`required: ["project_id"]`, no additional properties) directly on its\n`project_selector` property instead of behind a `$defs` reference, matching\nthe selector shape the MCP dispatch policy promises for selector-accepting\ntools.',properties:{project_id:{$ref:"#/$defs/ProjectId"}},required:["project_id"],type:["object","null"]},provider:{type:["string","null"]},query:{type:["string","null"]},require_fresh:{description:"Freshness precondition: stale or partial coverage returns\n`refresh_required` instead of stored evidence. The read never refreshes.",type:["boolean","null"]},scope:{anyOf:[{$ref:"#/$defs/MessageRelationshipScopeV1"},{type:"null"}]},since:{anyOf:[{$ref:"#/$defs/RetainedTimeFilterV1"},{type:"null"}]},until:{anyOf:[{$ref:"#/$defs/RetainedTimeFilterV1"},{type:"null"}]},workflow_agent:{type:["string","null"]},workflow_run:{type:["string","null"]},worktree:{type:["string","null"]}},title:"MessageSearchRequestV1",type:"object"},{$defs:{ClosedUtcIntervalV1:fx,GitScopeV1:yM,HydrationStateResultV1:yK,MessageSearchHitV1:{additionalProperties:!1,properties:{message:{$ref:"#/$defs/SessionMessageV1"},project_id:{type:["string","null"]},root:{type:["string","null"]},score:{format:"double",type:"number"},session:{$ref:"#/$defs/SessionRecordV1"}},required:["session","message","score"],type:"object"},RetainedErrorV1:_R,RetainedNextActionV1:{additionalProperties:!1,properties:{action:{type:"string"},kind:{type:"string"},reason:{type:"string"},tool:{type:"string"}},required:["kind","tool","action","reason"],type:"object"},RetainedOutcomeStatusV1:_P,RetrievalWorkerStatusV1:_j,SessionCoverageIntervalV1:_4,SessionCoverageReasonV1:_6,SessionCoverageRequestV1:_3,SessionCoverageStateV1:_9,SessionMessageV1:{additionalProperties:!1,properties:{kind:{type:["string","null"]},message_id:{type:"string"},metadata_json:{type:["string","null"]},model:{type:["string","null"]},ordinal:{format:"int64",type:"integer"},provider:{type:"string"},role:{type:"string"},session_id:{type:"string"},source_offset:{format:"int64",type:["integer","null"]},source_path:{type:["string","null"]},text:{type:"string"},timestamp:{format:"int64",type:["integer","null"]},tool_names:{type:["string","null"]}},required:["provider","message_id","session_id","role","ordinal","text"],type:"object"},SessionRecordV1:{additionalProperties:!1,properties:{agent_id:{type:["string","null"]},ended_at:{format:"int64",type:["integer","null"]},is_subagent:{type:"boolean"},metadata_json:{type:["string","null"]},parent_session_id:{type:["string","null"]},parent_tool_use_id:{type:["string","null"]},project_key:{type:"string"},project_path:{type:"string"},provider:{type:"string"},session_id:{type:"string"},started_at:{format:"int64",type:["integer","null"]},title:{type:["string","null"]},transcript_path:{type:["string","null"]}},required:["provider","session_id","project_key","project_path","is_subagent"],type:"object"},SessionSourceCoverageV1:vo,TemporalCoverageOmissionV1:{oneOf:[{properties:{detail:{type:"string"},kind:{const:"root_continuation_unavailable",type:"string"},strict_population:{$ref:"#/$defs/TemporalPopulationCountV1"}},required:["kind","strict_population","detail"],type:"object"}]},TemporalCoverageV1:vT,TemporalExplanationV1:vO,TemporalFreshnessV1:vE,TemporalMetadataV1:{additionalProperties:!1,properties:{anchors:{items:{type:"string"},type:"array"},coverage:{$ref:"#/$defs/TemporalCoverageV1"},coverage_omissions:{items:{$ref:"#/$defs/TemporalCoverageOmissionV1"},type:"array"},explanations:{items:{$ref:"#/$defs/TemporalExplanationV1"},type:"array"},freshness:{anyOf:[{$ref:"#/$defs/TemporalFreshnessV1"},{type:"null"}]},next_cursor:{type:["string","null"]},omissions:{items:{$ref:"#/$defs/TemporalOmissionV1"},type:"array"},source_coverage:{items:{$ref:"#/$defs/SessionSourceCoverageV1"},type:"array"},watermarks:{$ref:"#/$defs/TemporalWatermarksV1"}},required:["anchors","watermarks","coverage","explanations"],type:"object"},TemporalModeV1:vA,TemporalOmissionV1:vM,TemporalPopulationCountV1:{oneOf:[{properties:{count:{format:"uint64",minimum:0,type:"integer"},kind:{const:"exact",type:"string"}},required:["kind","count"],type:"object"},{properties:{count:{format:"uint64",minimum:0,type:"integer"},kind:{const:"at_least",type:"string"}},required:["kind","count"],type:"object"}]},TemporalWatermarksV1:vW,UtcMicros:vK,ValidCoverageIntervalV1:vJ},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{count:{format:"uint",minimum:0,type:["integer","null"]},error:{anyOf:[{$ref:"#/$defs/RetainedErrorV1"},{type:"null"}]},git_filter:{anyOf:[{$ref:"#/$defs/GitScopeV1"},{type:"null"}]},git_filter_applied:{type:["boolean","null"]},goals:{type:"boolean"},include_subagents:{type:"boolean"},message:{type:["string","null"]},message_type:{type:"string"},next_action:{anyOf:[{$ref:"#/$defs/RetainedNextActionV1"},{type:"null"}]},omitted:{format:"uint64",minimum:0,type:["integer","null"]},outcome:{$ref:"#/$defs/RetainedOutcomeStatusV1"},parent_session_id:{type:["string","null"]},project_key:{type:["string","null"]},provider:{type:"string"},query:{type:["string","null"]},refresh_required:{type:"boolean"},requested_provider:{type:["string","null"]},require_fresh:{type:"boolean"},results:{items:{$ref:"#/$defs/MessageSearchHitV1"},type:["array","null"]},scope:{type:"string"},service_status:{anyOf:[{$ref:"#/$defs/RetrievalWorkerStatusV1"},{type:"null"}]},since:{format:"int64",type:["integer","null"]},status:{$ref:"#/$defs/RetainedOutcomeStatusV1"},store_scope:{type:["string","null"]},temporal:{anyOf:[{$ref:"#/$defs/TemporalMetadataV1"},{type:"null"}]},until:{format:"int64",type:["integer","null"]},workflow_agent:{type:["string","null"]},workflow_filter_applied:{type:["boolean","null"]},workflow_run:{type:["string","null"]},workflow_run_parent_session:{type:["string","null"]}},required:["require_fresh","goals","include_subagents","message_type","outcome","provider","refresh_required","scope","status"],title:"MessageSearchResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{path:{type:"string"}},required:["path"],title:"ModuleApiPrimitiveRequest",type:"object"},{$defs:{SymbolPrimitiveRecord:vq},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{path:{type:"string"},symbols:{items:{$ref:"#/$defs/SymbolPrimitiveRecord"},type:"array"}},required:["path","symbols"],title:"ModuleApiPrimitiveResult",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Exact public input accepted by `tracedecay_move_symbol`.",properties:{dest_file:{type:"string"},dry_run:{default:!0,type:"boolean"},expected_state:{description:"Exact `preview_digest`/`expected_state` returned by the dry run. Apply\nre-resolves the typed plan and rejects any candidate-state drift.",type:["string","null"]},idempotency_key:{type:["string","null"]},symbol:{type:"string"}},required:["symbol","dest_file"],title:"MoveSymbolSurfaceRequestV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Exact public input accepted by `tracedecay_multi_str_replace`.",properties:{dry_run:{default:!1,type:"boolean"},expected_state:{description:"Exact `preview_digest`/`expected_state` returned by the dry run. Apply\nre-resolves the typed plan and rejects any candidate-state drift.",type:["string","null"]},idempotency_key:{type:["string","null"]},path:{type:"string"},replacements:{description:"Ordered `[old, new]` pairs, matching the existing MCP tool wire form.",items:{maxItems:2,minItems:2,prefixItems:[{type:"string"},{type:"string"}],type:"array"},type:"array"},verify:{default:!1,type:"boolean"}},required:["path","replacements"],title:"MultiStrReplaceSurfaceRequestV1",type:"object"},{$defs:{NativeIntegrationTransactionId:gT},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{transaction_id:{$ref:"#/$defs/NativeIntegrationTransactionId"}},required:["transaction_id"],title:"NativeIntegrationStatusSurfaceRequest",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{node_id:{type:"string"}},required:["node_id"],title:"NodeSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fE,CodeIndexConvergenceParkedV1:fA,CodeIndexStalenessStateV1:fz,ComplexityAnalysisV1:fB,NodeDetailsV1:{additionalProperties:!1,properties:{branches:{description:"Exact counters; `None`, and listed in `unavailable_fields`, when\n`complexity_analysis` reports the bounded walk did not cover the body.",format:"uint32",minimum:0,type:["integer","null"]},complexity_analysis:{$ref:"#/$defs/ComplexityAnalysisV1"},cost_to_expand:{$ref:"#/$defs/NodeExpansionCostV1"},cyclomatic_complexity:{format:"uint32",minimum:0,type:["integer","null"]},derives:{items:{type:"string"},type:"array"},docstring:{type:["string","null"]},end_line:{format:"uint32",minimum:0,type:"integer"},file:{type:"string"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},id:{type:"string"},is_async:{type:"boolean"},kind:{type:"string"},loops:{format:"uint32",minimum:0,type:["integer","null"]},max_nesting:{format:"uint32",minimum:0,type:["integer","null"]},name:{type:"string"},qualified_name:{type:"string"},signature:{type:["string","null"]},start_line:{format:"uint32",minimum:0,type:"integer"},unavailable_fields:{items:{type:"string"},type:"array"},visibility:{type:"string"}},required:["id","name","kind","qualified_name","file","start_line","end_line","is_async","derives","visibility","complexity_analysis","cost_to_expand","unavailable_fields"],type:"object"},NodeExpansionCostV1:gA,PrimitiveFreshnessStateV1:gG,PrimitiveIndexingStateV1:gB,PrimitiveNotFoundV1:gJ,PrimitiveSearchFreshnessV1:gQ,PrimitiveSymbolLocationV1:gY},$schema:"https://json-schema.org/draft/2020-12/schema",anyOf:[{$ref:"#/$defs/NodeDetailsV1"},{$ref:"#/$defs/PrimitiveNotFoundV1"}],title:"NodeResultV1"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"One project-scoped horizon for the canonical Observatory and Costs models.",properties:{window_days:{default:14,format:"uint16",maximum:365,minimum:1,type:"integer"}},title:"ObservatoryReadRequestV1",type:"object"},{$defs:{AnalyticsModeReadModelV1:mD,AnalyticsModeV1:mF,ComparisonDispositionV1:fG,CostsReadModelV1:hw,CoverageStateV1:hV,LatencyDistributionReadModelV1:yJ,MetricCalibrationV1:gh,MetricCohortV1:gy,MetricCoverageV1:gg,MetricEvidenceClassV1:g_,MetricProvenanceV1:gv,MetricSourceV1:gb,MetricTemporalV1:g$,MetricUncertaintyV1:gS,MetricValueV1:gk,ObservabilityHorizonV1:gM,ObservatoryReadModelV1:gN,PerformanceComparisonReadModelV1:gH,ProviderLatencyReadModelV1:_o,RejectedArgumentAnalyticsV1:_f,RejectedArgumentErrorClassV1:_h,RejectedArgumentGroupV1:_y,RejectedArgumentNameV1:_g,RejectedArgumentSurfaceV1:__},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Canonical project-scoped observability and costs read models.",properties:{costs:{$ref:"#/$defs/CostsReadModelV1"},observatory:{$ref:"#/$defs/ObservatoryReadModelV1"}},required:["observatory","costs"],title:"ObservatoryReadResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{kinds:{items:{type:"string"},type:["array","null"]},limit:{format:"uint32",minimum:0,type:["integer","null"]},source_dir:{type:"string"}},required:["source_dir"],title:"PortOrderSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fE,CodeIndexConvergenceParkedV1:fA,CodeIndexStalenessStateV1:fz,PortCycleAnchorV1:{additionalProperties:!1,properties:{file:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},name:{type:"string"},rationale:{type:["string","null"]}},required:["name","file","line"],type:"object"},PortCycleFileV1:{additionalProperties:!1,properties:{file:{type:"string"},members_in_cycle:{format:"uint",minimum:0,type:"integer"}},required:["file","members_in_cycle"],type:"object"},PortCycleSymbolV1:{additionalProperties:!1,properties:{file:{type:"string"},in_cycle_in_degree:{format:"uint",minimum:0,type:"integer"},in_cycle_out_degree:{format:"uint",minimum:0,type:"integer"},kind:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},name:{type:"string"}},required:["name","kind","file","line","in_cycle_out_degree","in_cycle_in_degree"],type:"object"},PortCycleV1:{additionalProperties:!1,properties:{break_point_candidate:{anyOf:[{$ref:"#/$defs/PortCycleAnchorV1"},{type:"null"}]},entry_point:{anyOf:[{$ref:"#/$defs/PortCycleAnchorV1"},{type:"null"}]},files:{items:{$ref:"#/$defs/PortCycleFileV1"},type:"array"},note:{type:"string"},size:{format:"uint",minimum:0,type:"integer"},symbols:{items:{$ref:"#/$defs/PortCycleSymbolV1"},type:"array"}},required:["size","files","symbols","note"],type:"object"},PortOrderLevelV1:{additionalProperties:!1,properties:{description:{type:"string"},level:{format:"uint",minimum:0,type:"integer"},symbols:{items:{$ref:"#/$defs/PortOrderSymbolV1"},type:"array"}},required:["level","description","symbols"],type:"object"},PortOrderSymbolV1:{additionalProperties:!1,properties:{depends_on:{items:{type:"string"},type:["array","null"]},file:{type:"string"},kind:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},name:{type:"string"}},required:["name","kind","file","line"],type:"object"},PrimitiveFreshnessStateV1:gG,PrimitiveIndexingStateV1:gB,PrimitiveSearchFreshnessV1:gQ},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{cycles:{items:{$ref:"#/$defs/PortCycleV1"},type:"array"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},levels:{items:{$ref:"#/$defs/PortOrderLevelV1"},type:"array"},returned:{format:"uint",minimum:0,type:"integer"},source_dir:{type:"string"},total_symbols:{format:"uint",minimum:0,type:"integer"}},required:["source_dir","total_symbols","returned","levels","cycles"],title:"PortOrderResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{kinds:{items:{type:"string"},type:["array","null"]},source_dir:{type:"string"},target_dir:{type:"string"}},required:["source_dir","target_dir"],title:"PortStatusSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fE,CodeIndexConvergenceParkedV1:fA,CodeIndexStalenessStateV1:fz,PortMatchedSymbolV1:{additionalProperties:!1,properties:{name:{type:"string"},source_file:{type:"string"},source_kind:{type:"string"},target_file:{type:"string"},target_kind:{type:"string"}},required:["name","source_kind","target_kind","source_file","target_file"],type:"object"},PortTargetOnlySymbolV1:{additionalProperties:!1,properties:{file:{type:"string"},kind:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},name:{type:"string"}},required:["name","kind","file","line"],type:"object"},PortUnmatchedSymbolV1:{additionalProperties:!1,properties:{kind:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},name:{type:"string"}},required:["name","kind","line"],type:"object"},PrimitiveFreshnessStateV1:gG,PrimitiveIndexingStateV1:gB,PrimitiveSearchFreshnessV1:gQ},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{coverage_percent:{format:"double",type:"number"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},matched:{format:"uint",minimum:0,type:"integer"},matched_symbols:{items:{$ref:"#/$defs/PortMatchedSymbolV1"},type:"array"},source_count:{format:"uint",minimum:0,type:"integer"},source_dir:{type:"string"},target_count:{format:"uint",minimum:0,type:"integer"},target_dir:{type:"string"},target_only:{format:"uint",minimum:0,type:"integer"},target_only_symbols:{items:{$ref:"#/$defs/PortTargetOnlySymbolV1"},type:"array"},unmatched:{format:"uint",minimum:0,type:"integer"},unmatched_by_file:{additionalProperties:{items:{$ref:"#/$defs/PortUnmatchedSymbolV1"},type:"array"},type:"object"}},required:["source_dir","target_dir","source_count","target_count","matched","unmatched","target_only","coverage_percent","unmatched_by_file","matched_symbols","target_only_symbols"],title:"PortStatusResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{base_ref:{description:"Base branch or ref to compare against (default: detected repository\ndefault branch). A short branch name selects the descendant of its\nlocal and origin tracking tips; use an explicit ref when they diverge.",type:["string","null"]},budget_tokens:{description:"Cap the symbol, test, and module sections at about this many tokens.",format:"uint32",minimum:0,type:["integer","null"]},cursor:{description:"Authenticated continuation cursor returned by a previous page.",type:["string","null"]},head_ref:{description:"Head branch or ref (default: 'HEAD'). Accepts local branches,\nremote-tracking refs such as origin/topic, full refs, and Git revision\nexpressions.",type:["string","null"]},maximum_symbols:{description:"Maximum symbols returned on this page (default: 200, clamped to 1-500).",format:"uint32",minimum:0,type:["integer","null"]}},title:"PrContextSurfaceRequestV1",type:"object"},{$defs:{CoChangeUnavailableV1:fj,CodeIndexBuildBlockedReasonV1:fE,CodeIndexConvergenceParkedV1:fA,CodeIndexStalenessStateV1:fz,ConfigSummaryKindV1:fZ,ConfigSummaryV1:fQ,GitCommitSubjectV1:{additionalProperties:!1,properties:{hash:{type:"string"},subject:{type:"string"}},required:["hash","subject"],type:"object"},GitComparedSymbolV1:yb,GitContextSymbolV1:y$,GitFileChangeStatusV1:{enum:["added","deleted","modified"],type:"string"},GitFileChangeV1:{additionalProperties:!1,properties:{path:{type:"string"},status:{$ref:"#/$defs/GitFileChangeStatusV1"}},required:["path","status"],type:"object"},GitReadCompleteV1:yT,GitReadPartialV1:yO,GitReadUnavailableV1:yE,GitToolErrorKindV1:yN,GitToolErrorV1:yz,GitToolFailureV1:yD,GitToolOperationV1:yF,MissingCoChangePartnerV1:gw,PrAnalysisCoverageV1:{additionalProperties:!1,properties:{complete:{type:"boolean"},direct_call_edges_admitted:{format:"uint",minimum:0,type:"integer"},impact_bytes_admitted:{format:"uint",minimum:0,type:"integer"},impact_nodes_admitted:{format:"uint",minimum:0,type:"integer"},impact_nodes_returned:{format:"uint",minimum:0,type:"integer"},impact_partial:{type:"boolean"},seed_symbols_analyzed:{format:"uint",minimum:0,type:"integer"},symbols_complete:{type:"boolean"},symbols_returned:{format:"uint",minimum:0,type:"integer"}},required:["seed_symbols_analyzed","symbols_returned","symbols_complete","impact_nodes_admitted","impact_nodes_returned","direct_call_edges_admitted","impact_bytes_admitted","impact_partial","complete"],type:"object"},PrContextCompleteV1:{additionalProperties:!1,properties:{added:{items:{$ref:"#/$defs/PrSymbolEntryV1"},type:"array"},affected_tests:{items:{type:"string"},type:"array"},affected_tests_coverage:{$ref:"#/$defs/PrSelectionCoverageV1"},analysis_coverage:{$ref:"#/$defs/PrAnalysisCoverageV1"},base:{type:"string"},base_oid:{type:"string"},changes:{items:{$ref:"#/$defs/GitFileChangeV1"},type:"array"},co_change_unavailable:{anyOf:[{$ref:"#/$defs/CoChangeUnavailableV1"},{type:"null"}],description:"Present when Git history could not be mined for co-change partners."},commits:{items:{$ref:"#/$defs/GitCommitSubjectV1"},type:"array"},files_changed:{format:"uint",minimum:0,type:"integer"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},graph_generation:{type:"string"},head:{type:"string"},head_oid:{type:"string"},impacted_modules:{items:{type:"string"},type:"array"},impacted_modules_coverage:{$ref:"#/$defs/PrSelectionCoverageV1"},merge_base:{type:"string"},missing_co_change_partners:{description:"Files that usually change with a changed file, per bounded Git\nhistory, but are absent from this change set.",items:{$ref:"#/$defs/MissingCoChangePartnerV1"},type:"array"},modified:{items:{$ref:"#/$defs/PrSymbolEntryV1"},type:"array"},next_cursor:{type:["string","null"]},removed:{items:{$ref:"#/$defs/GitComparedSymbolV1"},type:"array"},status:{$ref:"#/$defs/GitReadCompleteV1"},symbol_changes_coverage:{$ref:"#/$defs/PrSymbolChangesCompleteV1"},symbol_page:{$ref:"#/$defs/PrSymbolPageV1"},symbols_added:{format:"uint",minimum:0,type:"integer"},symbols_modified:{format:"uint",minimum:0,type:"integer"},symbols_removed:{format:"uint",minimum:0,type:"integer"},test_files_changed:{items:{type:"string"},type:"array"},token_budget:{anyOf:[{$ref:"#/$defs/TokenBudgetCutV1"},{type:"null"}],description:"Budget accounting when the request supplies `budget_tokens`."}},required:["status","base","head","base_oid","head_oid","merge_base","graph_generation","commits","files_changed","changes","missing_co_change_partners","symbols_added","symbols_removed","symbols_modified","added","removed","modified","symbol_changes_coverage","symbol_page","analysis_coverage","test_files_changed","affected_tests","affected_tests_coverage","impacted_modules","impacted_modules_coverage"],type:"object"},PrContextGraphPendingV1:{additionalProperties:!1,description:"The git comparison while the verified graph generation is still warming.",properties:{added:{items:{$ref:"#/$defs/PrSymbolEntryV1"},type:"array"},affected_tests:{items:{type:"string"},type:"array"},affected_tests_coverage:{$ref:"#/$defs/PrSelectionCoverageV1"},analysis_coverage:{$ref:"#/$defs/PrAnalysisCoverageV1"},base:{type:"string"},base_oid:{type:"string"},changes:{items:{$ref:"#/$defs/GitFileChangeV1"},type:"array"},co_change_unavailable:{anyOf:[{$ref:"#/$defs/CoChangeUnavailableV1"},{type:"null"}],description:"Present when Git history could not be mined for co-change partners."},commits:{items:{$ref:"#/$defs/GitCommitSubjectV1"},type:"array"},files_changed:{format:"uint",minimum:0,type:"integer"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},graph_generation:{description:"No verified generation was admitted.",type:["string","null"]},head:{type:"string"},head_oid:{type:"string"},impacted_modules:{items:{type:"string"},type:"array"},impacted_modules_coverage:{$ref:"#/$defs/PrSelectionCoverageV1"},merge_base:{type:"string"},message:{type:"string"},missing_co_change_partners:{description:"Files that usually change with a changed file, per bounded Git\nhistory, but are absent from this change set.",items:{$ref:"#/$defs/MissingCoChangePartnerV1"},type:"array"},modified:{items:{$ref:"#/$defs/PrSymbolEntryV1"},type:"array"},next_cursor:{type:["string","null"]},status:{$ref:"#/$defs/GitReadPartialV1"},symbol_page:{$ref:"#/$defs/PrSymbolPageV1"},symbols_added:{format:"uint",minimum:0,type:"integer"},symbols_modified:{format:"uint",minimum:0,type:"integer"},test_files_changed:{items:{type:"string"},type:"array"},token_budget:{anyOf:[{$ref:"#/$defs/TokenBudgetCutV1"},{type:"null"}],description:"Budget accounting when the request supplies `budget_tokens`."},verified_graph_evidence:{$ref:"#/$defs/PrimitiveUnavailableEvidenceV1"}},required:["status","message","base","head","base_oid","head_oid","merge_base","commits","files_changed","changes","missing_co_change_partners","symbols_added","symbols_modified","added","modified","symbol_page","analysis_coverage","test_files_changed","affected_tests","affected_tests_coverage","impacted_modules","impacted_modules_coverage","verified_graph_evidence"],type:"object"},PrContextSymbolsUnavailableV1:{additionalProperties:!1,description:"The git comparison while exact base/head symbol comparison is unavailable\nor does not describe the verified graph's head generation.",properties:{added:{items:{$ref:"#/$defs/PrSymbolEntryV1"},type:"array"},base:{type:"string"},base_oid:{type:"string"},changes:{items:{$ref:"#/$defs/GitFileChangeV1"},type:"array"},co_change_unavailable:{anyOf:[{$ref:"#/$defs/CoChangeUnavailableV1"},{type:"null"}],description:"Present when Git history could not be mined for co-change partners."},commits:{items:{$ref:"#/$defs/GitCommitSubjectV1"},type:"array"},files_changed:{format:"uint",minimum:0,type:"integer"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},graph_generation:{type:"string"},head:{type:"string"},head_oid:{type:"string"},merge_base:{type:"string"},message:{type:"string"},missing_co_change_partners:{description:"Files that usually change with a changed file, per bounded Git\nhistory, but are absent from this change set.",items:{$ref:"#/$defs/MissingCoChangePartnerV1"},type:"array"},modified:{items:{$ref:"#/$defs/PrSymbolEntryV1"},type:"array"},next_cursor:{type:["string","null"]},removed:{items:{$ref:"#/$defs/GitComparedSymbolV1"},type:"array"},status:{$ref:"#/$defs/GitReadPartialV1"},symbol_changes_coverage:{$ref:"#/$defs/SymbolChangesUnavailableV1"},symbols_added:{format:"uint",minimum:0,type:"integer"},symbols_modified:{format:"uint",minimum:0,type:"integer"},symbols_removed:{format:"uint",minimum:0,type:"integer"},token_budget:{anyOf:[{$ref:"#/$defs/TokenBudgetCutV1"},{type:"null"}],description:"Budget accounting when the request supplies `budget_tokens`."}},required:["status","message","base","head","base_oid","head_oid","merge_base","graph_generation","commits","files_changed","changes","missing_co_change_partners","symbols_added","symbols_removed","symbols_modified","added","removed","modified","symbol_changes_coverage"],type:"object"},PrCoverageSelectionV1:{enum:["unavailable","deterministic_bounded_prefix"],type:"string"},PrSelectionCoverageV1:{additionalProperties:!1,properties:{complete:{type:"boolean"},selection:{$ref:"#/$defs/PrCoverageSelectionV1"}},required:["complete","selection"],type:"object"},PrSymbolChangesCompleteV1:{additionalProperties:!1,properties:{base_generation:{type:"string"},head_generation:{type:"string"},status:{$ref:"#/$defs/GitReadCompleteV1"}},required:["status","base_generation","head_generation"],type:"object"},PrSymbolEntryV1:{anyOf:[{$ref:"#/$defs/GitContextSymbolV1"},{$ref:"#/$defs/ConfigSummaryV1"}]},PrSymbolPageV1:{additionalProperties:!1,properties:{complete:{type:"boolean"},continuation_available:{type:"boolean"},has_more:{type:"boolean"},limit:{format:"uint",minimum:0,type:"integer"},returned:{format:"uint",minimum:0,type:"integer"},selection:{$ref:"#/$defs/PrSymbolSelectionV1"}},required:["limit","returned","has_more","complete","selection","continuation_available"],type:"object"},PrSymbolSelectionV1:{enum:["unavailable","stable_prefix"],type:"string"},PrimitiveFreshnessStateV1:gG,PrimitiveIndexingStateV1:gB,PrimitiveSearchFreshnessV1:gQ,PrimitiveUnavailableEvidenceV1:g1,PrimitiveUnavailableStatusV1:g0,SymbolChangesUnavailableV1:vR,TokenBudgetCutV1:vz,TokenBudgetSectionV1:vD},$schema:"https://json-schema.org/draft/2020-12/schema",anyOf:[{$ref:"#/$defs/PrContextCompleteV1"},{$ref:"#/$defs/PrContextSymbolsUnavailableV1"},{$ref:"#/$defs/PrContextGraphPendingV1"},{$ref:"#/$defs/GitToolFailureV1"}],title:"PrContextResultV1"},{$defs:{BranchStackEdgeV1:fu,BranchStackId:fm,BranchStackNodeV1:ff,BranchStackRevisionId:fh,BranchStackRevisionV1:fy,BranchStackSourceV1:fg,CommitId:fH,ManifestDigest:gl,MechanicalIntegrationModeV1:gp,NativeIntegrationDirectionV1:gV,NativeIntegrationSealedStackSnapshotV1:gx,NativeIntegrationSelectionBindingV1:gj,ProjectId:g2,RefId:_u,RepositoryId:_v,ResolvedScope:_k,ScopeSetId:_Q,ScopeSetRevision:_X,StackNodeId:vk,WorktreeId:$M,WorktreeInventoryEpoch:$W,WorktreeInventorySnapshotId:$N},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Read-only preflight over one frozen snapshot identity.\n\n`preferred_mode` selects only one of the three fixed mechanical encodings.\nIt cannot change topology, commit order, or the commit set.",properties:{preferred_mode:{anyOf:[{$ref:"#/$defs/MechanicalIntegrationModeV1"},{type:"null"}],default:null},snapshot:{$ref:"#/$defs/NativeIntegrationSealedStackSnapshotV1"}},required:["snapshot"],title:"NativeIntegrationPreflightSurfaceRequest",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{path:{description:"Project path or registered alias to resolve.",type:["string","null"]},project_selector:{additionalProperties:!1,default:null,description:"Registered project id to inspect. Omit to use path or the active\nproject.",properties:{project_id:{description:"Registered project id to query.",type:"string"}},required:["project_id"],type:"object"}},title:"ProjectContextSurfaceRequestV1",type:"object"},{$defs:{PublicCodeProject:_n},$schema:"https://json-schema.org/draft/2020-12/schema",description:"One registered project's context, or the registry's typed miss.",oneOf:[{additionalProperties:!1,properties:{aliases:{description:"Alias rows exactly as the registry serializes them.",items:!0,type:"array"},is_active:{type:"boolean"},project:{$ref:"#/$defs/PublicCodeProject"},registry_path:{type:"string"},status:{const:"ok",type:"string"},stores:{description:"Store rows exactly as the registry serializes them.",items:!0,type:"array"}},required:["status","is_active","registry_path","project","aliases","stores"],type:"object"},{additionalProperties:!1,description:"The registry answered and no registered project matches the selector.",properties:{aliases:{items:!0,type:"array"},project:{type:"null"},registry_path:{type:"string"},status:{const:"not_found",type:"string"},stores:{items:!0,type:"array"}},required:["status","registry_path","project","aliases","stores"],type:"object"}],title:"ProjectContextResultV1"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{limit:{description:"Maximum projects to return (default: 25, max: 100).",format:"uint",minimum:0,type:["integer","null"]}},title:"ProjectListSurfaceRequestV1",type:"object"},{$defs:{ProjectRegistryEntry:g4,ProjectRegistrySummary:g6,ProjectRepoGroup:g3,PublicCodeProject:_n},$schema:"https://json-schema.org/draft/2020-12/schema",description:"A bounded page of the profile's registered projects.",oneOf:[{additionalProperties:!1,properties:{limit:{format:"uint",minimum:0,type:"integer"},project_tree:{items:{$ref:"#/$defs/ProjectRepoGroup"},type:"array"},projects:{items:{$ref:"#/$defs/PublicCodeProject"},type:"array"},query:{type:["string","null"]},registry_path:{type:"string"},status:{const:"ok",type:"string"},summary:{$ref:"#/$defs/ProjectRegistrySummary"},title:{type:"string"},truncated:{type:"boolean"}},required:["status","title","registry_path","limit","truncated","summary","project_tree","projects"],type:"object"}],title:"ProjectRegistryListingResultV1"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{limit:{description:"Maximum projects to return (default: 10, max: 50).",format:"uint",minimum:0,type:["integer","null"]},query:{description:"Case-insensitive substring query over registry project metadata.",type:"string"}},required:["query"],title:"ProjectSearchSurfaceRequestV1",type:"object"},{$defs:{PageRequest:gU},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{page:{$ref:"#/$defs/PageRequest"},qualified_name:{type:"string"}},required:["qualified_name","page"],title:"QualifiedNamePrimitiveRequest",type:"object"},{$defs:{SymbolPrimitiveRecord:vq},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{next_cursor:{description:"Opaque resume token; its bounded string is the public wire form.",type:["string","null"]},symbols:{items:{$ref:"#/$defs/SymbolPrimitiveRecord"},type:"array"},total:{format:"uint64",minimum:0,type:["integer","null"]}},required:["symbols"],title:"QualifiedNamePrimitiveResult",type:"object"},{$defs:{RankDirectionV1:_d,RankEdgeKindV1:_c},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{direction:{anyOf:[{$ref:"#/$defs/RankDirectionV1"},{type:"null"}],description:"Edge direction: 'incoming' ranks targets (default, e.g.\nmost-implemented interface), 'outgoing' ranks sources (e.g. class that\nimplements the most interfaces)."},edge_kind:{$ref:"#/$defs/RankEdgeKindV1",description:"The relationship type to rank by (e.g. 'implements' to find\nmost-implemented interfaces)."},limit:{description:"Maximum number of results to return (default: 10, at most 100).",format:"uint32",minimum:0,type:["integer","null"]},node_kind:{description:"Optional filter for node kind (e.g. 'interface', 'class', 'trait',\n'function', 'method').",type:["string","null"]},path:{description:"Filter to files under this directory path (e.g. 'src/main/java').",type:["string","null"]}},required:["edge_kind"],title:"RankSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fE,CodeIndexConvergenceParkedV1:fA,CodeIndexStalenessStateV1:fz,PrimitiveFreshnessStateV1:gG,PrimitiveIndexingStateV1:gB,PrimitiveSearchFreshnessV1:gQ,RankDirectionV1:_d,RankEdgeKindV1:_c,RankEntryV1:{additionalProperties:!1,properties:{count:{format:"uint64",minimum:0,type:"integer"},file:{type:"string"},id:{type:"string"},kind:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},name:{type:"string"}},required:["id","name","kind","file","line","count"],type:"object"}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{direction:{$ref:"#/$defs/RankDirectionV1"},edge_kind:{$ref:"#/$defs/RankEdgeKindV1"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},node_kind_filter:{type:["string","null"]},ranking:{items:{$ref:"#/$defs/RankEntryV1"},type:"array"},result_count:{format:"uint64",minimum:0,type:"integer"}},required:["edge_kind","direction","result_count","ranking"],title:"RankResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{limit:{description:"Maximum number of cycles to return (default: 10, at most 100).",format:"uint32",minimum:0,type:["integer","null"]},path:{description:"Filter to files under this directory path (e.g. 'src/main/java').",type:["string","null"]}},title:"RecursionSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fE,CodeIndexConvergenceParkedV1:fA,CodeIndexStalenessStateV1:fz,PrimitiveFreshnessStateV1:gG,PrimitiveIndexingStateV1:gB,PrimitiveSearchFreshnessV1:gQ,RecursionCycleV1:{additionalProperties:!1,description:"One call cycle; `chain` repeats its first symbol at the end.",properties:{chain:{items:{$ref:"#/$defs/RecursionSymbolV1"},type:"array"},length:{format:"uint64",minimum:0,type:"integer"}},required:["length","chain"],type:"object"},RecursionSymbolV1:{additionalProperties:!1,properties:{file:{type:"string"},id:{type:"string"},kind:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},name:{type:"string"}},required:["id","name","kind","file","line"],type:"object"}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{cycle_count:{format:"uint64",minimum:0,type:"integer"},cycles:{items:{$ref:"#/$defs/RecursionCycleV1"},type:"array"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."}},required:["cycle_count","cycles"],title:"RecursionResultV1",type:"object"},{$defs:{CommitId:fH,ProjectId:g2,ProviderId:_i,RedundancyScopeV1:{oneOf:[{additionalProperties:!1,properties:{kind:{const:"repository",type:"string"}},required:["kind"],type:"object"},{additionalProperties:!1,properties:{kind:{const:"path",type:"string"},path:{type:"string"}},required:["kind","path"],type:"object"},{additionalProperties:!1,properties:{changed_paths:{items:{type:"string"},type:"array"},head_commit_id:{$ref:"#/$defs/CommitId"},kind:{const:"pull_request",type:"string"},provider:{$ref:"#/$defs/ProviderId"},pull_request_id:{type:"string"}},required:["kind","provider","pull_request_id","head_commit_id","changed_paths"],type:"object"}]},RepositoryId:_v,SimilarMatchClassV1:vd},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{cursor:{type:["string","null"]},family_limit:{description:"Preferred family page size.",format:"uint32",minimum:0,type:"integer"},include_generated_paths:{type:"boolean"},match_classes:{items:{$ref:"#/$defs/SimilarMatchClassV1"},type:"array"},member_limit:{format:"uint32",minimum:0,type:"integer"},project_id:{$ref:"#/$defs/ProjectId"},repository_id:{$ref:"#/$defs/RepositoryId"},scope:{$ref:"#/$defs/RedundancyScopeV1"},work_limit:{format:"uint32",minimum:0,type:"integer"}},required:["project_id","repository_id","match_classes","scope","include_generated_paths","family_limit","member_limit","work_limit"],title:"RedundancySurfaceRequestV1",type:"object"},{$defs:{CodeGenerationId:fT,CodeIndexBuildBlockedReasonV1:fE,CodeIndexConvergenceParkedV1:fA,CodeIndexStalenessStateV1:fz,ManifestDigest:gl,PrimitiveFreshnessStateV1:gG,PrimitiveIndexingStateV1:gB,PrimitiveSearchFreshnessV1:gQ,ProjectId:g2,RedundancyCoverageV1:{oneOf:[{additionalProperties:!1,properties:{examined_families:{format:"uint",minimum:0,type:"integer"},examined_members:{format:"uint",minimum:0,type:"integer"},status:{const:"complete",type:"string"}},required:["status","examined_families","examined_members"],type:"object"},{additionalProperties:!1,properties:{examined_families:{format:"uint",minimum:0,type:"integer"},examined_members:{format:"uint",minimum:0,type:"integer"},reason:{$ref:"#/$defs/RedundancyPartialReasonV1"},status:{const:"partial",type:"string"}},required:["status","reason","examined_families","examined_members"],type:"object"}]},RedundancyFamilyV1:{additionalProperties:!1,properties:{family:{$ref:"#/$defs/SimilarFamilyV1"},generated_members:{items:{$ref:"#/$defs/SymbolOccurrenceId"},type:"array"},reviewable_source_bytes:{format:"uint64",minimum:0,type:"integer"},total_member_count:{format:"uint",minimum:0,type:"integer"}},required:["family","total_member_count","reviewable_source_bytes","generated_members"],type:"object"},RedundancyPartialReasonV1:{enum:["family_limit","work_limit"],type:"string"},RedundancyRankingV1:{enum:["reviewable_source_bytes"],type:"string"},RepositoryId:_v,SimilarFamilyV1:vs,SimilarMatchClassV1:vd,SimilarOccurrenceV1:vc,SourceSpan:vb,SymbolOccurrenceId:vV,WorktreeId:$M},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{coverage:{$ref:"#/$defs/RedundancyCoverageV1"},families:{items:{$ref:"#/$defs/RedundancyFamilyV1"},type:"array"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},next_cursor:{type:["string","null"]},ranked_by:{$ref:"#/$defs/RedundancyRankingV1"},source_generation:{$ref:"#/$defs/CodeGenerationId"}},required:["source_generation","ranked_by","families","coverage"],title:"RedundancyResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,title:"RemoteStatusSurfaceRequestV1",type:"object"},{$defs:{AuthorityEpoch:{description:"Monotonic epoch of the writer authority for a shard.",format:"uint64",minimum:0,type:"integer"},BrainId:fs,BrainNodeId:{description:"Strongly typed canonical identity: `BrainNodeId`.",type:"string"},CurrentRemoteAuthorityStateV1:{description:"Truthful authority lookup state. Missing evidence is never represented as\nan available authority or a successful empty response.",oneOf:[{properties:{state:{const:"available",type:"string"},value:{$ref:"#/$defs/CurrentRemoteAuthorityV1"}},required:["state","value"],type:"object"},{properties:{state:{const:"partial",type:"string"},value:{properties:{known_fence:{anyOf:[{$ref:"#/$defs/RemoteWriterFenceV1"},{type:"null"}]},missing:{items:{$ref:"#/$defs/RemoteAuthorityUnavailableReasonV1"},type:"array",uniqueItems:!0},observed_at:{$ref:"#/$defs/UtcMicros"}},required:["missing","observed_at"],type:"object"}},required:["state","value"],type:"object"},{properties:{state:{const:"unavailable",type:"string"},value:{properties:{observed_at:{$ref:"#/$defs/UtcMicros"},reason:{$ref:"#/$defs/RemoteAuthorityUnavailableReasonV1"}},required:["reason","observed_at"],type:"object"}},required:["state","value"],type:"object"}]},CurrentRemoteAuthorityV1:{additionalProperties:!1,description:"Authenticated current authority for a mutable shard.",properties:{credential_revision:{description:"Revision of the authority node's current enrollment credential.",format:"uint64",minimum:0,type:"integer"},fence:{$ref:"#/$defs/RemoteWriterFenceV1"},observed_at:{$ref:"#/$defs/UtcMicros"}},required:["fence","credential_revision","observed_at"],type:"object"},DoctorCoverageCompletenessV1:hT,ProjectionGenerationId:g9,RemoteAuthorityUnavailableReasonV1:{oneOf:[{enum:["registry_unavailable","placement_unknown","authority_unreachable","authority_authentication_failed","caller_authentication_failed","enrollment_expired","enrollment_revoked","insufficient_capability","scope_mismatch","fence_unverified","protocol_incompatible"],type:"string"},{const:"writer_authority_unpublished",description:"The RemoteNode store has never had a writer authority published for\nthis Brain, so no capture, replay, query, or failover can bind to one.",type:"string"}]},RemoteListenerReadV1:{enum:["serving","disabled","degraded"],type:"string"},RemoteOperationalReadinessV1:{enum:["unconfigured","partial","ready","recovery_required"],type:"string"},RemoteOperationalStatusV1:{additionalProperties:!1,properties:{authority:{$ref:"#/$defs/CurrentRemoteAuthorityStateV1"},enrollment_configured:{type:"boolean"},failover_in_progress:{type:"boolean"},observed_at:{$ref:"#/$defs/UtcMicros"},readiness:{$ref:"#/$defs/RemoteOperationalReadinessV1"},recovery_required:{type:"boolean"},replay_coverage_complete:{type:"boolean"},spool:{$ref:"#/$defs/RemoteSpoolOperationalStatusV1"}},required:["readiness","enrollment_configured","authority","spool","replay_coverage_complete","failover_in_progress","recovery_required","observed_at"],type:"object"},RemoteSpoolOperationalStatusV1:{additionalProperties:!1,properties:{has_sequence_gap:{type:"boolean"},pending_count:{format:"uint64",minimum:0,type:"integer"},quarantined_count:{format:"uint64",minimum:0,type:"integer"}},required:["pending_count","quarantined_count","has_sequence_gap"],type:"object"},RemoteWriterFenceV1:{additionalProperties:!1,description:"The complete single-writer identity for one mutable shard.",properties:{authority_epoch:{$ref:"#/$defs/AuthorityEpoch"},authority_node_id:{$ref:"#/$defs/BrainNodeId"},brain_id:{$ref:"#/$defs/BrainId"},generation_id:{$ref:"#/$defs/ProjectionGenerationId"},placement_revision:{format:"uint64",minimum:0,type:"integer"},shard_id:{$ref:"#/$defs/ShardId"}},required:["brain_id","shard_id","generation_id","placement_revision","authority_epoch","authority_node_id"],type:"object"},ShardId:{description:"Strongly typed canonical identity: `ShardId`.",type:"string"},UtcMicros:vK},$schema:"https://json-schema.org/draft/2020-12/schema",description:"Typed read of the Remote Brain operational plane as observed from the\nmounted daemon authorities. Every operator surface (Doctor, CLI, MCP,\ndashboard) reads this one shape; `Unavailable` is reserved for a genuinely\nunmounted or unreadable authority, never a rendering shortcut.",oneOf:[{properties:{coverage:{$ref:"#/$defs/DoctorCoverageCompletenessV1"},kind:{const:"observed",type:"string"},listener:{$ref:"#/$defs/RemoteListenerReadV1"},status:{$ref:"#/$defs/RemoteOperationalStatusV1"}},required:["kind","listener","status","coverage"],type:"object"},{properties:{kind:{const:"unconfigured",type:"string"}},required:["kind"],type:"object"},{properties:{kind:{const:"unavailable",type:"string"}},required:["kind"],type:"object"}],title:"RemoteOperationalStatusReadV1"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{new_name:{type:["string","null"]},node_id:{type:"string"}},required:["node_id"],title:"RenamePreviewPrimitiveRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fE,CodeIndexConvergenceParkedV1:fA,CodeIndexStalenessStateV1:fz,PrimitiveFreshnessStateV1:gG,PrimitiveIndexingStateV1:gB,PrimitiveNotFoundV1:gJ,PrimitiveSearchFreshnessV1:gQ,PrimitiveSymbolLocationV1:gY,RenamePreviewNodeV1:{additionalProperties:!1,properties:{file:{type:"string"},id:{type:"string"},kind:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},name:{type:"string"},qualified_name:{type:"string"},snippet:{type:["string","null"]}},required:["id","name","qualified_name","kind","file","line"],type:"object"},RenamePreviewPrimitiveResultV1:{additionalProperties:!1,properties:{freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},new_name:{type:["string","null"]},node:{$ref:"#/$defs/RenamePreviewNodeV1"},note:{type:"string"},read_only:{type:"boolean"},reference_count:{format:"uint",minimum:0,type:"integer"},references:{items:{$ref:"#/$defs/RenamePreviewReferenceV1"},type:"array"},symbol:{type:"string"},text_only_matches:{items:{$ref:"#/$defs/RenamePreviewTextOnlyMatchV1"},type:"array"}},required:["read_only","note","symbol","node","reference_count","references","text_only_matches"],type:"object"},RenamePreviewReferenceV1:{additionalProperties:!1,properties:{edge_kind:{type:"string"},file:{type:"string"},from_kind:{type:"string"},from_name:{type:"string"},from_node_id:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},snippet:{type:["string","null"]}},required:["from_node_id","from_name","from_kind","edge_kind","file","line"],type:"object"},RenamePreviewTextOnlyMatchV1:{additionalProperties:!1,properties:{file:{type:"string"},note:{type:"string"},text_only_count:{format:"uint",minimum:0,type:"integer"}},required:["file","text_only_count","note"],type:"object"}},$schema:"https://json-schema.org/draft/2020-12/schema",anyOf:[{$ref:"#/$defs/RenamePreviewPrimitiveResultV1"},{$ref:"#/$defs/PrimitiveNotFoundV1"}],title:"RenamePreviewPrimitiveOutcomeV1"},{$defs:{ManifestDigest:gl,RenamePreviewAcceptanceV1:{additionalProperties:!1,description:"Exact preview material an apply must echo. Preview calls omit this value;\napply rejects any mismatch before publishing a file.",properties:{graph_revision:{$ref:"#/$defs/ManifestDigest"},plan_digest:{$ref:"#/$defs/ManifestDigest"},preview_digest:{$ref:"#/$defs/ManifestDigest"},preview_id:{$ref:"#/$defs/ManifestDigest"},repository_revision:{default:null,type:["string","null"]}},required:["preview_id","preview_digest","plan_digest","graph_revision"],type:"object"}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Exact public input accepted by `tracedecay_rename_symbol`.\n\nThe five identity fields consume the preview's exact symbol identity; the\nflattened control consumes its exact candidate-state digest.",properties:{accepted_preview:{anyOf:[{$ref:"#/$defs/RenamePreviewAcceptanceV1"},{type:"null"}],description:"Exact output identity from the accepted dry-run preview. Required when\n`dry_run=false` and omitted when computing a preview."},dry_run:{default:!0,type:"boolean"},expected_state:{description:"Exact `preview_digest`/`expected_state` returned by the dry run. Apply\nre-resolves the typed plan and rejects any candidate-state drift.",type:["string","null"]},file:{type:"string"},idempotency_key:{type:["string","null"]},kind:{type:"string"},new_name:{type:"string"},node_id:{description:"Canonical `SymbolOccurrenceId` returned by `tracedecay_rename_preview`.",type:"string"},old_name:{type:"string"},qualified_name:{type:"string"},verify:{default:!0,type:"boolean"}},required:["node_id","qualified_name","kind","file","old_name","new_name"],title:"RenameSymbolSurfaceRequestV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Exact public input accepted by `tracedecay_replace_symbol`.",properties:{dry_run:{default:!1,type:"boolean"},expected_state:{description:"Exact `preview_digest`/`expected_state` returned by the dry run. Apply\nre-resolves the typed plan and rejects any candidate-state drift.",type:["string","null"]},idempotency_key:{type:["string","null"]},new_source:{type:"string"},symbol:{type:"string"},verify:{default:!1,type:"boolean"}},required:["symbol","new_source"],title:"ReplaceSymbolSurfaceRequestV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{handle:{description:"The required `handle` argument copied exactly from a truncated MCP\nresponse envelope.",type:"string"},max_chars:{description:"Maximum characters requested for this page. Values above the safe\nresponse-frame budget are clamped.",format:"uint64",minimum:1,type:["integer","null"]},offset:{default:0,description:"Character offset into the immutable stored response (default: 0). Use\nthe prior page's next_offset.",format:"uint64",minimum:0,type:["integer","null"]}},required:["handle"],title:"RetrieveSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fE,CodeIndexConvergenceParkedV1:fA,CodeIndexStalenessStateV1:fz,PrimitiveFreshnessStateV1:gG,PrimitiveIndexingStateV1:gB,PrimitiveSearchFreshnessV1:gQ,RetrieveHandleExpiredV1:{additionalProperties:!1,description:"The record expired and was removed.",properties:{content:{description:"Always null: the expired content was removed.",type:["string","null"]},created_at:{format:"int64",type:"integer"},expired:{description:"Always `true`.",type:"boolean"},expires_at:{format:"int64",type:"integer"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},handle:{type:"string"},message:{type:"string"},reason_code:{type:"string"},retry_instruction:{type:"string"},retryable:{type:"boolean"}},required:["handle","expired","reason_code","message","retryable","retry_instruction","created_at","expires_at"],type:"object"},RetrieveHandleMissingV1:{additionalProperties:!1,description:"No record exists under the handle in this project's store.",properties:{content:{description:"Always null: nothing is stored under the handle.",type:["string","null"]},expired:{description:"Always null: an absent record has no expiry to report.",type:["boolean","null"]},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},handle:{type:"string"},message:{type:"string"},reason_code:{type:"string"},retry_instruction:{type:"string"},retryable:{type:"boolean"}},required:["handle","reason_code","message","retryable","retry_instruction"],type:"object"},RetrievedPageV1:{additionalProperties:!1,description:"One page of the stored response, sized so its response frame fits the\nresponse budget.",properties:{content:{type:"string"},created_at:{format:"int64",type:"integer"},expired:{description:"Always `false`: a page is only served from a live record.",type:"boolean"},expires_at:{format:"int64",type:"integer"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},handle:{type:"string"},has_more:{type:"boolean"},next_offset:{description:"Where the next page starts; absent on the last page.",format:"uint64",minimum:0,type:["integer","null"]},offset:{format:"uint64",minimum:0,type:"integer"},original_chars:{format:"uint64",minimum:0,type:"integer"},total_chars:{format:"uint64",minimum:0,type:"integer"}},required:["handle","expired","original_chars","total_chars","offset","has_more","created_at","expires_at","content"],type:"object"}},$schema:"https://json-schema.org/draft/2020-12/schema",anyOf:[{$ref:"#/$defs/RetrievedPageV1"},{$ref:"#/$defs/RetrieveHandleMissingV1"},{$ref:"#/$defs/RetrieveHandleExpiredV1"}],description:"What a retrieve found under the handle.",title:"RetrieveResultV1"},{$defs:{TestProfileV1:{description:"The cargo profile an affected-test run builds with.",enum:["debug","release"],type:"string"}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{changed_paths:{description:"Explicit manifest of project-relative file paths used to compute\naffected tests.",items:{type:"string"},type:"array"},max_tests:{description:"Cap on tests dispatched in a single invocation, 1 through 500\n(default: 100).",format:"uint64",maximum:500,minimum:1,type:["integer","null"]},profile:{anyOf:[{$ref:"#/$defs/TestProfileV1"},{type:"null"}],description:"Cargo profile (default: debug)."},timeout_secs:{description:"Maximum wall time in seconds before the cargo subprocess is killed,\n1 through 300 (default: 300).",format:"uint64",maximum:300,minimum:1,type:["integer","null"]}},required:["changed_paths"],title:"RunAffectedTestsSurfaceRequestV1",type:"object"},{$defs:{AffectedTestErrorV1:{additionalProperties:!1,description:"Why a run failed or was refused.",properties:{kind:{type:"string"},message:{type:"string"},operation:{type:"string"}},required:["kind","operation","message"],type:"object"},AffectedTestOutcomeV1:{additionalProperties:!1,description:"One observed libtest outcome.",properties:{covers_source_ids:{description:"Graph symbols this test was selected to cover.",items:{type:"string"},type:"array"},passed:{type:"boolean"},test:{type:"string"}},required:["test","passed","covers_source_ids"],type:"object"},AffectedTestRunV1:{additionalProperties:!1,description:"A dispatched run, completed or failed, with what it observed.",properties:{dispatched_tests:{items:{type:"string"},type:"array"},error:{anyOf:[{$ref:"#/$defs/AffectedTestErrorV1"},{type:"null"}],description:"Present when the run did not complete."},exit_code:{format:"int32",type:["integer","null"]},failed:{format:"uint64",minimum:0,type:"integer"},ignored:{description:"Dispatched tests libtest reported as ignored.",format:"uint64",minimum:0,type:"integer"},passed:{format:"uint64",minimum:0,type:"integer"},results:{items:{$ref:"#/$defs/AffectedTestOutcomeV1"},type:"array"},stderr_tail:{type:"string"},stdout_tail:{type:"string"},terminal:{$ref:"#/$defs/ManagedTestTerminalV1"},total_observed:{format:"uint64",minimum:0,type:"integer"},truncated:{description:"More affected tests existed than `max_tests` admitted.",type:"boolean"}},required:["passed","failed","ignored","total_observed","dispatched_tests","truncated","results","stderr_tail","stdout_tail","terminal"],type:"object"},AffectedTestsNotRunV1:{additionalProperties:!1,description:"No test was dispatched: nothing covers the change, or the request was\nrefused before a run began.",properties:{error:{anyOf:[{$ref:"#/$defs/AffectedTestErrorV1"},{type:"null"}]},failed:{description:"Always 0.",format:"uint64",minimum:0,type:"integer"},note:{type:["string","null"]},passed:{description:"Always 0.",format:"uint64",minimum:0,type:"integer"},results:{description:"Always empty.",items:{$ref:"#/$defs/AffectedTestOutcomeV1"},type:"array"}},required:["passed","failed","results"],type:"object"},CancellationObservation:fS,CancellationStage:fk,Deadline:hj,ManagedTestTerminalV1:{additionalProperties:!1,description:"The managed test-run operation the run was recorded under.",properties:{operation_id:{type:"string"},receipt:{$ref:"#/$defs/OperationReceipt"},result_tool:{description:"The tool that reads the recorded results back.",type:"string"},session_id:{description:"The requesting session the run is recorded against; null when the\nrequest carried no session.",type:["string","null"]}},required:["operation_id","result_tool","receipt"],type:"object"},OperationBudgetUsage:gD,OperationReceipt:gF,OperationTermination:gL,UtcMicros:vK},$schema:"https://json-schema.org/draft/2020-12/schema",anyOf:[{$ref:"#/$defs/AffectedTestRunV1"},{$ref:"#/$defs/AffectedTestsNotRunV1"}],title:"RunAffectedTestsResultV1"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{authority_audit:{default:!1,description:"Run the exhaustive observation-authority audit and include\nauthority_audit_ok (true = audit ran and passed, false = audit ran and\nfailed, null = audit did not run), authority_audit_reason (typed:\nauthority_invariant_failed, authority_store_unavailable,\nauthority_store_missing, authority_audit_not_run), and\nauthority_audit_error (observed detail) in database telemetry. Also\nincludes session-temporal health. Default false.",type:"boolean"},doctor_report:{default:!1,description:"Include the daemon-owned canonical Doctor report and typed per-table\ngrowth evidence. Default false.",type:"boolean"},session_ingest_health:{default:!1,description:"Include Cursor transcript-ingest health from the daemon-retained\nproject session authority. Default false.",type:"boolean"},session_temporal_health:{default:!1,description:"Include session-temporal health without the authority audit. Default\nfalse.",type:"boolean"},startup_health:{default:!1,description:"Ask a connection's first request for only the daemon-mounted database\nintegrity telemetry, for post-update startup validation; the daemon\ncore answers that probe before a project owner exists, and a project\nowner's snapshot already carries the same telemetry. Default false.",type:"boolean"}},title:"RuntimeSurfaceRequestV1",type:"object"},{$defs:{DoctorCoverageCompletenessV1:hT,DoctorCoverageStatementV1:{description:"A bounded, human-readable coverage statement plus its completeness.",properties:{completeness:{$ref:"#/$defs/DoctorCoverageCompletenessV1"},statement:{type:"string"}},required:["completeness","statement"],type:"object"},DoctorEvidenceRefV1:{description:"A typed reference to one piece of evidence Doctor composed into a finding.\n\nThe `family` records which audited input surface produced the evidence, so\na finding may cross-cite evidence from more than one family without losing\nprovenance.",properties:{family:{$ref:"#/$defs/DoctorFindingFamilyV1"},reference:{$ref:"#/$defs/DoctorEvidenceReferenceV1"}},required:["family","reference"],type:"object"},DoctorEvidenceReferenceV1:{description:"Durable, non-disclosing reference to one owning-authority evidence\nrecord (for example a `FeedbackFindingId`, configuration revision, or\nruntime read coverage anchor). Doctor stores the reference only; the\nowning authority remains the single source of the record.",type:"string"},DoctorEvidenceStateV1:{description:"Exact Doctor evidence states.\n\nMissing, partial, or unknown truth never becomes healthy or clean. Only\n[`DoctorEvidenceStateV1::HealthyCompleteCoverage`] asserts a healthy result,\nand only when its finding carries complete coverage (see\n[`DoctorFindingV1::new`]).",oneOf:[{const:"unsupported",description:"The owning authority does not support this evidence on this platform.",type:"string"},{const:"absent",description:"The evidence source is supported but produced nothing.",type:"string"},{const:"stale",description:"The evidence exists but is behind the current generation/watermark.",type:"string"},{const:"degraded",description:"The evidence proves a degraded but observed condition.",type:"string"},{const:"partial",description:"Only part of the evidence was observed.",type:"string"},{const:"unknown",description:"The evidence state could not be determined.",type:"string"},{const:"denied",description:"Authorization to read the evidence was denied.",type:"string"},{const:"healthy_complete_coverage",description:"The evidence proves a healthy condition with complete coverage.",type:"string"}]},DoctorFamilyConsultationV1:{description:"Whether a family was consulted from an observed source or is unavailable.",oneOf:[{description:"A source produced observed evidence for this family.",properties:{status:{const:"consulted",type:"string"}},required:["status"],type:"object"},{description:"Complete family coverage was unavailable. Storage may still carry\nfindings from resolved producers when an independent producer failed.",properties:{reason:{$ref:"#/$defs/DoctorFamilyUnavailableReasonV1"},status:{const:"unavailable",type:"string"}},required:["status","reason"],type:"object"}]},DoctorFamilyCoverageV1:{description:"The consultation status of one finding family within a report.",properties:{consultation:{$ref:"#/$defs/DoctorFamilyConsultationV1"},family:{$ref:"#/$defs/DoctorFindingFamilyV1"}},required:["family","consultation"],type:"object"},DoctorFamilyUnavailableReasonV1:{description:"Why complete coverage of a finding family was unavailable.",oneOf:[{const:"unwired",description:"No source port is wired for this family in this composition.",type:"string"},{const:"unsupported",description:"The source is unsupported on this build/platform.",type:"string"},{const:"absent",description:"The source is supported but produced nothing.",type:"string"},{const:"denied",description:"The source read was denied.",type:"string"},{const:"unknown",description:"The source state could not be determined.",type:"string"},{const:"unavailable",description:"The source could not be reached. Named separately from `Unknown`: the\nsource is identified and its unreachability is an observation, not an\nundetermined state.",type:"string"},{const:"reset_required",description:"The source must be rebuilt before it can be read again.",type:"string"},{const:"corrupt",description:"The source was read and found corrupt.",type:"string"}]},DoctorFindingFamilyV1:{description:"Stable Doctor finding families.\n\nThe initial list covers advisory findings from\nBrain, Explorer, Loom, Code, and Observatory, plus the legacy\n`core_doctor` checks (graph quick-check, temporal/migration health,\nconfiguration compatibility drift, code-index mount state, session ingest).\nEach family maps to one audited typed input surface. The set is kept small\nand honest; new families are added through a future versioned enum rather\nthan by widening the meaning of an existing variant.",oneOf:[{const:"advisory",description:"advisory/scout findings (GitHub review, CI localization,\nproximity, context scout): `crate::advisory` / domain feedback.",type:"string"},{const:"configuration",description:"Desired-versus-effective configuration and compatibility drift from\n`ProjectConfigurationRuntime` / `ConfigurationControlPlane`.",type:"string"},{const:"storage_runtime",description:"Store, graph, and temporal runtime health plus migration coverage\n(`RuntimeReadOperationV1` health family, `StoreRuntimeClientLease`).",type:"string"},{const:"storage",description:"Storage retention, size, and efficiency over canonical observability\nread models. Distinct from [`Self::StorageRuntime`] health: this\nfamily surfaces over-budget stores, identity-drift orphans, incident\ndebris, and retention backlog. The typed\nsubclass vocabulary is [`DoctorStorageFindingKindV1`].",type:"string"},{const:"language_server",description:"Language-server / analyzer engine status from the LSP gateway's\n`AnalyzerState`.",type:"string"},{const:"code_index",description:"Code index mount state (mounted, indexing, stale, unmounted,\nincompatible, parked).",type:"string"},{const:"observability",description:"Denominator-safe measurement and telemetry health from analytics,\naccounting read models, and session ingest.",type:"string"},{const:"memory",description:"Retained daemon memory as the resident-memory inventory reports it:\nRSS against the admission limit and pressure line, and each retained\nowner's bytes.",type:"string"}]},DoctorFindingV1:{description:"One canonical Doctor finding.\n\nA finding pins its diagnosis `family`, its evidence `state`, the typed\nevidence it composed, and a coverage statement. Construction enforces the\ninvariants that keep unknown/partial evidence from collapsing into a\nhealthy or clean result.",properties:{coverage:{$ref:"#/$defs/DoctorCoverageStatementV1"},evidence:{items:{$ref:"#/$defs/DoctorEvidenceRefV1"},type:"array"},family:{$ref:"#/$defs/DoctorFindingFamilyV1"},state:{$ref:"#/$defs/DoctorEvidenceStateV1"}},required:["family","state","evidence","coverage"],type:"object"},DoctorReportCoverageV1:{description:"The report-wide coverage statement: which families were consulted versus\nunavailable, plus an overall completeness and a bounded human statement.",properties:{completeness:{$ref:"#/$defs/DoctorCoverageCompletenessV1"},families:{items:{$ref:"#/$defs/DoctorFamilyCoverageV1"},type:"array"},statement:{$ref:"#/$defs/DoctorCoverageStatementV1"}},required:["families","completeness","statement"],type:"object"},DoctorReportEntryV1:{description:"One entry in a Doctor report: a canonical finding plus, for the storage\nfamily, its typed subclass. The subclass is present only for storage findings\n(a non-storage entry never carries one).",properties:{finding:{$ref:"#/$defs/DoctorFindingV1"},storage_kind:{anyOf:[{$ref:"#/$defs/DoctorStorageFindingKindV1"},{type:"null"}]}},required:["finding"],type:"object"},DoctorReportV1:{description:"One composed Doctor report.\n\nThe report carries one or more entries per family (findings are never merged\nby label) plus a coverage statement that enumerates every family consulted\nversus unavailable. Severity (the finding's evidence state) and evidence\nquality (coverage completeness) are kept as separate dimensions: a degraded\nfinding with complete coverage does not weaken report completeness, and only\ngenuinely complete coverage with every finding healthy makes the whole report\nassert health.",properties:{coverage:{$ref:"#/$defs/DoctorReportCoverageV1"},entries:{items:{$ref:"#/$defs/DoctorReportEntryV1"},type:"array"}},required:["entries","coverage"],type:"object"},DoctorStorageFindingKindV1:{description:"Typed subclasses of the [`DoctorFindingFamilyV1::Storage`] finding family.\n\nThe storage family never reports a silent overage: each subclass names one\nobservable retention/size condition Doctor surfaces over canonical size\nobservability read models. The set is closed and grows only through a future\nversioned enum, never by widening an existing subclass.",oneOf:[{const:"over_budget_store",description:"A store exceeds its owner-configured soft size budget.",type:"string"},{const:"orphan_store",description:"A store whose project identity no longer resolves to a live repository\nroot (identity-drift orphan), reported with age and size.",type:"string"},{const:"incident_debris_present",description:"Recovery/corruption artifacts are present beside a store and awaiting\ndeletion.",type:"string"},{const:"retention_backlog",description:"Retention-eligible rows or stores are past their window and awaiting\noffload/collection.",type:"string"},{const:"table_growth",description:"Per-table SQLite payload growth observed between two retained\nwatermarks, including baseline and unavailable measurement states.",type:"string"},{const:"pending_schema_migration",description:"A store whose historical schema convergence has not completed: the\nmigrations whose cost scales with store size are still pending, still\nrunning, or stopped on a failure. The daemon serves while they run, so\nthis is the surface that says which store is still migrating and why.",type:"string"}]},LanguageServerAnalyzerStateV1:{description:"State of one analyzer as the daemon owner holds it.\n\n`Inactive` is the one state the aggregate never takes: the language has no\nfiles in the project, so Doctor does not grade it, but `lsp servers` still\nlists it from this same read so both surfaces share one authority.",enum:["ready","available","refreshing","disabled","unavailable","crashed","inactive"],type:"string"},LanguageServerAnalyzerV1:{description:"Live state of one analyzer the daemon resolved for the current project.\n\n`LanguageServerStateV1` is the aggregate the finding is graded on; this is\nthe per-analyzer evidence behind it, so an operator learns *which*\nexecutable is missing and how to install it, resolved by the daemon\nprocess (the only PATH that matters, since the daemon spawns analyzers)\nrather than by whichever shell ran the CLI.",properties:{command:{description:"The configured executable, after any operator command override.",type:"string"},detail:{description:"The owner's last recorded error for this analyzer, when one exists.",type:["string","null"]},executable_found:{description:"Whether the daemon process finds `command` on its own PATH. For an\nactive analyzer `state` is the finer verdict (a rustup proxy whose\ntoolchain lacks the component is found yet `Unavailable`); for an\ninactive one this is the only availability evidence.",type:"boolean"},install:{description:"The first install command the adapter advertises, when one exists.",type:["string","null"]},language:{description:"Adapter language (`typescript`, `rust`, …).",type:"string"},state:{$ref:"#/$defs/LanguageServerAnalyzerStateV1"}},required:["language","command","state","executable_found"],type:"object"},LanguageServerReadV1:{description:"One live read from the daemon language-server/analyzer owner.",oneOf:[{description:"The owner observed all project-active analyzer states.",properties:{analyzers:{default:[],description:"Every analyzer the owner resolved, active or not; the aggregate\n`state` covers the active ones only.",items:{$ref:"#/$defs/LanguageServerAnalyzerV1"},type:"array"},coverage:{$ref:"#/$defs/DoctorCoverageCompletenessV1"},kind:{const:"observed",type:"string"},state:{$ref:"#/$defs/LanguageServerStateV1"}},required:["kind","state","coverage"],type:"object"},{description:"Language-server inspection is unsupported on this build/platform.",properties:{kind:{const:"unsupported",type:"string"}},required:["kind"],type:"object"},{description:"No project-active analyzer is configured. The owner's inactive\nanalyzers are still carried so `lsp servers` can list them.",properties:{analyzers:{default:[],items:{$ref:"#/$defs/LanguageServerAnalyzerV1"},type:"array"},kind:{const:"absent",type:"string"}},required:["kind"],type:"object"},{description:"Authorization to inspect analyzer state was denied.",properties:{kind:{const:"denied",type:"string"}},required:["kind"],type:"object"},{description:"Analyzer state could not be determined.",properties:{kind:{const:"unknown",type:"string"}},required:["kind"],type:"object"}]},LanguageServerStateV1:{description:"Aggregate state of the project-active language-server analyzers.",oneOf:[{const:"ready",description:"Every active analyzer is ready.",type:"string"},{const:"available",description:"At least one analyzer is installed but has not produced a ready snapshot.",type:"string"},{const:"refreshing",description:"At least one analyzer is currently refreshing/indexing.",type:"string"},{const:"disabled",description:"At least one project analyzer is disabled.",type:"string"},{const:"unavailable",description:"At least one project analyzer executable is unavailable.",type:"string"},{const:"crashed",description:"At least one analyzer process crashed.",type:"string"}]},RuntimeDoctorReportV1:{description:"The daemon's canonical Doctor report as this route could read it.",oneOf:[{additionalProperties:!1,properties:{kind:{const:"observed",type:"string"},language_servers:{$ref:"#/$defs/LanguageServerReadV1"},report:{$ref:"#/$defs/DoctorReportV1"},schema_convergences:{items:{$ref:"#/$defs/SchemaConvergenceFindingV1"},type:"array"},table_growth_evidence:{items:{$ref:"#/$defs/TableGrowthDoctorEvidenceV1"},type:"array"}},required:["kind","report","table_growth_evidence","schema_convergences","language_servers"],type:"object"},{additionalProperties:!1,description:"The reader is mounted and the read failed.",properties:{kind:{const:"unknown",type:"string"},language_servers:{$ref:"#/$defs/LanguageServerReadV1"},schema_convergences:{items:{$ref:"#/$defs/SchemaConvergenceFindingV1"},type:"array"},table_growth_evidence:{items:{$ref:"#/$defs/TableGrowthDoctorEvidenceV1"},type:"array"}},required:["kind","table_growth_evidence","schema_convergences","language_servers"],type:"object"},{additionalProperties:!1,description:"No Doctor reader is mounted on this route.",properties:{kind:{const:"unsupported",type:"string"},language_servers:{$ref:"#/$defs/LanguageServerReadV1"},schema_convergences:{items:{$ref:"#/$defs/SchemaConvergenceFindingV1"},type:"array"},table_growth_evidence:{items:{$ref:"#/$defs/TableGrowthDoctorEvidenceV1"},type:"array"}},required:["kind","table_growth_evidence","schema_convergences","language_servers"],type:"object"}]},SchemaConvergenceFindingV1:_D,SchemaConvergenceProgressV1:_F,SchemaConvergenceStageV1:_L,SchemaConvergenceStateV1:_U,StorageByteSizeV1:{description:"A byte size measurement. A newtype keeps sizes from being confused with\ncounts, ratios, or timestamps in the read models and producers.",format:"uint64",minimum:0,type:"integer"},StoreKeyV1:{description:"Logical name of one owner-profile store (for example `sessions.db`,\n`graph.db`, or `projects/proj_x`). Never an absolute on-disk path.",type:"string"},TableGrowthDoctorEvidenceV1:{description:"Contract-independent evidence ready to wrap in a future `TableGrowth`\nStorage finding once that generated-contract variant is available.",oneOf:[{properties:{current_bytes:{$ref:"#/$defs/StorageByteSizeV1"},current_observed_at:{$ref:"#/$defs/UtcMicros"},growth_bytes:{$ref:"#/$defs/StorageByteSizeV1"},kind:{const:"significant_growth",type:"string"},previous_bytes:{$ref:"#/$defs/StorageByteSizeV1"},previous_observed_at:{$ref:"#/$defs/UtcMicros"},store:{$ref:"#/$defs/StoreKeyV1"},table:{$ref:"#/$defs/TableNameV1"}},required:["kind","store","table","previous_bytes","current_bytes","growth_bytes","previous_observed_at","current_observed_at"],type:"object"},{properties:{kind:{const:"baseline_established",type:"string"},observed_at:{$ref:"#/$defs/UtcMicros"},store:{$ref:"#/$defs/StoreKeyV1"},tables_observed:{format:"uint64",minimum:0,type:"integer"}},required:["kind","store","observed_at","tables_observed"],type:"object"},{properties:{current_bytes:{$ref:"#/$defs/StorageByteSizeV1"},kind:{const:"table_baseline_pending",type:"string"},observed_at:{$ref:"#/$defs/UtcMicros"},store:{$ref:"#/$defs/StoreKeyV1"},table:{$ref:"#/$defs/TableNameV1"}},required:["kind","store","table","current_bytes","observed_at"],type:"object"},{properties:{kind:{const:"unsupported",type:"string"},store:{$ref:"#/$defs/StoreKeyV1"}},required:["kind","store"],type:"object"},{properties:{kind:{const:"denied",type:"string"},store:{$ref:"#/$defs/StoreKeyV1"}},required:["kind","store"],type:"object"},{properties:{kind:{const:"unknown",type:"string"},store:{$ref:"#/$defs/StoreKeyV1"}},required:["kind","store"],type:"object"}]},TableNameV1:{description:"A physical table name inside a store, used for per-table growth telemetry.",type:"string"},UtcMicros:vK},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Process, database, and session-observation telemetry for the running\ndaemon, with the sections the request opted into.",properties:{captured_at:{description:"Unix epoch seconds.",format:"uint64",minimum:0,type:"integer"},cursor_session_ingest:!0,cursor_session_placeholder_paths:{items:{type:"string"},type:["array","null"]},database:{description:"Store telemetry, with the authority-audit verdict when it ran."},doctor_report:{anyOf:[{$ref:"#/$defs/RuntimeDoctorReportV1"},{type:"null"}]},host_os:{type:"string"},process:{description:"Cached process sample."},session_temporal_health:!0,tracedecay_version:{type:"string"}},required:["captured_at","tracedecay_version","host_os","process","database"],title:"RuntimeResultV1",type:"object"},{$defs:{SearchLexicalAliasV1:{additionalProperties:!1,description:"One named query-time vocabulary alias.",properties:{alternative:{maxLength:128,type:"string"},strict_query:{maxLength:128,type:"string"}},required:["strict_query","alternative"],type:"object"},SearchLexicalFieldFilterV1:{additionalProperties:!1,properties:{field:{$ref:"#/$defs/SearchLexicalFieldV1"},include:{type:"boolean"}},required:["field","include"],type:"object"},SearchLexicalFieldV1:{description:"A lexical posting field a search may include or exclude.",enum:["symbol_name","qualified_name","path","signature","documentation","body_text","preamble_text","exact_term","subtoken"],type:"string"},SearchLexicalProximityV1:{additionalProperties:!1,description:"Ordered terms that must occur in one field within `maximum_gap`\nintervening tokens of each other.",properties:{maximum_gap:{format:"uint32",maximum:8,minimum:0,type:"integer"},terms:{items:{type:"string"},maxItems:8,minItems:2,type:"array"}},required:["terms","maximum_gap"],type:"object"}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{cursor:{description:"Authenticated opaque continuation returned as next_cursor. Repeat the same query and lexical options with it.",type:["string","null"]},lazy_index_ignored_dependencies:{description:"Opt in to bounded indexing of ignored dependency entry files when an import hint matches (default: false).",type:["boolean","null"]},lexical_aliases:{description:"Named query-time vocabulary aliases. The strict query always ranks first. Alias-only hits follow it with the strict query, alternative, and configured-vocabulary reason disclosed.",items:{$ref:"#/$defs/SearchLexicalAliasV1"},maxItems:8,type:["array","null"]},lexical_anchors:{description:"Exact identifiers or technical terms (e.g. 'reserve_stock', 'Foo::bar', 'E0308') that the answer must be about. Each is ranked through the lexical lane as its own route: a hit carrying an anchor outranks every hit that carries none, exact hits included, every anchor with matches keeps at least its best sites through the lane cap, and `lexical_anchors` in the response reports each anchor's outcome (`matched` rows, `admitted` sites this response returns, `dropped` admitted sites it could not carry with the reason, `unmatched`, or `not_served`). Ranked retrieval, not exhaustive grep (use tracedecay_grep for that). Each result names the routes that ranked it. At most 8 anchors, each one whitespace-free term of at most 128 bytes, no repeats.",items:{type:"string"},maxItems:8,type:["array","null"]},lexical_field_filters:{description:"Include or exclude lexical symbol_name, qualified_name, path, signature, documentation, body_text, preamble_text, exact_term, or subtoken fields.",items:{$ref:"#/$defs/SearchLexicalFieldFilterV1"},maxItems:9,type:["array","null"]},lexical_phrases:{description:"Exact lexical phrases to rank through n-gram candidate pruning.",items:{type:"string"},maxItems:4,type:["array","null"]},lexical_proximities:{description:"Ordered lexical terms that must occur within the bounded intervening-token gap.",items:{$ref:"#/$defs/SearchLexicalProximityV1"},maxItems:4,type:["array","null"]},limit:{description:"Maximum number of results to return (default: 10)",format:"uint64",minimum:0,type:["integer","null"]},prefer_symbol:{description:"Add a lexical route restricted to symbol-name matches for the identifier-shaped words of the query. Omitted, it runs when the query is name-shaped (at least half its content words are identifiers such as 'getUserById' or 'Foo::bar'); true forces it, false suppresses it. `query_route` in the response reports the decision and its margin. Query words such as class/struct/function/find/explain are ignored; 'Foo::bar' and 'Foo.bar' contribute 'bar'.",type:["boolean","null"]},query:{description:"Search query string to match against symbol names",type:"string"}},required:["query"],title:"SearchSurfaceRequestV1",type:"object"},{$defs:{ApplicationProblemDetailV1:{description:"The structured facts behind a problem. Adapters read these fields; the\nproblem's `message` is only their one human rendering.",oneOf:[{additionalProperties:!1,description:"The worktree's code index is parked until the operator applies\n`remedy`; repeating the request cannot change the answer.",properties:{cause:{type:"string"},kind:{const:"parked",type:"string"},remedy:{type:"string"},retries_on_wake:{type:"boolean"}},required:["kind","cause","remedy","retries_on_wake"],type:"object"},{additionalProperties:!1,description:"A session refresh asked to begin from a source frontier the\ncommitted projection has already passed.",properties:{active:{format:"uint64",minimum:0,type:"integer"},committed:{format:"uint64",minimum:0,type:"integer"},kind:{const:"stale_refresh_frontier",type:"string"},requested:{format:"uint64",minimum:0,type:"integer"}},required:["kind","requested","committed","active"],type:"object"},{additionalProperties:!1,description:"A compare-and-swap request named `requested` in `field`, but the\nauthority holds `current`. Resending with `current` is a new request.",properties:{current:{format:"uint64",minimum:0,type:"integer"},field:{type:"string"},kind:{const:"stale_precondition",type:"string"},requested:{format:"uint64",minimum:0,type:"integer"}},required:["kind","field","requested","current"],type:"object"},{additionalProperties:!1,description:"A workflow step effect named placement digest `found`, but the step's\ncurrent placement is `expected`: the effect was settled against a\nplacement the run has since replaced.",properties:{expected:{type:"string"},found:{type:"string"},kind:{const:"workflow_placement_digest_stale",type:"string"}},required:["kind","expected","found"],type:"object"},{additionalProperties:!1,description:"A writer lock stayed held by other writers past its admission\ndeadline.",properties:{deadline_ms:{format:"uint64",minimum:0,type:"integer"},kind:{const:"lock_deadline",type:"string"},resource:{type:"string"}},required:["kind","resource","deadline_ms"],type:"object"},{additionalProperties:!1,description:"A persisted store whose shape this binary does not open. It is served\nin this typed state until the operator runs `remedy`, which deletes\nthe old data; nothing is migrated or backed up.",properties:{authority:{type:"string"},found_version:{format:"int64",type:["integer","null"]},kind:{const:"reset_required",type:"string"},reason:{type:"string"},remedy:{type:"string"},required_version:{format:"int64",type:["integer","null"]}},required:["kind","authority","reason","remedy"],type:"object"},{additionalProperties:!1,description:"No compiler runs automatically for the diagnostics scope: no tsconfig\nowns `file`, or, for a workspace read (`file` null), none exists under\nthe project root. `searched` lists the owner search's candidates,\nnearest first; it is empty for a workspace read or a file outside the\nproject root.",properties:{file:{type:["string","null"]},kind:{const:"diagnostics_unsupported",type:"string"},searched:{items:{$ref:"#/$defs/DiagnosticsSearchedTsconfigV1"},type:"array"}},required:["kind","searched"],type:"object"},{additionalProperties:!1,description:"The TypeScript `producer` has not published diagnostics for the\ncurrent code generation yet. `generation` is the last generation it\npublished, null when it has published none.",properties:{generation:{type:["string","null"]},kind:{const:"diagnostics_pending",type:"string"},producer:{type:"string"}},required:["kind","producer"],type:"object"},{additionalProperties:!1,description:"The code graph's engine or catalog was released for memory and was\nstill warming again when the read's budget ran out;\n`retry_after_millis` is the measured warm-up it still needs.",properties:{kind:{const:"code_graph_rewarming",type:"string"},retry_after_millis:{format:"uint64",minimum:0,type:"integer"}},required:["kind","retry_after_millis"],type:"object"},{additionalProperties:!1,description:"No TraceDecay daemon accepts connections on `socket`. `named_by` is\nthe environment variable that chose the socket, when one did;\n`service_unit` is what this client observed of the managed service.",properties:{kind:{const:"daemon_unreachable",type:"string"},named_by:{type:["string","null"]},service_unit:{$ref:"#/$defs/DaemonServiceUnitObservationV1"},socket:{type:"string"}},required:["kind","socket","service_unit"],type:"object"}]},CalibrationProfileId:fb,CandidateContribution:fw,CodeIndexBuildBlockedReasonV1:fE,CodeIndexConvergenceParkedV1:fA,CodeIndexStalenessStateV1:fz,ComponentRevision:fK,ContextLexicalAnchorV1:f3,DaemonServiceUnitObservationV1:{description:"The managed daemon service unit as a client observed it, from the unit\nfile alone.",oneOf:[{additionalProperties:!1,properties:{state:{const:"not_installed",type:"string"}},required:["state"],type:"object"},{additionalProperties:!1,description:"The unit file could not be read.",properties:{error:{type:"string"},state:{const:"unobservable",type:"string"}},required:["state","error"],type:"object"},{additionalProperties:!1,description:"The unit file at `path` serves the socket `serves`.",properties:{path:{type:"string"},serves:{type:"string"},state:{const:"installed",type:"string"}},required:["state","path","serves"],type:"object"}]},DiagnosticsSearchedTsconfigV1:{additionalProperties:!1,description:"One tsconfig location the diagnostics owner search checked.",properties:{path:{description:"Relative to the project root, forward-slash separated.",type:"string"},present:{description:"The config exists, but neither it nor its references include the\nfile.",type:"boolean"}},required:["path","present"],type:"object"},EvidenceRole:hM,ExactClass:hW,FileOccurrenceId:yu,FixedPointScore:yf,FreshnessCompatibilityV1:yh,FusedCandidate:yy,LexicalAnchorDropReasonV1:ge,LexicalAnchorDropV1:gt,LogicalCopyClusterId:gi,LogicalEvidenceId:go,OccurrenceProvenance:gz,PrimitiveFreshnessStateV1:gG,PrimitiveIndexingStateV1:gB,PrimitiveLaneCompleteV1:gK,PrimitiveRecallV1:gZ,PrimitiveSearchFreshnessV1:gQ,PrimitiveUnavailableEvidenceV1:g1,PrimitiveUnavailableStatusV1:g0,RankingDecision:_l,RankingDecisionKind:_p,RepositoryId:_v,RetrievalAnchorId:_q,RetrieverKind:_C,ScoreDomainId:_0,SearchCompleteV1:{additionalProperties:!1,properties:{code_generation:{type:"string"},coverage:{$ref:"#/$defs/SearchCoverageV1"},external_import_hint:{anyOf:[{$ref:"#/$defs/SearchExternalImportHintV1"},{type:"null"}]},freshness:{$ref:"#/$defs/PrimitiveSearchFreshnessV1",description:"Freshness of the served code generation, derived from the typed lane\ncoverage and the daemon scheduler's worktree state."},lexical_anchors:{description:"Outcome of every caller `lexical_anchors` entry, beside the routes.",items:{$ref:"#/$defs/ContextLexicalAnchorV1"},type:["array","null"]},lexical_routes:{description:"Every lexical route fused into this page; present only when a route\nbeyond the strict query ran or ranked a result.",items:{$ref:"#/$defs/SearchLexicalRouteV1"},type:["array","null"]},next_cursor:{description:"Authenticated continuation for the next page; null on the last page.",type:["string","null"]},query_fallback_digest:{type:"string"},query_route:{anyOf:[{$ref:"#/$defs/SearchQueryRouteV1"},{type:"null"}],description:"Which lane the query's shape selected, and its margin."},results:{items:{$ref:"#/$defs/SearchResultRowV1"},type:"array"},scope_prefix:{description:"The session's scope prefix. Ranked candidates carry no file path, so\nthe scope is reported and not applied.",type:["string","null"]},scope_prefix_applied:{type:["boolean","null"]},verified_graph_evidence:{anyOf:[{$ref:"#/$defs/PrimitiveUnavailableEvidenceV1"},{type:"null"}]}},required:["freshness","code_generation","query_fallback_digest","coverage","results"],type:"object"},SearchCoverageV1:{additionalProperties:!1,description:"Per-lane recall of one search, so a full-recall answer is told apart from\none produced while a lane was down.",properties:{exact:{$ref:"#/$defs/SearchLaneStatusV1"},graph:{$ref:"#/$defs/SearchLaneStatusV1"},lexical:{$ref:"#/$defs/SearchLaneStatusV1"},recall:{$ref:"#/$defs/PrimitiveRecallV1"}},required:["exact","lexical","graph","recall"],type:"object"},SearchDisplayUnavailableV1:{description:"Why a ranked candidate's display metadata was not hydrated: the answering\ngeneration no longer matches the request (`stale`), its record is\nincompatible or does not bind the candidate (`incompatible`, `invalid`),\nthe read failed (`internal`), the hydration budget was spent\n(`budget_exceeded`), or the request was cancelled (`cancelled`).",enum:["stale","incompatible","invalid","internal","budget_exceeded","cancelled"],type:"string"},SearchExternalImportCandidatesV1:{additionalProperties:!1,properties:{candidates:{items:{$ref:"#/$defs/SearchExternalImportV1"},type:"array"},evidence:{type:"string"},message:{type:"string"},resolution_status:{type:"string"},suggested_action:{type:"string"}},required:["message","evidence","resolution_status","candidates","suggested_action"],type:"object"},SearchExternalImportHintV1:{anyOf:[{$ref:"#/$defs/SearchExternalImportCandidatesV1"},{$ref:"#/$defs/PrimitiveUnavailableEvidenceV1"}],description:"Advisory evidence that a sparse search matched external-module imports,\nor why that evidence could not be read."},SearchExternalImportV1:{additionalProperties:!1,properties:{import_file:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},module:{type:"string"},symbol:{description:"The imported name; null for a whole-module import.",type:["string","null"]}},required:["module","import_file","line"],type:"object"},SearchLaneStateV1:{description:"A lane that did not serve the current complete generation. A partial\nlane names its generation and reason when it has them, null otherwise.",oneOf:[{additionalProperties:!1,properties:{generation:{type:"string"},status:{const:"stale",type:"string"}},required:["status","generation"],type:"object"},{additionalProperties:!1,properties:{generation:{type:["string","null"]},reason:{type:["string","null"]},status:{const:"partial",type:"string"}},required:["status"],type:"object"},{additionalProperties:!1,properties:{reason:{type:"string"},status:{const:"unavailable",type:"string"}},required:["status","reason"],type:"object"}]},SearchLaneStatusV1:{anyOf:[{$ref:"#/$defs/PrimitiveLaneCompleteV1"},{$ref:"#/$defs/SearchLaneStateV1"}]},SearchLexicalAlternativeReasonV1:{description:"Why the lexical lane tried a configured alternative.",enum:["configured_vocabulary_alias"],type:"string"},SearchLexicalRouteV1:{description:"One lexical route fused into the page, with its display label.",oneOf:[{additionalProperties:!1,description:"The caller's strict lexical query.",properties:{label:{type:"string"},route:{const:"query",type:"string"}},required:["route","label"],type:"object"},{additionalProperties:!1,description:"One caller-supplied exact identifier or term.",properties:{anchor:{type:"string"},label:{type:"string"},route:{const:"anchor",type:"string"}},required:["route","anchor","label"],type:"object"},{additionalProperties:!1,description:"Identifier-shaped tokens of the query, restricted to symbol names.",properties:{label:{type:"string"},route:{const:"preferred_symbol",type:"string"},tokens:{items:{type:"string"},type:"array"}},required:["route","tokens","label"],type:"object"},{additionalProperties:!1,description:"Identifier and path components recovered from the strict query.",properties:{label:{type:"string"},route:{const:"identifier_split",type:"string"},strict_query:{type:"string"},terms:{items:{type:"string"},type:"array"}},required:["route","strict_query","terms","label"],type:"object"},{additionalProperties:!1,description:"A configured query-time vocabulary alternative.",properties:{alternative:{type:"string"},label:{type:"string"},reason:{$ref:"#/$defs/SearchLexicalAlternativeReasonV1"},route:{const:"alias",type:"string"},strict_query:{type:"string"}},required:["route","strict_query","alternative","reason","label"],type:"object"}]},SearchQueryRouteDeciderV1:{description:"Who chose the query route: the query-shape gate or the caller's\n`prefer_symbol`.",enum:["query_shape","caller"],type:"string"},SearchQueryRouteKindV1:{description:"Which lexical lane the query's shape selected.",oneOf:[{const:"name",description:"The symbol-name route ran beside the strict query.",type:"string"},{const:"prose",description:"The strict query ran without the symbol-name route.",type:"string"}]},SearchQueryRouteV1:{additionalProperties:!1,description:"The query-shape routing decision behind a page.",properties:{decided_by:{$ref:"#/$defs/SearchQueryRouteDeciderV1"},margin:{description:"Distance from the name gate in [-0.5, 0.5]: the share of the query's\ncontent words that are identifier-shaped, minus one half. The gate\nselects `name` at or above 0. Reported when the caller decided too.\nIt describes query shape only and is not an answerability signal.",format:"double",type:"number"},route:{$ref:"#/$defs/SearchQueryRouteKindV1"}},required:["route","margin","decided_by"],type:"object"},SearchResultDisplayV1:{additionalProperties:!1,properties:{kind:{type:"string"},name:{type:"string"},path:{type:"string"},qualified_name:{type:"string"}},required:["name","qualified_name","kind","path"],type:"object"},SearchResultRowV1:{additionalProperties:!1,description:"One ranked candidate with its generation-bound display metadata.",properties:{candidate:{$ref:"#/$defs/FusedCandidate"},display:{anyOf:[{$ref:"#/$defs/SearchResultDisplayV1"},{type:"null"}]},display_unavailable:{anyOf:[{$ref:"#/$defs/SearchDisplayUnavailableV1"},{type:"null"}],description:"Why `display` is absent from this ranked candidate."},final_ordinal:{format:"uint32",minimum:0,type:"integer"},lexical_routes:{description:"The lexical routes that ranked this candidate.",items:{$ref:"#/$defs/SearchRouteMatchV1"},type:["array","null"]},node_id:{description:"The graph symbol to read with `tracedecay_source_body`.",type:["string","null"]}},required:["candidate","final_ordinal"],type:"object"},SearchRouteMatchV1:{additionalProperties:!1,description:"One route that ranked a candidate, named by its route label.",properties:{matched_terms:{items:{type:"string"},type:"array"},route:{type:"string"},score_micros:{format:"uint64",minimum:0,type:"integer"},spelling_variants:{items:{$ref:"#/$defs/SearchSpellingVariantV1"},type:"array"}},required:["route","score_micros","matched_terms"],type:"object"},SearchSpellingVariantV1:{additionalProperties:!1,properties:{alternative:{type:"string"},query:{type:"string"}},required:["query","alternative"],type:"object"},SearchUnavailableV1:{additionalProperties:!1,properties:{code_generation:{type:["string","null"]},coverage:{$ref:"#/$defs/SearchCoverageV1"},detail:{anyOf:[{$ref:"#/$defs/ApplicationProblemDetailV1"},{type:"null"}],description:"Present when indexing is parked: its cause, remedy, and wake retry."},freshness:{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},query_fallback_digest:{description:"Always null: no fallback subpayload was produced.",type:["string","null"]},reason:{type:"string"},results:{description:"Always empty: no generation answered.",items:{$ref:"#/$defs/SearchResultRowV1"},type:"array"},status:{$ref:"#/$defs/PrimitiveUnavailableStatusV1"},verified_graph_evidence:{anyOf:[{$ref:"#/$defs/PrimitiveUnavailableEvidenceV1"},{type:"null"}]}},required:["freshness","results","status","reason","coverage"],type:"object"},SessionOrThreadId:_8,SourceFreshness:vh,SourceInstanceKey:vy,SourceNamespace:v_,SourceOccurrenceId:vv,UtcMicros:vK},$schema:"https://json-schema.org/draft/2020-12/schema",anyOf:[{$ref:"#/$defs/SearchCompleteV1"},{$ref:"#/$defs/SearchUnavailableV1"}],description:"What a search served: a ranked page, or the typed reason no generation\ncould answer.",title:"SearchResultV1"},{$defs:{PageRequest:gU,ResultProjection:_w,RetrievalOrder:_I,RetrievalRequestMeta:_x,SessionId:_5,TemporalModeV1:vA,UtcMicros:vK},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{meta:{$ref:"#/$defs/RetrievalRequestMeta"},session_id:{$ref:"#/$defs/SessionId"}},required:["session_id","meta"],title:"SessionLookupRequest",type:"object"},{$defs:{RetrievalAnchorId:_q},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{anchors:{items:{$ref:"#/$defs/RetrievalAnchorId"},type:"array"}},required:["anchors"],title:"SessionLookupResult",type:"object"},{$defs:{SessionRefreshFrontierV1:{additionalProperties:!1,properties:{committed_through:{format:"uint64",minimum:0,type:"integer"},observed_through:{format:"uint64",minimum:0,type:"integer"}},required:["observed_through","committed_through"],type:"object"},SessionRefreshGrainV1:{enum:["occurrence","logical_message","turn","session","thread","agent","summary"],type:"string"},SessionRefreshScopeV1:{description:"Session-store owner one refresh is bound to.\n\nThe caller selects the already-mounted project or profile authority. Exact\nprofile, project, repository, worktree, branch, store, and root identities\nstay daemon-owned and are resolved from that authority during admission.",oneOf:[{additionalProperties:!1,properties:{kind:{const:"project",type:"string"}},required:["kind"],type:"object"},{additionalProperties:!1,properties:{kind:{const:"profile",type:"string"}},required:["kind"],type:"object"}]},SessionRefreshSessionV1:{additionalProperties:!1,properties:{id:{type:"string"}},required:["id"],type:"object"},SessionRefreshSourceV1:{additionalProperties:!1,properties:{scope:{type:"string"}},required:["scope"],type:"object"},SessionRefreshTargetV1:{additionalProperties:!1,properties:{frontier:{$ref:"#/$defs/SessionRefreshFrontierV1"},grain:{$ref:"#/$defs/SessionRefreshGrainV1"},temporal_mode:{$ref:"#/$defs/TemporalModeV1"}},required:["temporal_mode","grain","frontier"],type:"object"},TemporalModeV1:vA,UtcMicros:vK},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Exact route-selected session-refresh request body.\n\nEach current route selects the action itself; `scope` selects the mounted\nsession-store owner. Project-scoped requests are served under project-open\nadmission, profile-scoped requests by the authenticated profile authority.",properties:{handle:{type:["string","null"]},scope:{$ref:"#/$defs/SessionRefreshScopeV1"},session:{$ref:"#/$defs/SessionRefreshSessionV1"},source:{$ref:"#/$defs/SessionRefreshSourceV1"},target:{$ref:"#/$defs/SessionRefreshTargetV1"}},required:["scope","session","source","target"],title:"SessionRefreshActionRequestV1",type:"object"},{$defs:{ClosedUtcIntervalV1:fx,RetainedErrorV1:_R,RetainedOutcomeStatusV1:_P,SessionCoverageIntervalV1:_4,SessionCoverageReasonV1:_6,SessionCoverageRequestV1:_3,SessionCoverageStateV1:_9,SessionRefreshFrontierResultV1:_7,SessionRefreshProgressV1:ve,SessionRefreshReceiptV1:vt,SessionRefreshTerminalStateResultV1:vr,SessionSourceCoverageV1:vo,TemporalCoverageV1:vT,TemporalModeV1:vA,UtcMicros:vK,ValidCoverageIntervalV1:vJ},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{accepted_at:{format:"int64",type:["integer","null"]},error:{anyOf:[{$ref:"#/$defs/RetainedErrorV1"},{type:"null"}]},handle:{type:["string","null"]},operation_id:{type:["string","null"]},outcome:{$ref:"#/$defs/RetainedOutcomeStatusV1"},progress:{anyOf:[{$ref:"#/$defs/SessionRefreshProgressV1"},{type:"null"}]},receipt:{anyOf:[{$ref:"#/$defs/SessionRefreshReceiptV1"},{type:"null"}]},scope:{type:"string"},tool:{type:"string"}},required:["outcome","scope","tool"],title:"SessionRefreshBeginResultV1",type:"object"},{$defs:{ClosedUtcIntervalV1:fx,RetainedErrorV1:_R,RetainedOutcomeStatusV1:_P,SessionCoverageIntervalV1:_4,SessionCoverageReasonV1:_6,SessionCoverageRequestV1:_3,SessionCoverageStateV1:_9,SessionRefreshFrontierResultV1:_7,SessionRefreshProgressV1:ve,SessionRefreshReceiptV1:vt,SessionRefreshTerminalStateResultV1:vr,SessionSourceCoverageV1:vo,TemporalCoverageV1:vT,TemporalModeV1:vA,UtcMicros:vK,ValidCoverageIntervalV1:vJ},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{accepted_at:{format:"int64",type:["integer","null"]},error:{anyOf:[{$ref:"#/$defs/RetainedErrorV1"},{type:"null"}]},handle:{type:["string","null"]},operation_id:{type:["string","null"]},outcome:{$ref:"#/$defs/RetainedOutcomeStatusV1"},progress:{anyOf:[{$ref:"#/$defs/SessionRefreshProgressV1"},{type:"null"}]},receipt:{anyOf:[{$ref:"#/$defs/SessionRefreshReceiptV1"},{type:"null"}]},scope:{type:"string"},tool:{type:"string"}},required:["outcome","scope","tool"],title:"SessionRefreshCancelResultV1",type:"object"},{$defs:{ClosedUtcIntervalV1:fx,RetainedErrorV1:_R,RetainedOutcomeStatusV1:_P,SessionCoverageIntervalV1:_4,SessionCoverageReasonV1:_6,SessionCoverageRequestV1:_3,SessionCoverageStateV1:_9,SessionRefreshFrontierResultV1:_7,SessionRefreshProgressV1:ve,SessionRefreshReceiptV1:vt,SessionRefreshTerminalStateResultV1:vr,SessionSourceCoverageV1:vo,TemporalCoverageV1:vT,TemporalModeV1:vA,UtcMicros:vK,ValidCoverageIntervalV1:vJ},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{error:{anyOf:[{$ref:"#/$defs/RetainedErrorV1"},{type:"null"}]},outcome:{$ref:"#/$defs/RetainedOutcomeStatusV1"},progress:{anyOf:[{$ref:"#/$defs/SessionRefreshProgressV1"},{type:"null"}]},receipt:{anyOf:[{$ref:"#/$defs/SessionRefreshReceiptV1"},{type:"null"}]},scope:{type:"string"},tool:{type:"string"}},required:["outcome","scope","tool"],title:"SessionRefreshStatusResultV1",type:"object"},{$defs:{RetainedTimeFilterV1:_V,SessionGitRefV1:{enum:["branch","worktree","commit"],type:"string"},SessionGitRelationV1:{enum:["produced","observed","all"],type:"string"}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{git_ref:{$ref:"#/$defs/SessionGitRefV1"},limit:{format:"uint64",minimum:0,type:["integer","null"]},relation:{anyOf:[{$ref:"#/$defs/SessionGitRelationV1"},{type:"null"}]},since:{anyOf:[{$ref:"#/$defs/RetainedTimeFilterV1"},{type:"null"}]},until:{anyOf:[{$ref:"#/$defs/RetainedTimeFilterV1"},{type:"null"}]},value:{type:"string"}},required:["git_ref","value"],title:"SessionsForRequestV1",type:"object"},{$defs:{CorrelationIndexCountModeV1:{enum:["presence_only"],type:"string"},CorrelationIndexV1:{additionalProperties:!1,properties:{backfill_watermark:{format:"int64",type:["integer","null"]},commit_count:{format:"uint64",minimum:0,type:["integer","null"]},commits_present:{type:"boolean"},count_mode:{$ref:"#/$defs/CorrelationIndexCountModeV1"},generation:{type:["string","null"]},projection_available:{type:"boolean"},source_watermark:{type:["string","null"]},span_count:{format:"uint64",minimum:0,type:["integer","null"]},spans_present:{type:"boolean"}},required:["projection_available","spans_present","commits_present","count_mode"],type:"object"},RetainedOutcomeStatusV1:_P,SessionCorrelationHitV1:{additionalProperties:!1,properties:{branch:{type:["string","null"]},commit_sha:{type:["string","null"]},committed_at:{format:"int64",type:["integer","null"]},confidence:{format:"int64",type:["integer","null"]},event_count:{format:"int64",type:"integer"},evidence:{type:["string","null"]},evidence_message_id:{type:["string","null"]},first_ts:{format:"int64",type:["integer","null"]},last_ts:{format:"int64",type:["integer","null"]},provider:{type:"string"},relation:{type:["string","null"]},session_id:{type:"string"},sources:{items:{type:"string"},type:"array"},span_count:{format:"int64",type:"integer"},span_overlap_kind:{type:["string","null"]},worktree:{type:["string","null"]}},required:["provider","session_id","event_count","span_count","sources"],type:"object"}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{count:{format:"uint",minimum:0,type:"integer"},git_ref:{type:["string","null"]},index:{anyOf:[{$ref:"#/$defs/CorrelationIndexV1"},{type:"null"}]},index_empty:{type:["boolean","null"]},message:{type:["string","null"]},observed_count:{format:"uint",minimum:0,type:["integer","null"]},observed_sessions:{items:{$ref:"#/$defs/SessionCorrelationHitV1"},type:["array","null"]},problem_code:{type:["string","null"]},relation:{type:["string","null"]},results:{items:{$ref:"#/$defs/SessionCorrelationHitV1"},type:"array"},since:{format:"int64",type:["integer","null"]},status:{$ref:"#/$defs/RetainedOutcomeStatusV1"},until:{format:"int64",type:["integer","null"]},value:{type:["string","null"]}},required:["count","results","status"],title:"SessionsForResultV1",type:"object"},{$defs:{NodeExpansionCostV1:gA,SymbolSignatureV1:{additionalProperties:!1,properties:{cost_to_expand:{$ref:"#/$defs/NodeExpansionCostV1"},docstring:{type:["string","null"]},end_line:{format:"uint32",minimum:0,type:"integer"},file:{type:"string"},is_async:{type:"boolean"},kind:{type:"string"},name:{type:"string"},node_id:{type:"string"},qualified_name:{type:"string"},signature:{type:["string","null"]},start_line:{format:"uint32",minimum:0,type:"integer"},unavailable_fields:{items:{type:"string"},type:"array"},visibility:{type:"string"}},required:["node_id","name","qualified_name","kind","visibility","is_async","file","start_line","end_line","cost_to_expand","unavailable_fields"],type:"object"}},$schema:"https://json-schema.org/draft/2020-12/schema",items:{$ref:"#/$defs/SymbolSignatureV1"},title:"Array_of_SymbolSignatureV1",type:"array"},{$defs:{ProjectId:g2,RepositoryId:_v,SimilarMatchClassV1:vd,SimilarTargetV1:{oneOf:[{additionalProperties:!1,properties:{kind:{const:"symbol_occurrence",type:"string"},symbol_occurrence_id:{$ref:"#/$defs/SymbolOccurrenceId"}},required:["kind","symbol_occurrence_id"],type:"object"},{additionalProperties:!1,properties:{kind:{const:"source_range",type:"string"},path:{type:"string"},span:{$ref:"#/$defs/SourceSpan"}},required:["kind","path","span"],type:"object"}]},SourceSpan:vb,SymbolOccurrenceId:vV},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{cursor:{type:["string","null"]},match_classes:{items:{$ref:"#/$defs/SimilarMatchClassV1"},type:"array"},project_id:{$ref:"#/$defs/ProjectId"},repository_id:{$ref:"#/$defs/RepositoryId"},result_limit:{description:"Preferred result page size.",format:"uint32",minimum:0,type:"integer"},target:{$ref:"#/$defs/SimilarTargetV1"},work_limit:{format:"uint32",minimum:0,type:"integer"}},required:["project_id","repository_id","target","match_classes","result_limit","work_limit"],title:"SimilarSurfaceRequestV1",type:"object"},{$defs:{CodeGenerationId:fT,CodeIndexBuildBlockedReasonV1:fE,CodeIndexConvergenceParkedV1:fA,CodeIndexStalenessStateV1:fz,ManifestDigest:gl,PrimitiveFreshnessStateV1:gG,PrimitiveIndexingStateV1:gB,PrimitiveSearchFreshnessV1:gQ,ProjectId:g2,RepositoryId:_v,SimilarCoverageV1:{oneOf:[{additionalProperties:!1,properties:{status:{const:"complete",type:"string"}},required:["status"],type:"object"},{additionalProperties:!1,properties:{status:{const:"partial",type:"string"}},required:["status"],type:"object"},{additionalProperties:!1,properties:{minimum_tokens:{format:"uint32",minimum:0,type:"integer"},status:{const:"excluded_too_small",type:"string"}},required:["status","minimum_tokens"],type:"object"},{additionalProperties:!1,properties:{maximum_bytes:{format:"uint64",minimum:0,type:"integer"},maximum_tokens:{format:"uint32",minimum:0,type:"integer"},status:{const:"excluded_too_large",type:"string"}},required:["status","maximum_tokens","maximum_bytes"],type:"object"},{additionalProperties:!1,properties:{status:{const:"excluded_incomplete_tokenization",type:"string"}},required:["status"],type:"object"}]},SimilarFamilyV1:vs,SimilarMatchClassV1:vd,SimilarOccurrenceV1:vc,SourceSpan:vb,SymbolOccurrenceId:vV,WorktreeId:$M},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{coverage:{$ref:"#/$defs/SimilarCoverageV1"},families:{items:{$ref:"#/$defs/SimilarFamilyV1"},type:"array"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},source:{$ref:"#/$defs/SimilarOccurrenceV1"},source_generation:{$ref:"#/$defs/CodeGenerationId"}},required:["source","families","source_generation","coverage"],title:"SimilarResultV1",type:"object"},{$defs:{ManagedSkillState:gc},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{include_body:{default:!1,description:"If true, include each skill's body_markdown in the list response\n(default: false).",type:"boolean"},state:{anyOf:[{$ref:"#/$defs/ManagedSkillState"},{type:"null"}],description:"Optional managed-skill lifecycle state filter."}},title:"SkillListSurfaceRequestV1",type:"object"},{$defs:{AutomationReadStatusV1:m8,ManagedSkillMaterializationScope:gn,ManagedSkillMetadata:ga,ManagedSkillProvenance:gs,ManagedSkillSource:gd,ManagedSkillState:gc,SkillImprovementRecommendation:vl,SkillInstallTarget:vp,SkillListEntryV1:{additionalProperties:!1,properties:{body_markdown:{description:"Present only when the request asked for bodies.",type:["string","null"]},improvement_recommendation:{anyOf:[{$ref:"#/$defs/SkillImprovementRecommendation"},{type:"null"}]},metadata:{$ref:"#/$defs/ManagedSkillMetadata"},stale_recommendation:{anyOf:[{$ref:"#/$defs/SkillStaleRecommendation"},{type:"null"}]},support_file_count:{format:"uint",minimum:0,type:"integer"},support_file_paths:{items:{type:"string"},type:"array"},usage_summary:{$ref:"#/$defs/SkillUsageRecord"}},required:["metadata","support_file_count","support_file_paths","usage_summary"],type:"object"},SkillStaleRecommendation:vu,SkillUsageRecord:vm},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{count:{format:"uint",minimum:0,type:"integer"},profile_root:{type:"string"},skills:{items:{$ref:"#/$defs/SkillListEntryV1"},type:"array"},status:{$ref:"#/$defs/AutomationReadStatusV1"}},required:["status","profile_root","count","skills"],title:"SkillListResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{id:{description:"Managed skill id to read.",type:"string"},include_support_files:{default:!1,description:"Include support-file byte payloads. Default false; the response still\nlists each path and byte length.",type:"boolean"}},required:["id"],title:"SkillViewSurfaceRequestV1",type:"object"},{$defs:{AutomationReadStatusV1:m8,ManagedSkill:{properties:{body_markdown:{type:"string"},metadata:{$ref:"#/$defs/ManagedSkillMetadata"},support_files:{items:{$ref:"#/$defs/ManagedSupportFile"},type:"array"}},required:["metadata","body_markdown","support_files"],type:"object"},ManagedSkillMaterializationScope:gn,ManagedSkillMetadata:ga,ManagedSkillProvenance:gs,ManagedSkillSource:gd,ManagedSkillState:gc,ManagedSupportFile:{properties:{bytes:{items:{format:"uint8",maximum:255,minimum:0,type:"integer"},type:"array"},path:{type:"string"}},required:["path","bytes"],type:"object"},SkillImprovementRecommendation:vl,SkillInstallTarget:vp,SkillStaleRecommendation:vu,SkillSupportFileSummaryV1:{additionalProperties:!1,properties:{byte_len:{format:"uint",minimum:0,type:"integer"},path:{type:"string"}},required:["path","byte_len"],type:"object"},SkillUsageRecord:vm},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{improvement_recommendation:{anyOf:[{$ref:"#/$defs/SkillImprovementRecommendation"},{type:"null"}]},profile_root:{type:"string"},skill:{$ref:"#/$defs/ManagedSkill",description:"The skill package; `support_files` is empty unless the request\nincluded them."},stale_recommendation:{anyOf:[{$ref:"#/$defs/SkillStaleRecommendation"},{type:"null"}]},status:{$ref:"#/$defs/AutomationReadStatusV1"},support_file_summaries:{items:{$ref:"#/$defs/SkillSupportFileSummaryV1"},type:"array"},support_files_included:{type:"boolean"},usage_summary:{$ref:"#/$defs/SkillUsageRecord"}},required:["status","profile_root","skill","usage_summary","support_files_included","support_file_summaries"],title:"SkillViewResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{node_id:{type:"string"}},required:["node_id"],title:"SourceBodyPrimitiveRequest",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{body:{type:"string"},end_line:{format:"uint32",minimum:0,type:"integer"},file:{type:"string"},node_id:{type:"string"},start_line:{format:"uint32",minimum:0,type:"integer"}},required:["node_id","file","start_line","end_line","body"],title:"SourceBodyPrimitiveResult",type:"object"},{$defs:{ManifestDigest:gl,SourceEditKind:{enum:["str_replace","multi_str_replace","insert_at","ast_grep_rewrite","replace_symbol","insert_at_symbol","move_symbol","rename_symbol"],type:"string"},SourceEditReconciliationDispositionV1:{description:"Explicit conclusion supplied by an authorized reconciliation/inspection\noperation. The concrete authority independently recaptures every candidate\nfile and accepts only an exact matching state digest.",oneOf:[{properties:{committed_state:{$ref:"#/$defs/ManifestDigest"},disposition:{const:"confirm_committed",type:"string"}},required:["disposition","committed_state"],type:"object"},{properties:{disposition:{const:"confirm_rolled_back",type:"string"}},required:["disposition"],type:"object"}]}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Exact public input accepted by `tracedecay_source_edit_reconcile`.",properties:{attempt_idempotency_key:{type:"string"},confirm:{type:"boolean"},disposition:{$ref:"#/$defs/SourceEditReconciliationDispositionV1"},effect_id:{type:"string"},idempotency_key:{type:"string"},input_digest:{type:"string"},kind:{$ref:"#/$defs/SourceEditKind"}},required:["kind","effect_id","idempotency_key","attempt_idempotency_key","input_digest","disposition","confirm"],title:"SourceEditReconcileSurfaceRequestV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Exact public input accepted by `tracedecay_source_edit_rollback`.",properties:{confirm:{type:"boolean"},effect_id:{type:"string"},expected_state:{type:"string"},idempotency_key:{type:"string"},original_idempotency_key:{type:"string"},original_input_digest:{type:"string"}},required:["effect_id","original_idempotency_key","idempotency_key","original_input_digest","expected_state","confirm"],title:"SourceEditRollbackSurfaceRequestV1",type:"object"},{$defs:{FileOccurrenceId:yu,PageRequest:gU,ResultProjection:_w,RetrievalOrder:_I,RetrievalRequestMeta:_x,SourceSpan:vb,TemporalModeV1:vA,UtcMicros:vK},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{file:{$ref:"#/$defs/FileOccurrenceId",description:"Canonical file occurrence from `code_exact_occurrence` at\n`items[].occurrence.file`; a logical path is not a file occurrence identity."},meta:{$ref:"#/$defs/RetrievalRequestMeta"},span:{$ref:"#/$defs/SourceSpan"}},required:["file","span","meta"],title:"SourceLinesRequest",type:"object"},{$defs:{RetrievalAnchorId:_q,SourceReference:{additionalProperties:!1,properties:{anchor:{$ref:"#/$defs/RetrievalAnchorId"},span:{$ref:"#/$defs/SourceSpan"}},required:["anchor","span"],type:"object"},SourceSpan:vb},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{body:{type:["string","null"]},file:{type:["string","null"]},references:{items:{$ref:"#/$defs/SourceReference"},type:"array"}},required:["references"],title:"SourceLinesResult",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{file:{type:"string"}},required:["file"],title:"SourceOutlinePrimitiveRequest",type:"object"},{$defs:{SymbolPrimitiveRecord:vq},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{file:{type:"string"},symbols:{items:{$ref:"#/$defs/SymbolPrimitiveRecord"},type:"array"}},required:["file","symbols"],title:"SourceOutlinePrimitiveResult",type:"object"},{$defs:{BranchStackEdgeV1:fu,BranchStackId:fm,BranchStackNodeV1:ff,BranchStackRevisionId:fh,CommitId:fH,ManifestDigest:gl,NativeIntegrationDirectionV1:gV,NativeIntegrationSelectionDeclarationV1:{description:"Explicit caller declaration for one native-integration selection.\n\nDeclared stacks contain the visible nodes and edges, while the daemon\nderives canonical order and the revision digest through the domain\nconstructor. Callers cannot submit either derived field.",oneOf:[{additionalProperties:!1,properties:{binding:{additionalProperties:!1,properties:{destination_node_id:{$ref:"#/$defs/StackNodeId"},direction:{$ref:"#/$defs/NativeIntegrationDirectionV1"},edges:{items:{$ref:"#/$defs/BranchStackEdgeV1"},type:"array"},nodes:{items:{$ref:"#/$defs/BranchStackNodeV1"},type:"array"},revision_id:{$ref:"#/$defs/BranchStackRevisionId"},source_node_id:{$ref:"#/$defs/StackNodeId"},stack_id:{$ref:"#/$defs/BranchStackId"}},required:["stack_id","revision_id","nodes","edges","source_node_id","destination_node_id","direction"],type:"object"},kind:{const:"declared_stack_edge",type:"string"}},required:["kind","binding"],type:"object"},{additionalProperties:!1,properties:{binding:{additionalProperties:!1,properties:{destination_ref:{$ref:"#/$defs/RefId"},proposal_digest:{$ref:"#/$defs/ManifestDigest"},source_ref:{$ref:"#/$defs/RefId"}},required:["proposal_digest","source_ref","destination_ref"],type:"object"},kind:{const:"independent_branch",type:"string"}},required:["kind","binding"],type:"object"}]},ProjectId:g2,RefId:_u,RepositoryId:_v,ResolvedScope:_k,ScopeSetId:_Q,ScopeSetRevision:_X,StackNodeId:vk,WorktreeId:$M,WorktreeInventoryEpoch:$W,WorktreeInventorySnapshotId:$N},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Exact caller-supplied identity frozen by `stack_snapshot`.\n\nThis proof binds the exact authorized `ProjectId`, `RepositoryId`, source\nand destination worktree/ref identity, frozen inventory, scope/grant/policy\nrevisions, and one declared-edge or independent-branch selection. Paths,\nfree-form SHA values, branch display names, and provider topology remain\nunrepresentable.",properties:{authorized_scope_set_digest:{$ref:"#/$defs/ManifestDigest"},authorized_scope_set_id:{$ref:"#/$defs/ScopeSetId"},authorized_scope_set_revision:{$ref:"#/$defs/ScopeSetRevision"},destination:{$ref:"#/$defs/ResolvedScope"},grant_digest:{$ref:"#/$defs/ManifestDigest"},inventory_epoch:{$ref:"#/$defs/WorktreeInventoryEpoch"},inventory_snapshot_id:{$ref:"#/$defs/WorktreeInventorySnapshotId"},policy_digest:{$ref:"#/$defs/ManifestDigest"},selection:{$ref:"#/$defs/NativeIntegrationSelectionDeclarationV1"},source:{$ref:"#/$defs/ResolvedScope"}},required:["source","destination","authorized_scope_set_id","authorized_scope_set_revision","authorized_scope_set_digest","inventory_snapshot_id","inventory_epoch","selection","grant_digest","policy_digest"],title:"NativeIntegrationStackSnapshotSurfaceRequest",type:"object"},{$defs:{CodeIndexReadinessTargetV1:{description:"The readiness a status caller can wait for.",oneOf:[{const:"fresh",description:"A sealed complete generation serves exact and lexical reads for the\ncurrent source: `code_index_freshness.status` is `current`.",type:"string"},{const:"ready",description:"`fresh`, and the generation's native code graph also serves.",type:"string"},{const:"graph_ready",description:"A published generation's native code graph serves and no convergence\npark is set, whatever the source freshness. Waiting for it never\nsweeps the source, so it cannot arm the reconcile it would observe.",type:"string"}]},CodeIndexReadinessWaitV1:{additionalProperties:!1,description:"`tracedecay_status` `wait_for`: hold the status read until the worktree\nreaches `state`, for at most the caller's `timeout_ms`.",properties:{state:{$ref:"#/$defs/CodeIndexReadinessTargetV1"},timeout_ms:{format:"uint64",minimum:0,type:"integer"}},required:["state","timeout_ms"],type:"object"}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{admission_only:{default:!1,description:"Report only that the project route is admitted, reading no graph,\nindex, or session state. Default false.",type:"boolean"},include_branch_diagnostics:{default:!1,description:"Full tracked-branch diagnostic list. Default false.",type:"boolean"},include_session_ingest:{default:!1,description:"Session-ingest health. Default false.",type:"boolean"},include_staleness:{default:!1,description:"Git staleness object. Default false.",type:"boolean"},include_storage_health:{default:!1,description:"Storage-health snapshot. Default false.",type:"boolean"},wait_for:{anyOf:[{$ref:"#/$defs/CodeIndexReadinessWaitV1"},{type:"null"}],description:"Hold the status read until the code index reaches `state` (`fresh`:\nstatus `current`; `ready`: also native graph serving; `graph_ready`: a\npublished generation's native graph serves, whatever the freshness),\nfor at most `timeout_ms`. The payload's `wait` reports `reached`,\n`timed_out` with `last_state`, or `unavailable` with `reason`."}},title:"StatusSurfaceRequestV1",type:"object"},{$defs:{CodeCloneIndexBudgetsV1:{description:"Fixed per-request clone candidate and verification budgets.",properties:{candidate_bodies:{format:"uint64",minimum:0,type:"integer"},hot_posting_rows:{format:"uint64",minimum:0,type:"integer"},minimum_body_tokens:{format:"uint64",minimum:0,type:"integer"},minimum_directional_coverage_millionths:{format:"uint64",minimum:0,type:"integer"},posting_rows:{format:"uint64",minimum:0,type:"integer"},verification_bodies:{format:"uint64",minimum:0,type:"integer"},verification_token_work:{format:"uint64",minimum:0,type:"integer"}},required:["posting_rows","candidate_bodies","verification_bodies","verification_token_work","hot_posting_rows","minimum_body_tokens","minimum_directional_coverage_millionths"],type:"object"},CodeCloneIndexCoverageV1:{description:"Coverage retained by one clone-index artifact or in-progress successor.\n\nCounts are `None` until the clone artifact has observed the corresponding\ndenominator. A complete empty repository reports `Some(0)`, which keeps a\ndesigned zero distinct from unavailable coverage.",properties:{conservative_normalized_bodies:{description:"Eligible bodies with a conservative exact posting.",format:"uint64",minimum:0,type:["integer","null"]},eligible_source_bodies:{description:"Source bodies admitted for automatic clone discovery.",format:"uint64",minimum:0,type:["integer","null"]},exact_postings:{description:"Conservative and rename-normalized exact posting rows.",format:"uint64",minimum:0,type:["integer","null"]},excluded_incomplete_tokenization_bodies:{description:"Bodies excluded because conservative tokenization was incomplete.",format:"uint64",minimum:0,type:["integer","null"]},excluded_too_large_bodies:{description:"Bodies excluded because they exceed the automatic-discovery token maximum.",format:"uint64",minimum:0,type:["integer","null"]},excluded_too_small_bodies:{description:"Bodies excluded because they are below the automatic-discovery minimum.",format:"uint64",minimum:0,type:["integer","null"]},hot_posting_rows_skipped:{description:"Positional rows omitted when those hot posting lists are skipped.",format:"uint64",minimum:0,type:["integer","null"]},hot_postings_skipped:{description:"Fingerprint posting lists above the interactive read threshold.",format:"uint64",minimum:0,type:["integer","null"]},near_fingerprint_bodies:{description:"Eligible bodies represented by positional fingerprints.",format:"uint64",minimum:0,type:["integer","null"]},near_fingerprint_postings:{description:"Positional fingerprint posting rows retained by the artifact.",format:"uint64",minimum:0,type:["integer","null"]},payloads_reused:{description:"Current payload occurrences reused from the preceding generation.",format:"uint64",minimum:0,type:["integer","null"]},rename_normalized_bodies:{description:"Eligible bodies with a complete rename-normalized exact posting.",format:"uint64",minimum:0,type:["integer","null"]},rename_partial_bodies:{description:"Eligible bodies whose rename normalization is partial.",format:"uint64",minimum:0,type:["integer","null"]},rename_unsupported_bodies:{description:"Eligible bodies whose language has no rename normalization.",format:"uint64",minimum:0,type:["integer","null"]},source_bodies:{description:"Clone body occurrences observed in the sealed lexical source.",format:"uint64",minimum:0,type:["integer","null"]},unique_payloads:{description:"Distinct content-addressed payloads retained by the artifact.",format:"uint64",minimum:0,type:["integer","null"]}},type:"object"},CodeCloneIndexObservationV1:{description:"Generation-pinned clone-index evidence shared by non-error readiness states.",properties:{artifact_format_revision:{format:"uint32",minimum:0,type:["integer","null"]},budgets:{$ref:"#/$defs/CodeCloneIndexBudgetsV1"},conservative_normalization_revision:{format:"uint16",maximum:65535,minimum:0,type:"integer"},coverage:{$ref:"#/$defs/CodeCloneIndexCoverageV1"},generation_id:{type:"string"},rename_normalization_revision:{format:"uint16",maximum:65535,minimum:0,type:"integer"},resources:{$ref:"#/$defs/CodeCloneIndexResourcesV1"},source_revision:{type:["string","null"]}},required:["generation_id","conservative_normalization_revision","rename_normalization_revision","coverage","budgets","resources"],type:"object"},CodeCloneIndexResourcesV1:{description:"Measured resources and update accounting for one clone-index generation.",properties:{bytes_on_disk:{description:"Durable artifact bytes.",format:"uint64",minimum:0,type:["integer","null"]},changed_symbol_update_micros:{description:"Latest observed source-edit arrival through clone-ready publication.",format:"uint64",minimum:0,type:["integer","null"]},peak_scratch_memory_bytes:{description:"Largest measured clone-row serialization scratch during the build.",format:"uint64",minimum:0,type:["integer","null"]},stale_invalidations:{description:"Prior clone payload bindings invalidated by the latest publication.",format:"uint64",minimum:0,type:["integer","null"]}},type:"object"},CodeCloneIndexStatusV1:{description:"Clone readiness, independent from lexical and graph serving.",oneOf:[{description:"The sealed lexical artifact or its clone rows cannot be read.",properties:{reason:{type:"string"},state:{const:"unavailable",type:"string"}},required:["state","reason"],type:"object"},{description:"Some clone evidence is readable, but required postings are missing.",properties:{observation:{$ref:"#/$defs/CodeCloneIndexObservationV1"},omission_reasons:{items:{type:"string"},type:"array"},state:{const:"partial",type:"string"}},required:["state","observation","omission_reasons"],type:"object"},{description:"Required exact and fingerprint postings cover every eligible body.",properties:{observation:{$ref:"#/$defs/CodeCloneIndexObservationV1"},state:{const:"ready",type:"string"}},required:["state","observation"],type:"object"},{description:"The artifact is readable but belongs to a superseded source generation.",properties:{observation:{$ref:"#/$defs/CodeCloneIndexObservationV1"},reason:{type:"string"},state:{const:"stale",type:"string"}},required:["state","observation","reason"],type:"object"}]},CodeGraphServingReadinessV1:{description:"Interactive graph-serving state for the latest sealed generation.\n\nA sealed generation can expose truthful census statistics before its graph\nprojection is ready to serve queries, so readiness is reported separately.",oneOf:[{description:"No graph-serving authority exists for this worktree or generation.",properties:{reason:{type:"string"},state:{const:"unavailable",type:"string"}},required:["state","reason"],type:"object"},{description:"The sealed generation exists, but graph activation has not completed.",properties:{state:{const:"pending",type:"string"}},required:["state"],type:"object"},{description:"Graph activation completed without a serving projection.",properties:{reason:{type:"string"},state:{const:"refused",type:"string"}},required:["state","reason"],type:"object"},{description:"The verified graph projection is installed, but the engine or catalog\nits reads need is not resident: it is still being built, or it was\nreleased for memory. Graph reads answer the retryable warming state\nand restore it.",properties:{reason:{type:"string"},state:{const:"warming",type:"string"}},required:["state","reason"],type:"object"},{description:"The verified graph projection is installed for interactive reads.",properties:{state:{const:"ready",type:"string"}},required:["state"],type:"object"}]},CodeIndexBuildBlockedReasonV1:fE,CodeIndexBuildPhaseV1:{description:"The durable build phase whose committed boundary the dashboard is reading.\n\nA phase is not inferred from scheduler state. The mounted registry publishes\nthe exact phase that owns the active generation.",oneOf:[{enum:["source_scan","relational_preparation","bulk_commit","index_build","verification","ready"],type:"string"},{const:"graph_publication",description:"Text serving is built and the pass that sealed the generation is\nstill publishing its native graph.",type:"string"}]},CodeIndexBuildProgressV1:{description:"The latest committed progress boundary for one active code-index generation.\n\nEvery count is scoped to `generation_id`. The snapshot never includes a\nstaged page: work is reported only after the batch that owns it commits.",properties:{blocked_reason:{anyOf:[{$ref:"#/$defs/CodeIndexBuildBlockedReasonV1"},{type:"null"}],description:"Reason the active generation cannot currently advance, when known."},committed_chunks:{description:"Search chunks committed to the artifact database.",format:"uint64",minimum:0,type:"integer"},committed_imports:{description:"Import evidence rows committed to the artifact database.",format:"uint64",minimum:0,type:"integer"},committed_pages:{description:"Source pages committed to the artifact database.",format:"uint64",minimum:0,type:"integer"},committed_payload_bytes:{description:"Payload bytes committed to the artifact database.",format:"uint64",minimum:0,type:"integer"},completed_files:{description:"Authenticated sealed-source file boundary completed by committed work.",format:"uint64",minimum:0,type:"integer"},completed_lexical_units:{description:"Authenticated lexical-span boundary completed by committed work, in the\nsealed source's own advance unit.\n\nThe unit is the source's, not this surface's: a sealed-layout source\nadvances over the files-array byte span, while a published or\npartitioned source advances over file ordinals because its file records\nare not a contiguous byte range at all. Both are monotone and share the\ndenominator below, so completion and the derived estimate are truthful;\nnaming them bytes was not, and a consumer that multiplied this by an\naverage file size was wrong by orders of magnitude (issue #1205).",format:"uint64",minimum:0,type:"integer"},current_batch_pages:{description:"Source pages in the batch currently being processed.",format:"uint64",minimum:0,type:"integer"},current_batch_payload_bytes:{description:"Sealed payload bytes in the batch currently being processed.",format:"uint64",minimum:0,type:"integer"},daemon_incarnation:{description:"Durable daemon-authority epoch that produced this snapshot.\n\nThis orders snapshots across daemon restarts without relying on wall\nclock time.",format:"uint64",minimum:0,type:"integer"},elapsed_micros:{description:"Monotonic elapsed time for this process's active generation build.",format:"uint64",minimum:0,type:"integer"},estimated_remaining_seconds:{description:"Estimated remaining build duration, absent without a truthful rate.",format:"uint64",minimum:0,type:["integer","null"]},files_per_second:{description:"Rolling committed-file throughput, absent until it is established.",format:"double",type:["number","null"]},generation_id:{description:"Exact generation receiving the committed build work.",type:"string"},last_commit_latency_micros:{description:"Duration of the last committed SQLite batch, when one exists.",format:"uint64",minimum:0,type:["integer","null"]},last_progress_micros:{description:"Unix-epoch timestamp of the last durable progress publication.",format:"int64",type:"integer"},lexical_units_per_second:{description:"Rolling committed lexical-span throughput in units per second, absent\nuntil it is established. Not a byte rate; see\n[`Self::completed_lexical_units`].",format:"double",type:["number","null"]},phase:{$ref:"#/$defs/CodeIndexBuildPhaseV1",description:"Durable pipeline phase that published this snapshot."},producer_incarnation:{description:"Registry-minted scheduler incarnation within one daemon.\n\nA worktree retirement/remount creates a new value. `progress_epoch` is\ncomparable only when both incarnation fields match.",format:"uint64",minimum:0,type:"integer"},progress_epoch:{description:"Monotonic publication epoch for replacing delayed progress reads.",format:"uint64",minimum:0,type:"integer"},sealed_source_digest:{description:"Identity of the sealed source whose authenticated bounds define progress.",type:"string"},total_files:{description:"Authenticated sealed-source file bound for this generation.",format:"uint64",minimum:0,type:"integer"},total_lexical_units:{description:"Authenticated lexical-span bound for this generation, in the same unit\nas [`Self::completed_lexical_units`].",format:"uint64",minimum:0,type:"integer"}},required:["generation_id","daemon_incarnation","producer_incarnation","progress_epoch","sealed_source_digest","phase","committed_pages","committed_chunks","committed_imports","committed_payload_bytes","completed_files","total_files","completed_lexical_units","total_lexical_units","current_batch_pages","current_batch_payload_bytes","elapsed_micros","last_progress_micros"],type:"object"},CodeIndexConvergenceParkedV1:fA,CodeIndexFreshnessCoverageV1:{description:"Coverage of one freshness read. Distinct from [`CodeIndexStalenessStateV1`]:\na generation can be fresh and still omit hook-hint counts, or unverified\nwhile the ladder would otherwise say ready.\n\n`Unobserved` is only the constructed default. A projected read never emits\nit, so an absent observation cannot be mistaken for `complete`.",oneOf:[{enum:["unobserved","complete","partial_refresh_in_progress","partial_artifact_restore","partial_source_verification","partial_unverified_restore","partial_hook_hint_overflow"],type:"string"},{const:"partial_omitted_sources",description:"The sealed generation is fresh for every source it can index, and\n[`CodeIndexWorktreeFreshnessV1::omitted_sources`] names the sources it\ncannot. Waiting cannot change it.",type:"string"}]},CodeIndexGenerationRecoveryServingV1:{description:"Serving disposition of an incompatible generation during recovery.",enum:["preserved","refused"],type:"string"},CodeIndexGenerationRecoveryV1:{description:"Recovery state for a durable generation sealed under a different production\nowner configuration.",properties:{incompatibilities:{description:"Stable owner-input reason codes reported by the code-index authority.",items:{type:"string"},type:"array"},incompatible_generation_id:{description:"Generation retired from incremental reuse.",type:"string"},serving:{$ref:"#/$defs/CodeIndexGenerationRecoveryServingV1",description:"Whether the prior generation may continue serving while its replacement\nbuilds under the current configuration."}},required:["incompatible_generation_id","incompatibilities","serving"],type:"object"},CodeIndexOmittedSourceV1:fM,CodeIndexOmittedSourcesV1:fW,CodeIndexReadinessWaitOutcomeV1:{description:"How a `wait_for` status read ended. The status payload beside it is read\nafter the wait ends.",oneOf:[{properties:{outcome:{const:"reached",type:"string"}},required:["outcome"],type:"object"},{description:"The caller's budget elapsed; `last_state` is the last observed\n`code_index_freshness.status`.",properties:{last_state:{type:"string"},outcome:{const:"timed_out",type:"string"}},required:["outcome","last_state"],type:"object"},{description:"Waiting cannot reach the target: no scheduler is mounted, graph\nserving was refused, convergence is parked, or the request ended.",properties:{outcome:{const:"unavailable",type:"string"},reason:{type:"string"}},required:["outcome","reason"],type:"object"}]},CodeIndexRestoreProgressV1:{description:"Bounded authentication work required to restore one immutable lexical\nartifact as a serving reader.\n\nThe unit is a fixed restore check, not bytes or build work. Completed\nchecks are published only after they pass. `authenticated_remaining` is\nalways `authenticated_total - authenticated_completed`, so a caller can\ndistinguish bounded cold restore from an unbounded rebuild.",properties:{artifact_digest:{description:"Whole-file content address from the durable artifact descriptor.",type:"string"},authenticated_completed:{description:"Successfully completed authentication checks.",format:"uint64",minimum:0,type:"integer"},authenticated_remaining:{description:"Checks that have not completed yet.",format:"uint64",minimum:0,type:"integer"},authenticated_total:{description:"Fixed number of authentication checks for this restore.",format:"uint64",minimum:0,type:"integer"},generation_id:{description:"Generation whose lexical serving seat is being restored.",type:"string"}},required:["generation_id","artifact_digest","authenticated_completed","authenticated_total","authenticated_remaining"],type:"object"},CodeIndexSourceOmissionReasonV1:fN,CodeIndexStalenessStateV1:fz,CodeIndexWorktreeFreshnessV1:{description:"Freshness/generation state for one mounted worktree.\n\n`Deserialize` is part of the wire contract: the CLI status command decodes\nexactly this type back out of the daemon's `tracedecay_status` response,\nkeeping one authority for the freshness shape.",properties:{clone_index:{anyOf:[{$ref:"#/$defs/CodeCloneIndexStatusV1"},{type:"null"}],description:"Clone readiness from the same sealed lexical artifact."},code_graph_serving:{anyOf:[{$ref:"#/$defs/CodeGraphServingReadinessV1"},{type:"null"}],description:"Whether that generation's verified graph projection can serve reads."},coverage:{$ref:"#/$defs/CodeIndexFreshnessCoverageV1",description:"Whether this read covers the complete mounted scheduler state."},generation_recovery:{anyOf:[{$ref:"#/$defs/CodeIndexGenerationRecoveryV1"},{type:"null"}],description:"One-shot owner-configuration recovery currently replacing an\nincompatible durable generation."},hook_hint_count:{description:"Pending hook-hint count, when cheaply available.",format:"uint64",minimum:0,type:["integer","null"]},last_reconcile_micros:{description:"Last reconcile observation time (microseconds since the Unix epoch).",format:"int64",type:["integer","null"]},latest_generation_id:{description:"Latest sealed generation identity, when a complete generation exists.",type:["string","null"]},omitted_sources:{anyOf:[{$ref:"#/$defs/CodeIndexOmittedSourcesV1"},{type:"null"}],description:"Sources the serving snapshot captured but does not index, when any."},parked:{anyOf:[{$ref:"#/$defs/CodeIndexConvergenceParkedV1"},{type:"null"}],description:"Deterministic contract violation currently parking background\nconvergence, when one is observed. `staleness_state` reads `parked`\nwhile this is set and no generation serves."},progress:{anyOf:[{$ref:"#/$defs/CodeIndexBuildProgressV1"},{type:"null"}],description:"Latest committed progress for the active generation, if one is mounted."},rebuild_in_flight:{default:!1,description:"Whether the exact scheduler route owns a reconcile pass or has a\npending wake. A stale seated generation with this false is stalled,\nnot in a routine rebuild window.",type:"boolean"},repository_id:{description:"Stable repository identity resolved by the scheduler.",type:["string","null"]},restore_progress:{anyOf:[{$ref:"#/$defs/CodeIndexRestoreProgressV1"},{type:"null"}],description:"Bounded immutable-artifact restore work currently in flight. This is\nseparate from build progress because restore commits no index data."},sealed_at_micros:{description:"Time the complete generation was durably sealed.",format:"int64",type:["integer","null"]},snapshot_content_identity:{description:"Content identity of the complete source snapshot.",type:["string","null"]},source_reference:{description:"Exact source reference captured by the sealed generation.",type:["string","null"]},source_revision:{description:"Exact source revision captured by the sealed generation.",type:["string","null"]},staleness_state:{anyOf:[{$ref:"#/$defs/CodeIndexStalenessStateV1"},{type:"null"}],description:"Staleness-ladder state from the last scheduler execution. `fresh` means\nthe scheduler most recently observed a fresh source; the status read\ndoes not probe the worktree to revalidate that observation."},worktree_id:{description:"Stable worktree identity resolved by the scheduler.",type:["string","null"]},worktree_root:{description:"Display path of the mounted worktree root.",type:"string"}},required:["worktree_root","coverage"],type:"object"},LcmConvergenceStateV1:yX,LcmConvergenceV1:yY,LcmDoctorProjectionStateV1:y1,LcmDoctorProjectionV1:y0,NativeHostIdentityV1:{enum:["claude_code","cursor_desktop","cursor_cloud","codex","hermes","kiro","cline","roo_code","kilo","kimi_code","open_code","pi","factory_droid"],type:"string"},ProjectStatusV1:{additionalProperties:!1,properties:{active_branch:{type:["string","null"]},branch_diagnostics:!0,branch_drifted:{type:["boolean","null"]},branch_mismatch:{anyOf:[{$ref:"#/$defs/StatusBranchMismatchV1"},{type:"null"}]},branch_resolution:{type:["string","null"]},branch_warnings:{items:{type:"string"},type:["array","null"]},code_index_freshness:{$ref:"#/$defs/StatusCodeIndexFreshnessV1"},code_index_freshness_warning:{type:["string","null"]},current_branch:{type:["string","null"]},git_staleness:{anyOf:[{$ref:"#/$defs/StatusGitStalenessV1"},{type:"null"}]},github_source:{description:"The checkout's GitHub source as its advisory owner observed it."},graph_statistics:{description:"The exact-scope sealed-generation census."},hook_replay:{$ref:"#/$defs/StatusHookReplayV1",description:"The daemon's drain of this project's hook spools, as its last sweep\nleft it."},live_branch:{type:["string","null"]},memory:{$ref:"#/$defs/StatusMemoryV1"},parent_branch:{type:["string","null"]},project_root:{type:"string"},reset_required_stores:{description:"Registered stores this binary serves only as a typed reset-required\nrefusal, each with the command that resets it.",items:{$ref:"#/$defs/StoreResetRequiredV1"},type:"array"},retrieval_serving:{anyOf:[{$ref:"#/$defs/StatusRetrievalServingV1"},{type:"null"}],description:"Whether exact-scope retrieval can serve, when the census authority is\nattached."},schema_convergence:{$ref:"#/$defs/StatusSchemaConvergenceV1"},scope_prefix:{type:["string","null"]},server:{description:"The serving MCP server's request counters."},serving_branch:{type:["string","null"]},session_git_evidence:{$ref:"#/$defs/StatusSessionGitEvidenceV1",description:"The session↔Git evidence `tracedecay_sessions_for` and the\nbranch/commit session filters read."},session_history_catch_up:!0,session_ingest:!0,session_projection:{$ref:"#/$defs/LcmDoctorProjectionV1",description:"The project session projection's serving state, the same reading\n`tracedecay_lcm_doctor` reports."},storage_health:!0,tracked_branch_count:{format:"uint",minimum:0,type:["integer","null"]},wait:{anyOf:[{$ref:"#/$defs/CodeIndexReadinessWaitOutcomeV1"},{type:"null"}]}},required:["project_root","graph_statistics","memory","schema_convergence","reset_required_stores","code_index_freshness","github_source","session_projection","session_git_evidence","hook_replay"],type:"object"},ResidentMemoryHolderReadV1:{description:"One worktree holding a retained owner's memory, and what it holds: a\ngeneration id, or an LSP session id.",properties:{holding:{type:"string"},worktree_id:{type:"string"}},required:["worktree_id","holding"],type:"object"},RetrievalWorkerStatusV1:_j,SchemaConvergenceFindingV1:_D,SchemaConvergenceProgressV1:_F,SchemaConvergenceStageV1:_L,SchemaConvergenceStateV1:_U,StatusAdmissionV1:{additionalProperties:!1,properties:{project_admitted:{type:"boolean"},project_root:{type:"string"},scope_prefix:{type:["string","null"]},server:{description:"The serving MCP server's request counters."}},required:["project_admitted","project_root"],type:"object"},StatusBranchMismatchV1:{additionalProperties:!1,properties:{git_branch:{type:["string","null"]},indexed_branch:{type:["string","null"]},serving_branch:{type:["string","null"]}},type:"object"},StatusCodeIndexFreshnessV1:{description:"The code-index freshness of the served worktree, labeled the way readiness\nwaits report their last state.",oneOf:[{additionalProperties:!1,properties:{status:{const:"current",type:"string"},worktree:{$ref:"#/$defs/CodeIndexWorktreeFreshnessV1"}},required:["status","worktree"],type:"object"},{additionalProperties:!1,properties:{status:{const:"stale",type:"string"},worktree:{$ref:"#/$defs/CodeIndexWorktreeFreshnessV1"}},required:["status","worktree"],type:"object"},{additionalProperties:!1,properties:{status:{const:"restoring",type:"string"},worktree:{$ref:"#/$defs/CodeIndexWorktreeFreshnessV1"}},required:["status","worktree"],type:"object"},{additionalProperties:!1,properties:{status:{const:"warming",type:"string"},worktree:{$ref:"#/$defs/CodeIndexWorktreeFreshnessV1"}},required:["status","worktree"],type:"object"},{additionalProperties:!1,properties:{status:{const:"parked",type:"string"},worktree:{$ref:"#/$defs/CodeIndexWorktreeFreshnessV1"}},required:["status","worktree"],type:"object"},{additionalProperties:!1,description:"The last code-index mount failed; explicit reconciliation can retry it.",properties:{message:{type:"string"},remediation:{type:"string"},status:{const:"mount_failed",type:"string"}},required:["status","message","remediation"],type:"object"},{additionalProperties:!1,properties:{reason:{type:"string"},status:{const:"unavailable",type:"string"}},required:["status","reason"],type:"object"}]},StatusGitStalenessUnavailableV1:{oneOf:[{const:"no_sealed_generation",description:"No complete generation has sealed for the worktree yet.",type:"string"},{const:"sealed_generation_has_no_commit",description:"The sealed generation captured no commit, as in an unborn repository.",type:"string"},{const:"git_head_unreadable",description:"The worktree's checked-out commit could not be read.",type:"string"}]},StatusGitStalenessV1:{description:"The sealed generation's Git watermark, the commit its source snapshot was\ncaptured from, against the worktree's checked-out commit.",oneOf:[{additionalProperties:!1,description:"HEAD is the commit the sealed generation was built from.",properties:{status:{const:"current",type:"string"},watermark:{type:"string"}},required:["status","watermark"],type:"object"},{additionalProperties:!1,description:"HEAD has moved off the commit the sealed generation was built from.",properties:{head:{type:"string"},status:{const:"stale",type:"string"},watermark:{type:"string"}},required:["status","watermark","head"],type:"object"},{additionalProperties:!1,description:"No watermark or no HEAD to compare it with.",properties:{reason:{$ref:"#/$defs/StatusGitStalenessUnavailableV1"},status:{const:"unavailable",type:"string"}},required:["status","reason"],type:"object"}]},StatusHookReplayFailureV1:{additionalProperties:!1,description:"One hook spool the last replay sweep could not drain.",properties:{cause:{type:"string"},host:{$ref:"#/$defs/NativeHostIdentityV1"},spool:{$ref:"#/$defs/StatusHookReplaySpoolV1"}},required:["host","spool","cause"],type:"object"},StatusHookReplaySpoolV1:{oneOf:[{const:"records",description:"The host's spooled hook events.",type:"string"},{const:"delivery_receipts",description:"The host's hook delivery receipts.",type:"string"},{const:"pending_work",description:"The producer work the host's admission ledger still owes.",type:"string"}]},StatusHookReplayV1:{description:"The daemon's hook spool drain for one project.",oneOf:[{additionalProperties:!1,description:"No replay consumer drains this project's hook spools in this daemon.",properties:{status:{const:"unowned",type:"string"}},required:["status"],type:"object"},{additionalProperties:!1,description:"The replay consumer has not finished its first sweep.",properties:{status:{const:"starting",type:"string"}},required:["status"],type:"object"},{additionalProperties:!1,description:"The last sweep drained every hook spool it found.",properties:{status:{const:"drained",type:"string"}},required:["status"],type:"object"},{additionalProperties:!1,description:"The last sweep could not drain these spools. Their records stay\ndurable and the next sweep retries them.",properties:{failures:{items:{$ref:"#/$defs/StatusHookReplayFailureV1"},type:"array"},status:{const:"failed",type:"string"}},required:["status","failures"],type:"object"}]},StatusMemoryOwnerV1:{additionalProperties:!1,properties:{bytes:{format:"uint64",minimum:0,type:["integer","null"]},content_digest:{type:["string","null"]},holders:{items:{$ref:"#/$defs/ResidentMemoryHolderReadV1"},type:"array"},idle_seconds:{format:"uint64",minimum:0,type:"integer"},kind:{type:"string"},measured:{type:"boolean"},project_id:{type:"string"},protected:{type:"boolean"}},required:["project_id","kind","holders","measured","idle_seconds","protected"],type:"object"},StatusMemoryPressureV1:{enum:["unobserved","nominal","over_budget"],type:"string"},StatusMemoryV1:{additionalProperties:!1,description:"The daemon's resident memory as one project sees it.",properties:{high_watermark_bytes:{format:"uint64",minimum:0,type:"integer"},idle_window_seconds:{format:"uint64",minimum:0,type:"integer"},limit_bytes:{format:"uint64",minimum:0,type:"integer"},low_watermark_bytes:{format:"uint64",minimum:0,type:"integer"},owners:{description:"This project's retained owners; other projects' belong to the\ndaemon-wide Doctor inventory.",items:{$ref:"#/$defs/StatusMemoryOwnerV1"},type:"array"},psi_some_avg10:{format:"double",type:["number","null"]},resident_bytes:{format:"uint64",minimum:0,type:["integer","null"]},retained_bytes:{format:"uint64",minimum:0,type:"integer"},shed_order:{items:{type:"string"},type:"array"},status:{$ref:"#/$defs/StatusMemoryPressureV1"},unmeasured_owners:{format:"uint",minimum:0,type:"integer"}},required:["status","limit_bytes","high_watermark_bytes","low_watermark_bytes","idle_window_seconds","shed_order","retained_bytes","unmeasured_owners","owners"],type:"object"},StatusRetrievalServingV1:{oneOf:[{additionalProperties:!1,description:"A sealed complete generation serves the exact worktree. The ages tell a\nroutine rebuild window from a wedged route.",properties:{condition:{anyOf:[{$ref:"#/$defs/StatusServingConditionV1"},{type:"null"}]},freshness:{$ref:"#/$defs/StatusServingFreshnessV1"},last_reconcile_age_seconds:{format:"int64",type:["integer","null"]},seated_generation_age_seconds:{format:"int64",type:["integer","null"]},status:{const:"serving",type:"string"}},required:["status","freshness"],type:"object"},{additionalProperties:!1,description:"The census answered and nothing is servable yet.",properties:{reason:{type:"string"},status:{const:"unavailable",type:"string"}},required:["status","reason"],type:"object"}]},StatusSchemaConvergenceStateV1:{enum:["completed","in_progress","degraded"],type:"string"},StatusSchemaConvergenceV1:{additionalProperties:!1,properties:{findings:{items:{$ref:"#/$defs/SchemaConvergenceFindingV1"},type:"array"},status:{$ref:"#/$defs/StatusSchemaConvergenceStateV1"}},required:["status","findings"],type:"object"},StatusServingConditionV1:{enum:["artifact_restore","source_verification","rebuilding","stalled"],type:"string"},StatusServingFreshnessV1:{enum:["current","restoring","last_complete_stale","unknown"],type:"string"},StatusSessionGitEvidenceUnavailableV1:{oneOf:[{const:"session_store_denied",description:"This request holds no project session store.",type:"string"},{const:"read_failed",description:"The session store refused the evidence read.",type:"string"}]},StatusSessionGitEvidenceV1:{description:"The project's session↔Git evidence generation.",oneOf:[{additionalProperties:!1,description:"A convergence pass installed this generation.",properties:{backfill_watermark:{format:"int64",type:["integer","null"]},commit_count:{format:"uint64",minimum:0,type:"integer"},generation:{type:"string"},source_watermark:{type:"string"},span_count:{format:"uint64",minimum:0,type:"integer"},status:{const:"recorded",type:"string"}},required:["status","generation","source_watermark","span_count","commit_count"],type:"object"},{additionalProperties:!1,description:"No convergence pass has written evidence for this project yet.",properties:{backfill_watermark:{format:"int64",type:["integer","null"]},status:{const:"unrecorded",type:"string"}},required:["status"],type:"object"},{additionalProperties:!1,description:"The evidence could not be read.",properties:{message:{type:["string","null"]},reason:{$ref:"#/$defs/StatusSessionGitEvidenceUnavailableV1"},status:{const:"unavailable",type:"string"}},required:["status","reason"],type:"object"}]},StoreResetRequiredV1:{description:"A persisted store the daemon keeps mounted in a typed reset-required state\ninstead of refusing to serve: every read against it returns the typed\nrefusal, stores that admit keep serving, and `remedy` is the exact command\nthe operator runs to reset it.",properties:{authority:{type:"string"},found_version:{format:"int64",type:["integer","null"]},reason:{type:"string"},remedy:{type:"string"},required_version:{format:"int64",type:["integer","null"]},store:{type:"string"}},required:["store","authority","reason","remedy"],type:"object"}},$schema:"https://json-schema.org/draft/2020-12/schema",anyOf:[{$ref:"#/$defs/StatusAdmissionV1"},{$ref:"#/$defs/ProjectStatusV1"}],description:"`tracedecay_status` for an `admission_only` read, or the project's status.",title:"StatusResultV1"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{include_details:{default:!1,type:"boolean"}},title:"StorageStatusPrimitiveRequest",type:"object"},{$defs:{StorageStatusHistoryPointV1:{additionalProperties:!1,properties:{database_bytes:{format:"uint64",minimum:0,type:"integer"},observed_at:{format:"int64",type:"integer"}},required:["observed_at","database_bytes"],type:"object"}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{database_bytes:{format:"uint64",minimum:0,type:["integer","null"]},details:{items:{type:"string"},type:"array"},freelist_pages:{default:null,format:"uint64",minimum:0,type:["integer","null"]},history:{default:[],items:{$ref:"#/$defs/StorageStatusHistoryPointV1"},type:"array"},history_coverage:{default:null,type:["string","null"]},page_count:{default:null,format:"uint64",minimum:0,type:["integer","null"]},page_size_bytes:{default:null,format:"uint32",minimum:0,type:["integer","null"]},project_id:{default:null,type:["string","null"]},read_only:{type:"boolean"},status:{type:"string"},store_path:{default:null,type:["string","null"]}},required:["status","read_only","details"],title:"StorageStatusPrimitiveResult",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Exact public input accepted by `tracedecay_str_replace`.",properties:{dry_run:{default:!1,type:"boolean"},expected_state:{description:"Exact `preview_digest`/`expected_state` returned by the dry run. Apply\nre-resolves the typed plan and rejects any candidate-state drift.",type:["string","null"]},idempotency_key:{type:["string","null"]},new_str:{type:"string"},old_str:{type:"string"},path:{type:"string"},verify:{default:!1,type:"boolean"}},required:["path","old_str","new_str"],title:"StrReplaceSurfaceRequestV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{file:{description:"Source file path to find test coverage for.",type:["string","null"]},node_id:{description:"Specific node ID to find test coverage for (alternative to file).",type:["string","null"]}},title:"TestMapSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fE,CodeIndexConvergenceParkedV1:fA,CodeIndexStalenessStateV1:fz,PrimitiveFreshnessStateV1:gG,PrimitiveIndexingStateV1:gB,PrimitiveSearchFreshnessV1:gQ,TestMapSourceCoverageV1:{additionalProperties:!1,properties:{source_file:{type:"string"},source_id:{type:"string"},source_line:{format:"uint32",minimum:0,type:"integer"},source_name:{type:"string"},tests:{items:{$ref:"#/$defs/TestMapTestV1"},type:"array"}},required:["source_name","source_id","source_file","source_line","tests"],type:"object"},TestMapTestV1:{additionalProperties:!1,properties:{attribution_depth:{format:"uint32",minimum:0,type:"integer"},test_file:{type:"string"},test_line:{format:"uint32",minimum:0,type:"integer"},test_name:{type:"string"}},required:["test_name","test_file","test_line","attribution_depth"],type:"object"},TestMapUncoveredV1:{additionalProperties:!1,properties:{file:{type:"string"},id:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},name:{type:"string"}},required:["id","name","file","line"],type:"object"}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{coverage:{items:{$ref:"#/$defs/TestMapSourceCoverageV1"},type:"array"},covered_symbols:{format:"uint64",minimum:0,type:"integer"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},test_files:{items:{type:"string"},type:"array"},uncovered:{items:{$ref:"#/$defs/TestMapUncoveredV1"},type:"array"},uncovered_symbols:{format:"uint64",minimum:0,type:"integer"}},required:["covered_symbols","uncovered_symbols","test_files","coverage","uncovered"],title:"TestMapResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"The admitted project selects the retained managed test run, so this exact\nrequest intentionally carries no caller-selectable scope or identity.",title:"TestResultsSurfaceRequestV1",type:"object"},{$defs:{CancellationObservation:fS,CancellationStage:fk,CodeGenerationId:fT,CommitId:fH,Deadline:hj,OperationBudgetUsage:gD,OperationReceipt:gF,OperationTermination:gL,TestResultProjectionV1:{additionalProperties:!1,description:"One result emitted by the daemon-managed test-run authority.",properties:{passed:{type:"boolean"},test:{type:"string"}},required:["test","passed"],type:"object"},UtcMicros:vK},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Exact retained managed-test-run projection returned by `test_results`.\n\nThe daemon resolves the admitted project, reads its newest durable managed\nrun, and verifies that the run's head and code generation are current\nbefore it serializes this payload. `result_offset` and `available_results`\nretain the authoritative page position. The outcome fields (`finished_at`,\n`exit_code`, the counts, `termination`, `receipt`) are present only after\nthe managed run terminates.",properties:{available_results:{format:"uint64",minimum:0,type:"integer"},code_generation_id:{anyOf:[{$ref:"#/$defs/CodeGenerationId"},{type:"null"}]},completed:{format:"uint64",minimum:0,type:"integer"},exit_code:{format:"int32",type:["integer","null"]},failed:{format:"uint64",minimum:0,type:["integer","null"]},finished_at:{anyOf:[{$ref:"#/$defs/UtcMicros"},{type:"null"}]},head_commit_id:{anyOf:[{$ref:"#/$defs/CommitId"},{type:"null"}]},ignored:{format:"uint64",minimum:0,type:["integer","null"]},operation_id:{type:"string"},passed:{format:"uint64",minimum:0,type:["integer","null"]},receipt:{anyOf:[{$ref:"#/$defs/OperationReceipt"},{type:"null"}]},result_offset:{format:"uint64",minimum:0,type:"integer"},results:{items:{$ref:"#/$defs/TestResultProjectionV1"},type:"array"},session_id:{description:"The session the run was requested by; null when the request named none.",type:["string","null"]},started_at:{$ref:"#/$defs/UtcMicros"},termination:{anyOf:[{$ref:"#/$defs/OperationTermination"},{type:"null"}]},total:{format:"uint64",minimum:0,type:["integer","null"]}},required:["operation_id","started_at","results","completed","result_offset","available_results"],title:"TestResultsResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{include_tested:{description:"Include already-tested functions in results (default: false).",type:["boolean","null"]},limit:{description:"Maximum number of results to return (default: 20, at most 200).",format:"uint32",minimum:0,type:["integer","null"]},path:{description:"Filter to files under this directory path.",type:["string","null"]}},title:"TestRiskSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fE,CodeIndexConvergenceParkedV1:fA,CodeIndexStalenessStateV1:fz,ComplexityAnalysisV1:fB,PrimitiveFreshnessStateV1:gG,PrimitiveIndexingStateV1:gB,PrimitiveSearchFreshnessV1:gQ,TestAttributionMethodV1:{description:"How a source symbol's static test evidence was attributed.",enum:["none","direct_unit","closure"],type:"string"},TestRiskAttributionSummaryV1:{additionalProperties:!1,properties:{cli_entry_attributed:{format:"uint64",minimum:0,type:"integer"},closure_attributed:{format:"uint64",minimum:0,type:"integer"},depth:{format:"uint64",minimum:0,type:"integer"},direct_unit_attributed:{format:"uint64",minimum:0,type:"integer"},public_api_attributed:{format:"uint64",minimum:0,type:"integer"},total_attributed:{format:"uint64",minimum:0,type:"integer"},trait_resolved_attributed:{format:"uint64",minimum:0,type:"integer"}},required:["depth","direct_unit_attributed","closure_attributed","trait_resolved_attributed","public_api_attributed","cli_entry_attributed","total_attributed"],type:"object"},TestRiskBucketSummaryV1:{additionalProperties:!1,properties:{attributed:{format:"uint64",minimum:0,type:"integer"},excluded:{format:"uint64",minimum:0,type:"integer"},orphan_entry:{format:"uint64",minimum:0,type:"integer"},reachable_unattributed:{format:"uint64",minimum:0,type:"integer"}},required:["attributed","reachable_unattributed","orphan_entry","excluded"],type:"object"},TestRiskConfidenceV1:{description:"What the reported coverage percentage bounds.",enum:["static_lower_bound"],type:"string"},TestRiskEntryV1:{additionalProperties:!1,properties:{attribution_depth:{format:"uint64",minimum:0,type:["integer","null"]},attribution_method:{$ref:"#/$defs/TestAttributionMethodV1"},churn:{format:"uint64",minimum:0,type:"integer"},complexity:{description:"`None` when `complexity_analysis` reports the bounded walk did not\ncover the body; `risk` then weighs the lower-bound counters.",format:"uint32",minimum:0,type:["integer","null"]},complexity_analysis:{$ref:"#/$defs/ComplexityAnalysisV1"},fan_in:{format:"uint64",minimum:0,type:"integer"},file:{type:"string"},has_test:{type:"boolean"},id:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},name:{type:"string"},risk:{format:"double",type:"number"}},required:["id","name","file","line","complexity_analysis","fan_in","has_test","attribution_method","risk","churn"],type:"object"},TestRiskSummaryV1:{additionalProperties:!1,properties:{attribution:{$ref:"#/$defs/TestRiskAttributionSummaryV1"},buckets:{$ref:"#/$defs/TestRiskBucketSummaryV1"},confidence:{$ref:"#/$defs/TestRiskConfidenceV1"},confidence_note:{type:"string"},coverage_pct:{format:"double",type:"number"},skipped:{format:"uint64",minimum:0,type:"integer"},tested:{format:"uint64",minimum:0,type:"integer"},top_risk_unattributed:{type:"string"},top_risk_untested:{type:"string"},total_functions:{format:"uint64",minimum:0,type:"integer"}},required:["total_functions","tested","skipped","coverage_pct","top_risk_untested","top_risk_unattributed","attribution","buckets","confidence","confidence_note"],type:"object"}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},risks:{items:{$ref:"#/$defs/TestRiskEntryV1"},type:"array"},summary:{$ref:"#/$defs/TestRiskSummaryV1"}},required:["risks","summary"],title:"TestRiskResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{kinds:{items:{type:"string"},type:["array","null"]},limit:{format:"uint32",minimum:0,type:["integer","null"]},path:{type:["string","null"]}},title:"TodosSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fE,CodeIndexConvergenceParkedV1:fA,CodeIndexStalenessStateV1:fz,PrimitiveFreshnessStateV1:gG,PrimitiveIndexingStateV1:gB,PrimitiveSearchFreshnessV1:gQ,TodoMarkerV1:{additionalProperties:!1,properties:{enclosing:{type:["string","null"]},file:{type:"string"},kind:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},text:{type:"string"}},required:["kind","file","line","text"],type:"object"}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{by_kind:{additionalProperties:{format:"uint64",minimum:0,type:"integer"},type:"object"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},markers:{items:{$ref:"#/$defs/TodoMarkerV1"},type:"array"},match_count:{format:"uint",minimum:0,type:"integer"}},required:["match_count","by_kind","markers"],title:"TodosResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{ecosystem:{description:"Filter findings to one ecosystem ('rust' or 'typescript'). Every\necosystem section is still reported, so the scope of the answer stays\nvisible.",type:["string","null"]},limit:{description:"Maximum unmounted files to return (default: 200, max: 2000). The\nresponse always states the true total and how many rows were omitted.",format:"uint32",minimum:0,type:["integer","null"]},path:{description:"Filter findings to files under this directory path (e.g. 'src/daemon').\nThe whole project is still walked, reachability is not a per-directory\nquestion.",type:["string","null"]}},title:"UnmountedFilesSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fE,CodeIndexConvergenceParkedV1:fA,CodeIndexStalenessStateV1:fz,PrimitiveFreshnessStateV1:gG,PrimitiveIndexingStateV1:gB,PrimitiveSearchFreshnessV1:gQ,UnmountedEcosystemStatusV1:{description:"Whether an ecosystem was audited, absent, or recognised but unmodelled.",enum:["audited","not_present","unsupported"],type:"string"},UnmountedEcosystemV1:{additionalProperties:!1,properties:{blind_spots:{items:{type:"string"},type:"array"},ecosystem:{type:"string"},entry_point_count:{format:"uint64",minimum:0,type:"integer"},excluded_path_globs:{items:{type:"string"},type:"array"},mounted_file_count:{format:"uint64",minimum:0,type:"integer"},note:{type:["string","null"]},package_count:{format:"uint64",minimum:0,type:"integer"},scanned_file_count:{format:"uint64",minimum:0,type:"integer"},status:{$ref:"#/$defs/UnmountedEcosystemStatusV1"},unclaimed_file_count:{format:"uint64",minimum:0,type:"integer"},unmounted_file_count:{format:"uint64",minimum:0,type:"integer"},verdict:{type:"string"}},required:["ecosystem","status","package_count","entry_point_count","scanned_file_count","mounted_file_count","unclaimed_file_count","unmounted_file_count","verdict","blind_spots","excluded_path_globs"],type:"object"},UnmountedFileV1:{additionalProperties:!1,properties:{ecosystem:{type:"string"},file:{type:"string"},manifest:{type:"string"},nearest_mounted_parent:{type:["string","null"]},package:{type:"string"},suggested_declaration:{type:["string","null"]}},required:["file","ecosystem","package","manifest"],type:"object"}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{complete:{type:"boolean"},ecosystem:{type:["string","null"]},ecosystems:{items:{$ref:"#/$defs/UnmountedEcosystemV1"},type:"array"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},limit:{format:"uint64",minimum:0,type:"integer"},omitted_count:{format:"uint64",minimum:0,type:"integer"},path:{type:["string","null"]},returned_count:{format:"uint64",minimum:0,type:"integer"},unmounted:{items:{$ref:"#/$defs/UnmountedFileV1"},type:"array"},unmounted_file_count:{format:"uint64",minimum:0,type:"integer"}},required:["unmounted_file_count","returned_count","omitted_count","complete","ecosystems","limit","unmounted"],title:"UnmountedFilesResultV1",type:"object"},{$defs:{UnsafePatternKindV1:vG},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{exclude_tests:{description:"When true, skips files whose path looks like a test (default: false).",type:["boolean","null"]},kinds:{description:"Subset of patterns to search. Default (or an empty list): every kind.",items:{$ref:"#/$defs/UnsafePatternKindV1"},type:["array","null"]},limit:{description:"Maximum number of matches to return (default: 200, max: 2000).",format:"uint32",minimum:0,type:["integer","null"]},path:{description:"Filter to files under this directory (relative to project root).",type:["string","null"]}},title:"UnsafePatternsSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fE,CodeIndexConvergenceParkedV1:fA,CodeIndexStalenessStateV1:fz,CoverageCompleteness:hP,PrimitiveFreshnessStateV1:gG,PrimitiveIndexingStateV1:gB,PrimitiveSearchFreshnessV1:gQ,UnsafePatternFileOmissionV1:{additionalProperties:!1,description:"One scanned file whose sites are not reported as verified matches.",properties:{cause:{$ref:"#/$defs/UnsafePatternOmissionCauseV1"},file:{type:"string"},reason:{$ref:"#/$defs/UnsafePatternOmissionReasonV1"},withheld_match_count:{description:"Sites of the requested kinds found in the file and withheld.",format:"uint64",minimum:0,type:"integer"}},required:["file","reason","cause","withheld_match_count"],type:"object"},UnsafePatternKindV1:vG,UnsafePatternMatchV1:{additionalProperties:!1,properties:{enclosing:{type:["string","null"]},file:{type:"string"},in_test:{type:"boolean"},kind:{$ref:"#/$defs/UnsafePatternKindV1"},line:{format:"uint32",minimum:0,type:"integer"},snippet:{type:"string"}},required:["kind","file","line","snippet","in_test"],type:"object"},UnsafePatternOmissionCauseV1:{description:"What prevented the file from being classified.",oneOf:[{const:"syntax_errors",description:"The Rust grammar parsed the file with error nodes. Valid Rust it only\npartly parses (heavy `macro_rules!`) lands here.",type:"string"}]},UnsafePatternOmissionReasonV1:{description:"Why a file's risky-pattern sites are withheld from the verified result.",oneOf:[{const:"test_scope_unclassified",description:"Whether a site is test-only cannot be decided for this file.",type:"string"}]}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{by_kind:{additionalProperties:{format:"uint64",minimum:0,type:"integer"},description:"Match count per pattern kind, keyed by its wire spelling.",type:"object"},coverage:{$ref:"#/$defs/CoverageCompleteness",description:"`partial` exactly when `omissions` names a file whose sites are withheld."},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},match_count:{format:"uint64",minimum:0,type:"integer"},matches:{items:{$ref:"#/$defs/UnsafePatternMatchV1"},type:"array"},omissions:{items:{$ref:"#/$defs/UnsafePatternFileOmissionV1"},type:"array"}},required:["match_count","by_kind","matches","coverage","omissions"],title:"UnsafePatternsResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{agent_label:{type:["string","null"]},branch:{type:["string","null"]},commit:{type:["string","null"]},limit:{format:"uint64",minimum:0,type:["integer","null"]},run_id:{type:["string","null"]},session_id:{type:["string","null"]},worktree:{type:["string","null"]}},title:"WorkflowsRequestV1",type:"object"},{$defs:{GitScopeV1:yM,RetainedErrorV1:_R,RetainedOutcomeStatusV1:_P,WorkflowAgentV1:{additionalProperties:!1,properties:{agent_id:{type:"string"},agent_label:{type:"string"},agent_session_id:{type:["string","null"]},ended_ts:{format:"int64",type:["integer","null"]},model:{type:["string","null"]},phase:{type:["string","null"]},run_id:{type:"string"},started_ts:{format:"int64",type:["integer","null"]},status:{$ref:"#/$defs/WorkflowStatusV1"},tokens:{format:"int64",type:"integer"},transcript_path:{type:["string","null"]}},required:["run_id","agent_label","agent_id","status"],type:"object"},WorkflowCoverageV1:{enum:["complete","conclusive","bounded_prefix"],type:"string"},WorkflowQueryModeV1:{enum:["session","git_scope","run","agent"],type:"string"},WorkflowRunV1:{additionalProperties:!1,properties:{agent_count:{format:"int64",type:"integer"},description:{type:["string","null"]},ended_ts:{format:"int64",type:["integer","null"]},name:{type:["string","null"]},parent_session_id:{type:"string"},phase_json:{type:["string","null"]},result_summary:{type:["string","null"]},run_id:{type:"string"},started_ts:{format:"int64",type:["integer","null"]},status:{$ref:"#/$defs/WorkflowStatusV1"}},required:["run_id","parent_session_id","status"],type:"object"},WorkflowStatusV1:{enum:["running","completed","failed","unknown"],type:"string"}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{agent:{anyOf:[{$ref:"#/$defs/WorkflowAgentV1"},{type:"null"}]},agent_count:{format:"int64",type:["integer","null"]},agent_label:{type:["string","null"]},agents:{items:{$ref:"#/$defs/WorkflowAgentV1"},type:["array","null"]},agents_complete:{type:["boolean","null"]},agents_coverage:{anyOf:[{$ref:"#/$defs/WorkflowCoverageV1"},{type:"null"}]},agents_returned:{format:"uint",minimum:0,type:["integer","null"]},count:{format:"uint",minimum:0,type:["integer","null"]},error:{anyOf:[{$ref:"#/$defs/RetainedErrorV1"},{type:"null"}]},found:{type:["boolean","null"]},git_filter:{anyOf:[{$ref:"#/$defs/GitScopeV1"},{type:"null"}]},lookup_complete:{type:["boolean","null"]},lookup_coverage:{anyOf:[{$ref:"#/$defs/WorkflowCoverageV1"},{type:"null"}]},message:{type:["string","null"]},mode:{anyOf:[{$ref:"#/$defs/WorkflowQueryModeV1"},{type:"null"}]},run:{anyOf:[{$ref:"#/$defs/WorkflowRunV1"},{type:"null"}]},run_id:{type:["string","null"]},runs:{items:{$ref:"#/$defs/WorkflowRunV1"},type:["array","null"]},session_id:{type:["string","null"]},status:{$ref:"#/$defs/RetainedOutcomeStatusV1"}},required:["status"],title:"WorkflowsResultV1",type:"object"},{$defs:{ManifestDigest:gl,NativeWorktreeTargetV1:gE,ProjectId:g2,RepositoryId:_v,ScopeSetId:_Q,ScopeSetRevision:_X,WorktreeId:$M},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Confirmation names the exact inspection digest, not a worktree id alone.",properties:{inspection_digest:{$ref:"#/$defs/ManifestDigest"},scope_set_digest:{$ref:"#/$defs/ManifestDigest"},scope_set_id:{$ref:"#/$defs/ScopeSetId"},scope_set_revision:{$ref:"#/$defs/ScopeSetRevision"},target:{$ref:"#/$defs/NativeWorktreeTargetV1"}},required:["scope_set_id","scope_set_revision","scope_set_digest","target","inspection_digest"],title:"WorktreeCleanupConfirmRequestV1",type:"object"},{$defs:{ManifestDigest:gl,NativeWorktreeTargetV1:gE,ProjectId:g2,RepositoryId:_v,ScopeSetId:_Q,ScopeSetRevision:_X,WorktreeId:$M},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{scope_set_digest:{$ref:"#/$defs/ManifestDigest"},scope_set_id:{$ref:"#/$defs/ScopeSetId"},scope_set_revision:{$ref:"#/$defs/ScopeSetRevision"},target:{$ref:"#/$defs/NativeWorktreeTargetV1"}},required:["scope_set_id","scope_set_revision","scope_set_digest","target"],title:"WorktreeCleanupInspectRequestV1",type:"object"},{$defs:{ManifestDigest:gl,NativeWorktreeTargetV1:gE,ProjectId:g2,RepositoryId:_v,ScopeSetId:_Q,ScopeSetRevision:_X,WorktreeId:$M},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{confirmation_digest:{$ref:"#/$defs/ManifestDigest"},scope_set_digest:{$ref:"#/$defs/ManifestDigest"},scope_set_id:{$ref:"#/$defs/ScopeSetId"},scope_set_revision:{$ref:"#/$defs/ScopeSetRevision"},target:{$ref:"#/$defs/NativeWorktreeTargetV1"}},required:["scope_set_id","scope_set_revision","scope_set_digest","target","confirmation_digest"],title:"WorktreeCleanupReconcileRequestV1",type:"object"},{$defs:{ManifestDigest:gl,NativeWorktreeTargetV1:gE,ProjectId:g2,RepositoryId:_v,ScopeSetId:_Q,ScopeSetRevision:_X,UtcMicros:vK,WorktreeId:$M},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Removal carries both proofs so a stale confirmation cannot be replayed\nagainst another inspection of the same opaque worktree identity.",properties:{confirmation_digest:{$ref:"#/$defs/ManifestDigest"},confirmed_at:{$ref:"#/$defs/UtcMicros"},inspection_digest:{$ref:"#/$defs/ManifestDigest"},scope_set_digest:{$ref:"#/$defs/ManifestDigest"},scope_set_id:{$ref:"#/$defs/ScopeSetId"},scope_set_revision:{$ref:"#/$defs/ScopeSetRevision"},target:{$ref:"#/$defs/NativeWorktreeTargetV1"}},required:["scope_set_id","scope_set_revision","scope_set_digest","target","inspection_digest","confirmed_at","confirmation_digest"],title:"WorktreeCleanupRemoveRequestV1",type:"object"},{$defs:{ManifestDigest:gl,NativeWorktreeTargetV1:gE,ProjectId:g2,RepositoryId:_v,ScopeSetId:_Q,ScopeSetRevision:_X,WorktreeId:$M},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{scope_set_digest:{$ref:"#/$defs/ManifestDigest"},scope_set_id:{$ref:"#/$defs/ScopeSetId"},scope_set_revision:{$ref:"#/$defs/ScopeSetRevision"},target:{$ref:"#/$defs/NativeWorktreeTargetV1"}},required:["scope_set_id","scope_set_revision","scope_set_digest","target"],title:"WorktreeInventoryRequestV1",type:"object"},{$defs:{ActorId:mW,TaskId:vC},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Issues a short-lived, version-bound task-opening token.\n\nIdentity, scope, authority revisions, issuance time, and expiry are all\nsupplied by the admitted daemon request. The caller supplies only the\nbearer, destination session, exact task version, and enrolled recipient\nprincipal it intends to authorize.",properties:{recipient_actor_id:{$ref:"#/$defs/ActorId"},session_id:{type:"string"},task_id:{$ref:"#/$defs/TaskId"},token:{type:"string"},version:{format:"uint64",minimum:0,type:"integer"}},required:["token","session_id","task_id","version","recipient_actor_id"],title:"IssueTaskHandoffRequestV1",type:"object"},{$defs:{ManifestDigest:gl,TaskId:vC,UtcMicros:vK},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Flat public receipt for a committed task-handoff issue.\n\nThe complete binding remains inside the daemon authority. Publishing only\nthese exact identifiers avoids turning mutable grant and policy internals\ninto a second public wire authority.",properties:{expires_at:{$ref:"#/$defs/UtcMicros"},issued_at:{$ref:"#/$defs/UtcMicros"},issued_request_id:{type:"string"},session_id:{type:"string"},task_id:{$ref:"#/$defs/TaskId"},token_digest:{$ref:"#/$defs/ManifestDigest"},version:{format:"uint64",minimum:0,type:"integer"}},required:["token_digest","issued_request_id","session_id","task_id","version","issued_at","expires_at"],title:"IssueTaskHandoffResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:'Enumerates the handoff tokens this caller could redeem in one session.\n\nThe two `open_*` operations redeem a bearer the caller already holds; they\ncannot answer "what has been handed to me and not yet taken up". This one\ncan, and it does so without any bearer: the request carries no token, and\nthe result carries only digests.',properties:{session_id:{type:"string"}},required:["session_id"],title:"ListTaskHandoffsRequestV1",type:"object"},{$defs:{FeedbackFindingId:yi,HandoffOpenKindV1:{enum:["investigation","task"],type:"string"},HandoffOpenTargetV1:{oneOf:[{properties:{finding_id:{$ref:"#/$defs/FeedbackFindingId"},kind:{const:"investigation",type:"string"},owner_version_digest:{$ref:"#/$defs/ManifestDigest"}},required:["kind","finding_id","owner_version_digest"],type:"object"},{properties:{kind:{const:"task",type:"string"},owner_version_digest:{$ref:"#/$defs/ManifestDigest"},task_id:{$ref:"#/$defs/TaskId"},version:{format:"uint64",minimum:0,type:"integer"}},required:["kind","task_id","version","owner_version_digest"],type:"object"}]},ListedTaskHandoffV1:{additionalProperties:!1,description:"One handoff token, projected for public reading.\n\nMirrors [`IssueTaskHandoffResultV1`]'s doctrine: the complete binding stays\ninside the daemon authority, and only these identifiers cross the wire. No\nbearer secret exists to leak here. The authority never stored one, and the\nissuer's grant identity and policy digests stay concealed.",properties:{consumed_at:{anyOf:[{$ref:"#/$defs/UtcMicros"},{type:"null"}],description:"Set only when `state` is `consumed`."},expires_at:{$ref:"#/$defs/UtcMicros"},issued_at:{$ref:"#/$defs/UtcMicros"},issued_request_id:{type:"string"},kind:{$ref:"#/$defs/HandoffOpenKindV1"},session_id:{type:"string"},state:{$ref:"#/$defs/TaskHandoffTokenStateV1"},target:{$ref:"#/$defs/HandoffOpenTargetV1"},token_digest:{$ref:"#/$defs/ManifestDigest"}},required:["token_digest","issued_request_id","session_id","kind","target","issued_at","expires_at","state"],type:"object"},ManifestDigest:gl,TaskHandoffTokenStateV1:{description:"Where one enumerated token stands at the observed instant.",oneOf:[{const:"open",description:"Not yet redeemed, and not yet expired: the live frontier.",type:"string"},{const:"consumed",description:"Redeemed. Single-use, so it can never be redeemed again.",type:"string"},{const:"expired",description:"Its window closed with no redemption. A dropped handoff, which is\nexactly the fact a frontier exists to surface.",type:"string"}]},TaskId:vC,UtcMicros:vK},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"The handoff-token frontier for one session.",properties:{consumed_count:{format:"uint32",minimum:0,type:"integer"},expired_count:{format:"uint32",minimum:0,type:"integer"},handoffs:{items:{$ref:"#/$defs/ListedTaskHandoffV1"},type:"array"},observed_at:{$ref:"#/$defs/UtcMicros",description:"The instant the states below were decided at. Without it, `open` and\n`expired` are claims with no clock behind them."},open_count:{format:"uint32",minimum:0,type:"integer"},truncated:{description:"True when the enumeration ceiling was reached, so the counts describe a\nprefix of the frontier rather than all of it.",type:"boolean"}},required:["observed_at","handoffs","open_count","consumed_count","expired_count","truncated"],title:"ListTaskHandoffsResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{session_id:{type:"string"},token:{type:"string"}},required:["token","session_id"],title:"OpenInvestigationHandoffRequestV1",type:"object"},{$defs:{FeedbackFindingId:yi,HandoffOpenReceiptV1:yL,InvestigationHandoffSurfaceV1:{additionalProperties:!1,properties:{finding_id:{$ref:"#/$defs/FeedbackFindingId"},owner_version_digest:{$ref:"#/$defs/ManifestDigest"}},required:["finding_id","owner_version_digest"],type:"object"},ManifestDigest:gl,UtcMicros:vK},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{receipt:{$ref:"#/$defs/HandoffOpenReceiptV1"},surface:{$ref:"#/$defs/InvestigationHandoffSurfaceV1"}},required:["surface","receipt"],title:"OpenInvestigationHandoffResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{session_id:{type:"string"},token:{type:"string"}},required:["token","session_id"],title:"OpenTaskHandoffRequestV1",type:"object"},{$defs:{HandoffOpenReceiptV1:yL,ManifestDigest:gl,TaskHandoffSurfaceV1:{additionalProperties:!1,properties:{task_id:{$ref:"#/$defs/TaskId"},version:{format:"uint64",minimum:0,type:"integer"}},required:["task_id","version"],type:"object"},TaskId:vC,UtcMicros:vK},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{receipt:{$ref:"#/$defs/HandoffOpenReceiptV1"},surface:{$ref:"#/$defs/TaskHandoffSurfaceV1"}},required:["surface","receipt"],title:"OpenTaskHandoffResultV1",type:"object"},{$defs:{ManifestDigest:gl,MultiRootContinuationV1:gR,MultiRootOperationV1:{description:"Closed federated read families. The family is typed while its existing\noperation-specific request remains the canonical JSON payload owned by that\napplication surface.",oneOf:[{properties:{kind:{const:"work",type:"string"},request:!0},required:["kind","request"],type:"object"},{properties:{kind:{const:"git",type:"string"},request:!0},required:["kind","request"],type:"object"},{properties:{kind:{const:"feedback",type:"string"},request:!0},required:["kind","request"],type:"object"},{properties:{kind:{const:"impact",type:"string"},request:!0},required:["kind","request"],type:"object"},{properties:{kind:{const:"query",type:"string"},request:!0},required:["kind","request"],type:"object"}]},RootGenerationV1:_A,RootScopeOutcomeV1_for_Nullable_RootGenerationV1:_M,RootScopeOutcomeV1_for_Nullable_string:_W,ScopeOutcome_for_Nullable_RootGenerationV1:_K,ScopeOutcome_for_Nullable_string:_J,ScopePartialReasonV1:_Z,ScopeSetId:_Q,ScopeSetRevision:_X,ScopeUnavailableReasonV1:_1},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"External federated request bound to one persisted scope-set revision and\ndigest. Query/order digests and root generations are server-derived.",properties:{continuation:{anyOf:[{$ref:"#/$defs/MultiRootContinuationV1"},{type:"null"}]},operation:{$ref:"#/$defs/MultiRootOperationV1"},page:{format:"uint64",minimum:0,type:"integer"},scope_set_digest:{$ref:"#/$defs/ManifestDigest"},scope_set_id:{$ref:"#/$defs/ScopeSetId"},scope_set_revision:{$ref:"#/$defs/ScopeSetRevision"}},required:["scope_set_id","scope_set_revision","scope_set_digest","operation","page"],title:"MultiRootExecuteRequestV1",type:"object"},{$defs:{ManifestDigest:gl,MultiRootContinuationV1:gR,RootGenerationV1:_A,RootScopeOutcomeV1_for_Array_of_AnyValue:{additionalProperties:!1,description:"One typed outcome pinned to the digest of an exact resolved root.",properties:{outcome:{$ref:"#/$defs/ScopeOutcome_for_Array_of_AnyValue"},scope_digest:{$ref:"#/$defs/ManifestDigest"}},required:["scope_digest","outcome"],type:"object"},RootScopeOutcomeV1_for_Nullable_RootGenerationV1:_M,RootScopeOutcomeV1_for_Nullable_string:_W,ScopeOutcome_for_Array_of_AnyValue:{description:"Truthful outcome for one authorized root or an aggregate over roots.\n\n`Denied` and `Unavailable` carry no value and therefore cannot be confused\nwith a successful empty result.",oneOf:[{properties:{outcome:{const:"exact",type:"string"},value:{items:!0,type:"array"}},required:["outcome","value"],type:"object"},{properties:{outcome:{const:"partial",type:"string"},value:{properties:{reason:{$ref:"#/$defs/ScopePartialReasonV1"},value:{items:!0,type:"array"}},required:["value","reason"],type:"object"}},required:["outcome","value"],type:"object"},{properties:{outcome:{const:"denied",type:"string"}},required:["outcome"],type:"object"},{properties:{outcome:{const:"unavailable",type:"string"},value:{properties:{reason:{$ref:"#/$defs/ScopeUnavailableReasonV1"}},required:["reason"],type:"object"}},required:["outcome","value"],type:"object"}]},ScopeOutcome_for_Nullable_RootGenerationV1:_K,ScopeOutcome_for_Nullable_string:_J,ScopePartialReasonV1:_Z,ScopeSetId:_Q,ScopeSetRevision:_X,ScopeUnavailableReasonV1:_1},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Federated page preserving each root outcome and aggregate partial truth.",properties:{aggregate:{$ref:"#/$defs/ScopeOutcome_for_Array_of_AnyValue"},continuation:{anyOf:[{$ref:"#/$defs/MultiRootContinuationV1"},{type:"null"}]},roots:{items:{$ref:"#/$defs/RootScopeOutcomeV1_for_Array_of_AnyValue"},type:"array"},scope_set_digest:{$ref:"#/$defs/ManifestDigest"},scope_set_id:{$ref:"#/$defs/ScopeSetId"},scope_set_revision:{$ref:"#/$defs/ScopeSetRevision"}},required:["scope_set_id","scope_set_revision","scope_set_digest","roots","aggregate"],title:"MultiRootQueryPageV1_for_AnyValue",type:"object"},{$defs:{ProjectId:g2,RegisteredRootSelectorV1:{additionalProperties:!1,description:"Exact registered-root selector accepted by scope-set CAS.",properties:{project_id:{$ref:"#/$defs/ProjectId"},root:{type:"string"}},required:["project_id","root"],type:"object"},ScopeSetId:_Q,ScopeSetRevision:_X},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Canonical external selector for creating or updating an authorized scope\nset. Every member names one exact registered root; project-only selection\ncannot silently widen to an active or first-mounted graph.",properties:{expected_revision:{anyOf:[{$ref:"#/$defs/ScopeSetRevision"},{type:"null"}]},roots:{items:{$ref:"#/$defs/RegisteredRootSelectorV1"},type:"array"},scope_set_id:{$ref:"#/$defs/ScopeSetId"}},required:["scope_set_id","roots"],title:"MultiRootScopeSetCasRequestV1",type:"object"},{$defs:{ActorId:mW,AuthorizedRoot:m2,AuthorizedScopeSet:m4,BrainId:fs,ManifestDigest:gl,MultiRootScopeSetCasStatusV1:{enum:["applied","conflict"],type:"string"},ProjectId:g2,RefId:_u,RegisteredRootLocatorV1:_m,RepositoryId:_v,ResolvedScope:_k,ScopeSetId:_Q,ScopeSetRevision:_X,SharedProfileStoreLocatorV1:va,UserProfileId:vB,WorktreeId:$M},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{scope_set:{anyOf:[{$ref:"#/$defs/AuthorizedScopeSet"},{type:"null"}]},status:{$ref:"#/$defs/MultiRootScopeSetCasStatusV1"}},required:["status"],title:"MultiRootScopeSetCasResultV1",type:"object"},{$defs:{ScopeSetId:_Q},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{scope_set_id:{$ref:"#/$defs/ScopeSetId"}},required:["scope_set_id"],title:"MultiRootScopeSetReadRequestV1",type:"object"},{$defs:{ActorId:mW,AuthorizedRoot:m2,AuthorizedScopeSet:m4,BrainId:fs,ManifestDigest:gl,ProjectId:g2,RefId:_u,RegisteredRootLocatorV1:_m,RepositoryId:_v,ResolvedScope:_k,ScopeSetId:_Q,ScopeSetRevision:_X,SharedProfileStoreLocatorV1:va,UserProfileId:vB,WorktreeId:$M},$schema:"https://json-schema.org/draft/2020-12/schema",anyOf:[{$ref:"#/$defs/AuthorizedScopeSet"},{type:"null"}],title:"Nullable_AuthorizedScopeSet"},{$defs:{AcceptWorkProposalDispositionV1:{description:"The accept-proposal operation can commit acceptance only.",enum:["accepted"],type:"string"},CatalogGenerationId:fq,ConfigurationRevisionId:f0,ManifestDigest:gl,ProjectId:g2,ProposalId:g5,ProviderId:_i,RepositoryId:_v,RetrievalAnchorId:_q,SourceStoreId:v$,TaskId:vC,UtcMicros:vK,VerifiedWorkGraphVersionV1:vZ,WorkCommandId:bc,WorkProductAuthorizedRelationScopeV1:bJ,WorkProductEventEvidenceV1:bZ,WorkProductExpectedAuthorityV1:bY,WorkProductMutationIdentityV1:b0,WorkProductRevisionPinsV1:b6,WorkProductSelectionScopeV1:b3,WorkProposalV1:b8,WorkProposedChildV1:b7,WorkProviderRouteId:$o,WorkProviderRouteV1:$n,WorkRouteDecisionV1:$f,WorkScoreKindV1:$$,WorkShapeAssessmentV1:$S,WorkSizingV1:$k},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{disposition:{$ref:"#/$defs/AcceptWorkProposalDispositionV1"},mutation:{$ref:"#/$defs/WorkProductMutationIdentityV1"},proposal:{$ref:"#/$defs/WorkProposalV1"},selection:{$ref:"#/$defs/WorkProductSelectionScopeV1"}},required:["selection","proposal","disposition","mutation"],title:"AcceptWorkProposalRequestV1",type:"object"},{$defs:{ActorId:mW,AttemptId:m1,BrainId:fs,CatalogGenerationId:fq,ConfigurationRevisionId:f0,ManifestDigest:gl,ProjectId:g2,ProposalId:g5,ProviderId:_i,RepositoryId:_v,RetrievalAnchorId:_q,RunId:_z,SourceStoreId:v$,TaskEvidenceLinkV1:vx,TaskId:vC,UserProfileId:vB,UtcMicros:vK,VerifiedWorkGraphVersionV1:vZ,WorkAcceptanceCriterionV1:vQ,WorkAttemptIdentityV1:v2,WorkCommandId:bc,WorkGraphChangeV1:bI,WorkHandoffV1:bT,WorkHierarchyV1:bO,WorkInitiativeV1:bE,WorkItemInputV1:bA,WorkItemV1:bM,WorkMilestoneV1:bz,WorkPlanV1:bK,WorkProductAuthorizedRelationScopeV1:bJ,WorkProductEventEvidenceV1:bZ,WorkProductEventPayloadV1:bQ,WorkProductEventV1:bX,WorkProductGraphV1:b1,WorkProductProfileScopeV1:b2,WorkProposalDecisionV1:b9,WorkProposalDispositionV1:b5,WorkProposalV1:b8,WorkProposedChildV1:b7,WorkProviderRouteId:$o,WorkProviderRouteV1:$n,WorkRelationReplanDecisionV1:$s,WorkRelationReplanProposalV1:$d,WorkRouteDecisionV1:$f,WorkScoreKindV1:$$,WorkShapeAssessmentV1:$S,WorkSizingV1:$k},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{event:{$ref:"#/$defs/WorkProductEventV1"},replayed:{type:"boolean"},verified_graph_version:{$ref:"#/$defs/VerifiedWorkGraphVersionV1"}},required:["event","verified_graph_version","replayed"],title:"WorkProductMutationReceiptV1",type:"object"},{$defs:{AttemptId:m1,CoverageStateV1:hV,DuplicateEffectOutcomeV1:hE,DuplicateEffortKindV1:hA,ProjectionGenerationId:g9,QuantityEvidenceClassV1:_a,RunId:_z,TaskId:vC,UtcMicros:vK,WorkAttemptIdentityV1:v2,WorkCommandId:bc,WorkDuplicateAdjudicationEvidenceV1:bp,WorkDuplicateAdjudicationQuantitiesV1:bu,WorkTopologyGenerationRefV1:$P},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{command_id:{$ref:"#/$defs/WorkCommandId"},evidence:{$ref:"#/$defs/WorkDuplicateAdjudicationEvidenceV1"},expected_revision:{format:"uint64",minimum:0,type:["integer","null"]},first_attempt:{$ref:"#/$defs/WorkAttemptIdentityV1"},occurred_at:{$ref:"#/$defs/UtcMicros"},quantities:{$ref:"#/$defs/WorkDuplicateAdjudicationQuantitiesV1"},reason:{type:"string"},second_attempt:{$ref:"#/$defs/WorkAttemptIdentityV1"},verdict:{$ref:"#/$defs/DuplicateEffortKindV1"}},required:["first_attempt","second_attempt","evidence","verdict","quantities","reason","command_id","occurred_at"],title:"WorkDuplicateAdjudicationCommandV1",type:"object"},{$defs:{ActorId:mW,AttemptId:m1,CoverageStateV1:hV,DuplicateEffectOutcomeV1:hE,DuplicateEffortKindV1:hA,ManifestDigest:gl,ProjectionGenerationId:g9,QuantityEvidenceClassV1:_a,RunId:_z,TaskId:vC,UtcMicros:vK,WorkAttemptIdentityV1:v2,WorkCommandId:bc,WorkDuplicateAdjudicationCommandV1:{additionalProperties:!1,properties:{command_id:{$ref:"#/$defs/WorkCommandId"},evidence:{$ref:"#/$defs/WorkDuplicateAdjudicationEvidenceV1"},expected_revision:{format:"uint64",minimum:0,type:["integer","null"]},first_attempt:{$ref:"#/$defs/WorkAttemptIdentityV1"},occurred_at:{$ref:"#/$defs/UtcMicros"},quantities:{$ref:"#/$defs/WorkDuplicateAdjudicationQuantitiesV1"},reason:{type:"string"},second_attempt:{$ref:"#/$defs/WorkAttemptIdentityV1"},verdict:{$ref:"#/$defs/DuplicateEffortKindV1"}},required:["first_attempt","second_attempt","evidence","verdict","quantities","reason","command_id","occurred_at"],type:"object"},WorkDuplicateAdjudicationEvidenceV1:bp,WorkDuplicateAdjudicationQuantitiesV1:bu,WorkDuplicateAdjudicationReceiptV1:{additionalProperties:!1,properties:{actor_id:{$ref:"#/$defs/ActorId"},adjudication_ref:{$ref:"#/$defs/ManifestDigest"},canonical_input_digest:{$ref:"#/$defs/ManifestDigest"},command:{$ref:"#/$defs/WorkDuplicateAdjudicationCommandV1"},revision:{format:"uint64",minimum:0,type:"integer"}},required:["command","revision","actor_id","canonical_input_digest","adjudication_ref"],type:"object"},WorkTopologyGenerationRefV1:$P},$schema:"https://json-schema.org/draft/2020-12/schema",oneOf:[{properties:{outcome:{const:"appended",type:"string"},receipt:{$ref:"#/$defs/WorkDuplicateAdjudicationReceiptV1"}},required:["outcome","receipt"],type:"object"},{properties:{outcome:{const:"replayed",type:"string"},receipt:{$ref:"#/$defs/WorkDuplicateAdjudicationReceiptV1"}},required:["outcome","receipt"],type:"object"}],title:"WorkDuplicateAdjudicationAppendOutcomeV1"},{$defs:{AttemptId:m1,RunId:_z,TaskId:vC,WorkAttemptIdentityV1:v2,WorkCommandId:bc},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{adjudication_id:{type:"string"},attempt:{$ref:"#/$defs/WorkAttemptIdentityV1"},command_id:{$ref:"#/$defs/WorkCommandId"},detection_horizon_micros:{format:"uint64",minimum:0,type:"integer"},expected_revision:{format:"uint64",minimum:0,type:["integer","null"]}},required:["adjudication_id","attempt","detection_horizon_micros","command_id"],title:"AdjudicateWorkLeakCommandV1",type:"object"},{$defs:{AdjudicateWorkLeakCommandV1:{additionalProperties:!1,properties:{adjudication_id:{type:"string"},attempt:{$ref:"#/$defs/WorkAttemptIdentityV1"},command_id:{$ref:"#/$defs/WorkCommandId"},detection_horizon_micros:{format:"uint64",minimum:0,type:"integer"},expected_revision:{format:"uint64",minimum:0,type:["integer","null"]}},required:["adjudication_id","attempt","detection_horizon_micros","command_id"],title:"AdjudicateWorkLeakCommandV1",type:"object"},AttemptId:m1,CoverageStateV1:hV,LeakOwnerClassV1:{enum:["work","workflow","git","delivery","unknown"],type:"string"},ManifestDigest:gl,RunId:_z,TaskId:vC,UtcMicros:vK,VerifiedWorkLeakEvidenceV1:{additionalProperties:!1,description:"Exact result of one scan by the canonical lease/process/effect/placement/\ndelivery evidence owner. Evidence references are opaque local anchors;\ntheir owning records remain behind normal authorization.",properties:{attempt:{$ref:"#/$defs/WorkAttemptIdentityV1"},coverage:{$ref:"#/$defs/CoverageStateV1"},detection_horizon_micros:{format:"uint64",minimum:0,type:"integer"},evidence_refs:{items:{type:"string"},type:"array"},kind:{$ref:"#/$defs/WorkExecutionLeakKindV1"},owner_class:{$ref:"#/$defs/LeakOwnerClassV1"},recovery:{$ref:"#/$defs/WorkExecutionLeakRecoveryV1"},scan_completed_at:{$ref:"#/$defs/UtcMicros"},scan_started_at:{$ref:"#/$defs/UtcMicros"}},required:["attempt","kind","recovery","owner_class","coverage","detection_horizon_micros","scan_started_at","scan_completed_at","evidence_refs"],type:"object"},WorkAttemptIdentityV1:v2,WorkCommandId:bc,WorkExecutionLeakKindV1:{enum:["lease_after_terminal","attempt_without_live_owner","effect_unknown_past_deadline","missing_worktree_binding","unbounded_delivery","none","unknown"],type:"string"},WorkExecutionLeakRecoveryV1:{enum:["not_required","pending","recovered","failed","unknown"],type:"string"},WorkLeakAdjudicationReceiptV1:{additionalProperties:!1,properties:{canonical_input_digest:{$ref:"#/$defs/ManifestDigest"},command:{$ref:"#/$defs/AdjudicateWorkLeakCommandV1"},evidence:{$ref:"#/$defs/VerifiedWorkLeakEvidenceV1"},revision:{format:"uint64",minimum:0,type:"integer"},scan_deadline:{$ref:"#/$defs/UtcMicros",description:"Daemon/request-owned deadline that bounded the source scan."}},required:["command","revision","evidence","scan_deadline","canonical_input_digest"],type:"object"}},$schema:"https://json-schema.org/draft/2020-12/schema",oneOf:[{properties:{outcome:{const:"appended",type:"string"},receipt:{$ref:"#/$defs/WorkLeakAdjudicationReceiptV1"}},required:["outcome","receipt"],type:"object"},{properties:{outcome:{const:"replayed",type:"string"},receipt:{$ref:"#/$defs/WorkLeakAdjudicationReceiptV1"}},required:["outcome","receipt"],type:"object"}],title:"WorkLeakAdjudicationOutcomeV1"},{$defs:{CatalogGenerationId:fq,ConfigurationRevisionId:f0,ManifestDigest:gl,ProjectId:g2,RepositoryId:_v,RetrievalAnchorId:_q,SourceStoreId:v$,TaskId:vC,UtcMicros:vK,VerifiedWorkGraphVersionV1:vZ,WorkCommandId:bc,WorkProductAuthorizedRelationScopeV1:bJ,WorkProductEventEvidenceV1:bZ,WorkProductExpectedAuthorityV1:bY,WorkProductMutationIdentityV1:b0,WorkProductRevisionPinsV1:b6,WorkProductSelectionScopeV1:b3},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{based_on_version:{format:"uint64",minimum:0,type:"integer"},mutation:{$ref:"#/$defs/WorkProductMutationIdentityV1"},selection:{$ref:"#/$defs/WorkProductSelectionScopeV1"},task_id:{$ref:"#/$defs/TaskId"}},required:["selection","task_id","based_on_version","mutation"],title:"AdmitWorkExecutionRequestV1",type:"object"},{$defs:{ActorId:mW,AttemptId:m1,AutomaticWorktreeGcV1:m3,BrainId:fs,BranchCollisionPolicyV1:fd,BranchNameComponentV1:fc,BranchNameSeparatorV1:fl,BranchNamingPolicyV1:fp,BranchTopologyKindV1:f_,BranchTopologyPolicyV1:fv,CanonicalGitRefNameV1:fR,CanonicalGitRefPrefix:fP,CapabilityId:fV,CatalogGenerationId:fq,ConfigurationRevisionId:f0,ConfigurationSnapshotId:f2,CredentialReferenceId:hq,CrossMergeModeV1:hI,CrossMergePolicyV1:hx,GitHubStackedPullRequestPolicyV1:yP,HistoryRewritePolicyV1:yU,LocatorDigest:gr,ManifestDigest:gl,ProjectId:g2,ProposalId:g5,ProtectedRefDispositionV1:g8,ProtectedRefRuleV1:g7,ProtectedRefSelectorV1:_e,ProviderId:_i,RepositoryId:_v,RepositoryPlacementScopeV1:_b,RequiredCheckExpectationV1:_$,RequiredCheckV1:_S,RetrievalAnchorId:_q,ReviewRequirementV1:_T,ReviewTopologyKindV1:_O,ReviewTopologyPolicyV1:_E,RunId:_z,SensitiveFilesystemLocatorV1:_2,SourceStoreId:v$,TaskEvidenceLinkV1:vx,TaskId:vC,TopologyConcurrencyPolicyV1:vF,TopologyEscalationPolicyV1:vL,TopologyGatePolicyV1:vU,TopologyNotificationLevelV1:vH,UserProfileId:vB,UtcMicros:vK,VerifiedWorkGraphVersionV1:vZ,WorkAcceptanceCriterionV1:vQ,WorkApprovalPolicy:vX,WorkAttemptIdentityV1:v2,WorkCommandId:bc,WorkEgressPolicy:bh,WorkExecutableReference:bb,WorkExecutionLimits:bS,WorkExecutionSnapshot:bk,WorkFallbackTopology:bP,WorkFilesystemPolicy:bq,WorkGraphChangeV1:bI,WorkHandoffV1:bT,WorkHierarchyV1:bO,WorkInitiativeV1:bE,WorkItemInputV1:bA,WorkItemV1:bM,WorkMilestoneV1:bz,WorkPlanV1:bK,WorkProductAuthorizedRelationScopeV1:bJ,WorkProductEventEvidenceV1:bZ,WorkProductEventPayloadV1:bQ,WorkProductEventV1:bX,WorkProductGraphV1:b1,WorkProductMutationReceiptV1:{additionalProperties:!1,properties:{event:{$ref:"#/$defs/WorkProductEventV1"},replayed:{type:"boolean"},verified_graph_version:{$ref:"#/$defs/VerifiedWorkGraphVersionV1"}},required:["event","verified_graph_version","replayed"],type:"object"},WorkProductProfileScopeV1:b2,WorkProposalDecisionV1:b9,WorkProposalDispositionV1:b5,WorkProposalV1:b8,WorkProposedChildV1:b7,WorkProviderBackendV1:$t,WorkProviderProtocol:$i,WorkProviderRouteId:$o,WorkProviderRouteV1:$n,WorkRelationReplanDecisionV1:$s,WorkRelationReplanProposalV1:$d,WorkRouteDecisionV1:$f,WorkSandboxPolicy:$b,WorkScoreKindV1:$$,WorkShapeAssessmentV1:$S,WorkSizingV1:$k,WorkTopologyPolicyV1:$V,WorktreeCleanlinessRequirementV1:$A,WorktreePlacementModeV1:$z,WorktreeRetentionPolicyV1:$D,WorktreeRootPolicyV1:$F},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Execution admission together with the immutable provider snapshot licensed\nby the accepted proposal and current configuration authority.",properties:{execution_snapshot:{$ref:"#/$defs/WorkExecutionSnapshot"},mutation:{$ref:"#/$defs/WorkProductMutationReceiptV1"}},required:["mutation","execution_snapshot"],title:"AdmittedWorkExecutionV1",type:"object"},{$defs:{RunId:_z,TaskId:vC,UtcMicros:vK,WorkPlacementKindV1:bU,WorkPlacementTargetV1:bG},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{occurred_at:{$ref:"#/$defs/UtcMicros"},retention_eligible_at:{anyOf:[{$ref:"#/$defs/UtcMicros"},{type:"null"}],default:null,description:"When retention makes this placement eligible for a fresh cleanup\npreflight. Eligibility is not delete authority."},run_id:{$ref:"#/$defs/RunId"},target:{$ref:"#/$defs/WorkPlacementTargetV1"},task_id:{$ref:"#/$defs/TaskId"}},required:["task_id","run_id","target","occurred_at"],title:"AdmitWorkPlacementCommand",type:"object"},{$defs:{RunId:_z,TaskId:vC,UtcMicros:vK,WorkPlacementBlockerV1:bF,WorkPlacementIdentityV1:bL,WorkPlacementKindV1:bU,WorkPlacementStateV1:bH,WorkPlacementTargetV1:bG},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"One run's durable placement relation.",properties:{authority_version:{format:"uint64",minimum:0,type:"integer"},blockers:{items:{$ref:"#/$defs/WorkPlacementBlockerV1"},type:"array",uniqueItems:!0},identity:{$ref:"#/$defs/WorkPlacementIdentityV1"},retention_eligible_at:{anyOf:[{$ref:"#/$defs/UtcMicros"},{type:"null"}],description:"When retention makes this placement *eligible* for a fresh cleanup\npreflight. Eligibility is not delete authority."},state:{$ref:"#/$defs/WorkPlacementStateV1"},target:{$ref:"#/$defs/WorkPlacementTargetV1"},transitioned_at:{$ref:"#/$defs/UtcMicros"}},required:["identity","target","state","authority_version","transitioned_at","blockers"],title:"WorkPlacementV1",type:"object"},{$defs:{AttemptId:m1,RunId:_z,TaskId:vC},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{attempt_id:{$ref:"#/$defs/AttemptId"},run_id:{$ref:"#/$defs/RunId"},task_id:{$ref:"#/$defs/TaskId"}},required:["task_id","run_id","attempt_id"],title:"WorkAttemptStatusRequestV1",type:"object"},{$defs:{AttemptId:m1,AutomaticWorktreeGcV1:m3,BranchCollisionPolicyV1:fd,BranchNameComponentV1:fc,BranchNameSeparatorV1:fl,BranchNamingPolicyV1:fp,BranchTopologyKindV1:f_,BranchTopologyPolicyV1:fv,CanonicalGitRefNameV1:fR,CanonicalGitRefPrefix:fP,CapabilityId:fV,CommitId:fH,ConfigurationRevisionId:f0,ConfigurationSnapshotId:f2,CredentialReferenceId:hq,CrossMergeModeV1:hI,CrossMergePolicyV1:hx,GitHubStackedPullRequestPolicyV1:yP,HistoryRewritePolicyV1:yU,LocatorDigest:gr,ManifestDigest:gl,ProjectId:g2,ProposalId:g5,ProtectedRefDispositionV1:g8,ProtectedRefRuleV1:g7,ProtectedRefSelectorV1:_e,ProviderId:_i,RefId:_u,RepositoryId:_v,RepositoryPlacementScopeV1:_b,RequiredCheckExpectationV1:_$,RequiredCheckV1:_S,ReviewRequirementV1:_T,ReviewTopologyKindV1:_O,ReviewTopologyPolicyV1:_E,RunId:_z,SensitiveFilesystemLocatorV1:_2,TaskId:vC,TopologyConcurrencyPolicyV1:vF,TopologyEscalationPolicyV1:vL,TopologyGatePolicyV1:vU,TopologyNotificationLevelV1:vH,UtcMicros:vK,WorkApprovalPolicy:vX,WorkArtifactId:vY,WorkArtifactRefV1:v1,WorkAttemptIdentityV1:v2,WorkAttemptProgressV1:v3,WorkAttemptProjectionBindingV1:v9,WorkAttemptStateV1:v7,WorkCancellationAcknowledgementV1:bo,WorkCancellationEscalationV1:bn,WorkCancellationRequestId:ba,WorkCancellationRequestV1:bs,WorkCancellationStateV1:bd,WorkEffectStateV1:bm,WorkEgressPolicy:bh,WorkExecutableReference:bb,WorkExecutionEnvelopeV1:b$,WorkExecutionLimits:bS,WorkExecutionSnapshot:bk,WorkFallbackTopology:bP,WorkFenceEpochV1:bV,WorkFilesystemPolicy:bq,WorkLeaseFenceV1:bW,WorkLeaseId:bN,WorkProviderBackendV1:$t,WorkProviderProtocol:$i,WorkProviderRouteId:$o,WorkProviderRouteV1:$n,WorkRecoveryStateV1:$a,WorkRestartReasonV1:$c,WorkSandboxPolicy:$b,WorkTerminalEvidenceV1:$R,WorkTopologyPolicyV1:$V,WorkflowOperationRef:$j,WorktreeCleanlinessRequirementV1:$A,WorktreeId:$M,WorktreePlacementModeV1:$z,WorktreeRetentionPolicyV1:$D,WorktreeRootPolicyV1:$F},$schema:"https://json-schema.org/draft/2020-12/schema",properties:{actual_route:{anyOf:[{$ref:"#/$defs/WorkProviderRouteV1"},{type:"null"}]},artifacts:{items:{$ref:"#/$defs/WorkArtifactRefV1"},type:"array"},cancellation:{$ref:"#/$defs/WorkCancellationStateV1"},execution:{$ref:"#/$defs/WorkExecutionEnvelopeV1"},identity:{$ref:"#/$defs/WorkAttemptIdentityV1"},lease:{$ref:"#/$defs/WorkLeaseFenceV1"},progress:{anyOf:[{$ref:"#/$defs/WorkAttemptProgressV1"},{type:"null"}]},projection_binding:{$ref:"#/$defs/WorkAttemptProjectionBindingV1"},recovery:{$ref:"#/$defs/WorkRecoveryStateV1"},requested_route:{$ref:"#/$defs/WorkProviderRouteV1"},state:{$ref:"#/$defs/WorkAttemptStateV1"},terminal:{anyOf:[{$ref:"#/$defs/WorkTerminalEvidenceV1"},{type:"null"}]}},required:["identity","projection_binding","execution","lease","state","artifacts","cancellation","recovery","requested_route"],title:"WorkAttemptV1",type:"object"},{$defs:{AttemptId:m1,RunId:_z,TaskId:vC,UtcMicros:vK,WorkCancellationRequestId:ba},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{attempt_id:{$ref:"#/$defs/AttemptId"},occurred_at:{$ref:"#/$defs/UtcMicros"},request_id:{$ref:"#/$defs/WorkCancellationRequestId"},run_id:{$ref:"#/$defs/RunId"},task_id:{$ref:"#/$defs/TaskId"}},required:["task_id","run_id","attempt_id","request_id","occurred_at"],title:"CancelWorkAttemptCommand",type:"object"},{$defs:{ManifestDigest:gl,ProjectId:g2,RepositoryId:_v,TaskId:vC,UtcMicros:vK,VerifiedWorkGraphVersionV1:vZ,WorkProductAuthorizedRelationScopeV1:bJ,WorkProductSelectionScopeV1:b3},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{new_version:{$ref:"#/$defs/VerifiedWorkGraphVersionV1"},observed_at:{$ref:"#/$defs/UtcMicros"},old_version:{$ref:"#/$defs/VerifiedWorkGraphVersionV1"},selection:{$ref:"#/$defs/WorkProductSelectionScopeV1"},task_id:{$ref:"#/$defs/TaskId"}},required:["selection","task_id","old_version","new_version","observed_at"],title:"WorkProposalComparisonRequestV1",type:"object"},{$defs:{ActorId:mW,AttemptId:m1,ManifestDigest:gl,ProposalId:g5,ProviderId:_i,RetrievalAnchorId:_q,RunId:_z,TaskEvidenceLinkV1:vx,TaskId:vC,UtcMicros:vK,VerifiedWorkEvidenceRootV1:{additionalProperties:!1,properties:{item:{$ref:"#/$defs/WorkItemV1"},links:{items:{$ref:"#/$defs/TaskEvidenceLinkV1"},type:"array"},proposal_decisions:{items:{$ref:"#/$defs/WorkProposalDecisionV1"},type:"array"},relation_replan_decisions:{items:{$ref:"#/$defs/WorkRelationReplanDecisionV1"},type:"array"},relations:{items:{$ref:"#/$defs/WorkProductRelationV1"},type:"array"},verified_version:{$ref:"#/$defs/VerifiedWorkGraphVersionV1"}},required:["verified_version","item","relations","proposal_decisions","relation_replan_decisions","links"],type:"object"},VerifiedWorkGraphVersionV1:vZ,WorkAcceptanceCriterionV1:vQ,WorkAttemptIdentityV1:v2,WorkHandoffV1:bT,WorkHierarchyV1:bO,WorkItemInputV1:bA,WorkItemV1:bM,WorkProductRelationV1:b4,WorkProposalComparisonEffectV1:{oneOf:[{const:"advisory_only",description:"Comparison is evidence only. There is no apply edge from this result.",type:"string"}]},WorkProposalDecisionV1:b9,WorkProposalDispositionV1:b5,WorkProposalV1:b8,WorkProposedChildV1:b7,WorkProviderRouteId:$o,WorkProviderRouteV1:$n,WorkRelationReplanDecisionV1:$s,WorkRelationReplanProposalV1:$d,WorkRouteDecisionV1:$f,WorkScoreKindV1:$$,WorkShapeAssessmentV1:$S,WorkSizingV1:$k},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{added_evidence:{items:{$ref:"#/$defs/TaskEvidenceLinkV1"},type:"array"},added_relations:{items:{$ref:"#/$defs/WorkProductRelationV1"},type:"array"},effect:{$ref:"#/$defs/WorkProposalComparisonEffectV1"},item_changed:{type:"boolean"},new:{$ref:"#/$defs/VerifiedWorkEvidenceRootV1"},old:{$ref:"#/$defs/VerifiedWorkEvidenceRootV1"},removed_evidence:{items:{$ref:"#/$defs/TaskEvidenceLinkV1"},type:"array"},removed_relations:{items:{$ref:"#/$defs/WorkProductRelationV1"},type:"array"},task_id:{$ref:"#/$defs/TaskId"}},required:["task_id","old","new","added_relations","removed_relations","added_evidence","removed_evidence","item_changed","effect"],title:"WorkProposalComparisonV1",type:"object"},{$defs:{ActorId:mW,AttemptId:m1,CatalogGenerationId:fq,ConfigurationRevisionId:f0,ManifestDigest:gl,ProjectId:g2,ProposalId:g5,ProviderId:_i,RepositoryId:_v,RetrievalAnchorId:_q,RunId:_z,SourceStoreId:v$,TaskId:vC,UtcMicros:vK,VerifiedWorkGraphVersionV1:vZ,WorkAcceptanceCriterionV1:vQ,WorkAttemptIdentityV1:v2,WorkCommandId:bc,WorkHandoffV1:bT,WorkHierarchyV1:bO,WorkInitiativeV1:bE,WorkItemInputV1:bA,WorkItemV1:bM,WorkMilestoneV1:bz,WorkPlanV1:bK,WorkProductAuthorizedRelationScopeV1:bJ,WorkProductEventEvidenceV1:bZ,WorkProductExpectedAuthorityV1:bY,WorkProductMutationIdentityV1:b0,WorkProductRevisionPinsV1:b6,WorkProductSelectionScopeV1:b3,WorkProviderRouteId:$o,WorkProviderRouteV1:$n,WorkRouteDecisionV1:$f},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{initiative:{$ref:"#/$defs/WorkInitiativeV1"},item:{$ref:"#/$defs/WorkItemV1"},milestone:{$ref:"#/$defs/WorkMilestoneV1"},mutation:{$ref:"#/$defs/WorkProductMutationIdentityV1"},plan:{$ref:"#/$defs/WorkPlanV1"},selection:{$ref:"#/$defs/WorkProductSelectionScopeV1"}},required:["selection","initiative","plan","milestone","item","mutation"],title:"CreateWorkTaskRequestV1",type:"object"},{$defs:{WorkAttemptListCursorV1:v6},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{cursor:{anyOf:[{$ref:"#/$defs/WorkAttemptListCursorV1"},{type:"null"}],default:null},page_size:{format:"uint32",minimum:0,type:"integer"}},required:["page_size"],title:"WorkAttemptListRequestV1",type:"object"},{$defs:{AttemptId:m1,ManifestDigest:gl,RunId:_z,TaskId:vC,UtcMicros:vK,WorkAttemptIdentityV1:v2,WorkAttemptListCoverageV1:v4,WorkAttemptListCursorV1:v6,WorkAttemptStateV1:v7,WorkEffectStateV1:bm,WorkExecutionSpanV1:{additionalProperties:!1,properties:{admitted_projection_sequence:{description:"Durable Work projection sequence under which execution was admitted.",format:"uint64",minimum:0,type:"integer"},effect_state:{$ref:"#/$defs/WorkEffectStateV1"},ended_at:{anyOf:[{$ref:"#/$defs/UtcMicros"},{type:"null"}]},identity:{$ref:"#/$defs/WorkAttemptIdentityV1"},started_at:{$ref:"#/$defs/UtcMicros"},state:{$ref:"#/$defs/WorkAttemptStateV1"},terminal_evidence_digest:{anyOf:[{$ref:"#/$defs/ManifestDigest"},{type:"null"}]},wall_micros:{description:"Present only when both owner instants form a valid non-negative span.",format:"uint64",minimum:0,type:["integer","null"]}},required:["identity","admitted_projection_sequence","state","effect_state","started_at"],type:"object"},WorkExecutionTimingCoverageV1:{oneOf:[{additionalProperties:!1,properties:{coverage:{const:"complete",type:"string"}},required:["coverage"],type:"object"},{additionalProperties:!1,properties:{coverage:{const:"partial",type:"string"},invalid_terminal_span:{items:{$ref:"#/$defs/WorkAttemptIdentityV1"},type:"array"},missing_dispatch:{items:{$ref:"#/$defs/WorkAttemptIdentityV1"},type:"array"}},required:["coverage","missing_dispatch","invalid_terminal_span"],type:"object"}]},WorkObservedExecutionOrderBasisV1:{enum:["terminal_observed_at_then_admitted_projection_sequence_then_attempt_identity"],type:"string"},WorkObservedExecutionV1:{additionalProperties:!1,properties:{admitted_projection_sequence:{format:"uint64",minimum:0,type:"integer"},evidence_digest:{$ref:"#/$defs/ManifestDigest"},identity:{$ref:"#/$defs/WorkAttemptIdentityV1"},observed_at:{$ref:"#/$defs/UtcMicros"},ordinal:{description:"One-based order assigned after sorting the durable terminal instants.",format:"uint32",minimum:0,type:"integer"},state:{$ref:"#/$defs/WorkAttemptStateV1"}},required:["ordinal","identity","admitted_projection_sequence","observed_at","state","evidence_digest"],type:"object"}},$schema:"https://json-schema.org/draft/2020-12/schema",oneOf:[{additionalProperties:!1,properties:{state:{const:"absent",type:"string"}},required:["state"],type:"object"},{additionalProperties:!1,properties:{attempt_coverage:{$ref:"#/$defs/WorkAttemptListCoverageV1"},observed_order:{items:{$ref:"#/$defs/WorkObservedExecutionV1"},type:"array"},order_basis:{$ref:"#/$defs/WorkObservedExecutionOrderBasisV1"},spans:{items:{$ref:"#/$defs/WorkExecutionSpanV1"},type:"array"},state:{const:"listed",type:"string"},timing_coverage:{$ref:"#/$defs/WorkExecutionTimingCoverageV1"}},required:["state","spans","observed_order","order_basis","attempt_coverage","timing_coverage"],type:"object"}],title:"WorkExecutionHistoryV1"},{$defs:{ManifestDigest:gl,ProjectId:g2,RepositoryId:_v,TaskId:vC,UtcMicros:vK,VerifiedWorkGraphVersionV1:vZ,WorkExpertiseCategoryV1:bw,WorkProductAuthorizedRelationScopeV1:bJ,WorkProductSelectionScopeV1:b3},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{evidence_not_before:{$ref:"#/$defs/UtcMicros",description:"Evidence before this owner-supplied horizon is excluded as stale."},expertise_categories:{description:"Categories for which the returned context will be used ephemerally.",items:{$ref:"#/$defs/WorkExpertiseCategoryV1"},type:"array",uniqueItems:!0},limit:{format:"uint32",minimum:0,type:"integer"},observed_at:{$ref:"#/$defs/UtcMicros"},selection:{$ref:"#/$defs/WorkProductSelectionScopeV1"},task_id:{$ref:"#/$defs/TaskId"},verified_version:{$ref:"#/$defs/VerifiedWorkGraphVersionV1"}},required:["selection","task_id","verified_version","evidence_not_before","expertise_categories","limit","observed_at"],title:"WorkExperienceRequestV1",type:"object"},{$defs:{ActorId:mW,AttemptId:m1,ConfigurationRevisionId:f0,ConfigurationSnapshotId:f2,ManifestDigest:gl,ObservationSourceIdentityV1:gW,ProposalId:g5,ProviderId:_i,RetrievalAnchorId:_q,RunId:_z,SessionId:_5,TaskEvidenceLinkV1:vx,TaskId:vC,UtcMicros:vK,VerifiedWorkGraphVersionV1:vZ,WorkAcceptanceCriterionV1:vQ,WorkArtifactId:vY,WorkArtifactRefV1:v1,WorkAttemptEvidenceRecordV1:v0,WorkAttemptIdentityV1:v2,WorkAttemptProviderOutcomeV1:v5,WorkAttemptReceiptV1:v8,WorkAttemptStreamChannelV1:be,WorkAttemptStreamSummaryV1:bt,WorkExperienceApplicabilityV1:{enum:["same_accepted_route","same_milestone"],type:"string"},WorkExperienceCandidateV1:{additionalProperties:!1,properties:{applicability:{description:"Separate declared applicability facts. This is intentionally not a\nscore and candidates remain in canonical TaskId order.",items:{$ref:"#/$defs/WorkExperienceApplicabilityV1"},type:"array",uniqueItems:!0},attempt_receipts:{description:"Exact receipts for accepted successful attempts whose sealed provider\nevidence and declared artifacts establish reusable observed work. The\nidentity is also the canonical `work_retrieve_evidence` drill target.",items:{$ref:"#/$defs/WorkAttemptReceiptV1"},type:"array"},evidence:{description:"Exact anchored evidence establishing that this is observed experience.",items:{$ref:"#/$defs/TaskEvidenceLinkV1"},type:"array"},item:{$ref:"#/$defs/WorkItemV1"}},required:["item","evidence","attempt_receipts","applicability"],type:"object"},WorkExperienceCoverageV1:{oneOf:[{additionalProperties:!1,properties:{coverage:{const:"unavailable",type:"string"}},required:["coverage"],type:"object"},{additionalProperties:!1,properties:{applicable:{format:"uint32",minimum:0,type:"integer"},coverage:{const:"complete",type:"string"},returned:{format:"uint32",minimum:0,type:"integer"},stale_excluded:{format:"uint32",minimum:0,type:"integer"}},required:["coverage","returned","applicable","stale_excluded"],type:"object"},{additionalProperties:!1,properties:{applicable:{format:"uint32",minimum:0,type:"integer"},coverage:{const:"partial",type:"string"},omitted_by_limit:{format:"uint32",minimum:0,type:"integer"},returned:{format:"uint32",minimum:0,type:"integer"},stale_excluded:{format:"uint32",minimum:0,type:"integer"}},required:["coverage","returned","applicable","stale_excluded","omitted_by_limit"],type:"object"}]},WorkExpertiseAuthorizationV1:{oneOf:[{additionalProperties:!1,properties:{availability:{const:"available",type:"string"},categories:{items:{$ref:"#/$defs/WorkExpertiseCategoryV1"},type:"array",uniqueItems:!0},durability:{$ref:"#/$defs/WorkExpertiseContextDurabilityV1"},expires_at:{$ref:"#/$defs/UtcMicros"},pin:{$ref:"#/$defs/WorkExpertiseConsentPinV1"}},required:["availability","categories","expires_at","pin","durability"],type:"object"},{additionalProperties:!1,properties:{availability:{const:"unavailable",type:"string"},legal_actions:{items:{$ref:"#/$defs/WorkExpertiseLegalActionV1"},type:"array",uniqueItems:!0},pin:{$ref:"#/$defs/WorkExpertiseConsentPinV1"},reasons:{items:{$ref:"#/$defs/WorkExpertiseUnavailableReasonV1"},type:"array",uniqueItems:!0}},required:["availability","reasons","legal_actions","pin"],type:"object"}]},WorkExpertiseCategoryV1:bw,WorkExpertiseConsentPinV1:{additionalProperties:!1,properties:{configuration_digest:{$ref:"#/$defs/ManifestDigest"},configuration_revision:{$ref:"#/$defs/ConfigurationRevisionId"},configuration_snapshot:{$ref:"#/$defs/ConfigurationSnapshotId"},provenance_digest:{$ref:"#/$defs/ManifestDigest"}},required:["configuration_revision","configuration_snapshot","configuration_digest","provenance_digest"],type:"object"},WorkExpertiseContextDurabilityV1:{oneOf:[{const:"ephemeral_only",description:"Context is returned for this read only and cannot establish evidence,\nrouting, proposal acceptance, execution admission, or completion.",type:"string"}]},WorkExpertiseLegalActionV1:{enum:["grant_user_consent","grant_project_consent","renew_user_consent","renew_project_consent","allow_requested_categories"],type:"string"},WorkExpertiseUnavailableReasonV1:{enum:["user_consent_disabled","project_consent_disabled","user_consent_not_yet_effective","project_consent_not_yet_effective","user_consent_expired","project_consent_expired","requested_category_not_allowed"],type:"string"},WorkHandoffV1:bT,WorkHierarchyV1:bO,WorkItemInputV1:bA,WorkItemV1:bM,WorkProviderAvailabilityV1:$e,WorkProviderBackendV1:$t,WorkProviderFallbackRecordV1:$r,WorkProviderRouteId:$o,WorkProviderRouteV1:$n,WorkRouteDecisionV1:$f},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{candidates:{items:{$ref:"#/$defs/WorkExperienceCandidateV1"},type:"array"},coverage:{$ref:"#/$defs/WorkExperienceCoverageV1"},evidence_not_before:{$ref:"#/$defs/UtcMicros"},expertise:{$ref:"#/$defs/WorkExpertiseAuthorizationV1"},observed_at:{$ref:"#/$defs/UtcMicros"},task_id:{$ref:"#/$defs/TaskId"},verified_version:{$ref:"#/$defs/VerifiedWorkGraphVersionV1"}},required:["task_id","verified_version","evidence_not_before","observed_at","expertise","candidates","coverage"],title:"WorkExperienceV1",type:"object"},{$defs:{ManifestDigest:gl,ProjectId:g2,ProposalId:g5,RepositoryId:_v,TaskId:vC,UtcMicros:vK,WorkEvidenceFrontierV1:bg,WorkProductAuthorizedRelationScopeV1:bJ,WorkProductSelectionScopeV1:b3},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Read-only proposal generation over one exact current product graph.",properties:{live_git_evidence:{anyOf:[{$ref:"#/$defs/WorkEvidenceFrontierV1"},{type:"null"}],default:null},occurred_at:{$ref:"#/$defs/UtcMicros"},proposal_id:{$ref:"#/$defs/ProposalId"},selection:{$ref:"#/$defs/WorkProductSelectionScopeV1"},task_id:{$ref:"#/$defs/TaskId"}},required:["selection","task_id","proposal_id","occurred_at"],title:"GenerateProposalRequest",type:"object"},{$defs:{ConfigurationRevisionId:f0,ManifestDigest:gl,PolicyIdentifierV1:{description:"A bounded, canonical identifier owned by the policy input schema.\n\nIt represents immutable references only; it is never a path, display\nlabel, provider account, branch name, or native object identifier.",type:"string"},ProposalId:g5,ProviderId:_i,TaskId:vC,UtcMicros:vK,VerifiedWorkGraphVersionV1:vZ,WorkCalibratedSizingV1:{additionalProperties:!1,description:"Calibrated sizing. Emitted ONLY when support >= floor. Every field is\nnamed separately (Plan 06); `support_floor` carries the governing floor\ninto the record.",properties:{band:{$ref:"#/$defs/WorkOrdinalBandV1",description:"The sizing band itself: the stronger of the route's declared effort and\nthe derived shape magnitude, widened when the cohort error is high."},cohort:{description:"Identity of the cohort the sizing was calibrated over: the top-ranked\nroute id. Sizing from one cohort is never reused for another.",type:"string"},drift_valid:{description:"False when the cohort contains incomparable or stale observations, so a\nconsumer can refuse a sizing that drifted rather than silently trust it.",type:"boolean"},error:{$ref:"#/$defs/WorkOrdinalBandV1",description:"Observed adverse-outcome band over the cohort. An ordinal band, never a\nrate and never a probability."},horizon:{$ref:"#/$defs/UtcMicros",description:"Latest comparable observation in the cohort. Nothing after\n`evaluated_at` contributes, so the horizon never runs ahead of the input."},support:{description:"Count of comparable in-cohort outcomes backing this sizing.",format:"uint32",minimum:0,type:"integer"},support_floor:{description:"The floor that governed this emission, carried so replay shows which\nfloor applied rather than assuming the current constant.",format:"uint32",minimum:0,type:"integer"}},required:["cohort","horizon","support","support_floor","error","drift_valid","band"],type:"object"},WorkCalibrationEvidenceV1:{additionalProperties:!1,description:"Raw calibration values and their exact decision provenance.\n\nNo rate, probability, or composite score is derived here. Consumers see\nthe authority-supplied outcome rows, categorical uncertainty, and exact\ndenominator counts that produced the proposal's existing calibrated sizing.",properties:{cohort_route:{type:["string","null"]},comparable_outcomes:{format:"uint32",minimum:0,type:"integer"},eligible_route_count:{format:"uint32",minimum:0,type:"integer"},incomparable_outcomes:{format:"uint32",minimum:0,type:"integer"},provenance:{$ref:"#/$defs/WorkCalibrationProvenanceV1"},raw_outcomes:{items:{$ref:"#/$defs/WorkPriorOutcomeV1"},type:"array"},routes_with_outcomes:{format:"uint32",minimum:0,type:"integer"},uncertainty:{$ref:"#/$defs/WorkCalibrationUncertaintyV1"}},required:["raw_outcomes","eligible_route_count","routes_with_outcomes","comparable_outcomes","incomparable_outcomes","uncertainty","provenance"],type:"object"},WorkCalibrationProvenanceV1:{additionalProperties:!1,properties:{configuration_digest:{$ref:"#/$defs/ManifestDigest"},configuration_revision:{anyOf:[{$ref:"#/$defs/ConfigurationRevisionId"},{type:"null"}]},evaluated_at:{$ref:"#/$defs/UtcMicros"},evaluator_id:{type:"string"},evaluator_revision:{format:"uint64",minimum:0,type:"integer"},input_digest:{$ref:"#/$defs/ManifestDigest"},local_evidence:{anyOf:[{$ref:"#/$defs/WorkEvidenceFrontierV1"},{type:"null"}]}},required:["evaluator_id","evaluator_revision","input_digest","configuration_digest","evaluated_at"],type:"object"},WorkCalibrationUncertaintyV1:{enum:["supported","sparse","stale","incomparable"],type:"string"},WorkDecompositionProposalV1:{additionalProperties:!1,description:"A one-level decomposition proposal. Never recursive: a deeper split is a\nseparate sequenced capability, not something this evaluator may invent.",properties:{candidates:{description:"The proposed sketches, ordinal ascending from 0.",items:{$ref:"#/$defs/WorkSubtaskSketchV1"},type:"array"},rationale:{description:"Why the proposal was emitted, in the same ordered reason vocabulary the\ndecision uses.",items:{$ref:"#/$defs/WorkProposalReasonV1"},type:"array"}},required:["candidates","rationale"],type:"object"},WorkEvidenceFrontierV1:bg,WorkFrontierComparisonV1:{description:"Recorded relation between the two supplied frontiers. `Incomparable` means\nat least one side was absent; it is not collapsed into agreement.",enum:["agree","disagree","incomparable"],type:"string"},WorkOrdinalBandV1:bD,WorkPriorOutcomeV1:{additionalProperties:!1,description:"Cohort denominator. APPLICATION-supplied, never worker-supplied.\n\nA worker cannot widen its own calibration cohort, so a route cannot earn\ncalibrated sizing by reporting its own successes.",properties:{accepted:{description:"Whether the produced work was accepted.",type:"boolean"},escaped_defect:{description:"Whether a defect escaped review.",type:"boolean"},observed_at:{$ref:"#/$defs/UtcMicros",description:"When the outcome was observed. Outcomes later than `evaluated_at` are\nINCOMPARABLE and are excluded from support rather than trusted."},rework:{description:"Whether the accepted work required rework.",type:"boolean"},route_id:{description:"The route this outcome belongs to. May name a retired route; only\noutcomes matching the top-ranked route form the sizing cohort.",type:"string"},terminal:{$ref:"#/$defs/WorkPriorTerminalV1",description:"How the attempt terminated."}},required:["route_id","accepted","rework","escaped_defect","terminal","observed_at"],type:"object"},WorkPriorTerminalV1:{description:"How a prior attempt on a route ended. Recorded, never inferred.",enum:["succeeded","failed","timed_out","cancelled"],type:"string"},WorkProposalActionV1:{description:"The explicit command the decision recommends next. A recommendation never\nexecutes; each action names a separate version-checked application command.",enum:["proceed_to_acceptance","hold_for_dependencies","admit_execution","replan"],type:"string"},WorkProposalDecisionV1:{additionalProperties:!1,description:"One explained, replayable work-loop decision.",properties:{based_on_version:{format:"uint64",minimum:0,type:"integer"},configuration_digest:{$ref:"#/$defs/ManifestDigest"},configuration_revision:{anyOf:[{$ref:"#/$defs/ConfigurationRevisionId"},{type:"null"}]},decomposition:{anyOf:[{$ref:"#/$defs/WorkDecompositionProposalV1"},{type:"null"}],description:"One-level decomposition sketch, present only when more than one\ndependency is unresolved."},deterministic_fallback:{description:"True when the recommendation is the declared deterministic baseline\nselected because the evidence cannot support a stronger claim.",type:"boolean"},disposition:{$ref:"#/$defs/WorkProposalDispositionV1"},evaluator_id:{$ref:"#/$defs/PolicyIdentifierV1"},evaluator_revision:{format:"uint64",minimum:0,type:"integer"},frontier_comparison:{$ref:"#/$defs/WorkFrontierComparisonV1"},input_digest:{$ref:"#/$defs/ManifestDigest"},live_git_evidence:{anyOf:[{$ref:"#/$defs/WorkEvidenceFrontierV1"},{type:"null"}],description:"The live Git frontier, returned exactly as supplied."},local_evidence:{anyOf:[{$ref:"#/$defs/WorkEvidenceFrontierV1"},{type:"null"}],description:"The local code/session frontier, returned exactly as supplied."},ordered_reason_codes:{items:{$ref:"#/$defs/WorkProposalReasonV1"},type:"array"},policy_digest:{$ref:"#/$defs/ManifestDigest"},policy_revision:{format:"uint64",minimum:0,type:"integer"},recommended_action:{anyOf:[{$ref:"#/$defs/WorkProposalActionV1"},{type:"null"}]},route_plan:{anyOf:[{$ref:"#/$defs/WorkRoutePlanV1"},{type:"null"}],description:"The explained route plan. Present on every evaluation that reached the\ngates, including the one that found no eligible route."},shape:{anyOf:[{$ref:"#/$defs/WorkTaskShapeV1"},{type:"null"}],description:"Derived task shape. Absent on the invalid, cancelled, and deadline\nshort-circuits, where no planner claim is licensed."},sizing:{anyOf:[{$ref:"#/$defs/WorkCalibratedSizingV1"},{type:"null"}],description:"Calibrated sizing, present only when in-cohort support reached the\ngoverning floor. Absence is a recorded fact, never a fabricated estimate."},task_id:{$ref:"#/$defs/TaskId"}},required:["evaluator_id","evaluator_revision","input_digest","task_id","based_on_version","policy_revision","policy_digest","configuration_digest","disposition","deterministic_fallback","ordered_reason_codes","frontier_comparison"],type:"object"},WorkProposalDispositionV1:{description:"Exactly one disposition per decision.",enum:["allow","deny","abstain","indeterminate"],type:"string"},WorkProposalReasonV1:{enum:["invalid_request","request_cancelled","deadline_exceeded","frontier_agreement","frontier_disagreement","frontier_incomparable","task_accepted","runtime_coverage_partial","runtime_coverage_unavailable","terminal_evidence_observed","execution_in_flight","proposal_accepted","dependencies_unresolved","ready","insufficient_calibration_support","route_budget_exceeded","route_content_location_refused","route_evidence_sparse","route_evidence_stale","human_override_applied","no_eligible_routes","deterministic_baseline_selected"],type:"string"},WorkProposalV1:b8,WorkProposedChildV1:b7,WorkProviderRouteId:$o,WorkProviderRouteV1:$n,WorkRankedRouteV1:{additionalProperties:!1,description:"Ranked route. Dimensions stay SEPARATE. No scalar score field is permitted here.",properties:{autonomy:{$ref:"#/$defs/WorkOrdinalBandV1",description:"Autonomy fitness, echoed unmerged."},correctness:{$ref:"#/$defs/WorkOrdinalBandV1",description:"Correctness fitness, echoed so the ranking can be audited without the input."},cost:{$ref:"#/$defs/WorkOrdinalBandV1",description:"Cost fitness, oriented so `Highest` is best-fitting."},evidence_quality:{$ref:"#/$defs/WorkOrdinalBandV1",description:"Evidence-quality fitness, echoed unmerged."},latency:{$ref:"#/$defs/WorkOrdinalBandV1",description:"Latency fitness, oriented so `Highest` is best-fitting."},rank:{description:"Position in the ranking, ascending from 1.",format:"uint32",minimum:0,type:"integer"},route_id:{description:"The ranked route's identity.",type:"string"},sensitive_data_fitness:{$ref:"#/$defs/WorkOrdinalBandV1",description:"Sensitive-data fitness, echoed unmerged."}},required:["rank","route_id","correctness","sensitive_data_fitness","latency","cost","autonomy","evidence_quality"],type:"object"},WorkRouteDecisionV1:$f,WorkRouteExclusionV1:{additionalProperties:!1,description:"One refused route and the single reason that refused it. Exclusion is\nrecorded rather than silent so a missing route is always explained.",properties:{reason:{$ref:"#/$defs/WorkProposalReasonV1",description:"The first limit the route failed, in the declared exclusion order."},route_id:{description:"The refused route's identity.",type:"string"}},required:["route_id","reason"],type:"object"},WorkRoutePlanV1:{additionalProperties:!1,description:"The explained route plan for one decision. Recommends; never dispatches.",properties:{coverage:{$ref:"#/$defs/WorkOrdinalBandV1",description:"Fraction-free ordinal coverage of the cohort evidence over the ranked set."},deterministic_baseline:{description:"The declared deterministic baseline, selected when evidence cannot support a\nstronger claim. Always names a route that survived exclusion, or None when none did.",type:["string","null"]},exclusions:{description:"Every refused route with its reason, in supplied order.",items:{$ref:"#/$defs/WorkRouteExclusionV1"},type:"array"},human_override_applied:{description:"True only when a recorded human override named a route that survived\nexclusion. An excluded or unknown override leaves ranking untouched.",type:"boolean"},ranked:{description:"Surviving routes in total, deterministic order, rank ascending from 1.",items:{$ref:"#/$defs/WorkRankedRouteV1"},type:"array"},uncertainty:{$ref:"#/$defs/WorkOrdinalBandV1",description:"Widens on sparse / stale / incomparable evidence."}},required:["ranked","exclusions","coverage","uncertainty","human_override_applied"],type:"object"},WorkScoreKindV1:$$,WorkShapeAssessmentV1:$S,WorkSizingV1:$k,WorkSubtaskSketchV1:{additionalProperties:!1,description:"One level only (Q3). Read-only sketch; accepting it stays a separate version-checked command.",properties:{ordinal:{description:"Position in the proposal, ascending from 0. Stable across replays of the\nsame input.",format:"uint32",minimum:0,type:"integer"},shape:{$ref:"#/$defs/WorkTaskShapeKindV1",description:"Kind the sketch would carry if it were accepted as its own task."},summary:{description:"What the sketch covers, phrased from the declared counts alone.",type:"string"}},required:["ordinal","summary","shape"],type:"object"},WorkTaskShapeKindV1:{description:"Kind of work the snapshot facts describe. Derived only from facts already in\nthe input; `Unclassified` when those facts do not distinguish a kind.",enum:["investigation","change","synthesis","unclassified"],type:"string"},WorkTaskShapeV1:{additionalProperties:!1,description:"The derived shape of the task: what kind of work it is and how large the\ndeclared dependency and evidence counts make it.",properties:{band:{$ref:"#/$defs/WorkOrdinalBandV1",description:"Magnitude band derived from the declared dependency and evidence counts."},kind:{$ref:"#/$defs/WorkTaskShapeKindV1",description:"Kind derived from the gate booleans and counts. No new discovery."}},required:["kind","band"],type:"object"}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"A canonical product proposal and the exact verified graph that licensed it.\n\n`proposal` can be moved directly into a `DecideWorkProposalRequestV1`;\ncallers use `verified_graph_version` to construct that mutation's CAS pin.",properties:{calibration:{$ref:"#/$defs/WorkCalibrationEvidenceV1"},decision:{$ref:"#/$defs/WorkProposalDecisionV1"},proposal:{$ref:"#/$defs/WorkProposalV1"},verified_graph_version:{$ref:"#/$defs/VerifiedWorkGraphVersionV1"}},required:["proposal","verified_graph_version","decision","calibration"],title:"GeneratedWorkProposal",type:"object"},{$defs:{WorkAttemptListCursorV1:v6},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"One authority-scoped artifact hydration request, paged like the attempt\nlist and pinned to the same verified topology generation.",properties:{cursor:{anyOf:[{$ref:"#/$defs/WorkAttemptListCursorV1"},{type:"null"}],default:null},page_size:{format:"uint32",minimum:0,type:"integer"}},required:["page_size"],title:"WorkArtifactHydrationRequestV1",type:"object"},{$defs:{AttemptId:m1,ManifestDigest:gl,ObservationSourceIdentityV1:gW,ProviderId:_i,RunId:_z,SessionId:_5,TaskId:vC,UtcMicros:vK,WorkArtifactId:vY,WorkArtifactRefV1:v1,WorkAttemptArtifactsV1:{additionalProperties:!1,description:"The artifacts and evidence one attempt declared.",properties:{artifacts:{description:"Every artifact reference the attempt declared, in its canonical\nstored order. References carry digest and byte length; bytes are\nnever part of this read.",items:{$ref:"#/$defs/WorkArtifactRefV1"},type:"array"},evidence:{$ref:"#/$defs/WorkAttemptEvidenceStateV1"},identity:{$ref:"#/$defs/WorkAttemptIdentityV1"}},required:["identity","artifacts","evidence"],type:"object"},WorkAttemptEvidenceRecordV1:v0,WorkAttemptEvidenceStateV1:{description:"Whether an attempt's terminal evidence has been sealed. An attempt that\nhas not reported an outcome yet is a typed state, not a missing record.",oneOf:[{additionalProperties:!1,description:"The attempt has not sealed terminal evidence yet.",properties:{state:{const:"pending",type:"string"}},required:["state"],type:"object"},{additionalProperties:!1,description:"The sealed terminal evidence record, exactly as it was written.",properties:{record:{$ref:"#/$defs/WorkAttemptEvidenceRecordV1"},state:{const:"sealed",type:"string"}},required:["state","record"],type:"object"}]},WorkAttemptIdentityV1:v2,WorkAttemptListCoverageV1:v4,WorkAttemptListCursorV1:v6,WorkAttemptProviderOutcomeV1:v5,WorkAttemptStreamChannelV1:be,WorkAttemptStreamSummaryV1:bt,WorkAttemptTopologyBindingV1:br,WorkProviderAvailabilityV1:$e,WorkProviderBackendV1:$t,WorkProviderFallbackRecordV1:$r,WorkProviderRouteId:$o,WorkProviderRouteV1:$n},$schema:"https://json-schema.org/draft/2020-12/schema",description:"One authority-scoped artifact hydration read. Absence of any Work in\nscope is a typed state, distinct from an authorized-but-empty page.",oneOf:[{additionalProperties:!1,description:"No Work exists in this authority scope, so there is no attempt set to\nhydrate. Concealed scopes never reach this state: they are refused as\nnot-found-or-not-authorized before any read.",properties:{state:{const:"absent",type:"string"}},required:["state"],type:"object"},{additionalProperties:!1,description:"One page of attempt artifact sets under the verified topology\nsnapshot.",properties:{attempts:{items:{$ref:"#/$defs/WorkAttemptArtifactsV1"},type:"array"},coverage:{$ref:"#/$defs/WorkAttemptListCoverageV1"},state:{const:"hydrated",type:"string"},topology:{$ref:"#/$defs/WorkAttemptTopologyBindingV1"}},required:["state","topology","attempts","coverage"],type:"object"}],title:"WorkArtifactHydrationV1"},{$defs:{AttemptId:m1,AutomaticWorktreeGcV1:m3,BranchCollisionPolicyV1:fd,BranchNameComponentV1:fc,BranchNameSeparatorV1:fl,BranchNamingPolicyV1:fp,BranchTopologyKindV1:f_,BranchTopologyPolicyV1:fv,CanonicalGitRefNameV1:fR,CanonicalGitRefPrefix:fP,CapabilityId:fV,CommitId:fH,ConfigurationRevisionId:f0,ConfigurationSnapshotId:f2,CredentialReferenceId:hq,CrossMergeModeV1:hI,CrossMergePolicyV1:hx,GitHubStackedPullRequestPolicyV1:yP,HistoryRewritePolicyV1:yU,LocatorDigest:gr,ManifestDigest:gl,ProjectId:g2,ProposalId:g5,ProtectedRefDispositionV1:g8,ProtectedRefRuleV1:g7,ProtectedRefSelectorV1:_e,ProviderId:_i,RefId:_u,RepositoryId:_v,RepositoryPlacementScopeV1:_b,RequiredCheckExpectationV1:_$,RequiredCheckV1:_S,ReviewRequirementV1:_T,ReviewTopologyKindV1:_O,ReviewTopologyPolicyV1:_E,RunId:_z,SensitiveFilesystemLocatorV1:_2,TaskId:vC,TopologyConcurrencyPolicyV1:vF,TopologyEscalationPolicyV1:vL,TopologyGatePolicyV1:vU,TopologyNotificationLevelV1:vH,UtcMicros:vK,WorkApprovalPolicy:vX,WorkArtifactId:vY,WorkArtifactRefV1:v1,WorkAttemptIdentityV1:v2,WorkAttemptListCoverageV1:v4,WorkAttemptListCursorV1:v6,WorkAttemptProgressV1:v3,WorkAttemptProjectionBindingV1:v9,WorkAttemptStateV1:v7,WorkAttemptTopologyBindingV1:br,WorkAttemptV1:bi,WorkCancellationAcknowledgementV1:bo,WorkCancellationEscalationV1:bn,WorkCancellationRequestId:ba,WorkCancellationRequestV1:bs,WorkCancellationStateV1:bd,WorkEffectStateV1:bm,WorkEgressPolicy:bh,WorkExecutableReference:bb,WorkExecutionEnvelopeV1:b$,WorkExecutionLimits:bS,WorkExecutionSnapshot:bk,WorkFallbackTopology:bP,WorkFenceEpochV1:bV,WorkFilesystemPolicy:bq,WorkLeaseFenceV1:bW,WorkLeaseId:bN,WorkProviderBackendV1:$t,WorkProviderProtocol:$i,WorkProviderRouteId:$o,WorkProviderRouteV1:$n,WorkRecoveryStateV1:$a,WorkRestartReasonV1:$c,WorkSandboxPolicy:$b,WorkTerminalEvidenceV1:$R,WorkTopologyPolicyV1:$V,WorkflowOperationRef:$j,WorktreeCleanlinessRequirementV1:$A,WorktreeId:$M,WorktreePlacementModeV1:$z,WorktreeRetentionPolicyV1:$D,WorktreeRootPolicyV1:$F},$schema:"https://json-schema.org/draft/2020-12/schema",description:"One authority-scoped attempt-list read. Absence of any Work in scope is a\ntyped state, distinct from an authorized-but-empty page.",oneOf:[{additionalProperties:!1,description:"No Work exists in this authority scope, so there is no attempt set to\npage. Concealed scopes never reach this state: they are refused as\nnot-found-or-not-authorized before any read.",properties:{state:{const:"absent",type:"string"}},required:["state"],type:"object"},{additionalProperties:!1,description:"One page of durable attempts under the verified topology snapshot.",properties:{attempts:{items:{$ref:"#/$defs/WorkAttemptV1"},type:"array"},coverage:{$ref:"#/$defs/WorkAttemptListCoverageV1"},state:{const:"listed",type:"string"},topology:{$ref:"#/$defs/WorkAttemptTopologyBindingV1"}},required:["state","topology","attempts","coverage"],type:"object"}],title:"WorkAttemptListV1"},{$defs:{AcceptWorkTaskRequestV1:{additionalProperties:!1,properties:{evidence_by_criterion:{additionalProperties:{type:"string"},type:"object"},mutation:{$ref:"#/$defs/WorkProductMutationIdentityV1"},selection:{$ref:"#/$defs/WorkProductSelectionScopeV1"},task_id:{$ref:"#/$defs/TaskId"}},required:["selection","task_id","evidence_by_criterion","mutation"],type:"object"},ActorId:mW,AddWorkTaskRequestV1:{additionalProperties:!1,properties:{item:{$ref:"#/$defs/WorkItemV1"},mutation:{$ref:"#/$defs/WorkProductMutationIdentityV1"},selection:{$ref:"#/$defs/WorkProductSelectionScopeV1"}},required:["selection","item","mutation"],type:"object"},AdmitWorkExecutionRequestV1:{additionalProperties:!1,properties:{based_on_version:{format:"uint64",minimum:0,type:"integer"},mutation:{$ref:"#/$defs/WorkProductMutationIdentityV1"},selection:{$ref:"#/$defs/WorkProductSelectionScopeV1"},task_id:{$ref:"#/$defs/TaskId"}},required:["selection","task_id","based_on_version","mutation"],type:"object"},ApplyWorkRelationReplanRequestV1:{additionalProperties:!1,properties:{mutation:{$ref:"#/$defs/WorkProductMutationIdentityV1"},proposal_id:{$ref:"#/$defs/ProposalId"},selection:{$ref:"#/$defs/WorkProductSelectionScopeV1"}},required:["selection","proposal_id","mutation"],type:"object"},AttemptId:m1,CatalogGenerationId:fq,ConfigurationRevisionId:f0,CreateWorkProductRequestV1:{additionalProperties:!1,properties:{initial_graph:{$ref:"#/$defs/WorkProductGraphV1"},mutation:{$ref:"#/$defs/WorkProductMutationIdentityV1"},selection:{$ref:"#/$defs/WorkProductSelectionScopeV1"}},required:["selection","initial_graph","mutation"],type:"object"},CreateWorkTaskRequestV1:{additionalProperties:!1,properties:{initiative:{$ref:"#/$defs/WorkInitiativeV1"},item:{$ref:"#/$defs/WorkItemV1"},milestone:{$ref:"#/$defs/WorkMilestoneV1"},mutation:{$ref:"#/$defs/WorkProductMutationIdentityV1"},plan:{$ref:"#/$defs/WorkPlanV1"},selection:{$ref:"#/$defs/WorkProductSelectionScopeV1"}},required:["selection","initiative","plan","milestone","item","mutation"],type:"object"},DecideWorkProposalRequestV1:{additionalProperties:!1,properties:{disposition:{$ref:"#/$defs/WorkProposalDispositionV1"},mutation:{$ref:"#/$defs/WorkProductMutationIdentityV1"},proposal:{$ref:"#/$defs/WorkProposalV1"},selection:{$ref:"#/$defs/WorkProductSelectionScopeV1"}},required:["selection","proposal","disposition","mutation"],type:"object"},DecideWorkRelationReplanRequestV1:{additionalProperties:!1,properties:{disposition:{$ref:"#/$defs/WorkProposalDispositionV1"},mutation:{$ref:"#/$defs/WorkProductMutationIdentityV1"},proposal:{$ref:"#/$defs/WorkRelationReplanProposalV1"},selection:{$ref:"#/$defs/WorkProductSelectionScopeV1"}},required:["selection","proposal","disposition","mutation"],type:"object"},LinkAcceptedWorkAttemptRequestV1:{additionalProperties:!1,properties:{based_on_version:{format:"uint64",minimum:0,type:"integer"},identity:{$ref:"#/$defs/WorkAttemptIdentityV1"},mutation:{$ref:"#/$defs/WorkProductMutationIdentityV1"},selection:{$ref:"#/$defs/WorkProductSelectionScopeV1"},task_id:{$ref:"#/$defs/TaskId"}},required:["selection","task_id","based_on_version","identity","mutation"],type:"object"},ManifestDigest:gl,ProjectId:g2,ProposalId:g5,ProviderId:_i,RecordWorkHandoffRequestV1:{additionalProperties:!1,properties:{handoff:{$ref:"#/$defs/WorkHandoffV1"},mutation:{$ref:"#/$defs/WorkProductMutationIdentityV1"},selection:{$ref:"#/$defs/WorkProductSelectionScopeV1"}},required:["selection","handoff","mutation"],type:"object"},RepositoryId:_v,RetrievalAnchorId:_q,RunId:_z,SourceStoreId:v$,TaskEvidenceLinkV1:vx,TaskId:vC,UtcMicros:vK,VerifiedWorkGraphVersionV1:vZ,WorkAcceptanceCriterionV1:vQ,WorkAttemptIdentityV1:v2,WorkCommandId:bc,WorkHandoffV1:bT,WorkHierarchyV1:bO,WorkInitiativeV1:bE,WorkItemInputV1:bA,WorkItemV1:bM,WorkMilestoneV1:bz,WorkPlanV1:bK,WorkProductAuthorizedRelationScopeV1:bJ,WorkProductEventEvidenceV1:bZ,WorkProductExpectedAuthorityV1:bY,WorkProductGraphV1:b1,WorkProductMutationIdentityV1:b0,WorkProductRevisionPinsV1:b6,WorkProductSelectionScopeV1:b3,WorkProposalDecisionV1:b9,WorkProposalDispositionV1:b5,WorkProposalV1:b8,WorkProposedChildV1:b7,WorkProviderRouteId:$o,WorkProviderRouteV1:$n,WorkRelationReplanDecisionV1:$s,WorkRelationReplanProposalV1:$d,WorkRouteDecisionV1:$f,WorkScoreKindV1:$$,WorkShapeAssessmentV1:$S,WorkSizingV1:$k},$schema:"https://json-schema.org/draft/2020-12/schema",description:"Closed public mutation surface for the Work-product graph authority.",oneOf:[{properties:{mutation:{const:"create",type:"string"},request:{$ref:"#/$defs/CreateWorkProductRequestV1"}},required:["mutation","request"],type:"object"},{properties:{mutation:{const:"add_task",type:"string"},request:{$ref:"#/$defs/AddWorkTaskRequestV1"}},required:["mutation","request"],type:"object"},{properties:{mutation:{const:"create_task",type:"string"},request:{$ref:"#/$defs/CreateWorkTaskRequestV1"}},required:["mutation","request"],type:"object"},{properties:{mutation:{const:"decide_proposal",type:"string"},request:{$ref:"#/$defs/DecideWorkProposalRequestV1"}},required:["mutation","request"],type:"object"},{properties:{mutation:{const:"decide_relation_replan",type:"string"},request:{$ref:"#/$defs/DecideWorkRelationReplanRequestV1"}},required:["mutation","request"],type:"object"},{properties:{mutation:{const:"apply_relation_replan",type:"string"},request:{$ref:"#/$defs/ApplyWorkRelationReplanRequestV1"}},required:["mutation","request"],type:"object"},{properties:{mutation:{const:"accept_task",type:"string"},request:{$ref:"#/$defs/AcceptWorkTaskRequestV1"}},required:["mutation","request"],type:"object"},{properties:{mutation:{const:"admit_execution",type:"string"},request:{$ref:"#/$defs/AdmitWorkExecutionRequestV1"}},required:["mutation","request"],type:"object"},{properties:{mutation:{const:"link_accepted_attempt",type:"string"},request:{$ref:"#/$defs/LinkAcceptedWorkAttemptRequestV1"}},required:["mutation","request"],type:"object"},{properties:{mutation:{const:"record_handoff",type:"string"},request:{$ref:"#/$defs/RecordWorkHandoffRequestV1"}},required:["mutation","request"],type:"object"}],title:"WorkProductMutationRequestV1",type:"object"},{$defs:{RunId:_z,TaskId:vC,UtcMicros:vK,WorkRunControlReasonV1:$g},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{expected_authority_version:{default:null,description:'The authority version the caller read. Absent means "no control row was\npublished yet"; a mismatch is a conflict, never an overwrite.',format:"uint64",minimum:0,type:["integer","null"]},occurred_at:{$ref:"#/$defs/UtcMicros"},reason:{$ref:"#/$defs/WorkRunControlReasonV1"},run_id:{$ref:"#/$defs/RunId"},task_id:{$ref:"#/$defs/TaskId"}},required:["task_id","run_id","reason","occurred_at"],title:"PauseWorkRunCommand",type:"object"},{$defs:{AttemptId:m1,RunId:_z,TaskId:vC,UtcMicros:vK,WorkRunControlAuthorityV1:$y,WorkRunControlReasonV1:$g,WorkRunControlStateV1:$_,WorkRunDeadlineCheckpointV1:$v},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"One run's durable control aggregate.",properties:{authority:{$ref:"#/$defs/WorkRunControlAuthorityV1"},deadline:{$ref:"#/$defs/WorkRunDeadlineCheckpointV1"},fenced_attempts:{description:'The exact attempts that were live when the current state published.\nEmpty means "none were live", never "we did not look".',items:{$ref:"#/$defs/AttemptId"},type:"array"},reason:{anyOf:[{$ref:"#/$defs/WorkRunControlReasonV1"},{type:"null"}]},run_id:{$ref:"#/$defs/RunId"},state:{$ref:"#/$defs/WorkRunControlStateV1"},task_id:{$ref:"#/$defs/TaskId"},transitioned_at:{$ref:"#/$defs/UtcMicros"}},required:["task_id","run_id","state","authority","deadline","transitioned_at","fenced_attempts"],title:"WorkRunControlV1",type:"object"},{$defs:{RunId:_z,TaskId:vC,UtcMicros:vK,WorkPlacementKindV1:bU,WorkPlacementTargetV1:bG},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{occurred_at:{$ref:"#/$defs/UtcMicros"},run_id:{$ref:"#/$defs/RunId"},target:{$ref:"#/$defs/WorkPlacementTargetV1"},task_id:{$ref:"#/$defs/TaskId"}},required:["task_id","run_id","target","occurred_at"],title:"WorkPlacementPreflightRequestV1",type:"object"},{$defs:{RunId:_z,TaskId:vC,UtcMicros:vK,WorkPlacementBlockerV1:bF,WorkPlacementIdentityV1:bL,WorkPlacementKindV1:bU,WorkPlacementObservationV1:{additionalProperties:!1,description:'What was actually observed at the target, in counts rather than prose.\n\nCounts are measurements: a zero is "we looked and found none", and\n`readable: false` is the separate state for "we could not look". Collapsing\nthem would let an unreadable target read as a clean one.',properties:{active_holder:{description:"Whether another admitted placement already holds this target.",type:"boolean"},dirty_tracked_paths:{description:"Tracked paths that differ from the index or HEAD.",format:"uint32",minimum:0,type:"integer"},network_required:{description:"Whether the declared network-free placement would require network.",type:"boolean"},observed_at:{$ref:"#/$defs/UtcMicros"},readable:{description:"Whether the target could be read at all.",type:"boolean"},unique_commits:{description:'Commits in the target reachable from nowhere else.\n\n`None` means reachability was not measured, and it blocks removal\nexactly as a positive count does: an unmeasured target is "unknown"\nand is retained rather than assumed worthless. Only removal consults\nthis; admission does not.',format:"uint32",minimum:0,type:["integer","null"]},untracked_paths:{description:"Untracked paths present in the target.",format:"uint32",minimum:0,type:"integer"}},required:["dirty_tracked_paths","untracked_paths","readable","active_holder","network_required","observed_at"],title:"WorkPlacementObservationV1",type:"object"},WorkPlacementTargetV1:bG},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"One placement preflight reading: what was asked for, what was seen, and\nexactly what blocks it.",properties:{blockers:{items:{$ref:"#/$defs/WorkPlacementBlockerV1"},type:"array",uniqueItems:!0},identity:{$ref:"#/$defs/WorkPlacementIdentityV1"},observation:{$ref:"#/$defs/WorkPlacementObservationV1"},target:{$ref:"#/$defs/WorkPlacementTargetV1"}},required:["identity","target","observation","blockers"],title:"WorkPlacementPreflightV1",type:"object"},{$defs:{RunId:_z,TaskId:vC},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{run_id:{$ref:"#/$defs/RunId"},task_id:{$ref:"#/$defs/TaskId"}},required:["task_id","run_id"],title:"WorkPlacementStatusRequestV1",type:"object"},{$defs:{RunId:_z,TaskId:vC,UtcMicros:vK,WorkPlacementBlockerV1:bF,WorkPlacementIdentityV1:bL,WorkPlacementKindV1:bU,WorkPlacementStateV1:bH,WorkPlacementTargetV1:bG,WorkPlacementV1:bB},$schema:"https://json-schema.org/draft/2020-12/schema",description:"One placement reading. Absence is a state, not an empty placement.",oneOf:[{additionalProperties:!1,description:"No placement was ever admitted for this run.",properties:{state:{const:"absent",type:"string"}},required:["state"],type:"object"},{additionalProperties:!1,description:"The durable placement relation.",properties:{placement:{$ref:"#/$defs/WorkPlacementV1"},state:{const:"placed",type:"string"}},required:["state","placement"],type:"object"}],title:"WorkPlacementReadingV1"},{$defs:{AttemptId:m1,CoverageStateV1:hV,DuplicateEffectOutcomeV1:hE,DuplicateEffortKindV1:hA,QuantityEvidenceClassV1:_a,RunId:_z,TaskId:vC,WorkAttemptIdentityV1:v2,WorkDuplicateAdjudicationQuantitiesV1:bu},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Operator judgment before the owning Work authority binds exact current\ngenerations, relation revision, command identity, and observation time.",properties:{first_attempt:{$ref:"#/$defs/WorkAttemptIdentityV1"},quantities:{$ref:"#/$defs/WorkDuplicateAdjudicationQuantitiesV1"},reason:{type:"string"},second_attempt:{$ref:"#/$defs/WorkAttemptIdentityV1"},verdict:{$ref:"#/$defs/DuplicateEffortKindV1"}},required:["first_attempt","second_attempt","verdict","quantities","reason"],title:"PrepareWorkDuplicateAdjudicationRequestV1",type:"object"},{$defs:{ActorId:mW,AttemptId:m1,ManifestDigest:gl,ProjectId:g2,ProposalId:g5,ProviderId:_i,RepositoryId:_v,RetrievalAnchorId:_q,RunId:_z,SourceStoreId:v$,TaskId:vC,UtcMicros:vK,WorkAcceptanceCriterionV1:vQ,WorkAttemptIdentityV1:v2,WorkHandoffV1:bT,WorkHierarchyV1:bO,WorkInitiativeV1:bE,WorkItemInputV1:bA,WorkItemV1:bM,WorkMilestoneV1:bz,WorkPlanV1:bK,WorkProductAuthorizedRelationScopeV1:bJ,WorkProductChangeDraftV1:{description:"Operator-selected graph change before the owning Work authority binds the\ncurrent verified head and revision authorities.",oneOf:[{properties:{change:{const:"add_task",type:"string"},item:{$ref:"#/$defs/WorkItemV1"}},required:["change","item"],type:"object"},{properties:{change:{const:"create_task",type:"string"},initiative:{$ref:"#/$defs/WorkInitiativeV1"},item:{$ref:"#/$defs/WorkItemV1"},milestone:{$ref:"#/$defs/WorkMilestoneV1"},plan:{$ref:"#/$defs/WorkPlanV1"}},required:["change","initiative","plan","milestone","item"],type:"object"},{properties:{change:{const:"decide_proposal",type:"string"},disposition:{$ref:"#/$defs/WorkProposalDispositionV1"},proposal:{$ref:"#/$defs/WorkProposalV1"}},required:["change","proposal","disposition"],type:"object"},{properties:{change:{const:"decide_relation_replan",type:"string"},disposition:{$ref:"#/$defs/WorkProposalDispositionV1"},proposal:{$ref:"#/$defs/WorkRelationReplanProposalV1"}},required:["change","proposal","disposition"],type:"object"},{properties:{change:{const:"apply_relation_replan",type:"string"},proposal_id:{$ref:"#/$defs/ProposalId"}},required:["change","proposal_id"],type:"object"},{properties:{change:{const:"accept_task",type:"string"},evidence_by_criterion:{additionalProperties:{type:"string"},type:"object"},task_id:{$ref:"#/$defs/TaskId"}},required:["change","task_id","evidence_by_criterion"],type:"object"},{properties:{change:{const:"admit_execution",type:"string"},task_id:{$ref:"#/$defs/TaskId"}},required:["change","task_id"],type:"object"},{properties:{change:{const:"link_accepted_attempt",type:"string"},identity:{$ref:"#/$defs/WorkAttemptIdentityV1"},task_id:{$ref:"#/$defs/TaskId"}},required:["change","task_id","identity"],type:"object"},{properties:{change:{const:"record_handoff",type:"string"},handoff:{$ref:"#/$defs/WorkHandoffV1"}},required:["change","handoff"],type:"object"}]},WorkProductEventEvidenceV1:bZ,WorkProductSelectionScopeV1:b3,WorkProposalDispositionV1:b5,WorkProposalV1:b8,WorkProposedChildV1:b7,WorkProviderRouteId:$o,WorkProviderRouteV1:$n,WorkRelationReplanProposalV1:$d,WorkRouteDecisionV1:$f,WorkScoreKindV1:$$,WorkShapeAssessmentV1:$S,WorkSizingV1:$k},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Read-only preparation input. Authority identities, clocks, and revision\npins are deliberately absent because the backend owns them.",properties:{causation_event_id:{type:["string","null"]},change:{$ref:"#/$defs/WorkProductChangeDraftV1"},evidence:{items:{$ref:"#/$defs/WorkProductEventEvidenceV1"},type:"array"},selection:{$ref:"#/$defs/WorkProductSelectionScopeV1"}},required:["selection","change","evidence"],title:"PrepareWorkProductMutationRequestV1",type:"object"},{$defs:{RunId:_z,TaskId:vC,UtcMicros:vK},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{expected_authority_version:{format:"uint64",minimum:0,type:"integer"},occurred_at:{$ref:"#/$defs/UtcMicros"},run_id:{$ref:"#/$defs/RunId"},task_id:{$ref:"#/$defs/TaskId"}},required:["task_id","run_id","expected_authority_version","occurred_at"],title:"ReleaseWorkPlacementCommand",type:"object"},{$defs:{UtcMicros:vK},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{occurred_at:{$ref:"#/$defs/UtcMicros"}},required:["occurred_at"],title:"ResumeWorkAttemptsCommand",type:"object"},{$defs:{AttemptId:m1,AutomaticWorktreeGcV1:m3,BranchCollisionPolicyV1:fd,BranchNameComponentV1:fc,BranchNameSeparatorV1:fl,BranchNamingPolicyV1:fp,BranchTopologyKindV1:f_,BranchTopologyPolicyV1:fv,CanonicalGitRefNameV1:fR,CanonicalGitRefPrefix:fP,CapabilityId:fV,CommitId:fH,ConfigurationRevisionId:f0,ConfigurationSnapshotId:f2,CredentialReferenceId:hq,CrossMergeModeV1:hI,CrossMergePolicyV1:hx,GitHubStackedPullRequestPolicyV1:yP,HistoryRewritePolicyV1:yU,LocatorDigest:gr,ManifestDigest:gl,ProjectId:g2,ProposalId:g5,ProtectedRefDispositionV1:g8,ProtectedRefRuleV1:g7,ProtectedRefSelectorV1:_e,ProviderId:_i,RefId:_u,RepositoryId:_v,RepositoryPlacementScopeV1:_b,RequiredCheckExpectationV1:_$,RequiredCheckV1:_S,ReviewRequirementV1:_T,ReviewTopologyKindV1:_O,ReviewTopologyPolicyV1:_E,RunId:_z,SensitiveFilesystemLocatorV1:_2,TaskId:vC,TopologyConcurrencyPolicyV1:vF,TopologyEscalationPolicyV1:vL,TopologyGatePolicyV1:vU,TopologyNotificationLevelV1:vH,UtcMicros:vK,WorkApprovalPolicy:vX,WorkArtifactId:vY,WorkArtifactRefV1:v1,WorkAttemptIdentityV1:v2,WorkAttemptProgressV1:v3,WorkAttemptProjectionBindingV1:v9,WorkAttemptStateV1:v7,WorkAttemptV1:bi,WorkCancellationAcknowledgementV1:bo,WorkCancellationEscalationV1:bn,WorkCancellationRequestId:ba,WorkCancellationRequestV1:bs,WorkCancellationStateV1:bd,WorkEffectStateV1:bm,WorkEgressPolicy:bh,WorkExecutableReference:bb,WorkExecutionEnvelopeV1:b$,WorkExecutionLimits:bS,WorkExecutionSnapshot:bk,WorkFallbackTopology:bP,WorkFenceEpochV1:bV,WorkFilesystemPolicy:bq,WorkLeaseFenceV1:bW,WorkLeaseId:bN,WorkProviderBackendV1:$t,WorkProviderProtocol:$i,WorkProviderRouteId:$o,WorkProviderRouteV1:$n,WorkRecoveryStateV1:$a,WorkRestartReasonV1:$c,WorkSandboxPolicy:$b,WorkTerminalEvidenceV1:$R,WorkTopologyPolicyV1:$V,WorkflowOperationRef:$j,WorktreeCleanlinessRequirementV1:$A,WorktreeId:$M,WorktreePlacementModeV1:$z,WorktreeRetentionPolicyV1:$D,WorktreeRootPolicyV1:$F},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"What restart recovery did to each open attempt.\n\nThis report never claims that a provider resumed. An attempt in\n`recovery_required` remains fenced under its original identity. This report\ndoes not authorize another launch; an explicit `retry_attempt` must verify\nthe exact recovery fence and effect safety before it can atomically admit a\nnew identity.",properties:{cancelled:{description:"Attempts whose in-flight cancellation was completed during recovery.",items:{$ref:"#/$defs/WorkAttemptV1"},type:"array"},recovery_required:{description:"Attempts fenced onto a new epoch and awaiting an explicit recovery\ndecision.",items:{$ref:"#/$defs/WorkAttemptV1"},type:"array"}},required:["recovery_required","cancelled"],title:"WorkAttemptRecoveryReportV1",type:"object"},{$defs:{RunId:_z,TaskId:vC,UtcMicros:vK,WorkRunControlReasonV1:$g},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{expected_authority_version:{format:"uint64",minimum:0,type:"integer"},occurred_at:{$ref:"#/$defs/UtcMicros"},reason:{$ref:"#/$defs/WorkRunControlReasonV1"},run_id:{$ref:"#/$defs/RunId"},task_id:{$ref:"#/$defs/TaskId"}},required:["task_id","run_id","reason","expected_authority_version","occurred_at"],title:"ResumeWorkRunCommand",type:"object"},{$defs:{AttemptId:m1,ManifestDigest:gl,ObservationSourceIdentityV1:gW,ProjectId:g2,ProviderId:_i,RepositoryId:_v,RunId:_z,SessionId:_5,TaskId:vC,TemporalModeV1:vA,UtcMicros:vK,VerifiedWorkGraphVersionV1:vZ,WorkAttemptIdentityV1:v2,WorkEvidenceContinuationV1:by,WorkEvidenceExpansionSelectorV1:{oneOf:[{additionalProperties:!1,properties:{kind:{const:"anchor",type:"string"},link_id:{type:"string"}},required:["kind","link_id"],type:"object"},{additionalProperties:!1,properties:{attempt:{$ref:"#/$defs/WorkAttemptIdentityV1"},kind:{const:"task_session",type:"string"}},required:["kind","attempt"],type:"object"}]},WorkProductAuthorizedRelationScopeV1:bJ,WorkProductSelectionScopeV1:b3,WorkTaskSessionContinuationV1:$w},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"One TaskId-rooted read. The exact Work graph identity remains mandatory on\ncontinuation and expansion requests, so neither an anchor nor a cursor is\nauthority by possession.",properties:{continuation:{anyOf:[{$ref:"#/$defs/WorkEvidenceContinuationV1"},{type:"null"}],default:null},expansion:{anyOf:[{$ref:"#/$defs/WorkEvidenceExpansionSelectorV1"},{type:"null"}],default:null},observed_at:{$ref:"#/$defs/UtcMicros"},page_size:{format:"uint32",minimum:0,type:"integer"},selection:{$ref:"#/$defs/WorkProductSelectionScopeV1"},task_id:{$ref:"#/$defs/TaskId"},temporal:{$ref:"#/$defs/TemporalModeV1"},verified_version:{$ref:"#/$defs/VerifiedWorkGraphVersionV1"}},required:["selection","task_id","verified_version","temporal","page_size","observed_at"],title:"WorkEvidenceRetrieveRequestV1",type:"object"},{$defs:{ActorId:mW,AttemptId:m1,ManifestDigest:gl,ObservationSourceIdentityV1:gW,ProposalId:g5,ProviderId:_i,RetrievalAnchorId:_q,RunId:_z,SessionId:_5,SessionRetrievalBudgetAccountingV1:{additionalProperties:!1,description:"The ceiling and count behind a budget refusal.\n\n`stage` names which budget refused; this is what tells an oversized request\napart from a read whose cost was mis-sized for it. The ceiling value also\ndistinguishes the resources inside one stage: a record read that stopped at\n1024 hit the item count, one that stopped at 16 MiB hit the byte total, so\nthe kernel's resource spelling stays in the kernel instead of becoming a\nsecond wire vocabulary to keep in step.",properties:{limit:{format:"uint64",minimum:0,type:"integer"},observed:{$ref:"#/$defs/SessionRetrievalBudgetObservationV1"}},required:["limit","observed"],type:"object"},SessionRetrievalBudgetObservationV1:{description:"What a refusing budget boundary had counted.\n\nBoth variants are exact. A bounded read never counts the rows it declined to\nread, so an exhausted read reports what it consumed and that storage held\nmore, never a total it would have to run the refused scan to learn.",oneOf:[{additionalProperties:!1,description:"The request asked for more units than the admitted maximum.",properties:{observation:{const:"requested",type:"string"},units:{format:"uint64",minimum:0,type:"integer"}},required:["observation","units"],type:"object"},{additionalProperties:!1,description:"The read consumed its whole budget and storage still held more.",properties:{observation:{const:"consumed_with_more_available",type:"string"},units:{format:"uint64",minimum:0,type:"integer"}},required:["observation","units"],type:"object"}]},SessionRetrievalBudgetStageV1:vi,SessionRetrievalStructuralRefusalV1:{oneOf:[{additionalProperties:!1,properties:{kind:{type:"string"},maximum:{format:"uint",minimum:0,type:"integer"},observed:{format:"uint",minimum:0,type:"integer"},refusal:{const:"cursor_manifest_limit_exceeded",type:"string"}},required:["refusal","kind","observed","maximum"],type:"object"},{additionalProperties:!1,properties:{accounting:{anyOf:[{$ref:"#/$defs/SessionRetrievalBudgetAccountingV1"},{type:"null"}],description:"Present when the refusing boundary keeps a counter. A request-shape\ncheck has none and reports `None` rather than inventing numbers."},refusal:{const:"budget_exhausted",type:"string"},stage:{$ref:"#/$defs/SessionRetrievalBudgetStageV1"}},required:["refusal","stage"],type:"object"}]},TaskEvidenceLinkV1:vx,TaskId:vC,UtcMicros:vK,VerifiedWorkGraphVersionV1:vZ,WorkAcceptanceCriterionV1:vQ,WorkAnchorHydrationV1:{additionalProperties:!1,properties:{anchor_id:{$ref:"#/$defs/RetrievalAnchorId"},content:{items:{type:"string"},type:"array"},continuation:{type:["string","null"]},coverage:{$ref:"#/$defs/WorkEvidenceCoverageStateV1"},exact_anchors:{items:{$ref:"#/$defs/RetrievalAnchorId"},type:"array"},freshness:{$ref:"#/$defs/WorkEvidenceFreshnessV1"},redacted:{type:"boolean"}},required:["anchor_id","exact_anchors","content","coverage","freshness","redacted"],type:"object"},WorkArtifactId:vY,WorkArtifactRefV1:v1,WorkAttemptEvidenceRecordV1:v0,WorkAttemptIdentityV1:v2,WorkAttemptProviderOutcomeV1:v5,WorkAttemptReceiptV1:v8,WorkAttemptStreamChannelV1:be,WorkAttemptStreamSummaryV1:bt,WorkEvidenceContinuationV1:by,WorkEvidenceCoverageStateV1:{enum:["complete","partial","unknown"],type:"string"},WorkEvidenceCoverageV1:{additionalProperties:!1,properties:{hydrated:{format:"uint32",minimum:0,type:"integer"},omitted:{format:"uint32",minimum:0,type:"integer"},selected:{format:"uint32",minimum:0,type:"integer"},state:{$ref:"#/$defs/WorkEvidenceCoverageStateV1"}},required:["state","selected","hydrated","omitted"],type:"object"},WorkEvidenceFreshnessV1:{enum:["current","stale","unknown"],type:"string"},WorkEvidenceOmissionReasonV1:{oneOf:[{enum:["limit_reached","pending","not_found_or_not_authorized","unavailable","reset_required","stale","cancelled","timed_out","redacted"],type:"string"},{additionalProperties:!1,properties:{structural_refusal:{$ref:"#/$defs/SessionRetrievalStructuralRefusalV1"}},required:["structural_refusal"],type:"object"}]},WorkEvidenceOmissionV1:{additionalProperties:!1,properties:{reason:{$ref:"#/$defs/WorkEvidenceOmissionReasonV1"},relation:{type:"string"}},required:["relation","reason"],type:"object"},WorkEvidenceSourceV1:{oneOf:[{additionalProperties:!1,properties:{kind:{const:"attempt_receipt",type:"string"},receipt:{$ref:"#/$defs/WorkAttemptReceiptV1"}},required:["kind","receipt"],type:"object"},{additionalProperties:!1,properties:{attempt:{$ref:"#/$defs/WorkAttemptIdentityV1"},evidence:{$ref:"#/$defs/WorkTaskSessionEvidenceV1"},kind:{const:"task_session",type:"string"}},required:["kind","attempt","evidence"],type:"object"},{additionalProperties:!1,properties:{hydration:{$ref:"#/$defs/WorkAnchorHydrationV1"},kind:{const:"anchor",type:"string"},link:{$ref:"#/$defs/TaskEvidenceLinkV1"}},required:["kind","link","hydration"],type:"object"}]},WorkHandoffV1:bT,WorkHierarchyV1:bO,WorkItemInputV1:bA,WorkItemV1:bM,WorkProductRelationV1:b4,WorkProposalDecisionV1:b9,WorkProposalDispositionV1:b5,WorkProposalV1:b8,WorkProposedChildV1:b7,WorkProviderAvailabilityV1:$e,WorkProviderBackendV1:$t,WorkProviderFallbackRecordV1:$r,WorkProviderRouteId:$o,WorkProviderRouteV1:$n,WorkRelationReplanDecisionV1:$s,WorkRelationReplanProposalV1:$d,WorkRouteDecisionV1:$f,WorkScoreKindV1:$$,WorkShapeAssessmentV1:$S,WorkSizingV1:$k,WorkTaskSessionContinuationV1:$w,WorkTaskSessionCoverageV1:{additionalProperties:!1,properties:{hidden:{format:"uint64",minimum:0,type:"integer"},redacted:{format:"uint64",minimum:0,type:"integer"},unknown:{format:"uint64",minimum:0,type:"integer"},visible:{format:"uint64",minimum:0,type:"integer"}},required:["visible","hidden","unknown","redacted"],type:"object"},WorkTaskSessionEvidenceV1:{additionalProperties:!1,properties:{attempt:{$ref:"#/$defs/WorkAttemptIdentityV1"},continuation:{anyOf:[{$ref:"#/$defs/WorkTaskSessionContinuationV1"},{type:"null"}]},coverage:{$ref:"#/$defs/WorkEvidenceCoverageStateV1"},coverage_counts:{$ref:"#/$defs/WorkTaskSessionCoverageV1"},freshness:{$ref:"#/$defs/WorkEvidenceFreshnessV1"},hydrated:{items:{$ref:"#/$defs/WorkTaskSessionHydrationV1"},type:"array"},participant_epoch:{$ref:"#/$defs/ManifestDigest"},ranked_anchors:{items:{$ref:"#/$defs/WorkTaskSessionRankedAnchorV1"},type:"array"},redacted:{type:"boolean"},source:{$ref:"#/$defs/ObservationSourceIdentityV1"},task_id:{$ref:"#/$defs/TaskId"},verified_version:{$ref:"#/$defs/VerifiedWorkGraphVersionV1"}},required:["task_id","verified_version","attempt","source","participant_epoch","ranked_anchors","hydrated","coverage","coverage_counts","freshness","redacted"],type:"object"},WorkTaskSessionHydrationStateV1:{enum:["available","retained_but_unavailable","redacted","deleted","retention_expired","unauthorized","locked","unverifiable"],type:"string"},WorkTaskSessionHydrationV1:{additionalProperties:!1,properties:{anchor_id:{$ref:"#/$defs/RetrievalAnchorId"},content:{items:{format:"uint8",maximum:255,minimum:0,type:"integer"},type:["array","null"]},rank:{format:"uint32",minimum:0,type:"integer"},state:{$ref:"#/$defs/WorkTaskSessionHydrationStateV1"}},required:["rank","anchor_id","state"],type:"object"},WorkTaskSessionRankContributionV1:{additionalProperties:!1,properties:{calibrated_feature_micros:{format:"uint32",minimum:0,type:"integer"},calibration_profile:{type:"string"},ordinal_rank:{format:"uint32",minimum:0,type:"integer"},raw_score_micros:{format:"int64",type:"integer"},retriever:{type:"string"},retriever_revision:{type:"string"},score_domain:{type:"string"},source_occurrence:{type:"string"},weight_micros:{format:"uint32",minimum:0,type:"integer"},weighted_contribution_micros:{format:"uint64",minimum:0,type:"integer"}},required:["retriever","retriever_revision","source_occurrence","ordinal_rank","raw_score_micros","score_domain","calibration_profile","calibrated_feature_micros","weight_micros","weighted_contribution_micros"],type:"object"},WorkTaskSessionRankedAnchorV1:{additionalProperties:!1,properties:{anchor_id:{$ref:"#/$defs/RetrievalAnchorId"},contributions:{items:{$ref:"#/$defs/WorkTaskSessionRankContributionV1"},type:"array"},final_ordinal:{format:"uint32",minimum:0,type:"integer"},utility_micros:{format:"uint64",minimum:0,type:"integer"}},required:["anchor_id","final_ordinal","utility_micros","contributions"],type:"object"}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{continuations:{items:{$ref:"#/$defs/WorkEvidenceContinuationV1"},type:"array"},coverage:{$ref:"#/$defs/WorkEvidenceCoverageV1"},freshness:{$ref:"#/$defs/WorkEvidenceFreshnessV1"},item:{$ref:"#/$defs/WorkItemV1"},omissions:{items:{$ref:"#/$defs/WorkEvidenceOmissionV1"},type:"array"},proposal_decisions:{items:{$ref:"#/$defs/WorkProposalDecisionV1"},type:"array"},redacted:{type:"boolean"},relation_replan_decisions:{items:{$ref:"#/$defs/WorkRelationReplanDecisionV1"},type:"array"},relations:{items:{$ref:"#/$defs/WorkProductRelationV1"},type:"array"},sources:{items:{$ref:"#/$defs/WorkEvidenceSourceV1"},type:"array"},task_id:{$ref:"#/$defs/TaskId"},verified_version:{$ref:"#/$defs/VerifiedWorkGraphVersionV1"}},required:["task_id","verified_version","item","relations","proposal_decisions","relation_replan_decisions","sources","coverage","omissions","freshness","redacted","continuations"],title:"WorkEvidenceRetrievalV1",type:"object"},{$defs:{AttemptId:m1,RunId:_z,TaskId:vC,WorkAttemptIdentityV1:v2,WorkCommandId:bc,WorkRetryCauseV1:$l,WorkRetryFailureSelectorV1:$p,WorkRetrySourceV1:$u},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{command_id:{$ref:"#/$defs/WorkCommandId"},failure:{$ref:"#/$defs/WorkRetryFailureSelectorV1"},new_attempt_id:{$ref:"#/$defs/AttemptId"},original_attempt:{$ref:"#/$defs/WorkAttemptIdentityV1"}},required:["original_attempt","new_attempt_id","failure","command_id"],title:"RetryWorkAttemptCommandV1",type:"object"},{$defs:{AttemptId:m1,AutomaticWorktreeGcV1:m3,BranchCollisionPolicyV1:fd,BranchNameComponentV1:fc,BranchNameSeparatorV1:fl,BranchNamingPolicyV1:fp,BranchTopologyKindV1:f_,BranchTopologyPolicyV1:fv,CanonicalGitRefNameV1:fR,CanonicalGitRefPrefix:fP,CapabilityId:fV,CommitId:fH,ConfigurationRevisionId:f0,ConfigurationSnapshotId:f2,CredentialReferenceId:hq,CrossMergeModeV1:hI,CrossMergePolicyV1:hx,GitHubStackedPullRequestPolicyV1:yP,HistoryRewritePolicyV1:yU,LocatorDigest:gr,ManifestDigest:gl,ProjectId:g2,ProposalId:g5,ProtectedRefDispositionV1:g8,ProtectedRefRuleV1:g7,ProtectedRefSelectorV1:_e,ProviderId:_i,RefId:_u,RepositoryId:_v,RepositoryPlacementScopeV1:_b,RequiredCheckExpectationV1:_$,RequiredCheckV1:_S,RetryWorkAttemptCommandV1:{additionalProperties:!1,properties:{command_id:{$ref:"#/$defs/WorkCommandId"},failure:{$ref:"#/$defs/WorkRetryFailureSelectorV1"},new_attempt_id:{$ref:"#/$defs/AttemptId"},original_attempt:{$ref:"#/$defs/WorkAttemptIdentityV1"}},required:["original_attempt","new_attempt_id","failure","command_id"],title:"RetryWorkAttemptCommandV1",type:"object"},ReviewRequirementV1:_T,ReviewTopologyKindV1:_O,ReviewTopologyPolicyV1:_E,RunId:_z,SensitiveFilesystemLocatorV1:_2,TaskId:vC,TopologyConcurrencyPolicyV1:vF,TopologyEscalationPolicyV1:vL,TopologyGatePolicyV1:vU,TopologyNotificationLevelV1:vH,UtcMicros:vK,VerifiedWorkRetryFailureV1:{additionalProperties:!1,description:"Failure fact returned by a canonical evidence authority.",properties:{evidence_digest:{$ref:"#/$defs/ManifestDigest"},observed_at:{$ref:"#/$defs/UtcMicros"},selector:{$ref:"#/$defs/WorkRetryFailureSelectorV1"}},required:["selector","evidence_digest","observed_at"],type:"object"},WorkApprovalPolicy:vX,WorkArtifactId:vY,WorkArtifactRefV1:v1,WorkAttemptIdentityV1:v2,WorkAttemptProgressV1:v3,WorkAttemptProjectionBindingV1:v9,WorkAttemptStateV1:v7,WorkAttemptV1:bi,WorkCancellationAcknowledgementV1:bo,WorkCancellationEscalationV1:bn,WorkCancellationRequestId:ba,WorkCancellationRequestV1:bs,WorkCancellationStateV1:bd,WorkCommandId:bc,WorkEffectStateV1:bm,WorkEgressPolicy:bh,WorkExecutableReference:bb,WorkExecutionEnvelopeV1:b$,WorkExecutionLimits:bS,WorkExecutionSnapshot:bk,WorkFallbackTopology:bP,WorkFenceEpochV1:bV,WorkFilesystemPolicy:bq,WorkLeaseFenceV1:bW,WorkLeaseId:bN,WorkProviderBackendV1:$t,WorkProviderProtocol:$i,WorkProviderRouteId:$o,WorkProviderRouteV1:$n,WorkRecoveryStateV1:$a,WorkRestartReasonV1:$c,WorkRetryCauseV1:$l,WorkRetryFailureSelectorV1:$p,WorkRetryReceiptV1:{additionalProperties:!1,properties:{canonical_input_digest:{$ref:"#/$defs/ManifestDigest"},command:{$ref:"#/$defs/RetryWorkAttemptCommandV1"},failure:{$ref:"#/$defs/VerifiedWorkRetryFailureV1"},new_attempt:{$ref:"#/$defs/WorkAttemptIdentityV1"},owner_receipt_digest:{$ref:"#/$defs/ManifestDigest"},restarted_at:{$ref:"#/$defs/UtcMicros",description:"Daemon-owned admission time at which the new attempt was created."},retry_required_at:{$ref:"#/$defs/UtcMicros",description:"Exact source-owned time at which the failure made a retry necessary."}},required:["command","failure","new_attempt","retry_required_at","restarted_at","canonical_input_digest","owner_receipt_digest"],type:"object"},WorkRetrySourceV1:$u,WorkSandboxPolicy:$b,WorkTerminalEvidenceV1:$R,WorkTopologyPolicyV1:$V,WorkflowOperationRef:$j,WorktreeCleanlinessRequirementV1:$A,WorktreeId:$M,WorktreePlacementModeV1:$z,WorktreeRetentionPolicyV1:$D,WorktreeRootPolicyV1:$F},$schema:"https://json-schema.org/draft/2020-12/schema",oneOf:[{additionalProperties:!1,properties:{attempt:{$ref:"#/$defs/WorkAttemptV1"},outcome:{const:"created",type:"string"},receipt:{$ref:"#/$defs/WorkRetryReceiptV1"}},required:["outcome","receipt","attempt"],type:"object"},{additionalProperties:!1,properties:{attempt:{$ref:"#/$defs/WorkAttemptV1"},outcome:{const:"replayed",type:"string"},receipt:{$ref:"#/$defs/WorkRetryReceiptV1"}},required:["outcome","receipt","attempt"],type:"object"}],title:"WorkRetryAttemptOutcomeV1"},{$defs:{CatalogGenerationId:fq,ConfigurationRevisionId:f0,ManifestDigest:gl,ProjectId:g2,ProposalId:g5,ProviderId:_i,RepositoryId:_v,RetrievalAnchorId:_q,ReviewWorkProposalDispositionV1:{description:"The only non-accepting dispositions the proposal-review operation can\ncommit. The broader decision request remains available to the graph\nmutation operation, which owns all decision forms.",enum:["rejected","superseded"],type:"string"},SourceStoreId:v$,TaskId:vC,UtcMicros:vK,VerifiedWorkGraphVersionV1:vZ,WorkCommandId:bc,WorkProductAuthorizedRelationScopeV1:bJ,WorkProductEventEvidenceV1:bZ,WorkProductExpectedAuthorityV1:bY,WorkProductMutationIdentityV1:b0,WorkProductRevisionPinsV1:b6,WorkProductSelectionScopeV1:b3,WorkProposalV1:b8,WorkProposedChildV1:b7,WorkProviderRouteId:$o,WorkProviderRouteV1:$n,WorkRouteDecisionV1:$f,WorkScoreKindV1:$$,WorkShapeAssessmentV1:$S,WorkSizingV1:$k},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{disposition:{$ref:"#/$defs/ReviewWorkProposalDispositionV1"},mutation:{$ref:"#/$defs/WorkProductMutationIdentityV1"},proposal:{$ref:"#/$defs/WorkProposalV1"},selection:{$ref:"#/$defs/WorkProductSelectionScopeV1"}},required:["selection","proposal","disposition","mutation"],title:"ReviewWorkProposalRequestV1",type:"object"},{$defs:{RunId:_z,TaskId:vC},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{run_id:{$ref:"#/$defs/RunId"},task_id:{$ref:"#/$defs/TaskId"}},required:["task_id","run_id"],title:"WorkRunControlRequestV1",type:"object"},{$defs:{AttemptId:m1,RunId:_z,TaskId:vC,UtcMicros:vK,WorkRunControlAuthorityV1:$y,WorkRunControlReasonV1:$g,WorkRunControlStateV1:$_,WorkRunControlV1:{additionalProperties:!1,description:"One run's durable control aggregate.",properties:{authority:{$ref:"#/$defs/WorkRunControlAuthorityV1"},deadline:{$ref:"#/$defs/WorkRunDeadlineCheckpointV1"},fenced_attempts:{description:'The exact attempts that were live when the current state published.\nEmpty means "none were live", never "we did not look".',items:{$ref:"#/$defs/AttemptId"},type:"array"},reason:{anyOf:[{$ref:"#/$defs/WorkRunControlReasonV1"},{type:"null"}]},run_id:{$ref:"#/$defs/RunId"},state:{$ref:"#/$defs/WorkRunControlStateV1"},task_id:{$ref:"#/$defs/TaskId"},transitioned_at:{$ref:"#/$defs/UtcMicros"}},required:["task_id","run_id","state","authority","deadline","transitioned_at","fenced_attempts"],title:"WorkRunControlV1",type:"object"},WorkRunDeadlineCheckpointV1:$v},$schema:"https://json-schema.org/draft/2020-12/schema",description:"One run's control reading.\n\n`Uncontrolled` is a distinct answer from `Controlled`: it says the run is\nadmitted and running under its admitted deadline with no control transition\never published, which is not the same as a control row that happens to say\n`Running`.",oneOf:[{additionalProperties:!1,description:"The run holds durable attempts but no control transition has ever been\npublished for it.",properties:{deadline:{$ref:"#/$defs/UtcMicros",description:"The admitted deadline the run is running against."},live_attempts:{description:"Attempts that have not reached a terminal state.",items:{$ref:"#/$defs/AttemptId"},type:"array"},state:{const:"uncontrolled",type:"string"},total_attempts:{format:"uint32",minimum:0,type:"integer"}},required:["state","deadline","live_attempts","total_attempts"],type:"object"},{additionalProperties:!1,description:"The published control aggregate, plus the live frontier as of this\nread (which may differ from the frontier the transition fenced).",properties:{control:{$ref:"#/$defs/WorkRunControlV1"},live_attempts:{items:{$ref:"#/$defs/AttemptId"},type:"array"},state:{const:"controlled",type:"string"},total_attempts:{format:"uint32",minimum:0,type:"integer"}},required:["state","control","live_attempts","total_attempts"],type:"object"}],title:"WorkRunControlReadingV1"},{$defs:{AttemptId:m1,AutomaticWorktreeGcV1:m3,BranchCollisionPolicyV1:fd,BranchNameComponentV1:fc,BranchNameSeparatorV1:fl,BranchNamingPolicyV1:fp,BranchTopologyKindV1:f_,BranchTopologyPolicyV1:fv,CanonicalGitRefNameV1:fR,CanonicalGitRefPrefix:fP,CapabilityId:fV,CommitId:fH,ConfigurationRevisionId:f0,ConfigurationSnapshotId:f2,CredentialReferenceId:hq,CrossMergeModeV1:hI,CrossMergePolicyV1:hx,GitHubStackedPullRequestPolicyV1:yP,HistoryRewritePolicyV1:yU,LocatorDigest:gr,ManifestDigest:gl,ProtectedRefDispositionV1:g8,ProtectedRefRuleV1:g7,ProtectedRefSelectorV1:_e,ProviderId:_i,RefId:_u,RepositoryId:_v,RepositoryPlacementScopeV1:_b,RequiredCheckExpectationV1:_$,RequiredCheckV1:_S,ReviewRequirementV1:_T,ReviewTopologyKindV1:_O,ReviewTopologyPolicyV1:_E,RunId:_z,SensitiveFilesystemLocatorV1:_2,TaskId:vC,TopologyConcurrencyPolicyV1:vF,TopologyEscalationPolicyV1:vL,TopologyGatePolicyV1:vU,TopologyNotificationLevelV1:vH,UtcMicros:vK,WorkApprovalPolicy:vX,WorkEffectStateV1:bm,WorkEgressPolicy:bh,WorkExecutableReference:bb,WorkExecutionLimits:bS,WorkExecutionSnapshot:bk,WorkFallbackTopology:bP,WorkFilesystemPolicy:bq,WorkProviderBackendV1:$t,WorkProviderProtocol:$i,WorkProviderRouteId:$o,WorkProviderRouteV1:$n,WorkSandboxPolicy:$b,WorkTopologyPolicyV1:$V,WorkflowOperationRef:$j,WorktreeCleanlinessRequirementV1:$A,WorktreePlacementModeV1:$z,WorktreeRetentionPolicyV1:$D,WorktreeRootPolicyV1:$F},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Starts one admitted provider attempt. Every field is a typed fact; there\nis no argv, environment entry, executable path, or shell string here. The\nprojection binding and admission facts are re-read from the canonical Work\nauthority, never trusted from the caller.",properties:{attempt_id:{$ref:"#/$defs/AttemptId"},commit:{$ref:"#/$defs/CommitId"},effect_state:{$ref:"#/$defs/WorkEffectStateV1"},execution_snapshot:{$ref:"#/$defs/WorkExecutionSnapshot"},instructions:{type:"string"},occurred_at:{$ref:"#/$defs/UtcMicros"},operation:{$ref:"#/$defs/WorkflowOperationRef"},reference:{anyOf:[{$ref:"#/$defs/RefId"},{type:"null"}]},run_id:{$ref:"#/$defs/RunId"},task_id:{$ref:"#/$defs/TaskId"},worktree_root:{type:"string"}},required:["task_id","run_id","attempt_id","operation","execution_snapshot","worktree_root","commit","instructions","effect_state","occurred_at"],title:"StartWorkAttemptCommand",type:"object"},{$defs:{AttemptId:m1,AutomaticWorktreeGcV1:m3,BranchCollisionPolicyV1:fd,BranchNameComponentV1:fc,BranchNameSeparatorV1:fl,BranchNamingPolicyV1:fp,BranchTopologyKindV1:f_,BranchTopologyPolicyV1:fv,CanonicalGitRefNameV1:fR,CanonicalGitRefPrefix:fP,CapabilityId:fV,CommitId:fH,ConfigurationRevisionId:f0,ConfigurationSnapshotId:f2,CredentialReferenceId:hq,CrossMergeModeV1:hI,CrossMergePolicyV1:hx,GitHubStackedPullRequestPolicyV1:yP,HistoryRewritePolicyV1:yU,LocatorDigest:gr,ManifestDigest:gl,ProtectedRefDispositionV1:g8,ProtectedRefRuleV1:g7,ProtectedRefSelectorV1:_e,ProviderId:_i,RefId:_u,RepositoryId:_v,RepositoryPlacementScopeV1:_b,RequiredCheckExpectationV1:_$,RequiredCheckV1:_S,ReviewRequirementV1:_T,ReviewTopologyKindV1:_O,ReviewTopologyPolicyV1:_E,RunId:_z,SensitiveFilesystemLocatorV1:_2,StartWorkAttemptCommand:{additionalProperties:!1,description:"Starts one admitted provider attempt. Every field is a typed fact; there\nis no argv, environment entry, executable path, or shell string here. The\nprojection binding and admission facts are re-read from the canonical Work\nauthority, never trusted from the caller.",properties:{attempt_id:{$ref:"#/$defs/AttemptId"},commit:{$ref:"#/$defs/CommitId"},effect_state:{$ref:"#/$defs/WorkEffectStateV1"},execution_snapshot:{$ref:"#/$defs/WorkExecutionSnapshot"},instructions:{type:"string"},occurred_at:{$ref:"#/$defs/UtcMicros"},operation:{$ref:"#/$defs/WorkflowOperationRef"},reference:{anyOf:[{$ref:"#/$defs/RefId"},{type:"null"}]},run_id:{$ref:"#/$defs/RunId"},task_id:{$ref:"#/$defs/TaskId"},worktree_root:{type:"string"}},required:["task_id","run_id","attempt_id","operation","execution_snapshot","worktree_root","commit","instructions","effect_state","occurred_at"],type:"object"},TaskId:vC,TopologyConcurrencyPolicyV1:vF,TopologyEscalationPolicyV1:vL,TopologyGatePolicyV1:vU,TopologyNotificationLevelV1:vH,UtcMicros:vK,WorkApprovalPolicy:vX,WorkAttemptIdentityV1:v2,WorkEffectStateV1:bm,WorkEgressPolicy:bh,WorkExecutableReference:bb,WorkExecutionLimits:bS,WorkExecutionSnapshot:bk,WorkFallbackTopology:bP,WorkFilesystemPolicy:bq,WorkProviderBackendV1:$t,WorkProviderProtocol:$i,WorkProviderRouteId:$o,WorkProviderRouteV1:$n,WorkSandboxPolicy:$b,WorkTopologyPolicyV1:$V,WorkflowOperationRef:$j,WorkflowOutputName:$C,WorktreeCleanlinessRequirementV1:$A,WorktreePlacementModeV1:$z,WorktreeRetentionPolicyV1:$D,WorktreeRootPolicyV1:$F},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Admits one synthesis attempt over an ordered set of sibling sources.",properties:{output_name:{$ref:"#/$defs/WorkflowOutputName",description:"The fan-out output the synthesis belongs to, carried into the draft\nthe workflow completion path verifies."},sources:{description:"The ordered sibling sources the synthesis consumes.",items:{$ref:"#/$defs/WorkAttemptIdentityV1"},type:"array"},start:{$ref:"#/$defs/StartWorkAttemptCommand",description:"The synthesis attempt's own admission facts; it is started through\nthe same admission machinery as any other attempt."}},required:["start","output_name","sources"],title:"AdmitWorkSynthesisCommand",type:"object"},{$defs:{AttemptId:m1,AutomaticWorktreeGcV1:m3,BranchCollisionPolicyV1:fd,BranchNameComponentV1:fc,BranchNameSeparatorV1:fl,BranchNamingPolicyV1:fp,BranchTopologyKindV1:f_,BranchTopologyPolicyV1:fv,CanonicalGitRefNameV1:fR,CanonicalGitRefPrefix:fP,CapabilityId:fV,CommitId:fH,ConfigurationRevisionId:f0,ConfigurationSnapshotId:f2,CredentialReferenceId:hq,CrossMergeModeV1:hI,CrossMergePolicyV1:hx,GitHubStackedPullRequestPolicyV1:yP,HistoryRewritePolicyV1:yU,LocatorDigest:gr,ManifestDigest:gl,ProjectId:g2,ProposalId:g5,ProtectedRefDispositionV1:g8,ProtectedRefRuleV1:g7,ProtectedRefSelectorV1:_e,ProviderId:_i,RefId:_u,RepositoryId:_v,RepositoryPlacementScopeV1:_b,RequiredCheckExpectationV1:_$,RequiredCheckV1:_S,ReviewRequirementV1:_T,ReviewTopologyKindV1:_O,ReviewTopologyPolicyV1:_E,RunId:_z,SensitiveFilesystemLocatorV1:_2,TaskId:vC,TopologyConcurrencyPolicyV1:vF,TopologyEscalationPolicyV1:vL,TopologyGatePolicyV1:vU,TopologyNotificationLevelV1:vH,UtcMicros:vK,WorkApprovalPolicy:vX,WorkArtifactId:vY,WorkArtifactRefV1:v1,WorkAttemptIdentityV1:v2,WorkAttemptProgressV1:v3,WorkAttemptProjectionBindingV1:v9,WorkAttemptStateV1:v7,WorkAttemptV1:bi,WorkCancellationAcknowledgementV1:bo,WorkCancellationEscalationV1:bn,WorkCancellationRequestId:ba,WorkCancellationRequestV1:bs,WorkCancellationStateV1:bd,WorkEffectStateV1:bm,WorkEgressPolicy:bh,WorkExecutableReference:bb,WorkExecutionEnvelopeV1:b$,WorkExecutionLimits:bS,WorkExecutionSnapshot:bk,WorkFallbackTopology:bP,WorkFenceEpochV1:bV,WorkFilesystemPolicy:bq,WorkLeaseFenceV1:bW,WorkLeaseId:bN,WorkProviderBackendV1:$t,WorkProviderProtocol:$i,WorkProviderRouteId:$o,WorkProviderRouteV1:$n,WorkRecoveryStateV1:$a,WorkRestartReasonV1:$c,WorkSandboxPolicy:$b,WorkSynthesisEvidenceGroupV1:{additionalProperties:!1,description:"Succeeded sources grouped by the exact artifact digest list they produced.\nGroups are ordered largest first; smaller groups are the minority\nevidence, and more than one group is the disagreement, preserved as\nstructure instead of being resolved by fiat.",properties:{artifacts:{description:"The artifact digest list every source in this group produced.",items:{$ref:"#/$defs/ManifestDigest"},type:"array"},sources:{description:"The concurring sources, in the caller's requested order.",items:{$ref:"#/$defs/WorkAttemptIdentityV1"},type:"array"}},required:["artifacts","sources"],type:"object"},WorkSynthesisRefusalV1:{description:"Why a synthesis request was answered with the unsynthesized set instead\nof an admitted attempt.",oneOf:[{const:"no_citable_sources",description:"No source contributed a citable artifact: every source failed, was\ncancelled, timed out, is still unknown, or succeeded without\ndeclaring artifacts. There is nothing a synthesis could truthfully\ncite.",type:"string"}]},WorkSynthesisSourceEnvelopeV1:{additionalProperties:!1,description:"One immutable source envelope: which attempt, and what it truthfully\ncontributed at admission time.",properties:{outcome:{$ref:"#/$defs/WorkSynthesisSourceOutcomeV1"},source:{$ref:"#/$defs/WorkAttemptIdentityV1"}},required:["source","outcome"],type:"object"},WorkSynthesisSourceOutcomeV1:{description:"One sibling attempt's terminal contribution, captured verbatim from the\nWork authority at admission time.",oneOf:[{description:"The source succeeded; its declared artifact digests, in declaration\norder, are the evidence a synthesis may cite.",properties:{artifacts:{items:{$ref:"#/$defs/ManifestDigest"},type:"array"},outcome:{const:"succeeded",type:"string"}},required:["outcome","artifacts"],type:"object"},{description:"The source failed; its sealed terminal evidence digest is preserved\nso the failure stays visible in the synthesis record.",properties:{evidence:{$ref:"#/$defs/ManifestDigest"},outcome:{const:"failed",type:"string"}},required:["outcome","evidence"],type:"object"},{description:"The source timed out; preserved like a failure.",properties:{evidence:{$ref:"#/$defs/ManifestDigest"},outcome:{const:"timed_out",type:"string"}},required:["outcome","evidence"],type:"object"},{description:"The source was cancelled; preserved like a failure.",properties:{evidence:{$ref:"#/$defs/ManifestDigest"},outcome:{const:"cancelled",type:"string"}},required:["outcome","evidence"],type:"object"},{description:"The source has not reached a terminal state. The unknown is preserved\nas an unknown; it contributes no citable evidence and is never\nguessed at.",properties:{outcome:{const:"unknown",type:"string"},state:{$ref:"#/$defs/WorkAttemptStateV1"}},required:["outcome","state"],type:"object"}]},WorkSynthesisSourceSetV1:{additionalProperties:!1,description:"The ordered, digest-sealed source envelope set a synthesis admission\nconsumed. Reordering or mutating any envelope changes the digest, so a\nreplayed or tampered set is distinguishable from the admitted one.",properties:{set_digest:{$ref:"#/$defs/ManifestDigest",description:"Canonical digest over the ordered envelopes."},sources:{description:"The envelopes, exactly in the caller's requested order.",items:{$ref:"#/$defs/WorkSynthesisSourceEnvelopeV1"},type:"array"}},required:["sources","set_digest"],type:"object"},WorkTerminalEvidenceV1:$R,WorkTopologyPolicyV1:$V,WorkflowOperationRef:$j,WorkflowOutputName:$C,WorkflowSynthesisDraft:{additionalProperties:!1,description:"A provider's claim that one artifact of a fan-out output synthesizes its\nsibling source artifacts.",properties:{cited_source_digests:{description:"Content digests of every source artifact the synthesis consumed.",items:{$ref:"#/$defs/ManifestDigest"},type:"array",uniqueItems:!0},output_name:{$ref:"#/$defs/WorkflowOutputName",description:"The fan-out output the synthesis belongs to."},synthesis_attempt:{$ref:"#/$defs/WorkAttemptIdentityV1",description:"The attempt that produced the synthesis artifact inside that output."}},required:["output_name","synthesis_attempt","cited_source_digests"],type:"object"},WorktreeCleanlinessRequirementV1:$A,WorktreeId:$M,WorktreePlacementModeV1:$z,WorktreeRetentionPolicyV1:$D,WorktreeRootPolicyV1:$F},$schema:"https://json-schema.org/draft/2020-12/schema",description:"The typed outcome of a synthesis request: an admitted attempt, or the\nsealed unsynthesized set when synthesis could not truthfully begin.",oneOf:[{additionalProperties:!1,description:"The admitted synthesis attempt and everything it is accountable to.",properties:{attempt:{$ref:"#/$defs/WorkAttemptV1",description:"The leased (or idempotently replayed) synthesis attempt."},draft:{$ref:"#/$defs/WorkflowSynthesisDraft",description:"The citation obligation, complete by construction: the draft cites\nevery citable source digest and is verified downstream by\n[`crate::workflow_synthesis::verify_workflow_synthesis_draft`]."},groups:{description:"Disagreement structure over the succeeded sources.",items:{$ref:"#/$defs/WorkSynthesisEvidenceGroupV1"},type:"array"},source_set:{$ref:"#/$defs/WorkSynthesisSourceSetV1",description:"The sealed source envelopes the attempt was admitted against."},synthesis:{const:"admitted",type:"string"},uncited:{description:"Sources preserved without citations: failures, unknowns, and\nartifact-less successes, in the caller's requested order.",items:{$ref:"#/$defs/WorkAttemptIdentityV1"},type:"array"}},required:["synthesis","attempt","source_set","groups","draft","uncited"],type:"object"},{properties:{refusal:{$ref:"#/$defs/WorkSynthesisRefusalV1"},sources:{$ref:"#/$defs/WorkSynthesisSourceSetV1"},synthesis:{const:"unsynthesized",type:"string"}},required:["synthesis","sources","refusal"],type:"object"}],title:"WorkSynthesisAttemptV1"},{$defs:{WorkAttemptListCursorV1:v6},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"One page-bounded topology view read. The cursor vocabulary is the attempt\nlist's: a cursor minted under a superseded topology generation is a typed\nstaleness refusal, never a silently different page.",properties:{cursor:{anyOf:[{$ref:"#/$defs/WorkAttemptListCursorV1"},{type:"null"}],default:null},page_size:{format:"uint32",minimum:0,type:"integer"}},required:["page_size"],title:"WorkTopologyViewRequestV1",type:"object"},{$defs:{BranchTopologyKindV1:f_,BranchTopologyPolicyV1:fv,CanonicalGitRefNameV1:fR,CanonicalGitRefPrefix:fP,CapabilityId:fV,CrossMergeModeV1:hI,CrossMergePolicyV1:hx,GitHubStackedPullRequestPolicyV1:yP,ProtectedRefDispositionV1:g8,ProtectedRefRuleV1:g7,ProtectedRefSelectorV1:_e,RequiredCheckExpectationV1:_$,RequiredCheckV1:_S,ReviewRequirementV1:_T,ReviewTopologyKindV1:_O,ReviewTopologyPolicyV1:_E,RunId:_z,TaskId:vC,TopologyGatePolicyV1:vU,UtcMicros:vK,WorkAttemptListCoverageV1:v4,WorkAttemptListCursorV1:v6,WorkAttemptTopologyBindingV1:br,WorkPlacementBlockerV1:bF,WorkPlacementIdentityV1:bL,WorkPlacementKindV1:bU,WorkPlacementReadingV1:{description:"One placement reading. Absence is a state, not an empty placement.",oneOf:[{additionalProperties:!1,description:"No placement was ever admitted for this run.",properties:{state:{const:"absent",type:"string"}},required:["state"],type:"object"},{additionalProperties:!1,description:"The durable placement relation.",properties:{placement:{$ref:"#/$defs/WorkPlacementV1"},state:{const:"placed",type:"string"}},required:["state","placement"],type:"object"}],title:"WorkPlacementReadingV1"},WorkPlacementStateV1:bH,WorkPlacementTargetV1:bG,WorkPlacementV1:bB,WorkTopologyExecutionPlacementV1:{additionalProperties:!1,description:"The execution-placement dimension: the policy's placement mode plus one\nlane per distinct `(task, run)` pair in page order.",properties:{lanes:{items:{$ref:"#/$defs/WorkTopologyPlacementLaneV1"},type:"array"},mode:{$ref:"#/$defs/WorktreePlacementModeV1"}},required:["mode","lanes"],title:"WorkTopologyExecutionPlacementV1",type:"object"},WorkTopologyIntegrationStrategyV1:{additionalProperties:!1,description:"The integration-strategy dimension, read verbatim from the resolved work\ntopology policy the runs in scope are admitted against.",properties:{cross_merge:{$ref:"#/$defs/CrossMergePolicyV1"},gates:{$ref:"#/$defs/TopologyGatePolicyV1"},protected_refs:{items:{$ref:"#/$defs/ProtectedRefRuleV1"},type:"array"}},required:["cross_merge","gates","protected_refs"],title:"WorkTopologyIntegrationStrategyV1",type:"object"},WorkTopologyPlacementLaneV1:{additionalProperties:!1,description:"One execution-placement lane: a distinct `(task, run)` pair from the\nattempt page joined to its durable placement reading. Placement absence is\na state on the lane, not a dropped lane.",properties:{attempt_count:{description:"Attempts this lane carried within the requested page.",format:"uint32",minimum:0,type:"integer"},placement:{$ref:"#/$defs/WorkPlacementReadingV1"},run_id:{$ref:"#/$defs/RunId"},task_id:{$ref:"#/$defs/TaskId"}},required:["task_id","run_id","attempt_count","placement"],title:"WorkTopologyPlacementLaneV1",type:"object"},WorktreeCleanlinessRequirementV1:$A,WorktreePlacementModeV1:$z},$schema:"https://json-schema.org/draft/2020-12/schema",description:"The application-owned execution-topology view. Absence of any Work in\nscope is a typed state, distinct from an authorized-but-empty page.",oneOf:[{additionalProperties:!1,description:"No Work exists in this authority scope, so there is no topology to\ndraw. Concealed scopes are refused before any read.",properties:{state:{const:"absent",type:"string"}},required:["state"],type:"object"},{additionalProperties:!1,description:"The four dimensions, pinned to one verified topology generation.",properties:{branch_topology:{$ref:"#/$defs/BranchTopologyPolicyV1"},coverage:{$ref:"#/$defs/WorkAttemptListCoverageV1"},execution_placement:{$ref:"#/$defs/WorkTopologyExecutionPlacementV1"},integration_strategy:{$ref:"#/$defs/WorkTopologyIntegrationStrategyV1"},review_topology:{$ref:"#/$defs/ReviewTopologyPolicyV1"},state:{const:"view",type:"string"},topology:{$ref:"#/$defs/WorkAttemptTopologyBindingV1"}},required:["state","topology","coverage","execution_placement","branch_topology","review_topology","integration_strategy"],type:"object"}],title:"ExecutionTopologyViewV1"},{$defs:{ObservabilityHorizonV1:gM},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"One horizon-bounded execution-topology metrics read. The authorized scope\nis taken from the request context, not from the request, so a caller can\nnever widen the population it reads.",properties:{horizon:{$ref:"#/$defs/ObservabilityHorizonV1"},max_events:{description:"Event budget for this read, at most\n[`MAX_EXECUTION_TOPOLOGY_EVENTS_V1`].",format:"uint32",minimum:0,type:"integer"}},required:["horizon","max_events"],title:"ExecutionTopologyMetricsRequestV1",type:"object"},{$defs:{CoverageStateV1:hV,ExecutionBlockedCauseV1:{description:"Cause a work item was blocked for.",enum:["dependency","needs_input","capability","policy","scope","conflict","lease","backpressure","test","ci","review","effect_unknown","other","unknown"],type:"string"},ExecutionConcurrencyPhaseV1:{description:"Concurrency-width phase. `Useful` counts only distinct admitted\nattempts that advanced a committed progress frontier; heartbeats,\nqueued work, child processes, and transport fanout never reach it.",enum:["requested","accepted","admitted","active","useful"],type:"string"},ExecutionConflictKindV1:{description:"Conflict prediction kind. Mechanical and semantic keep separate\ndenominators because their adjudicators are not interchangeable.",enum:["mechanical","semantic","combined"],type:"string"},ExecutionConflictOutcomeV1:{description:"Independently observed conflict outcome. `Censored` and `Unknown`\nnever enter a confusion-matrix denominator.",enum:["conflict","no_conflict","censored","unknown"],type:"string"},ExecutionDeliveryOutcomeV1:{description:"Per-surface delivery outcome. A multi-surface delivery is never a\nduplicate of product work; only `Deduplicated` is.",enum:["delivered","deduplicated","dropped","unknown"],type:"string"},ExecutionDuplicateKindV1:{description:"Adjudicated duplicate-work relation. Similarity, proximity, shared\npaths, and concurrency never produce one of these.",enum:["exact_duplicate","superseded_overlap","repeated_investigation","duplicate_effect","not_duplicate","censored","unknown"],type:"string"},ExecutionDuplicateOutcomeV1:{description:"Whether a duplicate effect was prevented or actually committed. The\ntwo never collapse into one count.",enum:["prevented","committed","unknown","not_applicable"],type:"string"},ExecutionDurationBucketV1:{description:"Fixed duration buckets shared by stale stack age, blocked time, and\nrerun latency. Raw timestamps and exact durations stay authorized\nlocal detail.",enum:["under1m","from1m_to5m","from5m_to15m","from15m_to1h","from1h_to4h","from4h_to24h","from1d_to7d","over7d"],type:"string"},ExecutionFanoutPhaseV1:{description:"Fan-out width phase. `PeakActive` is the sampled active width; the\nfan-out distribution is unweighted so serialized and blocked samples,\nwhich carry no interval, are preserved rather than dropped.",enum:["requested","accepted","admitted","peak_active","useful"],type:"string"},ExecutionGitHubStackCapabilityReadingV1:{additionalProperties:!1,description:"Latest trustworthy GitHub stacked-PR capability observation in the\nhorizon. It is a typed operational state, not a metric or success claim.",properties:{capability:{anyOf:[{$ref:"#/$defs/ExecutionGitHubStackCapabilityV1"},{type:"null"}]},coverage:{$ref:"#/$defs/MetricCoverageV1"},other_forge_fallback_available:{type:["boolean","null"]},standard_git_fallback_available:{type:["boolean","null"]},unavailable:{anyOf:[{$ref:"#/$defs/ExecutionMetricUnavailableV1"},{type:"null"}]}},required:["coverage"],title:"ExecutionGitHubStackCapabilityReadingV1",type:"object"},ExecutionGitHubStackCapabilityV1:{description:"Last bounded GitHub stacked-PR capability state observed in the\nhorizon. This remains orthogonal to GitHub ingress and item lifecycle.",enum:["unavailable","private_preview_disabled","enabled","degraded"],type:"string"},ExecutionIntegrationKindV1:{description:"Integration operation kind. Rebase remains external observation only.",enum:["fast_forward","merge_commit","rebase","cherry_pick","stack_retarget","graph_only","external_observed","unknown"],type:"string"},ExecutionIntegrationOutcomeV1:{description:"Terminal result of an observed native integration.",enum:["succeeded","conflicted","rejected","denied","stale","locked","cancelled","timed_out","failed","partial","effect_unknown","unsupported","unknown"],type:"string"},ExecutionIntervalStateV1:{description:"Whether the owning drift interval is still open or exactly closed.",enum:["open","closed"],type:"string"},ExecutionLeakKindV1:{description:"Independently proved execution-leak class.",enum:["lease_after_terminal","attempt_without_live_owner","effect_unknown_past_deadline","missing_worktree_binding","unbounded_delivery","none","unknown"],type:"string"},ExecutionLeakOutcomeV1:{description:"Recovery state a proved leak reached.",enum:["not_required","pending","recovered","failed","unknown"],type:"string"},ExecutionMetricUnavailableV1:{description:"Why a measurement carries no value. Absence is always one of these typed\nreasons; it is never an empty string, a zero, or a silently dropped row.",oneOf:[{const:"store_unavailable",description:"The observation store could not be read at all for this horizon.",type:"string"},{const:"event_budget_exceeded",description:"The horizon holds more events than one read may draw, so every\ndenominator here would be a partial count presented as a total.",type:"string"},{const:"cell_budget_exceeded",description:"The bounded projection would exceed the Plan 26 result-cell ceiling.\nThe whole read refuses rather than returning a misleading subset.",type:"string"},{const:"no_eligible_evidence",description:"No recorded event in the family supplies this metric's numerator or\ndenominator.",type:"string"},{const:"support_floor_unmet",description:"Eligible cases exist but fall below the metric's support floor.",type:"string"},{const:"coverage_floor_unmet",description:"Observed cases cover less of the eligible population than the metric's\ncoverage floor allows.",type:"string"},{const:"censoring_ceiling_exceeded",description:"More of the eligible population is censored than the metric admits.",type:"string"},{const:"unbounded_interval",description:"The interval this metric integrates over has no proved upper bound, so\nits duration cannot be measured without inventing a terminal.",type:"string"}]},ExecutionQuantityUnitV1:{description:"Quantity unit for duplicate-effort accounting. Each unit is reported\nseparately: wall time, tokens, cost, tests, and effects are never\nsummed into one number.",enum:["wall_micros","tokens","cost_micros","tests","effects"],type:"string"},ExecutionRerunCauseV1:{description:"Typed rerun cause. Repeated logs and transport redelivery are not\nreruns and never carry one of these.",enum:["runtime_retry","runtime_fallback","test_rerun","ci_rerun","recovery","human_requested","unknown"],type:"string"},ExecutionRerunSourceV1:{description:"Which independent system observed the rerun.",enum:["runtime","test","ci"],type:"string"},ExecutionStackDriftKindV1:{description:"Exact reason a stack became stale. The enum is bounded and never\ncarries a branch, ref, worktree, repository, or provider identity.",enum:["head_advanced","base_advanced","merge_base_changed","retargeted","superseded"],type:"string"},ExecutionSurfaceFamilyV1:{description:"Delivery surface family. Addresses, payloads, principals, and\nrecipients are never observed, so the family is the whole label.",enum:["hook","mcp","lsp","dashboard","cli","other"],type:"string"},ExecutionTopologyDimensionV1:{description:"One allowed local grouping dimension. The set is closed by construction:\nevery value is produced by an exhaustive match over a bounded domain class,\nso no person, agent, task, project, repository, worktree, branch, ref,\ncommit, model version, or route can ever appear as a label.",oneOf:[{properties:{dimension:{const:"concurrency_phase",type:"string"},value:{$ref:"#/$defs/ExecutionConcurrencyPhaseV1"}},required:["dimension","value"],type:"object"},{properties:{dimension:{const:"fanout_phase",type:"string"},value:{$ref:"#/$defs/ExecutionFanoutPhaseV1"}},required:["dimension","value"],type:"object"},{properties:{dimension:{const:"width_bucket",type:"string"},value:{$ref:"#/$defs/ExecutionWidthBucketV1"}},required:["dimension","value"],type:"object"},{properties:{dimension:{const:"duration_bucket",type:"string"},value:{$ref:"#/$defs/ExecutionDurationBucketV1"}},required:["dimension","value"],type:"object"},{properties:{dimension:{const:"duplicate_kind",type:"string"},value:{$ref:"#/$defs/ExecutionDuplicateKindV1"}},required:["dimension","value"],type:"object"},{properties:{dimension:{const:"unit",type:"string"},value:{$ref:"#/$defs/ExecutionQuantityUnitV1"}},required:["dimension","value"],type:"object"},{properties:{dimension:{const:"duplicate_outcome",type:"string"},value:{$ref:"#/$defs/ExecutionDuplicateOutcomeV1"}},required:["dimension","value"],type:"object"},{properties:{dimension:{const:"conflict_kind",type:"string"},value:{$ref:"#/$defs/ExecutionConflictKindV1"}},required:["dimension","value"],type:"object"},{properties:{dimension:{const:"conflict_outcome",type:"string"},value:{$ref:"#/$defs/ExecutionConflictOutcomeV1"}},required:["dimension","value"],type:"object"},{properties:{dimension:{const:"integration_kind",type:"string"},value:{$ref:"#/$defs/ExecutionIntegrationKindV1"}},required:["dimension","value"],type:"object"},{properties:{dimension:{const:"integration_outcome",type:"string"},value:{$ref:"#/$defs/ExecutionIntegrationOutcomeV1"}},required:["dimension","value"],type:"object"},{properties:{dimension:{const:"stack_drift_kind",type:"string"},value:{$ref:"#/$defs/ExecutionStackDriftKindV1"}},required:["dimension","value"],type:"object"},{properties:{dimension:{const:"interval_state",type:"string"},value:{$ref:"#/$defs/ExecutionIntervalStateV1"}},required:["dimension","value"],type:"object"},{properties:{dimension:{const:"blocked_cause",type:"string"},value:{$ref:"#/$defs/ExecutionBlockedCauseV1"}},required:["dimension","value"],type:"object"},{properties:{dimension:{const:"rerun_source",type:"string"},value:{$ref:"#/$defs/ExecutionRerunSourceV1"}},required:["dimension","value"],type:"object"},{properties:{dimension:{const:"rerun_cause",type:"string"},value:{$ref:"#/$defs/ExecutionRerunCauseV1"}},required:["dimension","value"],type:"object"},{properties:{dimension:{const:"leak_kind",type:"string"},value:{$ref:"#/$defs/ExecutionLeakKindV1"}},required:["dimension","value"],type:"object"},{properties:{dimension:{const:"leak_outcome",type:"string"},value:{$ref:"#/$defs/ExecutionLeakOutcomeV1"}},required:["dimension","value"],type:"object"},{properties:{dimension:{const:"surface",type:"string"},value:{$ref:"#/$defs/ExecutionSurfaceFamilyV1"}},required:["dimension","value"],type:"object"},{properties:{dimension:{const:"delivery_outcome",type:"string"},value:{$ref:"#/$defs/ExecutionDeliveryOutcomeV1"}},required:["dimension","value"],type:"object"}]},ExecutionTopologyDrillAnchorV1:{additionalProperties:!1,description:"An opaque cursor minted by the registered observation authority. It can be\nresolved only through that same authorized local query boundary and is not\na metric dimension or exportable identity.",properties:{cursor:{type:"string"}},required:["cursor"],title:"ExecutionTopologyDrillAnchorV1",type:"object"},ExecutionTopologyEmissionCoverageV1:{additionalProperties:!1,description:"Envelope-level delivery evidence for this read. `None` means the store did\nnot answer, so no zero may be inferred. `dropped` is the proved lower bound\nfrom the bound producer scope, deduplicated across explicit loss receipts\nand their next-envelope carriers; it is not attributed to a topology\nfamily. Sampling stays a count of sampled topology envelopes and is never\nexpanded into a fabricated population estimate.",properties:{delayed:{format:"uint64",minimum:0,type:["integer","null"]},dropped:{format:"uint64",minimum:0,type:["integer","null"]},emitted:{format:"uint64",minimum:0,type:["integer","null"]},sampled_events:{format:"uint64",minimum:0,type:["integer","null"]}},title:"ExecutionTopologyEmissionCoverageV1",type:"object"},ExecutionTopologyMeasurementV1:{additionalProperties:!1,description:"One descriptor cell: the Plan 26 descriptor name, its grouping dimensions,\nand the landed metric envelope carrying value, denominator, coverage, and\nprovenance.",properties:{dimensions:{description:"Allowed local grouping dimensions, at most\n[`MAX_METRIC_DIMENSIONS_V1`], in a fixed order per descriptor.",items:{$ref:"#/$defs/ExecutionTopologyDimensionV1"},type:"array"},unavailable:{anyOf:[{$ref:"#/$defs/ExecutionMetricUnavailableV1"},{type:"null"}],description:"Typed absence reason. It is `Some` exactly when `value.value` is\n`None`, so a reader can never mistake a refused metric for a zero."},value:{$ref:"#/$defs/MetricValueV1"}},required:["dimensions","value"],title:"ExecutionTopologyMeasurementV1",type:"object"},ExecutionWidthBucketV1:{description:"Fixed width buckets. Raw widths stay authorized local detail; only\nbucket counts leave the projection.",enum:["zero","one","two","from3_to4","from5_to8","from9_to16","from17_to32","from33_to64","over64"],type:"string"},MetricCalibrationV1:gh,MetricCohortV1:gy,MetricCoverageV1:gg,MetricEvidenceClassV1:g_,MetricProvenanceV1:gv,MetricSourceV1:gb,MetricTemporalV1:g$,MetricUncertaintyV1:gS,MetricValueV1:gk,ObservabilityHorizonV1:gM},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"The canonical execution-topology read model. Observatory and Costs render\nthis without local formulas; CLI, MCP, and HTTP return the same bytes.",properties:{authorized_scope_ref:{description:"Local authorization anchor the read was admitted under. It is derived\nfrom the resolved scope, never from a caller-supplied string.",type:"string"},coverage:{$ref:"#/$defs/MetricCoverageV1",description:"Family-level coverage over the event population, independent of any\nsingle descriptor's denominator."},current:{description:"True only when the whole family was read with `Known` coverage. A\nfalse value means at least one descriptor below is a typed absence.",type:"boolean"},drill_anchors:{description:"Bounded registered source cursors for authorized local drill-down.\nPayload anchors, traces, and scope identifiers never enter this list.",items:{$ref:"#/$defs/ExecutionTopologyDrillAnchorV1"},type:"array"},emission_coverage:{$ref:"#/$defs/ExecutionTopologyEmissionCoverageV1"},github_stack_capability:{$ref:"#/$defs/ExecutionGitHubStackCapabilityReadingV1"},horizon:{$ref:"#/$defs/ObservabilityHorizonV1"},measurements:{items:{$ref:"#/$defs/ExecutionTopologyMeasurementV1"},type:"array"},observed_at_micros:{format:"int64",type:"integer"},watermark:{description:"Watermark of the last event this projection consumed. A rebuild at the\nsame watermark yields the same values.",type:"string"}},required:["authorized_scope_ref","horizon","watermark","observed_at_micros","current","coverage","emission_coverage","github_stack_capability","drill_anchors","measurements"],title:"ExecutionTopologyMetricsV1",type:"object"},{$defs:{ProjectId:g2,RepositoryId:_v,UtcMicros:vK,WorkGraphReadModeV1:{oneOf:[{properties:{mode:{const:"current",type:"string"}},required:["mode"],type:"object"},{properties:{mode:{const:"as_of",type:"string"},valid_at:{$ref:"#/$defs/UtcMicros"}},required:["mode","valid_at"],type:"object"},{properties:{from_valid_at:{$ref:"#/$defs/UtcMicros"},mode:{const:"evolution",type:"string"},through_valid_at:{$ref:"#/$defs/UtcMicros"}},required:["mode","from_valid_at","through_valid_at"],type:"object"},{properties:{from_observed_at:{$ref:"#/$defs/UtcMicros"},mode:{const:"forensic",type:"string"},through_observed_at:{$ref:"#/$defs/UtcMicros"}},required:["mode","from_observed_at","through_observed_at"],type:"object"}]},WorkProductAuthorizedRelationScopeV1:bJ,WorkProductSelectionScopeV1:b3},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{continuation:{type:["string","null"]},mode:{$ref:"#/$defs/WorkGraphReadModeV1"},observed_at:{$ref:"#/$defs/UtcMicros"},selection:{$ref:"#/$defs/WorkProductSelectionScopeV1"}},required:["selection","mode","observed_at"],title:"WorkGraphReadRequestV1",type:"object"},{$defs:{ActorId:mW,AttemptId:m1,AuthorizedWorkProductScopeV1:{additionalProperties:!1,description:"Owner identity resolved by the registered profile authority. It is never\naccepted from a Work request.",properties:{owner_brain_id:{$ref:"#/$defs/BrainId"},owner_profile_id:{$ref:"#/$defs/UserProfileId"},selection:{$ref:"#/$defs/WorkProductSelectionScopeV1"}},required:["owner_brain_id","owner_profile_id","selection"],type:"object"},BrainId:fs,ManifestDigest:gl,ProjectId:g2,ProjectionGenerationId:g9,ProposalId:g5,ProviderId:_i,RepositoryId:_v,RetrievalAnchorId:_q,RunId:_z,TaskEvidenceLinkV1:vx,TaskId:vC,UserProfileId:vB,UtcMicros:vK,VerifiedWorkGraphVersionV1:vZ,WorkAcceptanceCriterionV1:vQ,WorkAttemptIdentityV1:v2,WorkAttemptStateV1:v7,WorkCausalProjectionV1:{additionalProperties:!1,properties:{candidate_edges:{items:{$ref:"#/$defs/WorkDagEdgeV1"},type:"array"},graph_version:{format:"uint64",minimum:0,type:"integer"}},required:["graph_version","candidate_edges"],type:"object"},WorkCriticalPathProjectionV1:{additionalProperties:!1,properties:{graph_version:{format:"uint64",minimum:0,type:"integer"},task_ids:{items:{$ref:"#/$defs/TaskId"},type:"array"},total_effort:{format:"uint32",minimum:0,type:"integer"}},required:["graph_version","task_ids","total_effort"],type:"object"},WorkDagEdgeV1:{additionalProperties:!1,properties:{dependency:{$ref:"#/$defs/TaskId"},dependent:{$ref:"#/$defs/TaskId"}},required:["dependency","dependent"],type:"object"},WorkDagProjectionV1:{additionalProperties:!1,properties:{gating_edges:{items:{$ref:"#/$defs/WorkDagEdgeV1"},type:"array"},graph_version:{format:"uint64",minimum:0,type:"integer"},task_ids:{items:{$ref:"#/$defs/TaskId"},type:"array"}},required:["graph_version","task_ids","gating_edges"],type:"object"},WorkGraphSelectionCoverageV1:{description:"How much of the owner's journal the read's selection actually covers.\n\nA selection names a slice of the owner's work, not the whole journal: an\nevent records the relation scopes it was admitted under, and a selection\nthat does not name them puts that event *outside* the slice. The events\noutside a selection do not poison the ones inside it, but they must never be\nconcealed either, a caller who is shown the covered slice with no way to\nlearn that more exists is reading a silently incomplete graph.\n\nSo the read answers over the covered slice and says so, in the same\n`Complete`/`Partial` vocabulary [`WorkGraphTimelineCoverageV1`] and\n[`WorkHistoryCoverageV1`](crate::WorkHistoryCoverageV1) already use.\n\nThe covered slice is always a *prefix* of the journal, and that is a\nproperty of folding rather than a simplification. A graph version is folded\nfrom every event up to its own sequence, so the first event a selection does\nnot cover ends the readable slice: every later version, whatever scopes its\nown event named, would have to be folded across that event to exist at all.\n`excluded_events` therefore counts every event from the first uncovered one\nonward.",oneOf:[{description:"The selection covers the owner's whole journal. Nothing was withheld.",properties:{coverage:{const:"complete",type:"string"},covered_events:{format:"uint32",minimum:0,type:"integer"}},required:["coverage","covered_events"],type:"object"},{description:"The selection covers `covered_events` events and `excluded_events`\nevents lie outside it, starting at `first_excluded_sequence`. Every\nentry this read returned was folded from covered events alone.",properties:{coverage:{const:"partial",type:"string"},covered_events:{format:"uint32",minimum:0,type:"integer"},excluded_events:{format:"uint32",minimum:0,type:"integer"},first_excluded_sequence:{format:"uint64",minimum:0,type:"integer"}},required:["coverage","covered_events","excluded_events","first_excluded_sequence"],type:"object"}]},WorkGraphTimelineCoverageV1:{oneOf:[{properties:{coverage:{const:"complete",type:"string"},returned:{format:"uint32",minimum:0,type:"integer"}},required:["coverage","returned"],type:"object"},{properties:{continuation:{type:"string"},coverage:{const:"partial",type:"string"},returned:{format:"uint32",minimum:0,type:"integer"}},required:["coverage","returned","continuation"],type:"object"}]},WorkGraphTimelineV1:{additionalProperties:!1,properties:{coverage:{$ref:"#/$defs/WorkGraphTimelineCoverageV1"},entries:{items:{$ref:"#/$defs/WorkGraphVersionEntryV1"},type:"array"}},required:["entries","coverage"],type:"object"},WorkGraphVersionEntryV1:{additionalProperties:!1,description:"One immutable graph version and every Work projection derived from that\nsame version at the caller's explicit observation time.",properties:{graph:{$ref:"#/$defs/WorkProductGraphV1"},observed_at:{$ref:"#/$defs/UtcMicros"},projected_at:{$ref:"#/$defs/UtcMicros"},projections:{$ref:"#/$defs/WorkProductProjectionBundleV1"},runtime:{$ref:"#/$defs/WorkRuntimeProjectionV1"},valid_at:{$ref:"#/$defs/UtcMicros"},verified_version:{$ref:"#/$defs/VerifiedWorkGraphVersionV1"}},required:["valid_at","observed_at","projected_at","verified_version","graph","runtime","projections"],type:"object"},WorkHandoffV1:bT,WorkHierarchyV1:bO,WorkInitiativeV1:bE,WorkItemInputV1:bA,WorkItemV1:bM,WorkKanbanCardV1:{additionalProperties:!1,properties:{effort:{format:"uint32",minimum:0,type:"integer"},lane:{$ref:"#/$defs/WorkTimelineLaneV1"},legal_actions:{items:{$ref:"#/$defs/WorkLegalActionV1"},type:"array",uniqueItems:!0},task_id:{$ref:"#/$defs/TaskId"}},required:["task_id","lane","effort","legal_actions"],type:"object"},WorkKanbanProjectionV1:{additionalProperties:!1,properties:{cards:{items:{$ref:"#/$defs/WorkKanbanCardV1"},type:"array"},graph_version:{format:"uint64",minimum:0,type:"integer"}},required:["graph_version","cards"],type:"object"},WorkLegalActionV1:{enum:["view_evidence","generate_proposal","accept_proposal","link_accepted_attempt","accept_task","handoff","archive"],type:"string"},WorkMilestoneV1:bz,WorkPlanV1:bK,WorkProductAuthorizedRelationScopeV1:bJ,WorkProductGraphV1:b1,WorkProductProjectionBundleV1:{additionalProperties:!1,properties:{causal:{$ref:"#/$defs/WorkCausalProjectionV1"},critical_path:{$ref:"#/$defs/WorkCriticalPathProjectionV1"},dag:{$ref:"#/$defs/WorkDagProjectionV1"},graph_version:{format:"uint64",minimum:0,type:"integer"},kanban:{$ref:"#/$defs/WorkKanbanProjectionV1"},runtime:{$ref:"#/$defs/WorkRuntimeProjectionV1"},timeline:{$ref:"#/$defs/WorkTimelineProjectionV1"},workload:{$ref:"#/$defs/WorkWorkloadProjectionV1"}},required:["graph_version","runtime","kanban","dag","timeline","causal","critical_path","workload"],type:"object"},WorkProductSelectionScopeV1:b3,WorkProjectionSequenceV1:{format:"uint64",minimum:0,title:"WorkProjectionSequenceV1",type:"integer"},WorkProposalDecisionV1:b9,WorkProposalDispositionV1:b5,WorkProposalV1:b8,WorkProposedChildV1:b7,WorkProviderRouteId:$o,WorkProviderRouteV1:$n,WorkRelationReplanDecisionV1:$s,WorkRelationReplanProposalV1:$d,WorkRouteDecisionV1:$f,WorkRuntimeAttemptProjectionV1:{additionalProperties:!1,properties:{identity:{$ref:"#/$defs/WorkAttemptIdentityV1"},state:{$ref:"#/$defs/WorkAttemptStateV1"}},required:["identity","state"],type:"object"},WorkRuntimeProjectionCoverageV1:{oneOf:[{additionalProperties:!1,properties:{coverage:{const:"complete",type:"string"}},required:["coverage"],type:"object"},{additionalProperties:!1,properties:{coverage:{const:"partial",type:"string"},unavailable_attempts:{items:{$ref:"#/$defs/WorkAttemptIdentityV1"},type:"array",uniqueItems:!0}},required:["coverage","unavailable_attempts"],type:"object"},{additionalProperties:!1,properties:{coverage:{const:"unavailable",type:"string"}},required:["coverage"],type:"object"}]},WorkRuntimeProjectionV1:{additionalProperties:!1,properties:{attempts:{items:{$ref:"#/$defs/WorkRuntimeAttemptProjectionV1"},type:"array"},coverage:{$ref:"#/$defs/WorkRuntimeProjectionCoverageV1"},generation_id:{$ref:"#/$defs/ProjectionGenerationId"},graph_version:{format:"uint64",minimum:0,type:"integer"},observed_at:{$ref:"#/$defs/UtcMicros"},sequence:{$ref:"#/$defs/WorkProjectionSequenceV1"}},required:["graph_version","generation_id","sequence","observed_at","attempts","coverage"],type:"object"},WorkScoreKindV1:$$,WorkShapeAssessmentV1:$S,WorkSizingV1:$k,WorkTimelineEntryV1:{additionalProperties:!1,properties:{created_at:{$ref:"#/$defs/UtcMicros"},deadline:{anyOf:[{$ref:"#/$defs/UtcMicros"},{type:"null"}]},scheduled_at:{anyOf:[{$ref:"#/$defs/UtcMicros"},{type:"null"}]},task_id:{$ref:"#/$defs/TaskId"},updated_at:{$ref:"#/$defs/UtcMicros"}},required:["task_id","created_at","updated_at"],type:"object"},WorkTimelineLaneV1:{enum:["triage","todo","scheduled","ready","running","blocked","review","done","archived","cancelled","unavailable"],type:"string"},WorkTimelineProjectionV1:{additionalProperties:!1,properties:{entries:{items:{$ref:"#/$defs/WorkTimelineEntryV1"},type:"array"},graph_version:{format:"uint64",minimum:0,type:"integer"}},required:["graph_version","entries"],type:"object"},WorkWorkloadProjectionV1:{additionalProperties:!1,properties:{actual_concurrency:{format:"uint32",minimum:0,type:["integer","null"]},blocked_effort:{format:"uint32",minimum:0,type:["integer","null"]},graph_version:{format:"uint64",minimum:0,type:"integer"},ready_effort:{format:"uint32",minimum:0,type:["integer","null"]},requested_concurrency:{format:"uint32",minimum:0,type:["integer","null"]},running_effort:{format:"uint32",minimum:0,type:["integer","null"]},total_effort:{format:"uint32",minimum:0,type:"integer"}},required:["graph_version","total_effort"],type:"object"}},$schema:"https://json-schema.org/draft/2020-12/schema",oneOf:[{properties:{authorized_scope:{$ref:"#/$defs/AuthorizedWorkProductScopeV1"},mode:{const:"current",type:"string"},selection_coverage:{$ref:"#/$defs/WorkGraphSelectionCoverageV1"},snapshot:{$ref:"#/$defs/WorkGraphVersionEntryV1"}},required:["mode","authorized_scope","selection_coverage","snapshot"],type:"object"},{properties:{authorized_scope:{$ref:"#/$defs/AuthorizedWorkProductScopeV1"},mode:{const:"as_of",type:"string"},selection_coverage:{$ref:"#/$defs/WorkGraphSelectionCoverageV1"},snapshot:{$ref:"#/$defs/WorkGraphVersionEntryV1"}},required:["mode","authorized_scope","selection_coverage","snapshot"],type:"object"},{properties:{authorized_scope:{$ref:"#/$defs/AuthorizedWorkProductScopeV1"},mode:{const:"evolution",type:"string"},selection_coverage:{$ref:"#/$defs/WorkGraphSelectionCoverageV1"},timeline:{$ref:"#/$defs/WorkGraphTimelineV1"}},required:["mode","authorized_scope","selection_coverage","timeline"],type:"object"},{properties:{authorized_scope:{$ref:"#/$defs/AuthorizedWorkProductScopeV1"},mode:{const:"forensic",type:"string"},selection_coverage:{$ref:"#/$defs/WorkGraphSelectionCoverageV1"},timeline:{$ref:"#/$defs/WorkGraphTimelineV1"}},required:["mode","authorized_scope","selection_coverage","timeline"],type:"object"},{description:"A `Current` or `AsOf` point read under an authorized selection that has\nno published graph version at that point: no task has been created yet.\nThe caller was authorized; the legal next action is creating a task.",properties:{authorized_scope:{$ref:"#/$defs/AuthorizedWorkProductScopeV1"},mode:{const:"absent",type:"string"},selection_coverage:{$ref:"#/$defs/WorkGraphSelectionCoverageV1"}},required:["mode","authorized_scope","selection_coverage"],type:"object"}],title:"WorkGraphReadV1"},{$defs:{WorkflowDefinitionId:$I},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Wire request for [`WorkflowDefinitionService::activate`].",properties:{definition_id:{$ref:"#/$defs/WorkflowDefinitionId"},definition_version:{format:"uint64",minimum:1,type:"integer"},expected_revision:{description:"Current candidate disposition revision. A newly registered candidate\nstarts at revision 1; activation reports expected and observed values\nwhen this compare-and-swap precondition is stale.",format:"uint64",minimum:1,type:"integer"}},required:["definition_id","definition_version","expected_revision"],title:"WorkflowDefinitionActivateRequest",type:"object"},{$defs:{UtcMicros:vK,WorkflowDefinitionId:$I,WorkflowDefinitionLifecycleState:{description:'Durable lifecycle disposition of one immutable workflow definition version.\n\nPlan 32 ("Typed workflow definitions"): "Lifecycle retains candidate,\nvalidate, activate, retire, reject, list, get, diff, and history operations\nthrough the same application surfaces." The definition payload itself stays\nimmutable, "Editing creates a new version; admitted runs remain pinned",\nso the disposition is a separate revisioned aggregate keyed by the same\ndefinition identity.',enum:["candidate","validated","active","retired","rejected"],type:"string"}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Revisioned lifecycle disposition of one definition version.",properties:{definition_id:{$ref:"#/$defs/WorkflowDefinitionId"},definition_version:{format:"uint64",minimum:1,type:"integer"},revision:{format:"uint64",minimum:1,type:"integer"},state:{$ref:"#/$defs/WorkflowDefinitionLifecycleState"},transitioned_at:{$ref:"#/$defs/UtcMicros"}},required:["definition_id","definition_version","state","revision","transitioned_at"],title:"WorkflowDefinitionDisposition",type:"object"},{$defs:{RunId:_z,WorkCommandId:bc},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Requests cooperative cancellation as a durable typed transition; the run\nsettles to `Cancelled` when the runtime reconciles in-flight steps.",properties:{command_id:{$ref:"#/$defs/WorkCommandId"},expected_sequence:{format:"uint64",minimum:0,type:"integer"},run_id:{$ref:"#/$defs/RunId"}},required:["run_id","expected_sequence","command_id"],title:"WorkflowRunCancelRequest",type:"object"},{$defs:{ActorId:mW,AttemptId:m1,AutomaticWorktreeGcV1:m3,BranchCollisionPolicyV1:fd,BranchNameComponentV1:fc,BranchNameSeparatorV1:fl,BranchNamingPolicyV1:fp,BranchTopologyKindV1:f_,BranchTopologyPolicyV1:fv,CanonicalGitRefNameV1:fR,CanonicalGitRefPrefix:fP,CapabilityId:fV,CommitId:fH,ConfigurationRevisionId:f0,ConfigurationSnapshotId:f2,CredentialReferenceId:hq,CrossMergeModeV1:hI,CrossMergePolicyV1:hx,GitHubStackedPullRequestPolicyV1:yP,HistoryRewritePolicyV1:yU,LocatorDigest:gr,ManifestDigest:gl,ProjectId:g2,ProposalId:g5,ProtectedRefDispositionV1:g8,ProtectedRefRuleV1:g7,ProtectedRefSelectorV1:_e,ProviderId:_i,RefId:_u,RepositoryId:_v,RepositoryPlacementScopeV1:_b,RequiredCheckExpectationV1:_$,RequiredCheckV1:_S,ReviewRequirementV1:_T,ReviewTopologyKindV1:_O,ReviewTopologyPolicyV1:_E,RunId:_z,SensitiveFilesystemLocatorV1:_2,TaskId:vC,TopologyConcurrencyPolicyV1:vF,TopologyEscalationPolicyV1:vL,TopologyGatePolicyV1:vU,TopologyNotificationLevelV1:vH,UtcMicros:vK,WorkAcceptanceCriterionV1:vQ,WorkApprovalPolicy:vX,WorkArtifactId:vY,WorkArtifactRefV1:v1,WorkAttemptIdentityV1:v2,WorkAuthority:{additionalProperties:!1,properties:{actor_id:{$ref:"#/$defs/ActorId"},policy_digest:{$ref:"#/$defs/ManifestDigest"},project_id:{$ref:"#/$defs/ProjectId"},repository_id:{$ref:"#/$defs/RepositoryId"},worktree_id:{$ref:"#/$defs/WorktreeId"}},required:["project_id","repository_id","worktree_id","actor_id","policy_digest"],type:"object"},WorkCommandId:bc,WorkEffectStateV1:bm,WorkEgressPolicy:bh,WorkExecutableReference:bb,WorkExecutionLimits:bS,WorkExecutionSnapshot:bk,WorkFallbackTopology:bP,WorkFilesystemPolicy:bq,WorkHandoffV1:bT,WorkHierarchyV1:bO,WorkInitiativeV1:bE,WorkItemInputV1:bA,WorkItemV1:bM,WorkMilestoneV1:bz,WorkPlanV1:bK,WorkProposalV1:b8,WorkProposedChildV1:b7,WorkProviderBackendV1:$t,WorkProviderProtocol:$i,WorkProviderRouteId:$o,WorkProviderRouteV1:$n,WorkRouteDecisionV1:$f,WorkSandboxPolicy:$b,WorkScoreKindV1:$$,WorkShapeAssessmentV1:$S,WorkSizingV1:$k,WorkTopologyPolicyV1:$V,WorkflowDefinition:$q,WorkflowDefinitionId:$I,WorkflowFanOut:$x,WorkflowFanOutChildPlanV1:{additionalProperties:!1,properties:{admit_command_id:{$ref:"#/$defs/WorkCommandId"},attempt_identity:{$ref:"#/$defs/WorkAttemptIdentityV1"},create_command_id:{$ref:"#/$defs/WorkCommandId"},initiative:{$ref:"#/$defs/WorkInitiativeV1"},instructions:{type:"string"},item:{$ref:"#/$defs/WorkItemV1"},milestone:{$ref:"#/$defs/WorkMilestoneV1"},plan:{$ref:"#/$defs/WorkPlanV1"},proposal:{$ref:"#/$defs/WorkProposalV1"},proposal_command_id:{$ref:"#/$defs/WorkCommandId"},task_id:{$ref:"#/$defs/TaskId"}},required:["task_id","attempt_identity","create_command_id","proposal_command_id","admit_command_id","initiative","plan","milestone","item","proposal","instructions"],type:"object"},WorkflowFanOutFailurePolicyV1:{oneOf:[{properties:{policy:{const:"fail_fast",type:"string"}},required:["policy"],type:"object"},{properties:{policy:{const:"collect",type:"string"}},required:["policy"],type:"object"},{properties:{policy:{const:"require_at_least",type:"string"},successes:{format:"uint16",maximum:65535,minimum:1,type:"integer"}},required:["policy","successes"],type:"object"}]},WorkflowFanOutPlanV1:{additionalProperties:!1,properties:{admitted_at:{$ref:"#/$defs/UtcMicros"},authority:{$ref:"#/$defs/WorkAuthority",description:"Exact Work authority that admitted this plan. Recovery may execute the\nplan only from a runtime with this byte-identical authority."},children:{items:{$ref:"#/$defs/WorkflowFanOutChildPlanV1"},type:"array"},commit:{$ref:"#/$defs/CommitId"},effect_state:{$ref:"#/$defs/WorkEffectStateV1"},execution_snapshot:{$ref:"#/$defs/WorkExecutionSnapshot"},failure_policy:{$ref:"#/$defs/WorkflowFanOutFailurePolicyV1"},maximum_parallel:{format:"uint16",maximum:65535,minimum:1,type:"integer"},operation:{$ref:"#/$defs/WorkflowOperationRef"},plan_digest:{$ref:"#/$defs/ManifestDigest"},reference:{anyOf:[{$ref:"#/$defs/RefId"},{type:"null"}]},step_id:{$ref:"#/$defs/WorkflowStepId"}},required:["authority","step_id","operation","plan_digest","admitted_at","maximum_parallel","failure_policy","execution_snapshot","commit","effect_state","children"],type:"object"},WorkflowOperationRef:$j,WorkflowOutputArtifact:{additionalProperties:!1,properties:{artifact:{$ref:"#/$defs/WorkArtifactRefV1"},attempt_identity:{$ref:"#/$defs/WorkAttemptIdentityV1"}},required:["attempt_identity","artifact"],type:"object"},WorkflowOutputName:$C,WorkflowOutputReference:$T,WorkflowPlacementReceipt:{additionalProperties:!1,properties:{backend:{$ref:"#/$defs/WorkProviderBackendV1"},configuration_digest:{$ref:"#/$defs/ManifestDigest"},model:{type:"string"},placement_digest:{$ref:"#/$defs/ManifestDigest"},provider_registry_digest:{$ref:"#/$defs/ManifestDigest"},route:{$ref:"#/$defs/WorkProviderRouteV1"},run_id:{$ref:"#/$defs/RunId"},step_id:{$ref:"#/$defs/WorkflowStepId"},topology_digest:{$ref:"#/$defs/ManifestDigest"},worktree_placement:{$ref:"#/$defs/WorktreePlacementModeV1"}},required:["run_id","step_id","route","backend","model","configuration_digest","topology_digest","provider_registry_digest","worktree_placement","placement_digest"],type:"object"},WorkflowRunEvent:{additionalProperties:!1,properties:{command_id:{$ref:"#/$defs/WorkCommandId"},event:{$ref:"#/$defs/WorkflowRunEventKind"},input_digest:{$ref:"#/$defs/ManifestDigest"},occurred_at:{$ref:"#/$defs/UtcMicros"},run_id:{$ref:"#/$defs/RunId"},sequence:{format:"uint64",minimum:0,type:"integer"}},required:["run_id","sequence","command_id","input_digest","occurred_at","event"],type:"object"},WorkflowRunEventKind:{oneOf:[{properties:{definition:{$ref:"#/$defs/WorkflowDefinition"},fan_out_plans:{default:[],items:{$ref:"#/$defs/WorkflowFanOutPlanV1"},type:"array"},pinned_provider_registry_digest:{$ref:"#/$defs/ManifestDigest"},pinned_topology_digest:{$ref:"#/$defs/ManifestDigest"},type:{const:"admitted",type:"string"}},required:["type","definition","pinned_topology_digest","pinned_provider_registry_digest"],type:"object"},{properties:{attempts:{items:{$ref:"#/$defs/WorkAttemptIdentityV1"},type:"array"},step_id:{$ref:"#/$defs/WorkflowStepId"},type:{const:"fan_out_children_released",type:"string"}},required:["type","step_id","attempts"],type:"object"},{properties:{attempts:{items:{$ref:"#/$defs/WorkAttemptIdentityV1"},type:"array"},step_id:{$ref:"#/$defs/WorkflowStepId"},type:{const:"fan_out_children_settled",type:"string"}},required:["type","step_id","attempts"],type:"object"},{properties:{planned_attempt:{$ref:"#/$defs/WorkAttemptIdentityV1"},prior_attempt:{$ref:"#/$defs/WorkAttemptIdentityV1"},replacement_attempt:{$ref:"#/$defs/WorkAttemptIdentityV1"},retry_receipt_digest:{$ref:"#/$defs/ManifestDigest"},step_id:{$ref:"#/$defs/WorkflowStepId"},type:{const:"fan_out_child_retry_rebound",type:"string"}},required:["type","step_id","planned_attempt","prior_attempt","replacement_attempt","retry_receipt_digest"],type:"object"},{properties:{placement:{$ref:"#/$defs/WorkflowPlacementReceipt"},step_id:{$ref:"#/$defs/WorkflowStepId"},type:{const:"step_started",type:"string"}},required:["type","step_id","placement"],type:"object"},{properties:{effect_receipt:{$ref:"#/$defs/WorkflowStepEffectReceipt"},outputs:{items:{$ref:"#/$defs/WorkflowStepOutput"},type:"array"},step_id:{$ref:"#/$defs/WorkflowStepId"},type:{const:"step_completed",type:"string"}},required:["type","step_id","outputs","effect_receipt"],type:"object"},{properties:{effect_receipt:{$ref:"#/$defs/WorkflowStepEffectReceipt"},outputs:{items:{$ref:"#/$defs/WorkflowStepOutput"},type:"array"},step_id:{$ref:"#/$defs/WorkflowStepId"},type:{const:"step_failed",type:"string"}},required:["type","step_id","outputs","effect_receipt"],type:"object"},{properties:{type:{const:"paused",type:"string"}},required:["type"],type:"object"},{properties:{type:{const:"resumed",type:"string"}},required:["type"],type:"object"},{properties:{type:{const:"cancellation_requested",type:"string"}},required:["type"],type:"object"},{properties:{type:{const:"cancelled",type:"string"}},required:["type"],type:"object"}]},WorkflowRunStatus:{enum:["running","paused","cancelling","completed","failed","cancelled"],type:"string"},WorkflowStep:$O,WorkflowStepEffectOutcome:{enum:["completed","failed","cancelled","timed_out","unknown"],type:"string"},WorkflowStepEffectReceipt:{additionalProperties:!1,properties:{effect_digest:{$ref:"#/$defs/ManifestDigest"},outcome:{$ref:"#/$defs/WorkflowStepEffectOutcome"},output_set_digest:{$ref:"#/$defs/ManifestDigest"},placement_digest:{$ref:"#/$defs/ManifestDigest"},receipt_digest:{$ref:"#/$defs/ManifestDigest"},run_id:{$ref:"#/$defs/RunId"},step_id:{$ref:"#/$defs/WorkflowStepId"}},required:["run_id","step_id","placement_digest","outcome","effect_digest","output_set_digest","receipt_digest"],type:"object"},WorkflowStepId:$E,WorkflowStepOutput:{additionalProperties:!1,properties:{artifacts:{items:{$ref:"#/$defs/WorkflowOutputArtifact"},type:"array"},output_name:{$ref:"#/$defs/WorkflowOutputName"}},required:["output_name","artifacts"],type:"object"},WorkflowStepRunProjection:{additionalProperties:!1,properties:{effect_receipt:{anyOf:[{$ref:"#/$defs/WorkflowStepEffectReceipt"},{type:"null"}]},outputs:{additionalProperties:{$ref:"#/$defs/WorkflowStepOutput"},type:"object"},placement_receipt:{anyOf:[{$ref:"#/$defs/WorkflowPlacementReceipt"},{type:"null"}]},status:{$ref:"#/$defs/WorkflowStepStatus"}},required:["status","outputs"],type:"object"},WorkflowStepStatus:{enum:["blocked","ready","running","succeeded","failed","cancelled"],type:"string"},WorktreeCleanlinessRequirementV1:$A,WorktreeId:$M,WorktreePlacementModeV1:$z,WorktreeRetentionPolicyV1:$D,WorktreeRootPolicyV1:$F},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{definition:{$ref:"#/$defs/WorkflowDefinition"},fan_out_plans:{additionalProperties:{$ref:"#/$defs/WorkflowFanOutPlanV1"},type:"object"},history:{items:{$ref:"#/$defs/WorkflowRunEvent"},type:"array"},pinned_provider_registry_digest:{$ref:"#/$defs/ManifestDigest"},pinned_topology_digest:{$ref:"#/$defs/ManifestDigest"},released_fan_out_attempts:{items:{$ref:"#/$defs/WorkAttemptIdentityV1"},type:"array",uniqueItems:!0},run_id:{$ref:"#/$defs/RunId"},sequence:{format:"uint64",minimum:0,type:"integer"},settled_fan_out_attempts:{items:{$ref:"#/$defs/WorkAttemptIdentityV1"},type:"array",uniqueItems:!0},status:{$ref:"#/$defs/WorkflowRunStatus"},steps:{additionalProperties:{$ref:"#/$defs/WorkflowStepRunProjection"},type:"object"}},required:["run_id","definition","pinned_topology_digest","pinned_provider_registry_digest","status","sequence","steps","fan_out_plans","released_fan_out_attempts","settled_fan_out_attempts","history"],title:"WorkflowRunProjection",type:"object"},{$defs:{WorkflowDefinitionId:$I},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Wire request for [`WorkflowDefinitionService::history`].",properties:{definition_id:{$ref:"#/$defs/WorkflowDefinitionId"}},required:["definition_id"],title:"WorkflowDefinitionHistoryRequest",type:"object"},{$defs:{ManifestDigest:gl,ProjectId:g2,WorkflowDefinition:$q,WorkflowDefinitionId:$I,WorkflowFanOut:$x,WorkflowOperationRef:$j,WorkflowOutputName:$C,WorkflowOutputReference:$T,WorkflowStep:$O,WorkflowStepId:$E},$schema:"https://json-schema.org/draft/2020-12/schema",items:{$ref:"#/$defs/WorkflowDefinition"},title:"Array_of_WorkflowDefinition",type:"array"},{$defs:{WorkflowDefinitionId:$I},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Wire request for [`WorkflowDefinitionService::diff`].",properties:{definition_id:{$ref:"#/$defs/WorkflowDefinitionId"},from_version:{format:"uint64",minimum:1,type:"integer"},to_version:{format:"uint64",minimum:1,type:"integer"}},required:["definition_id","from_version","to_version"],title:"WorkflowDefinitionDiffRequest",type:"object"},{$defs:{WorkflowDefinitionId:$I,WorkflowStepId:$E},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{catalog_changed:{type:"boolean"},changed_steps:{items:{$ref:"#/$defs/WorkflowStepId"},type:"array",uniqueItems:!0},configuration_changed:{type:"boolean"},definition_id:{$ref:"#/$defs/WorkflowDefinitionId"},from_version:{format:"uint64",minimum:0,type:"integer"},policy_changed:{type:"boolean"},to_version:{format:"uint64",minimum:0,type:"integer"}},required:["definition_id","from_version","to_version","changed_steps","policy_changed","configuration_changed","catalog_changed"],title:"WorkflowDefinitionDiff",type:"object"},{$defs:{WorkflowDefinitionId:$I},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Wire request for [`WorkflowDefinitionService::get`].",properties:{definition_id:{$ref:"#/$defs/WorkflowDefinitionId"},definition_version:{format:"uint64",minimum:1,type:"integer"}},required:["definition_id","definition_version"],title:"WorkflowDefinitionGetRequest",type:"object"},{$defs:{ManifestDigest:gl,ProjectId:g2,WorkflowDefinitionId:$I,WorkflowFanOut:$x,WorkflowOperationRef:$j,WorkflowOutputName:$C,WorkflowOutputReference:$T,WorkflowStep:$O,WorkflowStepId:$E},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{definition_id:{$ref:"#/$defs/WorkflowDefinitionId"},definition_version:{format:"uint64",minimum:0,type:"integer"},pinned_catalog_digest:{$ref:"#/$defs/ManifestDigest",description:"Must equal the live Work executable catalog digest. Validation and\nactivation report the current digest when this pin is stale."},pinned_configuration_digest:{$ref:"#/$defs/ManifestDigest"},pinned_policy_digest:{$ref:"#/$defs/ManifestDigest"},project_id:{$ref:"#/$defs/ProjectId"},steps:{items:{$ref:"#/$defs/WorkflowStep"},type:"array"}},required:["definition_id","definition_version","project_id","steps","pinned_policy_digest","pinned_configuration_digest","pinned_catalog_digest"],title:"WorkflowDefinition",type:"object"},{$defs:{RunId:_z},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{run_id:{$ref:"#/$defs/RunId"}},required:["run_id"],title:"WorkflowRunGetRequest",type:"object"},{$defs:{ActorId:mW,AttemptId:m1,ManifestDigest:gl,ProjectId:g2,RepositoryId:_v,RunId:_z,TaskHandoffScope:vj,TaskId:vC,ThreadId:vN,UtcMicros:vK,WorkAttemptIdentityV1:v2,WorkAttemptStateV1:v7,WorkHandoffAttemptFrontierV1:bx,WorkHandoffFrontierV1:bj,WorkHandoffLineageV1:bC,WorkflowDefinitionId:$I,WorkflowStepId:$E,WorktreeId:$M},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Wire request for [`TaskHandoffService::issue`].\n\n`secret` is the caller-supplied bearer token; the authority persists only\nits digest, never the secret itself. The scope must name a step the\nActive definition version declares and a run admitted from that version;\nany other scope is refused as not found and journals no grant.",properties:{frontier:{$ref:"#/$defs/WorkHandoffFrontierV1",description:"The exact work/evidence frontier this handoff records (Plan 24)."},scope:{$ref:"#/$defs/TaskHandoffScope"},secret:{type:"string"}},required:["scope","secret","frontier"],title:"TaskHandoffIssueRequest",type:"object"},{$defs:{ActorId:mW,AttemptId:m1,ManifestDigest:gl,ProjectId:g2,RepositoryId:_v,RunId:_z,TaskHandoffScope:vj,TaskId:vC,ThreadId:vN,UtcMicros:vK,WorkAttemptIdentityV1:v2,WorkAttemptStateV1:v7,WorkHandoffAttemptFrontierV1:bx,WorkHandoffFrontierV1:bj,WorkHandoffLineageV1:bC,WorkflowDefinitionId:$I,WorkflowStepId:$E,WorktreeId:$M},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{expires_at:{$ref:"#/$defs/UtcMicros"},frontier:{$ref:"#/$defs/WorkHandoffFrontierV1",description:"The exact work/evidence frontier this handoff records (Plan 24)."},frontier_digest:{$ref:"#/$defs/ManifestDigest",description:"The canonical digest of `frontier`; lineage chains hold this value."},issued_at:{$ref:"#/$defs/UtcMicros"},scope:{$ref:"#/$defs/TaskHandoffScope"},token_digest:{$ref:"#/$defs/ManifestDigest"}},required:["scope","token_digest","issued_at","expires_at","frontier","frontier_digest"],title:"TaskHandoffGrant",type:"object"},{$defs:{ActorId:mW,ProjectId:g2,RepositoryId:_v,RunId:_z,TaskHandoffScope:vj,TaskId:vC,ThreadId:vN,WorkflowDefinitionId:$I,WorkflowStepId:$E,WorktreeId:$M},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Wire request for [`TaskHandoffService::redeem`].",properties:{expected_scope:{$ref:"#/$defs/TaskHandoffScope"},secret:{type:"string"}},required:["secret","expected_scope"],title:"TaskHandoffRedeemRequest",type:"object"},{$defs:{ActorId:mW,AttemptId:m1,ManifestDigest:gl,ProjectId:g2,RepositoryId:_v,RunId:_z,TaskHandoffScope:vj,TaskId:vC,ThreadId:vN,UtcMicros:vK,WorkAttemptIdentityV1:v2,WorkAttemptStateV1:v7,WorkHandoffAttemptFrontierV1:bx,WorkHandoffFrontierV1:bj,WorkHandoffLineageV1:bC,WorkflowDefinitionId:$I,WorkflowStepId:$E,WorktreeId:$M},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Wire response for [`TaskHandoffService::redeem`]: the redemption receipt,\nonce and only once, for the caller that actually consumed the grant.\n\nThe receipt is checkpoint evidence only. It deliberately carries no\nlease, fence, or acceptance authority: redeeming a handoff cannot renew\na lease, establish task acceptance, or mutate graph or runtime state\n(Plan 24). The redeemer must earn runtime authority through the normal\nadmission and lease paths.",properties:{frontier:{$ref:"#/$defs/WorkHandoffFrontierV1",description:"The frontier exactly as the issuer recorded it."},frontier_digest:{$ref:"#/$defs/ManifestDigest",description:"The canonical digest of `frontier`, for lineage chaining."},redeemed_at:{$ref:"#/$defs/UtcMicros"},scope:{$ref:"#/$defs/TaskHandoffScope"}},required:["scope","frontier","frontier_digest","redeemed_at"],title:"TaskHandoffRedeemed",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Wire request for [`WorkflowDefinitionService::list`].",title:"WorkflowDefinitionListRequest",type:"object"},{$defs:{RunId:_z,WorkCommandId:bc},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{command_id:{$ref:"#/$defs/WorkCommandId"},expected_sequence:{format:"uint64",minimum:0,type:"integer"},run_id:{$ref:"#/$defs/RunId"}},required:["run_id","expected_sequence","command_id"],title:"WorkflowRunPauseRequest",type:"object"},{$defs:{ManifestDigest:gl,ProjectId:g2,WorkflowDefinition:$q,WorkflowDefinitionId:$I,WorkflowFanOut:$x,WorkflowOperationRef:$j,WorkflowOutputName:$C,WorkflowOutputReference:$T,WorkflowStep:$O,WorkflowStepId:$E},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Wire request for [`WorkflowDefinitionService::register`].",properties:{definition:{$ref:"#/$defs/WorkflowDefinition"}},required:["definition"],title:"WorkflowDefinitionRegisterRequest",type:"object"},{$defs:{WorkflowDefinitionId:$I},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Wire request for [`WorkflowDefinitionService::reject`].",properties:{definition_id:{$ref:"#/$defs/WorkflowDefinitionId"},definition_version:{format:"uint64",minimum:1,type:"integer"},expected_revision:{format:"uint64",minimum:1,type:"integer"}},required:["definition_id","definition_version","expected_revision"],title:"WorkflowDefinitionRejectRequest",type:"object"},{$defs:{RunId:_z,WorkCommandId:bc},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{command_id:{$ref:"#/$defs/WorkCommandId"},expected_sequence:{format:"uint64",minimum:0,type:"integer"},run_id:{$ref:"#/$defs/RunId"}},required:["run_id","expected_sequence","command_id"],title:"WorkflowRunResumeRequest",type:"object"},{$defs:{WorkflowDefinitionId:$I},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Wire request for [`WorkflowDefinitionService::retire`].",properties:{definition_id:{$ref:"#/$defs/WorkflowDefinitionId"},definition_version:{format:"uint64",minimum:1,type:"integer"},expected_revision:{format:"uint64",minimum:1,type:"integer"}},required:["definition_id","definition_version","expected_revision"],title:"WorkflowDefinitionRetireRequest",type:"object"},{$defs:{ActorId:mW,AttemptId:m1,AutomaticWorktreeGcV1:m3,BranchCollisionPolicyV1:fd,BranchNameComponentV1:fc,BranchNameSeparatorV1:fl,BranchNamingPolicyV1:fp,BranchTopologyKindV1:f_,BranchTopologyPolicyV1:fv,CanonicalGitRefNameV1:fR,CanonicalGitRefPrefix:fP,CapabilityId:fV,CommitId:fH,ConfigurationRevisionId:f0,ConfigurationSnapshotId:f2,CredentialReferenceId:hq,CrossMergeModeV1:hI,CrossMergePolicyV1:hx,GitHubStackedPullRequestPolicyV1:yP,HistoryRewritePolicyV1:yU,LocatorDigest:gr,ManifestDigest:gl,ProposalId:g5,ProtectedRefDispositionV1:g8,ProtectedRefRuleV1:g7,ProtectedRefSelectorV1:_e,ProviderId:_i,RefId:_u,RepositoryId:_v,RepositoryPlacementScopeV1:_b,RequiredCheckExpectationV1:_$,RequiredCheckV1:_S,ReviewRequirementV1:_T,ReviewTopologyKindV1:_O,ReviewTopologyPolicyV1:_E,RunId:_z,SensitiveFilesystemLocatorV1:_2,TaskId:vC,TopologyConcurrencyPolicyV1:vF,TopologyEscalationPolicyV1:vL,TopologyGatePolicyV1:vU,TopologyNotificationLevelV1:vH,UtcMicros:vK,WorkAcceptanceCriterionV1:vQ,WorkApprovalPolicy:vX,WorkAttemptIdentityV1:v2,WorkCommandId:bc,WorkEffectStateV1:bm,WorkEgressPolicy:bh,WorkExecutableReference:bb,WorkExecutionLimits:bS,WorkExecutionSnapshot:bk,WorkFallbackTopology:bP,WorkFenceEpochV1:bV,WorkFilesystemPolicy:bq,WorkHandoffV1:bT,WorkHierarchyV1:bO,WorkInitiativeV1:bE,WorkItemInputV1:bA,WorkItemV1:bM,WorkLeaseFenceV1:bW,WorkLeaseId:bN,WorkMilestoneV1:bz,WorkPlanV1:bK,WorkProposalV1:b8,WorkProposedChildV1:b7,WorkProviderBackendV1:$t,WorkProviderProtocol:$i,WorkProviderRouteId:$o,WorkProviderRouteV1:$n,WorkRouteDecisionV1:$f,WorkSandboxPolicy:$b,WorkScoreKindV1:$$,WorkShapeAssessmentV1:$S,WorkSizingV1:$k,WorkTopologyPolicyV1:$V,WorkflowDefinitionId:$I,WorkflowExecutionFence:{additionalProperties:!1,properties:{attempt_id:{$ref:"#/$defs/AttemptId"},lease:{$ref:"#/$defs/WorkLeaseFenceV1"}},required:["attempt_id","lease"],type:"object"},WorkflowFailurePolicy:{oneOf:[{properties:{policy:{const:"fail_fast",type:"string"}},required:["policy"],type:"object"},{properties:{policy:{const:"collect",type:"string"}},required:["policy"],type:"object"},{properties:{policy:{const:"require_at_least",type:"string"},successes:{format:"uint32",minimum:1,type:"integer"}},required:["policy","successes"],type:"object"}]},WorkflowFanOutInput:{additionalProperties:!1,properties:{initiative:{$ref:"#/$defs/WorkInitiativeV1"},input_digest:{$ref:"#/$defs/ManifestDigest"},instructions:{type:"string"},item:{$ref:"#/$defs/WorkItemV1"},milestone:{$ref:"#/$defs/WorkMilestoneV1"},plan:{$ref:"#/$defs/WorkPlanV1"},proposal:{$ref:"#/$defs/WorkProposalV1"}},required:["instructions","input_digest","initiative","plan","milestone","item","proposal"],type:"object"},WorkflowFanOutStartV1:{additionalProperties:!1,description:"Caller input required to durably plan the entry fan-out of a workflow run.\nDaemon-owned registration and topology digests are resolved at admission.",properties:{commit:{$ref:"#/$defs/CommitId"},effect_state:{$ref:"#/$defs/WorkEffectStateV1"},execution_snapshot:{$ref:"#/$defs/WorkExecutionSnapshot"},failure_policy:{$ref:"#/$defs/WorkflowFailurePolicy"},fence:{$ref:"#/$defs/WorkflowExecutionFence"},inputs:{items:{$ref:"#/$defs/WorkflowFanOutInput"},type:"array"},max_parallel:{format:"uint32",minimum:1,type:"integer"},reference:{anyOf:[{$ref:"#/$defs/RefId"},{type:"null"}]}},required:["fence","max_parallel","failure_policy","execution_snapshot","commit","effect_state","inputs"],type:"object"},WorkflowProviderRegistration:{additionalProperties:!1,properties:{backend:{$ref:"#/$defs/WorkProviderBackendV1"},model:{type:"string"},priority:{format:"uint32",minimum:0,type:"integer"},route:{$ref:"#/$defs/WorkProviderRouteV1"}},required:["route","backend","model","priority"],type:"object"},WorktreeCleanlinessRequirementV1:$A,WorktreePlacementModeV1:$z,WorktreeRetentionPolicyV1:$D,WorktreeRootPolicyV1:$F},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Starts (admits) a journaled workflow run from an active definition.\n\nThe daemon derives every admission digest itself: the definition's own\npinned policy/configuration/catalog digests are checked against the live\nenvironment, the topology digest comes from the evaluated topology policy,\nand the provider registry digest is computed from this registration. The\ncaller never supplies a digest the runtime must trust.",properties:{command_id:{$ref:"#/$defs/WorkCommandId"},definition_id:{$ref:"#/$defs/WorkflowDefinitionId"},definition_version:{format:"uint64",minimum:1,type:"integer"},fan_out:{anyOf:[{$ref:"#/$defs/WorkflowFanOutStartV1"},{type:"null"}]},provider:{$ref:"#/$defs/WorkflowProviderRegistration"},run_id:{$ref:"#/$defs/RunId"}},required:["run_id","definition_id","definition_version","provider","command_id"],title:"WorkflowRunStartRequest",type:"object"},{$defs:{ManifestDigest:gl,ProjectId:g2,WorkflowDefinition:$q,WorkflowDefinitionId:$I,WorkflowFanOut:$x,WorkflowOperationRef:$j,WorkflowOutputName:$C,WorkflowOutputReference:$T,WorkflowStep:$O,WorkflowStepId:$E},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Wire request for [`WorkflowDefinitionService::validate`].",properties:{definition:{$ref:"#/$defs/WorkflowDefinition"}},required:["definition"],title:"WorkflowDefinitionValidateRequest",type:"object"},{$defs:{ManifestDigest:gl,ProjectId:g2,WorkflowDefinition:$q,WorkflowDefinitionId:$I,WorkflowFanOut:$x,WorkflowOperationRef:$j,WorkflowOutputName:$C,WorkflowOutputReference:$T,WorkflowStep:$O,WorkflowStepId:$E},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{definition:{$ref:"#/$defs/WorkflowDefinition"}},required:["definition"],title:"WorkflowDefinitionValidation",type:"object"}].map(e=>t=>(!function e(t,r,i,o,n){var a;if("boolean"==typeof r){if(!r)throw TypeError(`${o} is rejected by the canonical schema`);return}let s=mR(r,o);if("string"==typeof s.$ref){if(n.has(s.$ref))throw TypeError(`cyclic canonical schema reference: ${s.$ref}`);n.add(s.$ref),e(t,function(e,t){if(!t.startsWith("#/"))throw TypeError(`unsupported canonical schema reference: ${t}`);let r=e;for(let e of t.slice(2).split("/")){let i=e.replaceAll("~1","/").replaceAll("~0","~");r=mR(r,t)[i]}return mR(r,t)}(i,s.$ref),i,o,n),n.delete(s.$ref);return}if("const"in s&&(a=s.const,mw(t)!==mw(a)))throw TypeError(`${o} does not match the canonical constant`);if(Array.isArray(s.enum)&&!s.enum.some(e=>mw(t)===mw(e)))throw TypeError(`${o} is not a canonical enum value`);if(Array.isArray(s.allOf))for(let r of s.allOf)e(t,r,i,o,new Set(n));if(Array.isArray(s.anyOf)&&!s.anyOf.some(r=>{try{return e(t,r,i,o,new Set(n)),!0}catch{return!1}}))throw TypeError(`${o} does not match any canonical variant`);if(Array.isArray(s.oneOf)&&1!==s.oneOf.filter(r=>{try{return e(t,r,i,o,new Set(n)),!0}catch{return!1}}).length)throw TypeError(`${o} must match exactly one canonical variant`);let d=s.type;if("string"==typeof d&&!mP(t,d))throw TypeError(`${o} must be ${d}`);if(Array.isArray(d)&&!d.some(e=>"string"==typeof e&&mP(t,e)))throw TypeError(`${o} has no canonical type`);if("string"==typeof t){if("number"==typeof s.minLength&&t.lengths.maxLength)throw TypeError(`${o} exceeds maxLength`);if("string"==typeof s.pattern&&!RegExp(s.pattern,"u").test(t))throw TypeError(`${o} does not match the canonical pattern`)}if("number"==typeof t){if("integer"===s.type){if("uint32"===s.format&&(t<0||t>0xffffffff))throw TypeError(`${o} is outside uint32`);if("uint64"===s.format&&(t<0||t>Number.MAX_SAFE_INTEGER))throw TypeError(`${o} is outside safely representable uint64`);if("int64"===s.format&&(tNumber.MAX_SAFE_INTEGER))throw TypeError(`${o} is outside safely representable int64`)}if("number"==typeof s.minimum&&ts.maximum)throw TypeError(`${o} exceeds maximum`)}if(Array.isArray(t)){if("number"==typeof s.minItems&&t.lengths.maxItems)throw TypeError(`${o} has too many items`);if(!0===s.uniqueItems){let e=new Set;for(let r of t){let t=mw(r);if(e.has(t))throw TypeError(`${o} contains duplicate items`);e.add(t)}}Array.isArray(s.prefixItems)&&s.prefixItems.forEach((r,n)=>{ne(t,s.items,i,`${o}[${r}]`,new Set))}if("object"==typeof t&&null!==t&&!Array.isArray(t)){let r=void 0===s.properties?{}:mR(s.properties,`${o}.properties`);if(Array.isArray(s.required)){for(let e of s.required)if("string"==typeof e&&!(e in t))throw TypeError(`${o}.${e} is required`)}for(let[n,a]of Object.entries(t))if(n in r)e(a,r[n],i,`${o}.${n}`,new Set);else if(!1===s.additionalProperties)throw TypeError(`${o}.${n} is not allowed`);else"object"==typeof s.additionalProperties&&e(a,s.additionalProperties,i,`${o}.${n}`,new Set)}}(t,e,e,"value",new Set),t));function $U(e){let t=$L[e];if(void 0===t)throw TypeError(`generated canonical schema ${e} is missing`);return t}let $H=[{operation:"active_project",operationId:"operation.application.active_project",transport:{kind:"mcp_tool",toolName:"tracedecay_active_project"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.active_project.v1",requestSchema:{schemaId:"schema.application.primitive.active-project.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.active-project.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(0),decodeResult:$U(1)},{operation:"admin_cli",operationId:"operation.application.admin_cli",transport:{kind:"mcp_tool",toolName:"tracedecay_admin_cli"},effect:"maintains_profile_state",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.admin_cli.v1",requestSchema:{schemaId:"schema.application.primitive.admin-cli.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.admin-cli.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","effect_in_flight"]},deadline:{behavior:"return_operation_receipt",maximum_millis:6e5},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(2),decodeResult:$U(3)},{operation:"admin_project",operationId:"operation.application.admin_project",transport:{kind:"mcp_tool",toolName:"tracedecay_admin_project"},effect:"maintains_owner_state",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.admin_project.v1",requestSchema:{schemaId:"schema.application.primitive.admin-project.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.admin-project.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_operation_receipt",maximum_millis:6e5},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","timed_out","failed","unavailable","partial"],decodeRequest:$U(4),decodeResult:$U(5)},{operation:"admin_sync",operationId:"operation.application.admin_sync",transport:{kind:"mcp_tool",toolName:"tracedecay_admin_sync"},effect:"schedules_work",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.admin_sync.v1",requestSchema:{schemaId:"schema.application.primitive.admin-sync.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.admin-sync.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_operation_receipt",maximum_millis:6e5},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","timed_out","failed","unavailable","partial"],decodeRequest:$U(6),decodeResult:$U(7)},{operation:"affected",operationId:"operation.application.affected",transport:{kind:"mcp_tool",toolName:"tracedecay_affected"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.affected.v1",requestSchema:{schemaId:"schema.application.primitive.affected.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.affected.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(8),decodeResult:$U(9)},{operation:"application_affected_tests",operationId:"operation.application.affected_tests",transport:{kind:"http",route:"/application/tests/affected",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.affected_tests.v1",requestSchema:{schemaId:"schema.application.feedback.affected-tests.request",revision:1},resultSchema:{schemaId:"schema.application.feedback.affected-tests.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:15e3},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(10),decodeResult:$U(11),decodeSuccess:e=>mE(e,"binding.http.affected_tests.v1","schema.application.feedback.affected-tests.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(11))},{operation:"analytics",operationId:"operation.application.analytics",transport:{kind:"mcp_tool",toolName:"tracedecay_analytics"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.analytics.v1",requestSchema:{schemaId:"schema.application.primitive.analytics.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.analytics.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(12),decodeResult:$U(13)},{operation:"apply_native_integration",operationId:"operation.application.apply_native_integration",transport:{kind:"mcp_tool",toolName:"tracedecay_apply_native_integration"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.apply_native_integration.v1",requestSchema:{schemaId:"schema.application.native-integration.apply.request",revision:1},resultSchema:{schemaId:"schema.application.native-integration.apply.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:$U(14),decodeResult:$U(15)},{operation:"approve_native_integration",operationId:"operation.application.approve_native_integration",transport:{kind:"mcp_tool",toolName:"tracedecay_approve_native_integration"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.approve_native_integration.v1",requestSchema:{schemaId:"schema.application.native-integration.approve.request",revision:1},resultSchema:{schemaId:"schema.application.native-integration.approve.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:$U(16),decodeResult:$U(15)},{operation:"ast_grep_rewrite",operationId:"operation.application.ast_grep_rewrite",transport:{kind:"mcp_tool",toolName:"tracedecay_ast_grep_rewrite"},effect:"source_edit",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.ast_grep_rewrite.v1",requestSchema:{schemaId:"schema.application.source-edit.ast-grep-rewrite.request",revision:1},resultSchema:{schemaId:"schema.application.source-edit.ast-grep-rewrite.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:$U(17),decodeResult:$U(18)},{operation:"ast_grep_search",operationId:"operation.application.ast_grep_search",transport:{kind:"mcp_tool",toolName:"tracedecay_ast_grep_search"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.ast_grep_search.v1",requestSchema:{schemaId:"schema.application.primitive.ast-grep-search.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.ast-grep-search.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(19),decodeResult:$U(20)},{operation:"automation_run_artifact_view",operationId:"operation.application.automation_run_artifact_view",transport:{kind:"mcp_tool",toolName:"tracedecay_automation_run_artifact_view"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.automation_run_artifact_view.v1",requestSchema:{schemaId:"schema.application.primitive.automation-run-artifact-view.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.automation-run-artifact-view.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(21),decodeResult:$U(22)},{operation:"automation_run_list",operationId:"operation.application.automation_run_list",transport:{kind:"mcp_tool",toolName:"tracedecay_automation_run_list"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.automation_run_list.v1",requestSchema:{schemaId:"schema.application.primitive.automation-run-list.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.automation-run-list.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(23),decodeResult:$U(24)},{operation:"automation_run_view",operationId:"operation.application.automation_run_view",transport:{kind:"mcp_tool",toolName:"tracedecay_automation_run_view"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.automation_run_view.v1",requestSchema:{schemaId:"schema.application.primitive.automation-run-view.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.automation-run-view.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(25),decodeResult:$U(26)},{operation:"branch_diff",operationId:"operation.application.branch_diff",transport:{kind:"mcp_tool",toolName:"tracedecay_branch_diff"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.branch_diff.v1",requestSchema:{schemaId:"schema.application.primitive.branch-diff.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.branch-diff.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(27),decodeResult:$U(28)},{operation:"branch_list",operationId:"operation.application.branch_list",transport:{kind:"mcp_tool",toolName:"tracedecay_branch_list"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.branch_list.v1",requestSchema:{schemaId:"schema.application.primitive.branch-list.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.branch-list.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(29),decodeResult:$U(30)},{operation:"branch_search",operationId:"operation.application.branch_search",transport:{kind:"mcp_tool",toolName:"tracedecay_branch_search"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.branch_search.v1",requestSchema:{schemaId:"schema.application.primitive.branch-search.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.branch-search.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(31),decodeResult:$U(32)},{operation:"by_qualified_name",operationId:"operation.application.by_qualified_name",transport:{kind:"mcp_tool",toolName:"tracedecay_by_qualified_name"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.by_qualified_name.v1",requestSchema:{schemaId:"schema.application.primitive.by-qualified-name.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.by-qualified-name.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(33),decodeResult:$U(34)},{operation:"application_call_chain",operationId:"operation.application.call_chain",transport:{kind:"http",route:"/application/primitives/call_chain",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.call_chain.v1",requestSchema:{schemaId:"schema.application.primitive.call-chain.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.call-chain.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(35),decodeResult:$U(36),decodeSuccess:e=>mE(e,"binding.http.call_chain.v1","schema.application.primitive.call-chain.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(36))},{operation:"cancel_native_integration",operationId:"operation.application.cancel_native_integration",transport:{kind:"mcp_tool",toolName:"tracedecay_cancel_native_integration"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.cancel_native_integration.v1",requestSchema:{schemaId:"schema.application.native-integration.cancel.request",revision:1},resultSchema:{schemaId:"schema.application.native-integration.cancel.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:$U(37),decodeResult:$U(15)},{operation:"changelog",operationId:"operation.application.changelog",transport:{kind:"mcp_tool",toolName:"tracedecay_changelog"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.changelog.v1",requestSchema:{schemaId:"schema.application.primitive.changelog.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.changelog.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(38),decodeResult:$U(39)},{operation:"circular",operationId:"operation.application.circular",transport:{kind:"mcp_tool",toolName:"tracedecay_circular"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.circular.v1",requestSchema:{schemaId:"schema.application.primitive.circular.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.circular.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(40),decodeResult:$U(41)},{operation:"code_callees",operationId:"operation.application.code_callees",transport:{kind:"http",route:"/application/code/code_callees",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.code_callees.v1",requestSchema:{schemaId:"schema.application.code-query.callees.request",revision:1},resultSchema:{schemaId:"schema.application.code-query.callees.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(42),decodeResult:$U(43),decodeSuccess:e=>mE(e,"binding.http.code_callees.v1","schema.application.code-query.callees.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(43))},{operation:"code_callers",operationId:"operation.application.code_callers",transport:{kind:"http",route:"/application/code/code_callers",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.code_callers.v1",requestSchema:{schemaId:"schema.application.primitive.code-callers.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.code-callers.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(44),decodeResult:$U(45),decodeSuccess:e=>mE(e,"binding.http.code_callers.v1","schema.application.primitive.code-callers.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(45))},{operation:"code_declaration",operationId:"operation.application.code_declaration",transport:{kind:"http",route:"/application/code/code_declaration",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.code_declaration.v1",requestSchema:{schemaId:"schema.application.code-query.declaration.request",revision:1},resultSchema:{schemaId:"schema.application.code-query.declaration.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(46),decodeResult:$U(47),decodeSuccess:e=>mE(e,"binding.http.code_declaration.v1","schema.application.code-query.declaration.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(47))},{operation:"code_exact_occurrence",operationId:"operation.application.code_exact_occurrence",transport:{kind:"http",route:"/application/code/code_exact_occurrence",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.code_exact_occurrence.v1",requestSchema:{schemaId:"schema.application.code-query.exact-occurrence.request",revision:1},resultSchema:{schemaId:"schema.application.code-query.exact-occurrence.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(48),decodeResult:$U(49),decodeSuccess:e=>mE(e,"binding.http.code_exact_occurrence.v1","schema.application.code-query.exact-occurrence.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(49))},{operation:"code_facets",operationId:"operation.application.code_facets",transport:{kind:"http",route:"/application/code/code_facets",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.code_facets.v1",requestSchema:{schemaId:"schema.application.code-query.facets.request",revision:1},resultSchema:{schemaId:"schema.application.code-query.facets.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(50),decodeResult:$U(51),decodeSuccess:e=>mE(e,"binding.http.code_facets.v1","schema.application.code-query.facets.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(51))},{operation:"code_implementations",operationId:"operation.application.code_implementations",transport:{kind:"http",route:"/application/code/code_implementations",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.code_implementations.v1",requestSchema:{schemaId:"schema.application.primitive.code-implementations.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.code-implementations.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(52),decodeResult:$U(53),decodeSuccess:e=>mE(e,"binding.http.code_implementations.v1","schema.application.primitive.code-implementations.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(53))},{operation:"code_phrase_search",operationId:"operation.application.code_phrase_search",transport:{kind:"http",route:"/application/code/code_phrase_search",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.code_phrase_search.v1",requestSchema:{schemaId:"schema.application.code-query.phrase-search.request",revision:1},resultSchema:{schemaId:"schema.application.code-query.phrase-search.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(54),decodeResult:$U(55),decodeSuccess:e=>mE(e,"binding.http.code_phrase_search.v1","schema.application.code-query.phrase-search.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(55))},{operation:"code_references",operationId:"operation.application.code_references",transport:{kind:"http",route:"/application/code/code_references",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.code_references.v1",requestSchema:{schemaId:"schema.application.code-query.references.request",revision:1},resultSchema:{schemaId:"schema.application.code-query.references.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(46),decodeResult:$U(43),decodeSuccess:e=>mE(e,"binding.http.code_references.v1","schema.application.code-query.references.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(43))},{operation:"code_signature_search",operationId:"operation.application.code_signature_search",transport:{kind:"http",route:"/application/code/code_signature_search",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.code_signature_search.v1",requestSchema:{schemaId:"schema.application.primitive.code-signature-search.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.code-signature-search.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(56),decodeResult:$U(57),decodeSuccess:e=>mE(e,"binding.http.code_signature_search.v1","schema.application.primitive.code-signature-search.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(57))},{operation:"code_symbol_search",operationId:"operation.application.code_symbol_search",transport:{kind:"http",route:"/application/code/code_symbol_search",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.code_symbol_search.v1",requestSchema:{schemaId:"schema.application.symbol-search.request",revision:1},resultSchema:{schemaId:"schema.application.symbol-search.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(58),decodeResult:$U(57),decodeSuccess:e=>mE(e,"binding.http.code_symbol_search.v1","schema.application.symbol-search.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(57))},{operation:"code_timeline",operationId:"operation.application.code_timeline",transport:{kind:"http",route:"/application/code/code_timeline",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.code_timeline.v1",requestSchema:{schemaId:"schema.application.code-query.timeline.request",revision:1},resultSchema:{schemaId:"schema.application.code-query.timeline.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(59),decodeResult:$U(60),decodeSuccess:e=>mE(e,"binding.http.code_timeline.v1","schema.application.code-query.timeline.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(60))},{operation:"code_type_definition",operationId:"operation.application.code_type_definition",transport:{kind:"http",route:"/application/code/code_type_definition",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.code_type_definition.v1",requestSchema:{schemaId:"schema.application.code-query.type-definition.request",revision:1},resultSchema:{schemaId:"schema.application.code-query.type-definition.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(46),decodeResult:$U(47),decodeSuccess:e=>mE(e,"binding.http.code_type_definition.v1","schema.application.code-query.type-definition.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(47))},{operation:"code_type_hierarchy",operationId:"operation.application.code_type_hierarchy",transport:{kind:"http",route:"/application/code/code_type_hierarchy",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.code_type_hierarchy.v1",requestSchema:{schemaId:"schema.application.primitive.code-type-hierarchy.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.code-type-hierarchy.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(61),decodeResult:$U(62),decodeSuccess:e=>mE(e,"binding.http.code_type_hierarchy.v1","schema.application.primitive.code-type-hierarchy.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(62))},{operation:"commit_context",operationId:"operation.application.commit_context",transport:{kind:"mcp_tool",toolName:"tracedecay_commit_context"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.commit_context.v1",requestSchema:{schemaId:"schema.application.primitive.commit-context.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.commit-context.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(63),decodeResult:$U(64)},{operation:"complexity",operationId:"operation.application.complexity",transport:{kind:"mcp_tool",toolName:"tracedecay_complexity"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.complexity.v1",requestSchema:{schemaId:"schema.application.primitive.complexity.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.complexity.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(65),decodeResult:$U(66)},{operation:"config",operationId:"operation.application.config",transport:{kind:"mcp_tool",toolName:"tracedecay_config"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.config.v1",requestSchema:{schemaId:"schema.application.primitive.config.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.config.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(67),decodeResult:$U(68)},{operation:"application_configuration_audit",operationId:"operation.application.configuration_audit",transport:{kind:"http",route:"/application/configuration/configuration_audit",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.configuration_audit.v1",requestSchema:{schemaId:"schema.application.configuration.configuration_audit.request",revision:1},resultSchema:{schemaId:"schema.application.configuration.configuration_audit.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:15e3},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:$U(69),decodeResult:$U(70),decodeSuccess:e=>mE(e,"binding.http.configuration_audit.v1","schema.application.configuration.configuration_audit.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(70))},{operation:"application_configuration_batch",operationId:"operation.application.configuration_batch",transport:{kind:"http",route:"/application/configuration/configuration_batch",method:"POST"},effect:"configuration_write",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.configuration_batch.v1",requestSchema:{schemaId:"schema.application.configuration.configuration_batch.request",revision:1},resultSchema:{schemaId:"schema.application.configuration.configuration_batch.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_effect_receipt",maximum_millis:15e3},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","timed_out","failed","effect_unknown","partial"],decodeRequest:$U(71),decodeResult:$U(72),decodeSuccess:e=>mE(e,"binding.http.configuration_batch.v1","schema.application.configuration.configuration_batch.result",1,["completed","timed_out","failed","effect_unknown","partial"],{mode:"not_cancellable"},"durable_effect","required",$U(72))},{operation:"application_configuration_get",operationId:"operation.application.configuration_get",transport:{kind:"http",route:"/application/configuration/configuration_get",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.configuration_get.v1",requestSchema:{schemaId:"schema.application.configuration.configuration_get.request",revision:1},resultSchema:{schemaId:"schema.application.configuration.configuration_get.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:15e3},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:$U(73),decodeResult:$U(74),decodeSuccess:e=>mE(e,"binding.http.configuration_get.v1","schema.application.configuration.configuration_get.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(74))},{operation:"application_configuration_list",operationId:"operation.application.configuration_list",transport:{kind:"http",route:"/application/configuration/configuration_list",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.configuration_list.v1",requestSchema:{schemaId:"schema.application.configuration.configuration_list.request",revision:1},resultSchema:{schemaId:"schema.application.configuration.configuration_list.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:15e3},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:$U(75),decodeResult:$U(76),decodeSuccess:e=>mE(e,"binding.http.configuration_list.v1","schema.application.configuration.configuration_list.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(76))},{operation:"application_configuration_observed_state",operationId:"operation.application.configuration_observed_state",transport:{kind:"http",route:"/application/configuration/configuration_observed_state",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.configuration_observed_state.v1",requestSchema:{schemaId:"schema.application.configuration.configuration_observed_state.request",revision:1},resultSchema:{schemaId:"schema.application.configuration.configuration_observed_state.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:15e3},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:$U(77),decodeResult:$U(78),decodeSuccess:e=>mE(e,"binding.http.configuration_observed_state.v1","schema.application.configuration.configuration_observed_state.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(78))},{operation:"application_configuration_protected_apply",operationId:"operation.application.configuration_protected_apply",transport:{kind:"http",route:"/application/configuration/configuration_protected_apply",method:"POST"},effect:"configuration_write",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.configuration_protected_apply.v1",requestSchema:{schemaId:"schema.application.configuration.configuration_protected_apply.request",revision:1},resultSchema:{schemaId:"schema.application.configuration.configuration_protected_apply.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_effect_receipt",maximum_millis:15e3},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","timed_out","failed","effect_unknown","partial"],decodeRequest:$U(79),decodeResult:$U(72),decodeSuccess:e=>mE(e,"binding.http.configuration_protected_apply.v1","schema.application.configuration.configuration_protected_apply.result",1,["completed","timed_out","failed","effect_unknown","partial"],{mode:"not_cancellable"},"durable_effect","required",$U(72))},{operation:"application_configuration_protected_preview",operationId:"operation.application.configuration_protected_preview",transport:{kind:"http",route:"/application/configuration/configuration_protected_preview",method:"POST"},effect:"preview",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.configuration_protected_preview.v1",requestSchema:{schemaId:"schema.application.configuration.configuration_protected_preview.request",revision:1},resultSchema:{schemaId:"schema.application.configuration.configuration_protected_preview.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:15e3},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:$U(80),decodeResult:$U(81),decodeSuccess:e=>mE(e,"binding.http.configuration_protected_preview.v1","schema.application.configuration.configuration_protected_preview.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(81))},{operation:"application_configuration_rollback_apply",operationId:"operation.application.configuration_rollback_apply",transport:{kind:"http",route:"/application/configuration/configuration_rollback_apply",method:"POST"},effect:"configuration_write",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.configuration_rollback_apply.v1",requestSchema:{schemaId:"schema.application.configuration.configuration_rollback_apply.request",revision:1},resultSchema:{schemaId:"schema.application.configuration.configuration_rollback_apply.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_effect_receipt",maximum_millis:15e3},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","timed_out","failed","effect_unknown","partial"],decodeRequest:$U(79),decodeResult:$U(72),decodeSuccess:e=>mE(e,"binding.http.configuration_rollback_apply.v1","schema.application.configuration.configuration_rollback_apply.result",1,["completed","timed_out","failed","effect_unknown","partial"],{mode:"not_cancellable"},"durable_effect","required",$U(72))},{operation:"application_configuration_rollback_preview",operationId:"operation.application.configuration_rollback_preview",transport:{kind:"http",route:"/application/configuration/configuration_rollback_preview",method:"POST"},effect:"preview",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.configuration_rollback_preview.v1",requestSchema:{schemaId:"schema.application.configuration.configuration_rollback_preview.request",revision:1},resultSchema:{schemaId:"schema.application.configuration.configuration_rollback_preview.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:15e3},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:$U(82),decodeResult:$U(81),decodeSuccess:e=>mE(e,"binding.http.configuration_rollback_preview.v1","schema.application.configuration.configuration_rollback_preview.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(81))},{operation:"application_configuration_set",operationId:"operation.application.configuration_set",transport:{kind:"http",route:"/application/configuration/configuration_set",method:"POST"},effect:"configuration_write",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.configuration_set.v1",requestSchema:{schemaId:"schema.application.configuration.configuration_set.request",revision:1},resultSchema:{schemaId:"schema.application.configuration.configuration_set.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_effect_receipt",maximum_millis:15e3},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","timed_out","failed","effect_unknown","partial"],decodeRequest:$U(83),decodeResult:$U(72),decodeSuccess:e=>mE(e,"binding.http.configuration_set.v1","schema.application.configuration.configuration_set.result",1,["completed","timed_out","failed","effect_unknown","partial"],{mode:"not_cancellable"},"durable_effect","required",$U(72))},{operation:"application_configuration_unset",operationId:"operation.application.configuration_unset",transport:{kind:"http",route:"/application/configuration/configuration_unset",method:"POST"},effect:"configuration_write",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.configuration_unset.v1",requestSchema:{schemaId:"schema.application.configuration.configuration_unset.request",revision:1},resultSchema:{schemaId:"schema.application.configuration.configuration_unset.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_effect_receipt",maximum_millis:15e3},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","timed_out","failed","effect_unknown","partial"],decodeRequest:$U(84),decodeResult:$U(72),decodeSuccess:e=>mE(e,"binding.http.configuration_unset.v1","schema.application.configuration.configuration_unset.result",1,["completed","timed_out","failed","effect_unknown","partial"],{mode:"not_cancellable"},"durable_effect","required",$U(72))},{operation:"constructors",operationId:"operation.application.constructors",transport:{kind:"mcp_tool",toolName:"tracedecay_constructors"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.constructors.v1",requestSchema:{schemaId:"schema.application.primitive.constructors.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.constructors.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(85),decodeResult:$U(86)},{operation:"context",operationId:"operation.application.context",transport:{kind:"mcp_tool",toolName:"tracedecay_context"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.context.v1",requestSchema:{schemaId:"schema.application.primitive.context.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.context.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(87),decodeResult:$U(88)},{operation:"application_context_scout_budget",operationId:"operation.application.context_scout_budget",transport:{kind:"http",route:"/application/context-scout/context_scout_budget",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.context_scout_budget.v1",requestSchema:{schemaId:"schema.application.context-scout-budget.request",revision:1},resultSchema:{schemaId:"schema.application.context-scout-budget.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:15e3},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:$U(89),decodeResult:$U(90),decodeSuccess:e=>mE(e,"binding.http.context_scout_budget.v1","schema.application.context-scout-budget.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(90))},{operation:"application_context_scout_cancel",operationId:"operation.application.context_scout_cancel",transport:{kind:"http",route:"/application/context-scout/context_scout_cancel",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.context_scout_cancel.v1",requestSchema:{schemaId:"schema.application.context-scout-cancel.request",revision:1},resultSchema:{schemaId:"schema.application.context-scout-cancel.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_effect_receipt",maximum_millis:15e3},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","timed_out","failed","effect_unknown","partial"],decodeRequest:$U(91),decodeResult:$U(92),decodeSuccess:e=>mE(e,"binding.http.context_scout_cancel.v1","schema.application.context-scout-cancel.result",1,["completed","timed_out","failed","effect_unknown","partial"],{mode:"not_cancellable"},"durable_effect","required",$U(92))},{operation:"application_context_scout_capability",operationId:"operation.application.context_scout_capability",transport:{kind:"http",route:"/application/context-scout/context_scout_capability",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.context_scout_capability.v1",requestSchema:{schemaId:"schema.application.context-scout-capability.request",revision:1},resultSchema:{schemaId:"schema.application.context-scout-capability.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:15e3},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:$U(89),decodeResult:$U(93),decodeSuccess:e=>mE(e,"binding.http.context_scout_capability.v1","schema.application.context-scout-capability.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(93))},{operation:"application_context_scout_claim",operationId:"operation.application.context_scout_claim",transport:{kind:"http",route:"/application/context-scout/context_scout_claim",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.context_scout_claim.v1",requestSchema:{schemaId:"schema.application.context-scout-claim.request",revision:1},resultSchema:{schemaId:"schema.application.context-scout-claim.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_effect_receipt",maximum_millis:15e3},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","timed_out","failed","effect_unknown","partial"],decodeRequest:$U(94),decodeResult:$U(95),decodeSuccess:e=>mE(e,"binding.http.context_scout_claim.v1","schema.application.context-scout-claim.result",1,["completed","timed_out","failed","effect_unknown","partial"],{mode:"not_cancellable"},"durable_effect","required",$U(95))},{operation:"application_context_scout_delivery",operationId:"operation.application.context_scout_delivery",transport:{kind:"http",route:"/application/context-scout/context_scout_delivery",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.context_scout_delivery.v1",requestSchema:{schemaId:"schema.application.context-scout-delivery.request",revision:1},resultSchema:{schemaId:"schema.application.context-scout-delivery.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_effect_receipt",maximum_millis:15e3},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","timed_out","failed","effect_unknown","partial"],decodeRequest:$U(96),decodeResult:$U(97),decodeSuccess:e=>mE(e,"binding.http.context_scout_delivery.v1","schema.application.context-scout-delivery.result",1,["completed","timed_out","failed","effect_unknown","partial"],{mode:"not_cancellable"},"durable_effect","required",$U(97))},{operation:"application_context_scout_explain",operationId:"operation.application.context_scout_explain",transport:{kind:"http",route:"/application/context-scout/context_scout_explain",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.context_scout_explain.v1",requestSchema:{schemaId:"schema.application.context-scout-explain.request",revision:1},resultSchema:{schemaId:"schema.application.context-scout-explain.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:15e3},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:$U(98),decodeResult:$U(99),decodeSuccess:e=>mE(e,"binding.http.context_scout_explain.v1","schema.application.context-scout-explain.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(99))},{operation:"application_context_scout_feedback",operationId:"operation.application.context_scout_feedback",transport:{kind:"http",route:"/application/context-scout/context_scout_feedback",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.context_scout_feedback.v1",requestSchema:{schemaId:"schema.application.context-scout-feedback.request",revision:1},resultSchema:{schemaId:"schema.application.context-scout-feedback.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_effect_receipt",maximum_millis:15e3},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","timed_out","failed","effect_unknown","partial"],decodeRequest:$U(100),decodeResult:$U(92),decodeSuccess:e=>mE(e,"binding.http.context_scout_feedback.v1","schema.application.context-scout-feedback.result",1,["completed","timed_out","failed","effect_unknown","partial"],{mode:"not_cancellable"},"durable_effect","required",$U(92))},{operation:"application_context_scout_pause",operationId:"operation.application.context_scout_pause",transport:{kind:"http",route:"/application/context-scout/context_scout_pause",method:"POST"},effect:"configuration_write",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.context_scout_pause.v1",requestSchema:{schemaId:"schema.application.context-scout-pause.request",revision:1},resultSchema:{schemaId:"schema.application.context-scout-pause.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_effect_receipt",maximum_millis:15e3},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","timed_out","failed","effect_unknown","partial"],decodeRequest:$U(101),decodeResult:$U(72),decodeSuccess:e=>mE(e,"binding.http.context_scout_pause.v1","schema.application.context-scout-pause.result",1,["completed","timed_out","failed","effect_unknown","partial"],{mode:"not_cancellable"},"durable_effect","required",$U(72))},{operation:"application_context_scout_recent",operationId:"operation.application.context_scout_recent",transport:{kind:"http",route:"/application/context-scout/context_scout_recent",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.context_scout_recent.v1",requestSchema:{schemaId:"schema.application.context-scout-recent.request",revision:1},resultSchema:{schemaId:"schema.application.context-scout-recent.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:15e3},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:$U(98),decodeResult:$U(102),decodeSuccess:e=>mE(e,"binding.http.context_scout_recent.v1","schema.application.context-scout-recent.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(102))},{operation:"application_context_scout_resume",operationId:"operation.application.context_scout_resume",transport:{kind:"http",route:"/application/context-scout/context_scout_resume",method:"POST"},effect:"configuration_write",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.context_scout_resume.v1",requestSchema:{schemaId:"schema.application.context-scout-resume.request",revision:1},resultSchema:{schemaId:"schema.application.context-scout-resume.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_effect_receipt",maximum_millis:15e3},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","timed_out","failed","effect_unknown","partial"],decodeRequest:$U(101),decodeResult:$U(72),decodeSuccess:e=>mE(e,"binding.http.context_scout_resume.v1","schema.application.context-scout-resume.result",1,["completed","timed_out","failed","effect_unknown","partial"],{mode:"not_cancellable"},"durable_effect","required",$U(72))},{operation:"application_context_scout_status",operationId:"operation.application.context_scout_status",transport:{kind:"http",route:"/application/context-scout/context_scout_status",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.context_scout_status.v1",requestSchema:{schemaId:"schema.application.context-scout-status.request",revision:1},resultSchema:{schemaId:"schema.application.context-scout-status.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:15e3},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:$U(89),decodeResult:$U(103),decodeSuccess:e=>mE(e,"binding.http.context_scout_status.v1","schema.application.context-scout-status.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(103))},{operation:"coupling",operationId:"operation.application.coupling",transport:{kind:"mcp_tool",toolName:"tracedecay_coupling"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.coupling.v1",requestSchema:{schemaId:"schema.application.primitive.coupling.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.coupling.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(104),decodeResult:$U(105)},{operation:"dashboard",operationId:"operation.application.dashboard",transport:{kind:"mcp_tool",toolName:"tracedecay_dashboard"},effect:"binds_server",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.dashboard.v1",requestSchema:{schemaId:"schema.application.primitive.dashboard.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.dashboard.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","timed_out","failed","unavailable","partial"],decodeRequest:$U(106),decodeResult:$U(107)},{operation:"dead_code",operationId:"operation.application.dead_code",transport:{kind:"mcp_tool",toolName:"tracedecay_dead_code"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.dead_code.v1",requestSchema:{schemaId:"schema.application.primitive.dead-code.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.dead-code.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(108),decodeResult:$U(109)},{operation:"dependency_depth",operationId:"operation.application.dependency_depth",transport:{kind:"mcp_tool",toolName:"tracedecay_dependency_depth"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.dependency_depth.v1",requestSchema:{schemaId:"schema.application.primitive.dependency-depth.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.dependency-depth.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(110),decodeResult:$U(111)},{operation:"derives",operationId:"operation.application.derives",transport:{kind:"mcp_tool",toolName:"tracedecay_derives"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.derives.v1",requestSchema:{schemaId:"schema.application.primitive.derives.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.derives.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(112),decodeResult:$U(113)},{operation:"diagnose",operationId:"operation.application.diagnose",transport:{kind:"mcp_tool",toolName:"tracedecay_diagnose"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.diagnose.v1",requestSchema:{schemaId:"schema.application.primitive.diagnose.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.diagnose.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(114),decodeResult:$U(115)},{operation:"application_diagnostics_read",operationId:"operation.application.diagnostics_read",transport:{kind:"http",route:"/application/primitives/diagnostics_read",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.diagnostics_read.v1",requestSchema:{schemaId:"schema.application.primitive.diagnostics-read.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.diagnostics-read.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(116),decodeResult:$U(117),decodeSuccess:e=>mE(e,"binding.http.diagnostics_read.v1","schema.application.primitive.diagnostics-read.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(117))},{operation:"diff_context",operationId:"operation.application.diff_context",transport:{kind:"mcp_tool",toolName:"tracedecay_diff_context"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.diff_context.v1",requestSchema:{schemaId:"schema.application.primitive.diff-context.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.diff-context.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(118),decodeResult:$U(119)},{operation:"distribution",operationId:"operation.application.distribution",transport:{kind:"mcp_tool",toolName:"tracedecay_distribution"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.distribution.v1",requestSchema:{schemaId:"schema.application.primitive.distribution.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.distribution.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(120),decodeResult:$U(121)},{operation:"doc_coverage",operationId:"operation.application.doc_coverage",transport:{kind:"mcp_tool",toolName:"tracedecay_doc_coverage"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.doc_coverage.v1",requestSchema:{schemaId:"schema.application.primitive.doc-coverage.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.doc-coverage.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(122),decodeResult:$U(123)},{operation:"dsm",operationId:"operation.application.dsm",transport:{kind:"mcp_tool",toolName:"tracedecay_dsm"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.dsm.v1",requestSchema:{schemaId:"schema.application.primitive.dsm.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.dsm.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(124),decodeResult:$U(125)},{operation:"application_fact_feedback",operationId:"operation.application.fact_feedback",transport:{kind:"http",route:"/application/retained/fact_feedback",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.fact_feedback.v1",requestSchema:{schemaId:"schema.application.retained.fact-feedback.request",revision:1},resultSchema:{schemaId:"schema.application.retained.fact-feedback.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","reconciling","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","unavailable","effect_unknown","partial"],decodeRequest:$U(126),decodeResult:$U(127),decodeSuccess:e=>mE(e,"binding.http.fact_feedback.v1","schema.application.retained.fact-feedback.result",1,["completed","cancelled","timed_out","failed","unavailable","effect_unknown","partial"],{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","reconciling","after_commit"]},"durable_effect","required",$U(127))},{operation:"application_fact_store_add",operationId:"operation.application.fact_store_add",transport:{kind:"http",route:"/application/retained/fact_store_add",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.fact_store_add.v1",requestSchema:{schemaId:"schema.application.retained.fact-store-add.request",revision:1},resultSchema:{schemaId:"schema.application.retained.fact-store-add.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","reconciling","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","unavailable","effect_unknown","partial"],decodeRequest:$U(128),decodeResult:$U(129),decodeSuccess:e=>mE(e,"binding.http.fact_store_add.v1","schema.application.retained.fact-store-add.result",1,["completed","cancelled","timed_out","failed","unavailable","effect_unknown","partial"],{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","reconciling","after_commit"]},"durable_effect","required",$U(129))},{operation:"application_fact_store_contradict",operationId:"operation.application.fact_store_contradict",transport:{kind:"http",route:"/application/retained/fact_store_contradict",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.fact_store_contradict.v1",requestSchema:{schemaId:"schema.application.retained.fact-store-contradict.request",revision:1},resultSchema:{schemaId:"schema.application.retained.fact-store-contradict.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(130),decodeResult:$U(131),decodeSuccess:e=>mE(e,"binding.http.fact_store_contradict.v1","schema.application.retained.fact-store-contradict.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(131))},{operation:"application_fact_store_curate",operationId:"operation.application.fact_store_curate",transport:{kind:"http",route:"/application/retained/fact_store_curate",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"required",resultSemantics:"fact_store_curate_receipt",bindingId:"binding.http.fact_store_curate.v1",requestSchema:{schemaId:"schema.application.retained.fact-store-curate.request",revision:1},resultSchema:{schemaId:"schema.application.retained.fact-store-curate.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","reconciling","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:9e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","unavailable","effect_unknown","partial"],decodeRequest:$U(132),decodeResult:$U(133),decodeSuccess:e=>mE(e,"binding.http.fact_store_curate.v1","schema.application.retained.fact-store-curate.result",1,["completed","cancelled","timed_out","failed","unavailable","effect_unknown","partial"],{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","reconciling","after_commit"]},"durable_effect","required",$U(133))},{operation:"application_fact_store_get",operationId:"operation.application.fact_store_get",transport:{kind:"http",route:"/application/retained/fact_store_get",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.fact_store_get.v1",requestSchema:{schemaId:"schema.application.retained.fact-store-get.request",revision:1},resultSchema:{schemaId:"schema.application.retained.fact-store-get.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(134),decodeResult:$U(135),decodeSuccess:e=>mE(e,"binding.http.fact_store_get.v1","schema.application.retained.fact-store-get.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(135))},{operation:"application_fact_store_list",operationId:"operation.application.fact_store_list",transport:{kind:"http",route:"/application/retained/fact_store_list",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.fact_store_list.v1",requestSchema:{schemaId:"schema.application.retained.fact-store-list.request",revision:1},resultSchema:{schemaId:"schema.application.retained.fact-store-list.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(136),decodeResult:$U(137),decodeSuccess:e=>mE(e,"binding.http.fact_store_list.v1","schema.application.retained.fact-store-list.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(137))},{operation:"application_fact_store_probe",operationId:"operation.application.fact_store_probe",transport:{kind:"http",route:"/application/retained/fact_store_probe",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.fact_store_probe.v1",requestSchema:{schemaId:"schema.application.retained.fact-store-probe.request",revision:1},resultSchema:{schemaId:"schema.application.retained.fact-store-probe.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(138),decodeResult:$U(139),decodeSuccess:e=>mE(e,"binding.http.fact_store_probe.v1","schema.application.retained.fact-store-probe.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(139))},{operation:"application_fact_store_reason",operationId:"operation.application.fact_store_reason",transport:{kind:"http",route:"/application/retained/fact_store_reason",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.fact_store_reason.v1",requestSchema:{schemaId:"schema.application.retained.fact-store-reason.request",revision:1},resultSchema:{schemaId:"schema.application.retained.fact-store-reason.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(140),decodeResult:$U(141),decodeSuccess:e=>mE(e,"binding.http.fact_store_reason.v1","schema.application.retained.fact-store-reason.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(141))},{operation:"application_fact_store_related",operationId:"operation.application.fact_store_related",transport:{kind:"http",route:"/application/retained/fact_store_related",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.fact_store_related.v1",requestSchema:{schemaId:"schema.application.retained.fact-store-related.request",revision:1},resultSchema:{schemaId:"schema.application.retained.fact-store-related.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(142),decodeResult:$U(143),decodeSuccess:e=>mE(e,"binding.http.fact_store_related.v1","schema.application.retained.fact-store-related.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(143))},{operation:"application_fact_store_remove",operationId:"operation.application.fact_store_remove",transport:{kind:"http",route:"/application/retained/fact_store_remove",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.fact_store_remove.v1",requestSchema:{schemaId:"schema.application.retained.fact-store-remove.request",revision:1},resultSchema:{schemaId:"schema.application.retained.fact-store-remove.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","reconciling","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","unavailable","effect_unknown","partial"],decodeRequest:$U(144),decodeResult:$U(145),decodeSuccess:e=>mE(e,"binding.http.fact_store_remove.v1","schema.application.retained.fact-store-remove.result",1,["completed","cancelled","timed_out","failed","unavailable","effect_unknown","partial"],{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","reconciling","after_commit"]},"durable_effect","required",$U(145))},{operation:"application_fact_store_search",operationId:"operation.application.fact_store_search",transport:{kind:"http",route:"/application/retained/fact_store_search",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.fact_store_search.v1",requestSchema:{schemaId:"schema.application.retained.fact-store-search.request",revision:1},resultSchema:{schemaId:"schema.application.retained.fact-store-search.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(146),decodeResult:$U(147),decodeSuccess:e=>mE(e,"binding.http.fact_store_search.v1","schema.application.retained.fact-store-search.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(147))},{operation:"application_fact_store_supersede",operationId:"operation.application.fact_store_supersede",transport:{kind:"http",route:"/application/retained/fact_store_supersede",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.fact_store_supersede.v1",requestSchema:{schemaId:"schema.application.retained.fact-store-supersede.request",revision:1},resultSchema:{schemaId:"schema.application.retained.fact-store-supersede.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","reconciling","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","unavailable","effect_unknown","partial"],decodeRequest:$U(148),decodeResult:$U(149),decodeSuccess:e=>mE(e,"binding.http.fact_store_supersede.v1","schema.application.retained.fact-store-supersede.result",1,["completed","cancelled","timed_out","failed","unavailable","effect_unknown","partial"],{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","reconciling","after_commit"]},"durable_effect","required",$U(149))},{operation:"application_fact_store_update",operationId:"operation.application.fact_store_update",transport:{kind:"http",route:"/application/retained/fact_store_update",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.fact_store_update.v1",requestSchema:{schemaId:"schema.application.retained.fact-store-update.request",revision:1},resultSchema:{schemaId:"schema.application.retained.fact-store-update.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","reconciling","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","unavailable","effect_unknown","partial"],decodeRequest:$U(150),decodeResult:$U(151),decodeSuccess:e=>mE(e,"binding.http.fact_store_update.v1","schema.application.retained.fact-store-update.result",1,["completed","cancelled","timed_out","failed","unavailable","effect_unknown","partial"],{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","reconciling","after_commit"]},"durable_effect","required",$U(151))},{operation:"application_feedback_advisory_cycle",operationId:"operation.application.feedback_advisory_cycle",transport:{kind:"http",route:"/application/feedback/advisory_cycle",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.feedback_advisory_cycle.v1",requestSchema:{schemaId:"schema.application.feedback.advisory-cycle.request",revision:1},resultSchema:{schemaId:"schema.application.feedback.advisory-cycle.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:15e3},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(152),decodeResult:$U(153),decodeSuccess:e=>mE(e,"binding.http.feedback_advisory_cycle.v1","schema.application.feedback.advisory-cycle.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(153))},{operation:"application_feedback_diagnostics",operationId:"operation.application.feedback_diagnostics",transport:{kind:"http",route:"/application/feedback/diagnostics",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.feedback_diagnostics.v1",requestSchema:{schemaId:"schema.application.feedback.diagnostics.request",revision:1},resultSchema:{schemaId:"schema.application.feedback.diagnostics.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:15e3},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(10),decodeResult:$U(154),decodeSuccess:e=>mE(e,"binding.http.feedback_diagnostics.v1","schema.application.feedback.diagnostics.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(154))},{operation:"application_feedback_expand",operationId:"operation.application.feedback_expand",transport:{kind:"http",route:"/application/feedback/expand",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.feedback_expand.v1",requestSchema:{schemaId:"schema.application.feedback.expand.request",revision:1},resultSchema:{schemaId:"schema.application.feedback.expand.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:15e3},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(10),decodeResult:$U(155),decodeSuccess:e=>mE(e,"binding.http.feedback_expand.v1","schema.application.feedback.expand.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(155))},{operation:"application_feedback_get",operationId:"operation.application.feedback_get",transport:{kind:"http",route:"/application/feedback/get",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.feedback_get.v1",requestSchema:{schemaId:"schema.application.feedback.get.request",revision:1},resultSchema:{schemaId:"schema.application.feedback.get.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:15e3},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(10),decodeResult:$U(156),decodeSuccess:e=>mE(e,"binding.http.feedback_get.v1","schema.application.feedback.get.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(156))},{operation:"application_feedback_impact",operationId:"operation.application.feedback_impact",transport:{kind:"http",route:"/application/feedback/impact",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.feedback_impact.v1",requestSchema:{schemaId:"schema.application.feedback.impact.request",revision:1},resultSchema:{schemaId:"schema.application.feedback.impact.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:15e3},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(10),decodeResult:$U(157),decodeSuccess:e=>mE(e,"binding.http.feedback_impact.v1","schema.application.feedback.impact.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(157))},{operation:"application_feedback_list",operationId:"operation.application.feedback_list",transport:{kind:"http",route:"/application/feedback/list",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.feedback_list.v1",requestSchema:{schemaId:"schema.application.feedback.list.request",revision:1},resultSchema:{schemaId:"schema.application.feedback.list.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:15e3},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(10),decodeResult:$U(158),decodeSuccess:e=>mE(e,"binding.http.feedback_list.v1","schema.application.feedback.list.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(158))},{operation:"application_feedback_proximity",operationId:"operation.application.feedback_proximity",transport:{kind:"http",route:"/application/feedback/proximity",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.feedback_proximity.v1",requestSchema:{schemaId:"schema.application.feedback.proximity.request",revision:1},resultSchema:{schemaId:"schema.application.feedback.proximity.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:15e3},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(159),decodeResult:$U(160),decodeSuccess:e=>mE(e,"binding.http.feedback_proximity.v1","schema.application.feedback.proximity.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(160))},{operation:"field_sites",operationId:"operation.application.field_sites",transport:{kind:"mcp_tool",toolName:"tracedecay_field_sites"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.field_sites.v1",requestSchema:{schemaId:"schema.application.primitive.field-sites.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.field-sites.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(161),decodeResult:$U(162)},{operation:"application_file_dependents",operationId:"operation.application.file_dependents",transport:{kind:"http",route:"/application/primitives/file_dependents",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.file_dependents.v1",requestSchema:{schemaId:"schema.application.primitive.file-dependents.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.file-dependents.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(163),decodeResult:$U(164),decodeSuccess:e=>mE(e,"binding.http.file_dependents.v1","schema.application.primitive.file-dependents.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(164))},{operation:"files",operationId:"operation.application.files",transport:{kind:"mcp_tool",toolName:"tracedecay_files"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.files.v1",requestSchema:{schemaId:"schema.application.primitive.files.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.files.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(165),decodeResult:$U(166)},{operation:"find_exact_symbol",operationId:"operation.application.find_exact_symbol",transport:{kind:"mcp_tool",toolName:"tracedecay_find_exact_symbol"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.find_exact_symbol.v1",requestSchema:{schemaId:"schema.application.primitive.find-exact-symbol.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.find-exact-symbol.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(167),decodeResult:$U(168)},{operation:"gini",operationId:"operation.application.gini",transport:{kind:"mcp_tool",toolName:"tracedecay_gini"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.gini.v1",requestSchema:{schemaId:"schema.application.primitive.gini.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.gini.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(169),decodeResult:$U(170)},{operation:"git_apply",operationId:"operation.application.git_apply",transport:{kind:"mcp_tool",toolName:"tracedecay_git_apply"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.git_apply.v1",requestSchema:{schemaId:"schema.application.git.apply.request",revision:1},resultSchema:{schemaId:"schema.application.git.apply.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:$U(171),decodeResult:$U(172)},{operation:"application_git_blame",operationId:"operation.application.git_blame",transport:{kind:"http",route:"/application/git/blame",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.git_blame.v1",requestSchema:{schemaId:"schema.application.git.blame.request",revision:1},resultSchema:{schemaId:"schema.application.git.blame.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:$U(173),decodeResult:$U(174),decodeSuccess:e=>mE(e,"binding.http.git_blame.v1","schema.application.git.blame.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(174))},{operation:"application_git_diff",operationId:"operation.application.git_diff",transport:{kind:"http",route:"/application/git/diff",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.git_diff.v1",requestSchema:{schemaId:"schema.application.git.diff.request",revision:1},resultSchema:{schemaId:"schema.application.git.diff.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:$U(175),decodeResult:$U(174),decodeSuccess:e=>mE(e,"binding.http.git_diff.v1","schema.application.git.diff.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(174))},{operation:"application_git_history",operationId:"operation.application.git_history",transport:{kind:"http",route:"/application/git/history",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.git_history.v1",requestSchema:{schemaId:"schema.application.git.history.request",revision:1},resultSchema:{schemaId:"schema.application.git.history.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:$U(176),decodeResult:$U(174),decodeSuccess:e=>mE(e,"binding.http.git_history.v1","schema.application.git.history.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(174))},{operation:"application_git_hunks",operationId:"operation.application.git_hunks",transport:{kind:"http",route:"/application/git/hunks",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.git_hunks.v1",requestSchema:{schemaId:"schema.application.git.hunks.request",revision:1},resultSchema:{schemaId:"schema.application.git.hunks.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:$U(177),decodeResult:$U(174),decodeSuccess:e=>mE(e,"binding.http.git_hunks.v1","schema.application.git.hunks.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(174))},{operation:"git_preview",operationId:"operation.application.git_preview",transport:{kind:"mcp_tool",toolName:"tracedecay_git_preview"},effect:"preview",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.git_preview.v1",requestSchema:{schemaId:"schema.application.git.preview.request",revision:1},resultSchema:{schemaId:"schema.application.git.preview.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:$U(178),decodeResult:$U(179)},{operation:"application_git_status",operationId:"operation.application.git_status",transport:{kind:"http",route:"/application/git/status",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.git_status.v1",requestSchema:{schemaId:"schema.application.git.status.request",revision:1},resultSchema:{schemaId:"schema.application.git.status.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:$U(180),decodeResult:$U(174),decodeSuccess:e=>mE(e,"binding.http.git_status.v1","schema.application.git.status.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(174))},{operation:"application_github_stack_signal_expand",operationId:"operation.application.github_stack_signal_expand",transport:{kind:"http",route:"/application/github-stack/signal-expand",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.github_stack_signal_expand.v1",requestSchema:{schemaId:"schema.application.github-stack.signal-expand.request",revision:1},resultSchema:{schemaId:"schema.application.github-stack.signal-expand.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:$U(181),decodeResult:$U(182),decodeSuccess:e=>mE(e,"binding.http.github_stack_signal_expand.v1","schema.application.github-stack.signal-expand.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(182))},{operation:"god_class",operationId:"operation.application.god_class",transport:{kind:"mcp_tool",toolName:"tracedecay_god_class"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.god_class.v1",requestSchema:{schemaId:"schema.application.primitive.god-class.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.god-class.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(183),decodeResult:$U(184)},{operation:"grep",operationId:"operation.application.grep",transport:{kind:"mcp_tool",toolName:"tracedecay_grep"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.grep.v1",requestSchema:{schemaId:"schema.application.primitive.grep.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.grep.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(185),decodeResult:$U(186)},{operation:"health",operationId:"operation.application.health",transport:{kind:"mcp_tool",toolName:"tracedecay_health"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.health.v1",requestSchema:{schemaId:"schema.application.primitive.health.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.health.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(187),decodeResult:$U(188)},{operation:"application_health_delta",operationId:"operation.application.health_delta",transport:{kind:"http",route:"/application/primitives/health_delta",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.health_delta.v1",requestSchema:{schemaId:"schema.application.primitive.health-delta.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.health-delta.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(189),decodeResult:$U(190),decodeSuccess:e=>mE(e,"binding.http.health_delta.v1","schema.application.primitive.health-delta.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(190))},{operation:"application_health_read",operationId:"operation.application.health_read",transport:{kind:"http",route:"/application/primitives/health_read",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.health_read.v1",requestSchema:{schemaId:"schema.application.primitive.health-read.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.health-read.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(191),decodeResult:$U(192),decodeSuccess:e=>mE(e,"binding.http.health_read.v1","schema.application.primitive.health-read.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(192))},{operation:"hermes_skill_bridge",operationId:"operation.application.hermes_skill_bridge",transport:{kind:"mcp_tool",toolName:"tracedecay_hermes_skill_bridge"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.hermes_skill_bridge.v1",requestSchema:{schemaId:"schema.application.primitive.hermes-skill-bridge.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.hermes-skill-bridge.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(193),decodeResult:$U(194)},{operation:"hook_runtime",operationId:"operation.application.hook_runtime",transport:{kind:"mcp_tool",toolName:"tracedecay_hook_runtime"},effect:"records_host_evidence",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.hook_runtime.v1",requestSchema:{schemaId:"schema.application.primitive.hook-runtime.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.hook-runtime.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","timed_out","failed","unavailable","partial"],decodeRequest:$U(195),decodeResult:$U(196)},{operation:"hotspots",operationId:"operation.application.hotspots",transport:{kind:"mcp_tool",toolName:"tracedecay_hotspots"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.hotspots.v1",requestSchema:{schemaId:"schema.application.primitive.hotspots.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.hotspots.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(197),decodeResult:$U(198)},{operation:"impact",operationId:"operation.application.impact",transport:{kind:"mcp_tool",toolName:"tracedecay_impact"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.impact.v1",requestSchema:{schemaId:"schema.application.primitive.impact.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.impact.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(199),decodeResult:$U(200)},{operation:"inheritance_depth",operationId:"operation.application.inheritance_depth",transport:{kind:"mcp_tool",toolName:"tracedecay_inheritance_depth"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.inheritance_depth.v1",requestSchema:{schemaId:"schema.application.primitive.inheritance-depth.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.inheritance-depth.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(201),decodeResult:$U(202)},{operation:"insert_at",operationId:"operation.application.insert_at",transport:{kind:"mcp_tool",toolName:"tracedecay_insert_at"},effect:"source_edit",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.insert_at.v1",requestSchema:{schemaId:"schema.application.source-edit.insert-at.request",revision:1},resultSchema:{schemaId:"schema.application.source-edit.insert-at.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:$U(203),decodeResult:$U(18)},{operation:"insert_at_symbol",operationId:"operation.application.insert_at_symbol",transport:{kind:"mcp_tool",toolName:"tracedecay_insert_at_symbol"},effect:"source_edit",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.insert_at_symbol.v1",requestSchema:{schemaId:"schema.application.source-edit.insert-at-symbol.request",revision:1},resultSchema:{schemaId:"schema.application.source-edit.insert-at-symbol.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:$U(204),decodeResult:$U(18)},{operation:"largest",operationId:"operation.application.largest",transport:{kind:"mcp_tool",toolName:"tracedecay_largest"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.largest.v1",requestSchema:{schemaId:"schema.application.primitive.largest.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.largest.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(205),decodeResult:$U(206)},{operation:"application_lcm_describe",operationId:"operation.application.lcm_describe",transport:{kind:"http",route:"/application/retained/lcm_describe",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.lcm_describe.v1",requestSchema:{schemaId:"schema.application.retained.lcm-describe.request",revision:1},resultSchema:{schemaId:"schema.application.retained.lcm-describe.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(207),decodeResult:$U(208),decodeSuccess:e=>mE(e,"binding.http.lcm_describe.v1","schema.application.retained.lcm-describe.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(208))},{operation:"application_lcm_doctor",operationId:"operation.application.lcm_doctor",transport:{kind:"http",route:"/application/retained/lcm_doctor",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.lcm_doctor.v1",requestSchema:{schemaId:"schema.application.retained.lcm-doctor.request",revision:1},resultSchema:{schemaId:"schema.application.retained.lcm-doctor.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(209),decodeResult:$U(210),decodeSuccess:e=>mE(e,"binding.http.lcm_doctor.v1","schema.application.retained.lcm-doctor.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(210))},{operation:"application_lcm_expand",operationId:"operation.application.lcm_expand",transport:{kind:"http",route:"/application/retained/lcm_expand",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.lcm_expand.v1",requestSchema:{schemaId:"schema.application.retained.lcm-expand.request",revision:1},resultSchema:{schemaId:"schema.application.retained.lcm-expand.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(211),decodeResult:$U(212),decodeSuccess:e=>mE(e,"binding.http.lcm_expand.v1","schema.application.retained.lcm-expand.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(212))},{operation:"application_lcm_expand_query",operationId:"operation.application.lcm_expand_query",transport:{kind:"http",route:"/application/retained/lcm_expand_query",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.lcm_expand_query.v1",requestSchema:{schemaId:"schema.application.retained.lcm-expand-query.request",revision:1},resultSchema:{schemaId:"schema.application.retained.lcm-expand-query.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(213),decodeResult:$U(214),decodeSuccess:e=>mE(e,"binding.http.lcm_expand_query.v1","schema.application.retained.lcm-expand-query.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(214))},{operation:"application_lcm_grep",operationId:"operation.application.lcm_grep",transport:{kind:"http",route:"/application/retained/lcm_grep",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.lcm_grep.v1",requestSchema:{schemaId:"schema.application.retained.lcm-grep.request",revision:1},resultSchema:{schemaId:"schema.application.retained.lcm-grep.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(215),decodeResult:$U(216),decodeSuccess:e=>mE(e,"binding.http.lcm_grep.v1","schema.application.retained.lcm-grep.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(216))},{operation:"application_lcm_load_session",operationId:"operation.application.lcm_load_session",transport:{kind:"http",route:"/application/retained/lcm_load_session",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.lcm_load_session.v1",requestSchema:{schemaId:"schema.application.retained.lcm-load-session.request",revision:1},resultSchema:{schemaId:"schema.application.retained.lcm-load-session.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(217),decodeResult:$U(218),decodeSuccess:e=>mE(e,"binding.http.lcm_load_session.v1","schema.application.retained.lcm-load-session.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(218))},{operation:"application_lcm_status",operationId:"operation.application.lcm_status",transport:{kind:"http",route:"/application/retained/lcm_status",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.lcm_status.v1",requestSchema:{schemaId:"schema.application.retained.lcm-status.request",revision:1},resultSchema:{schemaId:"schema.application.retained.lcm-status.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(219),decodeResult:$U(220),decodeSuccess:e=>mE(e,"binding.http.lcm_status.v1","schema.application.retained.lcm-status.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(220))},{operation:"application_memory_status",operationId:"operation.application.memory_status",transport:{kind:"http",route:"/application/retained/memory_status",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.memory_status.v1",requestSchema:{schemaId:"schema.application.retained.memory-status.request",revision:1},resultSchema:{schemaId:"schema.application.retained.memory-status.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(221),decodeResult:$U(222),decodeSuccess:e=>mE(e,"binding.http.memory_status.v1","schema.application.retained.memory-status.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(222))},{operation:"application_message_search",operationId:"operation.application.message_search",transport:{kind:"http",route:"/application/retained/message_search",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.message_search.v1",requestSchema:{schemaId:"schema.application.retained.message-search.request",revision:1},resultSchema:{schemaId:"schema.application.retained.message-search.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(223),decodeResult:$U(224),decodeSuccess:e=>mE(e,"binding.http.message_search.v1","schema.application.retained.message-search.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(224))},{operation:"application_module_api",operationId:"operation.application.module_api",transport:{kind:"http",route:"/application/primitives/module_api",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.module_api.v1",requestSchema:{schemaId:"schema.application.primitive.module-api.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.module-api.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(225),decodeResult:$U(226),decodeSuccess:e=>mE(e,"binding.http.module_api.v1","schema.application.primitive.module-api.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(226))},{operation:"move_symbol",operationId:"operation.application.move_symbol",transport:{kind:"mcp_tool",toolName:"tracedecay_move_symbol"},effect:"source_edit",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.move_symbol.v1",requestSchema:{schemaId:"schema.application.source-edit.move-symbol.request",revision:1},resultSchema:{schemaId:"schema.application.source-edit.move-symbol.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:$U(227),decodeResult:$U(18)},{operation:"multi_str_replace",operationId:"operation.application.multi_str_replace",transport:{kind:"mcp_tool",toolName:"tracedecay_multi_str_replace"},effect:"source_edit",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.multi_str_replace.v1",requestSchema:{schemaId:"schema.application.source-edit.multi-str-replace.request",revision:1},resultSchema:{schemaId:"schema.application.source-edit.multi-str-replace.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:$U(228),decodeResult:$U(18)},{operation:"native_integration_status",operationId:"operation.application.native_integration_status",transport:{kind:"mcp_tool",toolName:"tracedecay_native_integration_status"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.native_integration_status.v1",requestSchema:{schemaId:"schema.application.native-integration.status.request",revision:1},resultSchema:{schemaId:"schema.application.native-integration.status.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:$U(229),decodeResult:$U(15)},{operation:"node",operationId:"operation.application.node",transport:{kind:"mcp_tool",toolName:"tracedecay_node"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.node.v1",requestSchema:{schemaId:"schema.application.primitive.node.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.node.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(230),decodeResult:$U(231)},{operation:"observatory_read",operationId:"operation.application.observatory_read",transport:{kind:"mcp_tool",toolName:"tracedecay_observatory_read"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.observatory_read.v1",requestSchema:{schemaId:"schema.application.observatory-read.request",revision:1},resultSchema:{schemaId:"schema.application.observatory-read.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:15e3},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(232),decodeResult:$U(233)},{operation:"port_order",operationId:"operation.application.port_order",transport:{kind:"mcp_tool",toolName:"tracedecay_port_order"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.port_order.v1",requestSchema:{schemaId:"schema.application.primitive.port-order.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.port-order.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(234),decodeResult:$U(235)},{operation:"port_status",operationId:"operation.application.port_status",transport:{kind:"mcp_tool",toolName:"tracedecay_port_status"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.port_status.v1",requestSchema:{schemaId:"schema.application.primitive.port-status.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.port-status.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(236),decodeResult:$U(237)},{operation:"pr_context",operationId:"operation.application.pr_context",transport:{kind:"mcp_tool",toolName:"tracedecay_pr_context"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.pr_context.v1",requestSchema:{schemaId:"schema.application.primitive.pr-context.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.pr-context.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(238),decodeResult:$U(239)},{operation:"preflight_native_integration",operationId:"operation.application.preflight_native_integration",transport:{kind:"mcp_tool",toolName:"tracedecay_preflight_native_integration"},effect:"preview",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.preflight_native_integration.v1",requestSchema:{schemaId:"schema.application.native-integration.preflight.request",revision:1},resultSchema:{schemaId:"schema.application.native-integration.preflight.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:$U(240),decodeResult:$U(15)},{operation:"project_context",operationId:"operation.application.project_context",transport:{kind:"mcp_tool",toolName:"tracedecay_project_context"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.project_context.v1",requestSchema:{schemaId:"schema.application.primitive.project-context.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.project-context.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(241),decodeResult:$U(242)},{operation:"project_list",operationId:"operation.application.project_list",transport:{kind:"mcp_tool",toolName:"tracedecay_project_list"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.project_list.v1",requestSchema:{schemaId:"schema.application.primitive.project-list.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.project-list.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(243),decodeResult:$U(244)},{operation:"project_search",operationId:"operation.application.project_search",transport:{kind:"mcp_tool",toolName:"tracedecay_project_search"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.project_search.v1",requestSchema:{schemaId:"schema.application.primitive.project-search.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.project-search.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(245),decodeResult:$U(244)},{operation:"application_qualified_name",operationId:"operation.application.qualified_name",transport:{kind:"http",route:"/application/primitives/qualified_name",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.qualified_name.v1",requestSchema:{schemaId:"schema.application.primitive.qualified-name.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.qualified-name.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(246),decodeResult:$U(247),decodeSuccess:e=>mE(e,"binding.http.qualified_name.v1","schema.application.primitive.qualified-name.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(247))},{operation:"rank",operationId:"operation.application.rank",transport:{kind:"mcp_tool",toolName:"tracedecay_rank"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.rank.v1",requestSchema:{schemaId:"schema.application.primitive.rank.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.rank.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(248),decodeResult:$U(249)},{operation:"recursion",operationId:"operation.application.recursion",transport:{kind:"mcp_tool",toolName:"tracedecay_recursion"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.recursion.v1",requestSchema:{schemaId:"schema.application.primitive.recursion.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.recursion.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(250),decodeResult:$U(251)},{operation:"redundancy",operationId:"operation.application.redundancy",transport:{kind:"mcp_tool",toolName:"tracedecay_redundancy"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.redundancy.v1",requestSchema:{schemaId:"schema.application.primitive.redundancy.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.redundancy.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(252),decodeResult:$U(253)},{operation:"remote_status",operationId:"operation.application.remote_status",transport:{kind:"mcp_tool",toolName:"tracedecay_remote_status"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.remote_status.v1",requestSchema:{schemaId:"schema.application.primitive.remote-status.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.remote-status.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(254),decodeResult:$U(255)},{operation:"rename_preview",operationId:"operation.application.rename_preview",transport:{kind:"mcp_tool",toolName:"tracedecay_rename_preview"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.rename_preview.v1",requestSchema:{schemaId:"schema.application.primitive.rename-preview.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.rename-preview.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(256),decodeResult:$U(257)},{operation:"rename_symbol",operationId:"operation.application.rename_symbol",transport:{kind:"mcp_tool",toolName:"tracedecay_rename_symbol"},effect:"source_edit",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.rename_symbol.v1",requestSchema:{schemaId:"schema.application.source-edit.rename-symbol.request",revision:1},resultSchema:{schemaId:"schema.application.source-edit.rename-symbol.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:$U(258),decodeResult:$U(18)},{operation:"replace_symbol",operationId:"operation.application.replace_symbol",transport:{kind:"mcp_tool",toolName:"tracedecay_replace_symbol"},effect:"source_edit",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.replace_symbol.v1",requestSchema:{schemaId:"schema.application.source-edit.replace-symbol.request",revision:1},resultSchema:{schemaId:"schema.application.source-edit.replace-symbol.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:$U(259),decodeResult:$U(18)},{operation:"retrieve",operationId:"operation.application.retrieve",transport:{kind:"mcp_tool",toolName:"tracedecay_retrieve"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.retrieve.v1",requestSchema:{schemaId:"schema.application.primitive.retrieve.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.retrieve.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(260),decodeResult:$U(261)},{operation:"run_affected_tests",operationId:"operation.application.run_affected_tests",transport:{kind:"mcp_tool",toolName:"tracedecay_run_affected_tests"},effect:"spawns_process",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.run_affected_tests.v1",requestSchema:{schemaId:"schema.application.primitive.run-affected-tests.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.run-affected-tests.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","effect_in_flight"]},deadline:{behavior:"return_operation_receipt",maximum_millis:6e5},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(262),decodeResult:$U(263)},{operation:"runtime",operationId:"operation.application.runtime",transport:{kind:"mcp_tool",toolName:"tracedecay_runtime"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.runtime.v1",requestSchema:{schemaId:"schema.application.primitive.runtime.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.runtime.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(264),decodeResult:$U(265)},{operation:"search",operationId:"operation.application.search",transport:{kind:"mcp_tool",toolName:"tracedecay_search"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.search.v1",requestSchema:{schemaId:"schema.application.primitive.search.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.search.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(266),decodeResult:$U(267)},{operation:"session_lookup",operationId:"operation.application.session_lookup",transport:{kind:"mcp_tool",toolName:"tracedecay_session_lookup"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.session_lookup.v1",requestSchema:{schemaId:"schema.application.primitive.session-lookup.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.session-lookup.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(268),decodeResult:$U(269)},{operation:"application_session_refresh_begin",operationId:"operation.application.session_refresh_begin",transport:{kind:"http",route:"/application/retained/session_refresh_begin",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.session_refresh_begin.v1",requestSchema:{schemaId:"schema.application.retained.session-refresh-begin.request",revision:1},resultSchema:{schemaId:"schema.application.retained.session-refresh-begin.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","reconciling","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","unavailable","effect_unknown","partial"],decodeRequest:$U(270),decodeResult:$U(271),decodeSuccess:e=>mE(e,"binding.http.session_refresh_begin.v1","schema.application.retained.session-refresh-begin.result",1,["completed","cancelled","timed_out","failed","unavailable","effect_unknown","partial"],{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","reconciling","after_commit"]},"durable_effect","required",$U(271))},{operation:"application_session_refresh_cancel",operationId:"operation.application.session_refresh_cancel",transport:{kind:"http",route:"/application/retained/session_refresh_cancel",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.session_refresh_cancel.v1",requestSchema:{schemaId:"schema.application.retained.session-refresh-cancel.request",revision:1},resultSchema:{schemaId:"schema.application.retained.session-refresh-cancel.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","reconciling","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","unavailable","effect_unknown","partial"],decodeRequest:$U(270),decodeResult:$U(272),decodeSuccess:e=>mE(e,"binding.http.session_refresh_cancel.v1","schema.application.retained.session-refresh-cancel.result",1,["completed","cancelled","timed_out","failed","unavailable","effect_unknown","partial"],{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","reconciling","after_commit"]},"durable_effect","required",$U(272))},{operation:"application_session_refresh_status",operationId:"operation.application.session_refresh_status",transport:{kind:"http",route:"/application/retained/session_refresh_status",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.session_refresh_status.v1",requestSchema:{schemaId:"schema.application.retained.session-refresh-status.request",revision:1},resultSchema:{schemaId:"schema.application.retained.session-refresh-status.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(270),decodeResult:$U(273),decodeSuccess:e=>mE(e,"binding.http.session_refresh_status.v1","schema.application.retained.session-refresh-status.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(273))},{operation:"application_sessions_for",operationId:"operation.application.sessions_for",transport:{kind:"http",route:"/application/retained/sessions_for",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.sessions_for.v1",requestSchema:{schemaId:"schema.application.retained.sessions-for.request",revision:1},resultSchema:{schemaId:"schema.application.retained.sessions-for.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(274),decodeResult:$U(275),decodeSuccess:e=>mE(e,"binding.http.sessions_for.v1","schema.application.retained.sessions-for.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(275))},{operation:"signature",operationId:"operation.application.signature",transport:{kind:"mcp_tool",toolName:"tracedecay_signature"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.signature.v1",requestSchema:{schemaId:"schema.application.primitive.signature.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.signature.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(112),decodeResult:$U(276)},{operation:"similar",operationId:"operation.application.similar",transport:{kind:"mcp_tool",toolName:"tracedecay_similar"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.similar.v1",requestSchema:{schemaId:"schema.application.primitive.similar.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.similar.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(277),decodeResult:$U(278)},{operation:"skill_list",operationId:"operation.application.skill_list",transport:{kind:"mcp_tool",toolName:"tracedecay_skill_list"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.skill_list.v1",requestSchema:{schemaId:"schema.application.primitive.skill-list.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.skill-list.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(279),decodeResult:$U(280)},{operation:"skill_view",operationId:"operation.application.skill_view",transport:{kind:"mcp_tool",toolName:"tracedecay_skill_view"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.skill_view.v1",requestSchema:{schemaId:"schema.application.primitive.skill-view.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.skill-view.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(281),decodeResult:$U(282)},{operation:"application_source_body",operationId:"operation.application.source_body",transport:{kind:"http",route:"/application/primitives/source_body",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.source_body.v1",requestSchema:{schemaId:"schema.application.primitive.source-body.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.source-body.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(283),decodeResult:$U(284),decodeSuccess:e=>mE(e,"binding.http.source_body.v1","schema.application.primitive.source-body.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(284))},{operation:"source_edit_reconcile",operationId:"operation.application.source_edit_reconcile",transport:{kind:"mcp_tool",toolName:"tracedecay_source_edit_reconcile"},effect:"source_edit",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.source_edit_reconcile.v1",requestSchema:{schemaId:"schema.application.source-edit.reconcile.request",revision:1},resultSchema:{schemaId:"schema.application.source-edit.reconcile.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:$U(285),decodeResult:$U(18)},{operation:"source_edit_rollback",operationId:"operation.application.source_edit_rollback",transport:{kind:"mcp_tool",toolName:"tracedecay_source_edit_rollback"},effect:"source_edit",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.source_edit_rollback.v1",requestSchema:{schemaId:"schema.application.source-edit.rollback.request",revision:1},resultSchema:{schemaId:"schema.application.source-edit.rollback.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:$U(286),decodeResult:$U(18)},{operation:"application_source_lines",operationId:"operation.application.source_lines",transport:{kind:"http",route:"/application/primitives/source_lines",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.source_lines.v1",requestSchema:{schemaId:"schema.application.primitive.source-lines.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.source-lines.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(287),decodeResult:$U(288),decodeSuccess:e=>mE(e,"binding.http.source_lines.v1","schema.application.primitive.source-lines.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(288))},{operation:"application_source_outline",operationId:"operation.application.source_outline",transport:{kind:"http",route:"/application/primitives/source_outline",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.source_outline.v1",requestSchema:{schemaId:"schema.application.primitive.source-outline.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.source-outline.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(289),decodeResult:$U(290),decodeSuccess:e=>mE(e,"binding.http.source_outline.v1","schema.application.primitive.source-outline.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(290))},{operation:"stack_snapshot",operationId:"operation.application.stack_snapshot",transport:{kind:"mcp_tool",toolName:"tracedecay_stack_snapshot"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.stack_snapshot.v1",requestSchema:{schemaId:"schema.application.native-integration.stack-snapshot.request",revision:1},resultSchema:{schemaId:"schema.application.native-integration.stack-snapshot.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:$U(291),decodeResult:$U(15)},{operation:"status",operationId:"operation.application.status",transport:{kind:"mcp_tool",toolName:"tracedecay_status"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.status.v1",requestSchema:{schemaId:"schema.application.primitive.status.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.status.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(292),decodeResult:$U(293)},{operation:"application_storage_status",operationId:"operation.application.storage_status",transport:{kind:"http",route:"/application/primitives/storage_status",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.storage_status.v1",requestSchema:{schemaId:"schema.application.primitive.storage-status.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.storage-status.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(294),decodeResult:$U(295),decodeSuccess:e=>mE(e,"binding.http.storage_status.v1","schema.application.primitive.storage-status.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(295))},{operation:"str_replace",operationId:"operation.application.str_replace",transport:{kind:"mcp_tool",toolName:"tracedecay_str_replace"},effect:"source_edit",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.str_replace.v1",requestSchema:{schemaId:"schema.application.source-edit.str-replace.request",revision:1},resultSchema:{schemaId:"schema.application.source-edit.str-replace.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:$U(296),decodeResult:$U(18)},{operation:"test_map",operationId:"operation.application.test_map",transport:{kind:"mcp_tool",toolName:"tracedecay_test_map"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.test_map.v1",requestSchema:{schemaId:"schema.application.primitive.test-map.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.test-map.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(297),decodeResult:$U(298)},{operation:"application_test_results",operationId:"operation.application.test_results",transport:{kind:"http",route:"/application/tests/results",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.test_results.v1",requestSchema:{schemaId:"schema.application.feedback.test-results.request",revision:1},resultSchema:{schemaId:"schema.application.feedback.test-results.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:15e3},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(299),decodeResult:$U(300),decodeSuccess:e=>mE(e,"binding.http.test_results.v1","schema.application.feedback.test-results.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(300))},{operation:"test_risk",operationId:"operation.application.test_risk",transport:{kind:"mcp_tool",toolName:"tracedecay_test_risk"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.test_risk.v1",requestSchema:{schemaId:"schema.application.primitive.test-risk.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.test-risk.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(301),decodeResult:$U(302)},{operation:"todos",operationId:"operation.application.todos",transport:{kind:"mcp_tool",toolName:"tracedecay_todos"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.todos.v1",requestSchema:{schemaId:"schema.application.primitive.todos.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.todos.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(303),decodeResult:$U(304)},{operation:"unmounted_files",operationId:"operation.application.unmounted_files",transport:{kind:"mcp_tool",toolName:"tracedecay_unmounted_files"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.unmounted_files.v1",requestSchema:{schemaId:"schema.application.primitive.unmounted-files.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.unmounted-files.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(305),decodeResult:$U(306)},{operation:"unsafe_patterns",operationId:"operation.application.unsafe_patterns",transport:{kind:"mcp_tool",toolName:"tracedecay_unsafe_patterns"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.unsafe_patterns.v1",requestSchema:{schemaId:"schema.application.primitive.unsafe-patterns.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.unsafe-patterns.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(307),decodeResult:$U(308)},{operation:"application_workflows",operationId:"operation.application.workflows",transport:{kind:"http",route:"/application/retained/workflows",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.workflows.v1",requestSchema:{schemaId:"schema.application.retained.workflows.request",revision:1},resultSchema:{schemaId:"schema.application.retained.workflows.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(309),decodeResult:$U(310),decodeSuccess:e=>mE(e,"binding.http.workflows.v1","schema.application.retained.workflows.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(310))},{operation:"application_worktree_cleanup_confirm",operationId:"operation.application.worktree_cleanup_confirm",transport:{kind:"http",route:"/application/native-integration/worktree_cleanup_confirm",method:"POST"},effect:"preview",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.worktree_cleanup_confirm.v1",requestSchema:{schemaId:"schema.application.native-integration.worktree-cleanup-confirm.request",revision:1},resultSchema:{schemaId:"schema.application.native-integration.worktree-cleanup-confirm.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:$U(311),decodeResult:$U(15),decodeSuccess:e=>mE(e,"binding.http.worktree_cleanup_confirm.v1","schema.application.native-integration.worktree-cleanup-confirm.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(15))},{operation:"application_worktree_cleanup_inspect",operationId:"operation.application.worktree_cleanup_inspect",transport:{kind:"http",route:"/application/native-integration/worktree_cleanup_inspect",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.worktree_cleanup_inspect.v1",requestSchema:{schemaId:"schema.application.native-integration.worktree-cleanup-inspect.request",revision:1},resultSchema:{schemaId:"schema.application.native-integration.worktree-cleanup-inspect.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:$U(312),decodeResult:$U(15),decodeSuccess:e=>mE(e,"binding.http.worktree_cleanup_inspect.v1","schema.application.native-integration.worktree-cleanup-inspect.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(15))},{operation:"application_worktree_cleanup_reconcile",operationId:"operation.application.worktree_cleanup_reconcile",transport:{kind:"http",route:"/application/native-integration/worktree_cleanup_reconcile",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.worktree_cleanup_reconcile.v1",requestSchema:{schemaId:"schema.application.native-integration.worktree-cleanup-reconcile.request",revision:1},resultSchema:{schemaId:"schema.application.native-integration.worktree-cleanup-reconcile.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:$U(313),decodeResult:$U(15),decodeSuccess:e=>mE(e,"binding.http.worktree_cleanup_reconcile.v1","schema.application.native-integration.worktree-cleanup-reconcile.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(15))},{operation:"application_worktree_cleanup_remove",operationId:"operation.application.worktree_cleanup_remove",transport:{kind:"http",route:"/application/native-integration/worktree_cleanup_remove",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.worktree_cleanup_remove.v1",requestSchema:{schemaId:"schema.application.native-integration.worktree-cleanup-remove.request",revision:1},resultSchema:{schemaId:"schema.application.native-integration.worktree-cleanup-remove.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:$U(314),decodeResult:$U(15),decodeSuccess:e=>mE(e,"binding.http.worktree_cleanup_remove.v1","schema.application.native-integration.worktree-cleanup-remove.result",1,["completed","cancelled","timed_out","failed","effect_unknown","partial"],{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},"durable_effect","required",$U(15))},{operation:"application_worktree_inventory",operationId:"operation.application.worktree_inventory",transport:{kind:"http",route:"/application/native-integration/worktree_inventory",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.worktree_inventory.v1",requestSchema:{schemaId:"schema.application.native-integration.worktree-inventory.request",revision:1},resultSchema:{schemaId:"schema.application.native-integration.worktree-inventory.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:$U(315),decodeResult:$U(15),decodeSuccess:e=>mE(e,"binding.http.worktree_inventory.v1","schema.application.native-integration.worktree-inventory.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(15))},{operation:"handoff_issue_task_handoff",operationId:"operation.handoff.issue_task_handoff",transport:{kind:"http",route:"/application/handoff/issue-task",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.handoff.issue_task_handoff",requestSchema:{schemaId:"schema.handoff.issue_task_handoff.request",revision:1},resultSchema:{schemaId:"schema.handoff.issue_task_handoff.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","timed_out","failed","effect_unknown","partial"],decodeRequest:$U(316),decodeResult:$U(317),decodeSuccess:e=>mE(e,"binding.http.handoff.issue_task_handoff","schema.handoff.issue_task_handoff.result",1,["completed","timed_out","failed","effect_unknown","partial"],{mode:"not_cancellable"},"durable_effect","required",$U(317))},{operation:"handoff_list_task_handoffs",operationId:"operation.handoff.list_task_handoffs",transport:{kind:"http",route:"/application/handoff/list-task",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.handoff.list_task_handoffs",requestSchema:{schemaId:"schema.handoff.list_task_handoffs.request",revision:1},resultSchema:{schemaId:"schema.handoff.list_task_handoffs.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","timed_out","failed","partial"],decodeRequest:$U(318),decodeResult:$U(319),decodeSuccess:e=>mE(e,"binding.http.handoff.list_task_handoffs","schema.handoff.list_task_handoffs.result",1,["completed","timed_out","failed","partial"],{mode:"not_cancellable"},"operation","not_required",$U(319))},{operation:"handoff_open_investigation_handoff",operationId:"operation.handoff.open_investigation_handoff",transport:{kind:"http",route:"/application/handoff/open-investigation",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.handoff.open_investigation_handoff",requestSchema:{schemaId:"schema.handoff.open_investigation_handoff.request",revision:1},resultSchema:{schemaId:"schema.handoff.open_investigation_handoff.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","timed_out","failed","effect_unknown","partial"],decodeRequest:$U(320),decodeResult:$U(321),decodeSuccess:e=>mE(e,"binding.http.handoff.open_investigation_handoff","schema.handoff.open_investigation_handoff.result",1,["completed","timed_out","failed","effect_unknown","partial"],{mode:"not_cancellable"},"durable_effect","required",$U(321))},{operation:"handoff_open_task_handoff",operationId:"operation.handoff.open_task_handoff",transport:{kind:"http",route:"/application/handoff/open-task",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.handoff.open_task_handoff",requestSchema:{schemaId:"schema.handoff.open_task_handoff.request",revision:1},resultSchema:{schemaId:"schema.handoff.open_task_handoff.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","timed_out","failed","effect_unknown","partial"],decodeRequest:$U(322),decodeResult:$U(323),decodeSuccess:e=>mE(e,"binding.http.handoff.open_task_handoff","schema.handoff.open_task_handoff.result",1,["completed","timed_out","failed","effect_unknown","partial"],{mode:"not_cancellable"},"durable_effect","required",$U(323))},{operation:"multi_root_execute",operationId:"operation.multi_root.execute",transport:{kind:"http",route:"/application/multi-root/execute",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.multi_root.execute.v1",requestSchema:{schemaId:"schema.tracedecay.multi-root.execute-request.v1",revision:1},resultSchema:{schemaId:"schema.tracedecay.multi-root.execute-result.v1",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:$U(324),decodeResult:$U(325),decodeSuccess:e=>mE(e,"binding.http.multi_root.execute.v1","schema.tracedecay.multi-root.execute-result.v1",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(325))},{operation:"multi_root_scope_set_compare_and_swap",operationId:"operation.multi_root.scope_set_compare_and_swap",transport:{kind:"http",route:"/application/multi-root/scope-set/compare-and-swap",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.multi_root.scope_set_compare_and_swap.v1",requestSchema:{schemaId:"schema.tracedecay.multi-root.scope-set-compare-and-swap-request.v1",revision:1},resultSchema:{schemaId:"schema.tracedecay.multi-root.scope-set-compare-and-swap-result.v1",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:$U(326),decodeResult:$U(327),decodeSuccess:e=>mE(e,"binding.http.multi_root.scope_set_compare_and_swap.v1","schema.tracedecay.multi-root.scope-set-compare-and-swap-result.v1",1,["completed","cancelled","timed_out","failed","effect_unknown","partial"],{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},"durable_effect","required",$U(327))},{operation:"multi_root_scope_set_read",operationId:"operation.multi_root.scope_set_read",transport:{kind:"http",route:"/application/multi-root/scope-set/read",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.multi_root.scope_set_read.v1",requestSchema:{schemaId:"schema.tracedecay.multi-root.scope-set-read-request.v1",revision:1},resultSchema:{schemaId:"schema.tracedecay.multi-root.scope-set-read-result.v1",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:$U(328),decodeResult:$U(329),decodeSuccess:e=>mE(e,"binding.http.multi_root.scope_set_read.v1","schema.tracedecay.multi-root.scope-set-read-result.v1",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(329))},{operation:"work_accept_proposal",operationId:"operation.work.accept_proposal",transport:{kind:"http",route:"/application/work/accept-proposal",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.accept_proposal",requestSchema:{schemaId:"schema.work.accept_proposal.request",revision:1},resultSchema:{schemaId:"schema.work.accept_proposal.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:$U(330),decodeResult:$U(331),decodeSuccess:e=>mE(e,"binding.http.work.accept_proposal","schema.work.accept_proposal.result",1,["completed","cancelled","timed_out","failed","effect_unknown","partial"],{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},"durable_effect","required",$U(331))},{operation:"work_adjudicate_duplicate",operationId:"operation.work.adjudicate_duplicate",transport:{kind:"http",route:"/application/work/adjudicate-duplicate",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.adjudicate_duplicate",requestSchema:{schemaId:"schema.work.adjudicate_duplicate.request",revision:1},resultSchema:{schemaId:"schema.work.adjudicate_duplicate.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:$U(332),decodeResult:$U(333),decodeSuccess:e=>mE(e,"binding.http.work.adjudicate_duplicate","schema.work.adjudicate_duplicate.result",1,["completed","cancelled","timed_out","failed","effect_unknown","partial"],{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},"durable_effect","required",$U(333))},{operation:"work_adjudicate_leak",operationId:"operation.work.adjudicate_leak",transport:{kind:"http",route:"/application/work/adjudicate-leak",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.adjudicate_leak",requestSchema:{schemaId:"schema.work.adjudicate_leak.request",revision:1},resultSchema:{schemaId:"schema.work.adjudicate_leak.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:$U(334),decodeResult:$U(335),decodeSuccess:e=>mE(e,"binding.http.work.adjudicate_leak","schema.work.adjudicate_leak.result",1,["completed","cancelled","timed_out","failed","effect_unknown","partial"],{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},"durable_effect","required",$U(335))},{operation:"work_admit_execution",operationId:"operation.work.admit_execution",transport:{kind:"http",route:"/application/work/admit-execution",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.admit_execution",requestSchema:{schemaId:"schema.work.admit_execution.request",revision:1},resultSchema:{schemaId:"schema.work.admit_execution.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:$U(336),decodeResult:$U(337),decodeSuccess:e=>mE(e,"binding.http.work.admit_execution","schema.work.admit_execution.result",1,["completed","cancelled","timed_out","failed","effect_unknown","partial"],{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},"durable_effect","required",$U(337))},{operation:"work_admit_placement",operationId:"operation.work.admit_placement",transport:{kind:"http",route:"/application/work/admit-placement",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.admit_placement",requestSchema:{schemaId:"schema.work.admit_placement.request",revision:1},resultSchema:{schemaId:"schema.work.admit_placement.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:$U(338),decodeResult:$U(339),decodeSuccess:e=>mE(e,"binding.http.work.admit_placement","schema.work.admit_placement.result",1,["completed","cancelled","timed_out","failed","effect_unknown","partial"],{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},"durable_effect","required",$U(339))},{operation:"work_attempt_status",operationId:"operation.work.attempt_status",transport:{kind:"http",route:"/application/work/attempt-status",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.attempt_status",requestSchema:{schemaId:"schema.work.attempt_status.request",revision:1},resultSchema:{schemaId:"schema.work.attempt_status.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:$U(340),decodeResult:$U(341),decodeSuccess:e=>mE(e,"binding.http.work.attempt_status","schema.work.attempt_status.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(341))},{operation:"work_cancel_attempt",operationId:"operation.work.cancel_attempt",transport:{kind:"http",route:"/application/work/cancel-attempt",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.cancel_attempt",requestSchema:{schemaId:"schema.work.cancel_attempt.request",revision:1},resultSchema:{schemaId:"schema.work.cancel_attempt.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:$U(342),decodeResult:$U(341),decodeSuccess:e=>mE(e,"binding.http.work.cancel_attempt","schema.work.cancel_attempt.result",1,["completed","cancelled","timed_out","failed","effect_unknown","partial"],{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},"durable_effect","required",$U(341))},{operation:"work_compare_proposal",operationId:"operation.work.compare_proposal",transport:{kind:"http",route:"/application/work/compare-proposal",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.compare_proposal",requestSchema:{schemaId:"schema.work.compare_proposal.request",revision:1},resultSchema:{schemaId:"schema.work.compare_proposal.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:$U(343),decodeResult:$U(344),decodeSuccess:e=>mE(e,"binding.http.work.compare_proposal","schema.work.compare_proposal.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(344))},{operation:"work_create",operationId:"operation.work.create",transport:{kind:"http",route:"/application/work/create",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.create",requestSchema:{schemaId:"schema.work.create.request",revision:1},resultSchema:{schemaId:"schema.work.create.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:$U(345),decodeResult:$U(331),decodeSuccess:e=>mE(e,"binding.http.work.create","schema.work.create.result",1,["completed","cancelled","timed_out","failed","effect_unknown","partial"],{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},"durable_effect","required",$U(331))},{operation:"work_execution_history",operationId:"operation.work.execution_history",transport:{kind:"http",route:"/application/work/execution-history",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.execution_history",requestSchema:{schemaId:"schema.work.execution_history.request",revision:1},resultSchema:{schemaId:"schema.work.execution_history.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:$U(346),decodeResult:$U(347),decodeSuccess:e=>mE(e,"binding.http.work.execution_history","schema.work.execution_history.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(347))},{operation:"work_experience",operationId:"operation.work.experience",transport:{kind:"http",route:"/application/work/experience",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.experience",requestSchema:{schemaId:"schema.work.experience.request",revision:1},resultSchema:{schemaId:"schema.work.experience.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:$U(348),decodeResult:$U(349),decodeSuccess:e=>mE(e,"binding.http.work.experience","schema.work.experience.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(349))},{operation:"work_generate_proposal",operationId:"operation.work.generate_proposal",transport:{kind:"http",route:"/application/work/generate-proposal",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.generate_proposal",requestSchema:{schemaId:"schema.work.generate_proposal.request",revision:1},resultSchema:{schemaId:"schema.work.generate_proposal.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:$U(350),decodeResult:$U(351),decodeSuccess:e=>mE(e,"binding.http.work.generate_proposal","schema.work.generate_proposal.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(351))},{operation:"work_hydrate_artifacts",operationId:"operation.work.hydrate_artifacts",transport:{kind:"http",route:"/application/work/hydrate-artifacts",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.hydrate_artifacts",requestSchema:{schemaId:"schema.work.hydrate_artifacts.request",revision:1},resultSchema:{schemaId:"schema.work.hydrate_artifacts.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:$U(352),decodeResult:$U(353),decodeSuccess:e=>mE(e,"binding.http.work.hydrate_artifacts","schema.work.hydrate_artifacts.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(353))},{operation:"work_list_attempts",operationId:"operation.work.list_attempts",transport:{kind:"http",route:"/application/work/list-attempts",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.list_attempts",requestSchema:{schemaId:"schema.work.list_attempts.request",revision:1},resultSchema:{schemaId:"schema.work.list_attempts.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:$U(346),decodeResult:$U(354),decodeSuccess:e=>mE(e,"binding.http.work.list_attempts","schema.work.list_attempts.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(354))},{operation:"work_mutate_graph",operationId:"operation.work.mutate_graph",transport:{kind:"http",route:"/application/work/mutate-graph",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.mutate_graph",requestSchema:{schemaId:"schema.work.mutate_graph.request",revision:1},resultSchema:{schemaId:"schema.work.mutate_graph.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:$U(355),decodeResult:$U(331),decodeSuccess:e=>mE(e,"binding.http.work.mutate_graph","schema.work.mutate_graph.result",1,["completed","cancelled","timed_out","failed","effect_unknown","partial"],{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},"durable_effect","required",$U(331))},{operation:"work_pause_run",operationId:"operation.work.pause_run",transport:{kind:"http",route:"/application/work/pause-run",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.pause_run",requestSchema:{schemaId:"schema.work.pause_run.request",revision:1},resultSchema:{schemaId:"schema.work.pause_run.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:$U(356),decodeResult:$U(357),decodeSuccess:e=>mE(e,"binding.http.work.pause_run","schema.work.pause_run.result",1,["completed","cancelled","timed_out","failed","effect_unknown","partial"],{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},"durable_effect","required",$U(357))},{operation:"work_placement_preflight",operationId:"operation.work.placement_preflight",transport:{kind:"http",route:"/application/work/placement-preflight",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.placement_preflight",requestSchema:{schemaId:"schema.work.placement_preflight.request",revision:1},resultSchema:{schemaId:"schema.work.placement_preflight.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:$U(358),decodeResult:$U(359),decodeSuccess:e=>mE(e,"binding.http.work.placement_preflight","schema.work.placement_preflight.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(359))},{operation:"work_placement_status",operationId:"operation.work.placement_status",transport:{kind:"http",route:"/application/work/placement-status",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.placement_status",requestSchema:{schemaId:"schema.work.placement_status.request",revision:1},resultSchema:{schemaId:"schema.work.placement_status.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:$U(360),decodeResult:$U(361),decodeSuccess:e=>mE(e,"binding.http.work.placement_status","schema.work.placement_status.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(361))},{operation:"work_prepare_duplicate_adjudication",operationId:"operation.work.prepare_duplicate_adjudication",transport:{kind:"http",route:"/application/work/prepare-duplicate-adjudication",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.prepare_duplicate_adjudication",requestSchema:{schemaId:"schema.work.prepare_duplicate_adjudication.request",revision:1},resultSchema:{schemaId:"schema.work.prepare_duplicate_adjudication.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:$U(362),decodeResult:$U(332),decodeSuccess:e=>mE(e,"binding.http.work.prepare_duplicate_adjudication","schema.work.prepare_duplicate_adjudication.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(332))},{operation:"work_prepare_graph_mutation",operationId:"operation.work.prepare_graph_mutation",transport:{kind:"http",route:"/application/work/prepare-graph-mutation",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.prepare_graph_mutation",requestSchema:{schemaId:"schema.work.prepare_graph_mutation.request",revision:1},resultSchema:{schemaId:"schema.work.prepare_graph_mutation.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:$U(363),decodeResult:$U(355),decodeSuccess:e=>mE(e,"binding.http.work.prepare_graph_mutation","schema.work.prepare_graph_mutation.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(355))},{operation:"work_release_placement",operationId:"operation.work.release_placement",transport:{kind:"http",route:"/application/work/release-placement",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.release_placement",requestSchema:{schemaId:"schema.work.release_placement.request",revision:1},resultSchema:{schemaId:"schema.work.release_placement.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:$U(364),decodeResult:$U(339),decodeSuccess:e=>mE(e,"binding.http.work.release_placement","schema.work.release_placement.result",1,["completed","cancelled","timed_out","failed","effect_unknown","partial"],{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},"durable_effect","required",$U(339))},{operation:"work_resume_attempts",operationId:"operation.work.resume_attempts",transport:{kind:"http",route:"/application/work/resume-attempts",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.resume_attempts",requestSchema:{schemaId:"schema.work.resume_attempts.request",revision:1},resultSchema:{schemaId:"schema.work.resume_attempts.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:$U(365),decodeResult:$U(366),decodeSuccess:e=>mE(e,"binding.http.work.resume_attempts","schema.work.resume_attempts.result",1,["completed","cancelled","timed_out","failed","effect_unknown","partial"],{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},"durable_effect","required",$U(366))},{operation:"work_resume_run",operationId:"operation.work.resume_run",transport:{kind:"http",route:"/application/work/resume-run",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.resume_run",requestSchema:{schemaId:"schema.work.resume_run.request",revision:1},resultSchema:{schemaId:"schema.work.resume_run.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:$U(367),decodeResult:$U(357),decodeSuccess:e=>mE(e,"binding.http.work.resume_run","schema.work.resume_run.result",1,["completed","cancelled","timed_out","failed","effect_unknown","partial"],{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},"durable_effect","required",$U(357))},{operation:"work_retrieve_evidence",operationId:"operation.work.retrieve_evidence",transport:{kind:"http",route:"/application/work/retrieve-evidence",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.retrieve_evidence",requestSchema:{schemaId:"schema.work.retrieve_evidence.request",revision:1},resultSchema:{schemaId:"schema.work.retrieve_evidence.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:$U(368),decodeResult:$U(369),decodeSuccess:e=>mE(e,"binding.http.work.retrieve_evidence","schema.work.retrieve_evidence.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(369))},{operation:"work_retry_attempt",operationId:"operation.work.retry_attempt",transport:{kind:"http",route:"/application/work/retry-attempt",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.retry_attempt",requestSchema:{schemaId:"schema.work.retry_attempt.request",revision:1},resultSchema:{schemaId:"schema.work.retry_attempt.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:$U(370),decodeResult:$U(371),decodeSuccess:e=>mE(e,"binding.http.work.retry_attempt","schema.work.retry_attempt.result",1,["completed","cancelled","timed_out","failed","effect_unknown","partial"],{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},"durable_effect","required",$U(371))},{operation:"work_review_proposal",operationId:"operation.work.review_proposal",transport:{kind:"http",route:"/application/work/review-proposal",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.review_proposal",requestSchema:{schemaId:"schema.work.review_proposal.request",revision:1},resultSchema:{schemaId:"schema.work.review_proposal.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:$U(372),decodeResult:$U(331),decodeSuccess:e=>mE(e,"binding.http.work.review_proposal","schema.work.review_proposal.result",1,["completed","cancelled","timed_out","failed","effect_unknown","partial"],{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},"durable_effect","required",$U(331))},{operation:"work_run_control",operationId:"operation.work.run_control",transport:{kind:"http",route:"/application/work/run-control",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.run_control",requestSchema:{schemaId:"schema.work.run_control.request",revision:1},resultSchema:{schemaId:"schema.work.run_control.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:$U(373),decodeResult:$U(374),decodeSuccess:e=>mE(e,"binding.http.work.run_control","schema.work.run_control.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(374))},{operation:"work_start_attempt",operationId:"operation.work.start_attempt",transport:{kind:"http",route:"/application/work/start-attempt",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.start_attempt",requestSchema:{schemaId:"schema.work.start_attempt.request",revision:1},resultSchema:{schemaId:"schema.work.start_attempt.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:$U(375),decodeResult:$U(341),decodeSuccess:e=>mE(e,"binding.http.work.start_attempt","schema.work.start_attempt.result",1,["completed","cancelled","timed_out","failed","effect_unknown","partial"],{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},"durable_effect","required",$U(341))},{operation:"work_synthesize",operationId:"operation.work.synthesize",transport:{kind:"http",route:"/application/work/synthesize",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.synthesize",requestSchema:{schemaId:"schema.work.synthesize.request",revision:1},resultSchema:{schemaId:"schema.work.synthesize.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:$U(376),decodeResult:$U(377),decodeSuccess:e=>mE(e,"binding.http.work.synthesize","schema.work.synthesize.result",1,["completed","cancelled","timed_out","failed","effect_unknown","partial"],{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},"durable_effect","required",$U(377))},{operation:"work_topology",operationId:"operation.work.topology",transport:{kind:"http",route:"/application/work/topology",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.topology",requestSchema:{schemaId:"schema.work.topology.request",revision:1},resultSchema:{schemaId:"schema.work.topology.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:$U(378),decodeResult:$U(379),decodeSuccess:e=>mE(e,"binding.http.work.topology","schema.work.topology.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(379))},{operation:"work_topology_metrics",operationId:"operation.work.topology_metrics",transport:{kind:"http",route:"/application/work/topology-metrics",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.topology_metrics",requestSchema:{schemaId:"schema.work.topology_metrics.request",revision:1},resultSchema:{schemaId:"schema.work.topology_metrics.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:$U(380),decodeResult:$U(381),decodeSuccess:e=>mE(e,"binding.http.work.topology_metrics","schema.work.topology_metrics.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(381))},{operation:"work_views",operationId:"operation.work.views",transport:{kind:"http",route:"/application/work/views",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.views",requestSchema:{schemaId:"schema.work.views.request",revision:1},resultSchema:{schemaId:"schema.work.views.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:$U(382),decodeResult:$U(383),decodeSuccess:e=>mE(e,"binding.http.work.views","schema.work.views.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(383))},{operation:"workflow_activate_definition",operationId:"operation.workflow.activate_definition",transport:{kind:"http",route:"/application/workflow/activate-definition",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.workflow.activate_definition",requestSchema:{schemaId:"schema.workflow.activate_definition.request",revision:1},resultSchema:{schemaId:"schema.workflow.activate_definition.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","timed_out","failed","effect_unknown","partial"],decodeRequest:$U(384),decodeResult:$U(385),decodeSuccess:e=>mE(e,"binding.http.workflow.activate_definition","schema.workflow.activate_definition.result",1,["completed","timed_out","failed","effect_unknown","partial"],{mode:"not_cancellable"},"durable_effect","required",$U(385))},{operation:"workflow_cancel_run",operationId:"operation.workflow.cancel_run",transport:{kind:"http",route:"/application/workflow/cancel-run",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.workflow.cancel_run",requestSchema:{schemaId:"schema.workflow.cancel_run.request",revision:1},resultSchema:{schemaId:"schema.workflow.cancel_run.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","timed_out","failed","effect_unknown","partial"],decodeRequest:$U(386),decodeResult:$U(387),decodeSuccess:e=>mE(e,"binding.http.workflow.cancel_run","schema.workflow.cancel_run.result",1,["completed","timed_out","failed","effect_unknown","partial"],{mode:"not_cancellable"},"durable_effect","required",$U(387))},{operation:"workflow_definition_history",operationId:"operation.workflow.definition_history",transport:{kind:"http",route:"/application/workflow/definition-history",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.workflow.definition_history",requestSchema:{schemaId:"schema.workflow.definition_history.request",revision:1},resultSchema:{schemaId:"schema.workflow.definition_history.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:$U(388),decodeResult:$U(389),decodeSuccess:e=>mE(e,"binding.http.workflow.definition_history","schema.workflow.definition_history.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(389))},{operation:"workflow_diff_definition",operationId:"operation.workflow.diff_definition",transport:{kind:"http",route:"/application/workflow/diff-definition",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.workflow.diff_definition",requestSchema:{schemaId:"schema.workflow.diff_definition.request",revision:1},resultSchema:{schemaId:"schema.workflow.diff_definition.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:$U(390),decodeResult:$U(391),decodeSuccess:e=>mE(e,"binding.http.workflow.diff_definition","schema.workflow.diff_definition.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(391))},{operation:"workflow_get_definition",operationId:"operation.workflow.get_definition",transport:{kind:"http",route:"/application/workflow/get-definition",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.workflow.get_definition",requestSchema:{schemaId:"schema.workflow.get_definition.request",revision:1},resultSchema:{schemaId:"schema.workflow.get_definition.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:$U(392),decodeResult:$U(393),decodeSuccess:e=>mE(e,"binding.http.workflow.get_definition","schema.workflow.get_definition.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(393))},{operation:"workflow_get_run",operationId:"operation.workflow.get_run",transport:{kind:"http",route:"/application/workflow/get-run",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.workflow.get_run",requestSchema:{schemaId:"schema.workflow.get_run.request",revision:1},resultSchema:{schemaId:"schema.workflow.get_run.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:$U(394),decodeResult:$U(387),decodeSuccess:e=>mE(e,"binding.http.workflow.get_run","schema.workflow.get_run.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(387))},{operation:"workflow_handoff_issue",operationId:"operation.workflow.handoff_issue",transport:{kind:"http",route:"/application/workflow/handoff-issue",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.workflow.handoff_issue",requestSchema:{schemaId:"schema.workflow.handoff_issue.request",revision:1},resultSchema:{schemaId:"schema.workflow.handoff_issue.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","timed_out","failed","effect_unknown","partial"],decodeRequest:$U(395),decodeResult:$U(396),decodeSuccess:e=>mE(e,"binding.http.workflow.handoff_issue","schema.workflow.handoff_issue.result",1,["completed","timed_out","failed","effect_unknown","partial"],{mode:"not_cancellable"},"durable_effect","required",$U(396))},{operation:"workflow_handoff_redeem",operationId:"operation.workflow.handoff_redeem",transport:{kind:"http",route:"/application/workflow/handoff-redeem",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.workflow.handoff_redeem",requestSchema:{schemaId:"schema.workflow.handoff_redeem.request",revision:1},resultSchema:{schemaId:"schema.workflow.handoff_redeem.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","timed_out","failed","effect_unknown","partial"],decodeRequest:$U(397),decodeResult:$U(398),decodeSuccess:e=>mE(e,"binding.http.workflow.handoff_redeem","schema.workflow.handoff_redeem.result",1,["completed","timed_out","failed","effect_unknown","partial"],{mode:"not_cancellable"},"durable_effect","required",$U(398))},{operation:"workflow_list_definitions",operationId:"operation.workflow.list_definitions",transport:{kind:"http",route:"/application/workflow/list-definitions",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.workflow.list_definitions",requestSchema:{schemaId:"schema.workflow.list_definitions.request",revision:1},resultSchema:{schemaId:"schema.workflow.list_definitions.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:$U(399),decodeResult:$U(389),decodeSuccess:e=>mE(e,"binding.http.workflow.list_definitions","schema.workflow.list_definitions.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(389))},{operation:"workflow_pause_run",operationId:"operation.workflow.pause_run",transport:{kind:"http",route:"/application/workflow/pause-run",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.workflow.pause_run",requestSchema:{schemaId:"schema.workflow.pause_run.request",revision:1},resultSchema:{schemaId:"schema.workflow.pause_run.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","timed_out","failed","effect_unknown","partial"],decodeRequest:$U(400),decodeResult:$U(387),decodeSuccess:e=>mE(e,"binding.http.workflow.pause_run","schema.workflow.pause_run.result",1,["completed","timed_out","failed","effect_unknown","partial"],{mode:"not_cancellable"},"durable_effect","required",$U(387))},{operation:"workflow_register_definition",operationId:"operation.workflow.register_definition",transport:{kind:"http",route:"/application/workflow/register-definition",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.workflow.register_definition",requestSchema:{schemaId:"schema.workflow.register_definition.request",revision:1},resultSchema:{schemaId:"schema.workflow.register_definition.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","timed_out","failed","effect_unknown","partial"],decodeRequest:$U(401),decodeResult:$U(393),decodeSuccess:e=>mE(e,"binding.http.workflow.register_definition","schema.workflow.register_definition.result",1,["completed","timed_out","failed","effect_unknown","partial"],{mode:"not_cancellable"},"durable_effect","required",$U(393))},{operation:"workflow_reject_definition",operationId:"operation.workflow.reject_definition",transport:{kind:"http",route:"/application/workflow/reject-definition",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.workflow.reject_definition",requestSchema:{schemaId:"schema.workflow.reject_definition.request",revision:1},resultSchema:{schemaId:"schema.workflow.reject_definition.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","timed_out","failed","effect_unknown","partial"],decodeRequest:$U(402),decodeResult:$U(385),decodeSuccess:e=>mE(e,"binding.http.workflow.reject_definition","schema.workflow.reject_definition.result",1,["completed","timed_out","failed","effect_unknown","partial"],{mode:"not_cancellable"},"durable_effect","required",$U(385))},{operation:"workflow_resume_run",operationId:"operation.workflow.resume_run",transport:{kind:"http",route:"/application/workflow/resume-run",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.workflow.resume_run",requestSchema:{schemaId:"schema.workflow.resume_run.request",revision:1},resultSchema:{schemaId:"schema.workflow.resume_run.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","timed_out","failed","effect_unknown","partial"],decodeRequest:$U(403),decodeResult:$U(387),decodeSuccess:e=>mE(e,"binding.http.workflow.resume_run","schema.workflow.resume_run.result",1,["completed","timed_out","failed","effect_unknown","partial"],{mode:"not_cancellable"},"durable_effect","required",$U(387))},{operation:"workflow_retire_definition",operationId:"operation.workflow.retire_definition",transport:{kind:"http",route:"/application/workflow/retire-definition",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.workflow.retire_definition",requestSchema:{schemaId:"schema.workflow.retire_definition.request",revision:1},resultSchema:{schemaId:"schema.workflow.retire_definition.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","timed_out","failed","effect_unknown","partial"],decodeRequest:$U(404),decodeResult:$U(385),decodeSuccess:e=>mE(e,"binding.http.workflow.retire_definition","schema.workflow.retire_definition.result",1,["completed","timed_out","failed","effect_unknown","partial"],{mode:"not_cancellable"},"durable_effect","required",$U(385))},{operation:"workflow_start_run",operationId:"operation.workflow.start_run",transport:{kind:"http",route:"/application/workflow/start-run",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.workflow.start_run",requestSchema:{schemaId:"schema.workflow.start_run.request",revision:1},resultSchema:{schemaId:"schema.workflow.start_run.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","timed_out","failed","effect_unknown","partial"],decodeRequest:$U(405),decodeResult:$U(387),decodeSuccess:e=>mE(e,"binding.http.workflow.start_run","schema.workflow.start_run.result",1,["completed","timed_out","failed","effect_unknown","partial"],{mode:"not_cancellable"},"durable_effect","required",$U(387))},{operation:"workflow_validate_definition",operationId:"operation.workflow.validate_definition",transport:{kind:"http",route:"/application/workflow/validate-definition",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.workflow.validate_definition",requestSchema:{schemaId:"schema.workflow.validate_definition.request",revision:1},resultSchema:{schemaId:"schema.workflow.validate_definition.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:$U(406),decodeResult:$U(407),decodeSuccess:e=>mE(e,"binding.http.workflow.validate_definition","schema.workflow.validate_definition.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(407))}];function $G(e){return"object"!=typeof e||null===e||Array.isArray(e)?void 0:e}let $B=["request_digest","run_id","state","task"],$K=new TextEncoder;class $J extends Error{cause;constructor(e,t){super(e),this.name=new.target.name,this.cause=t}}class $Z extends $J{constructor(e){super("the caller aborted the request",e)}}class $Q extends $J{}class $X extends $J{status;constructor(e){super(401===e?"the daemon rejected HTTP authentication":"the daemon rejected the HTTP origin"),this.status=e}}class $Y extends Error{status;payload;constructor(e,t={}){super(e),this.name=new.target.name,this.status=t.status,this.payload=t.payload}}class $1 extends $Y{}class $0 extends Error{status;envelope;problem;constructor(e,t){super(`${t.problem.kind}/${t.problem.code}: ${t.problem.message}`),this.name=new.target.name,this.status=e,this.envelope=t,this.problem=t.problem}}class $2 extends $0{}class $4 extends $0{}class $6 extends $0{}class $3 extends $0{}class $9 extends $0{}class $5 extends $0{}class $8 extends $0{}class $7 extends $0{}class Se extends $0{}class St extends $0{}class Sr extends $0{}let Si=new Set(["completed","cancelled","timed_out","failed","partial","effect_unknown"]),So=new TextEncoder;function Sn(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}function Sa(e){return"number"==typeof e&&Number.isSafeInteger(e)&&e>=0}function Ss(e){return"number"==typeof e&&Number.isSafeInteger(e)}function Sd(e,t){return"string"==typeof e&&e.length>0&&e.trim()===e&&So.encode(e).byteLength<=t&&!/\p{Cc}/u.test(e)}function Sc(e,t){let r=e.headers.get("content-type");return null!==r&&r.split(";",1)[0]?.trim().toLowerCase()===t}function Sl(e){return Sn(e)&&"string"==typeof e.code&&"string"==typeof e.message}function Sp(e){return!!Sn(e)&&!!Ss(e.started_at)&&!!Ss(e.ended_at)&&!(e.ended_at{if(""===e){if(c=!1,0===d.length)return a="",null;let e={event:""===a?"message":a,id:""===s?null:s,data:d.join("\n"),...void 0===r?{}:{retryDelayMs:r}};return a="",d=[],e}if(e.startsWith(":"))return null;c=!0;let t=e.indexOf(":"),i=t<0?e:e.slice(0,t),o=t<0?"":e.slice(t+1);switch(o.startsWith(" ")&&(o=o.slice(1)),i){case"event":a=o;break;case"id":o.includes("\0")||(s=o);break;case"data":d.push(o);break;case"retry":if(/^[0-9]+$/.test(o)){let e=BigInt(o);r=e>2147483647n?0x7fffffff:Number(e)}}return null},p=function*(e){for(;;){let t=-1;for(let e=0;e0||c||d.length>0)throw new $Q("operation stream ended with an incomplete SSE event")}catch(e){if(e instanceof $Y||e instanceof $J)throw e;throw new $Q("operation stream transport was interrupted",e)}finally{i.releaseLock()}}class Sh{operations;projectRoot;applicationRoot;token;origin;doFetch;mcp;constructor(e){let t=new URL(e.baseUrl);if("http:"!==t.protocol&&"https:"!==t.protocol||""!==t.username||""!==t.password||""!==t.search||""!==t.hash)throw new $Y("baseUrl must be an absolute HTTP URL without credentials, query, or fragment");let r=t.toString().replace(/\/+$/u,"");this.projectRoot=`${r}/projects/${encodeURIComponent(e.projectId)}`,this.applicationRoot=`${this.projectRoot}/application`,this.token=e.token,this.origin=e.origin??t.origin,this.doFetch=e.fetch??globalThis.fetch.bind(globalThis),this.mcp=e.mcp;let i={};for(let e of $H)i[e.operation]=(t,r)=>this.#r(e,t,r);this.operations=Object.freeze(i)}headers(e){return new Headers({accept:e,authorization:`Bearer ${this.token}`,origin:this.origin})}operationUrl(e,t){if(t?.size!==void 0&&(!Number.isSafeInteger(t.size)||t.size<1||t.size>1e3))throw new $Y("page size must be an integer between 1 and 1000");if(t?.cursor!==void 0&&!Sd(t.cursor,4096))throw new $Y("page cursor is not a canonical opaque cursor");let r=new URL(`${this.projectRoot}${e}`);return t?.size!==void 0&&r.searchParams.set("page_size",String(t.size)),t?.cursor!==void 0&&r.searchParams.set("cursor",t.cursor),r}lifecycleUrl(e,t){if(!Sd(e,512))throw new $Y("operationId is not a canonical request handle");return new URL(`${this.applicationRoot}/operations/${encodeURIComponent(e)}/${t}`)}async fetchResponse(e,t,r){try{return await this.doFetch(e,t)}catch(t){if(r?.aborted)throw new $Z(r.reason??t);throw new $Q(`transport failure requesting ${e.pathname}`,t)}}async readJson(e,t,r){if(401===e.status||403===e.status)throw new $X(e.status);if(!Sc(e,"application/json")){let t=await e.text();throw new $1("the daemon returned JSON with an invalid media type",{status:e.status,payload:t})}let i=Su(await e.text(),e.status);if(Sn(i)&&"problem"===i.kind){let o=i.value;if(!function(e){var t,r,i;if(!Sn(e)||void 0!==e.binding_id&&"string"!=typeof e.binding_id||!(Sn(t=e.contract)&&Sd(t.schema_id,512)&&Sa(t.schema_revision)&&t.schema_revision>0)||!Sd(e.request_id,512)||!Sn(e.problem))return!1;let o=e.problem,n=Array.isArray(o.legal_actions)?o.legal_actions:null,a="never"===o.retry?null:"same_request"===o.retry||"after_delay"===o.retry?"same_request":"after_revalidate"===o.retry?"fresh_request":"after_reconcile"===o.retry?"same_operation":void 0;if(!(1===o.revision&&"string"==typeof o.kind&&["invalid_request","not_found_or_not_authorized","conflict","partial_effect","stale","unsupported","unavailable","execution_failed","reset_required","saturated","cancelled","timed_out"].includes(o.kind)&&"string"==typeof o.code&&"string"==typeof o.message&&(null===o.diagnostic||Sl(o.diagnostic))&&"detail"in o&&(null===o.detail||function(e){if(!Sn(e))return!1;switch(e.kind){case"parked":return"string"==typeof e.cause&&"string"==typeof e.remedy&&"boolean"==typeof e.retries_on_wake;case"stale_refresh_frontier":return Sa(e.requested)&&Sa(e.committed)&&Sa(e.active);case"stale_precondition":return"string"==typeof e.field&&Sa(e.requested)&&Sa(e.current);case"lock_deadline":return"string"==typeof e.resource&&Sa(e.deadline_ms);case"diagnostics_unsupported":return(null===e.file||"string"==typeof e.file)&&Array.isArray(e.searched)&&e.searched.every(e=>Sn(e)&&"string"==typeof e.path&&"boolean"==typeof e.present);case"diagnostics_pending":return"string"==typeof e.producer&&(null===e.generation||"string"==typeof e.generation);case"code_graph_rewarming":return Sa(e.retry_after_millis);case"reset_required":return"string"==typeof e.authority&&(null===e.found_version||Ss(e.found_version))&&(null===e.required_version||Ss(e.required_version))&&"string"==typeof e.reason&&"string"==typeof e.remedy;default:return!1}}(o.detail))&&"committed_receipt"in o&&"string"==typeof o.owning_layer&&"string"==typeof o.terminality&&"boolean"==typeof o.retryable&&"string"==typeof o.retry&&(null===o.retry_scope||"string"==typeof o.retry_scope)&&(null===o.retry_after_millis||Sa(o.retry_after_millis))&&"cancellation_stage"in o&&(null===o.cancellation_stage||"string"==typeof o.cancellation_stage&&["before_admission","before_read","during_read","before_effect","effect_in_flight"].includes(o.cancellation_stage))&&"unavailable_classification"in o&&(null===o.unavailable_classification||"string"==typeof o.unavailable_classification&&["authority","backend_unavailable","backend_disconnected","backend_retryable"].includes(o.unavailable_classification))&&"execution_failure_classification"in o&&(null===o.execution_failure_classification||"string"==typeof o.execution_failure_classification&&["denied","malformed_output","permanent"].includes(o.execution_failure_classification))&&o.request_id===e.request_id&&Sd(o.trace_id,512)&&Array.isArray(o.details)&&o.details.every(Sl)&&null!==n&&n.every(e=>"string"==typeof e)&&"coverage"in o)||null===n)return!1;let s=null!==o.cancellation_stage&&"before_admission"!==o.cancellation_stage,d=null!==o.unavailable_classification&&"authority"!==o.unavailable_classification,c="partial_effect"===o.kind||"reset_required"===o.kind||"execution_failed"===o.kind||s||d;return o.terminality===(c?"admitted_terminal":"pre_admission")&&"unavailable"===o.kind==(null!==o.unavailable_classification)&&"execution_failed"===o.kind==(null!==o.execution_failure_classification)&&("cancelled"===o.kind||"timed_out"===o.kind)==(null!==o.cancellation_stage)&&null!==o.diagnostic===("string"==typeof o.kind&&["invalid_request","conflict","partial_effect","stale","unsupported","unavailable","execution_failed","reset_required","saturated"].includes(o.kind))&&(null===o.detail||!!("string"==typeof o.kind&&["stale","unsupported","unavailable","reset_required","saturated"].includes(o.kind)))&&o.retryable===("never"!==o.retry)&&void 0!==a&&o.retry_scope===a&&"after_delay"===o.retry==(null!==o.retry_after_millis)&&("partial_effect"===o.kind?"admitted_terminal"===o.terminality&&!1===o.retryable&&"never"===o.retry&&(r=o.committed_receipt,i=e.request_id,Sn(r)&&r.request_id===i&&"partial"===r.outcome&&"string"==typeof r.operation&&"string"==typeof r.effect_class&&"string"==typeof r.idempotency_key&&"string"==typeof r.input_digest&&("string"==typeof r.committed_state||"string"==typeof r.external_proof))&&1===n.length&&"reconcile"===n[0]:"reset_required"===o.kind?"admitted_terminal"===o.terminality&&!1===o.retryable&&"never"===o.retry&&null===o.committed_receipt&&1===n.length&&"reset"===n[0]:"unavailable"===o.kind&&"authority"!==o.unavailable_classification?"admitted_terminal"===o.terminality&&!0===o.retryable&&"after_revalidate"===o.retry&&null===o.committed_receipt&&1===n.length&&"retry"===n[0]:"execution_failed"===o.kind?"admitted_terminal"===o.terminality&&!1===o.retryable&&"never"===o.retry&&null===o.committed_receipt&&1===n.length&&"contact_administrator"===n[0]:null===o.committed_receipt)}(o))throw new $1("the daemon returned a malformed problem envelope",{status:e.status,payload:o});let n=void 0===t||("not_found_or_not_authorized"===o.problem.kind?void 0===o.binding_id:o.binding_id===t);if(e.ok||!n||void 0!==r&&o.request_id!==r||!function(e,t){switch(t){case"invalid_request":return 400===e;case"not_found_or_not_authorized":return 404===e;case"conflict":case"partial_effect":case"stale":return 409===e;case"unsupported":return 422===e;case"unavailable":case"reset_required":return 503===e;case"execution_failed":return 500===e;case"saturated":return 429===e;case"cancelled":return 408===e;case"timed_out":return 504===e;default:return!1}}(e.status,o.problem.kind))throw new $1("the daemon returned a malformed problem envelope",{status:e.status,payload:o});throw function(e,t){switch(t.problem.kind){case"not_found_or_not_authorized":return new $2(e,t);case"unavailable":return new $4(e,t);case"unsupported":return new $6(e,t);case"stale":return new $3(e,t);case"conflict":return new $9(e,t);case"partial_effect":return new $5(e,t);case"reset_required":return new $8(e,t);case"saturated":return new $7(e,t);case"cancelled":return new Se(e,t);case"timed_out":return new St(e,t);case"invalid_request":return new Sr(e,t);default:return new $0(e,t)}}(e.status,o)}return i}async #r(e,t,r={}){var i,o,n,a;let s=e.decodeRequest(t);if("http"!==e.transport.kind){let t;if(void 0!==r.page||void 0!==r.deadlineMicros||void 0!==r.requestId)throw new $Y(`${e.operation} does not accept HTTP transport options`);if(void 0===this.mcp)throw new $J(`${e.operation} requires an MCP tool adapter`);try{t=await this.mcp.callTool(e.transport.toolName,s,{signal:r.signal})}catch(t){if(r.signal?.aborted)throw new $Z(r.signal.reason??t);throw new $J(`MCP tool ${e.transport.toolName} failed`,t)}try{return e.decodeResult(t)}catch(r){throw new $1(`MCP tool ${e.transport.toolName} returned an invalid ${e.operation} result`,{payload:{response:t,cause:r}})}}let d=this.operationUrl(e.transport.route,r.page),c=JSON.stringify(s);if(void 0===c)throw new $Y(`${e.operation} request decoder returned a non-JSON value`);let l=this.headers("application/json");l.set("content-type","application/json");let p=(i=l,o=e,void 0!==(n=r).deadlineMicros&&(!Number.isSafeInteger(n.deadlineMicros)||n.deadlineMicros<=0)?"deadlineMicros must be a positive safe integer":"required"===o.requestIdControl&&void 0===n.requestId?`${o.operation} requires a stable requestId replay handle`:"server_minted"===o.requestIdControl&&void 0!==n.requestId?`${o.operation} uses a server-minted request ID`:void 0===n.requestId||(a=n.requestId).length>0&&a.trim()===a&&$K.encode(a).byteLength<=512&&!/\p{Cc}/u.test(a)?void(void 0!==n.deadlineMicros&&i.set("x-tracedecay-deadline-micros",String(n.deadlineMicros)),void 0!==n.requestId&&i.set("x-tracedecay-request-id",n.requestId)):"requestId is not a canonical request identity");if(void 0!==p)throw new $Y(p);let u=await this.fetchResponse(d,{method:e.transport.method,headers:l,body:c,signal:r.signal},r.signal),m=await this.readJson(u,e.bindingId,r.requestId);if(!Sn(m)||"success"!==m.kind)throw new $1("the daemon returned an unknown HTTP envelope",{status:u.status,payload:m});if(!u.ok)throw new $1("the daemon returned success with a failing HTTP status",{status:u.status,payload:m});try{let t=e.decodeSuccess(m.value);if(!(Sn(t)&&Sn(t.outcome)&&Sn(t.outcome.value)&&"payload"in t.outcome.value&&Sp(t.outcome.value.execution))||("evidence"===t.outcome.outcome?"completed"===t.outcome.value.execution.termination&&null===t.outcome.value.payload:"preview"!==t.outcome.outcome&&"effect"!==t.outcome.outcome))throw TypeError("decoded application success invariants are invalid");if(void 0!==r.requestId&&t.request_id!==r.requestId)throw TypeError("daemon returned a different application request ID");if("fact_store_curate_receipt"===e.resultSemantics&&!await async function(e,t){var r;let i=$G(e),o=$G(t),n=$G(o?.outcome),a=$G(n?.value),s=$G(a?.payload);if(void 0===i||void 0===o||n?.outcome!=="effect"||void 0===s||!("string"==typeof(r=o.request_id)&&r.length>0&&r.trim()===r&&new TextEncoder().encode(r).length<=512&&!/\p{Cc}/u.test(r))||Object.keys(s).sort().join(",")!==$B.join(",")||s.run_id!==o.request_id||"memory_curator"!==s.task||"started"!==s.state)return!1;let d=i.fact_review_limit??24,c=i.min_confidence_millionths??72e4;return"number"==typeof d&&!!Number.isSafeInteger(d)&&!(d<1)&&!(d>1e3)&&"number"==typeof c&&!!Number.isSafeInteger(c)&&!(c<0)&&!(c>1e6)&&s.request_digest===await async function(e){let t=await crypto.subtle.digest("SHA-256",new TextEncoder().encode(function e(t){return Array.isArray(t)?`[${t.map(e).join(",")}]`:null!==t&&"object"==typeof t?`{${Object.entries(t).sort(([e],[t])=>et)).map(([t,r])=>`${JSON.stringify(t)}:${e(r)}`).join(",")}}`:JSON.stringify(t)??"null"}(e)));return`sha256:${Array.from(new Uint8Array(t),e=>e.toString(16).padStart(2,"0")).join("")}`}(["tracedecay.automation-run.request-identity.v1",{kind:"memory_curator",options:{fact_review_limit:d,min_confidence_millionths:c}}])}(s,t))throw TypeError("automatic curation receipt invariants are invalid");return t}catch(t){throw new $1(`the daemon returned an invalid ${e.operation} success envelope`,{status:u.status,payload:{envelope:m.value,cause:t}})}}async *streamOperation(e,t={}){let r=t.resume?.resumeToken,i=t.resume?.nextSequence===void 0?void 0:function(e,t){let r;if("number"==typeof e){if(!Sa(e))throw new $Y(`${t} must be an unsigned safe integer`);r=BigInt(e)}else if("bigint"==typeof e)r=e;else if(/^[0-9]+$/.test(e))r=BigInt(e);else throw new $Y(`${t} must be unsigned decimal`);if(r<0n||r>0xffffffffffffffffn)throw new $Y(`${t} exceeds the canonical u64 range`);return r.toString()}(t.resume.nextSequence,"resume nextSequence");if(void 0!==r&&!Sd(r,4096))throw new $Y("resumeToken is not a canonical stream resume token");let o=t.maxReconnects??0;if(!Number.isSafeInteger(o)||o<0)throw new $Y("maxReconnects must be a non-negative integer");let n=0,a=void 0===i||"0"===i?void 0:(BigInt(i)-1n).toString(),s=0;for(;;){if(t.signal?.aborted)throw new $Z(t.signal.reason);let d=this.lifecycleUrl(e,"events");void 0!==i&&d.searchParams.set("next_sequence",i),void 0!==r&&d.searchParams.set("resume_token",r);let c=await this.fetchResponse(d,{method:"GET",headers:this.headers("text/event-stream"),signal:t.signal},t.signal);if(!c.ok||null===c.body)throw await this.readJson(c),new $1("the daemon did not open an SSE stream",{status:c.status});if(!Sc(c,"text/event-stream"))throw new $1("the daemon opened an operation stream with an invalid media type",{status:c.status});try{for await(let t of Sf(c.body)){void 0!==t.retryDelayMs&&(s=t.retryDelayMs);let o=function(e,t,r){let i=Su(e.data,t);if(!Sn(i)||"string"!=typeof i.event||i.event!==e.event||!Sn(i.data))throw new $1("the daemon returned a malformed SSE event",{status:t,payload:i});let o=i.event,n=i.data;if("open"===o){let e=n.frontier;if(n.correlation_id!==r||!Sn(e)||!Sa(e.next_sequence)||!Sa(e.retained_from_sequence)||null!==e.resume_token&&"string"!=typeof e.resume_token)throw new $1("the daemon returned a malformed SSE open frontier",{status:t,payload:i});return{event:{...i,event:o,data:n},frontier:{nextSequence:String(e.next_sequence),..."string"==typeof e.resume_token?{resumeToken:e.resume_token}:{}}}}if(!Sa(n.sequence)||null===e.id)throw new $1("the daemon returned an SSE event without a valid sequence",{status:t,payload:i});let a=String(n.sequence);if(e.id!==a)throw new $1("the SSE event ID does not match its canonical sequence",{status:t,payload:i});if("item"===o&&!("item"in n))throw new $1("the SSE item payload is missing",{status:t,payload:i});if("progress"===o&&(!Sa(n.completed)||null!==n.total&&!Sa(n.total)))throw new $1("the SSE progress payload is malformed",{status:t,payload:i});if("resume_gap"===o){let e=n.gap;if(!Sn(e)||!Sa(e.first_missing_sequence)||!Sa(e.last_missing_sequence)||e.first_missing_sequence>e.last_missing_sequence||!Sn(e.frontier)||!Sa(e.frontier.next_sequence)||!Sa(e.frontier.retained_from_sequence)||null!==e.frontier.resume_token&&"string"!=typeof e.frontier.resume_token)throw new $1("the SSE resume gap is malformed",{status:t,payload:i})}if(Si.has(o)){let e=n.terminal;if(!Sn(e)||!Sp(e.receipt))throw new $1("the SSE terminal event is malformed",{status:t,payload:i});if(e.termination!==o||e.receipt.termination!==o)throw new $1("the SSE terminal event is inconsistent",{status:t,payload:i})}return{event:{...i,event:o,data:n},sequence:a}}(t,c.status,e);if(void 0!==o.frontier&&(i=o.frontier.nextSequence,r=o.frontier.resumeToken),void 0!==o.sequence){if(void 0!==a&&BigInt(o.sequence)<=BigInt(a))continue;let e=void 0===a?void 0:Sm(a);if(void 0!==e&&o.sequence!==e)throw new $1("the daemon returned a non-contiguous SSE sequence",{status:c.status,payload:o.event});a=o.sequence,i=Sm(o.sequence)}if(yield{event:t.event,id:o.sequence??null,data:o.event},Si.has(t.event))return}}catch(e){if(e instanceof $Y)throw e;if(t.signal?.aborted)throw new $Z(t.signal.reason??e);if(n>=o){if(e instanceof $Q)throw e;throw new $Q(`operation stream disconnected after ${n} reconnects`,e)}}if(n>=o)throw new $Q(`operation stream ended before a terminal event after ${n} reconnects`);if(void 0===i||void 0===r)throw new $Q("operation stream ended before exposing a resumable frontier");n+=1,await async function(e,t){if(t?.aborted)throw new $Z(t.reason);await new Promise((r,i)=>{let o=setTimeout(()=>{t?.removeEventListener("abort",n),r()},e),n=()=>{clearTimeout(o),i(new $Z(t?.reason))};t?.addEventListener("abort",n,{once:!0})})}(s,t.signal)}}async cancelOperation(e,t={}){let r=await this.fetchResponse(this.lifecycleUrl(e,"cancel"),{method:"POST",headers:this.headers("application/json"),signal:t.signal},t.signal),i=await this.readJson(r);if(!Sn(i))throw new $1("the daemon returned a malformed cancellation response",{status:r.status,payload:i});let o=i.status,n="requested"===o&&202===r.status||("already_requested"===o||"already_terminal"===o)&&200===r.status;if(!r.ok||"requested"!==o&&"already_requested"!==o&&"already_terminal"!==o||!n)throw new $1("the daemon returned a malformed cancellation response",{status:r.status,payload:i});return{...i,status:o}}}function Sy(e){let t=$H.find(t=>t.operation===e);if(void 0===t||"mcp_tool"!==t.transport.kind)throw TypeError(`${e} is not an MCP-backed operation in the canonical catalog`);return t}let Sg=Sy("project_list"),S_=Sy("project_context");class Sv{#i;constructor(e){this.#i=e}projectList(e,t){return this.#o(Sg,e,t)}projectContext(e,t){return this.#o(S_,e,t)}async #o(e,t,r){let i,o=e.transport.toolName,n=e.decodeRequest(t);try{i=await this.#i(o,n,r)}catch(e){if(r?.aborted)throw new $Z(r.reason??e);throw new $J(`MCP tool ${o} failed`,e)}try{return e.decodeResult(i)}catch(t){throw new $1(`MCP tool ${o} returned an invalid ${e.operation} result`,{payload:{response:i,cause:t}})}}}var Sb=Object.create,S$=Object.defineProperty,SS=Object.getOwnPropertyDescriptor,Sk=Object.getOwnPropertyNames,Sw=Object.getPrototypeOf,SR=Object.prototype.hasOwnProperty,SP=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);let SV=new Set(["https://json-schema.org/draft/2020-12/schema","http://json-schema.org/draft/2020-12/schema"]),Sq=new Set(["https://json-schema.org/draft/2019-09/schema","http://json-schema.org/draft/2019-09/schema"]),SI=new Set(["https://json-schema.org/draft-07/schema","http://json-schema.org/draft-07/schema"]),Sx=new Set(["https://json-schema.org/draft-06/schema","http://json-schema.org/draft-06/schema"]),Sj=["2025-11-25","2025-06-18","2025-03-26","2024-11-05","2024-10-07"],SC="io.modelcontextprotocol/protocolVersion",ST="io.modelcontextprotocol/clientInfo",SO="io.modelcontextprotocol/serverInfo",SE="io.modelcontextprotocol/clientCapabilities",SA="io.modelcontextprotocol/subscriptionId",SM="io.modelcontextprotocol/logLevel",SW=aa(()=>nL([o7(),nR(),nI(),nj(),nJ(o7(),SW),nW(SW)])),SN=nJ(o7(),SW),Sz=nW(SW),SD=nL([o7(),nR().int()]),SF=o7(),SL=nz({ttl:nR().optional()}),SU=nz({taskId:o7()}),SH=nD({progressToken:SD.optional(),"io.modelcontextprotocol/related-task":SU.optional()}),SG=nz({_meta:SH.optional()}),SB=SG.extend({task:SL.optional()}),SK=nz({method:o7(),params:SG.loose().optional()}),SJ=nz({_meta:SH.optional()}),SZ=nz({method:o7(),params:SJ.loose().optional()}),SQ=nD({get[SO](){return kr.optional().catch(void 0)}}),SX=nD({_meta:SQ.optional()}),SY=nL([o7(),nR().int()]),S1=nz({jsonrpc:nY("2.0"),id:SY,...SK.shape}).strict(),S0=nz({jsonrpc:nY("2.0"),...SZ.shape}).strict(),S2=nz({jsonrpc:nY("2.0"),id:SY,result:SX}).strict(),S4=nz({jsonrpc:nY("2.0"),id:SY.optional(),error:nz({code:nR().int(),message:o7(),data:nE().optional()})}).strict(),S6=nL([S1,S0,S2,S4]),S3=nL([S2,S4]),S9=SX.strict(),S5=SJ.extend({requestId:SY.optional(),reason:o7().optional()}),S8=SZ.extend({method:nY("notifications/cancelled"),params:S5}),S7=nz({src:o7(),mimeType:o7().optional(),sizes:nW(o7()).optional(),theme:nQ(["light","dark"]).optional()}),ke=nz({icons:nW(S7).optional()}),kt=nz({name:o7(),title:o7().optional()}),kr=kt.extend({...kt.shape,...ke.shape,version:o7(),websiteUrl:o7().optional(),description:o7().optional()}),ki=nB(nz({applyDefaults:nI().optional()}),SN),ko=ad(e=>e&&"object"==typeof e&&!Array.isArray(e)&&0===Object.keys(e).length?{form:{}}:e,nB(nz({form:ki.optional(),url:SN.optional()}),SN.optional())),kn=nD({list:SN.optional(),cancel:SN.optional(),requests:nD({sampling:nD({createMessage:SN.optional()}).optional(),elicitation:nD({create:SN.optional()}).optional()}).optional()}),ka=nD({list:SN.optional(),cancel:SN.optional(),requests:nD({tools:nD({call:SN.optional()}).optional()}).optional()}),ks=nz({experimental:nJ(o7(),SN).optional(),sampling:nz({context:SN.optional(),tools:SN.optional()}).optional(),elicitation:ko.optional(),roots:nz({listChanged:nI().optional()}).optional(),tasks:kn.optional(),extensions:nJ(o7(),SN).optional()}),kd=SG.extend({protocolVersion:o7(),capabilities:ks,clientInfo:kr}),kc=SK.extend({method:nY("initialize"),params:kd}),kl=nz({experimental:nJ(o7(),SN).optional(),logging:SN.optional(),completions:SN.optional(),prompts:nz({listChanged:nI().optional()}).optional(),resources:nz({subscribe:nI().optional(),listChanged:nI().optional()}).optional(),tools:nz({listChanged:nI().optional()}).optional(),tasks:ka.optional(),extensions:nJ(o7(),SN).optional()}),kp=SX.extend({protocolVersion:o7(),capabilities:kl,serverInfo:kr,instructions:o7().optional()}),ku=SZ.extend({method:nY("notifications/initialized"),params:SJ.optional()}),km=SK.extend({method:nY("server/discover"),params:SG.optional()}),kf=SX.extend({supportedVersions:nW(o7()),capabilities:kl,instructions:o7().optional()}),kh=SK.extend({method:nY("ping"),params:SG.optional()}),ky=nz({progress:nR(),total:n4(nR()),message:n4(o7())}),kg=nz({...SJ.shape,...ky.shape,progressToken:SD}),k_=SZ.extend({method:nY("notifications/progress"),params:kg}),kv=SG.extend({cursor:SF.optional()}),kb=SK.extend({params:kv.optional()}),k$=SX.extend({nextCursor:SF.optional()}),kS=nz({uri:o7(),mimeType:n4(o7()),_meta:nJ(o7(),nE()).optional()}),kk=kS.extend({text:o7()}),kw=o7().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:"Invalid Base64 string"}),kR=kS.extend({blob:kw}),kP=nQ(["user","assistant"]),kV=nz({audience:nW(kP).optional(),priority:nR().min(0).max(1).optional(),lastModified:ac({offset:!0}).optional()}),kq=nz({...kt.shape,...ke.shape,uri:o7(),description:n4(o7()),mimeType:n4(o7()),size:n4(nR()),annotations:kV.optional(),_meta:n4(nD({}))}),kI=nz({...kt.shape,...ke.shape,uriTemplate:o7(),description:n4(o7()),mimeType:n4(o7()),annotations:kV.optional(),_meta:n4(nD({}))}),kx=kb.extend({method:nY("resources/list")}),kj=k$.extend({resources:nW(kq)}),kC=kb.extend({method:nY("resources/templates/list")}),kT=k$.extend({resourceTemplates:nW(kI)}),kO=SG.extend({uri:o7()}),kE=SK.extend({method:nY("resources/read"),params:kO}),kA=SX.extend({contents:nW(nL([kk,kR]))}),kM=SZ.extend({method:nY("notifications/resources/list_changed"),params:SJ.optional()}),kW=SK.extend({method:nY("resources/subscribe"),params:kO}),kN=SK.extend({method:nY("resources/unsubscribe"),params:kO}),kz=nz({toolsListChanged:nI().optional(),promptsListChanged:nI().optional(),resourcesListChanged:nI().optional(),resourceSubscriptions:nW(o7()).optional()}),kD=SG.extend({notifications:kz}),kF=SK.extend({method:nY("subscriptions/listen"),params:kD}),kL=SJ.extend({notifications:kz}),kU=SZ.extend({method:nY("notifications/subscriptions/acknowledged"),params:kL}),kH=SQ.extend({[SA]:SY}),kG=SX.extend({_meta:kH}),kB=SJ.extend({uri:o7()}),kK=SZ.extend({method:nY("notifications/resources/updated"),params:kB}),kJ=nz({name:o7(),description:n4(o7()),required:n4(nI())}),kZ=nz({...kt.shape,...ke.shape,description:n4(o7()),arguments:n4(nW(kJ)),_meta:n4(nD({}))}),kQ=kb.extend({method:nY("prompts/list")}),kX=k$.extend({prompts:nW(kZ)}),kY=SG.extend({name:o7(),arguments:nJ(o7(),o7()).optional()}),k1=SK.extend({method:nY("prompts/get"),params:kY}),k0=nz({type:nY("text"),text:o7(),annotations:kV.optional(),_meta:nJ(o7(),nE()).optional()}),k2=nz({type:nY("image"),data:kw,mimeType:o7(),annotations:kV.optional(),_meta:nJ(o7(),nE()).optional()}),k4=nz({type:nY("audio"),data:kw,mimeType:o7(),annotations:kV.optional(),_meta:nJ(o7(),nE()).optional()}),k6=nz({type:nY("tool_use"),name:o7(),id:o7(),input:nJ(o7(),nE()),_meta:nJ(o7(),nE()).optional()}),k3=nz({type:nY("resource"),resource:nL([kk,kR]),annotations:kV.optional(),_meta:nJ(o7(),nE()).optional()}),k9=kq.extend({type:nY("resource_link")}),k5=nL([k0,k2,k4,k9,k3]),k8=nz({role:kP,content:k5}),k7=SX.extend({description:o7().optional(),messages:nW(k8)}),we=SZ.extend({method:nY("notifications/prompts/list_changed"),params:SJ.optional()}),wt=nz({title:o7().optional(),readOnlyHint:nI().optional(),destructiveHint:nI().optional(),idempotentHint:nI().optional(),openWorldHint:nI().optional()}),wr=nz({taskSupport:nQ(["required","optional","forbidden"]).optional()}),wi=nz({...kt.shape,...ke.shape,description:o7().optional(),inputSchema:nz({type:nY("object"),properties:nJ(o7(),SW).optional(),required:nW(o7()).optional()}).catchall(nE()),outputSchema:nD({$schema:o7().optional()}).optional(),annotations:wt.optional(),execution:wr.optional(),_meta:nJ(o7(),nE()).optional()}),wo=kb.extend({method:nY("tools/list")}),wn=k$.extend({tools:nW(wi)}),wa=SX.extend({content:nW(k5).default([]),structuredContent:nE().optional(),isError:nI().optional()}),ws=wa.or(SX.extend({toolResult:nE()})),wd=SB.extend({name:o7(),arguments:nJ(o7(),nE()).optional()}),wc=SK.extend({method:nY("tools/call"),params:wd}),wl=SZ.extend({method:nY("notifications/tools/list_changed"),params:SJ.optional()}),wp=nz({autoRefresh:nI().default(!0),debounceMs:nR().int().nonnegative().default(300)}),wu=nQ(["debug","info","notice","warning","error","critical","alert","emergency"]),wm=SG.extend({level:wu}),wf=SK.extend({method:nY("logging/setLevel"),params:wm}),wh=SJ.extend({level:wu,logger:o7().optional(),data:nE()}),wy=SZ.extend({method:nY("notifications/message"),params:wh}),wg=nz({name:o7().optional()}),w_=nz({hints:nW(wg).optional(),costPriority:nR().min(0).max(1).optional(),speedPriority:nR().min(0).max(1).optional(),intelligencePriority:nR().min(0).max(1).optional()}),wv=nz({mode:nQ(["auto","required","none"]).optional()}),wb=nz({type:nY("tool_result"),toolUseId:o7().describe("The unique identifier for the corresponding tool call."),content:nW(k5),structuredContent:nE().optional(),isError:nI().optional(),_meta:nJ(o7(),nE()).optional()}),w$=nH("type",[k0,k2,k4]),wS=nH("type",[k0,k2,k4,k6,wb]),wk=nz({role:kP,content:nL([wS,nW(wS)]),_meta:nJ(o7(),nE()).optional()}),ww=SB.extend({messages:nW(wk),modelPreferences:w_.optional(),systemPrompt:o7().optional(),includeContext:nQ(["none","thisServer","allServers"]).optional(),temperature:nR().optional(),maxTokens:nR().int(),stopSequences:nW(o7()).optional(),metadata:SN.optional(),tools:nW(wi).optional(),toolChoice:wv.optional()}),wR=SK.extend({method:nY("sampling/createMessage"),params:ww}),wP=SX.extend({model:o7(),stopReason:n4(nQ(["endTurn","stopSequence","maxTokens"]).or(o7())),role:kP,content:w$}),wV=SX.extend({model:o7(),stopReason:n4(nQ(["endTurn","stopSequence","maxTokens","toolUse"]).or(o7())),role:kP,content:nL([wS,nW(wS)])}),wq=nz({type:nY("boolean"),title:o7().optional(),description:o7().optional(),default:nI().optional()}),wI=nz({type:nY("string"),title:o7().optional(),description:o7().optional(),minLength:nR().optional(),maxLength:nR().optional(),format:nQ(["email","uri","date","date-time"]).optional(),default:o7().optional()}),wx=nz({type:nQ(["number","integer"]),title:o7().optional(),description:o7().optional(),minimum:nR().optional(),maximum:nR().optional(),default:nR().optional()}),wj=nz({type:nY("string"),title:o7().optional(),description:o7().optional(),enum:nW(o7()),default:o7().optional()}),wC=nz({type:nY("string"),title:o7().optional(),description:o7().optional(),oneOf:nW(nz({const:o7(),title:o7()})),default:o7().optional()}),wT=nz({type:nY("string"),title:o7().optional(),description:o7().optional(),enum:nW(o7()),enumNames:nW(o7()).optional(),default:o7().optional()}),wO=nL([wj,wC]),wE=nz({type:nY("array"),title:o7().optional(),description:o7().optional(),minItems:nR().optional(),maxItems:nR().optional(),items:nz({type:nY("string"),enum:nW(o7())}),default:nW(o7()).optional()}),wA=nz({type:nY("array"),title:o7().optional(),description:o7().optional(),minItems:nR().optional(),maxItems:nR().optional(),items:nz({anyOf:nW(nz({const:o7(),title:o7()}))}),default:nW(o7()).optional()}),wM=nL([wE,wA]),wW=nL([wT,wO,wM]),wN=nL([wW,wq,wI,wx]),wz=SB.extend({mode:nY("form").optional(),message:o7(),requestedSchema:nz({type:nY("object"),properties:nJ(o7(),wN),required:nW(o7()).optional()}).catchall(nE())}),wD=SB.extend({mode:nY("url"),message:o7(),elicitationId:o7(),url:o7().url()}),wF=nL([wz,wD]),wL=SK.extend({method:nY("elicitation/create"),params:wF}),wU=SJ.extend({elicitationId:o7()}),wH=SZ.extend({method:nY("notifications/elicitation/complete"),params:wU}),wG=SX.extend({action:nQ(["accept","decline","cancel"]),content:ad(e=>null===e?void 0:e,nJ(o7(),nL([o7(),nR(),nI(),nW(o7())])).optional())}),wB=nz({type:nY("ref/resource"),uri:o7()}),wK=nz({type:nY("ref/prompt"),name:o7()}),wJ=SG.extend({ref:nL([wK,wB]),argument:nz({name:o7(),value:o7()}),context:nz({arguments:nJ(o7(),o7()).optional()}).optional()}),wZ=SK.extend({method:nY("completion/complete"),params:wJ}),wQ=SX.extend({completion:nD({values:nW(o7()).max(100),total:n4(nR().int()),hasMore:n4(nI())})}),wX=nz({uri:o7().startsWith("file://"),name:o7().optional(),_meta:nJ(o7(),nE()).optional()}),wY=SK.extend({method:nY("roots/list"),params:SG.optional()}),w1=SX.extend({roots:nW(wX)}),w0=SZ.extend({method:nY("notifications/roots/list_changed"),params:SJ.optional()}),w2=nD({ttl:nR().optional(),pollInterval:nR().optional()}),w4=nQ(["working","input_required","completed","failed","cancelled"]),w6=nz({taskId:o7(),status:w4,ttl:nL([nR(),nj()]),createdAt:o7(),lastUpdatedAt:o7(),pollInterval:n4(nR()),statusMessage:n4(o7())}),w3=SX.extend({task:w6}),w9=SJ.merge(w6),w5=SZ.extend({method:nY("notifications/tasks/status"),params:w9}),w8=SK.extend({method:nY("tasks/get"),params:SG.extend({taskId:o7()})}),w7=SX.merge(w6),Re=SK.extend({method:nY("tasks/result"),params:SG.extend({taskId:o7()})}),Rt=SX.loose(),Rr=kb.extend({method:nY("tasks/list")}),Ri=k$.extend({tasks:nW(w6)}),Ro=SK.extend({method:nY("tasks/cancel"),params:SG.extend({taskId:o7()})}),Rn=SX.merge(w6),Ra=nL([kh,kc,km,wZ,wf,k1,kQ,kx,kC,kE,kW,kN,kF,wc,wo]),Rs=nL([S8,k_,ku,w0]),Rd=nL([S9,wP,wV,wG,w1]),Rc=nL([kh,wR,wL,wY]),Rl=nL([S8,k_,wy,kK,kM,wl,we,kU,wH]),Rp=nL([S9,kp,kf,wQ,k7,kX,kj,kT,kA,wa,wn,kG]),Ru=iR(nd,void 0).superRefine((e,t)=>{if(!URL.canParse(e))return t.addIssue({code:d2,message:"URL must be parseable",fatal:!0}),ta}).refine(e=>{let t=new URL(e);return"javascript:"!==t.protocol&&"data:"!==t.protocol&&"vbscript:"!==t.protocol},{message:"URL cannot use javascript:, data:, or vbscript: scheme"}),Rm=nD({resource:o7().url(),authorization_servers:nW(Ru).optional(),jwks_uri:o7().url().optional(),scopes_supported:nW(o7()).optional(),bearer_methods_supported:nW(o7()).optional(),resource_signing_alg_values_supported:nW(o7()).optional(),resource_name:o7().optional(),resource_documentation:o7().optional(),resource_policy_uri:o7().url().optional(),resource_tos_uri:o7().url().optional(),tls_client_certificate_bound_access_tokens:nI().optional(),authorization_details_types_supported:nW(o7()).optional(),dpop_signing_alg_values_supported:nW(o7()).optional(),dpop_bound_access_tokens_required:nI().optional()}),Rf=nD({issuer:o7(),authorization_endpoint:Ru,token_endpoint:Ru,registration_endpoint:Ru.optional(),scopes_supported:nW(o7()).optional(),response_types_supported:nW(o7()),response_modes_supported:nW(o7()).optional(),grant_types_supported:nW(o7()).optional(),token_endpoint_auth_methods_supported:nW(o7()).optional(),token_endpoint_auth_signing_alg_values_supported:nW(o7()).optional(),service_documentation:Ru.optional(),revocation_endpoint:Ru.optional(),revocation_endpoint_auth_methods_supported:nW(o7()).optional(),revocation_endpoint_auth_signing_alg_values_supported:nW(o7()).optional(),introspection_endpoint:o7().optional(),introspection_endpoint_auth_methods_supported:nW(o7()).optional(),introspection_endpoint_auth_signing_alg_values_supported:nW(o7()).optional(),code_challenge_methods_supported:nW(o7()).optional(),client_id_metadata_document_supported:nI().optional(),authorization_response_iss_parameter_supported:nI().optional().catch(void 0),dpop_signing_alg_values_supported:nW(o7()).optional()}),Rh=nD({issuer:o7(),authorization_endpoint:Ru,token_endpoint:Ru,userinfo_endpoint:Ru.optional(),jwks_uri:Ru,registration_endpoint:Ru.optional(),scopes_supported:nW(o7()).optional(),response_types_supported:nW(o7()),response_modes_supported:nW(o7()).optional(),grant_types_supported:nW(o7()).optional(),acr_values_supported:nW(o7()).optional(),subject_types_supported:nW(o7()),id_token_signing_alg_values_supported:nW(o7()),id_token_encryption_alg_values_supported:nW(o7()).optional(),id_token_encryption_enc_values_supported:nW(o7()).optional(),userinfo_signing_alg_values_supported:nW(o7()).optional(),userinfo_encryption_alg_values_supported:nW(o7()).optional(),userinfo_encryption_enc_values_supported:nW(o7()).optional(),request_object_signing_alg_values_supported:nW(o7()).optional(),request_object_encryption_alg_values_supported:nW(o7()).optional(),request_object_encryption_enc_values_supported:nW(o7()).optional(),token_endpoint_auth_methods_supported:nW(o7()).optional(),token_endpoint_auth_signing_alg_values_supported:nW(o7()).optional(),display_values_supported:nW(o7()).optional(),claim_types_supported:nW(o7()).optional(),claims_supported:nW(o7()).optional(),service_documentation:o7().optional(),claims_locales_supported:nW(o7()).optional(),ui_locales_supported:nW(o7()).optional(),claims_parameter_supported:nI().optional(),request_parameter_supported:nI().optional(),request_uri_parameter_supported:nI().optional(),require_request_uri_registration:nI().optional(),op_policy_uri:Ru.optional(),op_tos_uri:Ru.optional(),client_id_metadata_document_supported:nI().optional(),authorization_response_iss_parameter_supported:nI().optional().catch(void 0)}),Ry=nz({...Rh.shape,...Rf.pick({code_challenge_methods_supported:!0}).shape}),Rg=nz({access_token:o7(),id_token:o7().optional(),token_type:o7(),expires_in:d4().optional(),scope:o7().optional(),refresh_token:o7().optional(),issuer:o7().optional().catch(void 0)}).strip(),R_=nz({issued_token_type:nY("urn:ietf:params:oauth:token-type:id-jag"),access_token:o7(),token_type:o7().optional(),expires_in:nR().optional(),scope:o7().optional()}).strip(),Rv=nz({error:o7(),error_description:o7().optional(),error_uri:o7().optional()}),Rb=Ru.optional().or(nY("").transform(()=>void 0)),R$=nz({redirect_uris:nW(Ru),token_endpoint_auth_method:o7().optional(),grant_types:nW(o7()).optional(),response_types:nW(o7()).optional(),application_type:o7().optional(),client_name:o7().optional(),client_uri:Ru.optional(),logo_uri:Rb,scope:o7().optional(),contacts:nW(o7()).optional(),tos_uri:Rb,policy_uri:o7().optional(),jwks_uri:Ru.optional(),jwks:nT().optional(),software_id:o7().optional(),software_version:o7().optional(),software_statement:o7().optional()}).strip(),RS=nz({client_id:o7(),client_secret:o7().optional(),client_id_issued_at:nR().optional(),client_secret_expires_at:nR().optional(),issuer:o7().optional().catch(void 0)}).strip(),Rk=R$.merge(RS),Rw=nz({error:o7(),error_description:o7().optional()}).strip(),RR=nz({token:o7(),token_type_hint:o7().optional()}).strip(),RP=Symbol.for("mcp.sdk.errorBrands");function RV(e,t){let r=new Set,i=t;for(;"function"==typeof i;){let e=i.mcpBrand;Object.prototype.hasOwnProperty.call(i,"mcpBrand")&&"string"==typeof e&&r.add(e),i=Object.getPrototypeOf(i)}0!==r.size&&Object.defineProperty(e,RP,{value:r,enumerable:!1,configurable:!0})}function Rq(e,t){try{if("object"==typeof t&&null!==t&&Object.prototype.hasOwnProperty.call(e,"mcpBrand")&&"string"==typeof e.mcpBrand&&Object.prototype.hasOwnProperty.call(t,RP)){let r=t[RP];if(r&&"function"==typeof r.has&&r.has(e.mcpBrand))return!0}}catch{}return Function.prototype[Symbol.hasInstance].call(e,t)}(class e extends Error{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.OAuthError"})}static[Symbol.hasInstance](e){return Rq(this,e)}static isInstance(e){if("function"!=typeof this)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return Rq(this,e)}constructor(e,t,r){super(t),this.code=e,this.errorUri=r,this.name="OAuthError",RV(this,new.target)}toResponseObject(){let e={error:this.code,error_description:this.message};return this.errorUri&&(e.error_uri=this.errorUri),e}static fromResponse(t){return new e(t.error,t.error_description??t.error,t.error_uri)}});let RI=((X={}).NotConnected="NOT_CONNECTED",X.AlreadyConnected="ALREADY_CONNECTED",X.NotInitialized="NOT_INITIALIZED",X.CapabilityNotSupported="CAPABILITY_NOT_SUPPORTED",X.RequestTimeout="REQUEST_TIMEOUT",X.ConnectionClosed="CONNECTION_CLOSED",X.SendFailed="SEND_FAILED",X.InvalidResult="INVALID_RESULT",X.UnsupportedResultType="UNSUPPORTED_RESULT_TYPE",X.InputRequiredRoundsExceeded="INPUT_REQUIRED_ROUNDS_EXCEEDED",X.ListPaginationExceeded="LIST_PAGINATION_EXCEEDED",X.MethodNotSupportedByProtocolVersion="METHOD_NOT_SUPPORTED_BY_PROTOCOL_VERSION",X.EraNegotiationFailed="ERA_NEGOTIATION_FAILED",X.ClientHttpNotImplemented="CLIENT_HTTP_NOT_IMPLEMENTED",X.ClientHttpAuthentication="CLIENT_HTTP_AUTHENTICATION",X.ClientHttpForbidden="CLIENT_HTTP_FORBIDDEN",X.ClientHttpUnexpectedContent="CLIENT_HTTP_UNEXPECTED_CONTENT",X.ClientHttpFailedToOpenStream="CLIENT_HTTP_FAILED_TO_OPEN_STREAM",X.ClientHttpFailedToTerminateSession="CLIENT_HTTP_FAILED_TO_TERMINATE_SESSION",X);var Rx=class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.SdkError"})}static[Symbol.hasInstance](e){return Rq(this,e)}static isInstance(e){if("function"!=typeof this)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return Rq(this,e)}constructor(e,t,r,i){super(t,i),this.code=e,this.data=r,this.name="SdkError",RV(this,new.target)}},Rj=class extends Rx{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.SdkHttpError"})}constructor(e,t,r,i){super(e,t,r,i),this.name="SdkHttpError"}get status(){return this.data.status}get statusText(){return this.data.statusText}};let RC="2026-07-28",RT=[RC];function RO(e){return e.filter(e=>!(e>=RC))}function RE(e){return e.filter(e=>e>=RC)}function RA(e){let t=e.structuredContent;return void 0===t||!("object"!=typeof t||null===t||Array.isArray(t))||e.content?.some(e=>"text"===e.type)?e:{...e,content:[...e.content??[],{type:"text",text:JSON.stringify(t)}]}}let RM=["task","inputRequests","requestState"];function RW(e){return null===e||"object"!=typeof e||Array.isArray(e)||void 0!==e.content||RM.some(t=>t in e)?e:{...e,content:[]}}function RN(){let e,t,r,i,o,n,a,s,c,l,p,u,m,f,h,y,g,_,v,b,$,S,k,w,R,P,V,q,I,x,j,C,T,O,E,A,M,W,N,z,D,F,L,U,H,G,B,K,J,Z,Q,X,Y,ee,et,er,ei,eo,en,ea,es,ed,ec,el,ep,eu,em,ef,eh,ey,eg,e_,ev,eb,e$,eS,ek,ew,eR,eP,eV,eq,eI,ex,ej,eC,eT,eO,eE,eA,eM,eW,eN,ez,eD,eF,eL,eU,eH,eG,eB,eK,eJ,eZ,eQ,eX,eY,e1,e0,e2,e4,e6,e3,e9,e5,e8,e7,te,tt,tr,ti,to,tn,ta,ts,td,tc,tl,tp,tu,tm,tf,th,ty,tg,t_,tv,tb,t$,tS;return d??=(e=aa(()=>nL([o7(),nR(),nI(),nj(),nJ(o7(),e),nW(e)])),t=nJ(o7(),e),r=nL([o7(),nR().int()]),i=o7(),o=nz({ttl:nR().optional()}),n=nz({taskId:o7()}),c=(s=nz({_meta:(a=nD({progressToken:r.optional(),"io.modelcontextprotocol/related-task":n.optional()})).optional()})).extend({task:o.optional()}),l=nz({method:o7(),params:s.loose().optional()}),p=nz({_meta:a.optional()}),u=nz({method:o7(),params:p.loose().optional()}),m=nD({_meta:a.optional()}),f=nL([o7(),nR().int()]),h=m.strict(),y=p.extend({requestId:f.optional(),reason:o7().optional()}),g=u.extend({method:nY("notifications/cancelled"),params:y}),_=nz({src:o7(),mimeType:o7().optional(),sizes:nW(o7()).optional(),theme:nQ(["light","dark"]).optional()}),v=nz({icons:nW(_).optional()}),$=(b=nz({name:o7(),title:o7().optional()})).extend({...b.shape,...v.shape,version:o7(),websiteUrl:o7().optional(),description:o7().optional()}),S=nB(nz({applyDefaults:nI().optional()}),t),k=ad(e=>e&&"object"==typeof e&&!Array.isArray(e)&&0===Object.keys(e).length?{form:{}}:e,nB(nz({form:S.optional(),url:t.optional()}),t.optional())),w=nD({list:t.optional(),cancel:t.optional(),requests:nD({sampling:nD({createMessage:t.optional()}).optional(),elicitation:nD({create:t.optional()}).optional()}).optional()}),R=nD({list:t.optional(),cancel:t.optional(),requests:nD({tools:nD({call:t.optional()}).optional()}).optional()}),P=nz({experimental:nJ(o7(),t).optional(),sampling:nz({context:t.optional(),tools:t.optional()}).optional(),elicitation:k.optional(),roots:nz({listChanged:nI().optional()}).optional(),tasks:w.optional(),extensions:nJ(o7(),t).optional()}),V=s.extend({protocolVersion:o7(),capabilities:P,clientInfo:$}),q=l.extend({method:nY("initialize"),params:V}),I=nz({experimental:nJ(o7(),t).optional(),logging:t.optional(),completions:t.optional(),prompts:nz({listChanged:nI().optional()}).optional(),resources:nz({subscribe:nI().optional(),listChanged:nI().optional()}).optional(),tools:nz({listChanged:nI().optional()}).optional(),tasks:R.optional(),extensions:nJ(o7(),t).optional()}),x=m.extend({protocolVersion:o7(),capabilities:I,serverInfo:$,instructions:o7().optional()}),j=u.extend({method:nY("notifications/initialized"),params:p.optional()}),C=l.extend({method:nY("ping"),params:s.optional()}),T=nz({progress:nR(),total:n4(nR()),message:n4(o7())}),O=nz({...p.shape,...T.shape,progressToken:r}),E=u.extend({method:nY("notifications/progress"),params:O}),A=s.extend({cursor:i.optional()}),M=l.extend({params:A.optional()}),W=m.extend({nextCursor:i.optional()}),z=(N=nz({uri:o7(),mimeType:n4(o7()),_meta:nJ(o7(),nE()).optional()})).extend({text:o7()}),D=o7().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:"Invalid Base64 string"}),F=N.extend({blob:D}),U=nz({audience:nW(L=nQ(["user","assistant"])).optional(),priority:nR().min(0).max(1).optional(),lastModified:ac({offset:!0}).optional()}),H=nz({...b.shape,...v.shape,uri:o7(),description:n4(o7()),mimeType:n4(o7()),size:n4(nR()),annotations:U.optional(),_meta:n4(nD({}))}),G=nz({...b.shape,...v.shape,uriTemplate:o7(),description:n4(o7()),mimeType:n4(o7()),annotations:U.optional(),_meta:n4(nD({}))}),B=M.extend({method:nY("resources/list")}),K=W.extend({resources:nW(H)}),J=M.extend({method:nY("resources/templates/list")}),Z=W.extend({resourceTemplates:nW(G)}),Q=s.extend({uri:o7()}),X=l.extend({method:nY("resources/read"),params:Q}),Y=m.extend({contents:nW(nL([z,F]))}),ee=u.extend({method:nY("notifications/resources/list_changed"),params:p.optional()}),et=l.extend({method:nY("resources/subscribe"),params:Q}),er=l.extend({method:nY("resources/unsubscribe"),params:Q}),ei=p.extend({uri:o7()}),eo=u.extend({method:nY("notifications/resources/updated"),params:ei}),en=nz({name:o7(),description:n4(o7()),required:n4(nI())}),ea=nz({...b.shape,...v.shape,description:n4(o7()),arguments:n4(nW(en)),_meta:n4(nD({}))}),es=M.extend({method:nY("prompts/list")}),ed=W.extend({prompts:nW(ea)}),ec=s.extend({name:o7(),arguments:nJ(o7(),o7()).optional()}),el=l.extend({method:nY("prompts/get"),params:ec}),ep=nz({type:nY("text"),text:o7(),annotations:U.optional(),_meta:nJ(o7(),nE()).optional()}),eu=nz({type:nY("image"),data:D,mimeType:o7(),annotations:U.optional(),_meta:nJ(o7(),nE()).optional()}),em=nz({type:nY("audio"),data:D,mimeType:o7(),annotations:U.optional(),_meta:nJ(o7(),nE()).optional()}),ef=nz({type:nY("tool_use"),name:o7(),id:o7(),input:nJ(o7(),nE()),_meta:nJ(o7(),nE()).optional()}),eh=nz({type:nY("resource"),resource:nL([z,F]),annotations:U.optional(),_meta:nJ(o7(),nE()).optional()}),e_=nz({role:L,content:eg=nL([ep,eu,em,ey=H.extend({type:nY("resource_link")}),eh])}),ev=m.extend({description:o7().optional(),messages:nW(e_)}),eb=u.extend({method:nY("notifications/prompts/list_changed"),params:p.optional()}),e$=nz({title:o7().optional(),readOnlyHint:nI().optional(),destructiveHint:nI().optional(),idempotentHint:nI().optional(),openWorldHint:nI().optional()}),eS=nz({taskSupport:nQ(["required","optional","forbidden"]).optional()}),ek=nz({...b.shape,...v.shape,description:o7().optional(),inputSchema:nz({type:nY("object"),properties:nJ(o7(),e).optional(),required:nW(o7()).optional()}).catchall(nE()),outputSchema:nz({type:nY("object"),properties:nJ(o7(),e).optional(),required:nW(o7()).optional()}).catchall(nE()).optional(),annotations:e$.optional(),execution:eS.optional(),_meta:nJ(o7(),nE()).optional()}),ew=M.extend({method:nY("tools/list")}),eR=W.extend({tools:nW(ek)}),eP=m.extend({content:nW(eg),structuredContent:nJ(o7(),nE()).optional(),isError:nI().optional()}),eV=c.extend({name:o7(),arguments:nJ(o7(),nE()).optional()}),eq=l.extend({method:nY("tools/call"),params:eV}),eI=u.extend({method:nY("notifications/tools/list_changed"),params:p.optional()}),ex=nQ(["debug","info","notice","warning","error","critical","alert","emergency"]),ej=s.extend({level:ex}),eC=l.extend({method:nY("logging/setLevel"),params:ej}),eT=p.extend({level:ex,logger:o7().optional(),data:nE()}),eO=u.extend({method:nY("notifications/message"),params:eT}),eE=nz({name:o7().optional()}),eA=nz({hints:nW(eE).optional(),costPriority:nR().min(0).max(1).optional(),speedPriority:nR().min(0).max(1).optional(),intelligencePriority:nR().min(0).max(1).optional()}),eM=nz({mode:nQ(["auto","required","none"]).optional()}),eW=nz({type:nY("tool_result"),toolUseId:o7().describe("The unique identifier for the corresponding tool call."),content:nW(eg),structuredContent:nz({}).loose().optional(),isError:nI().optional(),_meta:nJ(o7(),nE()).optional()}),eN=nH("type",[ep,eu,em]),eD=nz({role:L,content:nL([ez=nH("type",[ep,eu,em,ef,eW]),nW(ez)]),_meta:nJ(o7(),nE()).optional()}),eF=c.extend({messages:nW(eD),modelPreferences:eA.optional(),systemPrompt:o7().optional(),includeContext:nQ(["none","thisServer","allServers"]).optional(),temperature:nR().optional(),maxTokens:nR().int(),stopSequences:nW(o7()).optional(),metadata:t.optional(),tools:nW(ek).optional(),toolChoice:eM.optional()}),eL=l.extend({method:nY("sampling/createMessage"),params:eF}),eU=m.extend({model:o7(),stopReason:n4(nQ(["endTurn","stopSequence","maxTokens"]).or(o7())),role:L,content:eN}),eH=m.extend({model:o7(),stopReason:n4(nQ(["endTurn","stopSequence","maxTokens","toolUse"]).or(o7())),role:L,content:nL([ez,nW(ez)])}),eG=nz({type:nY("boolean"),title:o7().optional(),description:o7().optional(),default:nI().optional()}),eB=nz({type:nY("string"),title:o7().optional(),description:o7().optional(),minLength:nR().optional(),maxLength:nR().optional(),format:nQ(["email","uri","date","date-time"]).optional(),default:o7().optional()}),eK=nz({type:nQ(["number","integer"]),title:o7().optional(),description:o7().optional(),minimum:nR().optional(),maximum:nR().optional(),default:nR().optional()}),eJ=nz({type:nY("string"),title:o7().optional(),description:o7().optional(),enum:nW(o7()),default:o7().optional()}),eZ=nz({type:nY("string"),title:o7().optional(),description:o7().optional(),oneOf:nW(nz({const:o7(),title:o7()})),default:o7().optional()}),eQ=nz({type:nY("string"),title:o7().optional(),description:o7().optional(),enum:nW(o7()),enumNames:nW(o7()).optional(),default:o7().optional()}),eX=nL([eJ,eZ]),eY=nz({type:nY("array"),title:o7().optional(),description:o7().optional(),minItems:nR().optional(),maxItems:nR().optional(),items:nz({type:nY("string"),enum:nW(o7())}),default:nW(o7()).optional()}),e0=nL([eY,e1=nz({type:nY("array"),title:o7().optional(),description:o7().optional(),minItems:nR().optional(),maxItems:nR().optional(),items:nz({anyOf:nW(nz({const:o7(),title:o7()}))}),default:nW(o7()).optional()})]),e2=nL([eQ,eX,e0]),e4=nL([e2,eG,eB,eK]),e6=c.extend({mode:nY("form").optional(),message:o7(),requestedSchema:nz({type:nY("object"),properties:nJ(o7(),e4),required:nW(o7()).optional()}).catchall(nE())}),e9=nL([e6,e3=c.extend({mode:nY("url"),message:o7(),elicitationId:o7(),url:o7().url()})]),e5=l.extend({method:nY("elicitation/create"),params:e9}),e8=p.extend({elicitationId:o7()}),e7=u.extend({method:nY("notifications/elicitation/complete"),params:e8}),te=m.extend({action:nQ(["accept","decline","cancel"]),content:ad(e=>null===e?void 0:e,nJ(o7(),nL([o7(),nR(),nI(),nW(o7())])).optional())}),tt=nz({type:nY("ref/resource"),uri:o7()}),tr=nz({type:nY("ref/prompt"),name:o7()}),ti=s.extend({ref:nL([tr,tt]),argument:nz({name:o7(),value:o7()}),context:nz({arguments:nJ(o7(),o7()).optional()}).optional()}),to=l.extend({method:nY("completion/complete"),params:ti}),tn=m.extend({completion:nD({values:nW(o7()).max(100),total:n4(nR().int()),hasMore:n4(nI())})}),ta=nz({uri:o7().startsWith("file://"),name:o7().optional(),_meta:nJ(o7(),nE()).optional()}),ts=l.extend({method:nY("roots/list"),params:s.optional()}),td=m.extend({roots:nW(ta)}),tc=u.extend({method:nY("notifications/roots/list_changed"),params:p.optional()}),tl=nD({ttl:nR().optional(),pollInterval:nR().optional()}),tp=nQ(["working","input_required","completed","failed","cancelled"]),tu=nz({taskId:o7(),status:tp,ttl:nL([nR(),nj()]),createdAt:o7(),lastUpdatedAt:o7(),pollInterval:n4(nR()),statusMessage:n4(o7())}),tm=m.extend({task:tu}),tf=p.merge(tu),th=u.extend({method:nY("notifications/tasks/status"),params:tf}),ty=l.extend({method:nY("tasks/get"),params:s.extend({taskId:o7()})}),tg=m.merge(tu),t_=l.extend({method:nY("tasks/result"),params:s.extend({taskId:o7()})}),tv=m.loose(),tb=M.extend({method:nY("tasks/list")}),t$=W.extend({tasks:nW(tu)}),tS=l.extend({method:nY("tasks/cancel"),params:s.extend({taskId:o7()})}),{JSONValueSchema:e,JSONObjectSchema:t,ProgressTokenSchema:r,CursorSchema:i,TaskMetadataSchema:o,RelatedTaskMetadataSchema:n,RequestMetaSchema:a,BaseRequestParamsSchema:s,TaskAugmentedRequestParamsSchema:c,RequestSchema:l,NotificationsParamsSchema:p,NotificationSchema:u,ResultSchema:m,RequestIdSchema:f,EmptyResultSchema:h,CancelledNotificationParamsSchema:y,CancelledNotificationSchema:g,IconSchema:_,IconsSchema:v,BaseMetadataSchema:b,ImplementationSchema:$,ClientTasksCapabilitySchema:w,ServerTasksCapabilitySchema:R,ClientCapabilitiesSchema:P,InitializeRequestParamsSchema:V,InitializeRequestSchema:q,ServerCapabilitiesSchema:I,InitializeResultSchema:x,InitializedNotificationSchema:j,PingRequestSchema:C,ProgressSchema:T,ProgressNotificationParamsSchema:O,ProgressNotificationSchema:E,PaginatedRequestParamsSchema:A,PaginatedRequestSchema:M,PaginatedResultSchema:W,ResourceContentsSchema:N,TextResourceContentsSchema:z,BlobResourceContentsSchema:F,RoleSchema:L,AnnotationsSchema:U,ResourceSchema:H,ResourceTemplateSchema:G,ListResourcesRequestSchema:B,ListResourcesResultSchema:K,ListResourceTemplatesRequestSchema:J,ListResourceTemplatesResultSchema:Z,ResourceRequestParamsSchema:Q,ReadResourceRequestParamsSchema:Q,ReadResourceRequestSchema:X,ReadResourceResultSchema:Y,ResourceListChangedNotificationSchema:ee,SubscribeRequestParamsSchema:Q,SubscribeRequestSchema:et,UnsubscribeRequestParamsSchema:Q,UnsubscribeRequestSchema:er,ResourceUpdatedNotificationParamsSchema:ei,ResourceUpdatedNotificationSchema:eo,PromptArgumentSchema:en,PromptSchema:ea,ListPromptsRequestSchema:es,ListPromptsResultSchema:ed,GetPromptRequestParamsSchema:ec,GetPromptRequestSchema:el,TextContentSchema:ep,ImageContentSchema:eu,AudioContentSchema:em,ToolUseContentSchema:ef,EmbeddedResourceSchema:eh,ResourceLinkSchema:ey,ContentBlockSchema:eg,PromptMessageSchema:e_,GetPromptResultSchema:ev,PromptListChangedNotificationSchema:eb,ToolAnnotationsSchema:e$,ToolExecutionSchema:eS,ToolSchema:ek,ListToolsRequestSchema:ew,ListToolsResultSchema:eR,CallToolResultSchema:eP,CallToolRequestParamsSchema:eV,CallToolRequestSchema:eq,ToolListChangedNotificationSchema:eI,LoggingLevelSchema:ex,SetLevelRequestParamsSchema:ej,SetLevelRequestSchema:eC,LoggingMessageNotificationParamsSchema:eT,LoggingMessageNotificationSchema:eO,ModelHintSchema:eE,ModelPreferencesSchema:eA,ToolChoiceSchema:eM,ToolResultContentSchema:eW,SamplingContentSchema:eN,SamplingMessageContentBlockSchema:ez,SamplingMessageSchema:eD,CreateMessageRequestParamsSchema:eF,CreateMessageRequestSchema:eL,CreateMessageResultSchema:eU,CreateMessageResultWithToolsSchema:eH,BooleanSchemaSchema:eG,StringSchemaSchema:eB,NumberSchemaSchema:eK,UntitledSingleSelectEnumSchemaSchema:eJ,TitledSingleSelectEnumSchemaSchema:eZ,LegacyTitledEnumSchemaSchema:eQ,SingleSelectEnumSchemaSchema:eX,UntitledMultiSelectEnumSchemaSchema:eY,TitledMultiSelectEnumSchemaSchema:e1,MultiSelectEnumSchemaSchema:e0,EnumSchemaSchema:e2,PrimitiveSchemaDefinitionSchema:e4,ElicitRequestFormParamsSchema:e6,ElicitRequestURLParamsSchema:e3,ElicitRequestParamsSchema:e9,ElicitRequestSchema:e5,ElicitationCompleteNotificationParamsSchema:e8,ElicitationCompleteNotificationSchema:e7,ElicitResultSchema:te,ResourceTemplateReferenceSchema:tt,PromptReferenceSchema:tr,CompleteRequestParamsSchema:ti,CompleteRequestSchema:to,CompleteResultSchema:tn,RootSchema:ta,ListRootsRequestSchema:ts,ListRootsResultSchema:td,RootsListChangedNotificationSchema:tc,TaskCreationParamsSchema:tl,TaskStatusSchema:tp,TaskSchema:tu,CreateTaskResultSchema:tm,TaskStatusNotificationParamsSchema:tf,TaskStatusNotificationSchema:th,GetTaskRequestSchema:ty,GetTaskResultSchema:tg,GetTaskPayloadRequestSchema:t_,GetTaskPayloadResultSchema:tv,ListTasksRequestSchema:tb,ListTasksResultSchema:t$,CancelTaskRequestSchema:tS,CancelTaskResultSchema:m.merge(tu),ClientRequestSchema:nL([C,q,to,eC,el,es,B,J,X,et,er,eq,ew,ty,t_,tb,tS]),ClientNotificationSchema:nL([g,E,j,tc,th]),ClientResultSchema:nL([h,eU,eH,te,td,tg,t$,tm]),ServerRequestSchema:nL([C,eL,e5,ts,ty,t_,tb,tS]),ServerNotificationSchema:nL([g,E,eO,eo,ee,eI,eb,th,e7]),ServerResultSchema:nL([h,x,tn,ev,ed,K,Z,Y,eP,eR,tg,t$,tm]),CallToolResultWireSchema:nE().superRefine((e,t)=>{if(!("object"!=typeof e||null===e||Array.isArray(e))&&void 0===e.content){for(let r of RM)if(r in e)return void t.addIssue({code:"custom",message:`content is required when the body carries '${r}' — another result family cannot default into an empty tools/call success`})}}).transform(RW).pipe(eP)})}function Rz(e){return"object"!==e.type}let RD=new Set(["const","enum","default","examples"]),RF=new Set(["properties","patternProperties","$defs","definitions","dependentSchemas","dependencies"]);function RL(e){return void 0!==e&&!("string"==typeof e&&e.startsWith("#"))}let RU={ping:null,initialize:null,"completion/complete":null,"logging/setLevel":null,"prompts/get":null,"prompts/list":null,"resources/list":null,"resources/templates/list":null,"resources/read":null,"resources/subscribe":null,"resources/unsubscribe":null,"tools/call":null,"tools/list":null,"tasks/get":null,"tasks/result":null,"tasks/list":null,"tasks/cancel":null,"sampling/createMessage":null,"elicitation/create":null,"roots/list":null},RH={"notifications/cancelled":null,"notifications/progress":null,"notifications/initialized":null,"notifications/roots/list_changed":null,"notifications/tasks/status":null,"notifications/message":null,"notifications/resources/updated":null,"notifications/resources/list_changed":null,"notifications/tools/list_changed":null,"notifications/prompts/list_changed":null,"notifications/elicitation/complete":null},RG={ping:null,initialize:null,"completion/complete":null,"logging/setLevel":null,"prompts/get":null,"prompts/list":null,"resources/list":null,"resources/templates/list":null,"resources/read":null,"resources/subscribe":null,"resources/unsubscribe":null,"tools/call":null,"tools/list":null,"sampling/createMessage":null,"elicitation/create":null,"roots/list":null};function RB(){if(c)return c;let e=RN();return c={requestSchemas:{ping:e.PingRequestSchema,initialize:e.InitializeRequestSchema,"completion/complete":e.CompleteRequestSchema,"logging/setLevel":e.SetLevelRequestSchema,"prompts/get":e.GetPromptRequestSchema,"prompts/list":e.ListPromptsRequestSchema,"resources/list":e.ListResourcesRequestSchema,"resources/templates/list":e.ListResourceTemplatesRequestSchema,"resources/read":e.ReadResourceRequestSchema,"resources/subscribe":e.SubscribeRequestSchema,"resources/unsubscribe":e.UnsubscribeRequestSchema,"tools/call":e.CallToolRequestSchema,"tools/list":e.ListToolsRequestSchema,"tasks/get":e.GetTaskRequestSchema,"tasks/result":e.GetTaskPayloadRequestSchema,"tasks/list":e.ListTasksRequestSchema,"tasks/cancel":e.CancelTaskRequestSchema,"sampling/createMessage":e.CreateMessageRequestSchema,"elicitation/create":e.ElicitRequestSchema,"roots/list":e.ListRootsRequestSchema},notificationSchemas:{"notifications/cancelled":e.CancelledNotificationSchema,"notifications/progress":e.ProgressNotificationSchema,"notifications/initialized":e.InitializedNotificationSchema,"notifications/roots/list_changed":e.RootsListChangedNotificationSchema,"notifications/tasks/status":e.TaskStatusNotificationSchema,"notifications/message":e.LoggingMessageNotificationSchema,"notifications/resources/updated":e.ResourceUpdatedNotificationSchema,"notifications/resources/list_changed":e.ResourceListChangedNotificationSchema,"notifications/tools/list_changed":e.ToolListChangedNotificationSchema,"notifications/prompts/list_changed":e.PromptListChangedNotificationSchema,"notifications/elicitation/complete":e.ElicitationCompleteNotificationSchema},resultSchemas:{ping:e.EmptyResultSchema,initialize:e.InitializeResultSchema,"completion/complete":e.CompleteResultSchema,"logging/setLevel":e.EmptyResultSchema,"prompts/get":e.GetPromptResultSchema,"prompts/list":e.ListPromptsResultSchema,"resources/list":e.ListResourcesResultSchema,"resources/templates/list":e.ListResourceTemplatesResultSchema,"resources/read":e.ReadResourceResultSchema,"resources/subscribe":e.EmptyResultSchema,"resources/unsubscribe":e.EmptyResultSchema,"tools/call":e.CallToolResultWireSchema,"tools/list":e.ListToolsResultSchema,"sampling/createMessage":e.CreateMessageResultWithToolsSchema,"elicitation/create":e.ElicitResultSchema,"roots/list":e.ListRootsResultSchema}}}function RK(e){return Object.prototype.hasOwnProperty.call(RU,e)}function RJ(e){return Object.prototype.hasOwnProperty.call(RH,e)}function RZ(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)}function RQ(e,t){if(void 0===e)return{ok:!1,reason:"not-in-era"};let r=e.safeParse(t);return r.success?{ok:!0,value:r.data}:{ok:!1,reason:"invalid",message:String(r.error)}}Object.keys(RU),Object.keys(RH);let RX={ok:!1,reason:"not-in-era"};function RY(e){return RZ(e)&&RZ(e.outputSchema)&&Rz(e.outputSchema)}let R1={era:"2025-11-25",hasRequestMethod:RK,hasNotificationMethod:RJ,validateRequest:(e,t)=>RQ(RK(e)?RB().requestSchemas[e]:void 0,t),validateResult:(e,t)=>RQ(Object.prototype.hasOwnProperty.call(RG,e)?RB().resultSchemas[e]:void 0,t),validateNotification:(e,t)=>RQ(RJ(e)?RB().notificationSchemas[e]:void 0,t),hasInputRequestMethod:()=>!1,validateInputRequest:()=>RX,validateInputResponse:()=>RX,samplingResultVariant:(e,t)=>{let r=RN();return RQ(e?r.CreateMessageResultWithToolsSchema:r.CreateMessageResultSchema,t)},outboundEnvelope:e=>void 0,validateEnvelopeMeta:e=>[],projectCallToolResult(e,t){let r=RA(e),i=r.structuredContent;if(void 0===i)return r;let o="object"!=typeof i||null===i||Array.isArray(i),n=void 0!==t&&Rz(t);return o||n?{...r,structuredContent:{result:i}}:r},decodeResult(e,t){if(RZ(t)&&"resultType"in t){let e={...t};return delete e.resultType,{kind:"complete",result:e}}return{kind:"complete",result:t}},encodeResult(e,t){if("tools/list"!==e)return t;let r=t.tools;return Array.isArray(r)&&r.some(e=>RY(e))?{...t,tools:r.map(e=>RY(e)?{...e,outputSchema:function(e){var t;let r="string"==typeof e.$schema?e.$schema:void 0;if(RL(e.$id))return{...void 0!==r&&{$schema:r},type:"object",properties:{result:e},required:["result"]};let i="string"==typeof(t=e.$schema)&&Sq.has(t.replace(/#$/,""))&&!0!==e.$recursiveAnchor,o=(e,t)=>{if(Array.isArray(e))return e.map(e=>o(e,!1));if(null===e||"object"!=typeof e||!t&&RL(e.$id))return e;let r={},n=!1;for(let[a,s]of Object.entries(e))t?r[a]=o(s,!1):("$ref"===a||"$dynamicRef"===a)&&"string"==typeof s?r[a]="#"===s?"#/properties/result":s.startsWith("#/")?`#/properties/result${s.slice(1)}`:s:"$recursiveRef"===a&&"#"===s&&i?n=!0:RD.has(a)?r[a]=s:RF.has(a)?r[a]=o(s,!0):r[a]=o(s,!1);return n&&("$ref"in r?r.allOf=[...Array.isArray(r.allOf)?r.allOf:[],{$ref:"#/properties/result"}]:r.$ref="#/properties/result"),r};return{...void 0!==r&&{$schema:r},type:"object",properties:{result:o(e,!1)},required:["result"]}}(e.outputSchema)}:e)}:t},encodeErrorCode:e=>-32002===e?-32602:e,checkInboundEnvelope:e=>void 0};function R0(){return l??=function(){let e=aa(()=>nL([o7(),nR(),nI(),nj(),nJ(o7(),e),nW(e)])),t=nJ(o7(),e),r=nL([o7(),nR().int()]),i=o7(),o=nL([o7(),nR().int()]),n=nQ(["user","assistant"]),a=nQ(["debug","info","notice","warning","error","critical","alert","emergency"]),s=o7().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:"Invalid Base64 string"}),d=nz({ttl:nR().optional()}),c=nz({taskId:o7()}),l=nD({progressToken:r.optional(),"io.modelcontextprotocol/related-task":c.optional()}),p=nz({_meta:l.optional()}),u=p.extend({task:d.optional()}),m=nz({_meta:l.optional()}),f=nz({method:o7(),params:m.loose().optional()}),h=nz({src:o7(),mimeType:o7().optional(),sizes:nW(o7()).optional(),theme:nQ(["light","dark"]).optional()}),y=nz({icons:nW(h).optional()}),g=nz({name:o7(),title:o7().optional()}),_=g.extend({...g.shape,...y.shape,version:o7(),websiteUrl:o7().optional(),description:o7().optional()}),v=nB(nz({applyDefaults:nI().optional()}),t),b=ad(e=>e&&"object"==typeof e&&!Array.isArray(e)&&0===Object.keys(e).length?{form:{}}:e,nB(nz({form:v.optional(),url:t.optional()}),t.optional())),$=nD({list:t.optional(),cancel:t.optional(),requests:nD({sampling:nD({createMessage:t.optional()}).optional(),elicitation:nD({create:t.optional()}).optional()}).optional()}),S=nD({list:t.optional(),cancel:t.optional(),requests:nD({tools:nD({call:t.optional()}).optional()}).optional()}),k=nz({experimental:nJ(o7(),t).optional(),sampling:nz({context:t.optional(),tools:t.optional()}).optional(),elicitation:b.optional(),roots:nz({listChanged:nI().optional()}).optional(),tasks:$.optional(),extensions:nJ(o7(),t).optional()}),w=nz({experimental:nJ(o7(),t).optional(),logging:t.optional(),completions:t.optional(),prompts:nz({listChanged:nI().optional()}).optional(),resources:nz({subscribe:nI().optional(),listChanged:nI().optional()}).optional(),tools:nz({listChanged:nI().optional()}).optional(),tasks:S.optional(),extensions:nJ(o7(),t).optional()}),R=nz({progress:nR(),total:n4(nR()),message:n4(o7())}),P=nz({...m.shape,...R.shape,progressToken:r}),V=f.extend({method:nY("notifications/progress"),params:P}),q=m.extend({level:a,logger:o7().optional(),data:nE()}),I=f.extend({method:nY("notifications/message"),params:q}),x=nz({uri:o7(),mimeType:n4(o7()),_meta:nJ(o7(),nE()).optional()}),j=x.extend({text:o7()}),C=x.extend({blob:s}),T=nz({audience:nW(n).optional(),priority:nR().min(0).max(1).optional(),lastModified:ac({offset:!0}).optional()}),O=nz({...g.shape,...y.shape,uri:o7(),description:n4(o7()),mimeType:n4(o7()),size:n4(nR()),annotations:T.optional(),_meta:n4(nD({}))}),E=nz({...g.shape,...y.shape,uriTemplate:o7(),description:n4(o7()),mimeType:n4(o7()),annotations:T.optional(),_meta:n4(nD({}))}),A=f.extend({method:nY("notifications/resources/list_changed"),params:m.optional()}),M=m.extend({uri:o7()}),W=f.extend({method:nY("notifications/resources/updated"),params:M}),N=nz({name:o7(),description:n4(o7()),required:n4(nI())}),z=nz({...g.shape,...y.shape,description:n4(o7()),arguments:n4(nW(N)),_meta:n4(nD({}))}),D=f.extend({method:nY("notifications/prompts/list_changed"),params:m.optional()}),F=nz({type:nY("text"),text:o7(),annotations:T.optional(),_meta:nJ(o7(),nE()).optional()}),L=nz({type:nY("image"),data:s,mimeType:o7(),annotations:T.optional(),_meta:nJ(o7(),nE()).optional()}),U=nz({type:nY("audio"),data:s,mimeType:o7(),annotations:T.optional(),_meta:nJ(o7(),nE()).optional()}),H=nz({type:nY("tool_use"),name:o7(),id:o7(),input:nJ(o7(),nE()),_meta:nJ(o7(),nE()).optional()}),G=nz({type:nY("resource"),resource:nL([j,C]),annotations:T.optional(),_meta:nJ(o7(),nE()).optional()}),B=O.extend({type:nY("resource_link")}),K=nL([F,L,U,B,G]),J=nz({role:n,content:K}),Z=nz({title:o7().optional(),readOnlyHint:nI().optional(),destructiveHint:nI().optional(),idempotentHint:nI().optional(),openWorldHint:nI().optional()}),Q=f.extend({method:nY("notifications/tools/list_changed"),params:m.optional()}),X=nz({name:o7().optional()}),Y=nz({hints:nW(X).optional(),costPriority:nR().min(0).max(1).optional(),speedPriority:nR().min(0).max(1).optional(),intelligencePriority:nR().min(0).max(1).optional()}),ee=nz({mode:nQ(["auto","required","none"]).optional()}),et=nz({type:nY("boolean"),title:o7().optional(),description:o7().optional(),default:nI().optional()}),er=nz({type:nY("string"),title:o7().optional(),description:o7().optional(),minLength:nR().optional(),maxLength:nR().optional(),format:nQ(["email","uri","date","date-time"]).optional(),default:o7().optional()}),ei=nz({type:nQ(["number","integer"]),title:o7().optional(),description:o7().optional(),minimum:nR().optional(),maximum:nR().optional(),default:nR().optional()}),eo=nz({type:nY("string"),title:o7().optional(),description:o7().optional(),enum:nW(o7()),default:o7().optional()}),en=nz({type:nY("string"),title:o7().optional(),description:o7().optional(),oneOf:nW(nz({const:o7(),title:o7()})),default:o7().optional()}),ea=nz({type:nY("string"),title:o7().optional(),description:o7().optional(),enum:nW(o7()),enumNames:nW(o7()).optional(),default:o7().optional()}),es=nL([eo,en]),ed=nz({type:nY("array"),title:o7().optional(),description:o7().optional(),minItems:nR().optional(),maxItems:nR().optional(),items:nz({type:nY("string"),enum:nW(o7())}),default:nW(o7()).optional()}),ec=nz({type:nY("array"),title:o7().optional(),description:o7().optional(),minItems:nR().optional(),maxItems:nR().optional(),items:nz({anyOf:nW(nz({const:o7(),title:o7()}))}),default:nW(o7()).optional()}),el=nL([ed,ec]),ep=nL([ea,es,el]),eu=nL([ep,et,er,ei]),em=u.extend({mode:nY("form").optional(),message:o7(),requestedSchema:nz({type:nY("object"),properties:nJ(o7(),eu),required:nW(o7()).optional()}).catchall(nE())}),ef=nz({type:nY("ref/resource"),uri:o7()}),eh=nz({type:nY("ref/prompt"),name:o7()}),ey=nz({uri:o7().startsWith("file://"),name:o7().optional(),_meta:nJ(o7(),nE()).optional()}),eg=k.shape,e_=nz({experimental:eg.experimental,sampling:eg.sampling,elicitation:eg.elicitation,roots:eg.roots,extensions:eg.extensions}),ev=w.shape,eb=nz({experimental:ev.experimental,logging:ev.logging,completions:ev.completions,prompts:ev.prompts,resources:ev.resources,tools:ev.tools,extensions:ev.extensions}),e$=nD({progressToken:r.optional(),[SC]:o7(),[ST]:_.optional(),[SE]:e_,[SM]:a.optional()}),eS=nz({...g.shape,...y.shape,description:o7().optional(),inputSchema:nD({$schema:o7().optional(),type:nY("object")}),outputSchema:nD({$schema:o7().optional()}).optional(),annotations:Z.optional(),_meta:nJ(o7(),nE()).optional()}),ek=nz({type:nY("tool_result"),toolUseId:o7(),content:nW(K),structuredContent:nE().optional(),isError:nI().optional(),_meta:nJ(o7(),nE()).optional()}),ew=nL([F,L,U,H,ek]),eR=nz({role:n,content:nL([ew,nW(ew)]),_meta:nJ(o7(),nE()).optional()}),eP=o7(),eV=nD({[SO]:_.optional().catch(void 0)}),eq=eV.optional();function eI(e){return nD({_meta:eq,resultType:eP.default("complete"),...e})}let ex=eI({}),ej=eI({nextCursor:i.optional()}),eC=eI({content:nW(K),structuredContent:nE().optional(),isError:nI().optional()}),eT=eI({ttlMs:nR().int().min(0),cacheScope:nQ(["public","private"]),tools:nW(eS),nextCursor:i.optional()}),eO=eI({ttlMs:nR().int().min(0),cacheScope:nQ(["public","private"]),prompts:nW(z),nextCursor:i.optional()}),eE=eI({description:o7().optional(),messages:nW(J)}),eA=eI({ttlMs:nR().int().min(0),cacheScope:nQ(["public","private"]),resources:nW(O),nextCursor:i.optional()}),eM=eI({ttlMs:nR().int().min(0),cacheScope:nQ(["public","private"]),resourceTemplates:nW(E),nextCursor:i.optional()}),eW=eI({ttlMs:nR().int().min(0),cacheScope:nQ(["public","private"]),contents:nW(nL([j,C]))}),eN=eI({completion:nz({values:nW(o7()).max(100),total:nR().int().optional(),hasMore:nI().optional()}).loose()}),ez=eI({ttlMs:nR().int().min(0),cacheScope:nQ(["public","private"])}),eD=eI({ttlMs:nR().int().min(0).catch(0),cacheScope:nQ(["public","private"]).catch("private"),supportedVersions:nW(o7()),capabilities:eb,instructions:o7().optional()}),eF=nz({messages:nW(eR),modelPreferences:Y.optional(),systemPrompt:o7().optional(),includeContext:nQ(["none","thisServer","allServers"]).optional(),temperature:nR().optional(),maxTokens:nR().int(),stopSequences:nW(o7()).optional(),metadata:t.optional(),tools:nW(eS).optional(),toolChoice:ee.optional()}),eL=nz({method:nY("sampling/createMessage"),params:eF}),eU=nz({method:nY("roots/list"),params:nz({_meta:nJ(o7(),nE()).optional()}).optional()}),eH=nz({...eR.shape,model:o7(),stopReason:o7().optional()}),eG=nz({roots:nW(ey)}),eB=nz({action:nQ(["accept","decline","cancel"]),content:nJ(o7(),nL([o7(),nR(),nI(),nW(o7())])).optional()}),eK=nz({mode:nY("url"),message:o7(),url:o7().url()}),eJ=nL([em,eK]),eZ=nz({method:nY("elicitation/create"),params:eJ}),eQ=nL([eL,eU,eZ]),eX=nL([eH,eG,eB]),eY=nJ(o7(),eQ),e1=nJ(o7(),eX),e0=eI({inputRequests:eY.optional(),requestState:o7().optional()}),e2={inputResponses:e1.optional(),requestState:o7().optional()},e4=nz({_meta:e$,...e2}),e6=nD({progressToken:r.optional()});function e3(e,t){return nz({method:nY(e),params:nz({_meta:e$,...t})})}function e9(e,t){return nz({method:nY(e),params:nz({_meta:e6.optional(),...t}).optional()})}let e5={name:o7(),arguments:nJ(o7(),nE()).optional(),...e2},e8={cursor:i.optional()},e7=e3("tools/call",e5),te=e3("tools/list",e8),tt=e3("prompts/list",e8),tr=e3("prompts/get",{name:o7(),arguments:nJ(o7(),o7()).optional(),...e2}),ti=e3("resources/list",e8),to=e3("resources/templates/list",e8),tn=e3("resources/read",{uri:o7(),...e2}),ta={ref:nL([eh,ef]),argument:nz({name:o7(),value:o7()}),context:nz({arguments:nJ(o7(),o7()).optional()}).optional()},ts=e3("completion/complete",ta),td=e3("server/discover",{}),tc=nz({toolsListChanged:nI().optional(),promptsListChanged:nI().optional(),resourcesListChanged:nI().optional(),resourceSubscriptions:nW(o7()).optional()}),tl={notifications:tc},tp=e3("subscriptions/listen",tl),tu=eV.extend({"io.modelcontextprotocol/subscriptionId":o}),tm=nD({_meta:tu,resultType:eP.default("complete")}),tf={"tools/call":e9("tools/call",e5),"tools/list":e9("tools/list",e8),"prompts/get":e9("prompts/get",{name:o7(),arguments:nJ(o7(),o7()).optional()}),"prompts/list":e9("prompts/list",e8),"resources/list":e9("resources/list",e8),"resources/templates/list":e9("resources/templates/list",e8),"resources/read":e9("resources/read",{uri:o7()}),"completion/complete":e9("completion/complete",ta),"server/discover":e9("server/discover",{}),"subscriptions/listen":e9("subscriptions/listen",tl)};function th(e){return nD({_meta:eq,...e})}let ty={"tools/call":th({content:nW(K),structuredContent:nE().optional(),isError:nI().optional()}),"tools/list":th({ttlMs:nR().int().min(0),cacheScope:nQ(["public","private"]),tools:nW(eS),nextCursor:i.optional()}),"prompts/get":th({description:o7().optional(),messages:nW(J)}),"prompts/list":th({ttlMs:nR().int().min(0),cacheScope:nQ(["public","private"]),prompts:nW(z),nextCursor:i.optional()}),"resources/list":th({ttlMs:nR().int().min(0),cacheScope:nQ(["public","private"]),resources:nW(O),nextCursor:i.optional()}),"resources/templates/list":th({ttlMs:nR().int().min(0),cacheScope:nQ(["public","private"]),resourceTemplates:nW(E),nextCursor:i.optional()}),"resources/read":th({ttlMs:nR().int().min(0),cacheScope:nQ(["public","private"]),contents:nW(nL([j,C]))}),"completion/complete":th({completion:nz({values:nW(o7()).max(100),total:nR().int().optional(),hasMore:nI().optional()}).loose()}),"server/discover":th({ttlMs:nR().int().min(0).catch(0),cacheScope:nQ(["public","private"]).catch("private"),supportedVersions:nW(o7()),capabilities:eb,instructions:o7().optional()}),"subscriptions/listen":th({})},tg=nD({"io.modelcontextprotocol/subscriptionId":o.optional()}),t_=nz({method:nY("notifications/subscriptions/acknowledged"),params:nz({_meta:tg.optional(),notifications:tc})}),tv=nz({_meta:tg.optional(),requestId:o,reason:o7().optional()}),tb=nz({method:nY("notifications/cancelled"),params:tv}),t$=e=>nz({jsonrpc:nY("2.0"),id:nL([o7(),nR().int()]),result:e}).strict();return{JSONValueSchema:e,JSONObjectSchema:t,ProgressTokenSchema:r,CursorSchema:i,RequestIdSchema:o,RoleSchema:n,LoggingLevelSchema:a,TaskMetadataSchema:d,RelatedTaskMetadataSchema:c,RequestMetaSchema:l,BaseRequestParamsSchema:p,TaskAugmentedRequestParamsSchema:u,NotificationsParamsSchema:m,NotificationSchema:f,IconSchema:h,IconsSchema:y,BaseMetadataSchema:g,ImplementationSchema:_,ClientTasksCapabilitySchema:$,ServerTasksCapabilitySchema:S,ClientCapabilitiesSchema:k,ServerCapabilitiesSchema:w,ProgressSchema:R,ProgressNotificationParamsSchema:P,ProgressNotificationSchema:V,LoggingMessageNotificationParamsSchema:q,LoggingMessageNotificationSchema:I,ResourceContentsSchema:x,TextResourceContentsSchema:j,BlobResourceContentsSchema:C,AnnotationsSchema:T,ResourceSchema:O,ResourceTemplateSchema:E,ResourceListChangedNotificationSchema:A,ResourceUpdatedNotificationParamsSchema:M,ResourceUpdatedNotificationSchema:W,PromptArgumentSchema:N,PromptSchema:z,PromptListChangedNotificationSchema:D,TextContentSchema:F,ImageContentSchema:L,AudioContentSchema:U,ToolUseContentSchema:H,EmbeddedResourceSchema:G,ResourceLinkSchema:B,ContentBlockSchema:K,PromptMessageSchema:J,ToolAnnotationsSchema:Z,ToolListChangedNotificationSchema:Q,ModelHintSchema:X,ModelPreferencesSchema:Y,ToolChoiceSchema:ee,BooleanSchemaSchema:et,StringSchemaSchema:er,NumberSchemaSchema:ei,UntitledSingleSelectEnumSchemaSchema:eo,TitledSingleSelectEnumSchemaSchema:en,LegacyTitledEnumSchemaSchema:ea,SingleSelectEnumSchemaSchema:es,UntitledMultiSelectEnumSchemaSchema:ed,TitledMultiSelectEnumSchemaSchema:ec,MultiSelectEnumSchemaSchema:el,EnumSchemaSchema:ep,PrimitiveSchemaDefinitionSchema:eu,ElicitRequestFormParamsSchema:em,ResourceTemplateReferenceSchema:ef,PromptReferenceSchema:eh,RootSchema:ey,ClientCapabilities2026Schema:e_,ServerCapabilities2026Schema:eb,RequestMetaEnvelopeSchema:e$,ToolSchema:eS,ToolResultContentSchema:ek,SamplingMessageContentBlockSchema:ew,SamplingMessageSchema:eR,ResultTypeSchema:eP,ResultMetaSchema:eV,ResultSchema:ex,PaginatedResultSchema:ej,CallToolResultSchema:eC,ListToolsResultSchema:eT,ListPromptsResultSchema:eO,GetPromptResultSchema:eE,ListResourcesResultSchema:eA,ListResourceTemplatesResultSchema:eM,ReadResourceResultSchema:eW,CompleteResultSchema:eN,CacheableResultSchema:ez,DiscoverResultSchema:eD,CreateMessageRequestParamsSchema:eF,CreateMessageRequestSchema:eL,ListRootsRequestSchema:eU,CreateMessageResultSchema:eH,ListRootsResultSchema:eG,ElicitResultSchema:eB,ElicitRequestURLParamsSchema:eK,ElicitRequestParamsSchema:eJ,ElicitRequestSchema:eZ,InputRequestSchema:eQ,InputResponseSchema:eX,InputRequestsSchema:eY,InputResponsesSchema:e1,InputRequiredResultSchema:e0,InputResponseRequestParamsSchema:e4,CallToolRequestSchema:e7,ListToolsRequestSchema:te,ListPromptsRequestSchema:tt,GetPromptRequestSchema:tr,ListResourcesRequestSchema:ti,ListResourceTemplatesRequestSchema:to,ReadResourceRequestSchema:tn,CompleteRequestSchema:ts,DiscoverRequestSchema:td,SubscriptionFilterSchema:tc,SubscriptionsListenRequestSchema:tp,SubscriptionsListenResultMetaSchema:tu,SubscriptionsListenResultSchema:tm,dispatchRequestSchemas:tf,dispatchResultSchemas:ty,NotificationMetaSchema:tg,SubscriptionsAcknowledgedNotificationSchema:t_,CancelledNotificationParamsSchema:tv,CancelledNotificationSchema:tb,notificationSchemas2026:{"notifications/cancelled":tb,"notifications/progress":V,"notifications/message":I,"notifications/resources/updated":W,"notifications/resources/list_changed":A,"notifications/tools/list_changed":Q,"notifications/prompts/list_changed":D,"notifications/subscriptions/acknowledged":t_},JSONRPCResultResponseSchema:t$(ex),CallToolResultResponseSchema:t$(nL([eC,e0])),ListToolsResultResponseSchema:t$(eT),ListPromptsResultResponseSchema:t$(eO),GetPromptResultResponseSchema:t$(nL([eE,e0])),ListResourcesResultResponseSchema:t$(eA),ListResourceTemplatesResultResponseSchema:t$(eM),ReadResourceResultResponseSchema:t$(nL([eW,e0])),CompleteResultResponseSchema:t$(eN),DiscoverResultResponseSchema:t$(eD),SubscriptionsListenResultResponseSchema:t$(tm)}}()}let R2=["tools/list","prompts/list","resources/list","resources/templates/list","resources/read","server/discover"],R4=Symbol("modelcontextprotocol.resultCacheHintFallback");function R6(e){return"number"==typeof e&&Number.isSafeInteger(e)&&e>=0}function R3(e){return"public"===e||"private"===e}let R9=((Y={})[Y.ParseError=-32700]="ParseError",Y[Y.InvalidRequest=-32600]="InvalidRequest",Y[Y.MethodNotFound=-32601]="MethodNotFound",Y[Y.InvalidParams=-32602]="InvalidParams",Y[Y.InternalError=-32603]="InternalError",Y[Y.ResourceNotFound=-32002]="ResourceNotFound",Y[Y.MissingRequiredClientCapability=-32021]="MissingRequiredClientCapability",Y[Y.UnsupportedProtocolVersion=-32022]="UnsupportedProtocolVersion",Y[Y.UrlElicitationRequired=-32042]="UrlElicitationRequired",Y);var R5=class e extends Error{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.ProtocolError"})}static[Symbol.hasInstance](e){return Rq(this,e)}static isInstance(e){if("function"!=typeof this)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return Rq(this,e)}constructor(e,t,r){super(t),this.code=e,this.data=r,this.name="ProtocolError",RV(this,new.target)}static fromError(t,r,i){return t===R9.UrlElicitationRequired&&i&&i.elicitations?new R7(i.elicitations,r):t===R9.UnsupportedProtocolVersion&&i&&Array.isArray(i.supported)&&"string"==typeof i.requested?new Pe({supported:i.supported,requested:i.requested},r):(t===R9.InvalidParams||t===R9.ResourceNotFound)&&"string"==typeof i?.uri&&(t===R9.ResourceNotFound||1===Object.keys(i).length)?new R8(i.uri,r):t===R9.MissingRequiredClientCapability&&i&&null!==i.requiredCapabilities&&"object"==typeof i.requiredCapabilities&&!Array.isArray(i.requiredCapabilities)?new Pt({requiredCapabilities:i.requiredCapabilities},r):new e(t,r,i)}},R8=class extends R5{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.ResourceNotFoundError"})}constructor(e,t=`Resource not found: ${e}`){super(R9.InvalidParams,t,{uri:e})}get uri(){return this.data.uri}},R7=class extends R5{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.UrlElicitationRequiredError"})}constructor(e,t=`URL elicitation${e.length>1?"s":""} required`){super(R9.UrlElicitationRequired,t,{elicitations:e})}get elicitations(){return this.data?.elicitations??[]}},Pe=class extends R5{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.UnsupportedProtocolVersionError"})}constructor(e,t=`Unsupported protocol version: ${e.requested}`){super(R9.UnsupportedProtocolVersion,t,e)}get supported(){return this.data.supported}get requested(){return this.data.requested}},Pt=class extends R5{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.MissingRequiredClientCapabilityError"})}constructor(e,t=`Missing required client capabilities: ${Object.keys(e.requiredCapabilities).join(", ")}`){super(R9.MissingRequiredClientCapability,t,e)}get requiredCapabilities(){return this.data.requiredCapabilities}};let Pr=["tools/call","prompts/get","resources/read"],Pi=["elicitation/create","sampling/createMessage","roots/list"];function Po(){if(p)return p;let e=R0();return p={request:{"elicitation/create":nz({method:nY("elicitation/create"),params:e.ElicitRequestParamsSchema}),"sampling/createMessage":nz({method:nY("sampling/createMessage"),params:e.CreateMessageRequestParamsSchema}),"roots/list":nz({method:nY("roots/list"),params:nD({}).optional()})},response:{"elicitation/create":e.ElicitResultSchema,"sampling/createMessage":e.CreateMessageResultSchema,"roots/list":e.ListRootsResultSchema}}}function Pn(e){return Pi.includes(e)}function Pa(e){return Pn(e)?Po().request[e]:void 0}let Ps={"tools/call":null,"tools/list":null,"prompts/get":null,"prompts/list":null,"resources/list":null,"resources/templates/list":null,"resources/read":null,"completion/complete":null,"server/discover":null,"subscriptions/listen":null},Pd={"notifications/cancelled":null,"notifications/progress":null,"notifications/message":null,"notifications/resources/updated":null,"notifications/resources/list_changed":null,"notifications/tools/list_changed":null,"notifications/prompts/list_changed":null,"notifications/subscriptions/acknowledged":null};function Pc(e){return Object.prototype.hasOwnProperty.call(Ps,e)}function Pl(e){return Object.prototype.hasOwnProperty.call(Pd,e)}function Pp(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)}function Pu(e,t){if(void 0===e)return{ok:!1,reason:"not-in-era"};let r=e.safeParse(t);return r.success?{ok:!0,value:r.data}:{ok:!1,reason:"invalid",message:String(r.error)}}Object.keys(Ps),Object.keys(Pd);let Pm={ok:!1,reason:"not-in-era"},Pf=[SC,SE],Ph={era:"2026-07-28",hasRequestMethod:Pc,hasNotificationMethod:Pl,hasInputRequestMethod:e=>void 0!==Pa(e),validateRequest:(e,t)=>Pu(Pc(e)?R0().dispatchRequestSchemas[e]:void 0,t),validateResult:(e,t)=>Pu(Object.prototype.hasOwnProperty.call(Ps,e)?R0().dispatchResultSchemas[e]:void 0,t),validateNotification:(e,t)=>Pu(Pl(e)?R0().notificationSchemas2026[e]:void 0,t),validateInputRequest:(e,t)=>Pu(Pa(e),t),validateInputResponse:(e,t)=>Pu(Pn(e)?Po().response[e]:void 0,t),samplingResultVariant:()=>Pm,outboundEnvelope:e=>({[SC]:e.protocolVersion,[ST]:e.clientInfo,[SE]:e.clientCapabilities,...void 0!==e.logLevel&&{[SM]:e.logLevel}}),validateEnvelopeMeta(e){let t=[];for(let r of Pf)r in e||t.push({key:r,problem:"missing"});let r=R0().RequestMetaEnvelopeSchema.safeParse(e);if(!r.success)for(let e of r.error.issues){let r=e.path.map(String),i=r.length>0?r.join("."):"_meta";1===r.length&&t.some(e=>e.key===i&&"missing"===e.problem)||t.push({key:i,problem:e.message})}return t},projectCallToolResult:e=>RA(e),inputRequestSchema:Pa,decodeResult(e,t){if(!Pp(t))return{kind:"invalid",error:new Rx(RI.InvalidResult,`Invalid result for ${e}: not an object`,{method:e})};let r=t.resultType;if(void 0===r)return{kind:"invalid",error:new Rx(RI.InvalidResult,`Invalid result for ${e}: missing required resultType — servers implementing protocol revision 2026-07-28 MUST include it (the absent-means-complete bridge applies only to earlier-revision servers)`,{method:e,violation:"missing-resultType"})};if("string"!=typeof r)return{kind:"invalid",error:new Rx(RI.InvalidResult,`Invalid result for ${e}: non-string resultType`,{method:e,resultType:r})};if("input_required"===r){let r=t.inputRequests,i=Pp(r)?r:{},o=t.requestState,n=void 0===t._meta?void 0:R0().ResultMetaSchema.safeParse(t._meta),a=n?.success?n.data:void 0;return 0===Object.keys(i).length&&"string"!=typeof o?{kind:"invalid",error:new Rx(RI.InvalidResult,`Invalid result for ${e}: input_required carries neither inputRequests nor requestState (every input_required result must include at least one of the two)`,{method:e,violation:"input-required-missing-both"})}:{kind:"input_required",inputRequests:i,..."string"==typeof o&&{requestState:o},...void 0!==a&&{_meta:a}}}if("complete"!==r)return{kind:"invalid",error:new Rx(RI.UnsupportedResultType,`Unsupported result type '${r}' for ${e}`,{resultType:r,method:e})};let i=function(){if(u)return u;let e=R0();return u={"tools/call":e.CallToolResultSchema,"tools/list":e.ListToolsResultSchema,"prompts/get":e.GetPromptResultSchema,"prompts/list":e.ListPromptsResultSchema,"resources/list":e.ListResourcesResultSchema,"resources/templates/list":e.ListResourceTemplatesResultSchema,"resources/read":e.ReadResourceResultSchema,"completion/complete":e.CompleteResultSchema,"server/discover":e.DiscoverResultSchema}}(),o=Object.hasOwn(i,e)?i[e]:void 0;if(void 0!==o){let r=o.safeParse(t);if(!r.success)return{kind:"invalid",error:new Rx(RI.InvalidResult,`Invalid result for ${e}: ${r.error}`,{method:e})}}let n={...t};return delete n.resultType,{kind:"complete",result:n}},encodeResult:(e,t,r)=>(function(e,t){if(void 0===t)return e;let r=e._meta;return void 0===r?{...e,_meta:{[SO]:t}}:null===r||"object"!=typeof r||Array.isArray(r)||void 0!==r[SO]?e:{...e,_meta:{...r,[SO]:t}}})(function(e,t){var r,i;let o=t[R4];if("complete"!==t.resultType||!R2.includes(e)){let e;return void 0===o?t:(e={...t},delete e[R4],e)}let n=R6(t.ttlMs)?t.ttlMs:void 0!==(r=o)&&R6(r.ttlMs)?r.ttlMs:0,a=R3(t.cacheScope)?t.cacheScope:void 0!==(i=o)&&R3(i.cacheScope)?i.cacheScope:"private",s={...t,ttlMs:n,cacheScope:a};return delete s[R4],s}(e,function(e,t){let r=t.resultType;if(void 0===r)return{...t,resultType:"complete"};if("complete"===r||Pr.includes(e))return t;throw new R5(R9.InternalError,`Handler for ${e} returned resultType '${String(r)}', but results of ${e} only support 'complete' on protocol revision 2026-07-28`)}(e,function(e,t){let r=t,i=!1,o=()=>(i||(r={...r},i=!0),r),n=t.tools;"tools/list"===e&&Array.isArray(n)&&n.some(e=>Pp(e)&&"execution"in e)&&(o().tools=n.map(e=>{if(!Pp(e)||!("execution"in e))return e;let t={...e};return delete t.execution,t}));let a=t.capabilities;if(Pp(a)&&"tasks"in a){let e={...a};delete e.tasks,o().capabilities=e}return r}(e,t))),r),encodeErrorCode:e=>-32002===e?-32602:e,checkInboundEnvelope(e){if(void 0===e.envelope)return"Request is missing the required _meta envelope for protocol revision 2026-07-28 (io.modelcontextprotocol/protocolVersion, io.modelcontextprotocol/clientCapabilities)";let t=R0().RequestMetaEnvelopeSchema.safeParse(e.envelope);if(!t.success)return`Invalid _meta envelope for protocol revision 2026-07-28: ${t.error.issues.map(e=>e.message).join("; ")}`}},Py="2026-07-28";function Pg(e){return void 0!==e&&e>=RC?Ph:R1}function P_(e){return void 0!==e.revision?Pg(e.revision).era:"modern"===e.era?Ph.era:R1.era}function Pv(e){return PS.some(t=>t.hasRequestMethod(e))}function Pb(e){return PS.some(t=>t.hasNotificationMethod(e))}function P$(e){return"tasks/get"===e||"tasks/cancel"===e}let PS=[R1,Ph];var Pk=(e=>{let t={};for(var r in e)S$(t,r,{get:e[r],enumerable:!0});return t})({AnnotationsSchema:()=>kV,AudioContentSchema:()=>k4,BaseMetadataSchema:()=>kt,BaseRequestParamsSchema:()=>SG,BlobResourceContentsSchema:()=>kR,BooleanSchemaSchema:()=>wq,CallToolRequestParamsSchema:()=>wd,CallToolRequestSchema:()=>wc,CallToolResultSchema:()=>wa,CancelTaskRequestSchema:()=>Ro,CancelTaskResultSchema:()=>Rn,CancelledNotificationParamsSchema:()=>S5,CancelledNotificationSchema:()=>S8,ClientCapabilitiesSchema:()=>ks,ClientNotificationSchema:()=>Rs,ClientRequestSchema:()=>Ra,ClientResultSchema:()=>Rd,ClientTasksCapabilitySchema:()=>kn,CompatibilityCallToolResultSchema:()=>ws,CompleteRequestParamsSchema:()=>wJ,CompleteRequestSchema:()=>wZ,CompleteResultSchema:()=>wQ,ContentBlockSchema:()=>k5,CreateMessageRequestParamsSchema:()=>ww,CreateMessageRequestSchema:()=>wR,CreateMessageResultSchema:()=>wP,CreateMessageResultWithToolsSchema:()=>wV,CreateTaskResultSchema:()=>w3,CursorSchema:()=>SF,DiscoverRequestSchema:()=>km,DiscoverResultSchema:()=>kf,ElicitRequestFormParamsSchema:()=>wz,ElicitRequestParamsSchema:()=>wF,ElicitRequestSchema:()=>wL,ElicitRequestURLParamsSchema:()=>wD,ElicitResultSchema:()=>wG,ElicitationCompleteNotificationParamsSchema:()=>wU,ElicitationCompleteNotificationSchema:()=>wH,EmbeddedResourceSchema:()=>k3,EmptyResultSchema:()=>S9,EnumSchemaSchema:()=>wW,GetPromptRequestParamsSchema:()=>kY,GetPromptRequestSchema:()=>k1,GetPromptResultSchema:()=>k7,GetTaskPayloadRequestSchema:()=>Re,GetTaskPayloadResultSchema:()=>Rt,GetTaskRequestSchema:()=>w8,GetTaskResultSchema:()=>w7,IconSchema:()=>S7,IconsSchema:()=>ke,ImageContentSchema:()=>k2,ImplementationSchema:()=>kr,InitializeRequestParamsSchema:()=>kd,InitializeRequestSchema:()=>kc,InitializeResultSchema:()=>kp,InitializedNotificationSchema:()=>ku,JSONArraySchema:()=>Sz,JSONObjectSchema:()=>SN,JSONRPCErrorResponseSchema:()=>S4,JSONRPCMessageSchema:()=>S6,JSONRPCNotificationSchema:()=>S0,JSONRPCRequestSchema:()=>S1,JSONRPCResponseSchema:()=>S3,JSONRPCResultResponseSchema:()=>S2,JSONValueSchema:()=>SW,LegacyTitledEnumSchemaSchema:()=>wT,ListChangedOptionsBaseSchema:()=>wp,ListPromptsRequestSchema:()=>kQ,ListPromptsResultSchema:()=>kX,ListResourceTemplatesRequestSchema:()=>kC,ListResourceTemplatesResultSchema:()=>kT,ListResourcesRequestSchema:()=>kx,ListResourcesResultSchema:()=>kj,ListRootsRequestSchema:()=>wY,ListRootsResultSchema:()=>w1,ListTasksRequestSchema:()=>Rr,ListTasksResultSchema:()=>Ri,ListToolsRequestSchema:()=>wo,ListToolsResultSchema:()=>wn,LoggingLevelSchema:()=>wu,LoggingMessageNotificationParamsSchema:()=>wh,LoggingMessageNotificationSchema:()=>wy,ModelHintSchema:()=>wg,ModelPreferencesSchema:()=>w_,MultiSelectEnumSchemaSchema:()=>wM,NotificationSchema:()=>SZ,NotificationsParamsSchema:()=>SJ,NumberSchemaSchema:()=>wx,PaginatedRequestParamsSchema:()=>kv,PaginatedRequestSchema:()=>kb,PaginatedResultSchema:()=>k$,PingRequestSchema:()=>kh,PrimitiveSchemaDefinitionSchema:()=>wN,ProgressNotificationParamsSchema:()=>kg,ProgressNotificationSchema:()=>k_,ProgressSchema:()=>ky,ProgressTokenSchema:()=>SD,PromptArgumentSchema:()=>kJ,PromptListChangedNotificationSchema:()=>we,PromptMessageSchema:()=>k8,PromptReferenceSchema:()=>wK,PromptSchema:()=>kZ,ReadResourceRequestParamsSchema:()=>kO,ReadResourceRequestSchema:()=>kE,ReadResourceResultSchema:()=>kA,RelatedTaskMetadataSchema:()=>SU,RequestIdSchema:()=>SY,RequestMetaSchema:()=>SH,RequestSchema:()=>SK,ResourceContentsSchema:()=>kS,ResourceLinkSchema:()=>k9,ResourceListChangedNotificationSchema:()=>kM,ResourceRequestParamsSchema:()=>kO,ResourceSchema:()=>kq,ResourceTemplateReferenceSchema:()=>wB,ResourceTemplateSchema:()=>kI,ResourceUpdatedNotificationParamsSchema:()=>kB,ResourceUpdatedNotificationSchema:()=>kK,ResultMetaObjectSchema:()=>SQ,ResultSchema:()=>SX,RoleSchema:()=>kP,RootSchema:()=>wX,RootsListChangedNotificationSchema:()=>w0,SamplingContentSchema:()=>w$,SamplingMessageContentBlockSchema:()=>wS,SamplingMessageSchema:()=>wk,ServerCapabilitiesSchema:()=>kl,ServerNotificationSchema:()=>Rl,ServerRequestSchema:()=>Rc,ServerResultSchema:()=>Rp,ServerTasksCapabilitySchema:()=>ka,SetLevelRequestParamsSchema:()=>wm,SetLevelRequestSchema:()=>wf,SingleSelectEnumSchemaSchema:()=>wO,StringSchemaSchema:()=>wI,SubscribeRequestParamsSchema:()=>kO,SubscribeRequestSchema:()=>kW,SubscriptionFilterSchema:()=>kz,SubscriptionsAcknowledgedNotificationParamsSchema:()=>kL,SubscriptionsAcknowledgedNotificationSchema:()=>kU,SubscriptionsListenRequestParamsSchema:()=>kD,SubscriptionsListenRequestSchema:()=>kF,SubscriptionsListenResultMetaSchema:()=>kH,SubscriptionsListenResultSchema:()=>kG,TaskAugmentedRequestParamsSchema:()=>SB,TaskCreationParamsSchema:()=>w2,TaskMetadataSchema:()=>SL,TaskSchema:()=>w6,TaskStatusNotificationParamsSchema:()=>w9,TaskStatusNotificationSchema:()=>w5,TaskStatusSchema:()=>w4,TextContentSchema:()=>k0,TextResourceContentsSchema:()=>kk,TitledMultiSelectEnumSchemaSchema:()=>wA,TitledSingleSelectEnumSchemaSchema:()=>wC,ToolAnnotationsSchema:()=>wt,ToolChoiceSchema:()=>wv,ToolExecutionSchema:()=>wr,ToolListChangedNotificationSchema:()=>wl,ToolResultContentSchema:()=>wb,ToolSchema:()=>wi,ToolUseContentSchema:()=>k6,UnsubscribeRequestParamsSchema:()=>kO,UnsubscribeRequestSchema:()=>kN,UntitledMultiSelectEnumSchemaSchema:()=>wE,UntitledSingleSelectEnumSchemaSchema:()=>wj});let Pw=e=>"object"==typeof e&&null!==e&&!Array.isArray(e)&&"input_required"===e.resultType,PR="x-mcp-header",PP=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/,PV=new Set(["string","integer","boolean","number"]);function Pq(e){let t=[],r=new Map,i=(e,o,n)=>{if(null===e||"object"!=typeof e)return;if(PR in e){if(!n||0===o.length)return`${Pj(o)}: x-mcp-header is only permitted on properties statically reachable via a chain of 'properties' keys (not under items, additionalProperties, oneOf/anyOf/allOf/not, if/then/else, or $ref)`;let i=e[PR];if("string"!=typeof i||0===i.length)return`${Pj(o)}: x-mcp-header MUST be a non-empty string`;if(!PP.test(i))return`${Pj(o)}: x-mcp-header '${i}' is not a valid RFC 9110 token (no spaces, control characters or HTTP delimiters)`;let a="string"==typeof e.type?e.type:void 0;if(void 0===a||!PV.has(a))return`${Pj(o)}: x-mcp-header is only permitted on primitive-typed properties (string, integer, boolean); got ${a??""}`;let s=i.toLowerCase(),d=r.get(s);if(void 0!==d)return`x-mcp-header '${i}' is not case-insensitively unique (also declared as '${d}')`;r.set(s,i),t.push({path:o,headerName:i,type:a})}let a=e.properties;if(null!==a&&"object"==typeof a)for(let[e,t]of Object.entries(a)){let r=i(t,[...o,e],n);if(void 0!==r)return r}for(let t of PI){let r=e[t];if(void 0!==r)for(let e of Array.isArray(r)?r:null!==r&&"object"==typeof r&&Px.has(t)?Object.values(r):[r]){let r=i(e,[...o,`<${t}>`],!1);if(void 0!==r)return r}}},o=i(e,[],!0);return void 0===o?{valid:!0,declarations:t}:{valid:!1,reason:o}}let PI=["items","prefixItems","contains","additionalProperties","unevaluatedProperties","unevaluatedItems","propertyNames","patternProperties","dependentSchemas","oneOf","anyOf","allOf","not","if","then","else","$defs","definitions"],Px=new Set(["patternProperties","dependentSchemas","$defs","definitions"]);function Pj(e){return 0===e.length?"":e.join(".")}let PC="=?base64?";function PT(e){return new Set(e.flatMap(e=>Object.keys(e.shape)))}function PO(e){if(null==e)return!1;let t=typeof e;return("object"===t||"function"===t)&&"~standard"in e&&"function"==typeof e["~standard"]?.validate}R9.InvalidRequest,R9.UnsupportedProtocolVersion,R9.InvalidParams,R9.MethodNotFound,R9.InvalidParams,R9.MissingRequiredClientCapability,R9.ParseError,R9.InvalidRequest,R9.MethodNotFound,R9.UnsupportedProtocolVersion,R9.MissingRequiredClientCapability;let PE=!1,PA="draft-2020-12";async function PM(e,t){let r=await e["~standard"].validate(t);return r.issues&&r.issues.length>0?{success:!1,error:r.issues.map(e=>e.path?.length?`${e.path.map(e=>String("object"==typeof e?e.key:e)).join(".")}: ${e.message}`:e.message).join(", ")}:{success:!0,data:r.value}}let PW=/\\\.\\d\{(\d+)\}/;function PN(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}let Pz=new Set(["$comment","deprecated","description","examples","readOnly","title","writeOnly"]);function PD(e){return Pz.has(e)||e.startsWith("x-")}let PF=new Set(["$schema",...Object.keys(wz.shape.requestedSchema.shape)]),PL={string:PT([wI,wj,wC,wT]),number:PT([wx]),integer:PT([wx]),boolean:PT([wq]),array:PT([wE,wA])},PU=new Set(wI.shape.format.unwrap().options);Object.assign(function(e){let t=void 0!==e.inputRequests&&Object.keys(e.inputRequests).length>0,r="string"==typeof e.requestState;if(!t&&!r)throw TypeError("inputRequired() requires at least one of inputRequests (with at least one entry) or requestState (spec: every InputRequiredResult MUST include at least one of the two)");return{resultType:"input_required",...void 0!==e.inputRequests&&{inputRequests:e.inputRequests},...void 0!==e.requestState&&{requestState:e.requestState}}},{elicit(e){try{return{method:"elicitation/create",params:function(e){var t;if(!PO(e.requestedSchema))return{...e,mode:"form",requestedSchema:e.requestedSchema};let r=e.requestedSchema["~standard"].vendor,i=function(e,t){let r={},i=[];for(let[o,n]of Object.entries(e))"properties"===o&&PN(n)?r[o]=Object.fromEntries(Object.entries(n).map(([e,r])=>[e,function(e,t,r,i){if(!PN(e))return e;let o="string"==typeof e.type&&Object.hasOwn(PL,e.type)?PL[e.type]:void 0;if(void 0===o)return e;let n={};for(let[s,d]of Object.entries(e))if(o.has(s)||PD(s))n[s]=d;else if("pattern"===s&&"string"===e.type&&"string"==typeof e.format)if(PU.has(e.format)){var a;"string"==typeof d&&(a=e.format,"zod"!==r||(function(e,t){let r;switch(e){case"email":r=[iw(nn,void 0)];break;case"uri":r=[iR(nd,void 0)];break;case"date":r=[iV(nr,void 0)];break;case"date-time":let i,o;i=PW.exec(t),o=[void 0,-1,0],i&&o.push(Number(i[1])),r=[!1,!0].flatMap(e=>[!1,!0].flatMap(t=>o.map(r=>ac({local:e,offset:t,precision:r}))))}return new Set(r.map(e=>{let t;return t=ox(e,{target:PA,io:"input"}),"string"==typeof t.pattern?t.pattern:void 0}).filter(e=>void 0!==e))})(a,d).has(d))||i.push(`${t}.${s}`)}else n[s]=d;else i.push(`${t}.${s}`);return n}(r,`properties.${e}`,t,i)])):PF.has(o)?r[o]=n:PD(o)||i.push(o);if(i.length>0)throw new R5(R9.InvalidParams,`Elicitation requestedSchema contains unsupported JSON Schema constraint(s) after Standard Schema conversion: ${i.join(", ")}`);return r}(function(e){try{return function(e,t="input"){let r,i=e["~standard"];if(i.jsonSchema)r=i.jsonSchema[t]({target:PA});else if("zod"===i.vendor){if(!("_zod"in e))throw Error("Schema appears to be from zod 3, which the SDK cannot convert to JSON Schema. Upgrade to zod >=4.2.0, or wrap your JSON Schema with fromJsonSchema().");PE||(PE=!0,console.warn("[mcp-sdk] Your zod version does not implement `~standard.jsonSchema` (added in zod 4.2.0). Falling back to z.toJSONSchema(). Upgrade to zod >=4.2.0 to silence this warning.")),r=ox(e,{target:PA,io:t})}else throw Error(`Schema library "${i.vendor}" does not implement StandardJSONSchemaV1 (\`~standard.jsonSchema\`). Upgrade to a version that does, or wrap your JSON Schema with fromJsonSchema().`);if("output"===t)return void 0!==r.type||!function e(t){if("properties"in t||"patternProperties"in t||"additionalProperties"in t||"required"in t)return!0;for(let r of["oneOf","anyOf","allOf"]){let i=t[r];if(Array.isArray(i)&&i.length>0)return i.every(t=>null!==t&&"object"==typeof t&&("object"===t.type||e(t)))}return!1}(r)?r:{type:"object",...r};if(void 0!==r.type&&"object"!==r.type)throw Error(`MCP tool and prompt schemas must describe objects (got type: ${JSON.stringify(r.type)}). Wrap your schema in z.object({...}) or equivalent.`);return{type:"object",...r}}(e,"input")}catch(t){let e=t instanceof Error?t.message:String(t);throw new R5(R9.InvalidParams,`Elicitation requestedSchema must describe an object with flat primitive properties: ${e}`)}}(e.requestedSchema),r),o=(t=wz.shape.requestedSchema,oJ(t,i));if(!o.success)throw new R5(R9.InvalidParams,`Elicitation requestedSchema only supports flat primitive properties (string, number, integer, boolean, and string enums): ${function(e,t){if(!PN(e.properties))return t;let r=Object.entries(e.properties).filter(([,e])=>!oJ(wN,e).success).map(([e])=>`properties.${e}`);return r.length>0?r.join(", "):t}(i,o.error.message)}`);let n=function e(t,r,i=""){return Array.isArray(t)&&Array.isArray(r)?t.flatMap((t,o)=>e(t,r[o],`${i}[${o}]`)):PN(t)&&PN(r)?Object.entries(t).flatMap(([t,o])=>{let n=i?`${i}.${t}`:t;return Object.prototype.hasOwnProperty.call(r,t)?e(o,r[t],n):PD(t)?[]:[n]}):[]}(i,o.data);if(n.length>0)throw new R5(R9.InvalidParams,`Elicitation requestedSchema contains unsupported JSON Schema constraint(s) after Standard Schema conversion: ${n.join(", ")}`);let a=(o.data.required??[]).filter(e=>!Object.prototype.hasOwnProperty.call(o.data.properties,e));if(a.length>0)throw new R5(R9.InvalidParams,`Elicitation requestedSchema lists required properties that are not defined in properties: ${a.join(", ")}`);return{...e,mode:"form",requestedSchema:o.data}}(e)}}catch(e){throw e instanceof R5?TypeError(e.message,{cause:e}):e}},elicitUrl:e=>({method:"elicitation/create",params:{...e,mode:"url"}}),createMessage:e=>({method:"sampling/createMessage",params:e}),listRoots:()=>({method:"roots/list"})});let PH={},PG={};function PB(e,t){let r=e.slice(0,-6);PH[r]=t,PG[r]=e=>t.safeParse(e).success}for(let e of["AnnotationsSchema","AudioContentSchema","BaseMetadataSchema","BlobResourceContentsSchema","BooleanSchemaSchema","CallToolRequestSchema","CallToolRequestParamsSchema","CallToolResultSchema","CancelledNotificationSchema","CancelledNotificationParamsSchema","CancelTaskRequestSchema","CancelTaskResultSchema","ClientCapabilitiesSchema","ClientNotificationSchema","ClientRequestSchema","ClientResultSchema","CompatibilityCallToolResultSchema","CompleteRequestSchema","CompleteRequestParamsSchema","CompleteResultSchema","ContentBlockSchema","CreateMessageRequestSchema","CreateMessageRequestParamsSchema","CreateMessageResultSchema","CreateMessageResultWithToolsSchema","CreateTaskResultSchema","CursorSchema","DiscoverRequestSchema","DiscoverResultSchema","ElicitationCompleteNotificationSchema","ElicitationCompleteNotificationParamsSchema","ElicitRequestSchema","ElicitRequestFormParamsSchema","ElicitRequestParamsSchema","ElicitRequestURLParamsSchema","ElicitResultSchema","EmbeddedResourceSchema","EmptyResultSchema","EnumSchemaSchema","GetPromptRequestSchema","GetPromptRequestParamsSchema","GetPromptResultSchema","GetTaskPayloadRequestSchema","GetTaskPayloadResultSchema","GetTaskRequestSchema","GetTaskResultSchema","IconSchema","IconsSchema","ImageContentSchema","ImplementationSchema","InitializedNotificationSchema","InitializeRequestSchema","InitializeRequestParamsSchema","InitializeResultSchema","JSONArraySchema","JSONObjectSchema","JSONRPCErrorResponseSchema","JSONRPCMessageSchema","JSONRPCNotificationSchema","JSONRPCRequestSchema","JSONRPCResponseSchema","JSONRPCResultResponseSchema","JSONValueSchema","LegacyTitledEnumSchemaSchema","ListPromptsRequestSchema","ListPromptsResultSchema","ListResourcesRequestSchema","ListResourcesResultSchema","ListResourceTemplatesRequestSchema","ListResourceTemplatesResultSchema","ListRootsRequestSchema","ListRootsResultSchema","ListTasksRequestSchema","ListTasksResultSchema","ListToolsRequestSchema","ListToolsResultSchema","LoggingLevelSchema","LoggingMessageNotificationSchema","LoggingMessageNotificationParamsSchema","ModelHintSchema","ModelPreferencesSchema","MultiSelectEnumSchemaSchema","NotificationSchema","NumberSchemaSchema","PaginatedRequestSchema","PaginatedRequestParamsSchema","PaginatedResultSchema","PingRequestSchema","PrimitiveSchemaDefinitionSchema","ProgressSchema","ProgressNotificationSchema","ProgressNotificationParamsSchema","ProgressTokenSchema","PromptSchema","PromptArgumentSchema","PromptListChangedNotificationSchema","PromptMessageSchema","PromptReferenceSchema","ReadResourceRequestSchema","ReadResourceRequestParamsSchema","ReadResourceResultSchema","RelatedTaskMetadataSchema","RequestSchema","RequestIdSchema","RequestMetaSchema","ResourceSchema","ResourceContentsSchema","ResourceLinkSchema","ResourceListChangedNotificationSchema","ResourceRequestParamsSchema","ResourceTemplateSchema","ResourceTemplateReferenceSchema","ResourceUpdatedNotificationSchema","ResourceUpdatedNotificationParamsSchema","ResultMetaObjectSchema","ResultSchema","RoleSchema","RootSchema","RootsListChangedNotificationSchema","SamplingContentSchema","SamplingMessageSchema","SamplingMessageContentBlockSchema","ServerCapabilitiesSchema","ServerNotificationSchema","ServerRequestSchema","ServerResultSchema","SetLevelRequestSchema","SetLevelRequestParamsSchema","SingleSelectEnumSchemaSchema","StringSchemaSchema","SubscribeRequestSchema","SubscribeRequestParamsSchema","SubscriptionFilterSchema","SubscriptionsAcknowledgedNotificationSchema","SubscriptionsAcknowledgedNotificationParamsSchema","SubscriptionsListenRequestSchema","SubscriptionsListenRequestParamsSchema","SubscriptionsListenResultSchema","SubscriptionsListenResultMetaSchema","TaskAugmentedRequestParamsSchema","TaskCreationParamsSchema","TaskMetadataSchema","TaskSchema","TaskStatusSchema","TaskStatusNotificationSchema","TaskStatusNotificationParamsSchema","TextContentSchema","TextResourceContentsSchema","TitledMultiSelectEnumSchemaSchema","TitledSingleSelectEnumSchemaSchema","ToolSchema","ToolAnnotationsSchema","ToolChoiceSchema","ToolExecutionSchema","ToolListChangedNotificationSchema","ToolResultContentSchema","ToolUseContentSchema","UnsubscribeRequestSchema","UnsubscribeRequestParamsSchema","UntitledMultiSelectEnumSchemaSchema","UntitledSingleSelectEnumSchemaSchema"])PB(e,Pk[e]);for(let[e,t]of Object.entries({IdJagTokenExchangeResponseSchema:R_,OAuthClientInformationFullSchema:Rk,OAuthClientInformationSchema:RS,OAuthClientMetadataSchema:R$,OAuthClientRegistrationErrorSchema:Rw,OAuthErrorResponseSchema:Rv,OAuthMetadataSchema:Rf,OAuthProtectedResourceMetadataSchema:Rm,OAuthTokenRevocationRequestSchema:RR,OAuthTokensSchema:Rg,OpenIdProviderDiscoveryMetadataSchema:Ry,OpenIdProviderMetadataSchema:Rh}))PB(e,t);Object.freeze(PH);let PK=Object.freeze(PG),PJ=[SC,ST,SE,SM],PZ=["inputResponses","requestState"];function PQ(e,t){let r=e.params;if(!P0(r))return{message:e,lifted:{}};let i=r._meta,o=P0(i)?PJ.filter(e=>e in i):[],n="request"===t?PZ.filter(e=>e in r):[];if(0===o.length&&0===n.length)return{message:e,lifted:{}};let a={},s={...r};if(o.length>0&&P0(i)){let e={},t={...i};for(let r of o)e[r]=i[r],delete t[r];a.envelope=e,Object.keys(t).length>0?s._meta=t:delete s._meta}for(let e of n)"inputResponses"===e&&(a.inputResponses=s[e]),"requestState"===e&&(a.requestState=s[e]),delete s[e];return{message:{...e,params:s},lifted:a}}function PX(e,t){let r=e.validateResult(t,void 0);if(r.ok||"not-in-era"!==r.reason)return{"~standard":{version:1,vendor:"mcp-wire-codec",validate(r){let i=e.validateResult(t,r);return i.ok?{value:i.value}:{issues:[{message:"invalid"===i.reason?i.message:`not-in-era: ${t}`}]}}}}}let PY=(ee=void 0,()=>ee);var P1=class{_transport;_requestMessageId=0;_requestHandlers=new Map;_customSchemaRequestMethods=new Set;_requestHandlerAbortControllers=new Map;_notificationHandlers=new Map;_responseHandlers=new Map;_progressHandlers=new Map;_timeoutInfo=new Map;_pendingDebouncedNotifications=new Set;_negotiatedProtocolVersion;_supportedProtocolVersions;onclose;onerror;fallbackRequestHandler;fallbackNotificationHandler;constructor(e){this._options=e,this._supportedProtocolVersions=e?.supportedProtocolVersions??Sj,this.setNotificationHandler("notifications/cancelled",e=>{this._oncancel(e)}),this.setNotificationHandler("notifications/progress",e=>{this._onprogress(e)}),this.setRequestHandler("ping",e=>({}))}_shouldDropInbound(e){}_outboundMetaEnvelope(){}_envelopeOutbound(e){let t=this._outboundMetaEnvelope();if(void 0===t)return e;let r=e.params??{};return{...e,params:{...r,_meta:{...t,...r._meta}}}}_resolveNonCompleteResult(e,t){return Promise.reject(new Rx(RI.UnsupportedResultType,`Unsupported result type '${e.kind}' for ${t.request.method}`,{resultType:e.kind,method:t.request.method}))}_getRequestHandler(e){return this._requestHandlers.get(e)}async _oncancel(e){void 0!==e.params.requestId&&this._requestHandlerAbortControllers.get(e.params.requestId)?.abort(e.params.reason)}_setupTimeout(e,t,r,i,o=!1){this._timeoutInfo.set(e,{timeoutId:setTimeout(i,t),startTime:Date.now(),timeout:t,maxTotalTimeout:r,resetTimeoutOnProgress:o,onTimeout:i})}_resetTimeout(e){let t=this._timeoutInfo.get(e);if(!t)return!1;let r=Date.now()-t.startTime;if(t.maxTotalTimeout&&r>=t.maxTotalTimeout)throw this._timeoutInfo.delete(e),new Rx(RI.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:t.maxTotalTimeout,totalElapsed:r});return clearTimeout(t.timeoutId),t.timeoutId=setTimeout(t.onTimeout,t.timeout),!0}_cleanupTimeout(e){let t=this._timeoutInfo.get(e);t&&(clearTimeout(t.timeoutId),this._timeoutInfo.delete(e))}async connect(e){this._transport=e;let t=this.transport?.onclose;this._transport.onclose=()=>{try{t?.()}finally{this._onclose()}};let r=this.transport?.onerror;this._transport.onerror=e=>{r?.(e),this._onerror(e)};let i=this._transport?.onmessage;this._transport.onmessage=(e,t)=>{if(i?.(e,t),S2.safeParse(e).success||S4.safeParse(e).success)this._onresponse(e);else if(S1.safeParse(e).success)this._onrequest(e,t);else S0.safeParse(e).success?this._onnotification(e,t):this._onerror(Error(`Unknown message type: ${JSON.stringify(e)}`))},e.setSupportedProtocolVersions?.(this._supportedProtocolVersions),await this._transport.start()}_onclose(){let e=this._responseHandlers;for(let e of(this._responseHandlers=new Map,this._progressHandlers.clear(),this._pendingDebouncedNotifications.clear(),this._timeoutInfo.values()))clearTimeout(e.timeoutId);this._timeoutInfo.clear();let t=this._requestHandlerAbortControllers;this._requestHandlerAbortControllers=new Map;let r=new Rx(RI.ConnectionClosed,"Connection closed");this._transport=void 0;try{this.onclose?.()}finally{for(let t of e.values())t(r);for(let e of t.values())e.abort(r)}}_onerror(e){this.onerror?.(e)}_onnotification(e,t){let{message:r}=PQ(e,"notification"),i=this._negotiatedWireCodec();if(t?.classification===void 0&&"drop"===this._shouldDropInbound(e))return;if(t?.classification!==void 0){let e=P_(t.classification);if(e!==i.era)return void this._onerror(Error(`Era mismatch on inbound notification '${r.method}': classified as ${e} but this instance serves ${i.era}`))}if(Pb(r.method)&&!i.hasNotificationMethod(r.method))return;let o=this._notificationHandlers.get(r.method),n=this.fallbackNotificationHandler;(void 0!==o||void 0!==n)&&Promise.resolve().then(()=>void 0===o?n(r):o(r,i)).catch(e=>this._onerror(Error(`Uncaught error in notification handler: ${e}`)))}_onrequest(e,t){var r;let{message:i,lifted:o}=PQ(e,"request"),n=this._negotiatedWireCodec();if(t?.classification===void 0&&"drop"===this._shouldDropInbound(e))return void this._onerror(Error(`Dropped inbound request '${e.method}': not servable on this connection's protocol era`));let a=this._transport,s=(e,t,r)=>{let o={jsonrpc:"2.0",id:i.id,error:{code:e,message:t,...void 0!==r&&{data:r}}};a?.send(o).catch(e=>this._onerror(Error(`Failed to send an error response: ${e}`)))};if(t?.classification!==void 0){let e=P_(t.classification);if(e!==n.era){this._onerror(Error(`Era mismatch on inbound request '${i.method}': classified as ${e} but this instance serves ${n.era}`));let r=t.classification.revision??e;s(R9.UnsupportedProtocolVersion,`Unsupported protocol version: ${r}`,{supported:this._supportedProtocolVersions,requested:r});return}}if(Pv(i.method)&&!n.hasRequestMethod(i.method)&&!(P$(i.method)&&this._customSchemaRequestMethods.has(i.method)))return void s(R9.MethodNotFound,"Method not found");let d=this._requestHandlers.get(i.method)??this.fallbackRequestHandler;if(void 0===d)return void s(R9.MethodNotFound,"Method not found");let c=n.checkInboundEnvelope(o);if(void 0!==c)return void s(R9.InvalidParams,c);let l=(e,t)=>this._notificationViaCodec(this._resolveOutboundCodec(e.method),e,{...t,relatedRequestId:i.id}),p=(e,t,r)=>this._requestWithSchemaViaCodec(this._resolveOutboundCodec(e.method),e,t,{...r,relatedRequestId:i.id}),u=new AbortController;this._requestHandlerAbortControllers.set(i.id,u);let m=void 0===o.inputResponses?void 0:function(e){let t={},r=[];if(!P2(e))return{accepted:t,droppedKeys:r};for(let[i,o]of Object.entries(e)){if(!P2(o)||"method"in o||"result"in o){r.push(i);continue}t[i]=o}return{accepted:t,droppedKeys:r}}(o.inputResponses),f={sessionId:a?.sessionId,mcpReq:{id:i.id,method:i.method,_meta:i.params?._meta,...void 0!==o.envelope&&{envelope:o.envelope},...void 0!==m&&{inputResponses:m.accepted},...void 0!==m&&m.droppedKeys.length>0&&{droppedInputResponseKeys:m.droppedKeys},requestState:void 0===o.requestState?PY:(r=o.requestState,()=>r),signal:u.signal,send:(e,t,r)=>{let i=this._resolveOutboundCodec(e.method);if(this._assertOutboundRequestInEra(i,e.method),PO(t))return p(e,t,r);let o=PX(i,e.method);if(void 0===o)throw TypeError(`'${e.method}' is not a spec method; pass a result schema as the second argument to ctx.mcpReq.send().`);return p(e,o,t)},notify:l},http:t?.authInfo?{authInfo:t.authInfo}:void 0},h=this.buildContext(f,t);Promise.resolve().then(()=>d(i,h)).then(async e=>{let t;if(u.signal.aborted)return;try{t=n.encodeResult(i.method,e,this._outboundServerInfo())}catch(e){this._onerror(Error(`Failed to encode result for ${i.method}: ${e}`)),s(R9.InternalError,"Internal error");return}let r={result:t,jsonrpc:"2.0",id:i.id};await a?.send(r)},async e=>{if(u.signal.aborted)return;let t=Number.isSafeInteger(e.code)?e.code:R9.InternalError,r={jsonrpc:"2.0",id:i.id,error:{code:n.encodeErrorCode(t),message:e.message??"Internal error",...void 0!==e.data&&{data:e.data}}};await a?.send(r)}).catch(e=>this._onerror(Error(`Failed to send response: ${e}`))).finally(()=>{this._requestHandlerAbortControllers.get(i.id)===u&&this._requestHandlerAbortControllers.delete(i.id)})}_onprogress(e){let{progressToken:t,...r}=e.params,i=Number(t),o=this._progressHandlers.get(i);if(!o)return void this._onerror(Error(`Received a progress notification for an unknown token: ${JSON.stringify(e)}`));let n=this._responseHandlers.get(i),a=this._timeoutInfo.get(i);if(a&&n&&a.resetTimeoutOnProgress)try{this._resetTimeout(i)}catch(e){this._responseHandlers.delete(i),this._progressHandlers.delete(i),this._cleanupTimeout(i),n(e);return}o(r)}_onresponse(e){let t=Number(e.id),r=this._responseHandlers.get(t);void 0===r?this._onerror(Error(`Received a response for an unknown message ID: ${JSON.stringify(e)}`)):(this._responseHandlers.delete(t),this._cleanupTimeout(t),this._progressHandlers.delete(t),r(S2.safeParse(e).success?e:R5.fromError(e.error.code,e.error.message,e.error.data)))}get transport(){return this._transport}async close(){await this._transport?.close()}request(e,t,r){let i=this._resolveOutboundCodec(e.method);if(PO(t))return P$(e.method)||this._assertOutboundRequestInEra(i,e.method),this._requestWithSchemaViaCodec(i,e,t,r);this._assertOutboundRequestInEra(i,e.method);let o=PX(i,e.method);if(void 0===o)throw TypeError(`'${e.method}' is not a spec method; pass a result schema as the second argument to request().`);return this._requestWithSchemaViaCodec(i,e,o,t)}_negotiatedWireCodec(){return Pg(this._negotiatedProtocolVersion)}_wireCodec(){return this._negotiatedWireCodec()}_resolveOutboundCodec(e){if(void 0===this._negotiatedProtocolVersion){let t=function(e){switch(e){case"initialize":case"notifications/initialized":return Pg(void 0);case"server/discover":return Pg(Py);default:return}}(e);if(t)return t}return this._negotiatedWireCodec()}_assertOutboundRequestInEra(e,t){if(Pv(t)&&!e.hasRequestMethod(t))throw new Rx(RI.MethodNotSupportedByProtocolVersion,`Method '${t}' is not supported by the negotiated protocol version (wire era ${e.era})`,{method:t,era:e.era})}_requestWithSchema(e,t,r){let i=this._resolveOutboundCodec(e.method);return this._assertOutboundRequestInEra(i,e.method),this._requestWithSchemaViaCodec(i,e,t,r)}_requestWithSchemaViaCodec(e,t,r,i){let o,n,{relatedRequestId:a,resumptionToken:s,onresumptiontoken:d,headers:c}=i??{},l=Date.now();return new Promise((p,u)=>{let m=e=>{u(e)};if(!this._transport)return void m(Error("Not connected"));if(this._options?.enforceStrictCapabilities===!0)try{this.assertCapabilityForMethod(t.method)}catch(e){m(e);return}if(i?.signal?.aborted){let e=i.signal.reason;throw e instanceof Rx?e:new Rx(RI.RequestTimeout,String(e))}let f=e.era===Py&&!0===this._transport.hasPerRequestStream?new AbortController:void 0,h=this._requestMessageId++;n=h;let y={...t,jsonrpc:"2.0",id:h};i?.onprogress&&(this._progressHandlers.set(h,i.onprogress),y.params={...t.params,_meta:{...t.params?._meta,progressToken:h}});let g=this._envelopeOutbound(y),_=!1,v=e=>{_||(this._progressHandlers.delete(h),void 0===f?"initialize"!==t.method&&this._transport?.send(this._envelopeOutbound({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:h,reason:String(e)}}),{relatedRequestId:a,resumptionToken:s,onresumptiontoken:d}).catch(e=>this._onerror(Error(`Failed to send cancellation: ${e}`))):f.abort(),u(e instanceof Rx?e:new Rx(RI.RequestTimeout,String(e))))};this._responseHandlers.set(h,o=>{let n;if(!i?.signal?.aborted){if(_=!0,o instanceof Error)return u(o);try{n=e.decodeResult(t.method,o.result)}catch(e){return u(e instanceof Error?e:Error(String(e)))}if("invalid"===n.kind)return u(n.error);if("input_required"===n.kind){var a;return i?.allowInputRequired===!0?p({resultType:"input_required",inputRequests:(a=n).inputRequests,...void 0!==a.requestState&&{requestState:a.requestState},...void 0!==a._meta&&{_meta:a._meta}}):p(this._resolveNonCompleteResult(n,{codec:e,request:t,resultSchema:r,options:i,flowStartedAt:l,retry:(i,o)=>this._requestWithSchemaViaCodec(e,void 0===i?{method:t.method}:{method:t.method,params:i},r,o)}))}PM(r,n.result).then(e=>{e.success?p(e.data):u(new Rx(RI.InvalidResult,`Invalid result for ${t.method}: ${e.error}`))},u)}}),o=()=>v(i?.signal?.reason),i?.signal?.addEventListener("abort",o,{once:!0});let b=i?.timeout??6e4;this._setupTimeout(h,b,i?.maxTotalTimeout,()=>v(new Rx(RI.RequestTimeout,"Request timed out",{timeout:b})),i?.resetTimeoutOnProgress??!1),this._transport.send(g,{relatedRequestId:a,resumptionToken:s,onresumptiontoken:d,headers:c,requestSignal:f?.signal}).catch(e=>{this._progressHandlers.delete(h),u(e)})}).finally(()=>{o&&i?.signal?.removeEventListener("abort",o),void 0!==n&&(this._responseHandlers.delete(n),this._cleanupTimeout(n))})}async notification(e,t){return await this._notificationViaCodec(this._resolveOutboundCodec(e.method),e,t)}async _notificationViaCodec(e,t,r){if(!this._transport)throw new Rx(RI.NotConnected,"Not connected");if(Pb(t.method)&&!e.hasNotificationMethod(t.method))throw new Rx(RI.MethodNotSupportedByProtocolVersion,`Notification '${t.method}' is not supported by the negotiated protocol version (wire era ${e.era})`,{method:t.method,era:e.era});this.assertNotificationCapability(t.method);let i=this._envelopeOutbound({jsonrpc:"2.0",...t});if((this._options?.debouncedNotificationMethods??[]).includes(t.method)&&!t.params&&r?.relatedRequestId===void 0){if(this._pendingDebouncedNotifications.has(t.method))return;this._pendingDebouncedNotifications.add(t.method),Promise.resolve().then(()=>{this._pendingDebouncedNotifications.delete(t.method),this._transport&&this._transport?.send(i,r).catch(e=>this._onerror(e))});return}await this._transport.send(i,r)}setRequestHandler(e,t,r){let i;if(this.assertRequestHandlerCapability(e),"function"==typeof t){if(!Pv(e))throw TypeError(`'${e}' is not a spec request method; pass schemas as the second argument to setRequestHandler().`);i=(r,i)=>{let o=this._negotiatedWireCodec(),n=o.validateRequest(e,r);if(n.ok||"not-in-era"!==n.reason||(n=o.validateInputRequest(e,r)),!n.ok){if("not-in-era"===n.reason)throw new R5(R9.InternalError,`No wire schema for ${e} in the resolved era`);throw Error(n.message)}return Promise.resolve(t(n.value,i))}}else if(r)i=async(i,o)=>{let n=await PM(t.params,{...i.params});if(!n.success)throw new R5(R9.InvalidParams,`Invalid params for ${e}: ${n.error}`);return r(n.data,o)};else throw TypeError("setRequestHandler: handler is required");"function"==typeof t?this._customSchemaRequestMethods.delete(e):this._customSchemaRequestMethods.add(e),this._requestHandlers.set(e,this._wrapHandler(e,i))}_wrapHandler(e,t){return t}_outboundServerInfo(){}removeRequestHandler(e){this._requestHandlers.delete(e),this._customSchemaRequestMethods.delete(e)}assertCanSetRequestHandler(e){if(this._requestHandlers.has(e))throw Error(`A request handler for ${e} already exists, which would be overridden`)}setNotificationHandler(e,t,r){if("function"==typeof t){if(!Pb(e))throw TypeError(`'${e}' is not a spec notification method; pass schemas as the second argument to setNotificationHandler().`);this._notificationHandlers.set(e,(r,i)=>{let o=i.validateNotification(e,r);if(!o.ok){if("not-in-era"===o.reason)throw new R5(R9.InternalError,`No wire schema for ${e} in the resolved era`);throw Error(o.message)}return Promise.resolve(t(o.value))});return}if(!r)throw TypeError("setNotificationHandler: handler is required");this._notificationHandlers.set(e,async i=>{let o=await PM(t.params,{...i.params});if(!o.success)throw new R5(R9.InvalidParams,`Invalid params for notification ${e}: ${o.error}`);await r(o.data,i)})}removeNotificationHandler(e){this._notificationHandlers.delete(e)}};function P0(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)}function P2(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}function P4(e){throw new Rx(RI.SendFailed,`ctx.mcpReq.${e} is not available while fulfilling an embedded input request: the request is fulfilled locally and has no related peer request`)}(SP(e=>{var t=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,r=/\\([\u000b\u0020-\u00ff])/g,i=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;function o(e){this.parameters=Object.create(null),this.type=e}e.parse=function(e){if(!e)throw TypeError("argument string is required");var n,a,s,d="object"==typeof e?function(e){var t;if("function"==typeof e.getHeader?t=e.getHeader("content-type"):"object"==typeof e.headers&&(t=e.headers&&e.headers["content-type"]),"string"!=typeof t)throw TypeError("content-type header is missing from object");return t}(e):e;if("string"!=typeof d)throw TypeError("argument string is required to be a string");var c=d.indexOf(";"),l=-1!==c?d.slice(0,c).trim():d.trim();if(!i.test(l))throw TypeError("invalid media type");var p=new o(l.toLowerCase());if(-1!==c){for(t.lastIndex=c;a=t.exec(d);){if(a.index!==c)throw TypeError("invalid parameter format");c+=a[0].length,n=a[1].toLowerCase(),34===(s=a[2]).charCodeAt(0)&&-1!==(s=s.slice(1,-1)).indexOf("\\")&&(s=s.replace(r,"$1")),p.parameters[n]=s}if(c!==d.length)throw TypeError("invalid parameter format")}return p}}))();var P6=class{_buffer;_maxBufferSize;constructor(e){this._maxBufferSize=e?.maxBufferSize??0xa00000}append(e){if((this._buffer?.length??0)+e.length>this._maxBufferSize)throw this.clear(),Error(`ReadBuffer exceeded maximum size of ${this._maxBufferSize} bytes`);this._buffer=this._buffer?Buffer.concat([this._buffer,e]):e}readMessage(){for(;this._buffer;){let t=this._buffer.indexOf("\n");if(-1===t)break;let r=this._buffer.toString("utf8",0,t).replace(/\r$/,"");this._buffer=this._buffer.subarray(t+1);try{var e;return e=r,S6.parse(JSON.parse(e))}catch(e){if(e instanceof SyntaxError)continue;throw e}}return null}clear(){this._buffer=void 0}};let P3=el("../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/index.js"),P9="win32"===W.platform?["APPDATA","COMSPEC","HOMEDRIVE","HOMEPATH","LOCALAPPDATA","PATH","PATHEXT","PROCESSOR_ARCHITECTURE","PROGRAMDATA","PROGRAMFILES","PROGRAMFILES(X86)","PROGRAMW6432","SYSTEMDRIVE","SYSTEMROOT","TEMP","USERNAME","USERPROFILE","WINDIR"]:["HOME","LOGNAME","PATH","SHELL","TERM","USER"];var P5=class{_process;_readBuffer;_serverParams;_stderrStream=null;onclose;onerror;onmessage;constructor(e){this._serverParams=e,this._readBuffer=new P6({maxBufferSize:e.maxBufferSize}),("pipe"===e.stderr||"overlapped"===e.stderr)&&(this._stderrStream=new H)}async start(){if(this._process)throw Error("StdioClientTransport already started! If using Client class, note that connect() calls start() automatically.");return new Promise((e,t)=>{this._process=P3(this._serverParams.command,this._serverParams.args??[],{env:{...function(){let e={};for(let t of P9){let r=W.env[t];void 0!==r&&(r.startsWith("()")||(e[t]=r))}return e}(),...this._serverParams.env},stdio:["pipe","pipe",this._serverParams.stderr??"inherit"],shell:!1,windowsHide:"win32"===W.platform,cwd:this._serverParams.cwd}),this._process.on("error",e=>{t(e),this.onerror?.(e)}),this._process.on("spawn",()=>{e()}),this._process.on("close",e=>{this._process=void 0,this.onclose?.()}),this._process.stdin?.on("error",e=>{this.onerror?.(e)}),this._process.stdout?.on("data",e=>{try{this._readBuffer.append(e),this.processReadBuffer()}catch(e){this.onerror?.(e),this.close().catch(()=>{})}}),this._process.stdout?.on("error",e=>{this.onerror?.(e)}),this._stderrStream&&this._process.stderr&&this._process.stderr.pipe(this._stderrStream)})}get stderr(){return this._stderrStream?this._stderrStream:this._process?.stderr??null}get pid(){return this._process?.pid??null}processReadBuffer(){for(;;)try{let e=this._readBuffer.readMessage();if(null===e)break;this.onmessage?.(e)}catch(e){this.onerror?.(e)}}async _dispose(){let e=this._process;if(this._process=void 0,e&&null===e.exitCode&&null===e.signalCode){let t=new Promise(t=>e.once("exit",()=>t()));try{e.stdin?.end()}catch{}try{e.kill("SIGTERM")}catch{}if(await Promise.race([t,new Promise(e=>setTimeout(e,1e3).unref())]),null===e.exitCode&&null===e.signalCode)try{e.kill("SIGKILL")}catch{}await t}try{e?.stdout?.destroy()}catch{}try{e?.stdin?.destroy()}catch{}try{e?.stderr?.destroy()}catch{}this._readBuffer.clear()}async close(){if(this._process){let e=this._process;this._process=void 0;let t=new Promise(t=>{e.once("close",()=>{t()})});try{e.stdin?.end()}catch{}if(await Promise.race([t,new Promise(e=>setTimeout(e,2e3).unref())]),null===e.exitCode){try{e.kill("SIGTERM")}catch{}await Promise.race([t,new Promise(e=>setTimeout(e,2e3).unref())])}if(null===e.exitCode)try{e.kill("SIGKILL")}catch{}}this._readBuffer.clear()}send(e){return new Promise(t=>{if(!this._process?.stdin)throw new Rx(RI.NotConnected,"Not connected");let r=JSON.stringify(e)+"\n";this._process.stdin.write(r)?t():this._process.stdin.once("drain",t)})}};let P8=new TextEncoder,P7=new TextDecoder,Ve=new TextDecoder("utf-8",{fatal:!0});function Vt(...e){let t=new Uint8Array(e.reduce((e,{length:t})=>e+t,0)),r=0;for(let i of e)t.set(i,r),r+=i.length;return t}function Vr(e,t,r){if(t<0||t>=0x100000000)throw RangeError(`value must be >= 0 and <= 4294967295. Received ${t}`);e.set([t>>>24,t>>>16,t>>>8,255&t],r)}function Vi(e){let t=Math.floor(e/0x100000000),r=new Uint8Array(8);return Vr(r,t,0),Vr(r,e%0x100000000,4),r}function Vo(e){let t=new Uint8Array(4);return Vr(t,e),t}let Vn=/[^\x00-\x7f]/;function Va(e){if("string"==typeof e&&e.length>=128){if(Vn.test(e))throw TypeError("non-ASCII string encountered in encode()");return P8.encode(e)}let t=new Uint8Array(e.length);for(let r=0;r127)throw TypeError("non-ASCII string encountered in encode()");t[r]=i}return t}function Vs(e,t=!1){if(Uint8Array.prototype.toBase64)return e.toBase64({alphabet:t?"base64url":"base64",omitPadding:t});let r=[];for(let t=0;t"string"!=typeof e)))throw TypeError(`"${e}" option must be an array of strings`);return void 0===t?void 0:new Set(t)}function VW(e,t){let{crit:r}=t??{};if(Array.isArray(r)&&new Set(r).size!==r.length)throw new e('"crit" (Critical) Header Parameter MUST NOT contain duplicate values')}function VN(e,t,r,i,o){if(void 0!==o.crit&&i?.crit===void 0)throw new e('"crit" (Critical) Header Parameter MUST be integrity protected');if(!i||void 0===i.crit)return[];if(!Array.isArray(i.crit)||0===i.crit.length||i.crit.some(e=>"string"!=typeof e||0===e.length))throw new e('"crit" (Critical) Header Parameter MUST be an array of non-empty strings when present');let n=void 0===r?t:{__proto__:null,...r,...t};for(let t of i.crit){if(!(t in n))throw new Vf(`Extension Header Parameter "${t}" is not recognized`);if(!Object.hasOwn(o,t)||void 0===o[t])throw new e(`Extension Header Parameter "${t}" is missing`);if(n[t]&&(!Object.hasOwn(i,t)||void 0===i[t]))throw new e(`Extension Header Parameter "${t}" MUST be integrity protected`)}return i.crit}function Vz(e,t){if(t.includes("b64")){let t=e.b64;if("boolean"!=typeof t)throw new Vg('The "b64" (base64url-encode payload) Header Parameter must be a boolean');return t}return!0}function VD(e,t){let r,i;try{r=JSON.stringify(t),i=JSON.parse(r)}catch(t){throw new e("JOSE Header is not valid JSON",{cause:t})}if(!Vq(i))throw new e("JOSE Header is not a JSON object");return[i,r]}async function VF(e,t,r){let i,o,{alg:n,secret:a}=e,s="decrypt"===r||"sign"===r;if(a&&t instanceof Uint8Array)return t;if(Vq(t)){if("string"!=typeof(i=V2(t)).kty)throw VZ(n,t,a);if(!(a?"oct"===i.kty&&"string"==typeof i.k:"oct"!==i.kty&&(s?"AKP"===i.kty&&"string"==typeof i.priv||"string"==typeof i.d:void 0===i.d&&void 0===i.priv)))throw TypeError(a?'JSON Web Key for symmetric algorithms must have JWK "kty" (Key Type) equal to "oct" and the JWK "k" (Key Value) present':`JSON Web Key for this operation must be a ${s?"private":"public"} JWK`);if(((e,t,r)=>{let{alg:i}=e;if(void 0!==t.use){let e="sign"===r||"verify"===r?"sig":"enc";if(t.use!==e)throw TypeError(`Invalid key for this operation, its "use" must be "${e}" when present`)}if(void 0!==t.alg&&t.alg!==i)throw TypeError(`Invalid key for this operation, its "alg" must be "${i}" when present`);if(Array.isArray(t.key_ops)){let i="encrypt"===r||"decrypt"===r?e.ops?.[+("encrypt"!==r)]:r;if(i&&!t.key_ops.includes(i))throw TypeError(`Invalid key for this operation, its "key_ops" must include "${i}" when present`)}})(e,i,r),"oct"===i.kty)return VR(i.k);if(!Object.isFrozen(t)){let{key_ops:e}=t;Array.isArray(e)&&Object.freeze(e),Object.freeze(t)}}else{if(!VB(t))throw VZ(n,t,a);let e=a?"secret":s?"private":"public";if(t.type!==e&&(a||["secret","public","private"].includes(t.type)))throw TypeError(`${t[Symbol.toStringTag]} instances must be of type "${e}" for the ${n} algorithm`);if(VH(t))return t;if("secret"===(o=t).type)return o.export()}let d=(m||=new WeakMap).get(t);if(d?.[n])return d[n];if(d||m.set(t,d={}),o&&"function"==typeof o.toCryptoKey){let t="public"===o.type,r=VL[o.asymmetricKeyDetails?.namedCurve],i=e.resolve?.({crv:r,asymmetricKeyType:o.asymmetricKeyType})??e.subtle;return d[n]=o.toCryptoKey(i,t,e.usages[+!t])}return(i??=o.export({format:"jwk"})).alg=n,d[n]=await V6(e,i)}let VL={__proto__:null,prime256v1:"P-256",secp384r1:"P-384",secp521r1:"P-521"};function VU(e){if(!VH(e))throw Error("CryptoKey instance expected")}let VH=e=>{if(e?.[Symbol.toStringTag]==="CryptoKey")return!0;try{return e instanceof CryptoKey}catch{return!1}},VG=e=>e?.[Symbol.toStringTag]==="KeyObject",VB=e=>VH(e)||VG(e);function VK(e,t,...r){if(r.length>2){let t=r.pop();e+=`one of type ${r.join(", ")}, or ${t}.`}else 2===r.length?e+=`one of type ${r[0]} or ${r[1]}.`:e+=`of type ${r[0]}.`;return null==t?e+=` Received ${t}`:"function"==typeof t&&t.name?e+=` Received function ${t.name}`:"object"==typeof t&&null!=t&&t.constructor?.name&&(e+=` Received an instance of ${t.constructor.name}`),e}let VJ=(e,...t)=>VK("Key must be ",e,...t);function VZ(e,t,r){let i=["CryptoKey","KeyObject","JSON Web Key"];return r&&i.push("Uint8Array"),TypeError(VK(`Key for the ${e} algorithm must be `,t,...i))}let VQ=(e,t="algorithm.name")=>TypeError(`CryptoKey does not support this operation, its ${t} must be ${e}`);function VX(e,t){if(t&&!e.usages.includes(t))throw TypeError(`CryptoKey does not support this operation, its usages must include ${t}.`)}function VY(e,t){let{modulusLength:r}=t.algorithm;if("number"!=typeof r||r<2048)throw TypeError(`${e} requires key modulusLength to be 2048 bits or larger`)}function V1(e,t,r){let i=e.algorithm;if(i.name!==t.name)throw VQ(t.name);if(t.hash&&i.hash?.name!==t.hash)throw VQ(t.hash,"algorithm.hash");if(t.namedCurve&&i.namedCurve!==t.namedCurve)throw VQ(t.namedCurve,"algorithm.namedCurve");if(void 0!==t.length&&i.length!==t.length)throw VQ(t.length,"algorithm.length");VX(e,r)}function V0(e){return{__proto__:null,...e}}function V2(e){let t=V0(e);if(void 0!==t.ext&&"boolean"!=typeof t.ext)throw TypeError('"ext" (Extractable) Parameter must be a boolean');if(void 0!==t.key_ops){let e=t.key_ops,r=Array.isArray(e)?[...e]:void 0;if(!r||r.some(e=>"string"!=typeof e)||new Set(r).size!==r.length)throw TypeError('"key_ops" (Key Operations) Parameter must be an array of unique strings');t.key_ops=r}return t}function V4(e){if(void 0!==e&&"boolean"!=typeof e)throw TypeError('"extractable" option must be a boolean');return e}async function V6(e,t,r){if(!e.kty.includes(t.kty))throw new Vf('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');let i=e.resolve?.({kty:t.kty,crv:t.crv})??e.subtle,o=!!(t.d||t.priv),n={...t,ext:r??t.ext};return"AKP"!==n.kty&&delete n.alg,delete n.use,crypto.subtle.importKey("jwk",n,i,n.ext??!o,t.key_ops??e.usages[+!!o])}async function V3(e,t,r,i=!1){return e instanceof Uint8Array&&(e=await crypto.subtle.importKey("raw",e,t,i,[r])),V1(e,t,r),e}let V9=e=>crypto.getRandomValues(new Uint8Array(e.cekBits>>3));function V5(e,t){let r=e.byteLength<<3;if(r!==t)throw new Vy(`Invalid Content Encryption Key length. Expected ${t} bits, got ${r} bits`)}function V8(e,t){if(t.length<<3!==e.ivBits)throw new Vy("Invalid Initialization Vector length")}async function V7(e,t,r){if(!(t instanceof Uint8Array))throw TypeError(VJ(t,"Uint8Array"));let i=e.cekBits>>1;return[await crypto.subtle.importKey("raw",t.subarray(i>>3),"AES-CBC",!1,[r]),await crypto.subtle.importKey("raw",t.subarray(0,i>>3),{hash:`SHA-${i<<1}`,name:"HMAC"},!1,["sign"]),i]}async function qe(e,t,r){return new Uint8Array((await crypto.subtle.sign("HMAC",e,t)).slice(0,r>>3))}async function qt(e,t,r,i,o){if(!VH(r)&&!(r instanceof Uint8Array))throw TypeError(VJ(r,"CryptoKey","KeyObject","Uint8Array","JSON Web Key"));if(i?V8(e,i):i=crypto.getRandomValues(new Uint8Array(e.ivBits>>3)),r instanceof Uint8Array&&V5(r,e.cekBits),e.cbc)return async function(e,t,r,i,o){let[n,a,s]=await V7(e,r,"encrypt"),d=new Uint8Array(await crypto.subtle.encrypt({iv:i,name:"AES-CBC"},n,t)),c=Vt(o,i,d,Vi(8*o.length));return{ciphertext:d,tag:await qe(a,c,s),iv:i}}(e,t,r,i,o);let n=await V3(r,e.subtle,"encrypt"),a=new Uint8Array(await crypto.subtle.encrypt({additionalData:o,iv:i,name:"AES-GCM",tagLength:128},n,t));return{ciphertext:a.subarray(0,-16),tag:a.subarray(-16),iv:i}}async function qr(e,t,r,i,o,n){if(!VH(t)&&!(t instanceof Uint8Array))throw TypeError(VJ(t,"CryptoKey","KeyObject","Uint8Array","JSON Web Key"));if(!i)throw new Vy("JWE Initialization Vector missing");if(!o)throw new Vy("JWE Authentication Tag missing");if(!e.cbc&&16!==o.length)throw new Vy("Invalid Authentication Tag length");if(V8(e,i),t instanceof Uint8Array&&V5(t,e.cekBits),e.cbc)return async function(e,t,r,i,o,n){let[a,s,d]=await V7(e,t,"decrypt"),c=Vt(n,i,r,Vi(8*n.length)),l=await qe(s,c,d);try{if(await async function(e,t){let r={name:"HMAC",hash:"SHA-256"},i=await crypto.subtle.generateKey(r,!1,["sign","verify"]),o=await crypto.subtle.sign(r,i,e);return crypto.subtle.verify(r,i,o,t)}(o,l))return new Uint8Array(await crypto.subtle.decrypt({iv:i,name:"AES-CBC"},a,r))}catch{}throw new Vh}(e,t,r,i,o,n);let a=await V3(t,e.subtle,"decrypt");try{return new Uint8Array(await crypto.subtle.decrypt({additionalData:n,iv:i,name:"AES-GCM",tagLength:128},a,Vt(r,o)))}catch{throw new Vh}}function qi(e){let t={__proto__:null};for(let r in e)t[r]={...e[r],alg:r};return t}let qo=[["encrypt","wrapKey"],["decrypt","unwrapKey"]],qn=[[],["deriveBits"]],qa=[[],[]];function qs(e){return{kty:["RSA"],mode:"key-encryption",subtle:{name:"RSA-OAEP",hash:`SHA-${e}`},usages:qo,ops:["wrapKey","unwrapKey"]}}function qd(e){return{kty:["EC","OKP"],mode:e,subtle:{name:"ECDH"},resolve:({kty:e,crv:t,asymmetricKeyType:r})=>{if("X25519"===t||"x25519"===r)return{name:"X25519"};if("OKP"===e)throw new Vf('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');return{name:"ECDH",namedCurve:t}},usages:qn,ops:[void 0,"deriveBits"]}}function qc(e,t=!1){return{kty:["oct"],mode:"key-wrapping",secret:!0,subtle:{name:t?"AES-GCM":"AES-KW",length:e},usages:qa,ops:t?["encrypt","decrypt"]:["wrapKey","unwrapKey"]}}function ql(){return{kty:["oct"],mode:"key-wrapping",secret:!0,subtle:{name:"PBKDF2"},usages:qa,ops:["deriveBits","deriveBits"]}}let qp=qi({dir:{kty:["oct"],mode:"direct-encryption",secret:!0,subtle:{name:"AES-GCM"},usages:qa,ops:["encrypt","decrypt"]},"RSA-OAEP":qs(1),"RSA-OAEP-256":qs(256),"RSA-OAEP-384":qs(384),"RSA-OAEP-512":qs(512),"ECDH-ES":qd("direct-key-agreement"),"ECDH-ES+A128KW":qd("key-agreement-with-key-wrapping"),"ECDH-ES+A192KW":qd("key-agreement-with-key-wrapping"),"ECDH-ES+A256KW":qd("key-agreement-with-key-wrapping"),A128KW:qc(128),A192KW:qc(192),A256KW:qc(256),A128GCMKW:qc(128,!0),A192GCMKW:qc(192,!0),A256GCMKW:qc(256,!0),"PBES2-HS256+A128KW":ql(),"PBES2-HS384+A192KW":ql(),"PBES2-HS512+A256KW":ql()}),qu=["encrypt","decrypt"];function qm(e,t=!1){return{kty:["oct"],secret:!0,subtle:{name:t?"AES-CBC":"AES-GCM",length:e},usages:qa,ops:qu,cekBits:e,ivBits:t?128:96,cbc:t}}let qf=qi({A128GCM:qm(128),A192GCM:qm(192),A256GCM:qm(256),"A128CBC-HS256":qm(256,!0),"A192CBC-HS384":qm(384,!0),"A256CBC-HS512":qm(512,!0)});function qh(e,t){throw new Vf(`Invalid or unsupported "${e}" (JWE ${t}) header value`)}function qy(e){return("string"==typeof e?qp[e]:void 0)??qh("alg","Algorithm")}function qg(e){return"key-wrapping"===e.mode||"key-encryption"===e.mode||"key-agreement-with-key-wrapping"===e.mode}function q_(e){return("string"==typeof e?qf[e]:void 0)??qh("enc","Encryption Algorithm")}function qv(e,t){if("ECDH"!==e.algorithm.name&&"X25519"!==e.algorithm.name)throw TypeError("CryptoKey does not support this operation, its algorithm.name must be ECDH or X25519");VX(e,t)}function qb(e,t,r){V1(t,qy(e).subtle,r),VY(e,t)}async function q$(e,t,r,i){if(!(e instanceof Uint8Array)||e.length<8)throw new Vy("PBES2 Salt Input must be 8 or more octets");if(!Number.isSafeInteger(r)||1!==Math.sign(r))throw new Vy("PBES2 Count Input must be a positive integer");let o=Vt(Va(t),Uint8Array.of(0),e),n=parseInt(t.slice(13,16),10),a={hash:`SHA-${t.slice(8,11)}`,iterations:r,name:"PBKDF2",salt:o},s=await V3(i,qy(t).subtle,"deriveBits");return new Uint8Array(await crypto.subtle.deriveBits(a,s,n))}function qS(e){return Vt(Vo(e.length),e)}async function qk(e,t,r,i,o=new Uint8Array,n=new Uint8Array){qv(e),qv(t,"deriveBits");let a=Vt(qS(Va(r)),qS(o),qS(n),Vo(i));return async function(e,t,r){let i=t>>3,o=Math.ceil(i/32),n=new Uint8Array(32*o);for(let t=1;t<=o;t++){let i=await Vc("sha256",Vt(Vo(t),e,r));n.set(i,(t-1)*32)}return n.slice(0,i)}(new Uint8Array(await crypto.subtle.deriveBits({name:e.algorithm.name,public:e},t,"X25519"===e.algorithm.name?256:Math.ceil(parseInt(e.algorithm.namedCurve.slice(-3),10)/8)<<3)),i,a)}function qw(e){VU(e);let t=e.algorithm.namedCurve;if("P-256"!==t&&"P-384"!==t&&"P-521"!==t&&"X25519"!==e.algorithm.name)throw new Vf("ECDH with the provided key is not allowed or not supported by your javascript runtime")}function qR(e,t){let r=e[t];if(void 0!==r){if("string"!=typeof r)throw new Vy(`JOSE Header "${t}" (Agreement Party${"apu"===t?"U":"V"}Info) invalid`);return VC(r,t,Vy)}}function qP(e,t){if(void 0!==e&&void 0!==t&&e.byteLength===t.byteLength){for(let r=0;r"u")throw new Vf(`JWE "zip" (Compression Algorithm) Header Parameter requires the ${e} API.`)}async function qj(e,t,r=1/0){let i=e.writable.getWriter();i.write(t).catch(()=>{}),i.close().catch(()=>{});let o=[],n=0,a=e.readable.getReader();for(;;){let{value:e,done:t}=await a.read();if(t)break;if(o.push(e),n+=e.byteLength,1/0!==r&&n>r)throw new Vy("Decompressed plaintext exceeded the configured limit")}return Vt(...o)}function qC(e){let{aad:t,ciphertext:r,iv:i,protected:o,tag:n,unprotected:a}=e;if(void 0!==i&&("string"!=typeof i||!i))throw new Vy("JWE Initialization Vector incorrect type");if("string"!=typeof r)throw new Vy("JWE Ciphertext missing or incorrect type");if(void 0!==n&&("string"!=typeof n||!n))throw new Vy("JWE Authentication Tag incorrect type");if(void 0!==o&&"string"!=typeof o)throw new Vy("JWE Protected Header incorrect type");if(void 0!==t&&("string"!=typeof t||!t))throw new Vy("JWE AAD incorrect type");if(void 0!==a&&!Vq(a))throw new Vy("JWE Shared Unprotected Header incorrect type");return{aad:t,ciphertext:r,iv:i,protected:o,tag:n,unprotected:void 0===a?void 0:{...a}}}function qT(e){let t,r;try{let{header:i}=e;if(Vq(i)){r=i.alg;let e=Object.keys(i);e.includes("alg")||(r=void 0),t=Object.fromEntries(e.map(e=>[e,"alg"===e?r:i[e]]))}else t=i;let{encrypted_key:o}=e;return[{encrypted_key:o,header:t},r]}catch(e){return[void 0,r,e]}}function qO(e){let{encrypted_key:t,header:r}=e;if(void 0!==t&&"string"!=typeof t)throw new Vy("JWE Encrypted Key incorrect type");if(void 0!==r&&!Vq(r))throw new Vy("JWE Per-Recipient Unprotected Header incorrect type");if(void 0===e.protected&&void 0===r&&void 0===e.unprotected)throw new Vy("JOSE Header missing")}function qE(e){let t,{protected:r,ciphertext:i,iv:o,tag:n,aad:a}=e;return void 0!==r&&(t=VO(r,Vy,"JWE Protected Header is invalid")),[t,VC(i,"ciphertext",Vy),void 0!==o?VC(o,"iv",Vy):void 0,void 0!==n?VC(n,"tag",Vy):void 0,VT((r??"")+(void 0!==a?`.${a}`:""),"aad",Vy)]}function qA(e){return[e&&VM("keyManagementAlgorithms",e.keyManagementAlgorithms),e&&VM("contentEncryptionAlgorithms",e.contentEncryptionAlgorithms),e?.crit,e?.maxPBES2Count,e?.maxDecompressedLength]}async function qM(e,t,r,i=qE(e)){let o,n,a,s,[d,c,l,p,u]=i,{header:m,unprotected:f,aad:h}=e;if(void 0!==m||void 0!==f){if(!Vx(d,m,f))throw new Vy("JWE Protected, JWE Unprotected Header, and JWE Per-Recipient Unprotected Header Parameter names must be disjoint");o={...d,...m,...f}}else o=d??{};let[y,g,_,v,b]=t,{encrypted_key:$}=e;VN(Vy,VA,_,d,o),qI(o,d);let{alg:S,enc:k}=o;if("string"!=typeof S||!S)throw new Vy("missing JWE Algorithm (alg) in JWE Header");let w=qp[S];if(""===$&&(!w||!qg(w)))throw new Vy("JWE Encrypted Key incorrect type");let R=w?.mode==="integrated-encryption";if(!R&&("string"!=typeof k||!k))throw new Vy("missing JWE Encryption Algorithm (enc) in JWE Header");if(y&&!y.has(S)||!y&&S.startsWith("PBES2"))throw new Vm('"alg" (Algorithm) Header Parameter value not allowed');if(R){if(void 0!==k)throw new Vy('JWE "enc" (Encryption Algorithm) Header Parameter must not be present for integrated encryption');if(l?.byteLength)throw new Vy("JWE Initialization Vector must be empty for integrated encryption");if(p?.byteLength)throw new Vy("JWE Authentication Tag must be empty for integrated encryption")}else{if(g&&!g.has(k))throw new Vm('"enc" (Encryption Algorithm) Header Parameter value not allowed');n=q_(k)}if(void 0!==$)try{a=VC($,"encrypted_key",Vy)}catch(e){if(!w||!qg(w))throw e;a=new Uint8Array}let P=!1;"function"==typeof r&&(r=await r(d,e),P=!0);let V=w??qy(S);qg(V)&&void 0===a&&(a=new Uint8Array);let q=await VF("direct-encryption"===V.mode?n:V,r,"decrypt");if("integrated-encryption"===V.mode)s=await V.decrypt(q,a,c,u,d,o);else{let e,t=n;try{e=await async function(e,t,r,i,o,n){let{alg:a}=e,s=e.mode;if("direct-encryption"===s)return qV(i),r;let d="direct-key-agreement"===s;switch(d?qV(i):function(e){if(void 0===e)throw new Vy("JWE Encrypted Key missing")}(i),e.subtle.name){case"ECDH":{let{epk:i}=o;if(!Vq(i)||["d","k","p","q","dp","dq","qi","oth","priv"].some(e=>Object.hasOwn(i,e)))throw new Vy('JOSE Header "epk" (Ephemeral Public Key) missing or invalid');qw(r);let n=await V6(e,i),s=qR(o,"apu"),c=qR(o,"apv");qP(s,c);let l=await qk(n,r,d?t.alg:a,d?t.cekBits:parseInt(a.slice(-5,-2),10),s,c);if(d)return l;r=l;break}case"RSA-OAEP":return VU(r),qb(a,r,"decrypt"),new Uint8Array(await crypto.subtle.decrypt("RSA-OAEP",r,i));case"PBKDF2":{if("number"!=typeof o.p2c)throw new Vy('JOSE Header "p2c" (PBES2 Count) missing or invalid');if(void 0!==n&&1/0!==n&&(!Number.isSafeInteger(n)||n<1))throw TypeError("maxPBES2Count must be a positive safe integer or Infinity");if(o.p2c>(n??1e4))throw new Vy('JOSE Header "p2c" (PBES2 Count) out is of acceptable bounds');if("string"!=typeof o.p2s)throw new Vy('JOSE Header "p2s" (PBES2 Salt) missing or invalid');let e=VC(o.p2s,"p2s",Vy);r=await q$(e,a,o.p2c,r);break}case"AES-GCM":{if("string"!=typeof o.iv)throw new Vy('JOSE Header "iv" (Initialization Vector) missing or invalid');if("string"!=typeof o.tag)throw new Vy('JOSE Header "tag" (Authentication Tag) missing or invalid');let e=VC(o.iv,"iv",Vy),t=VC(o.tag,"tag",Vy);if(12!==e.byteLength)throw new Vy("Invalid Initialization Vector length");if(16!==t.byteLength)throw new Vy("Invalid Authentication Tag length");return qr(q_(a.slice(0,-2)),r,i,e,t,new Uint8Array)}}return async function(e,t,r){let i=await V3(t,qy(e).subtle,"unwrapKey",!0),o=await crypto.subtle.unwrapKey("raw",r,i,"AES-KW",{hash:"SHA-256",name:"HMAC"},!0,["sign"]);return new Uint8Array(await crypto.subtle.exportKey("raw",o))}(a.slice(-6),r,i)}(V,t,q,a,o,v),qg(V)&&e instanceof Uint8Array&&e.byteLength<<3!==t.cekBits&&(e=V9(t))}catch(r){if(r instanceof TypeError||r instanceof Vy||r instanceof Vf)throw r;e=V9(t)}s=await qr(t,e,c,l,p,u)}if("DEF"===o.zip){let e=b??25e4;if(0===e)throw new Vf('JWE "zip" (Compression Algorithm) Header Parameter is not supported.');if(1/0!==e&&(!Number.isSafeInteger(e)||e<1))throw TypeError("maxDecompressedLength must be 0, a positive safe integer, or Infinity");s=await (async function(e,t){return qx("DecompressionStream"),qj(new DecompressionStream("deflate-raw"),e,t)})(s,e).catch(e=>{throw e instanceof Vy?e:new Vy("Failed to decompress plaintext",{cause:e})})}return{plaintext:s,...d&&{protectedHeader:d},...void 0!==h&&{additionalAuthenticatedData:VC(h,"aad",Vy)},...f&&{sharedUnprotectedHeader:f},...m&&{unprotectedHeader:m},...P&&{key:q}}}async function qW(e,t,r){if(e instanceof Uint8Array&&(e=P7.decode(e)),"string"!=typeof e)throw new Vy("Compact JWE must be a string or Uint8Array");let{0:i,1:o,2:n,3:a,4:s,length:d}=e.split(".");if(5!==d)throw new Vy("Invalid Compact JWE");return qM({ciphertext:a,iv:n||void 0,protected:i,tag:s||void 0,encrypted_key:o||void 0},t,r)}async function qN(e,t,r){return qW(e,qA(r),t)}async function qz(e,t,r){if(!Vq(e))throw new Vy("Flattened JWE must be an object");let i=qC(e),[o,,n]=qT(e);if(!o)throw n;let a={...i,...o};return qO(a),qM(a,qA(r),t)}async function qD(e,t,r){let i,o,n;if(!Vq(e))throw new Vy("General JWE must be an object");let a=e.recipients;if(!Array.isArray(a))throw new Vy("JWE Recipients missing or incorrect type");let s=Array.from(a);if(!s.every(Vq))throw new Vy("JWE Recipients missing or incorrect type");if(!s.length)throw new Vy("JWE Recipients has no members");try{i=qA(r),o=qC(e),n=qE(o)}catch{throw new Vh}let d=s.map(e=>qT(e));if(s.length>1)for(let[,e]of d){let t=n[0]?.alg??e??o.unprotected?.alg,r="string"==typeof t?qp[t]:void 0;if(r&&!qg(r))throw new Vy(`"${t}" alg may only have a single recipient`)}for(let[e]of d)if(e)try{let r={...o,...e};return qO(r),await qM(r,i,t,n)}catch{}throw new Vh}function qF(e,t,r){if(!Vx(e,t,r))throw new Vy("JWE Protected, JWE Shared Unprotected and JWE Per-Recipient Header Parameter names must be disjoint")}function qL(e,t,r=!1){if(!e[1]&&!e[2]&&!e[3])throw new Vy("either setProtectedHeader, setUnprotectedHeader, or sharedUnprotectedHeader must be called before #encrypt()");void 0!==t&&(e[8]=t?.crit);let[,i,o,n,a,s,d,c,l]=e;if(void 0!==a&&VV(a,"JWE Additional Authenticated Data"),void 0!==s&&VV(s,"JWE Content Encryption Key"),void 0!==d&&VV(d,"JWE Initialization Vector"),r||void 0===i||(i=VD(Vy,i)[0],e[1]=i),void 0!==o&&(o=VD(Vy,o)[0],e[2]=o),r||void 0===n||(n=VD(Vy,n)[0],e[3]=n),void 0!==c&&!Vq(c))throw TypeError("JWE Key Management Parameters must be an object");qF(i,o,n);let p={...i,...o,...n};VW(Vy,i),VN(Vy,VA,l,i,p),qI(p,i);let{alg:u,enc:m}=p;if("string"!=typeof u||!u)throw new Vy('JWE "alg" (Algorithm) Header Parameter missing or invalid');let f=qp[u];if(f?.mode==="integrated-encryption"){if(void 0!==m)throw new Vy('JWE "enc" (Encryption Algorithm) Header Parameter must not be present for integrated encryption');if(void 0!==s)throw TypeError(`setContentEncryptionKey cannot be called with JWE "alg" (Algorithm) Header ${u}`);if(void 0!==d)throw TypeError(`setInitializationVector cannot be called with JWE "alg" (Algorithm) Header ${u}`);return[p,void 0,f]}if("string"!=typeof m||!m)throw new Vy('JWE "enc" (Encryption Algorithm) Header Parameter missing or invalid');return[p,q_(m),f]}async function qU(e,t,r){let i,o,n,a,s,d,[c,l,p]=t,[u,m,f,h,y,g,_,v,,b]=e,$=m,S=f,k=p??qy(c.alg);"integrated-encryption"===k.mode?n=await VF(k,r,"encrypt"):[n,i,o]=await qq(k,l,r,c,g,v),o&&(b?S=S?{...S,...o}:o:$=$?{...$,...o}:o,qF($,S,h));let w=$?VP(JSON.stringify($)):"",R=y?.byteLength?VP(y):void 0,P=Va(R?`${w}.${R}`:w),V=u;"DEF"===c.zip&&(V=await (async function(e){return qx("CompressionStream"),qj(new CompressionStream("deflate-raw"),e)})(V).catch(e=>{throw new Vy("Failed to compress plaintext",{cause:e})})),"integrated-encryption"===k.mode?[i,a]=await k.encrypt(n,V,P,$,c,v):{ciphertext:a,tag:s,iv:d}=await qt(l,V,n,_,P);let q={ciphertext:VP(a)};return d&&(q.iv=VP(d)),s&&(q.tag=VP(s)),i?.byteLength&&(q.encrypted_key=VP(i)),R&&(q.aad=R),$&&(q.protected=w),h&&(q.unprotected=h),S&&(q.header=S),q}async function qH(e,t,r){return qU(e,qL(e,r),t)}function qG(e){return[e.protected,e.encrypted_key,e.iv,e.ciphertext,e.tag].join(".")}class qB{#n;state;constructor(e,t,r){this.#n=e,this.state=[void 0,void 0,t,r]}setUnprotectedHeader(e){return Vj(this.state[0],"setUnprotectedHeader"),this.state[0]=e,this}setKeyManagementParameters(e){return Vj(this.state[1],"setKeyManagementParameters"),this.state[1]=e,this}addRecipient(...e){return this.#n.addRecipient(...e)}encrypt(...e){return this.#n.encrypt(...e)}done(){return this.#n}}class qK{#a;#s=[];#d;#c;#l;constructor(e){this.#a=e}addRecipient(e,t){let r=new qB(this,e,t?.crit);return this.#s.push(r),r}setProtectedHeader(e){return Vj(this.#d,"setProtectedHeader"),this.#d=e,this}setSharedUnprotectedHeader(e){return Vj(this.#c,"setSharedUnprotectedHeader"),this.#c=e,this}setAdditionalAuthenticatedData(e){return this.#l=e,this}async encrypt(){if(!this.#s.length)throw new Vy("at least one recipient must be added");VV(this.#a,"plaintext");let e=this.#s.length>1,t,r=this.#d,i=this.#c,o=[];for(let n of this.#s){let[a,s,d,c]=n.state,l=[this.#a,r,a,i,this.#l,void 0,void 0,s,c,e],p=qL(l,void 0,o.length>0);o.length||(r=l[1],i=l[3]),o.push([l,p,d]);let[{alg:u,enc:m},,f]=p;if(e&&f&&!qg(f))throw new Vy(`"${u}" alg may only have a single recipient`);if(t){if(t!==m)throw new Vy('JWE "enc" (Encryption Algorithm) Header Parameter must be the same for all recipients')}else t=m}for(let[,e]of o)e[2]??=qy(e[0].alg);let[n,a,s]=o[0],d=e?V9(a[1]):void 0;n[5]=d;let{encrypted_key:c,header:l,...p}=await qU(n,a,s),u={...p,recipients:[{}]};c&&(u.recipients[0].encrypted_key=c),l&&(u.recipients[0].header=l);for(let e=1;e(function(e,t){try{let r=q4(e,[t]),i=q3(r.protected),{b64:o,crit:n}=i;return[r,i,Array.isArray(n)&&n.includes("b64")?"boolean"==typeof o?o?1:2:0:1]}catch{return}})(e,s)).filter(e=>void 0!==e),c=0;for(let[,,e]of d)if(3==(c|=e))throw new Vg("inconsistent use of JWS Unencoded Payload (RFC7797)");for(let e of d)try{let[r]=await q8(e[0],i,t,q9,e[1]);return r}catch{}throw new Vw}let Ii=e=>Math.floor(e.getTime()/1e3),Io={s:1,m:60,h:3600,d:86400,w:604800,y:0x1e187e0},In=/^(\+|\-)? ?(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)(?: (ago|from now))?$/i,Ia="check_failed";function Is(){throw TypeError("Invalid time period format")}function Id(e){"string"!=typeof e&&Is();let t=In.exec(e);(!t||t[4]&&t[1])&&Is();let r=Math.round(parseFloat(t[2])*Io[t[3][0].toLowerCase()]);return Number.isFinite(r)||Is(),"-"===t[1]||"ago"===t[4]?-r:r}function Ic(e,t){if(!Number.isFinite(t))throw TypeError(`Invalid ${e} input`);return t}function Il(e,t){if("string"!=typeof t)throw TypeError(`"${e}" claim must be a string`)}function Ip(e,t){return"number"==typeof e?Ic(t,e):e instanceof Date?Ic(t,Ii(e)):Ii(new Date)+Id(e)}let Iu=e=>{let t=e.toLowerCase();return e.includes("/")?t:`application/${t}`};function Im(e,t,r=!1){let i=e[t];if(!(void 0===i&&!r)){if("number"!=typeof i)throw new Vp(`"${t}" claim must be a number`,e,t,"invalid");return i}}function If(e,t){throw new Vp(`unexpected "${t}" claim value`,e,t,Ia)}function Ih(e,t,r={}){let i,o,n;try{i=JSON.parse(Ve.decode(t))}catch{}if(!Vq(i))throw new V_("JWT Claims Set must be a top-level JSON object");let{typ:a}=r;if(void 0!==a&&("string"!=typeof e.typ||Iu(e.typ)!==Iu(a)))throw new Vp('unexpected "typ" JWT header value',i,"typ",Ia);let{requiredClaims:s=[],issuer:d,subject:c,audience:l,maxTokenAge:p}=r,u=[...s];for(let e of(void 0!==p&&u.push("iat"),void 0!==l&&u.push("aud"),void 0!==c&&u.push("sub"),void 0!==d&&u.push("iss"),new Set(u.reverse())))if(!Object.hasOwn(i,e))throw new Vp(`missing required "${e}" claim`,i,e,"missing");void 0===d||(Array.isArray(d)?d:[d]).includes(i.iss)||If(i,"iss"),void 0!==c&&i.sub!==c&&If(i,"sub"),void 0===l||(o=i.aud,n="string"==typeof l?[l]:l,"string"==typeof o?n.includes(o):!!Array.isArray(o)&&n.some(e=>o.includes(e)))||If(i,"aud");let{clockTolerance:m}=r,f=0;if("string"==typeof m)f=Id(m);else if(void 0!==m){if("number"!=typeof m)throw TypeError("Invalid clockTolerance option type");f=m}Ic("clockTolerance option",f);let{currentDate:h}=r,y=Ic("currentDate option",Ii(void 0===h?new Date:h)),g=Im(i,"iat",void 0!==p),_=Im(i,"nbf");if(void 0!==_&&_>y+f)throw new Vp('"nbf" claim timestamp check failed',i,"nbf",Ia);let v=Im(i,"exp");if(void 0!==v&&v<=y-f)throw new Vu('"exp" claim timestamp check failed',i,"exp",Ia);if(void 0!==p){let e=y-g;if(e-f>Ic("maxTokenAge option","number"==typeof p?p:Id(p)))throw new Vu('"iat" claim timestamp check failed (too far in the past)',i,"iat",Ia);if(e<-f)throw new Vp('"iat" claim timestamp check failed (it should be in the past)',i,"iat",Ia)}return i}function Iy(e){return f.get(e)}function Ig(e){let t=Iy(e);for(let e of["iat","nbf","exp"]){let r=t[e];if("number"==typeof r&&!Number.isFinite(r))throw TypeError(`"${e}" claim must be a finite number`)}return P8.encode(JSON.stringify(t))}class I_{constructor(e={}){if(!Vq(e))throw TypeError("JWT Claims Set MUST be an object");(f||=new WeakMap).set(this,structuredClone(e))}setIssuer(e){return Il("iss",e),Iy(this).iss=e,this}setSubject(e){return Il("sub",e),Iy(this).sub=e,this}setAudience(e){return function(e){if("string"!=typeof e&&(!Array.isArray(e)||Array.from(e).some(e=>"string"!=typeof e)))throw TypeError('"aud" claim must be a string or an array of strings')}(e),Iy(this).aud=e,this}setJti(e){return Il("jti",e),Iy(this).jti=e,this}setNotBefore(e){return Iy(this).nbf=Ip(e,"setNotBefore"),this}setExpirationTime(e){return Iy(this).exp=Ip(e,"setExpirationTime"),this}setIssuedAt(e){let t=Iy(this);return void 0===e?t.iat=Ii(new Date):"string"==typeof e?t.iat=Ic("setIssuedAt",Ii(new Date)+Id(e)):t.iat=Ip(e,"setIssuedAt"),this}}async function Iv(e,t,r){let[i,o]=await q7(e,q6(r),t);if(!o)throw new V_("JWTs MUST NOT use unencoded payload");let n=Ih(i.protectedHeader,i.payload,r);return{...i,payload:n}}async function Ib(e,t,r){let{plaintext:i,...o}=await qW(e,qA(r),t),{protectedHeader:n}=o,a=Ih(n,i,r);for(let e of["iss","sub","aud"])if(void 0!==n[e]&&("aud"===e?JSON.stringify(n.aud)!==JSON.stringify(a.aud):n[e]!==a[e]))throw new Vp(`replicated "${e}" claim header parameter mismatch`,a,e,"mismatch");return{payload:a,...o}}class I${#p;constructor(e){VV(e,"plaintext"),this.#p=[e]}setContentEncryptionKey(e){return Vj(this.#p[5],"setContentEncryptionKey"),this.#p[5]=e,this}setInitializationVector(e){return Vj(this.#p[6],"setInitializationVector"),this.#p[6]=e,this}setProtectedHeader(e){return Vj(this.#p[1],"setProtectedHeader"),this.#p[1]=e,this}setKeyManagementParameters(e){return Vj(this.#p[7],"setKeyManagementParameters"),this.#p[7]=e,this}async encrypt(e,t){return qG(await qH([...this.#p],e,t))}}class IS{#p;constructor(e){VV(e,"plaintext"),this.#p=[e]}setKeyManagementParameters(e){return Vj(this.#p[7],"setKeyManagementParameters"),this.#p[7]=e,this}setProtectedHeader(e){return Vj(this.#p[1],"setProtectedHeader"),this.#p[1]=e,this}setSharedUnprotectedHeader(e){return Vj(this.#p[3],"setSharedUnprotectedHeader"),this.#p[3]=e,this}setUnprotectedHeader(e){return Vj(this.#p[2],"setUnprotectedHeader"),this.#p[2]=e,this}setAdditionalAuthenticatedData(e){return this.#p[4]=e,this}setContentEncryptionKey(e){return Vj(this.#p[5],"setContentEncryptionKey"),this.#p[5]=e,this}setInitializationVector(e){return Vj(this.#p[6],"setInitializationVector"),this.#p[6]=e,this}async encrypt(e,t){return qH([...this.#p],e,t)}}async function Ik(e,t,r){let[i,o,n,a]=e,s="";if(void 0!==o){let e=VD(Vg,o);o=e[0],s=VP(e[1])}if(void 0!==n&&(n=VD(Vg,n)[0]),!o&&!n)throw new Vg("either setProtectedHeader or setUnprotectedHeader must be called before #sign()");if(!Vx(o,n))throw new Vg("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");let d={...o,...n};VW(Vg,o);let c=Vz(o,VN(Vg,VE,a,o,d));c||r?.();let{alg:l}=d;if("string"!=typeof l||!l)throw new Vg('JWS "alg" (Algorithm) Header Parameter missing or invalid');let p=q2(l),u="",m=i,f;if(c){let t=e[4];t?(u=t[0]??=VP(i),m=t[1]??=Va(u)):(u=VP(i),f=P8.encode(`${s}.${u}`))}f??=Vt(Va(s),Va("."),m);let h=await V3(await VF(p,t,"sign"),p.subtle,"sign");p.minRsaBits&&VY(p.alg,h);let y={signature:VP(new Uint8Array(await crypto.subtle.sign(p.signing,h,f))),payload:u};return o&&(y.protected=s),n&&(y.header=n),[y,c]}async function Iw(e,t,r,i,o){let[n]=await Ik([e,t,void 0,r],i,o);return`${n.protected}.${n.payload}.${n.signature}`}class IR{#u;#d;constructor(e){VV(e,"payload"),this.#u=e}setProtectedHeader(e){return Vj(this.#d,"setProtectedHeader"),this.#d=e,this}async sign(e,t){return Iw(this.#u,this.#d,t?.crit,e,()=>{throw TypeError("use the flattened module for creating JWS with b64: false")})}}class IP{#p;constructor(e){VV(e,"payload"),this.#p=[e]}setProtectedHeader(e){return Vj(this.#p[1],"setProtectedHeader"),this.#p[1]=e,this}setUnprotectedHeader(e){return Vj(this.#p[2],"setUnprotectedHeader"),this.#p[2]=e,this}async sign(e,t){let r=[...this.#p];r[3]=t?.crit;let[i]=await Ik(r,e);return i}}class IV{#n;state;constructor(e,t,r){this.#n=e,this.state=[void 0,void 0,t,r?.crit]}setProtectedHeader(e){return Vj(this.state[0],"setProtectedHeader"),this.state[0]=e,this}setUnprotectedHeader(e){return Vj(this.state[1],"setUnprotectedHeader"),this.state[1]=e,this}addSignature(...e){return this.#n.addSignature(...e)}sign(...e){return this.#n.sign(...e)}done(){return this.#n}}class Iq{#u;#m=[];constructor(e){this.#u=e}addSignature(e,t){let r=new IV(this,e,t);return this.#m.push(r),r}async sign(){let e;if(!this.#m.length)throw new Vg("at least one signature must be added");VV(this.#u,"payload");let t={signatures:[],payload:""},r=[];for(let i of this.#m){let[o,n,a,s]=i.state,[{payload:d,...c},l]=await Ik([this.#u,o,n,s,r],a);if(void 0===e)e=l,t.payload=d;else if(e!==l)throw new Vg("inconsistent use of JWS Unencoded Payload (RFC7797)");t.signatures.push(c)}return t}}let II=I_;class Ix extends II{#d;setProtectedHeader(e){return Vj(this.#d,"setProtectedHeader"),this.#d=e,this}async sign(e,t){return Iw(Ig(this),this.#d,t?.crit,e,()=>{throw new V_("JWTs MUST NOT use unencoded payload")})}}let Ij=I_;class IC extends Ij{#p=[void 0];#f;#h;#y;setProtectedHeader(e){return Vj(this.#p[1],"setProtectedHeader"),this.#p[1]=e,this}setKeyManagementParameters(e){return Vj(this.#p[7],"setKeyManagementParameters"),this.#p[7]=e,this}setContentEncryptionKey(e){return Vj(this.#p[5],"setContentEncryptionKey"),this.#p[5]=e,this}setInitializationVector(e){return Vj(this.#p[6],"setInitializationVector"),this.#p[6]=e,this}replicateIssuerAsHeader(){return this.#f=!0,this}replicateSubjectAsHeader(){return this.#h=!0,this}replicateAudienceAsHeader(){return this.#y=!0,this}async encrypt(e,t){let r=Ig(this);this.#p[1]&&(this.#f||this.#h||this.#y)&&(this.#p[1]={...this.#p[1],iss:this.#f?Iy(this).iss:void 0,sub:this.#h?Iy(this).sub:void 0,aud:this.#y?Iy(this).aud:void 0});let i=[...this.#p];return i[0]=r,qG(await qH(i,e,t))}}let IT='"alg" (Algorithm)';function IO(e='JWK "alg" (Algorithm) Parameter'){throw new Vf(`Invalid or unsupported ${e} value`)}function IE(e,t){return("string"==typeof e?q0[e]??qp[e]:void 0)??IO(t)}let IA=async(e,t,r)=>{var i,o;let n;if(VG(r)){if(r.type!==e)throw TypeError(`key is not a ${e} key`);return r.export({format:"pem",type:t})}if(!VH(r))throw TypeError(VJ(r,"CryptoKey","KeyObject"));if(!r.extractable)throw TypeError("CryptoKey is not extractable");if(r.type!==e)throw TypeError(`key is not a ${e} key`);return i=Vs(new Uint8Array(await crypto.subtle.exportKey(t,r))),o=`${e.toUpperCase()} KEY`,n=(i.match(/.{1,64}/g)||[]).join(` `),`-----BEGIN ${o}----- ${n} ------END ${o}-----`},xr=(e,t)=>{if(e.byteLength!==t.length)return!1;for(let r=0;r({data:e,pos:0}),xo=e=>{let t=e.data[e.pos++];if(void 0===t)throw Error("Unexpected end of ASN.1 input");return t},xn=e=>{let t=xo(e);if(128&t){let r=127&t,i=0;for(let t=0;t{for(;t-- >0;){e.pos++;let t=xn(e);e.pos+=t}},xs=(e,t,r)=>{if(xo(e)!==t)throw Error(r)},xd=(e,t)=>{if(t<0||e.pos+t>e.data.length)throw Error("Unexpected end of ASN.1 input");let r=e.data.subarray(e.pos,e.pos+t);return e.pos+=t,r},xc=async(e,t,r,i)=>{let o,n=qS(i?.extractable),a=xe(r,I8);a.secret&&I7(I8);let s="spki"===e;if(a.resolve)try{let r=xi(t);(function(e,t){if(xs(e,48,`Invalid ${"spki"===t?"SPKI":"PKCS#8"} structure`),xn(e),"pkcs8"===t){xs(e,2,"Expected version field");let t=xn(e);e.pos+=t}xs(e,48,"Expected algorithm identifier"),xn(e)})(r,e),o=a.resolve({crv:(e=>{let t,r=(xs(e,6,"Expected algorithm OID"),t=xn(e),xd(e,t));if(xr(r,[43,101,110]))return"X25519";if(!xr(r,[42,134,72,206,61,2,1]))throw Error("Unsupported key algorithm");xs(e,6,"Expected curve OID");let i=xn(e),o=xd(e,i);if(xr(o,[42,134,72,206,61,3,1,7]))return"P-256";if(xr(o,[43,129,4,0,34]))return"P-384";if(xr(o,[43,129,4,0,35]))return"P-521";throw Error("Unsupported named curve")})(r)})}catch{throw new RL("Invalid or unsupported key format")}else o=a.subtle;return crypto.subtle.importKey(e,t,o,n??s,a.usages[+!s])},xl=(e,t)=>RW(e.replace(t,""));function xp(e){return xt("public","spki",e)}function xu(e){return xt("private","pkcs8",e)}async function xm(e){if(qp(e))if("secret"!==e.type)return e.export({format:"jwk"});else e=e.export();if(e instanceof Uint8Array)return{kty:"oct",k:R0(e)};if(!ql(e))throw TypeError(qf(e,"CryptoKey","KeyObject","Uint8Array"));if(!e.extractable)throw TypeError("non-extractable CryptoKey cannot be exported as a JWK");let t=await crypto.subtle.exportKey("jwk",e);for(let e of(delete t.ext,delete t.key_ops,delete t.use,"AKP"!==t.kty&&delete t.alg,Object.keys(t)))void 0===t[e]&&delete t[e];return t}let xf=(e,t)=>{if("string"!=typeof e||!e)throw new RK(`${t} missing or invalid`)};async function xh(e,t){let r,i;if(R4(e)){if("string"!=typeof(r=qb(e)).kty)throw TypeError(qf(e,"CryptoKey","KeyObject","JSON Web Key"))}else if(qu(e))r=qb(await xm(e));else throw TypeError(qf(e,"CryptoKey","KeyObject","JSON Web Key"));if("sha256"!==(t??="sha256")&&"sha384"!==t&&"sha512"!==t)throw TypeError('digestAlgorithm must one of "sha256", "sha384", or "sha512"');switch(r.kty){case"AKP":xf(r.alg,'"alg" (Algorithm) Parameter'),xf(r.pub,'"pub" (Public key) Parameter'),i={alg:r.alg,kty:r.kty,pub:r.pub};break;case"EC":xf(r.crv,'"crv" (Curve) Parameter'),xf(r.x,'"x" (X Coordinate) Parameter'),xf(r.y,'"y" (Y Coordinate) Parameter'),i={crv:r.crv,kty:r.kty,x:r.x,y:r.y};break;case"OKP":xf(r.crv,'"crv" (Subtype of Key Pair) Parameter'),xf(r.x,'"x" (Public Key) Parameter'),i={crv:r.crv,kty:r.kty,x:r.x};break;case"RSA":xf(r.e,'"e" (Exponent) Parameter'),xf(r.n,'"n" (Modulus) Parameter'),i={e:r.e,kty:r.kty,n:r.n};break;case"oct":if("string"!=typeof r.k)throw new RK('"k" (Key Value) Parameter missing or invalid');i={k:r.k,kty:r.kty};break;default:throw new RL('"kty" (Key Type) Parameter missing or unsupported')}let o=RE(JSON.stringify(i));return R0(await RM(t,o))}async function xy(e,t){t??="sha256";let r=await xh(e,t);return`urn:ietf:params:oauth:jwk-thumbprint:sha-${t.slice(-3)}:${r}`}async function xg(e,t){let r,i={...e,...t?.header};if(!R4(i.jwk))throw new RG('"jwk" (JSON Web Key) Header Parameter must be a JSON object');try{r=q$(i.jwk)}catch(e){throw new RG("Invalid Embedded JWK",{cause:e})}let o=I$(i.alg);if(void 0!==r.use&&"sig"!==r.use)throw new RG('Invalid Embedded JWK, its "use" must be "sig" when present');if(void 0!==r.alg&&r.alg!==o.alg)throw new RG(`Invalid Embedded JWK, its "alg" must be "${o.alg}" when present`);let n=await qk(o,r,!0);if("public"!==n.type)throw new RG('"jwk" (JSON Web Key) Header Parameter must be a public key');return n}async function x_(e,t,r){let i=e.get(t)||e.set(t,{}).get(t),{alg:o}=r;if(void 0===i[o]){let e=qk(r,t,!0).then(e=>{if("public"!==e.type)throw new RJ("JSON Web Key Set members must be public keys");return i[o]=e,e}).catch(t=>{throw i[o]===e&&delete i[o],t});i[o]=e}return i[o]}function xv(e){let t;try{t=structuredClone(e)}catch{}if(!R6(t))throw new RJ("JSON Web Key Set malformed");let r=t.keys.map(e=>{let t=qb(e);return Array.isArray(t.key_ops)&&(t.key_ops=[...t.key_ops]),t}),i=new WeakMap;return Object.defineProperty(async(e,o)=>{let{alg:n,kid:a}={...e,...o?.header},s="string"==typeof n?Ib[n]:void 0;if(!s||s.secret)throw new RL('Unsupported "alg" value for a JSON Web Key Set');let d=t.keys.filter((e,t)=>(function(e,t,r,i){let{kty:o,key_ops:n,ext:a,kid:s,alg:d,use:c,crv:l}=e;return(void 0===a||"boolean"==typeof a)&&(void 0===n||Array.isArray(n)&&n.every((e,t)=>"string"==typeof e&&n.indexOf(e)===t)&&n.includes("verify"))&&t.kty.includes(o)&&(void 0===i||"string"==typeof i&&i===s)&&(void 0===d?"AKP"!==o:r===d)&&(void 0===c||"sig"===c)&&(!t.crv||l===t.crv)})(r[t],s,n,a)),{0:c,length:l}=d;if(!l)throw new RZ;if(1!==l){let e=new RQ;throw e[Symbol.asyncIterator]=async function*(){for(let e of d)try{yield await x_(i,e,s)}catch{}},e}return x_(i,c,s)},"jwks",{value:()=>structuredClone(t)})}(typeof navigator>"u"||!navigator.userAgent?.startsWith?.("Mozilla/5.0 "))&&(h="jose/v6.2.12");let xb=Symbol(),x$=Symbol();function xS(e,t){return Number.isFinite(e)&&Date.now(){if(u&&("u">typeof WebSocketPair||"u">typeof navigator&&"Cloudflare-Workers"===navigator.userAgent||"u">typeof EdgeRuntime&&"vercel"===EdgeRuntime)&&(u=void 0),!u){let e=++m,t=u=(async function(e,t,r,i=fetch){let o=await i(e,{method:"GET",signal:r,redirect:"manual",headers:t}).catch(e=>{throw"TimeoutError"===e.name?new RX:e});if(200!==o.status)throw new RN("Expected 200 OK from the JSON Web Key Set HTTP response");try{return await o.json()}catch{throw new RN("Failed to parse the JSON Web Key Set HTTP response as JSON")}})(r,d,AbortSignal.timeout(n),c).then(t=>{let r=xv(t);if(e<=f)return;y=r;let i=Date.now();l&&(l.uat=i,l.jwks=t),p=i,f=e}).finally(()=>{u===t&&(u=void 0)})}await u};return Object.defineProperties(async(e,t)=>{y&&xS(p,s)||await g();try{return await y(e,t)}catch(r){if(r instanceof RZ&&!xS(p,a))return await g(),y(e,t);throw r}},{coolingDown:{get:()=>xS(p,a),enumerable:!0},fresh:{get:()=>xS(p,s),enumerable:!0},reload:{value:g,enumerable:!0},reloading:{get:()=>!!u,enumerable:!0},jwks:{value:()=>y?.jwks(),enumerable:!0}})}let xV=IB;class xP extends xV{encode(){let e=R0(JSON.stringify({alg:"none"})),t=R0(IG(this));return`${e}.${t}.`}static decode(e,t){let r,i;if("string"!=typeof e)throw new RB("Unsecured JWT must be a string");let{0:o,1:n,2:a,length:s}=e.split(".");if(3!==s||""!==a)throw new RB("Invalid Unsecured JWT");try{r=R7(o,RG,"JWS Protected Header is invalid");let e=qo(RG,qe,void 0,r,r);i=qn(r,e)}catch(e){throw e instanceof RG?new RB("Invalid Unsecured JWT",{cause:e}):e}if("none"!==r.alg)throw new RB("Invalid Unsecured JWT");if(!i)throw new RB("JWTs MUST NOT use unencoded payload");return{payload:IU(r,R5(n,"payload",RB),t),header:r}}}async function xR(e,t,r){if("string"!=typeof e||0!==e.indexOf("-----BEGIN PUBLIC KEY-----"))throw TypeError('"spki" must be SPKI formatted string');return xc("spki",xl(e,/(?:-----(?:BEGIN|END) PUBLIC KEY-----|\s)/g),t,r)}async function xq(e,t,r){let i;if("string"!=typeof e||0!==e.indexOf("-----BEGIN CERTIFICATE-----"))throw TypeError('"x509" must be X.509 formatted string');try{let t=xl(e,/(?:-----(?:BEGIN|END) CERTIFICATE-----|\s)/g);i=function(e){let t=xi(e);xs(t,48,"Invalid certificate structure");let r=xn(t);if(r<0||t.pos+r>t.data.length)throw Error("Unexpected end of ASN.1 input");xs(t,48,"Invalid tbsCertificate structure"),xn(t),160===e[t.pos]?xa(t,6):xa(t,5);let i=t.pos;xs(t,48,"Invalid SPKI structure");let o=xn(t);return e.subarray(i,i+o+(t.pos-i))}(t)}catch(e){throw TypeError("Failed to parse the X.509 certificate",{cause:e})}return xc("spki",i,t,r)}async function xI(e,t,r){if("string"!=typeof e||0!==e.indexOf("-----BEGIN PRIVATE KEY-----"))throw TypeError('"pkcs8" must be PKCS#8 formatted string');return xc("pkcs8",xl(e,/(?:-----(?:BEGIN|END) PRIVATE KEY-----|\s)/g),t,r)}async function xx(e,t,r){if(!R4(e))throw TypeError("JWK must be an object");let i=q$(e),o=qS(r?.extractable),{alg:n}=i;if(t??=n,"oct"!==i.kty&&!t)throw TypeError('"alg" argument is required when "jwk.alg" is not present');switch(i.kty){case"oct":if("string"!=typeof i.k)throw TypeError('missing "k" (Key Value) Parameter value');return R1(i.k);case"AKP":if("string"!=typeof n||!n)throw TypeError('missing "alg" (Algorithm) Parameter value');if(t!==n)throw TypeError("JWK alg and alg option value mismatch");return qk(xe(t),i,o);case"RSA":case"EC":case"OKP":return qk(xe(t),i,o);default:throw new RL('Unsupported "kty" (Key Type) Parameter value')}}function xj(e){let t;if("string"==typeof e){let r=e.split(".");(3===r.length||5===r.length)&&([t]=r)}else if("object"==typeof e&&e)if("protected"in e)t=e.protected;else throw TypeError("Token does not contain a Protected Header");let r="Invalid Token or Protected Header formatting";if("string"!=typeof t||!t)throw TypeError(r);return R7(t,TypeError,r)}function xC(e){let t,r;if("string"!=typeof e)throw new RB("JWTs must use Compact JWS serialization, JWT must be a string");let{1:i,length:o}=e.split(".");if(5===o)throw new RB("Only JWTs using Compact JWS serialization can be decoded");if(3!==o)throw new RB("Invalid JWT");if(!i)throw new RB("JWTs must contain a payload");try{t=R1(i)}catch{throw new RB("Failed to base64url decode the payload")}try{r=JSON.parse(RI.decode(t))}catch{throw new RB("Failed to parse the decoded payload as JSON")}if(!R4(r))throw new RB("Invalid JWT Claims Set");return r}async function xT(e,t){let r,i=qS(t?.extractable),o=xe(e,I8);if(o.secret&&I7(I8),o.resolve){let e=t?.crv??"P-256";if(!["P-256","P-384","P-521","X25519"].includes(e))throw new RL("Invalid or unsupported crv option provided, supported values are P-256, P-384, P-521, and X25519");r=o.resolve({crv:e})}else{if(void 0!==o.crv&&t?.crv!==void 0&&t.crv!==o.crv)throw new RL(`Invalid or unsupported crv option provided, the only supported value for ${e} is ${o.crv}`);r="RSA"===o.kty[0]?{...o.subtle,publicExponent:Uint8Array.of(1,0,1),modulusLength:function(e){let t=e?.modulusLength??2048;if("number"!=typeof t||!Number.isInteger(t)||t<2048)throw new RL("Invalid or unsupported modulusLength option provided, 2048 bits or larger keys must be used");return t}(t)}:o.subtle}return crypto.subtle.generateKey(r,i??!1,[...o.usages[1],...o.usages[0]])}async function xO(e,t){let r,i,o,n=qS(t?.extractable);switch(e){case"HS256":case"HS384":case"HS512":r=+e.slice(-3),i={name:"HMAC",hash:`SHA-${r}`,length:r},o=["sign","verify"];break;case"A128CBC-HS256":case"A192CBC-HS384":case"A256CBC-HS512":return crypto.getRandomValues(new Uint8Array(e.slice(-3)>>3));case"A128KW":case"A192KW":case"A256KW":i={name:"AES-KW",length:r=+e.slice(1,4)},o=["wrapKey","unwrapKey"];break;case"A128GCMKW":case"A192GCMKW":case"A256GCMKW":case"A128GCM":case"A192GCM":case"A256GCM":i={name:"AES-GCM",length:r=+e.slice(1,4)},o=["encrypt","decrypt"];break;default:I7(I8)}return crypto.subtle.generateKey(i,n??!1,o)}let xE="WebCryptoAPI";var xA=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;var t=class{};e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var r=class extends t{constructor(t){if(super(),!e.IDENTIFIER.test(t))throw Error("CodeGen: name must be a valid identifier");this.str=t}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};e.Name=r;var i=class extends t{constructor(e){super(),this._items="string"==typeof e?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return""===e||'""'===e}get str(){var e;return null!=(e=this._str)?e:this._str=this._items.reduce((e,t)=>`${e}${t}`,"")}get names(){var e;return null!=(e=this._names)?e:this._names=this._items.reduce((e,t)=>(t instanceof r&&(e[t.str]=(e[t.str]||0)+1),e),{})}};function o(e,...t){let r=[e[0]],n=0;for(;n{Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;let t=xA();var r,i,o=class extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}};(r=i||(e.UsedValueState=i={}))[r.Started=0]="Started",r[r.Completed=1]="Completed",e.varKinds={const:new t.Name("const"),let:new t.Name("let"),var:new t.Name("var")};var n=class{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof t.Name?e:this.name(e)}name(e){return new t.Name(this._newName(e))}_newName(e){let t=this._names[e]||this._nameGroup(e);return`${e}${t.index++}`}_nameGroup(e){var t,r;if((null==(r=null==(t=this._parent)?void 0:t._prefixes)?void 0:r.has(e))||this._prefixes&&!this._prefixes.has(e))throw Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}};e.Scope=n;var a=class extends t.Name{constructor(e,t){super(t),this.prefix=e}setValue(e,{property:r,itemIndex:i}){this.value=e,this.scopePath=(0,t._)`.${new t.Name(r)}[${i}]`}};e.ValueScopeName=a;let s=(0,t._)`\n`;var d=class extends n{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?s:t.nil}}get(){return this._scope}name(e){return new a(e,this._newName(e))}value(e,t){var r;if(void 0===t.ref)throw Error("CodeGen: ref must be passed in value");let i=this.toName(e),{prefix:o}=i,n=null!=(r=t.key)?r:t.ref,a=this._values[o];if(a){let e=a.get(n);if(e)return e}else a=this._values[o]=new Map;a.set(n,i);let s=this._scope[o]||(this._scope[o]=[]),d=s.length;return s[d]=t.ref,i.setValue(t,{property:o,itemIndex:d}),i}getValue(e,t){let r=this._values[e];if(r)return r.get(t)}scopeRefs(e,r=this._values){return this._reduceValues(r,r=>{if(void 0===r.scopePath)throw Error(`CodeGen: name "${r}" has no value`);return(0,t._)`${e}${r.scopePath}`})}scopeCode(e=this._values,t,r){return this._reduceValues(e,e=>{if(void 0===e.value)throw Error(`CodeGen: name "${e}" has no value`);return e.value.code},t,r)}_reduceValues(r,n,a={},s){let d=t.nil;for(let c in r){let l=r[c];if(!l)continue;let p=a[c]=a[c]||new Map;l.forEach(r=>{if(p.has(r))return;p.set(r,i.Started);let a=n(r);if(a){let i=this.opts.es5?e.varKinds.var:e.varKinds.const;d=(0,t._)`${d}${i} ${r} = ${a};${this.opts._n}`}else if(a=null==s?void 0:s(r))d=(0,t._)`${d}${a}${this.opts._n}`;else throw new o(r);p.set(r,i.Completed)})}return d}};e.ValueScope=d}),xM=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;let t=xA(),r=xW();var i=xA();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return i._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return i.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return i.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return i.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return i.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return i.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return i.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return i.Name}});var o=xW();Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return o.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return o.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return o.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return o.varKinds}}),e.operators={GT:new t._Code(">"),GTE:new t._Code(">="),LT:new t._Code("<"),LTE:new t._Code("<="),EQ:new t._Code("==="),NEQ:new t._Code("!=="),NOT:new t._Code("!"),OR:new t._Code("||"),AND:new t._Code("&&"),ADD:new t._Code("+")};var n=class{optimizeNodes(){return this}optimizeNames(e,t){return this}},a=class extends n{constructor(e,t,r){super(),this.varKind=e,this.name=t,this.rhs=r}render({es5:e,_n:t}){let i=e?r.varKinds.var:this.varKind,o=void 0===this.rhs?"":` = ${this.rhs}`;return`${i} ${this.name}${o};`+t}optimizeNames(e,t){if(e[this.name.str])return this.rhs&&(this.rhs=x(this.rhs,e,t)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}},s=class extends n{constructor(e,t,r){super(),this.lhs=e,this.rhs=t,this.sideEffects=r}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,r){if(!(this.lhs instanceof t.Name)||e[this.lhs.str]||this.sideEffects)return this.rhs=x(this.rhs,e,r),this}get names(){return I(this.lhs instanceof t.Name?{}:{...this.lhs.names},this.rhs)}},d=class extends s{constructor(e,t,r,i){super(e,r,i),this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}},c=class extends n{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}},l=class extends n{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}},p=class extends n{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}},u=class extends n{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=x(this.code,e,t),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}},m=class extends n{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce((t,r)=>t+r.render(e),"")}optimizeNodes(){let{nodes:e}=this,t=e.length;for(;t--;){let r=e[t].optimizeNodes();Array.isArray(r)?e.splice(t,1,...r):r?e[t]=r:e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){let{nodes:r}=this,i=r.length;for(;i--;){let o=r[i];o.optimizeNames(e,t)||(function(e,t){for(let r in t)e[r]=(e[r]||0)-(t[r]||0)}(e,o.names),r.splice(i,1))}return r.length>0?this:void 0}get names(){return this.nodes.reduce((e,t)=>q(e,t.names),{})}},f=class extends m{render(e){return"{"+e._n+super.render(e)+"}"+e._n}},h=class extends m{},y=class extends f{};y.kind="else";var g=class e extends f{constructor(e,t){super(t),this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);return this.else&&(t+="else "+this.else.render(e)),t}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(!0===t)return this.nodes;let r=this.else;if(r){let e=r.optimizeNodes();r=this.else=Array.isArray(e)?new y(e):e}return r?!1===t?r instanceof e?r:r.nodes:this.nodes.length?this:new e(j(t),r instanceof e?[r]:r.nodes):!1!==t&&this.nodes.length?this:void 0}optimizeNames(e,t){var r;if(this.else=null==(r=this.else)?void 0:r.optimizeNames(e,t),super.optimizeNames(e,t)||this.else)return this.condition=x(this.condition,e,t),this}get names(){let e=super.names;return I(e,this.condition),this.else&&q(e,this.else.names),e}};g.kind="if";var _=class extends f{};_.kind="for";var v=class extends _{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iteration=x(this.iteration,e,t),this}get names(){return q(super.names,this.iteration.names)}},b=class extends _{constructor(e,t,r,i){super(),this.varKind=e,this.name=t,this.from=r,this.to=i}render(e){let t=e.es5?r.varKinds.var:this.varKind,{name:i,from:o,to:n}=this;return`for(${t} ${i}=${o}; ${i}<${n}; ${i}++)`+super.render(e)}get names(){return I(I(super.names,this.from),this.to)}},$=class extends _{constructor(e,t,r,i){super(),this.loop=e,this.varKind=t,this.name=r,this.iterable=i}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iterable=x(this.iterable,e,t),this}get names(){return q(super.names,this.iterable.names)}},S=class extends f{constructor(e,t,r){super(),this.name=e,this.args=t,this.async=r}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}};S.kind="func";var k=class extends m{render(e){return"return "+super.render(e)}};k.kind="return";var w=class extends f{render(e){let t="try"+super.render(e);return this.catch&&(t+=this.catch.render(e)),this.finally&&(t+=this.finally.render(e)),t}optimizeNodes(){var e,t;return super.optimizeNodes(),null==(e=this.catch)||e.optimizeNodes(),null==(t=this.finally)||t.optimizeNodes(),this}optimizeNames(e,t){var r,i;return super.optimizeNames(e,t),null==(r=this.catch)||r.optimizeNames(e,t),null==(i=this.finally)||i.optimizeNames(e,t),this}get names(){let e=super.names;return this.catch&&q(e,this.catch.names),this.finally&&q(e,this.finally.names),e}},V=class extends f{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}};V.kind="catch";var P=class extends f{render(e){return"finally"+super.render(e)}};P.kind="finally";var R=class{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?"\n":""},this._extScope=e,this._scope=new r.Scope({parent:e}),this._nodes=[new h]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){let r=this._extScope.value(e,t);return(this._values[r.prefix]||(this._values[r.prefix]=new Set)).add(r),r}getScopeValue(e,t){return this._extScope.getValue(e,t)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,t,r,i){let o=this._scope.toName(t);return void 0!==r&&i&&(this._constants[o.str]=r),this._leafNode(new a(e,o,r)),o}const(e,t,i){return this._def(r.varKinds.const,e,t,i)}let(e,t,i){return this._def(r.varKinds.let,e,t,i)}var(e,t,i){return this._def(r.varKinds.var,e,t,i)}assign(e,t,r){return this._leafNode(new s(e,t,r))}add(t,r){return this._leafNode(new d(t,e.operators.ADD,r))}code(e){return"function"==typeof e?e():e!==t.nil&&this._leafNode(new u(e)),this}object(...e){let r=["{"];for(let[i,o]of e)r.length>1&&r.push(","),r.push(i),(i!==o||this.opts.es5)&&(r.push(":"),(0,t.addCodeArg)(r,o));return r.push("}"),new t._Code(r)}if(e,t,r){if(this._blockNode(new g(e)),t&&r)this.code(t).else().code(r).endIf();else if(t)this.code(t).endIf();else if(r)throw Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new g(e))}else(){return this._elseNode(new y)}endIf(){return this._endBlockNode(g,y)}_for(e,t){return this._blockNode(e),t&&this.code(t).endFor(),this}for(e,t){return this._for(new v(e),t)}forRange(e,t,i,o,n=this.opts.es5?r.varKinds.var:r.varKinds.let){let a=this._scope.toName(e);return this._for(new b(n,a,t,i),()=>o(a))}forOf(e,i,o,n=r.varKinds.const){let a=this._scope.toName(e);if(this.opts.es5){let e=i instanceof t.Name?i:this.var("_arr",i);return this.forRange("_i",0,(0,t._)`${e}.length`,r=>{this.var(a,(0,t._)`${e}[${r}]`),o(a)})}return this._for(new $("of",n,a,i),()=>o(a))}forIn(e,i,o,n=this.opts.es5?r.varKinds.var:r.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,t._)`Object.keys(${i})`,o);let a=this._scope.toName(e);return this._for(new $("in",n,a,i),()=>o(a))}endFor(){return this._endBlockNode(_)}label(e){return this._leafNode(new c(e))}break(e){return this._leafNode(new l(e))}return(e){let t=new k;if(this._blockNode(t),this.code(e),1!==t.nodes.length)throw Error('CodeGen: "return" should have one node');return this._endBlockNode(k)}try(e,t,r){if(!t&&!r)throw Error('CodeGen: "try" without "catch" and "finally"');let i=new w;if(this._blockNode(i),this.code(e),t){let e=this.name("e");this._currNode=i.catch=new V(e),t(e)}return r&&(this._currNode=i.finally=new P,this.code(r)),this._endBlockNode(V,P)}throw(e){return this._leafNode(new p(e))}block(e,t){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(t),this}endBlock(e){let t=this._blockStarts.pop();if(void 0===t)throw Error("CodeGen: not in self-balancing block");let r=this._nodes.length-t;if(r<0||void 0!==e&&r!==e)throw Error(`CodeGen: wrong number of nodes: ${r} vs ${e} expected`);return this._nodes.length=t,this}func(e,r=t.nil,i,o){return this._blockNode(new S(e,r,i)),o&&this.code(o).endFunc(),this}endFunc(){return this._endBlockNode(S)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,t){let r=this._currNode;if(r instanceof e||t&&r instanceof t)return this._nodes.pop(),this;throw Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){let t=this._currNode;if(!(t instanceof g))throw Error('CodeGen: "else" without "if"');return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let t=this._nodes;t[t.length-1]=e}};function q(e,t){for(let r in t)e[r]=(e[r]||0)+(t[r]||0);return e}function I(e,r){return r instanceof t._CodeOrName?q(e,r.names):e}function x(e,r,i){var o;if(e instanceof t.Name)return n(e);if(!((o=e)instanceof t._Code&&o._items.some(e=>e instanceof t.Name&&1===r[e.str]&&void 0!==i[e.str])))return e;return new t._Code(e._items.reduce((e,r)=>(r instanceof t.Name&&(r=n(r)),r instanceof t._Code?e.push(...r._items):e.push(r),e),[]));function n(e){let t=i[e.str];return void 0===t||1!==r[e.str]?e:(delete r[e.str],t)}}function j(e){return"boolean"==typeof e||"number"==typeof e||null===e?!e:(0,t._)`!${E(e)}`}e.CodeGen=R,e.not=j;let C=O(e.operators.AND);e.and=function(...e){return e.reduce(C)};let T=O(e.operators.OR);function O(e){return(r,i)=>r===t.nil?i:i===t.nil?r:(0,t._)`${E(r)} ${e} ${E(i)}`}function E(e){return e instanceof t.Name?e:(0,t._)`(${e})`}e.or=function(...e){return e.reduce(T)}}),xN=S0(e=>{var t,r;Object.defineProperty(e,"__esModule",{value:!0}),e.checkStrictMode=e.getErrorPath=e.Type=e.useFunc=e.setEvaluated=e.evaluatedPropsToName=e.mergeEvaluated=e.eachItem=e.unescapeJsonPointer=e.escapeJsonPointer=e.escapeFragment=e.unescapeFragment=e.schemaRefOrVal=e.schemaHasRulesButRef=e.schemaHasRules=e.checkUnknownRules=e.alwaysValidSchema=e.toHash=void 0;let i=xM(),o=xA();function n(e,t=e.schema){let{opts:r,self:i}=e;if(!r.strictSchema||"boolean"==typeof t)return;let o=i.RULES.keywords;for(let r in t)o[r]||m(e,`unknown keyword: "${r}"`)}function a(e,t){if("boolean"==typeof e)return!e;for(let r in e)if(t[r])return!0;return!1}function s(e){return"number"==typeof e?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}function d(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function c({mergeNames:e,mergeToName:t,mergeValues:r,resultToName:o}){return(n,a,s,d)=>{let c=void 0===s?a:s instanceof i.Name?(a instanceof i.Name?e(n,a,s):t(n,a,s),s):a instanceof i.Name?(t(n,s,a),a):r(a,s);return d!==i.Name||c instanceof i.Name?c:o(n,c)}}function l(e,t){if(!0===t)return e.var("props",!0);let r=e.var("props",(0,i._)`{}`);return void 0!==t&&p(e,r,t),r}function p(e,t,r){Object.keys(r).forEach(r=>e.assign((0,i._)`${t}${(0,i.getProperty)(r)}`,!0))}e.toHash=function(e){let t={};for(let r of e)t[r]=!0;return t},e.alwaysValidSchema=function(e,t){return"boolean"==typeof t?t:0===Object.keys(t).length||(n(e,t),!a(t,e.self.RULES.all))},e.checkUnknownRules=n,e.schemaHasRules=a,e.schemaHasRulesButRef=function(e,t){if("boolean"==typeof e)return!e;for(let r in e)if("$ref"!==r&&t.all[r])return!0;return!1},e.schemaRefOrVal=function({topSchemaRef:e,schemaPath:t},r,o,n){if(!n){if("number"==typeof r||"boolean"==typeof r)return r;if("string"==typeof r)return(0,i._)`${r}`}return(0,i._)`${e}${t}${(0,i.getProperty)(o)}`},e.unescapeFragment=function(e){return d(decodeURIComponent(e))},e.escapeFragment=function(e){return encodeURIComponent(s(e))},e.escapeJsonPointer=s,e.unescapeJsonPointer=d,e.eachItem=function(e,t){if(Array.isArray(e))for(let r of e)t(r);else t(e)},e.mergeEvaluated={props:c({mergeNames:(e,t,r)=>e.if((0,i._)`${r} !== true && ${t} !== undefined`,()=>{e.if((0,i._)`${t} === true`,()=>e.assign(r,!0),()=>e.assign(r,(0,i._)`${r} || {}`).code((0,i._)`Object.assign(${r}, ${t})`))}),mergeToName:(e,t,r)=>e.if((0,i._)`${r} !== true`,()=>{!0===t?e.assign(r,!0):(e.assign(r,(0,i._)`${r} || {}`),p(e,r,t))}),mergeValues:(e,t)=>!0===e||{...e,...t},resultToName:l}),items:c({mergeNames:(e,t,r)=>e.if((0,i._)`${r} !== true && ${t} !== undefined`,()=>e.assign(r,(0,i._)`${t} === true ? true : ${r} > ${t} ? ${r} : ${t}`)),mergeToName:(e,t,r)=>e.if((0,i._)`${r} !== true`,()=>e.assign(r,!0===t||(0,i._)`${r} > ${t} ? ${r} : ${t}`)),mergeValues:(e,t)=>!0===e||Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})},e.evaluatedPropsToName=l,e.setEvaluated=p;let u={};function m(e,t,r=e.opts.strictSchema){if(r){if(t=`strict mode: ${t}`,!0===r)throw Error(t);e.self.logger.warn(t)}}e.useFunc=function(e,t){return e.scopeValue("func",{ref:t,code:u[t.code]||(u[t.code]=new o._Code(t.code))})},(r=t||(e.Type=t={}))[r.Num=0]="Num",r[r.Str=1]="Str",e.getErrorPath=function(e,r,o){if(e instanceof i.Name){let n=r===t.Num;return o?n?(0,i._)`"[" + ${e} + "]"`:(0,i._)`"['" + ${e} + "']"`:n?(0,i._)`"/" + ${e}`:(0,i._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return o?(0,i.getProperty)(e).toString():"/"+s(e)},e.checkStrictMode=m}),xz=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xM();e.default={data:new t.Name("data"),valCxt:new t.Name("valCxt"),instancePath:new t.Name("instancePath"),parentData:new t.Name("parentData"),parentDataProperty:new t.Name("parentDataProperty"),rootData:new t.Name("rootData"),dynamicAnchors:new t.Name("dynamicAnchors"),vErrors:new t.Name("vErrors"),errors:new t.Name("errors"),this:new t.Name("this"),self:new t.Name("self"),scope:new t.Name("scope"),json:new t.Name("json"),jsonPos:new t.Name("jsonPos"),jsonLen:new t.Name("jsonLen"),jsonPart:new t.Name("jsonPart")}}),xD=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;let t=xM(),r=xN(),i=xz();function o(e,r){let o=e.const("err",r);e.if((0,t._)`${i.default.vErrors} === null`,()=>e.assign(i.default.vErrors,(0,t._)`[${o}]`),(0,t._)`${i.default.vErrors}.push(${o})`),e.code((0,t._)`${i.default.errors}++`)}function n(e,r){let{gen:i,validateName:o,schemaEnv:n}=e;n.$async?i.throw((0,t._)`new ${e.ValidationError}(${r})`):(i.assign((0,t._)`${o}.errors`,r),i.return(!1))}e.keywordError={message:({keyword:e})=>(0,t.str)`must pass "${e}" keyword validation`},e.keyword$DataError={message:({keyword:e,schemaType:r})=>r?(0,t.str)`"${e}" keyword must be ${r} ($data)`:(0,t.str)`"${e}" keyword is invalid ($data)`},e.reportError=function(r,i=e.keywordError,a,d){let{it:c}=r,{gen:l,compositeRule:p,allErrors:u}=c,m=s(r,i,a);(null!=d?d:p||u)?o(l,m):n(c,(0,t._)`[${m}]`)},e.reportExtraError=function(t,r=e.keywordError,a){let{it:d}=t,{gen:c,compositeRule:l,allErrors:p}=d;o(c,s(t,r,a)),l||p||n(d,i.default.vErrors)},e.resetErrorsCount=function(e,r){e.assign(i.default.errors,r),e.if((0,t._)`${i.default.vErrors} !== null`,()=>e.if(r,()=>e.assign((0,t._)`${i.default.vErrors}.length`,r),()=>e.assign(i.default.vErrors,null)))},e.extendErrors=function({gen:e,keyword:r,schemaValue:o,data:n,errsCount:a,it:s}){if(void 0===a)throw Error("ajv implementation error");let d=e.name("err");e.forRange("i",a,i.default.errors,a=>{e.const(d,(0,t._)`${i.default.vErrors}[${a}]`),e.if((0,t._)`${d}.instancePath === undefined`,()=>e.assign((0,t._)`${d}.instancePath`,(0,t.strConcat)(i.default.instancePath,s.errorPath))),e.assign((0,t._)`${d}.schemaPath`,(0,t.str)`${s.errSchemaPath}/${r}`),s.opts.verbose&&(e.assign((0,t._)`${d}.schema`,o),e.assign((0,t._)`${d}.data`,n))})};let a={keyword:new t.Name("keyword"),schemaPath:new t.Name("schemaPath"),params:new t.Name("params"),propertyName:new t.Name("propertyName"),message:new t.Name("message"),schema:new t.Name("schema"),parentSchema:new t.Name("parentSchema")};function s(e,o,n){let{createErrors:s}=e.it;return!1===s?(0,t._)`{}`:function(e,o,n={}){let{gen:s,it:d}=e,c=[function({errorPath:e},{instancePath:o}){let n=o?(0,t.str)`${e}${(0,r.getErrorPath)(o,r.Type.Str)}`:e;return[i.default.instancePath,(0,t.strConcat)(i.default.instancePath,n)]}(d,n),function({keyword:e,it:{errSchemaPath:i}},{schemaPath:o,parentSchema:n}){let s=n?i:(0,t.str)`${i}/${e}`;return o&&(s=(0,t.str)`${s}${(0,r.getErrorPath)(o,r.Type.Str)}`),[a.schemaPath,s]}(e,n)];return function(e,{params:r,message:o},n){let{keyword:s,data:d,schemaValue:c,it:l}=e,{opts:p,propertyName:u,topSchemaRef:m,schemaPath:f}=l;n.push([a.keyword,s],[a.params,"function"==typeof r?r(e):r||(0,t._)`{}`]),p.messages&&n.push([a.message,"function"==typeof o?o(e):o]),p.verbose&&n.push([a.schema,c],[a.parentSchema,(0,t._)`${m}${f}`],[i.default.data,d]),u&&n.push([a.propertyName,u])}(e,o,c),s.object(...c)}(e,o,n)}}),xF=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.boolOrEmptySchema=e.topBoolOrEmptySchema=void 0;let t=xD(),r=xM(),i=xz(),o={message:"boolean schema is false"};function n(e,r){let{gen:i,data:n}=e;(0,t.reportError)({gen:i,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e},o,void 0,r)}e.topBoolOrEmptySchema=function(e){let{gen:t,schema:o,validateName:a}=e;!1===o?n(e,!1):"object"==typeof o&&!0===o.$async?t.return(i.default.data):(t.assign((0,r._)`${a}.errors`,null),t.return(!0))},e.boolOrEmptySchema=function(e,t){let{gen:r,schema:i}=e;!1===i?(r.var(t,!1),n(e)):r.var(t,!0)}}),xL=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getRules=e.isJSONType=void 0;let t=new Set(["string","number","integer","boolean","null","object","array"]);e.isJSONType=function(e){return"string"==typeof e&&t.has(e)},e.getRules=function(){let e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}}),xU=S0(e=>{function t(e,t){return t.rules.some(t=>r(e,t))}function r(e,t){var r;return void 0!==e[t.keyword]||(null==(r=t.definition.implements)?void 0:r.some(t=>void 0!==e[t]))}Object.defineProperty(e,"__esModule",{value:!0}),e.shouldUseRule=e.shouldUseGroup=e.schemaHasRulesForType=void 0,e.schemaHasRulesForType=function({schema:e,self:r},i){let o=r.RULES.types[i];return o&&!0!==o&&t(e,o)},e.shouldUseGroup=t,e.shouldUseRule=r}),xH=S0(e=>{var t,r;Object.defineProperty(e,"__esModule",{value:!0}),e.reportTypeError=e.checkDataTypes=e.checkDataType=e.coerceAndCheckDataType=e.getJSONTypes=e.getSchemaTypes=e.DataType=void 0;let i=xL(),o=xU(),n=xD(),a=xM(),s=xN();function d(e){let t=Array.isArray(e)?e:e?[e]:[];if(t.every(i.isJSONType))return t;throw Error("type must be JSONType or JSONType[]: "+t.join(","))}(r=t||(e.DataType=t={}))[r.Correct=0]="Correct",r[r.Wrong=1]="Wrong",e.getSchemaTypes=function(e){let t=d(e.type);if(t.includes("null")){if(!1===e.nullable)throw Error("type: null contradicts nullable: false")}else{if(!t.length&&void 0!==e.nullable)throw Error('"nullable" cannot be used without "type"');!0===e.nullable&&t.push("null")}return t},e.getJSONTypes=d,e.coerceAndCheckDataType=function(e,r){var i,n;let{gen:s,data:d,opts:l}=e,u=(i=r,(n=l.coerceTypes)?i.filter(e=>c.has(e)||"array"===n&&"array"===e):[]),f=r.length>0&&!(0===u.length&&1===r.length&&(0,o.schemaHasRulesForType)(e,r[0]));if(f){let i=p(r,d,l.strictNumbers,t.Wrong);s.if(i,()=>{u.length?function(e,t,r){let{gen:i,data:o,opts:n}=e,s=i.let("dataType",(0,a._)`typeof ${o}`),d=i.let("coerced",(0,a._)`undefined`);for(let e of("array"===n.coerceTypes&&i.if((0,a._)`${s} == 'object' && Array.isArray(${o}) && ${o}.length == 1`,()=>i.assign(o,(0,a._)`${o}[0]`).assign(s,(0,a._)`typeof ${o}`).if(p(t,o,n.strictNumbers),()=>i.assign(d,o))),i.if((0,a._)`${d} !== undefined`),r))(c.has(e)||"array"===e&&"array"===n.coerceTypes)&&function(e){switch(e){case"string":i.elseIf((0,a._)`${s} == "number" || ${s} == "boolean"`).assign(d,(0,a._)`"" + ${o}`).elseIf((0,a._)`${o} === null`).assign(d,(0,a._)`""`);return;case"number":i.elseIf((0,a._)`${s} == "boolean" || ${o} === null +-----END ${o}-----`},IM=(e,t)=>{if(e.byteLength!==t.length)return!1;for(let r=0;r({data:e,pos:0}),IN=e=>{let t=e.data[e.pos++];if(void 0===t)throw Error("Unexpected end of ASN.1 input");return t},Iz=e=>{let t=IN(e);if(128&t){let r=127&t,i=0;for(let t=0;t{for(;t-- >0;){e.pos++;let t=Iz(e);e.pos+=t}},IF=(e,t,r)=>{if(IN(e)!==t)throw Error(r)},IL=(e,t)=>{if(t<0||e.pos+t>e.data.length)throw Error("Unexpected end of ASN.1 input");let r=e.data.subarray(e.pos,e.pos+t);return e.pos+=t,r},IU=async(e,t,r,i)=>{let o,n=V4(i?.extractable),a=IE(r,IT);a.secret&&IO(IT);let s="spki"===e;if(a.resolve)try{let r=IW(t);(function(e,t){if(IF(e,48,`Invalid ${"spki"===t?"SPKI":"PKCS#8"} structure`),Iz(e),"pkcs8"===t){IF(e,2,"Expected version field");let t=Iz(e);e.pos+=t}IF(e,48,"Expected algorithm identifier"),Iz(e)})(r,e),o=a.resolve({crv:(e=>{let t,r=(IF(e,6,"Expected algorithm OID"),t=Iz(e),IL(e,t));if(IM(r,[43,101,110]))return"X25519";if(!IM(r,[42,134,72,206,61,2,1]))throw Error("Unsupported key algorithm");IF(e,6,"Expected curve OID");let i=Iz(e),o=IL(e,i);if(IM(o,[42,134,72,206,61,3,1,7]))return"P-256";if(IM(o,[43,129,4,0,34]))return"P-384";if(IM(o,[43,129,4,0,35]))return"P-521";throw Error("Unsupported named curve")})(r)})}catch{throw new Vf("Invalid or unsupported key format")}else o=a.subtle;return crypto.subtle.importKey(e,t,o,n??s,a.usages[+!s])},IH=(e,t)=>Vd(e.replace(t,""));function IG(e){return IA("public","spki",e)}function IB(e){return IA("private","pkcs8",e)}async function IK(e){if(VG(e))if("secret"!==e.type)return e.export({format:"jwk"});else e=e.export();if(e instanceof Uint8Array)return{kty:"oct",k:VP(e)};if(!VH(e))throw TypeError(VJ(e,"CryptoKey","KeyObject","Uint8Array"));if(!e.extractable)throw TypeError("non-extractable CryptoKey cannot be exported as a JWK");let t=await crypto.subtle.exportKey("jwk",e);for(let e of(delete t.ext,delete t.key_ops,delete t.use,"AKP"!==t.kty&&delete t.alg,Object.keys(t)))void 0===t[e]&&delete t[e];return t}let IJ=(e,t)=>{if("string"!=typeof e||!e)throw new Vv(`${t} missing or invalid`)};async function IZ(e,t){let r,i;if(Vq(e)){if("string"!=typeof(r=V0(e)).kty)throw TypeError(VJ(e,"CryptoKey","KeyObject","JSON Web Key"))}else if(VB(e))r=V0(await IK(e));else throw TypeError(VJ(e,"CryptoKey","KeyObject","JSON Web Key"));if("sha256"!==(t??="sha256")&&"sha384"!==t&&"sha512"!==t)throw TypeError('digestAlgorithm must one of "sha256", "sha384", or "sha512"');switch(r.kty){case"AKP":IJ(r.alg,'"alg" (Algorithm) Parameter'),IJ(r.pub,'"pub" (Public key) Parameter'),i={alg:r.alg,kty:r.kty,pub:r.pub};break;case"EC":IJ(r.crv,'"crv" (Curve) Parameter'),IJ(r.x,'"x" (X Coordinate) Parameter'),IJ(r.y,'"y" (Y Coordinate) Parameter'),i={crv:r.crv,kty:r.kty,x:r.x,y:r.y};break;case"OKP":IJ(r.crv,'"crv" (Subtype of Key Pair) Parameter'),IJ(r.x,'"x" (Public Key) Parameter'),i={crv:r.crv,kty:r.kty,x:r.x};break;case"RSA":IJ(r.e,'"e" (Exponent) Parameter'),IJ(r.n,'"n" (Modulus) Parameter'),i={e:r.e,kty:r.kty,n:r.n};break;case"oct":if("string"!=typeof r.k)throw new Vv('"k" (Key Value) Parameter missing or invalid');i={k:r.k,kty:r.kty};break;default:throw new Vf('"kty" (Key Type) Parameter missing or unsupported')}let o=Va(JSON.stringify(i));return VP(await Vc(t,o))}async function IQ(e,t){t??="sha256";let r=await IZ(e,t);return`urn:ietf:params:oauth:jwk-thumbprint:sha-${t.slice(-3)}:${r}`}async function IX(e,t){let r,i={...e,...t?.header};if(!Vq(i.jwk))throw new Vg('"jwk" (JSON Web Key) Header Parameter must be a JSON object');try{r=V2(i.jwk)}catch(e){throw new Vg("Invalid Embedded JWK",{cause:e})}let o=q2(i.alg);if(void 0!==r.use&&"sig"!==r.use)throw new Vg('Invalid Embedded JWK, its "use" must be "sig" when present');if(void 0!==r.alg&&r.alg!==o.alg)throw new Vg(`Invalid Embedded JWK, its "alg" must be "${o.alg}" when present`);let n=await V6(o,r,!0);if("public"!==n.type)throw new Vg('"jwk" (JSON Web Key) Header Parameter must be a public key');return n}async function IY(e,t,r){let i=e.get(t)||e.set(t,{}).get(t),{alg:o}=r;if(void 0===i[o]){let e=V6(r,t,!0).then(e=>{if("public"!==e.type)throw new Vb("JSON Web Key Set members must be public keys");return i[o]=e,e}).catch(t=>{throw i[o]===e&&delete i[o],t});i[o]=e}return i[o]}function I1(e){let t;try{t=structuredClone(e)}catch{}if(!VI(t))throw new Vb("JSON Web Key Set malformed");let r=t.keys.map(e=>{let t=V0(e);return Array.isArray(t.key_ops)&&(t.key_ops=[...t.key_ops]),t}),i=new WeakMap;return Object.defineProperty(async(e,o)=>{let{alg:n,kid:a}={...e,...o?.header},s="string"==typeof n?q0[n]:void 0;if(!s||s.secret)throw new Vf('Unsupported "alg" value for a JSON Web Key Set');let d=t.keys.filter((e,t)=>(function(e,t,r,i){let{kty:o,key_ops:n,ext:a,kid:s,alg:d,use:c,crv:l}=e;return(void 0===a||"boolean"==typeof a)&&(void 0===n||Array.isArray(n)&&n.every((e,t)=>"string"==typeof e&&n.indexOf(e)===t)&&n.includes("verify"))&&t.kty.includes(o)&&(void 0===i||"string"==typeof i&&i===s)&&(void 0===d?"AKP"!==o:r===d)&&(void 0===c||"sig"===c)&&(!t.crv||l===t.crv)})(r[t],s,n,a)),{0:c,length:l}=d;if(!l)throw new V$;if(1!==l){let e=new VS;throw e[Symbol.asyncIterator]=async function*(){for(let e of d)try{yield await IY(i,e,s)}catch{}},e}return IY(i,c,s)},"jwks",{value:()=>structuredClone(t)})}(typeof navigator>"u"||!navigator.userAgent?.startsWith?.("Mozilla/5.0 "))&&(h="jose/v6.2.12");let I0=Symbol(),I2=Symbol();function I4(e,t){return Number.isFinite(e)&&Date.now(){if(u&&("u">typeof WebSocketPair||"u">typeof navigator&&"Cloudflare-Workers"===navigator.userAgent||"u">typeof EdgeRuntime&&"vercel"===EdgeRuntime)&&(u=void 0),!u){let e=++m,t=u=(async function(e,t,r,i=fetch){let o=await i(e,{method:"GET",signal:r,redirect:"manual",headers:t}).catch(e=>{throw"TimeoutError"===e.name?new Vk:e});if(200!==o.status)throw new Vl("Expected 200 OK from the JSON Web Key Set HTTP response");try{return await o.json()}catch{throw new Vl("Failed to parse the JSON Web Key Set HTTP response as JSON")}})(r,d,AbortSignal.timeout(n),c).then(t=>{let r=I1(t);if(e<=f)return;y=r;let i=Date.now();l&&(l.uat=i,l.jwks=t),p=i,f=e}).finally(()=>{u===t&&(u=void 0)})}await u};return Object.defineProperties(async(e,t)=>{y&&I4(p,s)||await g();try{return await y(e,t)}catch(r){if(r instanceof V$&&!I4(p,a))return await g(),y(e,t);throw r}},{coolingDown:{get:()=>I4(p,a),enumerable:!0},fresh:{get:()=>I4(p,s),enumerable:!0},reload:{value:g,enumerable:!0},reloading:{get:()=>!!u,enumerable:!0},jwks:{value:()=>y?.jwks(),enumerable:!0}})}let I9=I_;class I5 extends I9{encode(){let e=VP(JSON.stringify({alg:"none"})),t=VP(Ig(this));return`${e}.${t}.`}static decode(e,t){let r,i;if("string"!=typeof e)throw new V_("Unsecured JWT must be a string");let{0:o,1:n,2:a,length:s}=e.split(".");if(3!==s||""!==a)throw new V_("Invalid Unsecured JWT");try{r=VO(o,Vg,"JWS Protected Header is invalid");let e=VN(Vg,VE,void 0,r,r);i=Vz(r,e)}catch(e){throw e instanceof Vg?new V_("Invalid Unsecured JWT",{cause:e}):e}if("none"!==r.alg)throw new V_("Invalid Unsecured JWT");if(!i)throw new V_("JWTs MUST NOT use unencoded payload");return{payload:Ih(r,VC(n,"payload",V_),t),header:r}}}async function I8(e,t,r){if("string"!=typeof e||0!==e.indexOf("-----BEGIN PUBLIC KEY-----"))throw TypeError('"spki" must be SPKI formatted string');return IU("spki",IH(e,/(?:-----(?:BEGIN|END) PUBLIC KEY-----|\s)/g),t,r)}async function I7(e,t,r){let i;if("string"!=typeof e||0!==e.indexOf("-----BEGIN CERTIFICATE-----"))throw TypeError('"x509" must be X.509 formatted string');try{let t=IH(e,/(?:-----(?:BEGIN|END) CERTIFICATE-----|\s)/g);i=function(e){let t=IW(e);IF(t,48,"Invalid certificate structure");let r=Iz(t);if(r<0||t.pos+r>t.data.length)throw Error("Unexpected end of ASN.1 input");IF(t,48,"Invalid tbsCertificate structure"),Iz(t),160===e[t.pos]?ID(t,6):ID(t,5);let i=t.pos;IF(t,48,"Invalid SPKI structure");let o=Iz(t);return e.subarray(i,i+o+(t.pos-i))}(t)}catch(e){throw TypeError("Failed to parse the X.509 certificate",{cause:e})}return IU("spki",i,t,r)}async function xe(e,t,r){if("string"!=typeof e||0!==e.indexOf("-----BEGIN PRIVATE KEY-----"))throw TypeError('"pkcs8" must be PKCS#8 formatted string');return IU("pkcs8",IH(e,/(?:-----(?:BEGIN|END) PRIVATE KEY-----|\s)/g),t,r)}async function xt(e,t,r){if(!Vq(e))throw TypeError("JWK must be an object");let i=V2(e),o=V4(r?.extractable),{alg:n}=i;if(t??=n,"oct"!==i.kty&&!t)throw TypeError('"alg" argument is required when "jwk.alg" is not present');switch(i.kty){case"oct":if("string"!=typeof i.k)throw TypeError('missing "k" (Key Value) Parameter value');return VR(i.k);case"AKP":if("string"!=typeof n||!n)throw TypeError('missing "alg" (Algorithm) Parameter value');if(t!==n)throw TypeError("JWK alg and alg option value mismatch");return V6(IE(t),i,o);case"RSA":case"EC":case"OKP":return V6(IE(t),i,o);default:throw new Vf('Unsupported "kty" (Key Type) Parameter value')}}function xr(e){let t;if("string"==typeof e){let r=e.split(".");(3===r.length||5===r.length)&&([t]=r)}else if("object"==typeof e&&e)if("protected"in e)t=e.protected;else throw TypeError("Token does not contain a Protected Header");let r="Invalid Token or Protected Header formatting";if("string"!=typeof t||!t)throw TypeError(r);return VO(t,TypeError,r)}function xi(e){let t,r;if("string"!=typeof e)throw new V_("JWTs must use Compact JWS serialization, JWT must be a string");let{1:i,length:o}=e.split(".");if(5===o)throw new V_("Only JWTs using Compact JWS serialization can be decoded");if(3!==o)throw new V_("Invalid JWT");if(!i)throw new V_("JWTs must contain a payload");try{t=VR(i)}catch{throw new V_("Failed to base64url decode the payload")}try{r=JSON.parse(Ve.decode(t))}catch{throw new V_("Failed to parse the decoded payload as JSON")}if(!Vq(r))throw new V_("Invalid JWT Claims Set");return r}async function xo(e,t){let r,i=V4(t?.extractable),o=IE(e,IT);if(o.secret&&IO(IT),o.resolve){let e=t?.crv??"P-256";if(!["P-256","P-384","P-521","X25519"].includes(e))throw new Vf("Invalid or unsupported crv option provided, supported values are P-256, P-384, P-521, and X25519");r=o.resolve({crv:e})}else{if(void 0!==o.crv&&t?.crv!==void 0&&t.crv!==o.crv)throw new Vf(`Invalid or unsupported crv option provided, the only supported value for ${e} is ${o.crv}`);r="RSA"===o.kty[0]?{...o.subtle,publicExponent:Uint8Array.of(1,0,1),modulusLength:function(e){let t=e?.modulusLength??2048;if("number"!=typeof t||!Number.isInteger(t)||t<2048)throw new Vf("Invalid or unsupported modulusLength option provided, 2048 bits or larger keys must be used");return t}(t)}:o.subtle}return crypto.subtle.generateKey(r,i??!1,[...o.usages[1],...o.usages[0]])}async function xn(e,t){let r,i,o,n=V4(t?.extractable);switch(e){case"HS256":case"HS384":case"HS512":r=+e.slice(-3),i={name:"HMAC",hash:`SHA-${r}`,length:r},o=["sign","verify"];break;case"A128CBC-HS256":case"A192CBC-HS384":case"A256CBC-HS512":return crypto.getRandomValues(new Uint8Array(e.slice(-3)>>3));case"A128KW":case"A192KW":case"A256KW":i={name:"AES-KW",length:r=+e.slice(1,4)},o=["wrapKey","unwrapKey"];break;case"A128GCMKW":case"A192GCMKW":case"A256GCMKW":case"A128GCM":case"A192GCM":case"A256GCM":i={name:"AES-GCM",length:r=+e.slice(1,4)},o=["encrypt","decrypt"];break;default:IO(IT)}return crypto.subtle.generateKey(i,n??!1,o)}let xa="WebCryptoAPI";var xs=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;var t=class{};e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var r=class extends t{constructor(t){if(super(),!e.IDENTIFIER.test(t))throw Error("CodeGen: name must be a valid identifier");this.str=t}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};e.Name=r;var i=class extends t{constructor(e){super(),this._items="string"==typeof e?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return""===e||'""'===e}get str(){var e;return null!=(e=this._str)?e:this._str=this._items.reduce((e,t)=>`${e}${t}`,"")}get names(){var e;return null!=(e=this._names)?e:this._names=this._items.reduce((e,t)=>(t instanceof r&&(e[t.str]=(e[t.str]||0)+1),e),{})}};function o(e,...t){let r=[e[0]],n=0;for(;n{Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;let t=xs();var r,i,o=class extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}};(r=i||(e.UsedValueState=i={}))[r.Started=0]="Started",r[r.Completed=1]="Completed",e.varKinds={const:new t.Name("const"),let:new t.Name("let"),var:new t.Name("var")};var n=class{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof t.Name?e:this.name(e)}name(e){return new t.Name(this._newName(e))}_newName(e){let t=this._names[e]||this._nameGroup(e);return`${e}${t.index++}`}_nameGroup(e){var t,r;if((null==(r=null==(t=this._parent)?void 0:t._prefixes)?void 0:r.has(e))||this._prefixes&&!this._prefixes.has(e))throw Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}};e.Scope=n;var a=class extends t.Name{constructor(e,t){super(t),this.prefix=e}setValue(e,{property:r,itemIndex:i}){this.value=e,this.scopePath=(0,t._)`.${new t.Name(r)}[${i}]`}};e.ValueScopeName=a;let s=(0,t._)`\n`;var d=class extends n{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?s:t.nil}}get(){return this._scope}name(e){return new a(e,this._newName(e))}value(e,t){var r;if(void 0===t.ref)throw Error("CodeGen: ref must be passed in value");let i=this.toName(e),{prefix:o}=i,n=null!=(r=t.key)?r:t.ref,a=this._values[o];if(a){let e=a.get(n);if(e)return e}else a=this._values[o]=new Map;a.set(n,i);let s=this._scope[o]||(this._scope[o]=[]),d=s.length;return s[d]=t.ref,i.setValue(t,{property:o,itemIndex:d}),i}getValue(e,t){let r=this._values[e];if(r)return r.get(t)}scopeRefs(e,r=this._values){return this._reduceValues(r,r=>{if(void 0===r.scopePath)throw Error(`CodeGen: name "${r}" has no value`);return(0,t._)`${e}${r.scopePath}`})}scopeCode(e=this._values,t,r){return this._reduceValues(e,e=>{if(void 0===e.value)throw Error(`CodeGen: name "${e}" has no value`);return e.value.code},t,r)}_reduceValues(r,n,a={},s){let d=t.nil;for(let c in r){let l=r[c];if(!l)continue;let p=a[c]=a[c]||new Map;l.forEach(r=>{if(p.has(r))return;p.set(r,i.Started);let a=n(r);if(a){let i=this.opts.es5?e.varKinds.var:e.varKinds.const;d=(0,t._)`${d}${i} ${r} = ${a};${this.opts._n}`}else if(a=null==s?void 0:s(r))d=(0,t._)`${d}${a}${this.opts._n}`;else throw new o(r);p.set(r,i.Completed)})}return d}};e.ValueScope=d}),xc=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;let t=xs(),r=xd();var i=xs();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return i._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return i.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return i.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return i.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return i.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return i.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return i.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return i.Name}});var o=xd();Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return o.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return o.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return o.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return o.varKinds}}),e.operators={GT:new t._Code(">"),GTE:new t._Code(">="),LT:new t._Code("<"),LTE:new t._Code("<="),EQ:new t._Code("==="),NEQ:new t._Code("!=="),NOT:new t._Code("!"),OR:new t._Code("||"),AND:new t._Code("&&"),ADD:new t._Code("+")};var n=class{optimizeNodes(){return this}optimizeNames(e,t){return this}},a=class extends n{constructor(e,t,r){super(),this.varKind=e,this.name=t,this.rhs=r}render({es5:e,_n:t}){let i=e?r.varKinds.var:this.varKind,o=void 0===this.rhs?"":` = ${this.rhs}`;return`${i} ${this.name}${o};`+t}optimizeNames(e,t){if(e[this.name.str])return this.rhs&&(this.rhs=x(this.rhs,e,t)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}},s=class extends n{constructor(e,t,r){super(),this.lhs=e,this.rhs=t,this.sideEffects=r}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,r){if(!(this.lhs instanceof t.Name)||e[this.lhs.str]||this.sideEffects)return this.rhs=x(this.rhs,e,r),this}get names(){return I(this.lhs instanceof t.Name?{}:{...this.lhs.names},this.rhs)}},d=class extends s{constructor(e,t,r,i){super(e,r,i),this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}},c=class extends n{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}},l=class extends n{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}},p=class extends n{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}},u=class extends n{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=x(this.code,e,t),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}},m=class extends n{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce((t,r)=>t+r.render(e),"")}optimizeNodes(){let{nodes:e}=this,t=e.length;for(;t--;){let r=e[t].optimizeNodes();Array.isArray(r)?e.splice(t,1,...r):r?e[t]=r:e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){let{nodes:r}=this,i=r.length;for(;i--;){let o=r[i];o.optimizeNames(e,t)||(function(e,t){for(let r in t)e[r]=(e[r]||0)-(t[r]||0)}(e,o.names),r.splice(i,1))}return r.length>0?this:void 0}get names(){return this.nodes.reduce((e,t)=>q(e,t.names),{})}},f=class extends m{render(e){return"{"+e._n+super.render(e)+"}"+e._n}},h=class extends m{},y=class extends f{};y.kind="else";var g=class e extends f{constructor(e,t){super(t),this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);return this.else&&(t+="else "+this.else.render(e)),t}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(!0===t)return this.nodes;let r=this.else;if(r){let e=r.optimizeNodes();r=this.else=Array.isArray(e)?new y(e):e}return r?!1===t?r instanceof e?r:r.nodes:this.nodes.length?this:new e(j(t),r instanceof e?[r]:r.nodes):!1!==t&&this.nodes.length?this:void 0}optimizeNames(e,t){var r;if(this.else=null==(r=this.else)?void 0:r.optimizeNames(e,t),super.optimizeNames(e,t)||this.else)return this.condition=x(this.condition,e,t),this}get names(){let e=super.names;return I(e,this.condition),this.else&&q(e,this.else.names),e}};g.kind="if";var _=class extends f{};_.kind="for";var v=class extends _{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iteration=x(this.iteration,e,t),this}get names(){return q(super.names,this.iteration.names)}},b=class extends _{constructor(e,t,r,i){super(),this.varKind=e,this.name=t,this.from=r,this.to=i}render(e){let t=e.es5?r.varKinds.var:this.varKind,{name:i,from:o,to:n}=this;return`for(${t} ${i}=${o}; ${i}<${n}; ${i}++)`+super.render(e)}get names(){return I(I(super.names,this.from),this.to)}},$=class extends _{constructor(e,t,r,i){super(),this.loop=e,this.varKind=t,this.name=r,this.iterable=i}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iterable=x(this.iterable,e,t),this}get names(){return q(super.names,this.iterable.names)}},S=class extends f{constructor(e,t,r){super(),this.name=e,this.args=t,this.async=r}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}};S.kind="func";var k=class extends m{render(e){return"return "+super.render(e)}};k.kind="return";var w=class extends f{render(e){let t="try"+super.render(e);return this.catch&&(t+=this.catch.render(e)),this.finally&&(t+=this.finally.render(e)),t}optimizeNodes(){var e,t;return super.optimizeNodes(),null==(e=this.catch)||e.optimizeNodes(),null==(t=this.finally)||t.optimizeNodes(),this}optimizeNames(e,t){var r,i;return super.optimizeNames(e,t),null==(r=this.catch)||r.optimizeNames(e,t),null==(i=this.finally)||i.optimizeNames(e,t),this}get names(){let e=super.names;return this.catch&&q(e,this.catch.names),this.finally&&q(e,this.finally.names),e}},R=class extends f{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}};R.kind="catch";var P=class extends f{render(e){return"finally"+super.render(e)}};P.kind="finally";var V=class{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?"\n":""},this._extScope=e,this._scope=new r.Scope({parent:e}),this._nodes=[new h]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){let r=this._extScope.value(e,t);return(this._values[r.prefix]||(this._values[r.prefix]=new Set)).add(r),r}getScopeValue(e,t){return this._extScope.getValue(e,t)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,t,r,i){let o=this._scope.toName(t);return void 0!==r&&i&&(this._constants[o.str]=r),this._leafNode(new a(e,o,r)),o}const(e,t,i){return this._def(r.varKinds.const,e,t,i)}let(e,t,i){return this._def(r.varKinds.let,e,t,i)}var(e,t,i){return this._def(r.varKinds.var,e,t,i)}assign(e,t,r){return this._leafNode(new s(e,t,r))}add(t,r){return this._leafNode(new d(t,e.operators.ADD,r))}code(e){return"function"==typeof e?e():e!==t.nil&&this._leafNode(new u(e)),this}object(...e){let r=["{"];for(let[i,o]of e)r.length>1&&r.push(","),r.push(i),(i!==o||this.opts.es5)&&(r.push(":"),(0,t.addCodeArg)(r,o));return r.push("}"),new t._Code(r)}if(e,t,r){if(this._blockNode(new g(e)),t&&r)this.code(t).else().code(r).endIf();else if(t)this.code(t).endIf();else if(r)throw Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new g(e))}else(){return this._elseNode(new y)}endIf(){return this._endBlockNode(g,y)}_for(e,t){return this._blockNode(e),t&&this.code(t).endFor(),this}for(e,t){return this._for(new v(e),t)}forRange(e,t,i,o,n=this.opts.es5?r.varKinds.var:r.varKinds.let){let a=this._scope.toName(e);return this._for(new b(n,a,t,i),()=>o(a))}forOf(e,i,o,n=r.varKinds.const){let a=this._scope.toName(e);if(this.opts.es5){let e=i instanceof t.Name?i:this.var("_arr",i);return this.forRange("_i",0,(0,t._)`${e}.length`,r=>{this.var(a,(0,t._)`${e}[${r}]`),o(a)})}return this._for(new $("of",n,a,i),()=>o(a))}forIn(e,i,o,n=this.opts.es5?r.varKinds.var:r.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,t._)`Object.keys(${i})`,o);let a=this._scope.toName(e);return this._for(new $("in",n,a,i),()=>o(a))}endFor(){return this._endBlockNode(_)}label(e){return this._leafNode(new c(e))}break(e){return this._leafNode(new l(e))}return(e){let t=new k;if(this._blockNode(t),this.code(e),1!==t.nodes.length)throw Error('CodeGen: "return" should have one node');return this._endBlockNode(k)}try(e,t,r){if(!t&&!r)throw Error('CodeGen: "try" without "catch" and "finally"');let i=new w;if(this._blockNode(i),this.code(e),t){let e=this.name("e");this._currNode=i.catch=new R(e),t(e)}return r&&(this._currNode=i.finally=new P,this.code(r)),this._endBlockNode(R,P)}throw(e){return this._leafNode(new p(e))}block(e,t){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(t),this}endBlock(e){let t=this._blockStarts.pop();if(void 0===t)throw Error("CodeGen: not in self-balancing block");let r=this._nodes.length-t;if(r<0||void 0!==e&&r!==e)throw Error(`CodeGen: wrong number of nodes: ${r} vs ${e} expected`);return this._nodes.length=t,this}func(e,r=t.nil,i,o){return this._blockNode(new S(e,r,i)),o&&this.code(o).endFunc(),this}endFunc(){return this._endBlockNode(S)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,t){let r=this._currNode;if(r instanceof e||t&&r instanceof t)return this._nodes.pop(),this;throw Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){let t=this._currNode;if(!(t instanceof g))throw Error('CodeGen: "else" without "if"');return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let t=this._nodes;t[t.length-1]=e}};function q(e,t){for(let r in t)e[r]=(e[r]||0)+(t[r]||0);return e}function I(e,r){return r instanceof t._CodeOrName?q(e,r.names):e}function x(e,r,i){var o;if(e instanceof t.Name)return n(e);if(!((o=e)instanceof t._Code&&o._items.some(e=>e instanceof t.Name&&1===r[e.str]&&void 0!==i[e.str])))return e;return new t._Code(e._items.reduce((e,r)=>(r instanceof t.Name&&(r=n(r)),r instanceof t._Code?e.push(...r._items):e.push(r),e),[]));function n(e){let t=i[e.str];return void 0===t||1!==r[e.str]?e:(delete r[e.str],t)}}function j(e){return"boolean"==typeof e||"number"==typeof e||null===e?!e:(0,t._)`!${E(e)}`}e.CodeGen=V,e.not=j;let C=O(e.operators.AND);e.and=function(...e){return e.reduce(C)};let T=O(e.operators.OR);function O(e){return(r,i)=>r===t.nil?i:i===t.nil?r:(0,t._)`${E(r)} ${e} ${E(i)}`}function E(e){return e instanceof t.Name?e:(0,t._)`(${e})`}e.or=function(...e){return e.reduce(T)}}),xl=SP(e=>{var t,r;Object.defineProperty(e,"__esModule",{value:!0}),e.checkStrictMode=e.getErrorPath=e.Type=e.useFunc=e.setEvaluated=e.evaluatedPropsToName=e.mergeEvaluated=e.eachItem=e.unescapeJsonPointer=e.escapeJsonPointer=e.escapeFragment=e.unescapeFragment=e.schemaRefOrVal=e.schemaHasRulesButRef=e.schemaHasRules=e.checkUnknownRules=e.alwaysValidSchema=e.toHash=void 0;let i=xc(),o=xs();function n(e,t=e.schema){let{opts:r,self:i}=e;if(!r.strictSchema||"boolean"==typeof t)return;let o=i.RULES.keywords;for(let r in t)o[r]||m(e,`unknown keyword: "${r}"`)}function a(e,t){if("boolean"==typeof e)return!e;for(let r in e)if(t[r])return!0;return!1}function s(e){return"number"==typeof e?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}function d(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function c({mergeNames:e,mergeToName:t,mergeValues:r,resultToName:o}){return(n,a,s,d)=>{let c=void 0===s?a:s instanceof i.Name?(a instanceof i.Name?e(n,a,s):t(n,a,s),s):a instanceof i.Name?(t(n,s,a),a):r(a,s);return d!==i.Name||c instanceof i.Name?c:o(n,c)}}function l(e,t){if(!0===t)return e.var("props",!0);let r=e.var("props",(0,i._)`{}`);return void 0!==t&&p(e,r,t),r}function p(e,t,r){Object.keys(r).forEach(r=>e.assign((0,i._)`${t}${(0,i.getProperty)(r)}`,!0))}e.toHash=function(e){let t={};for(let r of e)t[r]=!0;return t},e.alwaysValidSchema=function(e,t){return"boolean"==typeof t?t:0===Object.keys(t).length||(n(e,t),!a(t,e.self.RULES.all))},e.checkUnknownRules=n,e.schemaHasRules=a,e.schemaHasRulesButRef=function(e,t){if("boolean"==typeof e)return!e;for(let r in e)if("$ref"!==r&&t.all[r])return!0;return!1},e.schemaRefOrVal=function({topSchemaRef:e,schemaPath:t},r,o,n){if(!n){if("number"==typeof r||"boolean"==typeof r)return r;if("string"==typeof r)return(0,i._)`${r}`}return(0,i._)`${e}${t}${(0,i.getProperty)(o)}`},e.unescapeFragment=function(e){return d(decodeURIComponent(e))},e.escapeFragment=function(e){return encodeURIComponent(s(e))},e.escapeJsonPointer=s,e.unescapeJsonPointer=d,e.eachItem=function(e,t){if(Array.isArray(e))for(let r of e)t(r);else t(e)},e.mergeEvaluated={props:c({mergeNames:(e,t,r)=>e.if((0,i._)`${r} !== true && ${t} !== undefined`,()=>{e.if((0,i._)`${t} === true`,()=>e.assign(r,!0),()=>e.assign(r,(0,i._)`${r} || {}`).code((0,i._)`Object.assign(${r}, ${t})`))}),mergeToName:(e,t,r)=>e.if((0,i._)`${r} !== true`,()=>{!0===t?e.assign(r,!0):(e.assign(r,(0,i._)`${r} || {}`),p(e,r,t))}),mergeValues:(e,t)=>!0===e||{...e,...t},resultToName:l}),items:c({mergeNames:(e,t,r)=>e.if((0,i._)`${r} !== true && ${t} !== undefined`,()=>e.assign(r,(0,i._)`${t} === true ? true : ${r} > ${t} ? ${r} : ${t}`)),mergeToName:(e,t,r)=>e.if((0,i._)`${r} !== true`,()=>e.assign(r,!0===t||(0,i._)`${r} > ${t} ? ${r} : ${t}`)),mergeValues:(e,t)=>!0===e||Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})},e.evaluatedPropsToName=l,e.setEvaluated=p;let u={};function m(e,t,r=e.opts.strictSchema){if(r){if(t=`strict mode: ${t}`,!0===r)throw Error(t);e.self.logger.warn(t)}}e.useFunc=function(e,t){return e.scopeValue("func",{ref:t,code:u[t.code]||(u[t.code]=new o._Code(t.code))})},(r=t||(e.Type=t={}))[r.Num=0]="Num",r[r.Str=1]="Str",e.getErrorPath=function(e,r,o){if(e instanceof i.Name){let n=r===t.Num;return o?n?(0,i._)`"[" + ${e} + "]"`:(0,i._)`"['" + ${e} + "']"`:n?(0,i._)`"/" + ${e}`:(0,i._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return o?(0,i.getProperty)(e).toString():"/"+s(e)},e.checkStrictMode=m}),xp=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xc();e.default={data:new t.Name("data"),valCxt:new t.Name("valCxt"),instancePath:new t.Name("instancePath"),parentData:new t.Name("parentData"),parentDataProperty:new t.Name("parentDataProperty"),rootData:new t.Name("rootData"),dynamicAnchors:new t.Name("dynamicAnchors"),vErrors:new t.Name("vErrors"),errors:new t.Name("errors"),this:new t.Name("this"),self:new t.Name("self"),scope:new t.Name("scope"),json:new t.Name("json"),jsonPos:new t.Name("jsonPos"),jsonLen:new t.Name("jsonLen"),jsonPart:new t.Name("jsonPart")}}),xu=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;let t=xc(),r=xl(),i=xp();function o(e,r){let o=e.const("err",r);e.if((0,t._)`${i.default.vErrors} === null`,()=>e.assign(i.default.vErrors,(0,t._)`[${o}]`),(0,t._)`${i.default.vErrors}.push(${o})`),e.code((0,t._)`${i.default.errors}++`)}function n(e,r){let{gen:i,validateName:o,schemaEnv:n}=e;n.$async?i.throw((0,t._)`new ${e.ValidationError}(${r})`):(i.assign((0,t._)`${o}.errors`,r),i.return(!1))}e.keywordError={message:({keyword:e})=>(0,t.str)`must pass "${e}" keyword validation`},e.keyword$DataError={message:({keyword:e,schemaType:r})=>r?(0,t.str)`"${e}" keyword must be ${r} ($data)`:(0,t.str)`"${e}" keyword is invalid ($data)`},e.reportError=function(r,i=e.keywordError,a,d){let{it:c}=r,{gen:l,compositeRule:p,allErrors:u}=c,m=s(r,i,a);(null!=d?d:p||u)?o(l,m):n(c,(0,t._)`[${m}]`)},e.reportExtraError=function(t,r=e.keywordError,a){let{it:d}=t,{gen:c,compositeRule:l,allErrors:p}=d;o(c,s(t,r,a)),l||p||n(d,i.default.vErrors)},e.resetErrorsCount=function(e,r){e.assign(i.default.errors,r),e.if((0,t._)`${i.default.vErrors} !== null`,()=>e.if(r,()=>e.assign((0,t._)`${i.default.vErrors}.length`,r),()=>e.assign(i.default.vErrors,null)))},e.extendErrors=function({gen:e,keyword:r,schemaValue:o,data:n,errsCount:a,it:s}){if(void 0===a)throw Error("ajv implementation error");let d=e.name("err");e.forRange("i",a,i.default.errors,a=>{e.const(d,(0,t._)`${i.default.vErrors}[${a}]`),e.if((0,t._)`${d}.instancePath === undefined`,()=>e.assign((0,t._)`${d}.instancePath`,(0,t.strConcat)(i.default.instancePath,s.errorPath))),e.assign((0,t._)`${d}.schemaPath`,(0,t.str)`${s.errSchemaPath}/${r}`),s.opts.verbose&&(e.assign((0,t._)`${d}.schema`,o),e.assign((0,t._)`${d}.data`,n))})};let a={keyword:new t.Name("keyword"),schemaPath:new t.Name("schemaPath"),params:new t.Name("params"),propertyName:new t.Name("propertyName"),message:new t.Name("message"),schema:new t.Name("schema"),parentSchema:new t.Name("parentSchema")};function s(e,o,n){let{createErrors:s}=e.it;return!1===s?(0,t._)`{}`:function(e,o,n={}){let{gen:s,it:d}=e,c=[function({errorPath:e},{instancePath:o}){let n=o?(0,t.str)`${e}${(0,r.getErrorPath)(o,r.Type.Str)}`:e;return[i.default.instancePath,(0,t.strConcat)(i.default.instancePath,n)]}(d,n),function({keyword:e,it:{errSchemaPath:i}},{schemaPath:o,parentSchema:n}){let s=n?i:(0,t.str)`${i}/${e}`;return o&&(s=(0,t.str)`${s}${(0,r.getErrorPath)(o,r.Type.Str)}`),[a.schemaPath,s]}(e,n)];return function(e,{params:r,message:o},n){let{keyword:s,data:d,schemaValue:c,it:l}=e,{opts:p,propertyName:u,topSchemaRef:m,schemaPath:f}=l;n.push([a.keyword,s],[a.params,"function"==typeof r?r(e):r||(0,t._)`{}`]),p.messages&&n.push([a.message,"function"==typeof o?o(e):o]),p.verbose&&n.push([a.schema,c],[a.parentSchema,(0,t._)`${m}${f}`],[i.default.data,d]),u&&n.push([a.propertyName,u])}(e,o,c),s.object(...c)}(e,o,n)}}),xm=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.boolOrEmptySchema=e.topBoolOrEmptySchema=void 0;let t=xu(),r=xc(),i=xp(),o={message:"boolean schema is false"};function n(e,r){let{gen:i,data:n}=e;(0,t.reportError)({gen:i,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e},o,void 0,r)}e.topBoolOrEmptySchema=function(e){let{gen:t,schema:o,validateName:a}=e;!1===o?n(e,!1):"object"==typeof o&&!0===o.$async?t.return(i.default.data):(t.assign((0,r._)`${a}.errors`,null),t.return(!0))},e.boolOrEmptySchema=function(e,t){let{gen:r,schema:i}=e;!1===i?(r.var(t,!1),n(e)):r.var(t,!0)}}),xf=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getRules=e.isJSONType=void 0;let t=new Set(["string","number","integer","boolean","null","object","array"]);e.isJSONType=function(e){return"string"==typeof e&&t.has(e)},e.getRules=function(){let e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}}),xh=SP(e=>{function t(e,t){return t.rules.some(t=>r(e,t))}function r(e,t){var r;return void 0!==e[t.keyword]||(null==(r=t.definition.implements)?void 0:r.some(t=>void 0!==e[t]))}Object.defineProperty(e,"__esModule",{value:!0}),e.shouldUseRule=e.shouldUseGroup=e.schemaHasRulesForType=void 0,e.schemaHasRulesForType=function({schema:e,self:r},i){let o=r.RULES.types[i];return o&&!0!==o&&t(e,o)},e.shouldUseGroup=t,e.shouldUseRule=r}),xy=SP(e=>{var t,r;Object.defineProperty(e,"__esModule",{value:!0}),e.reportTypeError=e.checkDataTypes=e.checkDataType=e.coerceAndCheckDataType=e.getJSONTypes=e.getSchemaTypes=e.DataType=void 0;let i=xf(),o=xh(),n=xu(),a=xc(),s=xl();function d(e){let t=Array.isArray(e)?e:e?[e]:[];if(t.every(i.isJSONType))return t;throw Error("type must be JSONType or JSONType[]: "+t.join(","))}(r=t||(e.DataType=t={}))[r.Correct=0]="Correct",r[r.Wrong=1]="Wrong",e.getSchemaTypes=function(e){let t=d(e.type);if(t.includes("null")){if(!1===e.nullable)throw Error("type: null contradicts nullable: false")}else{if(!t.length&&void 0!==e.nullable)throw Error('"nullable" cannot be used without "type"');!0===e.nullable&&t.push("null")}return t},e.getJSONTypes=d,e.coerceAndCheckDataType=function(e,r){var i,n;let{gen:s,data:d,opts:l}=e,u=(i=r,(n=l.coerceTypes)?i.filter(e=>c.has(e)||"array"===n&&"array"===e):[]),f=r.length>0&&!(0===u.length&&1===r.length&&(0,o.schemaHasRulesForType)(e,r[0]));if(f){let i=p(r,d,l.strictNumbers,t.Wrong);s.if(i,()=>{u.length?function(e,t,r){let{gen:i,data:o,opts:n}=e,s=i.let("dataType",(0,a._)`typeof ${o}`),d=i.let("coerced",(0,a._)`undefined`);for(let e of("array"===n.coerceTypes&&i.if((0,a._)`${s} == 'object' && Array.isArray(${o}) && ${o}.length == 1`,()=>i.assign(o,(0,a._)`${o}[0]`).assign(s,(0,a._)`typeof ${o}`).if(p(t,o,n.strictNumbers),()=>i.assign(d,o))),i.if((0,a._)`${d} !== undefined`),r))(c.has(e)||"array"===e&&"array"===n.coerceTypes)&&function(e){switch(e){case"string":i.elseIf((0,a._)`${s} == "number" || ${s} == "boolean"`).assign(d,(0,a._)`"" + ${o}`).elseIf((0,a._)`${o} === null`).assign(d,(0,a._)`""`);return;case"number":i.elseIf((0,a._)`${s} == "boolean" || ${o} === null || (${s} == "string" && ${o} && ${o} == +${o})`).assign(d,(0,a._)`+${o}`);return;case"integer":i.elseIf((0,a._)`${s} === "boolean" || ${o} === null || (${s} === "string" && ${o} && ${o} == +${o} && !(${o} % 1))`).assign(d,(0,a._)`+${o}`);return;case"boolean":i.elseIf((0,a._)`${o} === "false" || ${o} === 0 || ${o} === null`).assign(d,!1).elseIf((0,a._)`${o} === "true" || ${o} === 1`).assign(d,!0);return;case"null":i.elseIf((0,a._)`${o} === "" || ${o} === 0 || ${o} === false`),i.assign(d,null);return;case"array":i.elseIf((0,a._)`${s} === "string" || ${s} === "number" - || ${s} === "boolean" || ${o} === null`).assign(d,(0,a._)`[${o}]`)}}(e);i.else(),m(e),i.endIf(),i.if((0,a._)`${d} !== undefined`,()=>{i.assign(o,d),function({gen:e,parentData:t,parentDataProperty:r},i){e.if((0,a._)`${t} !== undefined`,()=>e.assign((0,a._)`${t}[${r}]`,i))}(e,d)})}(e,r,u):m(e)})}return f};let c=new Set(["string","number","integer","boolean","null"]);function l(e,r,i,o=t.Correct){let n,s=o===t.Correct?a.operators.EQ:a.operators.NEQ;switch(e){case"null":return(0,a._)`${r} ${s} null`;case"array":n=(0,a._)`Array.isArray(${r})`;break;case"object":n=(0,a._)`${r} && typeof ${r} == "object" && !Array.isArray(${r})`;break;case"integer":n=d((0,a._)`!(${r} % 1) && !isNaN(${r})`);break;case"number":n=d();break;default:return(0,a._)`typeof ${r} ${s} ${e}`}return o===t.Correct?n:(0,a.not)(n);function d(e=a.nil){return(0,a.and)((0,a._)`typeof ${r} == "number"`,e,i?(0,a._)`isFinite(${r})`:a.nil)}}function p(e,t,r,i){let o;if(1===e.length)return l(e[0],t,r,i);let n=(0,s.toHash)(e);if(n.array&&n.object){let e=(0,a._)`typeof ${t} != "object"`;o=n.null?e:(0,a._)`!${t} || ${e}`,delete n.null,delete n.array,delete n.object}else o=a.nil;for(let e in n.number&&delete n.integer,n)o=(0,a.and)(o,l(e,t,r,i));return o}e.checkDataType=l,e.checkDataTypes=p;let u={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>"string"==typeof e?(0,a._)`{type: ${e}}`:(0,a._)`{type: ${t}}`};function m(e){let t=function(e){let{gen:t,data:r,schema:i}=e,o=(0,s.schemaRefOrVal)(e,i,"type");return{gen:t,keyword:"type",data:r,schema:i.type,schemaCode:o,schemaValue:o,parentSchema:i,params:{},it:e}}(e);(0,n.reportError)(t,u)}e.reportTypeError=m}),xG=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.assignDefaults=void 0;let t=xM(),r=xN();function i(e,i,o){let{gen:n,compositeRule:a,data:s,opts:d}=e;if(void 0===o)return;let c=(0,t._)`${s}${(0,t.getProperty)(i)}`;if(a)return void(0,r.checkStrictMode)(e,`default is ignored for: ${c}`);let l=(0,t._)`${c} === undefined`;"empty"===d.useDefaults&&(l=(0,t._)`${l} || ${c} === null || ${c} === ""`),n.if(l,(0,t._)`${c} = ${(0,t.stringify)(o)}`)}e.assignDefaults=function(e,t){let{properties:r,items:o}=e.schema;if("object"===t&&r)for(let t in r)i(e,t,r[t].default);else"array"===t&&Array.isArray(o)&&o.forEach((t,r)=>i(e,r,t.default))}}),xB=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateUnion=e.validateArray=e.usePattern=e.callValidateCode=e.schemaProperties=e.allSchemaProperties=e.noPropertyInData=e.propertyInData=e.isOwnProperty=e.hasPropFunc=e.reportMissingProp=e.checkMissingProp=e.checkReportMissingProp=void 0;let t=xM(),r=xN(),i=xz(),o=xN();function n(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,t._)`Object.prototype.hasOwnProperty`})}function a(e,r,i){return(0,t._)`${n(e)}.call(${r}, ${i})`}function s(e,r,i,o){let n=(0,t._)`${r}${(0,t.getProperty)(i)} === undefined`;return o?(0,t.or)(n,(0,t.not)(a(e,r,i))):n}function d(e){return e?Object.keys(e).filter(e=>"__proto__"!==e):[]}e.checkReportMissingProp=function(e,r){let{gen:i,data:o,it:n}=e;i.if(s(i,o,r,n.opts.ownProperties),()=>{e.setParams({missingProperty:(0,t._)`${r}`},!0),e.error()})},e.checkMissingProp=function({gen:e,data:r,it:{opts:i}},o,n){return(0,t.or)(...o.map(o=>(0,t.and)(s(e,r,o,i.ownProperties),(0,t._)`${n} = ${o}`)))},e.reportMissingProp=function(e,t){e.setParams({missingProperty:t},!0),e.error()},e.hasPropFunc=n,e.isOwnProperty=a,e.propertyInData=function(e,r,i,o){let n=(0,t._)`${r}${(0,t.getProperty)(i)} !== undefined`;return o?(0,t._)`${n} && ${a(e,r,i)}`:n},e.noPropertyInData=s,e.allSchemaProperties=d,e.schemaProperties=function(e,t){return d(t).filter(i=>!(0,r.alwaysValidSchema)(e,t[i]))},e.callValidateCode=function({schemaCode:e,data:r,it:{gen:o,topSchemaRef:n,schemaPath:a,errorPath:s},it:d},c,l,p){let u=p?(0,t._)`${e}, ${r}, ${n}${a}`:r,m=[[i.default.instancePath,(0,t.strConcat)(i.default.instancePath,s)],[i.default.parentData,d.parentData],[i.default.parentDataProperty,d.parentDataProperty],[i.default.rootData,i.default.rootData]];d.opts.dynamicRef&&m.push([i.default.dynamicAnchors,i.default.dynamicAnchors]);let f=(0,t._)`${u}, ${o.object(...m)}`;return l!==t.nil?(0,t._)`${c}.call(${l}, ${f})`:(0,t._)`${c}(${f})`};let c=(0,t._)`new RegExp`;e.usePattern=function({gen:e,it:{opts:r}},i){let n=r.unicodeRegExp?"u":"",{regExp:a}=r.code,s=a(i,n);return e.scopeValue("pattern",{key:s.toString(),ref:s,code:(0,t._)`${"new RegExp"===a.code?c:(0,o.useFunc)(e,a)}(${i}, ${n})`})},e.validateArray=function(e){let{gen:i,data:o,keyword:n,it:a}=e,s=i.name("valid");if(a.allErrors){let e=i.let("valid",!0);return d(()=>i.assign(e,!1)),e}return i.var(s,!0),d(()=>i.break()),s;function d(a){let d=i.const("len",(0,t._)`${o}.length`);i.forRange("i",0,d,o=>{e.subschema({keyword:n,dataProp:o,dataPropType:r.Type.Num},s),i.if((0,t.not)(s),a)})}},e.validateUnion=function(e){let{gen:i,schema:o,keyword:n,it:a}=e;if(!Array.isArray(o))throw Error("ajv implementation error");if(o.some(e=>(0,r.alwaysValidSchema)(a,e))&&!a.opts.unevaluated)return;let s=i.let("valid",!1),d=i.name("_valid");i.block(()=>o.forEach((r,o)=>{let a=e.subschema({keyword:n,schemaProp:o,compositeRule:!0},d);i.assign(s,(0,t._)`${s} || ${d}`),e.mergeValidEvaluated(a,d)||i.if((0,t.not)(s))})),e.result(s,()=>e.reset(),()=>e.error(!0))}}),xK=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateKeywordUsage=e.validSchemaType=e.funcKeywordCode=e.macroKeywordCode=void 0;let t=xM(),r=xz(),i=xB(),o=xD();function n(e){let{gen:r,data:i,it:o}=e;r.if(o.parentData,()=>r.assign(i,(0,t._)`${o.parentData}[${o.parentDataProperty}]`))}function a(e,r,i){if(void 0===i)throw Error(`keyword "${r}" failed to compile`);return e.scopeValue("keyword","function"==typeof i?{ref:i}:{ref:i,code:(0,t.stringify)(i)})}e.macroKeywordCode=function(e,r){let{gen:i,keyword:o,schema:n,parentSchema:s,it:d}=e,c=r.macro.call(d.self,n,s,d),l=a(i,o,c);!1!==d.opts.validateSchema&&d.self.validateSchema(c,!0);let p=i.name("valid");e.subschema({schema:c,schemaPath:t.nil,errSchemaPath:`${d.errSchemaPath}/${o}`,topSchemaRef:l,compositeRule:!0},p),e.pass(p,()=>e.error(!0))},e.funcKeywordCode=function(e,s){var d;let{gen:c,keyword:l,schema:p,parentSchema:u,$data:m,it:f}=e;!function({schemaEnv:e},t){if(t.async&&!e.$async)throw Error("async keyword in sync schema")}(f,s);let h=a(c,l,!m&&s.compile?s.compile.call(f.self,p,u,f):s.validate),y=c.let("valid");function g(o=s.async?(0,t._)`await `:t.nil){let n=f.opts.passContext?r.default.this:r.default.self,a=!("compile"in s&&!m||!1===s.schema);c.assign(y,(0,t._)`${o}${(0,i.callValidateCode)(e,h,n,a)}`,s.modifying)}function _(e){var r;c.if((0,t.not)(null!=(r=s.valid)?r:y),e)}e.block$data(y,function(){if(!1===s.errors)g(),s.modifying&&n(e),_(()=>e.error());else{let i,a,d=s.async?(i=c.let("ruleErrs",null),c.try(()=>g((0,t._)`await `),e=>c.assign(y,!1).if((0,t._)`${e} instanceof ${f.ValidationError}`,()=>c.assign(i,(0,t._)`${e}.errors`),()=>c.throw(e))),i):(a=(0,t._)`${h}.errors`,c.assign(a,null),g(t.nil),a);s.modifying&&n(e),_(()=>(function(e,i){let{gen:n}=e;n.if((0,t._)`Array.isArray(${i})`,()=>{n.assign(r.default.vErrors,(0,t._)`${r.default.vErrors} === null ? ${i} : ${r.default.vErrors}.concat(${i})`).assign(r.default.errors,(0,t._)`${r.default.vErrors}.length`),(0,o.extendErrors)(e)},()=>e.error())})(e,d))}}),e.ok(null!=(d=s.valid)?d:y)},e.validSchemaType=function(e,t,r=!1){return!t.length||t.some(t=>"array"===t?Array.isArray(e):"object"===t?e&&"object"==typeof e&&!Array.isArray(e):typeof e==t||r&&void 0===e)},e.validateKeywordUsage=function({schema:e,opts:t,self:r,errSchemaPath:i},o,n){if(Array.isArray(o.keyword)?!o.keyword.includes(n):o.keyword!==n)throw Error("ajv implementation error");let a=o.dependencies;if(null==a?void 0:a.some(t=>!Object.prototype.hasOwnProperty.call(e,t)))throw Error(`parent schema must have dependencies of ${n}: ${a.join(",")}`);if(o.validateSchema&&!o.validateSchema(e[n])){let e=`keyword "${n}" value is invalid at path "${i}": `+r.errorsText(o.validateSchema.errors);if("log"===t.validateSchema)r.logger.error(e);else throw Error(e)}}}),xJ=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.extendSubschemaMode=e.extendSubschemaData=e.getSubschema=void 0;let t=xM(),r=xN();e.getSubschema=function(e,{keyword:i,schemaProp:o,schema:n,schemaPath:a,errSchemaPath:s,topSchemaRef:d}){if(void 0!==i&&void 0!==n)throw Error('both "keyword" and "schema" passed, only one allowed');if(void 0!==i){let n=e.schema[i];return void 0===o?{schema:n,schemaPath:(0,t._)`${e.schemaPath}${(0,t.getProperty)(i)}`,errSchemaPath:`${e.errSchemaPath}/${i}`}:{schema:n[o],schemaPath:(0,t._)`${e.schemaPath}${(0,t.getProperty)(i)}${(0,t.getProperty)(o)}`,errSchemaPath:`${e.errSchemaPath}/${i}/${(0,r.escapeFragment)(o)}`}}if(void 0!==n){if(void 0===a||void 0===s||void 0===d)throw Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:n,schemaPath:a,topSchemaRef:d,errSchemaPath:s}}throw Error('either "keyword" or "schema" must be passed')},e.extendSubschemaData=function(e,i,{dataProp:o,dataPropType:n,data:a,dataTypes:s,propertyName:d}){if(void 0!==a&&void 0!==o)throw Error('both "data" and "dataProp" passed, only one allowed');let{gen:c}=i;if(void 0!==o){let{errorPath:a,dataPathArr:s,opts:d}=i;l(c.let("data",(0,t._)`${i.data}${(0,t.getProperty)(o)}`,!0)),e.errorPath=(0,t.str)`${a}${(0,r.getErrorPath)(o,n,d.jsPropertySyntax)}`,e.parentDataProperty=(0,t._)`${o}`,e.dataPathArr=[...s,e.parentDataProperty]}function l(t){e.data=t,e.dataLevel=i.dataLevel+1,e.dataTypes=[],i.definedProperties=new Set,e.parentData=i.data,e.dataNames=[...i.dataNames,t]}void 0!==a&&(l(a instanceof t.Name?a:c.let("data",a,!0)),void 0!==d&&(e.propertyName=d)),s&&(e.dataTypes=s)},e.extendSubschemaMode=function(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:i,createErrors:o,allErrors:n}){void 0!==i&&(e.compositeRule=i),void 0!==o&&(e.createErrors=o),void 0!==n&&(e.allErrors=n),e.jtdDiscriminator=t,e.jtdMetadata=r}}),xZ=S0((e,t)=>{t.exports=function e(t,r){if(t===r)return!0;if(t&&r&&"object"==typeof t&&"object"==typeof r){if(t.constructor!==r.constructor)return!1;if(Array.isArray(t)){if((i=t.length)!=r.length)return!1;for(o=i;0!=o--;)if(!e(t[o],r[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if((i=(n=Object.keys(t)).length)!==Object.keys(r).length)return!1;for(o=i;0!=o--;)if(!Object.prototype.hasOwnProperty.call(r,n[o]))return!1;for(o=i;0!=o--;){var i,o,n,a=n[o];if(!e(t[a],r[a]))return!1}return!0}return t!=t&&r!=r}}),xQ=S0((e,t)=>{var r=t.exports=function(e,t,i){"function"==typeof t&&(i=t,t={});var o="function"==typeof(i=t.cb||i)?i:i.pre||function(){};!function e(t,i,o,n,a,s,d,c,l,p){if(n&&"object"==typeof n&&!Array.isArray(n)){for(var u in i(n,a,s,d,c,l,p),n){var m=n[u];if(Array.isArray(m)){if(u in r.arrayKeywords)for(var f=0;f{Object.defineProperty(e,"__esModule",{value:!0}),e.getSchemaRefs=e.resolveUrl=e.normalizeId=e._getFullPath=e.getFullPath=e.inlineRef=void 0;let t=xN(),r=xZ(),i=xQ(),o=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);e.inlineRef=function(e,r=!0){return"boolean"==typeof e||(!0===r?!function e(t){for(let r in t){if(n.has(r))return!0;let i=t[r];if(Array.isArray(i)&&i.some(e)||"object"==typeof i&&e(i))return!0}return!1}(e):!!r&&function e(r){let i=0;for(let n in r)if("$ref"===n||(i++,!o.has(n)&&("object"==typeof r[n]&&(0,t.eachItem)(r[n],t=>i+=e(t)),1/0===i)))return 1/0;return i}(e)<=r)};let n=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function a(e,t="",r){return!1!==r&&(t=c(t)),s(e,e.parse(t))}function s(e,t){return e.serialize(t).split("#")[0]+"#"}e.getFullPath=a,e._getFullPath=s;let d=/#\/?$/;function c(e){return e?e.replace(d,""):""}e.normalizeId=c,e.resolveUrl=function(e,t,r){return r=c(r),e.resolve(t,r)};let l=/^[a-z_][-a-z0-9._]*$/i;e.getSchemaRefs=function(e,t){if("boolean"==typeof e)return{};let{schemaId:o,uriResolver:n}=this.opts,s=c(e[o]||t),d={"":s},p=a(n,s,!1),u={},m=new Set;return i(e,{allKeys:!0},(e,t,r,i)=>{if(void 0===i)return;let n=p+t,a=d[i];function s(t){let r=this.opts.uriResolver.resolve;if(t=c(a?r(a,t):t),m.has(t))throw h(t);m.add(t);let i=this.refs[t];return"string"==typeof i&&(i=this.refs[i]),"object"==typeof i?f(e,i.schema,t):t!==c(n)&&("#"===t[0]?(f(e,u[t],t),u[t]=e):this.refs[t]=n),t}function y(e){if("string"==typeof e){if(!l.test(e))throw Error(`invalid anchor "${e}"`);s.call(this,`#${e}`)}}"string"==typeof e[o]&&(a=s.call(this,e[o])),y.call(this,e.$anchor),y.call(this,e.$dynamicAnchor),d[t]=a}),u;function f(e,t,i){if(void 0!==t&&!r(e,t))throw h(i)}function h(e){return Error(`reference "${e}" resolves to more than one schema`)}}}),xY=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getData=e.KeywordCxt=e.validateFunctionCode=void 0;let t=xF(),r=xH(),i=xU(),o=xH(),n=xG(),a=xK(),s=xJ(),d=xM(),c=xz(),l=xX(),p=xN(),u=xD();function m({gen:e,validateName:t,schema:r,schemaEnv:i,opts:o},n){var a;o.code.es5?e.func(t,(0,d._)`${c.default.data}, ${c.default.valCxt}`,i.$async,()=>{var t,i;e.code((0,d._)`"use strict"; ${f(r,o)}`),t=e,i=o,t.if(c.default.valCxt,()=>{t.var(c.default.instancePath,(0,d._)`${c.default.valCxt}.${c.default.instancePath}`),t.var(c.default.parentData,(0,d._)`${c.default.valCxt}.${c.default.parentData}`),t.var(c.default.parentDataProperty,(0,d._)`${c.default.valCxt}.${c.default.parentDataProperty}`),t.var(c.default.rootData,(0,d._)`${c.default.valCxt}.${c.default.rootData}`),i.dynamicRef&&t.var(c.default.dynamicAnchors,(0,d._)`${c.default.valCxt}.${c.default.dynamicAnchors}`)},()=>{t.var(c.default.instancePath,(0,d._)`""`),t.var(c.default.parentData,(0,d._)`undefined`),t.var(c.default.parentDataProperty,(0,d._)`undefined`),t.var(c.default.rootData,c.default.data),i.dynamicRef&&t.var(c.default.dynamicAnchors,(0,d._)`{}`)}),e.code(n)}):e.func(t,(0,d._)`${c.default.data}, ${(a=o,(0,d._)`{${c.default.instancePath}="", ${c.default.parentData}, ${c.default.parentDataProperty}, ${c.default.rootData}=${c.default.data}${a.dynamicRef?(0,d._)`, ${c.default.dynamicAnchors}={}`:d.nil}}={}`)}`,i.$async,()=>e.code(f(r,o)).code(n))}function f(e,t){let r="object"==typeof e&&e[t.schemaId];return r&&(t.code.source||t.code.process)?(0,d._)`/*# sourceURL=${r} */`:d.nil}function h({schema:e,self:t}){if("boolean"==typeof e)return!e;for(let r in e)if(t.RULES.all[r])return!0;return!1}function y(e){return"boolean"!=typeof e.schema}function g(e){(0,p.checkUnknownRules)(e),function(e){let{schema:t,errSchemaPath:r,opts:i,self:o}=e;t.$ref&&i.ignoreKeywordsWithRef&&(0,p.schemaHasRulesButRef)(t,o.RULES)&&o.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}(e)}function _(e,t){if(e.opts.jtd)return b(e,[],!1,t);let i=(0,r.getSchemaTypes)(e.schema);b(e,i,!(0,r.coerceAndCheckDataType)(e,i),t)}function v({gen:e,schemaEnv:t,schema:r,errSchemaPath:i,opts:o}){let n=r.$comment;if(!0===o.$comment)e.code((0,d._)`${c.default.self}.logger.log(${n})`);else if("function"==typeof o.$comment){let r=(0,d.str)`${i}/$comment`,o=e.scopeValue("root",{ref:t.root});e.code((0,d._)`${c.default.self}.opts.$comment(${n}, ${r}, ${o}.schema)`)}}function b(e,t,r,n){var a,s,l,u;let{gen:m,schema:f,data:h,allErrors:y,opts:g,self:_}=e,{RULES:v}=_;if(f.$ref&&(g.ignoreKeywordsWithRef||!(0,p.schemaHasRulesButRef)(f,v)))return void m.block(()=>V(e,"$ref",v.all.$ref.definition));function b(a){(0,i.shouldUseGroup)(f,a)&&(a.type?(m.if((0,o.checkDataType)(a.type,h,g.strictNumbers)),$(e,a),1===t.length&&t[0]===a.type&&r&&(m.else(),(0,o.reportTypeError)(e)),m.endIf()):$(e,a),y||m.if((0,d._)`${c.default.errors} === ${n||0}`))}g.jtd||(a=e,s=t,!a.schemaEnv.meta&&a.opts.strictTypes&&(function(e,t){if(t.length){if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach(t=>{S(e.dataTypes,t)||k(e,`type "${t}" not allowed by context "${e.dataTypes.join(",")}"`)}),function(e,t){let r=[];for(let i of e.dataTypes)S(t,i)?r.push(i):t.includes("integer")&&"number"===i&&r.push("integer");e.dataTypes=r}(e,t)}}(a,s),a.opts.allowUnionTypes||(l=a,(u=s).length>1&&!(2===u.length&&u.includes("null"))&&k(l,"use allowUnionTypes to allow union type keyword")),function(e,t){let r=e.self.RULES.all;for(let o in r){let n=r[o];if("object"==typeof n&&(0,i.shouldUseRule)(e.schema,n)){let{type:r}=n.definition;r.length&&!r.some(e=>{var r,i;return r=t,i=e,r.includes(i)||"number"===i&&r.includes("integer")})&&k(e,`missing type "${r.join(",")}" for keyword "${o}"`)}}}(a,a.dataTypes))),m.block(()=>{for(let e of v.rules)b(e);b(v.post)})}function $(e,t){let{gen:r,schema:o,opts:{useDefaults:a}}=e;a&&(0,n.assignDefaults)(e,t.type),r.block(()=>{for(let r of t.rules)(0,i.shouldUseRule)(o,r)&&V(e,r.keyword,r.definition,t.type)})}function S(e,t){return e.includes(t)||"integer"===t&&e.includes("number")}function k(e,t){let r=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${r}" (strictTypes)`,(0,p.checkStrictMode)(e,t,e.opts.strictTypes)}e.validateFunctionCode=function(e){y(e)&&(g(e),h(e))?function(e){let{schema:t,opts:r,gen:i}=e;m(e,()=>{r.$comment&&t.$comment&&v(e),function(e){let{schema:t,opts:r}=e;void 0!==t.default&&r.useDefaults&&r.strictSchema&&(0,p.checkStrictMode)(e,"default is ignored in the schema root")}(e),i.let(c.default.vErrors,null),i.let(c.default.errors,0),r.unevaluated&&function(e){let{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",(0,d._)`${r}.evaluated`),t.if((0,d._)`${e.evaluated}.dynamicProps`,()=>t.assign((0,d._)`${e.evaluated}.props`,(0,d._)`undefined`)),t.if((0,d._)`${e.evaluated}.dynamicItems`,()=>t.assign((0,d._)`${e.evaluated}.items`,(0,d._)`undefined`))}(e),_(e),function(e){let{gen:t,schemaEnv:r,validateName:i,ValidationError:o,opts:n}=e;r.$async?t.if((0,d._)`${c.default.errors} === 0`,()=>t.return(c.default.data),()=>t.throw((0,d._)`new ${o}(${c.default.vErrors})`)):(t.assign((0,d._)`${i}.errors`,c.default.vErrors),n.unevaluated&&function({gen:e,evaluated:t,props:r,items:i}){r instanceof d.Name&&e.assign((0,d._)`${t}.props`,r),i instanceof d.Name&&e.assign((0,d._)`${t}.items`,i)}(e),t.return((0,d._)`${c.default.errors} === 0`))}(e)})}(e):m(e,()=>(0,t.topBoolOrEmptySchema)(e))};var w=class{constructor(e,t,r){if((0,a.validateKeywordUsage)(e,t,r),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=r,this.data=e.data,this.schema=e.schema[r],this.$data=t.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,p.schemaRefOrVal)(e,this.schema,r,this.$data),this.schemaType=t.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=t,this.$data)this.schemaCode=e.gen.const("vSchema",q(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,a.validSchemaType)(this.schema,t.schemaType,t.allowUndefined))throw Error(`${r} value must be ${JSON.stringify(t.schemaType)}`);("code"in t?t.trackErrors:!1!==t.errors)&&(this.errsCount=e.gen.const("_errs",c.default.errors))}result(e,t,r){this.failResult((0,d.not)(e),t,r)}failResult(e,t,r){this.gen.if(e),r?r():this.error(),t?(this.gen.else(),t(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,t){this.failResult((0,d.not)(e),void 0,t)}fail(e){if(void 0===e){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);let{schemaCode:t}=this;this.fail((0,d._)`${t} !== undefined && (${(0,d.or)(this.invalid$data(),e)})`)}error(e,t,r){if(t){this.setParams(t),this._error(e,r),this.setParams({});return}this._error(e,r)}_error(e,t){(e?u.reportExtraError:u.reportError)(this,this.def.error,t)}$dataError(){(0,u.reportError)(this,this.def.$dataError||u.keyword$DataError)}reset(){if(void 0===this.errsCount)throw Error('add "trackErrors" to keyword definition');(0,u.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,t){t?Object.assign(this.params,e):this.params=e}block$data(e,t,r=d.nil){this.gen.block(()=>{this.check$data(e,r),t()})}check$data(e=d.nil,t=d.nil){if(!this.$data)return;let{gen:r,schemaCode:i,schemaType:o,def:n}=this;r.if((0,d.or)((0,d._)`${i} === undefined`,t)),e!==d.nil&&r.assign(e,!0),(o.length||n.validateSchema)&&(r.elseIf(this.invalid$data()),this.$dataError(),e!==d.nil&&r.assign(e,!1)),r.else()}invalid$data(){let{gen:e,schemaCode:t,schemaType:r,def:i,it:n}=this;return(0,d.or)(function(){if(r.length){if(!(t instanceof d.Name))throw Error("ajv implementation error");let e=Array.isArray(r)?r:[r];return(0,d._)`${(0,o.checkDataTypes)(e,t,n.opts.strictNumbers,o.DataType.Wrong)}`}return d.nil}(),function(){if(i.validateSchema){let r=e.scopeValue("validate$data",{ref:i.validateSchema});return(0,d._)`!${r}(${t})`}return d.nil}())}subschema(e,r){let i=(0,s.getSubschema)(this.it,e);(0,s.extendSubschemaData)(i,this.it,e),(0,s.extendSubschemaMode)(i,e);let o={...this.it,...i,items:void 0,props:void 0};return!function(e,r){if(y(e)&&(g(e),h(e)))return function(e,t){var r;let i,{schema:o,gen:n,opts:a}=e;a.$comment&&o.$comment&&v(e),(i=(r=e).schema[r.opts.schemaId])&&(r.baseId=(0,l.resolveUrl)(r.opts.uriResolver,r.baseId,i)),function(e){if(e.schema.$async&&!e.schemaEnv.$async)throw Error("async schema in sync schema")}(e);let s=n.const("_errs",c.default.errors);_(e,s),n.var(t,(0,d._)`${s} === ${c.default.errors}`)}(e,r);(0,t.boolOrEmptySchema)(e,r)}(o,r),o}mergeEvaluated(e,t){let{it:r,gen:i}=this;r.opts.unevaluated&&(!0!==r.props&&void 0!==e.props&&(r.props=p.mergeEvaluated.props(i,e.props,r.props,t)),!0!==r.items&&void 0!==e.items&&(r.items=p.mergeEvaluated.items(i,e.items,r.items,t)))}mergeValidEvaluated(e,t){let{it:r,gen:i}=this;if(r.opts.unevaluated&&(!0!==r.props||!0!==r.items))return i.if(t,()=>this.mergeEvaluated(e,d.Name)),!0}};function V(e,t,r,i){let o=new w(e,r,t);"code"in r?r.code(o,i):o.$data&&r.validate?(0,a.funcKeywordCode)(o,r):"macro"in r?(0,a.macroKeywordCode)(o,r):(r.compile||r.validate)&&(0,a.funcKeywordCode)(o,r)}e.KeywordCxt=w;let P=/^\/(?:[^~]|~0|~1)*$/,R=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function q(e,{dataLevel:t,dataNames:r,dataPathArr:i}){let o,n;if(""===e)return c.default.rootData;if("/"===e[0]){if(!P.test(e))throw Error(`Invalid JSON-pointer: ${e}`);o=e,n=c.default.rootData}else{let a=R.exec(e);if(!a)throw Error(`Invalid JSON-pointer: ${e}`);let d=+a[1];if("#"===(o=a[2])){if(d>=t)throw Error(s("property/index",d));return i[t-d]}if(d>t)throw Error(s("data",d));if(n=r[t-d],!o)return n}let a=n;for(let e of o.split("/"))e&&(n=(0,d._)`${n}${(0,d.getProperty)((0,p.unescapeJsonPointer)(e))}`,a=(0,d._)`${a} && ${n}`);return a;function s(e,r){return`Cannot access ${e} ${r} levels up, current level is ${t}`}}e.getData=q}),x1=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=class extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}}}),x0=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xX();e.default=class extends Error{constructor(e,r,i,o){super(o||`can't resolve reference ${i} from id ${r}`),this.missingRef=(0,t.resolveUrl)(e,r,i),this.missingSchema=(0,t.normalizeId)((0,t.getFullPath)(e,this.missingRef))}}}),x2=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.resolveSchema=e.getCompilingSchema=e.resolveRef=e.compileSchema=e.SchemaEnv=void 0;let t=xM(),r=x1(),i=xz(),o=xX(),n=xN(),a=xY();var s=class{constructor(e){var t;let r;this.refs={},this.dynamicAnchors={},"object"==typeof e.schema&&(r=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=null!=(t=e.baseId)?t:(0,o.normalizeId)(null==r?void 0:r[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=null==r?void 0:r.$async,this.refs={}}};function d(e){let n,s,d=l.call(this,e);if(d)return d;let c=(0,o.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:p,lines:u}=this.opts.code,{ownProperties:m}=this.opts,f=new t.CodeGen(this.scope,{es5:p,lines:u,ownProperties:m});e.$async&&(n=f.scopeValue("Error",{ref:r.default,code:(0,t._)`require("ajv/dist/runtime/validation_error").default`}));let h=f.scopeName("validate");e.validateName=h;let y={gen:f,allErrors:this.opts.allErrors,data:i.default.data,parentData:i.default.parentData,parentDataProperty:i.default.parentDataProperty,dataNames:[i.default.data],dataPathArr:[t.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:f.scopeValue("schema",!0===this.opts.code.source?{ref:e.schema,code:(0,t.stringify)(e.schema)}:{ref:e.schema}),validateName:h,ValidationError:n,schema:e.schema,schemaEnv:e,rootId:c,baseId:e.baseId||c,schemaPath:t.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,t._)`""`,opts:this.opts,self:this};try{this._compilations.add(e),(0,a.validateFunctionCode)(y),f.optimize(this.opts.code.optimize);let r=f.toString();s=`${f.scopeRefs(i.default.scope)}return ${r}`,this.opts.code.process&&(s=this.opts.code.process(s,e));let o=Function(`${i.default.self}`,`${i.default.scope}`,s)(this,this.scope.get());if(this.scope.value(h,{ref:o}),o.errors=null,o.schema=e.schema,o.schemaEnv=e,e.$async&&(o.$async=!0),!0===this.opts.code.source&&(o.source={validateName:h,validateCode:r,scopeValues:f._values}),this.opts.unevaluated){let{props:e,items:r}=y;o.evaluated={props:e instanceof t.Name?void 0:e,items:r instanceof t.Name?void 0:r,dynamicProps:e instanceof t.Name,dynamicItems:r instanceof t.Name},o.source&&(o.source.evaluated=(0,t.stringify)(o.evaluated))}return e.validate=o,e}catch(t){throw delete e.validate,delete e.validateName,s&&this.logger.error("Error compiling schema, function code:",s),t}finally{this._compilations.delete(e)}}function c(e){return(0,o.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:d.call(this,e)}function l(e){for(let i of this._compilations){var t,r;if(t=i,r=e,t.schema===r.schema&&t.root===r.root&&t.baseId===r.baseId)return i}}function p(e,t){let r;for(;"string"==typeof(r=this.refs[t]);)t=r;return r||this.schemas[t]||u.call(this,e,t)}function u(e,t){let r=this.opts.uriResolver.parse(t),i=(0,o._getFullPath)(this.opts.uriResolver,r),n=(0,o.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&i===n)return f.call(this,r,e);let a=(0,o.normalizeId)(i),c=this.refs[a]||this.schemas[a];if("string"==typeof c){let t=u.call(this,e,c);if("object"!=typeof(null==t?void 0:t.schema))return;return f.call(this,r,t)}if("object"==typeof(null==c?void 0:c.schema)){if(c.validate||d.call(this,c),a===(0,o.normalizeId)(t)){let{schema:t}=c,{schemaId:r}=this.opts,i=t[r];return i&&(n=(0,o.resolveUrl)(this.opts.uriResolver,n,i)),new s({schema:t,schemaId:r,root:e,baseId:n})}return f.call(this,r,c)}}e.SchemaEnv=s,e.compileSchema=d,e.resolveRef=function(e,t,r){var i;r=(0,o.resolveUrl)(this.opts.uriResolver,t,r);let n=e.refs[r];if(n)return n;let a=p.call(this,e,r);if(void 0===a){let o=null==(i=e.localRefs)?void 0:i[r],{schemaId:n}=this.opts;o&&(a=new s({schema:o,schemaId:n,root:e,baseId:t}))}if(void 0!==a)return e.refs[r]=c.call(this,a)},e.getCompilingSchema=l,e.resolveSchema=u;let m=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function f(e,{baseId:t,schema:r,root:i}){var a;let d;if((null==(a=e.fragment)?void 0:a[0])!=="/")return;for(let i of e.fragment.slice(1).split("/")){if("boolean"==typeof r)return;let e=r[(0,n.unescapeFragment)(i)];if(void 0===e)return;let a="object"==typeof(r=e)&&r[this.opts.schemaId];!m.has(i)&&a&&(t=(0,o.resolveUrl)(this.opts.uriResolver,t,a))}if("boolean"!=typeof r&&r.$ref&&!(0,n.schemaHasRulesButRef)(r,this.RULES)){let e=(0,o.resolveUrl)(this.opts.uriResolver,t,r.$ref);d=u.call(this,i,e)}let{schemaId:c}=this.opts;if((d=d||new s({schema:r,schemaId:c,root:i,baseId:t})).schema!==d.root.schema)return d}}),x4=S0((e,t)=>{t.exports={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}}),x6=S0((e,t)=>{let r=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),i=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);function o(e){let t="",r=0,i=0;for(i=0;i=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";t+=e[i];break}for(i+=1;i=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";t+=e[i]}return t}function n(e){return e.length=0,!0}function a(e,t,r){if(e.length){let i=o(e);if(""===i)return r.error=!0,!1;t.push(i),e.length=0}return!0}function s(e){if(2>function(e){let t=0;for(let r=0;r7){r.error=!0;break}o>0&&":"===e[o-1]&&(d=!0),i.push(":");continue}else if("%"===a){if(!l(s,i,r))break;l=n}else{s.push(a);continue}}return s.length&&(l===n?r.zone=s.join(""):c?i.push(s.join("")):i.push(o(s))),r.address=i.join(""),r}(e);if(t.error)return{host:e,isIPV6:!1};{let e=t.address,r=t.address;return t.zone&&(e+="%"+t.zone,r+="%25"+t.zone),{host:e,isIPV6:!0,escapedHost:r}}}t.exports={nonSimpleDomain:RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u),recomposeAuthority:function(e){let t=[];if(void 0!==e.userinfo&&(t.push(e.userinfo),t.push("@")),void 0!==e.host){let r=unescape(e.host);if(!i(r)){let t=s(r);r=!0===t.isIPV6?`[${t.escapedHost}]`:e.host}t.push(r)}return("number"==typeof e.port||"string"==typeof e.port)&&(t.push(":"),t.push(String(e.port))),t.length?t.join(""):void 0},normalizeComponentEncoding:function(e,t){let r=!0!==t?escape:unescape;return void 0!==e.scheme&&(e.scheme=r(e.scheme)),void 0!==e.userinfo&&(e.userinfo=r(e.userinfo)),void 0!==e.host&&(e.host=r(e.host)),void 0!==e.path&&(e.path=r(e.path)),void 0!==e.query&&(e.query=r(e.query)),void 0!==e.fragment&&(e.fragment=r(e.fragment)),e},removeDotSegments:function(e){let t=e,r=[],i=-1,o=0;for(;o=t.length;){if(1===o)if("."===t)break;else if("/"===t){r.push("/");break}else{r.push(t);break}if(2===o){if("."===t[0]){if("."===t[1])break;else if("/"===t[1]){t=t.slice(2);continue}}else if("/"===t[0]&&("."===t[1]||"/"===t[1])){r.push("/");break}}else if(3===o&&"/.."===t){0!==r.length&&r.pop(),r.push("/");break}if("."===t[0]){if("."===t[1]){if("/"===t[2]){t=t.slice(3);continue}}else if("/"===t[1]){t=t.slice(2);continue}}else if("/"===t[0]&&"."===t[1]){if("/"===t[2]){t=t.slice(2);continue}else if("."===t[2]&&"/"===t[3]){t=t.slice(3),0!==r.length&&r.pop();continue}}if(-1===(i=t.indexOf("/",1))){r.push(t);break}r.push(t.slice(0,i)),t=t.slice(i)}return r.join("")},isIPv4:i,isUUID:r,normalizeIPv6:s,stringArrayToHexStripped:o}}),x3=S0((e,t)=>{let{isUUID:r}=x6(),i=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,o=["http","https","ws","wss","urn","urn:uuid"];function n(e){return!0===e.secure||!1!==e.secure&&!!e.scheme&&3===e.scheme.length&&("w"===e.scheme[0]||"W"===e.scheme[0])&&("s"===e.scheme[1]||"S"===e.scheme[1])&&("s"===e.scheme[2]||"S"===e.scheme[2])}function a(e){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e}function s(e){let t="https"===String(e.scheme).toLowerCase();return(e.port===(t?443:80)||""===e.port)&&(e.port=void 0),e.path||(e.path="/"),e}let d={scheme:"http",domainHost:!0,parse:a,serialize:s},c={scheme:"https",domainHost:d.domainHost,parse:a,serialize:s},l={scheme:"ws",domainHost:!0,parse:function(e){return e.secure=n(e),e.resourceName=(e.path||"/")+(e.query?"?"+e.query:""),e.path=void 0,e.query=void 0,e},serialize:function(e){if((e.port===(n(e)?443:80)||""===e.port)&&(e.port=void 0),"boolean"==typeof e.secure&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){let[t,r]=e.resourceName.split("?");e.path=t&&"/"!==t?t:void 0,e.query=r,e.resourceName=void 0}return e.fragment=void 0,e}},p={scheme:"wss",domainHost:l.domainHost,parse:l.parse,serialize:l.serialize},u={http:d,https:c,ws:l,wss:p,urn:{scheme:"urn",parse:function(e,t){if(!e.path)return e.error="URN can not be parsed",e;let r=e.path.match(i);if(r){let i=t.scheme||e.scheme||"urn";e.nid=r[1].toLowerCase(),e.nss=r[2];let o=m(`${i}:${t.nid||e.nid}`);e.path=void 0,o&&(e=o.parse(e,t))}else e.error=e.error||"URN can not be parsed.";return e},serialize:function(e,t){if(void 0===e.nid)throw Error("URN without nid cannot be serialized");let r=t.scheme||e.scheme||"urn",i=e.nid.toLowerCase(),o=m(`${r}:${t.nid||i}`);o&&(e=o.serialize(e,t));let n=e,a=e.nss;return n.path=`${i||t.nid}:${a}`,t.skipEscape=!0,n},skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:function(e,t){return e.uuid=e.nss,e.nss=void 0,t.tolerant||e.uuid&&r(e.uuid)||(e.error=e.error||"UUID is not valid."),e},serialize:function(e){return e.nss=(e.uuid||"").toLowerCase(),e},skipNormalize:!0}};function m(e){return e&&(u[e]||u[e.toLowerCase()])||void 0}Object.setPrototypeOf(u,null),t.exports={wsIsSecure:n,SCHEMES:u,isValidSchemeName:function(e){return -1!==o.indexOf(e)},getSchemeHandler:m}}),x9=S0((e,t)=>{let{normalizeIPv6:r,removeDotSegments:i,recomposeAuthority:o,normalizeComponentEncoding:n,isIPv4:a,nonSimpleDomain:s}=x6(),{SCHEMES:d,getSchemeHandler:c}=x3();function l(e,t,r,o){let n={};return o||(e=m(p(e,r),r),t=m(p(t,r),r)),!(r=r||{}).tolerant&&t.scheme?(n.scheme=t.scheme,n.userinfo=t.userinfo,n.host=t.host,n.port=t.port,n.path=i(t.path||""),n.query=t.query):(void 0!==t.userinfo||void 0!==t.host||void 0!==t.port?(n.userinfo=t.userinfo,n.host=t.host,n.port=t.port,n.path=i(t.path||""),n.query=t.query):(t.path?("/"===t.path[0]?n.path=i(t.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?n.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:n.path=t.path:n.path="/"+t.path,n.path=i(n.path)),n.query=t.query):(n.path=e.path,void 0!==t.query?n.query=t.query:n.query=e.query),n.userinfo=e.userinfo,n.host=e.host,n.port=e.port),n.scheme=e.scheme),n.fragment=t.fragment,n}function p(e,t){let r={host:e.host,scheme:e.scheme,userinfo:e.userinfo,port:e.port,path:e.path,query:e.query,nid:e.nid,nss:e.nss,uuid:e.uuid,fragment:e.fragment,reference:e.reference,resourceName:e.resourceName,secure:e.secure,error:""},n=Object.assign({},t),a=[],s=c(n.scheme||r.scheme);s&&s.serialize&&s.serialize(r,n),void 0!==r.path&&(n.skipEscape?r.path=unescape(r.path):(r.path=escape(r.path),void 0!==r.scheme&&(r.path=r.path.split("%3A").join(":")))),"suffix"!==n.reference&&r.scheme&&a.push(r.scheme,":");let d=o(r);if(void 0!==d&&("suffix"!==n.reference&&a.push("//"),a.push(d),r.path&&"/"!==r.path[0]&&a.push("/")),void 0!==r.path){let e=r.path;n.absolutePath||s&&s.absolutePath||(e=i(e)),void 0===d&&"/"===e[0]&&"/"===e[1]&&(e="/%2F"+e.slice(2)),a.push(e)}return void 0!==r.query&&a.push("?",r.query),void 0!==r.fragment&&a.push("#",r.fragment),a.join("")}let u=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function m(e,t){let i=Object.assign({},t),o={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},n=!1;"suffix"===i.reference&&(e=i.scheme?i.scheme+":"+e:"//"+e);let d=e.match(u);if(d){if(o.scheme=d[1],o.userinfo=d[3],o.host=d[4],o.port=parseInt(d[5],10),o.path=d[6]||"",o.query=d[7],o.fragment=d[8],isNaN(o.port)&&(o.port=d[5]),o.host)if(!1===a(o.host)){let e=r(o.host);o.host=e.host.toLowerCase(),n=e.isIPV6}else n=!0;void 0!==o.scheme||void 0!==o.userinfo||void 0!==o.host||void 0!==o.port||void 0!==o.query||o.path?void 0===o.scheme?o.reference="relative":void 0===o.fragment?o.reference="absolute":o.reference="uri":o.reference="same-document",i.reference&&"suffix"!==i.reference&&i.reference!==o.reference&&(o.error=o.error||"URI is not a "+i.reference+" reference.");let t=c(i.scheme||o.scheme);if(!i.unicodeSupport&&(!t||!t.unicodeSupport)&&o.host&&(i.domainHost||t&&t.domainHost)&&!1===n&&s(o.host))try{o.host=URL.domainToASCII(o.host.toLowerCase())}catch(e){o.error=o.error||"Host's domain name can not be converted to ASCII: "+e}(!t||t&&!t.skipNormalize)&&(-1!==e.indexOf("%")&&(void 0!==o.scheme&&(o.scheme=unescape(o.scheme)),void 0!==o.host&&(o.host=unescape(o.host))),o.path&&(o.path=escape(unescape(o.path))),o.fragment&&(o.fragment=encodeURI(decodeURIComponent(o.fragment)))),t&&t.parse&&t.parse(o,i)}else o.error=o.error||"URI can not be parsed.";return o}let f={SCHEMES:d,normalize:function(e,t){return"string"==typeof e?e=p(m(e,t),t):"object"==typeof e&&(e=m(p(e,t),t)),e},resolve:function(e,t,r){let i=r?Object.assign({scheme:"null"},r):{scheme:"null"},o=l(m(e,i),m(t,i),i,!0);return i.skipEscape=!0,p(o,i)},resolveComponent:l,equal:function(e,t,r){return"string"==typeof e?e=p(n(m(e=unescape(e),r),!0),{...r,skipEscape:!0}):"object"==typeof e&&(e=p(n(e,!0),{...r,skipEscape:!0})),"string"==typeof t?t=p(n(m(t=unescape(t),r),!0),{...r,skipEscape:!0}):"object"==typeof t&&(t=p(n(t,!0),{...r,skipEscape:!0})),e.toLowerCase()===t.toLowerCase()},serialize:p,parse:m};t.exports=f,t.exports.default=f,t.exports.fastUri=f}),x5=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=x9();t.code='require("ajv/dist/runtime/uri").default',e.default=t}),x8=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var t=xY();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var r=xM();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return r.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return r.CodeGen}});let i=x1(),o=x0(),n=xL(),a=x2(),s=xM(),d=xX(),c=xH(),l=xN(),p=x4(),u=x5(),m=(e,t)=>new RegExp(e,t);m.code="new RegExp";let f=["removeAdditional","useDefaults","coerceTypes"],h=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),y={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},g={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'};var _=class{constructor(e={}){var t,r,i,o,a,d,c,l,p,f,_,b,P,R,q,I,x,j,C,T,O,E,A,W,M,N;let z,D,F,L,U;this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...(z=(t=e).strict,F=!0===(D=null==(r=t.code)?void 0:r.optimize)||void 0===D?1:D||0,L=null!=(o=null==(i=t.code)?void 0:i.regExp)?o:m,U=null!=(a=t.uriResolver)?a:u.default,{strictSchema:null==(c=null!=(d=t.strictSchema)?d:z)||c,strictNumbers:null==(p=null!=(l=t.strictNumbers)?l:z)||p,strictTypes:null!=(_=null!=(f=t.strictTypes)?f:z)?_:"log",strictTuples:null!=(P=null!=(b=t.strictTuples)?b:z)?P:"log",strictRequired:null!=(q=null!=(R=t.strictRequired)?R:z)&&q,code:t.code?{...t.code,optimize:F,regExp:L}:{optimize:F,regExp:L},loopRequired:null!=(I=t.loopRequired)?I:200,loopEnum:null!=(x=t.loopEnum)?x:200,meta:null==(j=t.meta)||j,messages:null==(C=t.messages)||C,inlineRefs:null==(T=t.inlineRefs)||T,schemaId:null!=(O=t.schemaId)?O:"$id",addUsedSchema:null==(E=t.addUsedSchema)||E,validateSchema:null==(A=t.validateSchema)||A,validateFormats:null==(W=t.validateFormats)||W,unicodeRegExp:null==(M=t.unicodeRegExp)||M,int32range:null==(N=t.int32range)||N,uriResolver:U})};let{es5:H,lines:G}=this.opts.code;this.scope=new s.ValueScope({scope:{},prefixes:h,es5:H,lines:G}),this.logger=function(e){if(!1===e)return V;if(void 0===e)return console;if(e.log&&e.warn&&e.error)return e;throw Error("logger must implement log, warn and error methods")}(e.logger);let B=e.validateFormats;e.validateFormats=!1,this.RULES=(0,n.getRules)(),v.call(this,y,e,"NOT SUPPORTED"),v.call(this,g,e,"DEPRECATED","warn"),this._metaOpts=w.call(this),e.formats&&S.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&k.call(this,e.keywords),"object"==typeof e.meta&&this.addMetaSchema(e.meta),$.call(this),e.validateFormats=B}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:e,meta:t,schemaId:r}=this.opts,i=p;"id"===r&&((i={...p}).id=i.$id,delete i.$id),t&&e&&this.addMetaSchema(i,i[r],!1)}defaultMeta(){let{meta:e,schemaId:t}=this.opts;return this.opts.defaultMeta="object"==typeof e?e[t]||e:void 0}validate(e,t){let r;if("string"==typeof e){if(!(r=this.getSchema(e)))throw Error(`no schema with key or ref "${e}"`)}else r=this.compile(e);let i=r(t);return"$async"in r||(this.errors=r.errors),i}compile(e,t){let r=this._addSchema(e,t);return r.validate||this._compileSchemaEnv(r)}compileAsync(e,t){if("function"!=typeof this.opts.loadSchema)throw Error("options.loadSchema should be a function");let{loadSchema:r}=this.opts;return i.call(this,e,t);async function i(e,t){await n.call(this,e.$schema);let r=this._addSchema(e,t);return r.validate||a.call(this,r)}async function n(e){e&&!this.getSchema(e)&&await i.call(this,{$ref:e},!0)}async function a(e){try{return this._compileSchemaEnv(e)}catch(t){if(!(t instanceof o.default))throw t;return s.call(this,t),await d.call(this,t.missingSchema),a.call(this,e)}}function s({missingSchema:e,missingRef:t}){if(this.refs[e])throw Error(`AnySchema ${e} is loaded but ${t} cannot be resolved`)}async function d(e){let r=await c.call(this,e);this.refs[e]||await n.call(this,r.$schema),this.refs[e]||this.addSchema(r,e,t)}async function c(e){let t=this._loading[e];if(t)return t;try{return await (this._loading[e]=r(e))}finally{delete this._loading[e]}}}addSchema(e,t,r,i=this.opts.validateSchema){let o;if(Array.isArray(e)){for(let t of e)this.addSchema(t,void 0,r,i);return this}if("object"==typeof e){let{schemaId:t}=this.opts;if(void 0!==(o=e[t])&&"string"!=typeof o)throw Error(`schema ${t} must be string`)}return t=(0,d.normalizeId)(t||o),this._checkUnique(t),this.schemas[t]=this._addSchema(e,r,t,i,!0),this}addMetaSchema(e,t,r=this.opts.validateSchema){return this.addSchema(e,t,!0,r),this}validateSchema(e,t){let r;if("boolean"==typeof e)return!0;if(void 0!==(r=e.$schema)&&"string"!=typeof r)throw Error("$schema must be a string");if(!(r=r||this.opts.defaultMeta||this.defaultMeta()))return this.logger.warn("meta-schema not available"),this.errors=null,!0;let i=this.validate(r,e);if(!i&&t){let e="schema is invalid: "+this.errorsText();if("log"===this.opts.validateSchema)this.logger.error(e);else throw Error(e)}return i}getSchema(e){let t;for(;"string"==typeof(t=b.call(this,e));)e=t;if(void 0===t){let{schemaId:r}=this.opts,i=new a.SchemaEnv({schema:{},schemaId:r});if(!(t=a.resolveSchema.call(this,i,e)))return;this.refs[e]=t}return t.validate||this._compileSchemaEnv(t)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let t=b.call(this,e);return"object"==typeof t&&this._cache.delete(t.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{this._cache.delete(e);let t=e[this.opts.schemaId];return t&&(t=(0,d.normalizeId)(t),delete this.schemas[t],delete this.refs[t]),this}default:throw Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(let t of e)this.addKeyword(t);return this}addKeyword(e,t){let r;if("string"==typeof e)r=e,"object"==typeof t&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),t.keyword=r);else if("object"==typeof e&&void 0===t){if(Array.isArray(r=(t=e).keyword)&&!r.length)throw Error("addKeywords: keyword must be string or non-empty array")}else throw Error("invalid addKeywords parameters");if(R.call(this,r,t),!t)return(0,l.eachItem)(r,e=>q.call(this,e)),this;x.call(this,t);let i={...t,type:(0,c.getJSONTypes)(t.type),schemaType:(0,c.getJSONTypes)(t.schemaType)};return(0,l.eachItem)(r,0===i.type.length?e=>q.call(this,e,i):e=>i.type.forEach(t=>q.call(this,e,i,t))),this}getKeyword(e){let t=this.RULES.all[e];return"object"==typeof t?t.definition:!!t}removeKeyword(e){let{RULES:t}=this;for(let r of(delete t.keywords[e],delete t.all[e],t.rules)){let t=r.rules.findIndex(t=>t.keyword===e);t>=0&&r.rules.splice(t,1)}return this}addFormat(e,t){return"string"==typeof t&&(t=new RegExp(t)),this.formats[e]=t,this}errorsText(e=this.errors,{separator:t=", ",dataVar:r="data"}={}){return e&&0!==e.length?e.map(e=>`${r}${e.instancePath} ${e.message}`).reduce((e,r)=>e+t+r):"No errors"}$dataMetaSchema(e,t){let r=this.RULES.all;for(let i of(e=JSON.parse(JSON.stringify(e)),t)){let t=i.split("/").slice(1),o=e;for(let e of t)o=o[e];for(let e in r){let t=r[e];if("object"!=typeof t)continue;let{$data:i}=t.definition,n=o[e];i&&n&&(o[e]=C(n))}}return e}_removeAllSchemas(e,t){for(let r in e){let i=e[r];(!t||t.test(r))&&("string"==typeof i?delete e[r]:i&&!i.meta&&(this._cache.delete(i.schema),delete e[r]))}}_addSchema(e,t,r,i=this.opts.validateSchema,o=this.opts.addUsedSchema){let n,{schemaId:s}=this.opts;if("object"==typeof e)n=e[s];else if(this.opts.jtd)throw Error("schema must be object");else if("boolean"!=typeof e)throw Error("schema must be object or boolean");let c=this._cache.get(e);if(void 0!==c)return c;r=(0,d.normalizeId)(n||r);let l=d.getSchemaRefs.call(this,e,r);return c=new a.SchemaEnv({schema:e,schemaId:s,meta:t,baseId:r,localRefs:l}),this._cache.set(c.schema,c),o&&!r.startsWith("#")&&(r&&this._checkUnique(r),this.refs[r]=c),i&&this.validateSchema(e,!0),c}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):a.compileSchema.call(this,e),!e.validate)throw Error("ajv implementation error");return e.validate}_compileMetaSchema(e){let t=this.opts;this.opts=this._metaOpts;try{a.compileSchema.call(this,e)}finally{this.opts=t}}};function v(e,t,r,i="error"){for(let o in e)o in t&&this.logger[i](`${r}: option ${o}. ${e[o]}`)}function b(e){return e=(0,d.normalizeId)(e),this.schemas[e]||this.refs[e]}function $(){let e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(let t in e)this.addSchema(e[t],t)}function S(){for(let e in this.opts.formats){let t=this.opts.formats[e];t&&this.addFormat(e,t)}}function k(e){if(Array.isArray(e))return void this.addVocabulary(e);for(let t in this.logger.warn("keywords option as map is deprecated, pass array"),e){let r=e[t];r.keyword||(r.keyword=t),this.addKeyword(r)}}function w(){let e={...this.opts};for(let t of f)delete e[t];return e}_.ValidationError=i.default,_.MissingRefError=o.default,e.default=_;let V={log(){},warn(){},error(){}},P=/^[a-z_$][a-z0-9_$:-]*$/i;function R(e,t){let{RULES:r}=this;if((0,l.eachItem)(e,e=>{if(r.keywords[e])throw Error(`Keyword ${e} is already defined`);if(!P.test(e))throw Error(`Keyword ${e} has invalid name`)}),t&&t.$data&&!("code"in t||"validate"in t))throw Error('$data keyword must have "code" or "validate" function')}function q(e,t,r){var i;let o=null==t?void 0:t.post;if(r&&o)throw Error('keyword with "post" flag cannot have "type"');let{RULES:n}=this,a=o?n.post:n.rules.find(({type:e})=>e===r);if(a||(a={type:r,rules:[]},n.rules.push(a)),n.keywords[e]=!0,!t)return;let s={keyword:e,definition:{...t,type:(0,c.getJSONTypes)(t.type),schemaType:(0,c.getJSONTypes)(t.schemaType)}};t.before?I.call(this,a,s,t.before):a.rules.push(s),n.all[e]=s,null==(i=t.implements)||i.forEach(e=>this.addKeyword(e))}function I(e,t,r){let i=e.rules.findIndex(e=>e.keyword===r);i>=0?e.rules.splice(i,0,t):(e.rules.push(t),this.logger.warn(`rule ${r} is not defined`))}function x(e){let{metaSchema:t}=e;void 0!==t&&(e.$data&&this.opts.$data&&(t=C(t)),e.validateSchema=this.compile(t,!0))}let j={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function C(e){return{anyOf:[e,j]}}}),x7=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={keyword:"id",code(){throw Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}}}),je=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.callRef=e.getValidate=void 0;let t=x0(),r=xB(),i=xM(),o=xz(),n=x2(),a=xN();function s(e,t){let{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):(0,i._)`${r.scopeValue("wrapper",{ref:t})}.validate`}function d(e,t,n,s){let{gen:d,it:c}=e,{allErrors:l,schemaEnv:p,opts:u}=c,m=u.passContext?o.default.this:i.nil;function f(e){let t=(0,i._)`${e}.errors`;d.assign(o.default.vErrors,(0,i._)`${o.default.vErrors} === null ? ${t} : ${o.default.vErrors}.concat(${t})`),d.assign(o.default.errors,(0,i._)`${o.default.vErrors}.length`)}function h(e){var t;if(!c.opts.unevaluated)return;let r=null==(t=null==n?void 0:n.validate)?void 0:t.evaluated;if(!0!==c.props)if(r&&!r.dynamicProps)void 0!==r.props&&(c.props=a.mergeEvaluated.props(d,r.props,c.props));else{let t=d.var("props",(0,i._)`${e}.evaluated.props`);c.props=a.mergeEvaluated.props(d,t,c.props,i.Name)}if(!0!==c.items)if(r&&!r.dynamicItems)void 0!==r.items&&(c.items=a.mergeEvaluated.items(d,r.items,c.items));else{let t=d.var("items",(0,i._)`${e}.evaluated.items`);c.items=a.mergeEvaluated.items(d,t,c.items,i.Name)}}s?function(){if(!p.$async)throw Error("async schema referenced by sync schema");let o=d.let("valid");d.try(()=>{d.code((0,i._)`await ${(0,r.callValidateCode)(e,t,m)}`),h(t),l||d.assign(o,!0)},e=>{d.if((0,i._)`!(${e} instanceof ${c.ValidationError})`,()=>d.throw(e)),f(e),l||d.assign(o,!1)}),e.ok(o)}():e.result((0,r.callValidateCode)(e,t,m),()=>h(t),()=>f(t))}e.getValidate=s,e.callRef=d,e.default={keyword:"$ref",schemaType:"string",code(e){var r,o;let a,c,l,{gen:p,schema:u,it:m}=e,{baseId:f,schemaEnv:h,validateName:y,opts:g,self:_}=m,{root:v}=h;if(("#"===u||"#/"===u)&&f===v.baseId){if(h===v)return d(e,y,h,h.$async);let t=p.scopeValue("root",{ref:v});return d(e,(0,i._)`${t}.validate`,v,v.$async)}let b=n.resolveRef.call(_,v,f,u);if(void 0===b)throw new t.default(m.opts.uriResolver,f,u);return b instanceof n.SchemaEnv?void d(e,s(e,r=b),r,r.$async):(o=b,a=p.scopeValue("schema",!0===g.code.source?{ref:o,code:(0,i.stringify)(o)}:{ref:o}),c=p.name("valid"),l=e.subschema({schema:o,dataTypes:[],schemaPath:i.nil,topSchemaRef:a,errSchemaPath:u},c),void(e.mergeEvaluated(l),e.ok(c)))}}}),jt=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=x7(),r=je();e.default=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",t.default,r.default]}),jr=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xM(),r=t.operators,i={maximum:{okStr:"<=",ok:r.LTE,fail:r.GT},minimum:{okStr:">=",ok:r.GTE,fail:r.LT},exclusiveMaximum:{okStr:"<",ok:r.LT,fail:r.GTE},exclusiveMinimum:{okStr:">",ok:r.GT,fail:r.LTE}};e.default={keyword:Object.keys(i),type:"number",schemaType:"number",$data:!0,error:{message:({keyword:e,schemaCode:r})=>(0,t.str)`must be ${i[e].okStr} ${r}`,params:({keyword:e,schemaCode:r})=>(0,t._)`{comparison: ${i[e].okStr}, limit: ${r}}`},code(e){let{keyword:r,data:o,schemaCode:n}=e;e.fail$data((0,t._)`${o} ${i[r].fail} ${n} || isNaN(${o})`)}}}),ji=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xM();e.default={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:e})=>(0,t.str)`must be multiple of ${e}`,params:({schemaCode:e})=>(0,t._)`{multipleOf: ${e}}`},code(e){let{gen:r,data:i,schemaCode:o,it:n}=e,a=n.opts.multipleOfPrecision,s=r.let("res"),d=a?(0,t._)`Math.abs(Math.round(${s}) - ${s}) > 1e-${a}`:(0,t._)`${s} !== parseInt(${s})`;e.fail$data((0,t._)`(${o} === 0 || (${s} = ${i}/${o}, ${d}))`)}}}),jo=S0(e=>{function t(e){let t,r=e.length,i=0,o=0;for(;o=55296&&t<=56319&&o{Object.defineProperty(e,"__esModule",{value:!0});let t=xM(),r=xN(),i=jo();e.default={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message:({keyword:e,schemaCode:r})=>(0,t.str)`must NOT have ${"maxLength"===e?"more":"fewer"} than ${r} characters`,params:({schemaCode:e})=>(0,t._)`{limit: ${e}}`},code(e){let{keyword:o,data:n,schemaCode:a,it:s}=e,d="maxLength"===o?t.operators.GT:t.operators.LT,c=!1===s.opts.unicode?(0,t._)`${n}.length`:(0,t._)`${(0,r.useFunc)(e.gen,i.default)}(${n})`;e.fail$data((0,t._)`${c} ${d} ${a}`)}}}),ja=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xB(),r=xN(),i=xM();e.default={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>(0,i.str)`must match pattern "${e}"`,params:({schemaCode:e})=>(0,i._)`{pattern: ${e}}`},code(e){let{gen:o,data:n,$data:a,schema:s,schemaCode:d,it:c}=e,l=c.opts.unicodeRegExp?"u":"";if(a){let{regExp:t}=c.opts.code,a="new RegExp"===t.code?(0,i._)`new RegExp`:(0,r.useFunc)(o,t),s=o.let("valid");o.try(()=>o.assign(s,(0,i._)`${a}(${d}, ${l}).test(${n})`),()=>o.assign(s,!1)),e.fail$data((0,i._)`!${s}`)}else{let r=(0,t.usePattern)(e,s);e.fail$data((0,i._)`!${r}.test(${n})`)}}}}),js=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xM();e.default={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message:({keyword:e,schemaCode:r})=>(0,t.str)`must NOT have ${"maxProperties"===e?"more":"fewer"} than ${r} properties`,params:({schemaCode:e})=>(0,t._)`{limit: ${e}}`},code(e){let{keyword:r,data:i,schemaCode:o}=e,n="maxProperties"===r?t.operators.GT:t.operators.LT;e.fail$data((0,t._)`Object.keys(${i}).length ${n} ${o}`)}}}),jd=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xB(),r=xM(),i=xN();e.default={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:e}})=>(0,r.str)`must have required property '${e}'`,params:({params:{missingProperty:e}})=>(0,r._)`{missingProperty: ${e}}`},code(e){let{gen:o,schema:n,schemaCode:a,data:s,$data:d,it:c}=e,{opts:l}=c;if(!d&&0===n.length)return;let p=n.length>=l.loopRequired;if(c.allErrors?function(){if(p||d)e.block$data(r.nil,u);else for(let r of n)(0,t.checkReportMissingProp)(e,r)}():function(){let i=o.let("missing");if(p||d){let n=o.let("valid",!0);e.block$data(n,()=>{var d,c;return d=i,c=n,void(e.setParams({missingProperty:d}),o.forOf(d,a,()=>{o.assign(c,(0,t.propertyInData)(o,s,d,l.ownProperties)),o.if((0,r.not)(c),()=>{e.error(),o.break()})},r.nil))}),e.ok(n)}else o.if((0,t.checkMissingProp)(e,n,i)),(0,t.reportMissingProp)(e,i),o.else()}(),l.strictRequired){let t=e.parentSchema.properties,{definedProperties:r}=e.it;for(let e of n)if((null==t?void 0:t[e])===void 0&&!r.has(e)){let t=`required property "${e}" is not defined at "${c.schemaEnv.baseId+c.errSchemaPath}" (strictRequired)`;(0,i.checkStrictMode)(c,t,c.opts.strictRequired)}}function u(){o.forOf("prop",a,r=>{e.setParams({missingProperty:r}),o.if((0,t.noPropertyInData)(o,s,r,l.ownProperties),()=>e.error())})}}}}),jc=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xM();e.default={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message:({keyword:e,schemaCode:r})=>(0,t.str)`must NOT have ${"maxItems"===e?"more":"fewer"} than ${r} items`,params:({schemaCode:e})=>(0,t._)`{limit: ${e}}`},code(e){let{keyword:r,data:i,schemaCode:o}=e,n="maxItems"===r?t.operators.GT:t.operators.LT;e.fail$data((0,t._)`${i}.length ${n} ${o}`)}}}),jl=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xZ();t.code='require("ajv/dist/runtime/equal").default',e.default=t}),jp=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xH(),r=xM(),i=xN(),o=jl();e.default={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:e,j:t}})=>(0,r.str)`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>(0,r._)`{i: ${e}, j: ${t}}`},code(e){let{gen:n,data:a,$data:s,schema:d,parentSchema:c,schemaCode:l,it:p}=e;if(!s&&!d)return;let u=n.let("valid"),m=c.items?(0,t.getSchemaTypes)(c.items):[];e.block$data(u,function(){let s=n.let("i",(0,r._)`${a}.length`),d=n.let("j");e.setParams({i:s,j:d}),n.assign(u,!0),n.if((0,r._)`${s} > 1`,()=>(m.length>0&&!m.some(e=>"object"===e||"array"===e)?function(i,o){let s=n.name("item"),d=(0,t.checkDataTypes)(m,s,p.opts.strictNumbers,t.DataType.Wrong),c=n.const("indices",(0,r._)`{}`);n.for((0,r._)`;${i}--;`,()=>{n.let(s,(0,r._)`${a}[${i}]`),n.if(d,(0,r._)`continue`),m.length>1&&n.if((0,r._)`typeof ${s} == "string"`,(0,r._)`${s} += "_"`),n.if((0,r._)`typeof ${c}[${s}] == "number"`,()=>{n.assign(o,(0,r._)`${c}[${s}]`),e.error(),n.assign(u,!1).break()}).code((0,r._)`${c}[${s}] = ${i}`)})}:function(t,s){let d=(0,i.useFunc)(n,o.default),c=n.name("outer");n.label(c).for((0,r._)`;${t}--;`,()=>n.for((0,r._)`${s} = ${t}; ${s}--;`,()=>n.if((0,r._)`${d}(${a}[${t}], ${a}[${s}])`,()=>{e.error(),n.assign(u,!1).break(c)})))})(s,d))},(0,r._)`${l} === false`),e.ok(u)}}}),ju=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xM(),r=xN(),i=jl();e.default={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:e})=>(0,t._)`{allowedValue: ${e}}`},code(e){let{gen:o,data:n,$data:a,schemaCode:s,schema:d}=e;a||d&&"object"==typeof d?e.fail$data((0,t._)`!${(0,r.useFunc)(o,i.default)}(${n}, ${s})`):e.fail((0,t._)`${d} !== ${n}`)}}}),jm=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xM(),r=xN(),i=jl();e.default={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:e})=>(0,t._)`{allowedValues: ${e}}`},code(e){let o,n,{gen:a,data:s,$data:d,schema:c,schemaCode:l,it:p}=e;if(!d&&0===c.length)throw Error("enum must have non-empty array");let u=c.length>=p.opts.loopEnum,m=()=>null!=o?o:o=(0,r.useFunc)(a,i.default);if(u||d)n=a.let("valid"),e.block$data(n,function(){a.assign(n,!1),a.forOf("v",l,e=>a.if((0,t._)`${m()}(${s}, ${e})`,()=>a.assign(n,!0).break()))});else{if(!Array.isArray(c))throw Error("ajv implementation error");let e=a.const("vSchema",l);n=(0,t.or)(...c.map((r,i)=>{var o,n;let a;return o=e,"object"==typeof(a=c[n=i])&&null!==a?(0,t._)`${m()}(${s}, ${o}[${n}])`:(0,t._)`${s} === ${a}`}))}e.pass(n)}}}),jf=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=jr(),r=ji(),i=jn(),o=ja(),n=js(),a=jd(),s=jc(),d=jp(),c=ju(),l=jm();e.default=[t.default,r.default,i.default,o.default,n.default,a.default,s.default,d.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},c.default,l.default]}),jh=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateAdditionalItems=void 0;let t=xM(),r=xN();function i(e,i){let{gen:o,schema:n,data:a,keyword:s,it:d}=e;d.items=!0;let c=o.const("len",(0,t._)`${a}.length`);if(!1===n)e.setParams({len:i.length}),e.pass((0,t._)`${c} <= ${i.length}`);else if("object"==typeof n&&!(0,r.alwaysValidSchema)(d,n)){let n=o.var("valid",(0,t._)`${c} <= ${i.length}`);o.if((0,t.not)(n),()=>{var a;return a=n,void o.forRange("i",i.length,c,i=>{e.subschema({keyword:s,dataProp:i,dataPropType:r.Type.Num},a),d.allErrors||o.if((0,t.not)(a),()=>o.break())})}),e.ok(n)}}e.validateAdditionalItems=i,e.default={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:e}})=>(0,t.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,t._)`{limit: ${e}}`},code(e){let{parentSchema:t,it:o}=e,{items:n}=t;Array.isArray(n)?i(e,n):(0,r.checkStrictMode)(o,'"additionalItems" is ignored when "items" is not an array of schemas')}}}),jy=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateTuple=void 0;let t=xM(),r=xN(),i=xB();function o(e,i,n=e.schema){let{gen:a,parentSchema:s,data:d,keyword:c,it:l}=e;(function(e){let{opts:t,errSchemaPath:o}=l,a=n.length,s=a===e.minItems&&(a===e.maxItems||!1===e[i]);if(t.strictTuples&&!s){let e=`"${c}" is ${a}-tuple, but minItems or maxItems/${i} are not specified or different at path "${o}"`;(0,r.checkStrictMode)(l,e,t.strictTuples)}})(s),l.opts.unevaluated&&n.length&&!0!==l.items&&(l.items=r.mergeEvaluated.items(a,n.length,l.items));let p=a.name("valid"),u=a.const("len",(0,t._)`${d}.length`);n.forEach((i,o)=>{(0,r.alwaysValidSchema)(l,i)||(a.if((0,t._)`${u} > ${o}`,()=>e.subschema({keyword:c,schemaProp:o,dataProp:o},p)),e.ok(p))})}e.validateTuple=o,e.default={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){let{schema:t,it:n}=e;if(Array.isArray(t))return o(e,"additionalItems",t);n.items=!0,(0,r.alwaysValidSchema)(n,t)||e.ok((0,i.validateArray)(e))}}}),jg=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=jy();e.default={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,t.validateTuple)(e,"items")}}),j_=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xM(),r=xN(),i=xB(),o=jh();e.default={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:e}})=>(0,t.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,t._)`{limit: ${e}}`},code(e){let{schema:t,parentSchema:n,it:a}=e,{prefixItems:s}=n;a.items=!0,(0,r.alwaysValidSchema)(a,t)||(s?(0,o.validateAdditionalItems)(e,s):e.ok((0,i.validateArray)(e)))}}}),jv=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xM(),r=xN();e.default={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:e,max:r}})=>void 0===r?(0,t.str)`must contain at least ${e} valid item(s)`:(0,t.str)`must contain at least ${e} and no more than ${r} valid item(s)`,params:({params:{min:e,max:r}})=>void 0===r?(0,t._)`{minContains: ${e}}`:(0,t._)`{minContains: ${e}, maxContains: ${r}}`},code(e){let i,o,{gen:n,schema:a,parentSchema:s,data:d,it:c}=e,{minContains:l,maxContains:p}=s;c.opts.next?(i=void 0===l?1:l,o=p):i=1;let u=n.const("len",(0,t._)`${d}.length`);if(e.setParams({min:i,max:o}),void 0===o&&0===i)return void(0,r.checkStrictMode)(c,'"minContains" == 0 without "maxContains": "contains" keyword ignored');if(void 0!==o&&i>o){(0,r.checkStrictMode)(c,'"minContains" > "maxContains" is always invalid'),e.fail();return}if((0,r.alwaysValidSchema)(c,a)){let r=(0,t._)`${u} >= ${i}`;void 0!==o&&(r=(0,t._)`${r} && ${u} <= ${o}`),e.pass(r);return}c.items=!0;let m=n.name("valid");function f(){let e=n.name("_valid"),r=n.let("count",0);h(e,()=>n.if(e,()=>{var e;return e=r,void(n.code((0,t._)`${e}++`),void 0===o?n.if((0,t._)`${e} >= ${i}`,()=>n.assign(m,!0).break()):(n.if((0,t._)`${e} > ${o}`,()=>n.assign(m,!1).break()),1===i?n.assign(m,!0):n.if((0,t._)`${e} >= ${i}`,()=>n.assign(m,!0))))}))}function h(t,i){n.forRange("i",0,u,o=>{e.subschema({keyword:"contains",dataProp:o,dataPropType:r.Type.Num,compositeRule:!0},t),i()})}void 0===o&&1===i?h(m,()=>n.if(m,()=>n.break())):0===i?(n.let(m,!0),void 0!==o&&n.if((0,t._)`${d}.length > 0`,f)):(n.let(m,!1),f()),e.result(m,()=>e.reset())}}}),jb=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;let t=xM(),r=xN(),i=xB();e.error={message:({params:{property:e,depsCount:r,deps:i}})=>(0,t.str)`must have ${1===r?"property":"properties"} ${i} when property ${e} is present`,params:({params:{property:e,depsCount:r,deps:i,missingProperty:o}})=>(0,t._)`{property: ${e}, + || ${s} === "boolean" || ${o} === null`).assign(d,(0,a._)`[${o}]`)}}(e);i.else(),m(e),i.endIf(),i.if((0,a._)`${d} !== undefined`,()=>{i.assign(o,d),function({gen:e,parentData:t,parentDataProperty:r},i){e.if((0,a._)`${t} !== undefined`,()=>e.assign((0,a._)`${t}[${r}]`,i))}(e,d)})}(e,r,u):m(e)})}return f};let c=new Set(["string","number","integer","boolean","null"]);function l(e,r,i,o=t.Correct){let n,s=o===t.Correct?a.operators.EQ:a.operators.NEQ;switch(e){case"null":return(0,a._)`${r} ${s} null`;case"array":n=(0,a._)`Array.isArray(${r})`;break;case"object":n=(0,a._)`${r} && typeof ${r} == "object" && !Array.isArray(${r})`;break;case"integer":n=d((0,a._)`!(${r} % 1) && !isNaN(${r})`);break;case"number":n=d();break;default:return(0,a._)`typeof ${r} ${s} ${e}`}return o===t.Correct?n:(0,a.not)(n);function d(e=a.nil){return(0,a.and)((0,a._)`typeof ${r} == "number"`,e,i?(0,a._)`isFinite(${r})`:a.nil)}}function p(e,t,r,i){let o;if(1===e.length)return l(e[0],t,r,i);let n=(0,s.toHash)(e);if(n.array&&n.object){let e=(0,a._)`typeof ${t} != "object"`;o=n.null?e:(0,a._)`!${t} || ${e}`,delete n.null,delete n.array,delete n.object}else o=a.nil;for(let e in n.number&&delete n.integer,n)o=(0,a.and)(o,l(e,t,r,i));return o}e.checkDataType=l,e.checkDataTypes=p;let u={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>"string"==typeof e?(0,a._)`{type: ${e}}`:(0,a._)`{type: ${t}}`};function m(e){let t=function(e){let{gen:t,data:r,schema:i}=e,o=(0,s.schemaRefOrVal)(e,i,"type");return{gen:t,keyword:"type",data:r,schema:i.type,schemaCode:o,schemaValue:o,parentSchema:i,params:{},it:e}}(e);(0,n.reportError)(t,u)}e.reportTypeError=m}),xg=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.assignDefaults=void 0;let t=xc(),r=xl();function i(e,i,o){let{gen:n,compositeRule:a,data:s,opts:d}=e;if(void 0===o)return;let c=(0,t._)`${s}${(0,t.getProperty)(i)}`;if(a)return void(0,r.checkStrictMode)(e,`default is ignored for: ${c}`);let l=(0,t._)`${c} === undefined`;"empty"===d.useDefaults&&(l=(0,t._)`${l} || ${c} === null || ${c} === ""`),n.if(l,(0,t._)`${c} = ${(0,t.stringify)(o)}`)}e.assignDefaults=function(e,t){let{properties:r,items:o}=e.schema;if("object"===t&&r)for(let t in r)i(e,t,r[t].default);else"array"===t&&Array.isArray(o)&&o.forEach((t,r)=>i(e,r,t.default))}}),x_=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateUnion=e.validateArray=e.usePattern=e.callValidateCode=e.schemaProperties=e.allSchemaProperties=e.noPropertyInData=e.propertyInData=e.isOwnProperty=e.hasPropFunc=e.reportMissingProp=e.checkMissingProp=e.checkReportMissingProp=void 0;let t=xc(),r=xl(),i=xp(),o=xl();function n(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,t._)`Object.prototype.hasOwnProperty`})}function a(e,r,i){return(0,t._)`${n(e)}.call(${r}, ${i})`}function s(e,r,i,o){let n=(0,t._)`${r}${(0,t.getProperty)(i)} === undefined`;return o?(0,t.or)(n,(0,t.not)(a(e,r,i))):n}function d(e){return e?Object.keys(e).filter(e=>"__proto__"!==e):[]}e.checkReportMissingProp=function(e,r){let{gen:i,data:o,it:n}=e;i.if(s(i,o,r,n.opts.ownProperties),()=>{e.setParams({missingProperty:(0,t._)`${r}`},!0),e.error()})},e.checkMissingProp=function({gen:e,data:r,it:{opts:i}},o,n){return(0,t.or)(...o.map(o=>(0,t.and)(s(e,r,o,i.ownProperties),(0,t._)`${n} = ${o}`)))},e.reportMissingProp=function(e,t){e.setParams({missingProperty:t},!0),e.error()},e.hasPropFunc=n,e.isOwnProperty=a,e.propertyInData=function(e,r,i,o){let n=(0,t._)`${r}${(0,t.getProperty)(i)} !== undefined`;return o?(0,t._)`${n} && ${a(e,r,i)}`:n},e.noPropertyInData=s,e.allSchemaProperties=d,e.schemaProperties=function(e,t){return d(t).filter(i=>!(0,r.alwaysValidSchema)(e,t[i]))},e.callValidateCode=function({schemaCode:e,data:r,it:{gen:o,topSchemaRef:n,schemaPath:a,errorPath:s},it:d},c,l,p){let u=p?(0,t._)`${e}, ${r}, ${n}${a}`:r,m=[[i.default.instancePath,(0,t.strConcat)(i.default.instancePath,s)],[i.default.parentData,d.parentData],[i.default.parentDataProperty,d.parentDataProperty],[i.default.rootData,i.default.rootData]];d.opts.dynamicRef&&m.push([i.default.dynamicAnchors,i.default.dynamicAnchors]);let f=(0,t._)`${u}, ${o.object(...m)}`;return l!==t.nil?(0,t._)`${c}.call(${l}, ${f})`:(0,t._)`${c}(${f})`};let c=(0,t._)`new RegExp`;e.usePattern=function({gen:e,it:{opts:r}},i){let n=r.unicodeRegExp?"u":"",{regExp:a}=r.code,s=a(i,n);return e.scopeValue("pattern",{key:s.toString(),ref:s,code:(0,t._)`${"new RegExp"===a.code?c:(0,o.useFunc)(e,a)}(${i}, ${n})`})},e.validateArray=function(e){let{gen:i,data:o,keyword:n,it:a}=e,s=i.name("valid");if(a.allErrors){let e=i.let("valid",!0);return d(()=>i.assign(e,!1)),e}return i.var(s,!0),d(()=>i.break()),s;function d(a){let d=i.const("len",(0,t._)`${o}.length`);i.forRange("i",0,d,o=>{e.subschema({keyword:n,dataProp:o,dataPropType:r.Type.Num},s),i.if((0,t.not)(s),a)})}},e.validateUnion=function(e){let{gen:i,schema:o,keyword:n,it:a}=e;if(!Array.isArray(o))throw Error("ajv implementation error");if(o.some(e=>(0,r.alwaysValidSchema)(a,e))&&!a.opts.unevaluated)return;let s=i.let("valid",!1),d=i.name("_valid");i.block(()=>o.forEach((r,o)=>{let a=e.subschema({keyword:n,schemaProp:o,compositeRule:!0},d);i.assign(s,(0,t._)`${s} || ${d}`),e.mergeValidEvaluated(a,d)||i.if((0,t.not)(s))})),e.result(s,()=>e.reset(),()=>e.error(!0))}}),xv=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateKeywordUsage=e.validSchemaType=e.funcKeywordCode=e.macroKeywordCode=void 0;let t=xc(),r=xp(),i=x_(),o=xu();function n(e){let{gen:r,data:i,it:o}=e;r.if(o.parentData,()=>r.assign(i,(0,t._)`${o.parentData}[${o.parentDataProperty}]`))}function a(e,r,i){if(void 0===i)throw Error(`keyword "${r}" failed to compile`);return e.scopeValue("keyword","function"==typeof i?{ref:i}:{ref:i,code:(0,t.stringify)(i)})}e.macroKeywordCode=function(e,r){let{gen:i,keyword:o,schema:n,parentSchema:s,it:d}=e,c=r.macro.call(d.self,n,s,d),l=a(i,o,c);!1!==d.opts.validateSchema&&d.self.validateSchema(c,!0);let p=i.name("valid");e.subschema({schema:c,schemaPath:t.nil,errSchemaPath:`${d.errSchemaPath}/${o}`,topSchemaRef:l,compositeRule:!0},p),e.pass(p,()=>e.error(!0))},e.funcKeywordCode=function(e,s){var d;let{gen:c,keyword:l,schema:p,parentSchema:u,$data:m,it:f}=e;!function({schemaEnv:e},t){if(t.async&&!e.$async)throw Error("async keyword in sync schema")}(f,s);let h=a(c,l,!m&&s.compile?s.compile.call(f.self,p,u,f):s.validate),y=c.let("valid");function g(o=s.async?(0,t._)`await `:t.nil){let n=f.opts.passContext?r.default.this:r.default.self,a=!("compile"in s&&!m||!1===s.schema);c.assign(y,(0,t._)`${o}${(0,i.callValidateCode)(e,h,n,a)}`,s.modifying)}function _(e){var r;c.if((0,t.not)(null!=(r=s.valid)?r:y),e)}e.block$data(y,function(){if(!1===s.errors)g(),s.modifying&&n(e),_(()=>e.error());else{let i,a,d=s.async?(i=c.let("ruleErrs",null),c.try(()=>g((0,t._)`await `),e=>c.assign(y,!1).if((0,t._)`${e} instanceof ${f.ValidationError}`,()=>c.assign(i,(0,t._)`${e}.errors`),()=>c.throw(e))),i):(a=(0,t._)`${h}.errors`,c.assign(a,null),g(t.nil),a);s.modifying&&n(e),_(()=>(function(e,i){let{gen:n}=e;n.if((0,t._)`Array.isArray(${i})`,()=>{n.assign(r.default.vErrors,(0,t._)`${r.default.vErrors} === null ? ${i} : ${r.default.vErrors}.concat(${i})`).assign(r.default.errors,(0,t._)`${r.default.vErrors}.length`),(0,o.extendErrors)(e)},()=>e.error())})(e,d))}}),e.ok(null!=(d=s.valid)?d:y)},e.validSchemaType=function(e,t,r=!1){return!t.length||t.some(t=>"array"===t?Array.isArray(e):"object"===t?e&&"object"==typeof e&&!Array.isArray(e):typeof e==t||r&&void 0===e)},e.validateKeywordUsage=function({schema:e,opts:t,self:r,errSchemaPath:i},o,n){if(Array.isArray(o.keyword)?!o.keyword.includes(n):o.keyword!==n)throw Error("ajv implementation error");let a=o.dependencies;if(null==a?void 0:a.some(t=>!Object.prototype.hasOwnProperty.call(e,t)))throw Error(`parent schema must have dependencies of ${n}: ${a.join(",")}`);if(o.validateSchema&&!o.validateSchema(e[n])){let e=`keyword "${n}" value is invalid at path "${i}": `+r.errorsText(o.validateSchema.errors);if("log"===t.validateSchema)r.logger.error(e);else throw Error(e)}}}),xb=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.extendSubschemaMode=e.extendSubschemaData=e.getSubschema=void 0;let t=xc(),r=xl();e.getSubschema=function(e,{keyword:i,schemaProp:o,schema:n,schemaPath:a,errSchemaPath:s,topSchemaRef:d}){if(void 0!==i&&void 0!==n)throw Error('both "keyword" and "schema" passed, only one allowed');if(void 0!==i){let n=e.schema[i];return void 0===o?{schema:n,schemaPath:(0,t._)`${e.schemaPath}${(0,t.getProperty)(i)}`,errSchemaPath:`${e.errSchemaPath}/${i}`}:{schema:n[o],schemaPath:(0,t._)`${e.schemaPath}${(0,t.getProperty)(i)}${(0,t.getProperty)(o)}`,errSchemaPath:`${e.errSchemaPath}/${i}/${(0,r.escapeFragment)(o)}`}}if(void 0!==n){if(void 0===a||void 0===s||void 0===d)throw Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:n,schemaPath:a,topSchemaRef:d,errSchemaPath:s}}throw Error('either "keyword" or "schema" must be passed')},e.extendSubschemaData=function(e,i,{dataProp:o,dataPropType:n,data:a,dataTypes:s,propertyName:d}){if(void 0!==a&&void 0!==o)throw Error('both "data" and "dataProp" passed, only one allowed');let{gen:c}=i;if(void 0!==o){let{errorPath:a,dataPathArr:s,opts:d}=i;l(c.let("data",(0,t._)`${i.data}${(0,t.getProperty)(o)}`,!0)),e.errorPath=(0,t.str)`${a}${(0,r.getErrorPath)(o,n,d.jsPropertySyntax)}`,e.parentDataProperty=(0,t._)`${o}`,e.dataPathArr=[...s,e.parentDataProperty]}function l(t){e.data=t,e.dataLevel=i.dataLevel+1,e.dataTypes=[],i.definedProperties=new Set,e.parentData=i.data,e.dataNames=[...i.dataNames,t]}void 0!==a&&(l(a instanceof t.Name?a:c.let("data",a,!0)),void 0!==d&&(e.propertyName=d)),s&&(e.dataTypes=s)},e.extendSubschemaMode=function(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:i,createErrors:o,allErrors:n}){void 0!==i&&(e.compositeRule=i),void 0!==o&&(e.createErrors=o),void 0!==n&&(e.allErrors=n),e.jtdDiscriminator=t,e.jtdMetadata=r}}),x$=SP((e,t)=>{t.exports=function e(t,r){if(t===r)return!0;if(t&&r&&"object"==typeof t&&"object"==typeof r){if(t.constructor!==r.constructor)return!1;if(Array.isArray(t)){if((i=t.length)!=r.length)return!1;for(o=i;0!=o--;)if(!e(t[o],r[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if((i=(n=Object.keys(t)).length)!==Object.keys(r).length)return!1;for(o=i;0!=o--;)if(!Object.prototype.hasOwnProperty.call(r,n[o]))return!1;for(o=i;0!=o--;){var i,o,n,a=n[o];if(!e(t[a],r[a]))return!1}return!0}return t!=t&&r!=r}}),xS=SP((e,t)=>{var r=t.exports=function(e,t,i){"function"==typeof t&&(i=t,t={});var o="function"==typeof(i=t.cb||i)?i:i.pre||function(){};!function e(t,i,o,n,a,s,d,c,l,p){if(n&&"object"==typeof n&&!Array.isArray(n)){for(var u in i(n,a,s,d,c,l,p),n){var m=n[u];if(Array.isArray(m)){if(u in r.arrayKeywords)for(var f=0;f{Object.defineProperty(e,"__esModule",{value:!0}),e.getSchemaRefs=e.resolveUrl=e.normalizeId=e._getFullPath=e.getFullPath=e.inlineRef=void 0;let t=xl(),r=x$(),i=xS(),o=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);e.inlineRef=function(e,r=!0){return"boolean"==typeof e||(!0===r?!function e(t){for(let r in t){if(n.has(r))return!0;let i=t[r];if(Array.isArray(i)&&i.some(e)||"object"==typeof i&&e(i))return!0}return!1}(e):!!r&&function e(r){let i=0;for(let n in r)if("$ref"===n||(i++,!o.has(n)&&("object"==typeof r[n]&&(0,t.eachItem)(r[n],t=>i+=e(t)),1/0===i)))return 1/0;return i}(e)<=r)};let n=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function a(e,t="",r){return!1!==r&&(t=c(t)),s(e,e.parse(t))}function s(e,t){return e.serialize(t).split("#")[0]+"#"}e.getFullPath=a,e._getFullPath=s;let d=/#\/?$/;function c(e){return e?e.replace(d,""):""}e.normalizeId=c,e.resolveUrl=function(e,t,r){return r=c(r),e.resolve(t,r)};let l=/^[a-z_][-a-z0-9._]*$/i;e.getSchemaRefs=function(e,t){if("boolean"==typeof e)return{};let{schemaId:o,uriResolver:n}=this.opts,s=c(e[o]||t),d={"":s},p=a(n,s,!1),u={},m=new Set;return i(e,{allKeys:!0},(e,t,r,i)=>{if(void 0===i)return;let n=p+t,a=d[i];function s(t){let r=this.opts.uriResolver.resolve;if(t=c(a?r(a,t):t),m.has(t))throw h(t);m.add(t);let i=this.refs[t];return"string"==typeof i&&(i=this.refs[i]),"object"==typeof i?f(e,i.schema,t):t!==c(n)&&("#"===t[0]?(f(e,u[t],t),u[t]=e):this.refs[t]=n),t}function y(e){if("string"==typeof e){if(!l.test(e))throw Error(`invalid anchor "${e}"`);s.call(this,`#${e}`)}}"string"==typeof e[o]&&(a=s.call(this,e[o])),y.call(this,e.$anchor),y.call(this,e.$dynamicAnchor),d[t]=a}),u;function f(e,t,i){if(void 0!==t&&!r(e,t))throw h(i)}function h(e){return Error(`reference "${e}" resolves to more than one schema`)}}}),xw=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getData=e.KeywordCxt=e.validateFunctionCode=void 0;let t=xm(),r=xy(),i=xh(),o=xy(),n=xg(),a=xv(),s=xb(),d=xc(),c=xp(),l=xk(),p=xl(),u=xu();function m({gen:e,validateName:t,schema:r,schemaEnv:i,opts:o},n){var a;o.code.es5?e.func(t,(0,d._)`${c.default.data}, ${c.default.valCxt}`,i.$async,()=>{var t,i;e.code((0,d._)`"use strict"; ${f(r,o)}`),t=e,i=o,t.if(c.default.valCxt,()=>{t.var(c.default.instancePath,(0,d._)`${c.default.valCxt}.${c.default.instancePath}`),t.var(c.default.parentData,(0,d._)`${c.default.valCxt}.${c.default.parentData}`),t.var(c.default.parentDataProperty,(0,d._)`${c.default.valCxt}.${c.default.parentDataProperty}`),t.var(c.default.rootData,(0,d._)`${c.default.valCxt}.${c.default.rootData}`),i.dynamicRef&&t.var(c.default.dynamicAnchors,(0,d._)`${c.default.valCxt}.${c.default.dynamicAnchors}`)},()=>{t.var(c.default.instancePath,(0,d._)`""`),t.var(c.default.parentData,(0,d._)`undefined`),t.var(c.default.parentDataProperty,(0,d._)`undefined`),t.var(c.default.rootData,c.default.data),i.dynamicRef&&t.var(c.default.dynamicAnchors,(0,d._)`{}`)}),e.code(n)}):e.func(t,(0,d._)`${c.default.data}, ${(a=o,(0,d._)`{${c.default.instancePath}="", ${c.default.parentData}, ${c.default.parentDataProperty}, ${c.default.rootData}=${c.default.data}${a.dynamicRef?(0,d._)`, ${c.default.dynamicAnchors}={}`:d.nil}}={}`)}`,i.$async,()=>e.code(f(r,o)).code(n))}function f(e,t){let r="object"==typeof e&&e[t.schemaId];return r&&(t.code.source||t.code.process)?(0,d._)`/*# sourceURL=${r} */`:d.nil}function h({schema:e,self:t}){if("boolean"==typeof e)return!e;for(let r in e)if(t.RULES.all[r])return!0;return!1}function y(e){return"boolean"!=typeof e.schema}function g(e){(0,p.checkUnknownRules)(e),function(e){let{schema:t,errSchemaPath:r,opts:i,self:o}=e;t.$ref&&i.ignoreKeywordsWithRef&&(0,p.schemaHasRulesButRef)(t,o.RULES)&&o.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}(e)}function _(e,t){if(e.opts.jtd)return b(e,[],!1,t);let i=(0,r.getSchemaTypes)(e.schema);b(e,i,!(0,r.coerceAndCheckDataType)(e,i),t)}function v({gen:e,schemaEnv:t,schema:r,errSchemaPath:i,opts:o}){let n=r.$comment;if(!0===o.$comment)e.code((0,d._)`${c.default.self}.logger.log(${n})`);else if("function"==typeof o.$comment){let r=(0,d.str)`${i}/$comment`,o=e.scopeValue("root",{ref:t.root});e.code((0,d._)`${c.default.self}.opts.$comment(${n}, ${r}, ${o}.schema)`)}}function b(e,t,r,n){var a,s,l,u;let{gen:m,schema:f,data:h,allErrors:y,opts:g,self:_}=e,{RULES:v}=_;if(f.$ref&&(g.ignoreKeywordsWithRef||!(0,p.schemaHasRulesButRef)(f,v)))return void m.block(()=>R(e,"$ref",v.all.$ref.definition));function b(a){(0,i.shouldUseGroup)(f,a)&&(a.type?(m.if((0,o.checkDataType)(a.type,h,g.strictNumbers)),$(e,a),1===t.length&&t[0]===a.type&&r&&(m.else(),(0,o.reportTypeError)(e)),m.endIf()):$(e,a),y||m.if((0,d._)`${c.default.errors} === ${n||0}`))}g.jtd||(a=e,s=t,!a.schemaEnv.meta&&a.opts.strictTypes&&(function(e,t){if(t.length){if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach(t=>{S(e.dataTypes,t)||k(e,`type "${t}" not allowed by context "${e.dataTypes.join(",")}"`)}),function(e,t){let r=[];for(let i of e.dataTypes)S(t,i)?r.push(i):t.includes("integer")&&"number"===i&&r.push("integer");e.dataTypes=r}(e,t)}}(a,s),a.opts.allowUnionTypes||(l=a,(u=s).length>1&&!(2===u.length&&u.includes("null"))&&k(l,"use allowUnionTypes to allow union type keyword")),function(e,t){let r=e.self.RULES.all;for(let o in r){let n=r[o];if("object"==typeof n&&(0,i.shouldUseRule)(e.schema,n)){let{type:r}=n.definition;r.length&&!r.some(e=>{var r,i;return r=t,i=e,r.includes(i)||"number"===i&&r.includes("integer")})&&k(e,`missing type "${r.join(",")}" for keyword "${o}"`)}}}(a,a.dataTypes))),m.block(()=>{for(let e of v.rules)b(e);b(v.post)})}function $(e,t){let{gen:r,schema:o,opts:{useDefaults:a}}=e;a&&(0,n.assignDefaults)(e,t.type),r.block(()=>{for(let r of t.rules)(0,i.shouldUseRule)(o,r)&&R(e,r.keyword,r.definition,t.type)})}function S(e,t){return e.includes(t)||"integer"===t&&e.includes("number")}function k(e,t){let r=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${r}" (strictTypes)`,(0,p.checkStrictMode)(e,t,e.opts.strictTypes)}e.validateFunctionCode=function(e){y(e)&&(g(e),h(e))?function(e){let{schema:t,opts:r,gen:i}=e;m(e,()=>{r.$comment&&t.$comment&&v(e),function(e){let{schema:t,opts:r}=e;void 0!==t.default&&r.useDefaults&&r.strictSchema&&(0,p.checkStrictMode)(e,"default is ignored in the schema root")}(e),i.let(c.default.vErrors,null),i.let(c.default.errors,0),r.unevaluated&&function(e){let{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",(0,d._)`${r}.evaluated`),t.if((0,d._)`${e.evaluated}.dynamicProps`,()=>t.assign((0,d._)`${e.evaluated}.props`,(0,d._)`undefined`)),t.if((0,d._)`${e.evaluated}.dynamicItems`,()=>t.assign((0,d._)`${e.evaluated}.items`,(0,d._)`undefined`))}(e),_(e),function(e){let{gen:t,schemaEnv:r,validateName:i,ValidationError:o,opts:n}=e;r.$async?t.if((0,d._)`${c.default.errors} === 0`,()=>t.return(c.default.data),()=>t.throw((0,d._)`new ${o}(${c.default.vErrors})`)):(t.assign((0,d._)`${i}.errors`,c.default.vErrors),n.unevaluated&&function({gen:e,evaluated:t,props:r,items:i}){r instanceof d.Name&&e.assign((0,d._)`${t}.props`,r),i instanceof d.Name&&e.assign((0,d._)`${t}.items`,i)}(e),t.return((0,d._)`${c.default.errors} === 0`))}(e)})}(e):m(e,()=>(0,t.topBoolOrEmptySchema)(e))};var w=class{constructor(e,t,r){if((0,a.validateKeywordUsage)(e,t,r),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=r,this.data=e.data,this.schema=e.schema[r],this.$data=t.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,p.schemaRefOrVal)(e,this.schema,r,this.$data),this.schemaType=t.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=t,this.$data)this.schemaCode=e.gen.const("vSchema",q(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,a.validSchemaType)(this.schema,t.schemaType,t.allowUndefined))throw Error(`${r} value must be ${JSON.stringify(t.schemaType)}`);("code"in t?t.trackErrors:!1!==t.errors)&&(this.errsCount=e.gen.const("_errs",c.default.errors))}result(e,t,r){this.failResult((0,d.not)(e),t,r)}failResult(e,t,r){this.gen.if(e),r?r():this.error(),t?(this.gen.else(),t(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,t){this.failResult((0,d.not)(e),void 0,t)}fail(e){if(void 0===e){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);let{schemaCode:t}=this;this.fail((0,d._)`${t} !== undefined && (${(0,d.or)(this.invalid$data(),e)})`)}error(e,t,r){if(t){this.setParams(t),this._error(e,r),this.setParams({});return}this._error(e,r)}_error(e,t){(e?u.reportExtraError:u.reportError)(this,this.def.error,t)}$dataError(){(0,u.reportError)(this,this.def.$dataError||u.keyword$DataError)}reset(){if(void 0===this.errsCount)throw Error('add "trackErrors" to keyword definition');(0,u.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,t){t?Object.assign(this.params,e):this.params=e}block$data(e,t,r=d.nil){this.gen.block(()=>{this.check$data(e,r),t()})}check$data(e=d.nil,t=d.nil){if(!this.$data)return;let{gen:r,schemaCode:i,schemaType:o,def:n}=this;r.if((0,d.or)((0,d._)`${i} === undefined`,t)),e!==d.nil&&r.assign(e,!0),(o.length||n.validateSchema)&&(r.elseIf(this.invalid$data()),this.$dataError(),e!==d.nil&&r.assign(e,!1)),r.else()}invalid$data(){let{gen:e,schemaCode:t,schemaType:r,def:i,it:n}=this;return(0,d.or)(function(){if(r.length){if(!(t instanceof d.Name))throw Error("ajv implementation error");let e=Array.isArray(r)?r:[r];return(0,d._)`${(0,o.checkDataTypes)(e,t,n.opts.strictNumbers,o.DataType.Wrong)}`}return d.nil}(),function(){if(i.validateSchema){let r=e.scopeValue("validate$data",{ref:i.validateSchema});return(0,d._)`!${r}(${t})`}return d.nil}())}subschema(e,r){let i=(0,s.getSubschema)(this.it,e);(0,s.extendSubschemaData)(i,this.it,e),(0,s.extendSubschemaMode)(i,e);let o={...this.it,...i,items:void 0,props:void 0};return!function(e,r){if(y(e)&&(g(e),h(e)))return function(e,t){var r;let i,{schema:o,gen:n,opts:a}=e;a.$comment&&o.$comment&&v(e),(i=(r=e).schema[r.opts.schemaId])&&(r.baseId=(0,l.resolveUrl)(r.opts.uriResolver,r.baseId,i)),function(e){if(e.schema.$async&&!e.schemaEnv.$async)throw Error("async schema in sync schema")}(e);let s=n.const("_errs",c.default.errors);_(e,s),n.var(t,(0,d._)`${s} === ${c.default.errors}`)}(e,r);(0,t.boolOrEmptySchema)(e,r)}(o,r),o}mergeEvaluated(e,t){let{it:r,gen:i}=this;r.opts.unevaluated&&(!0!==r.props&&void 0!==e.props&&(r.props=p.mergeEvaluated.props(i,e.props,r.props,t)),!0!==r.items&&void 0!==e.items&&(r.items=p.mergeEvaluated.items(i,e.items,r.items,t)))}mergeValidEvaluated(e,t){let{it:r,gen:i}=this;if(r.opts.unevaluated&&(!0!==r.props||!0!==r.items))return i.if(t,()=>this.mergeEvaluated(e,d.Name)),!0}};function R(e,t,r,i){let o=new w(e,r,t);"code"in r?r.code(o,i):o.$data&&r.validate?(0,a.funcKeywordCode)(o,r):"macro"in r?(0,a.macroKeywordCode)(o,r):(r.compile||r.validate)&&(0,a.funcKeywordCode)(o,r)}e.KeywordCxt=w;let P=/^\/(?:[^~]|~0|~1)*$/,V=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function q(e,{dataLevel:t,dataNames:r,dataPathArr:i}){let o,n;if(""===e)return c.default.rootData;if("/"===e[0]){if(!P.test(e))throw Error(`Invalid JSON-pointer: ${e}`);o=e,n=c.default.rootData}else{let a=V.exec(e);if(!a)throw Error(`Invalid JSON-pointer: ${e}`);let d=+a[1];if("#"===(o=a[2])){if(d>=t)throw Error(s("property/index",d));return i[t-d]}if(d>t)throw Error(s("data",d));if(n=r[t-d],!o)return n}let a=n;for(let e of o.split("/"))e&&(n=(0,d._)`${n}${(0,d.getProperty)((0,p.unescapeJsonPointer)(e))}`,a=(0,d._)`${a} && ${n}`);return a;function s(e,r){return`Cannot access ${e} ${r} levels up, current level is ${t}`}}e.getData=q}),xR=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=class extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}}}),xP=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xk();e.default=class extends Error{constructor(e,r,i,o){super(o||`can't resolve reference ${i} from id ${r}`),this.missingRef=(0,t.resolveUrl)(e,r,i),this.missingSchema=(0,t.normalizeId)((0,t.getFullPath)(e,this.missingRef))}}}),xV=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.resolveSchema=e.getCompilingSchema=e.resolveRef=e.compileSchema=e.SchemaEnv=void 0;let t=xc(),r=xR(),i=xp(),o=xk(),n=xl(),a=xw();var s=class{constructor(e){var t;let r;this.refs={},this.dynamicAnchors={},"object"==typeof e.schema&&(r=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=null!=(t=e.baseId)?t:(0,o.normalizeId)(null==r?void 0:r[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=null==r?void 0:r.$async,this.refs={}}};function d(e){let n,s,d=l.call(this,e);if(d)return d;let c=(0,o.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:p,lines:u}=this.opts.code,{ownProperties:m}=this.opts,f=new t.CodeGen(this.scope,{es5:p,lines:u,ownProperties:m});e.$async&&(n=f.scopeValue("Error",{ref:r.default,code:(0,t._)`require("ajv/dist/runtime/validation_error").default`}));let h=f.scopeName("validate");e.validateName=h;let y={gen:f,allErrors:this.opts.allErrors,data:i.default.data,parentData:i.default.parentData,parentDataProperty:i.default.parentDataProperty,dataNames:[i.default.data],dataPathArr:[t.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:f.scopeValue("schema",!0===this.opts.code.source?{ref:e.schema,code:(0,t.stringify)(e.schema)}:{ref:e.schema}),validateName:h,ValidationError:n,schema:e.schema,schemaEnv:e,rootId:c,baseId:e.baseId||c,schemaPath:t.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,t._)`""`,opts:this.opts,self:this};try{this._compilations.add(e),(0,a.validateFunctionCode)(y),f.optimize(this.opts.code.optimize);let r=f.toString();s=`${f.scopeRefs(i.default.scope)}return ${r}`,this.opts.code.process&&(s=this.opts.code.process(s,e));let o=Function(`${i.default.self}`,`${i.default.scope}`,s)(this,this.scope.get());if(this.scope.value(h,{ref:o}),o.errors=null,o.schema=e.schema,o.schemaEnv=e,e.$async&&(o.$async=!0),!0===this.opts.code.source&&(o.source={validateName:h,validateCode:r,scopeValues:f._values}),this.opts.unevaluated){let{props:e,items:r}=y;o.evaluated={props:e instanceof t.Name?void 0:e,items:r instanceof t.Name?void 0:r,dynamicProps:e instanceof t.Name,dynamicItems:r instanceof t.Name},o.source&&(o.source.evaluated=(0,t.stringify)(o.evaluated))}return e.validate=o,e}catch(t){throw delete e.validate,delete e.validateName,s&&this.logger.error("Error compiling schema, function code:",s),t}finally{this._compilations.delete(e)}}function c(e){return(0,o.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:d.call(this,e)}function l(e){for(let i of this._compilations){var t,r;if(t=i,r=e,t.schema===r.schema&&t.root===r.root&&t.baseId===r.baseId)return i}}function p(e,t){let r;for(;"string"==typeof(r=this.refs[t]);)t=r;return r||this.schemas[t]||u.call(this,e,t)}function u(e,t){let r=this.opts.uriResolver.parse(t),i=(0,o._getFullPath)(this.opts.uriResolver,r),n=(0,o.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&i===n)return f.call(this,r,e);let a=(0,o.normalizeId)(i),c=this.refs[a]||this.schemas[a];if("string"==typeof c){let t=u.call(this,e,c);if("object"!=typeof(null==t?void 0:t.schema))return;return f.call(this,r,t)}if("object"==typeof(null==c?void 0:c.schema)){if(c.validate||d.call(this,c),a===(0,o.normalizeId)(t)){let{schema:t}=c,{schemaId:r}=this.opts,i=t[r];return i&&(n=(0,o.resolveUrl)(this.opts.uriResolver,n,i)),new s({schema:t,schemaId:r,root:e,baseId:n})}return f.call(this,r,c)}}e.SchemaEnv=s,e.compileSchema=d,e.resolveRef=function(e,t,r){var i;r=(0,o.resolveUrl)(this.opts.uriResolver,t,r);let n=e.refs[r];if(n)return n;let a=p.call(this,e,r);if(void 0===a){let o=null==(i=e.localRefs)?void 0:i[r],{schemaId:n}=this.opts;o&&(a=new s({schema:o,schemaId:n,root:e,baseId:t}))}if(void 0!==a)return e.refs[r]=c.call(this,a)},e.getCompilingSchema=l,e.resolveSchema=u;let m=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function f(e,{baseId:t,schema:r,root:i}){var a;let d;if((null==(a=e.fragment)?void 0:a[0])!=="/")return;for(let i of e.fragment.slice(1).split("/")){if("boolean"==typeof r)return;let e=r[(0,n.unescapeFragment)(i)];if(void 0===e)return;let a="object"==typeof(r=e)&&r[this.opts.schemaId];!m.has(i)&&a&&(t=(0,o.resolveUrl)(this.opts.uriResolver,t,a))}if("boolean"!=typeof r&&r.$ref&&!(0,n.schemaHasRulesButRef)(r,this.RULES)){let e=(0,o.resolveUrl)(this.opts.uriResolver,t,r.$ref);d=u.call(this,i,e)}let{schemaId:c}=this.opts;if((d=d||new s({schema:r,schemaId:c,root:i,baseId:t})).schema!==d.root.schema)return d}}),xq=SP((e,t)=>{t.exports={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}}),xI=SP((e,t)=>{let r=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),i=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);function o(e){let t="",r=0,i=0;for(i=0;i=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";t+=e[i];break}for(i+=1;i=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";t+=e[i]}return t}function n(e){return e.length=0,!0}function a(e,t,r){if(e.length){let i=o(e);if(""===i)return r.error=!0,!1;t.push(i),e.length=0}return!0}function s(e){if(2>function(e){let t=0;for(let r=0;r7){r.error=!0;break}o>0&&":"===e[o-1]&&(d=!0),i.push(":");continue}else if("%"===a){if(!l(s,i,r))break;l=n}else{s.push(a);continue}}return s.length&&(l===n?r.zone=s.join(""):c?i.push(s.join("")):i.push(o(s))),r.address=i.join(""),r}(e);if(t.error)return{host:e,isIPV6:!1};{let e=t.address,r=t.address;return t.zone&&(e+="%"+t.zone,r+="%25"+t.zone),{host:e,isIPV6:!0,escapedHost:r}}}t.exports={nonSimpleDomain:RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u),recomposeAuthority:function(e){let t=[];if(void 0!==e.userinfo&&(t.push(e.userinfo),t.push("@")),void 0!==e.host){let r=unescape(e.host);if(!i(r)){let t=s(r);r=!0===t.isIPV6?`[${t.escapedHost}]`:e.host}t.push(r)}return("number"==typeof e.port||"string"==typeof e.port)&&(t.push(":"),t.push(String(e.port))),t.length?t.join(""):void 0},normalizeComponentEncoding:function(e,t){let r=!0!==t?escape:unescape;return void 0!==e.scheme&&(e.scheme=r(e.scheme)),void 0!==e.userinfo&&(e.userinfo=r(e.userinfo)),void 0!==e.host&&(e.host=r(e.host)),void 0!==e.path&&(e.path=r(e.path)),void 0!==e.query&&(e.query=r(e.query)),void 0!==e.fragment&&(e.fragment=r(e.fragment)),e},removeDotSegments:function(e){let t=e,r=[],i=-1,o=0;for(;o=t.length;){if(1===o)if("."===t)break;else if("/"===t){r.push("/");break}else{r.push(t);break}if(2===o){if("."===t[0]){if("."===t[1])break;else if("/"===t[1]){t=t.slice(2);continue}}else if("/"===t[0]&&("."===t[1]||"/"===t[1])){r.push("/");break}}else if(3===o&&"/.."===t){0!==r.length&&r.pop(),r.push("/");break}if("."===t[0]){if("."===t[1]){if("/"===t[2]){t=t.slice(3);continue}}else if("/"===t[1]){t=t.slice(2);continue}}else if("/"===t[0]&&"."===t[1]){if("/"===t[2]){t=t.slice(2);continue}else if("."===t[2]&&"/"===t[3]){t=t.slice(3),0!==r.length&&r.pop();continue}}if(-1===(i=t.indexOf("/",1))){r.push(t);break}r.push(t.slice(0,i)),t=t.slice(i)}return r.join("")},isIPv4:i,isUUID:r,normalizeIPv6:s,stringArrayToHexStripped:o}}),xx=SP((e,t)=>{let{isUUID:r}=xI(),i=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,o=["http","https","ws","wss","urn","urn:uuid"];function n(e){return!0===e.secure||!1!==e.secure&&!!e.scheme&&3===e.scheme.length&&("w"===e.scheme[0]||"W"===e.scheme[0])&&("s"===e.scheme[1]||"S"===e.scheme[1])&&("s"===e.scheme[2]||"S"===e.scheme[2])}function a(e){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e}function s(e){let t="https"===String(e.scheme).toLowerCase();return(e.port===(t?443:80)||""===e.port)&&(e.port=void 0),e.path||(e.path="/"),e}let d={scheme:"http",domainHost:!0,parse:a,serialize:s},c={scheme:"https",domainHost:d.domainHost,parse:a,serialize:s},l={scheme:"ws",domainHost:!0,parse:function(e){return e.secure=n(e),e.resourceName=(e.path||"/")+(e.query?"?"+e.query:""),e.path=void 0,e.query=void 0,e},serialize:function(e){if((e.port===(n(e)?443:80)||""===e.port)&&(e.port=void 0),"boolean"==typeof e.secure&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){let[t,r]=e.resourceName.split("?");e.path=t&&"/"!==t?t:void 0,e.query=r,e.resourceName=void 0}return e.fragment=void 0,e}},p={scheme:"wss",domainHost:l.domainHost,parse:l.parse,serialize:l.serialize},u={http:d,https:c,ws:l,wss:p,urn:{scheme:"urn",parse:function(e,t){if(!e.path)return e.error="URN can not be parsed",e;let r=e.path.match(i);if(r){let i=t.scheme||e.scheme||"urn";e.nid=r[1].toLowerCase(),e.nss=r[2];let o=m(`${i}:${t.nid||e.nid}`);e.path=void 0,o&&(e=o.parse(e,t))}else e.error=e.error||"URN can not be parsed.";return e},serialize:function(e,t){if(void 0===e.nid)throw Error("URN without nid cannot be serialized");let r=t.scheme||e.scheme||"urn",i=e.nid.toLowerCase(),o=m(`${r}:${t.nid||i}`);o&&(e=o.serialize(e,t));let n=e,a=e.nss;return n.path=`${i||t.nid}:${a}`,t.skipEscape=!0,n},skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:function(e,t){return e.uuid=e.nss,e.nss=void 0,t.tolerant||e.uuid&&r(e.uuid)||(e.error=e.error||"UUID is not valid."),e},serialize:function(e){return e.nss=(e.uuid||"").toLowerCase(),e},skipNormalize:!0}};function m(e){return e&&(u[e]||u[e.toLowerCase()])||void 0}Object.setPrototypeOf(u,null),t.exports={wsIsSecure:n,SCHEMES:u,isValidSchemeName:function(e){return -1!==o.indexOf(e)},getSchemeHandler:m}}),xj=SP((e,t)=>{let{normalizeIPv6:r,removeDotSegments:i,recomposeAuthority:o,normalizeComponentEncoding:n,isIPv4:a,nonSimpleDomain:s}=xI(),{SCHEMES:d,getSchemeHandler:c}=xx();function l(e,t,r,o){let n={};return o||(e=m(p(e,r),r),t=m(p(t,r),r)),!(r=r||{}).tolerant&&t.scheme?(n.scheme=t.scheme,n.userinfo=t.userinfo,n.host=t.host,n.port=t.port,n.path=i(t.path||""),n.query=t.query):(void 0!==t.userinfo||void 0!==t.host||void 0!==t.port?(n.userinfo=t.userinfo,n.host=t.host,n.port=t.port,n.path=i(t.path||""),n.query=t.query):(t.path?("/"===t.path[0]?n.path=i(t.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?n.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:n.path=t.path:n.path="/"+t.path,n.path=i(n.path)),n.query=t.query):(n.path=e.path,void 0!==t.query?n.query=t.query:n.query=e.query),n.userinfo=e.userinfo,n.host=e.host,n.port=e.port),n.scheme=e.scheme),n.fragment=t.fragment,n}function p(e,t){let r={host:e.host,scheme:e.scheme,userinfo:e.userinfo,port:e.port,path:e.path,query:e.query,nid:e.nid,nss:e.nss,uuid:e.uuid,fragment:e.fragment,reference:e.reference,resourceName:e.resourceName,secure:e.secure,error:""},n=Object.assign({},t),a=[],s=c(n.scheme||r.scheme);s&&s.serialize&&s.serialize(r,n),void 0!==r.path&&(n.skipEscape?r.path=unescape(r.path):(r.path=escape(r.path),void 0!==r.scheme&&(r.path=r.path.split("%3A").join(":")))),"suffix"!==n.reference&&r.scheme&&a.push(r.scheme,":");let d=o(r);if(void 0!==d&&("suffix"!==n.reference&&a.push("//"),a.push(d),r.path&&"/"!==r.path[0]&&a.push("/")),void 0!==r.path){let e=r.path;n.absolutePath||s&&s.absolutePath||(e=i(e)),void 0===d&&"/"===e[0]&&"/"===e[1]&&(e="/%2F"+e.slice(2)),a.push(e)}return void 0!==r.query&&a.push("?",r.query),void 0!==r.fragment&&a.push("#",r.fragment),a.join("")}let u=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function m(e,t){let i=Object.assign({},t),o={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},n=!1;"suffix"===i.reference&&(e=i.scheme?i.scheme+":"+e:"//"+e);let d=e.match(u);if(d){if(o.scheme=d[1],o.userinfo=d[3],o.host=d[4],o.port=parseInt(d[5],10),o.path=d[6]||"",o.query=d[7],o.fragment=d[8],isNaN(o.port)&&(o.port=d[5]),o.host)if(!1===a(o.host)){let e=r(o.host);o.host=e.host.toLowerCase(),n=e.isIPV6}else n=!0;void 0!==o.scheme||void 0!==o.userinfo||void 0!==o.host||void 0!==o.port||void 0!==o.query||o.path?void 0===o.scheme?o.reference="relative":void 0===o.fragment?o.reference="absolute":o.reference="uri":o.reference="same-document",i.reference&&"suffix"!==i.reference&&i.reference!==o.reference&&(o.error=o.error||"URI is not a "+i.reference+" reference.");let t=c(i.scheme||o.scheme);if(!i.unicodeSupport&&(!t||!t.unicodeSupport)&&o.host&&(i.domainHost||t&&t.domainHost)&&!1===n&&s(o.host))try{o.host=URL.domainToASCII(o.host.toLowerCase())}catch(e){o.error=o.error||"Host's domain name can not be converted to ASCII: "+e}(!t||t&&!t.skipNormalize)&&(-1!==e.indexOf("%")&&(void 0!==o.scheme&&(o.scheme=unescape(o.scheme)),void 0!==o.host&&(o.host=unescape(o.host))),o.path&&(o.path=escape(unescape(o.path))),o.fragment&&(o.fragment=encodeURI(decodeURIComponent(o.fragment)))),t&&t.parse&&t.parse(o,i)}else o.error=o.error||"URI can not be parsed.";return o}let f={SCHEMES:d,normalize:function(e,t){return"string"==typeof e?e=p(m(e,t),t):"object"==typeof e&&(e=m(p(e,t),t)),e},resolve:function(e,t,r){let i=r?Object.assign({scheme:"null"},r):{scheme:"null"},o=l(m(e,i),m(t,i),i,!0);return i.skipEscape=!0,p(o,i)},resolveComponent:l,equal:function(e,t,r){return"string"==typeof e?e=p(n(m(e=unescape(e),r),!0),{...r,skipEscape:!0}):"object"==typeof e&&(e=p(n(e,!0),{...r,skipEscape:!0})),"string"==typeof t?t=p(n(m(t=unescape(t),r),!0),{...r,skipEscape:!0}):"object"==typeof t&&(t=p(n(t,!0),{...r,skipEscape:!0})),e.toLowerCase()===t.toLowerCase()},serialize:p,parse:m};t.exports=f,t.exports.default=f,t.exports.fastUri=f}),xC=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xj();t.code='require("ajv/dist/runtime/uri").default',e.default=t}),xT=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var t=xw();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var r=xc();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return r.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return r.CodeGen}});let i=xR(),o=xP(),n=xf(),a=xV(),s=xc(),d=xk(),c=xy(),l=xl(),p=xq(),u=xC(),m=(e,t)=>new RegExp(e,t);m.code="new RegExp";let f=["removeAdditional","useDefaults","coerceTypes"],h=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),y={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},g={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'};var _=class{constructor(e={}){var t,r,i,o,a,d,c,l,p,f,_,b,P,V,q,I,x,j,C,T,O,E,A,M,W,N;let z,D,F,L,U;this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...(z=(t=e).strict,F=!0===(D=null==(r=t.code)?void 0:r.optimize)||void 0===D?1:D||0,L=null!=(o=null==(i=t.code)?void 0:i.regExp)?o:m,U=null!=(a=t.uriResolver)?a:u.default,{strictSchema:null==(c=null!=(d=t.strictSchema)?d:z)||c,strictNumbers:null==(p=null!=(l=t.strictNumbers)?l:z)||p,strictTypes:null!=(_=null!=(f=t.strictTypes)?f:z)?_:"log",strictTuples:null!=(P=null!=(b=t.strictTuples)?b:z)?P:"log",strictRequired:null!=(q=null!=(V=t.strictRequired)?V:z)&&q,code:t.code?{...t.code,optimize:F,regExp:L}:{optimize:F,regExp:L},loopRequired:null!=(I=t.loopRequired)?I:200,loopEnum:null!=(x=t.loopEnum)?x:200,meta:null==(j=t.meta)||j,messages:null==(C=t.messages)||C,inlineRefs:null==(T=t.inlineRefs)||T,schemaId:null!=(O=t.schemaId)?O:"$id",addUsedSchema:null==(E=t.addUsedSchema)||E,validateSchema:null==(A=t.validateSchema)||A,validateFormats:null==(M=t.validateFormats)||M,unicodeRegExp:null==(W=t.unicodeRegExp)||W,int32range:null==(N=t.int32range)||N,uriResolver:U})};let{es5:H,lines:G}=this.opts.code;this.scope=new s.ValueScope({scope:{},prefixes:h,es5:H,lines:G}),this.logger=function(e){if(!1===e)return R;if(void 0===e)return console;if(e.log&&e.warn&&e.error)return e;throw Error("logger must implement log, warn and error methods")}(e.logger);let B=e.validateFormats;e.validateFormats=!1,this.RULES=(0,n.getRules)(),v.call(this,y,e,"NOT SUPPORTED"),v.call(this,g,e,"DEPRECATED","warn"),this._metaOpts=w.call(this),e.formats&&S.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&k.call(this,e.keywords),"object"==typeof e.meta&&this.addMetaSchema(e.meta),$.call(this),e.validateFormats=B}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:e,meta:t,schemaId:r}=this.opts,i=p;"id"===r&&((i={...p}).id=i.$id,delete i.$id),t&&e&&this.addMetaSchema(i,i[r],!1)}defaultMeta(){let{meta:e,schemaId:t}=this.opts;return this.opts.defaultMeta="object"==typeof e?e[t]||e:void 0}validate(e,t){let r;if("string"==typeof e){if(!(r=this.getSchema(e)))throw Error(`no schema with key or ref "${e}"`)}else r=this.compile(e);let i=r(t);return"$async"in r||(this.errors=r.errors),i}compile(e,t){let r=this._addSchema(e,t);return r.validate||this._compileSchemaEnv(r)}compileAsync(e,t){if("function"!=typeof this.opts.loadSchema)throw Error("options.loadSchema should be a function");let{loadSchema:r}=this.opts;return i.call(this,e,t);async function i(e,t){await n.call(this,e.$schema);let r=this._addSchema(e,t);return r.validate||a.call(this,r)}async function n(e){e&&!this.getSchema(e)&&await i.call(this,{$ref:e},!0)}async function a(e){try{return this._compileSchemaEnv(e)}catch(t){if(!(t instanceof o.default))throw t;return s.call(this,t),await d.call(this,t.missingSchema),a.call(this,e)}}function s({missingSchema:e,missingRef:t}){if(this.refs[e])throw Error(`AnySchema ${e} is loaded but ${t} cannot be resolved`)}async function d(e){let r=await c.call(this,e);this.refs[e]||await n.call(this,r.$schema),this.refs[e]||this.addSchema(r,e,t)}async function c(e){let t=this._loading[e];if(t)return t;try{return await (this._loading[e]=r(e))}finally{delete this._loading[e]}}}addSchema(e,t,r,i=this.opts.validateSchema){let o;if(Array.isArray(e)){for(let t of e)this.addSchema(t,void 0,r,i);return this}if("object"==typeof e){let{schemaId:t}=this.opts;if(void 0!==(o=e[t])&&"string"!=typeof o)throw Error(`schema ${t} must be string`)}return t=(0,d.normalizeId)(t||o),this._checkUnique(t),this.schemas[t]=this._addSchema(e,r,t,i,!0),this}addMetaSchema(e,t,r=this.opts.validateSchema){return this.addSchema(e,t,!0,r),this}validateSchema(e,t){let r;if("boolean"==typeof e)return!0;if(void 0!==(r=e.$schema)&&"string"!=typeof r)throw Error("$schema must be a string");if(!(r=r||this.opts.defaultMeta||this.defaultMeta()))return this.logger.warn("meta-schema not available"),this.errors=null,!0;let i=this.validate(r,e);if(!i&&t){let e="schema is invalid: "+this.errorsText();if("log"===this.opts.validateSchema)this.logger.error(e);else throw Error(e)}return i}getSchema(e){let t;for(;"string"==typeof(t=b.call(this,e));)e=t;if(void 0===t){let{schemaId:r}=this.opts,i=new a.SchemaEnv({schema:{},schemaId:r});if(!(t=a.resolveSchema.call(this,i,e)))return;this.refs[e]=t}return t.validate||this._compileSchemaEnv(t)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let t=b.call(this,e);return"object"==typeof t&&this._cache.delete(t.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{this._cache.delete(e);let t=e[this.opts.schemaId];return t&&(t=(0,d.normalizeId)(t),delete this.schemas[t],delete this.refs[t]),this}default:throw Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(let t of e)this.addKeyword(t);return this}addKeyword(e,t){let r;if("string"==typeof e)r=e,"object"==typeof t&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),t.keyword=r);else if("object"==typeof e&&void 0===t){if(Array.isArray(r=(t=e).keyword)&&!r.length)throw Error("addKeywords: keyword must be string or non-empty array")}else throw Error("invalid addKeywords parameters");if(V.call(this,r,t),!t)return(0,l.eachItem)(r,e=>q.call(this,e)),this;x.call(this,t);let i={...t,type:(0,c.getJSONTypes)(t.type),schemaType:(0,c.getJSONTypes)(t.schemaType)};return(0,l.eachItem)(r,0===i.type.length?e=>q.call(this,e,i):e=>i.type.forEach(t=>q.call(this,e,i,t))),this}getKeyword(e){let t=this.RULES.all[e];return"object"==typeof t?t.definition:!!t}removeKeyword(e){let{RULES:t}=this;for(let r of(delete t.keywords[e],delete t.all[e],t.rules)){let t=r.rules.findIndex(t=>t.keyword===e);t>=0&&r.rules.splice(t,1)}return this}addFormat(e,t){return"string"==typeof t&&(t=new RegExp(t)),this.formats[e]=t,this}errorsText(e=this.errors,{separator:t=", ",dataVar:r="data"}={}){return e&&0!==e.length?e.map(e=>`${r}${e.instancePath} ${e.message}`).reduce((e,r)=>e+t+r):"No errors"}$dataMetaSchema(e,t){let r=this.RULES.all;for(let i of(e=JSON.parse(JSON.stringify(e)),t)){let t=i.split("/").slice(1),o=e;for(let e of t)o=o[e];for(let e in r){let t=r[e];if("object"!=typeof t)continue;let{$data:i}=t.definition,n=o[e];i&&n&&(o[e]=C(n))}}return e}_removeAllSchemas(e,t){for(let r in e){let i=e[r];(!t||t.test(r))&&("string"==typeof i?delete e[r]:i&&!i.meta&&(this._cache.delete(i.schema),delete e[r]))}}_addSchema(e,t,r,i=this.opts.validateSchema,o=this.opts.addUsedSchema){let n,{schemaId:s}=this.opts;if("object"==typeof e)n=e[s];else if(this.opts.jtd)throw Error("schema must be object");else if("boolean"!=typeof e)throw Error("schema must be object or boolean");let c=this._cache.get(e);if(void 0!==c)return c;r=(0,d.normalizeId)(n||r);let l=d.getSchemaRefs.call(this,e,r);return c=new a.SchemaEnv({schema:e,schemaId:s,meta:t,baseId:r,localRefs:l}),this._cache.set(c.schema,c),o&&!r.startsWith("#")&&(r&&this._checkUnique(r),this.refs[r]=c),i&&this.validateSchema(e,!0),c}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):a.compileSchema.call(this,e),!e.validate)throw Error("ajv implementation error");return e.validate}_compileMetaSchema(e){let t=this.opts;this.opts=this._metaOpts;try{a.compileSchema.call(this,e)}finally{this.opts=t}}};function v(e,t,r,i="error"){for(let o in e)o in t&&this.logger[i](`${r}: option ${o}. ${e[o]}`)}function b(e){return e=(0,d.normalizeId)(e),this.schemas[e]||this.refs[e]}function $(){let e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(let t in e)this.addSchema(e[t],t)}function S(){for(let e in this.opts.formats){let t=this.opts.formats[e];t&&this.addFormat(e,t)}}function k(e){if(Array.isArray(e))return void this.addVocabulary(e);for(let t in this.logger.warn("keywords option as map is deprecated, pass array"),e){let r=e[t];r.keyword||(r.keyword=t),this.addKeyword(r)}}function w(){let e={...this.opts};for(let t of f)delete e[t];return e}_.ValidationError=i.default,_.MissingRefError=o.default,e.default=_;let R={log(){},warn(){},error(){}},P=/^[a-z_$][a-z0-9_$:-]*$/i;function V(e,t){let{RULES:r}=this;if((0,l.eachItem)(e,e=>{if(r.keywords[e])throw Error(`Keyword ${e} is already defined`);if(!P.test(e))throw Error(`Keyword ${e} has invalid name`)}),t&&t.$data&&!("code"in t||"validate"in t))throw Error('$data keyword must have "code" or "validate" function')}function q(e,t,r){var i;let o=null==t?void 0:t.post;if(r&&o)throw Error('keyword with "post" flag cannot have "type"');let{RULES:n}=this,a=o?n.post:n.rules.find(({type:e})=>e===r);if(a||(a={type:r,rules:[]},n.rules.push(a)),n.keywords[e]=!0,!t)return;let s={keyword:e,definition:{...t,type:(0,c.getJSONTypes)(t.type),schemaType:(0,c.getJSONTypes)(t.schemaType)}};t.before?I.call(this,a,s,t.before):a.rules.push(s),n.all[e]=s,null==(i=t.implements)||i.forEach(e=>this.addKeyword(e))}function I(e,t,r){let i=e.rules.findIndex(e=>e.keyword===r);i>=0?e.rules.splice(i,0,t):(e.rules.push(t),this.logger.warn(`rule ${r} is not defined`))}function x(e){let{metaSchema:t}=e;void 0!==t&&(e.$data&&this.opts.$data&&(t=C(t)),e.validateSchema=this.compile(t,!0))}let j={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function C(e){return{anyOf:[e,j]}}}),xO=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={keyword:"id",code(){throw Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}}}),xE=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.callRef=e.getValidate=void 0;let t=xP(),r=x_(),i=xc(),o=xp(),n=xV(),a=xl();function s(e,t){let{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):(0,i._)`${r.scopeValue("wrapper",{ref:t})}.validate`}function d(e,t,n,s){let{gen:d,it:c}=e,{allErrors:l,schemaEnv:p,opts:u}=c,m=u.passContext?o.default.this:i.nil;function f(e){let t=(0,i._)`${e}.errors`;d.assign(o.default.vErrors,(0,i._)`${o.default.vErrors} === null ? ${t} : ${o.default.vErrors}.concat(${t})`),d.assign(o.default.errors,(0,i._)`${o.default.vErrors}.length`)}function h(e){var t;if(!c.opts.unevaluated)return;let r=null==(t=null==n?void 0:n.validate)?void 0:t.evaluated;if(!0!==c.props)if(r&&!r.dynamicProps)void 0!==r.props&&(c.props=a.mergeEvaluated.props(d,r.props,c.props));else{let t=d.var("props",(0,i._)`${e}.evaluated.props`);c.props=a.mergeEvaluated.props(d,t,c.props,i.Name)}if(!0!==c.items)if(r&&!r.dynamicItems)void 0!==r.items&&(c.items=a.mergeEvaluated.items(d,r.items,c.items));else{let t=d.var("items",(0,i._)`${e}.evaluated.items`);c.items=a.mergeEvaluated.items(d,t,c.items,i.Name)}}s?function(){if(!p.$async)throw Error("async schema referenced by sync schema");let o=d.let("valid");d.try(()=>{d.code((0,i._)`await ${(0,r.callValidateCode)(e,t,m)}`),h(t),l||d.assign(o,!0)},e=>{d.if((0,i._)`!(${e} instanceof ${c.ValidationError})`,()=>d.throw(e)),f(e),l||d.assign(o,!1)}),e.ok(o)}():e.result((0,r.callValidateCode)(e,t,m),()=>h(t),()=>f(t))}e.getValidate=s,e.callRef=d,e.default={keyword:"$ref",schemaType:"string",code(e){var r,o;let a,c,l,{gen:p,schema:u,it:m}=e,{baseId:f,schemaEnv:h,validateName:y,opts:g,self:_}=m,{root:v}=h;if(("#"===u||"#/"===u)&&f===v.baseId){if(h===v)return d(e,y,h,h.$async);let t=p.scopeValue("root",{ref:v});return d(e,(0,i._)`${t}.validate`,v,v.$async)}let b=n.resolveRef.call(_,v,f,u);if(void 0===b)throw new t.default(m.opts.uriResolver,f,u);return b instanceof n.SchemaEnv?void d(e,s(e,r=b),r,r.$async):(o=b,a=p.scopeValue("schema",!0===g.code.source?{ref:o,code:(0,i.stringify)(o)}:{ref:o}),c=p.name("valid"),l=e.subschema({schema:o,dataTypes:[],schemaPath:i.nil,topSchemaRef:a,errSchemaPath:u},c),void(e.mergeEvaluated(l),e.ok(c)))}}}),xA=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xO(),r=xE();e.default=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",t.default,r.default]}),xM=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xc(),r=t.operators,i={maximum:{okStr:"<=",ok:r.LTE,fail:r.GT},minimum:{okStr:">=",ok:r.GTE,fail:r.LT},exclusiveMaximum:{okStr:"<",ok:r.LT,fail:r.GTE},exclusiveMinimum:{okStr:">",ok:r.GT,fail:r.LTE}};e.default={keyword:Object.keys(i),type:"number",schemaType:"number",$data:!0,error:{message:({keyword:e,schemaCode:r})=>(0,t.str)`must be ${i[e].okStr} ${r}`,params:({keyword:e,schemaCode:r})=>(0,t._)`{comparison: ${i[e].okStr}, limit: ${r}}`},code(e){let{keyword:r,data:o,schemaCode:n}=e;e.fail$data((0,t._)`${o} ${i[r].fail} ${n} || isNaN(${o})`)}}}),xW=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xc();e.default={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:e})=>(0,t.str)`must be multiple of ${e}`,params:({schemaCode:e})=>(0,t._)`{multipleOf: ${e}}`},code(e){let{gen:r,data:i,schemaCode:o,it:n}=e,a=n.opts.multipleOfPrecision,s=r.let("res"),d=a?(0,t._)`Math.abs(Math.round(${s}) - ${s}) > 1e-${a}`:(0,t._)`${s} !== parseInt(${s})`;e.fail$data((0,t._)`(${o} === 0 || (${s} = ${i}/${o}, ${d}))`)}}}),xN=SP(e=>{function t(e){let t,r=e.length,i=0,o=0;for(;o=55296&&t<=56319&&o{Object.defineProperty(e,"__esModule",{value:!0});let t=xc(),r=xl(),i=xN();e.default={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message:({keyword:e,schemaCode:r})=>(0,t.str)`must NOT have ${"maxLength"===e?"more":"fewer"} than ${r} characters`,params:({schemaCode:e})=>(0,t._)`{limit: ${e}}`},code(e){let{keyword:o,data:n,schemaCode:a,it:s}=e,d="maxLength"===o?t.operators.GT:t.operators.LT,c=!1===s.opts.unicode?(0,t._)`${n}.length`:(0,t._)`${(0,r.useFunc)(e.gen,i.default)}(${n})`;e.fail$data((0,t._)`${c} ${d} ${a}`)}}}),xD=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=x_(),r=xl(),i=xc();e.default={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>(0,i.str)`must match pattern "${e}"`,params:({schemaCode:e})=>(0,i._)`{pattern: ${e}}`},code(e){let{gen:o,data:n,$data:a,schema:s,schemaCode:d,it:c}=e,l=c.opts.unicodeRegExp?"u":"";if(a){let{regExp:t}=c.opts.code,a="new RegExp"===t.code?(0,i._)`new RegExp`:(0,r.useFunc)(o,t),s=o.let("valid");o.try(()=>o.assign(s,(0,i._)`${a}(${d}, ${l}).test(${n})`),()=>o.assign(s,!1)),e.fail$data((0,i._)`!${s}`)}else{let r=(0,t.usePattern)(e,s);e.fail$data((0,i._)`!${r}.test(${n})`)}}}}),xF=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xc();e.default={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message:({keyword:e,schemaCode:r})=>(0,t.str)`must NOT have ${"maxProperties"===e?"more":"fewer"} than ${r} properties`,params:({schemaCode:e})=>(0,t._)`{limit: ${e}}`},code(e){let{keyword:r,data:i,schemaCode:o}=e,n="maxProperties"===r?t.operators.GT:t.operators.LT;e.fail$data((0,t._)`Object.keys(${i}).length ${n} ${o}`)}}}),xL=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=x_(),r=xc(),i=xl();e.default={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:e}})=>(0,r.str)`must have required property '${e}'`,params:({params:{missingProperty:e}})=>(0,r._)`{missingProperty: ${e}}`},code(e){let{gen:o,schema:n,schemaCode:a,data:s,$data:d,it:c}=e,{opts:l}=c;if(!d&&0===n.length)return;let p=n.length>=l.loopRequired;if(c.allErrors?function(){if(p||d)e.block$data(r.nil,u);else for(let r of n)(0,t.checkReportMissingProp)(e,r)}():function(){let i=o.let("missing");if(p||d){let n=o.let("valid",!0);e.block$data(n,()=>{var d,c;return d=i,c=n,void(e.setParams({missingProperty:d}),o.forOf(d,a,()=>{o.assign(c,(0,t.propertyInData)(o,s,d,l.ownProperties)),o.if((0,r.not)(c),()=>{e.error(),o.break()})},r.nil))}),e.ok(n)}else o.if((0,t.checkMissingProp)(e,n,i)),(0,t.reportMissingProp)(e,i),o.else()}(),l.strictRequired){let t=e.parentSchema.properties,{definedProperties:r}=e.it;for(let e of n)if((null==t?void 0:t[e])===void 0&&!r.has(e)){let t=`required property "${e}" is not defined at "${c.schemaEnv.baseId+c.errSchemaPath}" (strictRequired)`;(0,i.checkStrictMode)(c,t,c.opts.strictRequired)}}function u(){o.forOf("prop",a,r=>{e.setParams({missingProperty:r}),o.if((0,t.noPropertyInData)(o,s,r,l.ownProperties),()=>e.error())})}}}}),xU=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xc();e.default={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message:({keyword:e,schemaCode:r})=>(0,t.str)`must NOT have ${"maxItems"===e?"more":"fewer"} than ${r} items`,params:({schemaCode:e})=>(0,t._)`{limit: ${e}}`},code(e){let{keyword:r,data:i,schemaCode:o}=e,n="maxItems"===r?t.operators.GT:t.operators.LT;e.fail$data((0,t._)`${i}.length ${n} ${o}`)}}}),xH=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=x$();t.code='require("ajv/dist/runtime/equal").default',e.default=t}),xG=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xy(),r=xc(),i=xl(),o=xH();e.default={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:e,j:t}})=>(0,r.str)`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>(0,r._)`{i: ${e}, j: ${t}}`},code(e){let{gen:n,data:a,$data:s,schema:d,parentSchema:c,schemaCode:l,it:p}=e;if(!s&&!d)return;let u=n.let("valid"),m=c.items?(0,t.getSchemaTypes)(c.items):[];e.block$data(u,function(){let s=n.let("i",(0,r._)`${a}.length`),d=n.let("j");e.setParams({i:s,j:d}),n.assign(u,!0),n.if((0,r._)`${s} > 1`,()=>(m.length>0&&!m.some(e=>"object"===e||"array"===e)?function(i,o){let s=n.name("item"),d=(0,t.checkDataTypes)(m,s,p.opts.strictNumbers,t.DataType.Wrong),c=n.const("indices",(0,r._)`{}`);n.for((0,r._)`;${i}--;`,()=>{n.let(s,(0,r._)`${a}[${i}]`),n.if(d,(0,r._)`continue`),m.length>1&&n.if((0,r._)`typeof ${s} == "string"`,(0,r._)`${s} += "_"`),n.if((0,r._)`typeof ${c}[${s}] == "number"`,()=>{n.assign(o,(0,r._)`${c}[${s}]`),e.error(),n.assign(u,!1).break()}).code((0,r._)`${c}[${s}] = ${i}`)})}:function(t,s){let d=(0,i.useFunc)(n,o.default),c=n.name("outer");n.label(c).for((0,r._)`;${t}--;`,()=>n.for((0,r._)`${s} = ${t}; ${s}--;`,()=>n.if((0,r._)`${d}(${a}[${t}], ${a}[${s}])`,()=>{e.error(),n.assign(u,!1).break(c)})))})(s,d))},(0,r._)`${l} === false`),e.ok(u)}}}),xB=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xc(),r=xl(),i=xH();e.default={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:e})=>(0,t._)`{allowedValue: ${e}}`},code(e){let{gen:o,data:n,$data:a,schemaCode:s,schema:d}=e;a||d&&"object"==typeof d?e.fail$data((0,t._)`!${(0,r.useFunc)(o,i.default)}(${n}, ${s})`):e.fail((0,t._)`${d} !== ${n}`)}}}),xK=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xc(),r=xl(),i=xH();e.default={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:e})=>(0,t._)`{allowedValues: ${e}}`},code(e){let o,n,{gen:a,data:s,$data:d,schema:c,schemaCode:l,it:p}=e;if(!d&&0===c.length)throw Error("enum must have non-empty array");let u=c.length>=p.opts.loopEnum,m=()=>null!=o?o:o=(0,r.useFunc)(a,i.default);if(u||d)n=a.let("valid"),e.block$data(n,function(){a.assign(n,!1),a.forOf("v",l,e=>a.if((0,t._)`${m()}(${s}, ${e})`,()=>a.assign(n,!0).break()))});else{if(!Array.isArray(c))throw Error("ajv implementation error");let e=a.const("vSchema",l);n=(0,t.or)(...c.map((r,i)=>{var o,n;let a;return o=e,"object"==typeof(a=c[n=i])&&null!==a?(0,t._)`${m()}(${s}, ${o}[${n}])`:(0,t._)`${s} === ${a}`}))}e.pass(n)}}}),xJ=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xM(),r=xW(),i=xz(),o=xD(),n=xF(),a=xL(),s=xU(),d=xG(),c=xB(),l=xK();e.default=[t.default,r.default,i.default,o.default,n.default,a.default,s.default,d.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},c.default,l.default]}),xZ=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateAdditionalItems=void 0;let t=xc(),r=xl();function i(e,i){let{gen:o,schema:n,data:a,keyword:s,it:d}=e;d.items=!0;let c=o.const("len",(0,t._)`${a}.length`);if(!1===n)e.setParams({len:i.length}),e.pass((0,t._)`${c} <= ${i.length}`);else if("object"==typeof n&&!(0,r.alwaysValidSchema)(d,n)){let n=o.var("valid",(0,t._)`${c} <= ${i.length}`);o.if((0,t.not)(n),()=>{var a;return a=n,void o.forRange("i",i.length,c,i=>{e.subschema({keyword:s,dataProp:i,dataPropType:r.Type.Num},a),d.allErrors||o.if((0,t.not)(a),()=>o.break())})}),e.ok(n)}}e.validateAdditionalItems=i,e.default={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:e}})=>(0,t.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,t._)`{limit: ${e}}`},code(e){let{parentSchema:t,it:o}=e,{items:n}=t;Array.isArray(n)?i(e,n):(0,r.checkStrictMode)(o,'"additionalItems" is ignored when "items" is not an array of schemas')}}}),xQ=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateTuple=void 0;let t=xc(),r=xl(),i=x_();function o(e,i,n=e.schema){let{gen:a,parentSchema:s,data:d,keyword:c,it:l}=e;(function(e){let{opts:t,errSchemaPath:o}=l,a=n.length,s=a===e.minItems&&(a===e.maxItems||!1===e[i]);if(t.strictTuples&&!s){let e=`"${c}" is ${a}-tuple, but minItems or maxItems/${i} are not specified or different at path "${o}"`;(0,r.checkStrictMode)(l,e,t.strictTuples)}})(s),l.opts.unevaluated&&n.length&&!0!==l.items&&(l.items=r.mergeEvaluated.items(a,n.length,l.items));let p=a.name("valid"),u=a.const("len",(0,t._)`${d}.length`);n.forEach((i,o)=>{(0,r.alwaysValidSchema)(l,i)||(a.if((0,t._)`${u} > ${o}`,()=>e.subschema({keyword:c,schemaProp:o,dataProp:o},p)),e.ok(p))})}e.validateTuple=o,e.default={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){let{schema:t,it:n}=e;if(Array.isArray(t))return o(e,"additionalItems",t);n.items=!0,(0,r.alwaysValidSchema)(n,t)||e.ok((0,i.validateArray)(e))}}}),xX=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xQ();e.default={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,t.validateTuple)(e,"items")}}),xY=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xc(),r=xl(),i=x_(),o=xZ();e.default={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:e}})=>(0,t.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,t._)`{limit: ${e}}`},code(e){let{schema:t,parentSchema:n,it:a}=e,{prefixItems:s}=n;a.items=!0,(0,r.alwaysValidSchema)(a,t)||(s?(0,o.validateAdditionalItems)(e,s):e.ok((0,i.validateArray)(e)))}}}),x1=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xc(),r=xl();e.default={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:e,max:r}})=>void 0===r?(0,t.str)`must contain at least ${e} valid item(s)`:(0,t.str)`must contain at least ${e} and no more than ${r} valid item(s)`,params:({params:{min:e,max:r}})=>void 0===r?(0,t._)`{minContains: ${e}}`:(0,t._)`{minContains: ${e}, maxContains: ${r}}`},code(e){let i,o,{gen:n,schema:a,parentSchema:s,data:d,it:c}=e,{minContains:l,maxContains:p}=s;c.opts.next?(i=void 0===l?1:l,o=p):i=1;let u=n.const("len",(0,t._)`${d}.length`);if(e.setParams({min:i,max:o}),void 0===o&&0===i)return void(0,r.checkStrictMode)(c,'"minContains" == 0 without "maxContains": "contains" keyword ignored');if(void 0!==o&&i>o){(0,r.checkStrictMode)(c,'"minContains" > "maxContains" is always invalid'),e.fail();return}if((0,r.alwaysValidSchema)(c,a)){let r=(0,t._)`${u} >= ${i}`;void 0!==o&&(r=(0,t._)`${r} && ${u} <= ${o}`),e.pass(r);return}c.items=!0;let m=n.name("valid");function f(){let e=n.name("_valid"),r=n.let("count",0);h(e,()=>n.if(e,()=>{var e;return e=r,void(n.code((0,t._)`${e}++`),void 0===o?n.if((0,t._)`${e} >= ${i}`,()=>n.assign(m,!0).break()):(n.if((0,t._)`${e} > ${o}`,()=>n.assign(m,!1).break()),1===i?n.assign(m,!0):n.if((0,t._)`${e} >= ${i}`,()=>n.assign(m,!0))))}))}function h(t,i){n.forRange("i",0,u,o=>{e.subschema({keyword:"contains",dataProp:o,dataPropType:r.Type.Num,compositeRule:!0},t),i()})}void 0===o&&1===i?h(m,()=>n.if(m,()=>n.break())):0===i?(n.let(m,!0),void 0!==o&&n.if((0,t._)`${d}.length > 0`,f)):(n.let(m,!1),f()),e.result(m,()=>e.reset())}}}),x0=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;let t=xc(),r=xl(),i=x_();e.error={message:({params:{property:e,depsCount:r,deps:i}})=>(0,t.str)`must have ${1===r?"property":"properties"} ${i} when property ${e} is present`,params:({params:{property:e,depsCount:r,deps:i,missingProperty:o}})=>(0,t._)`{property: ${e}, missingProperty: ${o}, depsCount: ${r}, - deps: ${i}}`};let o={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(e){let[t,r]=function({schema:e}){let t={},r={};for(let i in e)"__proto__"!==i&&((Array.isArray(e[i])?t:r)[i]=e[i]);return[t,r]}(e);n(e,t),a(e,r)}};function n(e,r=e.schema){let{gen:o,data:a,it:s}=e;if(0===Object.keys(r).length)return;let d=o.let("missing");for(let n in r){let c=r[n];if(0===c.length)continue;let l=(0,i.propertyInData)(o,a,n,s.opts.ownProperties);e.setParams({property:n,depsCount:c.length,deps:c.join(", ")}),s.allErrors?o.if(l,()=>{for(let t of c)(0,i.checkReportMissingProp)(e,t)}):(o.if((0,t._)`${l} && (${(0,i.checkMissingProp)(e,c,d)})`),(0,i.reportMissingProp)(e,d),o.else())}}function a(e,t=e.schema){let{gen:o,data:n,keyword:s,it:d}=e,c=o.name("valid");for(let a in t)(0,r.alwaysValidSchema)(d,t[a])||(o.if((0,i.propertyInData)(o,n,a,d.opts.ownProperties),()=>{let t=e.subschema({keyword:s,schemaProp:a},c);e.mergeValidEvaluated(t,c)},()=>o.var(c,!0)),e.ok(c))}e.validatePropertyDeps=n,e.validateSchemaDeps=a,e.default=o}),j$=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xM(),r=xN();e.default={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:e})=>(0,t._)`{propertyName: ${e.propertyName}}`},code(e){let{gen:i,schema:o,data:n,it:a}=e;if((0,r.alwaysValidSchema)(a,o))return;let s=i.name("valid");i.forIn("key",n,r=>{e.setParams({propertyName:r}),e.subschema({keyword:"propertyNames",data:r,dataTypes:["string"],propertyName:r,compositeRule:!0},s),i.if((0,t.not)(s),()=>{e.error(!0),a.allErrors||i.break()})}),e.ok(s)}}}),jS=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xB(),r=xM(),i=xz(),o=xN();e.default={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:e})=>(0,r._)`{additionalProperty: ${e.additionalProperty}}`},code(e){let{gen:n,schema:a,parentSchema:s,data:d,errsCount:c,it:l}=e;if(!c)throw Error("ajv implementation error");let{allErrors:p,opts:u}=l;if(l.props=!0,"all"!==u.removeAdditional&&(0,o.alwaysValidSchema)(l,a))return;let m=(0,t.allSchemaProperties)(s.properties),f=(0,t.allSchemaProperties)(s.patternProperties);function h(e){n.code((0,r._)`delete ${d}[${e}]`)}function y(t){if("all"===u.removeAdditional||u.removeAdditional&&!1===a)return void h(t);if(!1===a){e.setParams({additionalProperty:t}),e.error(),p||n.break();return}if("object"==typeof a&&!(0,o.alwaysValidSchema)(l,a)){let i=n.name("valid");"failing"===u.removeAdditional?(g(t,i,!1),n.if((0,r.not)(i),()=>{e.reset(),h(t)})):(g(t,i),p||n.if((0,r.not)(i),()=>n.break()))}}function g(t,r,i){let n={keyword:"additionalProperties",dataProp:t,dataPropType:o.Type.Str};!1===i&&Object.assign(n,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(n,r)}n.forIn("key",d,i=>{m.length||f.length?n.if(function(i){let a;if(m.length>8){let e=(0,o.schemaRefOrVal)(l,s.properties,"properties");a=(0,t.isOwnProperty)(n,e,i)}else a=m.length?(0,r.or)(...m.map(e=>(0,r._)`${i} === ${e}`)):r.nil;return f.length&&(a=(0,r.or)(a,...f.map(o=>(0,r._)`${(0,t.usePattern)(e,o)}.test(${i})`))),(0,r.not)(a)}(i),()=>y(i)):y(i)}),e.ok((0,r._)`${c} === ${i.default.errors}`)}}}),jk=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xY(),r=xB(),i=xN(),o=jS();e.default={keyword:"properties",type:"object",schemaType:"object",code(e){let{gen:n,schema:a,parentSchema:s,data:d,it:c}=e;"all"===c.opts.removeAdditional&&void 0===s.additionalProperties&&o.default.code(new t.KeywordCxt(c,o.default,"additionalProperties"));let l=(0,r.allSchemaProperties)(a);for(let e of l)c.definedProperties.add(e);c.opts.unevaluated&&l.length&&!0!==c.props&&(c.props=i.mergeEvaluated.props(n,(0,i.toHash)(l),c.props));let p=l.filter(e=>!(0,i.alwaysValidSchema)(c,a[e]));if(0===p.length)return;let u=n.name("valid");for(let t of p){var m;(m=t,c.opts.useDefaults&&!c.compositeRule&&void 0!==a[m].default)?f(t):(n.if((0,r.propertyInData)(n,d,t,c.opts.ownProperties)),f(t),c.allErrors||n.else().var(u,!0),n.endIf()),e.it.definedProperties.add(t),e.ok(u)}function f(t){e.subschema({keyword:"properties",schemaProp:t,dataProp:t},u)}}}}),jw=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xB(),r=xM(),i=xN(),o=xN();e.default={keyword:"patternProperties",type:"object",schemaType:"object",code(e){let{gen:n,schema:a,data:s,parentSchema:d,it:c}=e,{opts:l}=c,p=(0,t.allSchemaProperties)(a),u=p.filter(e=>(0,i.alwaysValidSchema)(c,a[e]));if(0===p.length||u.length===p.length&&(!c.opts.unevaluated||!0===c.props))return;let m=l.strictSchema&&!l.allowMatchingProperties&&d.properties,f=n.name("valid");!0===c.props||c.props instanceof r.Name||(c.props=(0,o.evaluatedPropsToName)(n,c.props));let{props:h}=c;for(let e of p)m&&function(e){for(let t in m)new RegExp(e).test(t)&&(0,i.checkStrictMode)(c,`property ${t} matches pattern ${e} (use allowMatchingProperties)`)}(e),c.allErrors?y(e):(n.var(f,!0),y(e),n.if(f));function y(i){n.forIn("key",s,a=>{n.if((0,r._)`${(0,t.usePattern)(e,i)}.test(${a})`,()=>{let t=u.includes(i);t||e.subschema({keyword:"patternProperties",schemaProp:i,dataProp:a,dataPropType:o.Type.Str},f),c.opts.unevaluated&&!0!==h?n.assign((0,r._)`${h}[${a}]`,!0):t||c.allErrors||n.if((0,r.not)(f),()=>n.break())})})}}}}),jV=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xN();e.default={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){let{gen:r,schema:i,it:o}=e;if((0,t.alwaysValidSchema)(o,i))return void e.fail();let n=r.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},n),e.failResult(n,()=>e.reset(),()=>e.error())},error:{message:"must NOT be valid"}}}),jP=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:xB().validateUnion,error:{message:"must match a schema in anyOf"}}}),jR=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xM(),r=xN();e.default={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:e})=>(0,t._)`{passingSchemas: ${e.passing}}`},code(e){let{gen:i,schema:o,parentSchema:n,it:a}=e;if(!Array.isArray(o))throw Error("ajv implementation error");if(a.opts.discriminator&&n.discriminator)return;let s=i.let("valid",!1),d=i.let("passing",null),c=i.name("_valid");e.setParams({passing:d}),i.block(function(){o.forEach((o,n)=>{let l;(0,r.alwaysValidSchema)(a,o)?i.var(c,!0):l=e.subschema({keyword:"oneOf",schemaProp:n,compositeRule:!0},c),n>0&&i.if((0,t._)`${c} && ${s}`).assign(s,!1).assign(d,(0,t._)`[${d}, ${n}]`).else(),i.if(c,()=>{i.assign(s,!0),i.assign(d,n),l&&e.mergeEvaluated(l,t.Name)})})}),e.result(s,()=>e.reset(),()=>e.error(!0))}}}),jq=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xN();e.default={keyword:"allOf",schemaType:"array",code(e){let{gen:r,schema:i,it:o}=e;if(!Array.isArray(i))throw Error("ajv implementation error");let n=r.name("valid");i.forEach((r,i)=>{if((0,t.alwaysValidSchema)(o,r))return;let a=e.subschema({keyword:"allOf",schemaProp:i},n);e.ok(n),e.mergeEvaluated(a)})}}}),jI=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xM(),r=xN();function i(e,t){let i=e.schema[t];return void 0!==i&&!(0,r.alwaysValidSchema)(e,i)}e.default={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:e})=>(0,t.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,t._)`{failingKeyword: ${e.ifClause}}`},code(e){let o,{gen:n,parentSchema:a,it:s}=e;void 0===a.then&&void 0===a.else&&(0,r.checkStrictMode)(s,'"if" without "then" and "else" is ignored');let d=i(s,"then"),c=i(s,"else");if(!d&&!c)return;let l=n.let("valid",!0),p=n.name("_valid");if(o=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},p),e.mergeEvaluated(o),e.reset(),d&&c){let t=n.let("ifClause");e.setParams({ifClause:t}),n.if(p,u("then",t),u("else",t))}else d?n.if(p,u("then")):n.if((0,t.not)(p),u("else"));function u(r,i){return()=>{let o=e.subschema({keyword:r},p);n.assign(l,p),e.mergeValidEvaluated(o,l),i?n.assign(i,(0,t._)`${r}`):e.setParams({ifClause:r})}}e.pass(l,()=>e.error(!0))}}}),jx=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xN();e.default={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:r,it:i}){void 0===r.if&&(0,t.checkStrictMode)(i,`"${e}" without "if" is ignored`)}}}),jj=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=jh(),r=jg(),i=jy(),o=j_(),n=jv(),a=jb(),s=j$(),d=jS(),c=jk(),l=jw(),p=jV(),u=jP(),m=jR(),f=jq(),h=jI(),y=jx();e.default=function(e=!1){let g=[p.default,u.default,m.default,f.default,h.default,y.default,s.default,d.default,a.default,c.default,l.default];return e?g.push(r.default,o.default):g.push(t.default,i.default),g.push(n.default),g}}),jC=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xM();e.default={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>(0,t.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,t._)`{format: ${e}}`},code(e,r){let i,o,n,a,s,d,{gen:c,data:l,$data:p,schema:u,schemaCode:m,it:f}=e,{opts:h,errSchemaPath:y,schemaEnv:g,self:_}=f;h.validateFormats&&(p?(i=c.scopeValue("formats",{ref:_.formats,code:h.code.formats}),o=c.const("fDef",(0,t._)`${i}[${m}]`),n=c.let("fType"),a=c.let("format"),c.if((0,t._)`typeof ${o} == "object" && !(${o} instanceof RegExp)`,()=>c.assign(n,(0,t._)`${o}.type || "string"`).assign(a,(0,t._)`${o}.validate`),()=>c.assign(n,(0,t._)`"string"`).assign(a,o)),e.fail$data((0,t.or)(!1===h.strictSchema?t.nil:(0,t._)`${m} && !${a}`,(s=g.$async?(0,t._)`(${o}.async ? await ${a}(${l}) : ${a}(${l}))`:(0,t._)`${a}(${l})`,d=(0,t._)`(typeof ${a} == "function" ? ${s} : ${a}.test(${l}))`,(0,t._)`${a} && ${a} !== true && ${n} === ${r} && !${d}`)))):function(){var i;let o,n,a=_.formats[u];if(!a){if(!1===h.strictSchema)return _.logger.warn(s());throw Error(s());function s(){return`unknown format "${u}" ignored in schema at path "${y}"`}}if(!0===a)return;let[d,p,m]=(o=(i=a)instanceof RegExp?(0,t.regexpCode)(i):h.code.formats?(0,t._)`${h.code.formats}${(0,t.getProperty)(u)}`:void 0,n=c.scopeValue("formats",{key:u,ref:i,code:o}),"object"!=typeof i||i instanceof RegExp?["string",i,n]:[i.type||"string",i.validate,(0,t._)`${n}.validate`]);d===r&&e.pass(function(){if("object"==typeof a&&!(a instanceof RegExp)&&a.async){if(!g.$async)throw Error("async format in sync schema");return(0,t._)`await ${m}(${l})`}return"function"==typeof p?(0,t._)`${m}(${l})`:(0,t._)`${m}.test(${l})`}())}())}}}),jT=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=[jC().default]}),jO=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.contentVocabulary=e.metadataVocabulary=void 0,e.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],e.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]}),jE=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=jt(),r=jf(),i=jj(),o=jT(),n=jO();e.default=[t.default,r.default,(0,i.default)(),o.default,n.metadataVocabulary,n.contentVocabulary]}),jA=S0(e=>{var t,r;Object.defineProperty(e,"__esModule",{value:!0}),e.DiscrError=void 0,(r=t||(e.DiscrError=t={})).Tag="tag",r.Mapping="mapping"}),jW=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xM(),r=jA(),i=x2(),o=x0(),n=xN();e.default={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:e,tagName:t}})=>e===r.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:r,tagName:i}})=>(0,t._)`{error: ${e}, tag: ${i}, tagValue: ${r}}`},code(e){let{gen:a,data:s,schema:d,parentSchema:c,it:l}=e,{oneOf:p}=c;if(!l.opts.discriminator)throw Error("discriminator: requires discriminator option");let u=d.propertyName;if("string"!=typeof u)throw Error("discriminator: requires propertyName");if(d.mapping)throw Error("discriminator: mapping is not supported");if(!p)throw Error("discriminator: requires oneOf keyword");let m=a.let("valid",!1),f=a.const("tag",(0,t._)`${s}${(0,t.getProperty)(u)}`);a.if((0,t._)`typeof ${f} == "string"`,()=>(function(){let s=function(){var e;let t={},r=s(c),a=!0;for(let t=0;te.error(!1,{discrError:r.DiscrError.Tag,tag:f,tagName:u})),e.ok(m)}}}),jM=S0((e,t)=>{t.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}}),jN=S0((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.MissingRefError=e.ValidationError=e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=e.Ajv=void 0;let r=x8(),i=jE(),o=jW(),n=jM(),a=["/properties"],s="http://json-schema.org/draft-07/schema";var d=class extends r.default{_addVocabularies(){super._addVocabularies(),i.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(o.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let e=this.opts.$data?this.$dataMetaSchema(n,a):n;this.addMetaSchema(e,s,!1),this.refs["http://json-schema.org/schema"]=s}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(s)?s:void 0)}};e.Ajv=d,t.exports=e=d,t.exports.Ajv=d,Object.defineProperty(e,"__esModule",{value:!0}),e.default=d;var c=xY();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return c.KeywordCxt}});var l=xM();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return l._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return l.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return l.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return l.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return l.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return l.CodeGen}});var p=x1();Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return p.default}});var u=x0();Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return u.default}})}),jz=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.dynamicAnchor=void 0;let t=xM(),r=xz(),i=x2(),o=je();function n(e,n){let{gen:a,it:s}=e;s.schemaEnv.root.dynamicAnchors[n]=!0;let d=(0,t._)`${r.default.dynamicAnchors}${(0,t.getProperty)(n)}`,c="#"===s.errSchemaPath?s.validateName:function(e){let{schemaEnv:t,schema:r,self:n}=e.it,{root:a,baseId:s,localRefs:d,meta:c}=t.root,{schemaId:l}=n.opts,p=new i.SchemaEnv({schema:r,schemaId:l,root:a,baseId:s,localRefs:d,meta:c});return i.compileSchema.call(n,p),(0,o.getValidate)(e,p)}(e);a.if((0,t._)`!${d}`,()=>a.assign(d,c))}e.dynamicAnchor=n,e.default={keyword:"$dynamicAnchor",schemaType:"string",code:e=>n(e,e.schema)}}),jD=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.dynamicRef=void 0;let t=xM(),r=xz(),i=je();function o(e,o){let{gen:n,keyword:a,it:s}=e;if("#"!==o[0])throw Error(`"${a}" only supports hash fragment reference`);let d=o.slice(1);if(s.allErrors)c();else{let t=n.let("valid",!1);c(t),e.ok(t)}function c(e){if(s.schemaEnv.root.dynamicAnchors[d]){let i=n.let("_v",(0,t._)`${r.default.dynamicAnchors}${(0,t.getProperty)(d)}`);n.if(i,l(i,e),l(s.validateName,e))}else l(s.validateName,e)()}function l(t,r){return r?()=>n.block(()=>{(0,i.callRef)(e,t),n.let(r,!0)}):()=>(0,i.callRef)(e,t)}}e.dynamicRef=o,e.default={keyword:"$dynamicRef",schemaType:"string",code:e=>o(e,e.schema)}}),jF=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=jz(),r=xN();e.default={keyword:"$recursiveAnchor",schemaType:"boolean",code(e){e.schema?(0,t.dynamicAnchor)(e,""):(0,r.checkStrictMode)(e.it,"$recursiveAnchor: false is ignored")}}}),jL=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=jD();e.default={keyword:"$recursiveRef",schemaType:"string",code:e=>(0,t.dynamicRef)(e,e.schema)}}),jU=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=jz(),r=jD(),i=jF(),o=jL();e.default=[t.default,r.default,i.default,o.default]}),jH=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=jb();e.default={keyword:"dependentRequired",type:"object",schemaType:"object",error:t.error,code:e=>(0,t.validatePropertyDeps)(e)}}),jG=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=jb();e.default={keyword:"dependentSchemas",type:"object",schemaType:"object",code:e=>(0,t.validateSchemaDeps)(e)}}),jB=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xN();e.default={keyword:["maxContains","minContains"],type:"array",schemaType:"number",code({keyword:e,parentSchema:r,it:i}){void 0===r.contains&&(0,t.checkStrictMode)(i,`"${e}" without "contains" is ignored`)}}}),jK=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=jH(),r=jG(),i=jB();e.default=[t.default,r.default,i.default]}),jJ=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xM(),r=xN(),i=xz();e.default={keyword:"unevaluatedProperties",type:"object",schemaType:["boolean","object"],trackErrors:!0,error:{message:"must NOT have unevaluated properties",params:({params:e})=>(0,t._)`{unevaluatedProperty: ${e.unevaluatedProperty}}`},code(e){let{gen:o,schema:n,data:a,errsCount:s,it:d}=e;if(!s)throw Error("ajv implementation error");let{allErrors:c,props:l}=d;function p(i){if(!1===n){e.setParams({unevaluatedProperty:i}),e.error(),c||o.break();return}if(!(0,r.alwaysValidSchema)(d,n)){let n=o.name("valid");e.subschema({keyword:"unevaluatedProperties",dataProp:i,dataPropType:r.Type.Str},n),c||o.if((0,t.not)(n),()=>o.break())}}l instanceof t.Name?o.if((0,t._)`${l} !== true`,()=>o.forIn("key",a,e=>{var r,i;return o.if((r=l,i=e,(0,t._)`!${r} || !${r}[${i}]`),()=>p(e))})):!0!==l&&o.forIn("key",a,e=>void 0===l?p(e):o.if(function(e,r){let i=[];for(let o in e)!0===e[o]&&i.push((0,t._)`${r} !== ${o}`);return(0,t.and)(...i)}(l,e),()=>p(e))),d.props=!0,e.ok((0,t._)`${s} === ${i.default.errors}`)}}}),jZ=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xM(),r=xN();e.default={keyword:"unevaluatedItems",type:"array",schemaType:["boolean","object"],error:{message:({params:{len:e}})=>(0,t.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,t._)`{limit: ${e}}`},code(e){let{gen:i,schema:o,data:n,it:a}=e,s=a.items||0;if(!0===s)return;let d=i.const("len",(0,t._)`${n}.length`);if(!1===o)e.setParams({len:s}),e.fail((0,t._)`${d} > ${s}`);else if("object"==typeof o&&!(0,r.alwaysValidSchema)(a,o)){let o=i.var("valid",(0,t._)`${d} <= ${s}`);i.if((0,t.not)(o),()=>{var n,c;return n=o,c=s,void i.forRange("i",c,d,o=>{e.subschema({keyword:"unevaluatedItems",dataProp:o,dataPropType:r.Type.Num},n),a.allErrors||i.if((0,t.not)(n),()=>i.break())})}),e.ok(o)}a.items=!0}}}),jQ=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=jJ(),r=jZ();e.default=[t.default,r.default]}),jX=S0((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/schema",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/core":!0,"https://json-schema.org/draft/2019-09/vocab/applicator":!0,"https://json-schema.org/draft/2019-09/vocab/validation":!0,"https://json-schema.org/draft/2019-09/vocab/meta-data":!0,"https://json-schema.org/draft/2019-09/vocab/format":!1,"https://json-schema.org/draft/2019-09/vocab/content":!0},$recursiveAnchor:!0,title:"Core and Validation specifications meta-schema",allOf:[{$ref:"meta/core"},{$ref:"meta/applicator"},{$ref:"meta/validation"},{$ref:"meta/meta-data"},{$ref:"meta/format"},{$ref:"meta/content"}],type:["object","boolean"],properties:{definitions:{$comment:"While no longer an official keyword as it is replaced by $defs, this keyword is retained in the meta-schema to prevent incompatible extensions as it remains in common use.",type:"object",additionalProperties:{$recursiveRef:"#"},default:{}},dependencies:{$comment:'"dependencies" is no longer a keyword, but schema authors should avoid redefining it to facilitate a smooth transition to "dependentSchemas" and "dependentRequired"',type:"object",additionalProperties:{anyOf:[{$recursiveRef:"#"},{$ref:"meta/validation#/$defs/stringArray"}]}}}}}),jY=S0((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/meta/applicator",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/applicator":!0},$recursiveAnchor:!0,title:"Applicator vocabulary meta-schema",type:["object","boolean"],properties:{additionalItems:{$recursiveRef:"#"},unevaluatedItems:{$recursiveRef:"#"},items:{anyOf:[{$recursiveRef:"#"},{$ref:"#/$defs/schemaArray"}]},contains:{$recursiveRef:"#"},additionalProperties:{$recursiveRef:"#"},unevaluatedProperties:{$recursiveRef:"#"},properties:{type:"object",additionalProperties:{$recursiveRef:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$recursiveRef:"#"},propertyNames:{format:"regex"},default:{}},dependentSchemas:{type:"object",additionalProperties:{$recursiveRef:"#"}},propertyNames:{$recursiveRef:"#"},if:{$recursiveRef:"#"},then:{$recursiveRef:"#"},else:{$recursiveRef:"#"},allOf:{$ref:"#/$defs/schemaArray"},anyOf:{$ref:"#/$defs/schemaArray"},oneOf:{$ref:"#/$defs/schemaArray"},not:{$recursiveRef:"#"}},$defs:{schemaArray:{type:"array",minItems:1,items:{$recursiveRef:"#"}}}}}),j1=S0((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/meta/content",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/content":!0},$recursiveAnchor:!0,title:"Content vocabulary meta-schema",type:["object","boolean"],properties:{contentMediaType:{type:"string"},contentEncoding:{type:"string"},contentSchema:{$recursiveRef:"#"}}}}),j0=S0((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/meta/core",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/core":!0},$recursiveAnchor:!0,title:"Core vocabulary meta-schema",type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference",$comment:"Non-empty fragments not allowed.",pattern:"^[^#]*#?$"},$schema:{type:"string",format:"uri"},$anchor:{type:"string",pattern:"^[A-Za-z][-A-Za-z0-9.:_]*$"},$ref:{type:"string",format:"uri-reference"},$recursiveRef:{type:"string",format:"uri-reference"},$recursiveAnchor:{type:"boolean",default:!1},$vocabulary:{type:"object",propertyNames:{type:"string",format:"uri"},additionalProperties:{type:"boolean"}},$comment:{type:"string"},$defs:{type:"object",additionalProperties:{$recursiveRef:"#"},default:{}}}}}),j2=S0((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/meta/format",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/format":!0},$recursiveAnchor:!0,title:"Format vocabulary meta-schema",type:["object","boolean"],properties:{format:{type:"string"}}}}),j4=S0((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/meta/meta-data",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/meta-data":!0},$recursiveAnchor:!0,title:"Meta-data vocabulary meta-schema",type:["object","boolean"],properties:{title:{type:"string"},description:{type:"string"},default:!0,deprecated:{type:"boolean",default:!1},readOnly:{type:"boolean",default:!1},writeOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0}}}}),j6=S0((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/meta/validation",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/validation":!0},$recursiveAnchor:!0,title:"Validation vocabulary meta-schema",type:["object","boolean"],properties:{multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/$defs/nonNegativeInteger"},minLength:{$ref:"#/$defs/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},maxItems:{$ref:"#/$defs/nonNegativeInteger"},minItems:{$ref:"#/$defs/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxContains:{$ref:"#/$defs/nonNegativeInteger"},minContains:{$ref:"#/$defs/nonNegativeInteger",default:1},maxProperties:{$ref:"#/$defs/nonNegativeInteger"},minProperties:{$ref:"#/$defs/nonNegativeIntegerDefault0"},required:{$ref:"#/$defs/stringArray"},dependentRequired:{type:"object",additionalProperties:{$ref:"#/$defs/stringArray"}},const:!0,enum:{type:"array",items:!0},type:{anyOf:[{$ref:"#/$defs/simpleTypes"},{type:"array",items:{$ref:"#/$defs/simpleTypes"},minItems:1,uniqueItems:!0}]}},$defs:{nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{$ref:"#/$defs/nonNegativeInteger",default:0},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}}}}),j3=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=jX(),r=jY(),i=j1(),o=j0(),n=j2(),a=j4(),s=j6(),d=["/properties"];e.default=function(e){return[t,r,i,o,c(this,n),a,c(this,s)].forEach(e=>this.addMetaSchema(e,void 0,!1)),this;function c(t,r){return e?t.$dataMetaSchema(r,d):r}}}),j9=S0((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.MissingRefError=e.ValidationError=e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=e.Ajv2019=void 0;let r=x8(),i=jE(),o=jU(),n=jK(),a=jQ(),s=jW(),d=j3(),c="https://json-schema.org/draft/2019-09/schema";var l=class extends r.default{constructor(e={}){super({...e,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),this.addVocabulary(o.default),i.default.forEach(e=>this.addVocabulary(e)),this.addVocabulary(n.default),this.addVocabulary(a.default),this.opts.discriminator&&this.addKeyword(s.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();let{$data:e,meta:t}=this.opts;t&&(d.default.call(this,e),this.refs["http://json-schema.org/schema"]=c)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(c)?c:void 0)}};e.Ajv2019=l,t.exports=e=l,t.exports.Ajv2019=l,Object.defineProperty(e,"__esModule",{value:!0}),e.default=l;var p=xY();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return p.KeywordCxt}});var u=xM();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return u._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return u.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return u.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return u.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return u.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return u.CodeGen}});var m=x1();Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return m.default}});var f=x0();Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return f.default}})}),j5=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=jt(),r=jf(),i=jj(),o=jU(),n=jK(),a=jQ(),s=jT(),d=jO();e.default=[o.default,t.default,r.default,(0,i.default)(!0),s.default,d.metadataVocabulary,d.contentVocabulary,n.default,a.default]}),j8=S0((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/schema",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/core":!0,"https://json-schema.org/draft/2020-12/vocab/applicator":!0,"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0,"https://json-schema.org/draft/2020-12/vocab/validation":!0,"https://json-schema.org/draft/2020-12/vocab/meta-data":!0,"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0,"https://json-schema.org/draft/2020-12/vocab/content":!0},$dynamicAnchor:"meta",title:"Core and Validation specifications meta-schema",allOf:[{$ref:"meta/core"},{$ref:"meta/applicator"},{$ref:"meta/unevaluated"},{$ref:"meta/validation"},{$ref:"meta/meta-data"},{$ref:"meta/format-annotation"},{$ref:"meta/content"}],type:["object","boolean"],$comment:"This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.",properties:{definitions:{$comment:'"definitions" has been replaced by "$defs".',type:"object",additionalProperties:{$dynamicRef:"#meta"},deprecated:!0,default:{}},dependencies:{$comment:'"dependencies" has been split and replaced by "dependentSchemas" and "dependentRequired" in order to serve their differing semantics.',type:"object",additionalProperties:{anyOf:[{$dynamicRef:"#meta"},{$ref:"meta/validation#/$defs/stringArray"}]},deprecated:!0,default:{}},$recursiveAnchor:{$comment:'"$recursiveAnchor" has been replaced by "$dynamicAnchor".',$ref:"meta/core#/$defs/anchorString",deprecated:!0},$recursiveRef:{$comment:'"$recursiveRef" has been replaced by "$dynamicRef".',$ref:"meta/core#/$defs/uriReferenceString",deprecated:!0}}}}),j7=S0((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/applicator",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/applicator":!0},$dynamicAnchor:"meta",title:"Applicator vocabulary meta-schema",type:["object","boolean"],properties:{prefixItems:{$ref:"#/$defs/schemaArray"},items:{$dynamicRef:"#meta"},contains:{$dynamicRef:"#meta"},additionalProperties:{$dynamicRef:"#meta"},properties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},patternProperties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},propertyNames:{format:"regex"},default:{}},dependentSchemas:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},propertyNames:{$dynamicRef:"#meta"},if:{$dynamicRef:"#meta"},then:{$dynamicRef:"#meta"},else:{$dynamicRef:"#meta"},allOf:{$ref:"#/$defs/schemaArray"},anyOf:{$ref:"#/$defs/schemaArray"},oneOf:{$ref:"#/$defs/schemaArray"},not:{$dynamicRef:"#meta"}},$defs:{schemaArray:{type:"array",minItems:1,items:{$dynamicRef:"#meta"}}}}}),Ce=S0((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/unevaluated",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0},$dynamicAnchor:"meta",title:"Unevaluated applicator vocabulary meta-schema",type:["object","boolean"],properties:{unevaluatedItems:{$dynamicRef:"#meta"},unevaluatedProperties:{$dynamicRef:"#meta"}}}}),Ct=S0((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/content",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/content":!0},$dynamicAnchor:"meta",title:"Content vocabulary meta-schema",type:["object","boolean"],properties:{contentEncoding:{type:"string"},contentMediaType:{type:"string"},contentSchema:{$dynamicRef:"#meta"}}}}),Cr=S0((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/core",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/core":!0},$dynamicAnchor:"meta",title:"Core vocabulary meta-schema",type:["object","boolean"],properties:{$id:{$ref:"#/$defs/uriReferenceString",$comment:"Non-empty fragments not allowed.",pattern:"^[^#]*#?$"},$schema:{$ref:"#/$defs/uriString"},$ref:{$ref:"#/$defs/uriReferenceString"},$anchor:{$ref:"#/$defs/anchorString"},$dynamicRef:{$ref:"#/$defs/uriReferenceString"},$dynamicAnchor:{$ref:"#/$defs/anchorString"},$vocabulary:{type:"object",propertyNames:{$ref:"#/$defs/uriString"},additionalProperties:{type:"boolean"}},$comment:{type:"string"},$defs:{type:"object",additionalProperties:{$dynamicRef:"#meta"}}},$defs:{anchorString:{type:"string",pattern:"^[A-Za-z_][-A-Za-z0-9._]*$"},uriString:{type:"string",format:"uri"},uriReferenceString:{type:"string",format:"uri-reference"}}}}),Ci=S0((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/format-annotation",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0},$dynamicAnchor:"meta",title:"Format vocabulary meta-schema for annotation results",type:["object","boolean"],properties:{format:{type:"string"}}}}),Co=S0((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/meta-data",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/meta-data":!0},$dynamicAnchor:"meta",title:"Meta-data vocabulary meta-schema",type:["object","boolean"],properties:{title:{type:"string"},description:{type:"string"},default:!0,deprecated:{type:"boolean",default:!1},readOnly:{type:"boolean",default:!1},writeOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0}}}}),Cn=S0((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/validation",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/validation":!0},$dynamicAnchor:"meta",title:"Validation vocabulary meta-schema",type:["object","boolean"],properties:{type:{anyOf:[{$ref:"#/$defs/simpleTypes"},{type:"array",items:{$ref:"#/$defs/simpleTypes"},minItems:1,uniqueItems:!0}]},const:!0,enum:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/$defs/nonNegativeInteger"},minLength:{$ref:"#/$defs/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},maxItems:{$ref:"#/$defs/nonNegativeInteger"},minItems:{$ref:"#/$defs/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxContains:{$ref:"#/$defs/nonNegativeInteger"},minContains:{$ref:"#/$defs/nonNegativeInteger",default:1},maxProperties:{$ref:"#/$defs/nonNegativeInteger"},minProperties:{$ref:"#/$defs/nonNegativeIntegerDefault0"},required:{$ref:"#/$defs/stringArray"},dependentRequired:{type:"object",additionalProperties:{$ref:"#/$defs/stringArray"}}},$defs:{nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{$ref:"#/$defs/nonNegativeInteger",default:0},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}}}}),Ca=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=j8(),r=j7(),i=Ce(),o=Ct(),n=Cr(),a=Ci(),s=Co(),d=Cn(),c=["/properties"];e.default=function(e){return[t,r,i,o,n,l(this,a),s,l(this,d)].forEach(e=>this.addMetaSchema(e,void 0,!1)),this;function l(t,r){return e?t.$dataMetaSchema(r,c):r}}}),Cs=S0((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.MissingRefError=e.ValidationError=e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=e.Ajv2020=void 0;let r=x8(),i=j5(),o=jW(),n=Ca(),a="https://json-schema.org/draft/2020-12/schema";var s=class extends r.default{constructor(e={}){super({...e,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),i.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(o.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();let{$data:e,meta:t}=this.opts;t&&(n.default.call(this,e),this.refs["http://json-schema.org/schema"]=a)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(a)?a:void 0)}};e.Ajv2020=s,t.exports=e=s,t.exports.Ajv2020=s,Object.defineProperty(e,"__esModule",{value:!0}),e.default=s;var d=xY();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return d.KeywordCxt}});var c=xM();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return c._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return c.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return c.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return c.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return c.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return c.CodeGen}});var l=x1();Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return l.default}});var p=x0();Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return p.default}})}),Cd=S0(e=>{function t(e,t){return{validate:e,compare:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.formatNames=e.fastFormats=e.fullFormats=void 0,e.fullFormats={date:t(o,n),time:t(s(!0),d),"date-time":t(p(!0),u),"iso-time":t(s(),c),"iso-date-time":t(p(),m),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:function(e){return f.test(e)&&h.test(e)},"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:function(e){if(b.test(e))return!1;try{return new RegExp(e),!0}catch(e){return!1}},uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:function(e){return y.lastIndex=0,y.test(e)},int32:{type:"number",validate:function(e){return Number.isInteger(e)&&e<=_&&e>=g}},int64:{type:"number",validate:function(e){return Number.isInteger(e)}},float:{type:"number",validate:v},double:{type:"number",validate:v},password:!0,binary:!0},e.fastFormats={...e.fullFormats,date:t(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,n),time:t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,d),"date-time":t(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,u),"iso-time":t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,c),"iso-date-time":t(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,m),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},e.formatNames=Object.keys(e.fullFormats);let r=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,i=[0,31,28,31,30,31,30,31,31,30,31,30,31];function o(e){var t;let o=r.exec(e);if(!o)return!1;let n=+o[1],a=+o[2],s=+o[3];return a>=1&&a<=12&&s>=1&&s<=(2===a&&(t=n)%4==0&&(t%100!=0||t%400==0)?29:i[a])}function n(e,t){if(e&&t)return e>t?1:e23||l>59||e&&!s)return!1;if(i<=23&&o<=59&&n<60)return!0;let p=o-l*d,u=i-c*d-(p<0);return(23===u||-1===u)&&(59===p||-1===p)&&n<61}}function d(e,t){if(!(e&&t))return;let r=(new Date("2020-01-01T"+e)).valueOf(),i=(new Date("2020-01-01T"+t)).valueOf();if(r&&i)return r-i}function c(e,t){if(!(e&&t))return;let r=a.exec(e),i=a.exec(t);if(r&&i)return(e=r[1]+r[2]+r[3])>(t=i[1]+i[2]+i[3])?1:e{Object.defineProperty(e,"__esModule",{value:!0}),e.formatLimitDefinition=void 0;let t=jN(),r=xM(),i=r.operators,o={formatMaximum:{okStr:"<=",ok:i.LTE,fail:i.GT},formatMinimum:{okStr:">=",ok:i.GTE,fail:i.LT},formatExclusiveMaximum:{okStr:"<",ok:i.LT,fail:i.GTE},formatExclusiveMinimum:{okStr:">",ok:i.GT,fail:i.LTE}};e.formatLimitDefinition={keyword:Object.keys(o),type:"string",schemaType:"string",$data:!0,error:{message:({keyword:e,schemaCode:t})=>(0,r.str)`should be ${o[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,r._)`{comparison: ${o[e].okStr}, limit: ${t}}`},code(e){let i,n,{gen:a,data:s,schemaCode:d,keyword:c,it:l}=e,{opts:p,self:u}=l;if(!p.validateFormats)return;let m=new t.KeywordCxt(l,u.RULES.all.format.definition,"format");function f(e){return(0,r._)`${e}.compare(${s}, ${d}) ${o[c].fail} 0`}m.$data?(i=a.scopeValue("formats",{ref:u.formats,code:p.code.formats}),n=a.const("fmt",(0,r._)`${i}[${m.schemaCode}]`),e.fail$data((0,r.or)((0,r._)`typeof ${n} != "object"`,(0,r._)`${n} instanceof RegExp`,(0,r._)`typeof ${n}.compare != "function"`,f(n)))):function(){let t=m.schema,i=u.formats[t];if(!i||!0===i)return;if("object"!=typeof i||i instanceof RegExp||"function"!=typeof i.compare)throw Error(`"${c}": format "${t}" does not define "compare" function`);let o=a.scopeValue("formats",{key:t,ref:i,code:p.code.formats?(0,r._)`${p.code.formats}${(0,r.getProperty)(t)}`:void 0});e.fail$data(f(o))}()},dependencies:["format"]},e.default=t=>(t.addKeyword(e.formatLimitDefinition),t)}),Cl=S0((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0});let r=Cd(),i=Cc(),o=xM(),n=new o.Name("fullFormats"),a=new o.Name("fastFormats"),s=(e,t={keywords:!0})=>{if(Array.isArray(t))return d(e,t,r.fullFormats,n),e;let[o,s]="fast"===t.mode?[r.fastFormats,a]:[r.fullFormats,n];return d(e,t.formats||r.formatNames,o,s),t.keywords&&(0,i.default)(e),e};function d(e,t,r,i){var n;for(let a of(null!=(n=e.opts.code).formats||(n.formats=(0,o._)`require("ajv-formats/dist/formats").${i}`),t))e.addFormat(a,r[a])}s.get=(e,t="full")=>{let i=("fast"===t?r.fastFormats:r.fullFormats)[e];if(!i)throw Error(`Unknown format "${e}"`);return i},t.exports=e=s,Object.defineProperty(e,"__esModule",{value:!0}),e.default=s}),Cp=jN(),Cu=j9(),Cm=Cs();let Cf=((e,t,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(var i,o=SX(t),n=0,a=o.length;nt[e]).bind(null,i),enumerable:!(r=SQ(t,i))||r.enumerable});return e})(SZ(null!=(w=Cl())?SJ(SY(w)):{},"default",{value:w,enumerable:!0}),w).default;function Ch(e){let t=new e({strict:!1,validateFormats:!0,validateSchema:!1,allErrors:!0});return Cf(t),t}var Cy=class{_ajv;_ajvDraft7;_ajv2019;_userAjv;constructor(e){this._userAjv=void 0!==e,this._ajv=e}get ajv(){return this._ajv??=Ch(Cm.Ajv2020)}_engineFor(e){if(this._userAjv)return this.ajv;let t=function(e,t){if(!("$schema"in e)||"string"!=typeof e.$schema)return"2020-12";let r=e.$schema.replace(/#$/,"");if(S2.has(r))return"2020-12";if(S4.has(r))return"2019-09";if(S6.has(r)||S3.has(r))return"draft-7";throw Error(`JSON Schema declares an unsupported dialect ("$schema": "${e.$schema.slice(0,200)}"). The default validator supports JSON Schema 2020-12, 2019-09, draft-07, and draft-06; ${t}`)}(e,"pass a pre-configured Ajv instance to AjvJsonSchemaValidator(ajv) to validate other dialects.");return"2020-12"===t?this.ajv:"2019-09"===t?this._ajv2019??=Ch(Cu.Ajv2019):this._ajvDraft7??=Ch(Cp.Ajv)}getValidator(e){let t=this._engineFor(e),r="$id"in e&&"string"==typeof e.$id?t.getSchema(e.$id)??t.compile(e):t.compile(e);return e=>r(e)?{valid:!0,data:e,errorMessage:void 0}:{valid:!1,data:void 0,errorMessage:t.errorsText(r.errors)}}};Cp.Ajv,globalThis.crypto?.webcrypto??globalThis.crypto??import("node:crypto").then(e=>e.webcrypto);var Cg=class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.OAuthClientFlowError"})}static[Symbol.hasInstance](e){return V4(this,e)}static isInstance(e){if("function"!=typeof this)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return V4(this,e)}constructor(e){super(e),this.name=new.target.name,V2(this,new.target)}};(class extends Cg{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.IssuerMismatchError"})}kind;expected;received;constructor(e,t,r){super(`Issuer mismatch in ${"metadata"===e?"authorization server metadata (RFC 8414 \xa73.3)":"authorization response (RFC 9207)"}: expected ${JSON.stringify(t)}, received ${JSON.stringify(r)}`),this.kind=e,this.expected=t,this.received=r}}),(class extends Cg{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.RegistrationRejectedError"})}status;body;submittedMetadata;constructor(e){super(`Dynamic Client Registration rejected (HTTP ${e.status}): ${e.body}`),this.status=e.status,this.body=e.body,this.submittedMetadata=e.submittedMetadata}}),(class extends Cg{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.InsecureTokenEndpointError"})}tokenEndpoint;constructor(e){super(`Refusing to send credentials to non-https token endpoint '${e}'. OAuth token requests MUST use TLS (localhost / *.localhost / 127.0.0.1 / ::1 are exempt).`),this.tokenEndpoint=e}}),(class extends Cg{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.AuthorizationServerMismatchError"})}constructor(e,t){super(`Authorization server mismatch: credentials are bound to ${JSON.stringify(e)} but this call resolved ${JSON.stringify(t)}; refusing to present them to a different authorization server`),this.recordedIssuer=e,this.currentIssuer=t}}),class extends Cg{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.InsufficientScopeError"})}requiredScope;resourceMetadataUrl;errorDescription;constructor(e){super(`Insufficient scope${e.requiredScope?`: required "${e.requiredScope}"`:""}`),this.requiredScope=e.requiredScope,this.resourceMetadataUrl=e.resourceMetadataUrl,this.errorDescription=e.errorDescription}};var C_=class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.UnauthorizedError"})}static[Symbol.hasInstance](e){return V4(this,e)}static isInstance(e){if("function"!=typeof this)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return V4(this,e)}constructor(e){super(e??"Unauthorized"),this.name="UnauthorizedError",V2(this,new.target)}};let Cv=new Set(["tools/list","prompts/list","resources/list","resources/templates/list","server/discover"]);var Cb=class{_entries=new Map;_maxEntries;_stamp=0;_cappedSize=0;constructor(e){this._maxEntries=e?.maxEntries??512}get size(){return this._entries.size}get(e){return this._entries.get(C$(e))}set(e,t){let r=C$(e),i=Cv.has(e.method),o=!this._entries.has(r);if(!i&&o&&this._maxEntries>0&&this._cappedSize>=this._maxEntries){for(let e of this._entries.keys())if(!Cv.has(e.slice(0,e.indexOf("\0")))){this._entries.delete(e),this._cappedSize--;break}}let n=++this._stamp;return this._entries.set(r,{...t,stamp:n}),o&&!i&&this._cappedSize++,n}delete(e){this._entries.delete(C$(e))&&!Cv.has(e.method)&&this._cappedSize--}evict(e){let t=`${e}\0`,r=Cv.has(e);for(let e of this._entries.keys())e.startsWith(t)&&(this._entries.delete(e),!r&&this._cappedSize--)}clear(){this._entries.clear(),this._cappedSize=0}};function C$(e){return`${e.method}\0${JSON.stringify([e.partition??"",e.params??""])}`}function CS(e,t){return void 0===t?e:`${e}\0${t}`}var Ck=class{_evictionGeneration=new Map;_toolIndex;_toolOutputValidatorIndex;_serverIdentity="";constructor(e,t,r=()=>{},i="",o=Date.now){this._store=e,this._isUserSupplied=t,this._reportError=r,this._cachePartition=i,this._now=o}now(){return this._now()}setServerIdentity(e){this._serverIdentity=e}_partitionFor(e){return JSON.stringify([this._serverIdentity,"public"===e?"":this._cachePartition])}async _probe(e,t){let r={method:e,params:t??""},i=this._partitionFor("private"),o=await this._store.get({...r,partition:i});if(void 0!==o)return o;let n=this._partitionFor("public");if(n===i)return;let a=await this._store.get({...r,partition:n});return a?.scope==="public"?a:void 0}async evict(e){this._evictionGeneration.set(e,(this._evictionGeneration.get(e)??0)+1),await this._deleteBoth(e,"")}async _deleteBoth(e,t){let r=this._partitionFor("private"),i=this._partitionFor("public");try{await this._store.delete({method:e,params:t,partition:r})}catch(e){this._reportError(e)}if(i!==r)try{await this._store.delete({method:e,params:t,partition:i})}catch(e){this._reportError(e)}}async evictKey(e,t){let r=CS(e,t),i=this._evictionGeneration.get(r);void 0!==i&&this._evictionGeneration.set(r,i+1),await this._deleteBoth(e,t)}captureGeneration(e,t){let r=CS(e,t),i=this._evictionGeneration.get(r)??0;return this._evictionGeneration.set(r,i),i}async write(e,t,r,i){if((this._evictionGeneration.get(CS(e,i?.params))??0)!==r)return;let o=i?.params??"",n=this._partitionFor("private"),a=this._partitionFor("public"),s=(i?.scope??"private")==="public"?a:n;try{await this._store.set({method:e,params:o,partition:s},{value:function(e){let t;try{t=JSON.stringify(e)}catch(e){throw TypeError(`cache value is not JSON-serializable: ${e instanceof Error?e.message:String(e)}`)}if("string"!=typeof t)throw TypeError("cache value is not JSON-serializable: it has no JSON representation");return t}(t),expiresAt:i?.expiresAt,scope:i?.scope})}catch(e){this._reportError(e)}if(a!==n)try{await this._store.delete({method:e,params:o,partition:s===n?a:n})}catch(e){this._reportError(e)}}async read(e,t){let r=await this._probe(e,t);if(r?.expiresAt!==void 0&&r.expiresAt>this.now())try{let e=JSON.parse(r.value);if("object"!=typeof e||null===e||Array.isArray(e))throw TypeError("cached document is not an object");return{value:e}}catch(r){this._reportError(r),await this._deleteBoth(e,t??"");return}}resetForReconnect(){this._isUserSupplied||this._store.clear(),this._evictionGeneration.clear(),this._toolIndex=void 0,this._toolOutputValidatorIndex=void 0,this._serverIdentity=""}async toolDefinition(e){let t=await this._probe("tools/list");if(void 0===t){this._toolIndex=void 0;return}if(this._toolIndex?.stamp!==t.stamp){let e=this._decodeListTools(t),r=new Map;if(void 0!==e)for(let t of e.tools)r.set(t.name,t);this._toolIndex={stamp:t.stamp,byName:r}}return this._toolIndex.byName.get(e)}async outputValidator(e,t){let r=await this._probe("tools/list");if(void 0===r){this._toolOutputValidatorIndex=void 0;return}if(this._toolOutputValidatorIndex?.stamp!==r.stamp){let e=this._decodeListTools(r)??{tools:[]},i=new Map;for(let r of e.tools){let e=t(r);void 0!==e&&i.set(r.name,e)}this._toolOutputValidatorIndex={stamp:r.stamp,byName:i}}return this._toolOutputValidatorIndex.byName.get(e)}_decodeListTools(e){try{let t=JSON.parse(e.value);if(!Array.isArray(t?.tools)||!t.tools.every(e=>null!==e&&"object"==typeof e))throw TypeError("cached tools/list document has a malformed tools array");return t}catch(e){this._reportError(e);return}}};let Cw=Symbol.for("mcp.authSeamEscape"),CV=new Set([-32001,-32020,-32021]);function CP(e,t){let{code:r,message:i,data:o}=e;if(-32022===r){let e=function(e){if("object"!=typeof e||null===e)return;let t=e.supported;if(Array.isArray(t)&&0!==t.length&&t.every(e=>"string"==typeof e))return t}(o);if(void 0===e)return{kind:"legacy"};let r=new PI({supported:e,requested:function(e){if("object"!=typeof e||null===e)return;let t=e.requested;return"string"==typeof t?t:void 0}(o)??t.requestedVersion},i),n=Pe(e),a=t.clientModernVersions.find(e=>n.includes(e));return void 0!==a?{kind:"corrective",version:a,error:r}:n.length>0?{kind:"error",error:r}:t.fallbackAvailable?{kind:"legacy"}:{kind:"error",error:r}}return CV.has(r),{kind:"legacy"}}function CR(e,t){var r;return"browser"===t.environment&&((r=e)instanceof TypeError||r instanceof Error&&"TypeError"===r.name)?{kind:"legacy"}:{kind:"error",error:new V3(V6.EraNegotiationFailed,`Version negotiation probe failed: ${Cq(e)}`,{cause:e},{cause:e})}}function Cq(e){return e instanceof Error?e.message:String(e)}function CI(){let e=globalThis;return void 0!==e.window&&void 0!==e.document?"browser":"node"}function Cx(e){return"stderr"in e&&"pid"in e?"stdio":"http"}var Cj=class e{_pending;_probeCounter=0;_savedOnMessage;_savedOnError;_savedOnClose;_closeDelivered=!1;constructor(e){this._transport=e,this._savedOnMessage=e.onmessage,this._savedOnError=e.onerror,this._savedOnClose=e.onclose}static async open(t){let r=new e(t);t.onmessage=e=>{let t=r._pending;if(void 0!==t&&(k$.safeParse(e).success||kS.safeParse(e).success)&&e.id===t.id){r._pending=void 0,k$.safeParse(e).success?t.resolve({kind:"response",result:e.result}):t.resolve({kind:"response",error:e.error});return}},t.onerror=e=>{r._savedOnError?.(e)},t.onclose=()=>{let e=r._pending;void 0!==e&&(r._pending=void 0,e.resolve({kind:"closed"})),r._closeDelivered=!0,r._savedOnClose?.()};try{await t.start()}catch(e){throw r.detach(),e}return r}async exchange(e,t){let r=`server-discover-probe-${++this._probeCounter}`;return new Promise(i=>{let o=!1,n=e=>{o||(o=!0,clearTimeout(a),this._pending?.id===r&&(this._pending=void 0),i(e))},a=setTimeout(()=>n({kind:"timeout"}),t);this._pending={id:r,resolve:n},this._transport.send(e(r)).catch(e=>n({kind:"send-error",error:e}))})}detach(){if(this._pending=void 0,this._transport.onmessage=this._savedOnMessage,this._transport.onerror=this._savedOnError,this._closeDelivered&&void 0!==this._savedOnClose){let e=this._savedOnClose,t=this._transport,r=!1,i=()=>{if(!r){r=!0;return}e()};t.onclose=i,CC.set(t,()=>{t.onclose===i&&(t.onclose=e)})}else this._transport.onclose=this._savedOnClose}release(){this.detach();let e=this._transport,t=e.start,r=!0;e.start=async function(){if(r){r=!1,e.start=t;return}return t.call(e)}}};let CC=new WeakMap;function CT(e){let t=CC.get(e);CC.delete(e),t?.()}async function CO(e,t){let r,i=e.probe.timeoutMs??t.defaultTimeoutMs,o=Math.max(0,e.probe.maxRetries??0),n="pin"===e.kind?[e.version]:e.modernVersions,a="auto"===e.kind&&e.fallbackAvailable,s=await Cj.open(t.transport);try{r=await (async()=>{let r=n[0],d=!1,c=o;for(;;){let o=await s.exchange(e=>{var i,o,n;return i=r,o=t.clientInfo,n=t.capabilities,{jsonrpc:"2.0",id:e,method:"server/discover",params:{_meta:PG(i).outboundEnvelope({protocolVersion:i,clientInfo:o,clientCapabilities:n})}}},i);if("timeout"===o.kind&&c>0){c--;continue}let l=function(e,t){switch(e.kind){case"response":return void 0===e.error?{kind:"result",result:e.result}:{kind:"rpc-error",...e.error};case"send-error":{let t=e.error;if(("object"==typeof t&&null!==t||"function"==typeof t)&&!0===t[Cw]||t instanceof C_||t instanceof Error&&"UnauthorizedError"===t.name)return{kind:"auth-required",error:t};if(t instanceof V9){let e=t.data?.text;return{kind:"http-error",status:t.data.status,body:"string"==typeof e?e:void 0,statusText:t.data.statusText}}if(t instanceof V3&&t.code===V6.ClientHttpUnexpectedContent||t instanceof Error&&"SyntaxError"===t.name)return{kind:"unusable-reply",error:t};return{kind:"network-error",error:t}}case"closed":return{kind:"closed"};case"timeout":return{kind:"timeout",timeoutMs:t}}}(o,i),p=function(e,t){switch(e.kind){case"result":return function(e,t){let r=PG(PH).validateResult("server/discover",e);if(!r.ok)return{kind:"legacy"};let i=r.value.supportedVersions,o=t.clientModernVersions.find(e=>i.includes(e));return void 0!==o?{kind:"modern",version:o,discover:r.value}:t.fallbackAvailable?{kind:"legacy"}:{kind:"error",error:new PI({supported:[...i],requested:t.requestedVersion})}}(e.result,t);case"rpc-error":return CP(e,t);case"http-error":return function(e,t){if(401===e.status||403===e.status){let t=403===e.status;return{kind:"error",error:new V9(t?V6.ClientHttpForbidden:V6.ClientHttpAuthentication,`Version negotiation failed: ${t?"the server denied access (HTTP 403)":"the server requires authorization (HTTP 401)"}`,{status:e.status,statusText:e.statusText,text:e.body})}}if(e.status>=500)return{kind:"error",error:new V9(V6.EraNegotiationFailed,`Version negotiation failed: the server answered the probe with HTTP ${e.status}`,{status:e.status,statusText:e.statusText,text:e.body})};let r=function(e){let t;if(void 0===e||""===e)return;try{t=JSON.parse(e)}catch{return}if("object"!=typeof t||null===t)return;let r=t.error;if("object"!=typeof r||null===r)return;let{code:i,message:o,data:n}=r;if("number"==typeof i)return{code:i,message:"string"==typeof o?o:"",data:n}}(e.body);return void 0!==r?CP(r,t):{kind:"legacy"}}(e,t);case"network-error":return CR(e.error,t);case"unusable-reply":return{kind:"error",error:new V3(V6.EraNegotiationFailed,`Version negotiation probe failed: the server answered with an unusable reply (${Cq(e.error)})`,{cause:e.error},{cause:e.error})};case"auth-required":return{kind:"error",error:e.error};case"closed":if("stdio"===t.transportKind)return{kind:"legacy"};return CR(Error("Connection closed during the version negotiation probe"),t);case"timeout":if("stdio"===t.transportKind)return{kind:"legacy"};return{kind:"error",error:new V3(V6.RequestTimeout,`Version negotiation probe timed out after ${e.timeoutMs}ms`,{timeout:e.timeoutMs})}}}(l,{clientModernVersions:n,requestedVersion:r,fallbackAvailable:a,environment:t.environment,transportKind:t.transportKind});switch(p.kind){case"modern":return{era:"modern",version:p.version,discover:p.discover};case"corrective":if(d)throw p.error;d=!0,r=p.version;continue;case"legacy":{let r="closed"===l.kind?"the connection closed during the server/discover probe":void 0;if("pin"===e.kind)throw new V3(V6.EraNegotiationFailed,void 0===r?`Version negotiation failed: the server did not offer pinned protocol version ${e.version} via server/discover (no fallback in pin mode)`:`Version negotiation failed: ${r} before the server offered pinned protocol version ${e.version} (no fallback in pin mode)`);if(!e.fallbackAvailable)throw new V3(V6.EraNegotiationFailed,void 0===r?"Version negotiation failed: the server gave no modern evidence and this client supports no pre-2026-07-28 protocol version to fall back to":`Version negotiation failed: ${r} and this client supports no pre-2026-07-28 protocol version to fall back to`);if(void 0!==r&&!0!==t.disposableProbe)throw new V3(V6.EraNegotiationFailed,`Version negotiation failed: ${r} (this transport probed in place — the disposable sibling probe requires the SDK's base StdioClientTransport)`);return{era:"legacy"}}case"error":throw p.error}}})()}catch(e){throw s.detach(),e}return s.release(),r}function CE(){return new V3(V6.EraNegotiationFailed,"Version negotiation failed: the transport was closed during the server/discover probe")}function CA(e){let t=e._meta?.[S7];return Rm.Implementation(t)?t:void 0}let CW={"notifications/tools/list_changed":["tools/list"],"notifications/prompts/list_changed":["prompts/list"],"notifications/resources/list_changed":["resources/list","resources/templates/list"]};var CM=class extends Rv{_serverCapabilities;_serverVersion;_capabilities;_instructions;_jsonSchemaValidator;_cache;_defaultCacheTtlMs;_listMaxPages;_listChangedDebounceTimers=new Map;_listChangedConfig;_enforceStrictCapabilities;_versionNegotiation;_supportedProtocolVersionsOption;_inputRequiredDriverConfig;_listenState=new Map;_nextListenId=0;_autoOpenedSubscription;_discoverResult;_resetConnectionState(){if(this._negotiatedProtocolVersion=void 0,this._serverCapabilities=void 0,this._serverVersion=void 0,this._instructions=void 0,this._discoverResult=void 0,this._autoOpenedSubscription=void 0,this._listenState.size>0){let e=new V3(V6.ConnectionClosed,"subscriptions/listen: client reconnected or closed; subscription state from the previous connection was reset");for(let t of this._listenState.values())t.settle({cause:"remote",error:e})}for(let e of(this._listenState.clear(),this._listChangedDebounceTimers.values()))clearTimeout(e);this._listChangedDebounceTimers.clear(),this._cache.resetForReconnect()}async close(){try{await super.close()}finally{this._resetConnectionState()}}constructor(e,t){var r;super(t),this._clientInfo=e,this._capabilities=t?.capabilities?{...t.capabilities}:{},this._jsonSchemaValidator=t?.jsonSchemaValidator??new Cy,this._enforceStrictCapabilities=t?.enforceStrictCapabilities??!1,this._versionNegotiation=t?.versionNegotiation,this._supportedProtocolVersionsOption=t?.supportedProtocolVersions,this._inputRequiredDriverConfig=(r=t?.inputRequired,{autoFulfill:r?.autoFulfill??!0,maxRounds:r?.maxRounds??10}),this._cache=new Ck(t?.responseCacheStore??new Cb,t?.responseCacheStore!==void 0,e=>this._reportStoreError(e),t?.cachePartition??""),this._defaultCacheTtlMs=t?.defaultCacheTtlMs??0,this._listMaxPages=t?.listMaxPages??64,t?.listChanged&&(this._listChangedConfig=t.listChanged)}buildContext(e,t){return e}_shouldDropInbound(e){if(void 0!==this._negotiatedProtocolVersion&&this._negotiatedProtocolVersion>=V5&&kv.safeParse(e).success)return"drop"}_outboundMetaEnvelope(){let e=this._negotiatedProtocolVersion;if(void 0!==e)return this._wireCodec().outboundEnvelope({protocolVersion:e,clientInfo:this._clientInfo,clientCapabilities:this._capabilities})}_resolveNonCompleteResult(e,t){return this._inputRequiredDriverConfig.autoFulfill?function(e,t,r,i){let{codec:o,request:n,options:a,flowStartedAt:s}=i,d={inputRequests:r.inputRequests,...void 0!==r.requestState&&{requestState:r.requestState}};return async function(e){let{config:t,method:r,originalParams:i,requestOptions:o,hooks:n,signal:a}=e,s=e.flowStartedAt??Date.now(),d=e.firstPayload,c=0;for(;;){let e;if((c+=1)>t.maxRounds){var l;throw new V3(V6.InputRequiredRoundsExceeded,(l=t.maxRounds,`Multi-round-trip request '${r}' still required input after ${l} rounds (inputRequired.maxRounds)`),{rounds:t.maxRounds,lastResult:{inputRequests:d.inputRequests,...void 0!==d.requestState&&{requestState:d.requestState}}})}o.onprogress?.({progress:c,message:`Fulfilling input required by '${r}' (round ${c})`});let p=Object.entries(d.inputRequests??{});if(p.length>0){let t=function(e){let t=new AbortController,r=()=>t.abort(e?.reason);return e?.addEventListener("abort",r,{once:!0}),e?.aborted&&t.abort(e.reason),{signal:t.signal,abort:e=>t.abort(e),dispose:()=>e?.removeEventListener("abort",r)}}(a);try{let r=await Promise.all(p.map(async([e,r])=>{try{return[e,await n.dispatchInputRequest(e,r,t.signal)]}catch(e){throw t.abort(e),e}}));e=Object.fromEntries(r)}finally{t.dispose()}}else await function(e){return new Promise((t,r)=>{if(e?.aborted)return void r(e.reason instanceof V3?e.reason:new V3(V6.RequestTimeout,String(e.reason)));let i=setTimeout(()=>{e?.removeEventListener("abort",o),t()},250),o=()=>{clearTimeout(i),r(e?.reason instanceof V3?e.reason:new V3(V6.RequestTimeout,String(e?.reason)))};e?.addEventListener("abort",o,{once:!0})})}(a);let u={...void 0!==o.timeout&&{timeout:o.timeout}};if(void 0!==o.maxTotalTimeout){let e=Date.now()-s,t=o.maxTotalTimeout-e;if(t<=0)throw new V3(V6.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:o.maxTotalTimeout,totalElapsed:e});u.maxTotalTimeout=t}let m=await n.retry(function(e,t,r){let i=void 0!==t&&Object.keys(t).length>0;return i||void 0!==r?{...e,...i&&{inputResponses:t},...void 0!==r&&{requestState:r}}:e}(i,e,d.requestState),u);if(PY(m)){d={inputRequests:m.inputRequests??{},...void 0!==m.requestState&&{requestState:m.requestState}};continue}return m}}({config:t,method:n.method,originalParams:n.params,firstPayload:d,flowStartedAt:s,signal:a?.signal,requestOptions:{...a?.timeout!==void 0&&{timeout:a.timeout},...a?.maxTotalTimeout!==void 0&&{maxTotalTimeout:a.maxTotalTimeout},...a?.onprogress!==void 0&&{onprogress:a.onprogress}},hooks:{dispatchInputRequest:(t,r,i)=>(async function(e,t,r,i,o){var n;if(!R$(i)||"string"!=typeof i.method)throw new V3(V6.InvalidResult,`Invalid input request '${r}': each inputRequests entry must be an embedded request object with a method`,{key:r});let a=i.method;if(!t.hasInputRequestMethod(a))throw new V3(V6.InvalidResult,`Invalid input request '${r}': '${a}' is not an embedded request the ${t.era} revision defines (expected elicitation/create, sampling/createMessage, or roots/list)`,{key:r,method:a});let s=e.getRequestHandler(a);if(void 0===s)throw new V3(V6.CapabilityNotSupported,`Cannot fulfil input request '${r}': no handler is registered for '${a}' on this client. Declare the corresponding capability and register a handler, or handle input_required results manually.`,{key:r,method:a});let d=R$(i.params)?i.params:void 0;return await s({jsonrpc:"2.0",id:r,method:a,...void 0!==d&&{params:d}},e.buildContext({sessionId:e.sessionId,mcpReq:{id:r,method:a,_meta:d?._meta,requestState:(n=void 0,()=>n),signal:o,send:()=>RS("send"),notify:()=>RS("notify")}}))})(e,o,t,r,i),retry:(e,t)=>i.retry(e,{...a?.signal!==void 0&&{signal:a.signal},...a?.onprogress!==void 0&&{onprogress:a.onprogress},...a?.resetTimeoutOnProgress!==void 0&&{resetTimeoutOnProgress:a.resetTimeoutOnProgress},...a?.headers!==void 0&&{headers:a.headers},...void 0!==t.timeout&&{timeout:t.timeout},...void 0!==t.maxTotalTimeout&&{maxTotalTimeout:t.maxTotalTimeout},allowInputRequired:!0})}})}({getRequestHandler:e=>this._getRequestHandler(e),buildContext:e=>this.buildContext(e,void 0),sessionId:this.transport?.sessionId},this._inputRequiredDriverConfig,e,t):Promise.reject(new V3(V6.UnsupportedResultType,`Unsupported result type 'input_required' for ${t.request.method}: multi-round-trip auto-fulfilment is not enabled on this instance — pass allowInputRequired: true to handle it manually, or enable inputRequired.autoFulfill`,{resultType:"input_required",method:t.request.method}))}_setupListChangedHandlers(e){e.tools&&this._serverCapabilities?.tools?.listChanged&&this._setupListChangedHandler("tools","notifications/tools/list_changed",e.tools,async()=>(await this.listTools(void 0,{cacheMode:"refresh"})).tools),e.prompts&&this._serverCapabilities?.prompts?.listChanged&&this._setupListChangedHandler("prompts","notifications/prompts/list_changed",e.prompts,async()=>(await this.listPrompts(void 0,{cacheMode:"refresh"})).prompts),e.resources&&this._serverCapabilities?.resources?.listChanged&&this._setupListChangedHandler("resources","notifications/resources/list_changed",e.resources,async()=>(await this.listResources(void 0,{cacheMode:"refresh"})).resources)}registerCapabilities(e){if(this.transport)throw Error("Cannot register capabilities after connecting to transport");this._capabilities=function(e,t){let r={...e};for(let e in t){let i=t[e];if(void 0===i)continue;let o=r[e];r[e]=Rb(o)&&Rb(i)?{...o,...i}:i}return r}(this._capabilities,e)}setVersionNegotiation(e){if(this.transport)throw Error("Cannot configure version negotiation after connecting to transport");this._versionNegotiation=e}_wrapHandler(e,t){return"elicitation/create"===e?async(e,r)=>{let i=PG(this._negotiatedProtocolVersion),o=i.validateRequest("elicitation/create",e);if(o.ok||"not-in-era"!==o.reason||(o=i.validateInputRequest("elicitation/create",e)),!o.ok)throw new PP("not-in-era"===o.reason?PV.InternalError:PV.InvalidParams,"not-in-era"===o.reason?"No wire schema for elicitation/create in the resolved era":`Invalid elicitation request: ${o.message}`);let{params:n}=o.value;n.mode=n.mode??"form";let{supportsFormMode:a,supportsUrlMode:s}=function(e){if(!e)return{supportsFormMode:!1,supportsUrlMode:!1};let t=void 0!==e.form,r=void 0!==e.url;return{supportsFormMode:t||!t&&!r,supportsUrlMode:r}}(this._capabilities.elicitation);if("form"===n.mode&&!a)throw new PP(PV.InvalidParams,"Client does not support form-mode elicitation requests");if("url"===n.mode&&!s)throw new PP(PV.InvalidParams,"Client does not support URL-mode elicitation requests");let d=await t(e,r),c=i.validateResult("elicitation/create",d);if(c.ok||"not-in-era"!==c.reason||(c=i.validateInputResponse("elicitation/create",d)),!c.ok)throw new PP("not-in-era"===c.reason?PV.InternalError:PV.InvalidParams,"not-in-era"===c.reason?"No wire schema for elicitation/create in the resolved era":`Invalid elicitation result: ${c.message}`);let l=c.value,p="form"===n.mode?n.requestedSchema:void 0;if("form"===n.mode&&"accept"===l.action&&l.content&&p&&this._capabilities.elicitation?.form?.applyDefaults)try{!function e(t,r){if(t&&null!==r&&"object"==typeof r){if("object"===t.type&&t.properties&&"object"==typeof t.properties){let i=t.properties;for(let t of Object.keys(i)){let o=i[t];void 0===r[t]&&Object.prototype.hasOwnProperty.call(o,"default")&&(r[t]=o.default),void 0!==r[t]&&e(o,r[t])}}if(Array.isArray(t.anyOf))for(let i of t.anyOf)"boolean"!=typeof i&&e(i,r);if(Array.isArray(t.oneOf))for(let i of t.oneOf)"boolean"!=typeof i&&e(i,r)}}(p,l.content)}catch{}return l}:"sampling/createMessage"===e?async(e,r)=>{let i=PG(this._negotiatedProtocolVersion),o=i.validateRequest("sampling/createMessage",e);if(o.ok||"not-in-era"!==o.reason||(o=i.validateInputRequest("sampling/createMessage",e)),!o.ok)throw new PP("not-in-era"===o.reason?PV.InternalError:PV.InvalidParams,"not-in-era"===o.reason?"No wire schema for sampling/createMessage in the resolved era":`Invalid sampling request: ${o.message}`);let{params:n}=o.value,a=await t(e,r),s=!!(n.tools||n.toolChoice),d=i.samplingResultVariant(s,a);if(d.ok||"not-in-era"!==d.reason||(d=i.validateInputResponse("sampling/createMessage",a)),!d.ok)throw new PP("not-in-era"===d.reason?PV.InternalError:PV.InvalidParams,"not-in-era"===d.reason?"No result schema for sampling/createMessage in the resolved era":`Invalid sampling result: ${d.message}`);return d.value}:t}assertCapability(e,t){if(!this._serverCapabilities?.[e])throw new V3(V6.CapabilityNotSupported,`Server does not support ${e} (required for ${t})`)}async connect(e,t){if(t?.prior!=null)return this._connectFromPrior(e,function(e){if("object"==typeof e&&null!==e&&("legacy"===e.kind&&!("supportedVersions"in e)&&!("discover"in e)||"modern"===e.kind&&kL.safeParse(e.discover).success))return e;throw new V3(V6.EraNegotiationFailed,"connect({ prior }): unrecognized prior — expected { kind: 'modern', discover } or { kind: 'legacy' }")}(t.prior),t);let r=function(e,t){let r=e?.mode??"legacy";if("legacy"===r)return{kind:"legacy"};let i=e?.probe??{};if("object"==typeof r){if(!(r.pin>=V5))throw TypeError(`versionNegotiation: { pin: '${r.pin}' } is not a modern protocol revision — pinning is for 2026-07-28 and later; omit versionNegotiation (or use mode: 'legacy') for 2025-era servers.`);return{kind:"pin",version:r.pin,probe:i}}let o=t?Pe(t):[];return{kind:"auto",modernVersions:o.length>0?o:[...V8],fallbackAvailable:!t||V7(t).length>0,probe:i}}(this._versionNegotiation,this._supportedProtocolVersionsOption);return"legacy"!==r.kind?this._connectNegotiated(e,r,t):this._connectPlainLegacy(e,t)}async _connectPlainLegacy(e,t){if(await super.connect(e),void 0!==e.sessionId){let t=this._negotiatedProtocolVersion;void 0!==t&&e.setProtocolVersion?.(t);return}this._resetConnectionState(),await this._legacyHandshake(e,t)}async _legacyHandshake(e,t){let r=V7(this._supportedProtocolVersions);try{let i=r[0];if(void 0===i)throw new V3(V6.EraNegotiationFailed,"Cannot run the initialize handshake: supportedProtocolVersions contains no pre-2026-07-28 protocol version");let o=await this.request({method:"initialize",params:{protocolVersion:i,capabilities:this._capabilities,clientInfo:this._clientInfo}},t);if(void 0===o)throw Error(`Server sent invalid initialize result: ${o}`);if(!r.includes(o.protocolVersion))throw Error(`Server's protocol version is not supported: ${o.protocolVersion}`);this._serverCapabilities=o.capabilities,this._serverVersion=o.serverInfo,this._cache.setServerIdentity(this._deriveServerIdentity(e)),e.setProtocolVersion&&e.setProtocolVersion(o.protocolVersion),this._instructions=o.instructions,await this.notification({method:"notifications/initialized"}),this._negotiatedProtocolVersion=o.protocolVersion,this._listChangedConfig&&this._setupListChangedHandlers(this._listChangedConfig)}catch(e){throw this.close(),e}}async _connectNegotiated(e,t,r){let i;if(void 0!==e.sessionId){await super.connect(e);let t=this._negotiatedProtocolVersion;void 0!==t&&e.setProtocolVersion&&e.setProtocolVersion(t);return}this._resetConnectionState();try{let o=Cx(e),n={clientInfo:this._clientInfo,capabilities:this._capabilities,environment:CI(),defaultTimeoutMs:r?.timeout??6e4},a="stdio"===o?function(e){let t=Object.getPrototypeOf(e);if(null===t||!Object.prototype.hasOwnProperty.call(t,"_dispose"))return;let r=e._serverParams;return"object"==typeof r&&null!==r&&"string"==typeof r.command?r:void 0}(e):void 0;i=void 0===a?await CO(t,{...n,transport:e,transportKind:o}):await async function(e,t,r,i){let o,n,a=new t.constructor({...r,stderr:"ignore"}),s=t.close,d=!1,c=new Promise((e,t)=>{o=()=>t(CE())});t.close=async function(){return d=!0,o?.(),s.call(t)};try{let t=CO(e,{...i,transport:a,transportKind:"stdio",disposableProbe:!0});t.catch(()=>{}),n=await Promise.race([t,c])}finally{await async function(e){try{let t=e._dispose;await ("function"==typeof t?t.call(e):e.close())}catch{}}(a),t.close=s}if(d)throw CE();return n}(t,e,a,n)}catch(t){throw await e.close().catch(()=>{}),CT(e),t}if(CT(e),await super.connect(e),"legacy"===i.era)return void await this._legacyHandshake(e,r);if(this._serverCapabilities=i.discover.capabilities,this._serverVersion=CA(i.discover),this._cache.setServerIdentity(this._deriveServerIdentity(e)),this._instructions=i.discover.instructions,this._discoverResult=i.discover,this._negotiatedProtocolVersion=i.version,e.setProtocolVersion&&e.setProtocolVersion(i.version),this._listChangedConfig){let e=this._listChangedConfig,t=this._serverCapabilities,i={...e.tools&&t?.tools?.listChanged&&{tools:e.tools},...e.prompts&&t?.prompts?.listChanged&&{prompts:e.prompts},...e.resources&&t?.resources?.listChanged&&{resources:e.resources}},o=!0;try{this._setupListChangedHandlers(i)}catch(e){o=!1,this.onerror?.(e instanceof Error?e:Error(String(e)))}let n=o?{...i.tools&&{toolsListChanged:!0},...i.prompts&&{promptsListChanged:!0},...i.resources&&{resourcesListChanged:!0}}:{};if(Object.keys(n).length>0){let e=new AbortController,t=()=>e.abort(r?.signal?.reason);r?.signal?.aborted&&t(),r?.signal?.addEventListener("abort",t);try{this._autoOpenedSubscription=await this.listen(n,{timeout:r?.timeout,signal:e.signal})}catch(e){if(r?.signal?.aborted)throw await this.close().catch(()=>{}),e;this.onerror?.(e instanceof Error?e:Error(String(e)))}finally{r?.signal?.removeEventListener("abort",t)}}}}async _connectFromPrior(e,t,r){if("legacy"===t.kind)return this._connectPlainLegacy(e,r);let i=t.discover;this._resetConnectionState();let o=this._supportedProtocolVersionsOption,n=(o&&Pe(o).length>0?Pe(o):V8).find(e=>i.supportedVersions.includes(e));if(void 0===n)throw new V3(V6.EraNegotiationFailed,"connect({ prior }) with a modern verdict requires a 2026-07-28+ mutual protocol version; the supplied DiscoverResult and this client's supportedProtocolVersions have no modern overlap. For a server known to be legacy, pass prior: { kind: 'legacy' } to skip the probe and initialize directly, or use versionNegotiation: { mode: 'auto' } to re-probe with legacy fallback.");if(await super.connect(e),this._discoverResult=i,this._serverCapabilities=i.capabilities,this._serverVersion=CA(i),this._cache.setServerIdentity(this._deriveServerIdentity(e)),this._instructions=i.instructions,this._negotiatedProtocolVersion=n,e.setProtocolVersion?.(n),this._listChangedConfig)try{this._setupListChangedHandlers(this._listChangedConfig)}catch(e){this.onerror?.(e instanceof Error?e:Error(String(e)))}}getServerCapabilities(){return this._serverCapabilities}getServerVersion(){return this._serverVersion}_deriveServerIdentity(e){let t=this._serverVersion;return void 0!==t?`${t.name}@${t.version}`:e.sessionId??`anonymous:${Date.now()}-${Math.random().toString(36).slice(2)}`}getNegotiatedProtocolVersion(){return this._negotiatedProtocolVersion}getProtocolEra(){let e=this._negotiatedProtocolVersion;if(void 0!==e)return e>=V5?"modern":"legacy"}getInstructions(){return this._instructions}getDiscoverResult(){return this._discoverResult}assertCapabilityForMethod(e){switch(e){case"logging/setLevel":if(!this._serverCapabilities?.logging)throw new V3(V6.CapabilityNotSupported,`Server does not support logging (required for ${e})`);break;case"prompts/get":case"prompts/list":if(!this._serverCapabilities?.prompts)throw new V3(V6.CapabilityNotSupported,`Server does not support prompts (required for ${e})`);break;case"resources/list":case"resources/templates/list":case"resources/read":case"resources/subscribe":case"resources/unsubscribe":if(!this._serverCapabilities?.resources)throw new V3(V6.CapabilityNotSupported,`Server does not support resources (required for ${e})`);if("resources/subscribe"===e&&!this._serverCapabilities.resources.subscribe)throw new V3(V6.CapabilityNotSupported,`Server does not support resource subscriptions (required for ${e})`);break;case"tools/call":case"tools/list":if(!this._serverCapabilities?.tools)throw new V3(V6.CapabilityNotSupported,`Server does not support tools (required for ${e})`);break;case"completion/complete":if(!this._serverCapabilities?.completions)throw new V3(V6.CapabilityNotSupported,`Server does not support completions (required for ${e})`)}}assertNotificationCapability(e){if("notifications/roots/list_changed"===e&&!this._capabilities.roots?.listChanged)throw new V3(V6.CapabilityNotSupported,`Client does not support roots list changed notifications (required for ${e})`)}assertRequestHandlerCapability(e){switch(e){case"sampling/createMessage":if(!this._capabilities.sampling)throw new V3(V6.CapabilityNotSupported,`Client does not support sampling capability (required for ${e})`);break;case"elicitation/create":if(!this._capabilities.elicitation)throw new V3(V6.CapabilityNotSupported,`Client does not support elicitation capability (required for ${e})`);break;case"roots/list":if(!this._capabilities.roots)throw new V3(V6.CapabilityNotSupported,`Client does not support roots capability (required for ${e})`)}}async ping(e){return this.request({method:"ping"},e)}async discover(e){let t=await this._requestWithSchema({method:"server/discover"},kL,e);return this._discoverResult=t,t}async complete(e,t){return this.request({method:"completion/complete",params:e},t)}async setLoggingLevel(e,t){return this.request({method:"logging/setLevel",params:{level:e}},t)}async getPrompt(e,t){return this.request({method:"prompts/get",params:e},t)}async listPrompts(e,t){if(!this._serverCapabilities?.prompts&&!this._enforceStrictCapabilities)return console.debug("Client.listPrompts() called but server does not advertise prompts capability - returning empty list"),{prompts:[]};if(e?.cursor!==void 0)return this.request({method:"prompts/list",params:e},t);let r=await this._serveFromCache("prompts/list",void 0,t);return void 0!==r?r:this._listAllPages("prompts/list",e,t,e=>e.prompts)}async listResources(e,t){if(!this._serverCapabilities?.resources&&!this._enforceStrictCapabilities)return console.debug("Client.listResources() called but server does not advertise resources capability - returning empty list"),{resources:[]};if(e?.cursor!==void 0)return this.request({method:"resources/list",params:e},t);let r=await this._serveFromCache("resources/list",void 0,t);return void 0!==r?r:this._listAllPages("resources/list",e,t,e=>e.resources)}async listResourceTemplates(e,t){if(!this._serverCapabilities?.resources&&!this._enforceStrictCapabilities)return console.debug("Client.listResourceTemplates() called but server does not advertise resources capability - returning empty list"),{resourceTemplates:[]};if(e?.cursor!==void 0)return this.request({method:"resources/templates/list",params:e},t);let r=await this._serveFromCache("resources/templates/list",void 0,t);return void 0!==r?r:this._listAllPages("resources/templates/list",e,t,e=>e.resourceTemplates)}async _listAllPages(e,t,r,i,o){let n=r?.cacheMode==="bypass",a=this._cache.captureGeneration(e),s=await this.request({method:e,...t&&{params:{...t}}},r),d=s.nextCursor,c=s,l=1;for(;void 0!==d;){if(0!==this._listMaxPages&&l>=this._listMaxPages)throw new V3(V6.ListPaginationExceeded,`${e}: exceeded listMaxPages (${this._listMaxPages}); server pagination did not terminate`,{method:e,listMaxPages:this._listMaxPages});let o=await this.request({method:e,params:{...t,cursor:d}},r);if(o.nextCursor===d&&JSON.stringify(i(o))===JSON.stringify(i(c)))break;i(s).push(...i(o)),c=o,d=o.nextCursor,l++}return delete s.nextCursor,o?.(s),n||await this._cache.write(e,s,a,this._freshness(s)),s}_freshness(e,t){let r="number"==typeof e.ttlMs?e.ttlMs:this._defaultCacheTtlMs,i="public"===e.cacheScope?"public":"private";return{expiresAt:this._cache.now()+Math.min(Math.max(0,r),864e5),scope:i,params:t}}async _serveFromCache(e,t,r){if(r?.cacheMode==="bypass"||r?.cacheMode==="refresh")return;let i=await this._cache.read(e,t).catch(e=>void this._reportStoreError(e));if(void 0!==i){if(r?.signal?.aborted){let e=r.signal.reason;throw e instanceof V3?e:new V3(V6.RequestTimeout,String(e))}return i.value}}_reportStoreError(e){this.onerror?.(e instanceof Error?e:Error(String(e)))}_compileOutputValidator(e){if(e.outputSchema)try{return{ok:!0,validator:this._jsonSchemaValidator.getValidator(e.outputSchema)}}catch(e){return{ok:!1,compileError:e}}}async _resolveXMcpHeaderScan(e,t){let r=t??await this._cache.toolDefinition(e);return void 0===r?void 0:P4(r.inputSchema)}async readResource(e,t){let r=await this._serveFromCache("resources/read",e.uri,t);if(void 0!==r)return r;let i=this._cache.captureGeneration("resources/read",e.uri),o=await this.request({method:"resources/read",params:e},t);if(t?.cacheMode!=="bypass"){let r=this._freshness(o,e.uri);r.expiresAt>this._cache.now()?await this._cache.write("resources/read",o,i,r):t?.cacheMode==="refresh"&&await this._cache.evictKey("resources/read",e.uri)}return o}async subscribeResource(e,t){return this.request({method:"resources/subscribe",params:e},t)}async unsubscribeResource(e,t){return this.request({method:"resources/unsubscribe",params:e},t)}async listen(e,t){let r,i,o,n,a;if(void 0===this.transport)throw new V3(V6.NotConnected,"Not connected");let s=this._negotiatedProtocolVersion;if(void 0===s||!(s>=V5))throw new V3(V6.MethodNotSupportedByProtocolVersion,`subscriptions/listen requires a 2026-07-28-era connection (negotiated: ${s??"none"}). On a 2025-era connection, change notifications are delivered unsolicited: use ClientOptions.listChanged and resources/subscribe instead.`,{method:"subscriptions/listen",protocolVersion:s});if(t?.signal?.aborted){let e=t.signal.reason;throw e instanceof V3?e:new V3(V6.RequestTimeout,String(e))}let d=new AbortController,c=`listen:${this._nextListenId++}`,l="opening",p=new Promise((e,t)=>{o=e,n=t}),u=new Promise(e=>{a=e}),m=e=>{if("closed"===l)return;let s="opening"===l;if(void 0!==r&&(clearTimeout(r),r=void 0),"ack"in e){l="open",o(e.ack);return}l="closed",void 0!==i&&t?.signal?.removeEventListener("abort",i),this._listenState.delete(c),d.abort(),a(e.cause),s&&n(e.error??new V3(V6.ConnectionClosed,"subscriptions/listen closed before the server acknowledged"))},f=async()=>{d.abort(),await this.notification({method:"notifications/cancelled",params:{requestId:c}}).catch(()=>{})};this._listenState.set(c,{settle:m});let h=t?.timeout??6e4;if(r=setTimeout(()=>{m({cause:"remote",error:new V3(V6.RequestTimeout,"subscriptions/listen ack timed out",{timeout:h})}),f().catch(()=>{})},h),t?.signal){let e=t.signal;i=()=>{if("closed"===l)return;let t=e.reason;m({cause:"local",error:t instanceof Error?t:Error(String(t??"Aborted"))}),f().catch(()=>{})},e.addEventListener("abort",i,{once:!0})}let y={jsonrpc:"2.0",id:c,method:"subscriptions/listen",params:{_meta:{...this._outboundMetaEnvelope()},notifications:e}},g=e=>{m({cause:"remote",error:e instanceof Error?e:Error(String(e))})};try{this.transport.send(y,{requestSignal:d.signal,onRequestStreamEnd:()=>m({cause:"remote",error:Error("subscriptions/listen: stream ended")})}).catch(g)}catch(e){g(e)}return{honoredFilter:await p,close:async()=>{"closed"!==l&&(m({cause:"local"}),await f())},closed:u}}get autoOpenedSubscription(){return this._autoOpenedSubscription}_onnotification(e,t){let r=Object.hasOwn(CW,e.method)?CW[e.method]:void 0;if("notifications/resources/updated"===e.method){let t=e.params?.uri;"string"==typeof t&&this._cache.evictKey("resources/read",t)}else if(void 0!==r)for(let e of r)this._cache.evict(e);if("notifications/subscriptions/acknowledged"===e.method){let t=e.params?._meta?.[kt],r="string"==typeof t?this._listenState.get(t):void 0;if(void 0!==r){let t=this._wireCodec().validateNotification("notifications/subscriptions/acknowledged",e);r.settle({ack:t.ok?t.value.params.notifications:{}});return}}if("notifications/cancelled"===e.method){let t=e.params?.requestId,r="string"==typeof t?this._listenState.get(t):void 0;if(void 0!==r)return void r.settle({cause:"remote",error:Error("subscriptions/listen: server cancelled the subscription")})}super._onnotification(e,t)}_onresponse(e){let t=e.id,r="string"==typeof t?this._listenState.get(t):void 0;if(void 0!==r)return void(kS.safeParse(e).success?r.settle({cause:"remote",error:PP.fromError(e.error.code,e.error.message,e.error.data)}):r.settle({cause:"graceful",error:new V3(V6.ConnectionClosed,"subscriptions/listen: server closed the subscription gracefully before acknowledging")}));super._onresponse(e)}_onclose(){if(this._listenState.size>0){let e=new V3(V6.ConnectionClosed,"Connection closed");for(let t of this._listenState.values())t.settle({cause:"remote",error:e});this._listenState.clear()}super._onclose()}async callTool(e,t){let r,i="modern"===this.getProtocolEra()&&"browser"!==CI(),o=async()=>{let r;if(!i)return t;try{r=await this._resolveXMcpHeaderScan(e.name,t?.toolDefinition)}catch(e){this._reportStoreError(e)}if(!r?.valid||0===r.declarations.length)return t;let o=function(e,t){let r={};for(let i of e){let e=function(e,t){let r=e;for(let e of t){if(null===r||"object"!=typeof r)return;r=r[e]}return r}(t,i.path);if(null==e)continue;let o=function(e){if("string"==typeof e)return e;if("boolean"==typeof e)return e?"true":"false";if("number"==typeof e){if(!Number.isFinite(e)||Number.isInteger(e)&&!Number.isSafeInteger(e))return;return String(e)}}(e);void 0!==o&&(r[`Mcp-Param-${i.headerName}`]=!function(e){if(0===e.length||e.startsWith(P5)&&e.endsWith("?=")||e!==e.trim())return!0;for(let t=0;t=32)||!(r<=126)))return!0}return!1}(o)?o:`${P5}${function(e){let t=new TextEncoder().encode(e),r="";for(let e of t)r+=String.fromCodePoint(e);return btoa(r)}(o)}?=`)}return r}(r.declarations,e.arguments);return 0===Object.keys(o).length?t:{...t,headers:{...t?.headers,...o}}},n=t?.toolDefinition===void 0?await this._cache.outputValidator(e.name,e=>this._compileOutputValidator(e)).catch(e=>void this._reportStoreError(e)):this._compileOutputValidator(t.toolDefinition),a=()=>{if(void 0===n||n.ok)return;let t=n.compileError,r=(t instanceof Error?t.message:String(t)).slice(0,200);throw new PP(PV.InvalidParams,`Tool '${e.name}' has an invalid outputSchema: ${r}`)};a();try{r=await this.request({method:"tools/call",params:e},await o())}catch(c){let s=c instanceof PP&&-32020===c.code;if(!i||!s||t?.toolDefinition!==void 0)throw c;let d={signal:t?.signal,timeout:t?.timeout,cacheMode:"refresh"};await this._cache.evict("tools/list"),await this.listTools(void 0,d).catch(e=>this._reportStoreError(e)),n=await this._cache.outputValidator(e.name,e=>this._compileOutputValidator(e)).catch(e=>void this._reportStoreError(e)),a(),r=await this.request({method:"tools/call",params:e},await o())}let s=void 0!==n&&n.ok?n.validator:void 0;if(s){if(void 0===r.structuredContent&&!r.isError)throw new PP(PV.InvalidRequest,`Tool ${e.name} has an output schema but did not return structured content`);if(void 0!==r.structuredContent&&!r.isError)try{let e=s(r.structuredContent);if(!e.valid)throw new PP(PV.InvalidParams,`Structured content does not match the tool's output schema: ${e.errorMessage}`)}catch(e){if(e instanceof PP)throw e;throw new PP(PV.InvalidParams,`Failed to validate structured content: ${e instanceof Error?e.message:String(e)}`)}}return r}async listTools(e,t){if(!this._serverCapabilities?.tools&&!this._enforceStrictCapabilities)return console.debug("Client.listTools() called but server does not advertise tools capability - returning empty list"),{tools:[]};if(e?.cursor!==void 0){let r=await this.request({method:"tools/list",params:e},t);return this._excludeInvalidXMcpHeaderTools(r),r}let r=await this._serveFromCache("tools/list",void 0,t);return void 0!==r?r:this._listAllPages("tools/list",e,t,e=>e.tools,e=>this._excludeInvalidXMcpHeaderTools(e))}_excludeInvalidXMcpHeaderTools(e){if("modern"!==this.getProtocolEra()||!this.transport||"stdio"===Cx(this.transport))return;let t=e.tools.filter(e=>{let t=P4(e.inputSchema);return!!t.valid||(console.warn(`[mcp-sdk] excluding tool '${e.name}' from tools/list: invalid x-mcp-header declaration — ${t.reason}`),!1)});t.length!==e.tools.length&&(e.tools=t)}_setupListChangedHandler(e,t,r,i){let o=oJ(wz,r);if(!o.success)throw Error(`Invalid ${e} listChanged options: ${o.error.message}`);if("function"!=typeof r.onChanged)throw TypeError(`Invalid ${e} listChanged options: onChanged must be a function`);let{autoRefresh:n,debounceMs:a}=o.data,{onChanged:s}=r,d=async()=>{if(!n)return void s(null,null);try{s(null,await i())}catch(e){s(e instanceof Error?e:Error(String(e)),null)}},c=()=>{if(a){let t=this._listChangedDebounceTimers.get(e);t&&clearTimeout(t);let r=setTimeout(d,a);this._listChangedDebounceTimers.set(e,r)}else d()};this.setNotificationHandler(t,c)}async sendRootsListChanged(){return this.notification({method:"notifications/roots/list_changed"})}};(class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.SseError"})}static[Symbol.hasInstance](e){return V4(this,e)}static isInstance(e){if("function"!=typeof this)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return V4(this,e)}constructor(e,t,r){super(`SSE error: ${t}`),this.code=e,this.event=r,V2(this,new.target)}});let CN=nR().nonnegative(),Cz=new U;class CD extends Error{failure;constructor(e,t){super(e.message,t),this.name="DaemonFailure",this.failure=e}}function CF(e){let t=0;for(let r=0;r=55296&&i<=56319){let t=e.charCodeAt(r+1);if(t<56320||t>57343||Number.isNaN(t))return null;r+=1}else if(i>=56320&&i<=57343)return null;t+=1}return t}function CL(e,t){return new CD({kind:"protocol",code:e,message:t})}function CU(e,t){return new CD({kind:"unavailable",code:e,message:t})}function CH(e){if(e instanceof CD)return e.failure;if(e instanceof PP){let t=e.data,r="object"==typeof t&&null!==t&&"code"in t&&"string"==typeof t.code?t.code:`jsonrpc_${e.code}`;return{kind:CG(r),code:r,message:e.message}}if(e instanceof V3){let t=`sdk_${e.code.toLowerCase()}`;return{kind:CG(t),code:t,message:e.message}}return e instanceof Error?{kind:"protocol",code:e.name,message:e.message}:{kind:"protocol",code:"unknown",message:String(e)}}function CG(e){return e.includes("not_authorized")||"denied"===e||e.startsWith("authorization")?"denied":e.includes("not_found")||"project_required"===e?"not_found":e.includes("stale")?"stale":e.includes("unavailable")||e.includes("warming")||e.includes("saturated")?"unavailable":e.includes("invalid")||e.includes("malformed")?"invalid_request":e.includes("disconnected")||e.includes("socket")?"disconnected":"protocol"}let CB=nz({handle:o7().min(1),original_chars:CN,preview:o7(),preview_chars:CN,truncated:nY(!0)}),CK=nz({handle:o7().min(1),expired:nY(!1),original_chars:CN,total_chars:CN,content:o7(),offset:CN,next_offset:CN.nullable().optional(),has_more:nI()}),CJ=nz({handle:o7().min(1),expired:nI().nullable().optional(),content:nj().optional(),reason_code:o7()}),CZ=new Set(["PATH","HOME","USERPROFILE","HOMEDRIVE","HOMEPATH","XDG_CONFIG_HOME","XDG_DATA_HOME","LANG","LC_ALL","LC_CTYPE","TMPDIR","TEMP","TMP","SystemRoot","SystemDrive","APPDATA","LOCALAPPDATA","RUST_LOG","RUST_BACKTRACE","RUST_LIB_BACKTRACE","HTTP_PROXY","HTTPS_PROXY","ALL_PROXY","NO_PROXY","http_proxy","https_proxy","all_proxy","no_proxy"]);class CQ{options;#g;#_;#v;#b=null;#$=null;#S=!1;#k=!1;constructor(e){this.options=e;let t=["serve"];null!==e.projectRoot&&t.push("--path",e.projectRoot),this.#_=new RP({command:e.binary,args:t,env:function(e){let t={};for(let[r,i]of Object.entries(e))void 0!==i&&(CZ.has(r)||r.startsWith("TRACEDECAY_"))&&(t[r]=i);return t}(e.env),cwd:e.cwd,stderr:"inherit"}),this.#g=new CM({name:"tracedecay-chatgpt-extension",version:"0.0.0"}),this.#v=new Promise(e=>{this.#_.onclose=()=>{this.#k=!0,e()}})}get closed(){return this.#k}async connect(){this.#w(),null===this.#b&&(this.#b=this.#g.connect(this.#_).catch(e=>{throw this.#k=!0,new CD({kind:"disconnected",code:"serve_spawn_failed",message:`Cannot start ${this.options.binary} serve: ${e instanceof Error?e.message:String(e)}`},{cause:e})}),this.#S=null!==this.#_.pid),await this.#b,this.#w()}serverInfo(){let e=this.#g.getServerVersion();return void 0===e?null:{name:e.name,version:e.version}}async listToolNames(){return await this.connect(),this.#w(),(await this.#g.listTools()).tools.map(e=>e.name)}async callJson(e,t,r){var i;await this.connect(),this.#w();let o=await this.#V({name:e,arguments:{...t,format:"json"}},r);for(let e of o.content)"text"===e.type&&e.text.startsWith("tracedecay_repeated_query:")&&Cz.getStore()?.push(e.text);let n=CY(o,e);if("object"==typeof(i=n)&&null!==i&&!Array.isArray(i)&&"handle"in i&&"truncated"in i&&!0===i.truncated){let t=CB.safeParse(n);if(!t.success)throw CL("response_handle_malformed","truncated response metadata is malformed");if(CF(t.data.preview)!==t.data.preview_chars)throw CL("response_handle_malformed","truncated response preview length is inconsistent");if(t.data.original_chars>1048576)throw CU("response_handle_too_large","response handle exceeds the 1048576-byte reassembly budget");n=C1(await this.#P(t.data,r),e)}return n}async #P(e,t){let r=0,i=0,o=[];for(;;){if(1024===o.length)throw CU("response_handle_page_limit","response handle exceeds the 1024-page reassembly limit");let n=CY(await this.#V({name:"tracedecay_retrieve",arguments:{handle:e.handle,offset:r,format:"json"}},t),"tracedecay_retrieve"),a=CK.safeParse(n);if(!a.success){let t=CJ.safeParse(n);if(t.success&&t.data.handle===e.handle)throw new CD({kind:"unavailable",code:t.data.reason_code,message:`response handle ${e.handle} is no longer available (${t.data.reason_code})`});throw new CD({kind:"protocol",code:"retrieve_page_malformed",message:`tracedecay_retrieve returned an unexpected page shape for ${e.handle}`})}let s=a.data,d=CF(s.content),c=null===d?null:r+d;if(s.handle!==e.handle||s.original_chars!==e.original_chars||s.total_chars!==e.original_chars||s.offset!==r||null===c||!Number.isSafeInteger(c)||c>e.original_chars)throw CL("retrieve_page_malformed",`tracedecay_retrieve returned inconsistent page metadata for ${e.handle}`);let l=Buffer.byteLength(s.content,"utf8");if(l>1048576-i)throw CU("response_handle_too_large","response handle exceeds the 1048576-byte reassembly budget");if(i+=l,o.push(s.content),s.has_more){if(null===s.next_offset||void 0===s.next_offset||s.next_offset<=r||s.next_offset!==c||c>=e.original_chars)throw CL("retrieve_page_malformed",`tracedecay_retrieve returned an invalid continuation for ${e.handle}`);r=s.next_offset;continue}if(null!==s.next_offset&&void 0!==s.next_offset||c!==e.original_chars)throw CL("retrieve_page_malformed",`tracedecay_retrieve returned an incomplete terminal page for ${e.handle}`);return o.join("")}}async #V(e,t){if(this.#w(),t?.aborted)throw t.reason??new DOMException("The operation was aborted","AbortError");try{let r=await this.#g.callTool(e,{...void 0===t?{}:{signal:t}});if(t?.aborted)throw t.reason??new DOMException("The operation was aborted","AbortError");return r}catch(e){if(t?.aborted)throw t.reason??e;throw e}}#w(){if(this.#k)throw new CD({kind:"disconnected",code:"serve_closed",message:"tracedecay serve exited"})}close(){return this.#k=!0,this.#$??=this.#R(),this.#$}async #R(){let e=this.#S||null!==this.#_.pid?this.#v:null,[t]=await Promise.allSettled([(async()=>{await this.#_.close(),await e})(),this.#b]),r=this.#S||null!==this.#_.pid?this.#v:null,[i]=await Promise.allSettled([(async()=>{await this.#g.close(),await r})()]),o=[t,i].flatMap(e=>"rejected"===e.status?[e.reason]:[]);if(1===o.length)throw o[0];if(o.length>1)throw AggregateError(o,"Failed to close tracedecay serve session")}}let CX=nz({problem:nz({kind:o7(),code:o7(),message:o7()})});function CY(e,t){let r=!0===e.isError?CX.safeParse(e.structuredContent):null;if(r?.success){let{kind:e,code:t,message:i}=r.data.problem,o=`${e}/${t}`;throw new CD({kind:CG(o),code:o,message:i})}return C1(function(e){for(let t of e.content)if("text"===t.type)return t.text;return""}(e),t)}function C1(e,t){try{return JSON.parse(e)}catch(r){throw new CD({kind:"protocol",code:"non_json_tool_result",message:`${t} did not return JSON: ${e.slice(0,200)}`},{cause:r})}}class C0{#q;#I=null;#x=new Map;#j=new Map;#$=!1;#C=null;constructor(e){this.#q=e}async authority(){this.#w();let e=await async function(e){let t,r,i=O.join(e,"daemon-authority.json");try{t=await x(i,"utf8")}catch(t){let e="object"==typeof t&&null!==t&&"code"in t?String(t.code):"io_error";return{kind:"absent",failure:{kind:"disconnected",code:"ENOENT"===e?"daemon_authority_absent":e,message:"ENOENT"===e?`No TraceDecay daemon authority record at ${i}; start the daemon (tracedecay daemon run) first.`:`Cannot read ${i}: ${String(t)}`}}}try{r=JSON.parse(t)}catch(e){return{kind:"invalid",failure:{kind:"protocol",code:"daemon_authority_malformed",message:`${i} is not JSON: ${String(e)}`}}}let o=mS.safeParse(r);return o.success?{kind:"available",record:o.data}:{kind:"invalid",failure:{kind:"protocol",code:"daemon_authority_malformed",message:`${i} does not match the daemon authority record: ${o.error.message}`}}}(this.#q.profileRoot);return this.#w(),e}async daemonState(){this.#w();let e=await this.authority();if(this.#w(),"available"!==e.kind)return{state:"disconnected",failure:e.failure};let t=await async function(e,t=fetch){let r=mk(e);if(null===r)return!function(e){if(e<=0)return!1;try{return process.kill(e,0),!0}catch(e){return"object"==typeof e&&null!==e&&"code"in e&&"EPERM"===e.code}}(e.pid)?{kind:"disconnected",code:"daemon_exited",message:`Daemon pid ${e.pid} recorded in ${e.profile_root} is no longer running; start it with \`tracedecay daemon run\`.`}:{kind:"unavailable",code:"http_application_endpoint_absent",message:`Daemon pid ${e.pid} has not published its HTTP application endpoint yet.`};try{return await t(`${r}/`,{method:"GET",signal:AbortSignal.timeout(2e3),redirect:"manual"}),null}catch(t){return{kind:"disconnected",code:"daemon_unreachable",message:`Daemon pid ${e.pid} published ${r} but is not answering: ${t instanceof Error?t.cause instanceof Error?t.cause.message:t.message:String(t)}`}}}(e.record);return(this.#w(),null!==t)?{state:"disconnected",failure:t}:{state:"connected",profile_root:e.record.profile_root,version:e.record.version,pid:e.record.pid}}async #T(){this.#w();let e=await this.authority();if(this.#w(),"available"!==e.kind)throw new CD(e.failure);return e.record}async #O(){for(;;){this.#w();let e=this.#I;if(null===e)return this.#I=new CQ({binary:this.#q.binary,projectRoot:null,env:this.#q.env,cwd:this.#q.cwd}),this.#I;if(!e.closed)return e;await e.close(),this.#w(),this.#I===e&&(this.#I=null)}}#E(){return new SK(async(e,t,r)=>{let i=await this.#O();return this.#w(),i.callJson(e,t,r)})}async listProjects(e){await this.#T();let t=this.#E();return(await this.#A(()=>t.projectList({limit:10},e))).projects.map(C6)}async resolveProject(e,t){await this.#T();let r=this.#E(),i=await this.#A(()=>r.projectContext({project_selector:{project_id:e}},t));if("not_found"===i.status){let t=this.#x.get(e);throw await t?.session.close(),this.#x.get(e)===t&&this.#x.delete(e),new CD({kind:"denied",code:"project_not_registered",message:`Project ${e} is not registered in this TraceDecay profile; only registered projects can be explored.`})}return C6(i.project)}async #W(e,t){this.#w();let r=await this.resolveProject(e,t);this.#w();let i=this.#j.get(e);if(void 0===i){let t=this.#M(r).finally(()=>{this.#j.get(e)===t&&this.#j.delete(e)});t.catch(()=>void 0),this.#j.set(e,t),i=t}return await async function(e,t){if(void 0===t)return await e;let r=()=>t.reason instanceof Error?t.reason:new DOMException("This operation was aborted","AbortError");if(t.aborted)throw r();return await new Promise((i,o)=>{let n=()=>o(r());t.addEventListener("abort",n,{once:!0}),e.then(i,o).finally(()=>t.removeEventListener("abort",n))})}(i,t)}async #M(e){let t=e.project_id,r=await this.#T();this.#w();let i=this.#x.get(t);if(void 0!==i){if(!i.session.closed&&i.authority.process_run_id===r.process_run_id&&i.project.project_root===e.project_root)return i;await i.session.close(),this.#x.get(t)===i&&this.#x.delete(t),this.#w()}let o=mk(r);if(null===o)throw new CD({kind:"unavailable",code:"http_application_endpoint_absent",message:"The daemon has not published its HTTP application endpoint yet."});let n=new CQ({binary:this.#q.binary,projectRoot:e.project_root,env:this.#q.env,cwd:e.project_root}),a=new SU({baseUrl:o,projectId:e.project_id,token:r.auth_token,mcp:{callTool:(e,t,r)=>n.callJson(e,function(e){if("object"==typeof e&&null!==e&&!Array.isArray(e))return e;throw new CD({kind:"invalid_request",code:"non_object_request",message:"MCP tool requests must be objects"})}(t),r.signal)}}),s={project:e,session:n,client:a,authority:r};return this.#x.set(t,s),s}async status(e,t){let{client:r,authority:i}=await this.#W(e,t);return{status:await this.#A(()=>r.operations.status({},C2(t))),authority:i}}async search(e,t,r,i){let{client:o}=await this.#W(e,i);return this.#A(()=>o.operations.search({query:t,limit:r,prefer_symbol:!0},C2(i)))}async node(e,t,r){let{client:i}=await this.#W(e,r);return this.#A(()=>i.operations.node({node_id:t},C2(r)))}async impact(e,t,r,i){let{client:o}=await this.#W(e,i);return this.#A(()=>o.operations.impact({node_id:t,max_depth:r},C2(i)))}async callers(e,t,r,i){let{client:o}=await this.#W(e,i);return this.#A(()=>o.operations.code_callers({node_id:t,maximum_depth:r,meta:{order:"stable_identity",projection:"summary"}},C2(i))).then(C4)}async callees(e,t,r,i,o){let{client:n}=await this.#W(e,o);return this.#A(()=>n.operations.code_callees({node_id:t,maximum_depth:i,scope:{generation:r},meta:{order:"stable_identity",projection:"summary"}},C2(o))).then(C4)}async symbolSearch(e,t,r){let{client:i}=await this.#W(e,r);return this.#A(()=>i.operations.code_symbol_search({query:t,lazy_index_ignored_dependencies:!1,scope:{},meta:{order:"relevance",projection:"summary"}},C2(r))).then(C4)}#w(){if(this.#$)throw new CD({kind:"unavailable",code:"bridge_closed",message:"the extension bridge is shutting down"})}async #A(e){this.#w();try{let t=await e();return this.#w(),t}catch(e){throw new CD(function(e){if(e instanceof CD)return e.failure;if(e instanceof Sb){var t,r;let i=e.problem.kind,o=`${i}/${e.problem.code}`;return{kind:(t=i,r=e.status,"not_found_or_not_authorized"===t||403===r?"denied":404===r?"not_found":CG(t)),code:o,message:e.problem.message}}return e instanceof Sg?{kind:"protocol",code:"daemon_authentication",message:e.message}:e instanceof Sy?{kind:"disconnected",code:"daemon_disconnected",message:e.message}:e instanceof Sf?void 0!==e.cause?CH(e.cause):{kind:"disconnected",code:"transport",message:e.message}:e instanceof S_?{kind:"protocol",code:e.name,message:e.message}:CH(e)}(e),{cause:e})}}close(){return null!==this.#C||(this.#$=!0,this.#C=this.#N()),this.#C}async #N(){await Promise.allSettled([...this.#j.values()]);let e=[...this.#x.values()].map(e=>e.session);null!==this.#I&&e.push(this.#I),this.#x.clear(),this.#I=null;let t=(await Promise.allSettled(e.map(async e=>e.close()))).flatMap(e=>"rejected"===e.status?[e.reason]:[]);if(1===t.length)throw t[0];if(t.length>1)throw AggregateError(t,"extension bridge session cleanup failed")}}function C2(e){return void 0===e?{}:{signal:e}}function C4(e){let t=e.outcome.value.payload;if(null===t)throw new CD({kind:"unavailable",code:"empty_payload",message:`the daemon returned a ${e.outcome.outcome} outcome without a payload`});return t}function C6(e){return{project_id:e.project_id,label:e.label,project_root:e.project_root,head_branch:e.head_branch??null,default_branch:e.default_branch??null}}var C3="ui/resourceUri";function C9(e,t,r,i){let o=r._meta,n=o.ui,a=o[C3],s=o;return n?.resourceUri&&!a?s={...o,[C3]:n.resourceUri}:a&&!n?.resourceUri&&(s={...o,ui:{...n,resourceUri:a}}),e.registerTool(t,{...r,_meta:s},i)}function C5(e,t,r){function i(r,i){if(r._zod||Object.defineProperty(r,"_zod",{value:{def:i,constr:a,traits:new Set},enumerable:!1}),r._zod.traits.has(e))return;r._zod.traits.add(e),t(r,i);let o=a.prototype,n=Object.keys(o);for(let e=0;e!!r?.Parent&&t instanceof r.Parent||t?._zod?.traits?.has(e)}),Object.defineProperty(a,"name",{value:e}),a}Symbol("zod_brand");class C8 extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class C7 extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}}(en=globalThis).__zod_globalConfig??(en.__zod_globalConfig={});let Te=globalThis.__zod_globalConfig;function Tt(e){return e&&Object.assign(Te,e),Te}let Tr=/^[cC][0-9a-z]{6,}$/,Ti=/^[0-9a-z]+$/,To=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Tn=/^[0-9a-vA-V]{20}$/,Ta=/^[A-Za-z0-9]{27}$/,Ts=/^[a-zA-Z0-9_-]{21}$/,Td=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Tc=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Tl=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([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)$/,Tp=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Tu=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Tm=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,Tf=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Th=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Ty=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Tg=/^[A-Za-z0-9_-]*$/,T_=/^https?$/,Tv=/^\+[1-9]\d{6,14}$/,Tb="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",T$=RegExp(`^${Tb}$`);function TS(e){let t="(?:[01]\\d|2[0-3]):[0-5]\\d";return"number"==typeof e.precision?-1===e.precision?`${t}`:0===e.precision?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}let Tk=/^-?\d+$/,Tw=/^-?\d+(?:\.\d+)?$/,TV=/^(?:true|false)$/i,TP=/^[^A-Z]*$/,TR=/^[^a-z]*$/;function Tq(e){let t=Object.values(e).filter(e=>"number"==typeof e);return Object.entries(e).filter(([e,r])=>-1===t.indexOf(+e)).map(([e,t])=>t)}function TI(e,t){return"bigint"==typeof t?t.toString():t}function Tx(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function Tj(e){let t=+!!e.startsWith("^"),r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}let TC=Symbol("evaluating");function TT(e,t,r){let i;Object.defineProperty(e,t,{get(){if(i!==TC)return void 0===i&&(i=TC,i=r()),i},set(r){Object.defineProperty(e,t,{value:r})},configurable:!0})}function TO(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function TE(...e){let t={};for(let r of e)Object.assign(t,Object.getOwnPropertyDescriptors(r));return Object.defineProperties({},t)}function TA(e){return JSON.stringify(e)}let TW="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function TM(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}let TN=Tx(()=>{if(Te.jitless||"u">typeof navigator&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return Function(""),!0}catch(e){return!1}});function Tz(e){if(!1===TM(e))return!1;let t=e.constructor;if(void 0===t||"function"!=typeof t)return!0;let r=t.prototype;return!1!==TM(r)&&!1!==Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")}function TD(e){return Tz(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}let TF=new Set(["string","number","symbol"]);function TL(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function TU(e,t,r){let i=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(i._zod.parent=e),i}function TH(e){if(!e)return{};if("string"==typeof e)return{error:()=>e};if(e?.message!==void 0){if(e?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");e.error=e.message}return(delete e.message,"string"==typeof e.error)?{...e,error:()=>e.error}:e}let TG={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-0x80000000,0x7fffffff],uint32:[0,0xffffffff],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function TB(e,t=0){if(!0===e.aborted)return!0;for(let r=t;r(t.path??(t.path=[]),t.path.unshift(e),t))}function TJ(e){return"string"==typeof e?e:e?.message}function TZ(e,t,r){let i=e.message?e.message:TJ(e.inst?._zod.def?.error?.(e))??TJ(t?.error?.(e))??TJ(r.customError?.(e))??TJ(r.localeError?.(e))??"Invalid input",{inst:o,continue:n,input:a,...s}=e;return s.path??(s.path=[]),s.message=i,t?.reportInput&&(s.input=a),s}function TQ(e){return Array.isArray(e)?"array":"string"==typeof e?"string":"unknown"}function TX(...e){let[t,r,i]=e;return"string"==typeof t?{message:t,code:"custom",input:r,inst:i}:{...t}}let TY=C5("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),T1={number:"number",bigint:"bigint",object:"date"},T0=C5("$ZodCheckLessThan",(e,t)=>{TY.init(e,t);let r=T1[typeof t.value];e._zod.onattach.push(e=>{let r=e._zod.bag,i=(t.inclusive?r.maximum:r.exclusiveMaximum)??1/0;t.value{(t.inclusive?i.value<=t.value:i.value{TY.init(e,t);let r=T1[typeof t.value];e._zod.onattach.push(e=>{let r=e._zod.bag,i=(t.inclusive?r.minimum:r.exclusiveMinimum)??-1/0;t.value>i&&(t.inclusive?r.minimum=t.value:r.exclusiveMinimum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value>=t.value:i.value>t.value)||i.issues.push({origin:r,code:"too_small",minimum:"object"==typeof t.value?t.value.getTime():t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),T4=C5("$ZodCheckMultipleOf",(e,t)=>{TY.init(e,t),e._zod.onattach.push(e=>{var r;(r=e._zod.bag).multipleOf??(r.multipleOf=t.value)}),e._zod.check=r=>{let i,o,n;if(typeof r.value!=typeof t.value)throw Error("Cannot mix number and bigint in multiple_of check.");("bigint"==typeof r.value?r.value%t.value===BigInt(0):0==(o=Math.round(i=r.value/t.value),n=Number.EPSILON*Math.max(Math.abs(i),1),Math.abs(i-o){TY.init(e,t),t.format=t.format||"float64";let r=t.format?.includes("int"),i=r?"int":"number",[o,n]=TG[t.format];e._zod.onattach.push(e=>{let i=e._zod.bag;i.format=t.format,i.minimum=o,i.maximum=n,r&&(i.pattern=Tk)}),e._zod.check=a=>{let s=a.value;if(r){if(!Number.isInteger(s))return void a.issues.push({expected:i,format:t.format,code:"invalid_type",continue:!1,input:s,inst:e});if(!Number.isSafeInteger(s))return void(s>0?a.issues.push({input:s,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!t.abort}):a.issues.push({input:s,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!t.abort}))}sn&&a.issues.push({origin:"number",input:s,code:"too_big",maximum:n,inclusive:!0,inst:e,continue:!t.abort})}}),T3=C5("$ZodCheckMaxLength",(e,t)=>{var r;TY.init(e,t),(r=e._zod.def).when??(r.when=e=>{let t=e.value;return null!=t&&void 0!==t.length}),e._zod.onattach.push(e=>{let r=e._zod.bag.maximum??1/0;t.maximum{let i=r.value;if(i.length<=t.maximum)return;let o=TQ(i);r.issues.push({origin:o,code:"too_big",maximum:t.maximum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),T9=C5("$ZodCheckMinLength",(e,t)=>{var r;TY.init(e,t),(r=e._zod.def).when??(r.when=e=>{let t=e.value;return null!=t&&void 0!==t.length}),e._zod.onattach.push(e=>{let r=e._zod.bag.minimum??-1/0;t.minimum>r&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{let i=r.value;if(i.length>=t.minimum)return;let o=TQ(i);r.issues.push({origin:o,code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),T5=C5("$ZodCheckLengthEquals",(e,t)=>{var r;TY.init(e,t),(r=e._zod.def).when??(r.when=e=>{let t=e.value;return null!=t&&void 0!==t.length}),e._zod.onattach.push(e=>{let r=e._zod.bag;r.minimum=t.length,r.maximum=t.length,r.length=t.length}),e._zod.check=r=>{let i=r.value,o=i.length;if(o===t.length)return;let n=TQ(i),a=o>t.length;r.issues.push({origin:n,...a?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),T8=C5("$ZodCheckStringFormat",(e,t)=>{var r,i;TY.init(e,t),e._zod.onattach.push(e=>{let r=e._zod.bag;r.format=t.format,t.pattern&&(r.patterns??(r.patterns=new Set),r.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=r=>{t.pattern.lastIndex=0,t.pattern.test(r.value)||r.issues.push({origin:"string",code:"invalid_format",format:t.format,input:r.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(i=e._zod).check??(i.check=()=>{})}),T7=C5("$ZodCheckRegex",(e,t)=>{T8.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,t.pattern.test(r.value)||r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Oe=C5("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=TP),T8.init(e,t)}),Ot=C5("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=TR),T8.init(e,t)}),Or=C5("$ZodCheckIncludes",(e,t)=>{TY.init(e,t);let r=TL(t.includes),i=new RegExp("number"==typeof t.position?`^.{${t.position}}${r}`:r);t.pattern=i,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(i)}),e._zod.check=r=>{r.value.includes(t.includes,t.position)||r.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:r.value,inst:e,continue:!t.abort})}}),Oi=C5("$ZodCheckStartsWith",(e,t)=>{TY.init(e,t);let r=RegExp(`^${TL(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(r)}),e._zod.check=r=>{r.value.startsWith(t.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:r.value,inst:e,continue:!t.abort})}}),Oo=C5("$ZodCheckEndsWith",(e,t)=>{TY.init(e,t);let r=RegExp(`.*${TL(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(r)}),e._zod.check=r=>{r.value.endsWith(t.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:r.value,inst:e,continue:!t.abort})}}),On=C5("$ZodCheckOverwrite",(e,t)=>{TY.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}});class Oa{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if("function"==typeof e){e(this,{execution:"sync"}),e(this,{execution:"async"});return}let t=e.split("\n").filter(e=>e),r=Math.min(...t.map(e=>e.length-e.trimStart().length));for(let e of t.map(e=>e.slice(r)).map(e=>" ".repeat(2*this.indent)+e))this.content.push(e)}compile(){let e=Function,t=this?.args,r=[...(this?.content??[""]).map(e=>` ${e}`)];return new e(...t,r.join("\n"))}}let Os=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,TI,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Od=C5("$ZodError",Os),Oc=C5("$ZodError",Os,{Parent:Error}),Ol=e=>(t,r,i,o)=>{let n=i?{...i,async:!1}:{async:!1},a=t._zod.run({value:r,issues:[]},n);if(a instanceof Promise)throw new C8;if(a.issues.length){let t=new(o?.Err??e)(a.issues.map(e=>TZ(e,n,Tt())));throw TW(t,o?.callee),t}return a.value},Op=e=>async(t,r,i,o)=>{let n=i?{...i,async:!0}:{async:!0},a=t._zod.run({value:r,issues:[]},n);if(a instanceof Promise&&(a=await a),a.issues.length){let t=new(o?.Err??e)(a.issues.map(e=>TZ(e,n,Tt())));throw TW(t,o?.callee),t}return a.value},Ou=e=>(t,r,i)=>{let o=i?{...i,async:!1}:{async:!1},n=t._zod.run({value:r,issues:[]},o);if(n instanceof Promise)throw new C8;return n.issues.length?{success:!1,error:new(e??Od)(n.issues.map(e=>TZ(e,o,Tt())))}:{success:!0,data:n.value}},Om=Ou(Oc),Of=e=>async(t,r,i)=>{let o=i?{...i,async:!0}:{async:!0},n=t._zod.run({value:r,issues:[]},o);return n instanceof Promise&&(n=await n),n.issues.length?{success:!1,error:new e(n.issues.map(e=>TZ(e,o,Tt())))}:{success:!0,data:n.value}},Oh=Of(Oc),Oy={major:4,minor:4,patch:3},Og=C5("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Oy;let i=[...e._zod.def.checks??[]];for(let t of(e._zod.traits.has("$ZodCheck")&&i.unshift(e),i))for(let r of t._zod.onattach)r(e);if(0===i.length)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(e,t,r)=>{let i,o=TB(e);for(let n of t){if(n._zod.def.when){if(function(e,t=0){if(!0===e.aborted)return!0;for(let r=t;r{await a,e.issues.length!==t&&(o||(o=TB(e,t)))});else{if(e.issues.length===t)continue;o||(o=TB(e,t))}}return i?i.then(()=>e):e},r=(r,o,n)=>{if(TB(r))return r.aborted=!0,r;let a=t(o,i,n);if(a instanceof Promise){if(!1===n.async)throw new C8;return a.then(t=>e._zod.parse(t,n))}return e._zod.parse(a,n)};e._zod.run=(o,n)=>{if(n.skipChecks)return e._zod.parse(o,n);if("backward"===n.direction){let t=e._zod.parse({value:o.value,issues:[]},{...n,skipChecks:!0});return t instanceof Promise?t.then(e=>r(e,o,n)):r(t,o,n)}let a=e._zod.parse(o,n);if(a instanceof Promise){if(!1===n.async)throw new C8;return a.then(e=>t(e,i,n))}return t(a,i,n)}}TT(e,"~standard",()=>({validate:t=>{try{let r=Om(e,t);return r.success?{value:r.data}:{issues:r.error?.issues}}catch(r){return Oh(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:"zod",version:1}))}),O_=C5("$ZodString",(e,t)=>{var r;let i;Og.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??(i=(r=e._zod.bag)?`[\\s\\S]{${r?.minimum??0},${r?.maximum??""}}`:"[\\s\\S]*",RegExp(`^${i}$`)),e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=String(r.value)}catch(e){}return"string"==typeof r.value||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),Ov=C5("$ZodStringFormat",(e,t)=>{T8.init(e,t),O_.init(e,t)}),Ob=C5("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Tc),Ov.init(e,t)}),O$=C5("$ZodUUID",(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(void 0===e)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Tl(e))}else t.pattern??(t.pattern=Tl());Ov.init(e,t)}),OS=C5("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Tp),Ov.init(e,t)}),Ok=C5("$ZodURL",(e,t)=>{Ov.init(e,t),e._zod.check=r=>{try{let i=r.value.trim();if(!t.normalize&&t.protocol?.source===T_.source&&!/^https?:\/\//i.test(i))return void r.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:r.value,inst:e,continue:!t.abort});let o=new URL(i);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(o.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(o.protocol.endsWith(":")?o.protocol.slice(0,-1):o.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),t.normalize?r.value=o.href:r.value=i;return}catch(i){r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),Ow=C5("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),Ov.init(e,t)}),OV=C5("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=Ts),Ov.init(e,t)}),OP=C5("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Tr),Ov.init(e,t)}),OR=C5("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Ti),Ov.init(e,t)}),Oq=C5("$ZodULID",(e,t)=>{t.pattern??(t.pattern=To),Ov.init(e,t)}),OI=C5("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Tn),Ov.init(e,t)}),Ox=C5("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Ta),Ov.init(e,t)}),Oj=C5("$ZodISODateTime",(e,t)=>{let r,i,o;t.pattern??(r=TS({precision:t.precision}),i=["Z"],t.local&&i.push(""),t.offset&&i.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)"),o=`${r}(?:${i.join("|")})`,t.pattern=RegExp(`^${Tb}T(?:${o})$`)),Ov.init(e,t)}),OC=C5("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=T$),Ov.init(e,t)}),OT=C5("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=RegExp(`^${TS(t)}$`)),Ov.init(e,t)}),OO=C5("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Td),Ov.init(e,t)}),OE=C5("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=Tu),Ov.init(e,t),e._zod.bag.format="ipv4"}),OA=C5("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=Tm),Ov.init(e,t),e._zod.bag.format="ipv6",e._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}}),OW=C5("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=Tf),Ov.init(e,t)}),OM=C5("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=Th),Ov.init(e,t),e._zod.check=r=>{let i=r.value.split("/");try{if(2!==i.length)throw Error();let[e,t]=i;if(!t)throw Error();let r=Number(t);if(`${r}`!==t||r<0||r>128)throw Error();new URL(`http://[${e}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}}});function ON(e){if(""===e)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}let Oz=C5("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Ty),Ov.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=r=>{ON(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}}),OD=C5("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=Tg),Ov.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=r=>{!function(e){if(!Tg.test(e))return!1;let t=e.replace(/[-_]/g,e=>"-"===e?"+":"/");return ON(t.padEnd(4*Math.ceil(t.length/4),"="))}(r.value)&&r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),OF=C5("$ZodE164",(e,t)=>{t.pattern??(t.pattern=Tv),Ov.init(e,t)}),OL=C5("$ZodJWT",(e,t)=>{Ov.init(e,t),e._zod.check=r=>{!function(e,t=null){try{let r=e.split(".");if(3!==r.length)return!1;let[i]=r;if(!i)return!1;let o=JSON.parse(atob(i));if("typ"in o&&o?.typ!=="JWT"||!o.alg||t&&(!("alg"in o)||o.alg!==t))return!1;return!0}catch{return!1}}(r.value,t.alg)&&r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),OU=C5("$ZodNumber",(e,t)=>{Og.init(e,t),e._zod.pattern=e._zod.bag.pattern??Tw,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=Number(r.value)}catch(e){}let o=r.value;if("number"==typeof o&&!Number.isNaN(o)&&Number.isFinite(o))return r;let n="number"==typeof o?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:o,inst:e,...n?{received:n}:{}}),r}}),OH=C5("$ZodNumberFormat",(e,t)=>{T6.init(e,t),OU.init(e,t)}),OG=C5("$ZodBoolean",(e,t)=>{Og.init(e,t),e._zod.pattern=TV,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=!!r.value}catch(e){}let o=r.value;return"boolean"==typeof o||r.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:e}),r}}),OB=C5("$ZodUnknown",(e,t)=>{Og.init(e,t),e._zod.parse=e=>e}),OK=C5("$ZodNever",(e,t)=>{Og.init(e,t),e._zod.parse=(t,r)=>(t.issues.push({expected:"never",code:"invalid_type",input:t.value,inst:e}),t)});function OJ(e,t,r){e.issues.length&&t.issues.push(...TK(r,e.issues)),t.value[r]=e.value}let OZ=C5("$ZodArray",(e,t)=>{Og.init(e,t),e._zod.parse=(r,i)=>{let o=r.value;if(!Array.isArray(o))return r.issues.push({expected:"array",code:"invalid_type",input:o,inst:e}),r;r.value=Array(o.length);let n=[];for(let e=0;eOJ(t,r,e))):OJ(s,r,e)}return n.length?Promise.all(n).then(()=>r):r}});function OQ(e,t,r,i,o,n){let a=r in i;if(e.issues.length){if(o&&n&&!a)return;t.issues.push(...TK(r,e.issues))}if(!a&&!o){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[r]});return}void 0===e.value?a&&(t.value[r]=void 0):t.value[r]=e.value}function OX(e){var t;let r=Object.keys(e.shape);for(let t of r)if(!e.shape?.[t]?._zod?.traits?.has("$ZodType"))throw Error(`Invalid element at key "${t}": expected a Zod schema`);let i=Object.keys(t=e.shape).filter(e=>"optional"===t[e]._zod.optin&&"optional"===t[e]._zod.optout);return{...e,keys:r,keySet:new Set(r),numKeys:r.length,optionalKeys:new Set(i)}}function OY(e,t,r,i,o,n){let a=[],s=o.keySet,d=o.catchall._zod,c=d.def.type,l="optional"===d.optin,p="optional"===d.optout;for(let o in t){if("__proto__"===o||s.has(o))continue;if("never"===c){a.push(o);continue}let n=d.run({value:t[o],issues:[]},i);n instanceof Promise?e.push(n.then(e=>OQ(e,r,o,t,l,p))):OQ(n,r,o,t,l,p)}return(a.length&&r.issues.push({code:"unrecognized_keys",keys:a,input:t,inst:n}),e.length)?Promise.all(e).then(()=>r):r}let O1=C5("$ZodObject",(e,t)=>{let r;Og.init(e,t);let i=Object.getOwnPropertyDescriptor(t,"shape");if(!i?.get){let e=t.shape;Object.defineProperty(t,"shape",{get:()=>{let r={...e};return Object.defineProperty(t,"shape",{value:r}),r}})}let o=Tx(()=>OX(t));TT(e._zod,"propValues",()=>{let e=t.shape,r={};for(let t in e){let i=e[t]._zod;if(i.values)for(let e of(r[t]??(r[t]=new Set),i.values))r[t].add(e)}return r});let n=t.catchall;e._zod.parse=(t,i)=>{r??(r=o.value);let a=t.value;if(!TM(a))return t.issues.push({expected:"object",code:"invalid_type",input:a,inst:e}),t;t.value={};let s=[],d=r.shape;for(let e of r.keys){let r=d[e],o="optional"===r._zod.optin,n="optional"===r._zod.optout,c=r._zod.run({value:a[e],issues:[]},i);c instanceof Promise?s.push(c.then(r=>OQ(r,t,e,a,o,n))):OQ(c,t,e,a,o,n)}return n?OY(s,a,t,i,o.value,e):s.length?Promise.all(s).then(()=>t):t}}),O0=C5("$ZodObjectJIT",(e,t)=>{let r,i;O1.init(e,t);let o=e._zod.parse,n=Tx(()=>OX(t)),a=!Te.jitless,s=a&&TN.value,d=t.catchall;e._zod.parse=(c,l)=>{i??(i=n.value);let p=c.value;return TM(p)?a&&s&&l?.async===!1&&!0!==l.jitless?(r||(r=(e=>{let t=new Oa(["shape","payload","ctx"]),r=n.value,i=e=>{let t=TA(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write("const input = payload.value;");let o=Object.create(null),a=0;for(let e of r.keys)o[e]=`key_${a++}`;for(let n of(t.write("const newResult = {};"),r.keys)){let r=o[n],a=TA(n),s=e[n],d=s?._zod?.optin==="optional",c=s?._zod?.optout==="optional";t.write(`const ${r} = ${i(n)};`),d&&c?t.write(` + deps: ${i}}`};let o={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(e){let[t,r]=function({schema:e}){let t={},r={};for(let i in e)"__proto__"!==i&&((Array.isArray(e[i])?t:r)[i]=e[i]);return[t,r]}(e);n(e,t),a(e,r)}};function n(e,r=e.schema){let{gen:o,data:a,it:s}=e;if(0===Object.keys(r).length)return;let d=o.let("missing");for(let n in r){let c=r[n];if(0===c.length)continue;let l=(0,i.propertyInData)(o,a,n,s.opts.ownProperties);e.setParams({property:n,depsCount:c.length,deps:c.join(", ")}),s.allErrors?o.if(l,()=>{for(let t of c)(0,i.checkReportMissingProp)(e,t)}):(o.if((0,t._)`${l} && (${(0,i.checkMissingProp)(e,c,d)})`),(0,i.reportMissingProp)(e,d),o.else())}}function a(e,t=e.schema){let{gen:o,data:n,keyword:s,it:d}=e,c=o.name("valid");for(let a in t)(0,r.alwaysValidSchema)(d,t[a])||(o.if((0,i.propertyInData)(o,n,a,d.opts.ownProperties),()=>{let t=e.subschema({keyword:s,schemaProp:a},c);e.mergeValidEvaluated(t,c)},()=>o.var(c,!0)),e.ok(c))}e.validatePropertyDeps=n,e.validateSchemaDeps=a,e.default=o}),x2=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xc(),r=xl();e.default={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:e})=>(0,t._)`{propertyName: ${e.propertyName}}`},code(e){let{gen:i,schema:o,data:n,it:a}=e;if((0,r.alwaysValidSchema)(a,o))return;let s=i.name("valid");i.forIn("key",n,r=>{e.setParams({propertyName:r}),e.subschema({keyword:"propertyNames",data:r,dataTypes:["string"],propertyName:r,compositeRule:!0},s),i.if((0,t.not)(s),()=>{e.error(!0),a.allErrors||i.break()})}),e.ok(s)}}}),x4=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=x_(),r=xc(),i=xp(),o=xl();e.default={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:e})=>(0,r._)`{additionalProperty: ${e.additionalProperty}}`},code(e){let{gen:n,schema:a,parentSchema:s,data:d,errsCount:c,it:l}=e;if(!c)throw Error("ajv implementation error");let{allErrors:p,opts:u}=l;if(l.props=!0,"all"!==u.removeAdditional&&(0,o.alwaysValidSchema)(l,a))return;let m=(0,t.allSchemaProperties)(s.properties),f=(0,t.allSchemaProperties)(s.patternProperties);function h(e){n.code((0,r._)`delete ${d}[${e}]`)}function y(t){if("all"===u.removeAdditional||u.removeAdditional&&!1===a)return void h(t);if(!1===a){e.setParams({additionalProperty:t}),e.error(),p||n.break();return}if("object"==typeof a&&!(0,o.alwaysValidSchema)(l,a)){let i=n.name("valid");"failing"===u.removeAdditional?(g(t,i,!1),n.if((0,r.not)(i),()=>{e.reset(),h(t)})):(g(t,i),p||n.if((0,r.not)(i),()=>n.break()))}}function g(t,r,i){let n={keyword:"additionalProperties",dataProp:t,dataPropType:o.Type.Str};!1===i&&Object.assign(n,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(n,r)}n.forIn("key",d,i=>{m.length||f.length?n.if(function(i){let a;if(m.length>8){let e=(0,o.schemaRefOrVal)(l,s.properties,"properties");a=(0,t.isOwnProperty)(n,e,i)}else a=m.length?(0,r.or)(...m.map(e=>(0,r._)`${i} === ${e}`)):r.nil;return f.length&&(a=(0,r.or)(a,...f.map(o=>(0,r._)`${(0,t.usePattern)(e,o)}.test(${i})`))),(0,r.not)(a)}(i),()=>y(i)):y(i)}),e.ok((0,r._)`${c} === ${i.default.errors}`)}}}),x6=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xw(),r=x_(),i=xl(),o=x4();e.default={keyword:"properties",type:"object",schemaType:"object",code(e){let{gen:n,schema:a,parentSchema:s,data:d,it:c}=e;"all"===c.opts.removeAdditional&&void 0===s.additionalProperties&&o.default.code(new t.KeywordCxt(c,o.default,"additionalProperties"));let l=(0,r.allSchemaProperties)(a);for(let e of l)c.definedProperties.add(e);c.opts.unevaluated&&l.length&&!0!==c.props&&(c.props=i.mergeEvaluated.props(n,(0,i.toHash)(l),c.props));let p=l.filter(e=>!(0,i.alwaysValidSchema)(c,a[e]));if(0===p.length)return;let u=n.name("valid");for(let t of p){var m;(m=t,c.opts.useDefaults&&!c.compositeRule&&void 0!==a[m].default)?f(t):(n.if((0,r.propertyInData)(n,d,t,c.opts.ownProperties)),f(t),c.allErrors||n.else().var(u,!0),n.endIf()),e.it.definedProperties.add(t),e.ok(u)}function f(t){e.subschema({keyword:"properties",schemaProp:t,dataProp:t},u)}}}}),x3=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=x_(),r=xc(),i=xl(),o=xl();e.default={keyword:"patternProperties",type:"object",schemaType:"object",code(e){let{gen:n,schema:a,data:s,parentSchema:d,it:c}=e,{opts:l}=c,p=(0,t.allSchemaProperties)(a),u=p.filter(e=>(0,i.alwaysValidSchema)(c,a[e]));if(0===p.length||u.length===p.length&&(!c.opts.unevaluated||!0===c.props))return;let m=l.strictSchema&&!l.allowMatchingProperties&&d.properties,f=n.name("valid");!0===c.props||c.props instanceof r.Name||(c.props=(0,o.evaluatedPropsToName)(n,c.props));let{props:h}=c;for(let e of p)m&&function(e){for(let t in m)new RegExp(e).test(t)&&(0,i.checkStrictMode)(c,`property ${t} matches pattern ${e} (use allowMatchingProperties)`)}(e),c.allErrors?y(e):(n.var(f,!0),y(e),n.if(f));function y(i){n.forIn("key",s,a=>{n.if((0,r._)`${(0,t.usePattern)(e,i)}.test(${a})`,()=>{let t=u.includes(i);t||e.subschema({keyword:"patternProperties",schemaProp:i,dataProp:a,dataPropType:o.Type.Str},f),c.opts.unevaluated&&!0!==h?n.assign((0,r._)`${h}[${a}]`,!0):t||c.allErrors||n.if((0,r.not)(f),()=>n.break())})})}}}}),x9=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xl();e.default={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){let{gen:r,schema:i,it:o}=e;if((0,t.alwaysValidSchema)(o,i))return void e.fail();let n=r.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},n),e.failResult(n,()=>e.reset(),()=>e.error())},error:{message:"must NOT be valid"}}}),x5=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:x_().validateUnion,error:{message:"must match a schema in anyOf"}}}),x8=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xc(),r=xl();e.default={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:e})=>(0,t._)`{passingSchemas: ${e.passing}}`},code(e){let{gen:i,schema:o,parentSchema:n,it:a}=e;if(!Array.isArray(o))throw Error("ajv implementation error");if(a.opts.discriminator&&n.discriminator)return;let s=i.let("valid",!1),d=i.let("passing",null),c=i.name("_valid");e.setParams({passing:d}),i.block(function(){o.forEach((o,n)=>{let l;(0,r.alwaysValidSchema)(a,o)?i.var(c,!0):l=e.subschema({keyword:"oneOf",schemaProp:n,compositeRule:!0},c),n>0&&i.if((0,t._)`${c} && ${s}`).assign(s,!1).assign(d,(0,t._)`[${d}, ${n}]`).else(),i.if(c,()=>{i.assign(s,!0),i.assign(d,n),l&&e.mergeEvaluated(l,t.Name)})})}),e.result(s,()=>e.reset(),()=>e.error(!0))}}}),x7=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xl();e.default={keyword:"allOf",schemaType:"array",code(e){let{gen:r,schema:i,it:o}=e;if(!Array.isArray(i))throw Error("ajv implementation error");let n=r.name("valid");i.forEach((r,i)=>{if((0,t.alwaysValidSchema)(o,r))return;let a=e.subschema({keyword:"allOf",schemaProp:i},n);e.ok(n),e.mergeEvaluated(a)})}}}),je=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xc(),r=xl();function i(e,t){let i=e.schema[t];return void 0!==i&&!(0,r.alwaysValidSchema)(e,i)}e.default={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:e})=>(0,t.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,t._)`{failingKeyword: ${e.ifClause}}`},code(e){let o,{gen:n,parentSchema:a,it:s}=e;void 0===a.then&&void 0===a.else&&(0,r.checkStrictMode)(s,'"if" without "then" and "else" is ignored');let d=i(s,"then"),c=i(s,"else");if(!d&&!c)return;let l=n.let("valid",!0),p=n.name("_valid");if(o=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},p),e.mergeEvaluated(o),e.reset(),d&&c){let t=n.let("ifClause");e.setParams({ifClause:t}),n.if(p,u("then",t),u("else",t))}else d?n.if(p,u("then")):n.if((0,t.not)(p),u("else"));function u(r,i){return()=>{let o=e.subschema({keyword:r},p);n.assign(l,p),e.mergeValidEvaluated(o,l),i?n.assign(i,(0,t._)`${r}`):e.setParams({ifClause:r})}}e.pass(l,()=>e.error(!0))}}}),jt=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xl();e.default={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:r,it:i}){void 0===r.if&&(0,t.checkStrictMode)(i,`"${e}" without "if" is ignored`)}}}),jr=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xZ(),r=xX(),i=xQ(),o=xY(),n=x1(),a=x0(),s=x2(),d=x4(),c=x6(),l=x3(),p=x9(),u=x5(),m=x8(),f=x7(),h=je(),y=jt();e.default=function(e=!1){let g=[p.default,u.default,m.default,f.default,h.default,y.default,s.default,d.default,a.default,c.default,l.default];return e?g.push(r.default,o.default):g.push(t.default,i.default),g.push(n.default),g}}),ji=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xc();e.default={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>(0,t.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,t._)`{format: ${e}}`},code(e,r){let i,o,n,a,s,d,{gen:c,data:l,$data:p,schema:u,schemaCode:m,it:f}=e,{opts:h,errSchemaPath:y,schemaEnv:g,self:_}=f;h.validateFormats&&(p?(i=c.scopeValue("formats",{ref:_.formats,code:h.code.formats}),o=c.const("fDef",(0,t._)`${i}[${m}]`),n=c.let("fType"),a=c.let("format"),c.if((0,t._)`typeof ${o} == "object" && !(${o} instanceof RegExp)`,()=>c.assign(n,(0,t._)`${o}.type || "string"`).assign(a,(0,t._)`${o}.validate`),()=>c.assign(n,(0,t._)`"string"`).assign(a,o)),e.fail$data((0,t.or)(!1===h.strictSchema?t.nil:(0,t._)`${m} && !${a}`,(s=g.$async?(0,t._)`(${o}.async ? await ${a}(${l}) : ${a}(${l}))`:(0,t._)`${a}(${l})`,d=(0,t._)`(typeof ${a} == "function" ? ${s} : ${a}.test(${l}))`,(0,t._)`${a} && ${a} !== true && ${n} === ${r} && !${d}`)))):function(){var i;let o,n,a=_.formats[u];if(!a){if(!1===h.strictSchema)return _.logger.warn(s());throw Error(s());function s(){return`unknown format "${u}" ignored in schema at path "${y}"`}}if(!0===a)return;let[d,p,m]=(o=(i=a)instanceof RegExp?(0,t.regexpCode)(i):h.code.formats?(0,t._)`${h.code.formats}${(0,t.getProperty)(u)}`:void 0,n=c.scopeValue("formats",{key:u,ref:i,code:o}),"object"!=typeof i||i instanceof RegExp?["string",i,n]:[i.type||"string",i.validate,(0,t._)`${n}.validate`]);d===r&&e.pass(function(){if("object"==typeof a&&!(a instanceof RegExp)&&a.async){if(!g.$async)throw Error("async format in sync schema");return(0,t._)`await ${m}(${l})`}return"function"==typeof p?(0,t._)`${m}(${l})`:(0,t._)`${m}.test(${l})`}())}())}}}),jo=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=[ji().default]}),jn=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.contentVocabulary=e.metadataVocabulary=void 0,e.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],e.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]}),ja=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xA(),r=xJ(),i=jr(),o=jo(),n=jn();e.default=[t.default,r.default,(0,i.default)(),o.default,n.metadataVocabulary,n.contentVocabulary]}),js=SP(e=>{var t,r;Object.defineProperty(e,"__esModule",{value:!0}),e.DiscrError=void 0,(r=t||(e.DiscrError=t={})).Tag="tag",r.Mapping="mapping"}),jd=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xc(),r=js(),i=xV(),o=xP(),n=xl();e.default={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:e,tagName:t}})=>e===r.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:r,tagName:i}})=>(0,t._)`{error: ${e}, tag: ${i}, tagValue: ${r}}`},code(e){let{gen:a,data:s,schema:d,parentSchema:c,it:l}=e,{oneOf:p}=c;if(!l.opts.discriminator)throw Error("discriminator: requires discriminator option");let u=d.propertyName;if("string"!=typeof u)throw Error("discriminator: requires propertyName");if(d.mapping)throw Error("discriminator: mapping is not supported");if(!p)throw Error("discriminator: requires oneOf keyword");let m=a.let("valid",!1),f=a.const("tag",(0,t._)`${s}${(0,t.getProperty)(u)}`);a.if((0,t._)`typeof ${f} == "string"`,()=>(function(){let s=function(){var e;let t={},r=s(c),a=!0;for(let t=0;te.error(!1,{discrError:r.DiscrError.Tag,tag:f,tagName:u})),e.ok(m)}}}),jc=SP((e,t)=>{t.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}}),jl=SP((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.MissingRefError=e.ValidationError=e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=e.Ajv=void 0;let r=xT(),i=ja(),o=jd(),n=jc(),a=["/properties"],s="http://json-schema.org/draft-07/schema";var d=class extends r.default{_addVocabularies(){super._addVocabularies(),i.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(o.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let e=this.opts.$data?this.$dataMetaSchema(n,a):n;this.addMetaSchema(e,s,!1),this.refs["http://json-schema.org/schema"]=s}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(s)?s:void 0)}};e.Ajv=d,t.exports=e=d,t.exports.Ajv=d,Object.defineProperty(e,"__esModule",{value:!0}),e.default=d;var c=xw();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return c.KeywordCxt}});var l=xc();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return l._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return l.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return l.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return l.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return l.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return l.CodeGen}});var p=xR();Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return p.default}});var u=xP();Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return u.default}})}),jp=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.dynamicAnchor=void 0;let t=xc(),r=xp(),i=xV(),o=xE();function n(e,n){let{gen:a,it:s}=e;s.schemaEnv.root.dynamicAnchors[n]=!0;let d=(0,t._)`${r.default.dynamicAnchors}${(0,t.getProperty)(n)}`,c="#"===s.errSchemaPath?s.validateName:function(e){let{schemaEnv:t,schema:r,self:n}=e.it,{root:a,baseId:s,localRefs:d,meta:c}=t.root,{schemaId:l}=n.opts,p=new i.SchemaEnv({schema:r,schemaId:l,root:a,baseId:s,localRefs:d,meta:c});return i.compileSchema.call(n,p),(0,o.getValidate)(e,p)}(e);a.if((0,t._)`!${d}`,()=>a.assign(d,c))}e.dynamicAnchor=n,e.default={keyword:"$dynamicAnchor",schemaType:"string",code:e=>n(e,e.schema)}}),ju=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.dynamicRef=void 0;let t=xc(),r=xp(),i=xE();function o(e,o){let{gen:n,keyword:a,it:s}=e;if("#"!==o[0])throw Error(`"${a}" only supports hash fragment reference`);let d=o.slice(1);if(s.allErrors)c();else{let t=n.let("valid",!1);c(t),e.ok(t)}function c(e){if(s.schemaEnv.root.dynamicAnchors[d]){let i=n.let("_v",(0,t._)`${r.default.dynamicAnchors}${(0,t.getProperty)(d)}`);n.if(i,l(i,e),l(s.validateName,e))}else l(s.validateName,e)()}function l(t,r){return r?()=>n.block(()=>{(0,i.callRef)(e,t),n.let(r,!0)}):()=>(0,i.callRef)(e,t)}}e.dynamicRef=o,e.default={keyword:"$dynamicRef",schemaType:"string",code:e=>o(e,e.schema)}}),jm=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=jp(),r=xl();e.default={keyword:"$recursiveAnchor",schemaType:"boolean",code(e){e.schema?(0,t.dynamicAnchor)(e,""):(0,r.checkStrictMode)(e.it,"$recursiveAnchor: false is ignored")}}}),jf=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=ju();e.default={keyword:"$recursiveRef",schemaType:"string",code:e=>(0,t.dynamicRef)(e,e.schema)}}),jh=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=jp(),r=ju(),i=jm(),o=jf();e.default=[t.default,r.default,i.default,o.default]}),jy=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=x0();e.default={keyword:"dependentRequired",type:"object",schemaType:"object",error:t.error,code:e=>(0,t.validatePropertyDeps)(e)}}),jg=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=x0();e.default={keyword:"dependentSchemas",type:"object",schemaType:"object",code:e=>(0,t.validateSchemaDeps)(e)}}),j_=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xl();e.default={keyword:["maxContains","minContains"],type:"array",schemaType:"number",code({keyword:e,parentSchema:r,it:i}){void 0===r.contains&&(0,t.checkStrictMode)(i,`"${e}" without "contains" is ignored`)}}}),jv=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=jy(),r=jg(),i=j_();e.default=[t.default,r.default,i.default]}),jb=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xc(),r=xl(),i=xp();e.default={keyword:"unevaluatedProperties",type:"object",schemaType:["boolean","object"],trackErrors:!0,error:{message:"must NOT have unevaluated properties",params:({params:e})=>(0,t._)`{unevaluatedProperty: ${e.unevaluatedProperty}}`},code(e){let{gen:o,schema:n,data:a,errsCount:s,it:d}=e;if(!s)throw Error("ajv implementation error");let{allErrors:c,props:l}=d;function p(i){if(!1===n){e.setParams({unevaluatedProperty:i}),e.error(),c||o.break();return}if(!(0,r.alwaysValidSchema)(d,n)){let n=o.name("valid");e.subschema({keyword:"unevaluatedProperties",dataProp:i,dataPropType:r.Type.Str},n),c||o.if((0,t.not)(n),()=>o.break())}}l instanceof t.Name?o.if((0,t._)`${l} !== true`,()=>o.forIn("key",a,e=>{var r,i;return o.if((r=l,i=e,(0,t._)`!${r} || !${r}[${i}]`),()=>p(e))})):!0!==l&&o.forIn("key",a,e=>void 0===l?p(e):o.if(function(e,r){let i=[];for(let o in e)!0===e[o]&&i.push((0,t._)`${r} !== ${o}`);return(0,t.and)(...i)}(l,e),()=>p(e))),d.props=!0,e.ok((0,t._)`${s} === ${i.default.errors}`)}}}),j$=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xc(),r=xl();e.default={keyword:"unevaluatedItems",type:"array",schemaType:["boolean","object"],error:{message:({params:{len:e}})=>(0,t.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,t._)`{limit: ${e}}`},code(e){let{gen:i,schema:o,data:n,it:a}=e,s=a.items||0;if(!0===s)return;let d=i.const("len",(0,t._)`${n}.length`);if(!1===o)e.setParams({len:s}),e.fail((0,t._)`${d} > ${s}`);else if("object"==typeof o&&!(0,r.alwaysValidSchema)(a,o)){let o=i.var("valid",(0,t._)`${d} <= ${s}`);i.if((0,t.not)(o),()=>{var n,c;return n=o,c=s,void i.forRange("i",c,d,o=>{e.subschema({keyword:"unevaluatedItems",dataProp:o,dataPropType:r.Type.Num},n),a.allErrors||i.if((0,t.not)(n),()=>i.break())})}),e.ok(o)}a.items=!0}}}),jS=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=jb(),r=j$();e.default=[t.default,r.default]}),jk=SP((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/schema",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/core":!0,"https://json-schema.org/draft/2019-09/vocab/applicator":!0,"https://json-schema.org/draft/2019-09/vocab/validation":!0,"https://json-schema.org/draft/2019-09/vocab/meta-data":!0,"https://json-schema.org/draft/2019-09/vocab/format":!1,"https://json-schema.org/draft/2019-09/vocab/content":!0},$recursiveAnchor:!0,title:"Core and Validation specifications meta-schema",allOf:[{$ref:"meta/core"},{$ref:"meta/applicator"},{$ref:"meta/validation"},{$ref:"meta/meta-data"},{$ref:"meta/format"},{$ref:"meta/content"}],type:["object","boolean"],properties:{definitions:{$comment:"While no longer an official keyword as it is replaced by $defs, this keyword is retained in the meta-schema to prevent incompatible extensions as it remains in common use.",type:"object",additionalProperties:{$recursiveRef:"#"},default:{}},dependencies:{$comment:'"dependencies" is no longer a keyword, but schema authors should avoid redefining it to facilitate a smooth transition to "dependentSchemas" and "dependentRequired"',type:"object",additionalProperties:{anyOf:[{$recursiveRef:"#"},{$ref:"meta/validation#/$defs/stringArray"}]}}}}}),jw=SP((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/meta/applicator",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/applicator":!0},$recursiveAnchor:!0,title:"Applicator vocabulary meta-schema",type:["object","boolean"],properties:{additionalItems:{$recursiveRef:"#"},unevaluatedItems:{$recursiveRef:"#"},items:{anyOf:[{$recursiveRef:"#"},{$ref:"#/$defs/schemaArray"}]},contains:{$recursiveRef:"#"},additionalProperties:{$recursiveRef:"#"},unevaluatedProperties:{$recursiveRef:"#"},properties:{type:"object",additionalProperties:{$recursiveRef:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$recursiveRef:"#"},propertyNames:{format:"regex"},default:{}},dependentSchemas:{type:"object",additionalProperties:{$recursiveRef:"#"}},propertyNames:{$recursiveRef:"#"},if:{$recursiveRef:"#"},then:{$recursiveRef:"#"},else:{$recursiveRef:"#"},allOf:{$ref:"#/$defs/schemaArray"},anyOf:{$ref:"#/$defs/schemaArray"},oneOf:{$ref:"#/$defs/schemaArray"},not:{$recursiveRef:"#"}},$defs:{schemaArray:{type:"array",minItems:1,items:{$recursiveRef:"#"}}}}}),jR=SP((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/meta/content",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/content":!0},$recursiveAnchor:!0,title:"Content vocabulary meta-schema",type:["object","boolean"],properties:{contentMediaType:{type:"string"},contentEncoding:{type:"string"},contentSchema:{$recursiveRef:"#"}}}}),jP=SP((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/meta/core",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/core":!0},$recursiveAnchor:!0,title:"Core vocabulary meta-schema",type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference",$comment:"Non-empty fragments not allowed.",pattern:"^[^#]*#?$"},$schema:{type:"string",format:"uri"},$anchor:{type:"string",pattern:"^[A-Za-z][-A-Za-z0-9.:_]*$"},$ref:{type:"string",format:"uri-reference"},$recursiveRef:{type:"string",format:"uri-reference"},$recursiveAnchor:{type:"boolean",default:!1},$vocabulary:{type:"object",propertyNames:{type:"string",format:"uri"},additionalProperties:{type:"boolean"}},$comment:{type:"string"},$defs:{type:"object",additionalProperties:{$recursiveRef:"#"},default:{}}}}}),jV=SP((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/meta/format",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/format":!0},$recursiveAnchor:!0,title:"Format vocabulary meta-schema",type:["object","boolean"],properties:{format:{type:"string"}}}}),jq=SP((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/meta/meta-data",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/meta-data":!0},$recursiveAnchor:!0,title:"Meta-data vocabulary meta-schema",type:["object","boolean"],properties:{title:{type:"string"},description:{type:"string"},default:!0,deprecated:{type:"boolean",default:!1},readOnly:{type:"boolean",default:!1},writeOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0}}}}),jI=SP((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/meta/validation",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/validation":!0},$recursiveAnchor:!0,title:"Validation vocabulary meta-schema",type:["object","boolean"],properties:{multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/$defs/nonNegativeInteger"},minLength:{$ref:"#/$defs/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},maxItems:{$ref:"#/$defs/nonNegativeInteger"},minItems:{$ref:"#/$defs/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxContains:{$ref:"#/$defs/nonNegativeInteger"},minContains:{$ref:"#/$defs/nonNegativeInteger",default:1},maxProperties:{$ref:"#/$defs/nonNegativeInteger"},minProperties:{$ref:"#/$defs/nonNegativeIntegerDefault0"},required:{$ref:"#/$defs/stringArray"},dependentRequired:{type:"object",additionalProperties:{$ref:"#/$defs/stringArray"}},const:!0,enum:{type:"array",items:!0},type:{anyOf:[{$ref:"#/$defs/simpleTypes"},{type:"array",items:{$ref:"#/$defs/simpleTypes"},minItems:1,uniqueItems:!0}]}},$defs:{nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{$ref:"#/$defs/nonNegativeInteger",default:0},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}}}}),jx=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=jk(),r=jw(),i=jR(),o=jP(),n=jV(),a=jq(),s=jI(),d=["/properties"];e.default=function(e){return[t,r,i,o,c(this,n),a,c(this,s)].forEach(e=>this.addMetaSchema(e,void 0,!1)),this;function c(t,r){return e?t.$dataMetaSchema(r,d):r}}}),jj=SP((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.MissingRefError=e.ValidationError=e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=e.Ajv2019=void 0;let r=xT(),i=ja(),o=jh(),n=jv(),a=jS(),s=jd(),d=jx(),c="https://json-schema.org/draft/2019-09/schema";var l=class extends r.default{constructor(e={}){super({...e,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),this.addVocabulary(o.default),i.default.forEach(e=>this.addVocabulary(e)),this.addVocabulary(n.default),this.addVocabulary(a.default),this.opts.discriminator&&this.addKeyword(s.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();let{$data:e,meta:t}=this.opts;t&&(d.default.call(this,e),this.refs["http://json-schema.org/schema"]=c)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(c)?c:void 0)}};e.Ajv2019=l,t.exports=e=l,t.exports.Ajv2019=l,Object.defineProperty(e,"__esModule",{value:!0}),e.default=l;var p=xw();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return p.KeywordCxt}});var u=xc();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return u._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return u.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return u.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return u.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return u.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return u.CodeGen}});var m=xR();Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return m.default}});var f=xP();Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return f.default}})}),jC=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xA(),r=xJ(),i=jr(),o=jh(),n=jv(),a=jS(),s=jo(),d=jn();e.default=[o.default,t.default,r.default,(0,i.default)(!0),s.default,d.metadataVocabulary,d.contentVocabulary,n.default,a.default]}),jT=SP((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/schema",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/core":!0,"https://json-schema.org/draft/2020-12/vocab/applicator":!0,"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0,"https://json-schema.org/draft/2020-12/vocab/validation":!0,"https://json-schema.org/draft/2020-12/vocab/meta-data":!0,"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0,"https://json-schema.org/draft/2020-12/vocab/content":!0},$dynamicAnchor:"meta",title:"Core and Validation specifications meta-schema",allOf:[{$ref:"meta/core"},{$ref:"meta/applicator"},{$ref:"meta/unevaluated"},{$ref:"meta/validation"},{$ref:"meta/meta-data"},{$ref:"meta/format-annotation"},{$ref:"meta/content"}],type:["object","boolean"],$comment:"This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.",properties:{definitions:{$comment:'"definitions" has been replaced by "$defs".',type:"object",additionalProperties:{$dynamicRef:"#meta"},deprecated:!0,default:{}},dependencies:{$comment:'"dependencies" has been split and replaced by "dependentSchemas" and "dependentRequired" in order to serve their differing semantics.',type:"object",additionalProperties:{anyOf:[{$dynamicRef:"#meta"},{$ref:"meta/validation#/$defs/stringArray"}]},deprecated:!0,default:{}},$recursiveAnchor:{$comment:'"$recursiveAnchor" has been replaced by "$dynamicAnchor".',$ref:"meta/core#/$defs/anchorString",deprecated:!0},$recursiveRef:{$comment:'"$recursiveRef" has been replaced by "$dynamicRef".',$ref:"meta/core#/$defs/uriReferenceString",deprecated:!0}}}}),jO=SP((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/applicator",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/applicator":!0},$dynamicAnchor:"meta",title:"Applicator vocabulary meta-schema",type:["object","boolean"],properties:{prefixItems:{$ref:"#/$defs/schemaArray"},items:{$dynamicRef:"#meta"},contains:{$dynamicRef:"#meta"},additionalProperties:{$dynamicRef:"#meta"},properties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},patternProperties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},propertyNames:{format:"regex"},default:{}},dependentSchemas:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},propertyNames:{$dynamicRef:"#meta"},if:{$dynamicRef:"#meta"},then:{$dynamicRef:"#meta"},else:{$dynamicRef:"#meta"},allOf:{$ref:"#/$defs/schemaArray"},anyOf:{$ref:"#/$defs/schemaArray"},oneOf:{$ref:"#/$defs/schemaArray"},not:{$dynamicRef:"#meta"}},$defs:{schemaArray:{type:"array",minItems:1,items:{$dynamicRef:"#meta"}}}}}),jE=SP((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/unevaluated",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0},$dynamicAnchor:"meta",title:"Unevaluated applicator vocabulary meta-schema",type:["object","boolean"],properties:{unevaluatedItems:{$dynamicRef:"#meta"},unevaluatedProperties:{$dynamicRef:"#meta"}}}}),jA=SP((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/content",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/content":!0},$dynamicAnchor:"meta",title:"Content vocabulary meta-schema",type:["object","boolean"],properties:{contentEncoding:{type:"string"},contentMediaType:{type:"string"},contentSchema:{$dynamicRef:"#meta"}}}}),jM=SP((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/core",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/core":!0},$dynamicAnchor:"meta",title:"Core vocabulary meta-schema",type:["object","boolean"],properties:{$id:{$ref:"#/$defs/uriReferenceString",$comment:"Non-empty fragments not allowed.",pattern:"^[^#]*#?$"},$schema:{$ref:"#/$defs/uriString"},$ref:{$ref:"#/$defs/uriReferenceString"},$anchor:{$ref:"#/$defs/anchorString"},$dynamicRef:{$ref:"#/$defs/uriReferenceString"},$dynamicAnchor:{$ref:"#/$defs/anchorString"},$vocabulary:{type:"object",propertyNames:{$ref:"#/$defs/uriString"},additionalProperties:{type:"boolean"}},$comment:{type:"string"},$defs:{type:"object",additionalProperties:{$dynamicRef:"#meta"}}},$defs:{anchorString:{type:"string",pattern:"^[A-Za-z_][-A-Za-z0-9._]*$"},uriString:{type:"string",format:"uri"},uriReferenceString:{type:"string",format:"uri-reference"}}}}),jW=SP((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/format-annotation",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0},$dynamicAnchor:"meta",title:"Format vocabulary meta-schema for annotation results",type:["object","boolean"],properties:{format:{type:"string"}}}}),jN=SP((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/meta-data",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/meta-data":!0},$dynamicAnchor:"meta",title:"Meta-data vocabulary meta-schema",type:["object","boolean"],properties:{title:{type:"string"},description:{type:"string"},default:!0,deprecated:{type:"boolean",default:!1},readOnly:{type:"boolean",default:!1},writeOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0}}}}),jz=SP((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/validation",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/validation":!0},$dynamicAnchor:"meta",title:"Validation vocabulary meta-schema",type:["object","boolean"],properties:{type:{anyOf:[{$ref:"#/$defs/simpleTypes"},{type:"array",items:{$ref:"#/$defs/simpleTypes"},minItems:1,uniqueItems:!0}]},const:!0,enum:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/$defs/nonNegativeInteger"},minLength:{$ref:"#/$defs/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},maxItems:{$ref:"#/$defs/nonNegativeInteger"},minItems:{$ref:"#/$defs/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxContains:{$ref:"#/$defs/nonNegativeInteger"},minContains:{$ref:"#/$defs/nonNegativeInteger",default:1},maxProperties:{$ref:"#/$defs/nonNegativeInteger"},minProperties:{$ref:"#/$defs/nonNegativeIntegerDefault0"},required:{$ref:"#/$defs/stringArray"},dependentRequired:{type:"object",additionalProperties:{$ref:"#/$defs/stringArray"}}},$defs:{nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{$ref:"#/$defs/nonNegativeInteger",default:0},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}}}}),jD=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=jT(),r=jO(),i=jE(),o=jA(),n=jM(),a=jW(),s=jN(),d=jz(),c=["/properties"];e.default=function(e){return[t,r,i,o,n,l(this,a),s,l(this,d)].forEach(e=>this.addMetaSchema(e,void 0,!1)),this;function l(t,r){return e?t.$dataMetaSchema(r,c):r}}}),jF=SP((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.MissingRefError=e.ValidationError=e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=e.Ajv2020=void 0;let r=xT(),i=jC(),o=jd(),n=jD(),a="https://json-schema.org/draft/2020-12/schema";var s=class extends r.default{constructor(e={}){super({...e,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),i.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(o.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();let{$data:e,meta:t}=this.opts;t&&(n.default.call(this,e),this.refs["http://json-schema.org/schema"]=a)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(a)?a:void 0)}};e.Ajv2020=s,t.exports=e=s,t.exports.Ajv2020=s,Object.defineProperty(e,"__esModule",{value:!0}),e.default=s;var d=xw();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return d.KeywordCxt}});var c=xc();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return c._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return c.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return c.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return c.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return c.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return c.CodeGen}});var l=xR();Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return l.default}});var p=xP();Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return p.default}})}),jL=SP(e=>{function t(e,t){return{validate:e,compare:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.formatNames=e.fastFormats=e.fullFormats=void 0,e.fullFormats={date:t(o,n),time:t(s(!0),d),"date-time":t(p(!0),u),"iso-time":t(s(),c),"iso-date-time":t(p(),m),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:function(e){return f.test(e)&&h.test(e)},"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:function(e){if(b.test(e))return!1;try{return new RegExp(e),!0}catch(e){return!1}},uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:function(e){return y.lastIndex=0,y.test(e)},int32:{type:"number",validate:function(e){return Number.isInteger(e)&&e<=_&&e>=g}},int64:{type:"number",validate:function(e){return Number.isInteger(e)}},float:{type:"number",validate:v},double:{type:"number",validate:v},password:!0,binary:!0},e.fastFormats={...e.fullFormats,date:t(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,n),time:t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,d),"date-time":t(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,u),"iso-time":t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,c),"iso-date-time":t(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,m),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},e.formatNames=Object.keys(e.fullFormats);let r=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,i=[0,31,28,31,30,31,30,31,31,30,31,30,31];function o(e){var t;let o=r.exec(e);if(!o)return!1;let n=+o[1],a=+o[2],s=+o[3];return a>=1&&a<=12&&s>=1&&s<=(2===a&&(t=n)%4==0&&(t%100!=0||t%400==0)?29:i[a])}function n(e,t){if(e&&t)return e>t?1:e23||l>59||e&&!s)return!1;if(i<=23&&o<=59&&n<60)return!0;let p=o-l*d,u=i-c*d-(p<0);return(23===u||-1===u)&&(59===p||-1===p)&&n<61}}function d(e,t){if(!(e&&t))return;let r=(new Date("2020-01-01T"+e)).valueOf(),i=(new Date("2020-01-01T"+t)).valueOf();if(r&&i)return r-i}function c(e,t){if(!(e&&t))return;let r=a.exec(e),i=a.exec(t);if(r&&i)return(e=r[1]+r[2]+r[3])>(t=i[1]+i[2]+i[3])?1:e{Object.defineProperty(e,"__esModule",{value:!0}),e.formatLimitDefinition=void 0;let t=jl(),r=xc(),i=r.operators,o={formatMaximum:{okStr:"<=",ok:i.LTE,fail:i.GT},formatMinimum:{okStr:">=",ok:i.GTE,fail:i.LT},formatExclusiveMaximum:{okStr:"<",ok:i.LT,fail:i.GTE},formatExclusiveMinimum:{okStr:">",ok:i.GT,fail:i.LTE}};e.formatLimitDefinition={keyword:Object.keys(o),type:"string",schemaType:"string",$data:!0,error:{message:({keyword:e,schemaCode:t})=>(0,r.str)`should be ${o[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,r._)`{comparison: ${o[e].okStr}, limit: ${t}}`},code(e){let i,n,{gen:a,data:s,schemaCode:d,keyword:c,it:l}=e,{opts:p,self:u}=l;if(!p.validateFormats)return;let m=new t.KeywordCxt(l,u.RULES.all.format.definition,"format");function f(e){return(0,r._)`${e}.compare(${s}, ${d}) ${o[c].fail} 0`}m.$data?(i=a.scopeValue("formats",{ref:u.formats,code:p.code.formats}),n=a.const("fmt",(0,r._)`${i}[${m.schemaCode}]`),e.fail$data((0,r.or)((0,r._)`typeof ${n} != "object"`,(0,r._)`${n} instanceof RegExp`,(0,r._)`typeof ${n}.compare != "function"`,f(n)))):function(){let t=m.schema,i=u.formats[t];if(!i||!0===i)return;if("object"!=typeof i||i instanceof RegExp||"function"!=typeof i.compare)throw Error(`"${c}": format "${t}" does not define "compare" function`);let o=a.scopeValue("formats",{key:t,ref:i,code:p.code.formats?(0,r._)`${p.code.formats}${(0,r.getProperty)(t)}`:void 0});e.fail$data(f(o))}()},dependencies:["format"]},e.default=t=>(t.addKeyword(e.formatLimitDefinition),t)}),jH=SP((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0});let r=jL(),i=jU(),o=xc(),n=new o.Name("fullFormats"),a=new o.Name("fastFormats"),s=(e,t={keywords:!0})=>{if(Array.isArray(t))return d(e,t,r.fullFormats,n),e;let[o,s]="fast"===t.mode?[r.fastFormats,a]:[r.fullFormats,n];return d(e,t.formats||r.formatNames,o,s),t.keywords&&(0,i.default)(e),e};function d(e,t,r,i){var n;for(let a of(null!=(n=e.opts.code).formats||(n.formats=(0,o._)`require("ajv-formats/dist/formats").${i}`),t))e.addFormat(a,r[a])}s.get=(e,t="full")=>{let i=("fast"===t?r.fastFormats:r.fullFormats)[e];if(!i)throw Error(`Unknown format "${e}"`);return i},t.exports=e=s,Object.defineProperty(e,"__esModule",{value:!0}),e.default=s}),jG=jl(),jB=jj(),jK=jF();let jJ=((e,t,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(var i,o=Sk(t),n=0,a=o.length;nt[e]).bind(null,i),enumerable:!(r=SS(t,i))||r.enumerable});return e})(S$(null!=(w=jH())?Sb(Sw(w)):{},"default",{value:w,enumerable:!0}),w).default;function jZ(e){let t=new e({strict:!1,validateFormats:!0,validateSchema:!1,allErrors:!0});return jJ(t),t}var jQ=class{_ajv;_ajvDraft7;_ajv2019;_userAjv;constructor(e){this._userAjv=void 0!==e,this._ajv=e}get ajv(){return this._ajv??=jZ(jK.Ajv2020)}_engineFor(e){if(this._userAjv)return this.ajv;let t=function(e,t){if(!("$schema"in e)||"string"!=typeof e.$schema)return"2020-12";let r=e.$schema.replace(/#$/,"");if(SV.has(r))return"2020-12";if(Sq.has(r))return"2019-09";if(SI.has(r)||Sx.has(r))return"draft-7";throw Error(`JSON Schema declares an unsupported dialect ("$schema": "${e.$schema.slice(0,200)}"). The default validator supports JSON Schema 2020-12, 2019-09, draft-07, and draft-06; ${t}`)}(e,"pass a pre-configured Ajv instance to AjvJsonSchemaValidator(ajv) to validate other dialects.");return"2020-12"===t?this.ajv:"2019-09"===t?this._ajv2019??=jZ(jB.Ajv2019):this._ajvDraft7??=jZ(jG.Ajv)}getValidator(e){let t=this._engineFor(e),r="$id"in e&&"string"==typeof e.$id?t.getSchema(e.$id)??t.compile(e):t.compile(e);return e=>r(e)?{valid:!0,data:e,errorMessage:void 0}:{valid:!1,data:void 0,errorMessage:t.errorsText(r.errors)}}};jG.Ajv,globalThis.crypto?.webcrypto??globalThis.crypto??import("node:crypto").then(e=>e.webcrypto);var jX=class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.OAuthClientFlowError"})}static[Symbol.hasInstance](e){return Rq(this,e)}static isInstance(e){if("function"!=typeof this)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return Rq(this,e)}constructor(e){super(e),this.name=new.target.name,RV(this,new.target)}};(class extends jX{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.IssuerMismatchError"})}kind;expected;received;constructor(e,t,r){super(`Issuer mismatch in ${"metadata"===e?"authorization server metadata (RFC 8414 \xa73.3)":"authorization response (RFC 9207)"}: expected ${JSON.stringify(t)}, received ${JSON.stringify(r)}`),this.kind=e,this.expected=t,this.received=r}}),(class extends jX{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.RegistrationRejectedError"})}status;body;submittedMetadata;constructor(e){super(`Dynamic Client Registration rejected (HTTP ${e.status}): ${e.body}`),this.status=e.status,this.body=e.body,this.submittedMetadata=e.submittedMetadata}}),(class extends jX{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.InsecureTokenEndpointError"})}tokenEndpoint;constructor(e){super(`Refusing to send credentials to non-https token endpoint '${e}'. OAuth token requests MUST use TLS (localhost / *.localhost / 127.0.0.1 / ::1 are exempt).`),this.tokenEndpoint=e}}),(class extends jX{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.AuthorizationServerMismatchError"})}constructor(e,t){super(`Authorization server mismatch: credentials are bound to ${JSON.stringify(e)} but this call resolved ${JSON.stringify(t)}; refusing to present them to a different authorization server`),this.recordedIssuer=e,this.currentIssuer=t}}),class extends jX{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.InsufficientScopeError"})}requiredScope;resourceMetadataUrl;errorDescription;constructor(e){super(`Insufficient scope${e.requiredScope?`: required "${e.requiredScope}"`:""}`),this.requiredScope=e.requiredScope,this.resourceMetadataUrl=e.resourceMetadataUrl,this.errorDescription=e.errorDescription}};var jY=class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.UnauthorizedError"})}static[Symbol.hasInstance](e){return Rq(this,e)}static isInstance(e){if("function"!=typeof this)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return Rq(this,e)}constructor(e){super(e??"Unauthorized"),this.name="UnauthorizedError",RV(this,new.target)}};let j1=new Set(["tools/list","prompts/list","resources/list","resources/templates/list","server/discover"]);var j0=class{_entries=new Map;_maxEntries;_stamp=0;_cappedSize=0;constructor(e){this._maxEntries=e?.maxEntries??512}get size(){return this._entries.size}get(e){return this._entries.get(j2(e))}set(e,t){let r=j2(e),i=j1.has(e.method),o=!this._entries.has(r);if(!i&&o&&this._maxEntries>0&&this._cappedSize>=this._maxEntries){for(let e of this._entries.keys())if(!j1.has(e.slice(0,e.indexOf("\0")))){this._entries.delete(e),this._cappedSize--;break}}let n=++this._stamp;return this._entries.set(r,{...t,stamp:n}),o&&!i&&this._cappedSize++,n}delete(e){this._entries.delete(j2(e))&&!j1.has(e.method)&&this._cappedSize--}evict(e){let t=`${e}\0`,r=j1.has(e);for(let e of this._entries.keys())e.startsWith(t)&&(this._entries.delete(e),!r&&this._cappedSize--)}clear(){this._entries.clear(),this._cappedSize=0}};function j2(e){return`${e.method}\0${JSON.stringify([e.partition??"",e.params??""])}`}function j4(e,t){return void 0===t?e:`${e}\0${t}`}var j6=class{_evictionGeneration=new Map;_toolIndex;_toolOutputValidatorIndex;_serverIdentity="";constructor(e,t,r=()=>{},i="",o=Date.now){this._store=e,this._isUserSupplied=t,this._reportError=r,this._cachePartition=i,this._now=o}now(){return this._now()}setServerIdentity(e){this._serverIdentity=e}_partitionFor(e){return JSON.stringify([this._serverIdentity,"public"===e?"":this._cachePartition])}async _probe(e,t){let r={method:e,params:t??""},i=this._partitionFor("private"),o=await this._store.get({...r,partition:i});if(void 0!==o)return o;let n=this._partitionFor("public");if(n===i)return;let a=await this._store.get({...r,partition:n});return a?.scope==="public"?a:void 0}async evict(e){this._evictionGeneration.set(e,(this._evictionGeneration.get(e)??0)+1),await this._deleteBoth(e,"")}async _deleteBoth(e,t){let r=this._partitionFor("private"),i=this._partitionFor("public");try{await this._store.delete({method:e,params:t,partition:r})}catch(e){this._reportError(e)}if(i!==r)try{await this._store.delete({method:e,params:t,partition:i})}catch(e){this._reportError(e)}}async evictKey(e,t){let r=j4(e,t),i=this._evictionGeneration.get(r);void 0!==i&&this._evictionGeneration.set(r,i+1),await this._deleteBoth(e,t)}captureGeneration(e,t){let r=j4(e,t),i=this._evictionGeneration.get(r)??0;return this._evictionGeneration.set(r,i),i}async write(e,t,r,i){if((this._evictionGeneration.get(j4(e,i?.params))??0)!==r)return;let o=i?.params??"",n=this._partitionFor("private"),a=this._partitionFor("public"),s=(i?.scope??"private")==="public"?a:n;try{await this._store.set({method:e,params:o,partition:s},{value:function(e){let t;try{t=JSON.stringify(e)}catch(e){throw TypeError(`cache value is not JSON-serializable: ${e instanceof Error?e.message:String(e)}`)}if("string"!=typeof t)throw TypeError("cache value is not JSON-serializable: it has no JSON representation");return t}(t),expiresAt:i?.expiresAt,scope:i?.scope})}catch(e){this._reportError(e)}if(a!==n)try{await this._store.delete({method:e,params:o,partition:s===n?a:n})}catch(e){this._reportError(e)}}async read(e,t){let r=await this._probe(e,t);if(r?.expiresAt!==void 0&&r.expiresAt>this.now())try{let e=JSON.parse(r.value);if("object"!=typeof e||null===e||Array.isArray(e))throw TypeError("cached document is not an object");return{value:e}}catch(r){this._reportError(r),await this._deleteBoth(e,t??"");return}}resetForReconnect(){this._isUserSupplied||this._store.clear(),this._evictionGeneration.clear(),this._toolIndex=void 0,this._toolOutputValidatorIndex=void 0,this._serverIdentity=""}async toolDefinition(e){let t=await this._probe("tools/list");if(void 0===t){this._toolIndex=void 0;return}if(this._toolIndex?.stamp!==t.stamp){let e=this._decodeListTools(t),r=new Map;if(void 0!==e)for(let t of e.tools)r.set(t.name,t);this._toolIndex={stamp:t.stamp,byName:r}}return this._toolIndex.byName.get(e)}async outputValidator(e,t){let r=await this._probe("tools/list");if(void 0===r){this._toolOutputValidatorIndex=void 0;return}if(this._toolOutputValidatorIndex?.stamp!==r.stamp){let e=this._decodeListTools(r)??{tools:[]},i=new Map;for(let r of e.tools){let e=t(r);void 0!==e&&i.set(r.name,e)}this._toolOutputValidatorIndex={stamp:r.stamp,byName:i}}return this._toolOutputValidatorIndex.byName.get(e)}_decodeListTools(e){try{let t=JSON.parse(e.value);if(!Array.isArray(t?.tools)||!t.tools.every(e=>null!==e&&"object"==typeof e))throw TypeError("cached tools/list document has a malformed tools array");return t}catch(e){this._reportError(e);return}}};let j3=Symbol.for("mcp.authSeamEscape"),j9=new Set([-32001,-32020,-32021]);function j5(e,t){let{code:r,message:i,data:o}=e;if(-32022===r){let e=function(e){if("object"!=typeof e||null===e)return;let t=e.supported;if(Array.isArray(t)&&0!==t.length&&t.every(e=>"string"==typeof e))return t}(o);if(void 0===e)return{kind:"legacy"};let r=new Pe({supported:e,requested:function(e){if("object"!=typeof e||null===e)return;let t=e.requested;return"string"==typeof t?t:void 0}(o)??t.requestedVersion},i),n=RE(e),a=t.clientModernVersions.find(e=>n.includes(e));return void 0!==a?{kind:"corrective",version:a,error:r}:n.length>0?{kind:"error",error:r}:t.fallbackAvailable?{kind:"legacy"}:{kind:"error",error:r}}return j9.has(r),{kind:"legacy"}}function j8(e,t){var r;return"browser"===t.environment&&((r=e)instanceof TypeError||r instanceof Error&&"TypeError"===r.name)?{kind:"legacy"}:{kind:"error",error:new Rx(RI.EraNegotiationFailed,`Version negotiation probe failed: ${j7(e)}`,{cause:e},{cause:e})}}function j7(e){return e instanceof Error?e.message:String(e)}function Ce(){let e=globalThis;return void 0!==e.window&&void 0!==e.document?"browser":"node"}function Ct(e){return"stderr"in e&&"pid"in e?"stdio":"http"}var Cr=class e{_pending;_probeCounter=0;_savedOnMessage;_savedOnError;_savedOnClose;_closeDelivered=!1;constructor(e){this._transport=e,this._savedOnMessage=e.onmessage,this._savedOnError=e.onerror,this._savedOnClose=e.onclose}static async open(t){let r=new e(t);t.onmessage=e=>{let t=r._pending;if(void 0!==t&&(S2.safeParse(e).success||S4.safeParse(e).success)&&e.id===t.id){r._pending=void 0,S2.safeParse(e).success?t.resolve({kind:"response",result:e.result}):t.resolve({kind:"response",error:e.error});return}},t.onerror=e=>{r._savedOnError?.(e)},t.onclose=()=>{let e=r._pending;void 0!==e&&(r._pending=void 0,e.resolve({kind:"closed"})),r._closeDelivered=!0,r._savedOnClose?.()};try{await t.start()}catch(e){throw r.detach(),e}return r}async exchange(e,t){let r=`server-discover-probe-${++this._probeCounter}`;return new Promise(i=>{let o=!1,n=e=>{o||(o=!0,clearTimeout(a),this._pending?.id===r&&(this._pending=void 0),i(e))},a=setTimeout(()=>n({kind:"timeout"}),t);this._pending={id:r,resolve:n},this._transport.send(e(r)).catch(e=>n({kind:"send-error",error:e}))})}detach(){if(this._pending=void 0,this._transport.onmessage=this._savedOnMessage,this._transport.onerror=this._savedOnError,this._closeDelivered&&void 0!==this._savedOnClose){let e=this._savedOnClose,t=this._transport,r=!1,i=()=>{if(!r){r=!0;return}e()};t.onclose=i,Ci.set(t,()=>{t.onclose===i&&(t.onclose=e)})}else this._transport.onclose=this._savedOnClose}release(){this.detach();let e=this._transport,t=e.start,r=!0;e.start=async function(){if(r){r=!1,e.start=t;return}return t.call(e)}}};let Ci=new WeakMap;function Co(e){let t=Ci.get(e);Ci.delete(e),t?.()}async function Cn(e,t){let r,i=e.probe.timeoutMs??t.defaultTimeoutMs,o=Math.max(0,e.probe.maxRetries??0),n="pin"===e.kind?[e.version]:e.modernVersions,a="auto"===e.kind&&e.fallbackAvailable,s=await Cr.open(t.transport);try{r=await (async()=>{let r=n[0],d=!1,c=o;for(;;){let o=await s.exchange(e=>{var i,o,n;return i=r,o=t.clientInfo,n=t.capabilities,{jsonrpc:"2.0",id:e,method:"server/discover",params:{_meta:Pg(i).outboundEnvelope({protocolVersion:i,clientInfo:o,clientCapabilities:n})}}},i);if("timeout"===o.kind&&c>0){c--;continue}let l=function(e,t){switch(e.kind){case"response":return void 0===e.error?{kind:"result",result:e.result}:{kind:"rpc-error",...e.error};case"send-error":{let t=e.error;if(("object"==typeof t&&null!==t||"function"==typeof t)&&!0===t[j3]||t instanceof jY||t instanceof Error&&"UnauthorizedError"===t.name)return{kind:"auth-required",error:t};if(t instanceof Rj){let e=t.data?.text;return{kind:"http-error",status:t.data.status,body:"string"==typeof e?e:void 0,statusText:t.data.statusText}}if(t instanceof Rx&&t.code===RI.ClientHttpUnexpectedContent||t instanceof Error&&"SyntaxError"===t.name)return{kind:"unusable-reply",error:t};return{kind:"network-error",error:t}}case"closed":return{kind:"closed"};case"timeout":return{kind:"timeout",timeoutMs:t}}}(o,i),p=function(e,t){switch(e.kind){case"result":return function(e,t){let r=Pg(Py).validateResult("server/discover",e);if(!r.ok)return{kind:"legacy"};let i=r.value.supportedVersions,o=t.clientModernVersions.find(e=>i.includes(e));return void 0!==o?{kind:"modern",version:o,discover:r.value}:t.fallbackAvailable?{kind:"legacy"}:{kind:"error",error:new Pe({supported:[...i],requested:t.requestedVersion})}}(e.result,t);case"rpc-error":return j5(e,t);case"http-error":return function(e,t){if(401===e.status||403===e.status){let t=403===e.status;return{kind:"error",error:new Rj(t?RI.ClientHttpForbidden:RI.ClientHttpAuthentication,`Version negotiation failed: ${t?"the server denied access (HTTP 403)":"the server requires authorization (HTTP 401)"}`,{status:e.status,statusText:e.statusText,text:e.body})}}if(e.status>=500)return{kind:"error",error:new Rj(RI.EraNegotiationFailed,`Version negotiation failed: the server answered the probe with HTTP ${e.status}`,{status:e.status,statusText:e.statusText,text:e.body})};let r=function(e){let t;if(void 0===e||""===e)return;try{t=JSON.parse(e)}catch{return}if("object"!=typeof t||null===t)return;let r=t.error;if("object"!=typeof r||null===r)return;let{code:i,message:o,data:n}=r;if("number"==typeof i)return{code:i,message:"string"==typeof o?o:"",data:n}}(e.body);return void 0!==r?j5(r,t):{kind:"legacy"}}(e,t);case"network-error":return j8(e.error,t);case"unusable-reply":return{kind:"error",error:new Rx(RI.EraNegotiationFailed,`Version negotiation probe failed: the server answered with an unusable reply (${j7(e.error)})`,{cause:e.error},{cause:e.error})};case"auth-required":return{kind:"error",error:e.error};case"closed":if("stdio"===t.transportKind)return{kind:"legacy"};return j8(Error("Connection closed during the version negotiation probe"),t);case"timeout":if("stdio"===t.transportKind)return{kind:"legacy"};return{kind:"error",error:new Rx(RI.RequestTimeout,`Version negotiation probe timed out after ${e.timeoutMs}ms`,{timeout:e.timeoutMs})}}}(l,{clientModernVersions:n,requestedVersion:r,fallbackAvailable:a,environment:t.environment,transportKind:t.transportKind});switch(p.kind){case"modern":return{era:"modern",version:p.version,discover:p.discover};case"corrective":if(d)throw p.error;d=!0,r=p.version;continue;case"legacy":{let r="closed"===l.kind?"the connection closed during the server/discover probe":void 0;if("pin"===e.kind)throw new Rx(RI.EraNegotiationFailed,void 0===r?`Version negotiation failed: the server did not offer pinned protocol version ${e.version} via server/discover (no fallback in pin mode)`:`Version negotiation failed: ${r} before the server offered pinned protocol version ${e.version} (no fallback in pin mode)`);if(!e.fallbackAvailable)throw new Rx(RI.EraNegotiationFailed,void 0===r?"Version negotiation failed: the server gave no modern evidence and this client supports no pre-2026-07-28 protocol version to fall back to":`Version negotiation failed: ${r} and this client supports no pre-2026-07-28 protocol version to fall back to`);if(void 0!==r&&!0!==t.disposableProbe)throw new Rx(RI.EraNegotiationFailed,`Version negotiation failed: ${r} (this transport probed in place — the disposable sibling probe requires the SDK's base StdioClientTransport)`);return{era:"legacy"}}case"error":throw p.error}}})()}catch(e){throw s.detach(),e}return s.release(),r}function Ca(){return new Rx(RI.EraNegotiationFailed,"Version negotiation failed: the transport was closed during the server/discover probe")}function Cs(e){let t=e._meta?.[SO];return PK.Implementation(t)?t:void 0}let Cd={"notifications/tools/list_changed":["tools/list"],"notifications/prompts/list_changed":["prompts/list"],"notifications/resources/list_changed":["resources/list","resources/templates/list"]};var Cc=class extends P1{_serverCapabilities;_serverVersion;_capabilities;_instructions;_jsonSchemaValidator;_cache;_defaultCacheTtlMs;_listMaxPages;_listChangedDebounceTimers=new Map;_listChangedConfig;_enforceStrictCapabilities;_versionNegotiation;_supportedProtocolVersionsOption;_inputRequiredDriverConfig;_listenState=new Map;_nextListenId=0;_autoOpenedSubscription;_discoverResult;_resetConnectionState(){if(this._negotiatedProtocolVersion=void 0,this._serverCapabilities=void 0,this._serverVersion=void 0,this._instructions=void 0,this._discoverResult=void 0,this._autoOpenedSubscription=void 0,this._listenState.size>0){let e=new Rx(RI.ConnectionClosed,"subscriptions/listen: client reconnected or closed; subscription state from the previous connection was reset");for(let t of this._listenState.values())t.settle({cause:"remote",error:e})}for(let e of(this._listenState.clear(),this._listChangedDebounceTimers.values()))clearTimeout(e);this._listChangedDebounceTimers.clear(),this._cache.resetForReconnect()}async close(){try{await super.close()}finally{this._resetConnectionState()}}constructor(e,t){var r;super(t),this._clientInfo=e,this._capabilities=t?.capabilities?{...t.capabilities}:{},this._jsonSchemaValidator=t?.jsonSchemaValidator??new jQ,this._enforceStrictCapabilities=t?.enforceStrictCapabilities??!1,this._versionNegotiation=t?.versionNegotiation,this._supportedProtocolVersionsOption=t?.supportedProtocolVersions,this._inputRequiredDriverConfig=(r=t?.inputRequired,{autoFulfill:r?.autoFulfill??!0,maxRounds:r?.maxRounds??10}),this._cache=new j6(t?.responseCacheStore??new j0,t?.responseCacheStore!==void 0,e=>this._reportStoreError(e),t?.cachePartition??""),this._defaultCacheTtlMs=t?.defaultCacheTtlMs??0,this._listMaxPages=t?.listMaxPages??64,t?.listChanged&&(this._listChangedConfig=t.listChanged)}buildContext(e,t){return e}_shouldDropInbound(e){if(void 0!==this._negotiatedProtocolVersion&&this._negotiatedProtocolVersion>=RC&&S1.safeParse(e).success)return"drop"}_outboundMetaEnvelope(){let e=this._negotiatedProtocolVersion;if(void 0!==e)return this._wireCodec().outboundEnvelope({protocolVersion:e,clientInfo:this._clientInfo,clientCapabilities:this._capabilities})}_resolveNonCompleteResult(e,t){return this._inputRequiredDriverConfig.autoFulfill?function(e,t,r,i){let{codec:o,request:n,options:a,flowStartedAt:s}=i,d={inputRequests:r.inputRequests,...void 0!==r.requestState&&{requestState:r.requestState}};return async function(e){let{config:t,method:r,originalParams:i,requestOptions:o,hooks:n,signal:a}=e,s=e.flowStartedAt??Date.now(),d=e.firstPayload,c=0;for(;;){let e;if((c+=1)>t.maxRounds){var l;throw new Rx(RI.InputRequiredRoundsExceeded,(l=t.maxRounds,`Multi-round-trip request '${r}' still required input after ${l} rounds (inputRequired.maxRounds)`),{rounds:t.maxRounds,lastResult:{inputRequests:d.inputRequests,...void 0!==d.requestState&&{requestState:d.requestState}}})}o.onprogress?.({progress:c,message:`Fulfilling input required by '${r}' (round ${c})`});let p=Object.entries(d.inputRequests??{});if(p.length>0){let t=function(e){let t=new AbortController,r=()=>t.abort(e?.reason);return e?.addEventListener("abort",r,{once:!0}),e?.aborted&&t.abort(e.reason),{signal:t.signal,abort:e=>t.abort(e),dispose:()=>e?.removeEventListener("abort",r)}}(a);try{let r=await Promise.all(p.map(async([e,r])=>{try{return[e,await n.dispatchInputRequest(e,r,t.signal)]}catch(e){throw t.abort(e),e}}));e=Object.fromEntries(r)}finally{t.dispose()}}else await function(e){return new Promise((t,r)=>{if(e?.aborted)return void r(e.reason instanceof Rx?e.reason:new Rx(RI.RequestTimeout,String(e.reason)));let i=setTimeout(()=>{e?.removeEventListener("abort",o),t()},250),o=()=>{clearTimeout(i),r(e?.reason instanceof Rx?e.reason:new Rx(RI.RequestTimeout,String(e?.reason)))};e?.addEventListener("abort",o,{once:!0})})}(a);let u={...void 0!==o.timeout&&{timeout:o.timeout}};if(void 0!==o.maxTotalTimeout){let e=Date.now()-s,t=o.maxTotalTimeout-e;if(t<=0)throw new Rx(RI.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:o.maxTotalTimeout,totalElapsed:e});u.maxTotalTimeout=t}let m=await n.retry(function(e,t,r){let i=void 0!==t&&Object.keys(t).length>0;return i||void 0!==r?{...e,...i&&{inputResponses:t},...void 0!==r&&{requestState:r}}:e}(i,e,d.requestState),u);if(Pw(m)){d={inputRequests:m.inputRequests??{},...void 0!==m.requestState&&{requestState:m.requestState}};continue}return m}}({config:t,method:n.method,originalParams:n.params,firstPayload:d,flowStartedAt:s,signal:a?.signal,requestOptions:{...a?.timeout!==void 0&&{timeout:a.timeout},...a?.maxTotalTimeout!==void 0&&{maxTotalTimeout:a.maxTotalTimeout},...a?.onprogress!==void 0&&{onprogress:a.onprogress}},hooks:{dispatchInputRequest:(t,r,i)=>(async function(e,t,r,i,o){var n;if(!P2(i)||"string"!=typeof i.method)throw new Rx(RI.InvalidResult,`Invalid input request '${r}': each inputRequests entry must be an embedded request object with a method`,{key:r});let a=i.method;if(!t.hasInputRequestMethod(a))throw new Rx(RI.InvalidResult,`Invalid input request '${r}': '${a}' is not an embedded request the ${t.era} revision defines (expected elicitation/create, sampling/createMessage, or roots/list)`,{key:r,method:a});let s=e.getRequestHandler(a);if(void 0===s)throw new Rx(RI.CapabilityNotSupported,`Cannot fulfil input request '${r}': no handler is registered for '${a}' on this client. Declare the corresponding capability and register a handler, or handle input_required results manually.`,{key:r,method:a});let d=P2(i.params)?i.params:void 0;return await s({jsonrpc:"2.0",id:r,method:a,...void 0!==d&&{params:d}},e.buildContext({sessionId:e.sessionId,mcpReq:{id:r,method:a,_meta:d?._meta,requestState:(n=void 0,()=>n),signal:o,send:()=>P4("send"),notify:()=>P4("notify")}}))})(e,o,t,r,i),retry:(e,t)=>i.retry(e,{...a?.signal!==void 0&&{signal:a.signal},...a?.onprogress!==void 0&&{onprogress:a.onprogress},...a?.resetTimeoutOnProgress!==void 0&&{resetTimeoutOnProgress:a.resetTimeoutOnProgress},...a?.headers!==void 0&&{headers:a.headers},...void 0!==t.timeout&&{timeout:t.timeout},...void 0!==t.maxTotalTimeout&&{maxTotalTimeout:t.maxTotalTimeout},allowInputRequired:!0})}})}({getRequestHandler:e=>this._getRequestHandler(e),buildContext:e=>this.buildContext(e,void 0),sessionId:this.transport?.sessionId},this._inputRequiredDriverConfig,e,t):Promise.reject(new Rx(RI.UnsupportedResultType,`Unsupported result type 'input_required' for ${t.request.method}: multi-round-trip auto-fulfilment is not enabled on this instance — pass allowInputRequired: true to handle it manually, or enable inputRequired.autoFulfill`,{resultType:"input_required",method:t.request.method}))}_setupListChangedHandlers(e){e.tools&&this._serverCapabilities?.tools?.listChanged&&this._setupListChangedHandler("tools","notifications/tools/list_changed",e.tools,async()=>(await this.listTools(void 0,{cacheMode:"refresh"})).tools),e.prompts&&this._serverCapabilities?.prompts?.listChanged&&this._setupListChangedHandler("prompts","notifications/prompts/list_changed",e.prompts,async()=>(await this.listPrompts(void 0,{cacheMode:"refresh"})).prompts),e.resources&&this._serverCapabilities?.resources?.listChanged&&this._setupListChangedHandler("resources","notifications/resources/list_changed",e.resources,async()=>(await this.listResources(void 0,{cacheMode:"refresh"})).resources)}registerCapabilities(e){if(this.transport)throw Error("Cannot register capabilities after connecting to transport");this._capabilities=function(e,t){let r={...e};for(let e in t){let i=t[e];if(void 0===i)continue;let o=r[e];r[e]=P0(o)&&P0(i)?{...o,...i}:i}return r}(this._capabilities,e)}setVersionNegotiation(e){if(this.transport)throw Error("Cannot configure version negotiation after connecting to transport");this._versionNegotiation=e}_wrapHandler(e,t){return"elicitation/create"===e?async(e,r)=>{let i=Pg(this._negotiatedProtocolVersion),o=i.validateRequest("elicitation/create",e);if(o.ok||"not-in-era"!==o.reason||(o=i.validateInputRequest("elicitation/create",e)),!o.ok)throw new R5("not-in-era"===o.reason?R9.InternalError:R9.InvalidParams,"not-in-era"===o.reason?"No wire schema for elicitation/create in the resolved era":`Invalid elicitation request: ${o.message}`);let{params:n}=o.value;n.mode=n.mode??"form";let{supportsFormMode:a,supportsUrlMode:s}=function(e){if(!e)return{supportsFormMode:!1,supportsUrlMode:!1};let t=void 0!==e.form,r=void 0!==e.url;return{supportsFormMode:t||!t&&!r,supportsUrlMode:r}}(this._capabilities.elicitation);if("form"===n.mode&&!a)throw new R5(R9.InvalidParams,"Client does not support form-mode elicitation requests");if("url"===n.mode&&!s)throw new R5(R9.InvalidParams,"Client does not support URL-mode elicitation requests");let d=await t(e,r),c=i.validateResult("elicitation/create",d);if(c.ok||"not-in-era"!==c.reason||(c=i.validateInputResponse("elicitation/create",d)),!c.ok)throw new R5("not-in-era"===c.reason?R9.InternalError:R9.InvalidParams,"not-in-era"===c.reason?"No wire schema for elicitation/create in the resolved era":`Invalid elicitation result: ${c.message}`);let l=c.value,p="form"===n.mode?n.requestedSchema:void 0;if("form"===n.mode&&"accept"===l.action&&l.content&&p&&this._capabilities.elicitation?.form?.applyDefaults)try{!function e(t,r){if(t&&null!==r&&"object"==typeof r){if("object"===t.type&&t.properties&&"object"==typeof t.properties){let i=t.properties;for(let t of Object.keys(i)){let o=i[t];void 0===r[t]&&Object.prototype.hasOwnProperty.call(o,"default")&&(r[t]=o.default),void 0!==r[t]&&e(o,r[t])}}if(Array.isArray(t.anyOf))for(let i of t.anyOf)"boolean"!=typeof i&&e(i,r);if(Array.isArray(t.oneOf))for(let i of t.oneOf)"boolean"!=typeof i&&e(i,r)}}(p,l.content)}catch{}return l}:"sampling/createMessage"===e?async(e,r)=>{let i=Pg(this._negotiatedProtocolVersion),o=i.validateRequest("sampling/createMessage",e);if(o.ok||"not-in-era"!==o.reason||(o=i.validateInputRequest("sampling/createMessage",e)),!o.ok)throw new R5("not-in-era"===o.reason?R9.InternalError:R9.InvalidParams,"not-in-era"===o.reason?"No wire schema for sampling/createMessage in the resolved era":`Invalid sampling request: ${o.message}`);let{params:n}=o.value,a=await t(e,r),s=!!(n.tools||n.toolChoice),d=i.samplingResultVariant(s,a);if(d.ok||"not-in-era"!==d.reason||(d=i.validateInputResponse("sampling/createMessage",a)),!d.ok)throw new R5("not-in-era"===d.reason?R9.InternalError:R9.InvalidParams,"not-in-era"===d.reason?"No result schema for sampling/createMessage in the resolved era":`Invalid sampling result: ${d.message}`);return d.value}:t}assertCapability(e,t){if(!this._serverCapabilities?.[e])throw new Rx(RI.CapabilityNotSupported,`Server does not support ${e} (required for ${t})`)}async connect(e,t){if(t?.prior!=null)return this._connectFromPrior(e,function(e){if("object"==typeof e&&null!==e&&("legacy"===e.kind&&!("supportedVersions"in e)&&!("discover"in e)||"modern"===e.kind&&kf.safeParse(e.discover).success))return e;throw new Rx(RI.EraNegotiationFailed,"connect({ prior }): unrecognized prior — expected { kind: 'modern', discover } or { kind: 'legacy' }")}(t.prior),t);let r=function(e,t){let r=e?.mode??"legacy";if("legacy"===r)return{kind:"legacy"};let i=e?.probe??{};if("object"==typeof r){if(!(r.pin>=RC))throw TypeError(`versionNegotiation: { pin: '${r.pin}' } is not a modern protocol revision — pinning is for 2026-07-28 and later; omit versionNegotiation (or use mode: 'legacy') for 2025-era servers.`);return{kind:"pin",version:r.pin,probe:i}}let o=t?RE(t):[];return{kind:"auto",modernVersions:o.length>0?o:[...RT],fallbackAvailable:!t||RO(t).length>0,probe:i}}(this._versionNegotiation,this._supportedProtocolVersionsOption);return"legacy"!==r.kind?this._connectNegotiated(e,r,t):this._connectPlainLegacy(e,t)}async _connectPlainLegacy(e,t){if(await super.connect(e),void 0!==e.sessionId){let t=this._negotiatedProtocolVersion;void 0!==t&&e.setProtocolVersion?.(t);return}this._resetConnectionState(),await this._legacyHandshake(e,t)}async _legacyHandshake(e,t){let r=RO(this._supportedProtocolVersions);try{let i=r[0];if(void 0===i)throw new Rx(RI.EraNegotiationFailed,"Cannot run the initialize handshake: supportedProtocolVersions contains no pre-2026-07-28 protocol version");let o=await this.request({method:"initialize",params:{protocolVersion:i,capabilities:this._capabilities,clientInfo:this._clientInfo}},t);if(void 0===o)throw Error(`Server sent invalid initialize result: ${o}`);if(!r.includes(o.protocolVersion))throw Error(`Server's protocol version is not supported: ${o.protocolVersion}`);this._serverCapabilities=o.capabilities,this._serverVersion=o.serverInfo,this._cache.setServerIdentity(this._deriveServerIdentity(e)),e.setProtocolVersion&&e.setProtocolVersion(o.protocolVersion),this._instructions=o.instructions,await this.notification({method:"notifications/initialized"}),this._negotiatedProtocolVersion=o.protocolVersion,this._listChangedConfig&&this._setupListChangedHandlers(this._listChangedConfig)}catch(e){throw this.close(),e}}async _connectNegotiated(e,t,r){let i;if(void 0!==e.sessionId){await super.connect(e);let t=this._negotiatedProtocolVersion;void 0!==t&&e.setProtocolVersion&&e.setProtocolVersion(t);return}this._resetConnectionState();try{let o=Ct(e),n={clientInfo:this._clientInfo,capabilities:this._capabilities,environment:Ce(),defaultTimeoutMs:r?.timeout??6e4},a="stdio"===o?function(e){let t=Object.getPrototypeOf(e);if(null===t||!Object.prototype.hasOwnProperty.call(t,"_dispose"))return;let r=e._serverParams;return"object"==typeof r&&null!==r&&"string"==typeof r.command?r:void 0}(e):void 0;i=void 0===a?await Cn(t,{...n,transport:e,transportKind:o}):await async function(e,t,r,i){let o,n,a=new t.constructor({...r,stderr:"ignore"}),s=t.close,d=!1,c=new Promise((e,t)=>{o=()=>t(Ca())});t.close=async function(){return d=!0,o?.(),s.call(t)};try{let t=Cn(e,{...i,transport:a,transportKind:"stdio",disposableProbe:!0});t.catch(()=>{}),n=await Promise.race([t,c])}finally{await async function(e){try{let t=e._dispose;await ("function"==typeof t?t.call(e):e.close())}catch{}}(a),t.close=s}if(d)throw Ca();return n}(t,e,a,n)}catch(t){throw await e.close().catch(()=>{}),Co(e),t}if(Co(e),await super.connect(e),"legacy"===i.era)return void await this._legacyHandshake(e,r);if(this._serverCapabilities=i.discover.capabilities,this._serverVersion=Cs(i.discover),this._cache.setServerIdentity(this._deriveServerIdentity(e)),this._instructions=i.discover.instructions,this._discoverResult=i.discover,this._negotiatedProtocolVersion=i.version,e.setProtocolVersion&&e.setProtocolVersion(i.version),this._listChangedConfig){let e=this._listChangedConfig,t=this._serverCapabilities,i={...e.tools&&t?.tools?.listChanged&&{tools:e.tools},...e.prompts&&t?.prompts?.listChanged&&{prompts:e.prompts},...e.resources&&t?.resources?.listChanged&&{resources:e.resources}},o=!0;try{this._setupListChangedHandlers(i)}catch(e){o=!1,this.onerror?.(e instanceof Error?e:Error(String(e)))}let n=o?{...i.tools&&{toolsListChanged:!0},...i.prompts&&{promptsListChanged:!0},...i.resources&&{resourcesListChanged:!0}}:{};if(Object.keys(n).length>0){let e=new AbortController,t=()=>e.abort(r?.signal?.reason);r?.signal?.aborted&&t(),r?.signal?.addEventListener("abort",t);try{this._autoOpenedSubscription=await this.listen(n,{timeout:r?.timeout,signal:e.signal})}catch(e){if(r?.signal?.aborted)throw await this.close().catch(()=>{}),e;this.onerror?.(e instanceof Error?e:Error(String(e)))}finally{r?.signal?.removeEventListener("abort",t)}}}}async _connectFromPrior(e,t,r){if("legacy"===t.kind)return this._connectPlainLegacy(e,r);let i=t.discover;this._resetConnectionState();let o=this._supportedProtocolVersionsOption,n=(o&&RE(o).length>0?RE(o):RT).find(e=>i.supportedVersions.includes(e));if(void 0===n)throw new Rx(RI.EraNegotiationFailed,"connect({ prior }) with a modern verdict requires a 2026-07-28+ mutual protocol version; the supplied DiscoverResult and this client's supportedProtocolVersions have no modern overlap. For a server known to be legacy, pass prior: { kind: 'legacy' } to skip the probe and initialize directly, or use versionNegotiation: { mode: 'auto' } to re-probe with legacy fallback.");if(await super.connect(e),this._discoverResult=i,this._serverCapabilities=i.capabilities,this._serverVersion=Cs(i),this._cache.setServerIdentity(this._deriveServerIdentity(e)),this._instructions=i.instructions,this._negotiatedProtocolVersion=n,e.setProtocolVersion?.(n),this._listChangedConfig)try{this._setupListChangedHandlers(this._listChangedConfig)}catch(e){this.onerror?.(e instanceof Error?e:Error(String(e)))}}getServerCapabilities(){return this._serverCapabilities}getServerVersion(){return this._serverVersion}_deriveServerIdentity(e){let t=this._serverVersion;return void 0!==t?`${t.name}@${t.version}`:e.sessionId??`anonymous:${Date.now()}-${Math.random().toString(36).slice(2)}`}getNegotiatedProtocolVersion(){return this._negotiatedProtocolVersion}getProtocolEra(){let e=this._negotiatedProtocolVersion;if(void 0!==e)return e>=RC?"modern":"legacy"}getInstructions(){return this._instructions}getDiscoverResult(){return this._discoverResult}assertCapabilityForMethod(e){switch(e){case"logging/setLevel":if(!this._serverCapabilities?.logging)throw new Rx(RI.CapabilityNotSupported,`Server does not support logging (required for ${e})`);break;case"prompts/get":case"prompts/list":if(!this._serverCapabilities?.prompts)throw new Rx(RI.CapabilityNotSupported,`Server does not support prompts (required for ${e})`);break;case"resources/list":case"resources/templates/list":case"resources/read":case"resources/subscribe":case"resources/unsubscribe":if(!this._serverCapabilities?.resources)throw new Rx(RI.CapabilityNotSupported,`Server does not support resources (required for ${e})`);if("resources/subscribe"===e&&!this._serverCapabilities.resources.subscribe)throw new Rx(RI.CapabilityNotSupported,`Server does not support resource subscriptions (required for ${e})`);break;case"tools/call":case"tools/list":if(!this._serverCapabilities?.tools)throw new Rx(RI.CapabilityNotSupported,`Server does not support tools (required for ${e})`);break;case"completion/complete":if(!this._serverCapabilities?.completions)throw new Rx(RI.CapabilityNotSupported,`Server does not support completions (required for ${e})`)}}assertNotificationCapability(e){if("notifications/roots/list_changed"===e&&!this._capabilities.roots?.listChanged)throw new Rx(RI.CapabilityNotSupported,`Client does not support roots list changed notifications (required for ${e})`)}assertRequestHandlerCapability(e){switch(e){case"sampling/createMessage":if(!this._capabilities.sampling)throw new Rx(RI.CapabilityNotSupported,`Client does not support sampling capability (required for ${e})`);break;case"elicitation/create":if(!this._capabilities.elicitation)throw new Rx(RI.CapabilityNotSupported,`Client does not support elicitation capability (required for ${e})`);break;case"roots/list":if(!this._capabilities.roots)throw new Rx(RI.CapabilityNotSupported,`Client does not support roots capability (required for ${e})`)}}async ping(e){return this.request({method:"ping"},e)}async discover(e){let t=await this._requestWithSchema({method:"server/discover"},kf,e);return this._discoverResult=t,t}async complete(e,t){return this.request({method:"completion/complete",params:e},t)}async setLoggingLevel(e,t){return this.request({method:"logging/setLevel",params:{level:e}},t)}async getPrompt(e,t){return this.request({method:"prompts/get",params:e},t)}async listPrompts(e,t){if(!this._serverCapabilities?.prompts&&!this._enforceStrictCapabilities)return console.debug("Client.listPrompts() called but server does not advertise prompts capability - returning empty list"),{prompts:[]};if(e?.cursor!==void 0)return this.request({method:"prompts/list",params:e},t);let r=await this._serveFromCache("prompts/list",void 0,t);return void 0!==r?r:this._listAllPages("prompts/list",e,t,e=>e.prompts)}async listResources(e,t){if(!this._serverCapabilities?.resources&&!this._enforceStrictCapabilities)return console.debug("Client.listResources() called but server does not advertise resources capability - returning empty list"),{resources:[]};if(e?.cursor!==void 0)return this.request({method:"resources/list",params:e},t);let r=await this._serveFromCache("resources/list",void 0,t);return void 0!==r?r:this._listAllPages("resources/list",e,t,e=>e.resources)}async listResourceTemplates(e,t){if(!this._serverCapabilities?.resources&&!this._enforceStrictCapabilities)return console.debug("Client.listResourceTemplates() called but server does not advertise resources capability - returning empty list"),{resourceTemplates:[]};if(e?.cursor!==void 0)return this.request({method:"resources/templates/list",params:e},t);let r=await this._serveFromCache("resources/templates/list",void 0,t);return void 0!==r?r:this._listAllPages("resources/templates/list",e,t,e=>e.resourceTemplates)}async _listAllPages(e,t,r,i,o){let n=r?.cacheMode==="bypass",a=this._cache.captureGeneration(e),s=await this.request({method:e,...t&&{params:{...t}}},r),d=s.nextCursor,c=s,l=1;for(;void 0!==d;){if(0!==this._listMaxPages&&l>=this._listMaxPages)throw new Rx(RI.ListPaginationExceeded,`${e}: exceeded listMaxPages (${this._listMaxPages}); server pagination did not terminate`,{method:e,listMaxPages:this._listMaxPages});let o=await this.request({method:e,params:{...t,cursor:d}},r);if(o.nextCursor===d&&JSON.stringify(i(o))===JSON.stringify(i(c)))break;i(s).push(...i(o)),c=o,d=o.nextCursor,l++}return delete s.nextCursor,o?.(s),n||await this._cache.write(e,s,a,this._freshness(s)),s}_freshness(e,t){let r="number"==typeof e.ttlMs?e.ttlMs:this._defaultCacheTtlMs,i="public"===e.cacheScope?"public":"private";return{expiresAt:this._cache.now()+Math.min(Math.max(0,r),864e5),scope:i,params:t}}async _serveFromCache(e,t,r){if(r?.cacheMode==="bypass"||r?.cacheMode==="refresh")return;let i=await this._cache.read(e,t).catch(e=>void this._reportStoreError(e));if(void 0!==i){if(r?.signal?.aborted){let e=r.signal.reason;throw e instanceof Rx?e:new Rx(RI.RequestTimeout,String(e))}return i.value}}_reportStoreError(e){this.onerror?.(e instanceof Error?e:Error(String(e)))}_compileOutputValidator(e){if(e.outputSchema)try{return{ok:!0,validator:this._jsonSchemaValidator.getValidator(e.outputSchema)}}catch(e){return{ok:!1,compileError:e}}}async _resolveXMcpHeaderScan(e,t){let r=t??await this._cache.toolDefinition(e);return void 0===r?void 0:Pq(r.inputSchema)}async readResource(e,t){let r=await this._serveFromCache("resources/read",e.uri,t);if(void 0!==r)return r;let i=this._cache.captureGeneration("resources/read",e.uri),o=await this.request({method:"resources/read",params:e},t);if(t?.cacheMode!=="bypass"){let r=this._freshness(o,e.uri);r.expiresAt>this._cache.now()?await this._cache.write("resources/read",o,i,r):t?.cacheMode==="refresh"&&await this._cache.evictKey("resources/read",e.uri)}return o}async subscribeResource(e,t){return this.request({method:"resources/subscribe",params:e},t)}async unsubscribeResource(e,t){return this.request({method:"resources/unsubscribe",params:e},t)}async listen(e,t){let r,i,o,n,a;if(void 0===this.transport)throw new Rx(RI.NotConnected,"Not connected");let s=this._negotiatedProtocolVersion;if(void 0===s||!(s>=RC))throw new Rx(RI.MethodNotSupportedByProtocolVersion,`subscriptions/listen requires a 2026-07-28-era connection (negotiated: ${s??"none"}). On a 2025-era connection, change notifications are delivered unsolicited: use ClientOptions.listChanged and resources/subscribe instead.`,{method:"subscriptions/listen",protocolVersion:s});if(t?.signal?.aborted){let e=t.signal.reason;throw e instanceof Rx?e:new Rx(RI.RequestTimeout,String(e))}let d=new AbortController,c=`listen:${this._nextListenId++}`,l="opening",p=new Promise((e,t)=>{o=e,n=t}),u=new Promise(e=>{a=e}),m=e=>{if("closed"===l)return;let s="opening"===l;if(void 0!==r&&(clearTimeout(r),r=void 0),"ack"in e){l="open",o(e.ack);return}l="closed",void 0!==i&&t?.signal?.removeEventListener("abort",i),this._listenState.delete(c),d.abort(),a(e.cause),s&&n(e.error??new Rx(RI.ConnectionClosed,"subscriptions/listen closed before the server acknowledged"))},f=async()=>{d.abort(),await this.notification({method:"notifications/cancelled",params:{requestId:c}}).catch(()=>{})};this._listenState.set(c,{settle:m});let h=t?.timeout??6e4;if(r=setTimeout(()=>{m({cause:"remote",error:new Rx(RI.RequestTimeout,"subscriptions/listen ack timed out",{timeout:h})}),f().catch(()=>{})},h),t?.signal){let e=t.signal;i=()=>{if("closed"===l)return;let t=e.reason;m({cause:"local",error:t instanceof Error?t:Error(String(t??"Aborted"))}),f().catch(()=>{})},e.addEventListener("abort",i,{once:!0})}let y={jsonrpc:"2.0",id:c,method:"subscriptions/listen",params:{_meta:{...this._outboundMetaEnvelope()},notifications:e}},g=e=>{m({cause:"remote",error:e instanceof Error?e:Error(String(e))})};try{this.transport.send(y,{requestSignal:d.signal,onRequestStreamEnd:()=>m({cause:"remote",error:Error("subscriptions/listen: stream ended")})}).catch(g)}catch(e){g(e)}return{honoredFilter:await p,close:async()=>{"closed"!==l&&(m({cause:"local"}),await f())},closed:u}}get autoOpenedSubscription(){return this._autoOpenedSubscription}_onnotification(e,t){let r=Object.hasOwn(Cd,e.method)?Cd[e.method]:void 0;if("notifications/resources/updated"===e.method){let t=e.params?.uri;"string"==typeof t&&this._cache.evictKey("resources/read",t)}else if(void 0!==r)for(let e of r)this._cache.evict(e);if("notifications/subscriptions/acknowledged"===e.method){let t=e.params?._meta?.[SA],r="string"==typeof t?this._listenState.get(t):void 0;if(void 0!==r){let t=this._wireCodec().validateNotification("notifications/subscriptions/acknowledged",e);r.settle({ack:t.ok?t.value.params.notifications:{}});return}}if("notifications/cancelled"===e.method){let t=e.params?.requestId,r="string"==typeof t?this._listenState.get(t):void 0;if(void 0!==r)return void r.settle({cause:"remote",error:Error("subscriptions/listen: server cancelled the subscription")})}super._onnotification(e,t)}_onresponse(e){let t=e.id,r="string"==typeof t?this._listenState.get(t):void 0;if(void 0!==r)return void(S4.safeParse(e).success?r.settle({cause:"remote",error:R5.fromError(e.error.code,e.error.message,e.error.data)}):r.settle({cause:"graceful",error:new Rx(RI.ConnectionClosed,"subscriptions/listen: server closed the subscription gracefully before acknowledging")}));super._onresponse(e)}_onclose(){if(this._listenState.size>0){let e=new Rx(RI.ConnectionClosed,"Connection closed");for(let t of this._listenState.values())t.settle({cause:"remote",error:e});this._listenState.clear()}super._onclose()}async callTool(e,t){let r,i="modern"===this.getProtocolEra()&&"browser"!==Ce(),o=async()=>{let r;if(!i)return t;try{r=await this._resolveXMcpHeaderScan(e.name,t?.toolDefinition)}catch(e){this._reportStoreError(e)}if(!r?.valid||0===r.declarations.length)return t;let o=function(e,t){let r={};for(let i of e){let e=function(e,t){let r=e;for(let e of t){if(null===r||"object"!=typeof r)return;r=r[e]}return r}(t,i.path);if(null==e)continue;let o=function(e){if("string"==typeof e)return e;if("boolean"==typeof e)return e?"true":"false";if("number"==typeof e){if(!Number.isFinite(e)||Number.isInteger(e)&&!Number.isSafeInteger(e))return;return String(e)}}(e);void 0!==o&&(r[`Mcp-Param-${i.headerName}`]=!function(e){if(0===e.length||e.startsWith(PC)&&e.endsWith("?=")||e!==e.trim())return!0;for(let t=0;t=32)||!(r<=126)))return!0}return!1}(o)?o:`${PC}${function(e){let t=new TextEncoder().encode(e),r="";for(let e of t)r+=String.fromCodePoint(e);return btoa(r)}(o)}?=`)}return r}(r.declarations,e.arguments);return 0===Object.keys(o).length?t:{...t,headers:{...t?.headers,...o}}},n=t?.toolDefinition===void 0?await this._cache.outputValidator(e.name,e=>this._compileOutputValidator(e)).catch(e=>void this._reportStoreError(e)):this._compileOutputValidator(t.toolDefinition),a=()=>{if(void 0===n||n.ok)return;let t=n.compileError,r=(t instanceof Error?t.message:String(t)).slice(0,200);throw new R5(R9.InvalidParams,`Tool '${e.name}' has an invalid outputSchema: ${r}`)};a();try{r=await this.request({method:"tools/call",params:e},await o())}catch(c){let s=c instanceof R5&&-32020===c.code;if(!i||!s||t?.toolDefinition!==void 0)throw c;let d={signal:t?.signal,timeout:t?.timeout,cacheMode:"refresh"};await this._cache.evict("tools/list"),await this.listTools(void 0,d).catch(e=>this._reportStoreError(e)),n=await this._cache.outputValidator(e.name,e=>this._compileOutputValidator(e)).catch(e=>void this._reportStoreError(e)),a(),r=await this.request({method:"tools/call",params:e},await o())}let s=void 0!==n&&n.ok?n.validator:void 0;if(s){if(void 0===r.structuredContent&&!r.isError)throw new R5(R9.InvalidRequest,`Tool ${e.name} has an output schema but did not return structured content`);if(void 0!==r.structuredContent&&!r.isError)try{let e=s(r.structuredContent);if(!e.valid)throw new R5(R9.InvalidParams,`Structured content does not match the tool's output schema: ${e.errorMessage}`)}catch(e){if(e instanceof R5)throw e;throw new R5(R9.InvalidParams,`Failed to validate structured content: ${e instanceof Error?e.message:String(e)}`)}}return r}async listTools(e,t){if(!this._serverCapabilities?.tools&&!this._enforceStrictCapabilities)return console.debug("Client.listTools() called but server does not advertise tools capability - returning empty list"),{tools:[]};if(e?.cursor!==void 0){let r=await this.request({method:"tools/list",params:e},t);return this._excludeInvalidXMcpHeaderTools(r),r}let r=await this._serveFromCache("tools/list",void 0,t);return void 0!==r?r:this._listAllPages("tools/list",e,t,e=>e.tools,e=>this._excludeInvalidXMcpHeaderTools(e))}_excludeInvalidXMcpHeaderTools(e){if("modern"!==this.getProtocolEra()||!this.transport||"stdio"===Ct(this.transport))return;let t=e.tools.filter(e=>{let t=Pq(e.inputSchema);return!!t.valid||(console.warn(`[mcp-sdk] excluding tool '${e.name}' from tools/list: invalid x-mcp-header declaration — ${t.reason}`),!1)});t.length!==e.tools.length&&(e.tools=t)}_setupListChangedHandler(e,t,r,i){let o=oJ(wp,r);if(!o.success)throw Error(`Invalid ${e} listChanged options: ${o.error.message}`);if("function"!=typeof r.onChanged)throw TypeError(`Invalid ${e} listChanged options: onChanged must be a function`);let{autoRefresh:n,debounceMs:a}=o.data,{onChanged:s}=r,d=async()=>{if(!n)return void s(null,null);try{s(null,await i())}catch(e){s(e instanceof Error?e:Error(String(e)),null)}},c=()=>{if(a){let t=this._listChangedDebounceTimers.get(e);t&&clearTimeout(t);let r=setTimeout(d,a);this._listChangedDebounceTimers.set(e,r)}else d()};this.setNotificationHandler(t,c)}async sendRootsListChanged(){return this.notification({method:"notifications/roots/list_changed"})}};(class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.SseError"})}static[Symbol.hasInstance](e){return Rq(this,e)}static isInstance(e){if("function"!=typeof this)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return Rq(this,e)}constructor(e,t,r){super(`SSE error: ${t}`),this.code=e,this.event=r,RV(this,new.target)}});let Cl=nV().nonnegative(),Cp=new U;class Cu extends Error{failure;constructor(e,t){super(e.message,t),this.name="DaemonFailure",this.failure=e}}function Cm(e){let t=0;for(let r=0;r=55296&&i<=56319){let t=e.charCodeAt(r+1);if(t<56320||t>57343||Number.isNaN(t))return null;r+=1}else if(i>=56320&&i<=57343)return null;t+=1}return t}function Cf(e,t){return new Cu({kind:"protocol",code:e,message:t})}function Ch(e,t){return new Cu({kind:"unavailable",code:e,message:t})}function Cy(e){if(e instanceof Cu)return e.failure;if(e instanceof R5){let t=e.data,r="object"==typeof t&&null!==t&&"code"in t&&"string"==typeof t.code?t.code:`jsonrpc_${e.code}`;return{kind:Cg(r),code:r,message:e.message}}if(e instanceof Rx){let t=`sdk_${e.code.toLowerCase()}`;return{kind:Cg(t),code:t,message:e.message}}return e instanceof Error?{kind:"protocol",code:e.name,message:e.message}:{kind:"protocol",code:"unknown",message:String(e)}}function Cg(e){return e.includes("not_authorized")||"denied"===e||e.startsWith("authorization")?"denied":e.includes("not_found")||"project_required"===e?"not_found":e.includes("stale")?"stale":e.includes("unavailable")||e.includes("warming")||e.includes("saturated")?"unavailable":e.includes("invalid")||e.includes("malformed")?"invalid_request":e.includes("disconnected")||e.includes("socket")?"disconnected":"protocol"}let C_=nz({handle:o7().min(1),original_chars:Cl,preview:o7(),preview_chars:Cl,truncated:nY(!0)}),Cv=nz({handle:o7().min(1),expired:nY(!1),original_chars:Cl,total_chars:Cl,content:o7(),offset:Cl,next_offset:Cl.nullable().optional(),has_more:nI()}),Cb=nz({handle:o7().min(1),expired:nI().nullable().optional(),content:nj().optional(),reason_code:o7()}),C$=new Set(["PATH","HOME","USERPROFILE","HOMEDRIVE","HOMEPATH","XDG_CONFIG_HOME","XDG_DATA_HOME","LANG","LC_ALL","LC_CTYPE","TMPDIR","TEMP","TMP","SystemRoot","SystemDrive","APPDATA","LOCALAPPDATA","RUST_LOG","RUST_BACKTRACE","RUST_LIB_BACKTRACE","HTTP_PROXY","HTTPS_PROXY","ALL_PROXY","NO_PROXY","http_proxy","https_proxy","all_proxy","no_proxy"]);class CS{options;#g;#_;#v;#b=null;#$=null;#S=!1;#k=!1;constructor(e){this.options=e;let t=["serve"];null!==e.projectRoot&&t.push("--path",e.projectRoot),this.#_=new P5({command:e.binary,args:t,env:function(e){let t={};for(let[r,i]of Object.entries(e))void 0!==i&&(C$.has(r)||r.startsWith("TRACEDECAY_"))&&(t[r]=i);return t}(e.env),cwd:e.cwd,stderr:"inherit"}),this.#g=new Cc({name:"tracedecay-chatgpt-extension",version:"0.0.0"}),this.#v=new Promise(e=>{this.#_.onclose=()=>{this.#k=!0,e()}})}get closed(){return this.#k}async connect(){this.#w(),null===this.#b&&(this.#b=this.#g.connect(this.#_).catch(e=>{throw this.#k=!0,new Cu({kind:"disconnected",code:"serve_spawn_failed",message:`Cannot start ${this.options.binary} serve: ${e instanceof Error?e.message:String(e)}`},{cause:e})}),this.#S=null!==this.#_.pid),await this.#b,this.#w()}serverInfo(){let e=this.#g.getServerVersion();return void 0===e?null:{name:e.name,version:e.version}}async listToolNames(){return await this.connect(),this.#w(),(await this.#g.listTools()).tools.map(e=>e.name)}async callJson(e,t,r){var i;await this.connect(),this.#w();let o=await this.#R({name:e,arguments:{...t,format:"json"}},r);for(let e of o.content)"text"===e.type&&e.text.startsWith("tracedecay_repeated_query:")&&Cp.getStore()?.push(e.text);let n=Cw(o,e);if("object"==typeof(i=n)&&null!==i&&!Array.isArray(i)&&"handle"in i&&"truncated"in i&&!0===i.truncated){let t=C_.safeParse(n);if(!t.success)throw Cf("response_handle_malformed","truncated response metadata is malformed");if(Cm(t.data.preview)!==t.data.preview_chars)throw Cf("response_handle_malformed","truncated response preview length is inconsistent");if(t.data.original_chars>1048576)throw Ch("response_handle_too_large","response handle exceeds the 1048576-byte reassembly budget");n=CR(await this.#P(t.data,r),e)}return n}async #P(e,t){let r=0,i=0,o=[];for(;;){if(1024===o.length)throw Ch("response_handle_page_limit","response handle exceeds the 1024-page reassembly limit");let n=Cw(await this.#R({name:"tracedecay_retrieve",arguments:{handle:e.handle,offset:r,format:"json"}},t),"tracedecay_retrieve"),a=Cv.safeParse(n);if(!a.success){let t=Cb.safeParse(n);if(t.success&&t.data.handle===e.handle)throw new Cu({kind:"unavailable",code:t.data.reason_code,message:`response handle ${e.handle} is no longer available (${t.data.reason_code})`});throw new Cu({kind:"protocol",code:"retrieve_page_malformed",message:`tracedecay_retrieve returned an unexpected page shape for ${e.handle}`})}let s=a.data,d=Cm(s.content),c=null===d?null:r+d;if(s.handle!==e.handle||s.original_chars!==e.original_chars||s.total_chars!==e.original_chars||s.offset!==r||null===c||!Number.isSafeInteger(c)||c>e.original_chars)throw Cf("retrieve_page_malformed",`tracedecay_retrieve returned inconsistent page metadata for ${e.handle}`);let l=Buffer.byteLength(s.content,"utf8");if(l>1048576-i)throw Ch("response_handle_too_large","response handle exceeds the 1048576-byte reassembly budget");if(i+=l,o.push(s.content),s.has_more){if(null===s.next_offset||void 0===s.next_offset||s.next_offset<=r||s.next_offset!==c||c>=e.original_chars)throw Cf("retrieve_page_malformed",`tracedecay_retrieve returned an invalid continuation for ${e.handle}`);r=s.next_offset;continue}if(null!==s.next_offset&&void 0!==s.next_offset||c!==e.original_chars)throw Cf("retrieve_page_malformed",`tracedecay_retrieve returned an incomplete terminal page for ${e.handle}`);return o.join("")}}async #R(e,t){if(this.#w(),t?.aborted)throw t.reason??new DOMException("The operation was aborted","AbortError");try{let r=await this.#g.callTool(e,{...void 0===t?{}:{signal:t}});if(t?.aborted)throw t.reason??new DOMException("The operation was aborted","AbortError");return r}catch(e){if(t?.aborted)throw t.reason??e;throw e}}#w(){if(this.#k)throw new Cu({kind:"disconnected",code:"serve_closed",message:"tracedecay serve exited"})}close(){return this.#k=!0,this.#$??=this.#V(),this.#$}async #V(){let e=this.#S||null!==this.#_.pid?this.#v:null,[t]=await Promise.allSettled([(async()=>{await this.#_.close(),await e})(),this.#b]),r=this.#S||null!==this.#_.pid?this.#v:null,[i]=await Promise.allSettled([(async()=>{await this.#g.close(),await r})()]),o=[t,i].flatMap(e=>"rejected"===e.status?[e.reason]:[]);if(1===o.length)throw o[0];if(o.length>1)throw AggregateError(o,"Failed to close tracedecay serve session")}}let Ck=nz({problem:nz({kind:o7(),code:o7(),message:o7()})});function Cw(e,t){let r=!0===e.isError?Ck.safeParse(e.structuredContent):null;if(r?.success){let{kind:e,code:t,message:i}=r.data.problem,o=`${e}/${t}`;throw new Cu({kind:Cg(o),code:o,message:i})}return CR(function(e){for(let t of e.content)if("text"===t.type)return t.text;return""}(e),t)}function CR(e,t){try{return JSON.parse(e)}catch(r){throw new Cu({kind:"protocol",code:"non_json_tool_result",message:`${t} did not return JSON: ${e.slice(0,200)}`},{cause:r})}}class CP{#q;#I=null;#x=new Map;#j=new Map;#$=!1;#C=null;constructor(e){this.#q=e}async authority(){this.#w();let e=await async function(e){let t,r,i=O.join(e,"daemon-authority.json");try{t=await x(i,"utf8")}catch(t){let e="object"==typeof t&&null!==t&&"code"in t?String(t.code):"io_error";return{kind:"absent",failure:{kind:"disconnected",code:"ENOENT"===e?"daemon_authority_absent":e,message:"ENOENT"===e?`No TraceDecay daemon authority record at ${i}; start the daemon (tracedecay daemon run) first.`:`Cannot read ${i}: ${String(t)}`}}}try{r=JSON.parse(t)}catch(e){return{kind:"invalid",failure:{kind:"protocol",code:"daemon_authority_malformed",message:`${i} is not JSON: ${String(e)}`}}}let o=mS.safeParse(r);return o.success?{kind:"available",record:o.data}:{kind:"invalid",failure:{kind:"protocol",code:"daemon_authority_malformed",message:`${i} does not match the daemon authority record: ${o.error.message}`}}}(this.#q.profileRoot);return this.#w(),e}async daemonState(){this.#w();let e=await this.authority();if(this.#w(),"available"!==e.kind)return{state:"disconnected",failure:e.failure};let t=await async function(e,t=fetch){let r=mk(e);if(null===r)return!function(e){if(e<=0)return!1;try{return process.kill(e,0),!0}catch(e){return"object"==typeof e&&null!==e&&"code"in e&&"EPERM"===e.code}}(e.pid)?{kind:"disconnected",code:"daemon_exited",message:`Daemon pid ${e.pid} recorded in ${e.profile_root} is no longer running; start it with \`tracedecay daemon run\`.`}:{kind:"unavailable",code:"http_application_endpoint_absent",message:`Daemon pid ${e.pid} has not published its HTTP application endpoint yet.`};try{return await t(`${r}/`,{method:"GET",signal:AbortSignal.timeout(2e3),redirect:"manual"}),null}catch(t){return{kind:"disconnected",code:"daemon_unreachable",message:`Daemon pid ${e.pid} published ${r} but is not answering: ${t instanceof Error?t.cause instanceof Error?t.cause.message:t.message:String(t)}`}}}(e.record);return(this.#w(),null!==t)?{state:"disconnected",failure:t}:{state:"connected",profile_root:e.record.profile_root,version:e.record.version,pid:e.record.pid}}async #T(){this.#w();let e=await this.authority();if(this.#w(),"available"!==e.kind)throw new Cu(e.failure);return e.record}async #O(){for(;;){this.#w();let e=this.#I;if(null===e)return this.#I=new CS({binary:this.#q.binary,projectRoot:null,env:this.#q.env,cwd:this.#q.cwd}),this.#I;if(!e.closed)return e;await e.close(),this.#w(),this.#I===e&&(this.#I=null)}}#E(){return new Sv(async(e,t,r)=>{let i=await this.#O();return this.#w(),i.callJson(e,t,r)})}async listProjects(e){await this.#T();let t=this.#E();return(await this.#A(()=>t.projectList({limit:10},e))).projects.map(CI)}async resolveProject(e,t){await this.#T();let r=this.#E(),i=await this.#A(()=>r.projectContext({project_selector:{project_id:e}},t));if("not_found"===i.status){let t=this.#x.get(e);throw await t?.session.close(),this.#x.get(e)===t&&this.#x.delete(e),new Cu({kind:"denied",code:"project_not_registered",message:`Project ${e} is not registered in this TraceDecay profile; only registered projects can be explored.`})}return CI(i.project)}async #M(e,t){this.#w();let r=await this.resolveProject(e,t);this.#w();let i=this.#j.get(e);if(void 0===i){let t=this.#W(r).finally(()=>{this.#j.get(e)===t&&this.#j.delete(e)});t.catch(()=>void 0),this.#j.set(e,t),i=t}return await async function(e,t){if(void 0===t)return await e;let r=()=>t.reason instanceof Error?t.reason:new DOMException("This operation was aborted","AbortError");if(t.aborted)throw r();return await new Promise((i,o)=>{let n=()=>o(r());t.addEventListener("abort",n,{once:!0}),e.then(i,o).finally(()=>t.removeEventListener("abort",n))})}(i,t)}async #W(e){let t=e.project_id,r=await this.#T();this.#w();let i=this.#x.get(t);if(void 0!==i){if(!i.session.closed&&i.authority.process_run_id===r.process_run_id&&i.project.project_root===e.project_root)return i;await i.session.close(),this.#x.get(t)===i&&this.#x.delete(t),this.#w()}let o=mk(r);if(null===o)throw new Cu({kind:"unavailable",code:"http_application_endpoint_absent",message:"The daemon has not published its HTTP application endpoint yet."});let n=new CS({binary:this.#q.binary,projectRoot:e.project_root,env:this.#q.env,cwd:e.project_root}),a=new Sh({baseUrl:o,projectId:e.project_id,token:r.auth_token,mcp:{callTool:(e,t,r)=>n.callJson(e,function(e){if("object"==typeof e&&null!==e&&!Array.isArray(e))return e;throw new Cu({kind:"invalid_request",code:"non_object_request",message:"MCP tool requests must be objects"})}(t),r.signal)}}),s={project:e,session:n,client:a,authority:r};return this.#x.set(t,s),s}async status(e,t){let{client:r,authority:i}=await this.#M(e,t);return{status:await this.#A(()=>r.operations.status({},CV(t))),authority:i}}async search(e,t,r,i){let{client:o}=await this.#M(e,i);return this.#A(()=>o.operations.search({query:t,limit:r,prefer_symbol:!0},CV(i)))}async node(e,t,r){let{client:i}=await this.#M(e,r);return this.#A(()=>i.operations.node({node_id:t},CV(r)))}async impact(e,t,r,i){let{client:o}=await this.#M(e,i);return this.#A(()=>o.operations.impact({node_id:t,max_depth:r},CV(i)))}async callers(e,t,r,i){let{client:o}=await this.#M(e,i);return this.#A(()=>o.operations.code_callers({node_id:t,maximum_depth:r,meta:{order:"stable_identity",projection:"summary"}},CV(i))).then(Cq)}async callees(e,t,r,i,o){let{client:n}=await this.#M(e,o);return this.#A(()=>n.operations.code_callees({node_id:t,maximum_depth:i,scope:{generation:r},meta:{order:"stable_identity",projection:"summary"}},CV(o))).then(Cq)}async symbolSearch(e,t,r){let{client:i}=await this.#M(e,r);return this.#A(()=>i.operations.code_symbol_search({query:t,lazy_index_ignored_dependencies:!1,scope:{},meta:{order:"relevance",projection:"summary"}},CV(r))).then(Cq)}#w(){if(this.#$)throw new Cu({kind:"unavailable",code:"bridge_closed",message:"the extension bridge is shutting down"})}async #A(e){this.#w();try{let t=await e();return this.#w(),t}catch(e){throw new Cu(function(e){if(e instanceof Cu)return e.failure;if(e instanceof $0){var t,r;let i=e.problem.kind,o=`${i}/${e.problem.code}`;return{kind:(t=i,r=e.status,"not_found_or_not_authorized"===t||403===r?"denied":404===r?"not_found":Cg(t)),code:o,message:e.problem.message}}return e instanceof $X?{kind:"protocol",code:"daemon_authentication",message:e.message}:e instanceof $Q?{kind:"disconnected",code:"daemon_disconnected",message:e.message}:e instanceof $J?void 0!==e.cause?Cy(e.cause):{kind:"disconnected",code:"transport",message:e.message}:e instanceof $Y?{kind:"protocol",code:e.name,message:e.message}:Cy(e)}(e),{cause:e})}}close(){return null!==this.#C||(this.#$=!0,this.#C=this.#N()),this.#C}async #N(){await Promise.allSettled([...this.#j.values()]);let e=[...this.#x.values()].map(e=>e.session);null!==this.#I&&e.push(this.#I),this.#x.clear(),this.#I=null;let t=(await Promise.allSettled(e.map(async e=>e.close()))).flatMap(e=>"rejected"===e.status?[e.reason]:[]);if(1===t.length)throw t[0];if(t.length>1)throw AggregateError(t,"extension bridge session cleanup failed")}}function CV(e){return void 0===e?{}:{signal:e}}function Cq(e){let t=e.outcome.value.payload;if(null===t)throw new Cu({kind:"unavailable",code:"empty_payload",message:`the daemon returned a ${e.outcome.outcome} outcome without a payload`});return t}function CI(e){return{project_id:e.project_id,label:e.label,project_root:e.project_root,head_branch:e.head_branch??null,default_branch:e.default_branch??null}}var Cx="ui/resourceUri";function Cj(e,t,r,i){let o=r._meta,n=o.ui,a=o[Cx],s=o;return n?.resourceUri&&!a?s={...o,[Cx]:n.resourceUri}:a&&!n?.resourceUri&&(s={...o,ui:{...n,resourceUri:a}}),e.registerTool(t,{...r,_meta:s},i)}function CC(e,t,r){function i(r,i){if(r._zod||Object.defineProperty(r,"_zod",{value:{def:i,constr:a,traits:new Set},enumerable:!1}),r._zod.traits.has(e))return;r._zod.traits.add(e),t(r,i);let o=a.prototype,n=Object.keys(o);for(let e=0;e!!r?.Parent&&t instanceof r.Parent||t?._zod?.traits?.has(e)}),Object.defineProperty(a,"name",{value:e}),a}Symbol("zod_brand");class CT extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class CO extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}}(en=globalThis).__zod_globalConfig??(en.__zod_globalConfig={});let CE=globalThis.__zod_globalConfig;function CA(e){return e&&Object.assign(CE,e),CE}let CM=/^[cC][0-9a-z]{6,}$/,CW=/^[0-9a-z]+$/,CN=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Cz=/^[0-9a-vA-V]{20}$/,CD=/^[A-Za-z0-9]{27}$/,CF=/^[a-zA-Z0-9_-]{21}$/,CL=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,CU=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,CH=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([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)$/,CG=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,CB=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,CK=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,CJ=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,CZ=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,CQ=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,CX=/^[A-Za-z0-9_-]*$/,CY=/^https?$/,C1=/^\+[1-9]\d{6,14}$/,C0="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",C2=RegExp(`^${C0}$`);function C4(e){let t="(?:[01]\\d|2[0-3]):[0-5]\\d";return"number"==typeof e.precision?-1===e.precision?`${t}`:0===e.precision?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}let C6=/^-?\d+$/,C3=/^-?\d+(?:\.\d+)?$/,C9=/^(?:true|false)$/i,C5=/^[^A-Z]*$/,C8=/^[^a-z]*$/;function C7(e){let t=Object.values(e).filter(e=>"number"==typeof e);return Object.entries(e).filter(([e,r])=>-1===t.indexOf(+e)).map(([e,t])=>t)}function Te(e,t){return"bigint"==typeof t?t.toString():t}function Tt(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function Tr(e){let t=+!!e.startsWith("^"),r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}let Ti=Symbol("evaluating");function To(e,t,r){let i;Object.defineProperty(e,t,{get(){if(i!==Ti)return void 0===i&&(i=Ti,i=r()),i},set(r){Object.defineProperty(e,t,{value:r})},configurable:!0})}function Tn(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function Ta(...e){let t={};for(let r of e)Object.assign(t,Object.getOwnPropertyDescriptors(r));return Object.defineProperties({},t)}function Ts(e){return JSON.stringify(e)}let Td="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Tc(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}let Tl=Tt(()=>{if(CE.jitless||"u">typeof navigator&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return Function(""),!0}catch(e){return!1}});function Tp(e){if(!1===Tc(e))return!1;let t=e.constructor;if(void 0===t||"function"!=typeof t)return!0;let r=t.prototype;return!1!==Tc(r)&&!1!==Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")}function Tu(e){return Tp(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}let Tm=new Set(["string","number","symbol"]);function Tf(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Th(e,t,r){let i=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(i._zod.parent=e),i}function Ty(e){if(!e)return{};if("string"==typeof e)return{error:()=>e};if(e?.message!==void 0){if(e?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");e.error=e.message}return(delete e.message,"string"==typeof e.error)?{...e,error:()=>e.error}:e}let Tg={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-0x80000000,0x7fffffff],uint32:[0,0xffffffff],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function T_(e,t=0){if(!0===e.aborted)return!0;for(let r=t;r(t.path??(t.path=[]),t.path.unshift(e),t))}function Tb(e){return"string"==typeof e?e:e?.message}function T$(e,t,r){let i=e.message?e.message:Tb(e.inst?._zod.def?.error?.(e))??Tb(t?.error?.(e))??Tb(r.customError?.(e))??Tb(r.localeError?.(e))??"Invalid input",{inst:o,continue:n,input:a,...s}=e;return s.path??(s.path=[]),s.message=i,t?.reportInput&&(s.input=a),s}function TS(e){return Array.isArray(e)?"array":"string"==typeof e?"string":"unknown"}function Tk(...e){let[t,r,i]=e;return"string"==typeof t?{message:t,code:"custom",input:r,inst:i}:{...t}}let Tw=CC("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),TR={number:"number",bigint:"bigint",object:"date"},TP=CC("$ZodCheckLessThan",(e,t)=>{Tw.init(e,t);let r=TR[typeof t.value];e._zod.onattach.push(e=>{let r=e._zod.bag,i=(t.inclusive?r.maximum:r.exclusiveMaximum)??1/0;t.value{(t.inclusive?i.value<=t.value:i.value{Tw.init(e,t);let r=TR[typeof t.value];e._zod.onattach.push(e=>{let r=e._zod.bag,i=(t.inclusive?r.minimum:r.exclusiveMinimum)??-1/0;t.value>i&&(t.inclusive?r.minimum=t.value:r.exclusiveMinimum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value>=t.value:i.value>t.value)||i.issues.push({origin:r,code:"too_small",minimum:"object"==typeof t.value?t.value.getTime():t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Tq=CC("$ZodCheckMultipleOf",(e,t)=>{Tw.init(e,t),e._zod.onattach.push(e=>{var r;(r=e._zod.bag).multipleOf??(r.multipleOf=t.value)}),e._zod.check=r=>{let i,o,n;if(typeof r.value!=typeof t.value)throw Error("Cannot mix number and bigint in multiple_of check.");("bigint"==typeof r.value?r.value%t.value===BigInt(0):0==(o=Math.round(i=r.value/t.value),n=Number.EPSILON*Math.max(Math.abs(i),1),Math.abs(i-o){Tw.init(e,t),t.format=t.format||"float64";let r=t.format?.includes("int"),i=r?"int":"number",[o,n]=Tg[t.format];e._zod.onattach.push(e=>{let i=e._zod.bag;i.format=t.format,i.minimum=o,i.maximum=n,r&&(i.pattern=C6)}),e._zod.check=a=>{let s=a.value;if(r){if(!Number.isInteger(s))return void a.issues.push({expected:i,format:t.format,code:"invalid_type",continue:!1,input:s,inst:e});if(!Number.isSafeInteger(s))return void(s>0?a.issues.push({input:s,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!t.abort}):a.issues.push({input:s,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!t.abort}))}sn&&a.issues.push({origin:"number",input:s,code:"too_big",maximum:n,inclusive:!0,inst:e,continue:!t.abort})}}),Tx=CC("$ZodCheckMaxLength",(e,t)=>{var r;Tw.init(e,t),(r=e._zod.def).when??(r.when=e=>{let t=e.value;return null!=t&&void 0!==t.length}),e._zod.onattach.push(e=>{let r=e._zod.bag.maximum??1/0;t.maximum{let i=r.value;if(i.length<=t.maximum)return;let o=TS(i);r.issues.push({origin:o,code:"too_big",maximum:t.maximum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),Tj=CC("$ZodCheckMinLength",(e,t)=>{var r;Tw.init(e,t),(r=e._zod.def).when??(r.when=e=>{let t=e.value;return null!=t&&void 0!==t.length}),e._zod.onattach.push(e=>{let r=e._zod.bag.minimum??-1/0;t.minimum>r&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{let i=r.value;if(i.length>=t.minimum)return;let o=TS(i);r.issues.push({origin:o,code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),TC=CC("$ZodCheckLengthEquals",(e,t)=>{var r;Tw.init(e,t),(r=e._zod.def).when??(r.when=e=>{let t=e.value;return null!=t&&void 0!==t.length}),e._zod.onattach.push(e=>{let r=e._zod.bag;r.minimum=t.length,r.maximum=t.length,r.length=t.length}),e._zod.check=r=>{let i=r.value,o=i.length;if(o===t.length)return;let n=TS(i),a=o>t.length;r.issues.push({origin:n,...a?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),TT=CC("$ZodCheckStringFormat",(e,t)=>{var r,i;Tw.init(e,t),e._zod.onattach.push(e=>{let r=e._zod.bag;r.format=t.format,t.pattern&&(r.patterns??(r.patterns=new Set),r.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=r=>{t.pattern.lastIndex=0,t.pattern.test(r.value)||r.issues.push({origin:"string",code:"invalid_format",format:t.format,input:r.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(i=e._zod).check??(i.check=()=>{})}),TO=CC("$ZodCheckRegex",(e,t)=>{TT.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,t.pattern.test(r.value)||r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),TE=CC("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=C5),TT.init(e,t)}),TA=CC("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=C8),TT.init(e,t)}),TM=CC("$ZodCheckIncludes",(e,t)=>{Tw.init(e,t);let r=Tf(t.includes),i=new RegExp("number"==typeof t.position?`^.{${t.position}}${r}`:r);t.pattern=i,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(i)}),e._zod.check=r=>{r.value.includes(t.includes,t.position)||r.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:r.value,inst:e,continue:!t.abort})}}),TW=CC("$ZodCheckStartsWith",(e,t)=>{Tw.init(e,t);let r=RegExp(`^${Tf(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(r)}),e._zod.check=r=>{r.value.startsWith(t.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:r.value,inst:e,continue:!t.abort})}}),TN=CC("$ZodCheckEndsWith",(e,t)=>{Tw.init(e,t);let r=RegExp(`.*${Tf(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(r)}),e._zod.check=r=>{r.value.endsWith(t.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:r.value,inst:e,continue:!t.abort})}}),Tz=CC("$ZodCheckOverwrite",(e,t)=>{Tw.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}});class TD{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if("function"==typeof e){e(this,{execution:"sync"}),e(this,{execution:"async"});return}let t=e.split("\n").filter(e=>e),r=Math.min(...t.map(e=>e.length-e.trimStart().length));for(let e of t.map(e=>e.slice(r)).map(e=>" ".repeat(2*this.indent)+e))this.content.push(e)}compile(){let e=Function,t=this?.args,r=[...(this?.content??[""]).map(e=>` ${e}`)];return new e(...t,r.join("\n"))}}let TF=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,Te,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},TL=CC("$ZodError",TF),TU=CC("$ZodError",TF,{Parent:Error}),TH=e=>(t,r,i,o)=>{let n=i?{...i,async:!1}:{async:!1},a=t._zod.run({value:r,issues:[]},n);if(a instanceof Promise)throw new CT;if(a.issues.length){let t=new(o?.Err??e)(a.issues.map(e=>T$(e,n,CA())));throw Td(t,o?.callee),t}return a.value},TG=e=>async(t,r,i,o)=>{let n=i?{...i,async:!0}:{async:!0},a=t._zod.run({value:r,issues:[]},n);if(a instanceof Promise&&(a=await a),a.issues.length){let t=new(o?.Err??e)(a.issues.map(e=>T$(e,n,CA())));throw Td(t,o?.callee),t}return a.value},TB=e=>(t,r,i)=>{let o=i?{...i,async:!1}:{async:!1},n=t._zod.run({value:r,issues:[]},o);if(n instanceof Promise)throw new CT;return n.issues.length?{success:!1,error:new(e??TL)(n.issues.map(e=>T$(e,o,CA())))}:{success:!0,data:n.value}},TK=TB(TU),TJ=e=>async(t,r,i)=>{let o=i?{...i,async:!0}:{async:!0},n=t._zod.run({value:r,issues:[]},o);return n instanceof Promise&&(n=await n),n.issues.length?{success:!1,error:new e(n.issues.map(e=>T$(e,o,CA())))}:{success:!0,data:n.value}},TZ=TJ(TU),TQ={major:4,minor:4,patch:3},TX=CC("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=TQ;let i=[...e._zod.def.checks??[]];for(let t of(e._zod.traits.has("$ZodCheck")&&i.unshift(e),i))for(let r of t._zod.onattach)r(e);if(0===i.length)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(e,t,r)=>{let i,o=T_(e);for(let n of t){if(n._zod.def.when){if(function(e,t=0){if(!0===e.aborted)return!0;for(let r=t;r{await a,e.issues.length!==t&&(o||(o=T_(e,t)))});else{if(e.issues.length===t)continue;o||(o=T_(e,t))}}return i?i.then(()=>e):e},r=(r,o,n)=>{if(T_(r))return r.aborted=!0,r;let a=t(o,i,n);if(a instanceof Promise){if(!1===n.async)throw new CT;return a.then(t=>e._zod.parse(t,n))}return e._zod.parse(a,n)};e._zod.run=(o,n)=>{if(n.skipChecks)return e._zod.parse(o,n);if("backward"===n.direction){let t=e._zod.parse({value:o.value,issues:[]},{...n,skipChecks:!0});return t instanceof Promise?t.then(e=>r(e,o,n)):r(t,o,n)}let a=e._zod.parse(o,n);if(a instanceof Promise){if(!1===n.async)throw new CT;return a.then(e=>t(e,i,n))}return t(a,i,n)}}To(e,"~standard",()=>({validate:t=>{try{let r=TK(e,t);return r.success?{value:r.data}:{issues:r.error?.issues}}catch(r){return TZ(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:"zod",version:1}))}),TY=CC("$ZodString",(e,t)=>{var r;let i;TX.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??(i=(r=e._zod.bag)?`[\\s\\S]{${r?.minimum??0},${r?.maximum??""}}`:"[\\s\\S]*",RegExp(`^${i}$`)),e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=String(r.value)}catch(e){}return"string"==typeof r.value||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),T1=CC("$ZodStringFormat",(e,t)=>{TT.init(e,t),TY.init(e,t)}),T0=CC("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=CU),T1.init(e,t)}),T2=CC("$ZodUUID",(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(void 0===e)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=CH(e))}else t.pattern??(t.pattern=CH());T1.init(e,t)}),T4=CC("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=CG),T1.init(e,t)}),T6=CC("$ZodURL",(e,t)=>{T1.init(e,t),e._zod.check=r=>{try{let i=r.value.trim();if(!t.normalize&&t.protocol?.source===CY.source&&!/^https?:\/\//i.test(i))return void r.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:r.value,inst:e,continue:!t.abort});let o=new URL(i);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(o.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(o.protocol.endsWith(":")?o.protocol.slice(0,-1):o.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),t.normalize?r.value=o.href:r.value=i;return}catch(i){r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),T3=CC("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),T1.init(e,t)}),T9=CC("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=CF),T1.init(e,t)}),T5=CC("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=CM),T1.init(e,t)}),T8=CC("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=CW),T1.init(e,t)}),T7=CC("$ZodULID",(e,t)=>{t.pattern??(t.pattern=CN),T1.init(e,t)}),Oe=CC("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Cz),T1.init(e,t)}),Ot=CC("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=CD),T1.init(e,t)}),Or=CC("$ZodISODateTime",(e,t)=>{let r,i,o;t.pattern??(r=C4({precision:t.precision}),i=["Z"],t.local&&i.push(""),t.offset&&i.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)"),o=`${r}(?:${i.join("|")})`,t.pattern=RegExp(`^${C0}T(?:${o})$`)),T1.init(e,t)}),Oi=CC("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=C2),T1.init(e,t)}),Oo=CC("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=RegExp(`^${C4(t)}$`)),T1.init(e,t)}),On=CC("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=CL),T1.init(e,t)}),Oa=CC("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=CB),T1.init(e,t),e._zod.bag.format="ipv4"}),Os=CC("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=CK),T1.init(e,t),e._zod.bag.format="ipv6",e._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}}),Od=CC("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=CJ),T1.init(e,t)}),Oc=CC("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=CZ),T1.init(e,t),e._zod.check=r=>{let i=r.value.split("/");try{if(2!==i.length)throw Error();let[e,t]=i;if(!t)throw Error();let r=Number(t);if(`${r}`!==t||r<0||r>128)throw Error();new URL(`http://[${e}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}}});function Ol(e){if(""===e)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}let Op=CC("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=CQ),T1.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=r=>{Ol(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}}),Ou=CC("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=CX),T1.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=r=>{!function(e){if(!CX.test(e))return!1;let t=e.replace(/[-_]/g,e=>"-"===e?"+":"/");return Ol(t.padEnd(4*Math.ceil(t.length/4),"="))}(r.value)&&r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),Om=CC("$ZodE164",(e,t)=>{t.pattern??(t.pattern=C1),T1.init(e,t)}),Of=CC("$ZodJWT",(e,t)=>{T1.init(e,t),e._zod.check=r=>{!function(e,t=null){try{let r=e.split(".");if(3!==r.length)return!1;let[i]=r;if(!i)return!1;let o=JSON.parse(atob(i));if("typ"in o&&o?.typ!=="JWT"||!o.alg||t&&(!("alg"in o)||o.alg!==t))return!1;return!0}catch{return!1}}(r.value,t.alg)&&r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),Oh=CC("$ZodNumber",(e,t)=>{TX.init(e,t),e._zod.pattern=e._zod.bag.pattern??C3,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=Number(r.value)}catch(e){}let o=r.value;if("number"==typeof o&&!Number.isNaN(o)&&Number.isFinite(o))return r;let n="number"==typeof o?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:o,inst:e,...n?{received:n}:{}}),r}}),Oy=CC("$ZodNumberFormat",(e,t)=>{TI.init(e,t),Oh.init(e,t)}),Og=CC("$ZodBoolean",(e,t)=>{TX.init(e,t),e._zod.pattern=C9,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=!!r.value}catch(e){}let o=r.value;return"boolean"==typeof o||r.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:e}),r}}),O_=CC("$ZodUnknown",(e,t)=>{TX.init(e,t),e._zod.parse=e=>e}),Ov=CC("$ZodNever",(e,t)=>{TX.init(e,t),e._zod.parse=(t,r)=>(t.issues.push({expected:"never",code:"invalid_type",input:t.value,inst:e}),t)});function Ob(e,t,r){e.issues.length&&t.issues.push(...Tv(r,e.issues)),t.value[r]=e.value}let O$=CC("$ZodArray",(e,t)=>{TX.init(e,t),e._zod.parse=(r,i)=>{let o=r.value;if(!Array.isArray(o))return r.issues.push({expected:"array",code:"invalid_type",input:o,inst:e}),r;r.value=Array(o.length);let n=[];for(let e=0;eOb(t,r,e))):Ob(s,r,e)}return n.length?Promise.all(n).then(()=>r):r}});function OS(e,t,r,i,o,n){let a=r in i;if(e.issues.length){if(o&&n&&!a)return;t.issues.push(...Tv(r,e.issues))}if(!a&&!o){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[r]});return}void 0===e.value?a&&(t.value[r]=void 0):t.value[r]=e.value}function Ok(e){var t;let r=Object.keys(e.shape);for(let t of r)if(!e.shape?.[t]?._zod?.traits?.has("$ZodType"))throw Error(`Invalid element at key "${t}": expected a Zod schema`);let i=Object.keys(t=e.shape).filter(e=>"optional"===t[e]._zod.optin&&"optional"===t[e]._zod.optout);return{...e,keys:r,keySet:new Set(r),numKeys:r.length,optionalKeys:new Set(i)}}function Ow(e,t,r,i,o,n){let a=[],s=o.keySet,d=o.catchall._zod,c=d.def.type,l="optional"===d.optin,p="optional"===d.optout;for(let o in t){if("__proto__"===o||s.has(o))continue;if("never"===c){a.push(o);continue}let n=d.run({value:t[o],issues:[]},i);n instanceof Promise?e.push(n.then(e=>OS(e,r,o,t,l,p))):OS(n,r,o,t,l,p)}return(a.length&&r.issues.push({code:"unrecognized_keys",keys:a,input:t,inst:n}),e.length)?Promise.all(e).then(()=>r):r}let OR=CC("$ZodObject",(e,t)=>{let r;TX.init(e,t);let i=Object.getOwnPropertyDescriptor(t,"shape");if(!i?.get){let e=t.shape;Object.defineProperty(t,"shape",{get:()=>{let r={...e};return Object.defineProperty(t,"shape",{value:r}),r}})}let o=Tt(()=>Ok(t));To(e._zod,"propValues",()=>{let e=t.shape,r={};for(let t in e){let i=e[t]._zod;if(i.values)for(let e of(r[t]??(r[t]=new Set),i.values))r[t].add(e)}return r});let n=t.catchall;e._zod.parse=(t,i)=>{r??(r=o.value);let a=t.value;if(!Tc(a))return t.issues.push({expected:"object",code:"invalid_type",input:a,inst:e}),t;t.value={};let s=[],d=r.shape;for(let e of r.keys){let r=d[e],o="optional"===r._zod.optin,n="optional"===r._zod.optout,c=r._zod.run({value:a[e],issues:[]},i);c instanceof Promise?s.push(c.then(r=>OS(r,t,e,a,o,n))):OS(c,t,e,a,o,n)}return n?Ow(s,a,t,i,o.value,e):s.length?Promise.all(s).then(()=>t):t}}),OP=CC("$ZodObjectJIT",(e,t)=>{let r,i;OR.init(e,t);let o=e._zod.parse,n=Tt(()=>Ok(t)),a=!CE.jitless,s=a&&Tl.value,d=t.catchall;e._zod.parse=(c,l)=>{i??(i=n.value);let p=c.value;return Tc(p)?a&&s&&l?.async===!1&&!0!==l.jitless?(r||(r=(e=>{let t=new TD(["shape","payload","ctx"]),r=n.value,i=e=>{let t=Ts(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write("const input = payload.value;");let o=Object.create(null),a=0;for(let e of r.keys)o[e]=`key_${a++}`;for(let n of(t.write("const newResult = {};"),r.keys)){let r=o[n],a=Ts(n),s=e[n],d=s?._zod?.optin==="optional",c=s?._zod?.optout==="optional";t.write(`const ${r} = ${i(n)};`),d&&c?t.write(` if (${r}.issues.length) { if (${a} in input) { payload.issues = payload.issues.concat(${r}.issues.map(iss => ({ @@ -142,13 +142,13 @@ ${n} } } - `)}t.write("payload.value = newResult;"),t.write("return payload;");let s=t.compile();return(t,r)=>s(e,t,r)})(t.shape)),c=r(c,l),d)?OY([],p,c,l,i,e):c:o(c,l):(c.issues.push({expected:"object",code:"invalid_type",input:p,inst:e}),c)}});function O2(e,t,r,i){for(let r of e)if(0===r.issues.length)return t.value=r.value,t;let o=e.filter(e=>!TB(e));return 1===o.length?(t.value=o[0].value,o[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(e=>e.issues.map(e=>TZ(e,i,Tt())))}),t)}let O4=C5("$ZodUnion",(e,t)=>{Og.init(e,t),TT(e._zod,"optin",()=>t.options.some(e=>"optional"===e._zod.optin)?"optional":void 0),TT(e._zod,"optout",()=>t.options.some(e=>"optional"===e._zod.optout)?"optional":void 0),TT(e._zod,"values",()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),TT(e._zod,"pattern",()=>{if(t.options.every(e=>e._zod.pattern)){let e=t.options.map(e=>e._zod.pattern);return RegExp(`^(${e.map(e=>Tj(e.source)).join("|")})$`)}});let r=1===t.options.length?t.options[0]._zod.run:null;e._zod.parse=(i,o)=>{if(r)return r(i,o);let n=!1,a=[];for(let e of t.options){let t=e._zod.run({value:i.value,issues:[]},o);if(t instanceof Promise)a.push(t),n=!0;else{if(0===t.issues.length)return t;a.push(t)}}return n?Promise.all(a).then(t=>O2(t,i,e,o)):O2(a,i,e,o)}}),O6=C5("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,O4.init(e,t);let r=e._zod.parse;TT(e._zod,"propValues",()=>{let e={};for(let r of t.options){let i=r._zod.propValues;if(!i||0===Object.keys(i).length)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(r)}"`);for(let[t,r]of Object.entries(i))for(let i of(e[t]||(e[t]=new Set),r))e[t].add(i)}return e});let i=Tx(()=>{let e=t.options,r=new Map;for(let i of e){let e=i._zod.propValues?.[t.discriminator];if(!e||0===e.size)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(i)}"`);for(let t of e){if(r.has(t))throw Error(`Duplicate discriminator value "${String(t)}"`);r.set(t,i)}}return r});e._zod.parse=(o,n)=>{let a=o.value;if(!TM(a))return o.issues.push({code:"invalid_type",expected:"object",input:a,inst:e}),o;let s=i.value.get(a?.[t.discriminator]);return s?s._zod.run(o,n):t.unionFallback||"backward"===n.direction?r(o,n):(o.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,options:Array.from(i.value.keys()),input:a,path:[t.discriminator],inst:e}),o)}}),O3=C5("$ZodIntersection",(e,t)=>{Og.init(e,t),e._zod.parse=(e,r)=>{let i=e.value,o=t.left._zod.run({value:i,issues:[]},r),n=t.right._zod.run({value:i,issues:[]},r);return o instanceof Promise||n instanceof Promise?Promise.all([o,n]).then(([t,r])=>O9(e,t,r)):O9(e,o,n)}});function O9(e,t,r){let i,o=new Map;for(let r of t.issues)if("unrecognized_keys"===r.code)for(let e of(i??(i=r),r.keys))o.has(e)||o.set(e,{}),o.get(e).l=!0;else e.issues.push(r);for(let t of r.issues)if("unrecognized_keys"===t.code)for(let e of t.keys)o.has(e)||o.set(e,{}),o.get(e).r=!0;else e.issues.push(t);let n=[...o].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(n.length&&i&&e.issues.push({...i,keys:n}),TB(e))return e;let a=function e(t,r){if(t===r||t instanceof Date&&r instanceof Date&&+t==+r)return{valid:!0,data:t};if(Tz(t)&&Tz(r)){let i=Object.keys(r),o=Object.keys(t).filter(e=>-1!==i.indexOf(e)),n={...t,...r};for(let i of o){let o=e(t[i],r[i]);if(!o.valid)return{valid:!1,mergeErrorPath:[i,...o.mergeErrorPath]};n[i]=o.data}return{valid:!0,data:n}}if(Array.isArray(t)&&Array.isArray(r)){if(t.length!==r.length)return{valid:!1,mergeErrorPath:[]};let i=[];for(let o=0;o{Og.init(e,t);let r=t.items;e._zod.parse=(i,o)=>{let n=i.value;if(!Array.isArray(n))return i.issues.push({input:n,inst:e,expected:"tuple",code:"invalid_type"}),i;i.value=[];let a=[],s=O8(r,"optin"),d=O8(r,"optout");if(!t.rest){if(n.lengthr.length&&i.issues.push({code:"too_big",maximum:r.length,inclusive:!0,input:n,inst:e,origin:"array"})}let c=Array(r.length);for(let e=0;e{c[e]=t})):c[e]=t}if(t.rest){let e=r.length-1;for(let s of n.slice(r.length)){e++;let r=t.rest._zod.run({value:s,issues:[]},o);r instanceof Promise?a.push(r.then(t=>O7(t,i,e))):O7(r,i,e)}}return a.length?Promise.all(a).then(()=>Ee(c,i,r,n,d)):Ee(c,i,r,n,d)}});function O8(e,t){for(let r=e.length-1;r>=0;r--)if("optional"!==e[r]._zod[t])return r+1;return 0}function O7(e,t,r){e.issues.length&&t.issues.push(...TK(r,e.issues)),t.value[r]=e.value}function Ee(e,t,r,i,o){for(let n=0;n=o){t.value.length=n;break}t.issues.push(...TK(n,r.issues))}t.value[n]=r.value}for(let e=t.value.length-1;e>=i.length;e--)if("optional"===r[e]._zod.optout&&void 0===t.value[e])t.value.length=e;else break;return t}let Et=C5("$ZodRecord",(e,t)=>{Og.init(e,t),e._zod.parse=(r,i)=>{let o=r.value;if(!Tz(o))return r.issues.push({expected:"record",code:"invalid_type",input:o,inst:e}),r;let n=[],a=t.keyType._zod.values;if(a){let s;r.value={};let d=new Set;for(let s of a)if("string"==typeof s||"number"==typeof s||"symbol"==typeof s){d.add("number"==typeof s?s.toString():s);let a=t.keyType._zod.run({value:s,issues:[]},i);if(a instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(a.issues.length){r.issues.push({code:"invalid_key",origin:"record",issues:a.issues.map(e=>TZ(e,i,Tt())),input:s,path:[s],inst:e});continue}let c=a.value,l=t.valueType._zod.run({value:o[s],issues:[]},i);l instanceof Promise?n.push(l.then(e=>{e.issues.length&&r.issues.push(...TK(s,e.issues)),r.value[c]=e.value})):(l.issues.length&&r.issues.push(...TK(s,l.issues)),r.value[c]=l.value)}for(let e in o)d.has(e)||(s=s??[]).push(e);s&&s.length>0&&r.issues.push({code:"unrecognized_keys",input:o,inst:e,keys:s})}else for(let a of(r.value={},Reflect.ownKeys(o))){if("__proto__"===a||!Object.prototype.propertyIsEnumerable.call(o,a))continue;let s=t.keyType._zod.run({value:a,issues:[]},i);if(s instanceof Promise)throw Error("Async schemas not supported in object keys currently");if("string"==typeof a&&Tw.test(a)&&s.issues.length){let e=t.keyType._zod.run({value:Number(a),issues:[]},i);if(e instanceof Promise)throw Error("Async schemas not supported in object keys currently");0===e.issues.length&&(s=e)}if(s.issues.length){"loose"===t.mode?r.value[a]=o[a]:r.issues.push({code:"invalid_key",origin:"record",issues:s.issues.map(e=>TZ(e,i,Tt())),input:a,path:[a],inst:e});continue}let d=t.valueType._zod.run({value:o[a],issues:[]},i);d instanceof Promise?n.push(d.then(e=>{e.issues.length&&r.issues.push(...TK(a,e.issues)),r.value[s.value]=e.value})):(d.issues.length&&r.issues.push(...TK(a,d.issues)),r.value[s.value]=d.value)}return n.length?Promise.all(n).then(()=>r):r}}),Er=C5("$ZodEnum",(e,t)=>{Og.init(e,t);let r=Tq(t.entries),i=new Set(r);e._zod.values=i,e._zod.pattern=RegExp(`^(${r.filter(e=>TF.has(typeof e)).map(e=>"string"==typeof e?TL(e):e.toString()).join("|")})$`),e._zod.parse=(t,o)=>{let n=t.value;return i.has(n)||t.issues.push({code:"invalid_value",values:r,input:n,inst:e}),t}}),Ei=C5("$ZodLiteral",(e,t)=>{if(Og.init(e,t),0===t.values.length)throw Error("Cannot create literal schema with no valid values");let r=new Set(t.values);e._zod.values=r,e._zod.pattern=RegExp(`^(${t.values.map(e=>"string"==typeof e?TL(e):e?TL(e.toString()):String(e)).join("|")})$`),e._zod.parse=(i,o)=>{let n=i.value;return r.has(n)||i.issues.push({code:"invalid_value",values:t.values,input:n,inst:e}),i}}),Eo=C5("$ZodTransform",(e,t)=>{Og.init(e,t),e._zod.optin="optional",e._zod.parse=(r,i)=>{if("backward"===i.direction)throw new C7(e.constructor.name);let o=t.transform(r.value,r);if(i.async)return(o instanceof Promise?o:Promise.resolve(o)).then(e=>(r.value=e,r.fallback=!0,r));if(o instanceof Promise)throw new C8;return r.value=o,r.fallback=!0,r}});function En(e,t){return void 0===t&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}let Ea=C5("$ZodOptional",(e,t)=>{Og.init(e,t),e._zod.optin="optional",e._zod.optout="optional",TT(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),TT(e._zod,"pattern",()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${Tj(e.source)})?$`):void 0}),e._zod.parse=(e,r)=>{if("optional"===t.innerType._zod.optin){let i=e.value,o=t.innerType._zod.run(e,r);return o instanceof Promise?o.then(e=>En(e,i)):En(o,i)}return void 0===e.value?e:t.innerType._zod.run(e,r)}}),Es=C5("$ZodExactOptional",(e,t)=>{Ea.init(e,t),TT(e._zod,"values",()=>t.innerType._zod.values),TT(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(e,r)=>t.innerType._zod.run(e,r)}),Ed=C5("$ZodNullable",(e,t)=>{Og.init(e,t),TT(e._zod,"optin",()=>t.innerType._zod.optin),TT(e._zod,"optout",()=>t.innerType._zod.optout),TT(e._zod,"pattern",()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${Tj(e.source)}|null)$`):void 0}),TT(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,r)=>null===e.value?e:t.innerType._zod.run(e,r)}),Ec=C5("$ZodDefault",(e,t)=>{Og.init(e,t),e._zod.optin="optional",TT(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,r)=>{if("backward"===r.direction)return t.innerType._zod.run(e,r);if(void 0===e.value)return e.value=t.defaultValue,e;let i=t.innerType._zod.run(e,r);return i instanceof Promise?i.then(e=>El(e,t)):El(i,t)}});function El(e,t){return void 0===e.value&&(e.value=t.defaultValue),e}let Ep=C5("$ZodPrefault",(e,t)=>{Og.init(e,t),e._zod.optin="optional",TT(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,r)=>("backward"===r.direction||void 0===e.value&&(e.value=t.defaultValue),t.innerType._zod.run(e,r))}),Eu=C5("$ZodNonOptional",(e,t)=>{Og.init(e,t),TT(e._zod,"values",()=>{let e=t.innerType._zod.values;return e?new Set([...e].filter(e=>void 0!==e)):void 0}),e._zod.parse=(r,i)=>{let o=t.innerType._zod.run(r,i);return o instanceof Promise?o.then(t=>Em(t,e)):Em(o,e)}});function Em(e,t){return e.issues.length||void 0!==e.value||e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}let Ef=C5("$ZodCatch",(e,t)=>{Og.init(e,t),e._zod.optin="optional",TT(e._zod,"optout",()=>t.innerType._zod.optout),TT(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,r)=>{if("backward"===r.direction)return t.innerType._zod.run(e,r);let i=t.innerType._zod.run(e,r);return i instanceof Promise?i.then(i=>(e.value=i.value,i.issues.length&&(e.value=t.catchValue({...e,error:{issues:i.issues.map(e=>TZ(e,r,Tt()))},input:e.value}),e.issues=[],e.fallback=!0),e)):(e.value=i.value,i.issues.length&&(e.value=t.catchValue({...e,error:{issues:i.issues.map(e=>TZ(e,r,Tt()))},input:e.value}),e.issues=[],e.fallback=!0),e)}}),Eh=C5("$ZodPipe",(e,t)=>{Og.init(e,t),TT(e._zod,"values",()=>t.in._zod.values),TT(e._zod,"optin",()=>t.in._zod.optin),TT(e._zod,"optout",()=>t.out._zod.optout),TT(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(e,r)=>{if("backward"===r.direction){let i=t.out._zod.run(e,r);return i instanceof Promise?i.then(e=>Ey(e,t.in,r)):Ey(i,t.in,r)}let i=t.in._zod.run(e,r);return i instanceof Promise?i.then(e=>Ey(e,t.out,r)):Ey(i,t.out,r)}});function Ey(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},r)}let Eg=C5("$ZodReadonly",(e,t)=>{Og.init(e,t),TT(e._zod,"propValues",()=>t.innerType._zod.propValues),TT(e._zod,"values",()=>t.innerType._zod.values),TT(e._zod,"optin",()=>t.innerType?._zod?.optin),TT(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(e,r)=>{if("backward"===r.direction)return t.innerType._zod.run(e,r);let i=t.innerType._zod.run(e,r);return i instanceof Promise?i.then(E_):E_(i)}});function E_(e){return e.value=Object.freeze(e.value),e}let Ev=C5("$ZodCustom",(e,t)=>{TY.init(e,t),Og.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=r=>{let i=r.value,o=t.fn(i);if(o instanceof Promise)return o.then(t=>Eb(t,r,i,e));Eb(o,r,i,e)}});function Eb(e,t,r,i){if(!e){let e={code:"custom",input:r,inst:i,path:[...i._zod.def.path??[]],continue:!i._zod.def.abort};i._zod.def.params&&(e.params=i._zod.def.params),t.issues.push(TX(e))}}Symbol("ZodOutput"),Symbol("ZodInput");(ea=globalThis).__zod_globalRegistry??(ea.__zod_globalRegistry=new class e{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let r=t[0];return this._map.set(e,r),r&&"object"==typeof r&&"id"in r&&this._idmap.set(r.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&"object"==typeof t&&"id"in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let r={...this.get(t)??{}};delete r.id;let i={...r,...this._map.get(e)};return Object.keys(i).length?i:void 0}return this._map.get(e)}has(e){return this._map.has(e)}});let E$=globalThis.__zod_globalRegistry;function ES(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...TH(t)})}function Ek(e,t){return new T0({check:"less_than",...TH(t),value:e,inclusive:!1})}function Ew(e,t){return new T0({check:"less_than",...TH(t),value:e,inclusive:!0})}function EV(e,t){return new T2({check:"greater_than",...TH(t),value:e,inclusive:!1})}function EP(e,t){return new T2({check:"greater_than",...TH(t),value:e,inclusive:!0})}function ER(e,t){return new T4({check:"multiple_of",...TH(t),value:e})}function Eq(e,t){return new T3({check:"max_length",...TH(t),maximum:e})}function EI(e,t){return new T9({check:"min_length",...TH(t),minimum:e})}function Ex(e,t){return new T5({check:"length_equals",...TH(t),length:e})}function Ej(e){return new On({check:"overwrite",tx:e})}function EC(e){let t=e?.target??"draft-2020-12";return"draft-4"===t&&(t="draft-04"),"draft-7"===t&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??E$,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function ET(e,t,r={path:[],schemaPath:[]}){var i;let o=e._zod.def,n=t.seen.get(e);if(n)return n.count++,r.schemaPath.includes(e)&&(n.cycle=r.path),n.schema;let a={schema:{},count:1,cycle:void 0,path:r.path};t.seen.set(e,a);let s=e._zod.toJSONSchema?.();if(s)a.schema=s;else{let i={...r,schemaPath:[...r.schemaPath,e],path:r.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,a.schema,i);else{let r=a.schema,n=t.processors[o.type];if(!n)throw Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);n(e,t,r,i)}let n=e._zod.parent;n&&(a.ref||(a.ref=n),ET(n,t,i),t.seen.get(n).isParent=!0)}let d=t.metadataRegistry.get(e);return d&&Object.assign(a.schema,d),"input"===t.io&&function e(t,r){let i=r??{seen:new Set};if(i.seen.has(t))return!1;i.seen.add(t);let o=t._zod.def;if("transform"===o.type)return!0;if("array"===o.type)return e(o.element,i);if("set"===o.type)return e(o.valueType,i);if("lazy"===o.type)return e(o.getter(),i);if("promise"===o.type||"optional"===o.type||"nonoptional"===o.type||"nullable"===o.type||"readonly"===o.type||"default"===o.type||"prefault"===o.type)return e(o.innerType,i);if("intersection"===o.type)return e(o.left,i)||e(o.right,i);if("record"===o.type||"map"===o.type)return e(o.keyType,i)||e(o.valueType,i);if("pipe"===o.type)return!!t._zod.traits.has("$ZodCodec")||e(o.in,i)||e(o.out,i);if("object"===o.type){for(let t in o.shape)if(e(o.shape[t],i))return!0;return!1}if("union"===o.type){for(let t of o.options)if(e(t,i))return!0;return!1}if("tuple"===o.type){for(let t of o.items)if(e(t,i))return!0;if(o.rest&&e(o.rest,i))return!0}return!1}(e)&&(delete a.schema.examples,delete a.schema.default),"input"===t.io&&"_prefault"in a.schema&&((i=a.schema).default??(i.default=a.schema._prefault)),delete a.schema._prefault,t.seen.get(e).schema}function EO(e,t){let r=e.seen.get(t);if(!r)throw Error("Unprocessed schema. This is a bug in Zod.");let i=new Map;for(let t of e.seen.entries()){let r=e.metadataRegistry.get(t[0])?.id;if(r){let e=i.get(r);if(e&&e!==t[0])throw Error(`Duplicate schema id "${r}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);i.set(r,t[0])}}let o=t=>{if(t[1].schema.$ref)return;let i=t[1],{ref:o,defId:n}=(t=>{let i="draft-2020-12"===e.target?"$defs":"definitions";if(e.external){let r=e.external.registry.get(t[0])?.id,o=e.external.uri??(e=>e);if(r)return{ref:o(r)};let n=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=n,{defId:n,ref:`${o("__shared")}#/${i}/${n}`}}if(t[1]===r)return{ref:"#"};let o=`#/${i}/`,n=t[1].schema.id??`__schema${e.counter++}`;return{defId:n,ref:o+n}})(t);i.def={...i.schema},n&&(i.defId=n);let a=i.schema;for(let e in a)delete a[e];a.$ref=o};if("throw"===e.cycles)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join("/")}/ + `)}t.write("payload.value = newResult;"),t.write("return payload;");let s=t.compile();return(t,r)=>s(e,t,r)})(t.shape)),c=r(c,l),d)?Ow([],p,c,l,i,e):c:o(c,l):(c.issues.push({expected:"object",code:"invalid_type",input:p,inst:e}),c)}});function OV(e,t,r,i){for(let r of e)if(0===r.issues.length)return t.value=r.value,t;let o=e.filter(e=>!T_(e));return 1===o.length?(t.value=o[0].value,o[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(e=>e.issues.map(e=>T$(e,i,CA())))}),t)}let Oq=CC("$ZodUnion",(e,t)=>{TX.init(e,t),To(e._zod,"optin",()=>t.options.some(e=>"optional"===e._zod.optin)?"optional":void 0),To(e._zod,"optout",()=>t.options.some(e=>"optional"===e._zod.optout)?"optional":void 0),To(e._zod,"values",()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),To(e._zod,"pattern",()=>{if(t.options.every(e=>e._zod.pattern)){let e=t.options.map(e=>e._zod.pattern);return RegExp(`^(${e.map(e=>Tr(e.source)).join("|")})$`)}});let r=1===t.options.length?t.options[0]._zod.run:null;e._zod.parse=(i,o)=>{if(r)return r(i,o);let n=!1,a=[];for(let e of t.options){let t=e._zod.run({value:i.value,issues:[]},o);if(t instanceof Promise)a.push(t),n=!0;else{if(0===t.issues.length)return t;a.push(t)}}return n?Promise.all(a).then(t=>OV(t,i,e,o)):OV(a,i,e,o)}}),OI=CC("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,Oq.init(e,t);let r=e._zod.parse;To(e._zod,"propValues",()=>{let e={};for(let r of t.options){let i=r._zod.propValues;if(!i||0===Object.keys(i).length)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(r)}"`);for(let[t,r]of Object.entries(i))for(let i of(e[t]||(e[t]=new Set),r))e[t].add(i)}return e});let i=Tt(()=>{let e=t.options,r=new Map;for(let i of e){let e=i._zod.propValues?.[t.discriminator];if(!e||0===e.size)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(i)}"`);for(let t of e){if(r.has(t))throw Error(`Duplicate discriminator value "${String(t)}"`);r.set(t,i)}}return r});e._zod.parse=(o,n)=>{let a=o.value;if(!Tc(a))return o.issues.push({code:"invalid_type",expected:"object",input:a,inst:e}),o;let s=i.value.get(a?.[t.discriminator]);return s?s._zod.run(o,n):t.unionFallback||"backward"===n.direction?r(o,n):(o.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,options:Array.from(i.value.keys()),input:a,path:[t.discriminator],inst:e}),o)}}),Ox=CC("$ZodIntersection",(e,t)=>{TX.init(e,t),e._zod.parse=(e,r)=>{let i=e.value,o=t.left._zod.run({value:i,issues:[]},r),n=t.right._zod.run({value:i,issues:[]},r);return o instanceof Promise||n instanceof Promise?Promise.all([o,n]).then(([t,r])=>Oj(e,t,r)):Oj(e,o,n)}});function Oj(e,t,r){let i,o=new Map;for(let r of t.issues)if("unrecognized_keys"===r.code)for(let e of(i??(i=r),r.keys))o.has(e)||o.set(e,{}),o.get(e).l=!0;else e.issues.push(r);for(let t of r.issues)if("unrecognized_keys"===t.code)for(let e of t.keys)o.has(e)||o.set(e,{}),o.get(e).r=!0;else e.issues.push(t);let n=[...o].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(n.length&&i&&e.issues.push({...i,keys:n}),T_(e))return e;let a=function e(t,r){if(t===r||t instanceof Date&&r instanceof Date&&+t==+r)return{valid:!0,data:t};if(Tp(t)&&Tp(r)){let i=Object.keys(r),o=Object.keys(t).filter(e=>-1!==i.indexOf(e)),n={...t,...r};for(let i of o){let o=e(t[i],r[i]);if(!o.valid)return{valid:!1,mergeErrorPath:[i,...o.mergeErrorPath]};n[i]=o.data}return{valid:!0,data:n}}if(Array.isArray(t)&&Array.isArray(r)){if(t.length!==r.length)return{valid:!1,mergeErrorPath:[]};let i=[];for(let o=0;o{TX.init(e,t);let r=t.items;e._zod.parse=(i,o)=>{let n=i.value;if(!Array.isArray(n))return i.issues.push({input:n,inst:e,expected:"tuple",code:"invalid_type"}),i;i.value=[];let a=[],s=OT(r,"optin"),d=OT(r,"optout");if(!t.rest){if(n.lengthr.length&&i.issues.push({code:"too_big",maximum:r.length,inclusive:!0,input:n,inst:e,origin:"array"})}let c=Array(r.length);for(let e=0;e{c[e]=t})):c[e]=t}if(t.rest){let e=r.length-1;for(let s of n.slice(r.length)){e++;let r=t.rest._zod.run({value:s,issues:[]},o);r instanceof Promise?a.push(r.then(t=>OO(t,i,e))):OO(r,i,e)}}return a.length?Promise.all(a).then(()=>OE(c,i,r,n,d)):OE(c,i,r,n,d)}});function OT(e,t){for(let r=e.length-1;r>=0;r--)if("optional"!==e[r]._zod[t])return r+1;return 0}function OO(e,t,r){e.issues.length&&t.issues.push(...Tv(r,e.issues)),t.value[r]=e.value}function OE(e,t,r,i,o){for(let n=0;n=o){t.value.length=n;break}t.issues.push(...Tv(n,r.issues))}t.value[n]=r.value}for(let e=t.value.length-1;e>=i.length;e--)if("optional"===r[e]._zod.optout&&void 0===t.value[e])t.value.length=e;else break;return t}let OA=CC("$ZodRecord",(e,t)=>{TX.init(e,t),e._zod.parse=(r,i)=>{let o=r.value;if(!Tp(o))return r.issues.push({expected:"record",code:"invalid_type",input:o,inst:e}),r;let n=[],a=t.keyType._zod.values;if(a){let s;r.value={};let d=new Set;for(let s of a)if("string"==typeof s||"number"==typeof s||"symbol"==typeof s){d.add("number"==typeof s?s.toString():s);let a=t.keyType._zod.run({value:s,issues:[]},i);if(a instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(a.issues.length){r.issues.push({code:"invalid_key",origin:"record",issues:a.issues.map(e=>T$(e,i,CA())),input:s,path:[s],inst:e});continue}let c=a.value,l=t.valueType._zod.run({value:o[s],issues:[]},i);l instanceof Promise?n.push(l.then(e=>{e.issues.length&&r.issues.push(...Tv(s,e.issues)),r.value[c]=e.value})):(l.issues.length&&r.issues.push(...Tv(s,l.issues)),r.value[c]=l.value)}for(let e in o)d.has(e)||(s=s??[]).push(e);s&&s.length>0&&r.issues.push({code:"unrecognized_keys",input:o,inst:e,keys:s})}else for(let a of(r.value={},Reflect.ownKeys(o))){if("__proto__"===a||!Object.prototype.propertyIsEnumerable.call(o,a))continue;let s=t.keyType._zod.run({value:a,issues:[]},i);if(s instanceof Promise)throw Error("Async schemas not supported in object keys currently");if("string"==typeof a&&C3.test(a)&&s.issues.length){let e=t.keyType._zod.run({value:Number(a),issues:[]},i);if(e instanceof Promise)throw Error("Async schemas not supported in object keys currently");0===e.issues.length&&(s=e)}if(s.issues.length){"loose"===t.mode?r.value[a]=o[a]:r.issues.push({code:"invalid_key",origin:"record",issues:s.issues.map(e=>T$(e,i,CA())),input:a,path:[a],inst:e});continue}let d=t.valueType._zod.run({value:o[a],issues:[]},i);d instanceof Promise?n.push(d.then(e=>{e.issues.length&&r.issues.push(...Tv(a,e.issues)),r.value[s.value]=e.value})):(d.issues.length&&r.issues.push(...Tv(a,d.issues)),r.value[s.value]=d.value)}return n.length?Promise.all(n).then(()=>r):r}}),OM=CC("$ZodEnum",(e,t)=>{TX.init(e,t);let r=C7(t.entries),i=new Set(r);e._zod.values=i,e._zod.pattern=RegExp(`^(${r.filter(e=>Tm.has(typeof e)).map(e=>"string"==typeof e?Tf(e):e.toString()).join("|")})$`),e._zod.parse=(t,o)=>{let n=t.value;return i.has(n)||t.issues.push({code:"invalid_value",values:r,input:n,inst:e}),t}}),OW=CC("$ZodLiteral",(e,t)=>{if(TX.init(e,t),0===t.values.length)throw Error("Cannot create literal schema with no valid values");let r=new Set(t.values);e._zod.values=r,e._zod.pattern=RegExp(`^(${t.values.map(e=>"string"==typeof e?Tf(e):e?Tf(e.toString()):String(e)).join("|")})$`),e._zod.parse=(i,o)=>{let n=i.value;return r.has(n)||i.issues.push({code:"invalid_value",values:t.values,input:n,inst:e}),i}}),ON=CC("$ZodTransform",(e,t)=>{TX.init(e,t),e._zod.optin="optional",e._zod.parse=(r,i)=>{if("backward"===i.direction)throw new CO(e.constructor.name);let o=t.transform(r.value,r);if(i.async)return(o instanceof Promise?o:Promise.resolve(o)).then(e=>(r.value=e,r.fallback=!0,r));if(o instanceof Promise)throw new CT;return r.value=o,r.fallback=!0,r}});function Oz(e,t){return void 0===t&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}let OD=CC("$ZodOptional",(e,t)=>{TX.init(e,t),e._zod.optin="optional",e._zod.optout="optional",To(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),To(e._zod,"pattern",()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${Tr(e.source)})?$`):void 0}),e._zod.parse=(e,r)=>{if("optional"===t.innerType._zod.optin){let i=e.value,o=t.innerType._zod.run(e,r);return o instanceof Promise?o.then(e=>Oz(e,i)):Oz(o,i)}return void 0===e.value?e:t.innerType._zod.run(e,r)}}),OF=CC("$ZodExactOptional",(e,t)=>{OD.init(e,t),To(e._zod,"values",()=>t.innerType._zod.values),To(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(e,r)=>t.innerType._zod.run(e,r)}),OL=CC("$ZodNullable",(e,t)=>{TX.init(e,t),To(e._zod,"optin",()=>t.innerType._zod.optin),To(e._zod,"optout",()=>t.innerType._zod.optout),To(e._zod,"pattern",()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${Tr(e.source)}|null)$`):void 0}),To(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,r)=>null===e.value?e:t.innerType._zod.run(e,r)}),OU=CC("$ZodDefault",(e,t)=>{TX.init(e,t),e._zod.optin="optional",To(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,r)=>{if("backward"===r.direction)return t.innerType._zod.run(e,r);if(void 0===e.value)return e.value=t.defaultValue,e;let i=t.innerType._zod.run(e,r);return i instanceof Promise?i.then(e=>OH(e,t)):OH(i,t)}});function OH(e,t){return void 0===e.value&&(e.value=t.defaultValue),e}let OG=CC("$ZodPrefault",(e,t)=>{TX.init(e,t),e._zod.optin="optional",To(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,r)=>("backward"===r.direction||void 0===e.value&&(e.value=t.defaultValue),t.innerType._zod.run(e,r))}),OB=CC("$ZodNonOptional",(e,t)=>{TX.init(e,t),To(e._zod,"values",()=>{let e=t.innerType._zod.values;return e?new Set([...e].filter(e=>void 0!==e)):void 0}),e._zod.parse=(r,i)=>{let o=t.innerType._zod.run(r,i);return o instanceof Promise?o.then(t=>OK(t,e)):OK(o,e)}});function OK(e,t){return e.issues.length||void 0!==e.value||e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}let OJ=CC("$ZodCatch",(e,t)=>{TX.init(e,t),e._zod.optin="optional",To(e._zod,"optout",()=>t.innerType._zod.optout),To(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,r)=>{if("backward"===r.direction)return t.innerType._zod.run(e,r);let i=t.innerType._zod.run(e,r);return i instanceof Promise?i.then(i=>(e.value=i.value,i.issues.length&&(e.value=t.catchValue({...e,error:{issues:i.issues.map(e=>T$(e,r,CA()))},input:e.value}),e.issues=[],e.fallback=!0),e)):(e.value=i.value,i.issues.length&&(e.value=t.catchValue({...e,error:{issues:i.issues.map(e=>T$(e,r,CA()))},input:e.value}),e.issues=[],e.fallback=!0),e)}}),OZ=CC("$ZodPipe",(e,t)=>{TX.init(e,t),To(e._zod,"values",()=>t.in._zod.values),To(e._zod,"optin",()=>t.in._zod.optin),To(e._zod,"optout",()=>t.out._zod.optout),To(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(e,r)=>{if("backward"===r.direction){let i=t.out._zod.run(e,r);return i instanceof Promise?i.then(e=>OQ(e,t.in,r)):OQ(i,t.in,r)}let i=t.in._zod.run(e,r);return i instanceof Promise?i.then(e=>OQ(e,t.out,r)):OQ(i,t.out,r)}});function OQ(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},r)}let OX=CC("$ZodReadonly",(e,t)=>{TX.init(e,t),To(e._zod,"propValues",()=>t.innerType._zod.propValues),To(e._zod,"values",()=>t.innerType._zod.values),To(e._zod,"optin",()=>t.innerType?._zod?.optin),To(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(e,r)=>{if("backward"===r.direction)return t.innerType._zod.run(e,r);let i=t.innerType._zod.run(e,r);return i instanceof Promise?i.then(OY):OY(i)}});function OY(e){return e.value=Object.freeze(e.value),e}let O1=CC("$ZodCustom",(e,t)=>{Tw.init(e,t),TX.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=r=>{let i=r.value,o=t.fn(i);if(o instanceof Promise)return o.then(t=>O0(t,r,i,e));O0(o,r,i,e)}});function O0(e,t,r,i){if(!e){let e={code:"custom",input:r,inst:i,path:[...i._zod.def.path??[]],continue:!i._zod.def.abort};i._zod.def.params&&(e.params=i._zod.def.params),t.issues.push(Tk(e))}}Symbol("ZodOutput"),Symbol("ZodInput");(ea=globalThis).__zod_globalRegistry??(ea.__zod_globalRegistry=new class e{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let r=t[0];return this._map.set(e,r),r&&"object"==typeof r&&"id"in r&&this._idmap.set(r.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&"object"==typeof t&&"id"in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let r={...this.get(t)??{}};delete r.id;let i={...r,...this._map.get(e)};return Object.keys(i).length?i:void 0}return this._map.get(e)}has(e){return this._map.has(e)}});let O2=globalThis.__zod_globalRegistry;function O4(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...Ty(t)})}function O6(e,t){return new TP({check:"less_than",...Ty(t),value:e,inclusive:!1})}function O3(e,t){return new TP({check:"less_than",...Ty(t),value:e,inclusive:!0})}function O9(e,t){return new TV({check:"greater_than",...Ty(t),value:e,inclusive:!1})}function O5(e,t){return new TV({check:"greater_than",...Ty(t),value:e,inclusive:!0})}function O8(e,t){return new Tq({check:"multiple_of",...Ty(t),value:e})}function O7(e,t){return new Tx({check:"max_length",...Ty(t),maximum:e})}function Ee(e,t){return new Tj({check:"min_length",...Ty(t),minimum:e})}function Et(e,t){return new TC({check:"length_equals",...Ty(t),length:e})}function Er(e){return new Tz({check:"overwrite",tx:e})}function Ei(e){let t=e?.target??"draft-2020-12";return"draft-4"===t&&(t="draft-04"),"draft-7"===t&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??O2,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function Eo(e,t,r={path:[],schemaPath:[]}){var i;let o=e._zod.def,n=t.seen.get(e);if(n)return n.count++,r.schemaPath.includes(e)&&(n.cycle=r.path),n.schema;let a={schema:{},count:1,cycle:void 0,path:r.path};t.seen.set(e,a);let s=e._zod.toJSONSchema?.();if(s)a.schema=s;else{let i={...r,schemaPath:[...r.schemaPath,e],path:r.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,a.schema,i);else{let r=a.schema,n=t.processors[o.type];if(!n)throw Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);n(e,t,r,i)}let n=e._zod.parent;n&&(a.ref||(a.ref=n),Eo(n,t,i),t.seen.get(n).isParent=!0)}let d=t.metadataRegistry.get(e);return d&&Object.assign(a.schema,d),"input"===t.io&&function e(t,r){let i=r??{seen:new Set};if(i.seen.has(t))return!1;i.seen.add(t);let o=t._zod.def;if("transform"===o.type)return!0;if("array"===o.type)return e(o.element,i);if("set"===o.type)return e(o.valueType,i);if("lazy"===o.type)return e(o.getter(),i);if("promise"===o.type||"optional"===o.type||"nonoptional"===o.type||"nullable"===o.type||"readonly"===o.type||"default"===o.type||"prefault"===o.type)return e(o.innerType,i);if("intersection"===o.type)return e(o.left,i)||e(o.right,i);if("record"===o.type||"map"===o.type)return e(o.keyType,i)||e(o.valueType,i);if("pipe"===o.type)return!!t._zod.traits.has("$ZodCodec")||e(o.in,i)||e(o.out,i);if("object"===o.type){for(let t in o.shape)if(e(o.shape[t],i))return!0;return!1}if("union"===o.type){for(let t of o.options)if(e(t,i))return!0;return!1}if("tuple"===o.type){for(let t of o.items)if(e(t,i))return!0;if(o.rest&&e(o.rest,i))return!0}return!1}(e)&&(delete a.schema.examples,delete a.schema.default),"input"===t.io&&"_prefault"in a.schema&&((i=a.schema).default??(i.default=a.schema._prefault)),delete a.schema._prefault,t.seen.get(e).schema}function En(e,t){let r=e.seen.get(t);if(!r)throw Error("Unprocessed schema. This is a bug in Zod.");let i=new Map;for(let t of e.seen.entries()){let r=e.metadataRegistry.get(t[0])?.id;if(r){let e=i.get(r);if(e&&e!==t[0])throw Error(`Duplicate schema id "${r}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);i.set(r,t[0])}}let o=t=>{if(t[1].schema.$ref)return;let i=t[1],{ref:o,defId:n}=(t=>{let i="draft-2020-12"===e.target?"$defs":"definitions";if(e.external){let r=e.external.registry.get(t[0])?.id,o=e.external.uri??(e=>e);if(r)return{ref:o(r)};let n=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=n,{defId:n,ref:`${o("__shared")}#/${i}/${n}`}}if(t[1]===r)return{ref:"#"};let o=`#/${i}/`,n=t[1].schema.id??`__schema${e.counter++}`;return{defId:n,ref:o+n}})(t);i.def={...i.schema},n&&(i.defId=n);let a=i.schema;for(let e in a)delete a[e];a.$ref=o};if("throw"===e.cycles)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join("/")}/ -Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let r of e.seen.entries()){let i=r[1];if(t===r[0]){o(r);continue}if(e.external){let i=e.external.registry.get(r[0])?.id;if(t!==r[0]&&i){o(r);continue}}if(e.metadataRegistry.get(r[0])?.id||i.cycle||i.count>1&&"ref"===e.reused){o(r);continue}}}function EE(e,t){let r=e.seen.get(t);if(!r)throw Error("Unprocessed schema. This is a bug in Zod.");let i=t=>{let r=e.seen.get(t);if(null===r.ref)return;let o=r.def??r.schema,n={...o},a=r.ref;if(r.ref=null,a){i(a);let r=e.seen.get(a),s=r.schema;if(s.$ref&&("draft-07"===e.target||"draft-04"===e.target||"openapi-3.0"===e.target)?(o.allOf=o.allOf??[],o.allOf.push(s)):Object.assign(o,s),Object.assign(o,n),t._zod.parent===a)for(let e in o)"$ref"!==e&&"allOf"!==e&&(e in n||delete o[e]);if(s.$ref&&r.def)for(let e in o)"$ref"!==e&&"allOf"!==e&&e in r.def&&JSON.stringify(o[e])===JSON.stringify(r.def[e])&&delete o[e]}let s=t._zod.parent;if(s&&s!==a){i(s);let t=e.seen.get(s);if(t?.schema.$ref&&(o.$ref=t.schema.$ref,t.def))for(let e in o)"$ref"!==e&&"allOf"!==e&&e in t.def&&JSON.stringify(o[e])===JSON.stringify(t.def[e])&&delete o[e]}e.override({zodSchema:t,jsonSchema:o,path:r.path??[]})};for(let t of[...e.seen.entries()].reverse())i(t[0]);let o={};if("draft-2020-12"===e.target?o.$schema="https://json-schema.org/draft/2020-12/schema":"draft-07"===e.target?o.$schema="http://json-schema.org/draft-07/schema#":"draft-04"===e.target?o.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){let r=e.external.registry.get(t)?.id;if(!r)throw Error("Schema is missing an `id` property");o.$id=e.external.uri(r)}Object.assign(o,r.def??r.schema);let n=e.metadataRegistry.get(t)?.id;void 0!==n&&o.id===n&&delete o.id;let a=e.external?.defs??{};for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,a[e.defId]=e.def)}e.external||Object.keys(a).length>0&&("draft-2020-12"===e.target?o.$defs=a:o.definitions=a);try{let r=JSON.parse(JSON.stringify(o));return Object.defineProperty(r,"~standard",{value:{...t["~standard"],jsonSchema:{input:EA(t,"input",e.processors),output:EA(t,"output",e.processors)}},enumerable:!1,writable:!1}),r}catch(e){throw Error("Error converting schema to JSON.")}}let EA=(e,t,r={})=>i=>{let{libraryOptions:o,target:n}=i??{},a=EC({...o??{},target:n,io:t,processors:r});return ET(e,a),EO(a,e),EE(a,e)},EW={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},EM=(e,t,r,i)=>{r.type="string";let{minimum:o,maximum:n,format:a,patterns:s,contentEncoding:d}=e._zod.bag;if("number"==typeof o&&(r.minLength=o),"number"==typeof n&&(r.maxLength=n),a&&(r.format=EW[a]??a,""===r.format&&delete r.format,"time"===a&&delete r.format),d&&(r.contentEncoding=d),s&&s.size>0){let e=[...s];1===e.length?r.pattern=e[0].source:e.length>1&&(r.allOf=[...e.map(e=>({..."draft-07"===t.target||"draft-04"===t.target||"openapi-3.0"===t.target?{type:"string"}:{},pattern:e.source}))])}},EN=(e,t,r,i)=>{let{minimum:o,maximum:n,format:a,multipleOf:s,exclusiveMaximum:d,exclusiveMinimum:c}=e._zod.bag;"string"==typeof a&&a.includes("int")?r.type="integer":r.type="number";let l="number"==typeof c&&c>=(o??-1/0),p="number"==typeof d&&d<=(n??1/0),u="draft-04"===t.target||"openapi-3.0"===t.target;l?u?(r.minimum=c,r.exclusiveMinimum=!0):r.exclusiveMinimum=c:"number"==typeof o&&(r.minimum=o),p?u?(r.maximum=d,r.exclusiveMaximum=!0):r.exclusiveMaximum=d:"number"==typeof n&&(r.maximum=n),"number"==typeof s&&(r.multipleOf=s)},Ez=(e,t,r,i)=>{r.type="boolean"},ED=(e,t,r,i)=>{r.not={}},EF=(e,t,r,i)=>{},EL=(e,t,r,i)=>{let o=Tq(e._zod.def.entries);o.every(e=>"number"==typeof e)&&(r.type="number"),o.every(e=>"string"==typeof e)&&(r.type="string"),r.enum=o},EU=(e,t,r,i)=>{let o=e._zod.def,n=[];for(let e of o.values)if(void 0===e){if("throw"===t.unrepresentable)throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if("bigint"==typeof e)if("throw"===t.unrepresentable)throw Error("BigInt literals cannot be represented in JSON Schema");else n.push(Number(e));else n.push(e);if(0===n.length);else if(1===n.length){let e=n[0];r.type=null===e?"null":typeof e,"draft-04"===t.target||"openapi-3.0"===t.target?r.enum=[e]:r.const=e}else n.every(e=>"number"==typeof e)&&(r.type="number"),n.every(e=>"string"==typeof e)&&(r.type="string"),n.every(e=>"boolean"==typeof e)&&(r.type="boolean"),n.every(e=>null===e)&&(r.type="null"),r.enum=n},EH=(e,t,r,i)=>{if("throw"===t.unrepresentable)throw Error("Custom types cannot be represented in JSON Schema")},EG=(e,t,r,i)=>{if("throw"===t.unrepresentable)throw Error("Transforms cannot be represented in JSON Schema")},EB=(e,t,r,i)=>{let o=e._zod.def,{minimum:n,maximum:a}=e._zod.bag;"number"==typeof n&&(r.minItems=n),"number"==typeof a&&(r.maxItems=a),r.type="array",r.items=ET(o.element,t,{...i,path:[...i.path,"items"]})},EK=(e,t,r,i)=>{let o=e._zod.def;r.type="object",r.properties={};let n=o.shape;for(let e in n)r.properties[e]=ET(n[e],t,{...i,path:[...i.path,"properties",e]});let a=new Set([...new Set(Object.keys(n))].filter(e=>{let r=o.shape[e]._zod;return"input"===t.io?void 0===r.optin:void 0===r.optout}));a.size>0&&(r.required=Array.from(a)),o.catchall?._zod.def.type==="never"?r.additionalProperties=!1:o.catchall?o.catchall&&(r.additionalProperties=ET(o.catchall,t,{...i,path:[...i.path,"additionalProperties"]})):"output"===t.io&&(r.additionalProperties=!1)},EJ=(e,t,r,i)=>{let o=e._zod.def,n=!1===o.inclusive,a=o.options.map((e,r)=>ET(e,t,{...i,path:[...i.path,n?"oneOf":"anyOf",r]}));n?r.oneOf=a:r.anyOf=a},EZ=(e,t,r,i)=>{let o=e._zod.def,n=ET(o.left,t,{...i,path:[...i.path,"allOf",0]}),a=ET(o.right,t,{...i,path:[...i.path,"allOf",1]}),s=e=>"allOf"in e&&1===Object.keys(e).length;r.allOf=[...s(n)?n.allOf:[n],...s(a)?a.allOf:[a]]},EQ=(e,t,r,i)=>{let o=e._zod.def;r.type="array";let n="draft-2020-12"===t.target?"prefixItems":"items",a="draft-2020-12"===t.target||"openapi-3.0"===t.target?"items":"additionalItems",s=o.items.map((e,r)=>ET(e,t,{...i,path:[...i.path,n,r]})),d=o.rest?ET(o.rest,t,{...i,path:[...i.path,a,..."openapi-3.0"===t.target?[o.items.length]:[]]}):null;"draft-2020-12"===t.target?(r.prefixItems=s,d&&(r.items=d)):"openapi-3.0"===t.target?(r.items={anyOf:s},d&&r.items.anyOf.push(d),r.minItems=s.length,d||(r.maxItems=s.length)):(r.items=s,d&&(r.additionalItems=d));let{minimum:c,maximum:l}=e._zod.bag;"number"==typeof c&&(r.minItems=c),"number"==typeof l&&(r.maxItems=l)},EX=(e,t,r,i)=>{let o=e._zod.def;r.type="object";let n=o.keyType,a=n._zod.bag,s=a?.patterns;if("loose"===o.mode&&s&&s.size>0){let e=ET(o.valueType,t,{...i,path:[...i.path,"patternProperties","*"]});for(let t of(r.patternProperties={},s))r.patternProperties[t.source]=e}else("draft-07"===t.target||"draft-2020-12"===t.target)&&(r.propertyNames=ET(o.keyType,t,{...i,path:[...i.path,"propertyNames"]})),r.additionalProperties=ET(o.valueType,t,{...i,path:[...i.path,"additionalProperties"]});let d=n._zod.values;if(d){let e=[...d].filter(e=>"string"==typeof e||"number"==typeof e);e.length>0&&(r.required=e)}},EY=(e,t,r,i)=>{let o=e._zod.def,n=ET(o.innerType,t,i),a=t.seen.get(e);"openapi-3.0"===t.target?(a.ref=o.innerType,r.nullable=!0):r.anyOf=[n,{type:"null"}]},E1=(e,t,r,i)=>{let o=e._zod.def;ET(o.innerType,t,i),t.seen.get(e).ref=o.innerType},E0=(e,t,r,i)=>{let o=e._zod.def;ET(o.innerType,t,i),t.seen.get(e).ref=o.innerType,r.default=JSON.parse(JSON.stringify(o.defaultValue))},E2=(e,t,r,i)=>{let o=e._zod.def;ET(o.innerType,t,i),t.seen.get(e).ref=o.innerType,"input"===t.io&&(r._prefault=JSON.parse(JSON.stringify(o.defaultValue)))},E4=(e,t,r,i)=>{let o,n=e._zod.def;ET(n.innerType,t,i),t.seen.get(e).ref=n.innerType;try{o=n.catchValue(void 0)}catch{throw Error("Dynamic catch values are not supported in JSON Schema")}r.default=o},E6=(e,t,r,i)=>{let o=e._zod.def,n=o.in._zod.traits.has("$ZodTransform"),a="input"===t.io?n?o.out:o.in:o.out;ET(a,t,i),t.seen.get(e).ref=a},E3=(e,t,r,i)=>{let o=e._zod.def;ET(o.innerType,t,i),t.seen.get(e).ref=o.innerType,r.readOnly=!0},E9=(e,t,r,i)=>{let o=e._zod.def;ET(o.innerType,t,i),t.seen.get(e).ref=o.innerType},E5={string:EM,number:EN,boolean:Ez,bigint:(e,t,r,i)=>{if("throw"===t.unrepresentable)throw Error("BigInt cannot be represented in JSON Schema")},symbol:(e,t,r,i)=>{if("throw"===t.unrepresentable)throw Error("Symbols cannot be represented in JSON Schema")},null:(e,t,r,i)=>{"openapi-3.0"===t.target?(r.type="string",r.nullable=!0,r.enum=[null]):r.type="null"},undefined:(e,t,r,i)=>{if("throw"===t.unrepresentable)throw Error("Undefined cannot be represented in JSON Schema")},void:(e,t,r,i)=>{if("throw"===t.unrepresentable)throw Error("Void cannot be represented in JSON Schema")},never:ED,any:(e,t,r,i)=>{},unknown:EF,date:(e,t,r,i)=>{if("throw"===t.unrepresentable)throw Error("Date cannot be represented in JSON Schema")},enum:EL,literal:EU,nan:(e,t,r,i)=>{if("throw"===t.unrepresentable)throw Error("NaN cannot be represented in JSON Schema")},template_literal:(e,t,r,i)=>{let o=e._zod.pattern;if(!o)throw Error("Pattern not found in template literal");r.type="string",r.pattern=o.source},file:(e,t,r,i)=>{let o={type:"string",format:"binary",contentEncoding:"binary"},{minimum:n,maximum:a,mime:s}=e._zod.bag;void 0!==n&&(o.minLength=n),void 0!==a&&(o.maxLength=a),s?1===s.length?(o.contentMediaType=s[0],Object.assign(r,o)):(Object.assign(r,o),r.anyOf=s.map(e=>({contentMediaType:e}))):Object.assign(r,o)},success:(e,t,r,i)=>{r.type="boolean"},custom:EH,function:(e,t,r,i)=>{if("throw"===t.unrepresentable)throw Error("Function types cannot be represented in JSON Schema")},transform:EG,map:(e,t,r,i)=>{if("throw"===t.unrepresentable)throw Error("Map cannot be represented in JSON Schema")},set:(e,t,r,i)=>{if("throw"===t.unrepresentable)throw Error("Set cannot be represented in JSON Schema")},array:EB,object:EK,union:EJ,intersection:EZ,tuple:EQ,record:EX,nullable:EY,nonoptional:E1,default:E0,prefault:E2,catch:E4,pipe:E6,readonly:E3,promise:(e,t,r,i)=>{let o=e._zod.def;ET(o.innerType,t,i),t.seen.get(e).ref=o.innerType},optional:E9,lazy:(e,t,r,i)=>{let o=e._zod.innerType;ET(o,t,i),t.seen.get(e).ref=o}},E8=C5("ZodISODateTime",(e,t)=>{Oj.init(e,t),A$.init(e,t)}),E7=C5("ZodISODate",(e,t)=>{OC.init(e,t),A$.init(e,t)}),Ae=C5("ZodISOTime",(e,t)=>{OT.init(e,t),A$.init(e,t)}),At=C5("ZodISODuration",(e,t)=>{OO.init(e,t),A$.init(e,t)}),Ar=C5("ZodError",(e,t)=>{Od.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:t=>(function(e,t=e=>e.message){let r={_errors:[]},i=(e,o=[])=>{for(let n of e.issues)if("invalid_union"===n.code&&n.errors.length)n.errors.map(e=>i({issues:e},[...o,...n.path]));else if("invalid_key"===n.code)i({issues:n.issues},[...o,...n.path]);else if("invalid_element"===n.code)i({issues:n.issues},[...o,...n.path]);else{let e=[...o,...n.path];if(0===e.length)r._errors.push(t(n));else{let i=r,o=0;for(;o(function(e,t=e=>e.message){let r={},i=[];for(let o of e.issues)o.path.length>0?(r[o.path[0]]=r[o.path[0]]||[],r[o.path[0]].push(t(o))):i.push(t(o));return{formErrors:i,fieldErrors:r}})(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,TI,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,TI,2)}},isEmpty:{get:()=>0===e.issues.length}})},{Parent:Error}),Ai=Ol(Ar),Ao=Op(Ar),An=Ou(Ar),Aa=Of(Ar),As=(e,t,r)=>{let i=r?{...r,direction:"backward"}:{direction:"backward"};return Ol(Ar)(e,t,i)},Ad=(e,t,r)=>Ol(Ar)(e,t,r),Ac=async(e,t,r)=>{let i=r?{...r,direction:"backward"}:{direction:"backward"};return Op(Ar)(e,t,i)},Al=async(e,t,r)=>Op(Ar)(e,t,r),Ap=(e,t,r)=>{let i=r?{...r,direction:"backward"}:{direction:"backward"};return Ou(Ar)(e,t,i)},Au=(e,t,r)=>Ou(Ar)(e,t,r),Am=async(e,t,r)=>{let i=r?{...r,direction:"backward"}:{direction:"backward"};return Of(Ar)(e,t,i)},Af=async(e,t,r)=>Of(Ar)(e,t,r),Ah=new WeakMap;function Ay(e,t,r){let i=Object.getPrototypeOf(e),o=Ah.get(i);if(o||(o=new Set,Ah.set(i,o)),!o.has(t))for(let e in o.add(t),r){let t=r[e];Object.defineProperty(i,e,{configurable:!0,enumerable:!1,get(){let r=t.bind(this);return Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:r}),r},set(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:t})}})}}let Ag=C5("ZodType",(e,t)=>(Og.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:EA(e,"input"),output:EA(e,"output")}}),e.toJSONSchema=((e,t={})=>r=>{let i=EC({...r,processors:t});return ET(e,i),EO(i,e),EE(i,e)})(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(t,r)=>Ai(e,t,r,{callee:e.parse}),e.safeParse=(t,r)=>An(e,t,r),e.parseAsync=async(t,r)=>Ao(e,t,r,{callee:e.parseAsync}),e.safeParseAsync=async(t,r)=>Aa(e,t,r),e.spa=e.safeParseAsync,e.encode=(t,r)=>As(e,t,r),e.decode=(t,r)=>Ad(e,t,r),e.encodeAsync=async(t,r)=>Ac(e,t,r),e.decodeAsync=async(t,r)=>Al(e,t,r),e.safeEncode=(t,r)=>Ap(e,t,r),e.safeDecode=(t,r)=>Au(e,t,r),e.safeEncodeAsync=async(t,r)=>Am(e,t,r),e.safeDecodeAsync=async(t,r)=>Af(e,t,r),Ay(e,"ZodType",{check(...e){let t=this.def;return this.clone(TE(t,{checks:[...t.checks??[],...e.map(e=>"function"==typeof e?{_zod:{check:e,def:{check:"custom"},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return TU(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(function(e,t={}){return new Wy({type:"custom",check:"custom",fn:e,...TH(t)})}(e,t))},superRefine(e,t){return this.check(function(e,t){var r;let i,o;return r=t=>(t.addIssue=e=>{"string"==typeof e?t.issues.push(TX(e,t.value,i._zod.def)):(e.fatal&&(e.continue=!1),e.code??(e.code="custom"),e.input??(e.input=t.value),e.inst??(e.inst=i),e.continue??(e.continue=!i._zod.def.abort),t.issues.push(TX(e)))},e(t.value,t)),(o=new TY({check:"custom",...TH(t)}))._zod.check=r,i=o}(e,t))},overwrite(e){return this.check(Ej(e))},optional(){return Wn(this)},exactOptional(){var e;return e=this,new Wa({type:"optional",innerType:e})},nullable(){return Wd(this)},nullish(){return Wn(Wd(this))},nonoptional(e){var t;return t=this,new Wp({type:"nonoptional",innerType:t,...TH(e)})},array(){return AQ(this)},or(e){return A2([this,e])},and(e){var t;return t=this,new A3({type:"intersection",left:t,right:e})},transform(e){return Wf(this,new Wi({type:"transform",transform:e}))},default(e){var t,r;return t=this,r=e,new Wc({type:"default",innerType:t,get defaultValue(){return"function"==typeof r?r():TD(r)}})},prefault(e){var t,r;return t=this,r=e,new Wl({type:"prefault",innerType:t,get defaultValue(){return"function"==typeof r?r():TD(r)}})},catch(e){var t,r;return t=this,new Wu({type:"catch",innerType:t,catchValue:"function"==typeof(r=e)?r:()=>r})},pipe(e){return Wf(this,e)},readonly(){var e;return e=this,new Wh({type:"readonly",innerType:e})},describe(e){let t=this.clone();return E$.add(t,{description:e}),t},meta(...e){if(0===e.length)return E$.get(this);let t=this.clone();return E$.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e){return e(this)}}),Object.defineProperty(e,"description",{get:()=>E$.get(e)?.description,configurable:!0}),e)),A_=C5("_ZodString",(e,t)=>{O_.init(e,t),Ag.init(e,t),e._zod.processJSONSchema=(t,r,i)=>EM(e,t,r,i);let r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,Ay(e,"_ZodString",{regex(...e){return this.check(function(e,t){return new T7({check:"string_format",format:"regex",...TH(t),pattern:e})}(...e))},includes(...e){return this.check(function(e,t){return new Or({check:"string_format",format:"includes",...TH(t),includes:e})}(...e))},startsWith(...e){return this.check(function(e,t){return new Oi({check:"string_format",format:"starts_with",...TH(t),prefix:e})}(...e))},endsWith(...e){return this.check(function(e,t){return new Oo({check:"string_format",format:"ends_with",...TH(t),suffix:e})}(...e))},min(...e){return this.check(EI(...e))},max(...e){return this.check(Eq(...e))},length(...e){return this.check(Ex(...e))},nonempty(...e){return this.check(EI(1,...e))},lowercase(e){return this.check(new Oe({check:"string_format",format:"lowercase",...TH(e)}))},uppercase(e){return this.check(new Ot({check:"string_format",format:"uppercase",...TH(e)}))},trim(){return this.check(Ej(e=>e.trim()))},normalize(...e){return this.check(function(e){return Ej(t=>t.normalize(e))}(...e))},toLowerCase(){return this.check(Ej(e=>e.toLowerCase()))},toUpperCase(){return this.check(Ej(e=>e.toUpperCase()))},slugify(){return this.check(Ej(e=>e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")))}})}),Av=C5("ZodString",(e,t)=>{O_.init(e,t),A_.init(e,t),e.email=t=>e.check(new AS({type:"string",format:"email",check:"string_format",abort:!1,...TH(t)})),e.url=t=>e.check(new AV({type:"string",format:"url",check:"string_format",abort:!1,...TH(t)})),e.jwt=t=>e.check(new Az({type:"string",format:"jwt",check:"string_format",abort:!1,...TH(t)})),e.emoji=t=>e.check(new AP({type:"string",format:"emoji",check:"string_format",abort:!1,...TH(t)})),e.guid=t=>e.check(ES(Ak,t)),e.uuid=t=>e.check(new Aw({type:"string",format:"uuid",check:"string_format",abort:!1,...TH(t)})),e.uuidv4=t=>e.check(new Aw({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...TH(t)})),e.uuidv6=t=>e.check(new Aw({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...TH(t)})),e.uuidv7=t=>e.check(new Aw({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...TH(t)})),e.nanoid=t=>e.check(new AR({type:"string",format:"nanoid",check:"string_format",abort:!1,...TH(t)})),e.guid=t=>e.check(ES(Ak,t)),e.cuid=t=>e.check(new Aq({type:"string",format:"cuid",check:"string_format",abort:!1,...TH(t)})),e.cuid2=t=>e.check(new AI({type:"string",format:"cuid2",check:"string_format",abort:!1,...TH(t)})),e.ulid=t=>e.check(new Ax({type:"string",format:"ulid",check:"string_format",abort:!1,...TH(t)})),e.base64=t=>e.check(new AW({type:"string",format:"base64",check:"string_format",abort:!1,...TH(t)})),e.base64url=t=>e.check(new AM({type:"string",format:"base64url",check:"string_format",abort:!1,...TH(t)})),e.xid=t=>e.check(new Aj({type:"string",format:"xid",check:"string_format",abort:!1,...TH(t)})),e.ksuid=t=>e.check(new AC({type:"string",format:"ksuid",check:"string_format",abort:!1,...TH(t)})),e.ipv4=t=>e.check(new AT({type:"string",format:"ipv4",check:"string_format",abort:!1,...TH(t)})),e.ipv6=t=>e.check(new AO({type:"string",format:"ipv6",check:"string_format",abort:!1,...TH(t)})),e.cidrv4=t=>e.check(new AE({type:"string",format:"cidrv4",check:"string_format",abort:!1,...TH(t)})),e.cidrv6=t=>e.check(new AA({type:"string",format:"cidrv6",check:"string_format",abort:!1,...TH(t)})),e.e164=t=>e.check(new AN({type:"string",format:"e164",check:"string_format",abort:!1,...TH(t)})),e.datetime=t=>e.check(new E8({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...TH(t)})),e.date=t=>e.check(new E7({type:"string",format:"date",check:"string_format",...TH(t)})),e.time=t=>e.check(new Ae({type:"string",format:"time",check:"string_format",precision:null,...TH(t)})),e.duration=t=>e.check(new At({type:"string",format:"duration",check:"string_format",...TH(t)}))});function Ab(e){return new Av({type:"string",...TH(e)})}let A$=C5("ZodStringFormat",(e,t)=>{Ov.init(e,t),A_.init(e,t)}),AS=C5("ZodEmail",(e,t)=>{OS.init(e,t),A$.init(e,t)}),Ak=C5("ZodGUID",(e,t)=>{Ob.init(e,t),A$.init(e,t)}),Aw=C5("ZodUUID",(e,t)=>{O$.init(e,t),A$.init(e,t)}),AV=C5("ZodURL",(e,t)=>{Ok.init(e,t),A$.init(e,t)}),AP=C5("ZodEmoji",(e,t)=>{Ow.init(e,t),A$.init(e,t)}),AR=C5("ZodNanoID",(e,t)=>{OV.init(e,t),A$.init(e,t)}),Aq=C5("ZodCUID",(e,t)=>{OP.init(e,t),A$.init(e,t)}),AI=C5("ZodCUID2",(e,t)=>{OR.init(e,t),A$.init(e,t)}),Ax=C5("ZodULID",(e,t)=>{Oq.init(e,t),A$.init(e,t)}),Aj=C5("ZodXID",(e,t)=>{OI.init(e,t),A$.init(e,t)}),AC=C5("ZodKSUID",(e,t)=>{Ox.init(e,t),A$.init(e,t)}),AT=C5("ZodIPv4",(e,t)=>{OE.init(e,t),A$.init(e,t)}),AO=C5("ZodIPv6",(e,t)=>{OA.init(e,t),A$.init(e,t)}),AE=C5("ZodCIDRv4",(e,t)=>{OW.init(e,t),A$.init(e,t)}),AA=C5("ZodCIDRv6",(e,t)=>{OM.init(e,t),A$.init(e,t)}),AW=C5("ZodBase64",(e,t)=>{Oz.init(e,t),A$.init(e,t)}),AM=C5("ZodBase64URL",(e,t)=>{OD.init(e,t),A$.init(e,t)}),AN=C5("ZodE164",(e,t)=>{OF.init(e,t),A$.init(e,t)}),Az=C5("ZodJWT",(e,t)=>{OL.init(e,t),A$.init(e,t)}),AD=C5("ZodNumber",(e,t)=>{OU.init(e,t),Ag.init(e,t),e._zod.processJSONSchema=(t,r,i)=>EN(e,t,r,i),Ay(e,"ZodNumber",{gt(e,t){return this.check(EV(e,t))},gte(e,t){return this.check(EP(e,t))},min(e,t){return this.check(EP(e,t))},lt(e,t){return this.check(Ek(e,t))},lte(e,t){return this.check(Ew(e,t))},max(e,t){return this.check(Ew(e,t))},int(e){return this.check(AL(e))},safe(e){return this.check(AL(e))},positive(e){return this.check(EV(0,e))},nonnegative(e){return this.check(EP(0,e))},negative(e){return this.check(Ek(0,e))},nonpositive(e){return this.check(Ew(0,e))},multipleOf(e,t){return this.check(ER(e,t))},step(e,t){return this.check(ER(e,t))},finite(){return this}});let r=e._zod.bag;e.minValue=Math.max(r.minimum??-1/0,r.exclusiveMinimum??-1/0)??null,e.maxValue=Math.min(r.maximum??1/0,r.exclusiveMaximum??1/0)??null,e.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),e.isFinite=!0,e.format=r.format??null}),AF=C5("ZodNumberFormat",(e,t)=>{OH.init(e,t),AD.init(e,t)});function AL(e){return new AF({type:"number",check:"number_format",abort:!1,format:"safeint",...TH(e)})}let AU=C5("ZodBoolean",(e,t)=>{OG.init(e,t),Ag.init(e,t),e._zod.processJSONSchema=(t,r,i)=>Ez(e,t,r,i)});function AH(e){return new AU({type:"boolean",...TH(e)})}let AG=C5("ZodUnknown",(e,t)=>{OB.init(e,t),Ag.init(e,t),e._zod.processJSONSchema=(t,r,i)=>EF(e,t,r,i)});function AB(){return new AG({type:"unknown"})}let AK=C5("ZodNever",(e,t)=>{OK.init(e,t),Ag.init(e,t),e._zod.processJSONSchema=(t,r,i)=>ED(e,t,r,i)});function AJ(e){return new AK({type:"never",...TH(e)})}let AZ=C5("ZodArray",(e,t)=>{OZ.init(e,t),Ag.init(e,t),e._zod.processJSONSchema=(t,r,i)=>EB(e,t,r,i),e.element=t.element,Ay(e,"ZodArray",{min(e,t){return this.check(EI(e,t))},nonempty(e){return this.check(EI(1,e))},max(e,t){return this.check(Eq(e,t))},length(e,t){return this.check(Ex(e,t))},unwrap(){return this.element}})});function AQ(e,t){return new AZ({type:"array",element:e,...TH(t)})}let AX=C5("ZodObject",(e,t)=>{O0.init(e,t),Ag.init(e,t),e._zod.processJSONSchema=(t,r,i)=>EK(e,t,r,i),TT(e,"shape",()=>t.shape),Ay(e,"ZodObject",{keyof(){return We(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:AB()})},loose(){return this.clone({...this._zod.def,catchall:AB()})},strict(){return this.clone({...this._zod.def,catchall:AJ()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(e){return function(e,t){if(!Tz(t))throw Error("Invalid input to extend: expected a plain object");let r=e._zod.def.checks;if(r&&r.length>0){let r=e._zod.def.shape;for(let e in t)if(void 0!==Object.getOwnPropertyDescriptor(r,e))throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let i=TE(e._zod.def,{get shape(){let r={...e._zod.def.shape,...t};return TO(this,"shape",r),r}});return TU(e,i)}(this,e)},safeExtend(e){var t=this;if(!Tz(e))throw Error("Invalid input to safeExtend: expected a plain object");let r=TE(t._zod.def,{get shape(){let r={...t._zod.def.shape,...e};return TO(this,"shape",r),r}});return TU(t,r)},merge(e){var t=this;if(t._zod.def.checks?.length)throw Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let r=TE(t._zod.def,{get shape(){let r={...t._zod.def.shape,...e._zod.def.shape};return TO(this,"shape",r),r},get catchall(){return e._zod.def.catchall},checks:e._zod.def.checks??[]});return TU(t,r)},pick(e){return function(e,t){let r=e._zod.def,i=r.checks;if(i&&i.length>0)throw Error(".pick() cannot be used on object schemas containing refinements");let o=TE(e._zod.def,{get shape(){let e={};for(let i in t){if(!(i in r.shape))throw Error(`Unrecognized key: "${i}"`);t[i]&&(e[i]=r.shape[i])}return TO(this,"shape",e),e},checks:[]});return TU(e,o)}(this,e)},omit(e){return function(e,t){let r=e._zod.def,i=r.checks;if(i&&i.length>0)throw Error(".omit() cannot be used on object schemas containing refinements");let o=TE(e._zod.def,{get shape(){let i={...e._zod.def.shape};for(let e in t){if(!(e in r.shape))throw Error(`Unrecognized key: "${e}"`);t[e]&&delete i[e]}return TO(this,"shape",i),i},checks:[]});return TU(e,o)}(this,e)},partial(...e){return function(e,t,r){let i=t._zod.def.checks;if(i&&i.length>0)throw Error(".partial() cannot be used on object schemas containing refinements");let o=TE(t._zod.def,{get shape(){let i=t._zod.def.shape,o={...i};if(r)for(let t in r){if(!(t in i))throw Error(`Unrecognized key: "${t}"`);r[t]&&(o[t]=e?new e({type:"optional",innerType:i[t]}):i[t])}else for(let t in i)o[t]=e?new e({type:"optional",innerType:i[t]}):i[t];return TO(this,"shape",o),o},checks:[]});return TU(t,o)}(Wo,this,e[0])},required(...e){var t,r;let i;return t=this,r=e[0],i=TE(t._zod.def,{get shape(){let e=t._zod.def.shape,i={...e};if(r)for(let t in r){if(!(t in i))throw Error(`Unrecognized key: "${t}"`);r[t]&&(i[t]=new Wp({type:"nonoptional",innerType:e[t]}))}else for(let t in e)i[t]=new Wp({type:"nonoptional",innerType:e[t]});return TO(this,"shape",i),i}}),TU(t,i)}})});function AY(e,t){return new AX({type:"object",shape:e??{},...TH(t)})}function A1(e,t){return new AX({type:"object",shape:e,catchall:AJ(),...TH(t)})}let A0=C5("ZodUnion",(e,t)=>{O4.init(e,t),Ag.init(e,t),e._zod.processJSONSchema=(t,r,i)=>EJ(e,t,r,i),e.options=t.options});function A2(e,t){return new A0({type:"union",options:e,...TH(t)})}let A4=C5("ZodDiscriminatedUnion",(e,t)=>{A0.init(e,t),O6.init(e,t)});function A6(e,t,r){return new A4({type:"union",options:t,discriminator:e,...TH(r)})}let A3=C5("ZodIntersection",(e,t)=>{O3.init(e,t),Ag.init(e,t),e._zod.processJSONSchema=(t,r,i)=>EZ(e,t,r,i)}),A9=C5("ZodTuple",(e,t)=>{O5.init(e,t),Ag.init(e,t),e._zod.processJSONSchema=(t,r,i)=>EQ(e,t,r,i),e.rest=t=>e.clone({...e._zod.def,rest:t})}),A5=C5("ZodRecord",(e,t)=>{Et.init(e,t),Ag.init(e,t),e._zod.processJSONSchema=(t,r,i)=>EX(e,t,r,i),e.keyType=t.keyType,e.valueType=t.valueType});function A8(e,t,r){return new A5(t&&t._zod?{type:"record",keyType:e,valueType:t,...TH(r)}:{type:"record",keyType:Ab(),valueType:e,...TH(t)})}let A7=C5("ZodEnum",(e,t)=>{Er.init(e,t),Ag.init(e,t),e._zod.processJSONSchema=(t,r,i)=>EL(e,t,r,i),e.enum=t.entries,e.options=Object.values(t.entries);let r=new Set(Object.keys(t.entries));e.extract=(e,i)=>{let o={};for(let i of e)if(r.has(i))o[i]=t.entries[i];else throw Error(`Key ${i} not found in enum`);return new A7({...t,checks:[],...TH(i),entries:o})},e.exclude=(e,i)=>{let o={...t.entries};for(let t of e)if(r.has(t))delete o[t];else throw Error(`Key ${t} not found in enum`);return new A7({...t,checks:[],...TH(i),entries:o})}});function We(e,t){return new A7({type:"enum",entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...TH(t)})}let Wt=C5("ZodLiteral",(e,t)=>{Ei.init(e,t),Ag.init(e,t),e._zod.processJSONSchema=(t,r,i)=>EU(e,t,r,i),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function Wr(e,t){return new Wt({type:"literal",values:Array.isArray(e)?e:[e],...TH(t)})}let Wi=C5("ZodTransform",(e,t)=>{Eo.init(e,t),Ag.init(e,t),e._zod.processJSONSchema=(t,r,i)=>EG(e,t,r,i),e._zod.parse=(r,i)=>{if("backward"===i.direction)throw new C7(e.constructor.name);r.addIssue=i=>{"string"==typeof i?r.issues.push(TX(i,r.value,t)):(i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=r.value),i.inst??(i.inst=e),r.issues.push(TX(i)))};let o=t.transform(r.value,r);return o instanceof Promise?o.then(e=>(r.value=e,r.fallback=!0,r)):(r.value=o,r.fallback=!0,r)}}),Wo=C5("ZodOptional",(e,t)=>{Ea.init(e,t),Ag.init(e,t),e._zod.processJSONSchema=(t,r,i)=>E9(e,t,r,i),e.unwrap=()=>e._zod.def.innerType});function Wn(e){return new Wo({type:"optional",innerType:e})}let Wa=C5("ZodExactOptional",(e,t)=>{Es.init(e,t),Ag.init(e,t),e._zod.processJSONSchema=(t,r,i)=>E9(e,t,r,i),e.unwrap=()=>e._zod.def.innerType}),Ws=C5("ZodNullable",(e,t)=>{Ed.init(e,t),Ag.init(e,t),e._zod.processJSONSchema=(t,r,i)=>EY(e,t,r,i),e.unwrap=()=>e._zod.def.innerType});function Wd(e){return new Ws({type:"nullable",innerType:e})}let Wc=C5("ZodDefault",(e,t)=>{Ec.init(e,t),Ag.init(e,t),e._zod.processJSONSchema=(t,r,i)=>E0(e,t,r,i),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap}),Wl=C5("ZodPrefault",(e,t)=>{Ep.init(e,t),Ag.init(e,t),e._zod.processJSONSchema=(t,r,i)=>E2(e,t,r,i),e.unwrap=()=>e._zod.def.innerType}),Wp=C5("ZodNonOptional",(e,t)=>{Eu.init(e,t),Ag.init(e,t),e._zod.processJSONSchema=(t,r,i)=>E1(e,t,r,i),e.unwrap=()=>e._zod.def.innerType}),Wu=C5("ZodCatch",(e,t)=>{Ef.init(e,t),Ag.init(e,t),e._zod.processJSONSchema=(t,r,i)=>E4(e,t,r,i),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap}),Wm=C5("ZodPipe",(e,t)=>{Eh.init(e,t),Ag.init(e,t),e._zod.processJSONSchema=(t,r,i)=>E6(e,t,r,i),e.in=t.in,e.out=t.out});function Wf(e,t){return new Wm({type:"pipe",in:e,out:t})}let Wh=C5("ZodReadonly",(e,t)=>{Eg.init(e,t),Ag.init(e,t),e._zod.processJSONSchema=(t,r,i)=>E3(e,t,r,i),e.unwrap=()=>e._zod.def.innerType}),Wy=C5("ZodCustom",(e,t)=>{Ev.init(e,t),Ag.init(e,t),e._zod.processJSONSchema=(t,r,i)=>EH(e,t,r,i)});function Wg(e){return encodeURI(e.replace(/~/g,"~0").replace(/\//g,"~1"))}let W_={prefixItems:!0,items:!0,allOf:!0,anyOf:!0,oneOf:!0},Wv={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependentSchemas:!0},Wb={id:!0,$id:!0,$ref:!0,$schema:!0,$anchor:!0,$vocabulary:!0,$comment:!0,default:!0,enum:!0,const:!0,required:!0,type:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0},W$="u">typeof self&&self.location&&"null"!==self.location.origin?new URL(self.location.origin+self.location.pathname+location.search):new URL("https://github.com/cfworker");function WS(e,t=Object.create(null),r=W$,i=""){if(e&&"object"==typeof e&&!Array.isArray(e)){let o=e.$id||e.id;if(o){let n=new URL(o,r.href);n.hash.length>1?t[n.href]=e:(n.hash="",""===i?r=n:WS(e,t,r))}}else if(!0!==e&&!1!==e)return t;let o=r.href+(i?"#"+i:"");if(void 0!==t[o])throw Error(`Duplicate schema URI "${o}".`);if(t[o]=e,!0===e||!1===e)return t;if(void 0===e.__absolute_uri__&&Object.defineProperty(e,"__absolute_uri__",{enumerable:!1,value:o}),e.$ref&&void 0===e.__absolute_ref__){let t=new URL(e.$ref,r.href);t.hash=t.hash,Object.defineProperty(e,"__absolute_ref__",{enumerable:!1,value:t.href})}if(e.$recursiveRef&&void 0===e.__absolute_recursive_ref__){let t=new URL(e.$recursiveRef,r.href);t.hash=t.hash,Object.defineProperty(e,"__absolute_recursive_ref__",{enumerable:!1,value:t.href})}for(let o in e.$anchor&&(t[new URL("#"+e.$anchor,r.href).href]=e),e){if(Wb[o])continue;let n=`${i}/${Wg(o)}`,a=e[o];if(Array.isArray(a)){if(W_[o]){let e=a.length;for(let i=0;ie.length>1&&e.length<80&&(/^P\d+([.,]\d+)?W$/.test(e)||/^P[\dYMDTHS]*(\d[.,]\d+)?[YMDHS]$/.test(e)&&/^P([.,\d]+Y)?([.,\d]+M)?([.,\d]+D)?(T([.,\d]+H)?([.,\d]+M)?([.,\d]+S)?)?$/.test(e)),uri:function(e){return Wj.test(e)&&WC.test(e)},"uri-reference":WP(/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i),"uri-template":WP(/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i),url:WP(/^(?:(?:https?|ftp):\/\/)(?:\S+(?::\S*)?@)?(?:(?!10(?:\.\d{1,3}){3})(?!127(?:\.\d{1,3}){3})(?!169\.254(?:\.\d{1,3}){2})(?!192\.168(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)(?:\.(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu),email:e=>{if('"'===e[0])return!1;let[t,r,...i]=e.split("@");return!(!t||!r||0!==i.length||t.length>64||r.length>253||"."===t[0]||t.endsWith(".")||t.includes(".."))&&!!/^[a-z0-9.-]+$/i.test(r)&&!!/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+$/i.test(t)&&r.split(".").every(e=>/^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$/i.test(e))},hostname:WP(/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i),ipv4:WP(/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/),ipv6:WP(/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i),regex:function(e){if(WT.test(e))return!1;try{return RegExp(e,"u"),!0}catch(e){return!1}},uuid:WP(/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i),"json-pointer":WP(/^(?:\/(?:[^~/]|~0|~1)*)*$/),"json-pointer-uri-fragment":WP(/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i),"relative-json-pointer":WP(/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/)};function Wq(e){var t;let r=e.match(Wk);if(!r)return!1;let i=+r[1],o=+r[2],n=+r[3];return o>=1&&o<=12&&n>=1&&n<=(2==o&&(t=i)%4==0&&(t%100!=0||t%400==0)?29:Ww[o])}function WI(e,t){let r=t.match(WV);if(!r)return!1;let i=+r[1],o=+r[2],n=+r[3],a=!!r[5];return(i<=23&&o<=59&&n<=59||23==i&&59==o&&60==n)&&(!e||a)}let Wx=/t|\s/i,Wj=/\/|:/,WC=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,WT=/[^\\]\\Z/;function WO(e,t){let r=typeof e;if(r!==typeof t)return!1;if(Array.isArray(e)){if(!Array.isArray(t))return!1;let r=e.length;if(r!==t.length)return!1;for(let i=0;i1&&"ref"===e.reused){o(r);continue}}}function Ea(e,t){let r=e.seen.get(t);if(!r)throw Error("Unprocessed schema. This is a bug in Zod.");let i=t=>{let r=e.seen.get(t);if(null===r.ref)return;let o=r.def??r.schema,n={...o},a=r.ref;if(r.ref=null,a){i(a);let r=e.seen.get(a),s=r.schema;if(s.$ref&&("draft-07"===e.target||"draft-04"===e.target||"openapi-3.0"===e.target)?(o.allOf=o.allOf??[],o.allOf.push(s)):Object.assign(o,s),Object.assign(o,n),t._zod.parent===a)for(let e in o)"$ref"!==e&&"allOf"!==e&&(e in n||delete o[e]);if(s.$ref&&r.def)for(let e in o)"$ref"!==e&&"allOf"!==e&&e in r.def&&JSON.stringify(o[e])===JSON.stringify(r.def[e])&&delete o[e]}let s=t._zod.parent;if(s&&s!==a){i(s);let t=e.seen.get(s);if(t?.schema.$ref&&(o.$ref=t.schema.$ref,t.def))for(let e in o)"$ref"!==e&&"allOf"!==e&&e in t.def&&JSON.stringify(o[e])===JSON.stringify(t.def[e])&&delete o[e]}e.override({zodSchema:t,jsonSchema:o,path:r.path??[]})};for(let t of[...e.seen.entries()].reverse())i(t[0]);let o={};if("draft-2020-12"===e.target?o.$schema="https://json-schema.org/draft/2020-12/schema":"draft-07"===e.target?o.$schema="http://json-schema.org/draft-07/schema#":"draft-04"===e.target?o.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){let r=e.external.registry.get(t)?.id;if(!r)throw Error("Schema is missing an `id` property");o.$id=e.external.uri(r)}Object.assign(o,r.def??r.schema);let n=e.metadataRegistry.get(t)?.id;void 0!==n&&o.id===n&&delete o.id;let a=e.external?.defs??{};for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,a[e.defId]=e.def)}e.external||Object.keys(a).length>0&&("draft-2020-12"===e.target?o.$defs=a:o.definitions=a);try{let r=JSON.parse(JSON.stringify(o));return Object.defineProperty(r,"~standard",{value:{...t["~standard"],jsonSchema:{input:Es(t,"input",e.processors),output:Es(t,"output",e.processors)}},enumerable:!1,writable:!1}),r}catch(e){throw Error("Error converting schema to JSON.")}}let Es=(e,t,r={})=>i=>{let{libraryOptions:o,target:n}=i??{},a=Ei({...o??{},target:n,io:t,processors:r});return Eo(e,a),En(a,e),Ea(a,e)},Ed={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Ec=(e,t,r,i)=>{r.type="string";let{minimum:o,maximum:n,format:a,patterns:s,contentEncoding:d}=e._zod.bag;if("number"==typeof o&&(r.minLength=o),"number"==typeof n&&(r.maxLength=n),a&&(r.format=Ed[a]??a,""===r.format&&delete r.format,"time"===a&&delete r.format),d&&(r.contentEncoding=d),s&&s.size>0){let e=[...s];1===e.length?r.pattern=e[0].source:e.length>1&&(r.allOf=[...e.map(e=>({..."draft-07"===t.target||"draft-04"===t.target||"openapi-3.0"===t.target?{type:"string"}:{},pattern:e.source}))])}},El=(e,t,r,i)=>{let{minimum:o,maximum:n,format:a,multipleOf:s,exclusiveMaximum:d,exclusiveMinimum:c}=e._zod.bag;"string"==typeof a&&a.includes("int")?r.type="integer":r.type="number";let l="number"==typeof c&&c>=(o??-1/0),p="number"==typeof d&&d<=(n??1/0),u="draft-04"===t.target||"openapi-3.0"===t.target;l?u?(r.minimum=c,r.exclusiveMinimum=!0):r.exclusiveMinimum=c:"number"==typeof o&&(r.minimum=o),p?u?(r.maximum=d,r.exclusiveMaximum=!0):r.exclusiveMaximum=d:"number"==typeof n&&(r.maximum=n),"number"==typeof s&&(r.multipleOf=s)},Ep=(e,t,r,i)=>{r.type="boolean"},Eu=(e,t,r,i)=>{r.not={}},Em=(e,t,r,i)=>{},Ef=(e,t,r,i)=>{let o=C7(e._zod.def.entries);o.every(e=>"number"==typeof e)&&(r.type="number"),o.every(e=>"string"==typeof e)&&(r.type="string"),r.enum=o},Eh=(e,t,r,i)=>{let o=e._zod.def,n=[];for(let e of o.values)if(void 0===e){if("throw"===t.unrepresentable)throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if("bigint"==typeof e)if("throw"===t.unrepresentable)throw Error("BigInt literals cannot be represented in JSON Schema");else n.push(Number(e));else n.push(e);if(0===n.length);else if(1===n.length){let e=n[0];r.type=null===e?"null":typeof e,"draft-04"===t.target||"openapi-3.0"===t.target?r.enum=[e]:r.const=e}else n.every(e=>"number"==typeof e)&&(r.type="number"),n.every(e=>"string"==typeof e)&&(r.type="string"),n.every(e=>"boolean"==typeof e)&&(r.type="boolean"),n.every(e=>null===e)&&(r.type="null"),r.enum=n},Ey=(e,t,r,i)=>{if("throw"===t.unrepresentable)throw Error("Custom types cannot be represented in JSON Schema")},Eg=(e,t,r,i)=>{if("throw"===t.unrepresentable)throw Error("Transforms cannot be represented in JSON Schema")},E_=(e,t,r,i)=>{let o=e._zod.def,{minimum:n,maximum:a}=e._zod.bag;"number"==typeof n&&(r.minItems=n),"number"==typeof a&&(r.maxItems=a),r.type="array",r.items=Eo(o.element,t,{...i,path:[...i.path,"items"]})},Ev=(e,t,r,i)=>{let o=e._zod.def;r.type="object",r.properties={};let n=o.shape;for(let e in n)r.properties[e]=Eo(n[e],t,{...i,path:[...i.path,"properties",e]});let a=new Set([...new Set(Object.keys(n))].filter(e=>{let r=o.shape[e]._zod;return"input"===t.io?void 0===r.optin:void 0===r.optout}));a.size>0&&(r.required=Array.from(a)),o.catchall?._zod.def.type==="never"?r.additionalProperties=!1:o.catchall?o.catchall&&(r.additionalProperties=Eo(o.catchall,t,{...i,path:[...i.path,"additionalProperties"]})):"output"===t.io&&(r.additionalProperties=!1)},Eb=(e,t,r,i)=>{let o=e._zod.def,n=!1===o.inclusive,a=o.options.map((e,r)=>Eo(e,t,{...i,path:[...i.path,n?"oneOf":"anyOf",r]}));n?r.oneOf=a:r.anyOf=a},E$=(e,t,r,i)=>{let o=e._zod.def,n=Eo(o.left,t,{...i,path:[...i.path,"allOf",0]}),a=Eo(o.right,t,{...i,path:[...i.path,"allOf",1]}),s=e=>"allOf"in e&&1===Object.keys(e).length;r.allOf=[...s(n)?n.allOf:[n],...s(a)?a.allOf:[a]]},ES=(e,t,r,i)=>{let o=e._zod.def;r.type="array";let n="draft-2020-12"===t.target?"prefixItems":"items",a="draft-2020-12"===t.target||"openapi-3.0"===t.target?"items":"additionalItems",s=o.items.map((e,r)=>Eo(e,t,{...i,path:[...i.path,n,r]})),d=o.rest?Eo(o.rest,t,{...i,path:[...i.path,a,..."openapi-3.0"===t.target?[o.items.length]:[]]}):null;"draft-2020-12"===t.target?(r.prefixItems=s,d&&(r.items=d)):"openapi-3.0"===t.target?(r.items={anyOf:s},d&&r.items.anyOf.push(d),r.minItems=s.length,d||(r.maxItems=s.length)):(r.items=s,d&&(r.additionalItems=d));let{minimum:c,maximum:l}=e._zod.bag;"number"==typeof c&&(r.minItems=c),"number"==typeof l&&(r.maxItems=l)},Ek=(e,t,r,i)=>{let o=e._zod.def;r.type="object";let n=o.keyType,a=n._zod.bag,s=a?.patterns;if("loose"===o.mode&&s&&s.size>0){let e=Eo(o.valueType,t,{...i,path:[...i.path,"patternProperties","*"]});for(let t of(r.patternProperties={},s))r.patternProperties[t.source]=e}else("draft-07"===t.target||"draft-2020-12"===t.target)&&(r.propertyNames=Eo(o.keyType,t,{...i,path:[...i.path,"propertyNames"]})),r.additionalProperties=Eo(o.valueType,t,{...i,path:[...i.path,"additionalProperties"]});let d=n._zod.values;if(d){let e=[...d].filter(e=>"string"==typeof e||"number"==typeof e);e.length>0&&(r.required=e)}},Ew=(e,t,r,i)=>{let o=e._zod.def,n=Eo(o.innerType,t,i),a=t.seen.get(e);"openapi-3.0"===t.target?(a.ref=o.innerType,r.nullable=!0):r.anyOf=[n,{type:"null"}]},ER=(e,t,r,i)=>{let o=e._zod.def;Eo(o.innerType,t,i),t.seen.get(e).ref=o.innerType},EP=(e,t,r,i)=>{let o=e._zod.def;Eo(o.innerType,t,i),t.seen.get(e).ref=o.innerType,r.default=JSON.parse(JSON.stringify(o.defaultValue))},EV=(e,t,r,i)=>{let o=e._zod.def;Eo(o.innerType,t,i),t.seen.get(e).ref=o.innerType,"input"===t.io&&(r._prefault=JSON.parse(JSON.stringify(o.defaultValue)))},Eq=(e,t,r,i)=>{let o,n=e._zod.def;Eo(n.innerType,t,i),t.seen.get(e).ref=n.innerType;try{o=n.catchValue(void 0)}catch{throw Error("Dynamic catch values are not supported in JSON Schema")}r.default=o},EI=(e,t,r,i)=>{let o=e._zod.def,n=o.in._zod.traits.has("$ZodTransform"),a="input"===t.io?n?o.out:o.in:o.out;Eo(a,t,i),t.seen.get(e).ref=a},Ex=(e,t,r,i)=>{let o=e._zod.def;Eo(o.innerType,t,i),t.seen.get(e).ref=o.innerType,r.readOnly=!0},Ej=(e,t,r,i)=>{let o=e._zod.def;Eo(o.innerType,t,i),t.seen.get(e).ref=o.innerType},EC={string:Ec,number:El,boolean:Ep,bigint:(e,t,r,i)=>{if("throw"===t.unrepresentable)throw Error("BigInt cannot be represented in JSON Schema")},symbol:(e,t,r,i)=>{if("throw"===t.unrepresentable)throw Error("Symbols cannot be represented in JSON Schema")},null:(e,t,r,i)=>{"openapi-3.0"===t.target?(r.type="string",r.nullable=!0,r.enum=[null]):r.type="null"},undefined:(e,t,r,i)=>{if("throw"===t.unrepresentable)throw Error("Undefined cannot be represented in JSON Schema")},void:(e,t,r,i)=>{if("throw"===t.unrepresentable)throw Error("Void cannot be represented in JSON Schema")},never:Eu,any:(e,t,r,i)=>{},unknown:Em,date:(e,t,r,i)=>{if("throw"===t.unrepresentable)throw Error("Date cannot be represented in JSON Schema")},enum:Ef,literal:Eh,nan:(e,t,r,i)=>{if("throw"===t.unrepresentable)throw Error("NaN cannot be represented in JSON Schema")},template_literal:(e,t,r,i)=>{let o=e._zod.pattern;if(!o)throw Error("Pattern not found in template literal");r.type="string",r.pattern=o.source},file:(e,t,r,i)=>{let o={type:"string",format:"binary",contentEncoding:"binary"},{minimum:n,maximum:a,mime:s}=e._zod.bag;void 0!==n&&(o.minLength=n),void 0!==a&&(o.maxLength=a),s?1===s.length?(o.contentMediaType=s[0],Object.assign(r,o)):(Object.assign(r,o),r.anyOf=s.map(e=>({contentMediaType:e}))):Object.assign(r,o)},success:(e,t,r,i)=>{r.type="boolean"},custom:Ey,function:(e,t,r,i)=>{if("throw"===t.unrepresentable)throw Error("Function types cannot be represented in JSON Schema")},transform:Eg,map:(e,t,r,i)=>{if("throw"===t.unrepresentable)throw Error("Map cannot be represented in JSON Schema")},set:(e,t,r,i)=>{if("throw"===t.unrepresentable)throw Error("Set cannot be represented in JSON Schema")},array:E_,object:Ev,union:Eb,intersection:E$,tuple:ES,record:Ek,nullable:Ew,nonoptional:ER,default:EP,prefault:EV,catch:Eq,pipe:EI,readonly:Ex,promise:(e,t,r,i)=>{let o=e._zod.def;Eo(o.innerType,t,i),t.seen.get(e).ref=o.innerType},optional:Ej,lazy:(e,t,r,i)=>{let o=e._zod.innerType;Eo(o,t,i),t.seen.get(e).ref=o}},ET=CC("ZodISODateTime",(e,t)=>{Or.init(e,t),E2.init(e,t)}),EO=CC("ZodISODate",(e,t)=>{Oi.init(e,t),E2.init(e,t)}),EE=CC("ZodISOTime",(e,t)=>{Oo.init(e,t),E2.init(e,t)}),EA=CC("ZodISODuration",(e,t)=>{On.init(e,t),E2.init(e,t)}),EM=CC("ZodError",(e,t)=>{TL.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:t=>(function(e,t=e=>e.message){let r={_errors:[]},i=(e,o=[])=>{for(let n of e.issues)if("invalid_union"===n.code&&n.errors.length)n.errors.map(e=>i({issues:e},[...o,...n.path]));else if("invalid_key"===n.code)i({issues:n.issues},[...o,...n.path]);else if("invalid_element"===n.code)i({issues:n.issues},[...o,...n.path]);else{let e=[...o,...n.path];if(0===e.length)r._errors.push(t(n));else{let i=r,o=0;for(;o(function(e,t=e=>e.message){let r={},i=[];for(let o of e.issues)o.path.length>0?(r[o.path[0]]=r[o.path[0]]||[],r[o.path[0]].push(t(o))):i.push(t(o));return{formErrors:i,fieldErrors:r}})(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,Te,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,Te,2)}},isEmpty:{get:()=>0===e.issues.length}})},{Parent:Error}),EW=TH(EM),EN=TG(EM),Ez=TB(EM),ED=TJ(EM),EF=(e,t,r)=>{let i=r?{...r,direction:"backward"}:{direction:"backward"};return TH(EM)(e,t,i)},EL=(e,t,r)=>TH(EM)(e,t,r),EU=async(e,t,r)=>{let i=r?{...r,direction:"backward"}:{direction:"backward"};return TG(EM)(e,t,i)},EH=async(e,t,r)=>TG(EM)(e,t,r),EG=(e,t,r)=>{let i=r?{...r,direction:"backward"}:{direction:"backward"};return TB(EM)(e,t,i)},EB=(e,t,r)=>TB(EM)(e,t,r),EK=async(e,t,r)=>{let i=r?{...r,direction:"backward"}:{direction:"backward"};return TJ(EM)(e,t,i)},EJ=async(e,t,r)=>TJ(EM)(e,t,r),EZ=new WeakMap;function EQ(e,t,r){let i=Object.getPrototypeOf(e),o=EZ.get(i);if(o||(o=new Set,EZ.set(i,o)),!o.has(t))for(let e in o.add(t),r){let t=r[e];Object.defineProperty(i,e,{configurable:!0,enumerable:!1,get(){let r=t.bind(this);return Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:r}),r},set(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:t})}})}}let EX=CC("ZodType",(e,t)=>(TX.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Es(e,"input"),output:Es(e,"output")}}),e.toJSONSchema=((e,t={})=>r=>{let i=Ei({...r,processors:t});return Eo(e,i),En(i,e),Ea(i,e)})(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(t,r)=>EW(e,t,r,{callee:e.parse}),e.safeParse=(t,r)=>Ez(e,t,r),e.parseAsync=async(t,r)=>EN(e,t,r,{callee:e.parseAsync}),e.safeParseAsync=async(t,r)=>ED(e,t,r),e.spa=e.safeParseAsync,e.encode=(t,r)=>EF(e,t,r),e.decode=(t,r)=>EL(e,t,r),e.encodeAsync=async(t,r)=>EU(e,t,r),e.decodeAsync=async(t,r)=>EH(e,t,r),e.safeEncode=(t,r)=>EG(e,t,r),e.safeDecode=(t,r)=>EB(e,t,r),e.safeEncodeAsync=async(t,r)=>EK(e,t,r),e.safeDecodeAsync=async(t,r)=>EJ(e,t,r),EQ(e,"ZodType",{check(...e){let t=this.def;return this.clone(Ta(t,{checks:[...t.checks??[],...e.map(e=>"function"==typeof e?{_zod:{check:e,def:{check:"custom"},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return Th(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(function(e,t={}){return new AQ({type:"custom",check:"custom",fn:e,...Ty(t)})}(e,t))},superRefine(e,t){return this.check(function(e,t){var r;let i,o;return r=t=>(t.addIssue=e=>{"string"==typeof e?t.issues.push(Tk(e,t.value,i._zod.def)):(e.fatal&&(e.continue=!1),e.code??(e.code="custom"),e.input??(e.input=t.value),e.inst??(e.inst=i),e.continue??(e.continue=!i._zod.def.abort),t.issues.push(Tk(e)))},e(t.value,t)),(o=new Tw({check:"custom",...Ty(t)}))._zod.check=r,i=o}(e,t))},overwrite(e){return this.check(Er(e))},optional(){return Az(this)},exactOptional(){var e;return e=this,new AD({type:"optional",innerType:e})},nullable(){return AL(this)},nullish(){return Az(AL(this))},nonoptional(e){var t;return t=this,new AG({type:"nonoptional",innerType:t,...Ty(e)})},array(){return AS(this)},or(e){return AV([this,e])},and(e){var t;return t=this,new Ax({type:"intersection",left:t,right:e})},transform(e){return AJ(this,new AW({type:"transform",transform:e}))},default(e){var t,r;return t=this,r=e,new AU({type:"default",innerType:t,get defaultValue(){return"function"==typeof r?r():Tu(r)}})},prefault(e){var t,r;return t=this,r=e,new AH({type:"prefault",innerType:t,get defaultValue(){return"function"==typeof r?r():Tu(r)}})},catch(e){var t,r;return t=this,new AB({type:"catch",innerType:t,catchValue:"function"==typeof(r=e)?r:()=>r})},pipe(e){return AJ(this,e)},readonly(){var e;return e=this,new AZ({type:"readonly",innerType:e})},describe(e){let t=this.clone();return O2.add(t,{description:e}),t},meta(...e){if(0===e.length)return O2.get(this);let t=this.clone();return O2.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e){return e(this)}}),Object.defineProperty(e,"description",{get:()=>O2.get(e)?.description,configurable:!0}),e)),EY=CC("_ZodString",(e,t)=>{TY.init(e,t),EX.init(e,t),e._zod.processJSONSchema=(t,r,i)=>Ec(e,t,r,i);let r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,EQ(e,"_ZodString",{regex(...e){return this.check(function(e,t){return new TO({check:"string_format",format:"regex",...Ty(t),pattern:e})}(...e))},includes(...e){return this.check(function(e,t){return new TM({check:"string_format",format:"includes",...Ty(t),includes:e})}(...e))},startsWith(...e){return this.check(function(e,t){return new TW({check:"string_format",format:"starts_with",...Ty(t),prefix:e})}(...e))},endsWith(...e){return this.check(function(e,t){return new TN({check:"string_format",format:"ends_with",...Ty(t),suffix:e})}(...e))},min(...e){return this.check(Ee(...e))},max(...e){return this.check(O7(...e))},length(...e){return this.check(Et(...e))},nonempty(...e){return this.check(Ee(1,...e))},lowercase(e){return this.check(new TE({check:"string_format",format:"lowercase",...Ty(e)}))},uppercase(e){return this.check(new TA({check:"string_format",format:"uppercase",...Ty(e)}))},trim(){return this.check(Er(e=>e.trim()))},normalize(...e){return this.check(function(e){return Er(t=>t.normalize(e))}(...e))},toLowerCase(){return this.check(Er(e=>e.toLowerCase()))},toUpperCase(){return this.check(Er(e=>e.toUpperCase()))},slugify(){return this.check(Er(e=>e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")))}})}),E1=CC("ZodString",(e,t)=>{TY.init(e,t),EY.init(e,t),e.email=t=>e.check(new E4({type:"string",format:"email",check:"string_format",abort:!1,...Ty(t)})),e.url=t=>e.check(new E9({type:"string",format:"url",check:"string_format",abort:!1,...Ty(t)})),e.jwt=t=>e.check(new Ap({type:"string",format:"jwt",check:"string_format",abort:!1,...Ty(t)})),e.emoji=t=>e.check(new E5({type:"string",format:"emoji",check:"string_format",abort:!1,...Ty(t)})),e.guid=t=>e.check(O4(E6,t)),e.uuid=t=>e.check(new E3({type:"string",format:"uuid",check:"string_format",abort:!1,...Ty(t)})),e.uuidv4=t=>e.check(new E3({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Ty(t)})),e.uuidv6=t=>e.check(new E3({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Ty(t)})),e.uuidv7=t=>e.check(new E3({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Ty(t)})),e.nanoid=t=>e.check(new E8({type:"string",format:"nanoid",check:"string_format",abort:!1,...Ty(t)})),e.guid=t=>e.check(O4(E6,t)),e.cuid=t=>e.check(new E7({type:"string",format:"cuid",check:"string_format",abort:!1,...Ty(t)})),e.cuid2=t=>e.check(new Ae({type:"string",format:"cuid2",check:"string_format",abort:!1,...Ty(t)})),e.ulid=t=>e.check(new At({type:"string",format:"ulid",check:"string_format",abort:!1,...Ty(t)})),e.base64=t=>e.check(new Ad({type:"string",format:"base64",check:"string_format",abort:!1,...Ty(t)})),e.base64url=t=>e.check(new Ac({type:"string",format:"base64url",check:"string_format",abort:!1,...Ty(t)})),e.xid=t=>e.check(new Ar({type:"string",format:"xid",check:"string_format",abort:!1,...Ty(t)})),e.ksuid=t=>e.check(new Ai({type:"string",format:"ksuid",check:"string_format",abort:!1,...Ty(t)})),e.ipv4=t=>e.check(new Ao({type:"string",format:"ipv4",check:"string_format",abort:!1,...Ty(t)})),e.ipv6=t=>e.check(new An({type:"string",format:"ipv6",check:"string_format",abort:!1,...Ty(t)})),e.cidrv4=t=>e.check(new Aa({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Ty(t)})),e.cidrv6=t=>e.check(new As({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Ty(t)})),e.e164=t=>e.check(new Al({type:"string",format:"e164",check:"string_format",abort:!1,...Ty(t)})),e.datetime=t=>e.check(new ET({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...Ty(t)})),e.date=t=>e.check(new EO({type:"string",format:"date",check:"string_format",...Ty(t)})),e.time=t=>e.check(new EE({type:"string",format:"time",check:"string_format",precision:null,...Ty(t)})),e.duration=t=>e.check(new EA({type:"string",format:"duration",check:"string_format",...Ty(t)}))});function E0(e){return new E1({type:"string",...Ty(e)})}let E2=CC("ZodStringFormat",(e,t)=>{T1.init(e,t),EY.init(e,t)}),E4=CC("ZodEmail",(e,t)=>{T4.init(e,t),E2.init(e,t)}),E6=CC("ZodGUID",(e,t)=>{T0.init(e,t),E2.init(e,t)}),E3=CC("ZodUUID",(e,t)=>{T2.init(e,t),E2.init(e,t)}),E9=CC("ZodURL",(e,t)=>{T6.init(e,t),E2.init(e,t)}),E5=CC("ZodEmoji",(e,t)=>{T3.init(e,t),E2.init(e,t)}),E8=CC("ZodNanoID",(e,t)=>{T9.init(e,t),E2.init(e,t)}),E7=CC("ZodCUID",(e,t)=>{T5.init(e,t),E2.init(e,t)}),Ae=CC("ZodCUID2",(e,t)=>{T8.init(e,t),E2.init(e,t)}),At=CC("ZodULID",(e,t)=>{T7.init(e,t),E2.init(e,t)}),Ar=CC("ZodXID",(e,t)=>{Oe.init(e,t),E2.init(e,t)}),Ai=CC("ZodKSUID",(e,t)=>{Ot.init(e,t),E2.init(e,t)}),Ao=CC("ZodIPv4",(e,t)=>{Oa.init(e,t),E2.init(e,t)}),An=CC("ZodIPv6",(e,t)=>{Os.init(e,t),E2.init(e,t)}),Aa=CC("ZodCIDRv4",(e,t)=>{Od.init(e,t),E2.init(e,t)}),As=CC("ZodCIDRv6",(e,t)=>{Oc.init(e,t),E2.init(e,t)}),Ad=CC("ZodBase64",(e,t)=>{Op.init(e,t),E2.init(e,t)}),Ac=CC("ZodBase64URL",(e,t)=>{Ou.init(e,t),E2.init(e,t)}),Al=CC("ZodE164",(e,t)=>{Om.init(e,t),E2.init(e,t)}),Ap=CC("ZodJWT",(e,t)=>{Of.init(e,t),E2.init(e,t)}),Au=CC("ZodNumber",(e,t)=>{Oh.init(e,t),EX.init(e,t),e._zod.processJSONSchema=(t,r,i)=>El(e,t,r,i),EQ(e,"ZodNumber",{gt(e,t){return this.check(O9(e,t))},gte(e,t){return this.check(O5(e,t))},min(e,t){return this.check(O5(e,t))},lt(e,t){return this.check(O6(e,t))},lte(e,t){return this.check(O3(e,t))},max(e,t){return this.check(O3(e,t))},int(e){return this.check(Af(e))},safe(e){return this.check(Af(e))},positive(e){return this.check(O9(0,e))},nonnegative(e){return this.check(O5(0,e))},negative(e){return this.check(O6(0,e))},nonpositive(e){return this.check(O3(0,e))},multipleOf(e,t){return this.check(O8(e,t))},step(e,t){return this.check(O8(e,t))},finite(){return this}});let r=e._zod.bag;e.minValue=Math.max(r.minimum??-1/0,r.exclusiveMinimum??-1/0)??null,e.maxValue=Math.min(r.maximum??1/0,r.exclusiveMaximum??1/0)??null,e.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),e.isFinite=!0,e.format=r.format??null}),Am=CC("ZodNumberFormat",(e,t)=>{Oy.init(e,t),Au.init(e,t)});function Af(e){return new Am({type:"number",check:"number_format",abort:!1,format:"safeint",...Ty(e)})}let Ah=CC("ZodBoolean",(e,t)=>{Og.init(e,t),EX.init(e,t),e._zod.processJSONSchema=(t,r,i)=>Ep(e,t,r,i)});function Ay(e){return new Ah({type:"boolean",...Ty(e)})}let Ag=CC("ZodUnknown",(e,t)=>{O_.init(e,t),EX.init(e,t),e._zod.processJSONSchema=(t,r,i)=>Em(e,t,r,i)});function A_(){return new Ag({type:"unknown"})}let Av=CC("ZodNever",(e,t)=>{Ov.init(e,t),EX.init(e,t),e._zod.processJSONSchema=(t,r,i)=>Eu(e,t,r,i)});function Ab(e){return new Av({type:"never",...Ty(e)})}let A$=CC("ZodArray",(e,t)=>{O$.init(e,t),EX.init(e,t),e._zod.processJSONSchema=(t,r,i)=>E_(e,t,r,i),e.element=t.element,EQ(e,"ZodArray",{min(e,t){return this.check(Ee(e,t))},nonempty(e){return this.check(Ee(1,e))},max(e,t){return this.check(O7(e,t))},length(e,t){return this.check(Et(e,t))},unwrap(){return this.element}})});function AS(e,t){return new A$({type:"array",element:e,...Ty(t)})}let Ak=CC("ZodObject",(e,t)=>{OP.init(e,t),EX.init(e,t),e._zod.processJSONSchema=(t,r,i)=>Ev(e,t,r,i),To(e,"shape",()=>t.shape),EQ(e,"ZodObject",{keyof(){return AE(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:A_()})},loose(){return this.clone({...this._zod.def,catchall:A_()})},strict(){return this.clone({...this._zod.def,catchall:Ab()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(e){return function(e,t){if(!Tp(t))throw Error("Invalid input to extend: expected a plain object");let r=e._zod.def.checks;if(r&&r.length>0){let r=e._zod.def.shape;for(let e in t)if(void 0!==Object.getOwnPropertyDescriptor(r,e))throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let i=Ta(e._zod.def,{get shape(){let r={...e._zod.def.shape,...t};return Tn(this,"shape",r),r}});return Th(e,i)}(this,e)},safeExtend(e){var t=this;if(!Tp(e))throw Error("Invalid input to safeExtend: expected a plain object");let r=Ta(t._zod.def,{get shape(){let r={...t._zod.def.shape,...e};return Tn(this,"shape",r),r}});return Th(t,r)},merge(e){var t=this;if(t._zod.def.checks?.length)throw Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let r=Ta(t._zod.def,{get shape(){let r={...t._zod.def.shape,...e._zod.def.shape};return Tn(this,"shape",r),r},get catchall(){return e._zod.def.catchall},checks:e._zod.def.checks??[]});return Th(t,r)},pick(e){return function(e,t){let r=e._zod.def,i=r.checks;if(i&&i.length>0)throw Error(".pick() cannot be used on object schemas containing refinements");let o=Ta(e._zod.def,{get shape(){let e={};for(let i in t){if(!(i in r.shape))throw Error(`Unrecognized key: "${i}"`);t[i]&&(e[i]=r.shape[i])}return Tn(this,"shape",e),e},checks:[]});return Th(e,o)}(this,e)},omit(e){return function(e,t){let r=e._zod.def,i=r.checks;if(i&&i.length>0)throw Error(".omit() cannot be used on object schemas containing refinements");let o=Ta(e._zod.def,{get shape(){let i={...e._zod.def.shape};for(let e in t){if(!(e in r.shape))throw Error(`Unrecognized key: "${e}"`);t[e]&&delete i[e]}return Tn(this,"shape",i),i},checks:[]});return Th(e,o)}(this,e)},partial(...e){return function(e,t,r){let i=t._zod.def.checks;if(i&&i.length>0)throw Error(".partial() cannot be used on object schemas containing refinements");let o=Ta(t._zod.def,{get shape(){let i=t._zod.def.shape,o={...i};if(r)for(let t in r){if(!(t in i))throw Error(`Unrecognized key: "${t}"`);r[t]&&(o[t]=e?new e({type:"optional",innerType:i[t]}):i[t])}else for(let t in i)o[t]=e?new e({type:"optional",innerType:i[t]}):i[t];return Tn(this,"shape",o),o},checks:[]});return Th(t,o)}(AN,this,e[0])},required(...e){var t,r;let i;return t=this,r=e[0],i=Ta(t._zod.def,{get shape(){let e=t._zod.def.shape,i={...e};if(r)for(let t in r){if(!(t in i))throw Error(`Unrecognized key: "${t}"`);r[t]&&(i[t]=new AG({type:"nonoptional",innerType:e[t]}))}else for(let t in e)i[t]=new AG({type:"nonoptional",innerType:e[t]});return Tn(this,"shape",i),i}}),Th(t,i)}})});function Aw(e,t){return new Ak({type:"object",shape:e??{},...Ty(t)})}function AR(e,t){return new Ak({type:"object",shape:e,catchall:Ab(),...Ty(t)})}let AP=CC("ZodUnion",(e,t)=>{Oq.init(e,t),EX.init(e,t),e._zod.processJSONSchema=(t,r,i)=>Eb(e,t,r,i),e.options=t.options});function AV(e,t){return new AP({type:"union",options:e,...Ty(t)})}let Aq=CC("ZodDiscriminatedUnion",(e,t)=>{AP.init(e,t),OI.init(e,t)});function AI(e,t,r){return new Aq({type:"union",options:t,discriminator:e,...Ty(r)})}let Ax=CC("ZodIntersection",(e,t)=>{Ox.init(e,t),EX.init(e,t),e._zod.processJSONSchema=(t,r,i)=>E$(e,t,r,i)}),Aj=CC("ZodTuple",(e,t)=>{OC.init(e,t),EX.init(e,t),e._zod.processJSONSchema=(t,r,i)=>ES(e,t,r,i),e.rest=t=>e.clone({...e._zod.def,rest:t})}),AC=CC("ZodRecord",(e,t)=>{OA.init(e,t),EX.init(e,t),e._zod.processJSONSchema=(t,r,i)=>Ek(e,t,r,i),e.keyType=t.keyType,e.valueType=t.valueType});function AT(e,t,r){return new AC(t&&t._zod?{type:"record",keyType:e,valueType:t,...Ty(r)}:{type:"record",keyType:E0(),valueType:e,...Ty(t)})}let AO=CC("ZodEnum",(e,t)=>{OM.init(e,t),EX.init(e,t),e._zod.processJSONSchema=(t,r,i)=>Ef(e,t,r,i),e.enum=t.entries,e.options=Object.values(t.entries);let r=new Set(Object.keys(t.entries));e.extract=(e,i)=>{let o={};for(let i of e)if(r.has(i))o[i]=t.entries[i];else throw Error(`Key ${i} not found in enum`);return new AO({...t,checks:[],...Ty(i),entries:o})},e.exclude=(e,i)=>{let o={...t.entries};for(let t of e)if(r.has(t))delete o[t];else throw Error(`Key ${t} not found in enum`);return new AO({...t,checks:[],...Ty(i),entries:o})}});function AE(e,t){return new AO({type:"enum",entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...Ty(t)})}let AA=CC("ZodLiteral",(e,t)=>{OW.init(e,t),EX.init(e,t),e._zod.processJSONSchema=(t,r,i)=>Eh(e,t,r,i),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function AM(e,t){return new AA({type:"literal",values:Array.isArray(e)?e:[e],...Ty(t)})}let AW=CC("ZodTransform",(e,t)=>{ON.init(e,t),EX.init(e,t),e._zod.processJSONSchema=(t,r,i)=>Eg(e,t,r,i),e._zod.parse=(r,i)=>{if("backward"===i.direction)throw new CO(e.constructor.name);r.addIssue=i=>{"string"==typeof i?r.issues.push(Tk(i,r.value,t)):(i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=r.value),i.inst??(i.inst=e),r.issues.push(Tk(i)))};let o=t.transform(r.value,r);return o instanceof Promise?o.then(e=>(r.value=e,r.fallback=!0,r)):(r.value=o,r.fallback=!0,r)}}),AN=CC("ZodOptional",(e,t)=>{OD.init(e,t),EX.init(e,t),e._zod.processJSONSchema=(t,r,i)=>Ej(e,t,r,i),e.unwrap=()=>e._zod.def.innerType});function Az(e){return new AN({type:"optional",innerType:e})}let AD=CC("ZodExactOptional",(e,t)=>{OF.init(e,t),EX.init(e,t),e._zod.processJSONSchema=(t,r,i)=>Ej(e,t,r,i),e.unwrap=()=>e._zod.def.innerType}),AF=CC("ZodNullable",(e,t)=>{OL.init(e,t),EX.init(e,t),e._zod.processJSONSchema=(t,r,i)=>Ew(e,t,r,i),e.unwrap=()=>e._zod.def.innerType});function AL(e){return new AF({type:"nullable",innerType:e})}let AU=CC("ZodDefault",(e,t)=>{OU.init(e,t),EX.init(e,t),e._zod.processJSONSchema=(t,r,i)=>EP(e,t,r,i),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap}),AH=CC("ZodPrefault",(e,t)=>{OG.init(e,t),EX.init(e,t),e._zod.processJSONSchema=(t,r,i)=>EV(e,t,r,i),e.unwrap=()=>e._zod.def.innerType}),AG=CC("ZodNonOptional",(e,t)=>{OB.init(e,t),EX.init(e,t),e._zod.processJSONSchema=(t,r,i)=>ER(e,t,r,i),e.unwrap=()=>e._zod.def.innerType}),AB=CC("ZodCatch",(e,t)=>{OJ.init(e,t),EX.init(e,t),e._zod.processJSONSchema=(t,r,i)=>Eq(e,t,r,i),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap}),AK=CC("ZodPipe",(e,t)=>{OZ.init(e,t),EX.init(e,t),e._zod.processJSONSchema=(t,r,i)=>EI(e,t,r,i),e.in=t.in,e.out=t.out});function AJ(e,t){return new AK({type:"pipe",in:e,out:t})}let AZ=CC("ZodReadonly",(e,t)=>{OX.init(e,t),EX.init(e,t),e._zod.processJSONSchema=(t,r,i)=>Ex(e,t,r,i),e.unwrap=()=>e._zod.def.innerType}),AQ=CC("ZodCustom",(e,t)=>{O1.init(e,t),EX.init(e,t),e._zod.processJSONSchema=(t,r,i)=>Ey(e,t,r,i)});function AX(e){return encodeURI(e.replace(/~/g,"~0").replace(/\//g,"~1"))}let AY={prefixItems:!0,items:!0,allOf:!0,anyOf:!0,oneOf:!0},A1={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependentSchemas:!0},A0={id:!0,$id:!0,$ref:!0,$schema:!0,$anchor:!0,$vocabulary:!0,$comment:!0,default:!0,enum:!0,const:!0,required:!0,type:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0},A2="u">typeof self&&self.location&&"null"!==self.location.origin?new URL(self.location.origin+self.location.pathname+location.search):new URL("https://github.com/cfworker");function A4(e,t=Object.create(null),r=A2,i=""){if(e&&"object"==typeof e&&!Array.isArray(e)){let o=e.$id||e.id;if(o){let n=new URL(o,r.href);n.hash.length>1?t[n.href]=e:(n.hash="",""===i?r=n:A4(e,t,r))}}else if(!0!==e&&!1!==e)return t;let o=r.href+(i?"#"+i:"");if(void 0!==t[o])throw Error(`Duplicate schema URI "${o}".`);if(t[o]=e,!0===e||!1===e)return t;if(void 0===e.__absolute_uri__&&Object.defineProperty(e,"__absolute_uri__",{enumerable:!1,value:o}),e.$ref&&void 0===e.__absolute_ref__){let t=new URL(e.$ref,r.href);t.hash=t.hash,Object.defineProperty(e,"__absolute_ref__",{enumerable:!1,value:t.href})}if(e.$recursiveRef&&void 0===e.__absolute_recursive_ref__){let t=new URL(e.$recursiveRef,r.href);t.hash=t.hash,Object.defineProperty(e,"__absolute_recursive_ref__",{enumerable:!1,value:t.href})}for(let o in e.$anchor&&(t[new URL("#"+e.$anchor,r.href).href]=e),e){if(A0[o])continue;let n=`${i}/${AX(o)}`,a=e[o];if(Array.isArray(a)){if(AY[o]){let e=a.length;for(let i=0;ie.length>1&&e.length<80&&(/^P\d+([.,]\d+)?W$/.test(e)||/^P[\dYMDTHS]*(\d[.,]\d+)?[YMDHS]$/.test(e)&&/^P([.,\d]+Y)?([.,\d]+M)?([.,\d]+D)?(T([.,\d]+H)?([.,\d]+M)?([.,\d]+S)?)?$/.test(e)),uri:function(e){return Mr.test(e)&&Mi.test(e)},"uri-reference":A5(/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i),"uri-template":A5(/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i),url:A5(/^(?:(?:https?|ftp):\/\/)(?:\S+(?::\S*)?@)?(?:(?!10(?:\.\d{1,3}){3})(?!127(?:\.\d{1,3}){3})(?!169\.254(?:\.\d{1,3}){2})(?!192\.168(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)(?:\.(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu),email:e=>{if('"'===e[0])return!1;let[t,r,...i]=e.split("@");return!(!t||!r||0!==i.length||t.length>64||r.length>253||"."===t[0]||t.endsWith(".")||t.includes(".."))&&!!/^[a-z0-9.-]+$/i.test(r)&&!!/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+$/i.test(t)&&r.split(".").every(e=>/^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$/i.test(e))},hostname:A5(/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i),ipv4:A5(/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/),ipv6:A5(/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i),regex:function(e){if(Mo.test(e))return!1;try{return RegExp(e,"u"),!0}catch(e){return!1}},uuid:A5(/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i),"json-pointer":A5(/^(?:\/(?:[^~/]|~0|~1)*)*$/),"json-pointer-uri-fragment":A5(/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i),"relative-json-pointer":A5(/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/)};function A7(e){var t;let r=e.match(A6);if(!r)return!1;let i=+r[1],o=+r[2],n=+r[3];return o>=1&&o<=12&&n>=1&&n<=(2==o&&(t=i)%4==0&&(t%100!=0||t%400==0)?29:A3[o])}function Me(e,t){let r=t.match(A9);if(!r)return!1;let i=+r[1],o=+r[2],n=+r[3],a=!!r[5];return(i<=23&&o<=59&&n<=59||23==i&&59==o&&60==n)&&(!e||a)}let Mt=/t|\s/i,Mr=/\/|:/,Mi=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,Mo=/[^\\]\\Z/;function Mn(e,t){let r=typeof e;if(r!==typeof t)return!1;if(Array.isArray(e)){if(!Array.isArray(t))return!1;let r=e.length;if(r!==t.length)return!1;for(let i=0;iWO(t,e))||ei.push({instanceLocation:s,keyword:"enum",keywordLocation:`${d}/enum`,error:`Instance does not match any of ${JSON.stringify(g)}.`}):g.some(e=>t===e)||ei.push({instanceLocation:s,keyword:"enum",keywordLocation:`${d}/enum`,error:`Instance does not match any of ${JSON.stringify(g)}.`})),void 0!==v){let r=`${d}/not`;e(t,v,i,o,n,a,s,r).valid&&ei.push({instanceLocation:s,keyword:"not",keywordLocation:r,error:'Instance matched "not" schema.'})}let eo=[];if(void 0!==b){let r=`${d}/anyOf`,l=ei.length,p=!1;for(let d=0;d{let p=Object.create(c),u=e(t,d,i,o,n,!0===f?a:null,s,`${r}/${l}`,p);return ei.push(...u.errors),u.valid&&eo.push(p),u.valid}).length;1===p?ei.length=l:ei.splice(l,0,{instanceLocation:s,keyword:"oneOf",keywordLocation:r,error:`Instance does not match exactly one subschema (${p} matches).`})}if(("object"===l||"array"===l)&&Object.assign(c,...eo),void 0!==k){let r=`${d}/if`;if(e(t,k,i,o,n,a,s,r,c).valid){if(void 0!==w){let l=e(t,w,i,o,n,a,s,`${d}/then`,c);l.valid||ei.push({instanceLocation:s,keyword:"if",keywordLocation:r,error:'Instance does not match "then" schema.'},...l.errors)}}else if(void 0!==V){let l=e(t,V,i,o,n,a,s,`${d}/else`,c);l.valid||ei.push({instanceLocation:s,keyword:"if",keywordLocation:r,error:'Instance does not match "else" schema.'},...l.errors)}}if("object"===l){if(void 0!==_)for(let e of _)e in t||ei.push({instanceLocation:s,keyword:"required",keywordLocation:`${d}/required`,error:`Instance does not have required property "${e}".`});let r=Object.keys(t);if(void 0!==j&&r.lengthC&&ei.push({instanceLocation:s,keyword:"maxProperties",keywordLocation:`${d}/maxProperties`,error:`Instance does not have at least ${C} properties.`}),void 0!==T){let r=`${d}/propertyNames`;for(let d in t){let t=`${s}/${Wg(d)}`,c=e(d,T,i,o,n,a,t,r);c.valid||ei.push({instanceLocation:s,keyword:"propertyNames",keywordLocation:r,error:`Property name "${d}" does not match schema.`},...c.errors)}}if(void 0!==O){let e=`${d}/dependantRequired`;for(let r in O)if(r in t)for(let i of O[r])i in t||ei.push({instanceLocation:s,keyword:"dependentRequired",keywordLocation:e,error:`Instance has "${r}" but does not have "${i}".`})}if(void 0!==E)for(let r in E){let l=`${d}/dependentSchemas`;if(r in t){let d=e(t,E[r],i,o,n,a,s,`${l}/${Wg(r)}`,c);d.valid||ei.push({instanceLocation:s,keyword:"dependentSchemas",keywordLocation:l,error:`Instance has "${r}" but does not match dependant schema.`},...d.errors)}}if(void 0!==A){let r=`${d}/dependencies`;for(let d in A)if(d in t){let c=A[d];if(Array.isArray(c))for(let e of c)e in t||ei.push({instanceLocation:s,keyword:"dependencies",keywordLocation:r,error:`Instance has "${d}" but does not have "${e}".`});else{let l=e(t,c,i,o,n,a,s,`${r}/${Wg(d)}`);l.valid||ei.push({instanceLocation:s,keyword:"dependencies",keywordLocation:r,error:`Instance has "${d}" but does not match dependant schema.`},...l.errors)}}}let l=Object.create(null),p=!1;if(void 0!==R){let r=`${d}/properties`;for(let d in R){if(!(d in t))continue;let u=`${s}/${Wg(d)}`,m=e(t[d],R[d],i,o,n,a,u,`${r}/${Wg(d)}`);if(m.valid)c[d]=l[d]=!0;else if(p=n,ei.push({instanceLocation:s,keyword:"properties",keywordLocation:r,error:`Property "${d}" does not match schema.`},...m.errors),p)break}}if(!p&&void 0!==q){let r=`${d}/patternProperties`;for(let d in q){let u=RegExp(d,"u"),m=q[d];for(let f in t){if(!u.test(f))continue;let h=`${s}/${Wg(f)}`,y=e(t[f],m,i,o,n,a,h,`${r}/${Wg(d)}`);y.valid?c[f]=l[f]=!0:(p=n,ei.push({instanceLocation:s,keyword:"patternProperties",keywordLocation:r,error:`Property "${f}" matches pattern "${d}" but does not match associated schema.`},...y.errors))}}}if(p||void 0===I){if(!p&&void 0!==x){let r=`${d}/unevaluatedProperties`;for(let d in t)if(!c[d]){let l=`${s}/${Wg(d)}`,p=e(t[d],x,i,o,n,a,l,r);p.valid?c[d]=!0:ei.push({instanceLocation:s,keyword:"unevaluatedProperties",keywordLocation:r,error:`Property "${d}" does not match unevaluated properties schema.`},...p.errors)}}}else{let r=`${d}/additionalProperties`;for(let d in t){if(l[d])continue;let u=`${s}/${Wg(d)}`,m=e(t[d],I,i,o,n,a,u,r);m.valid?c[d]=!0:(p=n,ei.push({instanceLocation:s,keyword:"additionalProperties",keywordLocation:r,error:`Property "${d}" does not match additional properties schema.`},...m.errors))}}}else if("array"===l){void 0!==H&&t.length>H&&ei.push({instanceLocation:s,keyword:"maxItems",keywordLocation:`${d}/maxItems`,error:`Array has too many items (${t.length} > ${H}).`}),void 0!==U&&t.length=(F||0)&&(ei.length=p),void 0===F&&void 0===L&&0===u?ei.splice(p,0,{instanceLocation:s,keyword:"contains",keywordLocation:l,error:"Array does not contain item matching schema."}):void 0!==F&&uL&&ei.push({instanceLocation:s,keyword:"maxContains",keywordLocation:`${d}/maxContains`,error:`Array may contain at most ${L} items matching schema. ${u} items were found.`})}if(!p&&void 0!==z){let p=`${d}/unevaluatedItems`;for(;l=K||t>K)&&ei.push({instanceLocation:s,keyword:"maximum",keywordLocation:`${d}/maximum`,error:`${t} is greater than ${Z?"or equal to ":""} ${K}.`})):(void 0!==B&&tK&&ei.push({instanceLocation:s,keyword:"maximum",keywordLocation:`${d}/maximum`,error:`${t} is greater than ${K}.`}),void 0!==J&&t<=J&&ei.push({instanceLocation:s,keyword:"exclusiveMinimum",keywordLocation:`${d}/exclusiveMinimum`,error:`${t} is less than ${J}.`}),void 0!==Z&&t>=Z&&ei.push({instanceLocation:s,keyword:"exclusiveMaximum",keywordLocation:`${d}/exclusiveMaximum`,error:`${t} is greater than or equal to ${Z}.`})),void 0!==Q){let e=t%Q;Math.abs(0-e)>=11920929e-14&&Math.abs(Q-e)>=11920929e-14&&ei.push({instanceLocation:s,keyword:"multipleOf",keywordLocation:`${d}/multipleOf`,error:`${t} is not a multiple of ${Q}.`})}}else if("string"===l){let e=void 0===X&&void 0===Y?0:function(e){let t,r=0,i=e.length,o=0;for(;o=55296&&t<=56319&&oY&&ei.push({instanceLocation:s,keyword:"maxLength",keywordLocation:`${d}/maxLength`,error:`String is too long (${e} > ${Y}).`}),void 0===ee||RegExp(ee,"u").test(t)||ei.push({instanceLocation:s,keyword:"pattern",keywordLocation:`${d}/pattern`,error:"String does not match pattern."}),void 0!==P&&WR[P]&&!WR[P](t)&&ei.push({instanceLocation:s,keyword:"format",keywordLocation:`${d}/format`,error:`String does not match format "${P}".`})}return{valid:0===ei.length,errors:ei}}(e,this.schema,this.draft,this.lookup,this.shortCircuit)}addSchema(e,t){t&&(e={...e,$id:t}),WS(e,this.lookup)}}let WA=w5.shape.oneOf.element.extend({"x-openai-thumbnail":kq.optional(),"x-openai-preview":kq.optional(),description:Ab().optional()}),WW=Vt.omit({items:!0}).shape,WM=w6.extend({pattern:Ab().optional(),"x-openai-suggestions":AQ(WA).optional()}),WN={"x-openai-input":AJ().optional()},Wz=w5.extend({...WN,oneOf:AQ(WA),anyOf:AJ().optional()}),WD=AY({...WW,...WN,uniqueItems:AH().optional(),items:WM.extend({enum:AJ().optional(),oneOf:AJ().optional(),anyOf:AJ().optional()})}),WF=[Wz,Vt.extend({...WN,items:AY({enum:AJ().optional(),anyOf:AQ(WA)})}),Ve.extend({...WN,items:Ve.shape.items.extend({anyOf:AJ().optional()})}),w8.extend({...WN,oneOf:AJ().optional(),anyOf:AJ().optional()}),WM.extend({...WN,enum:AJ().optional(),oneOf:AJ().optional(),anyOf:AJ().optional()}),w3.extend(WN),w4.extend(WN),WD],WL=AY({kind:We(["file","directory"]).optional(),accept:AQ(Ab()).optional()}),WU=AY({type:We(["resource","file"]).describe('"file" is deprecated. Use "resource" instead.'),options:AQ(k4),userOptions:WL.optional(),selection:We(["explicit","implicit"]).optional()}),WH=WM.extend({format:Wr("uri"),enum:AJ().optional(),oneOf:AJ().optional(),anyOf:AJ().optional()}),WG=A2([A6("type",[WH.extend({"x-openai-input":WU.extend({selection:AJ().optional()})}),AY({...WW,items:WH,"x-openai-input":WU})]).superRefine((e,t)=>{let r=e["x-openai-input"];null!=e.default&&("implicit"===r.selection&&t.addIssue({code:"custom",path:["default"],message:"Implicit selection cannot specify a default"}),(Array.isArray(e.default)?e.default:[e.default]).some(e=>!r.options.some(t=>t.uri===e))&&t.addIssue({code:"custom",path:["default"],message:"Defaults must name supplied resources"}))}),...WF]),WB=AY({$schema:Ab().optional(),type:Wr("object"),required:AQ(Ab()).optional(),properties:WZ(WG)}),WK=WZ(A2([Ab(),new AD({type:"number",checks:[],...TH(void 0)}),AH(),AQ(Ab())])),WJ=A6("action",[AY({action:Wr("accept"),content:WK}),AY({action:We(["cancel","decline"])})]);function WZ(e){var t,r;let i;return(t=(e=>A8(Ab(),AB()).safeParse(e).success)??(()=>!0),(i=TH(void 0)).abort??(i.abort=!0),new Wy({type:"custom",check:"custom",fn:t,...i})).transform(e=>Object.entries(e)).pipe(AQ((r=[Ab(),e.nonoptional()],new A9({type:"tuple",items:r,rest:null,...TH(void 0)})))).transform(e=>Object.fromEntries(e))}let WQ="openai/elicitation",WX=AY({"io.modelcontextprotocol/protocolVersion":Ab().optional(),"io.modelcontextprotocol/clientCapabilities":AB().optional()}),WY=AY({extensions:AY({[WQ]:AY({form:AY({})})})}),W1=Ab().regex(/\S/),W0="openai/mentions";AY({searchTool:W1});let W2=A6("type",[wV,A1({icons:AQ(kq).optional(),resourceUri:W1,subtitle:W1.optional(),title:W1,type:Wr("resource")})]),W4=AY({query:Ab()}),W6=A1({items:AQ(W2)}),W3="openai/settings";AY({readTool:W1,updateTool:W1});let W9=A6("kind",[A1({kind:Wr("property"),property:Ab()}),A1({kind:Wr("tool"),tool:W1,title:W1.optional(),description:Ab().optional()})]),W5=A1({kind:Wr("group"),title:W1,items:AQ(W9)}),W8=AY({title:W1,description:Ab().optional()}),W7=AY({schema:new AX({type:"object",shape:{type:Wr("object"),properties:A8(Ab(),AB()).optional(),required:AQ(Ab()).optional()},catchall:AB(),...TH(void 0)}),layout:AQ(W5).optional(),values:A8(Ab(),AB())}).superRefine(({schema:e,layout:t},r)=>{let i=new Set;for(let o of t??[])for(let t of o.items)"property"===t.kind&&((!Object.hasOwn(e.properties??{},t.property)||i.has(t.property))&&r.addIssue({code:"custom",path:["layout"],message:`Unknown or duplicate settings key: ${t.property}`}),i.add(t.property))});A1({set:A8(Ab(),AB()).refine(e=>Object.keys(e).length>0,"Set at least one setting.").meta({minProperties:1})});let Me=AY({values:A8(Ab(),AB())}),Mt=AY({type:We(["boolean","string","number","integer"]),enum:AQ(Ab()).nonempty().optional(),$ref:AJ().optional(),anyOf:AJ().optional(),oneOf:AJ().optional(),allOf:AJ().optional()}).refine(e=>void 0===e.enum||"string"===e.type);class Mr{elicitInputLegacy;elicitInput;mentions;settings;constructor(e){let t,r,i;this.elicitInputLegacy=async(t,r,i)=>{let o=WX.parse(t.mcpReq.envelope??{}),n=o["io.modelcontextprotocol/protocolVersion"]??e.server.getNegotiatedProtocolVersion();if(void 0!==n&&n>="2026-07-28")throw Error("Use requestFormInput for MCP 2026-07-28 or newer");if(!WY.safeParse(o["io.modelcontextprotocol/clientCapabilities"]??e.server.getClientCapabilities()).success)throw Error(`The MCP client does not support ${WQ} form requests`);let a=WB.parse(r.requestedSchema),s=await t.mcpReq.send({method:"openai/elicitation/create",params:{...r,requestedSchema:a}},WJ,i);if("accept"===s.action){let e;return{...s,content:(e=new WE(structuredClone(a),"2020-12",!1),WK.superRefine((t,r)=>{for(let i of e.validate(Object.setPrototypeOf({...t},null)).errors)"#/required"!==i.keywordLocation&&r.addIssue({code:"custom",path:i.instanceLocation.split("/").slice(1).map(e=>e.replace(/~1/g,"/").replace(/~0/g,"~")),message:i.error});for(let e of a.required??[])Object.hasOwn(t,e)||r.addIssue({code:"custom",path:[e],message:"Required field"});for(let[e,i]of Object.entries(a.properties))Object.hasOwn(t,e)&&null!=i["x-openai-input"]&&!function(e,t){let r=Array.isArray(t)?t:[t];return"implicit"===e.selection||null!=e.userOptions||r.every(t=>e.options.some(e=>e.uri===t))}(i["x-openai-input"],t[e])&&r.addIssue({code:"custom",path:[e],message:"Invalid file selection"})})).parse(s.content)}}return s},this.elicitInput=this.elicitInputLegacy,this.mentions=(t=null,r=!1,{setHandler:i=>{if(!r){if(e.server.transport)throw Error("Register mention search before connecting the server.");e.registerTool("search_mentions",{annotations:{readOnlyHint:!0},inputSchema:W4,outputSchema:W6,_meta:{"openai/extensions":{"mentions/search":{}},ui:{visibility:["app"]}}},async(e,r)=>({content:[],structuredContent:null==t?{items:[]}:await t(e,r)}));let i={searchTool:"search_mentions"};e.server.registerCapabilities({extensions:{[W0]:i},experimental:{[W0]:i}}),r=!0}t=i}}),this.settings=(i=Symbol.for("@openai/mcp-extensions/settings/registered"),{register(t){if(i in e)throw Error("Settings are already registered on this server.");if(e.server.transport)throw Error("Register settings before connecting the server.");let r=W1.parse(t.readTool??"settings.read"),o=W1.parse(t.updateTool??"settings.update");if(r===o)throw Error("Settings read and update tools must have different names.");let n=Object.fromEntries(Object.entries(t.fields).map(([e,t])=>[e,t.schema.meta({...t.schema.meta(),title:t.title,description:t.description})])),a=A1(n).required(),s=wC.shape.inputSchema.parse(function(e){if("_idmap"in e){let t=EC({processors:E5}),r={};for(let r of e._idmap.entries()){let[e,i]=r;ET(i,t)}let i={};for(let o of(t.external={registry:e,uri:void 0,defs:r},e._idmap.entries())){let[e,r]=o;EO(t,r),i[e]=EE(t,r)}return Object.keys(r).length>0&&(i.__shared={["draft-2020-12"===t.target?"$defs":"definitions"]:r}),{schemas:i}}let t=EC({processors:E5});return ET(e,t),EO(t,e),EE(t,e)}(a));for(let[e,t]of Object.entries(s.properties??{})){if(W8.parse(t),!Mt.safeParse(t).success)throw Error(`Unsupported native setting ${JSON.stringify(e)}: use a boolean, string, string enum, number, or integer field.`);if("object"==typeof t&&null!==t&&"default"in t)throw Error("Settings defaults must be returned by the read handler, not declared in the schema.")}let{layout:d}=W7.parse({schema:s,layout:t.layout,values:{}}),c=A1(n).partial().refine(e=>Object.keys(e).length>0,"Set at least one setting.").meta({minProperties:1}),l=e.registerTool(r,{inputSchema:A1({}),outputSchema:W7.safeExtend({values:a}),annotations:{readOnlyHint:!0}},async(e,r)=>({content:[],structuredContent:{schema:s,...void 0===d?{}:{layout:d},values:a.parse(await t.read(r))}}));try{e.registerTool(o,{inputSchema:A1({set:c}),outputSchema:Me.extend({values:a})},async({set:e},r)=>({content:[],structuredContent:{values:a.parse(await t.update(e,r))}}));let n={readTool:r,updateTool:o};e.server.registerCapabilities({extensions:{[W3]:n},experimental:{[W3]:n}}),Object.defineProperty(e,i,{value:!0})}catch(e){throw l.remove(),e}}})}}function Mi(e){switch(e.kind){case"projects":return"/";case"project":return`/projects/${encodeURIComponent(e.project_id)}`;case"search":return`/projects/${encodeURIComponent(e.project_id)}/search?q=${encodeURIComponent(e.query)}`;case"symbol":return`/projects/${encodeURIComponent(e.project_id)}/symbols/${encodeURIComponent(e.node_id)}`}}async function Mo(e){try{return await e()}catch(e){return{state:"failed",failure:CH(e)}}}async function Mn(e,t){let r=await Mo(async()=>{let r=await e.listProjects(t);return 0===r.length?{state:"empty",message:"No projects are registered in this TraceDecay profile. Run `tracedecay init` in a repository first."}:{state:"ready",data:r}});return{page:"projects",daemon:await e.daemonState(),projects:r}}async function Ma(e,t,r){let i=CH(r),o=null;try{o=await e.resolveProject(t)}catch{o=null}return{page:"failure",project:o,failure:i}}async function Ms(e,t,r,i){var o,n,a,s,d,c;let l,p,u=await e.resolveProject(t,i),m=Mc(u,await Md(()=>e.status(t,i))),[f,h,y,g]=await Promise.all([Mo(async()=>{var o,n;let a=await e.node(t,r,i);return"id"in(o=a)&&"string"==typeof o.id?{state:"ready",data:{node_id:(n=a).id,name:n.name,qualified_name:n.qualified_name,kind:n.kind,file:n.file,start_line:n.start_line,end_line:n.end_line,signature:n.signature??null,complexity:n.cyclomatic_complexity??null,unavailable_fields:n.unavailable_fields}}:{state:"failed",failure:{kind:"not_found",code:a.reason_code,message:a.message}}}),Mo(async()=>Mp(await e.callers(t,r,1,i),"callers")),Mo(async()=>{let o=m?.generation;if(null==o)throw new CD({kind:"unavailable",code:"generation_unknown",message:"The daemon has not reported a served code generation for this project yet, so callee reads cannot be scoped."});return Mp(await e.callees(t,r,o,1,i),"callees")}),Mo(async()=>{let o=await e.impact(t,r,3,i);if(!("nodes"in o))return{state:"failed",failure:{kind:"not_found",code:o.reason_code,message:o.message}};let n=o.nodes.map(Mu);return 0===n.length&&o.complete?{state:"empty",message:"No dependents reach this symbol within the traversed depth."}:{state:"ready",data:{nodes:n,complete:o.complete,max_depth:3}}})]),_=function(e,t,r){if("ready"!==e.state)return"failed"===e.state?{state:"failed",failure:e.failure}:{state:"empty",message:e.message};if("failed"===t.state&&"failed"===r.state)return{state:"failed",failure:t.failure};let i={...e.data,role:"focus",depth:0},o=[i],n=[],a=new Set([i.node_id]),s=(e,t)=>{for(let r of e)a.has(r.symbol.node_id)||(a.add(r.symbol.node_id),o.push({...r.symbol,role:t,depth:r.depth})),n.push("caller"===t?{from:r.symbol.node_id,to:i.node_id,edge_kind:r.edge_kind}:{from:i.node_id,to:r.symbol.node_id,edge_kind:r.edge_kind})};if("ready"===t.state&&s(t.data,"caller"),"ready"===r.state&&s(r.data,"callee"),1===o.length)return{state:"empty",message:"This symbol has no recorded callers or callees."};let d="ready"===t.state&&"ready"===r.state&&void 0!==t.generation&&void 0!==r.generation&&t.generation!==r.generation;return{state:"ready",data:{nodes:o,edges:n,max_depth:1,truncated:"failed"===t.state||"failed"===r.state||"ready"===t.state&&!0===t.truncated||"ready"===r.state&&!0===r.truncated||d}}}(f,h,y),v="ready"===f.state?(o=u,n=f.data,a=h,s=y,d=g,c=m,l=`${n.file}:${n.start_line??"?"}-${n.end_line??"?"}`,p=[`## ${n.kind} \`${n.qualified_name}\``,`- Project: ${o.label} (${o.project_id})`,`- Location: ${l}`,...null===n.signature?[]:[`- Signature: \`${n.signature}\``],`- Node id: \`${n.node_id}\``,"_Symbol and impact reads do not report a generation; their snapshot identity is unverified._",...Mf(a,"Callers",c?.generation??null),...Mf(s,"Callees",c?.generation??null),...Mm("Impact","ready"===d.state?{state:"ready",data:d.data.nodes}:d,e=>`depth ${e.depth}: ${e.name} (${e.file}:${e.line})`),..."ready"!==d.state||d.data.complete?[]:["_Impact traversal is partial: the daemon hit its traversal budget._"],"### Reported project status (separate read)",...null===c?["_Project status unavailable; provenance not verified._"]:[`- Repository: ${c.repository_id??"unknown"}`,`- Worktree: ${c.worktree_id??"unknown"} (${c.project_root})`,`- Ref: ${c.reference??"unknown"}${null===c.branch?"":` (branch ${c.branch})`}`,`- Commit: ${c.commit??"unknown"}`,`- Generation: ${c.generation??"unknown"}`,`- Freshness: ${c.freshness.state}${null===c.freshness.detail?"":` (${c.freshness.detail})`}`,`- Coverage: ${c.coverage.recall}${null===c.coverage.detail?"":` (${c.coverage.detail})`}`],`- Deep link: ${Mi({kind:"symbol",project_id:o.project_id,node_id:n.node_id})}`],{title:`${n.kind} ${n.qualified_name}`,markdown:p.join("\n"),structured:{project:o,symbol:n,callers:a,callees:s,impact:d,provenance:c}}):null;return{page:"symbol",project:u,symbol:f,callers:h,callees:y,impact:g,graph:_,provenance:m,evidence:v}}async function Md(e){try{return{ok:!0,value:await e()}}catch(e){return{ok:!1,failure:CH(e)}}}function Mc(e,t){if(!t.ok||!("code_index_freshness"in t.value.status))return null;let r=t.value.status,i=t.value.authority,o=r.code_index_freshness;if(!("worktree"in o))return null;let n=o.worktree,a=null===n.staleness_state||void 0===n.staleness_state?null:`worktree ${n.staleness_state}`,s=n.coverage,d="string"==typeof s?s:JSON.stringify(s);return{project_id:e.project_id,project_root:n.worktree_root,repository_id:n.repository_id??null,worktree_id:n.worktree_id??null,reference:n.source_reference??null,branch:r.current_branch??r.active_branch??null,commit:n.source_revision??null,generation:n.latest_generation_id??null,freshness:{state:function(e){switch(e){case"current":case"stale":case"warming":case"restoring":case"parked":case"unavailable":return e;default:return"unavailable"}}(o.status),detail:"reason"in o&&"string"==typeof o.reason?o.reason:a},coverage:{recall:"complete"===d?"full":"partial",detail:d},authority:{profile_root:i.profile_root,daemon_version:i.version,daemon_pid:i.pid}}}function Ml(e){var t;return{symbol:{node_id:(t=e.symbol).node_id,name:t.name,qualified_name:t.qualified_name,kind:t.kind,file:t.file,start_line:t.line,end_line:t.end_line,signature:t.signature??null},edge_kind:e.edge_kind,depth:e.depth??1,dispatch_via_trait:e.dispatch_via_trait}}function Mp(e,t){let r=e.items.map(Ml);if(0===r.length)return{state:"empty",message:`No ${t} recorded in the served graph.`};let i="truncated"in e&&e.truncated||null!==e.next_cursor&&void 0!==e.next_cursor||"number"==typeof e.total&&e.total>r.length;return{state:"ready",data:r,truncated:i,generation:e.generation}}function Mu(e){return{node_id:e.id,name:e.name,kind:e.kind,file:e.file,line:e.line,depth:e.depth}}function Mm(e,t,r){let i=[`### ${e}`];switch(t.state){case"ready":i.push(...t.data.map(e=>`- ${r(e)}`)),!0===t.truncated&&i.push("_First page only; more rows exist than shown._");break;case"empty":i.push(`_${t.message}_`);break;case"failed":i.push(`_Unavailable (${t.failure.kind}: ${t.failure.message})_`)}return i}function Mf(e,t,r){let i=Mm(t,e,e=>`${e.symbol.qualified_name} (${e.symbol.file}:${e.symbol.start_line??"?"}, ${e.edge_kind})`);return"ready"===e.state&&null!==r&&void 0!==e.generation&&e.generation!==r&&i.push(`_Served from generation ${e.generation}, which differs from the reported project generation ${r}._`),i}function Mh(e){switch(e.page){case"projects":return"ready"===e.projects.state?`Recent TraceDecay projects: ${e.projects.data.map(e=>`${e.label} (${e.project_id})`).join(", ")}`:"empty"===e.projects.state?e.projects.message:`TraceDecay projects unavailable (${e.projects.failure.kind}): ${e.projects.failure.message}`;case"search":if("ready"===e.results.state){let t=e.results.data.hits.map(e=>`- ${e.kind} ${e.qualified_name} (${e.file}) node_id=${e.node_id}`).join("\n"),r=e.results.data.undisplayable.length;return`Search "${e.query}" in ${e.project.label}${"partial"===e.results.data.recall?" (partial recall)":""}${r>0?` (${r} candidate(s) could not be displayed)`:""}: -${t}`}return"empty"===e.results.state?`Search "${e.query}" in ${e.project.label}: ${e.results.message}`:`Search "${e.query}" in ${e.project.label} failed (${e.results.failure.kind}): ${e.results.failure.message}`;case"symbol":return null===e.evidence?"failed"===e.symbol.state?`Symbol lookup failed (${e.symbol.failure.kind}): ${e.symbol.failure.message}`:"Symbol unavailable":e.evidence.markdown;case"failure":return`TraceDecay request failed (${e.failure.kind}): ${e.failure.message}`}}let My="ui://tracedecay/code-explorer",Mg={readOnlyHint:!0,destructiveHint:!1,openWorldHint:!1,idempotentHint:!0};function M_(e,t=[]){return{content:[{type:"text",text:Mh(e)},...t.map(e=>({type:"text",text:e}))],structuredContent:e}}async function Mv(e){let t=[];return M_(await Cz.run(t,e),t)}function Mb(e){let t=Array.isArray(e)?e[0]:e;if(void 0===t||0===t.length)throw Error("resource URI is missing a template variable");return decodeURIComponent(t)}let M$={name:"tracedecay-chatgpt-extension",title:"TraceDecay",version:"0.0.0"};async function MS(){let[e,t]=await Promise.all([x(new URL("./app.html",import.meta.url),"utf8"),x(new URL("../assets/icon.svg",import.meta.url),"utf8")]);return{html:e,iconSvg:t}}function Mk({bridge:e,assets:t}){let r=new uL({...M$,icons:[{src:`data:image/svg+xml,${encodeURIComponent(t.iconSvg)}`,mimeType:"image/svg+xml"}]});return!function({server:e,bridge:t,html:r}){let i=(e=[])=>({ui:{resourceUri:My},"openai/ui":{entrypoints:e},"openai/iconStyle":"monochrome"}),o=o7().min(1).describe("Registered TraceDecay project id");C9(e,"tracedecay_workspace",{title:"TraceDecay",description:"Open the TraceDecay code explorer: pick an authorized project, search code, inspect symbols and their graph.",inputSchema:nz({}),annotations:Mg,_meta:i([{type:"global"}])},async(e,r)=>M_(await Mn(t,r.mcpReq.signal))),C9(e,"tracedecay_thread_panel",{title:"TraceDecay",description:"Open the TraceDecay code explorer beside this conversation.",inputSchema:nz({}),annotations:Mg,_meta:i([{type:"thread"}])},async(e,r)=>M_(await Mn(t,r.mcpReq.signal))),C9(e,"tracedecay_list_projects",{title:"List TraceDecay projects",description:"List up to ten recent projects registered in the local TraceDecay profile.",inputSchema:nz({}),annotations:Mg,_meta:{ui:{visibility:["app"]}}},async(e,r)=>M_(await Mn(t,r.mcpReq.signal))),C9(e,"tracedecay_search_code",{title:"Search TraceDecay code",description:"Search symbols in a registered TraceDecay project. Returns node ids usable with tracedecay_inspect_symbol plus the served code generation and freshness.",inputSchema:nz({project_id:o,query:o7().describe("Symbol or free-text query")}),annotations:Mg,_meta:i()},async({project_id:e,query:r},i)=>Mv(async()=>{try{return await async function(e,t,r,i){let o=await e.resolveProject(t,i),[n,a]=await Promise.all([Md(()=>e.status(t,i)),Mo(async()=>0===r.trim().length?{state:"empty",message:"Enter a query to search this project."}:function(e){let t=e.coverage.recall;if("status"in e&&"unavailable"===e.status){var r;return{state:"failed",failure:{kind:"possibly_stale"===e.freshness.state?"stale":"unavailable",code:e.reason,message:(r=e.detail,(null==r?null:"parked"===r.kind?`${r.kind}: ${r.cause} (${r.remedy})`:"reset_required"===r.kind?`${r.kind}: ${r.reason} (${r.remedy})`:r.kind)??e.reason)}}}let i=[],o=[];for(let t of e.results){let e=function(e){let t=e.display;if(null===e.node_id||void 0===e.node_id||null==t)return null;let r=(e.lexical_routes??[]).map(e=>"object"==typeof e&&null!==e&&"lane"in e?String(e.lane):"lexical");return{node_id:e.node_id,name:t.name,qualified_name:t.qualified_name,kind:t.kind,file:t.path,start_line:null,end_line:null,signature:null,score:e.candidate.utility_micros/1e6,lanes:r}}(t);null===e?o.push(t.display_unavailable??"undisplayable"):i.push(e)}let n="next_cursor"in e?e.next_cursor:null;return 0===i.length&&0===o.length?{state:"empty",message:"partial"===t?"No results in the indexed portion of this project yet.":"No symbols match this query."}:{state:"ready",data:{hits:i,truncated:null!=n,undisplayable:o,recall:t},generation:"string"==typeof e.code_generation?e.code_generation:void 0}}(await e.search(t,r,20,i)))]);return{page:"search",project:o,query:r,results:a,provenance:Mc(o,n)}}(t,e,r,i.mcpReq.signal)}catch(r){return await Ma(t,e,r)}})),C9(e,"tracedecay_inspect_symbol",{title:"Inspect TraceDecay symbol",description:"Inspect one symbol by node id: definition, direct callers and callees, dependent impact, and separately reported project status. Relations carry their served generation; symbol and impact reads do not report snapshot identity.",inputSchema:nz({project_id:o,node_id:o7().min(1).describe("Symbol node id from a search result")}),annotations:Mg,_meta:i()},async({project_id:e,node_id:r},i)=>Mv(async()=>{try{return await Ms(t,e,r,i.mcpReq.signal)}catch(r){return await Ma(t,e,r)}})),new Mr(e).mentions.setHandler(async({query:e},r)=>{if(0===e.trim().length)return{items:[]};let i=(await t.listProjects(r.mcpReq.signal)).slice(0,4),o=await Promise.allSettled(i.map(async i=>(await t.symbolSearch(i.project_id,e,r.mcpReq.signal)).items.slice(0,8).map(e=>{var t,r;return{type:"resource_link",uri:(t=i.project_id,r=e.node_id,`tracedecay://projects/${encodeURIComponent(t)}/symbols/${encodeURIComponent(r)}`),name:e.qualified_name,title:`${e.kind} ${e.name}`,description:`${i.label} \xb7 ${e.file}:${e.line}`,mimeType:"text/markdown"}}))),n=[],a=[];if(o.forEach((e,t)=>{"fulfilled"===e.status?n.push(...e.value):a.push(`${i[t]?.label}: ${CH(e.reason).message}`)}),0===n.length&&a.length>0)throw Error(`symbol lookup failed for ${a.join("; ")}`);return{items:n}}),e.registerResource("tracedecay-symbol",new uU("tracedecay://projects/{project_id}/symbols/{node_id}",{list:void 0}),{title:"TraceDecay symbol evidence",mimeType:"text/markdown"},async(e,r,i)=>{let o=Mb(r.project_id),n=Mb(r.node_id),a=await Ms(t,o,n,i.mcpReq.signal);return{contents:[{uri:e.href,mimeType:"text/markdown",text:Mh(a),_meta:{"openai/deepLink":Mi({kind:"symbol",project_id:o,node_id:n})}}]}}),e.registerResource("tracedecay-code-explorer",My,{title:"TraceDecay code explorer",mimeType:"text/html;profile=mcp-app"},async()=>({contents:[{uri:My,mimeType:"text/html;profile=mcp-app",text:r,_meta:{"openai/ui":{preferredDisplayMode:"inline",availableDisplayModes:["inline","fullscreen"]},ui:{prefersBorder:!0,csp:{connectDomains:[],resourceDomains:[]}}}}]}))}({server:r,bridge:e,html:t.html}),r}function Mw(e,t){return new C0({binary:t??e.TRACEDECAY_BIN??"tracedecay",profileRoot:mb(e),env:e,cwd:process.cwd()})}async function MV(e,t,r,i){if("127.0.0.1"!==t&&"localhost"!==t&&"::1"!==t)throw Error(`--http must bind a loopback address, got ${t}`);if(0===i.length)throw Error("--http requires a bearer token");let o=r,n=T((r,n)=>{(async function(e,t,r,i,o,n){if("/mcp"!==new URL(t.url??"/",`http://${"::1"===i?"[::1]":i}:${o}`).pathname){r.writeHead(404,{"content-type":"application/json"}),r.end(JSON.stringify({error:"not_found"}));return}if(!function(e,t){if(void 0===e||!e.startsWith("Bearer "))return!1;let r=Buffer.from(e.slice(7),"utf8"),i=Buffer.from(t,"utf8");return r.length===i.length&&P(r,i)}(t.headers.authorization,n)){r.writeHead(401,{"content-type":"application/json"}),r.end(JSON.stringify({jsonrpc:"2.0",error:{code:-32001,message:"unauthorized: a Bearer token is required"},id:null}));return}if(![`${i}:${o}`,`localhost:${o}`,`127.0.0.1:${o}`,`[::1]:${o}`].includes(t.headers.host??"")){r.writeHead(403,{"content-type":"application/json"}),r.end(JSON.stringify({jsonrpc:"2.0",error:{code:-32e3,message:`Invalid Host header: ${t.headers.host??""}`},id:null}));return}let a=new mv({sessionIdGenerator:void 0,enableJsonResponse:!0}),s=e();r.on("close",()=>{a.close().finally(()=>s.close())}),await s.connect(a),await a.handleRequest(t,r)})(e,r,n,t,o,i).catch(e=>{n.headersSent||n.writeHead(500,{"content-type":"application/json"}),n.end(JSON.stringify({jsonrpc:"2.0",error:{code:-32603,message:String(e)},id:null}))})});await new Promise((e,i)=>{n.once("error",i),n.listen(r,t,()=>e())});let a=n.address();if("object"!=typeof a||null===a)throw Error("loopback HTTP server did not report a bound address");return o=a.port,{url:`http://${"::1"===t?"[::1]":t}:${o}/mcp`,close:()=>new Promise((e,t)=>{n.close(r=>void 0===r?e():t(r)),n.closeAllConnections()})}}(function(){let e=process.argv[1];if(void 0===e)return!1;try{return import.meta.url===A(R(e)).href}catch{return!1}})()&&(async function(){let{values:e}=W({options:{http:{type:"string"},binary:{type:"string"},token:{type:"string"}}}),t=Mw(process.env,e.binary),r=await MS(),i=()=>Mk({bridge:t,assets:r}),o=null,n=async()=>{await t.close(),null!==o&&await j(o,{force:!0})};if(process.once("SIGINT",()=>void n().finally(()=>process.exit(0))),process.once("SIGTERM",()=>void n().finally(()=>process.exit(0))),void 0!==e.http){var a;let t,[r,n]=-1===(t=(a=e.http).lastIndexOf(":"))?["127.0.0.1",a]:[a.slice(0,t),a.slice(t+1)],s=Number.parseInt(n,10);if(!Number.isInteger(s)||s<0||s>65535)throw Error(`invalid --http port: ${n}`);let d=e.token??V(24).toString("base64url"),c=await MV(i,r,s,d);if(process.stderr.write(`tracedecay-chatgpt-extension listening on ${c.url} +- ${Object.keys(o).join("\n- ")}`)}let l=`${d}/$ref`,p=e(t,r,i,o,n,a,s,l,c);if(p.valid||ei.push({instanceLocation:s,keyword:"$ref",keywordLocation:l,error:"A subschema had errors."},...p.errors),"4"===i||"7"===i)return{valid:0===ei.length,errors:ei}}if(Array.isArray(h)){let e=h.length,r=!1;for(let i=0;iMn(t,e))||ei.push({instanceLocation:s,keyword:"enum",keywordLocation:`${d}/enum`,error:`Instance does not match any of ${JSON.stringify(g)}.`}):g.some(e=>t===e)||ei.push({instanceLocation:s,keyword:"enum",keywordLocation:`${d}/enum`,error:`Instance does not match any of ${JSON.stringify(g)}.`})),void 0!==v){let r=`${d}/not`;e(t,v,i,o,n,a,s,r).valid&&ei.push({instanceLocation:s,keyword:"not",keywordLocation:r,error:'Instance matched "not" schema.'})}let eo=[];if(void 0!==b){let r=`${d}/anyOf`,l=ei.length,p=!1;for(let d=0;d{let p=Object.create(c),u=e(t,d,i,o,n,!0===f?a:null,s,`${r}/${l}`,p);return ei.push(...u.errors),u.valid&&eo.push(p),u.valid}).length;1===p?ei.length=l:ei.splice(l,0,{instanceLocation:s,keyword:"oneOf",keywordLocation:r,error:`Instance does not match exactly one subschema (${p} matches).`})}if(("object"===l||"array"===l)&&Object.assign(c,...eo),void 0!==k){let r=`${d}/if`;if(e(t,k,i,o,n,a,s,r,c).valid){if(void 0!==w){let l=e(t,w,i,o,n,a,s,`${d}/then`,c);l.valid||ei.push({instanceLocation:s,keyword:"if",keywordLocation:r,error:'Instance does not match "then" schema.'},...l.errors)}}else if(void 0!==R){let l=e(t,R,i,o,n,a,s,`${d}/else`,c);l.valid||ei.push({instanceLocation:s,keyword:"if",keywordLocation:r,error:'Instance does not match "else" schema.'},...l.errors)}}if("object"===l){if(void 0!==_)for(let e of _)e in t||ei.push({instanceLocation:s,keyword:"required",keywordLocation:`${d}/required`,error:`Instance does not have required property "${e}".`});let r=Object.keys(t);if(void 0!==j&&r.lengthC&&ei.push({instanceLocation:s,keyword:"maxProperties",keywordLocation:`${d}/maxProperties`,error:`Instance does not have at least ${C} properties.`}),void 0!==T){let r=`${d}/propertyNames`;for(let d in t){let t=`${s}/${AX(d)}`,c=e(d,T,i,o,n,a,t,r);c.valid||ei.push({instanceLocation:s,keyword:"propertyNames",keywordLocation:r,error:`Property name "${d}" does not match schema.`},...c.errors)}}if(void 0!==O){let e=`${d}/dependantRequired`;for(let r in O)if(r in t)for(let i of O[r])i in t||ei.push({instanceLocation:s,keyword:"dependentRequired",keywordLocation:e,error:`Instance has "${r}" but does not have "${i}".`})}if(void 0!==E)for(let r in E){let l=`${d}/dependentSchemas`;if(r in t){let d=e(t,E[r],i,o,n,a,s,`${l}/${AX(r)}`,c);d.valid||ei.push({instanceLocation:s,keyword:"dependentSchemas",keywordLocation:l,error:`Instance has "${r}" but does not match dependant schema.`},...d.errors)}}if(void 0!==A){let r=`${d}/dependencies`;for(let d in A)if(d in t){let c=A[d];if(Array.isArray(c))for(let e of c)e in t||ei.push({instanceLocation:s,keyword:"dependencies",keywordLocation:r,error:`Instance has "${d}" but does not have "${e}".`});else{let l=e(t,c,i,o,n,a,s,`${r}/${AX(d)}`);l.valid||ei.push({instanceLocation:s,keyword:"dependencies",keywordLocation:r,error:`Instance has "${d}" but does not match dependant schema.`},...l.errors)}}}let l=Object.create(null),p=!1;if(void 0!==V){let r=`${d}/properties`;for(let d in V){if(!(d in t))continue;let u=`${s}/${AX(d)}`,m=e(t[d],V[d],i,o,n,a,u,`${r}/${AX(d)}`);if(m.valid)c[d]=l[d]=!0;else if(p=n,ei.push({instanceLocation:s,keyword:"properties",keywordLocation:r,error:`Property "${d}" does not match schema.`},...m.errors),p)break}}if(!p&&void 0!==q){let r=`${d}/patternProperties`;for(let d in q){let u=RegExp(d,"u"),m=q[d];for(let f in t){if(!u.test(f))continue;let h=`${s}/${AX(f)}`,y=e(t[f],m,i,o,n,a,h,`${r}/${AX(d)}`);y.valid?c[f]=l[f]=!0:(p=n,ei.push({instanceLocation:s,keyword:"patternProperties",keywordLocation:r,error:`Property "${f}" matches pattern "${d}" but does not match associated schema.`},...y.errors))}}}if(p||void 0===I){if(!p&&void 0!==x){let r=`${d}/unevaluatedProperties`;for(let d in t)if(!c[d]){let l=`${s}/${AX(d)}`,p=e(t[d],x,i,o,n,a,l,r);p.valid?c[d]=!0:ei.push({instanceLocation:s,keyword:"unevaluatedProperties",keywordLocation:r,error:`Property "${d}" does not match unevaluated properties schema.`},...p.errors)}}}else{let r=`${d}/additionalProperties`;for(let d in t){if(l[d])continue;let u=`${s}/${AX(d)}`,m=e(t[d],I,i,o,n,a,u,r);m.valid?c[d]=!0:(p=n,ei.push({instanceLocation:s,keyword:"additionalProperties",keywordLocation:r,error:`Property "${d}" does not match additional properties schema.`},...m.errors))}}}else if("array"===l){void 0!==H&&t.length>H&&ei.push({instanceLocation:s,keyword:"maxItems",keywordLocation:`${d}/maxItems`,error:`Array has too many items (${t.length} > ${H}).`}),void 0!==U&&t.length=(F||0)&&(ei.length=p),void 0===F&&void 0===L&&0===u?ei.splice(p,0,{instanceLocation:s,keyword:"contains",keywordLocation:l,error:"Array does not contain item matching schema."}):void 0!==F&&uL&&ei.push({instanceLocation:s,keyword:"maxContains",keywordLocation:`${d}/maxContains`,error:`Array may contain at most ${L} items matching schema. ${u} items were found.`})}if(!p&&void 0!==z){let p=`${d}/unevaluatedItems`;for(;l=K||t>K)&&ei.push({instanceLocation:s,keyword:"maximum",keywordLocation:`${d}/maximum`,error:`${t} is greater than ${Z?"or equal to ":""} ${K}.`})):(void 0!==B&&tK&&ei.push({instanceLocation:s,keyword:"maximum",keywordLocation:`${d}/maximum`,error:`${t} is greater than ${K}.`}),void 0!==J&&t<=J&&ei.push({instanceLocation:s,keyword:"exclusiveMinimum",keywordLocation:`${d}/exclusiveMinimum`,error:`${t} is less than ${J}.`}),void 0!==Z&&t>=Z&&ei.push({instanceLocation:s,keyword:"exclusiveMaximum",keywordLocation:`${d}/exclusiveMaximum`,error:`${t} is greater than or equal to ${Z}.`})),void 0!==Q){let e=t%Q;Math.abs(0-e)>=11920929e-14&&Math.abs(Q-e)>=11920929e-14&&ei.push({instanceLocation:s,keyword:"multipleOf",keywordLocation:`${d}/multipleOf`,error:`${t} is not a multiple of ${Q}.`})}}else if("string"===l){let e=void 0===X&&void 0===Y?0:function(e){let t,r=0,i=e.length,o=0;for(;o=55296&&t<=56319&&oY&&ei.push({instanceLocation:s,keyword:"maxLength",keywordLocation:`${d}/maxLength`,error:`String is too long (${e} > ${Y}).`}),void 0===ee||RegExp(ee,"u").test(t)||ei.push({instanceLocation:s,keyword:"pattern",keywordLocation:`${d}/pattern`,error:"String does not match pattern."}),void 0!==P&&A8[P]&&!A8[P](t)&&ei.push({instanceLocation:s,keyword:"format",keywordLocation:`${d}/format`,error:`String does not match format "${P}".`})}return{valid:0===ei.length,errors:ei}}(e,this.schema,this.draft,this.lookup,this.shortCircuit)}addSchema(e,t){t&&(e={...e,$id:t}),A4(e,this.lookup)}}let Ms=wC.shape.oneOf.element.extend({"x-openai-thumbnail":S7.optional(),"x-openai-preview":S7.optional(),description:E0().optional()}),Md=wA.omit({items:!0}).shape,Mc=wI.extend({pattern:E0().optional(),"x-openai-suggestions":AS(Ms).optional()}),Ml={"x-openai-input":Ab().optional()},Mp=wC.extend({...Ml,oneOf:AS(Ms),anyOf:Ab().optional()}),Mu=Aw({...Md,...Ml,uniqueItems:Ay().optional(),items:Mc.extend({enum:Ab().optional(),oneOf:Ab().optional(),anyOf:Ab().optional()})}),Mm=[Mp,wA.extend({...Ml,items:Aw({enum:Ab().optional(),anyOf:AS(Ms)})}),wE.extend({...Ml,items:wE.shape.items.extend({anyOf:Ab().optional()})}),wT.extend({...Ml,oneOf:Ab().optional(),anyOf:Ab().optional()}),Mc.extend({...Ml,enum:Ab().optional(),oneOf:Ab().optional(),anyOf:Ab().optional()}),wx.extend(Ml),wq.extend(Ml),Mu],Mf=Aw({kind:AE(["file","directory"]).optional(),accept:AS(E0()).optional()}),Mh=Aw({type:AE(["resource","file"]).describe('"file" is deprecated. Use "resource" instead.'),options:AS(kq),userOptions:Mf.optional(),selection:AE(["explicit","implicit"]).optional()}),My=Mc.extend({format:AM("uri"),enum:Ab().optional(),oneOf:Ab().optional(),anyOf:Ab().optional()}),Mg=AV([AI("type",[My.extend({"x-openai-input":Mh.extend({selection:Ab().optional()})}),Aw({...Md,items:My,"x-openai-input":Mh})]).superRefine((e,t)=>{let r=e["x-openai-input"];null!=e.default&&("implicit"===r.selection&&t.addIssue({code:"custom",path:["default"],message:"Implicit selection cannot specify a default"}),(Array.isArray(e.default)?e.default:[e.default]).some(e=>!r.options.some(t=>t.uri===e))&&t.addIssue({code:"custom",path:["default"],message:"Defaults must name supplied resources"}))}),...Mm]),M_=Aw({$schema:E0().optional(),type:AM("object"),required:AS(E0()).optional(),properties:M$(Mg)}),Mv=M$(AV([E0(),new Au({type:"number",checks:[],...Ty(void 0)}),Ay(),AS(E0())])),Mb=AI("action",[Aw({action:AM("accept"),content:Mv}),Aw({action:AE(["cancel","decline"])})]);function M$(e){var t,r;let i;return(t=(e=>AT(E0(),A_()).safeParse(e).success)??(()=>!0),(i=Ty(void 0)).abort??(i.abort=!0),new AQ({type:"custom",check:"custom",fn:t,...i})).transform(e=>Object.entries(e)).pipe(AS((r=[E0(),e.nonoptional()],new Aj({type:"tuple",items:r,rest:null,...Ty(void 0)})))).transform(e=>Object.fromEntries(e))}let MS="openai/elicitation",Mk=Aw({"io.modelcontextprotocol/protocolVersion":E0().optional(),"io.modelcontextprotocol/clientCapabilities":A_().optional()}),Mw=Aw({extensions:Aw({[MS]:Aw({form:Aw({})})})}),MR=E0().regex(/\S/),MP="openai/mentions";Aw({searchTool:MR});let MV=AI("type",[k9,AR({icons:AS(S7).optional(),resourceUri:MR,subtitle:MR.optional(),title:MR,type:AM("resource")})]),Mq=Aw({query:E0()}),MI=AR({items:AS(MV)}),Mx="openai/settings";Aw({readTool:MR,updateTool:MR});let Mj=AI("kind",[AR({kind:AM("property"),property:E0()}),AR({kind:AM("tool"),tool:MR,title:MR.optional(),description:E0().optional()})]),MC=AR({kind:AM("group"),title:MR,items:AS(Mj)}),MT=Aw({title:MR,description:E0().optional()}),MO=Aw({schema:new Ak({type:"object",shape:{type:AM("object"),properties:AT(E0(),A_()).optional(),required:AS(E0()).optional()},catchall:A_(),...Ty(void 0)}),layout:AS(MC).optional(),values:AT(E0(),A_())}).superRefine(({schema:e,layout:t},r)=>{let i=new Set;for(let o of t??[])for(let t of o.items)"property"===t.kind&&((!Object.hasOwn(e.properties??{},t.property)||i.has(t.property))&&r.addIssue({code:"custom",path:["layout"],message:`Unknown or duplicate settings key: ${t.property}`}),i.add(t.property))});AR({set:AT(E0(),A_()).refine(e=>Object.keys(e).length>0,"Set at least one setting.").meta({minProperties:1})});let ME=Aw({values:AT(E0(),A_())}),MA=Aw({type:AE(["boolean","string","number","integer"]),enum:AS(E0()).nonempty().optional(),$ref:Ab().optional(),anyOf:Ab().optional(),oneOf:Ab().optional(),allOf:Ab().optional()}).refine(e=>void 0===e.enum||"string"===e.type);class MM{elicitInputLegacy;elicitInput;mentions;settings;constructor(e){let t,r,i;this.elicitInputLegacy=async(t,r,i)=>{let o=Mk.parse(t.mcpReq.envelope??{}),n=o["io.modelcontextprotocol/protocolVersion"]??e.server.getNegotiatedProtocolVersion();if(void 0!==n&&n>="2026-07-28")throw Error("Use requestFormInput for MCP 2026-07-28 or newer");if(!Mw.safeParse(o["io.modelcontextprotocol/clientCapabilities"]??e.server.getClientCapabilities()).success)throw Error(`The MCP client does not support ${MS} form requests`);let a=M_.parse(r.requestedSchema),s=await t.mcpReq.send({method:"openai/elicitation/create",params:{...r,requestedSchema:a}},Mb,i);if("accept"===s.action){let e;return{...s,content:(e=new Ma(structuredClone(a),"2020-12",!1),Mv.superRefine((t,r)=>{for(let i of e.validate(Object.setPrototypeOf({...t},null)).errors)"#/required"!==i.keywordLocation&&r.addIssue({code:"custom",path:i.instanceLocation.split("/").slice(1).map(e=>e.replace(/~1/g,"/").replace(/~0/g,"~")),message:i.error});for(let e of a.required??[])Object.hasOwn(t,e)||r.addIssue({code:"custom",path:[e],message:"Required field"});for(let[e,i]of Object.entries(a.properties))Object.hasOwn(t,e)&&null!=i["x-openai-input"]&&!function(e,t){let r=Array.isArray(t)?t:[t];return"implicit"===e.selection||null!=e.userOptions||r.every(t=>e.options.some(e=>e.uri===t))}(i["x-openai-input"],t[e])&&r.addIssue({code:"custom",path:[e],message:"Invalid file selection"})})).parse(s.content)}}return s},this.elicitInput=this.elicitInputLegacy,this.mentions=(t=null,r=!1,{setHandler:i=>{if(!r){if(e.server.transport)throw Error("Register mention search before connecting the server.");e.registerTool("search_mentions",{annotations:{readOnlyHint:!0},inputSchema:Mq,outputSchema:MI,_meta:{"openai/extensions":{"mentions/search":{}},ui:{visibility:["app"]}}},async(e,r)=>({content:[],structuredContent:null==t?{items:[]}:await t(e,r)}));let i={searchTool:"search_mentions"};e.server.registerCapabilities({extensions:{[MP]:i},experimental:{[MP]:i}}),r=!0}t=i}}),this.settings=(i=Symbol.for("@openai/mcp-extensions/settings/registered"),{register(t){if(i in e)throw Error("Settings are already registered on this server.");if(e.server.transport)throw Error("Register settings before connecting the server.");let r=MR.parse(t.readTool??"settings.read"),o=MR.parse(t.updateTool??"settings.update");if(r===o)throw Error("Settings read and update tools must have different names.");let n=Object.fromEntries(Object.entries(t.fields).map(([e,t])=>[e,t.schema.meta({...t.schema.meta(),title:t.title,description:t.description})])),a=AR(n).required(),s=wi.shape.inputSchema.parse(function(e){if("_idmap"in e){let t=Ei({processors:EC}),r={};for(let r of e._idmap.entries()){let[e,i]=r;Eo(i,t)}let i={};for(let o of(t.external={registry:e,uri:void 0,defs:r},e._idmap.entries())){let[e,r]=o;En(t,r),i[e]=Ea(t,r)}return Object.keys(r).length>0&&(i.__shared={["draft-2020-12"===t.target?"$defs":"definitions"]:r}),{schemas:i}}let t=Ei({processors:EC});return Eo(e,t),En(t,e),Ea(t,e)}(a));for(let[e,t]of Object.entries(s.properties??{})){if(MT.parse(t),!MA.safeParse(t).success)throw Error(`Unsupported native setting ${JSON.stringify(e)}: use a boolean, string, string enum, number, or integer field.`);if("object"==typeof t&&null!==t&&"default"in t)throw Error("Settings defaults must be returned by the read handler, not declared in the schema.")}let{layout:d}=MO.parse({schema:s,layout:t.layout,values:{}}),c=AR(n).partial().refine(e=>Object.keys(e).length>0,"Set at least one setting.").meta({minProperties:1}),l=e.registerTool(r,{inputSchema:AR({}),outputSchema:MO.safeExtend({values:a}),annotations:{readOnlyHint:!0}},async(e,r)=>({content:[],structuredContent:{schema:s,...void 0===d?{}:{layout:d},values:a.parse(await t.read(r))}}));try{e.registerTool(o,{inputSchema:AR({set:c}),outputSchema:ME.extend({values:a})},async({set:e},r)=>({content:[],structuredContent:{values:a.parse(await t.update(e,r))}}));let n={readTool:r,updateTool:o};e.server.registerCapabilities({extensions:{[Mx]:n},experimental:{[Mx]:n}}),Object.defineProperty(e,i,{value:!0})}catch(e){throw l.remove(),e}}})}}function MW(e){switch(e.kind){case"projects":return"/";case"project":return`/projects/${encodeURIComponent(e.project_id)}`;case"search":return`/projects/${encodeURIComponent(e.project_id)}/search?q=${encodeURIComponent(e.query)}`;case"symbol":return`/projects/${encodeURIComponent(e.project_id)}/symbols/${encodeURIComponent(e.node_id)}`}}async function MN(e){try{return await e()}catch(e){return{state:"failed",failure:Cy(e)}}}async function Mz(e,t){let r=await MN(async()=>{let r=await e.listProjects(t);return 0===r.length?{state:"empty",message:"No projects are registered in this TraceDecay profile. Run `tracedecay init` in a repository first."}:{state:"ready",data:r}});return{page:"projects",daemon:await e.daemonState(),projects:r}}async function MD(e,t,r){let i=Cy(r),o=null;try{o=await e.resolveProject(t)}catch{o=null}return{page:"failure",project:o,failure:i}}async function MF(e,t,r,i){var o,n,a,s,d,c;let l,p,u=await e.resolveProject(t,i),m=MU(u,await ML(()=>e.status(t,i))),[f,h,y,g]=await Promise.all([MN(async()=>{var o,n;let a=await e.node(t,r,i);return"id"in(o=a)&&"string"==typeof o.id?{state:"ready",data:{node_id:(n=a).id,name:n.name,qualified_name:n.qualified_name,kind:n.kind,file:n.file,start_line:n.start_line,end_line:n.end_line,signature:n.signature??null,complexity:n.cyclomatic_complexity??null,unavailable_fields:n.unavailable_fields}}:{state:"failed",failure:{kind:"not_found",code:a.reason_code,message:a.message}}}),MN(async()=>MG(await e.callers(t,r,1,i),"callers")),MN(async()=>{let o=m?.generation;if(null==o)throw new Cu({kind:"unavailable",code:"generation_unknown",message:"The daemon has not reported a served code generation for this project yet, so callee reads cannot be scoped."});return MG(await e.callees(t,r,o,1,i),"callees")}),MN(async()=>{let o=await e.impact(t,r,3,i);if(!("nodes"in o))return{state:"failed",failure:{kind:"not_found",code:o.reason_code,message:o.message}};let n=o.nodes.map(MB);return 0===n.length&&o.complete?{state:"empty",message:"No dependents reach this symbol within the traversed depth."}:{state:"ready",data:{nodes:n,complete:o.complete,max_depth:3}}})]),_=function(e,t,r){if("ready"!==e.state)return"failed"===e.state?{state:"failed",failure:e.failure}:{state:"empty",message:e.message};if("failed"===t.state&&"failed"===r.state)return{state:"failed",failure:t.failure};let i={...e.data,role:"focus",depth:0},o=[i],n=[],a=new Set([i.node_id]),s=(e,t)=>{for(let r of e)a.has(r.symbol.node_id)||(a.add(r.symbol.node_id),o.push({...r.symbol,role:t,depth:r.depth})),n.push("caller"===t?{from:r.symbol.node_id,to:i.node_id,edge_kind:r.edge_kind}:{from:i.node_id,to:r.symbol.node_id,edge_kind:r.edge_kind})};if("ready"===t.state&&s(t.data,"caller"),"ready"===r.state&&s(r.data,"callee"),1===o.length)return{state:"empty",message:"This symbol has no recorded callers or callees."};let d="ready"===t.state&&"ready"===r.state&&void 0!==t.generation&&void 0!==r.generation&&t.generation!==r.generation;return{state:"ready",data:{nodes:o,edges:n,max_depth:1,truncated:"failed"===t.state||"failed"===r.state||"ready"===t.state&&!0===t.truncated||"ready"===r.state&&!0===r.truncated||d}}}(f,h,y),v="ready"===f.state?(o=u,n=f.data,a=h,s=y,d=g,c=m,l=`${n.file}:${n.start_line??"?"}-${n.end_line??"?"}`,p=[`## ${n.kind} \`${n.qualified_name}\``,`- Project: ${o.label} (${o.project_id})`,`- Location: ${l}`,...null===n.signature?[]:[`- Signature: \`${n.signature}\``],`- Node id: \`${n.node_id}\``,"_Symbol and impact reads do not report a generation; their snapshot identity is unverified._",...MJ(a,"Callers",c?.generation??null),...MJ(s,"Callees",c?.generation??null),...MK("Impact","ready"===d.state?{state:"ready",data:d.data.nodes}:d,e=>`depth ${e.depth}: ${e.name} (${e.file}:${e.line})`),..."ready"!==d.state||d.data.complete?[]:["_Impact traversal is partial: the daemon hit its traversal budget._"],"### Reported project status (separate read)",...null===c?["_Project status unavailable; provenance not verified._"]:[`- Repository: ${c.repository_id??"unknown"}`,`- Worktree: ${c.worktree_id??"unknown"} (${c.project_root})`,`- Ref: ${c.reference??"unknown"}${null===c.branch?"":` (branch ${c.branch})`}`,`- Commit: ${c.commit??"unknown"}`,`- Generation: ${c.generation??"unknown"}`,`- Freshness: ${c.freshness.state}${null===c.freshness.detail?"":` (${c.freshness.detail})`}`,`- Coverage: ${c.coverage.recall}${null===c.coverage.detail?"":` (${c.coverage.detail})`}`],`- Deep link: ${MW({kind:"symbol",project_id:o.project_id,node_id:n.node_id})}`],{title:`${n.kind} ${n.qualified_name}`,markdown:p.join("\n"),structured:{project:o,symbol:n,callers:a,callees:s,impact:d,provenance:c}}):null;return{page:"symbol",project:u,symbol:f,callers:h,callees:y,impact:g,graph:_,provenance:m,evidence:v}}async function ML(e){try{return{ok:!0,value:await e()}}catch(e){return{ok:!1,failure:Cy(e)}}}function MU(e,t){if(!t.ok||!("code_index_freshness"in t.value.status))return null;let r=t.value.status,i=t.value.authority,o=r.code_index_freshness;if(!("worktree"in o))return null;let n=o.worktree,a=null===n.staleness_state||void 0===n.staleness_state?null:`worktree ${n.staleness_state}`,s=n.coverage,d="string"==typeof s?s:JSON.stringify(s);return{project_id:e.project_id,project_root:n.worktree_root,repository_id:n.repository_id??null,worktree_id:n.worktree_id??null,reference:n.source_reference??null,branch:r.current_branch??r.active_branch??null,commit:n.source_revision??null,generation:n.latest_generation_id??null,freshness:{state:function(e){switch(e){case"current":case"stale":case"warming":case"restoring":case"parked":case"unavailable":return e;default:return"unavailable"}}(o.status),detail:"reason"in o&&"string"==typeof o.reason?o.reason:a},coverage:{recall:"complete"===d?"full":"partial",detail:d},authority:{profile_root:i.profile_root,daemon_version:i.version,daemon_pid:i.pid}}}function MH(e){var t;return{symbol:{node_id:(t=e.symbol).node_id,name:t.name,qualified_name:t.qualified_name,kind:t.kind,file:t.file,start_line:t.line,end_line:t.end_line,signature:t.signature??null},edge_kind:e.edge_kind,depth:e.depth??1,dispatch_via_trait:e.dispatch_via_trait}}function MG(e,t){let r=e.items.map(MH);if(0===r.length)return{state:"empty",message:`No ${t} recorded in the served graph.`};let i="truncated"in e&&e.truncated||null!==e.next_cursor&&void 0!==e.next_cursor||"number"==typeof e.total&&e.total>r.length;return{state:"ready",data:r,truncated:i,generation:e.generation}}function MB(e){return{node_id:e.id,name:e.name,kind:e.kind,file:e.file,line:e.line,depth:e.depth}}function MK(e,t,r){let i=[`### ${e}`];switch(t.state){case"ready":i.push(...t.data.map(e=>`- ${r(e)}`)),!0===t.truncated&&i.push("_First page only; more rows exist than shown._");break;case"empty":i.push(`_${t.message}_`);break;case"failed":i.push(`_Unavailable (${t.failure.kind}: ${t.failure.message})_`)}return i}function MJ(e,t,r){let i=MK(t,e,e=>`${e.symbol.qualified_name} (${e.symbol.file}:${e.symbol.start_line??"?"}, ${e.edge_kind})`);return"ready"===e.state&&null!==r&&void 0!==e.generation&&e.generation!==r&&i.push(`_Served from generation ${e.generation}, which differs from the reported project generation ${r}._`),i}function MZ(e){switch(e.page){case"projects":return"ready"===e.projects.state?`Recent TraceDecay projects: ${e.projects.data.map(e=>`${e.label} (${e.project_id})`).join(", ")}`:"empty"===e.projects.state?e.projects.message:`TraceDecay projects unavailable (${e.projects.failure.kind}): ${e.projects.failure.message}`;case"search":if("ready"===e.results.state){let t=e.results.data.hits.map(e=>`- ${e.kind} ${e.qualified_name} (${e.file}) node_id=${e.node_id}`).join("\n"),r=e.results.data.undisplayable.length;return`Search "${e.query}" in ${e.project.label}${"partial"===e.results.data.recall?" (partial recall)":""}${r>0?` (${r} candidate(s) could not be displayed)`:""}: +${t}`}return"empty"===e.results.state?`Search "${e.query}" in ${e.project.label}: ${e.results.message}`:`Search "${e.query}" in ${e.project.label} failed (${e.results.failure.kind}): ${e.results.failure.message}`;case"symbol":return null===e.evidence?"failed"===e.symbol.state?`Symbol lookup failed (${e.symbol.failure.kind}): ${e.symbol.failure.message}`:"Symbol unavailable":e.evidence.markdown;case"failure":return`TraceDecay request failed (${e.failure.kind}): ${e.failure.message}`}}let MQ="ui://tracedecay/code-explorer",MX={readOnlyHint:!0,destructiveHint:!1,openWorldHint:!1,idempotentHint:!0};function MY(e,t=[]){return{content:[{type:"text",text:MZ(e)},...t.map(e=>({type:"text",text:e}))],structuredContent:e}}async function M1(e){let t=[];return MY(await Cp.run(t,e),t)}function M0(e){let t=Array.isArray(e)?e[0]:e;if(void 0===t||0===t.length)throw Error("resource URI is missing a template variable");return decodeURIComponent(t)}let M2={name:"tracedecay-chatgpt-extension",title:"TraceDecay",version:"0.0.0"};async function M4(){let[e,t]=await Promise.all([x(new URL("./app.html",import.meta.url),"utf8"),x(new URL("../assets/icon.svg",import.meta.url),"utf8")]);return{html:e,iconSvg:t}}function M6({bridge:e,assets:t}){let r=new uL({...M2,icons:[{src:`data:image/svg+xml,${encodeURIComponent(t.iconSvg)}`,mimeType:"image/svg+xml"}]});return!function({server:e,bridge:t,html:r}){let i=(e=[])=>({ui:{resourceUri:MQ},"openai/ui":{entrypoints:e},"openai/iconStyle":"monochrome"}),o=o7().min(1).describe("Registered TraceDecay project id");Cj(e,"tracedecay_workspace",{title:"TraceDecay",description:"Open the TraceDecay code explorer: pick an authorized project, search code, inspect symbols and their graph.",inputSchema:nz({}),annotations:MX,_meta:i([{type:"global"}])},async(e,r)=>MY(await Mz(t,r.mcpReq.signal))),Cj(e,"tracedecay_thread_panel",{title:"TraceDecay",description:"Open the TraceDecay code explorer beside this conversation.",inputSchema:nz({}),annotations:MX,_meta:i([{type:"thread"}])},async(e,r)=>MY(await Mz(t,r.mcpReq.signal))),Cj(e,"tracedecay_list_projects",{title:"List TraceDecay projects",description:"List up to ten recent projects registered in the local TraceDecay profile.",inputSchema:nz({}),annotations:MX,_meta:{ui:{visibility:["app"]}}},async(e,r)=>MY(await Mz(t,r.mcpReq.signal))),Cj(e,"tracedecay_search_code",{title:"Search TraceDecay code",description:"Search symbols in a registered TraceDecay project. Returns node ids usable with tracedecay_inspect_symbol plus the served code generation and freshness.",inputSchema:nz({project_id:o,query:o7().describe("Symbol or free-text query")}),annotations:MX,_meta:i()},async({project_id:e,query:r},i)=>M1(async()=>{try{return await async function(e,t,r,i){let o=await e.resolveProject(t,i),[n,a]=await Promise.all([ML(()=>e.status(t,i)),MN(async()=>0===r.trim().length?{state:"empty",message:"Enter a query to search this project."}:function(e){let t=e.coverage.recall;if("status"in e&&"unavailable"===e.status){var r;return{state:"failed",failure:{kind:"possibly_stale"===e.freshness.state?"stale":"unavailable",code:e.reason,message:(r=e.detail,(null==r?null:"parked"===r.kind?`${r.kind}: ${r.cause} (${r.remedy})`:"reset_required"===r.kind?`${r.kind}: ${r.reason} (${r.remedy})`:r.kind)??e.reason)}}}let i=[],o=[];for(let t of e.results){let e=function(e){let t=e.display;if(null===e.node_id||void 0===e.node_id||null==t)return null;let r=(e.lexical_routes??[]).map(e=>"object"==typeof e&&null!==e&&"lane"in e?String(e.lane):"lexical");return{node_id:e.node_id,name:t.name,qualified_name:t.qualified_name,kind:t.kind,file:t.path,start_line:null,end_line:null,signature:null,score:e.candidate.utility_micros/1e6,lanes:r}}(t);null===e?o.push(t.display_unavailable??"undisplayable"):i.push(e)}let n="next_cursor"in e?e.next_cursor:null;return 0===i.length&&0===o.length?{state:"empty",message:"partial"===t?"No results in the indexed portion of this project yet.":"No symbols match this query."}:{state:"ready",data:{hits:i,truncated:null!=n,undisplayable:o,recall:t},generation:"string"==typeof e.code_generation?e.code_generation:void 0}}(await e.search(t,r,20,i)))]);return{page:"search",project:o,query:r,results:a,provenance:MU(o,n)}}(t,e,r,i.mcpReq.signal)}catch(r){return await MD(t,e,r)}})),Cj(e,"tracedecay_inspect_symbol",{title:"Inspect TraceDecay symbol",description:"Inspect one symbol by node id: definition, direct callers and callees, dependent impact, and separately reported project status. Relations carry their served generation; symbol and impact reads do not report snapshot identity.",inputSchema:nz({project_id:o,node_id:o7().min(1).describe("Symbol node id from a search result")}),annotations:MX,_meta:i()},async({project_id:e,node_id:r},i)=>M1(async()=>{try{return await MF(t,e,r,i.mcpReq.signal)}catch(r){return await MD(t,e,r)}})),new MM(e).mentions.setHandler(async({query:e},r)=>{if(0===e.trim().length)return{items:[]};let i=(await t.listProjects(r.mcpReq.signal)).slice(0,4),o=await Promise.allSettled(i.map(async i=>(await t.symbolSearch(i.project_id,e,r.mcpReq.signal)).items.slice(0,8).map(e=>{var t,r;return{type:"resource_link",uri:(t=i.project_id,r=e.node_id,`tracedecay://projects/${encodeURIComponent(t)}/symbols/${encodeURIComponent(r)}`),name:e.qualified_name,title:`${e.kind} ${e.name}`,description:`${i.label} \xb7 ${e.file}:${e.line}`,mimeType:"text/markdown"}}))),n=[],a=[];if(o.forEach((e,t)=>{"fulfilled"===e.status?n.push(...e.value):a.push(`${i[t]?.label}: ${Cy(e.reason).message}`)}),0===n.length&&a.length>0)throw Error(`symbol lookup failed for ${a.join("; ")}`);return{items:n}}),e.registerResource("tracedecay-symbol",new uU("tracedecay://projects/{project_id}/symbols/{node_id}",{list:void 0}),{title:"TraceDecay symbol evidence",mimeType:"text/markdown"},async(e,r,i)=>{let o=M0(r.project_id),n=M0(r.node_id),a=await MF(t,o,n,i.mcpReq.signal);return{contents:[{uri:e.href,mimeType:"text/markdown",text:MZ(a),_meta:{"openai/deepLink":MW({kind:"symbol",project_id:o,node_id:n})}}]}}),e.registerResource("tracedecay-code-explorer",MQ,{title:"TraceDecay code explorer",mimeType:"text/html;profile=mcp-app"},async()=>({contents:[{uri:MQ,mimeType:"text/html;profile=mcp-app",text:r,_meta:{"openai/ui":{preferredDisplayMode:"inline",availableDisplayModes:["inline","fullscreen"]},ui:{prefersBorder:!0,csp:{connectDomains:[],resourceDomains:[]}}}}]}))}({server:r,bridge:e,html:t.html}),r}function M3(e,t){return new CP({binary:t??e.TRACEDECAY_BIN??"tracedecay",profileRoot:mb(e),env:e,cwd:process.cwd()})}async function M9(e,t,r,i){if("127.0.0.1"!==t&&"localhost"!==t&&"::1"!==t)throw Error(`--http must bind a loopback address, got ${t}`);if(0===i.length)throw Error("--http requires a bearer token");let o=r,n=T((r,n)=>{(async function(e,t,r,i,o,n){if("/mcp"!==new URL(t.url??"/",`http://${"::1"===i?"[::1]":i}:${o}`).pathname){r.writeHead(404,{"content-type":"application/json"}),r.end(JSON.stringify({error:"not_found"}));return}if(!function(e,t){if(void 0===e||!e.startsWith("Bearer "))return!1;let r=Buffer.from(e.slice(7),"utf8"),i=Buffer.from(t,"utf8");return r.length===i.length&&P(r,i)}(t.headers.authorization,n)){r.writeHead(401,{"content-type":"application/json"}),r.end(JSON.stringify({jsonrpc:"2.0",error:{code:-32001,message:"unauthorized: a Bearer token is required"},id:null}));return}if(![`${i}:${o}`,`localhost:${o}`,`127.0.0.1:${o}`,`[::1]:${o}`].includes(t.headers.host??"")){r.writeHead(403,{"content-type":"application/json"}),r.end(JSON.stringify({jsonrpc:"2.0",error:{code:-32e3,message:`Invalid Host header: ${t.headers.host??""}`},id:null}));return}let a=new mv({sessionIdGenerator:void 0,enableJsonResponse:!0}),s=e();r.on("close",()=>{a.close().finally(()=>s.close())}),await s.connect(a),await a.handleRequest(t,r)})(e,r,n,t,o,i).catch(e=>{n.headersSent||n.writeHead(500,{"content-type":"application/json"}),n.end(JSON.stringify({jsonrpc:"2.0",error:{code:-32603,message:String(e)},id:null}))})});await new Promise((e,i)=>{n.once("error",i),n.listen(r,t,()=>e())});let a=n.address();if("object"!=typeof a||null===a)throw Error("loopback HTTP server did not report a bound address");return o=a.port,{url:`http://${"::1"===t?"[::1]":t}:${o}/mcp`,close:()=>new Promise((e,t)=>{n.close(r=>void 0===r?e():t(r)),n.closeAllConnections()})}}(function(){let e=process.argv[1];if(void 0===e)return!1;try{return import.meta.url===A(V(e)).href}catch{return!1}})()&&(async function(){let{values:e}=M({options:{http:{type:"string"},binary:{type:"string"},token:{type:"string"}}}),t=M3(process.env,e.binary),r=await M4(),i=()=>M6({bridge:t,assets:r}),o=null,n=async()=>{await t.close(),null!==o&&await j(o,{force:!0})};if(process.once("SIGINT",()=>void n().finally(()=>process.exit(0))),process.once("SIGTERM",()=>void n().finally(()=>process.exit(0))),void 0!==e.http){var a;let t,[r,n]=-1===(t=(a=e.http).lastIndexOf(":"))?["127.0.0.1",a]:[a.slice(0,t),a.slice(t+1)],s=Number.parseInt(n,10);if(!Number.isInteger(s)||s<0||s>65535)throw Error(`invalid --http port: ${n}`);let d=e.token??R(24).toString("base64url"),c=await M9(i,r,s,d);if(process.stderr.write(`tracedecay-chatgpt-extension listening on ${c.url} `),void 0===e.token){let e=mb(process.env);o=E(e,`chatgpt-loopback-bearer-token-${new URL(c.url).port}`),await I(e,{recursive:!0}),await C(o,`${d} `,{mode:384}),await q(o,384),process.stderr.write(`MCP bearer token written to ${o} (send as Authorization: Bearer) `)}return}let s=i();s.server.onclose=()=>void n(),await s.connect(new u0)})().catch(e=>{process.stderr.write(`${e instanceof Error?e.stack??e.message:String(e)} -`),process.exit(1)});export{M$ as SERVER_INFO,Mw as bridgeFromEnvironment,Mk as createExtensionServer,MS as loadAssets,MV as serveLoopbackHttp}; \ No newline at end of file +`),process.exit(1)});export{M2 as SERVER_INFO,M3 as bridgeFromEnvironment,M6 as createExtensionServer,M4 as loadAssets,M9 as serveLoopbackHttp}; \ No newline at end of file From d942d80715d6765bdecff8e79a86c08e7bfa5338 Mon Sep 17 00:00:00 2001 From: ScriptedAlchemy Date: Sat, 24 Oct 2026 15:22:23 +0000 Subject: [PATCH 4/4] build(plugin): regenerate chatgpt embed from built TypeScript SDK --- plugin/chatgpt-extension/embedded/server.mjs | 32 ++++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/plugin/chatgpt-extension/embedded/server.mjs b/plugin/chatgpt-extension/embedded/server.mjs index dc4a426901..ce34b1184e 100644 --- a/plugin/chatgpt-extension/embedded/server.mjs +++ b/plugin/chatgpt-extension/embedded/server.mjs @@ -1,6 +1,6 @@ -let e,t,r,i,o,n,a,s,d,c,l,p,u,m,f,h,y,g,_,v,b,$,S,k,w;import{randomBytes as R,timingSafeEqual as P}from"node:crypto";import{realpathSync as V}from"node:fs";import{chmod as q,mkdir as I,readFile as x,rm as j,writeFile as C}from"node:fs/promises";import{createServer as T}from"node:http";import O,{join as E}from"node:path";import{pathToFileURL as A}from"node:url";import{parseArgs as M}from"node:util";import W from"node:process";import"http";import{Http2ServerRequest as N,constants as z}from"http2";import{Readable as D}from"stream";import F from"crypto";import L from"node:os";import{AsyncLocalStorage as U}from"node:async_hooks";import{PassThrough as H}from"node:stream";import{createRequire as G}from"node:module";let B=G(import.meta.url);var K,J,Z,Q,X,Y,ee,et,er,ei,eo,en,ea,es,ed={},ec={};function el(e){var t=ec[e];if(void 0!==t)return t.exports;var r=ec[e]={exports:{}};return ed[e](r,r.exports,el),r.exports}el.m=ed,el.d=(e,t,r)=>{var i=(t,r)=>{for(var i in t)el.o(t,i)&&!el.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,[r]:t[i]})};i(t,"get"),i(r,"value")},el.add=function(e){Object.assign(el.m,e)},el.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),el.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},el.add({"../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/index.js"(e,t,r){let i=B("child_process"),o=r("../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/parse.js"),n=r("../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/enoent.js");function a(e,t,r){let a=o(e,t,r),s=i.spawn(a.command,a.args,a.options);return n.hookChildProcess(s,a),s}e.exports=a,e.exports.spawn=a,e.exports.sync=function(e,t,r){let a=o(e,t,r),s=i.spawnSync(a.command,a.args,a.options);return s.error=s.error||n.verifyENOENTSync(s.status,a),s},e.exports._parse=o,e.exports._enoent=n},"../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/enoent.js"(e){let t="win32"===process.platform;function r(e,t){return Object.assign(Error(`${t} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}function i(e,i){return t&&1===e&&!i.file?r(i.original,"spawn"):null}e.exports={hookChildProcess:function(e,r){if(!t)return;let o=e.emit;e.emit=function(t,n){if("exit"===t){let t=i(n,r);if(t)return o.call(e,"error",t)}return o.apply(e,arguments)}},verifyENOENT:i,verifyENOENTSync:function(e,i){return t&&1===e&&!i.file?r(i.original,"spawnSync"):null},notFoundError:r}},"../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/parse.js"(e,t,r){let i=B("path"),o=r("../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/resolveCommand.js"),n=r("../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/escape.js"),a=r("../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/readShebang.js"),s="win32"===process.platform,d=/\.(?:com|exe)$/i,c=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;e.exports=function(e,t,r){t&&!Array.isArray(t)&&(r=t,t=null);let l={command:e,args:t=t?t.slice(0):[],options:r=Object.assign({},r),file:void 0,original:{command:e,args:t}};return r.shell?l:function(e){let t;if(!s)return e;let r=(e.file=o(e),(t=e.file&&a(e.file))?(e.args.unshift(e.file),e.command=t,o(e)):e.file),l=!d.test(r);if(e.options.forceShell||l){let t=c.test(r);e.command=i.normalize(e.command),e.command=n.command(e.command),e.args=e.args.map(e=>n.argument(e,t));let o=[e.command].concat(e.args).join(" ");e.args=["/d","/s","/c",`"${o}"`],e.command=process.env.comspec||"cmd.exe",e.options.windowsVerbatimArguments=!0}return e}(l)}},"../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/escape.js"(e){let t=/([()\][%!^"`<>&|;, *?])/g;e.exports.command=function(e){return e.replace(t,"^$1")},e.exports.argument=function(e,r){return e=(e=(e=`${e}`).replace(/(?=(\\+?)?)\1"/g,'$1$1\\"')).replace(/(?=(\\+?)?)\1$/,"$1$1"),e=(e=`"${e}"`).replace(t,"^$1"),r&&(e=e.replace(t,"^$1")),e}},"../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/readShebang.js"(e,t,r){let i=B("fs"),o=r("../../node_modules/.pnpm/shebang-command@2.0.0/node_modules/shebang-command/index.js");e.exports=function(e){let t,r=Buffer.alloc(150);try{t=i.openSync(e,"r"),i.readSync(t,r,0,150,0),i.closeSync(t)}catch(e){}return o(r.toString())}},"../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/resolveCommand.js"(e,t,r){let i=B("path"),o=r("../../node_modules/.pnpm/which@2.0.2/node_modules/which/which.js"),n=r("../../node_modules/.pnpm/path-key@3.1.1/node_modules/path-key/index.js");function a(e,t){let r,a=e.options.env||process.env,s=process.cwd(),d=null!=e.options.cwd,c=d&&void 0!==process.chdir&&!process.chdir.disabled;if(c)try{process.chdir(e.options.cwd)}catch(e){}try{r=o.sync(e.command,{path:a[n({env:a})],pathExt:t?i.delimiter:void 0})}catch(e){}finally{c&&process.chdir(s)}return r&&(r=i.resolve(d?e.options.cwd:"",r)),r}e.exports=function(e){return a(e)||a(e,!0)}},"../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js"(e,t,r){var i;function o(e,t,r){if("function"==typeof t&&(r=t,t={}),!r){if("function"!=typeof Promise)throw TypeError("callback not provided");return new Promise(function(r,i){o(e,t||{},function(e,t){e?i(e):r(t)})})}i(e,t||{},function(e,i){e&&("EACCES"===e.code||t&&t.ignoreErrors)&&(e=null,i=!1),r(e,i)})}B("fs"),i="win32"===process.platform||global.TESTING_WINDOWS?r("../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js"):r("../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js"),e.exports=o,o.sync=function(e,t){try{return i.sync(e,t||{})}catch(e){if(t&&t.ignoreErrors||"EACCES"===e.code)return!1;throw e}}},"../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js"(e){e.exports=r,r.sync=function(e,r){return i(t.statSync(e),r)};var t=B("fs");function r(e,r,o){t.stat(e,function(e,t){o(e,!e&&i(t,r))})}function i(e,t){var r,i,o,n,a,s,d,c,l;return e.isFile()&&(r=e,i=t,o=r.mode,n=r.uid,a=r.gid,s=void 0!==i.uid?i.uid:process.getuid&&process.getuid(),d=void 0!==i.gid?i.gid:process.getgid&&process.getgid(),c=parseInt("100",8),l=parseInt("010",8),o&parseInt("001",8)||o&l&&a===d||o&c&&n===s||o&(c|l)&&0===s)}},"../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js"(e){e.exports=i,i.sync=function(e,i){return r(t.statSync(e),e,i)};var t=B("fs");function r(e,t,r){if(!e.isSymbolicLink()&&!e.isFile())return!1;var i=void 0!==r.pathExt?r.pathExt:process.env.PATHEXT;if(!i||-1!==(i=i.split(";")).indexOf(""))return!0;for(var o=0;o{let t=e.env||process.env;return"win32"!==(e.platform||process.platform)?"PATH":Object.keys(t).reverse().find(e=>"PATH"===e.toUpperCase())||"Path"};e.exports=t,e.exports.default=t},"../../node_modules/.pnpm/shebang-command@2.0.0/node_modules/shebang-command/index.js"(e,t,r){let i=r("../../node_modules/.pnpm/shebang-regex@3.0.0/node_modules/shebang-regex/index.js");e.exports=(e="")=>{let t=e.match(i);if(!t)return null;let[r,o]=t[0].replace(/#! ?/,"").split(" "),n=r.split("/").pop();return"env"===n?o:o?`${n} ${o}`:n}},"../../node_modules/.pnpm/shebang-regex@3.0.0/node_modules/shebang-regex/index.js"(e){e.exports=/^#!(.*)/},"../../node_modules/.pnpm/which@2.0.2/node_modules/which/which.js"(e,t,r){let i="win32"===process.platform||"cygwin"===process.env.OSTYPE||"msys"===process.env.OSTYPE,o=B("path"),n=i?";":":",a=r("../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js"),s=e=>Object.assign(Error(`not found: ${e}`),{code:"ENOENT"}),d=(e,t)=>{let r=t.colon||n,o=e.match(/\//)||i&&e.match(/\\/)?[""]:[...i?[process.cwd()]:[],...(t.path||process.env.PATH||"").split(r)],a=i?t.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",s=i?a.split(r):[""];return i&&-1!==e.indexOf(".")&&""!==s[0]&&s.unshift(""),{pathEnv:o,pathExt:s,pathExtExe:a}},c=(e,t,r)=>{"function"==typeof t&&(r=t,t={}),t||(t={});let{pathEnv:i,pathExt:n,pathExtExe:c}=d(e,t),l=[],p=r=>new Promise((n,a)=>{if(r===i.length)return t.all&&l.length?n(l):a(s(e));let d=i[r],c=/^".*"$/.test(d)?d.slice(1,-1):d,p=o.join(c,e);n(u(!c&&/^\.[\\\/]/.test(e)?e.slice(0,2)+p:p,r,0))}),u=(e,r,i)=>new Promise((o,s)=>{if(i===n.length)return o(p(r+1));let d=n[i];a(e+d,{pathExt:c},(n,a)=>{if(!n&&a)if(!t.all)return o(e+d);else l.push(e+d);return o(u(e,r,i+1))})});return r?p(0).then(e=>r(null,e),r):p(0)};e.exports=c,c.sync=(e,t)=>{let{pathEnv:r,pathExt:i,pathExtExe:n}=d(e,t=t||{}),c=[];for(let s=0;sI$,CompactSign:()=>IR,EmbeddedJWK:()=>IX,EncryptJWT:()=>IC,FlattenedEncrypt:()=>IS,FlattenedSign:()=>IP,GeneralEncrypt:()=>qK,GeneralSign:()=>Iq,SignJWT:()=>Ix,UnsecuredJWT:()=>I5,base64url:()=>eu,calculateJwkThumbprint:()=>IZ,calculateJwkThumbprintUri:()=>IQ,compactDecrypt:()=>qN,compactVerify:()=>Ie,createLocalJWKSet:()=>I1,createRemoteJWKSet:()=>I3,cryptoRuntime:()=>xa,customFetch:()=>I0,decodeJwt:()=>xi,decodeProtectedHeader:()=>xr,errors:()=>em,exportJWK:()=>IK,exportPKCS8:()=>IB,exportSPKI:()=>IG,flattenedDecrypt:()=>qz,flattenedVerify:()=>It,generalDecrypt:()=>qD,generalVerify:()=>Ir,generateKeyPair:()=>xo,generateSecret:()=>xn,importJWK:()=>xt,importPKCS8:()=>xe,importSPKI:()=>I8,importX509:()=>I7,jwksCache:()=>I2,jwtDecrypt:()=>Ib,jwtVerify:()=>Iv});var eu={};el.r(eu),el.d(eu,{decode:()=>VR,encode:()=>VP});var em={};el.r(em),el.d(em,{JOSEAlgNotAllowed:()=>Vm,JOSEError:()=>Vl,JOSENotSupported:()=>Vf,JWEDecryptionFailed:()=>Vh,JWEInvalid:()=>Vy,JWKInvalid:()=>Vv,JWKSInvalid:()=>Vb,JWKSMultipleMatchingKeys:()=>VS,JWKSNoMatchingKey:()=>V$,JWKSTimeout:()=>Vk,JWSInvalid:()=>Vg,JWSSignatureVerificationFailed:()=>Vw,JWTClaimValidationFailed:()=>Vp,JWTExpired:()=>Vu,JWTInvalid:()=>V_});var ef=Object.create,eh=Object.defineProperty,ey=Object.getOwnPropertyDescriptor,eg=Object.getOwnPropertyNames,e_=Object.getPrototypeOf,ev=Object.prototype.hasOwnProperty,eb=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),e$=(e,t,r)=>(r=null!=e?ef(e_(e)):{},((e,t,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(var i,o=eg(t),n=0,a=o.length;nt[e]).bind(null,i),enumerable:!(r=ey(t,i))||r.enumerable});return e})(!t&&e&&e.__esModule?r:eh(r,"default",{value:e,enumerable:!0}),e));let eS=new Set(["https://json-schema.org/draft/2020-12/schema","http://json-schema.org/draft/2020-12/schema"]),ek=new Set(["https://json-schema.org/draft/2019-09/schema","http://json-schema.org/draft/2019-09/schema"]),ew=new Set(["https://json-schema.org/draft-07/schema","http://json-schema.org/draft-07/schema"]),eR=new Set(["https://json-schema.org/draft-06/schema","http://json-schema.org/draft-06/schema"]);function eP(e){let t=Object.values(e).filter(e=>"number"==typeof e);return Object.entries(e).filter(([e,r])=>-1===t.indexOf(+e)).map(([e,t])=>t)}function eV(e,t="|"){return e.map(e=>eJ(e)).join(t)}function eq(e,t){return"bigint"==typeof t?t.toString():t}class eI{constructor(e){this._getter=e,this._value=void 0}get value(){let e=this._getter;return void 0!==e&&(this._value=e(),this._getter=void 0),this._value}}function ex(e){return new eI(e)}function ej(e){let t=+!!e.startsWith("^"),r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}let eC=Symbol("evaluating");function eT(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function eO(e){let t=Object.getOwnPropertyDescriptor(e,"shape");return t?.get?t.get.raw:t?.value}function eE(e){return eO(e._zod.def)??e._zod.def.shape}function eA(e,t,r){Object.defineProperty(e,t,{get(){let e=r();return eT(this,t,e),e},enumerable:!0,configurable:!0})}function eM(e,t,r){t in e?eT(e,t,r):e[t]=r}function eW(e,t,r,i){let o=eE(t);for(let n of r){let r=Object.getOwnPropertyDescriptor(o,n);r.enumerable&&(r.get?eA(e,n,()=>{let e=t._zod.def.shape[n];return i?i(e,n):e}):eM(e,n,i?i(r.value,n):r.value))}}function eN(...e){let t={};for(let r of e)Object.assign(t,Object.getOwnPropertyDescriptors(r));return Object.defineProperties({},t)}let ez="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function eD(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}let eF=ex(()=>{if(tu.jitless||"u">typeof navigator&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return Function(""),!0}catch(e){return!1}});function eL(e){if(!1===eD(e))return!1;let t=e.constructor;if(void 0===t||"function"!=typeof t)return!0;let r=t.prototype;return!1!==eD(r)&&!1!==Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")}function eU(e){return eL(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}let eH=new Set(["string","number","symbol"]);function eG(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function eB(e,t,r){let i=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(i._zod.parent=e),i}function eK(e){if(!e)return{};if("string"==typeof e)return{error:()=>e};if(e?.message!==void 0){if(e?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");e.error=e.message}return(delete e.message,"string"==typeof e.error)?{...e,error:()=>e.error}:e}function eJ(e){return"bigint"==typeof e?e.toString()+"n":"string"==typeof e?`"${e}"`:`${e}`}let eZ={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-0x80000000,0x7fffffff],uint32:[0,0xffffffff],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},eQ={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function eX(e,t){let r=eE(e),i=[];for(let e of Reflect.ownKeys(t)){if(!Object.getOwnPropertyDescriptor(r,e)?.enumerable)throw Error(`Unrecognized key: "${String(e)}"`);t[e]&&i.push(e)}return i}function eY(e,t){let r={};eW(r,e,Reflect.ownKeys(eE(e)));for(let e of Reflect.ownKeys(t)){let i=Object.getOwnPropertyDescriptor(t,e);i.enumerable&&(i.get?eA(r,e,()=>t[e]):eM(r,e,i.value))}return r}function e1(e,t,r,i="partial"){let o=t._zod.def.checks;if(o&&o.length>0)throw Error(`.${i}() cannot be used on object schemas containing refinements`);let n=r?new Set(eX(t,r)):void 0,a={};return eW(a,t,Reflect.ownKeys(eE(t)),e&&((t,r)=>n&&!n.has(r)?t:new e({type:"optional",innerType:t}))),eB(t,eN(t._zod.def,{shape:a,checks:[]}))}function e0(e,t=0){if(!0===e.aborted)return!0;for(let r=t;r(t.path??(t.path=[]),t.path.unshift(e),t))}function e4(e){return"string"==typeof e?e:e?.message}function e6(e){let t=[];for(let r of e??[]){let e=r._zod.def;if(!/_(length|size)$|_equals$/.test(e.check))break;let i=e.maximum??e.length??e.size;i>=0&&t.push([i,r])}return t}function e3(e,t,r){var i;for(let o=t;o!!i?.Parent&&t instanceof i.Parent||t?._zod?.traits?.has(e)}),Object.defineProperty(c,"name",{value:e}),c}class tl extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class tp extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}}(er=globalThis).__zod_globalConfig??(er.__zod_globalConfig={});let tu=globalThis.__zod_globalConfig;function tm(e){return e&&Object.assign(tu,e),tu}class tf extends Error{constructor(){super("Cannot parse a reference cycle that closes through a transform"),this.name="ZodCyclicError"}}let th="~memo",ty=[];function tg(e){return null!==e&&"object"==typeof e}function t_(e){return e.map(e=>e.path?{...e,path:e.path.slice()}:{...e})}let tv=new WeakMap,tb=[],t$={alloc(e,r,i){let o=t;if(!o)return i;t=void 0;let n={value:i,issues:null};return o.set(r.value,n),tb.push(n),i},guard(e){var t;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,r=(e,r)=>{var i,o;let n;if("backward"!==r.direction&&(i=r,o=e.value,void 0!==(n=i[th]?.backEdges)&&tg(o)&&n.has(o)))throw new tf;return t(e,r)};e._zod.parse=r,e._zod.run===t&&(e._zod.run=r)})},attach(e){var r;let i,o,n,a=!1;(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred.push(()=>{let r=e._zod.parse,s=(d,c)=>{let l;if(void 0===i){let t=function e(t,r,i){var o,n;let a=tv.get(t);if(void 0!==a)return 2*!!a;if(r.has(t))return 2;r.add(t);let s=0,d=t=>{if(2!==s&&t?._zod){let o=e(t,r,i);o>s&&(s=o)}},c=e=>{e>s&&(s=e)},l=t._zod.def;switch(l.type){case"object":{let t=eO(l);c(t?((t,o)=>{let n=0;for(let a of Reflect.ownKeys(t)){let s=Object.getOwnPropertyDescriptor(t,a);if(o&&!s.enumerable)continue;let d=s.get?1:s.value?._zod?e(s.value,r,i):0;d>n&&(n=d)}return n})(t,!0):1),d(l.catchall);break}case"array":d(l.element);break;case"tuple":for(let e of l.items)d(e);d(l.rest);break;case"record":case"map":d(l.keyType),d(l.valueType);break;case"set":d(l.valueType);break;case"union":for(let e of l.options)d(e);break;case"intersection":d(l.left),d(l.right);break;case"optional":case"nullable":case"default":case"prefault":case"catch":case"readonly":case"nonoptional":case"promise":case"success":d(l.innerType);break;case"pipe":d(l.in),d(l.out);break;case"function":d(l.input),d(l.output);break;case"lazy":{let o=l._cachedInner??(i?t._zod.innerType:void 0);c(o?e(o,r,!1):1);break}case"template_literal":case"string":case"number":case"int":case"boolean":case"bigint":case"symbol":case"undefined":case"null":case"void":case"never":case"any":case"unknown":case"date":case"nan":case"enum":case"literal":case"file":case"transform":case"custom":break;default:for(let e in l){let t=Object.getOwnPropertyDescriptor(l,e);if(!t||t.get)continue;let r=t.value;if(r&&"object"==typeof r){if(r._zod)d(r);else if(Array.isArray(r))for(let e of r)d(e)}}}return r.delete(t),o=t,1!==(n=s)&&tv.set(o,2===n),n}(e,new Set,!1);if(0===t)return e._zod.parse=r,e._zod.run===s&&(e._zod.run=r),r(d,c);2===t||a?i=!0:a=!0}let p=d.value;if(!tg(p))return r(d,c);let u=c[th];if(u||(u={buckets:new WeakMap,backEdges:void 0},c[th]=u),o===c)l=n;else{var m;let t;(t=(m=u).buckets.get(e))||(t=new WeakMap,m.buckets.set(e,t)),l=t,o=c,n=l}let f=l.get(p);if(f)return d.value=f.value,f.issues?f.issues.length&&d.issues.push(...t_(f.issues)):(d.memo=!0,u.backEdges??(u.backEdges=new WeakSet),u.backEdges.add(f.value)),d;t=l;let h=tb.length,y=r(d,c);t=void 0;let g=tb.length>h?tb.pop():void 0;return y instanceof Promise?y.then(e=>(g&&(g.issues=e.issues.length?t_(e.issues):ty),e)):(g&&(g.issues=y.issues.length?t_(y.issues):ty),y)};e._zod.parse=s,e._zod.run===r&&(e._zod.run=s)})}},tS=/^[cC][0-9a-z]{6,}$/,tk=/^[0-9a-z]+$/,tw=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,tR=/^[0-9a-vA-V]{20}$/,tP=/^[A-Za-z0-9]{27}$/,tV=/^[a-zA-Z0-9_-]{21}$/,tq=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,tI=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,tx=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([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)$/,tj=/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,tC=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,tT=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,tO=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,tE=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,tA=/^https?$/,tM=/^\+[1-9]\d{6,14}$/,tW="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",tN=RegExp(`^${tW}$`);function tz(e){let t="(?:[01]\\d|2[0-3]):[0-5]\\d";return"number"==typeof e.precision?-1===e.precision?`${t}`:0===e.precision?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:e.seconds?`${t}:[0-5]\\d(?:\\.\\d+)?`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}let tD=/^[\s\S]{0,}$/,tF=/^-?\d+$/,tL=/^-?\d+(?:\.\d+)?$/,tU=/^(?:true|false)$/i,tH=/^null$/i,tG=/^[^A-Z]*$/,tB=/^[^a-z]*$/,tK=tc("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),tJ=e=>{let t=e.value;return null!=t&&void 0!==t.length},tZ={number:"number",bigint:"bigint",object:"date"},tQ=tc("$ZodCheckLessThan",(e,t)=>{tK.init(e,t);let r=tZ[typeof t.value];e._zod.check=i=>{(t.inclusive?i.value<=t.value:i.value{tK.init(e,t);let r=tZ[typeof t.value];e._zod.check=i=>{(t.inclusive?i.value>=t.value:i.value>t.value)||i.issues.push({origin:tZ[typeof i.value]??r,code:"too_small",minimum:"object"==typeof t.value?t.value.getTime():t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),tY=tc("$ZodCheckMultipleOf",(e,t)=>{tK.init(e,t),e._zod.check=r=>{let i,o,n;if(typeof r.value!=typeof t.value)throw Error("Cannot mix number and bigint in multiple_of check.");("bigint"==typeof r.value?t.value!==BigInt(0)&&r.value%t.value===BigInt(0):0==(o=Math.round(i=r.value/t.value),n=4*Number.EPSILON*Math.max(Math.abs(i),1),Math.abs(i-o){tK.init(e,t),t.format=t.format||"float64";let r=t.format?.includes("int"),i=r?"int":"number",[o,n]=eZ[t.format];e._zod.check=a=>{let s=a.value;if(r){if(!Number.isInteger(s))return void a.issues.push({expected:i,format:t.format,code:"invalid_type",continue:!1,input:s,inst:e});if(!Number.isSafeInteger(s))return void(s>0?a.issues.push({input:s,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!t.abort}):a.issues.push({input:s,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!t.abort}))}sn&&a.issues.push({origin:"number",input:s,code:"too_big",maximum:n,inclusive:!0,inst:e,continue:!t.abort})}}),t0=tc("$ZodCheckMaxLength",(e,t)=>{var r;tK.init(e,t),(r=e._zod.def).when??(r.when=tJ),e._zod.check=r=>{let i=r.value,o=i.length;if(("string"==typeof i&&o>t.maximum?e8(i):o)<=t.maximum)return;let n=e7(i);r.issues.push({origin:n,code:"too_big",maximum:t.maximum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),t2=tc("$ZodCheckMinLength",(e,t)=>{var r;tK.init(e,t),(r=e._zod.def).when??(r.when=tJ),e._zod.check=r=>{let i=r.value,o=i.length;if(("string"==typeof i&&o>=t.minimum&&o<2*t.minimum?e8(i):o)>=t.minimum)return;let n=e7(i);r.issues.push({origin:n,code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),t4=tc("$ZodCheckLengthEquals",(e,t)=>{var r;tK.init(e,t),(r=e._zod.def).when??(r.when=tJ),e._zod.check=r=>{let i=r.value,o=i.length,n="string"==typeof i&&o>=t.length&&o<=2*t.length?e8(i):o;if(n===t.length)return;let a=e7(i),s=n>t.length;r.issues.push({origin:a,...s?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),t6=tc("$ZodCheckStringFormat",(e,t)=>{var r,i;tK.init(e,t),t.pattern?(r=e._zod).check??(r.check=r=>{t.pattern.lastIndex=0,t.pattern.test(r.value)||r.issues.push({origin:"string",code:"invalid_format",format:t.format,input:r.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(i=e._zod).check??(i.check=()=>{})}),t3=tc("$ZodCheckRegex",(e,t)=>{t6.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,t.pattern.test(r.value)||r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),t9=tc("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=tG),t6.init(e,t)}),t5=tc("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=tB),t6.init(e,t)}),t8=tc("$ZodCheckIncludes",(e,t)=>{tK.init(e,t);let r=eG(t.includes),i=new RegExp("number"==typeof t.position?`^.{${t.position},}${r}`:r);t.pattern=i,e._zod.check=r=>{r.value.includes(t.includes,t.position)||r.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:r.value,inst:e,continue:!t.abort})}}),t7=tc("$ZodCheckStartsWith",(e,t)=>{tK.init(e,t);let r=RegExp(`^${eG(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.check=r=>{r.value.startsWith(t.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:r.value,inst:e,continue:!t.abort})}}),re=tc("$ZodCheckEndsWith",(e,t)=>{tK.init(e,t);let r=RegExp(`.*${eG(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.check=r=>{r.value.endsWith(t.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:r.value,inst:e,continue:!t.abort})}}),rt=tc("$ZodCheckOverwrite",(e,t)=>{tK.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}});class rr{constructor(e=[],t={}){this.content=[],this.indent=0,this.args=e,this.closed=t}indented(e){this.indent+=1;try{e(this)}finally{this.indent-=1}}write(e){if("function"==typeof e){e(this,{execution:"sync"}),e(this,{execution:"async"});return}let t=e.split("\n").filter(e=>e),r=Math.min(...t.map(e=>e.length-e.trimStart().length));for(let e of t.map(e=>e.slice(r)).map(e=>" ".repeat(2*this.indent)+e))this.content.push(e)}compile(){let e=Function,t=this?.content??[""];return new e(...Object.keys(this.closed),`return function (${this.args.join(", ")}) { +let e,t,r,i,o,n,a,s,d,c,l,p,u,m,f,h,y,g,_,v,b,$,S,k,w;import{randomBytes as V,timingSafeEqual as P}from"node:crypto";import{realpathSync as R}from"node:fs";import{chmod as q,mkdir as I,readFile as x,rm as j,writeFile as C}from"node:fs/promises";import{createServer as T}from"node:http";import O,{join as E}from"node:path";import{pathToFileURL as A}from"node:url";import{parseArgs as W}from"node:util";import M from"node:process";import"http";import{Http2ServerRequest as N,constants as z}from"http2";import{Readable as D}from"stream";import F from"crypto";import L from"node:os";import{AsyncLocalStorage as U}from"node:async_hooks";import{PassThrough as H}from"node:stream";import{createRequire as G}from"node:module";let B=G(import.meta.url);var K,J,Z,Q,X,Y,ee,et,er,ei,eo,en,ea,es,ed={},ec={};function el(e){var t=ec[e];if(void 0!==t)return t.exports;var r=ec[e]={exports:{}};return ed[e](r,r.exports,el),r.exports}el.m=ed,el.d=(e,t,r)=>{var i=(t,r)=>{for(var i in t)el.o(t,i)&&!el.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,[r]:t[i]})};i(t,"get"),i(r,"value")},el.add=function(e){Object.assign(el.m,e)},el.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),el.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},el.add({"../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/index.js"(e,t,r){let i=B("child_process"),o=r("../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/parse.js"),n=r("../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/enoent.js");function a(e,t,r){let a=o(e,t,r),s=i.spawn(a.command,a.args,a.options);return n.hookChildProcess(s,a),s}e.exports=a,e.exports.spawn=a,e.exports.sync=function(e,t,r){let a=o(e,t,r),s=i.spawnSync(a.command,a.args,a.options);return s.error=s.error||n.verifyENOENTSync(s.status,a),s},e.exports._parse=o,e.exports._enoent=n},"../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/enoent.js"(e){let t="win32"===process.platform;function r(e,t){return Object.assign(Error(`${t} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}function i(e,i){return t&&1===e&&!i.file?r(i.original,"spawn"):null}e.exports={hookChildProcess:function(e,r){if(!t)return;let o=e.emit;e.emit=function(t,n){if("exit"===t){let t=i(n,r);if(t)return o.call(e,"error",t)}return o.apply(e,arguments)}},verifyENOENT:i,verifyENOENTSync:function(e,i){return t&&1===e&&!i.file?r(i.original,"spawnSync"):null},notFoundError:r}},"../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/parse.js"(e,t,r){let i=B("path"),o=r("../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/resolveCommand.js"),n=r("../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/escape.js"),a=r("../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/readShebang.js"),s="win32"===process.platform,d=/\.(?:com|exe)$/i,c=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;e.exports=function(e,t,r){t&&!Array.isArray(t)&&(r=t,t=null);let l={command:e,args:t=t?t.slice(0):[],options:r=Object.assign({},r),file:void 0,original:{command:e,args:t}};return r.shell?l:function(e){let t;if(!s)return e;let r=(e.file=o(e),(t=e.file&&a(e.file))?(e.args.unshift(e.file),e.command=t,o(e)):e.file),l=!d.test(r);if(e.options.forceShell||l){let t=c.test(r);e.command=i.normalize(e.command),e.command=n.command(e.command),e.args=e.args.map(e=>n.argument(e,t));let o=[e.command].concat(e.args).join(" ");e.args=["/d","/s","/c",`"${o}"`],e.command=process.env.comspec||"cmd.exe",e.options.windowsVerbatimArguments=!0}return e}(l)}},"../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/escape.js"(e){let t=/([()\][%!^"`<>&|;, *?])/g;e.exports.command=function(e){return e.replace(t,"^$1")},e.exports.argument=function(e,r){return e=(e=(e=`${e}`).replace(/(?=(\\+?)?)\1"/g,'$1$1\\"')).replace(/(?=(\\+?)?)\1$/,"$1$1"),e=(e=`"${e}"`).replace(t,"^$1"),r&&(e=e.replace(t,"^$1")),e}},"../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/readShebang.js"(e,t,r){let i=B("fs"),o=r("../../node_modules/.pnpm/shebang-command@2.0.0/node_modules/shebang-command/index.js");e.exports=function(e){let t,r=Buffer.alloc(150);try{t=i.openSync(e,"r"),i.readSync(t,r,0,150,0),i.closeSync(t)}catch(e){}return o(r.toString())}},"../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/resolveCommand.js"(e,t,r){let i=B("path"),o=r("../../node_modules/.pnpm/which@2.0.2/node_modules/which/which.js"),n=r("../../node_modules/.pnpm/path-key@3.1.1/node_modules/path-key/index.js");function a(e,t){let r,a=e.options.env||process.env,s=process.cwd(),d=null!=e.options.cwd,c=d&&void 0!==process.chdir&&!process.chdir.disabled;if(c)try{process.chdir(e.options.cwd)}catch(e){}try{r=o.sync(e.command,{path:a[n({env:a})],pathExt:t?i.delimiter:void 0})}catch(e){}finally{c&&process.chdir(s)}return r&&(r=i.resolve(d?e.options.cwd:"",r)),r}e.exports=function(e){return a(e)||a(e,!0)}},"../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js"(e,t,r){var i;function o(e,t,r){if("function"==typeof t&&(r=t,t={}),!r){if("function"!=typeof Promise)throw TypeError("callback not provided");return new Promise(function(r,i){o(e,t||{},function(e,t){e?i(e):r(t)})})}i(e,t||{},function(e,i){e&&("EACCES"===e.code||t&&t.ignoreErrors)&&(e=null,i=!1),r(e,i)})}B("fs"),i="win32"===process.platform||global.TESTING_WINDOWS?r("../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js"):r("../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js"),e.exports=o,o.sync=function(e,t){try{return i.sync(e,t||{})}catch(e){if(t&&t.ignoreErrors||"EACCES"===e.code)return!1;throw e}}},"../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js"(e){e.exports=r,r.sync=function(e,r){return i(t.statSync(e),r)};var t=B("fs");function r(e,r,o){t.stat(e,function(e,t){o(e,!e&&i(t,r))})}function i(e,t){var r,i,o,n,a,s,d,c,l;return e.isFile()&&(r=e,i=t,o=r.mode,n=r.uid,a=r.gid,s=void 0!==i.uid?i.uid:process.getuid&&process.getuid(),d=void 0!==i.gid?i.gid:process.getgid&&process.getgid(),c=parseInt("100",8),l=parseInt("010",8),o&parseInt("001",8)||o&l&&a===d||o&c&&n===s||o&(c|l)&&0===s)}},"../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js"(e){e.exports=i,i.sync=function(e,i){return r(t.statSync(e),e,i)};var t=B("fs");function r(e,t,r){if(!e.isSymbolicLink()&&!e.isFile())return!1;var i=void 0!==r.pathExt?r.pathExt:process.env.PATHEXT;if(!i||-1!==(i=i.split(";")).indexOf(""))return!0;for(var o=0;o{let t=e.env||process.env;return"win32"!==(e.platform||process.platform)?"PATH":Object.keys(t).reverse().find(e=>"PATH"===e.toUpperCase())||"Path"};e.exports=t,e.exports.default=t},"../../node_modules/.pnpm/shebang-command@2.0.0/node_modules/shebang-command/index.js"(e,t,r){let i=r("../../node_modules/.pnpm/shebang-regex@3.0.0/node_modules/shebang-regex/index.js");e.exports=(e="")=>{let t=e.match(i);if(!t)return null;let[r,o]=t[0].replace(/#! ?/,"").split(" "),n=r.split("/").pop();return"env"===n?o:o?`${n} ${o}`:n}},"../../node_modules/.pnpm/shebang-regex@3.0.0/node_modules/shebang-regex/index.js"(e){e.exports=/^#!(.*)/},"../../node_modules/.pnpm/which@2.0.2/node_modules/which/which.js"(e,t,r){let i="win32"===process.platform||"cygwin"===process.env.OSTYPE||"msys"===process.env.OSTYPE,o=B("path"),n=i?";":":",a=r("../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js"),s=e=>Object.assign(Error(`not found: ${e}`),{code:"ENOENT"}),d=(e,t)=>{let r=t.colon||n,o=e.match(/\//)||i&&e.match(/\\/)?[""]:[...i?[process.cwd()]:[],...(t.path||process.env.PATH||"").split(r)],a=i?t.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",s=i?a.split(r):[""];return i&&-1!==e.indexOf(".")&&""!==s[0]&&s.unshift(""),{pathEnv:o,pathExt:s,pathExtExe:a}},c=(e,t,r)=>{"function"==typeof t&&(r=t,t={}),t||(t={});let{pathEnv:i,pathExt:n,pathExtExe:c}=d(e,t),l=[],p=r=>new Promise((n,a)=>{if(r===i.length)return t.all&&l.length?n(l):a(s(e));let d=i[r],c=/^".*"$/.test(d)?d.slice(1,-1):d,p=o.join(c,e);n(u(!c&&/^\.[\\\/]/.test(e)?e.slice(0,2)+p:p,r,0))}),u=(e,r,i)=>new Promise((o,s)=>{if(i===n.length)return o(p(r+1));let d=n[i];a(e+d,{pathExt:c},(n,a)=>{if(!n&&a)if(!t.all)return o(e+d);else l.push(e+d);return o(u(e,r,i+1))})});return r?p(0).then(e=>r(null,e),r):p(0)};e.exports=c,c.sync=(e,t)=>{let{pathEnv:r,pathExt:i,pathExtExe:n}=d(e,t=t||{}),c=[];for(let s=0;sIZ,CompactSign:()=>I1,EmbeddedJWK:()=>xg,EncryptJWT:()=>I5,FlattenedEncrypt:()=>IQ,FlattenedSign:()=>I0,GeneralEncrypt:()=>Im,GeneralSign:()=>I4,SignJWT:()=>I3,UnsecuredJWT:()=>xP,base64url:()=>eu,calculateJwkThumbprint:()=>xh,calculateJwkThumbprintUri:()=>xy,compactDecrypt:()=>Io,compactVerify:()=>II,createLocalJWKSet:()=>xv,createRemoteJWKSet:()=>xw,cryptoRuntime:()=>xE,customFetch:()=>xb,decodeJwt:()=>xC,decodeProtectedHeader:()=>xj,errors:()=>em,exportJWK:()=>xm,exportPKCS8:()=>xu,exportSPKI:()=>xp,flattenedDecrypt:()=>In,flattenedVerify:()=>Ix,generalDecrypt:()=>Ia,generalVerify:()=>Ij,generateKeyPair:()=>xT,generateSecret:()=>xO,importJWK:()=>xx,importPKCS8:()=>xI,importSPKI:()=>xR,importX509:()=>xq,jwksCache:()=>x$,jwtDecrypt:()=>IJ,jwtVerify:()=>IK});var eu={};el.r(eu),el.d(eu,{decode:()=>R1,encode:()=>R0});var em={};el.r(em),el.d(em,{JOSEAlgNotAllowed:()=>RF,JOSEError:()=>RN,JOSENotSupported:()=>RL,JWEDecryptionFailed:()=>RU,JWEInvalid:()=>RH,JWKInvalid:()=>RK,JWKSInvalid:()=>RJ,JWKSMultipleMatchingKeys:()=>RQ,JWKSNoMatchingKey:()=>RZ,JWKSTimeout:()=>RX,JWSInvalid:()=>RG,JWSSignatureVerificationFailed:()=>RY,JWTClaimValidationFailed:()=>Rz,JWTExpired:()=>RD,JWTInvalid:()=>RB});var ef=Object.create,eh=Object.defineProperty,ey=Object.getOwnPropertyDescriptor,eg=Object.getOwnPropertyNames,e_=Object.getPrototypeOf,ev=Object.prototype.hasOwnProperty,eb=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),e$=(e,t,r)=>(r=null!=e?ef(e_(e)):{},((e,t,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(var i,o=eg(t),n=0,a=o.length;nt[e]).bind(null,i),enumerable:!(r=ey(t,i))||r.enumerable});return e})(!t&&e&&e.__esModule?r:eh(r,"default",{value:e,enumerable:!0}),e));let eS=new Set(["https://json-schema.org/draft/2020-12/schema","http://json-schema.org/draft/2020-12/schema"]),ek=new Set(["https://json-schema.org/draft/2019-09/schema","http://json-schema.org/draft/2019-09/schema"]),ew=new Set(["https://json-schema.org/draft-07/schema","http://json-schema.org/draft-07/schema"]),eV=new Set(["https://json-schema.org/draft-06/schema","http://json-schema.org/draft-06/schema"]);function eP(e){let t=Object.values(e).filter(e=>"number"==typeof e);return Object.entries(e).filter(([e,r])=>-1===t.indexOf(+e)).map(([e,t])=>t)}function eR(e,t="|"){return e.map(e=>eJ(e)).join(t)}function eq(e,t){return"bigint"==typeof t?t.toString():t}class eI{constructor(e){this._getter=e,this._value=void 0}get value(){let e=this._getter;return void 0!==e&&(this._value=e(),this._getter=void 0),this._value}}function ex(e){return new eI(e)}function ej(e){let t=+!!e.startsWith("^"),r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}let eC=Symbol("evaluating");function eT(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function eO(e){let t=Object.getOwnPropertyDescriptor(e,"shape");return t?.get?t.get.raw:t?.value}function eE(e){return eO(e._zod.def)??e._zod.def.shape}function eA(e,t,r){Object.defineProperty(e,t,{get(){let e=r();return eT(this,t,e),e},enumerable:!0,configurable:!0})}function eW(e,t,r){t in e?eT(e,t,r):e[t]=r}function eM(e,t,r,i){let o=eE(t);for(let n of r){let r=Object.getOwnPropertyDescriptor(o,n);r.enumerable&&(r.get?eA(e,n,()=>{let e=t._zod.def.shape[n];return i?i(e,n):e}):eW(e,n,i?i(r.value,n):r.value))}}function eN(...e){let t={};for(let r of e)Object.assign(t,Object.getOwnPropertyDescriptors(r));return Object.defineProperties({},t)}let ez="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function eD(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}let eF=ex(()=>{if(tu.jitless||"u">typeof navigator&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return Function(""),!0}catch(e){return!1}});function eL(e){if(!1===eD(e))return!1;let t=e.constructor;if(void 0===t||"function"!=typeof t)return!0;let r=t.prototype;return!1!==eD(r)&&!1!==Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")}function eU(e){return eL(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}let eH=new Set(["string","number","symbol"]);function eG(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function eB(e,t,r){let i=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(i._zod.parent=e),i}function eK(e){if(!e)return{};if("string"==typeof e)return{error:()=>e};if(e?.message!==void 0){if(e?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");e.error=e.message}return(delete e.message,"string"==typeof e.error)?{...e,error:()=>e.error}:e}function eJ(e){return"bigint"==typeof e?e.toString()+"n":"string"==typeof e?`"${e}"`:`${e}`}let eZ={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-0x80000000,0x7fffffff],uint32:[0,0xffffffff],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},eQ={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function eX(e,t){let r=eE(e),i=[];for(let e of Reflect.ownKeys(t)){if(!Object.getOwnPropertyDescriptor(r,e)?.enumerable)throw Error(`Unrecognized key: "${String(e)}"`);t[e]&&i.push(e)}return i}function eY(e,t){let r={};eM(r,e,Reflect.ownKeys(eE(e)));for(let e of Reflect.ownKeys(t)){let i=Object.getOwnPropertyDescriptor(t,e);i.enumerable&&(i.get?eA(r,e,()=>t[e]):eW(r,e,i.value))}return r}function e1(e,t,r,i="partial"){let o=t._zod.def.checks;if(o&&o.length>0)throw Error(`.${i}() cannot be used on object schemas containing refinements`);let n=r?new Set(eX(t,r)):void 0,a={};return eM(a,t,Reflect.ownKeys(eE(t)),e&&((t,r)=>n&&!n.has(r)?t:new e({type:"optional",innerType:t}))),eB(t,eN(t._zod.def,{shape:a,checks:[]}))}function e0(e,t=0){if(!0===e.aborted)return!0;for(let r=t;r(t.path??(t.path=[]),t.path.unshift(e),t))}function e4(e){return"string"==typeof e?e:e?.message}function e6(e){let t=[];for(let r of e??[]){let e=r._zod.def;if(!/_(length|size)$|_equals$/.test(e.check))break;let i=e.maximum??e.length??e.size;i>=0&&t.push([i,r])}return t}function e3(e,t,r){var i;for(let o=t;o!!i?.Parent&&t instanceof i.Parent||t?._zod?.traits?.has(e)}),Object.defineProperty(c,"name",{value:e}),c}class tl extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class tp extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}}(er=globalThis).__zod_globalConfig??(er.__zod_globalConfig={});let tu=globalThis.__zod_globalConfig;function tm(e){return e&&Object.assign(tu,e),tu}class tf extends Error{constructor(){super("Cannot parse a reference cycle that closes through a transform"),this.name="ZodCyclicError"}}let th="~memo",ty=[];function tg(e){return null!==e&&"object"==typeof e}function t_(e){return e.map(e=>e.path?{...e,path:e.path.slice()}:{...e})}let tv=new WeakMap,tb=[],t$={alloc(e,r,i){let o=t;if(!o)return i;t=void 0;let n={value:i,issues:null};return o.set(r.value,n),tb.push(n),i},guard(e){var t;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,r=(e,r)=>{var i,o;let n;if("backward"!==r.direction&&(i=r,o=e.value,void 0!==(n=i[th]?.backEdges)&&tg(o)&&n.has(o)))throw new tf;return t(e,r)};e._zod.parse=r,e._zod.run===t&&(e._zod.run=r)})},attach(e){var r;let i,o,n,a=!1;(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred.push(()=>{let r=e._zod.parse,s=(d,c)=>{let l;if(void 0===i){let t=function e(t,r,i){var o,n;let a=tv.get(t);if(void 0!==a)return 2*!!a;if(r.has(t))return 2;r.add(t);let s=0,d=t=>{if(2!==s&&t?._zod){let o=e(t,r,i);o>s&&(s=o)}},c=e=>{e>s&&(s=e)},l=t._zod.def;switch(l.type){case"object":{let t=eO(l);c(t?((t,o)=>{let n=0;for(let a of Reflect.ownKeys(t)){let s=Object.getOwnPropertyDescriptor(t,a);if(o&&!s.enumerable)continue;let d=s.get?1:s.value?._zod?e(s.value,r,i):0;d>n&&(n=d)}return n})(t,!0):1),d(l.catchall);break}case"array":d(l.element);break;case"tuple":for(let e of l.items)d(e);d(l.rest);break;case"record":case"map":d(l.keyType),d(l.valueType);break;case"set":d(l.valueType);break;case"union":for(let e of l.options)d(e);break;case"intersection":d(l.left),d(l.right);break;case"optional":case"nullable":case"default":case"prefault":case"catch":case"readonly":case"nonoptional":case"promise":case"success":d(l.innerType);break;case"pipe":d(l.in),d(l.out);break;case"function":d(l.input),d(l.output);break;case"lazy":{let o=l._cachedInner??(i?t._zod.innerType:void 0);c(o?e(o,r,!1):1);break}case"template_literal":case"string":case"number":case"int":case"boolean":case"bigint":case"symbol":case"undefined":case"null":case"void":case"never":case"any":case"unknown":case"date":case"nan":case"enum":case"literal":case"file":case"transform":case"custom":break;default:for(let e in l){let t=Object.getOwnPropertyDescriptor(l,e);if(!t||t.get)continue;let r=t.value;if(r&&"object"==typeof r){if(r._zod)d(r);else if(Array.isArray(r))for(let e of r)d(e)}}}return r.delete(t),o=t,1!==(n=s)&&tv.set(o,2===n),n}(e,new Set,!1);if(0===t)return e._zod.parse=r,e._zod.run===s&&(e._zod.run=r),r(d,c);2===t||a?i=!0:a=!0}let p=d.value;if(!tg(p))return r(d,c);let u=c[th];if(u||(u={buckets:new WeakMap,backEdges:void 0},c[th]=u),o===c)l=n;else{var m;let t;(t=(m=u).buckets.get(e))||(t=new WeakMap,m.buckets.set(e,t)),l=t,o=c,n=l}let f=l.get(p);if(f)return d.value=f.value,f.issues?f.issues.length&&d.issues.push(...t_(f.issues)):(d.memo=!0,u.backEdges??(u.backEdges=new WeakSet),u.backEdges.add(f.value)),d;t=l;let h=tb.length,y=r(d,c);t=void 0;let g=tb.length>h?tb.pop():void 0;return y instanceof Promise?y.then(e=>(g&&(g.issues=e.issues.length?t_(e.issues):ty),e)):(g&&(g.issues=y.issues.length?t_(y.issues):ty),y)};e._zod.parse=s,e._zod.run===r&&(e._zod.run=s)})}},tS=/^[cC][0-9a-z]{6,}$/,tk=/^[0-9a-z]+$/,tw=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,tV=/^[0-9a-vA-V]{20}$/,tP=/^[A-Za-z0-9]{27}$/,tR=/^[a-zA-Z0-9_-]{21}$/,tq=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,tI=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,tx=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([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)$/,tj=/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,tC=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,tT=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,tO=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,tE=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,tA=/^https?$/,tW=/^\+[1-9]\d{6,14}$/,tM="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",tN=RegExp(`^${tM}$`);function tz(e){let t="(?:[01]\\d|2[0-3]):[0-5]\\d";return"number"==typeof e.precision?-1===e.precision?`${t}`:0===e.precision?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:e.seconds?`${t}:[0-5]\\d(?:\\.\\d+)?`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}let tD=/^[\s\S]{0,}$/,tF=/^-?\d+$/,tL=/^-?\d+(?:\.\d+)?$/,tU=/^(?:true|false)$/i,tH=/^null$/i,tG=/^[^A-Z]*$/,tB=/^[^a-z]*$/,tK=tc("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),tJ=e=>{let t=e.value;return null!=t&&void 0!==t.length},tZ={number:"number",bigint:"bigint",object:"date"},tQ=tc("$ZodCheckLessThan",(e,t)=>{tK.init(e,t);let r=tZ[typeof t.value];e._zod.check=i=>{(t.inclusive?i.value<=t.value:i.value{tK.init(e,t);let r=tZ[typeof t.value];e._zod.check=i=>{(t.inclusive?i.value>=t.value:i.value>t.value)||i.issues.push({origin:tZ[typeof i.value]??r,code:"too_small",minimum:"object"==typeof t.value?t.value.getTime():t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),tY=tc("$ZodCheckMultipleOf",(e,t)=>{tK.init(e,t),e._zod.check=r=>{let i,o,n;if(typeof r.value!=typeof t.value)throw Error("Cannot mix number and bigint in multiple_of check.");("bigint"==typeof r.value?t.value!==BigInt(0)&&r.value%t.value===BigInt(0):0==(o=Math.round(i=r.value/t.value),n=4*Number.EPSILON*Math.max(Math.abs(i),1),Math.abs(i-o){tK.init(e,t),t.format=t.format||"float64";let r=t.format?.includes("int"),i=r?"int":"number",[o,n]=eZ[t.format];e._zod.check=a=>{let s=a.value;if(r){if(!Number.isInteger(s))return void a.issues.push({expected:i,format:t.format,code:"invalid_type",continue:!1,input:s,inst:e});if(!Number.isSafeInteger(s))return void(s>0?a.issues.push({input:s,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!t.abort}):a.issues.push({input:s,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!t.abort}))}sn&&a.issues.push({origin:"number",input:s,code:"too_big",maximum:n,inclusive:!0,inst:e,continue:!t.abort})}}),t0=tc("$ZodCheckMaxLength",(e,t)=>{var r;tK.init(e,t),(r=e._zod.def).when??(r.when=tJ),e._zod.check=r=>{let i=r.value,o=i.length;if(("string"==typeof i&&o>t.maximum?e8(i):o)<=t.maximum)return;let n=e7(i);r.issues.push({origin:n,code:"too_big",maximum:t.maximum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),t2=tc("$ZodCheckMinLength",(e,t)=>{var r;tK.init(e,t),(r=e._zod.def).when??(r.when=tJ),e._zod.check=r=>{let i=r.value,o=i.length;if(("string"==typeof i&&o>=t.minimum&&o<2*t.minimum?e8(i):o)>=t.minimum)return;let n=e7(i);r.issues.push({origin:n,code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),t4=tc("$ZodCheckLengthEquals",(e,t)=>{var r;tK.init(e,t),(r=e._zod.def).when??(r.when=tJ),e._zod.check=r=>{let i=r.value,o=i.length,n="string"==typeof i&&o>=t.length&&o<=2*t.length?e8(i):o;if(n===t.length)return;let a=e7(i),s=n>t.length;r.issues.push({origin:a,...s?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),t6=tc("$ZodCheckStringFormat",(e,t)=>{var r,i;tK.init(e,t),t.pattern?(r=e._zod).check??(r.check=r=>{t.pattern.lastIndex=0,t.pattern.test(r.value)||r.issues.push({origin:"string",code:"invalid_format",format:t.format,input:r.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(i=e._zod).check??(i.check=()=>{})}),t3=tc("$ZodCheckRegex",(e,t)=>{t6.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,t.pattern.test(r.value)||r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),t9=tc("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=tG),t6.init(e,t)}),t5=tc("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=tB),t6.init(e,t)}),t8=tc("$ZodCheckIncludes",(e,t)=>{tK.init(e,t);let r=eG(t.includes),i=new RegExp("number"==typeof t.position?`^.{${t.position},}${r}`:r);t.pattern=i,e._zod.check=r=>{r.value.includes(t.includes,t.position)||r.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:r.value,inst:e,continue:!t.abort})}}),t7=tc("$ZodCheckStartsWith",(e,t)=>{tK.init(e,t);let r=RegExp(`^${eG(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.check=r=>{r.value.startsWith(t.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:r.value,inst:e,continue:!t.abort})}}),re=tc("$ZodCheckEndsWith",(e,t)=>{tK.init(e,t);let r=RegExp(`.*${eG(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.check=r=>{r.value.endsWith(t.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:r.value,inst:e,continue:!t.abort})}}),rt=tc("$ZodCheckOverwrite",(e,t)=>{tK.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}});class rr{constructor(e=[],t={}){this.content=[],this.indent=0,this.args=e,this.closed=t}indented(e){this.indent+=1;try{e(this)}finally{this.indent-=1}}write(e){if("function"==typeof e){e(this,{execution:"sync"}),e(this,{execution:"async"});return}let t=e.split("\n").filter(e=>e),r=Math.min(...t.map(e=>e.length-e.trimStart().length));for(let e of t.map(e=>e.slice(r)).map(e=>" ".repeat(2*this.indent)+e))this.content.push(e)}compile(){let e=Function,t=this?.content??[""];return new e(...Object.keys(this.closed),`return function (${this.args.join(", ")}) { ${t.join("\n")} -};`)(...Object.values(this.closed))}}let ri={major:4,minor:6,patch:7},ro=tc("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=ri;let i=e._zod.def.checks,o=e._zod.traits.has("$ZodCheck")?[e,...i??[]]:i?.length?[...i]:[];for(let t of o)for(let r of t._zod.onattach)r(e);if(0===o.length)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(t,r,i)=>{let o;if(t.memo)return t;let n=e0(t);for(let a of r){if(a._zod.def.when){if(function(e,t=0){if(!0===e.aborted)return!0;for(let r=t;r{await s,t.issues.length!==r&&(e3(t.issues,r,e),n||(n=e0(t,r)))});else{if(t.issues.length===r)continue;e3(t.issues,r,e),n||(n=e0(t,r))}}return o?o.then(()=>t):t},r=(r,i,n)=>{if(e0(r))return r.aborted=!0,r;let a=t(i,o,n);if(a instanceof Promise){if(!1===n.async)throw new tl;return a.then(t=>e._zod.parse(t,n))}return e._zod.parse(a,n)};e._zod.run=(i,n)=>{if(n.skipChecks)return e._zod.parse(i,n);if("backward"===n.direction){let t=e._zod.parse({value:i.value,issues:[]},{...n,skipChecks:!0});return t instanceof Promise?t.then(e=>r(e,i,n)):r(t,i,n)}let a=e._zod.parse(i,n);if(a instanceof Promise){if(!1===n.async)throw new tl;return a.then(e=>t(e,o,n))}return t(a,o,n)}}},{get"~standard"(){return tt(this,"~standard",ra(this),!1)},set"~standard"(e){tt(this,"~standard",e)}}),rn=(e,t)=>e.issues.length?{issues:e.issues.map(e=>e9(e,t,tm()))}:{value:e.value};function ra(e){return{validate:t=>{let r={async:!1};try{let i=e._zod.run({value:t,issues:[]},r);if(!(i instanceof Promise))return rn(i,r)}catch(e){}return async function(e,t){let r={async:!0};return rn(await e._zod.run({value:t,issues:[]},r),r)}(e,t)},vendor:"zod",version:1}}let rs=tc("$ZodString",(e,t)=>{ro.init(e,t),e._zod.pattern=t.pattern??tD,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=String(r.value)}catch(e){}return"string"==typeof r.value||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),rd=tc("$ZodStringFormat",(e,t)=>{t6.init(e,t),rs.init(e,t)}),rc=tc("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=tI),rd.init(e,t)}),rl=tc("$ZodUUID",(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(void 0===e)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=tx(e))}else t.pattern??(t.pattern=tx());rd.init(e,t)}),rp=tc("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=tj),rd.init(e,t)});function ru(e){try{if("u">typeof URL&&"function"==typeof URL.canParse)return URL.canParse(e);return new URL(e),!0}catch{return!1}}let rm=/[\t\n\r]/g;function rf(e){return e.replace(rm,"")}let rh=tc("$ZodURL",(e,t)=>{rd.init(e,t),e._zod.check=r=>{try{var i,o;let n=r.value.trim(),a="normalize"in t||"hostname"in t||"protocol"in t?function(e,t){if(!t.normalize&&t.protocol?.source===tA.source&&!/^https?:\/\//i.test(e))return 1;try{if("u">typeof URL){let t=URL;if("function"==typeof t.parse)return t.parse(e)??2}return new URL(e)}catch{return 2}}(n,t):ru(n)||2;if(1===a)return void r.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:r.value,inst:e,continue:!t.abort});if(2===a)return void r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort});if(!0===a){r.value=rf(n);return}t.hostname&&((i=t.hostname).lastIndex=0,!i.test(a.hostname))&&r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort}),t.protocol&&((o=t.protocol).lastIndex=0,!o.test(a.protocol.endsWith(":")?a.protocol.slice(0,-1):a.protocol))&&r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort}),r.value=t.normalize?a.href:rf(n);return}catch(i){r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),ry=tc("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=RegExp("^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$","u")),rd.init(e,t)}),rg=tc("$ZodNanoID",(e,t)=>{var r;if(void 0!==t.length&&(!Number.isInteger(t.length)||t.length<1))throw Error(`Invalid nanoid length: ${t.length}`);t.pattern??(t.pattern=void 0===t.length?tV:(r=t.length,RegExp(`^[a-zA-Z0-9_-]{${r}}$`))),rd.init(e,t)}),r_=tc("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=tS),rd.init(e,t)}),rv=tc("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=tk),rd.init(e,t)}),rb=tc("$ZodULID",(e,t)=>{t.pattern??(t.pattern=tw),rd.init(e,t)}),r$=tc("$ZodXID",(e,t)=>{t.pattern??(t.pattern=tR),rd.init(e,t)}),rS=tc("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=tP),rd.init(e,t)}),rk=tc("$ZodISODateTime",(e,t)=>{let r,i,o;t.pattern??(r=["Z"],t.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)"),i=`${tz({precision:t.precision,seconds:!0})}(?:${r.join("|")})`,o=t.local?`${i}|${tz({precision:t.precision})}`:i,t.pattern=RegExp(`^${tW}T(?:${o})$`)),rd.init(e,t)}),rw=tc("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=tN),rd.init(e,t)}),rR=tc("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=RegExp(`^${tz(t)}$`)),rd.init(e,t)}),rP=tc("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=tq),rd.init(e,t)}),rV=tc("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=tC),rd.init(e,t)}),rq=/^[0-9a-fA-F:.]+$/;function rI(e){return!!rq.test(e)&&ru(`http://[${e}]`)}let rx=tc("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=tT),rd.init(e,t),e._zod.check=r=>{rI(r.value)||r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}),rj=tc("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=tO),rd.init(e,t)}),rC=tc("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=tE),rd.init(e,t),e._zod.check=r=>{!function(e){let t=e.split("/");if(2!==t.length)return!1;let[r,i]=t;if(!i)return!1;let o=Number(i);return`${o}`===i&&!(o<0)&&!(o>128)&&rI(r)}(r.value)&&r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}});function rT(e){if(""===e)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}let rO=/^[0-9a-zA-Z+/]*={0,2}$/,rE=tc("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=rO),rd.init(e,t),e._zod.check=r=>{rT(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}}),rA=/^[A-Za-z0-9_-]*$/,rM=tc("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=rA),rd.init(e,t),e._zod.check=r=>{!function(e){if(!rA.test(e))return!1;let t=e.replace(/[-_]/g,e=>"-"===e?"+":"/");return rT(t.padEnd(4*Math.ceil(t.length/4),"="))}(r.value)&&r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),rW=tc("$ZodE164",(e,t)=>{t.pattern??(t.pattern=tM),rd.init(e,t)}),rN=tc("$ZodJWT",(e,t)=>{rd.init(e,t),e._zod.check=r=>{!function(e,t=null){try{let r=e.split(".");if(3!==r.length)return!1;let[i]=r;if(!i)return!1;let o=JSON.parse(atob(i));if("typ"in o&&o?.typ!=="JWT"||!o.alg||t&&(!("alg"in o)||o.alg!==t))return!1;return!0}catch{return!1}}(r.value,t.alg)&&r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),rz=tc("$ZodNumber",(e,t)=>{ro.init(e,t),e._zod.pattern=tL,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=Number(r.value)}catch(e){}let o=r.value;if("number"==typeof o&&!Number.isNaN(o)&&Number.isFinite(o))return r;let n="number"==typeof o?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:String(o):void 0;return r.issues.push({expected:"number",code:"invalid_type",input:o,inst:e,...n?{received:n}:{}}),r}}),rD=tc("$ZodNumberFormat",(e,t)=>{t1.init(e,t),rz.init(e,t)}),rF=tc("$ZodBoolean",(e,t)=>{ro.init(e,t),e._zod.pattern=tU,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=!!r.value}catch(e){}let o=r.value;return"boolean"==typeof o||r.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:e}),r}}),rL=tc("$ZodNull",(e,t)=>{ro.init(e,t),e._zod.pattern=tH,e._zod.values=new Set([null]),e._zod.parse=(t,r)=>{let i=t.value;return null===i||t.issues.push({expected:"null",code:"invalid_type",input:i,inst:e}),t}}),rU=tc("$ZodAny",(e,t)=>{ro.init(e,t),e._zod.parse=e=>e}),rH=tc("$ZodUnknown",(e,t)=>{ro.init(e,t),e._zod.parse=e=>e}),rG=tc("$ZodNever",(e,t)=>{ro.init(e,t),e._zod.parse=(t,r)=>(t.issues.push({expected:"never",code:"invalid_type",input:t.value,inst:e}),t)}),rB=e=>Array.isArray(e)?e.length:-1;function rK(e,t,r){e.issues.length&&t.issues.push(...e2(r,e.issues)),t.value[r]=e.value}let rJ=tc("$ZodArray",(e,t)=>{ro.init(e,t);let r=tu.memoizer;r?.attach(e),e._zod.parse=(i,o)=>{let n=i.value;if(!Array.isArray(n))return i.issues.push({expected:"array",code:"invalid_type",input:n,inst:e}),i;i.value=r?r.alloc(e,i,Array(n.length),o):Array(n.length);let a=[],s=o?.abortEarly;for(let e=0;erK(t,i,e)));else if(rK(d,i,e),s&&0!==d.issues.length&&e0(d))break}return a.length?Promise.all(a).then(()=>i):i},function(e,t){let r=e6(e._zod.def.checks);if(!r.length)return;let i=Math.min(...r.map(e=>e[0])),o=e._zod.parse;e._zod.parse=(r,n)=>{let a=t(r.value);if(a>i&&!n?.skipChecks&&n?.direction!=="backward"){for(let[t,i]of e6(e._zod.def.checks))if(a>t&&i._zod.def.when(r)){let t=r.issues.length;return i._zod.check(r),r.issues[t].continue=!1,e3(r.issues,t,e),r}}return o(r,n)}}(e,rB)});function rZ(e,t,r,i,o,n){let a=r in i,s="optional"===n;if(a||!s||"optional"!==o){if(e.issues.length){if(void 0!==o&&s&&!a)return;t.issues.push(...e2(r,e.issues))}if(!a&&void 0===o){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[r]});return}void 0===e.value?(a||"defaulted"===o&&!s)&&(t.value[r]=void 0):t.value[r]=e.value}}let rQ=[];function rX(e){var t;let r=Object.keys(e.shape),i=Object.getOwnPropertySymbols(e.shape),o=i.length?i:rQ,n=o.length?[...r,...o]:r;for(let t of n)if(!e.shape?.[t]?._zod?.traits?.has("$ZodType"))throw Error(`Invalid element at key "${String(t)}": expected a Zod schema`);let a=Object.keys(t=e.shape).filter(e=>void 0!==t[e]._zod.optin&&"optional"===t[e]._zod.optout);return{...e,allKeys:n,symbolKeys:o,keySet:new Set(r),numKeys:r.length,optionalKeys:new Set(a)}}function rY(e,t,r,i,o,n,a){let s=[],d=o.keySet,c=o.catchall._zod,l=c.def.type,p=c.optin,u=c.optout,m=0;for(let o in t){if(a&&r.issues.length!==m){if(e0(r,m))break;m=r.issues.length}if(d.has(o))continue;if("__proto__"===o){"never"===l&&s.push(o);continue}if("never"===l){s.push(o);continue}let n=c.run({value:t[o],issues:[]},i);n instanceof Promise?e.push(n.then(e=>rZ(e,r,o,t,p,u))):rZ(n,r,o,t,p,u)}return(s.length&&r.issues.push({code:"unrecognized_keys",keys:s,input:t,inst:n,continue:!0}),e.length)?Promise.all(e).then(()=>r):r}let r1=tc("$ZodObject",(e,t)=>{let r;ro.init(e,t);let i=Object.getOwnPropertyDescriptor(t,"shape"),o=i?.get?i.get.raw:t.shape??{};if(o){let e=()=>{let r={...o};return Object.defineProperty(t,"shape",{value:r}),e.raw=r,r};e.raw=o,Object.defineProperty(t,"shape",{get:e})}let n=ex(()=>rX(t));tn(e,"propValues",e=>{let t=e.def.shape,r={};for(let e in t){let i=t[e]._zod;if(i.values){for(let t of(Object.prototype.hasOwnProperty.call(r,e)||eT(r,e,new Set),i.values))r[e].add(t);void 0!==i.optin&&r[e].add(void 0)}}return r});let a=t.catchall,s=tu.memoizer;s?.attach(e),e._zod.parse=(t,i)=>{r??(r=n.value);let o=t.value;if(!eD(o))return t.issues.push({expected:"object",code:"invalid_type",input:o,inst:e}),t;t.value=s?s.alloc(e,t,{},i):{};let d=[],c=r.shape,l=i?.abortEarly,p=t.issues.length;for(let e of r.allKeys){if(l&&t.issues.length!==p){if(e0(t,p))break;p=t.issues.length}if("__proto__"===e)continue;let r=c[e],n=r._zod.optin,a=r._zod.optout,s=r._zod.run({value:o[e],issues:[]},i);s instanceof Promise?d.push(s.then(r=>rZ(r,t,e,o,n,a))):rZ(s,t,e,o,n,a)}return a?rY(d,o,t,i,n.value,e,!0===l):d.length?Promise.all(d).then(()=>t):t}}),r0=tc("$ZodObjectJIT",(e,t)=>{let r,i;r1.init(e,t);let o=e._zod.parse,n=ex(()=>rX(t)),a=tu.memoizer,s=!tu.jitless,d=s&&eF.value,c=t.catchall;e._zod.parse=(l,p)=>{i??(i=n.value);let u=l.value;return eD(u)?s&&d&&p?.async===!1&&!0!==p.jitless?(r||(r=(t=>{let r=n.value,i=r.symbolKeys,o=new rr(["payload","ctx"],{shape:t,inst:e,memo:a,syms:i}),s=e=>`shape[${e}]._zod.run({ value: input[${e}], issues: [] }, ctx)`,d=(e,t)=>` +};`)(...Object.values(this.closed))}}let ri={major:4,minor:6,patch:7},ro=tc("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=ri;let i=e._zod.def.checks,o=e._zod.traits.has("$ZodCheck")?[e,...i??[]]:i?.length?[...i]:[];for(let t of o)for(let r of t._zod.onattach)r(e);if(0===o.length)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(t,r,i)=>{let o;if(t.memo)return t;let n=e0(t);for(let a of r){if(a._zod.def.when){if(function(e,t=0){if(!0===e.aborted)return!0;for(let r=t;r{await s,t.issues.length!==r&&(e3(t.issues,r,e),n||(n=e0(t,r)))});else{if(t.issues.length===r)continue;e3(t.issues,r,e),n||(n=e0(t,r))}}return o?o.then(()=>t):t},r=(r,i,n)=>{if(e0(r))return r.aborted=!0,r;let a=t(i,o,n);if(a instanceof Promise){if(!1===n.async)throw new tl;return a.then(t=>e._zod.parse(t,n))}return e._zod.parse(a,n)};e._zod.run=(i,n)=>{if(n.skipChecks)return e._zod.parse(i,n);if("backward"===n.direction){let t=e._zod.parse({value:i.value,issues:[]},{...n,skipChecks:!0});return t instanceof Promise?t.then(e=>r(e,i,n)):r(t,i,n)}let a=e._zod.parse(i,n);if(a instanceof Promise){if(!1===n.async)throw new tl;return a.then(e=>t(e,o,n))}return t(a,o,n)}}},{get"~standard"(){return tt(this,"~standard",ra(this),!1)},set"~standard"(e){tt(this,"~standard",e)}}),rn=(e,t)=>e.issues.length?{issues:e.issues.map(e=>e9(e,t,tm()))}:{value:e.value};function ra(e){return{validate:t=>{let r={async:!1};try{let i=e._zod.run({value:t,issues:[]},r);if(!(i instanceof Promise))return rn(i,r)}catch(e){}return async function(e,t){let r={async:!0};return rn(await e._zod.run({value:t,issues:[]},r),r)}(e,t)},vendor:"zod",version:1}}let rs=tc("$ZodString",(e,t)=>{ro.init(e,t),e._zod.pattern=t.pattern??tD,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=String(r.value)}catch(e){}return"string"==typeof r.value||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),rd=tc("$ZodStringFormat",(e,t)=>{t6.init(e,t),rs.init(e,t)}),rc=tc("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=tI),rd.init(e,t)}),rl=tc("$ZodUUID",(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(void 0===e)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=tx(e))}else t.pattern??(t.pattern=tx());rd.init(e,t)}),rp=tc("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=tj),rd.init(e,t)});function ru(e){try{if("u">typeof URL&&"function"==typeof URL.canParse)return URL.canParse(e);return new URL(e),!0}catch{return!1}}let rm=/[\t\n\r]/g;function rf(e){return e.replace(rm,"")}let rh=tc("$ZodURL",(e,t)=>{rd.init(e,t),e._zod.check=r=>{try{var i,o;let n=r.value.trim(),a="normalize"in t||"hostname"in t||"protocol"in t?function(e,t){if(!t.normalize&&t.protocol?.source===tA.source&&!/^https?:\/\//i.test(e))return 1;try{if("u">typeof URL){let t=URL;if("function"==typeof t.parse)return t.parse(e)??2}return new URL(e)}catch{return 2}}(n,t):ru(n)||2;if(1===a)return void r.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:r.value,inst:e,continue:!t.abort});if(2===a)return void r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort});if(!0===a){r.value=rf(n);return}t.hostname&&((i=t.hostname).lastIndex=0,!i.test(a.hostname))&&r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort}),t.protocol&&((o=t.protocol).lastIndex=0,!o.test(a.protocol.endsWith(":")?a.protocol.slice(0,-1):a.protocol))&&r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort}),r.value=t.normalize?a.href:rf(n);return}catch(i){r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),ry=tc("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=RegExp("^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$","u")),rd.init(e,t)}),rg=tc("$ZodNanoID",(e,t)=>{var r;if(void 0!==t.length&&(!Number.isInteger(t.length)||t.length<1))throw Error(`Invalid nanoid length: ${t.length}`);t.pattern??(t.pattern=void 0===t.length?tR:(r=t.length,RegExp(`^[a-zA-Z0-9_-]{${r}}$`))),rd.init(e,t)}),r_=tc("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=tS),rd.init(e,t)}),rv=tc("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=tk),rd.init(e,t)}),rb=tc("$ZodULID",(e,t)=>{t.pattern??(t.pattern=tw),rd.init(e,t)}),r$=tc("$ZodXID",(e,t)=>{t.pattern??(t.pattern=tV),rd.init(e,t)}),rS=tc("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=tP),rd.init(e,t)}),rk=tc("$ZodISODateTime",(e,t)=>{let r,i,o;t.pattern??(r=["Z"],t.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)"),i=`${tz({precision:t.precision,seconds:!0})}(?:${r.join("|")})`,o=t.local?`${i}|${tz({precision:t.precision})}`:i,t.pattern=RegExp(`^${tM}T(?:${o})$`)),rd.init(e,t)}),rw=tc("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=tN),rd.init(e,t)}),rV=tc("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=RegExp(`^${tz(t)}$`)),rd.init(e,t)}),rP=tc("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=tq),rd.init(e,t)}),rR=tc("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=tC),rd.init(e,t)}),rq=/^[0-9a-fA-F:.]+$/;function rI(e){return!!rq.test(e)&&ru(`http://[${e}]`)}let rx=tc("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=tT),rd.init(e,t),e._zod.check=r=>{rI(r.value)||r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}),rj=tc("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=tO),rd.init(e,t)}),rC=tc("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=tE),rd.init(e,t),e._zod.check=r=>{!function(e){let t=e.split("/");if(2!==t.length)return!1;let[r,i]=t;if(!i)return!1;let o=Number(i);return`${o}`===i&&!(o<0)&&!(o>128)&&rI(r)}(r.value)&&r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}});function rT(e){if(""===e)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}let rO=/^[0-9a-zA-Z+/]*={0,2}$/,rE=tc("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=rO),rd.init(e,t),e._zod.check=r=>{rT(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}}),rA=/^[A-Za-z0-9_-]*$/,rW=tc("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=rA),rd.init(e,t),e._zod.check=r=>{!function(e){if(!rA.test(e))return!1;let t=e.replace(/[-_]/g,e=>"-"===e?"+":"/");return rT(t.padEnd(4*Math.ceil(t.length/4),"="))}(r.value)&&r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),rM=tc("$ZodE164",(e,t)=>{t.pattern??(t.pattern=tW),rd.init(e,t)}),rN=tc("$ZodJWT",(e,t)=>{rd.init(e,t),e._zod.check=r=>{!function(e,t=null){try{let r=e.split(".");if(3!==r.length)return!1;let[i]=r;if(!i)return!1;let o=JSON.parse(atob(i));if("typ"in o&&o?.typ!=="JWT"||!o.alg||t&&(!("alg"in o)||o.alg!==t))return!1;return!0}catch{return!1}}(r.value,t.alg)&&r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),rz=tc("$ZodNumber",(e,t)=>{ro.init(e,t),e._zod.pattern=tL,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=Number(r.value)}catch(e){}let o=r.value;if("number"==typeof o&&!Number.isNaN(o)&&Number.isFinite(o))return r;let n="number"==typeof o?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:String(o):void 0;return r.issues.push({expected:"number",code:"invalid_type",input:o,inst:e,...n?{received:n}:{}}),r}}),rD=tc("$ZodNumberFormat",(e,t)=>{t1.init(e,t),rz.init(e,t)}),rF=tc("$ZodBoolean",(e,t)=>{ro.init(e,t),e._zod.pattern=tU,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=!!r.value}catch(e){}let o=r.value;return"boolean"==typeof o||r.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:e}),r}}),rL=tc("$ZodNull",(e,t)=>{ro.init(e,t),e._zod.pattern=tH,e._zod.values=new Set([null]),e._zod.parse=(t,r)=>{let i=t.value;return null===i||t.issues.push({expected:"null",code:"invalid_type",input:i,inst:e}),t}}),rU=tc("$ZodAny",(e,t)=>{ro.init(e,t),e._zod.parse=e=>e}),rH=tc("$ZodUnknown",(e,t)=>{ro.init(e,t),e._zod.parse=e=>e}),rG=tc("$ZodNever",(e,t)=>{ro.init(e,t),e._zod.parse=(t,r)=>(t.issues.push({expected:"never",code:"invalid_type",input:t.value,inst:e}),t)}),rB=e=>Array.isArray(e)?e.length:-1;function rK(e,t,r){e.issues.length&&t.issues.push(...e2(r,e.issues)),t.value[r]=e.value}let rJ=tc("$ZodArray",(e,t)=>{ro.init(e,t);let r=tu.memoizer;r?.attach(e),e._zod.parse=(i,o)=>{let n=i.value;if(!Array.isArray(n))return i.issues.push({expected:"array",code:"invalid_type",input:n,inst:e}),i;i.value=r?r.alloc(e,i,Array(n.length),o):Array(n.length);let a=[],s=o?.abortEarly;for(let e=0;erK(t,i,e)));else if(rK(d,i,e),s&&0!==d.issues.length&&e0(d))break}return a.length?Promise.all(a).then(()=>i):i},function(e,t){let r=e6(e._zod.def.checks);if(!r.length)return;let i=Math.min(...r.map(e=>e[0])),o=e._zod.parse;e._zod.parse=(r,n)=>{let a=t(r.value);if(a>i&&!n?.skipChecks&&n?.direction!=="backward"){for(let[t,i]of e6(e._zod.def.checks))if(a>t&&i._zod.def.when(r)){let t=r.issues.length;return i._zod.check(r),r.issues[t].continue=!1,e3(r.issues,t,e),r}}return o(r,n)}}(e,rB)});function rZ(e,t,r,i,o,n){let a=r in i,s="optional"===n;if(a||!s||"optional"!==o){if(e.issues.length){if(void 0!==o&&s&&!a)return;t.issues.push(...e2(r,e.issues))}if(!a&&void 0===o){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[r]});return}void 0===e.value?(a||"defaulted"===o&&!s)&&(t.value[r]=void 0):t.value[r]=e.value}}let rQ=[];function rX(e){var t;let r=Object.keys(e.shape),i=Object.getOwnPropertySymbols(e.shape),o=i.length?i:rQ,n=o.length?[...r,...o]:r;for(let t of n)if(!e.shape?.[t]?._zod?.traits?.has("$ZodType"))throw Error(`Invalid element at key "${String(t)}": expected a Zod schema`);let a=Object.keys(t=e.shape).filter(e=>void 0!==t[e]._zod.optin&&"optional"===t[e]._zod.optout);return{...e,allKeys:n,symbolKeys:o,keySet:new Set(r),numKeys:r.length,optionalKeys:new Set(a)}}function rY(e,t,r,i,o,n,a){let s=[],d=o.keySet,c=o.catchall._zod,l=c.def.type,p=c.optin,u=c.optout,m=0;for(let o in t){if(a&&r.issues.length!==m){if(e0(r,m))break;m=r.issues.length}if(d.has(o))continue;if("__proto__"===o){"never"===l&&s.push(o);continue}if("never"===l){s.push(o);continue}let n=c.run({value:t[o],issues:[]},i);n instanceof Promise?e.push(n.then(e=>rZ(e,r,o,t,p,u))):rZ(n,r,o,t,p,u)}return(s.length&&r.issues.push({code:"unrecognized_keys",keys:s,input:t,inst:n,continue:!0}),e.length)?Promise.all(e).then(()=>r):r}let r1=tc("$ZodObject",(e,t)=>{let r;ro.init(e,t);let i=Object.getOwnPropertyDescriptor(t,"shape"),o=i?.get?i.get.raw:t.shape??{};if(o){let e=()=>{let r={...o};return Object.defineProperty(t,"shape",{value:r}),e.raw=r,r};e.raw=o,Object.defineProperty(t,"shape",{get:e})}let n=ex(()=>rX(t));tn(e,"propValues",e=>{let t=e.def.shape,r={};for(let e in t){let i=t[e]._zod;if(i.values){for(let t of(Object.prototype.hasOwnProperty.call(r,e)||eT(r,e,new Set),i.values))r[e].add(t);void 0!==i.optin&&r[e].add(void 0)}}return r});let a=t.catchall,s=tu.memoizer;s?.attach(e),e._zod.parse=(t,i)=>{r??(r=n.value);let o=t.value;if(!eD(o))return t.issues.push({expected:"object",code:"invalid_type",input:o,inst:e}),t;t.value=s?s.alloc(e,t,{},i):{};let d=[],c=r.shape,l=i?.abortEarly,p=t.issues.length;for(let e of r.allKeys){if(l&&t.issues.length!==p){if(e0(t,p))break;p=t.issues.length}if("__proto__"===e)continue;let r=c[e],n=r._zod.optin,a=r._zod.optout,s=r._zod.run({value:o[e],issues:[]},i);s instanceof Promise?d.push(s.then(r=>rZ(r,t,e,o,n,a))):rZ(s,t,e,o,n,a)}return a?rY(d,o,t,i,n.value,e,!0===l):d.length?Promise.all(d).then(()=>t):t}}),r0=tc("$ZodObjectJIT",(e,t)=>{let r,i;r1.init(e,t);let o=e._zod.parse,n=ex(()=>rX(t)),a=tu.memoizer,s=!tu.jitless,d=s&&eF.value,c=t.catchall;e._zod.parse=(l,p)=>{i??(i=n.value);let u=l.value;return eD(u)?s&&d&&p?.async===!1&&!0!==p.jitless?(r||(r=(t=>{let r=n.value,i=r.symbolKeys,o=new rr(["payload","ctx"],{shape:t,inst:e,memo:a,syms:i}),s=e=>`shape[${e}]._zod.run({ value: input[${e}], issues: [] }, ctx)`,d=(e,t)=>` let ${e}_ab = false; for (let i = 0; i < ${e}.issues.length; i++) { const iss = ${e}.issues[i]; @@ -50,20 +50,20 @@ ${t.join("\n")} newResult[${n}] = ${r}.value; } - `)}return o.write("payload.value = newResult;"),o.write("return payload;"),o.compile()})(t.shape)),l=r(l,p),c)?rY([],u,l,p,i,e,p?.abortEarly===!0):l:o(l,p):(l.issues.push({expected:"object",code:"invalid_type",input:u,inst:e}),l)}});function r2(e,t,r,i){for(let r of e)if(0===r.issues.length)return t.value=r.value,t;let o=e.filter(e=>!e0(e));return 1===o.length?(t.value=o[0].value,o[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(e=>e.issues.map(e=>e9(e,i,tm())))}),t)}let r4=tc("$ZodUnion",(e,t)=>{ro.init(e,t),tn(e,"optin",e=>e.def.options.some(e=>"defaulted"===e._zod.optin)?"defaulted":e.def.options.some(e=>void 0!==e._zod.optin)?"optional":void 0),tn(e,"optout",e=>e.def.options.some(e=>"optional"===e._zod.optout)?"optional":void 0),tn(e,"values",e=>{if(e.def.options.every(e=>e._zod.values))return new Set(e.def.options.flatMap(e=>Array.from(e._zod.values)))}),tn(e,"pattern",e=>{if(e.def.options.every(e=>e._zod.pattern)){let t=e.def.options.map(e=>e._zod.pattern);return RegExp(`^(${t.map(e=>ej(e.source)).join("|")})$`)}});let r=1===t.options.length?t.options[0]._zod.run:null;e._zod.parse=(i,o)=>{if(r)return r(i,o);let n=!1,a=[];for(let e of t.options){let t=e._zod.run({value:i.value,issues:[]},o);if(t instanceof Promise)a.push(t),n=!0;else{if(0===t.issues.length)return t;a.push(t)}}return n?Promise.all(a).then(t=>r2(t,i,e,o)):r2(a,i,e,o)}}),r6=tc("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,r4.init(e,t);let r=e._zod.parse;tn(e,"propValues",e=>{let t={},r=0;for(let i of e.def.options){let o=i._zod.propValues;if(!o||0===Object.keys(o).length)throw Error(`Invalid discriminated union option at index "${e.def.options.indexOf(i)}"`);for(let[i,n]of(o[e.def.discriminator]?.has(void 0)&&r++,Object.entries(o)))for(let e of(Object.prototype.hasOwnProperty.call(t,i)||eT(t,i,new Set),n))t[i].add(e)}return!e.def.unionFallback&&r>1&&t[e.def.discriminator]?.delete(void 0),t}),t.options.forEach((e,r)=>{let i=eO(e._zod.def);if(i&&!Object.prototype.hasOwnProperty.call(i,t.discriminator))throw Error(`Invalid discriminated union option at index "${r}"`)});let i=ex(()=>(function(e){let t=new Map;for(let r of e.options){let i=r._zod.propValues?.[e.discriminator];if(!i||0===i.size)throw Error(`Invalid discriminated union option at index "${e.options.indexOf(r)}"`);for(let e of i)if(t.has(e)){if(void 0!==e)throw Error(`Duplicate discriminator value "${String(e)}"`);t.set(e,null)}else t.set(e,r)}return t})(t));e._zod.parse=(o,n)=>{let a=o.value;if(!eD(a))return o.issues.push({code:"invalid_type",expected:"object",input:a,inst:e}),o;let s=a?.[t.discriminator],d=i.value.get(s);return d&&(void 0!==s||"backward"!==n.direction)?d._zod.run(o,n):t.unionFallback||"backward"===n.direction?r(o,n):(o.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,options:Array.from(i.value.keys()).filter(e=>null!==i.value.get(e)),input:a,path:[t.discriminator],inst:e}),o)}}),r3=tc("$ZodIntersection",(e,t)=>{ro.init(e,t),e._zod.parse=(e,r)=>{let i=e.value,o=t.left._zod.run({value:i,issues:[]},r),n=t.right._zod.run({value:i,issues:[]},r);return o instanceof Promise||n instanceof Promise?Promise.all([o,n]).then(([t,r])=>r9(e,t,r)):r9(e,o,n)}});function r9(e,t,r){let i,o=new Map,n=new Map,a=(e,t)=>{let r;if("unrecognized_keys"!==e.code||e.path?.length)if("invalid_key"!==e.code||"record"!==e.origin||e.path?.length!==1)return!1;else{let t=String(e.path[0]);n.has(t)||n.set(t,e),r=[t]}else i??(i=e),r=e.keys;for(let e of r)o.has(e)||o.set(e,{}),o.get(e)[t]=!0;return!0};for(let r of t.issues)a(r,"l")||e.issues.push(r);for(let t of r.issues)a(t,"r")||e.issues.push(t);let s=[...o].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(s.length){let t=i?s.filter(e=>i.keys.includes(e)):[];for(let r of(t.length&&e.issues.push({...i,keys:t}),s))!t.includes(r)&&n.has(r)&&e.issues.push(n.get(r))}let d=function e(t,r){if(t===r||t instanceof Date&&r instanceof Date&&+t==+r)return{valid:!0,data:t};if(eL(t)&&eL(r)){let i=Object.keys(r),o=Object.keys(t).filter(e=>-1!==i.indexOf(e)),n={...t,...r};for(let i of(Object.prototype.hasOwnProperty.call(n,"__proto__")&&delete n.__proto__,o)){if("__proto__"===i)continue;let o=e(t[i],r[i]);if(!o.valid)return{valid:!1,mergeErrorPath:[i,...o.mergeErrorPath]};n[i]=o.data}return{valid:!0,data:n}}if(Array.isArray(t)&&Array.isArray(r)){if(t.length!==r.length)return{valid:!1,mergeErrorPath:[]};let i=[];for(let o=0;o{ro.init(e,t);let r=tu.memoizer;r?.attach(e),e._zod.parse=(i,o)=>{let n=i.value;if(!eL(n))return i.issues.push({expected:"record",code:"invalid_type",input:n,inst:e}),i;let a=[],s=t.keyType._zod.values;if(s&&!t.partial){let d;i.value=r?r.alloc(e,i,{},o):{};let c=new Set;for(let r of s)if("string"==typeof r||"number"==typeof r||"symbol"==typeof r){if(c.add("number"==typeof r?r.toString():r),"__proto__"===r)continue;let s=t.keyType._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(s.issues.length){i.issues.push({code:"invalid_key",origin:"record",issues:s.issues.map(e=>e9(e,o,tm())),input:r,path:[r],inst:e});continue}let d=s.value;if("__proto__"===d)continue;let l=t.valueType._zod.run({value:n[r],issues:[]},o);l instanceof Promise?a.push(l.then(e=>{e.issues.length&&i.issues.push(...e2(r,e.issues)),i.value[d]=e.value})):(l.issues.length&&i.issues.push(...e2(r,l.issues)),i.value[d]=l.value)}for(let e in n)if(!c.has(e))if("loose"===t.mode){if("__proto__"===e)continue;i.value[e]=n[e]}else(d=d??[]).push(e);d&&d.length>0&&i.issues.push({code:"unrecognized_keys",input:n,inst:e,keys:d,continue:!0})}else{let d;for(let c of(i.value=r?r.alloc(e,i,{},o):{},Reflect.ownKeys(n))){if("__proto__"===c||!Object.prototype.propertyIsEnumerable.call(n,c))continue;let r=t.keyType._zod.run({value:c,issues:[]},o);if(r instanceof Promise)throw Error("Async schemas not supported in object keys currently");if("string"==typeof c&&tL.test(c)&&r.issues.length){let e=t.keyType._zod.run({value:Number(c),issues:[]},o);if(e instanceof Promise)throw Error("Async schemas not supported in object keys currently");0===e.issues.length&&(r=e)}if(r.issues.length){"loose"===t.mode?i.value[c]=n[c]:s?(d=d??[]).push(c):i.issues.push({code:"invalid_key",origin:"record",issues:r.issues.map(e=>e9(e,o,tm())),input:c,path:[c],inst:e});continue}let l=r.value;if("__proto__"===l)continue;let p=t.valueType._zod.run({value:n[c],issues:[]},o);p instanceof Promise?a.push(p.then(e=>{e.issues.length&&i.issues.push(...e2(c,e.issues)),i.value[l]=e.value})):(p.issues.length&&i.issues.push(...e2(c,p.issues)),i.value[l]=p.value)}d&&d.length>0&&i.issues.push({code:"unrecognized_keys",input:n,inst:e,keys:d,continue:!0})}return a.length?Promise.all(a).then(()=>i):i}}),r8=tc("$ZodEnum",(e,t)=>{ro.init(e,t);let r=eP(t.entries),i=new Set(r);e._zod.values=i,tn(e,"pattern",e=>{let t=eP(e.def.entries).filter(e=>eH.has(typeof e));return new RegExp(t.length?`^(${t.map(e=>eG(e.toString())).join("|")})$`:"^[^\\s\\S]$")}),e._zod.parse=(t,o)=>{let n=t.value;return i.has(n)||t.issues.push({code:"invalid_value",values:r,input:n,inst:e}),t}}),r7=tc("$ZodLiteral",(e,t)=>{ro.init(e,t);let r=new Set(t.values);e._zod.values=r,tn(e,"pattern",e=>{let t=e.def.values;return new RegExp(t.length?`^(${t.map(e=>"string"==typeof e?eG(e):e?eG(e.toString()):String(e)).join("|")})$`:"^[^\\s\\S]$")}),e._zod.parse=(i,o)=>{let n=i.value;return r.has(n)||i.issues.push({code:"invalid_value",values:t.values,input:n,inst:e}),i}}),ie=tc("$ZodTransform",(e,t)=>{ro.init(e,t),e._zod.optin="optional",tu.memoizer?.guard(e),e._zod.parse=(r,i)=>{if("backward"===i.direction)throw new tp(e.constructor.name);let o=t.transform(r.value,r);if(i.async)return(o instanceof Promise?o:Promise.resolve(o)).then(e=>(r.value=e,r));if(o instanceof Promise)throw new tl;return r.value=o,r}});function it(e,t){return e.value=t.issues.length?void 0:t.value,e}let ir=tc("$ZodOptional",(e,t)=>{ro.init(e,t),tn(e,"optin",e=>"defaulted"===e.def.innerType._zod.optin?"defaulted":"optional"),e._zod.optout="optional",tn(e,"values",e=>{let t=e.def.innerType._zod.values;return t?new Set([...t,void 0]):void 0}),tn(e,"pattern",e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${ej(t.source)})?$`):void 0}),e._zod.parse=(e,r)=>{if(void 0===e.value){if("defaulted"!==t.innerType._zod.optin)return e;let i=t.innerType._zod.run({value:e.value,issues:[]},r);return i instanceof Promise?i.then(t=>it(e,t)):it(e,i)}return t.innerType._zod.run(e,r)}}),ii=tc("$ZodExactOptional",(e,t)=>{ir.init(e,t),tn(e,"values",e=>e.def.innerType._zod.values),tn(e,"pattern",e=>e.def.innerType._zod.pattern),e._zod.parse=(e,r)=>t.innerType._zod.run(e,r)}),io=tc("$ZodNullable",(e,t)=>{ro.init(e,t),tn(e,"optin",e=>e.def.innerType._zod.optin),tn(e,"optout",e=>e.def.innerType._zod.optout),tn(e,"pattern",e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${ej(t.source)}|null)$`):void 0}),tn(e,"values",e=>e.def.innerType._zod.values?new Set([...e.def.innerType._zod.values,null]):void 0),e._zod.parse=(e,r)=>null===e.value?e:t.innerType._zod.run(e,r)}),ia=tc("$ZodDefault",(e,t)=>{ro.init(e,t),e._zod.optin="defaulted",tn(e,"values",e=>e.def.innerType._zod.values),e._zod.parse=(e,r)=>{if("backward"===r.direction)return t.innerType._zod.run(e,r);if(void 0===e.value)return e.value=t.defaultValue,e;let i=t.innerType._zod.run(e,r);return i instanceof Promise?i.then(e=>is(e,t)):is(i,t)}});function is(e,t){return void 0===e.value&&(e.value=t.defaultValue),e}let id=tc("$ZodPrefault",(e,t)=>{ro.init(e,t),e._zod.optin="defaulted",tn(e,"values",e=>e.def.innerType._zod.values),e._zod.parse=(e,r)=>("backward"===r.direction||void 0===e.value&&(e.value=t.defaultValue),t.innerType._zod.run(e,r))}),ic=tc("$ZodNonOptional",(e,t)=>{ro.init(e,t),tn(e,"values",e=>{let t=e.def.innerType._zod.values;return t?new Set([...t].filter(e=>void 0!==e)):void 0}),e._zod.parse=(r,i)=>{let o=t.innerType._zod.run(r,i);return o instanceof Promise?o.then(t=>il(t,e)):il(o,e)}});function il(e,t){return e.issues.length||void 0!==e.value||e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}function ip(e,t,r,i){return t.issues.length?e.value=r.catchValue({...t,value:e.value,error:{issues:t.issues.map(e=>e9(e,i,tm()))},input:e.value}):(e.value=t.value,t.memo&&(e.memo=!0)),e}let iu=tc("$ZodCatch",(e,t)=>{ro.init(e,t),tn(e,"optin",e=>"defaulted"===e.def.innerType._zod.optin?"defaulted":"optional"),tn(e,"optout",e=>e.def.innerType._zod.optout),tn(e,"values",e=>e.def.innerType._zod.values),e._zod.parse=(e,r)=>{if("backward"===r.direction)return t.innerType._zod.run(e,r);let i=t.innerType._zod.run({value:e.value,issues:[]},r);return i instanceof Promise?i.then(i=>ip(e,i,t,r)):ip(e,i,t,r)}}),im=tc("$ZodPipe",(e,t)=>{ro.init(e,t),tn(e,"values",e=>e.def.in._zod.values),tn(e,"optin",e=>e.def.in._zod.optin),tn(e,"optout",e=>e.def.out._zod.optout),tn(e,"propValues",e=>e.def.in._zod.propValues),e._zod.parse=(e,r)=>{if("backward"===r.direction){let i=t.out._zod.run(e,r);return i instanceof Promise?i.then(e=>ih(e,t.in,r)):ih(i,t.in,r)}let i=t.in._zod.run(e,r);return i instanceof Promise?i.then(e=>ih(e,t.out,r)):ih(i,t.out,r)}});function ih(e,t,r){return e.issues.some(e=>"unrecognized_keys"!==e.code)?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}let iy=tc("$ZodPreprocess",(e,t)=>{im.init(e,t)}),ig=tc("$ZodReadonly",(e,t)=>{ro.init(e,t),tn(e,"propValues",e=>e.def.innerType._zod.propValues),tn(e,"values",e=>e.def.innerType._zod.values),tn(e,"optin",e=>e.def.innerType?._zod?.optin),tn(e,"optout",e=>e.def.innerType?._zod?.optout),e._zod.parse=(e,r)=>{if("backward"===r.direction)return t.innerType._zod.run(e,r);let i=t.innerType._zod.run(e,r);return i instanceof Promise?i.then(i_):i_(i)}});function i_(e){return e.memo||(e.value=Object.freeze(e.value)),e}let iv=tc("$ZodLazy",(e,t)=>{var r;let i;ro.init(e,t),r=e._zod,Object.defineProperty(r,"innerType",{get(){if(i!==eC)return void 0===i&&(i=eC,i=(()=>(t._cachedInner||(t._cachedInner=t.getter()),t._cachedInner))()),i},set(e){Object.defineProperty(r,"innerType",{value:e})},configurable:!0}),tn(e,"pattern",e=>e.innerType?._zod?.pattern),tn(e,"propValues",e=>e.innerType?._zod?.propValues),tn(e,"optin",e=>e.innerType?._zod?.optin??void 0),tn(e,"optout",e=>e.innerType?._zod?.optout??void 0),e._zod.parse=(t,r)=>e._zod.innerType._zod.run(t,r)}),ib=tc("$ZodCustom",(e,t)=>{tK.init(e,t),ro.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=r=>{let i=r.value,o=t.fn(i);if(o instanceof Promise)return o.then(t=>i$(t,r,i,e));i$(o,r,i,e)}});function i$(e,t,r,i){if(!e){let e={code:"custom",input:r,inst:i,path:[...i._zod.def.path??[]],continue:!i._zod.def.abort};i._zod.def.params&&(e.params=i._zod.def.params),t.issues.push(te(e))}}(ei=globalThis).__zod_globalRegistry??(ei.__zod_globalRegistry=new class e{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let r=t[0];return this._map.set(e,r),r&&"object"==typeof r&&"id"in r&&this._idmap.set(r.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&"object"==typeof t&&"id"in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let r={...this.get(t)??{}};delete r.id;let i={...r,...this._map.get(e)};return Object.keys(i).length?i:void 0}return this._map.get(e)}has(e){return this._map.has(e)}});let iS=globalThis.__zod_globalRegistry;function ik(e){return e.checks&&(e.checks=[...e.checks]),e}function iw(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...eK(t)})}function iR(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...eK(t)})}function iP(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...eK(t)})}function iV(e,t){return new e({type:"string",format:"date",check:"string_format",...eK(t)})}function iq(e,t){return new tQ({check:"less_than",...eK(t),value:e,inclusive:!1})}function iI(e,t){return new tQ({check:"less_than",...eK(t),value:e,inclusive:!0})}function ix(e,t){return new tX({check:"greater_than",...eK(t),value:e,inclusive:!1})}function ij(e,t){return new tX({check:"greater_than",...eK(t),value:e,inclusive:!0})}function iC(e,t){return new tY({check:"multiple_of",...eK(t),value:e})}function iT(e,t){return new t0({check:"max_length",...eK(t),maximum:e})}function iO(e,t){return new t2({check:"min_length",...eK(t),minimum:e})}function iE(e,t){return new t4({check:"length_equals",...eK(t),length:e})}function iA(e){return new rt({check:"overwrite",tx:e})}function iM(e,...t){for(let r of t)for(let t of Reflect.ownKeys(r))Object.prototype.propertyIsEnumerable.call(r,t)&&eT(e,t,r[t]);return e}function iW(e){let t=e?.target??"draft-2020-12";return"draft-4"===t&&(t="draft-04"),"draft-7"===t&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??iS,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:e?.cycles??"ref",reused:e?.reused??"inline",intersections:[],deferred:[],external:e?.external??void 0}}function iN(e,t,r,i,o){let n="function"==typeof t.unrepresentable?t.unrepresentable({zodSchema:e,path:i.path,message:o}):t.unrepresentable;if("any"===n)return!1;if(void 0===n||"throw"===n)throw Error(o);return Object.assign(r,n),!0}function iz(e,t,r={path:[],schemaPath:[]}){var i;let o=e._zod.def,n=t.seen.get(e);if(n)return n.count++,r.schemaPath.includes(e)&&(n.cycle=r.path),n.schema;let a={schema:{},count:1,cycle:void 0,path:r.path};t.seen.set(e,a),t.sharedDefsExtractedFor=void 0,t.sharedEmitDoneFor=void 0;let s=e._zod.toJSONSchema?.();if(s)a.schema=s;else{let i={...r,schemaPath:[...r.schemaPath,e],path:r.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,a.schema,i);else{let r=a.schema,n=t.processors[o.type];if(!n)throw Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);n(e,t,r,i)}let n=e._zod.parent;n&&(a.ref||(a.ref=n),iz(n,t,i),t.seen.get(n).isParent=!0)}let d=t.metadataRegistry.get(e);return d&&iM(a.schema,d),"input"===t.io&&function e(t,r){let i=r??{seen:new Set};if(i.seen.has(t))return!1;i.seen.add(t);let o=t._zod.def;if("transform"===o.type)return!0;if("array"===o.type)return e(o.element,i);if("set"===o.type)return e(o.valueType,i);if("lazy"===o.type)return e(o.getter(),i);if("promise"===o.type||"optional"===o.type||"nonoptional"===o.type||"nullable"===o.type||"readonly"===o.type||"default"===o.type||"prefault"===o.type||"catch"===o.type)return e(o.innerType,i);if("intersection"===o.type)return e(o.left,i)||e(o.right,i);if("record"===o.type||"map"===o.type)return e(o.keyType,i)||e(o.valueType,i);if("pipe"===o.type)return!!t._zod.traits.has("$ZodCodec")||e(o.in,i)||e(o.out,i);if("object"===o.type){for(let t in o.shape)if(e(o.shape[t],i))return!0;return!1}if("union"===o.type){for(let t of o.options)if(e(t,i))return!0;return!1}if("tuple"===o.type){for(let t of o.items)if(e(t,i))return!0;if(o.rest&&e(o.rest,i))return!0}return!1}(e)&&(delete a.schema.examples,delete a.schema.default),"input"===t.io&&"_prefault"in a.schema&&((i=a.schema).default??(i.default=a.schema._prefault)),delete a.schema._prefault,t.seen.get(e).schema}function iD(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function iF(e,t){let r=e.seen.get(t);if(!r)throw Error("Unprocessed schema. This is a bug in Zod.");if(e.external&&e.sharedDefsExtractedFor===e.external)return;let i=new Map;for(let t of e.seen.entries()){let r=e.metadataRegistry.get(t[0])?.id;if(r){let e=i.get(r);if(e&&e!==t[0])throw Error(`Duplicate schema id "${r}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);i.set(r,t[0])}}let o=t=>{if(t[1].schema.$ref)return;let i=t[1],{ref:o,defId:n}=(t=>{let i="draft-2020-12"===e.target?"$defs":"definitions";if(e.external){let r=e.external.registry.get(t[0])?.id,o=e.external.uri??(e=>e);if(r)return{ref:o(r)};let n=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=n,{defId:n,ref:`${o("__shared")}#/${i}/${iD(n)}`}}let o=`#/${i}/`;if(t[1]===r&&!t[1].schema.id)return{ref:"#"};let n=t[1].schema.id??`__schema${e.counter++}`;return{defId:n,ref:o+iD(n)}})(t);i.def={...i.schema},n&&(i.defId=n);let a=i.schema;for(let e in a)delete a[e];a.$ref=o};if("throw"===e.cycles)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join("/")}/ + `)}return o.write("payload.value = newResult;"),o.write("return payload;"),o.compile()})(t.shape)),l=r(l,p),c)?rY([],u,l,p,i,e,p?.abortEarly===!0):l:o(l,p):(l.issues.push({expected:"object",code:"invalid_type",input:u,inst:e}),l)}});function r2(e,t,r,i){for(let r of e)if(0===r.issues.length)return t.value=r.value,t;let o=e.filter(e=>!e0(e));return 1===o.length?(t.value=o[0].value,o[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(e=>e.issues.map(e=>e9(e,i,tm())))}),t)}let r4=tc("$ZodUnion",(e,t)=>{ro.init(e,t),tn(e,"optin",e=>e.def.options.some(e=>"defaulted"===e._zod.optin)?"defaulted":e.def.options.some(e=>void 0!==e._zod.optin)?"optional":void 0),tn(e,"optout",e=>e.def.options.some(e=>"optional"===e._zod.optout)?"optional":void 0),tn(e,"values",e=>{if(e.def.options.every(e=>e._zod.values))return new Set(e.def.options.flatMap(e=>Array.from(e._zod.values)))}),tn(e,"pattern",e=>{if(e.def.options.every(e=>e._zod.pattern)){let t=e.def.options.map(e=>e._zod.pattern);return RegExp(`^(${t.map(e=>ej(e.source)).join("|")})$`)}});let r=1===t.options.length?t.options[0]._zod.run:null;e._zod.parse=(i,o)=>{if(r)return r(i,o);let n=!1,a=[];for(let e of t.options){let t=e._zod.run({value:i.value,issues:[]},o);if(t instanceof Promise)a.push(t),n=!0;else{if(0===t.issues.length)return t;a.push(t)}}return n?Promise.all(a).then(t=>r2(t,i,e,o)):r2(a,i,e,o)}}),r6=tc("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,r4.init(e,t);let r=e._zod.parse;tn(e,"propValues",e=>{let t={},r=0;for(let i of e.def.options){let o=i._zod.propValues;if(!o||0===Object.keys(o).length)throw Error(`Invalid discriminated union option at index "${e.def.options.indexOf(i)}"`);for(let[i,n]of(o[e.def.discriminator]?.has(void 0)&&r++,Object.entries(o)))for(let e of(Object.prototype.hasOwnProperty.call(t,i)||eT(t,i,new Set),n))t[i].add(e)}return!e.def.unionFallback&&r>1&&t[e.def.discriminator]?.delete(void 0),t}),t.options.forEach((e,r)=>{let i=eO(e._zod.def);if(i&&!Object.prototype.hasOwnProperty.call(i,t.discriminator))throw Error(`Invalid discriminated union option at index "${r}"`)});let i=ex(()=>(function(e){let t=new Map;for(let r of e.options){let i=r._zod.propValues?.[e.discriminator];if(!i||0===i.size)throw Error(`Invalid discriminated union option at index "${e.options.indexOf(r)}"`);for(let e of i)if(t.has(e)){if(void 0!==e)throw Error(`Duplicate discriminator value "${String(e)}"`);t.set(e,null)}else t.set(e,r)}return t})(t));e._zod.parse=(o,n)=>{let a=o.value;if(!eD(a))return o.issues.push({code:"invalid_type",expected:"object",input:a,inst:e}),o;let s=a?.[t.discriminator],d=i.value.get(s);return d&&(void 0!==s||"backward"!==n.direction)?d._zod.run(o,n):t.unionFallback||"backward"===n.direction?r(o,n):(o.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,options:Array.from(i.value.keys()).filter(e=>null!==i.value.get(e)),input:a,path:[t.discriminator],inst:e}),o)}}),r3=tc("$ZodIntersection",(e,t)=>{ro.init(e,t),e._zod.parse=(e,r)=>{let i=e.value,o=t.left._zod.run({value:i,issues:[]},r),n=t.right._zod.run({value:i,issues:[]},r);return o instanceof Promise||n instanceof Promise?Promise.all([o,n]).then(([t,r])=>r9(e,t,r)):r9(e,o,n)}});function r9(e,t,r){let i,o=new Map,n=new Map,a=(e,t)=>{let r;if("unrecognized_keys"!==e.code||e.path?.length)if("invalid_key"!==e.code||"record"!==e.origin||e.path?.length!==1)return!1;else{let t=String(e.path[0]);n.has(t)||n.set(t,e),r=[t]}else i??(i=e),r=e.keys;for(let e of r)o.has(e)||o.set(e,{}),o.get(e)[t]=!0;return!0};for(let r of t.issues)a(r,"l")||e.issues.push(r);for(let t of r.issues)a(t,"r")||e.issues.push(t);let s=[...o].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(s.length){let t=i?s.filter(e=>i.keys.includes(e)):[];for(let r of(t.length&&e.issues.push({...i,keys:t}),s))!t.includes(r)&&n.has(r)&&e.issues.push(n.get(r))}let d=function e(t,r){if(t===r||t instanceof Date&&r instanceof Date&&+t==+r)return{valid:!0,data:t};if(eL(t)&&eL(r)){let i=Object.keys(r),o=Object.keys(t).filter(e=>-1!==i.indexOf(e)),n={...t,...r};for(let i of(Object.prototype.hasOwnProperty.call(n,"__proto__")&&delete n.__proto__,o)){if("__proto__"===i)continue;let o=e(t[i],r[i]);if(!o.valid)return{valid:!1,mergeErrorPath:[i,...o.mergeErrorPath]};n[i]=o.data}return{valid:!0,data:n}}if(Array.isArray(t)&&Array.isArray(r)){if(t.length!==r.length)return{valid:!1,mergeErrorPath:[]};let i=[];for(let o=0;o{ro.init(e,t);let r=tu.memoizer;r?.attach(e),e._zod.parse=(i,o)=>{let n=i.value;if(!eL(n))return i.issues.push({expected:"record",code:"invalid_type",input:n,inst:e}),i;let a=[],s=t.keyType._zod.values;if(s&&!t.partial){let d;i.value=r?r.alloc(e,i,{},o):{};let c=new Set;for(let r of s)if("string"==typeof r||"number"==typeof r||"symbol"==typeof r){if(c.add("number"==typeof r?r.toString():r),"__proto__"===r)continue;let s=t.keyType._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(s.issues.length){i.issues.push({code:"invalid_key",origin:"record",issues:s.issues.map(e=>e9(e,o,tm())),input:r,path:[r],inst:e});continue}let d=s.value;if("__proto__"===d)continue;let l=t.valueType._zod.run({value:n[r],issues:[]},o);l instanceof Promise?a.push(l.then(e=>{e.issues.length&&i.issues.push(...e2(r,e.issues)),i.value[d]=e.value})):(l.issues.length&&i.issues.push(...e2(r,l.issues)),i.value[d]=l.value)}for(let e in n)if(!c.has(e))if("loose"===t.mode){if("__proto__"===e)continue;i.value[e]=n[e]}else(d=d??[]).push(e);d&&d.length>0&&i.issues.push({code:"unrecognized_keys",input:n,inst:e,keys:d,continue:!0})}else{let d;for(let c of(i.value=r?r.alloc(e,i,{},o):{},Reflect.ownKeys(n))){if("__proto__"===c||!Object.prototype.propertyIsEnumerable.call(n,c))continue;let r=t.keyType._zod.run({value:c,issues:[]},o);if(r instanceof Promise)throw Error("Async schemas not supported in object keys currently");if("string"==typeof c&&tL.test(c)&&r.issues.length){let e=t.keyType._zod.run({value:Number(c),issues:[]},o);if(e instanceof Promise)throw Error("Async schemas not supported in object keys currently");0===e.issues.length&&(r=e)}if(r.issues.length){"loose"===t.mode?i.value[c]=n[c]:s?(d=d??[]).push(c):i.issues.push({code:"invalid_key",origin:"record",issues:r.issues.map(e=>e9(e,o,tm())),input:c,path:[c],inst:e});continue}let l=r.value;if("__proto__"===l)continue;let p=t.valueType._zod.run({value:n[c],issues:[]},o);p instanceof Promise?a.push(p.then(e=>{e.issues.length&&i.issues.push(...e2(c,e.issues)),i.value[l]=e.value})):(p.issues.length&&i.issues.push(...e2(c,p.issues)),i.value[l]=p.value)}d&&d.length>0&&i.issues.push({code:"unrecognized_keys",input:n,inst:e,keys:d,continue:!0})}return a.length?Promise.all(a).then(()=>i):i}}),r8=tc("$ZodEnum",(e,t)=>{ro.init(e,t);let r=eP(t.entries),i=new Set(r);e._zod.values=i,tn(e,"pattern",e=>{let t=eP(e.def.entries).filter(e=>eH.has(typeof e));return new RegExp(t.length?`^(${t.map(e=>eG(e.toString())).join("|")})$`:"^[^\\s\\S]$")}),e._zod.parse=(t,o)=>{let n=t.value;return i.has(n)||t.issues.push({code:"invalid_value",values:r,input:n,inst:e}),t}}),r7=tc("$ZodLiteral",(e,t)=>{ro.init(e,t);let r=new Set(t.values);e._zod.values=r,tn(e,"pattern",e=>{let t=e.def.values;return new RegExp(t.length?`^(${t.map(e=>"string"==typeof e?eG(e):e?eG(e.toString()):String(e)).join("|")})$`:"^[^\\s\\S]$")}),e._zod.parse=(i,o)=>{let n=i.value;return r.has(n)||i.issues.push({code:"invalid_value",values:t.values,input:n,inst:e}),i}}),ie=tc("$ZodTransform",(e,t)=>{ro.init(e,t),e._zod.optin="optional",tu.memoizer?.guard(e),e._zod.parse=(r,i)=>{if("backward"===i.direction)throw new tp(e.constructor.name);let o=t.transform(r.value,r);if(i.async)return(o instanceof Promise?o:Promise.resolve(o)).then(e=>(r.value=e,r));if(o instanceof Promise)throw new tl;return r.value=o,r}});function it(e,t){return e.value=t.issues.length?void 0:t.value,e}let ir=tc("$ZodOptional",(e,t)=>{ro.init(e,t),tn(e,"optin",e=>"defaulted"===e.def.innerType._zod.optin?"defaulted":"optional"),e._zod.optout="optional",tn(e,"values",e=>{let t=e.def.innerType._zod.values;return t?new Set([...t,void 0]):void 0}),tn(e,"pattern",e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${ej(t.source)})?$`):void 0}),e._zod.parse=(e,r)=>{if(void 0===e.value){if("defaulted"!==t.innerType._zod.optin)return e;let i=t.innerType._zod.run({value:e.value,issues:[]},r);return i instanceof Promise?i.then(t=>it(e,t)):it(e,i)}return t.innerType._zod.run(e,r)}}),ii=tc("$ZodExactOptional",(e,t)=>{ir.init(e,t),tn(e,"values",e=>e.def.innerType._zod.values),tn(e,"pattern",e=>e.def.innerType._zod.pattern),e._zod.parse=(e,r)=>t.innerType._zod.run(e,r)}),io=tc("$ZodNullable",(e,t)=>{ro.init(e,t),tn(e,"optin",e=>e.def.innerType._zod.optin),tn(e,"optout",e=>e.def.innerType._zod.optout),tn(e,"pattern",e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${ej(t.source)}|null)$`):void 0}),tn(e,"values",e=>e.def.innerType._zod.values?new Set([...e.def.innerType._zod.values,null]):void 0),e._zod.parse=(e,r)=>null===e.value?e:t.innerType._zod.run(e,r)}),ia=tc("$ZodDefault",(e,t)=>{ro.init(e,t),e._zod.optin="defaulted",tn(e,"values",e=>e.def.innerType._zod.values),e._zod.parse=(e,r)=>{if("backward"===r.direction)return t.innerType._zod.run(e,r);if(void 0===e.value)return e.value=t.defaultValue,e;let i=t.innerType._zod.run(e,r);return i instanceof Promise?i.then(e=>is(e,t)):is(i,t)}});function is(e,t){return void 0===e.value&&(e.value=t.defaultValue),e}let id=tc("$ZodPrefault",(e,t)=>{ro.init(e,t),e._zod.optin="defaulted",tn(e,"values",e=>e.def.innerType._zod.values),e._zod.parse=(e,r)=>("backward"===r.direction||void 0===e.value&&(e.value=t.defaultValue),t.innerType._zod.run(e,r))}),ic=tc("$ZodNonOptional",(e,t)=>{ro.init(e,t),tn(e,"values",e=>{let t=e.def.innerType._zod.values;return t?new Set([...t].filter(e=>void 0!==e)):void 0}),e._zod.parse=(r,i)=>{let o=t.innerType._zod.run(r,i);return o instanceof Promise?o.then(t=>il(t,e)):il(o,e)}});function il(e,t){return e.issues.length||void 0!==e.value||e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}function ip(e,t,r,i){return t.issues.length?e.value=r.catchValue({...t,value:e.value,error:{issues:t.issues.map(e=>e9(e,i,tm()))},input:e.value}):(e.value=t.value,t.memo&&(e.memo=!0)),e}let iu=tc("$ZodCatch",(e,t)=>{ro.init(e,t),tn(e,"optin",e=>"defaulted"===e.def.innerType._zod.optin?"defaulted":"optional"),tn(e,"optout",e=>e.def.innerType._zod.optout),tn(e,"values",e=>e.def.innerType._zod.values),e._zod.parse=(e,r)=>{if("backward"===r.direction)return t.innerType._zod.run(e,r);let i=t.innerType._zod.run({value:e.value,issues:[]},r);return i instanceof Promise?i.then(i=>ip(e,i,t,r)):ip(e,i,t,r)}}),im=tc("$ZodPipe",(e,t)=>{ro.init(e,t),tn(e,"values",e=>e.def.in._zod.values),tn(e,"optin",e=>e.def.in._zod.optin),tn(e,"optout",e=>e.def.out._zod.optout),tn(e,"propValues",e=>e.def.in._zod.propValues),e._zod.parse=(e,r)=>{if("backward"===r.direction){let i=t.out._zod.run(e,r);return i instanceof Promise?i.then(e=>ih(e,t.in,r)):ih(i,t.in,r)}let i=t.in._zod.run(e,r);return i instanceof Promise?i.then(e=>ih(e,t.out,r)):ih(i,t.out,r)}});function ih(e,t,r){return e.issues.some(e=>"unrecognized_keys"!==e.code)?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}let iy=tc("$ZodPreprocess",(e,t)=>{im.init(e,t)}),ig=tc("$ZodReadonly",(e,t)=>{ro.init(e,t),tn(e,"propValues",e=>e.def.innerType._zod.propValues),tn(e,"values",e=>e.def.innerType._zod.values),tn(e,"optin",e=>e.def.innerType?._zod?.optin),tn(e,"optout",e=>e.def.innerType?._zod?.optout),e._zod.parse=(e,r)=>{if("backward"===r.direction)return t.innerType._zod.run(e,r);let i=t.innerType._zod.run(e,r);return i instanceof Promise?i.then(i_):i_(i)}});function i_(e){return e.memo||(e.value=Object.freeze(e.value)),e}let iv=tc("$ZodLazy",(e,t)=>{var r;let i;ro.init(e,t),r=e._zod,Object.defineProperty(r,"innerType",{get(){if(i!==eC)return void 0===i&&(i=eC,i=(()=>(t._cachedInner||(t._cachedInner=t.getter()),t._cachedInner))()),i},set(e){Object.defineProperty(r,"innerType",{value:e})},configurable:!0}),tn(e,"pattern",e=>e.innerType?._zod?.pattern),tn(e,"propValues",e=>e.innerType?._zod?.propValues),tn(e,"optin",e=>e.innerType?._zod?.optin??void 0),tn(e,"optout",e=>e.innerType?._zod?.optout??void 0),e._zod.parse=(t,r)=>e._zod.innerType._zod.run(t,r)}),ib=tc("$ZodCustom",(e,t)=>{tK.init(e,t),ro.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=r=>{let i=r.value,o=t.fn(i);if(o instanceof Promise)return o.then(t=>i$(t,r,i,e));i$(o,r,i,e)}});function i$(e,t,r,i){if(!e){let e={code:"custom",input:r,inst:i,path:[...i._zod.def.path??[]],continue:!i._zod.def.abort};i._zod.def.params&&(e.params=i._zod.def.params),t.issues.push(te(e))}}(ei=globalThis).__zod_globalRegistry??(ei.__zod_globalRegistry=new class e{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let r=t[0];return this._map.set(e,r),r&&"object"==typeof r&&"id"in r&&this._idmap.set(r.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&"object"==typeof t&&"id"in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let r={...this.get(t)??{}};delete r.id;let i={...r,...this._map.get(e)};return Object.keys(i).length?i:void 0}return this._map.get(e)}has(e){return this._map.has(e)}});let iS=globalThis.__zod_globalRegistry;function ik(e){return e.checks&&(e.checks=[...e.checks]),e}function iw(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...eK(t)})}function iV(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...eK(t)})}function iP(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...eK(t)})}function iR(e,t){return new e({type:"string",format:"date",check:"string_format",...eK(t)})}function iq(e,t){return new tQ({check:"less_than",...eK(t),value:e,inclusive:!1})}function iI(e,t){return new tQ({check:"less_than",...eK(t),value:e,inclusive:!0})}function ix(e,t){return new tX({check:"greater_than",...eK(t),value:e,inclusive:!1})}function ij(e,t){return new tX({check:"greater_than",...eK(t),value:e,inclusive:!0})}function iC(e,t){return new tY({check:"multiple_of",...eK(t),value:e})}function iT(e,t){return new t0({check:"max_length",...eK(t),maximum:e})}function iO(e,t){return new t2({check:"min_length",...eK(t),minimum:e})}function iE(e,t){return new t4({check:"length_equals",...eK(t),length:e})}function iA(e){return new rt({check:"overwrite",tx:e})}function iW(e,...t){for(let r of t)for(let t of Reflect.ownKeys(r))Object.prototype.propertyIsEnumerable.call(r,t)&&eT(e,t,r[t]);return e}function iM(e){let t=e?.target??"draft-2020-12";return"draft-4"===t&&(t="draft-04"),"draft-7"===t&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??iS,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:e?.cycles??"ref",reused:e?.reused??"inline",intersections:[],deferred:[],external:e?.external??void 0}}function iN(e,t,r,i,o){let n="function"==typeof t.unrepresentable?t.unrepresentable({zodSchema:e,path:i.path,message:o}):t.unrepresentable;if("any"===n)return!1;if(void 0===n||"throw"===n)throw Error(o);return Object.assign(r,n),!0}function iz(e,t,r={path:[],schemaPath:[]}){var i;let o=e._zod.def,n=t.seen.get(e);if(n)return n.count++,r.schemaPath.includes(e)&&(n.cycle=r.path),n.schema;let a={schema:{},count:1,cycle:void 0,path:r.path};t.seen.set(e,a),t.sharedDefsExtractedFor=void 0,t.sharedEmitDoneFor=void 0;let s=e._zod.toJSONSchema?.();if(s)a.schema=s;else{let i={...r,schemaPath:[...r.schemaPath,e],path:r.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,a.schema,i);else{let r=a.schema,n=t.processors[o.type];if(!n)throw Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);n(e,t,r,i)}let n=e._zod.parent;n&&(a.ref||(a.ref=n),iz(n,t,i),t.seen.get(n).isParent=!0)}let d=t.metadataRegistry.get(e);return d&&iW(a.schema,d),"input"===t.io&&function e(t,r){let i=r??{seen:new Set};if(i.seen.has(t))return!1;i.seen.add(t);let o=t._zod.def;if("transform"===o.type)return!0;if("array"===o.type)return e(o.element,i);if("set"===o.type)return e(o.valueType,i);if("lazy"===o.type)return e(o.getter(),i);if("promise"===o.type||"optional"===o.type||"nonoptional"===o.type||"nullable"===o.type||"readonly"===o.type||"default"===o.type||"prefault"===o.type||"catch"===o.type)return e(o.innerType,i);if("intersection"===o.type)return e(o.left,i)||e(o.right,i);if("record"===o.type||"map"===o.type)return e(o.keyType,i)||e(o.valueType,i);if("pipe"===o.type)return!!t._zod.traits.has("$ZodCodec")||e(o.in,i)||e(o.out,i);if("object"===o.type){for(let t in o.shape)if(e(o.shape[t],i))return!0;return!1}if("union"===o.type){for(let t of o.options)if(e(t,i))return!0;return!1}if("tuple"===o.type){for(let t of o.items)if(e(t,i))return!0;if(o.rest&&e(o.rest,i))return!0}return!1}(e)&&(delete a.schema.examples,delete a.schema.default),"input"===t.io&&"_prefault"in a.schema&&((i=a.schema).default??(i.default=a.schema._prefault)),delete a.schema._prefault,t.seen.get(e).schema}function iD(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function iF(e,t){let r=e.seen.get(t);if(!r)throw Error("Unprocessed schema. This is a bug in Zod.");if(e.external&&e.sharedDefsExtractedFor===e.external)return;let i=new Map;for(let t of e.seen.entries()){let r=e.metadataRegistry.get(t[0])?.id;if(r){let e=i.get(r);if(e&&e!==t[0])throw Error(`Duplicate schema id "${r}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);i.set(r,t[0])}}let o=t=>{if(t[1].schema.$ref)return;let i=t[1],{ref:o,defId:n}=(t=>{let i="draft-2020-12"===e.target?"$defs":"definitions";if(e.external){let r=e.external.registry.get(t[0])?.id,o=e.external.uri??(e=>e);if(r)return{ref:o(r)};let n=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=n,{defId:n,ref:`${o("__shared")}#/${i}/${iD(n)}`}}let o=`#/${i}/`;if(t[1]===r&&!t[1].schema.id)return{ref:"#"};let n=t[1].schema.id??`__schema${e.counter++}`;return{defId:n,ref:o+iD(n)}})(t);i.def={...i.schema},n&&(i.defId=n);let a=i.schema;for(let e in a)delete a[e];a.$ref=o};if("throw"===e.cycles)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join("/")}/ -Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let r of e.seen.entries()){let i=r[1];if(t===r[0]){o(r);continue}if(e.external){let i=e.external.registry.get(r[0])?.id;if(t!==r[0]&&i){o(r);continue}}if(e.metadataRegistry.get(r[0])?.id||i.cycle){o(r);continue}i.count>1&&"ref"===e.reused&&o(r)}e.external&&(e.sharedDefsExtractedFor=e.external)}let iL=new Set(["type","properties","required","additionalProperties"]),iU=["oneOf","anyOf"];function iH(e){let t=e.additionalProperties;return void 0===t||!1===t||"object"!=typeof t||null===t?null:Object.keys(t).length?t:null}function iG(e){let t=[];for(let r of e){if("object"!=typeof r||"object"!==r.type)return null;for(let e in r)if(!iL.has(e))return null;t.push(r)}let r={},i=new Set;for(let e of t){for(let i in e.properties){if(Object.prototype.hasOwnProperty.call(r,i))continue;let e=[];for(let r of t){let t=r.properties?.[i]??iH(r);null!=t&&(e.some(e=>JSON.stringify(e)===JSON.stringify(t))||e.push(t))}eT(r,i,1===e.length?e[0]:iG(e)??{allOf:e})}for(let t of e.required??[])i.add(t)}let o={type:"object",properties:r};if(i.size&&(o.required=[...i]),t.every(e=>!1===e.additionalProperties))o.additionalProperties=!1;else{let e=[];for(let r of t){let t=iH(r);t&&!e.some(e=>JSON.stringify(e)===JSON.stringify(t))&&e.push(t)}1===e.length?o.additionalProperties=e[0]:e.length>1&&(o.additionalProperties={allOf:e})}return o}function iB(e,t){let r=e.seen.get(t);if(!r)throw Error("Unprocessed schema. This is a bug in Zod.");let i=t=>{let r=e.seen.get(t);if(null===r.ref)return;let o=r.def??r.schema,n={...o},a=r.ref;if(r.ref=null,a){i(a);let r=e.seen.get(a),s=r.schema;if(s.$ref&&("draft-07"===e.target||"draft-04"===e.target||"openapi-3.0"===e.target)?(o.allOf=o.allOf??[],o.allOf.push(s)):iM(o,s),iM(o,n),t._zod.parent===a)for(let e in o)"$ref"!==e&&"allOf"!==e&&(e in n||delete o[e]);if(s.$ref&&r.def)for(let e in o)"$ref"!==e&&"allOf"!==e&&e in r.def&&JSON.stringify(o[e])===JSON.stringify(r.def[e])&&delete o[e]}let s=t._zod.parent;if(s&&s!==a){i(s);let t=e.seen.get(s);if(t?.schema.$ref&&(o.$ref=t.schema.$ref,t.def))for(let e in o)"$ref"!==e&&"allOf"!==e&&e in t.def&&JSON.stringify(o[e])===JSON.stringify(t.def[e])&&delete o[e]}e.override({zodSchema:t,jsonSchema:o,path:r.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(let t of[...e.seen.entries()].reverse())i(t[0]);if("openapi-3.0"!==e.target)for(let t of e.seen.entries())!function e(t){let r=t.anyOf;if(!Array.isArray(r)||0===r.length||void 0!==t.type)return;let i=[];for(let t of r){if(!t||"object"!=typeof t)return;e(t);let r=Object.keys(t);if(1!==r.length||"type"!==r[0])return;let o=t.type;for(let e of Array.isArray(o)?o:[o]){if("string"!=typeof e)return;i.includes(e)||i.push(e)}}delete t.anyOf,t.type=1===i.length?i[0]:i}(t[1].def??t[1].schema);for(let t of e.deferred)t();if(e.intersections.length){let t=new Map;for(let r of e.seen.values())for(let e of[r.schema,r.def]){let r=e?.allOf;if(!Array.isArray(r))continue;let i=t.get(r);i?i.push(e):t.set(r,[e])}for(let r of e.intersections)for(let e of t.get(r)??[])!function(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let t of iL)if(t in e)return;let r=t.filter(e=>iU.some(t=>Array.isArray(e[t]))),i=null;if(r.length){let e=r[0],o=iU.find(t=>Array.isArray(e[t]));if(1!==Object.keys(e).length)return;let n=t.filter(t=>t!==e),a=e[o].map(e=>iG([...n,e]));if(a.some(e=>!e))return;i={[o]:a}}else i=iG(t);i&&(delete e.allOf,iM(e,i))}(e)}}let o={};if("draft-2020-12"===e.target?o.$schema="https://json-schema.org/draft/2020-12/schema":"draft-07"===e.target?o.$schema="http://json-schema.org/draft-07/schema#":"draft-04"===e.target?o.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){let r=e.external.registry.get(t)?.id;if(!r)throw Error("Schema is missing an `id` property");o.$id=e.external.uri(r)}iM(o,r.defId?r.schema:r.def??r.schema);let n=e.metadataRegistry.get(t)?.id;void 0!==n&&o.id===n&&delete o.id;let a=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,eT(a,e.defId,e.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(a).length>0&&("draft-2020-12"===e.target?o.$defs=a:o.definitions=a);try{let r=JSON.parse(JSON.stringify(o));return Object.defineProperty(r,"~standard",{value:{...t["~standard"],jsonSchema:{input:iK(t,"input",e.processors),output:iK(t,"output",e.processors)}},enumerable:!1,writable:!1}),r}catch(e){throw Error("Error converting schema to JSON.")}}let iK=(e,t,r={})=>i=>{let{libraryOptions:o,target:n}=i??{},a=iW({...o??{},target:n,io:t,processors:r});return iz(e,a),iF(a,e),iB(a,e)},iJ=(e,t,r)=>{(void 0===e[t]||r>e[t])&&(e[t]=r)},iZ=(e,t,r)=>{(void 0===e[t]||r{iJ(e,"minimum",t),iZ(e,"maximum",t)},iX=(e,t)=>{e.multipleOf??(e.multipleOf=[]),e.multipleOf.includes(t)||e.multipleOf.push(t)},iY=(e,t)=>{e.patterns??(e.patterns=new Set),e.patterns.add(t)},i1=(e,t)=>{e.mime=e.mime?e.mime.filter(e=>t.includes(e)):[...t]},i0=(e,t)=>{e.format=t,t.includes("int")&&(e.isInt=!0)},i2=(e,t)=>iJ(e,"minimum",t.minimum),i4=(e,t)=>iZ(e,"maximum",t.maximum),i6=e=>(t,r)=>{i0(t,r.format);let[i,o]=e[r.format];iJ(t,"minimum",i),iZ(t,"maximum",o)},i3={greater_than:(e,t)=>iJ(e,t.inclusive?"minimum":"exclusiveMinimum",t.value),less_than:(e,t)=>iZ(e,t.inclusive?"maximum":"exclusiveMaximum",t.value),multiple_of:(e,t)=>iX(e,t.value),number_format:i6(eZ),bigint_format:i6(eQ),min_length:i2,max_length:i4,length_equals:(e,t)=>iQ(e,t.length),min_size:i2,max_size:i4,size_equals:(e,t)=>iQ(e,t.size),string_format:(e,t)=>{i0(e,t.format),t.pattern&&iY(e,t.pattern),("base64"===t.format||"base64url"===t.format)&&(e.contentEncoding=t.format),(t.local||-1===t.precision)&&(e.laxFormat=!0)},mime_type:(e,t)=>i1(e,t.mime)};function i9(e){let t={},r=e._zod.def;for(let i of e._zod.traits.has("$ZodCheck")?[e,...r.checks??[]]:r.checks??[])i3[i._zod.def.check]?.(t,i._zod.def);let i=e._zod.bag;for(let e of(void 0!==i.minimum&&iJ(t,"minimum",i.minimum),void 0!==i.exclusiveMinimum&&iJ(t,"exclusiveMinimum",i.exclusiveMinimum),void 0!==i.maximum&&iZ(t,"maximum",i.maximum),void 0!==i.exclusiveMaximum&&iZ(t,"exclusiveMaximum",i.exclusiveMaximum),void 0!==i.multipleOf&&iX(t,i.multipleOf),void 0!==i.format&&(t.format??(t.format=i.format),i.format.includes("int")&&(t.isInt=!0)),i.mime&&i1(t,i.mime),i.patterns??[]))iY(t,e);return t}let i5={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},i8=new Map([[rO,/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/],[rA,/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/]]),i7=e=>i8.get(e)??e,oe=(e,t,r,i)=>{r.type="string";let{minimum:o,maximum:n,format:a,patterns:s,contentEncoding:d,laxFormat:c}=i9(e);if("number"==typeof o&&(r.minLength=o),"number"==typeof n&&(r.maxLength=n),a&&(r.format=i5[a]??a,""===r.format&&delete r.format,("time"===a||c)&&delete r.format),d&&(r.contentEncoding=d),s&&s.size>0){let e=[...s].map(i7);1===e.length?r.pattern=e[0].source:e.length>1&&(r.allOf=[...e.map(e=>({..."draft-07"===t.target||"draft-04"===t.target||"openapi-3.0"===t.target?{type:"string"}:{},pattern:e.source}))])}},ot=(e,t,r,i)=>{let{minimum:o,maximum:n,multipleOf:a,exclusiveMaximum:s,exclusiveMinimum:d,isInt:c}=i9(e);r.type=c?"integer":"number";let l="number"==typeof d&&d>=(o??-1/0),p="number"==typeof s&&s<=(n??1/0),u="draft-04"===t.target||"openapi-3.0"===t.target;if(l?u?(r.minimum=d,r.exclusiveMinimum=!0):r.exclusiveMinimum=d:"number"==typeof o&&(r.minimum=o),p?u?(r.maximum=s,r.exclusiveMaximum=!0):r.exclusiveMaximum=s:"number"==typeof n&&(r.maximum=n),a){let o=new Set;for(let n of a)Number.isFinite(n)&&0!==n?o.add(Math.abs(n)):iN(e,t,r,i,`A multipleOf divisor of ${n} cannot be represented in JSON Schema`);let[n,...s]=o;void 0!==n&&(r.multipleOf=n),s.length&&(r.allOf=[...r.allOf??[],...s.map(e=>({multipleOf:e}))])}},or=(e,t,r,i)=>{r.type="boolean"},oi=(e,t,r,i)=>{"openapi-3.0"===t.target?(r.type="string",r.nullable=!0,r.enum=[null]):r.type="null"},oo=(e,t,r,i)=>{r.not={}},on=(e,t,r,i)=>{},oa=(e,t,r,i)=>{},os=(e,t,r,i)=>{let o=eP(e._zod.def.entries);if(0===o.length){r.not={};return}o.every(e=>"number"==typeof e)&&(r.type="number"),o.every(e=>"string"==typeof e)&&(r.type="string"),r.enum=o},od=(e,t,r,i)=>{let o=e._zod.def;if(0===o.values.length){r.not={};return}let n=[];for(let a of o.values)if(void 0===a){if(iN(e,t,r,i,"Literal `undefined` cannot be represented in JSON Schema"))return}else if("bigint"==typeof a){if(iN(e,t,r,i,"BigInt literals cannot be represented in JSON Schema"))return;n.push(Number(a))}else n.push(a);if(0===n.length);else if(1===n.length){let e=n[0];r.type=null===e?"null":typeof e,"draft-04"===t.target||"openapi-3.0"===t.target?r.enum=[e]:r.const=e}else n.every(e=>"number"==typeof e)&&(r.type="number"),n.every(e=>"string"==typeof e)&&(r.type="string"),n.every(e=>"boolean"==typeof e)&&(r.type="boolean"),n.every(e=>null===e)&&(r.type="null"),r.enum=n},oc=(e,t,r,i)=>{iN(e,t,r,i,"Custom types cannot be represented in JSON Schema")},ol=(e,t,r,i)=>{iN(e,t,r,i,"Transforms cannot be represented in JSON Schema")},op=(e,t,r,i)=>{let o=e._zod.def,{minimum:n,maximum:a}=i9(e);"number"==typeof n&&(r.minItems=n),"number"==typeof a&&(r.maxItems=a),r.type="array",r.items=iz(o.element,t,{...i,path:[...i.path,"items"]})};function ou(e){let t=e._zod.def;return"pipe"===t.type&&t.in._zod.traits.has("$ZodTransform")?ou(t.out):"catch"===t.type?ou(t.innerType):e._zod.optin}let om=(e,t,r,i)=>{let o=e._zod.def,n=o.shape;if(Object.getOwnPropertySymbols(n).length&&iN(e,t,r,i,"Symbol keys cannot be represented in JSON Schema"))return;for(let e in r.type="object",r.properties={},n)eT(r.properties,e,iz(n[e],t,{...i,path:[...i.path,"properties",e]}));let a=[];for(let e of Object.keys(n)){let r=o.shape[e];("input"===t.io?void 0===ou(r):void 0===r._zod.optout)&&a.push(e)}a.length>0&&(r.required=a),o.catchall?._zod.def.type==="never"?r.additionalProperties=!1:o.catchall?o.catchall&&(r.additionalProperties=iz(o.catchall,t,{...i,path:[...i.path,"additionalProperties"]})):"output"===t.io&&(r.additionalProperties=!1)},of=(e,t,r,i)=>{let o=e._zod.def,n=!1===o.inclusive,a=o.options.map((e,r)=>iz(e,t,{...i,path:[...i.path,n?"oneOf":"anyOf",r]}));n?r.oneOf=a:r.anyOf=a},oh=(e,t,r,i)=>{let o=e._zod.def,n=iz(o.left,t,{...i,path:[...i.path,"allOf",0]}),a=iz(o.right,t,{...i,path:[...i.path,"allOf",1]}),s=e=>"allOf"in e&&1===Object.keys(e).length,d=[...s(n)?n.allOf:[n],...s(a)?a.allOf:[a]];r.allOf=d,t.intersections.push(d)},oy=new WeakMap,og=(e,t,r,i)=>{let o=e._zod.def;r.type="object";let n=o.keyType,a=i9(n).patterns;if("loose"===o.mode&&a&&a.size>0){let e=iz(o.valueType,t,{...i,path:[...i.path,"patternProperties","*"]});for(let t of(r.patternProperties={},a))eT(r.patternProperties,i7(t).source,e)}else{if("draft-07"===t.target||"draft-2020-12"===t.target){r.propertyNames=iz(o.keyType,t,{...i,path:[...i.path,"propertyNames"]});let n=oy.get(t);n||(n=[],oy.set(t,n),t.deferred.push(()=>(function(e){let t=new Map;for(let r of e.seen.values())r.def&&!t.has(r.schema)&&t.set(r.schema,r);let r=new Map;for(let i of oy.get(e)??[]){let o=e.seen.get(i),n=(o?.def??o?.schema)?.propertyNames;if(!n||!0===n||r.has(n))continue;let a=function e(t,r,i){if(r.$ref){if(i.has(r))return r;i.add(r);let o=t.get(r)?.def;if(!o)return r;let n=e(t,o,i);return n===o?r:n}for(let o of["anyOf","oneOf"]){let n=r[o];if(!Array.isArray(n))continue;let a=n.map(r=>e(t,r,i));a.some((e,t)=>e!==n[t])&&(r={...r,[o]:a})}let o=Array.isArray(r.type)?r.type:[r.type],n=!o.includes("string")&&o.some(e=>"number"===e||"integer"===e),a=r.enum??(void 0!==r.const?[r.const]:void 0);if(!n&&!a?.some(e=>"number"==typeof e))return r;let{minimum:s,maximum:d,exclusiveMinimum:c,exclusiveMaximum:l,multipleOf:p,format:u,id:m,...f}=r;return f.enum?f.enum=f.enum.map(e=>"number"==typeof e?String(e):e):"number"==typeof f.const&&(f.const=String(f.const)),n&&(f.type="string",a||(f.pattern=(o.includes("number")?tL:tF).source)),f}(t,n,new Set);a!==n&&r.set(n,a)}if(r.size)for(let t of e.seen.values())for(let e of[t.schema,t.def]){let t=e&&r.get(e.propertyNames);t&&(e.propertyNames=t)}})(t))),n.push(e)}r.additionalProperties=iz(o.valueType,t,{...i,path:[...i.path,"additionalProperties"]})}let s=n._zod.values,d="input"===t.io&&void 0!==ou(o.valueType);if(s&&!o.partial&&!d){let e=[...s].filter(e=>"string"==typeof e||"number"==typeof e);e.length>0&&(r.required=e.map(String))}},o_=(e,t,r,i)=>{let o=e._zod.def,n=iz(o.innerType,t,i),a=t.seen.get(e);"openapi-3.0"===t.target?(a.ref=o.innerType,r.nullable=!0):r.anyOf=[n,{type:"null"}]},ov=(e,t,r,i)=>{let o=e._zod.def;iz(o.innerType,t,i),t.seen.get(e).ref=o.innerType},ob=Symbol();function o$(e,t,r,i,o){let n=!1,a=JSON.stringify(e,(e,t)=>"bigint"!=typeof t?t:(n=!0,null));return n?(iN(t,r,i,o,"BigInt defaults cannot be represented in JSON Schema"),ob):JSON.parse(a)}let oS=(e,t,r,i)=>{let o=e._zod.def;iz(o.innerType,t,i),t.seen.get(e).ref=o.innerType;let n=o$(o.defaultValue,e,t,r,i);n!==ob&&(r.default=n)},ok=(e,t,r,i)=>{let o=e._zod.def;if(iz(o.innerType,t,i),t.seen.get(e).ref=o.innerType,"input"!==t.io)return;let n=o$(o.defaultValue,e,t,r,i);n!==ob&&(r._prefault=n)},ow=(e,t,r,i)=>{let o,n=e._zod.def;iz(n.innerType,t,i),t.seen.get(e).ref=n.innerType;try{o=n.catchValue(void 0)}catch{iN(e,t,r,i,"Dynamic catch values are not supported in JSON Schema");return}r.default=o},oR=(e,t,r,i)=>{let o=e._zod.def,n=o.in._zod.traits.has("$ZodTransform"),a="input"===t.io?n?o.out:o.in:o.out;iz(a,t,i),t.seen.get(e).ref=a},oP=(e,t,r,i)=>{let o=e._zod.def;iz(o.innerType,t,i),t.seen.get(e).ref=o.innerType,r.readOnly=!0},oV=(e,t,r,i)=>{let o=e._zod.def;iz(o.innerType,t,i),t.seen.get(e).ref=o.innerType},oq=(e,t,r,i)=>{let o=e._zod.innerType;iz(o,t,i),t.seen.get(e).ref=o},oI={string:oe,number:ot,boolean:or,bigint:(e,t,r,i)=>{iN(e,t,r,i,"BigInt cannot be represented in JSON Schema")},symbol:(e,t,r,i)=>{iN(e,t,r,i,"Symbols cannot be represented in JSON Schema")},null:oi,undefined:(e,t,r,i)=>{iN(e,t,r,i,"Undefined cannot be represented in JSON Schema")},void:(e,t,r,i)=>{iN(e,t,r,i,"Void cannot be represented in JSON Schema")},never:oo,any:on,unknown:oa,date:(e,t,r,i)=>{iN(e,t,r,i,"Date cannot be represented in JSON Schema")},enum:os,literal:od,nan:(e,t,r,i)=>{iN(e,t,r,i,"NaN cannot be represented in JSON Schema")},template_literal:(e,t,r,i)=>{let o=e._zod.pattern;if(!o)throw Error("Pattern not found in template literal");r.type="string",r.pattern=o.source},file:(e,t,r,i)=>{r.type="string",r.format="binary",r.contentEncoding="binary";let{minimum:o,maximum:n,mime:a}=i9(e);void 0!==o&&(r.minLength=o),void 0!==n&&(r.maxLength=n),a&&(0===a.length?r.not={}:1===a.length?r.contentMediaType=a[0]:r.anyOf=a.map(e=>({contentMediaType:e})))},success:(e,t,r,i)=>{r.type="boolean"},custom:oc,function:(e,t,r,i)=>{iN(e,t,r,i,"Function types cannot be represented in JSON Schema")},transform:ol,map:(e,t,r,i)=>{iN(e,t,r,i,"Map cannot be represented in JSON Schema")},set:(e,t,r,i)=>{iN(e,t,r,i,"Set cannot be represented in JSON Schema")},array:op,object:om,union:of,intersection:oh,tuple:(e,t,r,i)=>{let o=e._zod.def;r.type="array";let n="draft-2020-12"===t.target?"prefixItems":"items",a="draft-2020-12"===t.target||"openapi-3.0"===t.target?"items":"additionalItems",s=o.items.map((e,r)=>iz(e,t,{...i,path:[...i.path,n,r]})),d=o.rest?iz(o.rest,t,{...i,path:[...i.path,a,..."openapi-3.0"===t.target?[o.items.length]:[]]}):null,c=o.items.length;for(;c>0;){let e=o.items[c-1];if(!("input"===t.io?void 0!==ou(e):"optional"===e._zod.optout))break;c--}let l=o.items.length,p=!o.rest;"draft-2020-12"===t.target?(r.prefixItems=s,p?r.items=!1:d&&(r.items=d)):"openapi-3.0"===t.target?(r.items={anyOf:s},d&&r.items.anyOf.push(d)):(r.items=s,p?r.additionalItems=!1:d&&(r.additionalItems=d)),c>0&&(r.minItems=c),p&&(r.maxItems=l);let{minimum:u,maximum:m}=i9(e);"number"==typeof u&&(r.minItems=u),"number"==typeof m&&(r.maxItems=m)},record:og,nullable:o_,nonoptional:ov,default:oS,prefault:ok,catch:ow,pipe:oR,readonly:oP,promise:(e,t,r,i)=>{let o=e._zod.def;iz(o.innerType,t,i),t.seen.get(e).ref=o.innerType},optional:oV,lazy:oq};function ox(e,t){if("_idmap"in e){let r=iW({...t,processors:oI}),i={};for(let t of e._idmap.entries()){let[e,i]=t;iz(i,r)}let o={};for(let n of(r.external={registry:e,uri:t?.uri,defs:i},e._idmap.entries())){let[e,t]=n;iF(r,t),eT(o,e,iB(r,t))}return Object.keys(i).length>0&&(o.__shared={["draft-2020-12"===r.target?"$defs":"definitions"]:i}),{schemas:o}}let r=iW({...t,processors:oI});return iz(e,r),iF(r,e),iB(r,e)}let oj={get:function(){let e=this._zod;return e.message??(e.message=JSON.stringify(e.def,eq,2)),e.message},set:function(e){this._zod.message=e},enumerable:!0,configurable:!0},oC={value:void 0,enumerable:!1},oT=new WeakSet([Object.prototype,Error.prototype]),oO=(e,t)=>{e.name="$ZodError",oC.value=t,Object.defineProperty(e,"issues",oC),oC.value=void 0,Object.defineProperty(e,"message",oj);let r=Object.getPrototypeOf(e);oT.has(r)||(oT.add(r),Object.defineProperty(r,"toString",{configurable:!0,enumerable:!1,get(){let e=()=>this.message;return Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0})}}))},oE=tc("$ZodError",oO);function oA(e,t){return{callee:t?.callee??e,Err:t?.Err}}tc("$ZodError",oO,void 0,{Parent:Error});let oM=e=>{let t=(r,i,o,n)=>{let a=o?{...o,async:!1}:{async:!1},s=r._zod.run({value:i,issues:[]},a);if(s instanceof Promise)throw new tl;if(s.issues.length){let r=new(n?.Err??e)(s.issues.map(e=>e9(e,a,tm())));throw ez(r,n?.callee??t),r}return s.value};return t},oW=e=>{let t=async(r,i,o,n)=>{let a=o?{...o,async:!0}:{async:!0},s=r._zod.run({value:i,issues:[]},a);if(s instanceof Promise&&(s=await s),s.issues.length){let r=new(n?.Err??e)(s.issues.map(e=>e9(e,a,tm())));throw ez(r,n?.callee??t),r}return s.value};return t},oN=e=>(t,r,i)=>{let o=i?{...i,async:!1}:{async:!1},n=t._zod.run({value:r,issues:[]},o);if(n instanceof Promise)throw new tl;return n.issues.length?oz(e,n.issues,o):{success:!0,data:n.value}};function oz(e,t,r){let i;return{success:!1,get error(){return i||(i=new e(t.map(e=>e9(e,r,tm()))),t=void 0,r=void 0),i},set error(e){i=e,t=void 0,r=void 0}}}let oD=e=>async(t,r,i)=>{let o=i?{...i,async:!0}:{async:!0},n=t._zod.run({value:r,issues:[]},o);return n instanceof Promise&&(n=await n),n.issues.length?oz(e,n.issues,o):{success:!0,data:n.value}},oF=Symbol.for("zod.compile.invalid"),oL=Symbol.for("zod.compile.fallback"),oU=new WeakSet([Object.prototype,Error.prototype]);function oH(e,t,r){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){let e=r(this);return Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0})}})}let oG=tc("ZodError",(e,t)=>{oE.init(e,t),e.name="ZodError";let r=Object.getPrototypeOf(e);oU.has(r)||(oU.add(r),oH(r,"format",e=>t=>(function(e,t=e=>e.message){let r={_errors:[]},i=(e,o=[])=>{for(let n of e.issues)if("invalid_union"===n.code&&n.errors.length)n.errors.map(e=>i({issues:e},[...o,...n.path]));else if("invalid_key"===n.code)i({issues:n.issues},[...o,...n.path]);else if("invalid_element"===n.code)i({issues:n.issues},[...o,...n.path]);else{let e=[...o,...n.path];if(0===e.length)r._errors.push(t(n));else{let i=r,o=0;for(;ot=>(function(e,t=e=>e.message){let r={},i=[];for(let a of e.issues)if(a.path.length>0){var o,n;(o=a.path[0],n=()=>[],!Object.prototype.hasOwnProperty.call(r,o)&&("__proto__"===o?Object.defineProperty(r,o,{value:n(),writable:!0,enumerable:!0,configurable:!0}):r[o]=n()),r[o]).push(t(a))}else i.push(t(a));return{formErrors:i,fieldErrors:r}})(e,t)),oH(r,"addIssue",e=>t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,eq,2)}),oH(r,"addIssues",e=>t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,eq,2)}),Object.defineProperty(r,"isEmpty",{configurable:!0,enumerable:!1,get(){return 0===this.issues.length}}))},void 0,{Parent:Error}),oB=oM(oG),oK=oW(oG),oJ=oN(oG),oZ=oD(oG),oQ=(y=oM(oG),g=(e,t,r,i)=>y(e,t,r?{...r,direction:"backward"}:{direction:"backward"},oA(g,i))),oX=(_=oM(oG),v=(e,t,r,i)=>_(e,t,r,oA(v,i))),oY=(b=oW(oG),$=async(e,t,r,i)=>{let o=r?{...r,direction:"backward"}:{direction:"backward"};return await b(e,t,o,oA($,i))}),o1=(S=oW(oG),k=async(e,t,r,i)=>await S(e,t,r,oA(k,i))),o0=(e,t,r)=>{let i=r?{...r,direction:"backward"}:{direction:"backward"};return oN(oG)(e,t,i)},o2=(e,t,r)=>oN(oG)(e,t,r),o4=async(e,t,r)=>{let i=r?{...r,direction:"backward"}:{direction:"backward"};return oD(oG)(e,t,i)},o6=async(e,t,r)=>oD(oG)(e,t,r);function o3(){tu.memoizer||tm({memoizer:t$})}let o9=tc("ZodType",(e,t)=>(tu.localeError||tm({localeError:(()=>{let e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}},t={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",currency_code:"currency code",credit_card:"credit card number",iban:"IBAN",jwt:"JWT",template_literal:"input"},r={nan:"NaN"};function i(e,t){return"number"!==e||"number"!=typeof t||Number.isFinite(t)?r[e]??e:String(t)}return r=>{switch(r.code){case"invalid_type":{let e=i(r.expected),t=i(function(e){let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":if(null===e)return"null";if(Array.isArray(e))return"array";if(e&&Object.getPrototypeOf(e)!==Object.prototype&&"constructor"in e&&e.constructor)return e.constructor.name}return t}(r.input),r.input);return`Invalid input: expected ${e}, received ${t}`}case"invalid_value":if(1===r.values.length)return`Invalid input: expected ${eJ(r.values[0])}`;return`Invalid option: expected one of ${eV(r.values,"|")}`;case"too_big":{let t=r.exact?"exactly ":r.inclusive?"<=":"<",i=e[r.origin]??null;if(i)return`Too big: expected ${r.origin??"value"} to have ${t}${r.maximum.toString()} ${i.unit??"elements"}`;return`Too big: expected ${r.origin??"value"} to be ${t}${r.maximum.toString()}`}case"too_small":{let t=r.exact?"exactly ":r.inclusive?">=":">",i=e[r.origin]??null;if(i)return`Too small: expected ${r.origin} to have ${t}${r.minimum.toString()} ${i.unit}`;return`Too small: expected ${r.origin} to be ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Invalid string: must start with "${r.prefix}"`;if("ends_with"===r.format)return`Invalid string: must end with "${r.suffix}"`;if("includes"===r.format)return`Invalid string: must include "${r.includes}"`;if("regex"===r.format)return`Invalid string: must match pattern ${r.pattern}`;return`Invalid ${t[r.format]??r.format}`;case"not_multiple_of":return`Invalid number: must be a multiple of ${r.divisor}`;case"unrecognized_keys":return`Unrecognized key${r.keys.length>1?"s":""}: ${eV(r.keys,", ")}`;case"invalid_key":return`Invalid key in ${r.origin}`;case"invalid_union":if(r.options&&Array.isArray(r.options)&&r.options.length>0){let e=r.options.map(e=>`'${e}'`).join(" | ");return`Invalid discriminator value. Expected ${e}`}if(!1===r.inclusive)return"Invalid input: more than one option matched";return"Invalid input";case"invalid_element":return`Invalid value in ${r.origin}`;default:return"Invalid input"}}})()}),ro.init(e,t),e.def=t,e.type=t.type,e),{check(...e){let t=this.def;return this.clone(eN(t,{checks:[...t.checks??[],...e.map(e=>"function"==typeof e?{_zod:{check:e,def:{check:"custom"},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return eB(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(function(e,t={}){return new as({type:"custom",check:"custom",fn:e,...eK(t)})}(e,t))},superRefine(e,t){return this.check(function(e,t){var r;let i,o;return r=t=>(t.addIssue=e=>{"string"==typeof e?t.issues.push(te(e,t.value,i._zod.def)):(e.fatal&&(e.continue=!1),e.code??(e.code="custom"),"input"in e||(e.input=t.value),e.inst??(e.inst=i),e.continue??(e.continue=!i._zod.def.abort),t.issues.push(te(e)))},e(t.value,t)),(o=new tK({check:"custom",...eK(t)}))._zod.check=r,i=o}(e,t))},overwrite(e){return this.check(iA(e))},optional(){return n4(this)},exactOptional(){var e;return e=this,new n6({type:"optional",innerType:e})},nullable(){return n9(this)},nullish(){return n4(n9(this))},nonoptional(e){var t;return t=this,new n7({type:"nonoptional",innerType:t,...eK(e)})},array(){return nW(this)},or(e){return nL([this,e])},and(e){return nB(this,e)},transform(e){return ar(this,n0(e))},default(e){var t,r;return t=this,r=e,new n5({type:"default",innerType:t,get defaultValue(){return"function"==typeof r?r():eU(r)}})},prefault(e){var t,r;return t=this,r=e,new n8({type:"prefault",innerType:t,get defaultValue(){return"function"==typeof r?r():eU(r)}})},catch(e){return function(e,t){let r;return new ae({type:"catch",innerType:e,catchValue:"function"==typeof t?t:((r=()=>t)["~constantCatch"]=!0,r)})}(this,e)},pipe(e){return ar(this,e)},readonly(){var e;return e=this,new ao({type:"readonly",innerType:e})},describe(e){let t=this.clone();return iS.add(t,{description:e}),t},meta(...e){if(0===e.length)return iS.get(this);let t=this.clone();return iS.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return 0===t.length?e(this):e(this,...t)},get"~standard"(){return tt(this,"~standard",{...ra(this),jsonSchema:{input:iK(this,"input"),output:iK(this,"output")}},!1)},set"~standard"(e){tt(this,"~standard",e)},parse:function e(t,r){return oB(this,t,r,{callee:e})},parseAsync:async function e(t,r){return await oK(this,t,r,{callee:e})},safeParse(e,t){return oJ(this,e,t)},async safeParseAsync(e,t){return oZ(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){tt(this,"spa",e)},validate(e,t){let r=this._zod.bag.validator;if(void 0!==r){if(r(e)!==oF)return!0;if(!0===r.definite&&void 0===t)return!1}return function(e,t,r){let i,o=r?{...r,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},n=e._zod.bag.fallbackRun;if(n?(o[oL]=!0,i=n({value:t,issues:[]},o)):i=e._zod.run({value:t,issues:[]},o),i instanceof Promise)throw new tl;return 0===i.issues.length}(this,e,t)},validateAsync(e,t){return(async(e,t,r)=>{let i=r?{...r,async:!0,abortEarly:!0}:{async:!0,abortEarly:!0},o=e._zod.run({value:t,issues:[]},i);return o instanceof Promise&&(o=await o),0===o.issues.length})(this,e,t)},encode:function e(t,r){return oQ(this,t,r,{callee:e})},decode:function e(t,r){return oX(this,t,r,{callee:e})},encodeAsync:async function e(t,r){return await oY(this,t,r,{callee:e})},decodeAsync:async function e(t,r){return await o1(this,t,r,{callee:e})},safeEncode(e,t){return o0(this,e,t)},safeDecode(e,t){return o2(this,e,t)},async safeEncodeAsync(e,t){return o4(this,e,t)},async safeDecodeAsync(e,t){return o6(this,e,t)},toJSONSchema(e){return((e,t={})=>r=>{let i=iW({...r,processors:t});return iz(e,i),iF(i,e),iB(i,e)})(this,{})(e)},get description(){return iS.get(this)?.description},get _def(){return this._zod.def}}),o5=tc("_ZodString",(e,t)=>{rs.init(e,t),o9.init(e,t),e._zod.processJSONSchema=(t,r,i)=>oe(e,t,r,i)},tr({format:e=>i9(e).format??null,minLength:e=>i9(e).minimum??null,maxLength:e=>i9(e).maximum??null},{regex(...e){return this.check(function(e,t){return new t3({check:"string_format",format:"regex",...eK(t),pattern:e})}(...e))},includes(...e){return this.check(function(e,t){return new t8({check:"string_format",format:"includes",...eK(t),includes:e})}(...e))},startsWith(...e){return this.check(function(e,t){return new t7({check:"string_format",format:"starts_with",...eK(t),prefix:e})}(...e))},endsWith(...e){return this.check(function(e,t){return new re({check:"string_format",format:"ends_with",...eK(t),suffix:e})}(...e))},min(...e){return this.check(iO(...e))},max(...e){return this.check(iT(...e))},length(...e){return this.check(iE(...e))},nonempty(...e){return this.check(iO(1,...e))},lowercase(e){return this.check(new t9({check:"string_format",format:"lowercase",...eK(e)}))},uppercase(e){return this.check(new t5({check:"string_format",format:"uppercase",...eK(e)}))},trim(){return this.check(iA(e=>e.trim()))},normalize(...e){return this.check(function(e){return iA(t=>t.normalize(e))}(...e))},toLowerCase(){return this.check(iA(e=>e.toLowerCase()))},toUpperCase(){return this.check(iA(e=>e.toUpperCase()))},slugify(){return this.check(iA(e=>e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")))}})),o8=tc("ZodString",(e,t)=>{rs.init(e,t),o5.init(e,t)},{email(e){return this.check(iw(nn,e))},url(e){return this.check(iR(nd,e))},jwt(e){return this.check(new nk({type:"string",format:"jwt",check:"string_format",abort:!1,...eK(e)}))},emoji(e){return this.check(new nc({type:"string",format:"emoji",check:"string_format",abort:!1,...eK(e)}))},guid(e){return this.check(new na({type:"string",format:"guid",check:"string_format",abort:!1,...eK(e)}))},uuid(e){return this.check(new ns({type:"string",format:"uuid",check:"string_format",abort:!1,...eK(e)}))},uuidv4(e){return this.check(new ns({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...eK(e)}))},uuidv6(e){return this.check(new ns({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...eK(e)}))},uuidv7(e){return this.check(new ns({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...eK(e)}))},nanoid(e){return this.check(new nl({type:"string",format:"nanoid",check:"string_format",abort:!1,...eK(e)}))},cuid(e){return this.check(new np({type:"string",format:"cuid",check:"string_format",abort:!1,...eK(e)}))},cuid2(e){return this.check(new nu({type:"string",format:"cuid2",check:"string_format",abort:!1,...eK(e)}))},ulid(e){return this.check(new nm({type:"string",format:"ulid",check:"string_format",abort:!1,...eK(e)}))},base64(e){return this.check(new nb({type:"string",format:"base64",check:"string_format",abort:!1,...eK(e)}))},base64url(e){return this.check(new n$({type:"string",format:"base64url",check:"string_format",abort:!1,...eK(e)}))},xid(e){return this.check(new nf({type:"string",format:"xid",check:"string_format",abort:!1,...eK(e)}))},ksuid(e){return this.check(new nh({type:"string",format:"ksuid",check:"string_format",abort:!1,...eK(e)}))},ipv4(e){return this.check(new ny({type:"string",format:"ipv4",check:"string_format",abort:!1,...eK(e)}))},ipv6(e){return this.check(new ng({type:"string",format:"ipv6",check:"string_format",abort:!1,...eK(e)}))},cidrv4(e){return this.check(new n_({type:"string",format:"cidrv4",check:"string_format",abort:!1,...eK(e)}))},cidrv6(e){return this.check(new nv({type:"string",format:"cidrv6",check:"string_format",abort:!1,...eK(e)}))},e164(e){return this.check(new nS({type:"string",format:"e164",check:"string_format",abort:!1,...eK(e)}))},datetime(e){return this.check(iP(nt,e))},date(e){return this.check(iV(nr,e))},time(e){return this.check(new ni({type:"string",format:"time",check:"string_format",precision:null,...eK(e)}))},duration(e){return this.check(new no({type:"string",format:"duration",check:"string_format",...eK(e)}))}});function o7(e){return new o8(ik({type:"string",...eK(e)}))}let ne=tc("ZodStringFormat",(e,t)=>{rd.init(e,t),o5.init(e,t)}),nt=tc("ZodISODateTime",(e,t)=>{rk.init(e,t),ne.init(e,t)}),nr=tc("ZodISODate",(e,t)=>{rw.init(e,t),ne.init(e,t)}),ni=tc("ZodISOTime",(e,t)=>{rR.init(e,t),ne.init(e,t)}),no=tc("ZodISODuration",(e,t)=>{rP.init(e,t),ne.init(e,t)}),nn=tc("ZodEmail",(e,t)=>{rp.init(e,t),ne.init(e,t)}),na=tc("ZodGUID",(e,t)=>{rc.init(e,t),ne.init(e,t)}),ns=tc("ZodUUID",(e,t)=>{rl.init(e,t),ne.init(e,t)}),nd=tc("ZodURL",(e,t)=>{rh.init(e,t),ne.init(e,t)}),nc=tc("ZodEmoji",(e,t)=>{ry.init(e,t),ne.init(e,t)}),nl=tc("ZodNanoID",(e,t)=>{rg.init(e,t),ne.init(e,t)}),np=tc("ZodCUID",(e,t)=>{r_.init(e,t),ne.init(e,t)}),nu=tc("ZodCUID2",(e,t)=>{rv.init(e,t),ne.init(e,t)}),nm=tc("ZodULID",(e,t)=>{rb.init(e,t),ne.init(e,t)}),nf=tc("ZodXID",(e,t)=>{r$.init(e,t),ne.init(e,t)}),nh=tc("ZodKSUID",(e,t)=>{rS.init(e,t),ne.init(e,t)}),ny=tc("ZodIPv4",(e,t)=>{rV.init(e,t),ne.init(e,t)}),ng=tc("ZodIPv6",(e,t)=>{rx.init(e,t),ne.init(e,t)}),n_=tc("ZodCIDRv4",(e,t)=>{rj.init(e,t),ne.init(e,t)}),nv=tc("ZodCIDRv6",(e,t)=>{rC.init(e,t),ne.init(e,t)}),nb=tc("ZodBase64",(e,t)=>{rE.init(e,t),ne.init(e,t)}),n$=tc("ZodBase64URL",(e,t)=>{rM.init(e,t),ne.init(e,t)}),nS=tc("ZodE164",(e,t)=>{rW.init(e,t),ne.init(e,t)}),nk=tc("ZodJWT",(e,t)=>{rN.init(e,t),ne.init(e,t)}),nw=tc("ZodNumber",(e,t)=>{rz.init(e,t),o9.init(e,t),e._zod.processJSONSchema=(t,r,i)=>ot(e,t,r,i),e.isFinite=!0},tr({minValue:e=>{let{minimum:t,exclusiveMinimum:r}=i9(e);return Math.max(t??-1/0,r??-1/0)},maxValue:e=>{let{maximum:t,exclusiveMaximum:r}=i9(e);return Math.min(t??1/0,r??1/0)},isInt:e=>{let{isInt:t,multipleOf:r}=i9(e);return!!t||!!r?.some(Number.isSafeInteger)},format:e=>i9(e).format??null},{gt(e,t){return this.check(ix(e,t))},gte(e,t){return this.check(ij(e,t))},min(e,t){return this.check(ij(e,t))},lt(e,t){return this.check(iq(e,t))},lte(e,t){return this.check(iI(e,t))},max(e,t){return this.check(iI(e,t))},int(e){return this.check(nV(e))},safe(e){return this.check(nV(e))},positive(e){return this.check(ix(0,e))},nonnegative(e){return this.check(ij(0,e))},negative(e){return this.check(iq(0,e))},nonpositive(e){return this.check(iI(0,e))},multipleOf(e,t){return this.check(iC(e,t))},step(e,t){return this.check(iC(e,t))},finite(){return this}}));function nR(e){return new nw(ik({type:"number",checks:[],...eK(e)}))}let nP=tc("ZodNumberFormat",(e,t)=>{rD.init(e,t),nw.init(e,t)});function nV(e){return new nP({type:"number",check:"number_format",abort:!1,format:"safeint",...eK(e)})}let nq=tc("ZodBoolean",(e,t)=>{rF.init(e,t),o9.init(e,t),e._zod.processJSONSchema=(t,r,i)=>or(e,t,r,i)});function nI(e){return new nq({type:"boolean",...eK(e)})}let nx=tc("ZodNull",(e,t)=>{rL.init(e,t),o9.init(e,t),e._zod.processJSONSchema=(t,r,i)=>oi(e,t,r,i)});function nj(e){return new nx({type:"null",...eK(e)})}let nC=tc("ZodAny",(e,t)=>{rU.init(e,t),o9.init(e,t),e._zod.processJSONSchema=(t,r,i)=>on(e,t,r,i)});function nT(){return new nC({type:"any"})}let nO=tc("ZodUnknown",(e,t)=>{rH.init(e,t),o9.init(e,t),e._zod.processJSONSchema=(t,r,i)=>oa(e,t,r,i)});function nE(){return new nO({type:"unknown"})}let nA=tc("ZodNever",(e,t)=>{rG.init(e,t),o9.init(e,t),e._zod.processJSONSchema=(t,r,i)=>oo(e,t,r,i)}),nM=tc("ZodArray",(e,t)=>{o3(),rJ.init(e,t),o9.init(e,t),e._zod.processJSONSchema=(t,r,i)=>op(e,t,r,i),e.element=t.element},{min(e,t){return this.check(iO(e,t))},nonempty(e){return this.check(iO(1,e))},max(e,t){return this.check(iT(e,t))},length(e,t){return this.check(iE(e,t))},unwrap(){return this.element}});function nW(e,t){return new nM({type:"array",element:e,...eK(t)})}let nN=tc("ZodObject",(e,t)=>{var r;let i,o;o3(),r0.init(e,t),o9.init(e,t),e._zod.processJSONSchema=(t,r,i)=>om(e,t,r,i),r="shape",(o=r in(i=Object.getPrototypeOf(e))?void 0:i)&&Object.defineProperty(o,r,{configurable:!0,get(){let e={configurable:!0,writable:!0,enumerable:!1,value:void 0};return Object.defineProperty(this,r,e),e.value=(e=>e._zod.def.shape)(this),Object.defineProperty(this,r,e),e.value},set(e){Object.defineProperty(this,r,{configurable:!0,writable:!0,enumerable:!1,value:e})}})},{keyof(){return nQ(Object.keys(this._zod.def.shape))},catchall(e){return this.clone(eN(this._zod.def,{catchall:e}))},passthrough(){return this.clone(eN(this._zod.def,{catchall:nE()}))},loose(){return this.clone(eN(this._zod.def,{catchall:nE()}))},strict(){return this.clone(eN(this._zod.def,{catchall:new nA({type:"never",...eK(void 0)})}))},strip(){return this.clone(eN(this._zod.def,{catchall:void 0}))},extend(e){if(!eL(e))throw Error("Invalid input to extend: expected a plain object");let t=this._zod.def.checks;if(t&&t.length>0){let t=eE(this);for(let r of Reflect.ownKeys(e))if(void 0!==Object.getOwnPropertyDescriptor(t,r))throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return eB(this,eN(this._zod.def,{shape:eY(this,e)}))},safeExtend(e){if(!eL(e))throw Error("Invalid input to safeExtend: expected a plain object");return eB(this,eN(this._zod.def,{shape:eY(this,e)}))},merge(e){if(!e?._zod?.def)throw Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(this._zod.def.checks?.length)throw Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let t={};return eW(t,this,Reflect.ownKeys(eE(this))),eW(t,e,Reflect.ownKeys(eE(e))),eB(this,eN(this._zod.def,{shape:t,get catchall(){return e._zod.def.catchall},checks:e._zod.def.checks??[]}))},pick(e){return function(e,t){let r=e._zod.def,i=r.checks;if(i&&i.length>0)throw Error(".pick() cannot be used on object schemas containing refinements");let o={};return eW(o,e,eX(e,t)),eB(e,eN(r,{shape:o,checks:[]}))}(this,e)},omit(e){return function(e,t){let r=e._zod.def,i=r.checks;if(i&&i.length>0)throw Error(".omit() cannot be used on object schemas containing refinements");let o=new Set(eX(e,t)),n={};return eW(n,e,Reflect.ownKeys(eE(e)).filter(e=>!o.has(e))),eB(e,eN(r,{shape:n,checks:[]}))}(this,e)},partial(...e){return e1(n2,this,e[0])},exactPartial(...e){return e1(n6,this,e[0],"exactPartial")},required(...e){var t;let r,i;return r=(t=e[0])?new Set(eX(this,t)):void 0,eW(i={},this,Reflect.ownKeys(eE(this)),(e,t)=>r&&!r.has(t)?e:new n7({type:"nonoptional",innerType:e})),eB(this,eN(this._zod.def,{shape:i}))}});function nz(e,t){return new nN({type:"object",shape:e??{},...eK(t)})}function nD(e,t){return new nN({type:"object",shape:e,catchall:nE(),...eK(t)})}let nF=tc("ZodUnion",(e,t)=>{r4.init(e,t),o9.init(e,t),e._zod.processJSONSchema=(t,r,i)=>of(e,t,r,i),e.options=t.options});function nL(e,t){return new nF({type:"union",options:e,...eK(t)})}let nU=tc("ZodDiscriminatedUnion",(e,t)=>{nF.init(e,t),r6.init(e,t)});function nH(e,t,r){return new nU({type:"union",options:t,discriminator:e,...eK(r)})}let nG=tc("ZodIntersection",(e,t)=>{r3.init(e,t),o9.init(e,t),e._zod.processJSONSchema=(t,r,i)=>oh(e,t,r,i)});function nB(e,t){return new nG({type:"intersection",left:e,right:t})}let nK=tc("ZodRecord",(e,t)=>{o3(),r5.init(e,t),o9.init(e,t),e._zod.processJSONSchema=(t,r,i)=>og(e,t,r,i),e.keyType=t.keyType,e.valueType=t.valueType});function nJ(e,t,r){return new nK(t&&t._zod?{type:"record",keyType:e,valueType:t,...eK(r)}:{type:"record",keyType:o7(),valueType:e,...eK(t)})}let nZ=tc("ZodEnum",(e,t)=>{r8.init(e,t),o9.init(e,t),e._zod.processJSONSchema=(t,r,i)=>os(e,t,r,i),e.enum=t.entries,e.options=[...e._zod.values];let r=new Set(Object.keys(t.entries));e.extract=(e,i)=>{let o={};for(let i of e)if(r.has(i))o[i]=t.entries[i];else throw Error(`Key ${i} not found in enum`);return new nZ({...t,checks:[],...eK(i),entries:o})},e.exclude=(e,i)=>{let o={...t.entries};for(let t of e)if(r.has(t))delete o[t];else throw Error(`Key ${t} not found in enum`);return new nZ({...t,checks:[],...eK(i),entries:o})}});function nQ(e,t){return new nZ({type:"enum",entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...eK(t)})}let nX=tc("ZodLiteral",(e,t)=>{r7.init(e,t),o9.init(e,t),e._zod.processJSONSchema=(t,r,i)=>od(e,t,r,i),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function nY(e,t){return new nX({type:"literal",values:Array.isArray(e)?e:[e],...eK(t)})}let n1=tc("ZodTransform",(e,t)=>{o3(),ie.init(e,t),o9.init(e,t),e._zod.processJSONSchema=(t,r,i)=>ol(e,t,r,i),e._zod.parse=(r,i)=>{if("backward"===i.direction)throw new tp(e.constructor.name);r.addIssue=i=>{"string"==typeof i?r.issues.push(te(i,r.value,t)):(i.fatal&&(i.continue=!1),i.code??(i.code="custom"),"input"in i||(i.input=r.value),i.inst??(i.inst=e),r.issues.push(te(i)))};let o=t.transform(r.value,r);return o instanceof Promise?o.then(e=>(r.value=e,r)):(r.value=o,r)}});function n0(e){return new n1({type:"transform",transform:e})}let n2=tc("ZodOptional",(e,t)=>{ir.init(e,t),o9.init(e,t),e._zod.processJSONSchema=(t,r,i)=>oV(e,t,r,i),e.unwrap=()=>e._zod.def.innerType});function n4(e){return new n2({type:"optional",innerType:e})}let n6=tc("ZodExactOptional",(e,t)=>{ii.init(e,t),o9.init(e,t),e._zod.processJSONSchema=(t,r,i)=>oV(e,t,r,i),e.unwrap=()=>e._zod.def.innerType}),n3=tc("ZodNullable",(e,t)=>{io.init(e,t),o9.init(e,t),e._zod.processJSONSchema=(t,r,i)=>o_(e,t,r,i),e.unwrap=()=>e._zod.def.innerType});function n9(e){return new n3({type:"nullable",innerType:e})}let n5=tc("ZodDefault",(e,t)=>{ia.init(e,t),o9.init(e,t),e._zod.processJSONSchema=(t,r,i)=>oS(e,t,r,i),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap}),n8=tc("ZodPrefault",(e,t)=>{id.init(e,t),o9.init(e,t),e._zod.processJSONSchema=(t,r,i)=>ok(e,t,r,i),e.unwrap=()=>e._zod.def.innerType}),n7=tc("ZodNonOptional",(e,t)=>{ic.init(e,t),o9.init(e,t),e._zod.processJSONSchema=(t,r,i)=>ov(e,t,r,i),e.unwrap=()=>e._zod.def.innerType}),ae=tc("ZodCatch",(e,t)=>{iu.init(e,t),o9.init(e,t),e._zod.processJSONSchema=(t,r,i)=>ow(e,t,r,i),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap}),at=tc("ZodPipe",(e,t)=>{im.init(e,t),o9.init(e,t),e._zod.processJSONSchema=(t,r,i)=>oR(e,t,r,i),e.in=t.in,e.out=t.out});function ar(e,t){return new at({type:"pipe",in:e,out:t})}let ai=tc("ZodPreprocess",(e,t)=>{at.init(e,t),iy.init(e,t)}),ao=tc("ZodReadonly",(e,t)=>{ig.init(e,t),o9.init(e,t),e._zod.processJSONSchema=(t,r,i)=>oP(e,t,r,i),e.unwrap=()=>e._zod.def.innerType}),an=tc("ZodLazy",(e,t)=>{iv.init(e,t),o9.init(e,t),e._zod.processJSONSchema=(t,r,i)=>oq(e,t,r,i),e.unwrap=()=>e._zod.def.getter()});function aa(e){return new an({type:"lazy",getter:e})}let as=tc("ZodCustom",(e,t)=>{ib.init(e,t),o9.init(e,t),e._zod.processJSONSchema=(t,r,i)=>oc(e,t,r,i)});function ad(e,t){return new ai({type:"pipe",in:n0(e),out:t})}function ac(e){return iP(nt,e)}let al="2025-11-25",ap=[al,"2025-06-18","2025-03-26","2024-11-05","2024-10-07"],au="io.modelcontextprotocol/protocolVersion",am="io.modelcontextprotocol/clientInfo",af="io.modelcontextprotocol/serverInfo",ah="io.modelcontextprotocol/clientCapabilities",ay="io.modelcontextprotocol/logLevel",ag=aa(()=>nL([o7(),nR(),nI(),nj(),nJ(o7(),ag),nW(ag)])),a_=nJ(o7(),ag),av=nW(ag),ab=nL([o7(),nR().int()]),a$=o7(),aS=nz({ttl:nR().optional()}),ak=nz({taskId:o7()}),aw=nD({progressToken:ab.optional(),"io.modelcontextprotocol/related-task":ak.optional()}),aR=nz({_meta:aw.optional()}),aP=aR.extend({task:aS.optional()}),aV=nz({method:o7(),params:aR.loose().optional()}),aq=nz({_meta:aw.optional()}),aI=nz({method:o7(),params:aq.loose().optional()}),ax=nD({get[af](){return aH.optional().catch(void 0)}}),aj=nD({_meta:ax.optional()}),aC=nL([o7(),nR().int()]),aT=nz({jsonrpc:nY("2.0"),id:aC,...aV.shape}).strict(),aO=nz({jsonrpc:nY("2.0"),...aI.shape}).strict(),aE=nz({jsonrpc:nY("2.0"),id:aC,result:aj}).strict(),aA=nz({jsonrpc:nY("2.0"),id:aC.optional(),error:nz({code:nR().int(),message:o7(),data:nE().optional()})}).strict(),aM=nL([aT,aO,aE,aA]),aW=nL([aE,aA]),aN=aj.strict(),az=aq.extend({requestId:aC.optional(),reason:o7().optional()}),aD=aI.extend({method:nY("notifications/cancelled"),params:az}),aF=nz({src:o7(),mimeType:o7().optional(),sizes:nW(o7()).optional(),theme:nQ(["light","dark"]).optional()}),aL=nz({icons:nW(aF).optional()}),aU=nz({name:o7(),title:o7().optional()}),aH=aU.extend({...aU.shape,...aL.shape,version:o7(),websiteUrl:o7().optional(),description:o7().optional()}),aG=nB(nz({applyDefaults:nI().optional()}),a_),aB=ad(e=>e&&"object"==typeof e&&!Array.isArray(e)&&0===Object.keys(e).length?{form:{}}:e,nB(nz({form:aG.optional(),url:a_.optional()}),a_.optional())),aK=nD({list:a_.optional(),cancel:a_.optional(),requests:nD({sampling:nD({createMessage:a_.optional()}).optional(),elicitation:nD({create:a_.optional()}).optional()}).optional()}),aJ=nD({list:a_.optional(),cancel:a_.optional(),requests:nD({tools:nD({call:a_.optional()}).optional()}).optional()}),aZ=nz({experimental:nJ(o7(),a_).optional(),sampling:nz({context:a_.optional(),tools:a_.optional()}).optional(),elicitation:aB.optional(),roots:nz({listChanged:nI().optional()}).optional(),tasks:aK.optional(),extensions:nJ(o7(),a_).optional()}),aQ=aR.extend({protocolVersion:o7(),capabilities:aZ,clientInfo:aH}),aX=aV.extend({method:nY("initialize"),params:aQ}),aY=nz({experimental:nJ(o7(),a_).optional(),logging:a_.optional(),completions:a_.optional(),prompts:nz({listChanged:nI().optional()}).optional(),resources:nz({subscribe:nI().optional(),listChanged:nI().optional()}).optional(),tools:nz({listChanged:nI().optional()}).optional(),tasks:aJ.optional(),extensions:nJ(o7(),a_).optional()}),a1=aj.extend({protocolVersion:o7(),capabilities:aY,serverInfo:aH,instructions:o7().optional()}),a0=aI.extend({method:nY("notifications/initialized"),params:aq.optional()}),a2=aV.extend({method:nY("server/discover"),params:aR.optional()}),a4=aj.extend({supportedVersions:nW(o7()),capabilities:aY,instructions:o7().optional()}),a6=aV.extend({method:nY("ping"),params:aR.optional()}),a3=nz({progress:nR(),total:n4(nR()),message:n4(o7())}),a9=nz({...aq.shape,...a3.shape,progressToken:ab}),a5=aI.extend({method:nY("notifications/progress"),params:a9}),a8=aR.extend({cursor:a$.optional()}),a7=aV.extend({params:a8.optional()}),se=aj.extend({nextCursor:a$.optional()}),st=nz({uri:o7(),mimeType:n4(o7()),_meta:nJ(o7(),nE()).optional()}),sr=st.extend({text:o7()}),si=o7().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:"Invalid Base64 string"}),so=st.extend({blob:si}),sn=nQ(["user","assistant"]),sa=nz({audience:nW(sn).optional(),priority:nR().min(0).max(1).optional(),lastModified:ac({offset:!0}).optional()}),ss=nz({...aU.shape,...aL.shape,uri:o7(),description:n4(o7()),mimeType:n4(o7()),size:n4(nR()),annotations:sa.optional(),_meta:n4(nD({}))}),sd=nz({...aU.shape,...aL.shape,uriTemplate:o7(),description:n4(o7()),mimeType:n4(o7()),annotations:sa.optional(),_meta:n4(nD({}))}),sc=a7.extend({method:nY("resources/list")}),sl=se.extend({resources:nW(ss)}),sp=a7.extend({method:nY("resources/templates/list")}),su=se.extend({resourceTemplates:nW(sd)}),sm=aR.extend({uri:o7()}),sf=aV.extend({method:nY("resources/read"),params:sm}),sh=aj.extend({contents:nW(nL([sr,so]))}),sy=aI.extend({method:nY("notifications/resources/list_changed"),params:aq.optional()}),sg=aV.extend({method:nY("resources/subscribe"),params:sm}),s_=aV.extend({method:nY("resources/unsubscribe"),params:sm}),sv=nz({toolsListChanged:nI().optional(),promptsListChanged:nI().optional(),resourcesListChanged:nI().optional(),resourceSubscriptions:nW(o7()).optional()}),sb=aR.extend({notifications:sv}),s$=aV.extend({method:nY("subscriptions/listen"),params:sb}),sS=aq.extend({notifications:sv}),sk=aI.extend({method:nY("notifications/subscriptions/acknowledged"),params:sS}),sw=ax.extend({"io.modelcontextprotocol/subscriptionId":aC}),sR=aj.extend({_meta:sw}),sP=aq.extend({uri:o7()}),sV=aI.extend({method:nY("notifications/resources/updated"),params:sP}),sq=nz({name:o7(),description:n4(o7()),required:n4(nI())}),sI=nz({...aU.shape,...aL.shape,description:n4(o7()),arguments:n4(nW(sq)),_meta:n4(nD({}))}),sx=a7.extend({method:nY("prompts/list")}),sj=se.extend({prompts:nW(sI)}),sC=aR.extend({name:o7(),arguments:nJ(o7(),o7()).optional()}),sT=aV.extend({method:nY("prompts/get"),params:sC}),sO=nz({type:nY("text"),text:o7(),annotations:sa.optional(),_meta:nJ(o7(),nE()).optional()}),sE=nz({type:nY("image"),data:si,mimeType:o7(),annotations:sa.optional(),_meta:nJ(o7(),nE()).optional()}),sA=nz({type:nY("audio"),data:si,mimeType:o7(),annotations:sa.optional(),_meta:nJ(o7(),nE()).optional()}),sM=nz({type:nY("tool_use"),name:o7(),id:o7(),input:nJ(o7(),nE()),_meta:nJ(o7(),nE()).optional()}),sW=nz({type:nY("resource"),resource:nL([sr,so]),annotations:sa.optional(),_meta:nJ(o7(),nE()).optional()}),sN=ss.extend({type:nY("resource_link")}),sz=nL([sO,sE,sA,sN,sW]),sD=nz({role:sn,content:sz}),sF=aj.extend({description:o7().optional(),messages:nW(sD)}),sL=aI.extend({method:nY("notifications/prompts/list_changed"),params:aq.optional()}),sU=nz({title:o7().optional(),readOnlyHint:nI().optional(),destructiveHint:nI().optional(),idempotentHint:nI().optional(),openWorldHint:nI().optional()}),sH=nz({taskSupport:nQ(["required","optional","forbidden"]).optional()}),sG=nz({...aU.shape,...aL.shape,description:o7().optional(),inputSchema:nz({type:nY("object"),properties:nJ(o7(),ag).optional(),required:nW(o7()).optional()}).catchall(nE()),outputSchema:nD({$schema:o7().optional()}).optional(),annotations:sU.optional(),execution:sH.optional(),_meta:nJ(o7(),nE()).optional()}),sB=a7.extend({method:nY("tools/list")}),sK=se.extend({tools:nW(sG)}),sJ=aj.extend({content:nW(sz).default([]),structuredContent:nE().optional(),isError:nI().optional()}),sZ=sJ.or(aj.extend({toolResult:nE()})),sQ=aP.extend({name:o7(),arguments:nJ(o7(),nE()).optional()}),sX=aV.extend({method:nY("tools/call"),params:sQ}),sY=aI.extend({method:nY("notifications/tools/list_changed"),params:aq.optional()}),s1=nz({autoRefresh:nI().default(!0),debounceMs:nR().int().nonnegative().default(300)}),s0=nQ(["debug","info","notice","warning","error","critical","alert","emergency"]),s2=aR.extend({level:s0}),s4=aV.extend({method:nY("logging/setLevel"),params:s2}),s6=aq.extend({level:s0,logger:o7().optional(),data:nE()}),s3=aI.extend({method:nY("notifications/message"),params:s6}),s9=nz({name:o7().optional()}),s5=nz({hints:nW(s9).optional(),costPriority:nR().min(0).max(1).optional(),speedPriority:nR().min(0).max(1).optional(),intelligencePriority:nR().min(0).max(1).optional()}),s8=nz({mode:nQ(["auto","required","none"]).optional()}),s7=nz({type:nY("tool_result"),toolUseId:o7().describe("The unique identifier for the corresponding tool call."),content:nW(sz),structuredContent:nE().optional(),isError:nI().optional(),_meta:nJ(o7(),nE()).optional()}),de=nH("type",[sO,sE,sA]),dt=nH("type",[sO,sE,sA,sM,s7]),dr=nz({role:sn,content:nL([dt,nW(dt)]),_meta:nJ(o7(),nE()).optional()}),di=aP.extend({messages:nW(dr),modelPreferences:s5.optional(),systemPrompt:o7().optional(),includeContext:nQ(["none","thisServer","allServers"]).optional(),temperature:nR().optional(),maxTokens:nR().int(),stopSequences:nW(o7()).optional(),metadata:a_.optional(),tools:nW(sG).optional(),toolChoice:s8.optional()}),dn=aV.extend({method:nY("sampling/createMessage"),params:di}),da=aj.extend({model:o7(),stopReason:n4(nQ(["endTurn","stopSequence","maxTokens"]).or(o7())),role:sn,content:de}),ds=aj.extend({model:o7(),stopReason:n4(nQ(["endTurn","stopSequence","maxTokens","toolUse"]).or(o7())),role:sn,content:nL([dt,nW(dt)])}),dd=nz({type:nY("boolean"),title:o7().optional(),description:o7().optional(),default:nI().optional()}),dc=nz({type:nY("string"),title:o7().optional(),description:o7().optional(),minLength:nR().optional(),maxLength:nR().optional(),format:nQ(["email","uri","date","date-time"]).optional(),default:o7().optional()}),dl=nz({type:nQ(["number","integer"]),title:o7().optional(),description:o7().optional(),minimum:nR().optional(),maximum:nR().optional(),default:nR().optional()}),dp=nz({type:nY("string"),title:o7().optional(),description:o7().optional(),enum:nW(o7()),default:o7().optional()}),du=nz({type:nY("string"),title:o7().optional(),description:o7().optional(),oneOf:nW(nz({const:o7(),title:o7()})),default:o7().optional()}),dm=nz({type:nY("string"),title:o7().optional(),description:o7().optional(),enum:nW(o7()),enumNames:nW(o7()).optional(),default:o7().optional()}),df=nL([dp,du]),dh=nz({type:nY("array"),title:o7().optional(),description:o7().optional(),minItems:nR().optional(),maxItems:nR().optional(),items:nz({type:nY("string"),enum:nW(o7())}),default:nW(o7()).optional()}),dy=nz({type:nY("array"),title:o7().optional(),description:o7().optional(),minItems:nR().optional(),maxItems:nR().optional(),items:nz({anyOf:nW(nz({const:o7(),title:o7()}))}),default:nW(o7()).optional()}),dg=nL([dh,dy]),d_=nL([dm,df,dg]),dv=nL([d_,dd,dc,dl]),db=aP.extend({mode:nY("form").optional(),message:o7(),requestedSchema:nz({type:nY("object"),properties:nJ(o7(),dv),required:nW(o7()).optional()}).catchall(nE())}),d$=aP.extend({mode:nY("url"),message:o7(),elicitationId:o7(),url:o7().url()}),dS=nL([db,d$]),dk=aV.extend({method:nY("elicitation/create"),params:dS}),dw=aq.extend({elicitationId:o7()}),dR=aI.extend({method:nY("notifications/elicitation/complete"),params:dw}),dP=aj.extend({action:nQ(["accept","decline","cancel"]),content:ad(e=>null===e?void 0:e,nJ(o7(),nL([o7(),nR(),nI(),nW(o7())])).optional())}),dV=nz({type:nY("ref/resource"),uri:o7()}),dq=nz({type:nY("ref/prompt"),name:o7()}),dI=aR.extend({ref:nL([dq,dV]),argument:nz({name:o7(),value:o7()}),context:nz({arguments:nJ(o7(),o7()).optional()}).optional()}),dx=aV.extend({method:nY("completion/complete"),params:dI}),dj=aj.extend({completion:nD({values:nW(o7()).max(100),total:n4(nR().int()),hasMore:n4(nI())})}),dC=nz({uri:o7().startsWith("file://"),name:o7().optional(),_meta:nJ(o7(),nE()).optional()}),dT=aV.extend({method:nY("roots/list"),params:aR.optional()}),dO=aj.extend({roots:nW(dC)}),dE=aI.extend({method:nY("notifications/roots/list_changed"),params:aq.optional()}),dA=nD({ttl:nR().optional(),pollInterval:nR().optional()}),dM=nQ(["working","input_required","completed","failed","cancelled"]),dW=nz({taskId:o7(),status:dM,ttl:nL([nR(),nj()]),createdAt:o7(),lastUpdatedAt:o7(),pollInterval:n4(nR()),statusMessage:n4(o7())}),dN=aj.extend({task:dW}),dz=aq.merge(dW),dD=aI.extend({method:nY("notifications/tasks/status"),params:dz}),dF=aV.extend({method:nY("tasks/get"),params:aR.extend({taskId:o7()})}),dL=aj.merge(dW),dU=aV.extend({method:nY("tasks/result"),params:aR.extend({taskId:o7()})}),dH=aj.loose(),dG=a7.extend({method:nY("tasks/list")}),dB=se.extend({tasks:nW(dW)}),dK=aV.extend({method:nY("tasks/cancel"),params:aR.extend({taskId:o7()})}),dJ=aj.merge(dW),dZ=nL([a6,aX,a2,dx,s4,sT,sx,sc,sp,sf,sg,s_,s$,sX,sB]),dQ=nL([aD,a5,a0,dE]),dX=nL([aN,da,ds,dP,dO]),dY=nL([a6,dn,dk,dT]),d1=nL([aD,a5,s3,sV,sy,sY,sL,sk,dR]),d0=nL([aN,a1,a4,dj,sF,sj,sl,su,sh,sJ,sK,sR]),d2="custom";function d4(e){return new nw(ik({type:"number",coerce:!0,checks:[],...eK(e)}))}eo||(eo={});let d6=iR(nd,void 0).superRefine((e,t)=>{if(!URL.canParse(e))return t.addIssue({code:d2,message:"URL must be parseable",fatal:!0}),ta}).refine(e=>{let t=new URL(e);return"javascript:"!==t.protocol&&"data:"!==t.protocol&&"vbscript:"!==t.protocol},{message:"URL cannot use javascript:, data:, or vbscript: scheme"}),d3=nD({resource:o7().url(),authorization_servers:nW(d6).optional(),jwks_uri:o7().url().optional(),scopes_supported:nW(o7()).optional(),bearer_methods_supported:nW(o7()).optional(),resource_signing_alg_values_supported:nW(o7()).optional(),resource_name:o7().optional(),resource_documentation:o7().optional(),resource_policy_uri:o7().url().optional(),resource_tos_uri:o7().url().optional(),tls_client_certificate_bound_access_tokens:nI().optional(),authorization_details_types_supported:nW(o7()).optional(),dpop_signing_alg_values_supported:nW(o7()).optional(),dpop_bound_access_tokens_required:nI().optional()}),d9=nD({issuer:o7(),authorization_endpoint:d6,token_endpoint:d6,registration_endpoint:d6.optional(),scopes_supported:nW(o7()).optional(),response_types_supported:nW(o7()),response_modes_supported:nW(o7()).optional(),grant_types_supported:nW(o7()).optional(),token_endpoint_auth_methods_supported:nW(o7()).optional(),token_endpoint_auth_signing_alg_values_supported:nW(o7()).optional(),service_documentation:d6.optional(),revocation_endpoint:d6.optional(),revocation_endpoint_auth_methods_supported:nW(o7()).optional(),revocation_endpoint_auth_signing_alg_values_supported:nW(o7()).optional(),introspection_endpoint:o7().optional(),introspection_endpoint_auth_methods_supported:nW(o7()).optional(),introspection_endpoint_auth_signing_alg_values_supported:nW(o7()).optional(),code_challenge_methods_supported:nW(o7()).optional(),client_id_metadata_document_supported:nI().optional(),authorization_response_iss_parameter_supported:nI().optional().catch(void 0),dpop_signing_alg_values_supported:nW(o7()).optional()}),d5=nD({issuer:o7(),authorization_endpoint:d6,token_endpoint:d6,userinfo_endpoint:d6.optional(),jwks_uri:d6,registration_endpoint:d6.optional(),scopes_supported:nW(o7()).optional(),response_types_supported:nW(o7()),response_modes_supported:nW(o7()).optional(),grant_types_supported:nW(o7()).optional(),acr_values_supported:nW(o7()).optional(),subject_types_supported:nW(o7()),id_token_signing_alg_values_supported:nW(o7()),id_token_encryption_alg_values_supported:nW(o7()).optional(),id_token_encryption_enc_values_supported:nW(o7()).optional(),userinfo_signing_alg_values_supported:nW(o7()).optional(),userinfo_encryption_alg_values_supported:nW(o7()).optional(),userinfo_encryption_enc_values_supported:nW(o7()).optional(),request_object_signing_alg_values_supported:nW(o7()).optional(),request_object_encryption_alg_values_supported:nW(o7()).optional(),request_object_encryption_enc_values_supported:nW(o7()).optional(),token_endpoint_auth_methods_supported:nW(o7()).optional(),token_endpoint_auth_signing_alg_values_supported:nW(o7()).optional(),display_values_supported:nW(o7()).optional(),claim_types_supported:nW(o7()).optional(),claims_supported:nW(o7()).optional(),service_documentation:o7().optional(),claims_locales_supported:nW(o7()).optional(),ui_locales_supported:nW(o7()).optional(),claims_parameter_supported:nI().optional(),request_parameter_supported:nI().optional(),request_uri_parameter_supported:nI().optional(),require_request_uri_registration:nI().optional(),op_policy_uri:d6.optional(),op_tos_uri:d6.optional(),client_id_metadata_document_supported:nI().optional(),authorization_response_iss_parameter_supported:nI().optional().catch(void 0)}),d8=nz({...d5.shape,...d9.pick({code_challenge_methods_supported:!0}).shape}),d7=nz({access_token:o7(),id_token:o7().optional(),token_type:o7(),expires_in:d4().optional(),scope:o7().optional(),refresh_token:o7().optional(),issuer:o7().optional().catch(void 0)}).strip(),ce=nz({issued_token_type:nY("urn:ietf:params:oauth:token-type:id-jag"),access_token:o7(),token_type:o7().optional(),expires_in:nR().optional(),scope:o7().optional()}).strip(),ct=nz({error:o7(),error_description:o7().optional(),error_uri:o7().optional()}),cr=d6.optional().or(nY("").transform(()=>void 0)),ci=nz({redirect_uris:nW(d6),token_endpoint_auth_method:o7().optional(),grant_types:nW(o7()).optional(),response_types:nW(o7()).optional(),application_type:o7().optional(),client_name:o7().optional(),client_uri:d6.optional(),logo_uri:cr,scope:o7().optional(),contacts:nW(o7()).optional(),tos_uri:cr,policy_uri:o7().optional(),jwks_uri:d6.optional(),jwks:nT().optional(),software_id:o7().optional(),software_version:o7().optional(),software_statement:o7().optional()}).strip(),co=nz({client_id:o7(),client_secret:o7().optional(),client_id_issued_at:nR().optional(),client_secret_expires_at:nR().optional(),issuer:o7().optional().catch(void 0)}).strip(),cn=ci.merge(co),ca=nz({error:o7(),error_description:o7().optional()}).strip(),cs=nz({token:o7(),token_type_hint:o7().optional()}).strip(),cd=Symbol.for("mcp.sdk.errorBrands");function cc(e,t){let r=new Set,i=t;for(;"function"==typeof i;){let e=i.mcpBrand;Object.prototype.hasOwnProperty.call(i,"mcpBrand")&&"string"==typeof e&&r.add(e),i=Object.getPrototypeOf(i)}0!==r.size&&Object.defineProperty(e,cd,{value:r,enumerable:!1,configurable:!0})}function cl(e,t){try{if("object"==typeof t&&null!==t&&Object.prototype.hasOwnProperty.call(e,"mcpBrand")&&"string"==typeof e.mcpBrand&&Object.prototype.hasOwnProperty.call(t,cd)){let r=t[cd];if(r&&"function"==typeof r.has&&r.has(e.mcpBrand))return!0}}catch{}return Function.prototype[Symbol.hasInstance].call(e,t)}let cp=((K={}).InvalidRequest="invalid_request",K.InvalidClient="invalid_client",K.InvalidGrant="invalid_grant",K.UnauthorizedClient="unauthorized_client",K.UnsupportedGrantType="unsupported_grant_type",K.InvalidScope="invalid_scope",K.AccessDenied="access_denied",K.ServerError="server_error",K.TemporarilyUnavailable="temporarily_unavailable",K.UnsupportedResponseType="unsupported_response_type",K.UnsupportedTokenType="unsupported_token_type",K.InvalidToken="invalid_token",K.MethodNotAllowed="method_not_allowed",K.TooManyRequests="too_many_requests",K.InvalidClientMetadata="invalid_client_metadata",K.InvalidRedirectUri="invalid_redirect_uri",K.InsufficientScope="insufficient_scope",K.InvalidTarget="invalid_target",K.InvalidDpopProof="invalid_dpop_proof",K.UseDpopNonce="use_dpop_nonce",K);var cu=class e extends Error{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.OAuthError"})}static[Symbol.hasInstance](e){return cl(this,e)}static isInstance(e){if("function"!=typeof this)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return cl(this,e)}constructor(e,t,r){super(t),this.code=e,this.errorUri=r,this.name="OAuthError",cc(this,new.target)}toResponseObject(){let e={error:this.code,error_description:this.message};return this.errorUri&&(e.error_uri=this.errorUri),e}static fromResponse(t){return new e(t.error,t.error_description??t.error,t.error_uri)}};let cm=((J={}).NotConnected="NOT_CONNECTED",J.AlreadyConnected="ALREADY_CONNECTED",J.NotInitialized="NOT_INITIALIZED",J.CapabilityNotSupported="CAPABILITY_NOT_SUPPORTED",J.RequestTimeout="REQUEST_TIMEOUT",J.ConnectionClosed="CONNECTION_CLOSED",J.SendFailed="SEND_FAILED",J.InvalidResult="INVALID_RESULT",J.UnsupportedResultType="UNSUPPORTED_RESULT_TYPE",J.InputRequiredRoundsExceeded="INPUT_REQUIRED_ROUNDS_EXCEEDED",J.ListPaginationExceeded="LIST_PAGINATION_EXCEEDED",J.MethodNotSupportedByProtocolVersion="METHOD_NOT_SUPPORTED_BY_PROTOCOL_VERSION",J.EraNegotiationFailed="ERA_NEGOTIATION_FAILED",J.ClientHttpNotImplemented="CLIENT_HTTP_NOT_IMPLEMENTED",J.ClientHttpAuthentication="CLIENT_HTTP_AUTHENTICATION",J.ClientHttpForbidden="CLIENT_HTTP_FORBIDDEN",J.ClientHttpUnexpectedContent="CLIENT_HTTP_UNEXPECTED_CONTENT",J.ClientHttpFailedToOpenStream="CLIENT_HTTP_FAILED_TO_OPEN_STREAM",J.ClientHttpFailedToTerminateSession="CLIENT_HTTP_FAILED_TO_TERMINATE_SESSION",J);var cf=class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.SdkError"})}static[Symbol.hasInstance](e){return cl(this,e)}static isInstance(e){if("function"!=typeof this)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return cl(this,e)}constructor(e,t,r,i){super(t,i),this.code=e,this.data=r,this.name="SdkError",cc(this,new.target)}};function ch(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)}function cy(e,t){let r={};for(let[i,o]of Object.entries(e)){if(void 0===o)continue;let e=void 0===t?void 0:t[i];if(void 0===e){r[i]=o;continue}if(ch(o)&&ch(e)){let t={};for(let[r,n]of Object.entries(o))void 0!==n&&void 0===e[r]&&("elicitation"!==i||"form"!==r||void 0!==e.form||void 0!==e.url)&&(t[r]=n);Object.keys(t).length>0&&(r[i]=t)}}return Object.keys(r).length>0?r:void 0}(class extends cf{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.SdkHttpError"})}constructor(e,t,r,i){super(e,t,r,i),this.name="SdkHttpError"}get status(){return this.data.status}get statusText(){return this.data.statusText}});let cg="2026-07-28",c_=[cg];function cv(e){return e.filter(e=>e>=cg)}function cb(e){let t=e.structuredContent;return void 0===t||!("object"!=typeof t||null===t||Array.isArray(t))||e.content?.some(e=>"text"===e.type)?e:{...e,content:[...e.content??[],{type:"text",text:JSON.stringify(t)}]}}let c$=["task","inputRequests","requestState"];function cS(e){return null===e||"object"!=typeof e||Array.isArray(e)||void 0!==e.content||c$.some(t=>t in e)?e:{...e,content:[]}}function ck(){let e,t,i,o,n,a,s,d,c,l,p,u,m,f,h,y,g,_,v,b,$,S,k,w,R,P,V,q,I,x,j,C,T,O,E,A,M,W,N,z,D,F,L,U,H,G,B,K,J,Z,Q,X,Y,ee,et,er,ei,eo,en,ea,es,ed,ec,el,ep,eu,em,ef,eh,ey,eg,e_,ev,eb,e$,eS,ek,ew,eR,eP,eV,eq,eI,ex,ej,eC,eT,eO,eE,eA,eM,eW,eN,ez,eD,eF,eL,eU,eH,eG,eB,eK,eJ,eZ,eQ,eX,eY,e1,e0,e2,e4,e6,e3,e9,e5,e8,e7,te,tt,tr,ti,to,tn,ta,ts,td,tc,tl,tp,tu,tm,tf,th,ty,tg,t_,tv,tb,t$,tS;return r??=(e=aa(()=>nL([o7(),nR(),nI(),nj(),nJ(o7(),e),nW(e)])),t=nJ(o7(),e),i=nL([o7(),nR().int()]),o=o7(),n=nz({ttl:nR().optional()}),a=nz({taskId:o7()}),c=(d=nz({_meta:(s=nD({progressToken:i.optional(),"io.modelcontextprotocol/related-task":a.optional()})).optional()})).extend({task:n.optional()}),l=nz({method:o7(),params:d.loose().optional()}),p=nz({_meta:s.optional()}),u=nz({method:o7(),params:p.loose().optional()}),m=nD({_meta:s.optional()}),f=nL([o7(),nR().int()]),h=m.strict(),y=p.extend({requestId:f.optional(),reason:o7().optional()}),g=u.extend({method:nY("notifications/cancelled"),params:y}),_=nz({src:o7(),mimeType:o7().optional(),sizes:nW(o7()).optional(),theme:nQ(["light","dark"]).optional()}),v=nz({icons:nW(_).optional()}),$=(b=nz({name:o7(),title:o7().optional()})).extend({...b.shape,...v.shape,version:o7(),websiteUrl:o7().optional(),description:o7().optional()}),S=nB(nz({applyDefaults:nI().optional()}),t),k=ad(e=>e&&"object"==typeof e&&!Array.isArray(e)&&0===Object.keys(e).length?{form:{}}:e,nB(nz({form:S.optional(),url:t.optional()}),t.optional())),w=nD({list:t.optional(),cancel:t.optional(),requests:nD({sampling:nD({createMessage:t.optional()}).optional(),elicitation:nD({create:t.optional()}).optional()}).optional()}),R=nD({list:t.optional(),cancel:t.optional(),requests:nD({tools:nD({call:t.optional()}).optional()}).optional()}),P=nz({experimental:nJ(o7(),t).optional(),sampling:nz({context:t.optional(),tools:t.optional()}).optional(),elicitation:k.optional(),roots:nz({listChanged:nI().optional()}).optional(),tasks:w.optional(),extensions:nJ(o7(),t).optional()}),V=d.extend({protocolVersion:o7(),capabilities:P,clientInfo:$}),q=l.extend({method:nY("initialize"),params:V}),I=nz({experimental:nJ(o7(),t).optional(),logging:t.optional(),completions:t.optional(),prompts:nz({listChanged:nI().optional()}).optional(),resources:nz({subscribe:nI().optional(),listChanged:nI().optional()}).optional(),tools:nz({listChanged:nI().optional()}).optional(),tasks:R.optional(),extensions:nJ(o7(),t).optional()}),x=m.extend({protocolVersion:o7(),capabilities:I,serverInfo:$,instructions:o7().optional()}),j=u.extend({method:nY("notifications/initialized"),params:p.optional()}),C=l.extend({method:nY("ping"),params:d.optional()}),T=nz({progress:nR(),total:n4(nR()),message:n4(o7())}),O=nz({...p.shape,...T.shape,progressToken:i}),E=u.extend({method:nY("notifications/progress"),params:O}),A=d.extend({cursor:o.optional()}),M=l.extend({params:A.optional()}),W=m.extend({nextCursor:o.optional()}),z=(N=nz({uri:o7(),mimeType:n4(o7()),_meta:nJ(o7(),nE()).optional()})).extend({text:o7()}),D=o7().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:"Invalid Base64 string"}),F=N.extend({blob:D}),U=nz({audience:nW(L=nQ(["user","assistant"])).optional(),priority:nR().min(0).max(1).optional(),lastModified:ac({offset:!0}).optional()}),H=nz({...b.shape,...v.shape,uri:o7(),description:n4(o7()),mimeType:n4(o7()),size:n4(nR()),annotations:U.optional(),_meta:n4(nD({}))}),G=nz({...b.shape,...v.shape,uriTemplate:o7(),description:n4(o7()),mimeType:n4(o7()),annotations:U.optional(),_meta:n4(nD({}))}),B=M.extend({method:nY("resources/list")}),K=W.extend({resources:nW(H)}),J=M.extend({method:nY("resources/templates/list")}),Z=W.extend({resourceTemplates:nW(G)}),Q=d.extend({uri:o7()}),X=l.extend({method:nY("resources/read"),params:Q}),Y=m.extend({contents:nW(nL([z,F]))}),ee=u.extend({method:nY("notifications/resources/list_changed"),params:p.optional()}),et=l.extend({method:nY("resources/subscribe"),params:Q}),er=l.extend({method:nY("resources/unsubscribe"),params:Q}),ei=p.extend({uri:o7()}),eo=u.extend({method:nY("notifications/resources/updated"),params:ei}),en=nz({name:o7(),description:n4(o7()),required:n4(nI())}),ea=nz({...b.shape,...v.shape,description:n4(o7()),arguments:n4(nW(en)),_meta:n4(nD({}))}),es=M.extend({method:nY("prompts/list")}),ed=W.extend({prompts:nW(ea)}),ec=d.extend({name:o7(),arguments:nJ(o7(),o7()).optional()}),el=l.extend({method:nY("prompts/get"),params:ec}),ep=nz({type:nY("text"),text:o7(),annotations:U.optional(),_meta:nJ(o7(),nE()).optional()}),eu=nz({type:nY("image"),data:D,mimeType:o7(),annotations:U.optional(),_meta:nJ(o7(),nE()).optional()}),em=nz({type:nY("audio"),data:D,mimeType:o7(),annotations:U.optional(),_meta:nJ(o7(),nE()).optional()}),ef=nz({type:nY("tool_use"),name:o7(),id:o7(),input:nJ(o7(),nE()),_meta:nJ(o7(),nE()).optional()}),eh=nz({type:nY("resource"),resource:nL([z,F]),annotations:U.optional(),_meta:nJ(o7(),nE()).optional()}),e_=nz({role:L,content:eg=nL([ep,eu,em,ey=H.extend({type:nY("resource_link")}),eh])}),ev=m.extend({description:o7().optional(),messages:nW(e_)}),eb=u.extend({method:nY("notifications/prompts/list_changed"),params:p.optional()}),e$=nz({title:o7().optional(),readOnlyHint:nI().optional(),destructiveHint:nI().optional(),idempotentHint:nI().optional(),openWorldHint:nI().optional()}),eS=nz({taskSupport:nQ(["required","optional","forbidden"]).optional()}),ek=nz({...b.shape,...v.shape,description:o7().optional(),inputSchema:nz({type:nY("object"),properties:nJ(o7(),e).optional(),required:nW(o7()).optional()}).catchall(nE()),outputSchema:nz({type:nY("object"),properties:nJ(o7(),e).optional(),required:nW(o7()).optional()}).catchall(nE()).optional(),annotations:e$.optional(),execution:eS.optional(),_meta:nJ(o7(),nE()).optional()}),ew=M.extend({method:nY("tools/list")}),eR=W.extend({tools:nW(ek)}),eP=m.extend({content:nW(eg),structuredContent:nJ(o7(),nE()).optional(),isError:nI().optional()}),eV=c.extend({name:o7(),arguments:nJ(o7(),nE()).optional()}),eq=l.extend({method:nY("tools/call"),params:eV}),eI=u.extend({method:nY("notifications/tools/list_changed"),params:p.optional()}),ex=nQ(["debug","info","notice","warning","error","critical","alert","emergency"]),ej=d.extend({level:ex}),eC=l.extend({method:nY("logging/setLevel"),params:ej}),eT=p.extend({level:ex,logger:o7().optional(),data:nE()}),eO=u.extend({method:nY("notifications/message"),params:eT}),eE=nz({name:o7().optional()}),eA=nz({hints:nW(eE).optional(),costPriority:nR().min(0).max(1).optional(),speedPriority:nR().min(0).max(1).optional(),intelligencePriority:nR().min(0).max(1).optional()}),eM=nz({mode:nQ(["auto","required","none"]).optional()}),eW=nz({type:nY("tool_result"),toolUseId:o7().describe("The unique identifier for the corresponding tool call."),content:nW(eg),structuredContent:nz({}).loose().optional(),isError:nI().optional(),_meta:nJ(o7(),nE()).optional()}),eN=nH("type",[ep,eu,em]),eD=nz({role:L,content:nL([ez=nH("type",[ep,eu,em,ef,eW]),nW(ez)]),_meta:nJ(o7(),nE()).optional()}),eF=c.extend({messages:nW(eD),modelPreferences:eA.optional(),systemPrompt:o7().optional(),includeContext:nQ(["none","thisServer","allServers"]).optional(),temperature:nR().optional(),maxTokens:nR().int(),stopSequences:nW(o7()).optional(),metadata:t.optional(),tools:nW(ek).optional(),toolChoice:eM.optional()}),eL=l.extend({method:nY("sampling/createMessage"),params:eF}),eU=m.extend({model:o7(),stopReason:n4(nQ(["endTurn","stopSequence","maxTokens"]).or(o7())),role:L,content:eN}),eH=m.extend({model:o7(),stopReason:n4(nQ(["endTurn","stopSequence","maxTokens","toolUse"]).or(o7())),role:L,content:nL([ez,nW(ez)])}),eG=nz({type:nY("boolean"),title:o7().optional(),description:o7().optional(),default:nI().optional()}),eB=nz({type:nY("string"),title:o7().optional(),description:o7().optional(),minLength:nR().optional(),maxLength:nR().optional(),format:nQ(["email","uri","date","date-time"]).optional(),default:o7().optional()}),eK=nz({type:nQ(["number","integer"]),title:o7().optional(),description:o7().optional(),minimum:nR().optional(),maximum:nR().optional(),default:nR().optional()}),eJ=nz({type:nY("string"),title:o7().optional(),description:o7().optional(),enum:nW(o7()),default:o7().optional()}),eZ=nz({type:nY("string"),title:o7().optional(),description:o7().optional(),oneOf:nW(nz({const:o7(),title:o7()})),default:o7().optional()}),eQ=nz({type:nY("string"),title:o7().optional(),description:o7().optional(),enum:nW(o7()),enumNames:nW(o7()).optional(),default:o7().optional()}),eX=nL([eJ,eZ]),eY=nz({type:nY("array"),title:o7().optional(),description:o7().optional(),minItems:nR().optional(),maxItems:nR().optional(),items:nz({type:nY("string"),enum:nW(o7())}),default:nW(o7()).optional()}),e0=nL([eY,e1=nz({type:nY("array"),title:o7().optional(),description:o7().optional(),minItems:nR().optional(),maxItems:nR().optional(),items:nz({anyOf:nW(nz({const:o7(),title:o7()}))}),default:nW(o7()).optional()})]),e2=nL([eQ,eX,e0]),e4=nL([e2,eG,eB,eK]),e6=c.extend({mode:nY("form").optional(),message:o7(),requestedSchema:nz({type:nY("object"),properties:nJ(o7(),e4),required:nW(o7()).optional()}).catchall(nE())}),e9=nL([e6,e3=c.extend({mode:nY("url"),message:o7(),elicitationId:o7(),url:o7().url()})]),e5=l.extend({method:nY("elicitation/create"),params:e9}),e8=p.extend({elicitationId:o7()}),e7=u.extend({method:nY("notifications/elicitation/complete"),params:e8}),te=m.extend({action:nQ(["accept","decline","cancel"]),content:ad(e=>null===e?void 0:e,nJ(o7(),nL([o7(),nR(),nI(),nW(o7())])).optional())}),tt=nz({type:nY("ref/resource"),uri:o7()}),tr=nz({type:nY("ref/prompt"),name:o7()}),ti=d.extend({ref:nL([tr,tt]),argument:nz({name:o7(),value:o7()}),context:nz({arguments:nJ(o7(),o7()).optional()}).optional()}),to=l.extend({method:nY("completion/complete"),params:ti}),tn=m.extend({completion:nD({values:nW(o7()).max(100),total:n4(nR().int()),hasMore:n4(nI())})}),ta=nz({uri:o7().startsWith("file://"),name:o7().optional(),_meta:nJ(o7(),nE()).optional()}),ts=l.extend({method:nY("roots/list"),params:d.optional()}),td=m.extend({roots:nW(ta)}),tc=u.extend({method:nY("notifications/roots/list_changed"),params:p.optional()}),tl=nD({ttl:nR().optional(),pollInterval:nR().optional()}),tp=nQ(["working","input_required","completed","failed","cancelled"]),tu=nz({taskId:o7(),status:tp,ttl:nL([nR(),nj()]),createdAt:o7(),lastUpdatedAt:o7(),pollInterval:n4(nR()),statusMessage:n4(o7())}),tm=m.extend({task:tu}),tf=p.merge(tu),th=u.extend({method:nY("notifications/tasks/status"),params:tf}),ty=l.extend({method:nY("tasks/get"),params:d.extend({taskId:o7()})}),tg=m.merge(tu),t_=l.extend({method:nY("tasks/result"),params:d.extend({taskId:o7()})}),tv=m.loose(),tb=M.extend({method:nY("tasks/list")}),t$=W.extend({tasks:nW(tu)}),tS=l.extend({method:nY("tasks/cancel"),params:d.extend({taskId:o7()})}),{JSONValueSchema:e,JSONObjectSchema:t,ProgressTokenSchema:i,CursorSchema:o,TaskMetadataSchema:n,RelatedTaskMetadataSchema:a,RequestMetaSchema:s,BaseRequestParamsSchema:d,TaskAugmentedRequestParamsSchema:c,RequestSchema:l,NotificationsParamsSchema:p,NotificationSchema:u,ResultSchema:m,RequestIdSchema:f,EmptyResultSchema:h,CancelledNotificationParamsSchema:y,CancelledNotificationSchema:g,IconSchema:_,IconsSchema:v,BaseMetadataSchema:b,ImplementationSchema:$,ClientTasksCapabilitySchema:w,ServerTasksCapabilitySchema:R,ClientCapabilitiesSchema:P,InitializeRequestParamsSchema:V,InitializeRequestSchema:q,ServerCapabilitiesSchema:I,InitializeResultSchema:x,InitializedNotificationSchema:j,PingRequestSchema:C,ProgressSchema:T,ProgressNotificationParamsSchema:O,ProgressNotificationSchema:E,PaginatedRequestParamsSchema:A,PaginatedRequestSchema:M,PaginatedResultSchema:W,ResourceContentsSchema:N,TextResourceContentsSchema:z,BlobResourceContentsSchema:F,RoleSchema:L,AnnotationsSchema:U,ResourceSchema:H,ResourceTemplateSchema:G,ListResourcesRequestSchema:B,ListResourcesResultSchema:K,ListResourceTemplatesRequestSchema:J,ListResourceTemplatesResultSchema:Z,ResourceRequestParamsSchema:Q,ReadResourceRequestParamsSchema:Q,ReadResourceRequestSchema:X,ReadResourceResultSchema:Y,ResourceListChangedNotificationSchema:ee,SubscribeRequestParamsSchema:Q,SubscribeRequestSchema:et,UnsubscribeRequestParamsSchema:Q,UnsubscribeRequestSchema:er,ResourceUpdatedNotificationParamsSchema:ei,ResourceUpdatedNotificationSchema:eo,PromptArgumentSchema:en,PromptSchema:ea,ListPromptsRequestSchema:es,ListPromptsResultSchema:ed,GetPromptRequestParamsSchema:ec,GetPromptRequestSchema:el,TextContentSchema:ep,ImageContentSchema:eu,AudioContentSchema:em,ToolUseContentSchema:ef,EmbeddedResourceSchema:eh,ResourceLinkSchema:ey,ContentBlockSchema:eg,PromptMessageSchema:e_,GetPromptResultSchema:ev,PromptListChangedNotificationSchema:eb,ToolAnnotationsSchema:e$,ToolExecutionSchema:eS,ToolSchema:ek,ListToolsRequestSchema:ew,ListToolsResultSchema:eR,CallToolResultSchema:eP,CallToolRequestParamsSchema:eV,CallToolRequestSchema:eq,ToolListChangedNotificationSchema:eI,LoggingLevelSchema:ex,SetLevelRequestParamsSchema:ej,SetLevelRequestSchema:eC,LoggingMessageNotificationParamsSchema:eT,LoggingMessageNotificationSchema:eO,ModelHintSchema:eE,ModelPreferencesSchema:eA,ToolChoiceSchema:eM,ToolResultContentSchema:eW,SamplingContentSchema:eN,SamplingMessageContentBlockSchema:ez,SamplingMessageSchema:eD,CreateMessageRequestParamsSchema:eF,CreateMessageRequestSchema:eL,CreateMessageResultSchema:eU,CreateMessageResultWithToolsSchema:eH,BooleanSchemaSchema:eG,StringSchemaSchema:eB,NumberSchemaSchema:eK,UntitledSingleSelectEnumSchemaSchema:eJ,TitledSingleSelectEnumSchemaSchema:eZ,LegacyTitledEnumSchemaSchema:eQ,SingleSelectEnumSchemaSchema:eX,UntitledMultiSelectEnumSchemaSchema:eY,TitledMultiSelectEnumSchemaSchema:e1,MultiSelectEnumSchemaSchema:e0,EnumSchemaSchema:e2,PrimitiveSchemaDefinitionSchema:e4,ElicitRequestFormParamsSchema:e6,ElicitRequestURLParamsSchema:e3,ElicitRequestParamsSchema:e9,ElicitRequestSchema:e5,ElicitationCompleteNotificationParamsSchema:e8,ElicitationCompleteNotificationSchema:e7,ElicitResultSchema:te,ResourceTemplateReferenceSchema:tt,PromptReferenceSchema:tr,CompleteRequestParamsSchema:ti,CompleteRequestSchema:to,CompleteResultSchema:tn,RootSchema:ta,ListRootsRequestSchema:ts,ListRootsResultSchema:td,RootsListChangedNotificationSchema:tc,TaskCreationParamsSchema:tl,TaskStatusSchema:tp,TaskSchema:tu,CreateTaskResultSchema:tm,TaskStatusNotificationParamsSchema:tf,TaskStatusNotificationSchema:th,GetTaskRequestSchema:ty,GetTaskResultSchema:tg,GetTaskPayloadRequestSchema:t_,GetTaskPayloadResultSchema:tv,ListTasksRequestSchema:tb,ListTasksResultSchema:t$,CancelTaskRequestSchema:tS,CancelTaskResultSchema:m.merge(tu),ClientRequestSchema:nL([C,q,to,eC,el,es,B,J,X,et,er,eq,ew,ty,t_,tb,tS]),ClientNotificationSchema:nL([g,E,j,tc,th]),ClientResultSchema:nL([h,eU,eH,te,td,tg,t$,tm]),ServerRequestSchema:nL([C,eL,e5,ts,ty,t_,tb,tS]),ServerNotificationSchema:nL([g,E,eO,eo,ee,eI,eb,th,e7]),ServerResultSchema:nL([h,x,tn,ev,ed,K,Z,Y,eP,eR,tg,t$,tm]),CallToolResultWireSchema:nE().superRefine((e,t)=>{if(!("object"!=typeof e||null===e||Array.isArray(e))&&void 0===e.content){for(let r of c$)if(r in e)return void t.addIssue({code:"custom",message:`content is required when the body carries '${r}' — another result family cannot default into an empty tools/call success`})}}).transform(cS).pipe(eP)})}function cw(e){return"object"!==e.type}let cR=new Set(["const","enum","default","examples"]),cP=new Set(["properties","patternProperties","$defs","definitions","dependentSchemas","dependencies"]);function cV(e){return void 0!==e&&!("string"==typeof e&&e.startsWith("#"))}let cq={ping:null,initialize:null,"completion/complete":null,"logging/setLevel":null,"prompts/get":null,"prompts/list":null,"resources/list":null,"resources/templates/list":null,"resources/read":null,"resources/subscribe":null,"resources/unsubscribe":null,"tools/call":null,"tools/list":null,"tasks/get":null,"tasks/result":null,"tasks/list":null,"tasks/cancel":null,"sampling/createMessage":null,"elicitation/create":null,"roots/list":null},cI={"notifications/cancelled":null,"notifications/progress":null,"notifications/initialized":null,"notifications/roots/list_changed":null,"notifications/tasks/status":null,"notifications/message":null,"notifications/resources/updated":null,"notifications/resources/list_changed":null,"notifications/tools/list_changed":null,"notifications/prompts/list_changed":null,"notifications/elicitation/complete":null},cx={ping:null,initialize:null,"completion/complete":null,"logging/setLevel":null,"prompts/get":null,"prompts/list":null,"resources/list":null,"resources/templates/list":null,"resources/read":null,"resources/subscribe":null,"resources/unsubscribe":null,"tools/call":null,"tools/list":null,"sampling/createMessage":null,"elicitation/create":null,"roots/list":null};function cj(){if(i)return i;let e=ck();return i={requestSchemas:{ping:e.PingRequestSchema,initialize:e.InitializeRequestSchema,"completion/complete":e.CompleteRequestSchema,"logging/setLevel":e.SetLevelRequestSchema,"prompts/get":e.GetPromptRequestSchema,"prompts/list":e.ListPromptsRequestSchema,"resources/list":e.ListResourcesRequestSchema,"resources/templates/list":e.ListResourceTemplatesRequestSchema,"resources/read":e.ReadResourceRequestSchema,"resources/subscribe":e.SubscribeRequestSchema,"resources/unsubscribe":e.UnsubscribeRequestSchema,"tools/call":e.CallToolRequestSchema,"tools/list":e.ListToolsRequestSchema,"tasks/get":e.GetTaskRequestSchema,"tasks/result":e.GetTaskPayloadRequestSchema,"tasks/list":e.ListTasksRequestSchema,"tasks/cancel":e.CancelTaskRequestSchema,"sampling/createMessage":e.CreateMessageRequestSchema,"elicitation/create":e.ElicitRequestSchema,"roots/list":e.ListRootsRequestSchema},notificationSchemas:{"notifications/cancelled":e.CancelledNotificationSchema,"notifications/progress":e.ProgressNotificationSchema,"notifications/initialized":e.InitializedNotificationSchema,"notifications/roots/list_changed":e.RootsListChangedNotificationSchema,"notifications/tasks/status":e.TaskStatusNotificationSchema,"notifications/message":e.LoggingMessageNotificationSchema,"notifications/resources/updated":e.ResourceUpdatedNotificationSchema,"notifications/resources/list_changed":e.ResourceListChangedNotificationSchema,"notifications/tools/list_changed":e.ToolListChangedNotificationSchema,"notifications/prompts/list_changed":e.PromptListChangedNotificationSchema,"notifications/elicitation/complete":e.ElicitationCompleteNotificationSchema},resultSchemas:{ping:e.EmptyResultSchema,initialize:e.InitializeResultSchema,"completion/complete":e.CompleteResultSchema,"logging/setLevel":e.EmptyResultSchema,"prompts/get":e.GetPromptResultSchema,"prompts/list":e.ListPromptsResultSchema,"resources/list":e.ListResourcesResultSchema,"resources/templates/list":e.ListResourceTemplatesResultSchema,"resources/read":e.ReadResourceResultSchema,"resources/subscribe":e.EmptyResultSchema,"resources/unsubscribe":e.EmptyResultSchema,"tools/call":e.CallToolResultWireSchema,"tools/list":e.ListToolsResultSchema,"sampling/createMessage":e.CreateMessageResultWithToolsSchema,"elicitation/create":e.ElicitResultSchema,"roots/list":e.ListRootsResultSchema}}}function cC(e){return Object.prototype.hasOwnProperty.call(cq,e)}function cT(e){return Object.prototype.hasOwnProperty.call(cI,e)}function cO(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)}function cE(e,t){if(void 0===e)return{ok:!1,reason:"not-in-era"};let r=e.safeParse(t);return r.success?{ok:!0,value:r.data}:{ok:!1,reason:"invalid",message:String(r.error)}}Object.keys(cq),Object.keys(cI);let cA={ok:!1,reason:"not-in-era"};function cM(e){return cO(e)&&cO(e.outputSchema)&&cw(e.outputSchema)}let cW={era:"2025-11-25",hasRequestMethod:cC,hasNotificationMethod:cT,validateRequest:(e,t)=>cE(cC(e)?cj().requestSchemas[e]:void 0,t),validateResult:(e,t)=>cE(Object.prototype.hasOwnProperty.call(cx,e)?cj().resultSchemas[e]:void 0,t),validateNotification:(e,t)=>cE(cT(e)?cj().notificationSchemas[e]:void 0,t),hasInputRequestMethod:()=>!1,validateInputRequest:()=>cA,validateInputResponse:()=>cA,samplingResultVariant:(e,t)=>{let r=ck();return cE(e?r.CreateMessageResultWithToolsSchema:r.CreateMessageResultSchema,t)},outboundEnvelope:e=>void 0,validateEnvelopeMeta:e=>[],projectCallToolResult(e,t){let r=cb(e),i=r.structuredContent;if(void 0===i)return r;let o="object"!=typeof i||null===i||Array.isArray(i),n=void 0!==t&&cw(t);return o||n?{...r,structuredContent:{result:i}}:r},decodeResult(e,t){if(cO(t)&&"resultType"in t){let e={...t};return delete e.resultType,{kind:"complete",result:e}}return{kind:"complete",result:t}},encodeResult(e,t){if("tools/list"!==e)return t;let r=t.tools;return Array.isArray(r)&&r.some(e=>cM(e))?{...t,tools:r.map(e=>cM(e)?{...e,outputSchema:function(e){var t;let r="string"==typeof e.$schema?e.$schema:void 0;if(cV(e.$id))return{...void 0!==r&&{$schema:r},type:"object",properties:{result:e},required:["result"]};let i="string"==typeof(t=e.$schema)&&ek.has(t.replace(/#$/,""))&&!0!==e.$recursiveAnchor,o=(e,t)=>{if(Array.isArray(e))return e.map(e=>o(e,!1));if(null===e||"object"!=typeof e||!t&&cV(e.$id))return e;let r={},n=!1;for(let[a,s]of Object.entries(e))t?r[a]=o(s,!1):("$ref"===a||"$dynamicRef"===a)&&"string"==typeof s?r[a]="#"===s?"#/properties/result":s.startsWith("#/")?`#/properties/result${s.slice(1)}`:s:"$recursiveRef"===a&&"#"===s&&i?n=!0:cR.has(a)?r[a]=s:cP.has(a)?r[a]=o(s,!0):r[a]=o(s,!1);return n&&("$ref"in r?r.allOf=[...Array.isArray(r.allOf)?r.allOf:[],{$ref:"#/properties/result"}]:r.$ref="#/properties/result"),r};return{...void 0!==r&&{$schema:r},type:"object",properties:{result:o(e,!1)},required:["result"]}}(e.outputSchema)}:e)}:t},encodeErrorCode:e=>-32002===e?-32602:e,checkInboundEnvelope:e=>void 0};function cN(){return o??=function(){let e=aa(()=>nL([o7(),nR(),nI(),nj(),nJ(o7(),e),nW(e)])),t=nJ(o7(),e),r=nL([o7(),nR().int()]),i=o7(),o=nL([o7(),nR().int()]),n=nQ(["user","assistant"]),a=nQ(["debug","info","notice","warning","error","critical","alert","emergency"]),s=o7().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:"Invalid Base64 string"}),d=nz({ttl:nR().optional()}),c=nz({taskId:o7()}),l=nD({progressToken:r.optional(),"io.modelcontextprotocol/related-task":c.optional()}),p=nz({_meta:l.optional()}),u=p.extend({task:d.optional()}),m=nz({_meta:l.optional()}),f=nz({method:o7(),params:m.loose().optional()}),h=nz({src:o7(),mimeType:o7().optional(),sizes:nW(o7()).optional(),theme:nQ(["light","dark"]).optional()}),y=nz({icons:nW(h).optional()}),g=nz({name:o7(),title:o7().optional()}),_=g.extend({...g.shape,...y.shape,version:o7(),websiteUrl:o7().optional(),description:o7().optional()}),v=nB(nz({applyDefaults:nI().optional()}),t),b=ad(e=>e&&"object"==typeof e&&!Array.isArray(e)&&0===Object.keys(e).length?{form:{}}:e,nB(nz({form:v.optional(),url:t.optional()}),t.optional())),$=nD({list:t.optional(),cancel:t.optional(),requests:nD({sampling:nD({createMessage:t.optional()}).optional(),elicitation:nD({create:t.optional()}).optional()}).optional()}),S=nD({list:t.optional(),cancel:t.optional(),requests:nD({tools:nD({call:t.optional()}).optional()}).optional()}),k=nz({experimental:nJ(o7(),t).optional(),sampling:nz({context:t.optional(),tools:t.optional()}).optional(),elicitation:b.optional(),roots:nz({listChanged:nI().optional()}).optional(),tasks:$.optional(),extensions:nJ(o7(),t).optional()}),w=nz({experimental:nJ(o7(),t).optional(),logging:t.optional(),completions:t.optional(),prompts:nz({listChanged:nI().optional()}).optional(),resources:nz({subscribe:nI().optional(),listChanged:nI().optional()}).optional(),tools:nz({listChanged:nI().optional()}).optional(),tasks:S.optional(),extensions:nJ(o7(),t).optional()}),R=nz({progress:nR(),total:n4(nR()),message:n4(o7())}),P=nz({...m.shape,...R.shape,progressToken:r}),V=f.extend({method:nY("notifications/progress"),params:P}),q=m.extend({level:a,logger:o7().optional(),data:nE()}),I=f.extend({method:nY("notifications/message"),params:q}),x=nz({uri:o7(),mimeType:n4(o7()),_meta:nJ(o7(),nE()).optional()}),j=x.extend({text:o7()}),C=x.extend({blob:s}),T=nz({audience:nW(n).optional(),priority:nR().min(0).max(1).optional(),lastModified:ac({offset:!0}).optional()}),O=nz({...g.shape,...y.shape,uri:o7(),description:n4(o7()),mimeType:n4(o7()),size:n4(nR()),annotations:T.optional(),_meta:n4(nD({}))}),E=nz({...g.shape,...y.shape,uriTemplate:o7(),description:n4(o7()),mimeType:n4(o7()),annotations:T.optional(),_meta:n4(nD({}))}),A=f.extend({method:nY("notifications/resources/list_changed"),params:m.optional()}),M=m.extend({uri:o7()}),W=f.extend({method:nY("notifications/resources/updated"),params:M}),N=nz({name:o7(),description:n4(o7()),required:n4(nI())}),z=nz({...g.shape,...y.shape,description:n4(o7()),arguments:n4(nW(N)),_meta:n4(nD({}))}),D=f.extend({method:nY("notifications/prompts/list_changed"),params:m.optional()}),F=nz({type:nY("text"),text:o7(),annotations:T.optional(),_meta:nJ(o7(),nE()).optional()}),L=nz({type:nY("image"),data:s,mimeType:o7(),annotations:T.optional(),_meta:nJ(o7(),nE()).optional()}),U=nz({type:nY("audio"),data:s,mimeType:o7(),annotations:T.optional(),_meta:nJ(o7(),nE()).optional()}),H=nz({type:nY("tool_use"),name:o7(),id:o7(),input:nJ(o7(),nE()),_meta:nJ(o7(),nE()).optional()}),G=nz({type:nY("resource"),resource:nL([j,C]),annotations:T.optional(),_meta:nJ(o7(),nE()).optional()}),B=O.extend({type:nY("resource_link")}),K=nL([F,L,U,B,G]),J=nz({role:n,content:K}),Z=nz({title:o7().optional(),readOnlyHint:nI().optional(),destructiveHint:nI().optional(),idempotentHint:nI().optional(),openWorldHint:nI().optional()}),Q=f.extend({method:nY("notifications/tools/list_changed"),params:m.optional()}),X=nz({name:o7().optional()}),Y=nz({hints:nW(X).optional(),costPriority:nR().min(0).max(1).optional(),speedPriority:nR().min(0).max(1).optional(),intelligencePriority:nR().min(0).max(1).optional()}),ee=nz({mode:nQ(["auto","required","none"]).optional()}),et=nz({type:nY("boolean"),title:o7().optional(),description:o7().optional(),default:nI().optional()}),er=nz({type:nY("string"),title:o7().optional(),description:o7().optional(),minLength:nR().optional(),maxLength:nR().optional(),format:nQ(["email","uri","date","date-time"]).optional(),default:o7().optional()}),ei=nz({type:nQ(["number","integer"]),title:o7().optional(),description:o7().optional(),minimum:nR().optional(),maximum:nR().optional(),default:nR().optional()}),eo=nz({type:nY("string"),title:o7().optional(),description:o7().optional(),enum:nW(o7()),default:o7().optional()}),en=nz({type:nY("string"),title:o7().optional(),description:o7().optional(),oneOf:nW(nz({const:o7(),title:o7()})),default:o7().optional()}),ea=nz({type:nY("string"),title:o7().optional(),description:o7().optional(),enum:nW(o7()),enumNames:nW(o7()).optional(),default:o7().optional()}),es=nL([eo,en]),ed=nz({type:nY("array"),title:o7().optional(),description:o7().optional(),minItems:nR().optional(),maxItems:nR().optional(),items:nz({type:nY("string"),enum:nW(o7())}),default:nW(o7()).optional()}),ec=nz({type:nY("array"),title:o7().optional(),description:o7().optional(),minItems:nR().optional(),maxItems:nR().optional(),items:nz({anyOf:nW(nz({const:o7(),title:o7()}))}),default:nW(o7()).optional()}),el=nL([ed,ec]),ep=nL([ea,es,el]),eu=nL([ep,et,er,ei]),em=u.extend({mode:nY("form").optional(),message:o7(),requestedSchema:nz({type:nY("object"),properties:nJ(o7(),eu),required:nW(o7()).optional()}).catchall(nE())}),ef=nz({type:nY("ref/resource"),uri:o7()}),eh=nz({type:nY("ref/prompt"),name:o7()}),ey=nz({uri:o7().startsWith("file://"),name:o7().optional(),_meta:nJ(o7(),nE()).optional()}),eg=k.shape,e_=nz({experimental:eg.experimental,sampling:eg.sampling,elicitation:eg.elicitation,roots:eg.roots,extensions:eg.extensions}),ev=w.shape,eb=nz({experimental:ev.experimental,logging:ev.logging,completions:ev.completions,prompts:ev.prompts,resources:ev.resources,tools:ev.tools,extensions:ev.extensions}),e$=nD({progressToken:r.optional(),[au]:o7(),[am]:_.optional(),[ah]:e_,[ay]:a.optional()}),eS=nz({...g.shape,...y.shape,description:o7().optional(),inputSchema:nD({$schema:o7().optional(),type:nY("object")}),outputSchema:nD({$schema:o7().optional()}).optional(),annotations:Z.optional(),_meta:nJ(o7(),nE()).optional()}),ek=nz({type:nY("tool_result"),toolUseId:o7(),content:nW(K),structuredContent:nE().optional(),isError:nI().optional(),_meta:nJ(o7(),nE()).optional()}),ew=nL([F,L,U,H,ek]),eR=nz({role:n,content:nL([ew,nW(ew)]),_meta:nJ(o7(),nE()).optional()}),eP=o7(),eV=nD({[af]:_.optional().catch(void 0)}),eq=eV.optional();function eI(e){return nD({_meta:eq,resultType:eP.default("complete"),...e})}let ex=eI({}),ej=eI({nextCursor:i.optional()}),eC=eI({content:nW(K),structuredContent:nE().optional(),isError:nI().optional()}),eT=eI({ttlMs:nR().int().min(0),cacheScope:nQ(["public","private"]),tools:nW(eS),nextCursor:i.optional()}),eO=eI({ttlMs:nR().int().min(0),cacheScope:nQ(["public","private"]),prompts:nW(z),nextCursor:i.optional()}),eE=eI({description:o7().optional(),messages:nW(J)}),eA=eI({ttlMs:nR().int().min(0),cacheScope:nQ(["public","private"]),resources:nW(O),nextCursor:i.optional()}),eM=eI({ttlMs:nR().int().min(0),cacheScope:nQ(["public","private"]),resourceTemplates:nW(E),nextCursor:i.optional()}),eW=eI({ttlMs:nR().int().min(0),cacheScope:nQ(["public","private"]),contents:nW(nL([j,C]))}),eN=eI({completion:nz({values:nW(o7()).max(100),total:nR().int().optional(),hasMore:nI().optional()}).loose()}),ez=eI({ttlMs:nR().int().min(0),cacheScope:nQ(["public","private"])}),eD=eI({ttlMs:nR().int().min(0).catch(0),cacheScope:nQ(["public","private"]).catch("private"),supportedVersions:nW(o7()),capabilities:eb,instructions:o7().optional()}),eF=nz({messages:nW(eR),modelPreferences:Y.optional(),systemPrompt:o7().optional(),includeContext:nQ(["none","thisServer","allServers"]).optional(),temperature:nR().optional(),maxTokens:nR().int(),stopSequences:nW(o7()).optional(),metadata:t.optional(),tools:nW(eS).optional(),toolChoice:ee.optional()}),eL=nz({method:nY("sampling/createMessage"),params:eF}),eU=nz({method:nY("roots/list"),params:nz({_meta:nJ(o7(),nE()).optional()}).optional()}),eH=nz({...eR.shape,model:o7(),stopReason:o7().optional()}),eG=nz({roots:nW(ey)}),eB=nz({action:nQ(["accept","decline","cancel"]),content:nJ(o7(),nL([o7(),nR(),nI(),nW(o7())])).optional()}),eK=nz({mode:nY("url"),message:o7(),url:o7().url()}),eJ=nL([em,eK]),eZ=nz({method:nY("elicitation/create"),params:eJ}),eQ=nL([eL,eU,eZ]),eX=nL([eH,eG,eB]),eY=nJ(o7(),eQ),e1=nJ(o7(),eX),e0=eI({inputRequests:eY.optional(),requestState:o7().optional()}),e2={inputResponses:e1.optional(),requestState:o7().optional()},e4=nz({_meta:e$,...e2}),e6=nD({progressToken:r.optional()});function e3(e,t){return nz({method:nY(e),params:nz({_meta:e$,...t})})}function e9(e,t){return nz({method:nY(e),params:nz({_meta:e6.optional(),...t}).optional()})}let e5={name:o7(),arguments:nJ(o7(),nE()).optional(),...e2},e8={cursor:i.optional()},e7=e3("tools/call",e5),te=e3("tools/list",e8),tt=e3("prompts/list",e8),tr=e3("prompts/get",{name:o7(),arguments:nJ(o7(),o7()).optional(),...e2}),ti=e3("resources/list",e8),to=e3("resources/templates/list",e8),tn=e3("resources/read",{uri:o7(),...e2}),ta={ref:nL([eh,ef]),argument:nz({name:o7(),value:o7()}),context:nz({arguments:nJ(o7(),o7()).optional()}).optional()},ts=e3("completion/complete",ta),td=e3("server/discover",{}),tc=nz({toolsListChanged:nI().optional(),promptsListChanged:nI().optional(),resourcesListChanged:nI().optional(),resourceSubscriptions:nW(o7()).optional()}),tl={notifications:tc},tp=e3("subscriptions/listen",tl),tu=eV.extend({"io.modelcontextprotocol/subscriptionId":o}),tm=nD({_meta:tu,resultType:eP.default("complete")}),tf={"tools/call":e9("tools/call",e5),"tools/list":e9("tools/list",e8),"prompts/get":e9("prompts/get",{name:o7(),arguments:nJ(o7(),o7()).optional()}),"prompts/list":e9("prompts/list",e8),"resources/list":e9("resources/list",e8),"resources/templates/list":e9("resources/templates/list",e8),"resources/read":e9("resources/read",{uri:o7()}),"completion/complete":e9("completion/complete",ta),"server/discover":e9("server/discover",{}),"subscriptions/listen":e9("subscriptions/listen",tl)};function th(e){return nD({_meta:eq,...e})}let ty={"tools/call":th({content:nW(K),structuredContent:nE().optional(),isError:nI().optional()}),"tools/list":th({ttlMs:nR().int().min(0),cacheScope:nQ(["public","private"]),tools:nW(eS),nextCursor:i.optional()}),"prompts/get":th({description:o7().optional(),messages:nW(J)}),"prompts/list":th({ttlMs:nR().int().min(0),cacheScope:nQ(["public","private"]),prompts:nW(z),nextCursor:i.optional()}),"resources/list":th({ttlMs:nR().int().min(0),cacheScope:nQ(["public","private"]),resources:nW(O),nextCursor:i.optional()}),"resources/templates/list":th({ttlMs:nR().int().min(0),cacheScope:nQ(["public","private"]),resourceTemplates:nW(E),nextCursor:i.optional()}),"resources/read":th({ttlMs:nR().int().min(0),cacheScope:nQ(["public","private"]),contents:nW(nL([j,C]))}),"completion/complete":th({completion:nz({values:nW(o7()).max(100),total:nR().int().optional(),hasMore:nI().optional()}).loose()}),"server/discover":th({ttlMs:nR().int().min(0).catch(0),cacheScope:nQ(["public","private"]).catch("private"),supportedVersions:nW(o7()),capabilities:eb,instructions:o7().optional()}),"subscriptions/listen":th({})},tg=nD({"io.modelcontextprotocol/subscriptionId":o.optional()}),t_=nz({method:nY("notifications/subscriptions/acknowledged"),params:nz({_meta:tg.optional(),notifications:tc})}),tv=nz({_meta:tg.optional(),requestId:o,reason:o7().optional()}),tb=nz({method:nY("notifications/cancelled"),params:tv}),t$=e=>nz({jsonrpc:nY("2.0"),id:nL([o7(),nR().int()]),result:e}).strict();return{JSONValueSchema:e,JSONObjectSchema:t,ProgressTokenSchema:r,CursorSchema:i,RequestIdSchema:o,RoleSchema:n,LoggingLevelSchema:a,TaskMetadataSchema:d,RelatedTaskMetadataSchema:c,RequestMetaSchema:l,BaseRequestParamsSchema:p,TaskAugmentedRequestParamsSchema:u,NotificationsParamsSchema:m,NotificationSchema:f,IconSchema:h,IconsSchema:y,BaseMetadataSchema:g,ImplementationSchema:_,ClientTasksCapabilitySchema:$,ServerTasksCapabilitySchema:S,ClientCapabilitiesSchema:k,ServerCapabilitiesSchema:w,ProgressSchema:R,ProgressNotificationParamsSchema:P,ProgressNotificationSchema:V,LoggingMessageNotificationParamsSchema:q,LoggingMessageNotificationSchema:I,ResourceContentsSchema:x,TextResourceContentsSchema:j,BlobResourceContentsSchema:C,AnnotationsSchema:T,ResourceSchema:O,ResourceTemplateSchema:E,ResourceListChangedNotificationSchema:A,ResourceUpdatedNotificationParamsSchema:M,ResourceUpdatedNotificationSchema:W,PromptArgumentSchema:N,PromptSchema:z,PromptListChangedNotificationSchema:D,TextContentSchema:F,ImageContentSchema:L,AudioContentSchema:U,ToolUseContentSchema:H,EmbeddedResourceSchema:G,ResourceLinkSchema:B,ContentBlockSchema:K,PromptMessageSchema:J,ToolAnnotationsSchema:Z,ToolListChangedNotificationSchema:Q,ModelHintSchema:X,ModelPreferencesSchema:Y,ToolChoiceSchema:ee,BooleanSchemaSchema:et,StringSchemaSchema:er,NumberSchemaSchema:ei,UntitledSingleSelectEnumSchemaSchema:eo,TitledSingleSelectEnumSchemaSchema:en,LegacyTitledEnumSchemaSchema:ea,SingleSelectEnumSchemaSchema:es,UntitledMultiSelectEnumSchemaSchema:ed,TitledMultiSelectEnumSchemaSchema:ec,MultiSelectEnumSchemaSchema:el,EnumSchemaSchema:ep,PrimitiveSchemaDefinitionSchema:eu,ElicitRequestFormParamsSchema:em,ResourceTemplateReferenceSchema:ef,PromptReferenceSchema:eh,RootSchema:ey,ClientCapabilities2026Schema:e_,ServerCapabilities2026Schema:eb,RequestMetaEnvelopeSchema:e$,ToolSchema:eS,ToolResultContentSchema:ek,SamplingMessageContentBlockSchema:ew,SamplingMessageSchema:eR,ResultTypeSchema:eP,ResultMetaSchema:eV,ResultSchema:ex,PaginatedResultSchema:ej,CallToolResultSchema:eC,ListToolsResultSchema:eT,ListPromptsResultSchema:eO,GetPromptResultSchema:eE,ListResourcesResultSchema:eA,ListResourceTemplatesResultSchema:eM,ReadResourceResultSchema:eW,CompleteResultSchema:eN,CacheableResultSchema:ez,DiscoverResultSchema:eD,CreateMessageRequestParamsSchema:eF,CreateMessageRequestSchema:eL,ListRootsRequestSchema:eU,CreateMessageResultSchema:eH,ListRootsResultSchema:eG,ElicitResultSchema:eB,ElicitRequestURLParamsSchema:eK,ElicitRequestParamsSchema:eJ,ElicitRequestSchema:eZ,InputRequestSchema:eQ,InputResponseSchema:eX,InputRequestsSchema:eY,InputResponsesSchema:e1,InputRequiredResultSchema:e0,InputResponseRequestParamsSchema:e4,CallToolRequestSchema:e7,ListToolsRequestSchema:te,ListPromptsRequestSchema:tt,GetPromptRequestSchema:tr,ListResourcesRequestSchema:ti,ListResourceTemplatesRequestSchema:to,ReadResourceRequestSchema:tn,CompleteRequestSchema:ts,DiscoverRequestSchema:td,SubscriptionFilterSchema:tc,SubscriptionsListenRequestSchema:tp,SubscriptionsListenResultMetaSchema:tu,SubscriptionsListenResultSchema:tm,dispatchRequestSchemas:tf,dispatchResultSchemas:ty,NotificationMetaSchema:tg,SubscriptionsAcknowledgedNotificationSchema:t_,CancelledNotificationParamsSchema:tv,CancelledNotificationSchema:tb,notificationSchemas2026:{"notifications/cancelled":tb,"notifications/progress":V,"notifications/message":I,"notifications/resources/updated":W,"notifications/resources/list_changed":A,"notifications/tools/list_changed":Q,"notifications/prompts/list_changed":D,"notifications/subscriptions/acknowledged":t_},JSONRPCResultResponseSchema:t$(ex),CallToolResultResponseSchema:t$(nL([eC,e0])),ListToolsResultResponseSchema:t$(eT),ListPromptsResultResponseSchema:t$(eO),GetPromptResultResponseSchema:t$(nL([eE,e0])),ListResourcesResultResponseSchema:t$(eA),ListResourceTemplatesResultResponseSchema:t$(eM),ReadResourceResultResponseSchema:t$(nL([eW,e0])),CompleteResultResponseSchema:t$(eN),DiscoverResultResponseSchema:t$(eD),SubscriptionsListenResultResponseSchema:t$(tm)}}()}let cz=["tools/list","prompts/list","resources/list","resources/templates/list","resources/read","server/discover"],cD=Symbol("modelcontextprotocol.resultCacheHintFallback");function cF(e,t){if(void 0===t)return e;let r=e[cD];if(void 0===r)return{...e,[cD]:t};let i={},o=r.ttlMs??t.ttlMs;void 0!==o&&(i.ttlMs=o);let n=r.cacheScope??t.cacheScope;return void 0!==n&&(i.cacheScope=n),{...e,[cD]:i}}function cL(e){return"number"==typeof e&&Number.isSafeInteger(e)&&e>=0}function cU(e){return"public"===e||"private"===e}function cH(e,t){if(void 0!==e.ttlMs&&!cL(e.ttlMs))throw RangeError(`Invalid cache hint for ${t}: ttlMs must be a non-negative safe integer (got ${String(e.ttlMs)})`);if(void 0!==e.cacheScope&&!cU(e.cacheScope))throw RangeError(`Invalid cache hint for ${t}: cacheScope must be 'public' or 'private' (got ${String(e.cacheScope)})`)}let cG=((Z={})[Z.ParseError=-32700]="ParseError",Z[Z.InvalidRequest=-32600]="InvalidRequest",Z[Z.MethodNotFound=-32601]="MethodNotFound",Z[Z.InvalidParams=-32602]="InvalidParams",Z[Z.InternalError=-32603]="InternalError",Z[Z.ResourceNotFound=-32002]="ResourceNotFound",Z[Z.MissingRequiredClientCapability=-32021]="MissingRequiredClientCapability",Z[Z.UnsupportedProtocolVersion=-32022]="UnsupportedProtocolVersion",Z[Z.UrlElicitationRequired=-32042]="UrlElicitationRequired",Z);var cB=class e extends Error{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.ProtocolError"})}static[Symbol.hasInstance](e){return cl(this,e)}static isInstance(e){if("function"!=typeof this)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return cl(this,e)}constructor(e,t,r){super(t),this.code=e,this.data=r,this.name="ProtocolError",cc(this,new.target)}static fromError(t,r,i){return t===cG.UrlElicitationRequired&&i&&i.elicitations?new cJ(i.elicitations,r):t===cG.UnsupportedProtocolVersion&&i&&Array.isArray(i.supported)&&"string"==typeof i.requested?new cZ({supported:i.supported,requested:i.requested},r):(t===cG.InvalidParams||t===cG.ResourceNotFound)&&"string"==typeof i?.uri&&(t===cG.ResourceNotFound||1===Object.keys(i).length)?new cK(i.uri,r):t===cG.MissingRequiredClientCapability&&i&&null!==i.requiredCapabilities&&"object"==typeof i.requiredCapabilities&&!Array.isArray(i.requiredCapabilities)?new cQ({requiredCapabilities:i.requiredCapabilities},r):new e(t,r,i)}},cK=class extends cB{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.ResourceNotFoundError"})}constructor(e,t=`Resource not found: ${e}`){super(cG.InvalidParams,t,{uri:e})}get uri(){return this.data.uri}},cJ=class extends cB{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.UrlElicitationRequiredError"})}constructor(e,t=`URL elicitation${e.length>1?"s":""} required`){super(cG.UrlElicitationRequired,t,{elicitations:e})}get elicitations(){return this.data?.elicitations??[]}},cZ=class extends cB{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.UnsupportedProtocolVersionError"})}constructor(e,t=`Unsupported protocol version: ${e.requested}`){super(cG.UnsupportedProtocolVersion,t,e)}get supported(){return this.data.supported}get requested(){return this.data.requested}},cQ=class extends cB{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.MissingRequiredClientCapabilityError"})}constructor(e,t=`Missing required client capabilities: ${Object.keys(e.requiredCapabilities).join(", ")}`){super(cG.MissingRequiredClientCapability,t,e)}get requiredCapabilities(){return this.data.requiredCapabilities}};let cX=["tools/call","prompts/get","resources/read"],cY=["elicitation/create","sampling/createMessage","roots/list"];function c1(){if(n)return n;let e=cN();return n={request:{"elicitation/create":nz({method:nY("elicitation/create"),params:e.ElicitRequestParamsSchema}),"sampling/createMessage":nz({method:nY("sampling/createMessage"),params:e.CreateMessageRequestParamsSchema}),"roots/list":nz({method:nY("roots/list"),params:nD({}).optional()})},response:{"elicitation/create":e.ElicitResultSchema,"sampling/createMessage":e.CreateMessageResultSchema,"roots/list":e.ListRootsResultSchema}}}function c0(e){return cY.includes(e)}function c2(e){return c0(e)?c1().request[e]:void 0}let c4={"tools/call":null,"tools/list":null,"prompts/get":null,"prompts/list":null,"resources/list":null,"resources/templates/list":null,"resources/read":null,"completion/complete":null,"server/discover":null,"subscriptions/listen":null},c6={"notifications/cancelled":null,"notifications/progress":null,"notifications/message":null,"notifications/resources/updated":null,"notifications/resources/list_changed":null,"notifications/tools/list_changed":null,"notifications/prompts/list_changed":null,"notifications/subscriptions/acknowledged":null};function c3(e){return Object.prototype.hasOwnProperty.call(c4,e)}function c9(e){return Object.prototype.hasOwnProperty.call(c6,e)}function c5(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)}function c8(e,t){if(void 0===e)return{ok:!1,reason:"not-in-era"};let r=e.safeParse(t);return r.success?{ok:!0,value:r.data}:{ok:!1,reason:"invalid",message:String(r.error)}}Object.keys(c4),Object.keys(c6);let c7={ok:!1,reason:"not-in-era"},le=[au,ah],lt={era:"2026-07-28",hasRequestMethod:c3,hasNotificationMethod:c9,hasInputRequestMethod:e=>void 0!==c2(e),validateRequest:(e,t)=>c8(c3(e)?cN().dispatchRequestSchemas[e]:void 0,t),validateResult:(e,t)=>c8(Object.prototype.hasOwnProperty.call(c4,e)?cN().dispatchResultSchemas[e]:void 0,t),validateNotification:(e,t)=>c8(c9(e)?cN().notificationSchemas2026[e]:void 0,t),validateInputRequest:(e,t)=>c8(c2(e),t),validateInputResponse:(e,t)=>c8(c0(e)?c1().response[e]:void 0,t),samplingResultVariant:()=>c7,outboundEnvelope:e=>({[au]:e.protocolVersion,[am]:e.clientInfo,[ah]:e.clientCapabilities,...void 0!==e.logLevel&&{[ay]:e.logLevel}}),validateEnvelopeMeta(e){let t=[];for(let r of le)r in e||t.push({key:r,problem:"missing"});let r=cN().RequestMetaEnvelopeSchema.safeParse(e);if(!r.success)for(let e of r.error.issues){let r=e.path.map(String),i=r.length>0?r.join("."):"_meta";1===r.length&&t.some(e=>e.key===i&&"missing"===e.problem)||t.push({key:i,problem:e.message})}return t},projectCallToolResult:e=>cb(e),inputRequestSchema:c2,decodeResult(e,t){if(!c5(t))return{kind:"invalid",error:new cf(cm.InvalidResult,`Invalid result for ${e}: not an object`,{method:e})};let r=t.resultType;if(void 0===r)return{kind:"invalid",error:new cf(cm.InvalidResult,`Invalid result for ${e}: missing required resultType — servers implementing protocol revision 2026-07-28 MUST include it (the absent-means-complete bridge applies only to earlier-revision servers)`,{method:e,violation:"missing-resultType"})};if("string"!=typeof r)return{kind:"invalid",error:new cf(cm.InvalidResult,`Invalid result for ${e}: non-string resultType`,{method:e,resultType:r})};if("input_required"===r){let r=t.inputRequests,i=c5(r)?r:{},o=t.requestState,n=void 0===t._meta?void 0:cN().ResultMetaSchema.safeParse(t._meta),a=n?.success?n.data:void 0;return 0===Object.keys(i).length&&"string"!=typeof o?{kind:"invalid",error:new cf(cm.InvalidResult,`Invalid result for ${e}: input_required carries neither inputRequests nor requestState (every input_required result must include at least one of the two)`,{method:e,violation:"input-required-missing-both"})}:{kind:"input_required",inputRequests:i,..."string"==typeof o&&{requestState:o},...void 0!==a&&{_meta:a}}}if("complete"!==r)return{kind:"invalid",error:new cf(cm.UnsupportedResultType,`Unsupported result type '${r}' for ${e}`,{resultType:r,method:e})};let i=function(){if(a)return a;let e=cN();return a={"tools/call":e.CallToolResultSchema,"tools/list":e.ListToolsResultSchema,"prompts/get":e.GetPromptResultSchema,"prompts/list":e.ListPromptsResultSchema,"resources/list":e.ListResourcesResultSchema,"resources/templates/list":e.ListResourceTemplatesResultSchema,"resources/read":e.ReadResourceResultSchema,"completion/complete":e.CompleteResultSchema,"server/discover":e.DiscoverResultSchema}}(),o=Object.hasOwn(i,e)?i[e]:void 0;if(void 0!==o){let r=o.safeParse(t);if(!r.success)return{kind:"invalid",error:new cf(cm.InvalidResult,`Invalid result for ${e}: ${r.error}`,{method:e})}}let n={...t};return delete n.resultType,{kind:"complete",result:n}},encodeResult:(e,t,r)=>(function(e,t){if(void 0===t)return e;let r=e._meta;return void 0===r?{...e,_meta:{[af]:t}}:null===r||"object"!=typeof r||Array.isArray(r)||void 0!==r[af]?e:{...e,_meta:{...r,[af]:t}}})(function(e,t){var r,i;let o=t[cD];if("complete"!==t.resultType||!cz.includes(e)){let e;return void 0===o?t:(e={...t},delete e[cD],e)}let n=cL(t.ttlMs)?t.ttlMs:void 0!==(r=o)&&cL(r.ttlMs)?r.ttlMs:0,a=cU(t.cacheScope)?t.cacheScope:void 0!==(i=o)&&cU(i.cacheScope)?i.cacheScope:"private",s={...t,ttlMs:n,cacheScope:a};return delete s[cD],s}(e,function(e,t){let r=t.resultType;if(void 0===r)return{...t,resultType:"complete"};if("complete"===r||cX.includes(e))return t;throw new cB(cG.InternalError,`Handler for ${e} returned resultType '${String(r)}', but results of ${e} only support 'complete' on protocol revision 2026-07-28`)}(e,function(e,t){let r=t,i=!1,o=()=>(i||(r={...r},i=!0),r),n=t.tools;"tools/list"===e&&Array.isArray(n)&&n.some(e=>c5(e)&&"execution"in e)&&(o().tools=n.map(e=>{if(!c5(e)||!("execution"in e))return e;let t={...e};return delete t.execution,t}));let a=t.capabilities;if(c5(a)&&"tasks"in a){let e={...a};delete e.tasks,o().capabilities=e}return r}(e,t))),r),encodeErrorCode:e=>-32002===e?-32602:e,checkInboundEnvelope(e){if(void 0===e.envelope)return"Request is missing the required _meta envelope for protocol revision 2026-07-28 (io.modelcontextprotocol/protocolVersion, io.modelcontextprotocol/clientCapabilities)";let t=cN().RequestMetaEnvelopeSchema.safeParse(e.envelope);if(!t.success)return`Invalid _meta envelope for protocol revision 2026-07-28: ${t.error.issues.map(e=>e.message).join("; ")}`}},lr="2026-07-28";function li(e){return void 0!==e&&e>=cg?lt:cW}function lo(e){return void 0!==e.revision?li(e.revision).era:"modern"===e.era?lt.era:cW.era}function ln(e){return ld.some(t=>t.hasRequestMethod(e))}function la(e){return ld.some(t=>t.hasNotificationMethod(e))}function ls(e){return"tasks/get"===e||"tasks/cancel"===e}let ld=[cW,lt];var lc=(e=>{let t={};for(var r in e)eh(t,r,{get:e[r],enumerable:!0});return t})({AnnotationsSchema:()=>sa,AudioContentSchema:()=>sA,BaseMetadataSchema:()=>aU,BaseRequestParamsSchema:()=>aR,BlobResourceContentsSchema:()=>so,BooleanSchemaSchema:()=>dd,CallToolRequestParamsSchema:()=>sQ,CallToolRequestSchema:()=>sX,CallToolResultSchema:()=>sJ,CancelTaskRequestSchema:()=>dK,CancelTaskResultSchema:()=>dJ,CancelledNotificationParamsSchema:()=>az,CancelledNotificationSchema:()=>aD,ClientCapabilitiesSchema:()=>aZ,ClientNotificationSchema:()=>dQ,ClientRequestSchema:()=>dZ,ClientResultSchema:()=>dX,ClientTasksCapabilitySchema:()=>aK,CompatibilityCallToolResultSchema:()=>sZ,CompleteRequestParamsSchema:()=>dI,CompleteRequestSchema:()=>dx,CompleteResultSchema:()=>dj,ContentBlockSchema:()=>sz,CreateMessageRequestParamsSchema:()=>di,CreateMessageRequestSchema:()=>dn,CreateMessageResultSchema:()=>da,CreateMessageResultWithToolsSchema:()=>ds,CreateTaskResultSchema:()=>dN,CursorSchema:()=>a$,DiscoverRequestSchema:()=>a2,DiscoverResultSchema:()=>a4,ElicitRequestFormParamsSchema:()=>db,ElicitRequestParamsSchema:()=>dS,ElicitRequestSchema:()=>dk,ElicitRequestURLParamsSchema:()=>d$,ElicitResultSchema:()=>dP,ElicitationCompleteNotificationParamsSchema:()=>dw,ElicitationCompleteNotificationSchema:()=>dR,EmbeddedResourceSchema:()=>sW,EmptyResultSchema:()=>aN,EnumSchemaSchema:()=>d_,GetPromptRequestParamsSchema:()=>sC,GetPromptRequestSchema:()=>sT,GetPromptResultSchema:()=>sF,GetTaskPayloadRequestSchema:()=>dU,GetTaskPayloadResultSchema:()=>dH,GetTaskRequestSchema:()=>dF,GetTaskResultSchema:()=>dL,IconSchema:()=>aF,IconsSchema:()=>aL,ImageContentSchema:()=>sE,ImplementationSchema:()=>aH,InitializeRequestParamsSchema:()=>aQ,InitializeRequestSchema:()=>aX,InitializeResultSchema:()=>a1,InitializedNotificationSchema:()=>a0,JSONArraySchema:()=>av,JSONObjectSchema:()=>a_,JSONRPCErrorResponseSchema:()=>aA,JSONRPCMessageSchema:()=>aM,JSONRPCNotificationSchema:()=>aO,JSONRPCRequestSchema:()=>aT,JSONRPCResponseSchema:()=>aW,JSONRPCResultResponseSchema:()=>aE,JSONValueSchema:()=>ag,LegacyTitledEnumSchemaSchema:()=>dm,ListChangedOptionsBaseSchema:()=>s1,ListPromptsRequestSchema:()=>sx,ListPromptsResultSchema:()=>sj,ListResourceTemplatesRequestSchema:()=>sp,ListResourceTemplatesResultSchema:()=>su,ListResourcesRequestSchema:()=>sc,ListResourcesResultSchema:()=>sl,ListRootsRequestSchema:()=>dT,ListRootsResultSchema:()=>dO,ListTasksRequestSchema:()=>dG,ListTasksResultSchema:()=>dB,ListToolsRequestSchema:()=>sB,ListToolsResultSchema:()=>sK,LoggingLevelSchema:()=>s0,LoggingMessageNotificationParamsSchema:()=>s6,LoggingMessageNotificationSchema:()=>s3,ModelHintSchema:()=>s9,ModelPreferencesSchema:()=>s5,MultiSelectEnumSchemaSchema:()=>dg,NotificationSchema:()=>aI,NotificationsParamsSchema:()=>aq,NumberSchemaSchema:()=>dl,PaginatedRequestParamsSchema:()=>a8,PaginatedRequestSchema:()=>a7,PaginatedResultSchema:()=>se,PingRequestSchema:()=>a6,PrimitiveSchemaDefinitionSchema:()=>dv,ProgressNotificationParamsSchema:()=>a9,ProgressNotificationSchema:()=>a5,ProgressSchema:()=>a3,ProgressTokenSchema:()=>ab,PromptArgumentSchema:()=>sq,PromptListChangedNotificationSchema:()=>sL,PromptMessageSchema:()=>sD,PromptReferenceSchema:()=>dq,PromptSchema:()=>sI,ReadResourceRequestParamsSchema:()=>sm,ReadResourceRequestSchema:()=>sf,ReadResourceResultSchema:()=>sh,RelatedTaskMetadataSchema:()=>ak,RequestIdSchema:()=>aC,RequestMetaSchema:()=>aw,RequestSchema:()=>aV,ResourceContentsSchema:()=>st,ResourceLinkSchema:()=>sN,ResourceListChangedNotificationSchema:()=>sy,ResourceRequestParamsSchema:()=>sm,ResourceSchema:()=>ss,ResourceTemplateReferenceSchema:()=>dV,ResourceTemplateSchema:()=>sd,ResourceUpdatedNotificationParamsSchema:()=>sP,ResourceUpdatedNotificationSchema:()=>sV,ResultMetaObjectSchema:()=>ax,ResultSchema:()=>aj,RoleSchema:()=>sn,RootSchema:()=>dC,RootsListChangedNotificationSchema:()=>dE,SamplingContentSchema:()=>de,SamplingMessageContentBlockSchema:()=>dt,SamplingMessageSchema:()=>dr,ServerCapabilitiesSchema:()=>aY,ServerNotificationSchema:()=>d1,ServerRequestSchema:()=>dY,ServerResultSchema:()=>d0,ServerTasksCapabilitySchema:()=>aJ,SetLevelRequestParamsSchema:()=>s2,SetLevelRequestSchema:()=>s4,SingleSelectEnumSchemaSchema:()=>df,StringSchemaSchema:()=>dc,SubscribeRequestParamsSchema:()=>sm,SubscribeRequestSchema:()=>sg,SubscriptionFilterSchema:()=>sv,SubscriptionsAcknowledgedNotificationParamsSchema:()=>sS,SubscriptionsAcknowledgedNotificationSchema:()=>sk,SubscriptionsListenRequestParamsSchema:()=>sb,SubscriptionsListenRequestSchema:()=>s$,SubscriptionsListenResultMetaSchema:()=>sw,SubscriptionsListenResultSchema:()=>sR,TaskAugmentedRequestParamsSchema:()=>aP,TaskCreationParamsSchema:()=>dA,TaskMetadataSchema:()=>aS,TaskSchema:()=>dW,TaskStatusNotificationParamsSchema:()=>dz,TaskStatusNotificationSchema:()=>dD,TaskStatusSchema:()=>dM,TextContentSchema:()=>sO,TextResourceContentsSchema:()=>sr,TitledMultiSelectEnumSchemaSchema:()=>dy,TitledSingleSelectEnumSchemaSchema:()=>du,ToolAnnotationsSchema:()=>sU,ToolChoiceSchema:()=>s8,ToolExecutionSchema:()=>sH,ToolListChangedNotificationSchema:()=>sY,ToolResultContentSchema:()=>s7,ToolSchema:()=>sG,ToolUseContentSchema:()=>sM,UnsubscribeRequestParamsSchema:()=>sm,UnsubscribeRequestSchema:()=>s_,UntitledMultiSelectEnumSchemaSchema:()=>dh,UntitledSingleSelectEnumSchemaSchema:()=>dp});let ll=e=>aT.safeParse(e).success,lp=e=>"object"==typeof e&&null!==e&&!Array.isArray(e)&&"input_required"===e.resultType,lu="x-mcp-header",lm=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/,lf=new Set(["string","integer","boolean"]),lh=["items","prefixItems","contains","additionalProperties","unevaluatedProperties","unevaluatedItems","propertyNames","patternProperties","dependentSchemas","oneOf","anyOf","allOf","not","if","then","else","$defs","definitions"],ly=new Set(["patternProperties","dependentSchemas","$defs","definitions"]);function lg(e){return 0===e.length?"":e.join(".")}cG.InvalidRequest,cG.UnsupportedProtocolVersion,cG.InvalidParams,cG.MethodNotFound,cG.InvalidParams,cG.MissingRequiredClientCapability;let l_={[cG.ParseError]:400,[cG.InvalidRequest]:400,[cG.MethodNotFound]:404,[cG.UnsupportedProtocolVersion]:400,[cG.MissingRequiredClientCapability]:400,[-32020]:400};function lv(e){return new Set(e.flatMap(e=>Object.keys(e.shape)))}function lb(e){if(null==e)return!1;let t=typeof e;return("object"===t||"function"===t)&&"~standard"in e&&"function"==typeof e["~standard"]?.validate}let l$=!1,lS="draft-2020-12";function lk(e,t="input"){let r,i=e["~standard"];if(i.jsonSchema)r=i.jsonSchema[t]({target:lS});else if("zod"===i.vendor){if(!("_zod"in e))throw Error("Schema appears to be from zod 3, which the SDK cannot convert to JSON Schema. Upgrade to zod >=4.2.0, or wrap your JSON Schema with fromJsonSchema().");l$||(l$=!0,console.warn("[mcp-sdk] Your zod version does not implement `~standard.jsonSchema` (added in zod 4.2.0). Falling back to z.toJSONSchema(). Upgrade to zod >=4.2.0 to silence this warning.")),r=ox(e,{target:lS,io:t})}else throw Error(`Schema library "${i.vendor}" does not implement StandardJSONSchemaV1 (\`~standard.jsonSchema\`). Upgrade to a version that does, or wrap your JSON Schema with fromJsonSchema().`);if("output"===t)return void 0!==r.type||!function e(t,r=t){if("properties"in t||"patternProperties"in t||"additionalProperties"in t||"required"in t)return!0;let i="string"==typeof t.$ref&&lw.exec(t.$ref);if(i&&r[i[1]]?.[i[2]]?.type==="object")return!0;for(let i of["oneOf","anyOf","allOf"]){let o=t[i];if(Array.isArray(o)&&o.length>0)return o.every(t=>null!==t&&"object"==typeof t&&("object"===t.type||e(t,"$id"in t?{}:r)))}return!1}(r)?r:{type:"object",...r};if(void 0!==r.type&&"object"!==r.type)throw Error(`MCP tool and prompt schemas must describe objects (got type: ${JSON.stringify(r.type)}). Wrap your schema in z.object({...}) or equivalent.`);return{type:"object",...r}}let lw=/^#\/(\$defs|definitions)\/([^/~%]+)$/;async function lR(e,t){let r=await e["~standard"].validate(t);return r.issues&&r.issues.length>0?{success:!1,error:r.issues.map(e=>e.path?.length?`${e.path.map(e=>String("object"==typeof e?e.key:e)).join(".")}: ${e.message}`:e.message).join(", ")}:{success:!0,data:r.value}}let lP=/\\\.\\d\{(\d+)\}/;function lV(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}let lq=new Set(["$comment","deprecated","description","examples","readOnly","title","writeOnly"]);function lI(e){return lq.has(e)||e.startsWith("x-")}let lx=new Set(["$schema",...Object.keys(db.shape.requestedSchema.shape)]),lj={string:lv([dc,dp,du,dm]),number:lv([dl]),integer:lv([dl]),boolean:lv([dd]),array:lv([dh,dy])},lC=new Set(dc.shape.format.unwrap().options);Object.assign(function(e){let t=void 0!==e.inputRequests&&Object.keys(e.inputRequests).length>0,r="string"==typeof e.requestState;if(!t&&!r)throw TypeError("inputRequired() requires at least one of inputRequests (with at least one entry) or requestState (spec: every InputRequiredResult MUST include at least one of the two)");return{resultType:"input_required",...void 0!==e.inputRequests&&{inputRequests:e.inputRequests},...void 0!==e.requestState&&{requestState:e.requestState}}},{elicit(e){try{return{method:"elicitation/create",params:function(e){var t;if(!lb(e.requestedSchema))return{...e,mode:"form",requestedSchema:e.requestedSchema};let r=e.requestedSchema["~standard"].vendor,i=function(e,t){let r={},i=[];for(let[o,n]of Object.entries(e))"properties"===o&&lV(n)?r[o]=Object.fromEntries(Object.entries(n).map(([e,r])=>[e,function(e,t,r,i){if(!lV(e))return e;let o="string"==typeof e.type&&Object.hasOwn(lj,e.type)?lj[e.type]:void 0;if(void 0===o)return e;let n={};for(let[s,d]of Object.entries(e))if(o.has(s)||lI(s))n[s]=d;else if("pattern"===s&&"string"===e.type&&"string"==typeof e.format)if(lC.has(e.format)){var a;"string"==typeof d&&(a=e.format,"zod"!==r||(function(e,t){let r;switch(e){case"email":r=[iw(nn,void 0)];break;case"uri":r=[iR(nd,void 0)];break;case"date":r=[iV(nr,void 0)];break;case"date-time":let i,o;i=lP.exec(t),o=[void 0,-1,0],i&&o.push(Number(i[1])),r=[!1,!0].flatMap(e=>[!1,!0].flatMap(t=>o.map(r=>ac({local:e,offset:t,precision:r}))))}return new Set(r.map(e=>{let t;return t=ox(e,{target:lS,io:"input"}),"string"==typeof t.pattern?t.pattern:void 0}).filter(e=>void 0!==e))})(a,d).has(d))||i.push(`${t}.${s}`)}else n[s]=d;else i.push(`${t}.${s}`);return n}(r,`properties.${e}`,t,i)])):lx.has(o)?r[o]=n:lI(o)||i.push(o);if(i.length>0)throw new cB(cG.InvalidParams,`Elicitation requestedSchema contains unsupported JSON Schema constraint(s) after Standard Schema conversion: ${i.join(", ")}`);return r}(function(e){try{return lk(e,"input")}catch(t){let e=t instanceof Error?t.message:String(t);throw new cB(cG.InvalidParams,`Elicitation requestedSchema must describe an object with flat primitive properties: ${e}`)}}(e.requestedSchema),r),o=(t=db.shape.requestedSchema,oJ(t,i));if(!o.success)throw new cB(cG.InvalidParams,`Elicitation requestedSchema only supports flat primitive properties (string, number, integer, boolean, and string enums): ${function(e,t){if(!lV(e.properties))return t;let r=Object.entries(e.properties).filter(([,e])=>!oJ(dv,e).success).map(([e])=>`properties.${e}`);return r.length>0?r.join(", "):t}(i,o.error.message)}`);let n=function e(t,r,i=""){return Array.isArray(t)&&Array.isArray(r)?t.flatMap((t,o)=>e(t,r[o],`${i}[${o}]`)):lV(t)&&lV(r)?Object.entries(t).flatMap(([t,o])=>{let n=i?`${i}.${t}`:t;return Object.prototype.hasOwnProperty.call(r,t)?e(o,r[t],n):lI(t)?[]:[n]}):[]}(i,o.data);if(n.length>0)throw new cB(cG.InvalidParams,`Elicitation requestedSchema contains unsupported JSON Schema constraint(s) after Standard Schema conversion: ${n.join(", ")}`);let a=(o.data.required??[]).filter(e=>!Object.prototype.hasOwnProperty.call(o.data.properties,e));if(a.length>0)throw new cB(cG.InvalidParams,`Elicitation requestedSchema lists required properties that are not defined in properties: ${a.join(", ")}`);return{...e,mode:"form",requestedSchema:o.data}}(e)}}catch(e){throw e instanceof cB?TypeError(e.message,{cause:e}):e}},elicitUrl:e=>({method:"elicitation/create",params:{...e,mode:"url"}}),createMessage:e=>({method:"sampling/createMessage",params:e}),listRoots:()=>({method:"roots/list"})});let lT={},lO={};function lE(e,t){let r=e.slice(0,-6);lT[r]=t,lO[r]=e=>t.safeParse(e).success}for(let e of["AnnotationsSchema","AudioContentSchema","BaseMetadataSchema","BlobResourceContentsSchema","BooleanSchemaSchema","CallToolRequestSchema","CallToolRequestParamsSchema","CallToolResultSchema","CancelledNotificationSchema","CancelledNotificationParamsSchema","CancelTaskRequestSchema","CancelTaskResultSchema","ClientCapabilitiesSchema","ClientNotificationSchema","ClientRequestSchema","ClientResultSchema","CompatibilityCallToolResultSchema","CompleteRequestSchema","CompleteRequestParamsSchema","CompleteResultSchema","ContentBlockSchema","CreateMessageRequestSchema","CreateMessageRequestParamsSchema","CreateMessageResultSchema","CreateMessageResultWithToolsSchema","CreateTaskResultSchema","CursorSchema","DiscoverRequestSchema","DiscoverResultSchema","ElicitationCompleteNotificationSchema","ElicitationCompleteNotificationParamsSchema","ElicitRequestSchema","ElicitRequestFormParamsSchema","ElicitRequestParamsSchema","ElicitRequestURLParamsSchema","ElicitResultSchema","EmbeddedResourceSchema","EmptyResultSchema","EnumSchemaSchema","GetPromptRequestSchema","GetPromptRequestParamsSchema","GetPromptResultSchema","GetTaskPayloadRequestSchema","GetTaskPayloadResultSchema","GetTaskRequestSchema","GetTaskResultSchema","IconSchema","IconsSchema","ImageContentSchema","ImplementationSchema","InitializedNotificationSchema","InitializeRequestSchema","InitializeRequestParamsSchema","InitializeResultSchema","JSONArraySchema","JSONObjectSchema","JSONRPCErrorResponseSchema","JSONRPCMessageSchema","JSONRPCNotificationSchema","JSONRPCRequestSchema","JSONRPCResponseSchema","JSONRPCResultResponseSchema","JSONValueSchema","LegacyTitledEnumSchemaSchema","ListPromptsRequestSchema","ListPromptsResultSchema","ListResourcesRequestSchema","ListResourcesResultSchema","ListResourceTemplatesRequestSchema","ListResourceTemplatesResultSchema","ListRootsRequestSchema","ListRootsResultSchema","ListTasksRequestSchema","ListTasksResultSchema","ListToolsRequestSchema","ListToolsResultSchema","LoggingLevelSchema","LoggingMessageNotificationSchema","LoggingMessageNotificationParamsSchema","ModelHintSchema","ModelPreferencesSchema","MultiSelectEnumSchemaSchema","NotificationSchema","NumberSchemaSchema","PaginatedRequestSchema","PaginatedRequestParamsSchema","PaginatedResultSchema","PingRequestSchema","PrimitiveSchemaDefinitionSchema","ProgressSchema","ProgressNotificationSchema","ProgressNotificationParamsSchema","ProgressTokenSchema","PromptSchema","PromptArgumentSchema","PromptListChangedNotificationSchema","PromptMessageSchema","PromptReferenceSchema","ReadResourceRequestSchema","ReadResourceRequestParamsSchema","ReadResourceResultSchema","RelatedTaskMetadataSchema","RequestSchema","RequestIdSchema","RequestMetaSchema","ResourceSchema","ResourceContentsSchema","ResourceLinkSchema","ResourceListChangedNotificationSchema","ResourceRequestParamsSchema","ResourceTemplateSchema","ResourceTemplateReferenceSchema","ResourceUpdatedNotificationSchema","ResourceUpdatedNotificationParamsSchema","ResultMetaObjectSchema","ResultSchema","RoleSchema","RootSchema","RootsListChangedNotificationSchema","SamplingContentSchema","SamplingMessageSchema","SamplingMessageContentBlockSchema","ServerCapabilitiesSchema","ServerNotificationSchema","ServerRequestSchema","ServerResultSchema","SetLevelRequestSchema","SetLevelRequestParamsSchema","SingleSelectEnumSchemaSchema","StringSchemaSchema","SubscribeRequestSchema","SubscribeRequestParamsSchema","SubscriptionFilterSchema","SubscriptionsAcknowledgedNotificationSchema","SubscriptionsAcknowledgedNotificationParamsSchema","SubscriptionsListenRequestSchema","SubscriptionsListenRequestParamsSchema","SubscriptionsListenResultSchema","SubscriptionsListenResultMetaSchema","TaskAugmentedRequestParamsSchema","TaskCreationParamsSchema","TaskMetadataSchema","TaskSchema","TaskStatusSchema","TaskStatusNotificationSchema","TaskStatusNotificationParamsSchema","TextContentSchema","TextResourceContentsSchema","TitledMultiSelectEnumSchemaSchema","TitledSingleSelectEnumSchemaSchema","ToolSchema","ToolAnnotationsSchema","ToolChoiceSchema","ToolExecutionSchema","ToolListChangedNotificationSchema","ToolResultContentSchema","ToolUseContentSchema","UnsubscribeRequestSchema","UnsubscribeRequestParamsSchema","UntitledMultiSelectEnumSchemaSchema","UntitledSingleSelectEnumSchemaSchema"])lE(e,lc[e]);for(let[e,t]of Object.entries({IdJagTokenExchangeResponseSchema:ce,OAuthClientInformationFullSchema:cn,OAuthClientInformationSchema:co,OAuthClientMetadataSchema:ci,OAuthClientRegistrationErrorSchema:ca,OAuthErrorResponseSchema:ct,OAuthMetadataSchema:d9,OAuthProtectedResourceMetadataSchema:d3,OAuthTokenRevocationRequestSchema:cs,OAuthTokensSchema:d7,OpenIdProviderDiscoveryMetadataSchema:d8,OpenIdProviderMetadataSchema:d5}))lE(e,t);Object.freeze(lT),Object.freeze(lO);let lA=[au,am,ah,ay],lM=["inputResponses","requestState"];function lW(e,t){let r=e.params;if(!lL(r))return{message:e,lifted:{}};let i=r._meta,o=lL(i)?lA.filter(e=>e in i):[],n="request"===t?lM.filter(e=>e in r):[];if(0===o.length&&0===n.length)return{message:e,lifted:{}};let a={},s={...r};if(o.length>0&&lL(i)){let e={},t={...i};for(let r of o)e[r]=i[r],delete t[r];a.envelope=e,Object.keys(t).length>0?s._meta=t:delete s._meta}for(let e of n)"inputResponses"===e&&(a.inputResponses=s[e]),"requestState"===e&&(a.requestState=s[e]),delete s[e];return{message:{...e,params:s},lifted:a}}function lN(e,t){let r=e.validateResult(t,void 0);if(r.ok||"not-in-era"!==r.reason)return{"~standard":{version:1,vendor:"mcp-wire-codec",validate(r){let i=e.validateResult(t,r);return i.ok?{value:i.value}:{issues:[{message:"invalid"===i.reason?i.message:`not-in-era: ${t}`}]}}}}}let lz=(Q=void 0,()=>Q);function lD(e,t){return{...e,mcpReq:{...e.mcpReq,requestState:()=>t}}}var lF=class{_transport;_requestMessageId=0;_requestHandlers=new Map;_customSchemaRequestMethods=new Set;_requestHandlerAbortControllers=new Map;_notificationHandlers=new Map;_responseHandlers=new Map;_progressHandlers=new Map;_timeoutInfo=new Map;_pendingDebouncedNotifications=new Set;_negotiatedProtocolVersion;_supportedProtocolVersions;onclose;onerror;fallbackRequestHandler;fallbackNotificationHandler;constructor(e){this._options=e,this._supportedProtocolVersions=e?.supportedProtocolVersions??ap,this.setNotificationHandler("notifications/cancelled",e=>{this._oncancel(e)}),this.setNotificationHandler("notifications/progress",e=>{this._onprogress(e)}),this.setRequestHandler("ping",e=>({}))}_shouldDropInbound(e){}_outboundMetaEnvelope(){}_envelopeOutbound(e){let t=this._outboundMetaEnvelope();if(void 0===t)return e;let r=e.params??{};return{...e,params:{...r,_meta:{...t,...r._meta}}}}_resolveNonCompleteResult(e,t){return Promise.reject(new cf(cm.UnsupportedResultType,`Unsupported result type '${e.kind}' for ${t.request.method}`,{resultType:e.kind,method:t.request.method}))}_getRequestHandler(e){return this._requestHandlers.get(e)}async _oncancel(e){void 0!==e.params.requestId&&this._requestHandlerAbortControllers.get(e.params.requestId)?.abort(e.params.reason)}_setupTimeout(e,t,r,i,o=!1){this._timeoutInfo.set(e,{timeoutId:setTimeout(i,t),startTime:Date.now(),timeout:t,maxTotalTimeout:r,resetTimeoutOnProgress:o,onTimeout:i})}_resetTimeout(e){let t=this._timeoutInfo.get(e);if(!t)return!1;let r=Date.now()-t.startTime;if(t.maxTotalTimeout&&r>=t.maxTotalTimeout)throw this._timeoutInfo.delete(e),new cf(cm.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:t.maxTotalTimeout,totalElapsed:r});return clearTimeout(t.timeoutId),t.timeoutId=setTimeout(t.onTimeout,t.timeout),!0}_cleanupTimeout(e){let t=this._timeoutInfo.get(e);t&&(clearTimeout(t.timeoutId),this._timeoutInfo.delete(e))}async connect(e){this._transport=e;let t=this.transport?.onclose;this._transport.onclose=()=>{try{t?.()}finally{this._onclose()}};let r=this.transport?.onerror;this._transport.onerror=e=>{r?.(e),this._onerror(e)};let i=this._transport?.onmessage;this._transport.onmessage=(e,t)=>{if(i?.(e,t),aE.safeParse(e).success||aA.safeParse(e).success)this._onresponse(e);else if(ll(e))this._onrequest(e,t);else aO.safeParse(e).success?this._onnotification(e,t):this._onerror(Error(`Unknown message type: ${JSON.stringify(e)}`))},e.setSupportedProtocolVersions?.(this._supportedProtocolVersions),await this._transport.start()}_onclose(){let e=this._responseHandlers;for(let e of(this._responseHandlers=new Map,this._progressHandlers.clear(),this._pendingDebouncedNotifications.clear(),this._timeoutInfo.values()))clearTimeout(e.timeoutId);this._timeoutInfo.clear();let t=this._requestHandlerAbortControllers;this._requestHandlerAbortControllers=new Map;let r=new cf(cm.ConnectionClosed,"Connection closed");this._transport=void 0;try{this.onclose?.()}finally{for(let t of e.values())t(r);for(let e of t.values())e.abort(r)}}_onerror(e){this.onerror?.(e)}_onnotification(e,t){let{message:r}=lW(e,"notification"),i=this._negotiatedWireCodec();if(t?.classification===void 0&&"drop"===this._shouldDropInbound(e))return;if(t?.classification!==void 0){let e=lo(t.classification);if(e!==i.era)return void this._onerror(Error(`Era mismatch on inbound notification '${r.method}': classified as ${e} but this instance serves ${i.era}`))}if(la(r.method)&&!i.hasNotificationMethod(r.method))return;let o=this._notificationHandlers.get(r.method),n=this.fallbackNotificationHandler;(void 0!==o||void 0!==n)&&Promise.resolve().then(()=>void 0===o?n(r):o(r,i)).catch(e=>this._onerror(Error(`Uncaught error in notification handler: ${e}`)))}_onrequest(e,t){var r;let{message:i,lifted:o}=lW(e,"request"),n=this._negotiatedWireCodec();if(t?.classification===void 0&&"drop"===this._shouldDropInbound(e))return void this._onerror(Error(`Dropped inbound request '${e.method}': not servable on this connection's protocol era`));let a=this._transport,s=(e,t,r)=>{let o={jsonrpc:"2.0",id:i.id,error:{code:e,message:t,...void 0!==r&&{data:r}}};a?.send(o).catch(e=>this._onerror(Error(`Failed to send an error response: ${e}`)))};if(t?.classification!==void 0){let e=lo(t.classification);if(e!==n.era){this._onerror(Error(`Era mismatch on inbound request '${i.method}': classified as ${e} but this instance serves ${n.era}`));let r=t.classification.revision??e;s(cG.UnsupportedProtocolVersion,`Unsupported protocol version: ${r}`,{supported:this._supportedProtocolVersions,requested:r});return}}if(ln(i.method)&&!n.hasRequestMethod(i.method)&&!(ls(i.method)&&this._customSchemaRequestMethods.has(i.method)))return void s(cG.MethodNotFound,"Method not found");let d=this._requestHandlers.get(i.method)??this.fallbackRequestHandler;if(void 0===d)return void s(cG.MethodNotFound,"Method not found");let c=n.checkInboundEnvelope(o);if(void 0!==c)return void s(cG.InvalidParams,c);let l=(e,t)=>this._notificationViaCodec(this._resolveOutboundCodec(e.method),e,{...t,relatedRequestId:i.id}),p=(e,t,r)=>this._requestWithSchemaViaCodec(this._resolveOutboundCodec(e.method),e,t,{...r,relatedRequestId:i.id}),u=new AbortController;this._requestHandlerAbortControllers.set(i.id,u);let m=void 0===o.inputResponses?void 0:function(e){let t={},r=[];if(!lU(e))return{accepted:t,droppedKeys:r};for(let[i,o]of Object.entries(e)){if(!lU(o)||"method"in o||"result"in o){r.push(i);continue}t[i]=o}return{accepted:t,droppedKeys:r}}(o.inputResponses),f={sessionId:a?.sessionId,mcpReq:{id:i.id,method:i.method,_meta:i.params?._meta,...void 0!==o.envelope&&{envelope:o.envelope},...void 0!==m&&{inputResponses:m.accepted},...void 0!==m&&m.droppedKeys.length>0&&{droppedInputResponseKeys:m.droppedKeys},requestState:void 0===o.requestState?lz:(r=o.requestState,()=>r),signal:u.signal,send:(e,t,r)=>{let i=this._resolveOutboundCodec(e.method);if(this._assertOutboundRequestInEra(i,e.method),lb(t))return p(e,t,r);let o=lN(i,e.method);if(void 0===o)throw TypeError(`'${e.method}' is not a spec method; pass a result schema as the second argument to ctx.mcpReq.send().`);return p(e,o,t)},notify:l},http:t?.authInfo?{authInfo:t.authInfo}:void 0},h=this.buildContext(f,t);Promise.resolve().then(()=>d(i,h)).then(async e=>{let t;if(u.signal.aborted)return;try{t=n.encodeResult(i.method,e,this._outboundServerInfo())}catch(e){this._onerror(Error(`Failed to encode result for ${i.method}: ${e}`)),s(cG.InternalError,"Internal error");return}let r={result:t,jsonrpc:"2.0",id:i.id};await a?.send(r)},async e=>{if(u.signal.aborted)return;let t=Number.isSafeInteger(e.code)?e.code:cG.InternalError,r={jsonrpc:"2.0",id:i.id,error:{code:n.encodeErrorCode(t),message:e.message??"Internal error",...void 0!==e.data&&{data:e.data}}};await a?.send(r)}).catch(e=>this._onerror(Error(`Failed to send response: ${e}`))).finally(()=>{this._requestHandlerAbortControllers.get(i.id)===u&&this._requestHandlerAbortControllers.delete(i.id)})}_onprogress(e){let{progressToken:t,...r}=e.params,i=Number(t),o=this._progressHandlers.get(i);if(!o)return void this._onerror(Error(`Received a progress notification for an unknown token: ${JSON.stringify(e)}`));let n=this._responseHandlers.get(i),a=this._timeoutInfo.get(i);if(a&&n&&a.resetTimeoutOnProgress)try{this._resetTimeout(i)}catch(e){this._responseHandlers.delete(i),this._progressHandlers.delete(i),this._cleanupTimeout(i),n(e);return}o(r)}_onresponse(e){let t=Number(e.id),r=this._responseHandlers.get(t);void 0===r?this._onerror(Error(`Received a response for an unknown message ID: ${JSON.stringify(e)}`)):(this._responseHandlers.delete(t),this._cleanupTimeout(t),this._progressHandlers.delete(t),r(aE.safeParse(e).success?e:cB.fromError(e.error.code,e.error.message,e.error.data)))}get transport(){return this._transport}async close(){await this._transport?.close()}request(e,t,r){let i=this._resolveOutboundCodec(e.method);if(lb(t))return ls(e.method)||this._assertOutboundRequestInEra(i,e.method),this._requestWithSchemaViaCodec(i,e,t,r);this._assertOutboundRequestInEra(i,e.method);let o=lN(i,e.method);if(void 0===o)throw TypeError(`'${e.method}' is not a spec method; pass a result schema as the second argument to request().`);return this._requestWithSchemaViaCodec(i,e,o,t)}_negotiatedWireCodec(){return li(this._negotiatedProtocolVersion)}_wireCodec(){return this._negotiatedWireCodec()}_resolveOutboundCodec(e){if(void 0===this._negotiatedProtocolVersion){let t=function(e){switch(e){case"initialize":case"notifications/initialized":return li(void 0);case"server/discover":return li(lr);default:return}}(e);if(t)return t}return this._negotiatedWireCodec()}_assertOutboundRequestInEra(e,t){if(ln(t)&&!e.hasRequestMethod(t))throw new cf(cm.MethodNotSupportedByProtocolVersion,`Method '${t}' is not supported by the negotiated protocol version (wire era ${e.era})`,{method:t,era:e.era})}_requestWithSchema(e,t,r){let i=this._resolveOutboundCodec(e.method);return this._assertOutboundRequestInEra(i,e.method),this._requestWithSchemaViaCodec(i,e,t,r)}_requestWithSchemaViaCodec(e,t,r,i){let o,n,{relatedRequestId:a,resumptionToken:s,onresumptiontoken:d,headers:c}=i??{},l=Date.now();return new Promise((p,u)=>{let m=e=>{u(e)};if(!this._transport)return void m(Error("Not connected"));if(this._options?.enforceStrictCapabilities===!0)try{this.assertCapabilityForMethod(t.method)}catch(e){m(e);return}if(i?.signal?.aborted){let e=i.signal.reason;throw e instanceof cf?e:new cf(cm.RequestTimeout,String(e))}let f=e.era===lr&&!0===this._transport.hasPerRequestStream?new AbortController:void 0,h=this._requestMessageId++;n=h;let y={...t,jsonrpc:"2.0",id:h};i?.onprogress&&(this._progressHandlers.set(h,i.onprogress),y.params={...t.params,_meta:{...t.params?._meta,progressToken:h}});let g=this._envelopeOutbound(y),_=!1,v=e=>{_||(this._progressHandlers.delete(h),void 0===f?"initialize"!==t.method&&this._transport?.send(this._envelopeOutbound({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:h,reason:String(e)}}),{relatedRequestId:a,resumptionToken:s,onresumptiontoken:d}).catch(e=>this._onerror(Error(`Failed to send cancellation: ${e}`))):f.abort(),u(e instanceof cf?e:new cf(cm.RequestTimeout,String(e))))};this._responseHandlers.set(h,o=>{let n;if(!i?.signal?.aborted){if(_=!0,o instanceof Error)return u(o);try{n=e.decodeResult(t.method,o.result)}catch(e){return u(e instanceof Error?e:Error(String(e)))}if("invalid"===n.kind)return u(n.error);if("input_required"===n.kind){var a;return i?.allowInputRequired===!0?p({resultType:"input_required",inputRequests:(a=n).inputRequests,...void 0!==a.requestState&&{requestState:a.requestState},...void 0!==a._meta&&{_meta:a._meta}}):p(this._resolveNonCompleteResult(n,{codec:e,request:t,resultSchema:r,options:i,flowStartedAt:l,retry:(i,o)=>this._requestWithSchemaViaCodec(e,void 0===i?{method:t.method}:{method:t.method,params:i},r,o)}))}lR(r,n.result).then(e=>{e.success?p(e.data):u(new cf(cm.InvalidResult,`Invalid result for ${t.method}: ${e.error}`))},u)}}),o=()=>v(i?.signal?.reason),i?.signal?.addEventListener("abort",o,{once:!0});let b=i?.timeout??6e4;this._setupTimeout(h,b,i?.maxTotalTimeout,()=>v(new cf(cm.RequestTimeout,"Request timed out",{timeout:b})),i?.resetTimeoutOnProgress??!1),this._transport.send(g,{relatedRequestId:a,resumptionToken:s,onresumptiontoken:d,headers:c,requestSignal:f?.signal}).catch(e=>{this._progressHandlers.delete(h),u(e)})}).finally(()=>{o&&i?.signal?.removeEventListener("abort",o),void 0!==n&&(this._responseHandlers.delete(n),this._cleanupTimeout(n))})}async notification(e,t){return await this._notificationViaCodec(this._resolveOutboundCodec(e.method),e,t)}async _notificationViaCodec(e,t,r){if(!this._transport)throw new cf(cm.NotConnected,"Not connected");if(la(t.method)&&!e.hasNotificationMethod(t.method))throw new cf(cm.MethodNotSupportedByProtocolVersion,`Notification '${t.method}' is not supported by the negotiated protocol version (wire era ${e.era})`,{method:t.method,era:e.era});this.assertNotificationCapability(t.method);let i=this._envelopeOutbound({jsonrpc:"2.0",...t});if((this._options?.debouncedNotificationMethods??[]).includes(t.method)&&!t.params&&r?.relatedRequestId===void 0){if(this._pendingDebouncedNotifications.has(t.method))return;this._pendingDebouncedNotifications.add(t.method),Promise.resolve().then(()=>{this._pendingDebouncedNotifications.delete(t.method),this._transport&&this._transport?.send(i,r).catch(e=>this._onerror(e))});return}await this._transport.send(i,r)}setRequestHandler(e,t,r){let i;if(this.assertRequestHandlerCapability(e),"function"==typeof t){if(!ln(e))throw TypeError(`'${e}' is not a spec request method; pass schemas as the second argument to setRequestHandler().`);i=(r,i)=>{let o=this._negotiatedWireCodec(),n=o.validateRequest(e,r);if(n.ok||"not-in-era"!==n.reason||(n=o.validateInputRequest(e,r)),!n.ok){if("not-in-era"===n.reason)throw new cB(cG.InternalError,`No wire schema for ${e} in the resolved era`);throw Error(n.message)}return Promise.resolve(t(n.value,i))}}else if(r)i=async(i,o)=>{let n=await lR(t.params,{...i.params});if(!n.success)throw new cB(cG.InvalidParams,`Invalid params for ${e}: ${n.error}`);return r(n.data,o)};else throw TypeError("setRequestHandler: handler is required");"function"==typeof t?this._customSchemaRequestMethods.delete(e):this._customSchemaRequestMethods.add(e),this._requestHandlers.set(e,this._wrapHandler(e,i))}_wrapHandler(e,t){return t}_outboundServerInfo(){}removeRequestHandler(e){this._requestHandlers.delete(e),this._customSchemaRequestMethods.delete(e)}assertCanSetRequestHandler(e){if(this._requestHandlers.has(e))throw Error(`A request handler for ${e} already exists, which would be overridden`)}setNotificationHandler(e,t,r){if("function"==typeof t){if(!la(e))throw TypeError(`'${e}' is not a spec notification method; pass schemas as the second argument to setNotificationHandler().`);this._notificationHandlers.set(e,(r,i)=>{let o=i.validateNotification(e,r);if(!o.ok){if("not-in-era"===o.reason)throw new cB(cG.InternalError,`No wire schema for ${e} in the resolved era`);throw Error(o.message)}return Promise.resolve(t(o.value))});return}if(!r)throw TypeError("setNotificationHandler: handler is required");this._notificationHandlers.set(e,async i=>{let o=await lR(t.params,{...i.params});if(!o.success)throw new cB(cG.InvalidParams,`Invalid params for notification ${e}: ${o.error}`);await r(o.data,i)})}removeNotificationHandler(e){this._notificationHandlers.delete(e)}};function lL(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)}function lU(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}var lH=e$((eb(e=>{var t=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,r=/\\([\u000b\u0020-\u00ff])/g,i=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;function o(e){this.parameters=Object.create(null),this.type=e}e.parse=function(e){if(!e)throw TypeError("argument string is required");var n,a,s,d="object"==typeof e?function(e){var t;if("function"==typeof e.getHeader?t=e.getHeader("content-type"):"object"==typeof e.headers&&(t=e.headers&&e.headers["content-type"]),"string"!=typeof t)throw TypeError("content-type header is missing from object");return t}(e):e;if("string"!=typeof d)throw TypeError("argument string is required to be a string");var c=d.indexOf(";"),l=-1!==c?d.slice(0,c).trim():d.trim();if(!i.test(l))throw TypeError("invalid media type");var p=new o(l.toLowerCase());if(-1!==c){for(t.lastIndex=c;a=t.exec(d);){if(a.index!==c)throw TypeError("invalid parameter format");c+=a[0].length,n=a[1].toLowerCase(),34===(s=a[2]).charCodeAt(0)&&-1!==(s=s.slice(1,-1)).indexOf("\\")&&(s=s.replace(r,"$1")),p.parameters[n]=s}if(c!==d.length)throw TypeError("invalid parameter format")}return p}}))(),1),lG=class{_buffer;_maxBufferSize;constructor(e){this._maxBufferSize=e?.maxBufferSize??0xa00000}append(e){if((this._buffer?.length??0)+e.length>this._maxBufferSize)throw this.clear(),Error(`ReadBuffer exceeded maximum size of ${this._maxBufferSize} bytes`);this._buffer=this._buffer?Buffer.concat([this._buffer,e]):e}readMessage(){for(;this._buffer;){let t=this._buffer.indexOf("\n");if(-1===t)break;let r=this._buffer.toString("utf8",0,t).replace(/\r$/,"");this._buffer=this._buffer.subarray(t+1);try{var e;return e=r,aM.parse(JSON.parse(e))}catch(e){if(e instanceof SyntaxError)continue;throw e}}return null}clear(){this._buffer=void 0}};let lB=/^[A-Za-z0-9._-]{1,128}$/;function lK(e){let t=function(e){let t=[];if(0===e.length)return{isValid:!1,warnings:["Tool name cannot be empty"]};if(e.length>128)return{isValid:!1,warnings:[`Tool name exceeds maximum length of 128 characters (current: ${e.length})`]};if(e.includes(" ")&&t.push("Tool name contains spaces, which may cause parsing issues"),e.includes(",")&&t.push("Tool name contains commas, which may cause parsing issues"),(e.startsWith("-")||e.endsWith("-"))&&t.push("Tool name starts or ends with a dash, which may cause parsing issues in some contexts"),(e.startsWith(".")||e.endsWith("."))&&t.push("Tool name starts or ends with a dot, which may cause parsing issues in some contexts"),!lB.test(e)){let r=[...e].filter(e=>!/[A-Za-z0-9._-]/.test(e)).filter((e,t,r)=>r.indexOf(e)===t);return t.push(`Tool name contains invalid characters: ${r.map(e=>`"${e}"`).join(", ")}`,"Allowed characters are: A-Z, a-z, 0-9, underscore (_), dash (-), and dot (.)"),{isValid:!1,warnings:t}}return{isValid:!0,warnings:t}}(e);var r=t.warnings;if(r.length>0){for(let t of(console.warn(`Tool name validation warning for "${e}":`),r))console.warn(` - ${t}`);console.warn("Tool registration will proceed, but this may cause compatibility issues."),console.warn("Consider updating the tool name to conform to the MCP tool naming standard."),console.warn("See SEP: Specify Format for Tool Names (https://github.com/modelcontextprotocol/modelcontextprotocol/issues/986) for more details.")}return t.isValid}var lJ=class e{static isTemplate(e){return/\{[^}\s]+\}/.test(e)}static validateLength(e,t,r){if(e.length>t)throw Error(`${r} exceeds maximum length of ${t} characters (got ${e.length})`)}template;parts;get variableNames(){return this.parts.flatMap(e=>"string"==typeof e?[]:e.names)}constructor(t){e.validateLength(t,1e6,"Template"),this.template=t,this.parts=this.parse(t)}toString(){return this.template}parse(t){let r=[],i="",o=0,n=0;for(;o1e4)throw Error("Template contains too many expressions (max 10000)");let s=t.slice(o+1,a),d=this.getOperator(s),c=s.includes("*"),l=this.getNames(s),p=l[0];for(let t of l)e.validateLength(t,1e6,"Variable name");r.push({name:p,operator:d,names:l,exploded:c}),o=a+1}else i+=t[o],o++;return i&&r.push(i),r}getOperator(e){return["+","#",".","/","?","&"].find(t=>e.startsWith(t))||""}getNames(e){let t=this.getOperator(e);return e.slice(t.length).split(",").map(e=>e.replace("*","").trim()).filter(e=>e.length>0)}encodeValue(t,r){return(e.validateLength(t,1e6,"Variable value"),"+"===r||"#"===r)?encodeURI(t):encodeURIComponent(t)}expandPart(e,t){if("?"===e.operator||"&"===e.operator){let r=e.names.map(r=>{let i=t[r];return void 0===i?"":`${r}=${Array.isArray(i)?i.map(t=>this.encodeValue(t,e.operator)).join(","):this.encodeValue(i.toString(),e.operator)}`}).filter(e=>e.length>0);return 0===r.length?"":("?"===e.operator?"?":"&")+r.join("&")}if(e.names.length>1){let r=e.names.map(e=>t[e]).filter(e=>void 0!==e);return 0===r.length?"":r.map(e=>Array.isArray(e)?e[0]:e).join(",")}let r=t[e.name];if(void 0===r)return"";let i=(Array.isArray(r)?r:[r]).map(t=>this.encodeValue(t,e.operator));switch(e.operator){case"":case"+":default:return i.join(",");case"#":return"#"+i.join(",");case".":return"."+i.join(".");case"/":return"/"+i.join("/")}}expand(e){let t="",r=!1;for(let i of this.parts){if("string"==typeof i){t+=i;continue}let o=this.expandPart(i,e);o&&(t+=("?"===i.operator||"&"===i.operator)&&r?o.replace("?","&"):o,("?"===i.operator||"&"===i.operator)&&(r=!0))}return t}escapeRegExp(e){return e.replaceAll(/[.*+?^${}()|[\]\\]/g,String.raw`\$&`)}partToRegExp(t){let r,i=[];for(let r of t.names)e.validateLength(r,1e6,"Variable name");if("?"===t.operator||"&"===t.operator){for(let e=0;e"object"==typeof e&&null!==e&&"_zod"in e)}(e))return nz(e);if("object"==typeof e&&null!==e&&!lb(e)&&Object.values(e).some(e=>"object"==typeof e&&null!==e&&!("_zod"in e)&&"_def"in e&&"string"==typeof e._def?.typeName))throw TypeError("Raw-shape inputSchema/outputSchema/argsSchema fields must be Zod v4 schemas. Got a Zod v3 field schema. Import from `zod/v4` (or upgrade your zod import), or wrap with `z.object({...})` yourself.");if(!lb(e))throw TypeError("inputSchema/outputSchema/argsSchema must be a Standard Schema (e.g. z.object({...})) or a raw Zod shape ({ field: z.string() }).");return e}}var lQ=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;var t=class{};e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var r=class extends t{constructor(t){if(super(),!e.IDENTIFIER.test(t))throw Error("CodeGen: name must be a valid identifier");this.str=t}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};e.Name=r;var i=class extends t{constructor(e){super(),this._items="string"==typeof e?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return""===e||'""'===e}get str(){var e;return null!=(e=this._str)?e:this._str=this._items.reduce((e,t)=>`${e}${t}`,"")}get names(){var e;return null!=(e=this._names)?e:this._names=this._items.reduce((e,t)=>(t instanceof r&&(e[t.str]=(e[t.str]||0)+1),e),{})}};function o(e,...t){let r=[e[0]],n=0;for(;n{Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;let t=lQ();var r,i,o=class extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}};(r=i||(e.UsedValueState=i={}))[r.Started=0]="Started",r[r.Completed=1]="Completed",e.varKinds={const:new t.Name("const"),let:new t.Name("let"),var:new t.Name("var")};var n=class{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof t.Name?e:this.name(e)}name(e){return new t.Name(this._newName(e))}_newName(e){let t=this._names[e]||this._nameGroup(e);return`${e}${t.index++}`}_nameGroup(e){var t,r;if((null==(r=null==(t=this._parent)?void 0:t._prefixes)?void 0:r.has(e))||this._prefixes&&!this._prefixes.has(e))throw Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}};e.Scope=n;var a=class extends t.Name{constructor(e,t){super(t),this.prefix=e}setValue(e,{property:r,itemIndex:i}){this.value=e,this.scopePath=(0,t._)`.${new t.Name(r)}[${i}]`}};e.ValueScopeName=a;let s=(0,t._)`\n`;var d=class extends n{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?s:t.nil}}get(){return this._scope}name(e){return new a(e,this._newName(e))}value(e,t){var r;if(void 0===t.ref)throw Error("CodeGen: ref must be passed in value");let i=this.toName(e),{prefix:o}=i,n=null!=(r=t.key)?r:t.ref,a=this._values[o];if(a){let e=a.get(n);if(e)return e}else a=this._values[o]=new Map;a.set(n,i);let s=this._scope[o]||(this._scope[o]=[]),d=s.length;return s[d]=t.ref,i.setValue(t,{property:o,itemIndex:d}),i}getValue(e,t){let r=this._values[e];if(r)return r.get(t)}scopeRefs(e,r=this._values){return this._reduceValues(r,r=>{if(void 0===r.scopePath)throw Error(`CodeGen: name "${r}" has no value`);return(0,t._)`${e}${r.scopePath}`})}scopeCode(e=this._values,t,r){return this._reduceValues(e,e=>{if(void 0===e.value)throw Error(`CodeGen: name "${e}" has no value`);return e.value.code},t,r)}_reduceValues(r,n,a={},s){let d=t.nil;for(let c in r){let l=r[c];if(!l)continue;let p=a[c]=a[c]||new Map;l.forEach(r=>{if(p.has(r))return;p.set(r,i.Started);let a=n(r);if(a){let i=this.opts.es5?e.varKinds.var:e.varKinds.const;d=(0,t._)`${d}${i} ${r} = ${a};${this.opts._n}`}else if(a=null==s?void 0:s(r))d=(0,t._)`${d}${a}${this.opts._n}`;else throw new o(r);p.set(r,i.Completed)})}return d}};e.ValueScope=d}),lY=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;let t=lQ(),r=lX();var i=lQ();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return i._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return i.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return i.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return i.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return i.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return i.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return i.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return i.Name}});var o=lX();Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return o.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return o.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return o.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return o.varKinds}}),e.operators={GT:new t._Code(">"),GTE:new t._Code(">="),LT:new t._Code("<"),LTE:new t._Code("<="),EQ:new t._Code("==="),NEQ:new t._Code("!=="),NOT:new t._Code("!"),OR:new t._Code("||"),AND:new t._Code("&&"),ADD:new t._Code("+")};var n=class{optimizeNodes(){return this}optimizeNames(e,t){return this}},a=class extends n{constructor(e,t,r){super(),this.varKind=e,this.name=t,this.rhs=r}render({es5:e,_n:t}){let i=e?r.varKinds.var:this.varKind,o=void 0===this.rhs?"":` = ${this.rhs}`;return`${i} ${this.name}${o};`+t}optimizeNames(e,t){if(e[this.name.str])return this.rhs&&(this.rhs=x(this.rhs,e,t)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}},s=class extends n{constructor(e,t,r){super(),this.lhs=e,this.rhs=t,this.sideEffects=r}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,r){if(!(this.lhs instanceof t.Name)||e[this.lhs.str]||this.sideEffects)return this.rhs=x(this.rhs,e,r),this}get names(){return I(this.lhs instanceof t.Name?{}:{...this.lhs.names},this.rhs)}},d=class extends s{constructor(e,t,r,i){super(e,r,i),this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}},c=class extends n{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}},l=class extends n{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}},p=class extends n{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}},u=class extends n{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=x(this.code,e,t),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}},m=class extends n{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce((t,r)=>t+r.render(e),"")}optimizeNodes(){let{nodes:e}=this,t=e.length;for(;t--;){let r=e[t].optimizeNodes();Array.isArray(r)?e.splice(t,1,...r):r?e[t]=r:e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){let{nodes:r}=this,i=r.length;for(;i--;){let o=r[i];o.optimizeNames(e,t)||(function(e,t){for(let r in t)e[r]=(e[r]||0)-(t[r]||0)}(e,o.names),r.splice(i,1))}return r.length>0?this:void 0}get names(){return this.nodes.reduce((e,t)=>q(e,t.names),{})}},f=class extends m{render(e){return"{"+e._n+super.render(e)+"}"+e._n}},h=class extends m{},y=class extends f{};y.kind="else";var g=class e extends f{constructor(e,t){super(t),this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);return this.else&&(t+="else "+this.else.render(e)),t}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(!0===t)return this.nodes;let r=this.else;if(r){let e=r.optimizeNodes();r=this.else=Array.isArray(e)?new y(e):e}return r?!1===t?r instanceof e?r:r.nodes:this.nodes.length?this:new e(j(t),r instanceof e?[r]:r.nodes):!1!==t&&this.nodes.length?this:void 0}optimizeNames(e,t){var r;if(this.else=null==(r=this.else)?void 0:r.optimizeNames(e,t),super.optimizeNames(e,t)||this.else)return this.condition=x(this.condition,e,t),this}get names(){let e=super.names;return I(e,this.condition),this.else&&q(e,this.else.names),e}};g.kind="if";var _=class extends f{};_.kind="for";var v=class extends _{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iteration=x(this.iteration,e,t),this}get names(){return q(super.names,this.iteration.names)}},b=class extends _{constructor(e,t,r,i){super(),this.varKind=e,this.name=t,this.from=r,this.to=i}render(e){let t=e.es5?r.varKinds.var:this.varKind,{name:i,from:o,to:n}=this;return`for(${t} ${i}=${o}; ${i}<${n}; ${i}++)`+super.render(e)}get names(){return I(I(super.names,this.from),this.to)}},$=class extends _{constructor(e,t,r,i){super(),this.loop=e,this.varKind=t,this.name=r,this.iterable=i}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iterable=x(this.iterable,e,t),this}get names(){return q(super.names,this.iterable.names)}},S=class extends f{constructor(e,t,r){super(),this.name=e,this.args=t,this.async=r}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}};S.kind="func";var k=class extends m{render(e){return"return "+super.render(e)}};k.kind="return";var w=class extends f{render(e){let t="try"+super.render(e);return this.catch&&(t+=this.catch.render(e)),this.finally&&(t+=this.finally.render(e)),t}optimizeNodes(){var e,t;return super.optimizeNodes(),null==(e=this.catch)||e.optimizeNodes(),null==(t=this.finally)||t.optimizeNodes(),this}optimizeNames(e,t){var r,i;return super.optimizeNames(e,t),null==(r=this.catch)||r.optimizeNames(e,t),null==(i=this.finally)||i.optimizeNames(e,t),this}get names(){let e=super.names;return this.catch&&q(e,this.catch.names),this.finally&&q(e,this.finally.names),e}},R=class extends f{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}};R.kind="catch";var P=class extends f{render(e){return"finally"+super.render(e)}};P.kind="finally";var V=class{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?"\n":""},this._extScope=e,this._scope=new r.Scope({parent:e}),this._nodes=[new h]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){let r=this._extScope.value(e,t);return(this._values[r.prefix]||(this._values[r.prefix]=new Set)).add(r),r}getScopeValue(e,t){return this._extScope.getValue(e,t)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,t,r,i){let o=this._scope.toName(t);return void 0!==r&&i&&(this._constants[o.str]=r),this._leafNode(new a(e,o,r)),o}const(e,t,i){return this._def(r.varKinds.const,e,t,i)}let(e,t,i){return this._def(r.varKinds.let,e,t,i)}var(e,t,i){return this._def(r.varKinds.var,e,t,i)}assign(e,t,r){return this._leafNode(new s(e,t,r))}add(t,r){return this._leafNode(new d(t,e.operators.ADD,r))}code(e){return"function"==typeof e?e():e!==t.nil&&this._leafNode(new u(e)),this}object(...e){let r=["{"];for(let[i,o]of e)r.length>1&&r.push(","),r.push(i),(i!==o||this.opts.es5)&&(r.push(":"),(0,t.addCodeArg)(r,o));return r.push("}"),new t._Code(r)}if(e,t,r){if(this._blockNode(new g(e)),t&&r)this.code(t).else().code(r).endIf();else if(t)this.code(t).endIf();else if(r)throw Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new g(e))}else(){return this._elseNode(new y)}endIf(){return this._endBlockNode(g,y)}_for(e,t){return this._blockNode(e),t&&this.code(t).endFor(),this}for(e,t){return this._for(new v(e),t)}forRange(e,t,i,o,n=this.opts.es5?r.varKinds.var:r.varKinds.let){let a=this._scope.toName(e);return this._for(new b(n,a,t,i),()=>o(a))}forOf(e,i,o,n=r.varKinds.const){let a=this._scope.toName(e);if(this.opts.es5){let e=i instanceof t.Name?i:this.var("_arr",i);return this.forRange("_i",0,(0,t._)`${e}.length`,r=>{this.var(a,(0,t._)`${e}[${r}]`),o(a)})}return this._for(new $("of",n,a,i),()=>o(a))}forIn(e,i,o,n=this.opts.es5?r.varKinds.var:r.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,t._)`Object.keys(${i})`,o);let a=this._scope.toName(e);return this._for(new $("in",n,a,i),()=>o(a))}endFor(){return this._endBlockNode(_)}label(e){return this._leafNode(new c(e))}break(e){return this._leafNode(new l(e))}return(e){let t=new k;if(this._blockNode(t),this.code(e),1!==t.nodes.length)throw Error('CodeGen: "return" should have one node');return this._endBlockNode(k)}try(e,t,r){if(!t&&!r)throw Error('CodeGen: "try" without "catch" and "finally"');let i=new w;if(this._blockNode(i),this.code(e),t){let e=this.name("e");this._currNode=i.catch=new R(e),t(e)}return r&&(this._currNode=i.finally=new P,this.code(r)),this._endBlockNode(R,P)}throw(e){return this._leafNode(new p(e))}block(e,t){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(t),this}endBlock(e){let t=this._blockStarts.pop();if(void 0===t)throw Error("CodeGen: not in self-balancing block");let r=this._nodes.length-t;if(r<0||void 0!==e&&r!==e)throw Error(`CodeGen: wrong number of nodes: ${r} vs ${e} expected`);return this._nodes.length=t,this}func(e,r=t.nil,i,o){return this._blockNode(new S(e,r,i)),o&&this.code(o).endFunc(),this}endFunc(){return this._endBlockNode(S)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,t){let r=this._currNode;if(r instanceof e||t&&r instanceof t)return this._nodes.pop(),this;throw Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){let t=this._currNode;if(!(t instanceof g))throw Error('CodeGen: "else" without "if"');return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let t=this._nodes;t[t.length-1]=e}};function q(e,t){for(let r in t)e[r]=(e[r]||0)+(t[r]||0);return e}function I(e,r){return r instanceof t._CodeOrName?q(e,r.names):e}function x(e,r,i){var o;if(e instanceof t.Name)return n(e);if(!((o=e)instanceof t._Code&&o._items.some(e=>e instanceof t.Name&&1===r[e.str]&&void 0!==i[e.str])))return e;return new t._Code(e._items.reduce((e,r)=>(r instanceof t.Name&&(r=n(r)),r instanceof t._Code?e.push(...r._items):e.push(r),e),[]));function n(e){let t=i[e.str];return void 0===t||1!==r[e.str]?e:(delete r[e.str],t)}}function j(e){return"boolean"==typeof e||"number"==typeof e||null===e?!e:(0,t._)`!${E(e)}`}e.CodeGen=V,e.not=j;let C=O(e.operators.AND);e.and=function(...e){return e.reduce(C)};let T=O(e.operators.OR);function O(e){return(r,i)=>r===t.nil?i:i===t.nil?r:(0,t._)`${E(r)} ${e} ${E(i)}`}function E(e){return e instanceof t.Name?e:(0,t._)`(${e})`}e.or=function(...e){return e.reduce(T)}}),l1=eb(e=>{var t,r;Object.defineProperty(e,"__esModule",{value:!0}),e.checkStrictMode=e.getErrorPath=e.Type=e.useFunc=e.setEvaluated=e.evaluatedPropsToName=e.mergeEvaluated=e.eachItem=e.unescapeJsonPointer=e.escapeJsonPointer=e.escapeFragment=e.unescapeFragment=e.schemaRefOrVal=e.schemaHasRulesButRef=e.schemaHasRules=e.checkUnknownRules=e.alwaysValidSchema=e.toHash=void 0;let i=lY(),o=lQ();function n(e,t=e.schema){let{opts:r,self:i}=e;if(!r.strictSchema||"boolean"==typeof t)return;let o=i.RULES.keywords;for(let r in t)o[r]||m(e,`unknown keyword: "${r}"`)}function a(e,t){if("boolean"==typeof e)return!e;for(let r in e)if(t[r])return!0;return!1}function s(e){return"number"==typeof e?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}function d(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function c({mergeNames:e,mergeToName:t,mergeValues:r,resultToName:o}){return(n,a,s,d)=>{let c=void 0===s?a:s instanceof i.Name?(a instanceof i.Name?e(n,a,s):t(n,a,s),s):a instanceof i.Name?(t(n,s,a),a):r(a,s);return d!==i.Name||c instanceof i.Name?c:o(n,c)}}function l(e,t){if(!0===t)return e.var("props",!0);let r=e.var("props",(0,i._)`{}`);return void 0!==t&&p(e,r,t),r}function p(e,t,r){Object.keys(r).forEach(r=>e.assign((0,i._)`${t}${(0,i.getProperty)(r)}`,!0))}e.toHash=function(e){let t={};for(let r of e)t[r]=!0;return t},e.alwaysValidSchema=function(e,t){return"boolean"==typeof t?t:0===Object.keys(t).length||(n(e,t),!a(t,e.self.RULES.all))},e.checkUnknownRules=n,e.schemaHasRules=a,e.schemaHasRulesButRef=function(e,t){if("boolean"==typeof e)return!e;for(let r in e)if("$ref"!==r&&t.all[r])return!0;return!1},e.schemaRefOrVal=function({topSchemaRef:e,schemaPath:t},r,o,n){if(!n){if("number"==typeof r||"boolean"==typeof r)return r;if("string"==typeof r)return(0,i._)`${r}`}return(0,i._)`${e}${t}${(0,i.getProperty)(o)}`},e.unescapeFragment=function(e){return d(decodeURIComponent(e))},e.escapeFragment=function(e){return encodeURIComponent(s(e))},e.escapeJsonPointer=s,e.unescapeJsonPointer=d,e.eachItem=function(e,t){if(Array.isArray(e))for(let r of e)t(r);else t(e)},e.mergeEvaluated={props:c({mergeNames:(e,t,r)=>e.if((0,i._)`${r} !== true && ${t} !== undefined`,()=>{e.if((0,i._)`${t} === true`,()=>e.assign(r,!0),()=>e.assign(r,(0,i._)`${r} || {}`).code((0,i._)`Object.assign(${r}, ${t})`))}),mergeToName:(e,t,r)=>e.if((0,i._)`${r} !== true`,()=>{!0===t?e.assign(r,!0):(e.assign(r,(0,i._)`${r} || {}`),p(e,r,t))}),mergeValues:(e,t)=>!0===e||{...e,...t},resultToName:l}),items:c({mergeNames:(e,t,r)=>e.if((0,i._)`${r} !== true && ${t} !== undefined`,()=>e.assign(r,(0,i._)`${t} === true ? true : ${r} > ${t} ? ${r} : ${t}`)),mergeToName:(e,t,r)=>e.if((0,i._)`${r} !== true`,()=>e.assign(r,!0===t||(0,i._)`${r} > ${t} ? ${r} : ${t}`)),mergeValues:(e,t)=>!0===e||Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})},e.evaluatedPropsToName=l,e.setEvaluated=p;let u={};function m(e,t,r=e.opts.strictSchema){if(r){if(t=`strict mode: ${t}`,!0===r)throw Error(t);e.self.logger.warn(t)}}e.useFunc=function(e,t){return e.scopeValue("func",{ref:t,code:u[t.code]||(u[t.code]=new o._Code(t.code))})},(r=t||(e.Type=t={}))[r.Num=0]="Num",r[r.Str=1]="Str",e.getErrorPath=function(e,r,o){if(e instanceof i.Name){let n=r===t.Num;return o?n?(0,i._)`"[" + ${e} + "]"`:(0,i._)`"['" + ${e} + "']"`:n?(0,i._)`"/" + ${e}`:(0,i._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return o?(0,i.getProperty)(e).toString():"/"+s(e)},e.checkStrictMode=m}),l0=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=lY();e.default={data:new t.Name("data"),valCxt:new t.Name("valCxt"),instancePath:new t.Name("instancePath"),parentData:new t.Name("parentData"),parentDataProperty:new t.Name("parentDataProperty"),rootData:new t.Name("rootData"),dynamicAnchors:new t.Name("dynamicAnchors"),vErrors:new t.Name("vErrors"),errors:new t.Name("errors"),this:new t.Name("this"),self:new t.Name("self"),scope:new t.Name("scope"),json:new t.Name("json"),jsonPos:new t.Name("jsonPos"),jsonLen:new t.Name("jsonLen"),jsonPart:new t.Name("jsonPart")}}),l2=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;let t=lY(),r=l1(),i=l0();function o(e,r){let o=e.const("err",r);e.if((0,t._)`${i.default.vErrors} === null`,()=>e.assign(i.default.vErrors,(0,t._)`[${o}]`),(0,t._)`${i.default.vErrors}.push(${o})`),e.code((0,t._)`${i.default.errors}++`)}function n(e,r){let{gen:i,validateName:o,schemaEnv:n}=e;n.$async?i.throw((0,t._)`new ${e.ValidationError}(${r})`):(i.assign((0,t._)`${o}.errors`,r),i.return(!1))}e.keywordError={message:({keyword:e})=>(0,t.str)`must pass "${e}" keyword validation`},e.keyword$DataError={message:({keyword:e,schemaType:r})=>r?(0,t.str)`"${e}" keyword must be ${r} ($data)`:(0,t.str)`"${e}" keyword is invalid ($data)`},e.reportError=function(r,i=e.keywordError,a,d){let{it:c}=r,{gen:l,compositeRule:p,allErrors:u}=c,m=s(r,i,a);(null!=d?d:p||u)?o(l,m):n(c,(0,t._)`[${m}]`)},e.reportExtraError=function(t,r=e.keywordError,a){let{it:d}=t,{gen:c,compositeRule:l,allErrors:p}=d;o(c,s(t,r,a)),l||p||n(d,i.default.vErrors)},e.resetErrorsCount=function(e,r){e.assign(i.default.errors,r),e.if((0,t._)`${i.default.vErrors} !== null`,()=>e.if(r,()=>e.assign((0,t._)`${i.default.vErrors}.length`,r),()=>e.assign(i.default.vErrors,null)))},e.extendErrors=function({gen:e,keyword:r,schemaValue:o,data:n,errsCount:a,it:s}){if(void 0===a)throw Error("ajv implementation error");let d=e.name("err");e.forRange("i",a,i.default.errors,a=>{e.const(d,(0,t._)`${i.default.vErrors}[${a}]`),e.if((0,t._)`${d}.instancePath === undefined`,()=>e.assign((0,t._)`${d}.instancePath`,(0,t.strConcat)(i.default.instancePath,s.errorPath))),e.assign((0,t._)`${d}.schemaPath`,(0,t.str)`${s.errSchemaPath}/${r}`),s.opts.verbose&&(e.assign((0,t._)`${d}.schema`,o),e.assign((0,t._)`${d}.data`,n))})};let a={keyword:new t.Name("keyword"),schemaPath:new t.Name("schemaPath"),params:new t.Name("params"),propertyName:new t.Name("propertyName"),message:new t.Name("message"),schema:new t.Name("schema"),parentSchema:new t.Name("parentSchema")};function s(e,o,n){let{createErrors:s}=e.it;return!1===s?(0,t._)`{}`:function(e,o,n={}){let{gen:s,it:d}=e,c=[function({errorPath:e},{instancePath:o}){let n=o?(0,t.str)`${e}${(0,r.getErrorPath)(o,r.Type.Str)}`:e;return[i.default.instancePath,(0,t.strConcat)(i.default.instancePath,n)]}(d,n),function({keyword:e,it:{errSchemaPath:i}},{schemaPath:o,parentSchema:n}){let s=n?i:(0,t.str)`${i}/${e}`;return o&&(s=(0,t.str)`${s}${(0,r.getErrorPath)(o,r.Type.Str)}`),[a.schemaPath,s]}(e,n)];return function(e,{params:r,message:o},n){let{keyword:s,data:d,schemaValue:c,it:l}=e,{opts:p,propertyName:u,topSchemaRef:m,schemaPath:f}=l;n.push([a.keyword,s],[a.params,"function"==typeof r?r(e):r||(0,t._)`{}`]),p.messages&&n.push([a.message,"function"==typeof o?o(e):o]),p.verbose&&n.push([a.schema,c],[a.parentSchema,(0,t._)`${m}${f}`],[i.default.data,d]),u&&n.push([a.propertyName,u])}(e,o,c),s.object(...c)}(e,o,n)}}),l4=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.boolOrEmptySchema=e.topBoolOrEmptySchema=void 0;let t=l2(),r=lY(),i=l0(),o={message:"boolean schema is false"};function n(e,r){let{gen:i,data:n}=e;(0,t.reportError)({gen:i,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e},o,void 0,r)}e.topBoolOrEmptySchema=function(e){let{gen:t,schema:o,validateName:a}=e;!1===o?n(e,!1):"object"==typeof o&&!0===o.$async?t.return(i.default.data):(t.assign((0,r._)`${a}.errors`,null),t.return(!0))},e.boolOrEmptySchema=function(e,t){let{gen:r,schema:i}=e;!1===i?(r.var(t,!1),n(e)):r.var(t,!0)}}),l6=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getRules=e.isJSONType=void 0;let t=new Set(["string","number","integer","boolean","null","object","array"]);e.isJSONType=function(e){return"string"==typeof e&&t.has(e)},e.getRules=function(){let e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}}),l3=eb(e=>{function t(e,t){return t.rules.some(t=>r(e,t))}function r(e,t){var r;return void 0!==e[t.keyword]||(null==(r=t.definition.implements)?void 0:r.some(t=>void 0!==e[t]))}Object.defineProperty(e,"__esModule",{value:!0}),e.shouldUseRule=e.shouldUseGroup=e.schemaHasRulesForType=void 0,e.schemaHasRulesForType=function({schema:e,self:r},i){let o=r.RULES.types[i];return o&&!0!==o&&t(e,o)},e.shouldUseGroup=t,e.shouldUseRule=r}),l9=eb(e=>{var t,r;Object.defineProperty(e,"__esModule",{value:!0}),e.reportTypeError=e.checkDataTypes=e.checkDataType=e.coerceAndCheckDataType=e.getJSONTypes=e.getSchemaTypes=e.DataType=void 0;let i=l6(),o=l3(),n=l2(),a=lY(),s=l1();function d(e){let t=Array.isArray(e)?e:e?[e]:[];if(t.every(i.isJSONType))return t;throw Error("type must be JSONType or JSONType[]: "+t.join(","))}(r=t||(e.DataType=t={}))[r.Correct=0]="Correct",r[r.Wrong=1]="Wrong",e.getSchemaTypes=function(e){let t=d(e.type);if(t.includes("null")){if(!1===e.nullable)throw Error("type: null contradicts nullable: false")}else{if(!t.length&&void 0!==e.nullable)throw Error('"nullable" cannot be used without "type"');!0===e.nullable&&t.push("null")}return t},e.getJSONTypes=d,e.coerceAndCheckDataType=function(e,r){var i,n;let{gen:s,data:d,opts:l}=e,u=(i=r,(n=l.coerceTypes)?i.filter(e=>c.has(e)||"array"===n&&"array"===e):[]),f=r.length>0&&!(0===u.length&&1===r.length&&(0,o.schemaHasRulesForType)(e,r[0]));if(f){let i=p(r,d,l.strictNumbers,t.Wrong);s.if(i,()=>{u.length?function(e,t,r){let{gen:i,data:o,opts:n}=e,s=i.let("dataType",(0,a._)`typeof ${o}`),d=i.let("coerced",(0,a._)`undefined`);for(let e of("array"===n.coerceTypes&&i.if((0,a._)`${s} == 'object' && Array.isArray(${o}) && ${o}.length == 1`,()=>i.assign(o,(0,a._)`${o}[0]`).assign(s,(0,a._)`typeof ${o}`).if(p(t,o,n.strictNumbers),()=>i.assign(d,o))),i.if((0,a._)`${d} !== undefined`),r))(c.has(e)||"array"===e&&"array"===n.coerceTypes)&&function(e){switch(e){case"string":i.elseIf((0,a._)`${s} == "number" || ${s} == "boolean"`).assign(d,(0,a._)`"" + ${o}`).elseIf((0,a._)`${o} === null`).assign(d,(0,a._)`""`);return;case"number":i.elseIf((0,a._)`${s} == "boolean" || ${o} === null +Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let r of e.seen.entries()){let i=r[1];if(t===r[0]){o(r);continue}if(e.external){let i=e.external.registry.get(r[0])?.id;if(t!==r[0]&&i){o(r);continue}}if(e.metadataRegistry.get(r[0])?.id||i.cycle){o(r);continue}i.count>1&&"ref"===e.reused&&o(r)}e.external&&(e.sharedDefsExtractedFor=e.external)}let iL=new Set(["type","properties","required","additionalProperties"]),iU=["oneOf","anyOf"];function iH(e){let t=e.additionalProperties;return void 0===t||!1===t||"object"!=typeof t||null===t?null:Object.keys(t).length?t:null}function iG(e){let t=[];for(let r of e){if("object"!=typeof r||"object"!==r.type)return null;for(let e in r)if(!iL.has(e))return null;t.push(r)}let r={},i=new Set;for(let e of t){for(let i in e.properties){if(Object.prototype.hasOwnProperty.call(r,i))continue;let e=[];for(let r of t){let t=r.properties?.[i]??iH(r);null!=t&&(e.some(e=>JSON.stringify(e)===JSON.stringify(t))||e.push(t))}eT(r,i,1===e.length?e[0]:iG(e)??{allOf:e})}for(let t of e.required??[])i.add(t)}let o={type:"object",properties:r};if(i.size&&(o.required=[...i]),t.every(e=>!1===e.additionalProperties))o.additionalProperties=!1;else{let e=[];for(let r of t){let t=iH(r);t&&!e.some(e=>JSON.stringify(e)===JSON.stringify(t))&&e.push(t)}1===e.length?o.additionalProperties=e[0]:e.length>1&&(o.additionalProperties={allOf:e})}return o}function iB(e,t){let r=e.seen.get(t);if(!r)throw Error("Unprocessed schema. This is a bug in Zod.");let i=t=>{let r=e.seen.get(t);if(null===r.ref)return;let o=r.def??r.schema,n={...o},a=r.ref;if(r.ref=null,a){i(a);let r=e.seen.get(a),s=r.schema;if(s.$ref&&("draft-07"===e.target||"draft-04"===e.target||"openapi-3.0"===e.target)?(o.allOf=o.allOf??[],o.allOf.push(s)):iW(o,s),iW(o,n),t._zod.parent===a)for(let e in o)"$ref"!==e&&"allOf"!==e&&(e in n||delete o[e]);if(s.$ref&&r.def)for(let e in o)"$ref"!==e&&"allOf"!==e&&e in r.def&&JSON.stringify(o[e])===JSON.stringify(r.def[e])&&delete o[e]}let s=t._zod.parent;if(s&&s!==a){i(s);let t=e.seen.get(s);if(t?.schema.$ref&&(o.$ref=t.schema.$ref,t.def))for(let e in o)"$ref"!==e&&"allOf"!==e&&e in t.def&&JSON.stringify(o[e])===JSON.stringify(t.def[e])&&delete o[e]}e.override({zodSchema:t,jsonSchema:o,path:r.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(let t of[...e.seen.entries()].reverse())i(t[0]);if("openapi-3.0"!==e.target)for(let t of e.seen.entries())!function e(t){let r=t.anyOf;if(!Array.isArray(r)||0===r.length||void 0!==t.type)return;let i=[];for(let t of r){if(!t||"object"!=typeof t)return;e(t);let r=Object.keys(t);if(1!==r.length||"type"!==r[0])return;let o=t.type;for(let e of Array.isArray(o)?o:[o]){if("string"!=typeof e)return;i.includes(e)||i.push(e)}}delete t.anyOf,t.type=1===i.length?i[0]:i}(t[1].def??t[1].schema);for(let t of e.deferred)t();if(e.intersections.length){let t=new Map;for(let r of e.seen.values())for(let e of[r.schema,r.def]){let r=e?.allOf;if(!Array.isArray(r))continue;let i=t.get(r);i?i.push(e):t.set(r,[e])}for(let r of e.intersections)for(let e of t.get(r)??[])!function(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let t of iL)if(t in e)return;let r=t.filter(e=>iU.some(t=>Array.isArray(e[t]))),i=null;if(r.length){let e=r[0],o=iU.find(t=>Array.isArray(e[t]));if(1!==Object.keys(e).length)return;let n=t.filter(t=>t!==e),a=e[o].map(e=>iG([...n,e]));if(a.some(e=>!e))return;i={[o]:a}}else i=iG(t);i&&(delete e.allOf,iW(e,i))}(e)}}let o={};if("draft-2020-12"===e.target?o.$schema="https://json-schema.org/draft/2020-12/schema":"draft-07"===e.target?o.$schema="http://json-schema.org/draft-07/schema#":"draft-04"===e.target?o.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){let r=e.external.registry.get(t)?.id;if(!r)throw Error("Schema is missing an `id` property");o.$id=e.external.uri(r)}iW(o,r.defId?r.schema:r.def??r.schema);let n=e.metadataRegistry.get(t)?.id;void 0!==n&&o.id===n&&delete o.id;let a=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,eT(a,e.defId,e.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(a).length>0&&("draft-2020-12"===e.target?o.$defs=a:o.definitions=a);try{let r=JSON.parse(JSON.stringify(o));return Object.defineProperty(r,"~standard",{value:{...t["~standard"],jsonSchema:{input:iK(t,"input",e.processors),output:iK(t,"output",e.processors)}},enumerable:!1,writable:!1}),r}catch(e){throw Error("Error converting schema to JSON.")}}let iK=(e,t,r={})=>i=>{let{libraryOptions:o,target:n}=i??{},a=iM({...o??{},target:n,io:t,processors:r});return iz(e,a),iF(a,e),iB(a,e)},iJ=(e,t,r)=>{(void 0===e[t]||r>e[t])&&(e[t]=r)},iZ=(e,t,r)=>{(void 0===e[t]||r{iJ(e,"minimum",t),iZ(e,"maximum",t)},iX=(e,t)=>{e.multipleOf??(e.multipleOf=[]),e.multipleOf.includes(t)||e.multipleOf.push(t)},iY=(e,t)=>{e.patterns??(e.patterns=new Set),e.patterns.add(t)},i1=(e,t)=>{e.mime=e.mime?e.mime.filter(e=>t.includes(e)):[...t]},i0=(e,t)=>{e.format=t,t.includes("int")&&(e.isInt=!0)},i2=(e,t)=>iJ(e,"minimum",t.minimum),i4=(e,t)=>iZ(e,"maximum",t.maximum),i6=e=>(t,r)=>{i0(t,r.format);let[i,o]=e[r.format];iJ(t,"minimum",i),iZ(t,"maximum",o)},i3={greater_than:(e,t)=>iJ(e,t.inclusive?"minimum":"exclusiveMinimum",t.value),less_than:(e,t)=>iZ(e,t.inclusive?"maximum":"exclusiveMaximum",t.value),multiple_of:(e,t)=>iX(e,t.value),number_format:i6(eZ),bigint_format:i6(eQ),min_length:i2,max_length:i4,length_equals:(e,t)=>iQ(e,t.length),min_size:i2,max_size:i4,size_equals:(e,t)=>iQ(e,t.size),string_format:(e,t)=>{i0(e,t.format),t.pattern&&iY(e,t.pattern),("base64"===t.format||"base64url"===t.format)&&(e.contentEncoding=t.format),(t.local||-1===t.precision)&&(e.laxFormat=!0)},mime_type:(e,t)=>i1(e,t.mime)};function i9(e){let t={},r=e._zod.def;for(let i of e._zod.traits.has("$ZodCheck")?[e,...r.checks??[]]:r.checks??[])i3[i._zod.def.check]?.(t,i._zod.def);let i=e._zod.bag;for(let e of(void 0!==i.minimum&&iJ(t,"minimum",i.minimum),void 0!==i.exclusiveMinimum&&iJ(t,"exclusiveMinimum",i.exclusiveMinimum),void 0!==i.maximum&&iZ(t,"maximum",i.maximum),void 0!==i.exclusiveMaximum&&iZ(t,"exclusiveMaximum",i.exclusiveMaximum),void 0!==i.multipleOf&&iX(t,i.multipleOf),void 0!==i.format&&(t.format??(t.format=i.format),i.format.includes("int")&&(t.isInt=!0)),i.mime&&i1(t,i.mime),i.patterns??[]))iY(t,e);return t}let i5={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},i8=new Map([[rO,/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/],[rA,/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/]]),i7=e=>i8.get(e)??e,oe=(e,t,r,i)=>{r.type="string";let{minimum:o,maximum:n,format:a,patterns:s,contentEncoding:d,laxFormat:c}=i9(e);if("number"==typeof o&&(r.minLength=o),"number"==typeof n&&(r.maxLength=n),a&&(r.format=i5[a]??a,""===r.format&&delete r.format,("time"===a||c)&&delete r.format),d&&(r.contentEncoding=d),s&&s.size>0){let e=[...s].map(i7);1===e.length?r.pattern=e[0].source:e.length>1&&(r.allOf=[...e.map(e=>({..."draft-07"===t.target||"draft-04"===t.target||"openapi-3.0"===t.target?{type:"string"}:{},pattern:e.source}))])}},ot=(e,t,r,i)=>{let{minimum:o,maximum:n,multipleOf:a,exclusiveMaximum:s,exclusiveMinimum:d,isInt:c}=i9(e);r.type=c?"integer":"number";let l="number"==typeof d&&d>=(o??-1/0),p="number"==typeof s&&s<=(n??1/0),u="draft-04"===t.target||"openapi-3.0"===t.target;if(l?u?(r.minimum=d,r.exclusiveMinimum=!0):r.exclusiveMinimum=d:"number"==typeof o&&(r.minimum=o),p?u?(r.maximum=s,r.exclusiveMaximum=!0):r.exclusiveMaximum=s:"number"==typeof n&&(r.maximum=n),a){let o=new Set;for(let n of a)Number.isFinite(n)&&0!==n?o.add(Math.abs(n)):iN(e,t,r,i,`A multipleOf divisor of ${n} cannot be represented in JSON Schema`);let[n,...s]=o;void 0!==n&&(r.multipleOf=n),s.length&&(r.allOf=[...r.allOf??[],...s.map(e=>({multipleOf:e}))])}},or=(e,t,r,i)=>{r.type="boolean"},oi=(e,t,r,i)=>{"openapi-3.0"===t.target?(r.type="string",r.nullable=!0,r.enum=[null]):r.type="null"},oo=(e,t,r,i)=>{r.not={}},on=(e,t,r,i)=>{},oa=(e,t,r,i)=>{},os=(e,t,r,i)=>{let o=eP(e._zod.def.entries);if(0===o.length){r.not={};return}o.every(e=>"number"==typeof e)&&(r.type="number"),o.every(e=>"string"==typeof e)&&(r.type="string"),r.enum=o},od=(e,t,r,i)=>{let o=e._zod.def;if(0===o.values.length){r.not={};return}let n=[];for(let a of o.values)if(void 0===a){if(iN(e,t,r,i,"Literal `undefined` cannot be represented in JSON Schema"))return}else if("bigint"==typeof a){if(iN(e,t,r,i,"BigInt literals cannot be represented in JSON Schema"))return;n.push(Number(a))}else n.push(a);if(0===n.length);else if(1===n.length){let e=n[0];r.type=null===e?"null":typeof e,"draft-04"===t.target||"openapi-3.0"===t.target?r.enum=[e]:r.const=e}else n.every(e=>"number"==typeof e)&&(r.type="number"),n.every(e=>"string"==typeof e)&&(r.type="string"),n.every(e=>"boolean"==typeof e)&&(r.type="boolean"),n.every(e=>null===e)&&(r.type="null"),r.enum=n},oc=(e,t,r,i)=>{iN(e,t,r,i,"Custom types cannot be represented in JSON Schema")},ol=(e,t,r,i)=>{iN(e,t,r,i,"Transforms cannot be represented in JSON Schema")},op=(e,t,r,i)=>{let o=e._zod.def,{minimum:n,maximum:a}=i9(e);"number"==typeof n&&(r.minItems=n),"number"==typeof a&&(r.maxItems=a),r.type="array",r.items=iz(o.element,t,{...i,path:[...i.path,"items"]})};function ou(e){let t=e._zod.def;return"pipe"===t.type&&t.in._zod.traits.has("$ZodTransform")?ou(t.out):"catch"===t.type?ou(t.innerType):e._zod.optin}let om=(e,t,r,i)=>{let o=e._zod.def,n=o.shape;if(Object.getOwnPropertySymbols(n).length&&iN(e,t,r,i,"Symbol keys cannot be represented in JSON Schema"))return;for(let e in r.type="object",r.properties={},n)eT(r.properties,e,iz(n[e],t,{...i,path:[...i.path,"properties",e]}));let a=[];for(let e of Object.keys(n)){let r=o.shape[e];("input"===t.io?void 0===ou(r):void 0===r._zod.optout)&&a.push(e)}a.length>0&&(r.required=a),o.catchall?._zod.def.type==="never"?r.additionalProperties=!1:o.catchall?o.catchall&&(r.additionalProperties=iz(o.catchall,t,{...i,path:[...i.path,"additionalProperties"]})):"output"===t.io&&(r.additionalProperties=!1)},of=(e,t,r,i)=>{let o=e._zod.def,n=!1===o.inclusive,a=o.options.map((e,r)=>iz(e,t,{...i,path:[...i.path,n?"oneOf":"anyOf",r]}));n?r.oneOf=a:r.anyOf=a},oh=(e,t,r,i)=>{let o=e._zod.def,n=iz(o.left,t,{...i,path:[...i.path,"allOf",0]}),a=iz(o.right,t,{...i,path:[...i.path,"allOf",1]}),s=e=>"allOf"in e&&1===Object.keys(e).length,d=[...s(n)?n.allOf:[n],...s(a)?a.allOf:[a]];r.allOf=d,t.intersections.push(d)},oy=new WeakMap,og=(e,t,r,i)=>{let o=e._zod.def;r.type="object";let n=o.keyType,a=i9(n).patterns;if("loose"===o.mode&&a&&a.size>0){let e=iz(o.valueType,t,{...i,path:[...i.path,"patternProperties","*"]});for(let t of(r.patternProperties={},a))eT(r.patternProperties,i7(t).source,e)}else{if("draft-07"===t.target||"draft-2020-12"===t.target){r.propertyNames=iz(o.keyType,t,{...i,path:[...i.path,"propertyNames"]});let n=oy.get(t);n||(n=[],oy.set(t,n),t.deferred.push(()=>(function(e){let t=new Map;for(let r of e.seen.values())r.def&&!t.has(r.schema)&&t.set(r.schema,r);let r=new Map;for(let i of oy.get(e)??[]){let o=e.seen.get(i),n=(o?.def??o?.schema)?.propertyNames;if(!n||!0===n||r.has(n))continue;let a=function e(t,r,i){if(r.$ref){if(i.has(r))return r;i.add(r);let o=t.get(r)?.def;if(!o)return r;let n=e(t,o,i);return n===o?r:n}for(let o of["anyOf","oneOf"]){let n=r[o];if(!Array.isArray(n))continue;let a=n.map(r=>e(t,r,i));a.some((e,t)=>e!==n[t])&&(r={...r,[o]:a})}let o=Array.isArray(r.type)?r.type:[r.type],n=!o.includes("string")&&o.some(e=>"number"===e||"integer"===e),a=r.enum??(void 0!==r.const?[r.const]:void 0);if(!n&&!a?.some(e=>"number"==typeof e))return r;let{minimum:s,maximum:d,exclusiveMinimum:c,exclusiveMaximum:l,multipleOf:p,format:u,id:m,...f}=r;return f.enum?f.enum=f.enum.map(e=>"number"==typeof e?String(e):e):"number"==typeof f.const&&(f.const=String(f.const)),n&&(f.type="string",a||(f.pattern=(o.includes("number")?tL:tF).source)),f}(t,n,new Set);a!==n&&r.set(n,a)}if(r.size)for(let t of e.seen.values())for(let e of[t.schema,t.def]){let t=e&&r.get(e.propertyNames);t&&(e.propertyNames=t)}})(t))),n.push(e)}r.additionalProperties=iz(o.valueType,t,{...i,path:[...i.path,"additionalProperties"]})}let s=n._zod.values,d="input"===t.io&&void 0!==ou(o.valueType);if(s&&!o.partial&&!d){let e=[...s].filter(e=>"string"==typeof e||"number"==typeof e);e.length>0&&(r.required=e.map(String))}},o_=(e,t,r,i)=>{let o=e._zod.def,n=iz(o.innerType,t,i),a=t.seen.get(e);"openapi-3.0"===t.target?(a.ref=o.innerType,r.nullable=!0):r.anyOf=[n,{type:"null"}]},ov=(e,t,r,i)=>{let o=e._zod.def;iz(o.innerType,t,i),t.seen.get(e).ref=o.innerType},ob=Symbol();function o$(e,t,r,i,o){let n=!1,a=JSON.stringify(e,(e,t)=>"bigint"!=typeof t?t:(n=!0,null));return n?(iN(t,r,i,o,"BigInt defaults cannot be represented in JSON Schema"),ob):JSON.parse(a)}let oS=(e,t,r,i)=>{let o=e._zod.def;iz(o.innerType,t,i),t.seen.get(e).ref=o.innerType;let n=o$(o.defaultValue,e,t,r,i);n!==ob&&(r.default=n)},ok=(e,t,r,i)=>{let o=e._zod.def;if(iz(o.innerType,t,i),t.seen.get(e).ref=o.innerType,"input"!==t.io)return;let n=o$(o.defaultValue,e,t,r,i);n!==ob&&(r._prefault=n)},ow=(e,t,r,i)=>{let o,n=e._zod.def;iz(n.innerType,t,i),t.seen.get(e).ref=n.innerType;try{o=n.catchValue(void 0)}catch{iN(e,t,r,i,"Dynamic catch values are not supported in JSON Schema");return}r.default=o},oV=(e,t,r,i)=>{let o=e._zod.def,n=o.in._zod.traits.has("$ZodTransform"),a="input"===t.io?n?o.out:o.in:o.out;iz(a,t,i),t.seen.get(e).ref=a},oP=(e,t,r,i)=>{let o=e._zod.def;iz(o.innerType,t,i),t.seen.get(e).ref=o.innerType,r.readOnly=!0},oR=(e,t,r,i)=>{let o=e._zod.def;iz(o.innerType,t,i),t.seen.get(e).ref=o.innerType},oq=(e,t,r,i)=>{let o=e._zod.innerType;iz(o,t,i),t.seen.get(e).ref=o},oI={string:oe,number:ot,boolean:or,bigint:(e,t,r,i)=>{iN(e,t,r,i,"BigInt cannot be represented in JSON Schema")},symbol:(e,t,r,i)=>{iN(e,t,r,i,"Symbols cannot be represented in JSON Schema")},null:oi,undefined:(e,t,r,i)=>{iN(e,t,r,i,"Undefined cannot be represented in JSON Schema")},void:(e,t,r,i)=>{iN(e,t,r,i,"Void cannot be represented in JSON Schema")},never:oo,any:on,unknown:oa,date:(e,t,r,i)=>{iN(e,t,r,i,"Date cannot be represented in JSON Schema")},enum:os,literal:od,nan:(e,t,r,i)=>{iN(e,t,r,i,"NaN cannot be represented in JSON Schema")},template_literal:(e,t,r,i)=>{let o=e._zod.pattern;if(!o)throw Error("Pattern not found in template literal");r.type="string",r.pattern=o.source},file:(e,t,r,i)=>{r.type="string",r.format="binary",r.contentEncoding="binary";let{minimum:o,maximum:n,mime:a}=i9(e);void 0!==o&&(r.minLength=o),void 0!==n&&(r.maxLength=n),a&&(0===a.length?r.not={}:1===a.length?r.contentMediaType=a[0]:r.anyOf=a.map(e=>({contentMediaType:e})))},success:(e,t,r,i)=>{r.type="boolean"},custom:oc,function:(e,t,r,i)=>{iN(e,t,r,i,"Function types cannot be represented in JSON Schema")},transform:ol,map:(e,t,r,i)=>{iN(e,t,r,i,"Map cannot be represented in JSON Schema")},set:(e,t,r,i)=>{iN(e,t,r,i,"Set cannot be represented in JSON Schema")},array:op,object:om,union:of,intersection:oh,tuple:(e,t,r,i)=>{let o=e._zod.def;r.type="array";let n="draft-2020-12"===t.target?"prefixItems":"items",a="draft-2020-12"===t.target||"openapi-3.0"===t.target?"items":"additionalItems",s=o.items.map((e,r)=>iz(e,t,{...i,path:[...i.path,n,r]})),d=o.rest?iz(o.rest,t,{...i,path:[...i.path,a,..."openapi-3.0"===t.target?[o.items.length]:[]]}):null,c=o.items.length;for(;c>0;){let e=o.items[c-1];if(!("input"===t.io?void 0!==ou(e):"optional"===e._zod.optout))break;c--}let l=o.items.length,p=!o.rest;"draft-2020-12"===t.target?(r.prefixItems=s,p?r.items=!1:d&&(r.items=d)):"openapi-3.0"===t.target?(r.items={anyOf:s},d&&r.items.anyOf.push(d)):(r.items=s,p?r.additionalItems=!1:d&&(r.additionalItems=d)),c>0&&(r.minItems=c),p&&(r.maxItems=l);let{minimum:u,maximum:m}=i9(e);"number"==typeof u&&(r.minItems=u),"number"==typeof m&&(r.maxItems=m)},record:og,nullable:o_,nonoptional:ov,default:oS,prefault:ok,catch:ow,pipe:oV,readonly:oP,promise:(e,t,r,i)=>{let o=e._zod.def;iz(o.innerType,t,i),t.seen.get(e).ref=o.innerType},optional:oR,lazy:oq};function ox(e,t){if("_idmap"in e){let r=iM({...t,processors:oI}),i={};for(let t of e._idmap.entries()){let[e,i]=t;iz(i,r)}let o={};for(let n of(r.external={registry:e,uri:t?.uri,defs:i},e._idmap.entries())){let[e,t]=n;iF(r,t),eT(o,e,iB(r,t))}return Object.keys(i).length>0&&(o.__shared={["draft-2020-12"===r.target?"$defs":"definitions"]:i}),{schemas:o}}let r=iM({...t,processors:oI});return iz(e,r),iF(r,e),iB(r,e)}let oj={get:function(){let e=this._zod;return e.message??(e.message=JSON.stringify(e.def,eq,2)),e.message},set:function(e){this._zod.message=e},enumerable:!0,configurable:!0},oC={value:void 0,enumerable:!1},oT=new WeakSet([Object.prototype,Error.prototype]),oO=(e,t)=>{e.name="$ZodError",oC.value=t,Object.defineProperty(e,"issues",oC),oC.value=void 0,Object.defineProperty(e,"message",oj);let r=Object.getPrototypeOf(e);oT.has(r)||(oT.add(r),Object.defineProperty(r,"toString",{configurable:!0,enumerable:!1,get(){let e=()=>this.message;return Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0})}}))},oE=tc("$ZodError",oO);function oA(e,t){return{callee:t?.callee??e,Err:t?.Err}}tc("$ZodError",oO,void 0,{Parent:Error});let oW=e=>{let t=(r,i,o,n)=>{let a=o?{...o,async:!1}:{async:!1},s=r._zod.run({value:i,issues:[]},a);if(s instanceof Promise)throw new tl;if(s.issues.length){let r=new(n?.Err??e)(s.issues.map(e=>e9(e,a,tm())));throw ez(r,n?.callee??t),r}return s.value};return t},oM=e=>{let t=async(r,i,o,n)=>{let a=o?{...o,async:!0}:{async:!0},s=r._zod.run({value:i,issues:[]},a);if(s instanceof Promise&&(s=await s),s.issues.length){let r=new(n?.Err??e)(s.issues.map(e=>e9(e,a,tm())));throw ez(r,n?.callee??t),r}return s.value};return t},oN=e=>(t,r,i)=>{let o=i?{...i,async:!1}:{async:!1},n=t._zod.run({value:r,issues:[]},o);if(n instanceof Promise)throw new tl;return n.issues.length?oz(e,n.issues,o):{success:!0,data:n.value}};function oz(e,t,r){let i;return{success:!1,get error(){return i||(i=new e(t.map(e=>e9(e,r,tm()))),t=void 0,r=void 0),i},set error(e){i=e,t=void 0,r=void 0}}}let oD=e=>async(t,r,i)=>{let o=i?{...i,async:!0}:{async:!0},n=t._zod.run({value:r,issues:[]},o);return n instanceof Promise&&(n=await n),n.issues.length?oz(e,n.issues,o):{success:!0,data:n.value}},oF=Symbol.for("zod.compile.invalid"),oL=Symbol.for("zod.compile.fallback"),oU=new WeakSet([Object.prototype,Error.prototype]);function oH(e,t,r){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){let e=r(this);return Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0})}})}let oG=tc("ZodError",(e,t)=>{oE.init(e,t),e.name="ZodError";let r=Object.getPrototypeOf(e);oU.has(r)||(oU.add(r),oH(r,"format",e=>t=>(function(e,t=e=>e.message){let r={_errors:[]},i=(e,o=[])=>{for(let n of e.issues)if("invalid_union"===n.code&&n.errors.length)n.errors.map(e=>i({issues:e},[...o,...n.path]));else if("invalid_key"===n.code)i({issues:n.issues},[...o,...n.path]);else if("invalid_element"===n.code)i({issues:n.issues},[...o,...n.path]);else{let e=[...o,...n.path];if(0===e.length)r._errors.push(t(n));else{let i=r,o=0;for(;ot=>(function(e,t=e=>e.message){let r={},i=[];for(let a of e.issues)if(a.path.length>0){var o,n;(o=a.path[0],n=()=>[],!Object.prototype.hasOwnProperty.call(r,o)&&("__proto__"===o?Object.defineProperty(r,o,{value:n(),writable:!0,enumerable:!0,configurable:!0}):r[o]=n()),r[o]).push(t(a))}else i.push(t(a));return{formErrors:i,fieldErrors:r}})(e,t)),oH(r,"addIssue",e=>t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,eq,2)}),oH(r,"addIssues",e=>t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,eq,2)}),Object.defineProperty(r,"isEmpty",{configurable:!0,enumerable:!1,get(){return 0===this.issues.length}}))},void 0,{Parent:Error}),oB=oW(oG),oK=oM(oG),oJ=oN(oG),oZ=oD(oG),oQ=(y=oW(oG),g=(e,t,r,i)=>y(e,t,r?{...r,direction:"backward"}:{direction:"backward"},oA(g,i))),oX=(_=oW(oG),v=(e,t,r,i)=>_(e,t,r,oA(v,i))),oY=(b=oM(oG),$=async(e,t,r,i)=>{let o=r?{...r,direction:"backward"}:{direction:"backward"};return await b(e,t,o,oA($,i))}),o1=(S=oM(oG),k=async(e,t,r,i)=>await S(e,t,r,oA(k,i))),o0=(e,t,r)=>{let i=r?{...r,direction:"backward"}:{direction:"backward"};return oN(oG)(e,t,i)},o2=(e,t,r)=>oN(oG)(e,t,r),o4=async(e,t,r)=>{let i=r?{...r,direction:"backward"}:{direction:"backward"};return oD(oG)(e,t,i)},o6=async(e,t,r)=>oD(oG)(e,t,r);function o3(){tu.memoizer||tm({memoizer:t$})}let o9=tc("ZodType",(e,t)=>(tu.localeError||tm({localeError:(()=>{let e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}},t={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",currency_code:"currency code",credit_card:"credit card number",iban:"IBAN",jwt:"JWT",template_literal:"input"},r={nan:"NaN"};function i(e,t){return"number"!==e||"number"!=typeof t||Number.isFinite(t)?r[e]??e:String(t)}return r=>{switch(r.code){case"invalid_type":{let e=i(r.expected),t=i(function(e){let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":if(null===e)return"null";if(Array.isArray(e))return"array";if(e&&Object.getPrototypeOf(e)!==Object.prototype&&"constructor"in e&&e.constructor)return e.constructor.name}return t}(r.input),r.input);return`Invalid input: expected ${e}, received ${t}`}case"invalid_value":if(1===r.values.length)return`Invalid input: expected ${eJ(r.values[0])}`;return`Invalid option: expected one of ${eR(r.values,"|")}`;case"too_big":{let t=r.exact?"exactly ":r.inclusive?"<=":"<",i=e[r.origin]??null;if(i)return`Too big: expected ${r.origin??"value"} to have ${t}${r.maximum.toString()} ${i.unit??"elements"}`;return`Too big: expected ${r.origin??"value"} to be ${t}${r.maximum.toString()}`}case"too_small":{let t=r.exact?"exactly ":r.inclusive?">=":">",i=e[r.origin]??null;if(i)return`Too small: expected ${r.origin} to have ${t}${r.minimum.toString()} ${i.unit}`;return`Too small: expected ${r.origin} to be ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Invalid string: must start with "${r.prefix}"`;if("ends_with"===r.format)return`Invalid string: must end with "${r.suffix}"`;if("includes"===r.format)return`Invalid string: must include "${r.includes}"`;if("regex"===r.format)return`Invalid string: must match pattern ${r.pattern}`;return`Invalid ${t[r.format]??r.format}`;case"not_multiple_of":return`Invalid number: must be a multiple of ${r.divisor}`;case"unrecognized_keys":return`Unrecognized key${r.keys.length>1?"s":""}: ${eR(r.keys,", ")}`;case"invalid_key":return`Invalid key in ${r.origin}`;case"invalid_union":if(r.options&&Array.isArray(r.options)&&r.options.length>0){let e=r.options.map(e=>`'${e}'`).join(" | ");return`Invalid discriminator value. Expected ${e}`}if(!1===r.inclusive)return"Invalid input: more than one option matched";return"Invalid input";case"invalid_element":return`Invalid value in ${r.origin}`;default:return"Invalid input"}}})()}),ro.init(e,t),e.def=t,e.type=t.type,e),{check(...e){let t=this.def;return this.clone(eN(t,{checks:[...t.checks??[],...e.map(e=>"function"==typeof e?{_zod:{check:e,def:{check:"custom"},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return eB(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(function(e,t={}){return new as({type:"custom",check:"custom",fn:e,...eK(t)})}(e,t))},superRefine(e,t){return this.check(function(e,t){var r;let i,o;return r=t=>(t.addIssue=e=>{"string"==typeof e?t.issues.push(te(e,t.value,i._zod.def)):(e.fatal&&(e.continue=!1),e.code??(e.code="custom"),"input"in e||(e.input=t.value),e.inst??(e.inst=i),e.continue??(e.continue=!i._zod.def.abort),t.issues.push(te(e)))},e(t.value,t)),(o=new tK({check:"custom",...eK(t)}))._zod.check=r,i=o}(e,t))},overwrite(e){return this.check(iA(e))},optional(){return n4(this)},exactOptional(){var e;return e=this,new n6({type:"optional",innerType:e})},nullable(){return n9(this)},nullish(){return n4(n9(this))},nonoptional(e){var t;return t=this,new n7({type:"nonoptional",innerType:t,...eK(e)})},array(){return nM(this)},or(e){return nL([this,e])},and(e){return nB(this,e)},transform(e){return ar(this,n0(e))},default(e){var t,r;return t=this,r=e,new n5({type:"default",innerType:t,get defaultValue(){return"function"==typeof r?r():eU(r)}})},prefault(e){var t,r;return t=this,r=e,new n8({type:"prefault",innerType:t,get defaultValue(){return"function"==typeof r?r():eU(r)}})},catch(e){return function(e,t){let r;return new ae({type:"catch",innerType:e,catchValue:"function"==typeof t?t:((r=()=>t)["~constantCatch"]=!0,r)})}(this,e)},pipe(e){return ar(this,e)},readonly(){var e;return e=this,new ao({type:"readonly",innerType:e})},describe(e){let t=this.clone();return iS.add(t,{description:e}),t},meta(...e){if(0===e.length)return iS.get(this);let t=this.clone();return iS.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return 0===t.length?e(this):e(this,...t)},get"~standard"(){return tt(this,"~standard",{...ra(this),jsonSchema:{input:iK(this,"input"),output:iK(this,"output")}},!1)},set"~standard"(e){tt(this,"~standard",e)},parse:function e(t,r){return oB(this,t,r,{callee:e})},parseAsync:async function e(t,r){return await oK(this,t,r,{callee:e})},safeParse(e,t){return oJ(this,e,t)},async safeParseAsync(e,t){return oZ(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){tt(this,"spa",e)},validate(e,t){let r=this._zod.bag.validator;if(void 0!==r){if(r(e)!==oF)return!0;if(!0===r.definite&&void 0===t)return!1}return function(e,t,r){let i,o=r?{...r,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},n=e._zod.bag.fallbackRun;if(n?(o[oL]=!0,i=n({value:t,issues:[]},o)):i=e._zod.run({value:t,issues:[]},o),i instanceof Promise)throw new tl;return 0===i.issues.length}(this,e,t)},validateAsync(e,t){return(async(e,t,r)=>{let i=r?{...r,async:!0,abortEarly:!0}:{async:!0,abortEarly:!0},o=e._zod.run({value:t,issues:[]},i);return o instanceof Promise&&(o=await o),0===o.issues.length})(this,e,t)},encode:function e(t,r){return oQ(this,t,r,{callee:e})},decode:function e(t,r){return oX(this,t,r,{callee:e})},encodeAsync:async function e(t,r){return await oY(this,t,r,{callee:e})},decodeAsync:async function e(t,r){return await o1(this,t,r,{callee:e})},safeEncode(e,t){return o0(this,e,t)},safeDecode(e,t){return o2(this,e,t)},async safeEncodeAsync(e,t){return o4(this,e,t)},async safeDecodeAsync(e,t){return o6(this,e,t)},toJSONSchema(e){return((e,t={})=>r=>{let i=iM({...r,processors:t});return iz(e,i),iF(i,e),iB(i,e)})(this,{})(e)},get description(){return iS.get(this)?.description},get _def(){return this._zod.def}}),o5=tc("_ZodString",(e,t)=>{rs.init(e,t),o9.init(e,t),e._zod.processJSONSchema=(t,r,i)=>oe(e,t,r,i)},tr({format:e=>i9(e).format??null,minLength:e=>i9(e).minimum??null,maxLength:e=>i9(e).maximum??null},{regex(...e){return this.check(function(e,t){return new t3({check:"string_format",format:"regex",...eK(t),pattern:e})}(...e))},includes(...e){return this.check(function(e,t){return new t8({check:"string_format",format:"includes",...eK(t),includes:e})}(...e))},startsWith(...e){return this.check(function(e,t){return new t7({check:"string_format",format:"starts_with",...eK(t),prefix:e})}(...e))},endsWith(...e){return this.check(function(e,t){return new re({check:"string_format",format:"ends_with",...eK(t),suffix:e})}(...e))},min(...e){return this.check(iO(...e))},max(...e){return this.check(iT(...e))},length(...e){return this.check(iE(...e))},nonempty(...e){return this.check(iO(1,...e))},lowercase(e){return this.check(new t9({check:"string_format",format:"lowercase",...eK(e)}))},uppercase(e){return this.check(new t5({check:"string_format",format:"uppercase",...eK(e)}))},trim(){return this.check(iA(e=>e.trim()))},normalize(...e){return this.check(function(e){return iA(t=>t.normalize(e))}(...e))},toLowerCase(){return this.check(iA(e=>e.toLowerCase()))},toUpperCase(){return this.check(iA(e=>e.toUpperCase()))},slugify(){return this.check(iA(e=>e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")))}})),o8=tc("ZodString",(e,t)=>{rs.init(e,t),o5.init(e,t)},{email(e){return this.check(iw(nn,e))},url(e){return this.check(iV(nd,e))},jwt(e){return this.check(new nk({type:"string",format:"jwt",check:"string_format",abort:!1,...eK(e)}))},emoji(e){return this.check(new nc({type:"string",format:"emoji",check:"string_format",abort:!1,...eK(e)}))},guid(e){return this.check(new na({type:"string",format:"guid",check:"string_format",abort:!1,...eK(e)}))},uuid(e){return this.check(new ns({type:"string",format:"uuid",check:"string_format",abort:!1,...eK(e)}))},uuidv4(e){return this.check(new ns({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...eK(e)}))},uuidv6(e){return this.check(new ns({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...eK(e)}))},uuidv7(e){return this.check(new ns({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...eK(e)}))},nanoid(e){return this.check(new nl({type:"string",format:"nanoid",check:"string_format",abort:!1,...eK(e)}))},cuid(e){return this.check(new np({type:"string",format:"cuid",check:"string_format",abort:!1,...eK(e)}))},cuid2(e){return this.check(new nu({type:"string",format:"cuid2",check:"string_format",abort:!1,...eK(e)}))},ulid(e){return this.check(new nm({type:"string",format:"ulid",check:"string_format",abort:!1,...eK(e)}))},base64(e){return this.check(new nb({type:"string",format:"base64",check:"string_format",abort:!1,...eK(e)}))},base64url(e){return this.check(new n$({type:"string",format:"base64url",check:"string_format",abort:!1,...eK(e)}))},xid(e){return this.check(new nf({type:"string",format:"xid",check:"string_format",abort:!1,...eK(e)}))},ksuid(e){return this.check(new nh({type:"string",format:"ksuid",check:"string_format",abort:!1,...eK(e)}))},ipv4(e){return this.check(new ny({type:"string",format:"ipv4",check:"string_format",abort:!1,...eK(e)}))},ipv6(e){return this.check(new ng({type:"string",format:"ipv6",check:"string_format",abort:!1,...eK(e)}))},cidrv4(e){return this.check(new n_({type:"string",format:"cidrv4",check:"string_format",abort:!1,...eK(e)}))},cidrv6(e){return this.check(new nv({type:"string",format:"cidrv6",check:"string_format",abort:!1,...eK(e)}))},e164(e){return this.check(new nS({type:"string",format:"e164",check:"string_format",abort:!1,...eK(e)}))},datetime(e){return this.check(iP(nt,e))},date(e){return this.check(iR(nr,e))},time(e){return this.check(new ni({type:"string",format:"time",check:"string_format",precision:null,...eK(e)}))},duration(e){return this.check(new no({type:"string",format:"duration",check:"string_format",...eK(e)}))}});function o7(e){return new o8(ik({type:"string",...eK(e)}))}let ne=tc("ZodStringFormat",(e,t)=>{rd.init(e,t),o5.init(e,t)}),nt=tc("ZodISODateTime",(e,t)=>{rk.init(e,t),ne.init(e,t)}),nr=tc("ZodISODate",(e,t)=>{rw.init(e,t),ne.init(e,t)}),ni=tc("ZodISOTime",(e,t)=>{rV.init(e,t),ne.init(e,t)}),no=tc("ZodISODuration",(e,t)=>{rP.init(e,t),ne.init(e,t)}),nn=tc("ZodEmail",(e,t)=>{rp.init(e,t),ne.init(e,t)}),na=tc("ZodGUID",(e,t)=>{rc.init(e,t),ne.init(e,t)}),ns=tc("ZodUUID",(e,t)=>{rl.init(e,t),ne.init(e,t)}),nd=tc("ZodURL",(e,t)=>{rh.init(e,t),ne.init(e,t)}),nc=tc("ZodEmoji",(e,t)=>{ry.init(e,t),ne.init(e,t)}),nl=tc("ZodNanoID",(e,t)=>{rg.init(e,t),ne.init(e,t)}),np=tc("ZodCUID",(e,t)=>{r_.init(e,t),ne.init(e,t)}),nu=tc("ZodCUID2",(e,t)=>{rv.init(e,t),ne.init(e,t)}),nm=tc("ZodULID",(e,t)=>{rb.init(e,t),ne.init(e,t)}),nf=tc("ZodXID",(e,t)=>{r$.init(e,t),ne.init(e,t)}),nh=tc("ZodKSUID",(e,t)=>{rS.init(e,t),ne.init(e,t)}),ny=tc("ZodIPv4",(e,t)=>{rR.init(e,t),ne.init(e,t)}),ng=tc("ZodIPv6",(e,t)=>{rx.init(e,t),ne.init(e,t)}),n_=tc("ZodCIDRv4",(e,t)=>{rj.init(e,t),ne.init(e,t)}),nv=tc("ZodCIDRv6",(e,t)=>{rC.init(e,t),ne.init(e,t)}),nb=tc("ZodBase64",(e,t)=>{rE.init(e,t),ne.init(e,t)}),n$=tc("ZodBase64URL",(e,t)=>{rW.init(e,t),ne.init(e,t)}),nS=tc("ZodE164",(e,t)=>{rM.init(e,t),ne.init(e,t)}),nk=tc("ZodJWT",(e,t)=>{rN.init(e,t),ne.init(e,t)}),nw=tc("ZodNumber",(e,t)=>{rz.init(e,t),o9.init(e,t),e._zod.processJSONSchema=(t,r,i)=>ot(e,t,r,i),e.isFinite=!0},tr({minValue:e=>{let{minimum:t,exclusiveMinimum:r}=i9(e);return Math.max(t??-1/0,r??-1/0)},maxValue:e=>{let{maximum:t,exclusiveMaximum:r}=i9(e);return Math.min(t??1/0,r??1/0)},isInt:e=>{let{isInt:t,multipleOf:r}=i9(e);return!!t||!!r?.some(Number.isSafeInteger)},format:e=>i9(e).format??null},{gt(e,t){return this.check(ix(e,t))},gte(e,t){return this.check(ij(e,t))},min(e,t){return this.check(ij(e,t))},lt(e,t){return this.check(iq(e,t))},lte(e,t){return this.check(iI(e,t))},max(e,t){return this.check(iI(e,t))},int(e){return this.check(nR(e))},safe(e){return this.check(nR(e))},positive(e){return this.check(ix(0,e))},nonnegative(e){return this.check(ij(0,e))},negative(e){return this.check(iq(0,e))},nonpositive(e){return this.check(iI(0,e))},multipleOf(e,t){return this.check(iC(e,t))},step(e,t){return this.check(iC(e,t))},finite(){return this}}));function nV(e){return new nw(ik({type:"number",checks:[],...eK(e)}))}let nP=tc("ZodNumberFormat",(e,t)=>{rD.init(e,t),nw.init(e,t)});function nR(e){return new nP({type:"number",check:"number_format",abort:!1,format:"safeint",...eK(e)})}let nq=tc("ZodBoolean",(e,t)=>{rF.init(e,t),o9.init(e,t),e._zod.processJSONSchema=(t,r,i)=>or(e,t,r,i)});function nI(e){return new nq({type:"boolean",...eK(e)})}let nx=tc("ZodNull",(e,t)=>{rL.init(e,t),o9.init(e,t),e._zod.processJSONSchema=(t,r,i)=>oi(e,t,r,i)});function nj(e){return new nx({type:"null",...eK(e)})}let nC=tc("ZodAny",(e,t)=>{rU.init(e,t),o9.init(e,t),e._zod.processJSONSchema=(t,r,i)=>on(e,t,r,i)});function nT(){return new nC({type:"any"})}let nO=tc("ZodUnknown",(e,t)=>{rH.init(e,t),o9.init(e,t),e._zod.processJSONSchema=(t,r,i)=>oa(e,t,r,i)});function nE(){return new nO({type:"unknown"})}let nA=tc("ZodNever",(e,t)=>{rG.init(e,t),o9.init(e,t),e._zod.processJSONSchema=(t,r,i)=>oo(e,t,r,i)}),nW=tc("ZodArray",(e,t)=>{o3(),rJ.init(e,t),o9.init(e,t),e._zod.processJSONSchema=(t,r,i)=>op(e,t,r,i),e.element=t.element},{min(e,t){return this.check(iO(e,t))},nonempty(e){return this.check(iO(1,e))},max(e,t){return this.check(iT(e,t))},length(e,t){return this.check(iE(e,t))},unwrap(){return this.element}});function nM(e,t){return new nW({type:"array",element:e,...eK(t)})}let nN=tc("ZodObject",(e,t)=>{var r;let i,o;o3(),r0.init(e,t),o9.init(e,t),e._zod.processJSONSchema=(t,r,i)=>om(e,t,r,i),r="shape",(o=r in(i=Object.getPrototypeOf(e))?void 0:i)&&Object.defineProperty(o,r,{configurable:!0,get(){let e={configurable:!0,writable:!0,enumerable:!1,value:void 0};return Object.defineProperty(this,r,e),e.value=(e=>e._zod.def.shape)(this),Object.defineProperty(this,r,e),e.value},set(e){Object.defineProperty(this,r,{configurable:!0,writable:!0,enumerable:!1,value:e})}})},{keyof(){return nQ(Object.keys(this._zod.def.shape))},catchall(e){return this.clone(eN(this._zod.def,{catchall:e}))},passthrough(){return this.clone(eN(this._zod.def,{catchall:nE()}))},loose(){return this.clone(eN(this._zod.def,{catchall:nE()}))},strict(){return this.clone(eN(this._zod.def,{catchall:new nA({type:"never",...eK(void 0)})}))},strip(){return this.clone(eN(this._zod.def,{catchall:void 0}))},extend(e){if(!eL(e))throw Error("Invalid input to extend: expected a plain object");let t=this._zod.def.checks;if(t&&t.length>0){let t=eE(this);for(let r of Reflect.ownKeys(e))if(void 0!==Object.getOwnPropertyDescriptor(t,r))throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return eB(this,eN(this._zod.def,{shape:eY(this,e)}))},safeExtend(e){if(!eL(e))throw Error("Invalid input to safeExtend: expected a plain object");return eB(this,eN(this._zod.def,{shape:eY(this,e)}))},merge(e){if(!e?._zod?.def)throw Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(this._zod.def.checks?.length)throw Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let t={};return eM(t,this,Reflect.ownKeys(eE(this))),eM(t,e,Reflect.ownKeys(eE(e))),eB(this,eN(this._zod.def,{shape:t,get catchall(){return e._zod.def.catchall},checks:e._zod.def.checks??[]}))},pick(e){return function(e,t){let r=e._zod.def,i=r.checks;if(i&&i.length>0)throw Error(".pick() cannot be used on object schemas containing refinements");let o={};return eM(o,e,eX(e,t)),eB(e,eN(r,{shape:o,checks:[]}))}(this,e)},omit(e){return function(e,t){let r=e._zod.def,i=r.checks;if(i&&i.length>0)throw Error(".omit() cannot be used on object schemas containing refinements");let o=new Set(eX(e,t)),n={};return eM(n,e,Reflect.ownKeys(eE(e)).filter(e=>!o.has(e))),eB(e,eN(r,{shape:n,checks:[]}))}(this,e)},partial(...e){return e1(n2,this,e[0])},exactPartial(...e){return e1(n6,this,e[0],"exactPartial")},required(...e){var t;let r,i;return r=(t=e[0])?new Set(eX(this,t)):void 0,eM(i={},this,Reflect.ownKeys(eE(this)),(e,t)=>r&&!r.has(t)?e:new n7({type:"nonoptional",innerType:e})),eB(this,eN(this._zod.def,{shape:i}))}});function nz(e,t){return new nN({type:"object",shape:e??{},...eK(t)})}function nD(e,t){return new nN({type:"object",shape:e,catchall:nE(),...eK(t)})}let nF=tc("ZodUnion",(e,t)=>{r4.init(e,t),o9.init(e,t),e._zod.processJSONSchema=(t,r,i)=>of(e,t,r,i),e.options=t.options});function nL(e,t){return new nF({type:"union",options:e,...eK(t)})}let nU=tc("ZodDiscriminatedUnion",(e,t)=>{nF.init(e,t),r6.init(e,t)});function nH(e,t,r){return new nU({type:"union",options:t,discriminator:e,...eK(r)})}let nG=tc("ZodIntersection",(e,t)=>{r3.init(e,t),o9.init(e,t),e._zod.processJSONSchema=(t,r,i)=>oh(e,t,r,i)});function nB(e,t){return new nG({type:"intersection",left:e,right:t})}let nK=tc("ZodRecord",(e,t)=>{o3(),r5.init(e,t),o9.init(e,t),e._zod.processJSONSchema=(t,r,i)=>og(e,t,r,i),e.keyType=t.keyType,e.valueType=t.valueType});function nJ(e,t,r){return new nK(t&&t._zod?{type:"record",keyType:e,valueType:t,...eK(r)}:{type:"record",keyType:o7(),valueType:e,...eK(t)})}let nZ=tc("ZodEnum",(e,t)=>{r8.init(e,t),o9.init(e,t),e._zod.processJSONSchema=(t,r,i)=>os(e,t,r,i),e.enum=t.entries,e.options=[...e._zod.values];let r=new Set(Object.keys(t.entries));e.extract=(e,i)=>{let o={};for(let i of e)if(r.has(i))o[i]=t.entries[i];else throw Error(`Key ${i} not found in enum`);return new nZ({...t,checks:[],...eK(i),entries:o})},e.exclude=(e,i)=>{let o={...t.entries};for(let t of e)if(r.has(t))delete o[t];else throw Error(`Key ${t} not found in enum`);return new nZ({...t,checks:[],...eK(i),entries:o})}});function nQ(e,t){return new nZ({type:"enum",entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...eK(t)})}let nX=tc("ZodLiteral",(e,t)=>{r7.init(e,t),o9.init(e,t),e._zod.processJSONSchema=(t,r,i)=>od(e,t,r,i),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function nY(e,t){return new nX({type:"literal",values:Array.isArray(e)?e:[e],...eK(t)})}let n1=tc("ZodTransform",(e,t)=>{o3(),ie.init(e,t),o9.init(e,t),e._zod.processJSONSchema=(t,r,i)=>ol(e,t,r,i),e._zod.parse=(r,i)=>{if("backward"===i.direction)throw new tp(e.constructor.name);r.addIssue=i=>{"string"==typeof i?r.issues.push(te(i,r.value,t)):(i.fatal&&(i.continue=!1),i.code??(i.code="custom"),"input"in i||(i.input=r.value),i.inst??(i.inst=e),r.issues.push(te(i)))};let o=t.transform(r.value,r);return o instanceof Promise?o.then(e=>(r.value=e,r)):(r.value=o,r)}});function n0(e){return new n1({type:"transform",transform:e})}let n2=tc("ZodOptional",(e,t)=>{ir.init(e,t),o9.init(e,t),e._zod.processJSONSchema=(t,r,i)=>oR(e,t,r,i),e.unwrap=()=>e._zod.def.innerType});function n4(e){return new n2({type:"optional",innerType:e})}let n6=tc("ZodExactOptional",(e,t)=>{ii.init(e,t),o9.init(e,t),e._zod.processJSONSchema=(t,r,i)=>oR(e,t,r,i),e.unwrap=()=>e._zod.def.innerType}),n3=tc("ZodNullable",(e,t)=>{io.init(e,t),o9.init(e,t),e._zod.processJSONSchema=(t,r,i)=>o_(e,t,r,i),e.unwrap=()=>e._zod.def.innerType});function n9(e){return new n3({type:"nullable",innerType:e})}let n5=tc("ZodDefault",(e,t)=>{ia.init(e,t),o9.init(e,t),e._zod.processJSONSchema=(t,r,i)=>oS(e,t,r,i),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap}),n8=tc("ZodPrefault",(e,t)=>{id.init(e,t),o9.init(e,t),e._zod.processJSONSchema=(t,r,i)=>ok(e,t,r,i),e.unwrap=()=>e._zod.def.innerType}),n7=tc("ZodNonOptional",(e,t)=>{ic.init(e,t),o9.init(e,t),e._zod.processJSONSchema=(t,r,i)=>ov(e,t,r,i),e.unwrap=()=>e._zod.def.innerType}),ae=tc("ZodCatch",(e,t)=>{iu.init(e,t),o9.init(e,t),e._zod.processJSONSchema=(t,r,i)=>ow(e,t,r,i),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap}),at=tc("ZodPipe",(e,t)=>{im.init(e,t),o9.init(e,t),e._zod.processJSONSchema=(t,r,i)=>oV(e,t,r,i),e.in=t.in,e.out=t.out});function ar(e,t){return new at({type:"pipe",in:e,out:t})}let ai=tc("ZodPreprocess",(e,t)=>{at.init(e,t),iy.init(e,t)}),ao=tc("ZodReadonly",(e,t)=>{ig.init(e,t),o9.init(e,t),e._zod.processJSONSchema=(t,r,i)=>oP(e,t,r,i),e.unwrap=()=>e._zod.def.innerType}),an=tc("ZodLazy",(e,t)=>{iv.init(e,t),o9.init(e,t),e._zod.processJSONSchema=(t,r,i)=>oq(e,t,r,i),e.unwrap=()=>e._zod.def.getter()});function aa(e){return new an({type:"lazy",getter:e})}let as=tc("ZodCustom",(e,t)=>{ib.init(e,t),o9.init(e,t),e._zod.processJSONSchema=(t,r,i)=>oc(e,t,r,i)});function ad(e,t){return new ai({type:"pipe",in:n0(e),out:t})}function ac(e){return iP(nt,e)}let al="2025-11-25",ap=[al,"2025-06-18","2025-03-26","2024-11-05","2024-10-07"],au="io.modelcontextprotocol/protocolVersion",am="io.modelcontextprotocol/clientInfo",af="io.modelcontextprotocol/serverInfo",ah="io.modelcontextprotocol/clientCapabilities",ay="io.modelcontextprotocol/logLevel",ag=aa(()=>nL([o7(),nV(),nI(),nj(),nJ(o7(),ag),nM(ag)])),a_=nJ(o7(),ag),av=nM(ag),ab=nL([o7(),nV().int()]),a$=o7(),aS=nz({ttl:nV().optional()}),ak=nz({taskId:o7()}),aw=nD({progressToken:ab.optional(),"io.modelcontextprotocol/related-task":ak.optional()}),aV=nz({_meta:aw.optional()}),aP=aV.extend({task:aS.optional()}),aR=nz({method:o7(),params:aV.loose().optional()}),aq=nz({_meta:aw.optional()}),aI=nz({method:o7(),params:aq.loose().optional()}),ax=nD({get[af](){return aH.optional().catch(void 0)}}),aj=nD({_meta:ax.optional()}),aC=nL([o7(),nV().int()]),aT=nz({jsonrpc:nY("2.0"),id:aC,...aR.shape}).strict(),aO=nz({jsonrpc:nY("2.0"),...aI.shape}).strict(),aE=nz({jsonrpc:nY("2.0"),id:aC,result:aj}).strict(),aA=nz({jsonrpc:nY("2.0"),id:aC.optional(),error:nz({code:nV().int(),message:o7(),data:nE().optional()})}).strict(),aW=nL([aT,aO,aE,aA]),aM=nL([aE,aA]),aN=aj.strict(),az=aq.extend({requestId:aC.optional(),reason:o7().optional()}),aD=aI.extend({method:nY("notifications/cancelled"),params:az}),aF=nz({src:o7(),mimeType:o7().optional(),sizes:nM(o7()).optional(),theme:nQ(["light","dark"]).optional()}),aL=nz({icons:nM(aF).optional()}),aU=nz({name:o7(),title:o7().optional()}),aH=aU.extend({...aU.shape,...aL.shape,version:o7(),websiteUrl:o7().optional(),description:o7().optional()}),aG=nB(nz({applyDefaults:nI().optional()}),a_),aB=ad(e=>e&&"object"==typeof e&&!Array.isArray(e)&&0===Object.keys(e).length?{form:{}}:e,nB(nz({form:aG.optional(),url:a_.optional()}),a_.optional())),aK=nD({list:a_.optional(),cancel:a_.optional(),requests:nD({sampling:nD({createMessage:a_.optional()}).optional(),elicitation:nD({create:a_.optional()}).optional()}).optional()}),aJ=nD({list:a_.optional(),cancel:a_.optional(),requests:nD({tools:nD({call:a_.optional()}).optional()}).optional()}),aZ=nz({experimental:nJ(o7(),a_).optional(),sampling:nz({context:a_.optional(),tools:a_.optional()}).optional(),elicitation:aB.optional(),roots:nz({listChanged:nI().optional()}).optional(),tasks:aK.optional(),extensions:nJ(o7(),a_).optional()}),aQ=aV.extend({protocolVersion:o7(),capabilities:aZ,clientInfo:aH}),aX=aR.extend({method:nY("initialize"),params:aQ}),aY=nz({experimental:nJ(o7(),a_).optional(),logging:a_.optional(),completions:a_.optional(),prompts:nz({listChanged:nI().optional()}).optional(),resources:nz({subscribe:nI().optional(),listChanged:nI().optional()}).optional(),tools:nz({listChanged:nI().optional()}).optional(),tasks:aJ.optional(),extensions:nJ(o7(),a_).optional()}),a1=aj.extend({protocolVersion:o7(),capabilities:aY,serverInfo:aH,instructions:o7().optional()}),a0=aI.extend({method:nY("notifications/initialized"),params:aq.optional()}),a2=aR.extend({method:nY("server/discover"),params:aV.optional()}),a4=aj.extend({supportedVersions:nM(o7()),capabilities:aY,instructions:o7().optional()}),a6=aR.extend({method:nY("ping"),params:aV.optional()}),a3=nz({progress:nV(),total:n4(nV()),message:n4(o7())}),a9=nz({...aq.shape,...a3.shape,progressToken:ab}),a5=aI.extend({method:nY("notifications/progress"),params:a9}),a8=aV.extend({cursor:a$.optional()}),a7=aR.extend({params:a8.optional()}),se=aj.extend({nextCursor:a$.optional()}),st=nz({uri:o7(),mimeType:n4(o7()),_meta:nJ(o7(),nE()).optional()}),sr=st.extend({text:o7()}),si=o7().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:"Invalid Base64 string"}),so=st.extend({blob:si}),sn=nQ(["user","assistant"]),sa=nz({audience:nM(sn).optional(),priority:nV().min(0).max(1).optional(),lastModified:ac({offset:!0}).optional()}),ss=nz({...aU.shape,...aL.shape,uri:o7(),description:n4(o7()),mimeType:n4(o7()),size:n4(nV()),annotations:sa.optional(),_meta:n4(nD({}))}),sd=nz({...aU.shape,...aL.shape,uriTemplate:o7(),description:n4(o7()),mimeType:n4(o7()),annotations:sa.optional(),_meta:n4(nD({}))}),sc=a7.extend({method:nY("resources/list")}),sl=se.extend({resources:nM(ss)}),sp=a7.extend({method:nY("resources/templates/list")}),su=se.extend({resourceTemplates:nM(sd)}),sm=aV.extend({uri:o7()}),sf=aR.extend({method:nY("resources/read"),params:sm}),sh=aj.extend({contents:nM(nL([sr,so]))}),sy=aI.extend({method:nY("notifications/resources/list_changed"),params:aq.optional()}),sg=aR.extend({method:nY("resources/subscribe"),params:sm}),s_=aR.extend({method:nY("resources/unsubscribe"),params:sm}),sv=nz({toolsListChanged:nI().optional(),promptsListChanged:nI().optional(),resourcesListChanged:nI().optional(),resourceSubscriptions:nM(o7()).optional()}),sb=aV.extend({notifications:sv}),s$=aR.extend({method:nY("subscriptions/listen"),params:sb}),sS=aq.extend({notifications:sv}),sk=aI.extend({method:nY("notifications/subscriptions/acknowledged"),params:sS}),sw=ax.extend({"io.modelcontextprotocol/subscriptionId":aC}),sV=aj.extend({_meta:sw}),sP=aq.extend({uri:o7()}),sR=aI.extend({method:nY("notifications/resources/updated"),params:sP}),sq=nz({name:o7(),description:n4(o7()),required:n4(nI())}),sI=nz({...aU.shape,...aL.shape,description:n4(o7()),arguments:n4(nM(sq)),_meta:n4(nD({}))}),sx=a7.extend({method:nY("prompts/list")}),sj=se.extend({prompts:nM(sI)}),sC=aV.extend({name:o7(),arguments:nJ(o7(),o7()).optional()}),sT=aR.extend({method:nY("prompts/get"),params:sC}),sO=nz({type:nY("text"),text:o7(),annotations:sa.optional(),_meta:nJ(o7(),nE()).optional()}),sE=nz({type:nY("image"),data:si,mimeType:o7(),annotations:sa.optional(),_meta:nJ(o7(),nE()).optional()}),sA=nz({type:nY("audio"),data:si,mimeType:o7(),annotations:sa.optional(),_meta:nJ(o7(),nE()).optional()}),sW=nz({type:nY("tool_use"),name:o7(),id:o7(),input:nJ(o7(),nE()),_meta:nJ(o7(),nE()).optional()}),sM=nz({type:nY("resource"),resource:nL([sr,so]),annotations:sa.optional(),_meta:nJ(o7(),nE()).optional()}),sN=ss.extend({type:nY("resource_link")}),sz=nL([sO,sE,sA,sN,sM]),sD=nz({role:sn,content:sz}),sF=aj.extend({description:o7().optional(),messages:nM(sD)}),sL=aI.extend({method:nY("notifications/prompts/list_changed"),params:aq.optional()}),sU=nz({title:o7().optional(),readOnlyHint:nI().optional(),destructiveHint:nI().optional(),idempotentHint:nI().optional(),openWorldHint:nI().optional()}),sH=nz({taskSupport:nQ(["required","optional","forbidden"]).optional()}),sG=nz({...aU.shape,...aL.shape,description:o7().optional(),inputSchema:nz({type:nY("object"),properties:nJ(o7(),ag).optional(),required:nM(o7()).optional()}).catchall(nE()),outputSchema:nD({$schema:o7().optional()}).optional(),annotations:sU.optional(),execution:sH.optional(),_meta:nJ(o7(),nE()).optional()}),sB=a7.extend({method:nY("tools/list")}),sK=se.extend({tools:nM(sG)}),sJ=aj.extend({content:nM(sz).default([]),structuredContent:nE().optional(),isError:nI().optional()}),sZ=sJ.or(aj.extend({toolResult:nE()})),sQ=aP.extend({name:o7(),arguments:nJ(o7(),nE()).optional()}),sX=aR.extend({method:nY("tools/call"),params:sQ}),sY=aI.extend({method:nY("notifications/tools/list_changed"),params:aq.optional()}),s1=nz({autoRefresh:nI().default(!0),debounceMs:nV().int().nonnegative().default(300)}),s0=nQ(["debug","info","notice","warning","error","critical","alert","emergency"]),s2=aV.extend({level:s0}),s4=aR.extend({method:nY("logging/setLevel"),params:s2}),s6=aq.extend({level:s0,logger:o7().optional(),data:nE()}),s3=aI.extend({method:nY("notifications/message"),params:s6}),s9=nz({name:o7().optional()}),s5=nz({hints:nM(s9).optional(),costPriority:nV().min(0).max(1).optional(),speedPriority:nV().min(0).max(1).optional(),intelligencePriority:nV().min(0).max(1).optional()}),s8=nz({mode:nQ(["auto","required","none"]).optional()}),s7=nz({type:nY("tool_result"),toolUseId:o7().describe("The unique identifier for the corresponding tool call."),content:nM(sz),structuredContent:nE().optional(),isError:nI().optional(),_meta:nJ(o7(),nE()).optional()}),de=nH("type",[sO,sE,sA]),dt=nH("type",[sO,sE,sA,sW,s7]),dr=nz({role:sn,content:nL([dt,nM(dt)]),_meta:nJ(o7(),nE()).optional()}),di=aP.extend({messages:nM(dr),modelPreferences:s5.optional(),systemPrompt:o7().optional(),includeContext:nQ(["none","thisServer","allServers"]).optional(),temperature:nV().optional(),maxTokens:nV().int(),stopSequences:nM(o7()).optional(),metadata:a_.optional(),tools:nM(sG).optional(),toolChoice:s8.optional()}),dn=aR.extend({method:nY("sampling/createMessage"),params:di}),da=aj.extend({model:o7(),stopReason:n4(nQ(["endTurn","stopSequence","maxTokens"]).or(o7())),role:sn,content:de}),ds=aj.extend({model:o7(),stopReason:n4(nQ(["endTurn","stopSequence","maxTokens","toolUse"]).or(o7())),role:sn,content:nL([dt,nM(dt)])}),dd=nz({type:nY("boolean"),title:o7().optional(),description:o7().optional(),default:nI().optional()}),dc=nz({type:nY("string"),title:o7().optional(),description:o7().optional(),minLength:nV().optional(),maxLength:nV().optional(),format:nQ(["email","uri","date","date-time"]).optional(),default:o7().optional()}),dl=nz({type:nQ(["number","integer"]),title:o7().optional(),description:o7().optional(),minimum:nV().optional(),maximum:nV().optional(),default:nV().optional()}),dp=nz({type:nY("string"),title:o7().optional(),description:o7().optional(),enum:nM(o7()),default:o7().optional()}),du=nz({type:nY("string"),title:o7().optional(),description:o7().optional(),oneOf:nM(nz({const:o7(),title:o7()})),default:o7().optional()}),dm=nz({type:nY("string"),title:o7().optional(),description:o7().optional(),enum:nM(o7()),enumNames:nM(o7()).optional(),default:o7().optional()}),df=nL([dp,du]),dh=nz({type:nY("array"),title:o7().optional(),description:o7().optional(),minItems:nV().optional(),maxItems:nV().optional(),items:nz({type:nY("string"),enum:nM(o7())}),default:nM(o7()).optional()}),dy=nz({type:nY("array"),title:o7().optional(),description:o7().optional(),minItems:nV().optional(),maxItems:nV().optional(),items:nz({anyOf:nM(nz({const:o7(),title:o7()}))}),default:nM(o7()).optional()}),dg=nL([dh,dy]),d_=nL([dm,df,dg]),dv=nL([d_,dd,dc,dl]),db=aP.extend({mode:nY("form").optional(),message:o7(),requestedSchema:nz({type:nY("object"),properties:nJ(o7(),dv),required:nM(o7()).optional()}).catchall(nE())}),d$=aP.extend({mode:nY("url"),message:o7(),elicitationId:o7(),url:o7().url()}),dS=nL([db,d$]),dk=aR.extend({method:nY("elicitation/create"),params:dS}),dw=aq.extend({elicitationId:o7()}),dV=aI.extend({method:nY("notifications/elicitation/complete"),params:dw}),dP=aj.extend({action:nQ(["accept","decline","cancel"]),content:ad(e=>null===e?void 0:e,nJ(o7(),nL([o7(),nV(),nI(),nM(o7())])).optional())}),dR=nz({type:nY("ref/resource"),uri:o7()}),dq=nz({type:nY("ref/prompt"),name:o7()}),dI=aV.extend({ref:nL([dq,dR]),argument:nz({name:o7(),value:o7()}),context:nz({arguments:nJ(o7(),o7()).optional()}).optional()}),dx=aR.extend({method:nY("completion/complete"),params:dI}),dj=aj.extend({completion:nD({values:nM(o7()).max(100),total:n4(nV().int()),hasMore:n4(nI())})}),dC=nz({uri:o7().startsWith("file://"),name:o7().optional(),_meta:nJ(o7(),nE()).optional()}),dT=aR.extend({method:nY("roots/list"),params:aV.optional()}),dO=aj.extend({roots:nM(dC)}),dE=aI.extend({method:nY("notifications/roots/list_changed"),params:aq.optional()}),dA=nD({ttl:nV().optional(),pollInterval:nV().optional()}),dW=nQ(["working","input_required","completed","failed","cancelled"]),dM=nz({taskId:o7(),status:dW,ttl:nL([nV(),nj()]),createdAt:o7(),lastUpdatedAt:o7(),pollInterval:n4(nV()),statusMessage:n4(o7())}),dN=aj.extend({task:dM}),dz=aq.merge(dM),dD=aI.extend({method:nY("notifications/tasks/status"),params:dz}),dF=aR.extend({method:nY("tasks/get"),params:aV.extend({taskId:o7()})}),dL=aj.merge(dM),dU=aR.extend({method:nY("tasks/result"),params:aV.extend({taskId:o7()})}),dH=aj.loose(),dG=a7.extend({method:nY("tasks/list")}),dB=se.extend({tasks:nM(dM)}),dK=aR.extend({method:nY("tasks/cancel"),params:aV.extend({taskId:o7()})}),dJ=aj.merge(dM),dZ=nL([a6,aX,a2,dx,s4,sT,sx,sc,sp,sf,sg,s_,s$,sX,sB]),dQ=nL([aD,a5,a0,dE]),dX=nL([aN,da,ds,dP,dO]),dY=nL([a6,dn,dk,dT]),d1=nL([aD,a5,s3,sR,sy,sY,sL,sk,dV]),d0=nL([aN,a1,a4,dj,sF,sj,sl,su,sh,sJ,sK,sV]),d2="custom";function d4(e){return new nw(ik({type:"number",coerce:!0,checks:[],...eK(e)}))}eo||(eo={});let d6=iV(nd,void 0).superRefine((e,t)=>{if(!URL.canParse(e))return t.addIssue({code:d2,message:"URL must be parseable",fatal:!0}),ta}).refine(e=>{let t=new URL(e);return"javascript:"!==t.protocol&&"data:"!==t.protocol&&"vbscript:"!==t.protocol},{message:"URL cannot use javascript:, data:, or vbscript: scheme"}),d3=nD({resource:o7().url(),authorization_servers:nM(d6).optional(),jwks_uri:o7().url().optional(),scopes_supported:nM(o7()).optional(),bearer_methods_supported:nM(o7()).optional(),resource_signing_alg_values_supported:nM(o7()).optional(),resource_name:o7().optional(),resource_documentation:o7().optional(),resource_policy_uri:o7().url().optional(),resource_tos_uri:o7().url().optional(),tls_client_certificate_bound_access_tokens:nI().optional(),authorization_details_types_supported:nM(o7()).optional(),dpop_signing_alg_values_supported:nM(o7()).optional(),dpop_bound_access_tokens_required:nI().optional()}),d9=nD({issuer:o7(),authorization_endpoint:d6,token_endpoint:d6,registration_endpoint:d6.optional(),scopes_supported:nM(o7()).optional(),response_types_supported:nM(o7()),response_modes_supported:nM(o7()).optional(),grant_types_supported:nM(o7()).optional(),token_endpoint_auth_methods_supported:nM(o7()).optional(),token_endpoint_auth_signing_alg_values_supported:nM(o7()).optional(),service_documentation:d6.optional(),revocation_endpoint:d6.optional(),revocation_endpoint_auth_methods_supported:nM(o7()).optional(),revocation_endpoint_auth_signing_alg_values_supported:nM(o7()).optional(),introspection_endpoint:o7().optional(),introspection_endpoint_auth_methods_supported:nM(o7()).optional(),introspection_endpoint_auth_signing_alg_values_supported:nM(o7()).optional(),code_challenge_methods_supported:nM(o7()).optional(),client_id_metadata_document_supported:nI().optional(),authorization_response_iss_parameter_supported:nI().optional().catch(void 0),dpop_signing_alg_values_supported:nM(o7()).optional()}),d5=nD({issuer:o7(),authorization_endpoint:d6,token_endpoint:d6,userinfo_endpoint:d6.optional(),jwks_uri:d6,registration_endpoint:d6.optional(),scopes_supported:nM(o7()).optional(),response_types_supported:nM(o7()),response_modes_supported:nM(o7()).optional(),grant_types_supported:nM(o7()).optional(),acr_values_supported:nM(o7()).optional(),subject_types_supported:nM(o7()),id_token_signing_alg_values_supported:nM(o7()),id_token_encryption_alg_values_supported:nM(o7()).optional(),id_token_encryption_enc_values_supported:nM(o7()).optional(),userinfo_signing_alg_values_supported:nM(o7()).optional(),userinfo_encryption_alg_values_supported:nM(o7()).optional(),userinfo_encryption_enc_values_supported:nM(o7()).optional(),request_object_signing_alg_values_supported:nM(o7()).optional(),request_object_encryption_alg_values_supported:nM(o7()).optional(),request_object_encryption_enc_values_supported:nM(o7()).optional(),token_endpoint_auth_methods_supported:nM(o7()).optional(),token_endpoint_auth_signing_alg_values_supported:nM(o7()).optional(),display_values_supported:nM(o7()).optional(),claim_types_supported:nM(o7()).optional(),claims_supported:nM(o7()).optional(),service_documentation:o7().optional(),claims_locales_supported:nM(o7()).optional(),ui_locales_supported:nM(o7()).optional(),claims_parameter_supported:nI().optional(),request_parameter_supported:nI().optional(),request_uri_parameter_supported:nI().optional(),require_request_uri_registration:nI().optional(),op_policy_uri:d6.optional(),op_tos_uri:d6.optional(),client_id_metadata_document_supported:nI().optional(),authorization_response_iss_parameter_supported:nI().optional().catch(void 0)}),d8=nz({...d5.shape,...d9.pick({code_challenge_methods_supported:!0}).shape}),d7=nz({access_token:o7(),id_token:o7().optional(),token_type:o7(),expires_in:d4().optional(),scope:o7().optional(),refresh_token:o7().optional(),issuer:o7().optional().catch(void 0)}).strip(),ce=nz({issued_token_type:nY("urn:ietf:params:oauth:token-type:id-jag"),access_token:o7(),token_type:o7().optional(),expires_in:nV().optional(),scope:o7().optional()}).strip(),ct=nz({error:o7(),error_description:o7().optional(),error_uri:o7().optional()}),cr=d6.optional().or(nY("").transform(()=>void 0)),ci=nz({redirect_uris:nM(d6),token_endpoint_auth_method:o7().optional(),grant_types:nM(o7()).optional(),response_types:nM(o7()).optional(),application_type:o7().optional(),client_name:o7().optional(),client_uri:d6.optional(),logo_uri:cr,scope:o7().optional(),contacts:nM(o7()).optional(),tos_uri:cr,policy_uri:o7().optional(),jwks_uri:d6.optional(),jwks:nT().optional(),software_id:o7().optional(),software_version:o7().optional(),software_statement:o7().optional()}).strip(),co=nz({client_id:o7(),client_secret:o7().optional(),client_id_issued_at:nV().optional(),client_secret_expires_at:nV().optional(),issuer:o7().optional().catch(void 0)}).strip(),cn=ci.merge(co),ca=nz({error:o7(),error_description:o7().optional()}).strip(),cs=nz({token:o7(),token_type_hint:o7().optional()}).strip(),cd=Symbol.for("mcp.sdk.errorBrands");function cc(e,t){let r=new Set,i=t;for(;"function"==typeof i;){let e=i.mcpBrand;Object.prototype.hasOwnProperty.call(i,"mcpBrand")&&"string"==typeof e&&r.add(e),i=Object.getPrototypeOf(i)}0!==r.size&&Object.defineProperty(e,cd,{value:r,enumerable:!1,configurable:!0})}function cl(e,t){try{if("object"==typeof t&&null!==t&&Object.prototype.hasOwnProperty.call(e,"mcpBrand")&&"string"==typeof e.mcpBrand&&Object.prototype.hasOwnProperty.call(t,cd)){let r=t[cd];if(r&&"function"==typeof r.has&&r.has(e.mcpBrand))return!0}}catch{}return Function.prototype[Symbol.hasInstance].call(e,t)}let cp=((K={}).InvalidRequest="invalid_request",K.InvalidClient="invalid_client",K.InvalidGrant="invalid_grant",K.UnauthorizedClient="unauthorized_client",K.UnsupportedGrantType="unsupported_grant_type",K.InvalidScope="invalid_scope",K.AccessDenied="access_denied",K.ServerError="server_error",K.TemporarilyUnavailable="temporarily_unavailable",K.UnsupportedResponseType="unsupported_response_type",K.UnsupportedTokenType="unsupported_token_type",K.InvalidToken="invalid_token",K.MethodNotAllowed="method_not_allowed",K.TooManyRequests="too_many_requests",K.InvalidClientMetadata="invalid_client_metadata",K.InvalidRedirectUri="invalid_redirect_uri",K.InsufficientScope="insufficient_scope",K.InvalidTarget="invalid_target",K.InvalidDpopProof="invalid_dpop_proof",K.UseDpopNonce="use_dpop_nonce",K);var cu=class e extends Error{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.OAuthError"})}static[Symbol.hasInstance](e){return cl(this,e)}static isInstance(e){if("function"!=typeof this)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return cl(this,e)}constructor(e,t,r){super(t),this.code=e,this.errorUri=r,this.name="OAuthError",cc(this,new.target)}toResponseObject(){let e={error:this.code,error_description:this.message};return this.errorUri&&(e.error_uri=this.errorUri),e}static fromResponse(t){return new e(t.error,t.error_description??t.error,t.error_uri)}};let cm=((J={}).NotConnected="NOT_CONNECTED",J.AlreadyConnected="ALREADY_CONNECTED",J.NotInitialized="NOT_INITIALIZED",J.CapabilityNotSupported="CAPABILITY_NOT_SUPPORTED",J.RequestTimeout="REQUEST_TIMEOUT",J.ConnectionClosed="CONNECTION_CLOSED",J.SendFailed="SEND_FAILED",J.InvalidResult="INVALID_RESULT",J.UnsupportedResultType="UNSUPPORTED_RESULT_TYPE",J.InputRequiredRoundsExceeded="INPUT_REQUIRED_ROUNDS_EXCEEDED",J.ListPaginationExceeded="LIST_PAGINATION_EXCEEDED",J.MethodNotSupportedByProtocolVersion="METHOD_NOT_SUPPORTED_BY_PROTOCOL_VERSION",J.EraNegotiationFailed="ERA_NEGOTIATION_FAILED",J.ClientHttpNotImplemented="CLIENT_HTTP_NOT_IMPLEMENTED",J.ClientHttpAuthentication="CLIENT_HTTP_AUTHENTICATION",J.ClientHttpForbidden="CLIENT_HTTP_FORBIDDEN",J.ClientHttpUnexpectedContent="CLIENT_HTTP_UNEXPECTED_CONTENT",J.ClientHttpFailedToOpenStream="CLIENT_HTTP_FAILED_TO_OPEN_STREAM",J.ClientHttpFailedToTerminateSession="CLIENT_HTTP_FAILED_TO_TERMINATE_SESSION",J);var cf=class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.SdkError"})}static[Symbol.hasInstance](e){return cl(this,e)}static isInstance(e){if("function"!=typeof this)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return cl(this,e)}constructor(e,t,r,i){super(t,i),this.code=e,this.data=r,this.name="SdkError",cc(this,new.target)}};function ch(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)}function cy(e,t){let r={};for(let[i,o]of Object.entries(e)){if(void 0===o)continue;let e=void 0===t?void 0:t[i];if(void 0===e){r[i]=o;continue}if(ch(o)&&ch(e)){let t={};for(let[r,n]of Object.entries(o))void 0!==n&&void 0===e[r]&&("elicitation"!==i||"form"!==r||void 0!==e.form||void 0!==e.url)&&(t[r]=n);Object.keys(t).length>0&&(r[i]=t)}}return Object.keys(r).length>0?r:void 0}(class extends cf{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.SdkHttpError"})}constructor(e,t,r,i){super(e,t,r,i),this.name="SdkHttpError"}get status(){return this.data.status}get statusText(){return this.data.statusText}});let cg="2026-07-28",c_=[cg];function cv(e){return e.filter(e=>e>=cg)}function cb(e){let t=e.structuredContent;return void 0===t||!("object"!=typeof t||null===t||Array.isArray(t))||e.content?.some(e=>"text"===e.type)?e:{...e,content:[...e.content??[],{type:"text",text:JSON.stringify(t)}]}}let c$=["task","inputRequests","requestState"];function cS(e){return null===e||"object"!=typeof e||Array.isArray(e)||void 0!==e.content||c$.some(t=>t in e)?e:{...e,content:[]}}function ck(){let e,t,i,o,n,a,s,d,c,l,p,u,m,f,h,y,g,_,v,b,$,S,k,w,V,P,R,q,I,x,j,C,T,O,E,A,W,M,N,z,D,F,L,U,H,G,B,K,J,Z,Q,X,Y,ee,et,er,ei,eo,en,ea,es,ed,ec,el,ep,eu,em,ef,eh,ey,eg,e_,ev,eb,e$,eS,ek,ew,eV,eP,eR,eq,eI,ex,ej,eC,eT,eO,eE,eA,eW,eM,eN,ez,eD,eF,eL,eU,eH,eG,eB,eK,eJ,eZ,eQ,eX,eY,e1,e0,e2,e4,e6,e3,e9,e5,e8,e7,te,tt,tr,ti,to,tn,ta,ts,td,tc,tl,tp,tu,tm,tf,th,ty,tg,t_,tv,tb,t$,tS;return r??=(e=aa(()=>nL([o7(),nV(),nI(),nj(),nJ(o7(),e),nM(e)])),t=nJ(o7(),e),i=nL([o7(),nV().int()]),o=o7(),n=nz({ttl:nV().optional()}),a=nz({taskId:o7()}),c=(d=nz({_meta:(s=nD({progressToken:i.optional(),"io.modelcontextprotocol/related-task":a.optional()})).optional()})).extend({task:n.optional()}),l=nz({method:o7(),params:d.loose().optional()}),p=nz({_meta:s.optional()}),u=nz({method:o7(),params:p.loose().optional()}),m=nD({_meta:s.optional()}),f=nL([o7(),nV().int()]),h=m.strict(),y=p.extend({requestId:f.optional(),reason:o7().optional()}),g=u.extend({method:nY("notifications/cancelled"),params:y}),_=nz({src:o7(),mimeType:o7().optional(),sizes:nM(o7()).optional(),theme:nQ(["light","dark"]).optional()}),v=nz({icons:nM(_).optional()}),$=(b=nz({name:o7(),title:o7().optional()})).extend({...b.shape,...v.shape,version:o7(),websiteUrl:o7().optional(),description:o7().optional()}),S=nB(nz({applyDefaults:nI().optional()}),t),k=ad(e=>e&&"object"==typeof e&&!Array.isArray(e)&&0===Object.keys(e).length?{form:{}}:e,nB(nz({form:S.optional(),url:t.optional()}),t.optional())),w=nD({list:t.optional(),cancel:t.optional(),requests:nD({sampling:nD({createMessage:t.optional()}).optional(),elicitation:nD({create:t.optional()}).optional()}).optional()}),V=nD({list:t.optional(),cancel:t.optional(),requests:nD({tools:nD({call:t.optional()}).optional()}).optional()}),P=nz({experimental:nJ(o7(),t).optional(),sampling:nz({context:t.optional(),tools:t.optional()}).optional(),elicitation:k.optional(),roots:nz({listChanged:nI().optional()}).optional(),tasks:w.optional(),extensions:nJ(o7(),t).optional()}),R=d.extend({protocolVersion:o7(),capabilities:P,clientInfo:$}),q=l.extend({method:nY("initialize"),params:R}),I=nz({experimental:nJ(o7(),t).optional(),logging:t.optional(),completions:t.optional(),prompts:nz({listChanged:nI().optional()}).optional(),resources:nz({subscribe:nI().optional(),listChanged:nI().optional()}).optional(),tools:nz({listChanged:nI().optional()}).optional(),tasks:V.optional(),extensions:nJ(o7(),t).optional()}),x=m.extend({protocolVersion:o7(),capabilities:I,serverInfo:$,instructions:o7().optional()}),j=u.extend({method:nY("notifications/initialized"),params:p.optional()}),C=l.extend({method:nY("ping"),params:d.optional()}),T=nz({progress:nV(),total:n4(nV()),message:n4(o7())}),O=nz({...p.shape,...T.shape,progressToken:i}),E=u.extend({method:nY("notifications/progress"),params:O}),A=d.extend({cursor:o.optional()}),W=l.extend({params:A.optional()}),M=m.extend({nextCursor:o.optional()}),z=(N=nz({uri:o7(),mimeType:n4(o7()),_meta:nJ(o7(),nE()).optional()})).extend({text:o7()}),D=o7().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:"Invalid Base64 string"}),F=N.extend({blob:D}),U=nz({audience:nM(L=nQ(["user","assistant"])).optional(),priority:nV().min(0).max(1).optional(),lastModified:ac({offset:!0}).optional()}),H=nz({...b.shape,...v.shape,uri:o7(),description:n4(o7()),mimeType:n4(o7()),size:n4(nV()),annotations:U.optional(),_meta:n4(nD({}))}),G=nz({...b.shape,...v.shape,uriTemplate:o7(),description:n4(o7()),mimeType:n4(o7()),annotations:U.optional(),_meta:n4(nD({}))}),B=W.extend({method:nY("resources/list")}),K=M.extend({resources:nM(H)}),J=W.extend({method:nY("resources/templates/list")}),Z=M.extend({resourceTemplates:nM(G)}),Q=d.extend({uri:o7()}),X=l.extend({method:nY("resources/read"),params:Q}),Y=m.extend({contents:nM(nL([z,F]))}),ee=u.extend({method:nY("notifications/resources/list_changed"),params:p.optional()}),et=l.extend({method:nY("resources/subscribe"),params:Q}),er=l.extend({method:nY("resources/unsubscribe"),params:Q}),ei=p.extend({uri:o7()}),eo=u.extend({method:nY("notifications/resources/updated"),params:ei}),en=nz({name:o7(),description:n4(o7()),required:n4(nI())}),ea=nz({...b.shape,...v.shape,description:n4(o7()),arguments:n4(nM(en)),_meta:n4(nD({}))}),es=W.extend({method:nY("prompts/list")}),ed=M.extend({prompts:nM(ea)}),ec=d.extend({name:o7(),arguments:nJ(o7(),o7()).optional()}),el=l.extend({method:nY("prompts/get"),params:ec}),ep=nz({type:nY("text"),text:o7(),annotations:U.optional(),_meta:nJ(o7(),nE()).optional()}),eu=nz({type:nY("image"),data:D,mimeType:o7(),annotations:U.optional(),_meta:nJ(o7(),nE()).optional()}),em=nz({type:nY("audio"),data:D,mimeType:o7(),annotations:U.optional(),_meta:nJ(o7(),nE()).optional()}),ef=nz({type:nY("tool_use"),name:o7(),id:o7(),input:nJ(o7(),nE()),_meta:nJ(o7(),nE()).optional()}),eh=nz({type:nY("resource"),resource:nL([z,F]),annotations:U.optional(),_meta:nJ(o7(),nE()).optional()}),e_=nz({role:L,content:eg=nL([ep,eu,em,ey=H.extend({type:nY("resource_link")}),eh])}),ev=m.extend({description:o7().optional(),messages:nM(e_)}),eb=u.extend({method:nY("notifications/prompts/list_changed"),params:p.optional()}),e$=nz({title:o7().optional(),readOnlyHint:nI().optional(),destructiveHint:nI().optional(),idempotentHint:nI().optional(),openWorldHint:nI().optional()}),eS=nz({taskSupport:nQ(["required","optional","forbidden"]).optional()}),ek=nz({...b.shape,...v.shape,description:o7().optional(),inputSchema:nz({type:nY("object"),properties:nJ(o7(),e).optional(),required:nM(o7()).optional()}).catchall(nE()),outputSchema:nz({type:nY("object"),properties:nJ(o7(),e).optional(),required:nM(o7()).optional()}).catchall(nE()).optional(),annotations:e$.optional(),execution:eS.optional(),_meta:nJ(o7(),nE()).optional()}),ew=W.extend({method:nY("tools/list")}),eV=M.extend({tools:nM(ek)}),eP=m.extend({content:nM(eg),structuredContent:nJ(o7(),nE()).optional(),isError:nI().optional()}),eR=c.extend({name:o7(),arguments:nJ(o7(),nE()).optional()}),eq=l.extend({method:nY("tools/call"),params:eR}),eI=u.extend({method:nY("notifications/tools/list_changed"),params:p.optional()}),ex=nQ(["debug","info","notice","warning","error","critical","alert","emergency"]),ej=d.extend({level:ex}),eC=l.extend({method:nY("logging/setLevel"),params:ej}),eT=p.extend({level:ex,logger:o7().optional(),data:nE()}),eO=u.extend({method:nY("notifications/message"),params:eT}),eE=nz({name:o7().optional()}),eA=nz({hints:nM(eE).optional(),costPriority:nV().min(0).max(1).optional(),speedPriority:nV().min(0).max(1).optional(),intelligencePriority:nV().min(0).max(1).optional()}),eW=nz({mode:nQ(["auto","required","none"]).optional()}),eM=nz({type:nY("tool_result"),toolUseId:o7().describe("The unique identifier for the corresponding tool call."),content:nM(eg),structuredContent:nz({}).loose().optional(),isError:nI().optional(),_meta:nJ(o7(),nE()).optional()}),eN=nH("type",[ep,eu,em]),eD=nz({role:L,content:nL([ez=nH("type",[ep,eu,em,ef,eM]),nM(ez)]),_meta:nJ(o7(),nE()).optional()}),eF=c.extend({messages:nM(eD),modelPreferences:eA.optional(),systemPrompt:o7().optional(),includeContext:nQ(["none","thisServer","allServers"]).optional(),temperature:nV().optional(),maxTokens:nV().int(),stopSequences:nM(o7()).optional(),metadata:t.optional(),tools:nM(ek).optional(),toolChoice:eW.optional()}),eL=l.extend({method:nY("sampling/createMessage"),params:eF}),eU=m.extend({model:o7(),stopReason:n4(nQ(["endTurn","stopSequence","maxTokens"]).or(o7())),role:L,content:eN}),eH=m.extend({model:o7(),stopReason:n4(nQ(["endTurn","stopSequence","maxTokens","toolUse"]).or(o7())),role:L,content:nL([ez,nM(ez)])}),eG=nz({type:nY("boolean"),title:o7().optional(),description:o7().optional(),default:nI().optional()}),eB=nz({type:nY("string"),title:o7().optional(),description:o7().optional(),minLength:nV().optional(),maxLength:nV().optional(),format:nQ(["email","uri","date","date-time"]).optional(),default:o7().optional()}),eK=nz({type:nQ(["number","integer"]),title:o7().optional(),description:o7().optional(),minimum:nV().optional(),maximum:nV().optional(),default:nV().optional()}),eJ=nz({type:nY("string"),title:o7().optional(),description:o7().optional(),enum:nM(o7()),default:o7().optional()}),eZ=nz({type:nY("string"),title:o7().optional(),description:o7().optional(),oneOf:nM(nz({const:o7(),title:o7()})),default:o7().optional()}),eQ=nz({type:nY("string"),title:o7().optional(),description:o7().optional(),enum:nM(o7()),enumNames:nM(o7()).optional(),default:o7().optional()}),eX=nL([eJ,eZ]),eY=nz({type:nY("array"),title:o7().optional(),description:o7().optional(),minItems:nV().optional(),maxItems:nV().optional(),items:nz({type:nY("string"),enum:nM(o7())}),default:nM(o7()).optional()}),e0=nL([eY,e1=nz({type:nY("array"),title:o7().optional(),description:o7().optional(),minItems:nV().optional(),maxItems:nV().optional(),items:nz({anyOf:nM(nz({const:o7(),title:o7()}))}),default:nM(o7()).optional()})]),e2=nL([eQ,eX,e0]),e4=nL([e2,eG,eB,eK]),e6=c.extend({mode:nY("form").optional(),message:o7(),requestedSchema:nz({type:nY("object"),properties:nJ(o7(),e4),required:nM(o7()).optional()}).catchall(nE())}),e9=nL([e6,e3=c.extend({mode:nY("url"),message:o7(),elicitationId:o7(),url:o7().url()})]),e5=l.extend({method:nY("elicitation/create"),params:e9}),e8=p.extend({elicitationId:o7()}),e7=u.extend({method:nY("notifications/elicitation/complete"),params:e8}),te=m.extend({action:nQ(["accept","decline","cancel"]),content:ad(e=>null===e?void 0:e,nJ(o7(),nL([o7(),nV(),nI(),nM(o7())])).optional())}),tt=nz({type:nY("ref/resource"),uri:o7()}),tr=nz({type:nY("ref/prompt"),name:o7()}),ti=d.extend({ref:nL([tr,tt]),argument:nz({name:o7(),value:o7()}),context:nz({arguments:nJ(o7(),o7()).optional()}).optional()}),to=l.extend({method:nY("completion/complete"),params:ti}),tn=m.extend({completion:nD({values:nM(o7()).max(100),total:n4(nV().int()),hasMore:n4(nI())})}),ta=nz({uri:o7().startsWith("file://"),name:o7().optional(),_meta:nJ(o7(),nE()).optional()}),ts=l.extend({method:nY("roots/list"),params:d.optional()}),td=m.extend({roots:nM(ta)}),tc=u.extend({method:nY("notifications/roots/list_changed"),params:p.optional()}),tl=nD({ttl:nV().optional(),pollInterval:nV().optional()}),tp=nQ(["working","input_required","completed","failed","cancelled"]),tu=nz({taskId:o7(),status:tp,ttl:nL([nV(),nj()]),createdAt:o7(),lastUpdatedAt:o7(),pollInterval:n4(nV()),statusMessage:n4(o7())}),tm=m.extend({task:tu}),tf=p.merge(tu),th=u.extend({method:nY("notifications/tasks/status"),params:tf}),ty=l.extend({method:nY("tasks/get"),params:d.extend({taskId:o7()})}),tg=m.merge(tu),t_=l.extend({method:nY("tasks/result"),params:d.extend({taskId:o7()})}),tv=m.loose(),tb=W.extend({method:nY("tasks/list")}),t$=M.extend({tasks:nM(tu)}),tS=l.extend({method:nY("tasks/cancel"),params:d.extend({taskId:o7()})}),{JSONValueSchema:e,JSONObjectSchema:t,ProgressTokenSchema:i,CursorSchema:o,TaskMetadataSchema:n,RelatedTaskMetadataSchema:a,RequestMetaSchema:s,BaseRequestParamsSchema:d,TaskAugmentedRequestParamsSchema:c,RequestSchema:l,NotificationsParamsSchema:p,NotificationSchema:u,ResultSchema:m,RequestIdSchema:f,EmptyResultSchema:h,CancelledNotificationParamsSchema:y,CancelledNotificationSchema:g,IconSchema:_,IconsSchema:v,BaseMetadataSchema:b,ImplementationSchema:$,ClientTasksCapabilitySchema:w,ServerTasksCapabilitySchema:V,ClientCapabilitiesSchema:P,InitializeRequestParamsSchema:R,InitializeRequestSchema:q,ServerCapabilitiesSchema:I,InitializeResultSchema:x,InitializedNotificationSchema:j,PingRequestSchema:C,ProgressSchema:T,ProgressNotificationParamsSchema:O,ProgressNotificationSchema:E,PaginatedRequestParamsSchema:A,PaginatedRequestSchema:W,PaginatedResultSchema:M,ResourceContentsSchema:N,TextResourceContentsSchema:z,BlobResourceContentsSchema:F,RoleSchema:L,AnnotationsSchema:U,ResourceSchema:H,ResourceTemplateSchema:G,ListResourcesRequestSchema:B,ListResourcesResultSchema:K,ListResourceTemplatesRequestSchema:J,ListResourceTemplatesResultSchema:Z,ResourceRequestParamsSchema:Q,ReadResourceRequestParamsSchema:Q,ReadResourceRequestSchema:X,ReadResourceResultSchema:Y,ResourceListChangedNotificationSchema:ee,SubscribeRequestParamsSchema:Q,SubscribeRequestSchema:et,UnsubscribeRequestParamsSchema:Q,UnsubscribeRequestSchema:er,ResourceUpdatedNotificationParamsSchema:ei,ResourceUpdatedNotificationSchema:eo,PromptArgumentSchema:en,PromptSchema:ea,ListPromptsRequestSchema:es,ListPromptsResultSchema:ed,GetPromptRequestParamsSchema:ec,GetPromptRequestSchema:el,TextContentSchema:ep,ImageContentSchema:eu,AudioContentSchema:em,ToolUseContentSchema:ef,EmbeddedResourceSchema:eh,ResourceLinkSchema:ey,ContentBlockSchema:eg,PromptMessageSchema:e_,GetPromptResultSchema:ev,PromptListChangedNotificationSchema:eb,ToolAnnotationsSchema:e$,ToolExecutionSchema:eS,ToolSchema:ek,ListToolsRequestSchema:ew,ListToolsResultSchema:eV,CallToolResultSchema:eP,CallToolRequestParamsSchema:eR,CallToolRequestSchema:eq,ToolListChangedNotificationSchema:eI,LoggingLevelSchema:ex,SetLevelRequestParamsSchema:ej,SetLevelRequestSchema:eC,LoggingMessageNotificationParamsSchema:eT,LoggingMessageNotificationSchema:eO,ModelHintSchema:eE,ModelPreferencesSchema:eA,ToolChoiceSchema:eW,ToolResultContentSchema:eM,SamplingContentSchema:eN,SamplingMessageContentBlockSchema:ez,SamplingMessageSchema:eD,CreateMessageRequestParamsSchema:eF,CreateMessageRequestSchema:eL,CreateMessageResultSchema:eU,CreateMessageResultWithToolsSchema:eH,BooleanSchemaSchema:eG,StringSchemaSchema:eB,NumberSchemaSchema:eK,UntitledSingleSelectEnumSchemaSchema:eJ,TitledSingleSelectEnumSchemaSchema:eZ,LegacyTitledEnumSchemaSchema:eQ,SingleSelectEnumSchemaSchema:eX,UntitledMultiSelectEnumSchemaSchema:eY,TitledMultiSelectEnumSchemaSchema:e1,MultiSelectEnumSchemaSchema:e0,EnumSchemaSchema:e2,PrimitiveSchemaDefinitionSchema:e4,ElicitRequestFormParamsSchema:e6,ElicitRequestURLParamsSchema:e3,ElicitRequestParamsSchema:e9,ElicitRequestSchema:e5,ElicitationCompleteNotificationParamsSchema:e8,ElicitationCompleteNotificationSchema:e7,ElicitResultSchema:te,ResourceTemplateReferenceSchema:tt,PromptReferenceSchema:tr,CompleteRequestParamsSchema:ti,CompleteRequestSchema:to,CompleteResultSchema:tn,RootSchema:ta,ListRootsRequestSchema:ts,ListRootsResultSchema:td,RootsListChangedNotificationSchema:tc,TaskCreationParamsSchema:tl,TaskStatusSchema:tp,TaskSchema:tu,CreateTaskResultSchema:tm,TaskStatusNotificationParamsSchema:tf,TaskStatusNotificationSchema:th,GetTaskRequestSchema:ty,GetTaskResultSchema:tg,GetTaskPayloadRequestSchema:t_,GetTaskPayloadResultSchema:tv,ListTasksRequestSchema:tb,ListTasksResultSchema:t$,CancelTaskRequestSchema:tS,CancelTaskResultSchema:m.merge(tu),ClientRequestSchema:nL([C,q,to,eC,el,es,B,J,X,et,er,eq,ew,ty,t_,tb,tS]),ClientNotificationSchema:nL([g,E,j,tc,th]),ClientResultSchema:nL([h,eU,eH,te,td,tg,t$,tm]),ServerRequestSchema:nL([C,eL,e5,ts,ty,t_,tb,tS]),ServerNotificationSchema:nL([g,E,eO,eo,ee,eI,eb,th,e7]),ServerResultSchema:nL([h,x,tn,ev,ed,K,Z,Y,eP,eV,tg,t$,tm]),CallToolResultWireSchema:nE().superRefine((e,t)=>{if(!("object"!=typeof e||null===e||Array.isArray(e))&&void 0===e.content){for(let r of c$)if(r in e)return void t.addIssue({code:"custom",message:`content is required when the body carries '${r}' — another result family cannot default into an empty tools/call success`})}}).transform(cS).pipe(eP)})}function cw(e){return"object"!==e.type}let cV=new Set(["const","enum","default","examples"]),cP=new Set(["properties","patternProperties","$defs","definitions","dependentSchemas","dependencies"]);function cR(e){return void 0!==e&&!("string"==typeof e&&e.startsWith("#"))}let cq={ping:null,initialize:null,"completion/complete":null,"logging/setLevel":null,"prompts/get":null,"prompts/list":null,"resources/list":null,"resources/templates/list":null,"resources/read":null,"resources/subscribe":null,"resources/unsubscribe":null,"tools/call":null,"tools/list":null,"tasks/get":null,"tasks/result":null,"tasks/list":null,"tasks/cancel":null,"sampling/createMessage":null,"elicitation/create":null,"roots/list":null},cI={"notifications/cancelled":null,"notifications/progress":null,"notifications/initialized":null,"notifications/roots/list_changed":null,"notifications/tasks/status":null,"notifications/message":null,"notifications/resources/updated":null,"notifications/resources/list_changed":null,"notifications/tools/list_changed":null,"notifications/prompts/list_changed":null,"notifications/elicitation/complete":null},cx={ping:null,initialize:null,"completion/complete":null,"logging/setLevel":null,"prompts/get":null,"prompts/list":null,"resources/list":null,"resources/templates/list":null,"resources/read":null,"resources/subscribe":null,"resources/unsubscribe":null,"tools/call":null,"tools/list":null,"sampling/createMessage":null,"elicitation/create":null,"roots/list":null};function cj(){if(i)return i;let e=ck();return i={requestSchemas:{ping:e.PingRequestSchema,initialize:e.InitializeRequestSchema,"completion/complete":e.CompleteRequestSchema,"logging/setLevel":e.SetLevelRequestSchema,"prompts/get":e.GetPromptRequestSchema,"prompts/list":e.ListPromptsRequestSchema,"resources/list":e.ListResourcesRequestSchema,"resources/templates/list":e.ListResourceTemplatesRequestSchema,"resources/read":e.ReadResourceRequestSchema,"resources/subscribe":e.SubscribeRequestSchema,"resources/unsubscribe":e.UnsubscribeRequestSchema,"tools/call":e.CallToolRequestSchema,"tools/list":e.ListToolsRequestSchema,"tasks/get":e.GetTaskRequestSchema,"tasks/result":e.GetTaskPayloadRequestSchema,"tasks/list":e.ListTasksRequestSchema,"tasks/cancel":e.CancelTaskRequestSchema,"sampling/createMessage":e.CreateMessageRequestSchema,"elicitation/create":e.ElicitRequestSchema,"roots/list":e.ListRootsRequestSchema},notificationSchemas:{"notifications/cancelled":e.CancelledNotificationSchema,"notifications/progress":e.ProgressNotificationSchema,"notifications/initialized":e.InitializedNotificationSchema,"notifications/roots/list_changed":e.RootsListChangedNotificationSchema,"notifications/tasks/status":e.TaskStatusNotificationSchema,"notifications/message":e.LoggingMessageNotificationSchema,"notifications/resources/updated":e.ResourceUpdatedNotificationSchema,"notifications/resources/list_changed":e.ResourceListChangedNotificationSchema,"notifications/tools/list_changed":e.ToolListChangedNotificationSchema,"notifications/prompts/list_changed":e.PromptListChangedNotificationSchema,"notifications/elicitation/complete":e.ElicitationCompleteNotificationSchema},resultSchemas:{ping:e.EmptyResultSchema,initialize:e.InitializeResultSchema,"completion/complete":e.CompleteResultSchema,"logging/setLevel":e.EmptyResultSchema,"prompts/get":e.GetPromptResultSchema,"prompts/list":e.ListPromptsResultSchema,"resources/list":e.ListResourcesResultSchema,"resources/templates/list":e.ListResourceTemplatesResultSchema,"resources/read":e.ReadResourceResultSchema,"resources/subscribe":e.EmptyResultSchema,"resources/unsubscribe":e.EmptyResultSchema,"tools/call":e.CallToolResultWireSchema,"tools/list":e.ListToolsResultSchema,"sampling/createMessage":e.CreateMessageResultWithToolsSchema,"elicitation/create":e.ElicitResultSchema,"roots/list":e.ListRootsResultSchema}}}function cC(e){return Object.prototype.hasOwnProperty.call(cq,e)}function cT(e){return Object.prototype.hasOwnProperty.call(cI,e)}function cO(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)}function cE(e,t){if(void 0===e)return{ok:!1,reason:"not-in-era"};let r=e.safeParse(t);return r.success?{ok:!0,value:r.data}:{ok:!1,reason:"invalid",message:String(r.error)}}Object.keys(cq),Object.keys(cI);let cA={ok:!1,reason:"not-in-era"};function cW(e){return cO(e)&&cO(e.outputSchema)&&cw(e.outputSchema)}let cM={era:"2025-11-25",hasRequestMethod:cC,hasNotificationMethod:cT,validateRequest:(e,t)=>cE(cC(e)?cj().requestSchemas[e]:void 0,t),validateResult:(e,t)=>cE(Object.prototype.hasOwnProperty.call(cx,e)?cj().resultSchemas[e]:void 0,t),validateNotification:(e,t)=>cE(cT(e)?cj().notificationSchemas[e]:void 0,t),hasInputRequestMethod:()=>!1,validateInputRequest:()=>cA,validateInputResponse:()=>cA,samplingResultVariant:(e,t)=>{let r=ck();return cE(e?r.CreateMessageResultWithToolsSchema:r.CreateMessageResultSchema,t)},outboundEnvelope:e=>void 0,validateEnvelopeMeta:e=>[],projectCallToolResult(e,t){let r=cb(e),i=r.structuredContent;if(void 0===i)return r;let o="object"!=typeof i||null===i||Array.isArray(i),n=void 0!==t&&cw(t);return o||n?{...r,structuredContent:{result:i}}:r},decodeResult(e,t){if(cO(t)&&"resultType"in t){let e={...t};return delete e.resultType,{kind:"complete",result:e}}return{kind:"complete",result:t}},encodeResult(e,t){if("tools/list"!==e)return t;let r=t.tools;return Array.isArray(r)&&r.some(e=>cW(e))?{...t,tools:r.map(e=>cW(e)?{...e,outputSchema:function(e){var t;let r="string"==typeof e.$schema?e.$schema:void 0;if(cR(e.$id))return{...void 0!==r&&{$schema:r},type:"object",properties:{result:e},required:["result"]};let i="string"==typeof(t=e.$schema)&&ek.has(t.replace(/#$/,""))&&!0!==e.$recursiveAnchor,o=(e,t)=>{if(Array.isArray(e))return e.map(e=>o(e,!1));if(null===e||"object"!=typeof e||!t&&cR(e.$id))return e;let r={},n=!1;for(let[a,s]of Object.entries(e))t?r[a]=o(s,!1):("$ref"===a||"$dynamicRef"===a)&&"string"==typeof s?r[a]="#"===s?"#/properties/result":s.startsWith("#/")?`#/properties/result${s.slice(1)}`:s:"$recursiveRef"===a&&"#"===s&&i?n=!0:cV.has(a)?r[a]=s:cP.has(a)?r[a]=o(s,!0):r[a]=o(s,!1);return n&&("$ref"in r?r.allOf=[...Array.isArray(r.allOf)?r.allOf:[],{$ref:"#/properties/result"}]:r.$ref="#/properties/result"),r};return{...void 0!==r&&{$schema:r},type:"object",properties:{result:o(e,!1)},required:["result"]}}(e.outputSchema)}:e)}:t},encodeErrorCode:e=>-32002===e?-32602:e,checkInboundEnvelope:e=>void 0};function cN(){return o??=function(){let e=aa(()=>nL([o7(),nV(),nI(),nj(),nJ(o7(),e),nM(e)])),t=nJ(o7(),e),r=nL([o7(),nV().int()]),i=o7(),o=nL([o7(),nV().int()]),n=nQ(["user","assistant"]),a=nQ(["debug","info","notice","warning","error","critical","alert","emergency"]),s=o7().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:"Invalid Base64 string"}),d=nz({ttl:nV().optional()}),c=nz({taskId:o7()}),l=nD({progressToken:r.optional(),"io.modelcontextprotocol/related-task":c.optional()}),p=nz({_meta:l.optional()}),u=p.extend({task:d.optional()}),m=nz({_meta:l.optional()}),f=nz({method:o7(),params:m.loose().optional()}),h=nz({src:o7(),mimeType:o7().optional(),sizes:nM(o7()).optional(),theme:nQ(["light","dark"]).optional()}),y=nz({icons:nM(h).optional()}),g=nz({name:o7(),title:o7().optional()}),_=g.extend({...g.shape,...y.shape,version:o7(),websiteUrl:o7().optional(),description:o7().optional()}),v=nB(nz({applyDefaults:nI().optional()}),t),b=ad(e=>e&&"object"==typeof e&&!Array.isArray(e)&&0===Object.keys(e).length?{form:{}}:e,nB(nz({form:v.optional(),url:t.optional()}),t.optional())),$=nD({list:t.optional(),cancel:t.optional(),requests:nD({sampling:nD({createMessage:t.optional()}).optional(),elicitation:nD({create:t.optional()}).optional()}).optional()}),S=nD({list:t.optional(),cancel:t.optional(),requests:nD({tools:nD({call:t.optional()}).optional()}).optional()}),k=nz({experimental:nJ(o7(),t).optional(),sampling:nz({context:t.optional(),tools:t.optional()}).optional(),elicitation:b.optional(),roots:nz({listChanged:nI().optional()}).optional(),tasks:$.optional(),extensions:nJ(o7(),t).optional()}),w=nz({experimental:nJ(o7(),t).optional(),logging:t.optional(),completions:t.optional(),prompts:nz({listChanged:nI().optional()}).optional(),resources:nz({subscribe:nI().optional(),listChanged:nI().optional()}).optional(),tools:nz({listChanged:nI().optional()}).optional(),tasks:S.optional(),extensions:nJ(o7(),t).optional()}),V=nz({progress:nV(),total:n4(nV()),message:n4(o7())}),P=nz({...m.shape,...V.shape,progressToken:r}),R=f.extend({method:nY("notifications/progress"),params:P}),q=m.extend({level:a,logger:o7().optional(),data:nE()}),I=f.extend({method:nY("notifications/message"),params:q}),x=nz({uri:o7(),mimeType:n4(o7()),_meta:nJ(o7(),nE()).optional()}),j=x.extend({text:o7()}),C=x.extend({blob:s}),T=nz({audience:nM(n).optional(),priority:nV().min(0).max(1).optional(),lastModified:ac({offset:!0}).optional()}),O=nz({...g.shape,...y.shape,uri:o7(),description:n4(o7()),mimeType:n4(o7()),size:n4(nV()),annotations:T.optional(),_meta:n4(nD({}))}),E=nz({...g.shape,...y.shape,uriTemplate:o7(),description:n4(o7()),mimeType:n4(o7()),annotations:T.optional(),_meta:n4(nD({}))}),A=f.extend({method:nY("notifications/resources/list_changed"),params:m.optional()}),W=m.extend({uri:o7()}),M=f.extend({method:nY("notifications/resources/updated"),params:W}),N=nz({name:o7(),description:n4(o7()),required:n4(nI())}),z=nz({...g.shape,...y.shape,description:n4(o7()),arguments:n4(nM(N)),_meta:n4(nD({}))}),D=f.extend({method:nY("notifications/prompts/list_changed"),params:m.optional()}),F=nz({type:nY("text"),text:o7(),annotations:T.optional(),_meta:nJ(o7(),nE()).optional()}),L=nz({type:nY("image"),data:s,mimeType:o7(),annotations:T.optional(),_meta:nJ(o7(),nE()).optional()}),U=nz({type:nY("audio"),data:s,mimeType:o7(),annotations:T.optional(),_meta:nJ(o7(),nE()).optional()}),H=nz({type:nY("tool_use"),name:o7(),id:o7(),input:nJ(o7(),nE()),_meta:nJ(o7(),nE()).optional()}),G=nz({type:nY("resource"),resource:nL([j,C]),annotations:T.optional(),_meta:nJ(o7(),nE()).optional()}),B=O.extend({type:nY("resource_link")}),K=nL([F,L,U,B,G]),J=nz({role:n,content:K}),Z=nz({title:o7().optional(),readOnlyHint:nI().optional(),destructiveHint:nI().optional(),idempotentHint:nI().optional(),openWorldHint:nI().optional()}),Q=f.extend({method:nY("notifications/tools/list_changed"),params:m.optional()}),X=nz({name:o7().optional()}),Y=nz({hints:nM(X).optional(),costPriority:nV().min(0).max(1).optional(),speedPriority:nV().min(0).max(1).optional(),intelligencePriority:nV().min(0).max(1).optional()}),ee=nz({mode:nQ(["auto","required","none"]).optional()}),et=nz({type:nY("boolean"),title:o7().optional(),description:o7().optional(),default:nI().optional()}),er=nz({type:nY("string"),title:o7().optional(),description:o7().optional(),minLength:nV().optional(),maxLength:nV().optional(),format:nQ(["email","uri","date","date-time"]).optional(),default:o7().optional()}),ei=nz({type:nQ(["number","integer"]),title:o7().optional(),description:o7().optional(),minimum:nV().optional(),maximum:nV().optional(),default:nV().optional()}),eo=nz({type:nY("string"),title:o7().optional(),description:o7().optional(),enum:nM(o7()),default:o7().optional()}),en=nz({type:nY("string"),title:o7().optional(),description:o7().optional(),oneOf:nM(nz({const:o7(),title:o7()})),default:o7().optional()}),ea=nz({type:nY("string"),title:o7().optional(),description:o7().optional(),enum:nM(o7()),enumNames:nM(o7()).optional(),default:o7().optional()}),es=nL([eo,en]),ed=nz({type:nY("array"),title:o7().optional(),description:o7().optional(),minItems:nV().optional(),maxItems:nV().optional(),items:nz({type:nY("string"),enum:nM(o7())}),default:nM(o7()).optional()}),ec=nz({type:nY("array"),title:o7().optional(),description:o7().optional(),minItems:nV().optional(),maxItems:nV().optional(),items:nz({anyOf:nM(nz({const:o7(),title:o7()}))}),default:nM(o7()).optional()}),el=nL([ed,ec]),ep=nL([ea,es,el]),eu=nL([ep,et,er,ei]),em=u.extend({mode:nY("form").optional(),message:o7(),requestedSchema:nz({type:nY("object"),properties:nJ(o7(),eu),required:nM(o7()).optional()}).catchall(nE())}),ef=nz({type:nY("ref/resource"),uri:o7()}),eh=nz({type:nY("ref/prompt"),name:o7()}),ey=nz({uri:o7().startsWith("file://"),name:o7().optional(),_meta:nJ(o7(),nE()).optional()}),eg=k.shape,e_=nz({experimental:eg.experimental,sampling:eg.sampling,elicitation:eg.elicitation,roots:eg.roots,extensions:eg.extensions}),ev=w.shape,eb=nz({experimental:ev.experimental,logging:ev.logging,completions:ev.completions,prompts:ev.prompts,resources:ev.resources,tools:ev.tools,extensions:ev.extensions}),e$=nD({progressToken:r.optional(),[au]:o7(),[am]:_.optional(),[ah]:e_,[ay]:a.optional()}),eS=nz({...g.shape,...y.shape,description:o7().optional(),inputSchema:nD({$schema:o7().optional(),type:nY("object")}),outputSchema:nD({$schema:o7().optional()}).optional(),annotations:Z.optional(),_meta:nJ(o7(),nE()).optional()}),ek=nz({type:nY("tool_result"),toolUseId:o7(),content:nM(K),structuredContent:nE().optional(),isError:nI().optional(),_meta:nJ(o7(),nE()).optional()}),ew=nL([F,L,U,H,ek]),eV=nz({role:n,content:nL([ew,nM(ew)]),_meta:nJ(o7(),nE()).optional()}),eP=o7(),eR=nD({[af]:_.optional().catch(void 0)}),eq=eR.optional();function eI(e){return nD({_meta:eq,resultType:eP.default("complete"),...e})}let ex=eI({}),ej=eI({nextCursor:i.optional()}),eC=eI({content:nM(K),structuredContent:nE().optional(),isError:nI().optional()}),eT=eI({ttlMs:nV().int().min(0),cacheScope:nQ(["public","private"]),tools:nM(eS),nextCursor:i.optional()}),eO=eI({ttlMs:nV().int().min(0),cacheScope:nQ(["public","private"]),prompts:nM(z),nextCursor:i.optional()}),eE=eI({description:o7().optional(),messages:nM(J)}),eA=eI({ttlMs:nV().int().min(0),cacheScope:nQ(["public","private"]),resources:nM(O),nextCursor:i.optional()}),eW=eI({ttlMs:nV().int().min(0),cacheScope:nQ(["public","private"]),resourceTemplates:nM(E),nextCursor:i.optional()}),eM=eI({ttlMs:nV().int().min(0),cacheScope:nQ(["public","private"]),contents:nM(nL([j,C]))}),eN=eI({completion:nz({values:nM(o7()).max(100),total:nV().int().optional(),hasMore:nI().optional()}).loose()}),ez=eI({ttlMs:nV().int().min(0),cacheScope:nQ(["public","private"])}),eD=eI({ttlMs:nV().int().min(0).catch(0),cacheScope:nQ(["public","private"]).catch("private"),supportedVersions:nM(o7()),capabilities:eb,instructions:o7().optional()}),eF=nz({messages:nM(eV),modelPreferences:Y.optional(),systemPrompt:o7().optional(),includeContext:nQ(["none","thisServer","allServers"]).optional(),temperature:nV().optional(),maxTokens:nV().int(),stopSequences:nM(o7()).optional(),metadata:t.optional(),tools:nM(eS).optional(),toolChoice:ee.optional()}),eL=nz({method:nY("sampling/createMessage"),params:eF}),eU=nz({method:nY("roots/list"),params:nz({_meta:nJ(o7(),nE()).optional()}).optional()}),eH=nz({...eV.shape,model:o7(),stopReason:o7().optional()}),eG=nz({roots:nM(ey)}),eB=nz({action:nQ(["accept","decline","cancel"]),content:nJ(o7(),nL([o7(),nV(),nI(),nM(o7())])).optional()}),eK=nz({mode:nY("url"),message:o7(),url:o7().url()}),eJ=nL([em,eK]),eZ=nz({method:nY("elicitation/create"),params:eJ}),eQ=nL([eL,eU,eZ]),eX=nL([eH,eG,eB]),eY=nJ(o7(),eQ),e1=nJ(o7(),eX),e0=eI({inputRequests:eY.optional(),requestState:o7().optional()}),e2={inputResponses:e1.optional(),requestState:o7().optional()},e4=nz({_meta:e$,...e2}),e6=nD({progressToken:r.optional()});function e3(e,t){return nz({method:nY(e),params:nz({_meta:e$,...t})})}function e9(e,t){return nz({method:nY(e),params:nz({_meta:e6.optional(),...t}).optional()})}let e5={name:o7(),arguments:nJ(o7(),nE()).optional(),...e2},e8={cursor:i.optional()},e7=e3("tools/call",e5),te=e3("tools/list",e8),tt=e3("prompts/list",e8),tr=e3("prompts/get",{name:o7(),arguments:nJ(o7(),o7()).optional(),...e2}),ti=e3("resources/list",e8),to=e3("resources/templates/list",e8),tn=e3("resources/read",{uri:o7(),...e2}),ta={ref:nL([eh,ef]),argument:nz({name:o7(),value:o7()}),context:nz({arguments:nJ(o7(),o7()).optional()}).optional()},ts=e3("completion/complete",ta),td=e3("server/discover",{}),tc=nz({toolsListChanged:nI().optional(),promptsListChanged:nI().optional(),resourcesListChanged:nI().optional(),resourceSubscriptions:nM(o7()).optional()}),tl={notifications:tc},tp=e3("subscriptions/listen",tl),tu=eR.extend({"io.modelcontextprotocol/subscriptionId":o}),tm=nD({_meta:tu,resultType:eP.default("complete")}),tf={"tools/call":e9("tools/call",e5),"tools/list":e9("tools/list",e8),"prompts/get":e9("prompts/get",{name:o7(),arguments:nJ(o7(),o7()).optional()}),"prompts/list":e9("prompts/list",e8),"resources/list":e9("resources/list",e8),"resources/templates/list":e9("resources/templates/list",e8),"resources/read":e9("resources/read",{uri:o7()}),"completion/complete":e9("completion/complete",ta),"server/discover":e9("server/discover",{}),"subscriptions/listen":e9("subscriptions/listen",tl)};function th(e){return nD({_meta:eq,...e})}let ty={"tools/call":th({content:nM(K),structuredContent:nE().optional(),isError:nI().optional()}),"tools/list":th({ttlMs:nV().int().min(0),cacheScope:nQ(["public","private"]),tools:nM(eS),nextCursor:i.optional()}),"prompts/get":th({description:o7().optional(),messages:nM(J)}),"prompts/list":th({ttlMs:nV().int().min(0),cacheScope:nQ(["public","private"]),prompts:nM(z),nextCursor:i.optional()}),"resources/list":th({ttlMs:nV().int().min(0),cacheScope:nQ(["public","private"]),resources:nM(O),nextCursor:i.optional()}),"resources/templates/list":th({ttlMs:nV().int().min(0),cacheScope:nQ(["public","private"]),resourceTemplates:nM(E),nextCursor:i.optional()}),"resources/read":th({ttlMs:nV().int().min(0),cacheScope:nQ(["public","private"]),contents:nM(nL([j,C]))}),"completion/complete":th({completion:nz({values:nM(o7()).max(100),total:nV().int().optional(),hasMore:nI().optional()}).loose()}),"server/discover":th({ttlMs:nV().int().min(0).catch(0),cacheScope:nQ(["public","private"]).catch("private"),supportedVersions:nM(o7()),capabilities:eb,instructions:o7().optional()}),"subscriptions/listen":th({})},tg=nD({"io.modelcontextprotocol/subscriptionId":o.optional()}),t_=nz({method:nY("notifications/subscriptions/acknowledged"),params:nz({_meta:tg.optional(),notifications:tc})}),tv=nz({_meta:tg.optional(),requestId:o,reason:o7().optional()}),tb=nz({method:nY("notifications/cancelled"),params:tv}),t$=e=>nz({jsonrpc:nY("2.0"),id:nL([o7(),nV().int()]),result:e}).strict();return{JSONValueSchema:e,JSONObjectSchema:t,ProgressTokenSchema:r,CursorSchema:i,RequestIdSchema:o,RoleSchema:n,LoggingLevelSchema:a,TaskMetadataSchema:d,RelatedTaskMetadataSchema:c,RequestMetaSchema:l,BaseRequestParamsSchema:p,TaskAugmentedRequestParamsSchema:u,NotificationsParamsSchema:m,NotificationSchema:f,IconSchema:h,IconsSchema:y,BaseMetadataSchema:g,ImplementationSchema:_,ClientTasksCapabilitySchema:$,ServerTasksCapabilitySchema:S,ClientCapabilitiesSchema:k,ServerCapabilitiesSchema:w,ProgressSchema:V,ProgressNotificationParamsSchema:P,ProgressNotificationSchema:R,LoggingMessageNotificationParamsSchema:q,LoggingMessageNotificationSchema:I,ResourceContentsSchema:x,TextResourceContentsSchema:j,BlobResourceContentsSchema:C,AnnotationsSchema:T,ResourceSchema:O,ResourceTemplateSchema:E,ResourceListChangedNotificationSchema:A,ResourceUpdatedNotificationParamsSchema:W,ResourceUpdatedNotificationSchema:M,PromptArgumentSchema:N,PromptSchema:z,PromptListChangedNotificationSchema:D,TextContentSchema:F,ImageContentSchema:L,AudioContentSchema:U,ToolUseContentSchema:H,EmbeddedResourceSchema:G,ResourceLinkSchema:B,ContentBlockSchema:K,PromptMessageSchema:J,ToolAnnotationsSchema:Z,ToolListChangedNotificationSchema:Q,ModelHintSchema:X,ModelPreferencesSchema:Y,ToolChoiceSchema:ee,BooleanSchemaSchema:et,StringSchemaSchema:er,NumberSchemaSchema:ei,UntitledSingleSelectEnumSchemaSchema:eo,TitledSingleSelectEnumSchemaSchema:en,LegacyTitledEnumSchemaSchema:ea,SingleSelectEnumSchemaSchema:es,UntitledMultiSelectEnumSchemaSchema:ed,TitledMultiSelectEnumSchemaSchema:ec,MultiSelectEnumSchemaSchema:el,EnumSchemaSchema:ep,PrimitiveSchemaDefinitionSchema:eu,ElicitRequestFormParamsSchema:em,ResourceTemplateReferenceSchema:ef,PromptReferenceSchema:eh,RootSchema:ey,ClientCapabilities2026Schema:e_,ServerCapabilities2026Schema:eb,RequestMetaEnvelopeSchema:e$,ToolSchema:eS,ToolResultContentSchema:ek,SamplingMessageContentBlockSchema:ew,SamplingMessageSchema:eV,ResultTypeSchema:eP,ResultMetaSchema:eR,ResultSchema:ex,PaginatedResultSchema:ej,CallToolResultSchema:eC,ListToolsResultSchema:eT,ListPromptsResultSchema:eO,GetPromptResultSchema:eE,ListResourcesResultSchema:eA,ListResourceTemplatesResultSchema:eW,ReadResourceResultSchema:eM,CompleteResultSchema:eN,CacheableResultSchema:ez,DiscoverResultSchema:eD,CreateMessageRequestParamsSchema:eF,CreateMessageRequestSchema:eL,ListRootsRequestSchema:eU,CreateMessageResultSchema:eH,ListRootsResultSchema:eG,ElicitResultSchema:eB,ElicitRequestURLParamsSchema:eK,ElicitRequestParamsSchema:eJ,ElicitRequestSchema:eZ,InputRequestSchema:eQ,InputResponseSchema:eX,InputRequestsSchema:eY,InputResponsesSchema:e1,InputRequiredResultSchema:e0,InputResponseRequestParamsSchema:e4,CallToolRequestSchema:e7,ListToolsRequestSchema:te,ListPromptsRequestSchema:tt,GetPromptRequestSchema:tr,ListResourcesRequestSchema:ti,ListResourceTemplatesRequestSchema:to,ReadResourceRequestSchema:tn,CompleteRequestSchema:ts,DiscoverRequestSchema:td,SubscriptionFilterSchema:tc,SubscriptionsListenRequestSchema:tp,SubscriptionsListenResultMetaSchema:tu,SubscriptionsListenResultSchema:tm,dispatchRequestSchemas:tf,dispatchResultSchemas:ty,NotificationMetaSchema:tg,SubscriptionsAcknowledgedNotificationSchema:t_,CancelledNotificationParamsSchema:tv,CancelledNotificationSchema:tb,notificationSchemas2026:{"notifications/cancelled":tb,"notifications/progress":R,"notifications/message":I,"notifications/resources/updated":M,"notifications/resources/list_changed":A,"notifications/tools/list_changed":Q,"notifications/prompts/list_changed":D,"notifications/subscriptions/acknowledged":t_},JSONRPCResultResponseSchema:t$(ex),CallToolResultResponseSchema:t$(nL([eC,e0])),ListToolsResultResponseSchema:t$(eT),ListPromptsResultResponseSchema:t$(eO),GetPromptResultResponseSchema:t$(nL([eE,e0])),ListResourcesResultResponseSchema:t$(eA),ListResourceTemplatesResultResponseSchema:t$(eW),ReadResourceResultResponseSchema:t$(nL([eM,e0])),CompleteResultResponseSchema:t$(eN),DiscoverResultResponseSchema:t$(eD),SubscriptionsListenResultResponseSchema:t$(tm)}}()}let cz=["tools/list","prompts/list","resources/list","resources/templates/list","resources/read","server/discover"],cD=Symbol("modelcontextprotocol.resultCacheHintFallback");function cF(e,t){if(void 0===t)return e;let r=e[cD];if(void 0===r)return{...e,[cD]:t};let i={},o=r.ttlMs??t.ttlMs;void 0!==o&&(i.ttlMs=o);let n=r.cacheScope??t.cacheScope;return void 0!==n&&(i.cacheScope=n),{...e,[cD]:i}}function cL(e){return"number"==typeof e&&Number.isSafeInteger(e)&&e>=0}function cU(e){return"public"===e||"private"===e}function cH(e,t){if(void 0!==e.ttlMs&&!cL(e.ttlMs))throw RangeError(`Invalid cache hint for ${t}: ttlMs must be a non-negative safe integer (got ${String(e.ttlMs)})`);if(void 0!==e.cacheScope&&!cU(e.cacheScope))throw RangeError(`Invalid cache hint for ${t}: cacheScope must be 'public' or 'private' (got ${String(e.cacheScope)})`)}let cG=((Z={})[Z.ParseError=-32700]="ParseError",Z[Z.InvalidRequest=-32600]="InvalidRequest",Z[Z.MethodNotFound=-32601]="MethodNotFound",Z[Z.InvalidParams=-32602]="InvalidParams",Z[Z.InternalError=-32603]="InternalError",Z[Z.ResourceNotFound=-32002]="ResourceNotFound",Z[Z.MissingRequiredClientCapability=-32021]="MissingRequiredClientCapability",Z[Z.UnsupportedProtocolVersion=-32022]="UnsupportedProtocolVersion",Z[Z.UrlElicitationRequired=-32042]="UrlElicitationRequired",Z);var cB=class e extends Error{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.ProtocolError"})}static[Symbol.hasInstance](e){return cl(this,e)}static isInstance(e){if("function"!=typeof this)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return cl(this,e)}constructor(e,t,r){super(t),this.code=e,this.data=r,this.name="ProtocolError",cc(this,new.target)}static fromError(t,r,i){return t===cG.UrlElicitationRequired&&i&&i.elicitations?new cJ(i.elicitations,r):t===cG.UnsupportedProtocolVersion&&i&&Array.isArray(i.supported)&&"string"==typeof i.requested?new cZ({supported:i.supported,requested:i.requested},r):(t===cG.InvalidParams||t===cG.ResourceNotFound)&&"string"==typeof i?.uri&&(t===cG.ResourceNotFound||1===Object.keys(i).length)?new cK(i.uri,r):t===cG.MissingRequiredClientCapability&&i&&null!==i.requiredCapabilities&&"object"==typeof i.requiredCapabilities&&!Array.isArray(i.requiredCapabilities)?new cQ({requiredCapabilities:i.requiredCapabilities},r):new e(t,r,i)}},cK=class extends cB{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.ResourceNotFoundError"})}constructor(e,t=`Resource not found: ${e}`){super(cG.InvalidParams,t,{uri:e})}get uri(){return this.data.uri}},cJ=class extends cB{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.UrlElicitationRequiredError"})}constructor(e,t=`URL elicitation${e.length>1?"s":""} required`){super(cG.UrlElicitationRequired,t,{elicitations:e})}get elicitations(){return this.data?.elicitations??[]}},cZ=class extends cB{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.UnsupportedProtocolVersionError"})}constructor(e,t=`Unsupported protocol version: ${e.requested}`){super(cG.UnsupportedProtocolVersion,t,e)}get supported(){return this.data.supported}get requested(){return this.data.requested}},cQ=class extends cB{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.MissingRequiredClientCapabilityError"})}constructor(e,t=`Missing required client capabilities: ${Object.keys(e.requiredCapabilities).join(", ")}`){super(cG.MissingRequiredClientCapability,t,e)}get requiredCapabilities(){return this.data.requiredCapabilities}};let cX=["tools/call","prompts/get","resources/read"],cY=["elicitation/create","sampling/createMessage","roots/list"];function c1(){if(n)return n;let e=cN();return n={request:{"elicitation/create":nz({method:nY("elicitation/create"),params:e.ElicitRequestParamsSchema}),"sampling/createMessage":nz({method:nY("sampling/createMessage"),params:e.CreateMessageRequestParamsSchema}),"roots/list":nz({method:nY("roots/list"),params:nD({}).optional()})},response:{"elicitation/create":e.ElicitResultSchema,"sampling/createMessage":e.CreateMessageResultSchema,"roots/list":e.ListRootsResultSchema}}}function c0(e){return cY.includes(e)}function c2(e){return c0(e)?c1().request[e]:void 0}let c4={"tools/call":null,"tools/list":null,"prompts/get":null,"prompts/list":null,"resources/list":null,"resources/templates/list":null,"resources/read":null,"completion/complete":null,"server/discover":null,"subscriptions/listen":null},c6={"notifications/cancelled":null,"notifications/progress":null,"notifications/message":null,"notifications/resources/updated":null,"notifications/resources/list_changed":null,"notifications/tools/list_changed":null,"notifications/prompts/list_changed":null,"notifications/subscriptions/acknowledged":null};function c3(e){return Object.prototype.hasOwnProperty.call(c4,e)}function c9(e){return Object.prototype.hasOwnProperty.call(c6,e)}function c5(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)}function c8(e,t){if(void 0===e)return{ok:!1,reason:"not-in-era"};let r=e.safeParse(t);return r.success?{ok:!0,value:r.data}:{ok:!1,reason:"invalid",message:String(r.error)}}Object.keys(c4),Object.keys(c6);let c7={ok:!1,reason:"not-in-era"},le=[au,ah],lt={era:"2026-07-28",hasRequestMethod:c3,hasNotificationMethod:c9,hasInputRequestMethod:e=>void 0!==c2(e),validateRequest:(e,t)=>c8(c3(e)?cN().dispatchRequestSchemas[e]:void 0,t),validateResult:(e,t)=>c8(Object.prototype.hasOwnProperty.call(c4,e)?cN().dispatchResultSchemas[e]:void 0,t),validateNotification:(e,t)=>c8(c9(e)?cN().notificationSchemas2026[e]:void 0,t),validateInputRequest:(e,t)=>c8(c2(e),t),validateInputResponse:(e,t)=>c8(c0(e)?c1().response[e]:void 0,t),samplingResultVariant:()=>c7,outboundEnvelope:e=>({[au]:e.protocolVersion,[am]:e.clientInfo,[ah]:e.clientCapabilities,...void 0!==e.logLevel&&{[ay]:e.logLevel}}),validateEnvelopeMeta(e){let t=[];for(let r of le)r in e||t.push({key:r,problem:"missing"});let r=cN().RequestMetaEnvelopeSchema.safeParse(e);if(!r.success)for(let e of r.error.issues){let r=e.path.map(String),i=r.length>0?r.join("."):"_meta";1===r.length&&t.some(e=>e.key===i&&"missing"===e.problem)||t.push({key:i,problem:e.message})}return t},projectCallToolResult:e=>cb(e),inputRequestSchema:c2,decodeResult(e,t){if(!c5(t))return{kind:"invalid",error:new cf(cm.InvalidResult,`Invalid result for ${e}: not an object`,{method:e})};let r=t.resultType;if(void 0===r)return{kind:"invalid",error:new cf(cm.InvalidResult,`Invalid result for ${e}: missing required resultType — servers implementing protocol revision 2026-07-28 MUST include it (the absent-means-complete bridge applies only to earlier-revision servers)`,{method:e,violation:"missing-resultType"})};if("string"!=typeof r)return{kind:"invalid",error:new cf(cm.InvalidResult,`Invalid result for ${e}: non-string resultType`,{method:e,resultType:r})};if("input_required"===r){let r=t.inputRequests,i=c5(r)?r:{},o=t.requestState,n=void 0===t._meta?void 0:cN().ResultMetaSchema.safeParse(t._meta),a=n?.success?n.data:void 0;return 0===Object.keys(i).length&&"string"!=typeof o?{kind:"invalid",error:new cf(cm.InvalidResult,`Invalid result for ${e}: input_required carries neither inputRequests nor requestState (every input_required result must include at least one of the two)`,{method:e,violation:"input-required-missing-both"})}:{kind:"input_required",inputRequests:i,..."string"==typeof o&&{requestState:o},...void 0!==a&&{_meta:a}}}if("complete"!==r)return{kind:"invalid",error:new cf(cm.UnsupportedResultType,`Unsupported result type '${r}' for ${e}`,{resultType:r,method:e})};let i=function(){if(a)return a;let e=cN();return a={"tools/call":e.CallToolResultSchema,"tools/list":e.ListToolsResultSchema,"prompts/get":e.GetPromptResultSchema,"prompts/list":e.ListPromptsResultSchema,"resources/list":e.ListResourcesResultSchema,"resources/templates/list":e.ListResourceTemplatesResultSchema,"resources/read":e.ReadResourceResultSchema,"completion/complete":e.CompleteResultSchema,"server/discover":e.DiscoverResultSchema}}(),o=Object.hasOwn(i,e)?i[e]:void 0;if(void 0!==o){let r=o.safeParse(t);if(!r.success)return{kind:"invalid",error:new cf(cm.InvalidResult,`Invalid result for ${e}: ${r.error}`,{method:e})}}let n={...t};return delete n.resultType,{kind:"complete",result:n}},encodeResult:(e,t,r)=>(function(e,t){if(void 0===t)return e;let r=e._meta;return void 0===r?{...e,_meta:{[af]:t}}:null===r||"object"!=typeof r||Array.isArray(r)||void 0!==r[af]?e:{...e,_meta:{...r,[af]:t}}})(function(e,t){var r,i;let o=t[cD];if("complete"!==t.resultType||!cz.includes(e)){let e;return void 0===o?t:(e={...t},delete e[cD],e)}let n=cL(t.ttlMs)?t.ttlMs:void 0!==(r=o)&&cL(r.ttlMs)?r.ttlMs:0,a=cU(t.cacheScope)?t.cacheScope:void 0!==(i=o)&&cU(i.cacheScope)?i.cacheScope:"private",s={...t,ttlMs:n,cacheScope:a};return delete s[cD],s}(e,function(e,t){let r=t.resultType;if(void 0===r)return{...t,resultType:"complete"};if("complete"===r||cX.includes(e))return t;throw new cB(cG.InternalError,`Handler for ${e} returned resultType '${String(r)}', but results of ${e} only support 'complete' on protocol revision 2026-07-28`)}(e,function(e,t){let r=t,i=!1,o=()=>(i||(r={...r},i=!0),r),n=t.tools;"tools/list"===e&&Array.isArray(n)&&n.some(e=>c5(e)&&"execution"in e)&&(o().tools=n.map(e=>{if(!c5(e)||!("execution"in e))return e;let t={...e};return delete t.execution,t}));let a=t.capabilities;if(c5(a)&&"tasks"in a){let e={...a};delete e.tasks,o().capabilities=e}return r}(e,t))),r),encodeErrorCode:e=>-32002===e?-32602:e,checkInboundEnvelope(e){if(void 0===e.envelope)return"Request is missing the required _meta envelope for protocol revision 2026-07-28 (io.modelcontextprotocol/protocolVersion, io.modelcontextprotocol/clientCapabilities)";let t=cN().RequestMetaEnvelopeSchema.safeParse(e.envelope);if(!t.success)return`Invalid _meta envelope for protocol revision 2026-07-28: ${t.error.issues.map(e=>e.message).join("; ")}`}},lr="2026-07-28";function li(e){return void 0!==e&&e>=cg?lt:cM}function lo(e){return void 0!==e.revision?li(e.revision).era:"modern"===e.era?lt.era:cM.era}function ln(e){return ld.some(t=>t.hasRequestMethod(e))}function la(e){return ld.some(t=>t.hasNotificationMethod(e))}function ls(e){return"tasks/get"===e||"tasks/cancel"===e}let ld=[cM,lt];var lc=(e=>{let t={};for(var r in e)eh(t,r,{get:e[r],enumerable:!0});return t})({AnnotationsSchema:()=>sa,AudioContentSchema:()=>sA,BaseMetadataSchema:()=>aU,BaseRequestParamsSchema:()=>aV,BlobResourceContentsSchema:()=>so,BooleanSchemaSchema:()=>dd,CallToolRequestParamsSchema:()=>sQ,CallToolRequestSchema:()=>sX,CallToolResultSchema:()=>sJ,CancelTaskRequestSchema:()=>dK,CancelTaskResultSchema:()=>dJ,CancelledNotificationParamsSchema:()=>az,CancelledNotificationSchema:()=>aD,ClientCapabilitiesSchema:()=>aZ,ClientNotificationSchema:()=>dQ,ClientRequestSchema:()=>dZ,ClientResultSchema:()=>dX,ClientTasksCapabilitySchema:()=>aK,CompatibilityCallToolResultSchema:()=>sZ,CompleteRequestParamsSchema:()=>dI,CompleteRequestSchema:()=>dx,CompleteResultSchema:()=>dj,ContentBlockSchema:()=>sz,CreateMessageRequestParamsSchema:()=>di,CreateMessageRequestSchema:()=>dn,CreateMessageResultSchema:()=>da,CreateMessageResultWithToolsSchema:()=>ds,CreateTaskResultSchema:()=>dN,CursorSchema:()=>a$,DiscoverRequestSchema:()=>a2,DiscoverResultSchema:()=>a4,ElicitRequestFormParamsSchema:()=>db,ElicitRequestParamsSchema:()=>dS,ElicitRequestSchema:()=>dk,ElicitRequestURLParamsSchema:()=>d$,ElicitResultSchema:()=>dP,ElicitationCompleteNotificationParamsSchema:()=>dw,ElicitationCompleteNotificationSchema:()=>dV,EmbeddedResourceSchema:()=>sM,EmptyResultSchema:()=>aN,EnumSchemaSchema:()=>d_,GetPromptRequestParamsSchema:()=>sC,GetPromptRequestSchema:()=>sT,GetPromptResultSchema:()=>sF,GetTaskPayloadRequestSchema:()=>dU,GetTaskPayloadResultSchema:()=>dH,GetTaskRequestSchema:()=>dF,GetTaskResultSchema:()=>dL,IconSchema:()=>aF,IconsSchema:()=>aL,ImageContentSchema:()=>sE,ImplementationSchema:()=>aH,InitializeRequestParamsSchema:()=>aQ,InitializeRequestSchema:()=>aX,InitializeResultSchema:()=>a1,InitializedNotificationSchema:()=>a0,JSONArraySchema:()=>av,JSONObjectSchema:()=>a_,JSONRPCErrorResponseSchema:()=>aA,JSONRPCMessageSchema:()=>aW,JSONRPCNotificationSchema:()=>aO,JSONRPCRequestSchema:()=>aT,JSONRPCResponseSchema:()=>aM,JSONRPCResultResponseSchema:()=>aE,JSONValueSchema:()=>ag,LegacyTitledEnumSchemaSchema:()=>dm,ListChangedOptionsBaseSchema:()=>s1,ListPromptsRequestSchema:()=>sx,ListPromptsResultSchema:()=>sj,ListResourceTemplatesRequestSchema:()=>sp,ListResourceTemplatesResultSchema:()=>su,ListResourcesRequestSchema:()=>sc,ListResourcesResultSchema:()=>sl,ListRootsRequestSchema:()=>dT,ListRootsResultSchema:()=>dO,ListTasksRequestSchema:()=>dG,ListTasksResultSchema:()=>dB,ListToolsRequestSchema:()=>sB,ListToolsResultSchema:()=>sK,LoggingLevelSchema:()=>s0,LoggingMessageNotificationParamsSchema:()=>s6,LoggingMessageNotificationSchema:()=>s3,ModelHintSchema:()=>s9,ModelPreferencesSchema:()=>s5,MultiSelectEnumSchemaSchema:()=>dg,NotificationSchema:()=>aI,NotificationsParamsSchema:()=>aq,NumberSchemaSchema:()=>dl,PaginatedRequestParamsSchema:()=>a8,PaginatedRequestSchema:()=>a7,PaginatedResultSchema:()=>se,PingRequestSchema:()=>a6,PrimitiveSchemaDefinitionSchema:()=>dv,ProgressNotificationParamsSchema:()=>a9,ProgressNotificationSchema:()=>a5,ProgressSchema:()=>a3,ProgressTokenSchema:()=>ab,PromptArgumentSchema:()=>sq,PromptListChangedNotificationSchema:()=>sL,PromptMessageSchema:()=>sD,PromptReferenceSchema:()=>dq,PromptSchema:()=>sI,ReadResourceRequestParamsSchema:()=>sm,ReadResourceRequestSchema:()=>sf,ReadResourceResultSchema:()=>sh,RelatedTaskMetadataSchema:()=>ak,RequestIdSchema:()=>aC,RequestMetaSchema:()=>aw,RequestSchema:()=>aR,ResourceContentsSchema:()=>st,ResourceLinkSchema:()=>sN,ResourceListChangedNotificationSchema:()=>sy,ResourceRequestParamsSchema:()=>sm,ResourceSchema:()=>ss,ResourceTemplateReferenceSchema:()=>dR,ResourceTemplateSchema:()=>sd,ResourceUpdatedNotificationParamsSchema:()=>sP,ResourceUpdatedNotificationSchema:()=>sR,ResultMetaObjectSchema:()=>ax,ResultSchema:()=>aj,RoleSchema:()=>sn,RootSchema:()=>dC,RootsListChangedNotificationSchema:()=>dE,SamplingContentSchema:()=>de,SamplingMessageContentBlockSchema:()=>dt,SamplingMessageSchema:()=>dr,ServerCapabilitiesSchema:()=>aY,ServerNotificationSchema:()=>d1,ServerRequestSchema:()=>dY,ServerResultSchema:()=>d0,ServerTasksCapabilitySchema:()=>aJ,SetLevelRequestParamsSchema:()=>s2,SetLevelRequestSchema:()=>s4,SingleSelectEnumSchemaSchema:()=>df,StringSchemaSchema:()=>dc,SubscribeRequestParamsSchema:()=>sm,SubscribeRequestSchema:()=>sg,SubscriptionFilterSchema:()=>sv,SubscriptionsAcknowledgedNotificationParamsSchema:()=>sS,SubscriptionsAcknowledgedNotificationSchema:()=>sk,SubscriptionsListenRequestParamsSchema:()=>sb,SubscriptionsListenRequestSchema:()=>s$,SubscriptionsListenResultMetaSchema:()=>sw,SubscriptionsListenResultSchema:()=>sV,TaskAugmentedRequestParamsSchema:()=>aP,TaskCreationParamsSchema:()=>dA,TaskMetadataSchema:()=>aS,TaskSchema:()=>dM,TaskStatusNotificationParamsSchema:()=>dz,TaskStatusNotificationSchema:()=>dD,TaskStatusSchema:()=>dW,TextContentSchema:()=>sO,TextResourceContentsSchema:()=>sr,TitledMultiSelectEnumSchemaSchema:()=>dy,TitledSingleSelectEnumSchemaSchema:()=>du,ToolAnnotationsSchema:()=>sU,ToolChoiceSchema:()=>s8,ToolExecutionSchema:()=>sH,ToolListChangedNotificationSchema:()=>sY,ToolResultContentSchema:()=>s7,ToolSchema:()=>sG,ToolUseContentSchema:()=>sW,UnsubscribeRequestParamsSchema:()=>sm,UnsubscribeRequestSchema:()=>s_,UntitledMultiSelectEnumSchemaSchema:()=>dh,UntitledSingleSelectEnumSchemaSchema:()=>dp});let ll=e=>aT.safeParse(e).success,lp=e=>"object"==typeof e&&null!==e&&!Array.isArray(e)&&"input_required"===e.resultType,lu="x-mcp-header",lm=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/,lf=new Set(["string","integer","boolean"]),lh=["items","prefixItems","contains","additionalProperties","unevaluatedProperties","unevaluatedItems","propertyNames","patternProperties","dependentSchemas","oneOf","anyOf","allOf","not","if","then","else","$defs","definitions"],ly=new Set(["patternProperties","dependentSchemas","$defs","definitions"]);function lg(e){return 0===e.length?"":e.join(".")}cG.InvalidRequest,cG.UnsupportedProtocolVersion,cG.InvalidParams,cG.MethodNotFound,cG.InvalidParams,cG.MissingRequiredClientCapability;let l_={[cG.ParseError]:400,[cG.InvalidRequest]:400,[cG.MethodNotFound]:404,[cG.UnsupportedProtocolVersion]:400,[cG.MissingRequiredClientCapability]:400,[-32020]:400};function lv(e){return new Set(e.flatMap(e=>Object.keys(e.shape)))}function lb(e){if(null==e)return!1;let t=typeof e;return("object"===t||"function"===t)&&"~standard"in e&&"function"==typeof e["~standard"]?.validate}let l$=!1,lS="draft-2020-12";function lk(e,t="input"){let r,i=e["~standard"];if(i.jsonSchema)r=i.jsonSchema[t]({target:lS});else if("zod"===i.vendor){if(!("_zod"in e))throw Error("Schema appears to be from zod 3, which the SDK cannot convert to JSON Schema. Upgrade to zod >=4.2.0, or wrap your JSON Schema with fromJsonSchema().");l$||(l$=!0,console.warn("[mcp-sdk] Your zod version does not implement `~standard.jsonSchema` (added in zod 4.2.0). Falling back to z.toJSONSchema(). Upgrade to zod >=4.2.0 to silence this warning.")),r=ox(e,{target:lS,io:t})}else throw Error(`Schema library "${i.vendor}" does not implement StandardJSONSchemaV1 (\`~standard.jsonSchema\`). Upgrade to a version that does, or wrap your JSON Schema with fromJsonSchema().`);if("output"===t)return void 0!==r.type||!function e(t,r=t){if("properties"in t||"patternProperties"in t||"additionalProperties"in t||"required"in t)return!0;let i="string"==typeof t.$ref&&lw.exec(t.$ref);if(i&&r[i[1]]?.[i[2]]?.type==="object")return!0;for(let i of["oneOf","anyOf","allOf"]){let o=t[i];if(Array.isArray(o)&&o.length>0)return o.every(t=>null!==t&&"object"==typeof t&&("object"===t.type||e(t,"$id"in t?{}:r)))}return!1}(r)?r:{type:"object",...r};if(void 0!==r.type&&"object"!==r.type)throw Error(`MCP tool and prompt schemas must describe objects (got type: ${JSON.stringify(r.type)}). Wrap your schema in z.object({...}) or equivalent.`);return{type:"object",...r}}let lw=/^#\/(\$defs|definitions)\/([^/~%]+)$/;async function lV(e,t){let r=await e["~standard"].validate(t);return r.issues&&r.issues.length>0?{success:!1,error:r.issues.map(e=>e.path?.length?`${e.path.map(e=>String("object"==typeof e?e.key:e)).join(".")}: ${e.message}`:e.message).join(", ")}:{success:!0,data:r.value}}let lP=/\\\.\\d\{(\d+)\}/;function lR(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}let lq=new Set(["$comment","deprecated","description","examples","readOnly","title","writeOnly"]);function lI(e){return lq.has(e)||e.startsWith("x-")}let lx=new Set(["$schema",...Object.keys(db.shape.requestedSchema.shape)]),lj={string:lv([dc,dp,du,dm]),number:lv([dl]),integer:lv([dl]),boolean:lv([dd]),array:lv([dh,dy])},lC=new Set(dc.shape.format.unwrap().options);Object.assign(function(e){let t=void 0!==e.inputRequests&&Object.keys(e.inputRequests).length>0,r="string"==typeof e.requestState;if(!t&&!r)throw TypeError("inputRequired() requires at least one of inputRequests (with at least one entry) or requestState (spec: every InputRequiredResult MUST include at least one of the two)");return{resultType:"input_required",...void 0!==e.inputRequests&&{inputRequests:e.inputRequests},...void 0!==e.requestState&&{requestState:e.requestState}}},{elicit(e){try{return{method:"elicitation/create",params:function(e){var t;if(!lb(e.requestedSchema))return{...e,mode:"form",requestedSchema:e.requestedSchema};let r=e.requestedSchema["~standard"].vendor,i=function(e,t){let r={},i=[];for(let[o,n]of Object.entries(e))"properties"===o&&lR(n)?r[o]=Object.fromEntries(Object.entries(n).map(([e,r])=>[e,function(e,t,r,i){if(!lR(e))return e;let o="string"==typeof e.type&&Object.hasOwn(lj,e.type)?lj[e.type]:void 0;if(void 0===o)return e;let n={};for(let[s,d]of Object.entries(e))if(o.has(s)||lI(s))n[s]=d;else if("pattern"===s&&"string"===e.type&&"string"==typeof e.format)if(lC.has(e.format)){var a;"string"==typeof d&&(a=e.format,"zod"!==r||(function(e,t){let r;switch(e){case"email":r=[iw(nn,void 0)];break;case"uri":r=[iV(nd,void 0)];break;case"date":r=[iR(nr,void 0)];break;case"date-time":let i,o;i=lP.exec(t),o=[void 0,-1,0],i&&o.push(Number(i[1])),r=[!1,!0].flatMap(e=>[!1,!0].flatMap(t=>o.map(r=>ac({local:e,offset:t,precision:r}))))}return new Set(r.map(e=>{let t;return t=ox(e,{target:lS,io:"input"}),"string"==typeof t.pattern?t.pattern:void 0}).filter(e=>void 0!==e))})(a,d).has(d))||i.push(`${t}.${s}`)}else n[s]=d;else i.push(`${t}.${s}`);return n}(r,`properties.${e}`,t,i)])):lx.has(o)?r[o]=n:lI(o)||i.push(o);if(i.length>0)throw new cB(cG.InvalidParams,`Elicitation requestedSchema contains unsupported JSON Schema constraint(s) after Standard Schema conversion: ${i.join(", ")}`);return r}(function(e){try{return lk(e,"input")}catch(t){let e=t instanceof Error?t.message:String(t);throw new cB(cG.InvalidParams,`Elicitation requestedSchema must describe an object with flat primitive properties: ${e}`)}}(e.requestedSchema),r),o=(t=db.shape.requestedSchema,oJ(t,i));if(!o.success)throw new cB(cG.InvalidParams,`Elicitation requestedSchema only supports flat primitive properties (string, number, integer, boolean, and string enums): ${function(e,t){if(!lR(e.properties))return t;let r=Object.entries(e.properties).filter(([,e])=>!oJ(dv,e).success).map(([e])=>`properties.${e}`);return r.length>0?r.join(", "):t}(i,o.error.message)}`);let n=function e(t,r,i=""){return Array.isArray(t)&&Array.isArray(r)?t.flatMap((t,o)=>e(t,r[o],`${i}[${o}]`)):lR(t)&&lR(r)?Object.entries(t).flatMap(([t,o])=>{let n=i?`${i}.${t}`:t;return Object.prototype.hasOwnProperty.call(r,t)?e(o,r[t],n):lI(t)?[]:[n]}):[]}(i,o.data);if(n.length>0)throw new cB(cG.InvalidParams,`Elicitation requestedSchema contains unsupported JSON Schema constraint(s) after Standard Schema conversion: ${n.join(", ")}`);let a=(o.data.required??[]).filter(e=>!Object.prototype.hasOwnProperty.call(o.data.properties,e));if(a.length>0)throw new cB(cG.InvalidParams,`Elicitation requestedSchema lists required properties that are not defined in properties: ${a.join(", ")}`);return{...e,mode:"form",requestedSchema:o.data}}(e)}}catch(e){throw e instanceof cB?TypeError(e.message,{cause:e}):e}},elicitUrl:e=>({method:"elicitation/create",params:{...e,mode:"url"}}),createMessage:e=>({method:"sampling/createMessage",params:e}),listRoots:()=>({method:"roots/list"})});let lT={},lO={};function lE(e,t){let r=e.slice(0,-6);lT[r]=t,lO[r]=e=>t.safeParse(e).success}for(let e of["AnnotationsSchema","AudioContentSchema","BaseMetadataSchema","BlobResourceContentsSchema","BooleanSchemaSchema","CallToolRequestSchema","CallToolRequestParamsSchema","CallToolResultSchema","CancelledNotificationSchema","CancelledNotificationParamsSchema","CancelTaskRequestSchema","CancelTaskResultSchema","ClientCapabilitiesSchema","ClientNotificationSchema","ClientRequestSchema","ClientResultSchema","CompatibilityCallToolResultSchema","CompleteRequestSchema","CompleteRequestParamsSchema","CompleteResultSchema","ContentBlockSchema","CreateMessageRequestSchema","CreateMessageRequestParamsSchema","CreateMessageResultSchema","CreateMessageResultWithToolsSchema","CreateTaskResultSchema","CursorSchema","DiscoverRequestSchema","DiscoverResultSchema","ElicitationCompleteNotificationSchema","ElicitationCompleteNotificationParamsSchema","ElicitRequestSchema","ElicitRequestFormParamsSchema","ElicitRequestParamsSchema","ElicitRequestURLParamsSchema","ElicitResultSchema","EmbeddedResourceSchema","EmptyResultSchema","EnumSchemaSchema","GetPromptRequestSchema","GetPromptRequestParamsSchema","GetPromptResultSchema","GetTaskPayloadRequestSchema","GetTaskPayloadResultSchema","GetTaskRequestSchema","GetTaskResultSchema","IconSchema","IconsSchema","ImageContentSchema","ImplementationSchema","InitializedNotificationSchema","InitializeRequestSchema","InitializeRequestParamsSchema","InitializeResultSchema","JSONArraySchema","JSONObjectSchema","JSONRPCErrorResponseSchema","JSONRPCMessageSchema","JSONRPCNotificationSchema","JSONRPCRequestSchema","JSONRPCResponseSchema","JSONRPCResultResponseSchema","JSONValueSchema","LegacyTitledEnumSchemaSchema","ListPromptsRequestSchema","ListPromptsResultSchema","ListResourcesRequestSchema","ListResourcesResultSchema","ListResourceTemplatesRequestSchema","ListResourceTemplatesResultSchema","ListRootsRequestSchema","ListRootsResultSchema","ListTasksRequestSchema","ListTasksResultSchema","ListToolsRequestSchema","ListToolsResultSchema","LoggingLevelSchema","LoggingMessageNotificationSchema","LoggingMessageNotificationParamsSchema","ModelHintSchema","ModelPreferencesSchema","MultiSelectEnumSchemaSchema","NotificationSchema","NumberSchemaSchema","PaginatedRequestSchema","PaginatedRequestParamsSchema","PaginatedResultSchema","PingRequestSchema","PrimitiveSchemaDefinitionSchema","ProgressSchema","ProgressNotificationSchema","ProgressNotificationParamsSchema","ProgressTokenSchema","PromptSchema","PromptArgumentSchema","PromptListChangedNotificationSchema","PromptMessageSchema","PromptReferenceSchema","ReadResourceRequestSchema","ReadResourceRequestParamsSchema","ReadResourceResultSchema","RelatedTaskMetadataSchema","RequestSchema","RequestIdSchema","RequestMetaSchema","ResourceSchema","ResourceContentsSchema","ResourceLinkSchema","ResourceListChangedNotificationSchema","ResourceRequestParamsSchema","ResourceTemplateSchema","ResourceTemplateReferenceSchema","ResourceUpdatedNotificationSchema","ResourceUpdatedNotificationParamsSchema","ResultMetaObjectSchema","ResultSchema","RoleSchema","RootSchema","RootsListChangedNotificationSchema","SamplingContentSchema","SamplingMessageSchema","SamplingMessageContentBlockSchema","ServerCapabilitiesSchema","ServerNotificationSchema","ServerRequestSchema","ServerResultSchema","SetLevelRequestSchema","SetLevelRequestParamsSchema","SingleSelectEnumSchemaSchema","StringSchemaSchema","SubscribeRequestSchema","SubscribeRequestParamsSchema","SubscriptionFilterSchema","SubscriptionsAcknowledgedNotificationSchema","SubscriptionsAcknowledgedNotificationParamsSchema","SubscriptionsListenRequestSchema","SubscriptionsListenRequestParamsSchema","SubscriptionsListenResultSchema","SubscriptionsListenResultMetaSchema","TaskAugmentedRequestParamsSchema","TaskCreationParamsSchema","TaskMetadataSchema","TaskSchema","TaskStatusSchema","TaskStatusNotificationSchema","TaskStatusNotificationParamsSchema","TextContentSchema","TextResourceContentsSchema","TitledMultiSelectEnumSchemaSchema","TitledSingleSelectEnumSchemaSchema","ToolSchema","ToolAnnotationsSchema","ToolChoiceSchema","ToolExecutionSchema","ToolListChangedNotificationSchema","ToolResultContentSchema","ToolUseContentSchema","UnsubscribeRequestSchema","UnsubscribeRequestParamsSchema","UntitledMultiSelectEnumSchemaSchema","UntitledSingleSelectEnumSchemaSchema"])lE(e,lc[e]);for(let[e,t]of Object.entries({IdJagTokenExchangeResponseSchema:ce,OAuthClientInformationFullSchema:cn,OAuthClientInformationSchema:co,OAuthClientMetadataSchema:ci,OAuthClientRegistrationErrorSchema:ca,OAuthErrorResponseSchema:ct,OAuthMetadataSchema:d9,OAuthProtectedResourceMetadataSchema:d3,OAuthTokenRevocationRequestSchema:cs,OAuthTokensSchema:d7,OpenIdProviderDiscoveryMetadataSchema:d8,OpenIdProviderMetadataSchema:d5}))lE(e,t);Object.freeze(lT),Object.freeze(lO);let lA=[au,am,ah,ay],lW=["inputResponses","requestState"];function lM(e,t){let r=e.params;if(!lL(r))return{message:e,lifted:{}};let i=r._meta,o=lL(i)?lA.filter(e=>e in i):[],n="request"===t?lW.filter(e=>e in r):[];if(0===o.length&&0===n.length)return{message:e,lifted:{}};let a={},s={...r};if(o.length>0&&lL(i)){let e={},t={...i};for(let r of o)e[r]=i[r],delete t[r];a.envelope=e,Object.keys(t).length>0?s._meta=t:delete s._meta}for(let e of n)"inputResponses"===e&&(a.inputResponses=s[e]),"requestState"===e&&(a.requestState=s[e]),delete s[e];return{message:{...e,params:s},lifted:a}}function lN(e,t){let r=e.validateResult(t,void 0);if(r.ok||"not-in-era"!==r.reason)return{"~standard":{version:1,vendor:"mcp-wire-codec",validate(r){let i=e.validateResult(t,r);return i.ok?{value:i.value}:{issues:[{message:"invalid"===i.reason?i.message:`not-in-era: ${t}`}]}}}}}let lz=(Q=void 0,()=>Q);function lD(e,t){return{...e,mcpReq:{...e.mcpReq,requestState:()=>t}}}var lF=class{_transport;_requestMessageId=0;_requestHandlers=new Map;_customSchemaRequestMethods=new Set;_requestHandlerAbortControllers=new Map;_notificationHandlers=new Map;_responseHandlers=new Map;_progressHandlers=new Map;_timeoutInfo=new Map;_pendingDebouncedNotifications=new Set;_negotiatedProtocolVersion;_supportedProtocolVersions;onclose;onerror;fallbackRequestHandler;fallbackNotificationHandler;constructor(e){this._options=e,this._supportedProtocolVersions=e?.supportedProtocolVersions??ap,this.setNotificationHandler("notifications/cancelled",e=>{this._oncancel(e)}),this.setNotificationHandler("notifications/progress",e=>{this._onprogress(e)}),this.setRequestHandler("ping",e=>({}))}_shouldDropInbound(e){}_outboundMetaEnvelope(){}_envelopeOutbound(e){let t=this._outboundMetaEnvelope();if(void 0===t)return e;let r=e.params??{};return{...e,params:{...r,_meta:{...t,...r._meta}}}}_resolveNonCompleteResult(e,t){return Promise.reject(new cf(cm.UnsupportedResultType,`Unsupported result type '${e.kind}' for ${t.request.method}`,{resultType:e.kind,method:t.request.method}))}_getRequestHandler(e){return this._requestHandlers.get(e)}async _oncancel(e){void 0!==e.params.requestId&&this._requestHandlerAbortControllers.get(e.params.requestId)?.abort(e.params.reason)}_setupTimeout(e,t,r,i,o=!1){this._timeoutInfo.set(e,{timeoutId:setTimeout(i,t),startTime:Date.now(),timeout:t,maxTotalTimeout:r,resetTimeoutOnProgress:o,onTimeout:i})}_resetTimeout(e){let t=this._timeoutInfo.get(e);if(!t)return!1;let r=Date.now()-t.startTime;if(t.maxTotalTimeout&&r>=t.maxTotalTimeout)throw this._timeoutInfo.delete(e),new cf(cm.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:t.maxTotalTimeout,totalElapsed:r});return clearTimeout(t.timeoutId),t.timeoutId=setTimeout(t.onTimeout,t.timeout),!0}_cleanupTimeout(e){let t=this._timeoutInfo.get(e);t&&(clearTimeout(t.timeoutId),this._timeoutInfo.delete(e))}async connect(e){this._transport=e;let t=this.transport?.onclose;this._transport.onclose=()=>{try{t?.()}finally{this._onclose()}};let r=this.transport?.onerror;this._transport.onerror=e=>{r?.(e),this._onerror(e)};let i=this._transport?.onmessage;this._transport.onmessage=(e,t)=>{if(i?.(e,t),aE.safeParse(e).success||aA.safeParse(e).success)this._onresponse(e);else if(ll(e))this._onrequest(e,t);else aO.safeParse(e).success?this._onnotification(e,t):this._onerror(Error(`Unknown message type: ${JSON.stringify(e)}`))},e.setSupportedProtocolVersions?.(this._supportedProtocolVersions),await this._transport.start()}_onclose(){let e=this._responseHandlers;for(let e of(this._responseHandlers=new Map,this._progressHandlers.clear(),this._pendingDebouncedNotifications.clear(),this._timeoutInfo.values()))clearTimeout(e.timeoutId);this._timeoutInfo.clear();let t=this._requestHandlerAbortControllers;this._requestHandlerAbortControllers=new Map;let r=new cf(cm.ConnectionClosed,"Connection closed");this._transport=void 0;try{this.onclose?.()}finally{for(let t of e.values())t(r);for(let e of t.values())e.abort(r)}}_onerror(e){this.onerror?.(e)}_onnotification(e,t){let{message:r}=lM(e,"notification"),i=this._negotiatedWireCodec();if(t?.classification===void 0&&"drop"===this._shouldDropInbound(e))return;if(t?.classification!==void 0){let e=lo(t.classification);if(e!==i.era)return void this._onerror(Error(`Era mismatch on inbound notification '${r.method}': classified as ${e} but this instance serves ${i.era}`))}if(la(r.method)&&!i.hasNotificationMethod(r.method))return;let o=this._notificationHandlers.get(r.method),n=this.fallbackNotificationHandler;(void 0!==o||void 0!==n)&&Promise.resolve().then(()=>void 0===o?n(r):o(r,i)).catch(e=>this._onerror(Error(`Uncaught error in notification handler: ${e}`)))}_onrequest(e,t){var r;let{message:i,lifted:o}=lM(e,"request"),n=this._negotiatedWireCodec();if(t?.classification===void 0&&"drop"===this._shouldDropInbound(e))return void this._onerror(Error(`Dropped inbound request '${e.method}': not servable on this connection's protocol era`));let a=this._transport,s=(e,t,r)=>{let o={jsonrpc:"2.0",id:i.id,error:{code:e,message:t,...void 0!==r&&{data:r}}};a?.send(o).catch(e=>this._onerror(Error(`Failed to send an error response: ${e}`)))};if(t?.classification!==void 0){let e=lo(t.classification);if(e!==n.era){this._onerror(Error(`Era mismatch on inbound request '${i.method}': classified as ${e} but this instance serves ${n.era}`));let r=t.classification.revision??e;s(cG.UnsupportedProtocolVersion,`Unsupported protocol version: ${r}`,{supported:this._supportedProtocolVersions,requested:r});return}}if(ln(i.method)&&!n.hasRequestMethod(i.method)&&!(ls(i.method)&&this._customSchemaRequestMethods.has(i.method)))return void s(cG.MethodNotFound,"Method not found");let d=this._requestHandlers.get(i.method)??this.fallbackRequestHandler;if(void 0===d)return void s(cG.MethodNotFound,"Method not found");let c=n.checkInboundEnvelope(o);if(void 0!==c)return void s(cG.InvalidParams,c);let l=(e,t)=>this._notificationViaCodec(this._resolveOutboundCodec(e.method),e,{...t,relatedRequestId:i.id}),p=(e,t,r)=>this._requestWithSchemaViaCodec(this._resolveOutboundCodec(e.method),e,t,{...r,relatedRequestId:i.id}),u=new AbortController;this._requestHandlerAbortControllers.set(i.id,u);let m=void 0===o.inputResponses?void 0:function(e){let t={},r=[];if(!lU(e))return{accepted:t,droppedKeys:r};for(let[i,o]of Object.entries(e)){if(!lU(o)||"method"in o||"result"in o){r.push(i);continue}t[i]=o}return{accepted:t,droppedKeys:r}}(o.inputResponses),f={sessionId:a?.sessionId,mcpReq:{id:i.id,method:i.method,_meta:i.params?._meta,...void 0!==o.envelope&&{envelope:o.envelope},...void 0!==m&&{inputResponses:m.accepted},...void 0!==m&&m.droppedKeys.length>0&&{droppedInputResponseKeys:m.droppedKeys},requestState:void 0===o.requestState?lz:(r=o.requestState,()=>r),signal:u.signal,send:(e,t,r)=>{let i=this._resolveOutboundCodec(e.method);if(this._assertOutboundRequestInEra(i,e.method),lb(t))return p(e,t,r);let o=lN(i,e.method);if(void 0===o)throw TypeError(`'${e.method}' is not a spec method; pass a result schema as the second argument to ctx.mcpReq.send().`);return p(e,o,t)},notify:l},http:t?.authInfo?{authInfo:t.authInfo}:void 0},h=this.buildContext(f,t);Promise.resolve().then(()=>d(i,h)).then(async e=>{let t;if(u.signal.aborted)return;try{t=n.encodeResult(i.method,e,this._outboundServerInfo())}catch(e){this._onerror(Error(`Failed to encode result for ${i.method}: ${e}`)),s(cG.InternalError,"Internal error");return}let r={result:t,jsonrpc:"2.0",id:i.id};await a?.send(r)},async e=>{if(u.signal.aborted)return;let t=Number.isSafeInteger(e.code)?e.code:cG.InternalError,r={jsonrpc:"2.0",id:i.id,error:{code:n.encodeErrorCode(t),message:e.message??"Internal error",...void 0!==e.data&&{data:e.data}}};await a?.send(r)}).catch(e=>this._onerror(Error(`Failed to send response: ${e}`))).finally(()=>{this._requestHandlerAbortControllers.get(i.id)===u&&this._requestHandlerAbortControllers.delete(i.id)})}_onprogress(e){let{progressToken:t,...r}=e.params,i=Number(t),o=this._progressHandlers.get(i);if(!o)return void this._onerror(Error(`Received a progress notification for an unknown token: ${JSON.stringify(e)}`));let n=this._responseHandlers.get(i),a=this._timeoutInfo.get(i);if(a&&n&&a.resetTimeoutOnProgress)try{this._resetTimeout(i)}catch(e){this._responseHandlers.delete(i),this._progressHandlers.delete(i),this._cleanupTimeout(i),n(e);return}o(r)}_onresponse(e){let t=Number(e.id),r=this._responseHandlers.get(t);void 0===r?this._onerror(Error(`Received a response for an unknown message ID: ${JSON.stringify(e)}`)):(this._responseHandlers.delete(t),this._cleanupTimeout(t),this._progressHandlers.delete(t),r(aE.safeParse(e).success?e:cB.fromError(e.error.code,e.error.message,e.error.data)))}get transport(){return this._transport}async close(){await this._transport?.close()}request(e,t,r){let i=this._resolveOutboundCodec(e.method);if(lb(t))return ls(e.method)||this._assertOutboundRequestInEra(i,e.method),this._requestWithSchemaViaCodec(i,e,t,r);this._assertOutboundRequestInEra(i,e.method);let o=lN(i,e.method);if(void 0===o)throw TypeError(`'${e.method}' is not a spec method; pass a result schema as the second argument to request().`);return this._requestWithSchemaViaCodec(i,e,o,t)}_negotiatedWireCodec(){return li(this._negotiatedProtocolVersion)}_wireCodec(){return this._negotiatedWireCodec()}_resolveOutboundCodec(e){if(void 0===this._negotiatedProtocolVersion){let t=function(e){switch(e){case"initialize":case"notifications/initialized":return li(void 0);case"server/discover":return li(lr);default:return}}(e);if(t)return t}return this._negotiatedWireCodec()}_assertOutboundRequestInEra(e,t){if(ln(t)&&!e.hasRequestMethod(t))throw new cf(cm.MethodNotSupportedByProtocolVersion,`Method '${t}' is not supported by the negotiated protocol version (wire era ${e.era})`,{method:t,era:e.era})}_requestWithSchema(e,t,r){let i=this._resolveOutboundCodec(e.method);return this._assertOutboundRequestInEra(i,e.method),this._requestWithSchemaViaCodec(i,e,t,r)}_requestWithSchemaViaCodec(e,t,r,i){let o,n,{relatedRequestId:a,resumptionToken:s,onresumptiontoken:d,headers:c}=i??{},l=Date.now();return new Promise((p,u)=>{let m=e=>{u(e)};if(!this._transport)return void m(Error("Not connected"));if(this._options?.enforceStrictCapabilities===!0)try{this.assertCapabilityForMethod(t.method)}catch(e){m(e);return}if(i?.signal?.aborted){let e=i.signal.reason;throw e instanceof cf?e:new cf(cm.RequestTimeout,String(e))}let f=e.era===lr&&!0===this._transport.hasPerRequestStream?new AbortController:void 0,h=this._requestMessageId++;n=h;let y={...t,jsonrpc:"2.0",id:h};i?.onprogress&&(this._progressHandlers.set(h,i.onprogress),y.params={...t.params,_meta:{...t.params?._meta,progressToken:h}});let g=this._envelopeOutbound(y),_=!1,v=e=>{_||(this._progressHandlers.delete(h),void 0===f?"initialize"!==t.method&&this._transport?.send(this._envelopeOutbound({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:h,reason:String(e)}}),{relatedRequestId:a,resumptionToken:s,onresumptiontoken:d}).catch(e=>this._onerror(Error(`Failed to send cancellation: ${e}`))):f.abort(),u(e instanceof cf?e:new cf(cm.RequestTimeout,String(e))))};this._responseHandlers.set(h,o=>{let n;if(!i?.signal?.aborted){if(_=!0,o instanceof Error)return u(o);try{n=e.decodeResult(t.method,o.result)}catch(e){return u(e instanceof Error?e:Error(String(e)))}if("invalid"===n.kind)return u(n.error);if("input_required"===n.kind){var a;return i?.allowInputRequired===!0?p({resultType:"input_required",inputRequests:(a=n).inputRequests,...void 0!==a.requestState&&{requestState:a.requestState},...void 0!==a._meta&&{_meta:a._meta}}):p(this._resolveNonCompleteResult(n,{codec:e,request:t,resultSchema:r,options:i,flowStartedAt:l,retry:(i,o)=>this._requestWithSchemaViaCodec(e,void 0===i?{method:t.method}:{method:t.method,params:i},r,o)}))}lV(r,n.result).then(e=>{e.success?p(e.data):u(new cf(cm.InvalidResult,`Invalid result for ${t.method}: ${e.error}`))},u)}}),o=()=>v(i?.signal?.reason),i?.signal?.addEventListener("abort",o,{once:!0});let b=i?.timeout??6e4;this._setupTimeout(h,b,i?.maxTotalTimeout,()=>v(new cf(cm.RequestTimeout,"Request timed out",{timeout:b})),i?.resetTimeoutOnProgress??!1),this._transport.send(g,{relatedRequestId:a,resumptionToken:s,onresumptiontoken:d,headers:c,requestSignal:f?.signal}).catch(e=>{this._progressHandlers.delete(h),u(e)})}).finally(()=>{o&&i?.signal?.removeEventListener("abort",o),void 0!==n&&(this._responseHandlers.delete(n),this._cleanupTimeout(n))})}async notification(e,t){return await this._notificationViaCodec(this._resolveOutboundCodec(e.method),e,t)}async _notificationViaCodec(e,t,r){if(!this._transport)throw new cf(cm.NotConnected,"Not connected");if(la(t.method)&&!e.hasNotificationMethod(t.method))throw new cf(cm.MethodNotSupportedByProtocolVersion,`Notification '${t.method}' is not supported by the negotiated protocol version (wire era ${e.era})`,{method:t.method,era:e.era});this.assertNotificationCapability(t.method);let i=this._envelopeOutbound({jsonrpc:"2.0",...t});if((this._options?.debouncedNotificationMethods??[]).includes(t.method)&&!t.params&&r?.relatedRequestId===void 0){if(this._pendingDebouncedNotifications.has(t.method))return;this._pendingDebouncedNotifications.add(t.method),Promise.resolve().then(()=>{this._pendingDebouncedNotifications.delete(t.method),this._transport&&this._transport?.send(i,r).catch(e=>this._onerror(e))});return}await this._transport.send(i,r)}setRequestHandler(e,t,r){let i;if(this.assertRequestHandlerCapability(e),"function"==typeof t){if(!ln(e))throw TypeError(`'${e}' is not a spec request method; pass schemas as the second argument to setRequestHandler().`);i=(r,i)=>{let o=this._negotiatedWireCodec(),n=o.validateRequest(e,r);if(n.ok||"not-in-era"!==n.reason||(n=o.validateInputRequest(e,r)),!n.ok){if("not-in-era"===n.reason)throw new cB(cG.InternalError,`No wire schema for ${e} in the resolved era`);throw Error(n.message)}return Promise.resolve(t(n.value,i))}}else if(r)i=async(i,o)=>{let n=await lV(t.params,{...i.params});if(!n.success)throw new cB(cG.InvalidParams,`Invalid params for ${e}: ${n.error}`);return r(n.data,o)};else throw TypeError("setRequestHandler: handler is required");"function"==typeof t?this._customSchemaRequestMethods.delete(e):this._customSchemaRequestMethods.add(e),this._requestHandlers.set(e,this._wrapHandler(e,i))}_wrapHandler(e,t){return t}_outboundServerInfo(){}removeRequestHandler(e){this._requestHandlers.delete(e),this._customSchemaRequestMethods.delete(e)}assertCanSetRequestHandler(e){if(this._requestHandlers.has(e))throw Error(`A request handler for ${e} already exists, which would be overridden`)}setNotificationHandler(e,t,r){if("function"==typeof t){if(!la(e))throw TypeError(`'${e}' is not a spec notification method; pass schemas as the second argument to setNotificationHandler().`);this._notificationHandlers.set(e,(r,i)=>{let o=i.validateNotification(e,r);if(!o.ok){if("not-in-era"===o.reason)throw new cB(cG.InternalError,`No wire schema for ${e} in the resolved era`);throw Error(o.message)}return Promise.resolve(t(o.value))});return}if(!r)throw TypeError("setNotificationHandler: handler is required");this._notificationHandlers.set(e,async i=>{let o=await lV(t.params,{...i.params});if(!o.success)throw new cB(cG.InvalidParams,`Invalid params for notification ${e}: ${o.error}`);await r(o.data,i)})}removeNotificationHandler(e){this._notificationHandlers.delete(e)}};function lL(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)}function lU(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}var lH=e$((eb(e=>{var t=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,r=/\\([\u000b\u0020-\u00ff])/g,i=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;function o(e){this.parameters=Object.create(null),this.type=e}e.parse=function(e){if(!e)throw TypeError("argument string is required");var n,a,s,d="object"==typeof e?function(e){var t;if("function"==typeof e.getHeader?t=e.getHeader("content-type"):"object"==typeof e.headers&&(t=e.headers&&e.headers["content-type"]),"string"!=typeof t)throw TypeError("content-type header is missing from object");return t}(e):e;if("string"!=typeof d)throw TypeError("argument string is required to be a string");var c=d.indexOf(";"),l=-1!==c?d.slice(0,c).trim():d.trim();if(!i.test(l))throw TypeError("invalid media type");var p=new o(l.toLowerCase());if(-1!==c){for(t.lastIndex=c;a=t.exec(d);){if(a.index!==c)throw TypeError("invalid parameter format");c+=a[0].length,n=a[1].toLowerCase(),34===(s=a[2]).charCodeAt(0)&&-1!==(s=s.slice(1,-1)).indexOf("\\")&&(s=s.replace(r,"$1")),p.parameters[n]=s}if(c!==d.length)throw TypeError("invalid parameter format")}return p}}))(),1),lG=class{_buffer;_maxBufferSize;constructor(e){this._maxBufferSize=e?.maxBufferSize??0xa00000}append(e){if((this._buffer?.length??0)+e.length>this._maxBufferSize)throw this.clear(),Error(`ReadBuffer exceeded maximum size of ${this._maxBufferSize} bytes`);this._buffer=this._buffer?Buffer.concat([this._buffer,e]):e}readMessage(){for(;this._buffer;){let t=this._buffer.indexOf("\n");if(-1===t)break;let r=this._buffer.toString("utf8",0,t).replace(/\r$/,"");this._buffer=this._buffer.subarray(t+1);try{var e;return e=r,aW.parse(JSON.parse(e))}catch(e){if(e instanceof SyntaxError)continue;throw e}}return null}clear(){this._buffer=void 0}};let lB=/^[A-Za-z0-9._-]{1,128}$/;function lK(e){let t=function(e){let t=[];if(0===e.length)return{isValid:!1,warnings:["Tool name cannot be empty"]};if(e.length>128)return{isValid:!1,warnings:[`Tool name exceeds maximum length of 128 characters (current: ${e.length})`]};if(e.includes(" ")&&t.push("Tool name contains spaces, which may cause parsing issues"),e.includes(",")&&t.push("Tool name contains commas, which may cause parsing issues"),(e.startsWith("-")||e.endsWith("-"))&&t.push("Tool name starts or ends with a dash, which may cause parsing issues in some contexts"),(e.startsWith(".")||e.endsWith("."))&&t.push("Tool name starts or ends with a dot, which may cause parsing issues in some contexts"),!lB.test(e)){let r=[...e].filter(e=>!/[A-Za-z0-9._-]/.test(e)).filter((e,t,r)=>r.indexOf(e)===t);return t.push(`Tool name contains invalid characters: ${r.map(e=>`"${e}"`).join(", ")}`,"Allowed characters are: A-Z, a-z, 0-9, underscore (_), dash (-), and dot (.)"),{isValid:!1,warnings:t}}return{isValid:!0,warnings:t}}(e);var r=t.warnings;if(r.length>0){for(let t of(console.warn(`Tool name validation warning for "${e}":`),r))console.warn(` - ${t}`);console.warn("Tool registration will proceed, but this may cause compatibility issues."),console.warn("Consider updating the tool name to conform to the MCP tool naming standard."),console.warn("See SEP: Specify Format for Tool Names (https://github.com/modelcontextprotocol/modelcontextprotocol/issues/986) for more details.")}return t.isValid}var lJ=class e{static isTemplate(e){return/\{[^}\s]+\}/.test(e)}static validateLength(e,t,r){if(e.length>t)throw Error(`${r} exceeds maximum length of ${t} characters (got ${e.length})`)}template;parts;get variableNames(){return this.parts.flatMap(e=>"string"==typeof e?[]:e.names)}constructor(t){e.validateLength(t,1e6,"Template"),this.template=t,this.parts=this.parse(t)}toString(){return this.template}parse(t){let r=[],i="",o=0,n=0;for(;o1e4)throw Error("Template contains too many expressions (max 10000)");let s=t.slice(o+1,a),d=this.getOperator(s),c=s.includes("*"),l=this.getNames(s),p=l[0];for(let t of l)e.validateLength(t,1e6,"Variable name");r.push({name:p,operator:d,names:l,exploded:c}),o=a+1}else i+=t[o],o++;return i&&r.push(i),r}getOperator(e){return["+","#",".","/","?","&"].find(t=>e.startsWith(t))||""}getNames(e){let t=this.getOperator(e);return e.slice(t.length).split(",").map(e=>e.replace("*","").trim()).filter(e=>e.length>0)}encodeValue(t,r){return(e.validateLength(t,1e6,"Variable value"),"+"===r||"#"===r)?encodeURI(t):encodeURIComponent(t)}expandPart(e,t){if("?"===e.operator||"&"===e.operator){let r=e.names.map(r=>{let i=t[r];return void 0===i?"":`${r}=${Array.isArray(i)?i.map(t=>this.encodeValue(t,e.operator)).join(","):this.encodeValue(i.toString(),e.operator)}`}).filter(e=>e.length>0);return 0===r.length?"":("?"===e.operator?"?":"&")+r.join("&")}if(e.names.length>1){let r=e.names.map(e=>t[e]).filter(e=>void 0!==e);return 0===r.length?"":r.map(e=>Array.isArray(e)?e[0]:e).join(",")}let r=t[e.name];if(void 0===r)return"";let i=(Array.isArray(r)?r:[r]).map(t=>this.encodeValue(t,e.operator));switch(e.operator){case"":case"+":default:return i.join(",");case"#":return"#"+i.join(",");case".":return"."+i.join(".");case"/":return"/"+i.join("/")}}expand(e){let t="",r=!1;for(let i of this.parts){if("string"==typeof i){t+=i;continue}let o=this.expandPart(i,e);o&&(t+=("?"===i.operator||"&"===i.operator)&&r?o.replace("?","&"):o,("?"===i.operator||"&"===i.operator)&&(r=!0))}return t}escapeRegExp(e){return e.replaceAll(/[.*+?^${}()|[\]\\]/g,String.raw`\$&`)}partToRegExp(t){let r,i=[];for(let r of t.names)e.validateLength(r,1e6,"Variable name");if("?"===t.operator||"&"===t.operator){for(let e=0;e"object"==typeof e&&null!==e&&"_zod"in e)}(e))return nz(e);if("object"==typeof e&&null!==e&&!lb(e)&&Object.values(e).some(e=>"object"==typeof e&&null!==e&&!("_zod"in e)&&"_def"in e&&"string"==typeof e._def?.typeName))throw TypeError("Raw-shape inputSchema/outputSchema/argsSchema fields must be Zod v4 schemas. Got a Zod v3 field schema. Import from `zod/v4` (or upgrade your zod import), or wrap with `z.object({...})` yourself.");if(!lb(e))throw TypeError("inputSchema/outputSchema/argsSchema must be a Standard Schema (e.g. z.object({...})) or a raw Zod shape ({ field: z.string() }).");return e}}var lQ=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;var t=class{};e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var r=class extends t{constructor(t){if(super(),!e.IDENTIFIER.test(t))throw Error("CodeGen: name must be a valid identifier");this.str=t}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};e.Name=r;var i=class extends t{constructor(e){super(),this._items="string"==typeof e?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return""===e||'""'===e}get str(){var e;return null!=(e=this._str)?e:this._str=this._items.reduce((e,t)=>`${e}${t}`,"")}get names(){var e;return null!=(e=this._names)?e:this._names=this._items.reduce((e,t)=>(t instanceof r&&(e[t.str]=(e[t.str]||0)+1),e),{})}};function o(e,...t){let r=[e[0]],n=0;for(;n{Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;let t=lQ();var r,i,o=class extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}};(r=i||(e.UsedValueState=i={}))[r.Started=0]="Started",r[r.Completed=1]="Completed",e.varKinds={const:new t.Name("const"),let:new t.Name("let"),var:new t.Name("var")};var n=class{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof t.Name?e:this.name(e)}name(e){return new t.Name(this._newName(e))}_newName(e){let t=this._names[e]||this._nameGroup(e);return`${e}${t.index++}`}_nameGroup(e){var t,r;if((null==(r=null==(t=this._parent)?void 0:t._prefixes)?void 0:r.has(e))||this._prefixes&&!this._prefixes.has(e))throw Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}};e.Scope=n;var a=class extends t.Name{constructor(e,t){super(t),this.prefix=e}setValue(e,{property:r,itemIndex:i}){this.value=e,this.scopePath=(0,t._)`.${new t.Name(r)}[${i}]`}};e.ValueScopeName=a;let s=(0,t._)`\n`;var d=class extends n{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?s:t.nil}}get(){return this._scope}name(e){return new a(e,this._newName(e))}value(e,t){var r;if(void 0===t.ref)throw Error("CodeGen: ref must be passed in value");let i=this.toName(e),{prefix:o}=i,n=null!=(r=t.key)?r:t.ref,a=this._values[o];if(a){let e=a.get(n);if(e)return e}else a=this._values[o]=new Map;a.set(n,i);let s=this._scope[o]||(this._scope[o]=[]),d=s.length;return s[d]=t.ref,i.setValue(t,{property:o,itemIndex:d}),i}getValue(e,t){let r=this._values[e];if(r)return r.get(t)}scopeRefs(e,r=this._values){return this._reduceValues(r,r=>{if(void 0===r.scopePath)throw Error(`CodeGen: name "${r}" has no value`);return(0,t._)`${e}${r.scopePath}`})}scopeCode(e=this._values,t,r){return this._reduceValues(e,e=>{if(void 0===e.value)throw Error(`CodeGen: name "${e}" has no value`);return e.value.code},t,r)}_reduceValues(r,n,a={},s){let d=t.nil;for(let c in r){let l=r[c];if(!l)continue;let p=a[c]=a[c]||new Map;l.forEach(r=>{if(p.has(r))return;p.set(r,i.Started);let a=n(r);if(a){let i=this.opts.es5?e.varKinds.var:e.varKinds.const;d=(0,t._)`${d}${i} ${r} = ${a};${this.opts._n}`}else if(a=null==s?void 0:s(r))d=(0,t._)`${d}${a}${this.opts._n}`;else throw new o(r);p.set(r,i.Completed)})}return d}};e.ValueScope=d}),lY=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;let t=lQ(),r=lX();var i=lQ();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return i._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return i.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return i.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return i.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return i.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return i.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return i.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return i.Name}});var o=lX();Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return o.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return o.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return o.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return o.varKinds}}),e.operators={GT:new t._Code(">"),GTE:new t._Code(">="),LT:new t._Code("<"),LTE:new t._Code("<="),EQ:new t._Code("==="),NEQ:new t._Code("!=="),NOT:new t._Code("!"),OR:new t._Code("||"),AND:new t._Code("&&"),ADD:new t._Code("+")};var n=class{optimizeNodes(){return this}optimizeNames(e,t){return this}},a=class extends n{constructor(e,t,r){super(),this.varKind=e,this.name=t,this.rhs=r}render({es5:e,_n:t}){let i=e?r.varKinds.var:this.varKind,o=void 0===this.rhs?"":` = ${this.rhs}`;return`${i} ${this.name}${o};`+t}optimizeNames(e,t){if(e[this.name.str])return this.rhs&&(this.rhs=x(this.rhs,e,t)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}},s=class extends n{constructor(e,t,r){super(),this.lhs=e,this.rhs=t,this.sideEffects=r}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,r){if(!(this.lhs instanceof t.Name)||e[this.lhs.str]||this.sideEffects)return this.rhs=x(this.rhs,e,r),this}get names(){return I(this.lhs instanceof t.Name?{}:{...this.lhs.names},this.rhs)}},d=class extends s{constructor(e,t,r,i){super(e,r,i),this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}},c=class extends n{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}},l=class extends n{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}},p=class extends n{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}},u=class extends n{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=x(this.code,e,t),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}},m=class extends n{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce((t,r)=>t+r.render(e),"")}optimizeNodes(){let{nodes:e}=this,t=e.length;for(;t--;){let r=e[t].optimizeNodes();Array.isArray(r)?e.splice(t,1,...r):r?e[t]=r:e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){let{nodes:r}=this,i=r.length;for(;i--;){let o=r[i];o.optimizeNames(e,t)||(function(e,t){for(let r in t)e[r]=(e[r]||0)-(t[r]||0)}(e,o.names),r.splice(i,1))}return r.length>0?this:void 0}get names(){return this.nodes.reduce((e,t)=>q(e,t.names),{})}},f=class extends m{render(e){return"{"+e._n+super.render(e)+"}"+e._n}},h=class extends m{},y=class extends f{};y.kind="else";var g=class e extends f{constructor(e,t){super(t),this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);return this.else&&(t+="else "+this.else.render(e)),t}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(!0===t)return this.nodes;let r=this.else;if(r){let e=r.optimizeNodes();r=this.else=Array.isArray(e)?new y(e):e}return r?!1===t?r instanceof e?r:r.nodes:this.nodes.length?this:new e(j(t),r instanceof e?[r]:r.nodes):!1!==t&&this.nodes.length?this:void 0}optimizeNames(e,t){var r;if(this.else=null==(r=this.else)?void 0:r.optimizeNames(e,t),super.optimizeNames(e,t)||this.else)return this.condition=x(this.condition,e,t),this}get names(){let e=super.names;return I(e,this.condition),this.else&&q(e,this.else.names),e}};g.kind="if";var _=class extends f{};_.kind="for";var v=class extends _{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iteration=x(this.iteration,e,t),this}get names(){return q(super.names,this.iteration.names)}},b=class extends _{constructor(e,t,r,i){super(),this.varKind=e,this.name=t,this.from=r,this.to=i}render(e){let t=e.es5?r.varKinds.var:this.varKind,{name:i,from:o,to:n}=this;return`for(${t} ${i}=${o}; ${i}<${n}; ${i}++)`+super.render(e)}get names(){return I(I(super.names,this.from),this.to)}},$=class extends _{constructor(e,t,r,i){super(),this.loop=e,this.varKind=t,this.name=r,this.iterable=i}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iterable=x(this.iterable,e,t),this}get names(){return q(super.names,this.iterable.names)}},S=class extends f{constructor(e,t,r){super(),this.name=e,this.args=t,this.async=r}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}};S.kind="func";var k=class extends m{render(e){return"return "+super.render(e)}};k.kind="return";var w=class extends f{render(e){let t="try"+super.render(e);return this.catch&&(t+=this.catch.render(e)),this.finally&&(t+=this.finally.render(e)),t}optimizeNodes(){var e,t;return super.optimizeNodes(),null==(e=this.catch)||e.optimizeNodes(),null==(t=this.finally)||t.optimizeNodes(),this}optimizeNames(e,t){var r,i;return super.optimizeNames(e,t),null==(r=this.catch)||r.optimizeNames(e,t),null==(i=this.finally)||i.optimizeNames(e,t),this}get names(){let e=super.names;return this.catch&&q(e,this.catch.names),this.finally&&q(e,this.finally.names),e}},V=class extends f{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}};V.kind="catch";var P=class extends f{render(e){return"finally"+super.render(e)}};P.kind="finally";var R=class{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?"\n":""},this._extScope=e,this._scope=new r.Scope({parent:e}),this._nodes=[new h]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){let r=this._extScope.value(e,t);return(this._values[r.prefix]||(this._values[r.prefix]=new Set)).add(r),r}getScopeValue(e,t){return this._extScope.getValue(e,t)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,t,r,i){let o=this._scope.toName(t);return void 0!==r&&i&&(this._constants[o.str]=r),this._leafNode(new a(e,o,r)),o}const(e,t,i){return this._def(r.varKinds.const,e,t,i)}let(e,t,i){return this._def(r.varKinds.let,e,t,i)}var(e,t,i){return this._def(r.varKinds.var,e,t,i)}assign(e,t,r){return this._leafNode(new s(e,t,r))}add(t,r){return this._leafNode(new d(t,e.operators.ADD,r))}code(e){return"function"==typeof e?e():e!==t.nil&&this._leafNode(new u(e)),this}object(...e){let r=["{"];for(let[i,o]of e)r.length>1&&r.push(","),r.push(i),(i!==o||this.opts.es5)&&(r.push(":"),(0,t.addCodeArg)(r,o));return r.push("}"),new t._Code(r)}if(e,t,r){if(this._blockNode(new g(e)),t&&r)this.code(t).else().code(r).endIf();else if(t)this.code(t).endIf();else if(r)throw Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new g(e))}else(){return this._elseNode(new y)}endIf(){return this._endBlockNode(g,y)}_for(e,t){return this._blockNode(e),t&&this.code(t).endFor(),this}for(e,t){return this._for(new v(e),t)}forRange(e,t,i,o,n=this.opts.es5?r.varKinds.var:r.varKinds.let){let a=this._scope.toName(e);return this._for(new b(n,a,t,i),()=>o(a))}forOf(e,i,o,n=r.varKinds.const){let a=this._scope.toName(e);if(this.opts.es5){let e=i instanceof t.Name?i:this.var("_arr",i);return this.forRange("_i",0,(0,t._)`${e}.length`,r=>{this.var(a,(0,t._)`${e}[${r}]`),o(a)})}return this._for(new $("of",n,a,i),()=>o(a))}forIn(e,i,o,n=this.opts.es5?r.varKinds.var:r.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,t._)`Object.keys(${i})`,o);let a=this._scope.toName(e);return this._for(new $("in",n,a,i),()=>o(a))}endFor(){return this._endBlockNode(_)}label(e){return this._leafNode(new c(e))}break(e){return this._leafNode(new l(e))}return(e){let t=new k;if(this._blockNode(t),this.code(e),1!==t.nodes.length)throw Error('CodeGen: "return" should have one node');return this._endBlockNode(k)}try(e,t,r){if(!t&&!r)throw Error('CodeGen: "try" without "catch" and "finally"');let i=new w;if(this._blockNode(i),this.code(e),t){let e=this.name("e");this._currNode=i.catch=new V(e),t(e)}return r&&(this._currNode=i.finally=new P,this.code(r)),this._endBlockNode(V,P)}throw(e){return this._leafNode(new p(e))}block(e,t){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(t),this}endBlock(e){let t=this._blockStarts.pop();if(void 0===t)throw Error("CodeGen: not in self-balancing block");let r=this._nodes.length-t;if(r<0||void 0!==e&&r!==e)throw Error(`CodeGen: wrong number of nodes: ${r} vs ${e} expected`);return this._nodes.length=t,this}func(e,r=t.nil,i,o){return this._blockNode(new S(e,r,i)),o&&this.code(o).endFunc(),this}endFunc(){return this._endBlockNode(S)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,t){let r=this._currNode;if(r instanceof e||t&&r instanceof t)return this._nodes.pop(),this;throw Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){let t=this._currNode;if(!(t instanceof g))throw Error('CodeGen: "else" without "if"');return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let t=this._nodes;t[t.length-1]=e}};function q(e,t){for(let r in t)e[r]=(e[r]||0)+(t[r]||0);return e}function I(e,r){return r instanceof t._CodeOrName?q(e,r.names):e}function x(e,r,i){var o;if(e instanceof t.Name)return n(e);if(!((o=e)instanceof t._Code&&o._items.some(e=>e instanceof t.Name&&1===r[e.str]&&void 0!==i[e.str])))return e;return new t._Code(e._items.reduce((e,r)=>(r instanceof t.Name&&(r=n(r)),r instanceof t._Code?e.push(...r._items):e.push(r),e),[]));function n(e){let t=i[e.str];return void 0===t||1!==r[e.str]?e:(delete r[e.str],t)}}function j(e){return"boolean"==typeof e||"number"==typeof e||null===e?!e:(0,t._)`!${E(e)}`}e.CodeGen=R,e.not=j;let C=O(e.operators.AND);e.and=function(...e){return e.reduce(C)};let T=O(e.operators.OR);function O(e){return(r,i)=>r===t.nil?i:i===t.nil?r:(0,t._)`${E(r)} ${e} ${E(i)}`}function E(e){return e instanceof t.Name?e:(0,t._)`(${e})`}e.or=function(...e){return e.reduce(T)}}),l1=eb(e=>{var t,r;Object.defineProperty(e,"__esModule",{value:!0}),e.checkStrictMode=e.getErrorPath=e.Type=e.useFunc=e.setEvaluated=e.evaluatedPropsToName=e.mergeEvaluated=e.eachItem=e.unescapeJsonPointer=e.escapeJsonPointer=e.escapeFragment=e.unescapeFragment=e.schemaRefOrVal=e.schemaHasRulesButRef=e.schemaHasRules=e.checkUnknownRules=e.alwaysValidSchema=e.toHash=void 0;let i=lY(),o=lQ();function n(e,t=e.schema){let{opts:r,self:i}=e;if(!r.strictSchema||"boolean"==typeof t)return;let o=i.RULES.keywords;for(let r in t)o[r]||m(e,`unknown keyword: "${r}"`)}function a(e,t){if("boolean"==typeof e)return!e;for(let r in e)if(t[r])return!0;return!1}function s(e){return"number"==typeof e?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}function d(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function c({mergeNames:e,mergeToName:t,mergeValues:r,resultToName:o}){return(n,a,s,d)=>{let c=void 0===s?a:s instanceof i.Name?(a instanceof i.Name?e(n,a,s):t(n,a,s),s):a instanceof i.Name?(t(n,s,a),a):r(a,s);return d!==i.Name||c instanceof i.Name?c:o(n,c)}}function l(e,t){if(!0===t)return e.var("props",!0);let r=e.var("props",(0,i._)`{}`);return void 0!==t&&p(e,r,t),r}function p(e,t,r){Object.keys(r).forEach(r=>e.assign((0,i._)`${t}${(0,i.getProperty)(r)}`,!0))}e.toHash=function(e){let t={};for(let r of e)t[r]=!0;return t},e.alwaysValidSchema=function(e,t){return"boolean"==typeof t?t:0===Object.keys(t).length||(n(e,t),!a(t,e.self.RULES.all))},e.checkUnknownRules=n,e.schemaHasRules=a,e.schemaHasRulesButRef=function(e,t){if("boolean"==typeof e)return!e;for(let r in e)if("$ref"!==r&&t.all[r])return!0;return!1},e.schemaRefOrVal=function({topSchemaRef:e,schemaPath:t},r,o,n){if(!n){if("number"==typeof r||"boolean"==typeof r)return r;if("string"==typeof r)return(0,i._)`${r}`}return(0,i._)`${e}${t}${(0,i.getProperty)(o)}`},e.unescapeFragment=function(e){return d(decodeURIComponent(e))},e.escapeFragment=function(e){return encodeURIComponent(s(e))},e.escapeJsonPointer=s,e.unescapeJsonPointer=d,e.eachItem=function(e,t){if(Array.isArray(e))for(let r of e)t(r);else t(e)},e.mergeEvaluated={props:c({mergeNames:(e,t,r)=>e.if((0,i._)`${r} !== true && ${t} !== undefined`,()=>{e.if((0,i._)`${t} === true`,()=>e.assign(r,!0),()=>e.assign(r,(0,i._)`${r} || {}`).code((0,i._)`Object.assign(${r}, ${t})`))}),mergeToName:(e,t,r)=>e.if((0,i._)`${r} !== true`,()=>{!0===t?e.assign(r,!0):(e.assign(r,(0,i._)`${r} || {}`),p(e,r,t))}),mergeValues:(e,t)=>!0===e||{...e,...t},resultToName:l}),items:c({mergeNames:(e,t,r)=>e.if((0,i._)`${r} !== true && ${t} !== undefined`,()=>e.assign(r,(0,i._)`${t} === true ? true : ${r} > ${t} ? ${r} : ${t}`)),mergeToName:(e,t,r)=>e.if((0,i._)`${r} !== true`,()=>e.assign(r,!0===t||(0,i._)`${r} > ${t} ? ${r} : ${t}`)),mergeValues:(e,t)=>!0===e||Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})},e.evaluatedPropsToName=l,e.setEvaluated=p;let u={};function m(e,t,r=e.opts.strictSchema){if(r){if(t=`strict mode: ${t}`,!0===r)throw Error(t);e.self.logger.warn(t)}}e.useFunc=function(e,t){return e.scopeValue("func",{ref:t,code:u[t.code]||(u[t.code]=new o._Code(t.code))})},(r=t||(e.Type=t={}))[r.Num=0]="Num",r[r.Str=1]="Str",e.getErrorPath=function(e,r,o){if(e instanceof i.Name){let n=r===t.Num;return o?n?(0,i._)`"[" + ${e} + "]"`:(0,i._)`"['" + ${e} + "']"`:n?(0,i._)`"/" + ${e}`:(0,i._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return o?(0,i.getProperty)(e).toString():"/"+s(e)},e.checkStrictMode=m}),l0=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=lY();e.default={data:new t.Name("data"),valCxt:new t.Name("valCxt"),instancePath:new t.Name("instancePath"),parentData:new t.Name("parentData"),parentDataProperty:new t.Name("parentDataProperty"),rootData:new t.Name("rootData"),dynamicAnchors:new t.Name("dynamicAnchors"),vErrors:new t.Name("vErrors"),errors:new t.Name("errors"),this:new t.Name("this"),self:new t.Name("self"),scope:new t.Name("scope"),json:new t.Name("json"),jsonPos:new t.Name("jsonPos"),jsonLen:new t.Name("jsonLen"),jsonPart:new t.Name("jsonPart")}}),l2=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;let t=lY(),r=l1(),i=l0();function o(e,r){let o=e.const("err",r);e.if((0,t._)`${i.default.vErrors} === null`,()=>e.assign(i.default.vErrors,(0,t._)`[${o}]`),(0,t._)`${i.default.vErrors}.push(${o})`),e.code((0,t._)`${i.default.errors}++`)}function n(e,r){let{gen:i,validateName:o,schemaEnv:n}=e;n.$async?i.throw((0,t._)`new ${e.ValidationError}(${r})`):(i.assign((0,t._)`${o}.errors`,r),i.return(!1))}e.keywordError={message:({keyword:e})=>(0,t.str)`must pass "${e}" keyword validation`},e.keyword$DataError={message:({keyword:e,schemaType:r})=>r?(0,t.str)`"${e}" keyword must be ${r} ($data)`:(0,t.str)`"${e}" keyword is invalid ($data)`},e.reportError=function(r,i=e.keywordError,a,d){let{it:c}=r,{gen:l,compositeRule:p,allErrors:u}=c,m=s(r,i,a);(null!=d?d:p||u)?o(l,m):n(c,(0,t._)`[${m}]`)},e.reportExtraError=function(t,r=e.keywordError,a){let{it:d}=t,{gen:c,compositeRule:l,allErrors:p}=d;o(c,s(t,r,a)),l||p||n(d,i.default.vErrors)},e.resetErrorsCount=function(e,r){e.assign(i.default.errors,r),e.if((0,t._)`${i.default.vErrors} !== null`,()=>e.if(r,()=>e.assign((0,t._)`${i.default.vErrors}.length`,r),()=>e.assign(i.default.vErrors,null)))},e.extendErrors=function({gen:e,keyword:r,schemaValue:o,data:n,errsCount:a,it:s}){if(void 0===a)throw Error("ajv implementation error");let d=e.name("err");e.forRange("i",a,i.default.errors,a=>{e.const(d,(0,t._)`${i.default.vErrors}[${a}]`),e.if((0,t._)`${d}.instancePath === undefined`,()=>e.assign((0,t._)`${d}.instancePath`,(0,t.strConcat)(i.default.instancePath,s.errorPath))),e.assign((0,t._)`${d}.schemaPath`,(0,t.str)`${s.errSchemaPath}/${r}`),s.opts.verbose&&(e.assign((0,t._)`${d}.schema`,o),e.assign((0,t._)`${d}.data`,n))})};let a={keyword:new t.Name("keyword"),schemaPath:new t.Name("schemaPath"),params:new t.Name("params"),propertyName:new t.Name("propertyName"),message:new t.Name("message"),schema:new t.Name("schema"),parentSchema:new t.Name("parentSchema")};function s(e,o,n){let{createErrors:s}=e.it;return!1===s?(0,t._)`{}`:function(e,o,n={}){let{gen:s,it:d}=e,c=[function({errorPath:e},{instancePath:o}){let n=o?(0,t.str)`${e}${(0,r.getErrorPath)(o,r.Type.Str)}`:e;return[i.default.instancePath,(0,t.strConcat)(i.default.instancePath,n)]}(d,n),function({keyword:e,it:{errSchemaPath:i}},{schemaPath:o,parentSchema:n}){let s=n?i:(0,t.str)`${i}/${e}`;return o&&(s=(0,t.str)`${s}${(0,r.getErrorPath)(o,r.Type.Str)}`),[a.schemaPath,s]}(e,n)];return function(e,{params:r,message:o},n){let{keyword:s,data:d,schemaValue:c,it:l}=e,{opts:p,propertyName:u,topSchemaRef:m,schemaPath:f}=l;n.push([a.keyword,s],[a.params,"function"==typeof r?r(e):r||(0,t._)`{}`]),p.messages&&n.push([a.message,"function"==typeof o?o(e):o]),p.verbose&&n.push([a.schema,c],[a.parentSchema,(0,t._)`${m}${f}`],[i.default.data,d]),u&&n.push([a.propertyName,u])}(e,o,c),s.object(...c)}(e,o,n)}}),l4=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.boolOrEmptySchema=e.topBoolOrEmptySchema=void 0;let t=l2(),r=lY(),i=l0(),o={message:"boolean schema is false"};function n(e,r){let{gen:i,data:n}=e;(0,t.reportError)({gen:i,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e},o,void 0,r)}e.topBoolOrEmptySchema=function(e){let{gen:t,schema:o,validateName:a}=e;!1===o?n(e,!1):"object"==typeof o&&!0===o.$async?t.return(i.default.data):(t.assign((0,r._)`${a}.errors`,null),t.return(!0))},e.boolOrEmptySchema=function(e,t){let{gen:r,schema:i}=e;!1===i?(r.var(t,!1),n(e)):r.var(t,!0)}}),l6=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getRules=e.isJSONType=void 0;let t=new Set(["string","number","integer","boolean","null","object","array"]);e.isJSONType=function(e){return"string"==typeof e&&t.has(e)},e.getRules=function(){let e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}}),l3=eb(e=>{function t(e,t){return t.rules.some(t=>r(e,t))}function r(e,t){var r;return void 0!==e[t.keyword]||(null==(r=t.definition.implements)?void 0:r.some(t=>void 0!==e[t]))}Object.defineProperty(e,"__esModule",{value:!0}),e.shouldUseRule=e.shouldUseGroup=e.schemaHasRulesForType=void 0,e.schemaHasRulesForType=function({schema:e,self:r},i){let o=r.RULES.types[i];return o&&!0!==o&&t(e,o)},e.shouldUseGroup=t,e.shouldUseRule=r}),l9=eb(e=>{var t,r;Object.defineProperty(e,"__esModule",{value:!0}),e.reportTypeError=e.checkDataTypes=e.checkDataType=e.coerceAndCheckDataType=e.getJSONTypes=e.getSchemaTypes=e.DataType=void 0;let i=l6(),o=l3(),n=l2(),a=lY(),s=l1();function d(e){let t=Array.isArray(e)?e:e?[e]:[];if(t.every(i.isJSONType))return t;throw Error("type must be JSONType or JSONType[]: "+t.join(","))}(r=t||(e.DataType=t={}))[r.Correct=0]="Correct",r[r.Wrong=1]="Wrong",e.getSchemaTypes=function(e){let t=d(e.type);if(t.includes("null")){if(!1===e.nullable)throw Error("type: null contradicts nullable: false")}else{if(!t.length&&void 0!==e.nullable)throw Error('"nullable" cannot be used without "type"');!0===e.nullable&&t.push("null")}return t},e.getJSONTypes=d,e.coerceAndCheckDataType=function(e,r){var i,n;let{gen:s,data:d,opts:l}=e,u=(i=r,(n=l.coerceTypes)?i.filter(e=>c.has(e)||"array"===n&&"array"===e):[]),f=r.length>0&&!(0===u.length&&1===r.length&&(0,o.schemaHasRulesForType)(e,r[0]));if(f){let i=p(r,d,l.strictNumbers,t.Wrong);s.if(i,()=>{u.length?function(e,t,r){let{gen:i,data:o,opts:n}=e,s=i.let("dataType",(0,a._)`typeof ${o}`),d=i.let("coerced",(0,a._)`undefined`);for(let e of("array"===n.coerceTypes&&i.if((0,a._)`${s} == 'object' && Array.isArray(${o}) && ${o}.length == 1`,()=>i.assign(o,(0,a._)`${o}[0]`).assign(s,(0,a._)`typeof ${o}`).if(p(t,o,n.strictNumbers),()=>i.assign(d,o))),i.if((0,a._)`${d} !== undefined`),r))(c.has(e)||"array"===e&&"array"===n.coerceTypes)&&function(e){switch(e){case"string":i.elseIf((0,a._)`${s} == "number" || ${s} == "boolean"`).assign(d,(0,a._)`"" + ${o}`).elseIf((0,a._)`${o} === null`).assign(d,(0,a._)`""`);return;case"number":i.elseIf((0,a._)`${s} == "boolean" || ${o} === null || (${s} == "string" && ${o} && ${o} == +${o})`).assign(d,(0,a._)`+${o}`);return;case"integer":i.elseIf((0,a._)`${s} === "boolean" || ${o} === null || (${s} === "string" && ${o} && ${o} == +${o} && !(${o} % 1))`).assign(d,(0,a._)`+${o}`);return;case"boolean":i.elseIf((0,a._)`${o} === "false" || ${o} === 0 || ${o} === null`).assign(d,!1).elseIf((0,a._)`${o} === "true" || ${o} === 1`).assign(d,!0);return;case"null":i.elseIf((0,a._)`${o} === "" || ${o} === 0 || ${o} === false`),i.assign(d,null);return;case"array":i.elseIf((0,a._)`${s} === "string" || ${s} === "number" - || ${s} === "boolean" || ${o} === null`).assign(d,(0,a._)`[${o}]`)}}(e);i.else(),m(e),i.endIf(),i.if((0,a._)`${d} !== undefined`,()=>{i.assign(o,d),function({gen:e,parentData:t,parentDataProperty:r},i){e.if((0,a._)`${t} !== undefined`,()=>e.assign((0,a._)`${t}[${r}]`,i))}(e,d)})}(e,r,u):m(e)})}return f};let c=new Set(["string","number","integer","boolean","null"]);function l(e,r,i,o=t.Correct){let n,s=o===t.Correct?a.operators.EQ:a.operators.NEQ;switch(e){case"null":return(0,a._)`${r} ${s} null`;case"array":n=(0,a._)`Array.isArray(${r})`;break;case"object":n=(0,a._)`${r} && typeof ${r} == "object" && !Array.isArray(${r})`;break;case"integer":n=d((0,a._)`!(${r} % 1) && !isNaN(${r})`);break;case"number":n=d();break;default:return(0,a._)`typeof ${r} ${s} ${e}`}return o===t.Correct?n:(0,a.not)(n);function d(e=a.nil){return(0,a.and)((0,a._)`typeof ${r} == "number"`,e,i?(0,a._)`isFinite(${r})`:a.nil)}}function p(e,t,r,i){let o;if(1===e.length)return l(e[0],t,r,i);let n=(0,s.toHash)(e);if(n.array&&n.object){let e=(0,a._)`typeof ${t} != "object"`;o=n.null?e:(0,a._)`!${t} || ${e}`,delete n.null,delete n.array,delete n.object}else o=a.nil;for(let e in n.number&&delete n.integer,n)o=(0,a.and)(o,l(e,t,r,i));return o}e.checkDataType=l,e.checkDataTypes=p;let u={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>"string"==typeof e?(0,a._)`{type: ${e}}`:(0,a._)`{type: ${t}}`};function m(e){let t=function(e){let{gen:t,data:r,schema:i}=e,o=(0,s.schemaRefOrVal)(e,i,"type");return{gen:t,keyword:"type",data:r,schema:i.type,schemaCode:o,schemaValue:o,parentSchema:i,params:{},it:e}}(e);(0,n.reportError)(t,u)}e.reportTypeError=m}),l5=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.assignDefaults=void 0;let t=lY(),r=l1();function i(e,i,o){let{gen:n,compositeRule:a,data:s,opts:d}=e;if(void 0===o)return;let c=(0,t._)`${s}${(0,t.getProperty)(i)}`;if(a)return void(0,r.checkStrictMode)(e,`default is ignored for: ${c}`);let l=(0,t._)`${c} === undefined`;"empty"===d.useDefaults&&(l=(0,t._)`${l} || ${c} === null || ${c} === ""`),n.if(l,(0,t._)`${c} = ${(0,t.stringify)(o)}`)}e.assignDefaults=function(e,t){let{properties:r,items:o}=e.schema;if("object"===t&&r)for(let t in r)i(e,t,r[t].default);else"array"===t&&Array.isArray(o)&&o.forEach((t,r)=>i(e,r,t.default))}}),l8=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateUnion=e.validateArray=e.usePattern=e.callValidateCode=e.schemaProperties=e.allSchemaProperties=e.noPropertyInData=e.propertyInData=e.isOwnProperty=e.hasPropFunc=e.reportMissingProp=e.checkMissingProp=e.checkReportMissingProp=void 0;let t=lY(),r=l1(),i=l0(),o=l1();function n(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,t._)`Object.prototype.hasOwnProperty`})}function a(e,r,i){return(0,t._)`${n(e)}.call(${r}, ${i})`}function s(e,r,i,o){let n=(0,t._)`${r}${(0,t.getProperty)(i)} === undefined`;return o?(0,t.or)(n,(0,t.not)(a(e,r,i))):n}function d(e){return e?Object.keys(e).filter(e=>"__proto__"!==e):[]}e.checkReportMissingProp=function(e,r){let{gen:i,data:o,it:n}=e;i.if(s(i,o,r,n.opts.ownProperties),()=>{e.setParams({missingProperty:(0,t._)`${r}`},!0),e.error()})},e.checkMissingProp=function({gen:e,data:r,it:{opts:i}},o,n){return(0,t.or)(...o.map(o=>(0,t.and)(s(e,r,o,i.ownProperties),(0,t._)`${n} = ${o}`)))},e.reportMissingProp=function(e,t){e.setParams({missingProperty:t},!0),e.error()},e.hasPropFunc=n,e.isOwnProperty=a,e.propertyInData=function(e,r,i,o){let n=(0,t._)`${r}${(0,t.getProperty)(i)} !== undefined`;return o?(0,t._)`${n} && ${a(e,r,i)}`:n},e.noPropertyInData=s,e.allSchemaProperties=d,e.schemaProperties=function(e,t){return d(t).filter(i=>!(0,r.alwaysValidSchema)(e,t[i]))},e.callValidateCode=function({schemaCode:e,data:r,it:{gen:o,topSchemaRef:n,schemaPath:a,errorPath:s},it:d},c,l,p){let u=p?(0,t._)`${e}, ${r}, ${n}${a}`:r,m=[[i.default.instancePath,(0,t.strConcat)(i.default.instancePath,s)],[i.default.parentData,d.parentData],[i.default.parentDataProperty,d.parentDataProperty],[i.default.rootData,i.default.rootData]];d.opts.dynamicRef&&m.push([i.default.dynamicAnchors,i.default.dynamicAnchors]);let f=(0,t._)`${u}, ${o.object(...m)}`;return l!==t.nil?(0,t._)`${c}.call(${l}, ${f})`:(0,t._)`${c}(${f})`};let c=(0,t._)`new RegExp`;e.usePattern=function({gen:e,it:{opts:r}},i){let n=r.unicodeRegExp?"u":"",{regExp:a}=r.code,s=a(i,n);return e.scopeValue("pattern",{key:s.toString(),ref:s,code:(0,t._)`${"new RegExp"===a.code?c:(0,o.useFunc)(e,a)}(${i}, ${n})`})},e.validateArray=function(e){let{gen:i,data:o,keyword:n,it:a}=e,s=i.name("valid");if(a.allErrors){let e=i.let("valid",!0);return d(()=>i.assign(e,!1)),e}return i.var(s,!0),d(()=>i.break()),s;function d(a){let d=i.const("len",(0,t._)`${o}.length`);i.forRange("i",0,d,o=>{e.subschema({keyword:n,dataProp:o,dataPropType:r.Type.Num},s),i.if((0,t.not)(s),a)})}},e.validateUnion=function(e){let{gen:i,schema:o,keyword:n,it:a}=e;if(!Array.isArray(o))throw Error("ajv implementation error");if(o.some(e=>(0,r.alwaysValidSchema)(a,e))&&!a.opts.unevaluated)return;let s=i.let("valid",!1),d=i.name("_valid");i.block(()=>o.forEach((r,o)=>{let a=e.subschema({keyword:n,schemaProp:o,compositeRule:!0},d);i.assign(s,(0,t._)`${s} || ${d}`),e.mergeValidEvaluated(a,d)||i.if((0,t.not)(s))})),e.result(s,()=>e.reset(),()=>e.error(!0))}}),l7=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateKeywordUsage=e.validSchemaType=e.funcKeywordCode=e.macroKeywordCode=void 0;let t=lY(),r=l0(),i=l8(),o=l2();function n(e){let{gen:r,data:i,it:o}=e;r.if(o.parentData,()=>r.assign(i,(0,t._)`${o.parentData}[${o.parentDataProperty}]`))}function a(e,r,i){if(void 0===i)throw Error(`keyword "${r}" failed to compile`);return e.scopeValue("keyword","function"==typeof i?{ref:i}:{ref:i,code:(0,t.stringify)(i)})}e.macroKeywordCode=function(e,r){let{gen:i,keyword:o,schema:n,parentSchema:s,it:d}=e,c=r.macro.call(d.self,n,s,d),l=a(i,o,c);!1!==d.opts.validateSchema&&d.self.validateSchema(c,!0);let p=i.name("valid");e.subschema({schema:c,schemaPath:t.nil,errSchemaPath:`${d.errSchemaPath}/${o}`,topSchemaRef:l,compositeRule:!0},p),e.pass(p,()=>e.error(!0))},e.funcKeywordCode=function(e,s){var d;let{gen:c,keyword:l,schema:p,parentSchema:u,$data:m,it:f}=e;!function({schemaEnv:e},t){if(t.async&&!e.$async)throw Error("async keyword in sync schema")}(f,s);let h=a(c,l,!m&&s.compile?s.compile.call(f.self,p,u,f):s.validate),y=c.let("valid");function g(o=s.async?(0,t._)`await `:t.nil){let n=f.opts.passContext?r.default.this:r.default.self,a=!("compile"in s&&!m||!1===s.schema);c.assign(y,(0,t._)`${o}${(0,i.callValidateCode)(e,h,n,a)}`,s.modifying)}function _(e){var r;c.if((0,t.not)(null!=(r=s.valid)?r:y),e)}e.block$data(y,function(){if(!1===s.errors)g(),s.modifying&&n(e),_(()=>e.error());else{let i,a,d=s.async?(i=c.let("ruleErrs",null),c.try(()=>g((0,t._)`await `),e=>c.assign(y,!1).if((0,t._)`${e} instanceof ${f.ValidationError}`,()=>c.assign(i,(0,t._)`${e}.errors`),()=>c.throw(e))),i):(a=(0,t._)`${h}.errors`,c.assign(a,null),g(t.nil),a);s.modifying&&n(e),_(()=>(function(e,i){let{gen:n}=e;n.if((0,t._)`Array.isArray(${i})`,()=>{n.assign(r.default.vErrors,(0,t._)`${r.default.vErrors} === null ? ${i} : ${r.default.vErrors}.concat(${i})`).assign(r.default.errors,(0,t._)`${r.default.vErrors}.length`),(0,o.extendErrors)(e)},()=>e.error())})(e,d))}}),e.ok(null!=(d=s.valid)?d:y)},e.validSchemaType=function(e,t,r=!1){return!t.length||t.some(t=>"array"===t?Array.isArray(e):"object"===t?e&&"object"==typeof e&&!Array.isArray(e):typeof e==t||r&&void 0===e)},e.validateKeywordUsage=function({schema:e,opts:t,self:r,errSchemaPath:i},o,n){if(Array.isArray(o.keyword)?!o.keyword.includes(n):o.keyword!==n)throw Error("ajv implementation error");let a=o.dependencies;if(null==a?void 0:a.some(t=>!Object.prototype.hasOwnProperty.call(e,t)))throw Error(`parent schema must have dependencies of ${n}: ${a.join(",")}`);if(o.validateSchema&&!o.validateSchema(e[n])){let e=`keyword "${n}" value is invalid at path "${i}": `+r.errorsText(o.validateSchema.errors);if("log"===t.validateSchema)r.logger.error(e);else throw Error(e)}}}),pe=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.extendSubschemaMode=e.extendSubschemaData=e.getSubschema=void 0;let t=lY(),r=l1();e.getSubschema=function(e,{keyword:i,schemaProp:o,schema:n,schemaPath:a,errSchemaPath:s,topSchemaRef:d}){if(void 0!==i&&void 0!==n)throw Error('both "keyword" and "schema" passed, only one allowed');if(void 0!==i){let n=e.schema[i];return void 0===o?{schema:n,schemaPath:(0,t._)`${e.schemaPath}${(0,t.getProperty)(i)}`,errSchemaPath:`${e.errSchemaPath}/${i}`}:{schema:n[o],schemaPath:(0,t._)`${e.schemaPath}${(0,t.getProperty)(i)}${(0,t.getProperty)(o)}`,errSchemaPath:`${e.errSchemaPath}/${i}/${(0,r.escapeFragment)(o)}`}}if(void 0!==n){if(void 0===a||void 0===s||void 0===d)throw Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:n,schemaPath:a,topSchemaRef:d,errSchemaPath:s}}throw Error('either "keyword" or "schema" must be passed')},e.extendSubschemaData=function(e,i,{dataProp:o,dataPropType:n,data:a,dataTypes:s,propertyName:d}){if(void 0!==a&&void 0!==o)throw Error('both "data" and "dataProp" passed, only one allowed');let{gen:c}=i;if(void 0!==o){let{errorPath:a,dataPathArr:s,opts:d}=i;l(c.let("data",(0,t._)`${i.data}${(0,t.getProperty)(o)}`,!0)),e.errorPath=(0,t.str)`${a}${(0,r.getErrorPath)(o,n,d.jsPropertySyntax)}`,e.parentDataProperty=(0,t._)`${o}`,e.dataPathArr=[...s,e.parentDataProperty]}function l(t){e.data=t,e.dataLevel=i.dataLevel+1,e.dataTypes=[],i.definedProperties=new Set,e.parentData=i.data,e.dataNames=[...i.dataNames,t]}void 0!==a&&(l(a instanceof t.Name?a:c.let("data",a,!0)),void 0!==d&&(e.propertyName=d)),s&&(e.dataTypes=s)},e.extendSubschemaMode=function(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:i,createErrors:o,allErrors:n}){void 0!==i&&(e.compositeRule=i),void 0!==o&&(e.createErrors=o),void 0!==n&&(e.allErrors=n),e.jtdDiscriminator=t,e.jtdMetadata=r}}),pt=eb((e,t)=>{t.exports=function e(t,r){if(t===r)return!0;if(t&&r&&"object"==typeof t&&"object"==typeof r){if(t.constructor!==r.constructor)return!1;if(Array.isArray(t)){if((i=t.length)!=r.length)return!1;for(o=i;0!=o--;)if(!e(t[o],r[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if((i=(n=Object.keys(t)).length)!==Object.keys(r).length)return!1;for(o=i;0!=o--;)if(!Object.prototype.hasOwnProperty.call(r,n[o]))return!1;for(o=i;0!=o--;){var i,o,n,a=n[o];if(!e(t[a],r[a]))return!1}return!0}return t!=t&&r!=r}}),pr=eb((e,t)=>{var r=t.exports=function(e,t,i){"function"==typeof t&&(i=t,t={});var o="function"==typeof(i=t.cb||i)?i:i.pre||function(){};!function e(t,i,o,n,a,s,d,c,l,p){if(n&&"object"==typeof n&&!Array.isArray(n)){for(var u in i(n,a,s,d,c,l,p),n){var m=n[u];if(Array.isArray(m)){if(u in r.arrayKeywords)for(var f=0;f{Object.defineProperty(e,"__esModule",{value:!0}),e.getSchemaRefs=e.resolveUrl=e.normalizeId=e._getFullPath=e.getFullPath=e.inlineRef=void 0;let t=l1(),r=pt(),i=pr(),o=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);e.inlineRef=function(e,r=!0){return"boolean"==typeof e||(!0===r?!function e(t){for(let r in t){if(n.has(r))return!0;let i=t[r];if(Array.isArray(i)&&i.some(e)||"object"==typeof i&&e(i))return!0}return!1}(e):!!r&&function e(r){let i=0;for(let n in r)if("$ref"===n||(i++,!o.has(n)&&("object"==typeof r[n]&&(0,t.eachItem)(r[n],t=>i+=e(t)),1/0===i)))return 1/0;return i}(e)<=r)};let n=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function a(e,t="",r){return!1!==r&&(t=c(t)),s(e,e.parse(t))}function s(e,t){return e.serialize(t).split("#")[0]+"#"}e.getFullPath=a,e._getFullPath=s;let d=/#\/?$/;function c(e){return e?e.replace(d,""):""}e.normalizeId=c,e.resolveUrl=function(e,t,r){return r=c(r),e.resolve(t,r)};let l=/^[a-z_][-a-z0-9._]*$/i;e.getSchemaRefs=function(e,t){if("boolean"==typeof e)return{};let{schemaId:o,uriResolver:n}=this.opts,s=c(e[o]||t),d={"":s},p=a(n,s,!1),u={},m=new Set;return i(e,{allKeys:!0},(e,t,r,i)=>{if(void 0===i)return;let n=p+t,a=d[i];function s(t){let r=this.opts.uriResolver.resolve;if(t=c(a?r(a,t):t),m.has(t))throw h(t);m.add(t);let i=this.refs[t];return"string"==typeof i&&(i=this.refs[i]),"object"==typeof i?f(e,i.schema,t):t!==c(n)&&("#"===t[0]?(f(e,u[t],t),u[t]=e):this.refs[t]=n),t}function y(e){if("string"==typeof e){if(!l.test(e))throw Error(`invalid anchor "${e}"`);s.call(this,`#${e}`)}}"string"==typeof e[o]&&(a=s.call(this,e[o])),y.call(this,e.$anchor),y.call(this,e.$dynamicAnchor),d[t]=a}),u;function f(e,t,i){if(void 0!==t&&!r(e,t))throw h(i)}function h(e){return Error(`reference "${e}" resolves to more than one schema`)}}}),po=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getData=e.KeywordCxt=e.validateFunctionCode=void 0;let t=l4(),r=l9(),i=l3(),o=l9(),n=l5(),a=l7(),s=pe(),d=lY(),c=l0(),l=pi(),p=l1(),u=l2();function m({gen:e,validateName:t,schema:r,schemaEnv:i,opts:o},n){var a;o.code.es5?e.func(t,(0,d._)`${c.default.data}, ${c.default.valCxt}`,i.$async,()=>{var t,i;e.code((0,d._)`"use strict"; ${f(r,o)}`),t=e,i=o,t.if(c.default.valCxt,()=>{t.var(c.default.instancePath,(0,d._)`${c.default.valCxt}.${c.default.instancePath}`),t.var(c.default.parentData,(0,d._)`${c.default.valCxt}.${c.default.parentData}`),t.var(c.default.parentDataProperty,(0,d._)`${c.default.valCxt}.${c.default.parentDataProperty}`),t.var(c.default.rootData,(0,d._)`${c.default.valCxt}.${c.default.rootData}`),i.dynamicRef&&t.var(c.default.dynamicAnchors,(0,d._)`${c.default.valCxt}.${c.default.dynamicAnchors}`)},()=>{t.var(c.default.instancePath,(0,d._)`""`),t.var(c.default.parentData,(0,d._)`undefined`),t.var(c.default.parentDataProperty,(0,d._)`undefined`),t.var(c.default.rootData,c.default.data),i.dynamicRef&&t.var(c.default.dynamicAnchors,(0,d._)`{}`)}),e.code(n)}):e.func(t,(0,d._)`${c.default.data}, ${(a=o,(0,d._)`{${c.default.instancePath}="", ${c.default.parentData}, ${c.default.parentDataProperty}, ${c.default.rootData}=${c.default.data}${a.dynamicRef?(0,d._)`, ${c.default.dynamicAnchors}={}`:d.nil}}={}`)}`,i.$async,()=>e.code(f(r,o)).code(n))}function f(e,t){let r="object"==typeof e&&e[t.schemaId];return r&&(t.code.source||t.code.process)?(0,d._)`/*# sourceURL=${r} */`:d.nil}function h({schema:e,self:t}){if("boolean"==typeof e)return!e;for(let r in e)if(t.RULES.all[r])return!0;return!1}function y(e){return"boolean"!=typeof e.schema}function g(e){(0,p.checkUnknownRules)(e),function(e){let{schema:t,errSchemaPath:r,opts:i,self:o}=e;t.$ref&&i.ignoreKeywordsWithRef&&(0,p.schemaHasRulesButRef)(t,o.RULES)&&o.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}(e)}function _(e,t){if(e.opts.jtd)return b(e,[],!1,t);let i=(0,r.getSchemaTypes)(e.schema);b(e,i,!(0,r.coerceAndCheckDataType)(e,i),t)}function v({gen:e,schemaEnv:t,schema:r,errSchemaPath:i,opts:o}){let n=r.$comment;if(!0===o.$comment)e.code((0,d._)`${c.default.self}.logger.log(${n})`);else if("function"==typeof o.$comment){let r=(0,d.str)`${i}/$comment`,o=e.scopeValue("root",{ref:t.root});e.code((0,d._)`${c.default.self}.opts.$comment(${n}, ${r}, ${o}.schema)`)}}function b(e,t,r,n){var a,s,l,u;let{gen:m,schema:f,data:h,allErrors:y,opts:g,self:_}=e,{RULES:v}=_;if(f.$ref&&(g.ignoreKeywordsWithRef||!(0,p.schemaHasRulesButRef)(f,v)))return void m.block(()=>R(e,"$ref",v.all.$ref.definition));function b(a){(0,i.shouldUseGroup)(f,a)&&(a.type?(m.if((0,o.checkDataType)(a.type,h,g.strictNumbers)),$(e,a),1===t.length&&t[0]===a.type&&r&&(m.else(),(0,o.reportTypeError)(e)),m.endIf()):$(e,a),y||m.if((0,d._)`${c.default.errors} === ${n||0}`))}g.jtd||(a=e,s=t,!a.schemaEnv.meta&&a.opts.strictTypes&&(function(e,t){if(t.length){if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach(t=>{S(e.dataTypes,t)||k(e,`type "${t}" not allowed by context "${e.dataTypes.join(",")}"`)}),function(e,t){let r=[];for(let i of e.dataTypes)S(t,i)?r.push(i):t.includes("integer")&&"number"===i&&r.push("integer");e.dataTypes=r}(e,t)}}(a,s),a.opts.allowUnionTypes||(l=a,(u=s).length>1&&!(2===u.length&&u.includes("null"))&&k(l,"use allowUnionTypes to allow union type keyword")),function(e,t){let r=e.self.RULES.all;for(let o in r){let n=r[o];if("object"==typeof n&&(0,i.shouldUseRule)(e.schema,n)){let{type:r}=n.definition;r.length&&!r.some(e=>{var r,i;return r=t,i=e,r.includes(i)||"number"===i&&r.includes("integer")})&&k(e,`missing type "${r.join(",")}" for keyword "${o}"`)}}}(a,a.dataTypes))),m.block(()=>{for(let e of v.rules)b(e);b(v.post)})}function $(e,t){let{gen:r,schema:o,opts:{useDefaults:a}}=e;a&&(0,n.assignDefaults)(e,t.type),r.block(()=>{for(let r of t.rules)(0,i.shouldUseRule)(o,r)&&R(e,r.keyword,r.definition,t.type)})}function S(e,t){return e.includes(t)||"integer"===t&&e.includes("number")}function k(e,t){let r=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${r}" (strictTypes)`,(0,p.checkStrictMode)(e,t,e.opts.strictTypes)}e.validateFunctionCode=function(e){y(e)&&(g(e),h(e))?function(e){let{schema:t,opts:r,gen:i}=e;m(e,()=>{r.$comment&&t.$comment&&v(e),function(e){let{schema:t,opts:r}=e;void 0!==t.default&&r.useDefaults&&r.strictSchema&&(0,p.checkStrictMode)(e,"default is ignored in the schema root")}(e),i.let(c.default.vErrors,null),i.let(c.default.errors,0),r.unevaluated&&function(e){let{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",(0,d._)`${r}.evaluated`),t.if((0,d._)`${e.evaluated}.dynamicProps`,()=>t.assign((0,d._)`${e.evaluated}.props`,(0,d._)`undefined`)),t.if((0,d._)`${e.evaluated}.dynamicItems`,()=>t.assign((0,d._)`${e.evaluated}.items`,(0,d._)`undefined`))}(e),_(e),function(e){let{gen:t,schemaEnv:r,validateName:i,ValidationError:o,opts:n}=e;r.$async?t.if((0,d._)`${c.default.errors} === 0`,()=>t.return(c.default.data),()=>t.throw((0,d._)`new ${o}(${c.default.vErrors})`)):(t.assign((0,d._)`${i}.errors`,c.default.vErrors),n.unevaluated&&function({gen:e,evaluated:t,props:r,items:i}){r instanceof d.Name&&e.assign((0,d._)`${t}.props`,r),i instanceof d.Name&&e.assign((0,d._)`${t}.items`,i)}(e),t.return((0,d._)`${c.default.errors} === 0`))}(e)})}(e):m(e,()=>(0,t.topBoolOrEmptySchema)(e))};var w=class{constructor(e,t,r){if((0,a.validateKeywordUsage)(e,t,r),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=r,this.data=e.data,this.schema=e.schema[r],this.$data=t.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,p.schemaRefOrVal)(e,this.schema,r,this.$data),this.schemaType=t.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=t,this.$data)this.schemaCode=e.gen.const("vSchema",q(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,a.validSchemaType)(this.schema,t.schemaType,t.allowUndefined))throw Error(`${r} value must be ${JSON.stringify(t.schemaType)}`);("code"in t?t.trackErrors:!1!==t.errors)&&(this.errsCount=e.gen.const("_errs",c.default.errors))}result(e,t,r){this.failResult((0,d.not)(e),t,r)}failResult(e,t,r){this.gen.if(e),r?r():this.error(),t?(this.gen.else(),t(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,t){this.failResult((0,d.not)(e),void 0,t)}fail(e){if(void 0===e){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);let{schemaCode:t}=this;this.fail((0,d._)`${t} !== undefined && (${(0,d.or)(this.invalid$data(),e)})`)}error(e,t,r){if(t){this.setParams(t),this._error(e,r),this.setParams({});return}this._error(e,r)}_error(e,t){(e?u.reportExtraError:u.reportError)(this,this.def.error,t)}$dataError(){(0,u.reportError)(this,this.def.$dataError||u.keyword$DataError)}reset(){if(void 0===this.errsCount)throw Error('add "trackErrors" to keyword definition');(0,u.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,t){t?Object.assign(this.params,e):this.params=e}block$data(e,t,r=d.nil){this.gen.block(()=>{this.check$data(e,r),t()})}check$data(e=d.nil,t=d.nil){if(!this.$data)return;let{gen:r,schemaCode:i,schemaType:o,def:n}=this;r.if((0,d.or)((0,d._)`${i} === undefined`,t)),e!==d.nil&&r.assign(e,!0),(o.length||n.validateSchema)&&(r.elseIf(this.invalid$data()),this.$dataError(),e!==d.nil&&r.assign(e,!1)),r.else()}invalid$data(){let{gen:e,schemaCode:t,schemaType:r,def:i,it:n}=this;return(0,d.or)(function(){if(r.length){if(!(t instanceof d.Name))throw Error("ajv implementation error");let e=Array.isArray(r)?r:[r];return(0,d._)`${(0,o.checkDataTypes)(e,t,n.opts.strictNumbers,o.DataType.Wrong)}`}return d.nil}(),function(){if(i.validateSchema){let r=e.scopeValue("validate$data",{ref:i.validateSchema});return(0,d._)`!${r}(${t})`}return d.nil}())}subschema(e,r){let i=(0,s.getSubschema)(this.it,e);(0,s.extendSubschemaData)(i,this.it,e),(0,s.extendSubschemaMode)(i,e);let o={...this.it,...i,items:void 0,props:void 0};return!function(e,r){if(y(e)&&(g(e),h(e)))return function(e,t){var r;let i,{schema:o,gen:n,opts:a}=e;a.$comment&&o.$comment&&v(e),(i=(r=e).schema[r.opts.schemaId])&&(r.baseId=(0,l.resolveUrl)(r.opts.uriResolver,r.baseId,i)),function(e){if(e.schema.$async&&!e.schemaEnv.$async)throw Error("async schema in sync schema")}(e);let s=n.const("_errs",c.default.errors);_(e,s),n.var(t,(0,d._)`${s} === ${c.default.errors}`)}(e,r);(0,t.boolOrEmptySchema)(e,r)}(o,r),o}mergeEvaluated(e,t){let{it:r,gen:i}=this;r.opts.unevaluated&&(!0!==r.props&&void 0!==e.props&&(r.props=p.mergeEvaluated.props(i,e.props,r.props,t)),!0!==r.items&&void 0!==e.items&&(r.items=p.mergeEvaluated.items(i,e.items,r.items,t)))}mergeValidEvaluated(e,t){let{it:r,gen:i}=this;if(r.opts.unevaluated&&(!0!==r.props||!0!==r.items))return i.if(t,()=>this.mergeEvaluated(e,d.Name)),!0}};function R(e,t,r,i){let o=new w(e,r,t);"code"in r?r.code(o,i):o.$data&&r.validate?(0,a.funcKeywordCode)(o,r):"macro"in r?(0,a.macroKeywordCode)(o,r):(r.compile||r.validate)&&(0,a.funcKeywordCode)(o,r)}e.KeywordCxt=w;let P=/^\/(?:[^~]|~0|~1)*$/,V=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function q(e,{dataLevel:t,dataNames:r,dataPathArr:i}){let o,n;if(""===e)return c.default.rootData;if("/"===e[0]){if(!P.test(e))throw Error(`Invalid JSON-pointer: ${e}`);o=e,n=c.default.rootData}else{let a=V.exec(e);if(!a)throw Error(`Invalid JSON-pointer: ${e}`);let d=+a[1];if("#"===(o=a[2])){if(d>=t)throw Error(s("property/index",d));return i[t-d]}if(d>t)throw Error(s("data",d));if(n=r[t-d],!o)return n}let a=n;for(let e of o.split("/"))e&&(n=(0,d._)`${n}${(0,d.getProperty)((0,p.unescapeJsonPointer)(e))}`,a=(0,d._)`${a} && ${n}`);return a;function s(e,r){return`Cannot access ${e} ${r} levels up, current level is ${t}`}}e.getData=q}),pn=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=class extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}}}),pa=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=pi();e.default=class extends Error{constructor(e,r,i,o){super(o||`can't resolve reference ${i} from id ${r}`),this.missingRef=(0,t.resolveUrl)(e,r,i),this.missingSchema=(0,t.normalizeId)((0,t.getFullPath)(e,this.missingRef))}}}),ps=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.resolveSchema=e.getCompilingSchema=e.resolveRef=e.compileSchema=e.SchemaEnv=void 0;let t=lY(),r=pn(),i=l0(),o=pi(),n=l1(),a=po();var s=class{constructor(e){var t;let r;this.refs={},this.dynamicAnchors={},"object"==typeof e.schema&&(r=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=null!=(t=e.baseId)?t:(0,o.normalizeId)(null==r?void 0:r[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=null==r?void 0:r.$async,this.refs={}}};function d(e){let n,s,d=l.call(this,e);if(d)return d;let c=(0,o.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:p,lines:u}=this.opts.code,{ownProperties:m}=this.opts,f=new t.CodeGen(this.scope,{es5:p,lines:u,ownProperties:m});e.$async&&(n=f.scopeValue("Error",{ref:r.default,code:(0,t._)`require("ajv/dist/runtime/validation_error").default`}));let h=f.scopeName("validate");e.validateName=h;let y={gen:f,allErrors:this.opts.allErrors,data:i.default.data,parentData:i.default.parentData,parentDataProperty:i.default.parentDataProperty,dataNames:[i.default.data],dataPathArr:[t.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:f.scopeValue("schema",!0===this.opts.code.source?{ref:e.schema,code:(0,t.stringify)(e.schema)}:{ref:e.schema}),validateName:h,ValidationError:n,schema:e.schema,schemaEnv:e,rootId:c,baseId:e.baseId||c,schemaPath:t.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,t._)`""`,opts:this.opts,self:this};try{this._compilations.add(e),(0,a.validateFunctionCode)(y),f.optimize(this.opts.code.optimize);let r=f.toString();s=`${f.scopeRefs(i.default.scope)}return ${r}`,this.opts.code.process&&(s=this.opts.code.process(s,e));let o=Function(`${i.default.self}`,`${i.default.scope}`,s)(this,this.scope.get());if(this.scope.value(h,{ref:o}),o.errors=null,o.schema=e.schema,o.schemaEnv=e,e.$async&&(o.$async=!0),!0===this.opts.code.source&&(o.source={validateName:h,validateCode:r,scopeValues:f._values}),this.opts.unevaluated){let{props:e,items:r}=y;o.evaluated={props:e instanceof t.Name?void 0:e,items:r instanceof t.Name?void 0:r,dynamicProps:e instanceof t.Name,dynamicItems:r instanceof t.Name},o.source&&(o.source.evaluated=(0,t.stringify)(o.evaluated))}return e.validate=o,e}catch(t){throw delete e.validate,delete e.validateName,s&&this.logger.error("Error compiling schema, function code:",s),t}finally{this._compilations.delete(e)}}function c(e){return(0,o.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:d.call(this,e)}function l(e){for(let i of this._compilations){var t,r;if(t=i,r=e,t.schema===r.schema&&t.root===r.root&&t.baseId===r.baseId)return i}}function p(e,t){let r;for(;"string"==typeof(r=this.refs[t]);)t=r;return r||this.schemas[t]||u.call(this,e,t)}function u(e,t){let r=this.opts.uriResolver.parse(t),i=(0,o._getFullPath)(this.opts.uriResolver,r),n=(0,o.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&i===n)return f.call(this,r,e);let a=(0,o.normalizeId)(i),c=this.refs[a]||this.schemas[a];if("string"==typeof c){let t=u.call(this,e,c);if("object"!=typeof(null==t?void 0:t.schema))return;return f.call(this,r,t)}if("object"==typeof(null==c?void 0:c.schema)){if(c.validate||d.call(this,c),a===(0,o.normalizeId)(t)){let{schema:t}=c,{schemaId:r}=this.opts,i=t[r];return i&&(n=(0,o.resolveUrl)(this.opts.uriResolver,n,i)),new s({schema:t,schemaId:r,root:e,baseId:n})}return f.call(this,r,c)}}e.SchemaEnv=s,e.compileSchema=d,e.resolveRef=function(e,t,r){var i;r=(0,o.resolveUrl)(this.opts.uriResolver,t,r);let n=e.refs[r];if(n)return n;let a=p.call(this,e,r);if(void 0===a){let o=null==(i=e.localRefs)?void 0:i[r],{schemaId:n}=this.opts;o&&(a=new s({schema:o,schemaId:n,root:e,baseId:t}))}if(void 0!==a)return e.refs[r]=c.call(this,a)},e.getCompilingSchema=l,e.resolveSchema=u;let m=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function f(e,{baseId:t,schema:r,root:i}){var a;let d;if((null==(a=e.fragment)?void 0:a[0])!=="/")return;for(let i of e.fragment.slice(1).split("/")){if("boolean"==typeof r)return;let e=r[(0,n.unescapeFragment)(i)];if(void 0===e)return;let a="object"==typeof(r=e)&&r[this.opts.schemaId];!m.has(i)&&a&&(t=(0,o.resolveUrl)(this.opts.uriResolver,t,a))}if("boolean"!=typeof r&&r.$ref&&!(0,n.schemaHasRulesButRef)(r,this.RULES)){let e=(0,o.resolveUrl)(this.opts.uriResolver,t,r.$ref);d=u.call(this,i,e)}let{schemaId:c}=this.opts;if((d=d||new s({schema:r,schemaId:c,root:i,baseId:t})).schema!==d.root.schema)return d}}),pd=eb((e,t)=>{t.exports={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}}),pc=eb((e,t)=>{let r=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),i=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u),o=RegExp.prototype.test.bind(/^\d*$/u),n=RegExp.prototype.test.bind(/^[\da-f]{2}$/iu),a=RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu),s=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:@/]$/u),d=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:@/?]$/u),c=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:]$/u),l=Array(256);{let e="0123456789ABCDEF";for(let t=0;t<256;t++)l[t]="%"+e[t>>4]+e[15&t]}function p(e){return e<2048?l[192|e>>6]+l[128|63&e]:e<65536?l[224|e>>12]+l[128|e>>6&63]+l[128|63&e]:l[240|e>>18]+l[128|e>>12&63]+l[128|e>>6&63]+l[128|63&e]}let u=RegExp.prototype.test.bind(/^[\dA-Fa-f]{1,4}$/),m=RegExp.prototype.test.bind(/^[vV][\dA-Fa-f]+\.[A-Za-z\d\-._~!$&'()*+,;=:]+$/),f=RegExp.prototype.test.bind(/^[A-Za-z\d\-._~]$/),h=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function y(e){let t=-1,r=0,i=-1,o=0;for(let n=0;nr&&(r=o,t=i)):(i=-1,o=0);return r<2?e.join(":"):e.slice(0,t).join(":")+"::"+e.slice(t+r).join(":")}function g(e){let t="["===e[0]&&"]"===e[e.length-1];if(("["===e[0]||"]"===e[e.length-1])&&!t)return{host:e,isIPV6:!1,error:!0};let r=t?e.slice(1,-1):e;if(t&&m(r))return r=r.toLowerCase(),{host:`[${r}]`,escapedHost:r,isIPV6:!1,isIPVFuture:!0};if(2>function(e){let t=0;for(let r=0;r=8)return;let s=n.slice(0,r.length);for(let e=a;e<8;e++)s.push("0");for(let e=r.length;e_[e])}function S(e,t=!1){if(-1===e.indexOf("%"))return e;let r="";for(let i=0;i57343)r+=p(t);else if(t<=56319&&i+1=56320&&o<=57343?(r+=p(65536+(t-55296<<10)+(o-56320)),i++):r+=p(65533)}else r+=p(65533)}}return r}function w(e){return k(e,c)}function R(e){return e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122||42===e||43===e||45===e||46===e||47===e||64===e||95===e}t.exports={nonSimpleDomain:h,recomposeAuthority:function(e){let t=[];if(void 0!==e.userinfo&&(t.push(w(e.userinfo)),t.push("@")),void 0!==e.host){let r=e.host;if(!i(r)){let e=g(r);!0!==e.isIPV6&&!0!==e.isIPVFuture&&(e=g(r=S(r,!0))),r=!0===e.isIPV6||!0===e.isIPVFuture?`[${e.escapedHost}]`:$(r,!1)}t.push(r)}if("number"==typeof e.port||"string"==typeof e.port){let r=String(e.port);if(!o(r))throw TypeError("URI port is malformed.");t.push(":"),t.push(r)}return t.length?t.join(""):void 0},reescapeHostDelimiters:$,normalizePercentEncoding:S,normalizePathEncoding:function(e){let t="";for(let r=0;r57343)t+=p(o);else if(o<=56319&&r+1=56320&&i<=57343?(t+=p(65536+(o-55296<<10)+(i-56320)),r++):t+=p(65533)}else t+=p(65533)}}return t},serializePathEncoding:function(e,t=!1){let r="",i=t&&"/"!==e[0];for(let t=0;t57343)r+=p(i);else if(i<=56319&&t+1=56320&&o<=57343?(r+=p(65536+(i-55296<<10)+(o-56320)),t++):r+=p(65533)}else r+=p(65533)}}return r},normalizeQueryFragmentEncoding:function(e){let t="";for(let r=0;r57343)t+=p(o);else if(o<=56319&&r+1=56320&&i<=57343?(t+=p(65536+(o-55296<<10)+(i-56320)),r++):t+=p(65533)}else t+=p(65533)}}return t},encodeUserinfo:w,encodeQuery:function(e){return k(e,d)},encodeFragment:function(e){return k(e,d)},escapePreservingEscapes:function(e){let t="";for(let r=0;r=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";t+=e[i];break}for(i+=1;i=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";t+=e[i]}return t}}}),pl=eb((e,t)=>{let{isUUID:r}=pc(),i=/^([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-./:;=@]|%[\da-f]{2})+)$/iu,o=["http","https","ws","wss","urn","urn:uuid"];function n(e){return!0===e.secure||!1!==e.secure&&!!e.scheme&&3===e.scheme.length&&("w"===e.scheme[0]||"W"===e.scheme[0])&&("s"===e.scheme[1]||"S"===e.scheme[1])&&("s"===e.scheme[2]||"S"===e.scheme[2])}function a(e){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e}function s(e){let t="https"===String(e.scheme).toLowerCase();return(e.port===(t?443:80)||""===e.port)&&(e.port=void 0),e.path||(e.path="/"),e}let d={scheme:"http",domainHost:!0,parse:a,serialize:s},c={scheme:"https",domainHost:d.domainHost,parse:a,serialize:s},l={scheme:"ws",domainHost:!0,parse:function(e){return e.secure=n(e),e.resourceName=(e.path||"/")+(e.query?"?"+e.query:""),e.path=void 0,e.query=void 0,e},serialize:function(e){if((e.port===(n(e)?443:80)||""===e.port)&&(e.port=void 0),"boolean"==typeof e.secure&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){let t=e.resourceName.indexOf("?"),r=-1===t?e.resourceName:e.resourceName.slice(0,t);e.path=r&&"/"!==r?r:void 0,e.query=-1===t?void 0:e.resourceName.slice(t+1),e.resourceName=void 0}return e.fragment=void 0,e}},p={scheme:"wss",domainHost:l.domainHost,parse:l.parse,serialize:l.serialize},u={http:d,https:c,ws:l,wss:p,urn:{scheme:"urn",parse:function(e,t){if(!e.path)return e.error="URN can not be parsed",e;let r=e.path.match(i);if(r&&r[0]===e.path){let i=t.scheme||e.scheme||"urn";e.nid=r[1].toLowerCase(),e.nss=r[2];let o=m(`${i}:${t.nid||e.nid}`);e.path=void 0,o&&(e=o.parse(e,t))}else e.error=e.error||"URN can not be parsed.";return e},serialize:function(e,t){if(void 0===e.nid)throw Error("URN without nid cannot be serialized");let r=t.scheme||e.scheme||"urn",i=e.nid.toLowerCase(),o=m(`${r}:${t.nid||i}`);o&&(e=o.serialize(e,t));let n=e,a=e.nss;return n.path=`${i||t.nid}:${a}`,t.skipEscape=!0,n},skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:function(e,t){return e.uuid=e.nss,e.nss=void 0,t.tolerant||e.uuid&&r(e.uuid)||(e.error=e.error||"UUID is not valid."),e},serialize:function(e){return e.nss=(e.uuid||"").toLowerCase(),e},skipNormalize:!0}};function m(e){return e&&(u[e]||u[e.toLowerCase()])||void 0}Object.setPrototypeOf(u,null),t.exports={wsIsSecure:n,SCHEMES:u,isValidSchemeName:function(e){return -1!==o.indexOf(e)},getSchemeHandler:m}}),pp=eb((e,t)=>{let{normalizeIPv6:r,removeDotSegments:i,recomposeAuthority:o,normalizePercentEncoding:n,normalizePathEncoding:a,serializePathEncoding:s,normalizeQueryFragmentEncoding:d,encodeQuery:c,encodeFragment:l,reescapeHostDelimiters:p,isIPv4:u,nonSimpleDomain:m}=pc(),{SCHEMES:f,getSchemeHandler:h}=pl(),y=/^[A-Za-z][A-Za-z0-9+.-]*$/u,g="URI scheme is malformed.";function _(e){let t=unescape(String(e));if(!y.test(t))throw TypeError(g);return t}function v(e,t,r,o){let n={};return o||(e=q(b(e,r),r),t=q(b(t,r),r)),!(r=r||{}).tolerant&&t.scheme?(n.scheme=t.scheme,n.userinfo=t.userinfo,n.host=t.host,n.port=t.port,n.path=i(t.path||""),n.query=t.query):(void 0!==t.userinfo||void 0!==t.host||void 0!==t.port?(n.userinfo=t.userinfo,n.host=t.host,n.port=t.port,n.path=i(t.path||""),n.query=t.query):(t.path?("/"===t.path[0]?n.path=i(t.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?n.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:n.path=t.path:n.path="/"+t.path,n.path=i(n.path)),n.query=t.query):(n.path=e.path,void 0!==t.query?n.query=t.query:n.query=e.query),n.userinfo=e.userinfo,n.host=e.host,n.port=e.port),n.scheme=e.scheme),n.fragment=t.fragment,n}function b(e,t){let r={host:e.host,scheme:e.scheme,userinfo:e.userinfo,port:e.port,path:e.path,query:e.query,nid:e.nid,nss:e.nss,uuid:e.uuid,fragment:e.fragment,reference:e.reference,resourceName:e.resourceName,secure:e.secure,error:""},a=Object.assign({},t),d=[];r.scheme&&(r.scheme=_(r.scheme));let p=h(a.scheme||r.scheme);p&&p.serialize&&p.serialize(r,a);let u=void 0!==r.userinfo||void 0!==r.host||void 0!==r.port,m=!a.skipEscape&&void 0===r.scheme&&!u;void 0!==r.path&&(a.skipEscape?r.path=n(r.path):r.path=s(r.path,m)),"suffix"!==a.reference&&r.scheme&&(r.scheme=_(r.scheme),d.push(r.scheme,":"));let f=o(r);if(void 0!==f&&("suffix"!==a.reference&&d.push("//"),d.push(f),r.path&&"/"!==r.path[0]&&d.push("/")),void 0!==r.path){let e=r.path;a.absolutePath||p&&p.absolutePath||(e=i(e)),m&&(e=s(e,!0)),void 0===f&&"/"===e[0]&&"/"===e[1]&&(e="/%2F"+e.slice(2)),d.push(e)}return void 0!==r.query&&d.push("?",c(r.query)),void 0!==r.fragment&&d.push("#",l(r.fragment)),d.join("")}let $=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u,S=/^(?:[^#/:?]+:)?\/\/([^/?#]*)/,k=/^(?:[^#/:?]+:)?([/\\\t\n\r]*)/;function w(e){if(void 0===e)return!1;let t=e.indexOf("%");for(;-1!==t;){if(t+2>=e.length||!/^[\da-f]{2}$/iu.test(e.slice(t+1,t+3)))return!0;t=e.indexOf("%",t+3)}return!1}function R(e){return"["===e[0]&&"]"===e[e.length-1]}function P(e,t,r,i){if(!t.unicodeSupport&&(!r||!r.unicodeSupport)&&e.host&&!R(e.host)&&(t.domainHost||r&&r.domainHost)&&!1===i&&m(e.host))try{e.host=new URL("http://"+e.host).hostname}catch(t){return e.error=e.error||"Host's domain name can not be converted to ASCII: "+t,!0}return!1}function V(e,t){let i=Object.assign({},t),o={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},s=!1,c=!1,l=!1,m=!1,_=!1,v=!1,b=!1;"suffix"===i.reference&&(e=i.scheme?i.scheme+":"+e:"//"+e);let V=e.match(S);null!==V&&-1!==V[1].indexOf("\\")&&(o.error="URI authority must not contain a literal backslash.",s=!0);let q=e.match(k);if(null!==q){let e=q[1],t=e.replace(/[\t\n\r]/g,"");t.length>=2&&("//"!==t.slice(0,2)?(o.error=o.error||"URI authority must not contain a literal backslash.",s=!0):e.length!==t.length&&(o.error=o.error||"URI authority introducer must not contain whitespace.",s=!0))}let I=e.match($);if(I){let t;if(o.scheme=I[1],o.userinfo=I[3],o.host=I[4],o.port=parseInt(I[5],10),o.path=I[6]||"",o.query=I[7],o.fragment=I[8],void 0!==o.scheme){let e=unescape(o.scheme);y.test(e)?o.scheme=e.toLowerCase():(o.error=o.error||g,v=!0)}t=I[4],(c=w(I[3])||void 0!==t&&!R(t)&&w(t)||w(I[6])||w(I[7])||w(I[8]))&&(o.error=o.error||"URI contains malformed percent-encoding."),isNaN(o.port)&&(o.port=I[5]);let $=void 0!==I[2]&&o.path&&"/"!==o.path[0]?'URI path must start with "/" when authority is present.':"number"==typeof o.port&&(o.port<0||o.port>65535)?"URI port is malformed.":void 0;if(void 0!==$&&(o.error=o.error||$,s=!0),o.host)if(!1===u(o.host)){let e=R(o.host),t=-1!==o.host.indexOf("[")||-1!==o.host.indexOf("]"),i=r(o.host);b=i.isIPV6||!0===i.isIPVFuture,_=t&&(!e||!0===i.error),o.host=b?i.host:i.host.toLowerCase(),_&&(o.error=o.error||"URI host is malformed.",s=!0)}else b=!0;void 0!==o.scheme||void 0!==o.userinfo||void 0!==o.host||void 0!==o.port||void 0!==o.query||o.path?void 0===o.scheme?o.reference="relative":void 0===o.fragment?o.reference="absolute":o.reference="uri":o.reference="same-document",i.reference&&"suffix"!==i.reference&&i.reference!==o.reference&&(o.error=o.error||"URI is not a "+i.reference+" reference.");let S=h(i.scheme||o.scheme);if(_||(m=P(o,i,S,b)),-1!==e.indexOf("%")&&void 0!==o.host&&!_){let e=b?o.host:n(o.host,!0);b||(e=n(e.toLowerCase())),o.host=p(e,b)}(!S||S&&!S.skipNormalize)&&(o.path&&(o.path=a(o.path)),o.query&&(o.query=d(o.query)),o.fragment&&(o.fragment=d(o.fragment))),S&&S.parse&&(S.parse(o,i),S===f.urn&&void 0===o.nid&&(l=!0))}else o.error=o.error||"URI can not be parsed.";return{parsed:o,malformedAuthorityOrPort:s,malformedPercentEncoding:c,malformedSchemeSpecific:l,malformedHost:m,malformedScheme:v}}function q(e,t){return V(e,t).parsed}function I(e,t){let{parsed:r,malformedAuthorityOrPort:i,malformedPercentEncoding:o,malformedSchemeSpecific:n,malformedHost:a,malformedScheme:s}=V(e,t);return{normalized:i||o||n||a||s?e:b(r,t),malformedAuthorityOrPort:i,malformedPercentEncoding:o,malformedSchemeSpecific:n,malformedHost:a,malformedScheme:s}}function x(e,t){let r;if("string"!=typeof e&&"object"!=typeof e)return;try{r="string"==typeof e?e:b(e,t)}catch{return}let{normalized:i,malformedAuthorityOrPort:o,malformedPercentEncoding:n,malformedSchemeSpecific:a,malformedHost:s,malformedScheme:d}=I(r,t);return o||n||a||s||d?void 0:i}let j={SCHEMES:f,normalize:function(e,t){return"string"==typeof e?e=I(e,t).normalized:"object"==typeof e&&(e=q(b(e,t),t)),e},resolve:function(e,t,i){let o=i?Object.assign({scheme:"null"},i):{scheme:"null"},{parsed:n,malformedAuthorityOrPort:a,malformedPercentEncoding:s,malformedSchemeSpecific:d,malformedHost:c,malformedScheme:l}=V(e,o),{parsed:p,malformedAuthorityOrPort:m,malformedPercentEncoding:f,malformedSchemeSpecific:y,malformedHost:g,malformedScheme:_}=V(t,o);if(a||m||s||f||d||y||c||g||l||_)throw Error(n.error||p.error||"URI is malformed.");let $=v(n,p,o,!0),S=h(i&&i.scheme||$.scheme),k=$.host;P($,i||{},S,void 0!==k&&""!==k&&(u(k)||r(k).isIPV6));let w=k&&-1!==k.indexOf("%")&&!/\P{ASCII}/u.test(k);if($.error&&!w)throw Error($.error);return o.skipEscape=!0,b($,o)},resolveComponent:v,equal:function(e,t,r){let i=x(e,r),o=x(t,r);return void 0!==i&&void 0!==o&&i===o},serialize:b,parse:q};t.exports=j,t.exports.default=j,t.exports.fastUri=j}),pu=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=pp();t.code='require("ajv/dist/runtime/uri").default',e.default=t}),pm=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var t=po();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var r=lY();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return r.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return r.CodeGen}});let i=pn(),o=pa(),n=l6(),a=ps(),s=lY(),d=pi(),c=l9(),l=l1(),p=pd(),u=pu(),m=(e,t)=>new RegExp(e,t);m.code="new RegExp";let f=["removeAdditional","useDefaults","coerceTypes"],h=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),y={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},g={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'};var _=class{constructor(e={}){var t,r,i,o,a,d,c,l,p,f,_,b,P,V,q,I,x,j,C,T,O,E,A,M,W,N;let z,D,F,L,U;this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...(z=(t=e).strict,F=!0===(D=null==(r=t.code)?void 0:r.optimize)||void 0===D?1:D||0,L=null!=(o=null==(i=t.code)?void 0:i.regExp)?o:m,U=null!=(a=t.uriResolver)?a:u.default,{strictSchema:null==(c=null!=(d=t.strictSchema)?d:z)||c,strictNumbers:null==(p=null!=(l=t.strictNumbers)?l:z)||p,strictTypes:null!=(_=null!=(f=t.strictTypes)?f:z)?_:"log",strictTuples:null!=(P=null!=(b=t.strictTuples)?b:z)?P:"log",strictRequired:null!=(q=null!=(V=t.strictRequired)?V:z)&&q,code:t.code?{...t.code,optimize:F,regExp:L}:{optimize:F,regExp:L},loopRequired:null!=(I=t.loopRequired)?I:200,loopEnum:null!=(x=t.loopEnum)?x:200,meta:null==(j=t.meta)||j,messages:null==(C=t.messages)||C,inlineRefs:null==(T=t.inlineRefs)||T,schemaId:null!=(O=t.schemaId)?O:"$id",addUsedSchema:null==(E=t.addUsedSchema)||E,validateSchema:null==(A=t.validateSchema)||A,validateFormats:null==(M=t.validateFormats)||M,unicodeRegExp:null==(W=t.unicodeRegExp)||W,int32range:null==(N=t.int32range)||N,uriResolver:U})};let{es5:H,lines:G}=this.opts.code;this.scope=new s.ValueScope({scope:{},prefixes:h,es5:H,lines:G}),this.logger=function(e){if(!1===e)return R;if(void 0===e)return console;if(e.log&&e.warn&&e.error)return e;throw Error("logger must implement log, warn and error methods")}(e.logger);let B=e.validateFormats;e.validateFormats=!1,this.RULES=(0,n.getRules)(),v.call(this,y,e,"NOT SUPPORTED"),v.call(this,g,e,"DEPRECATED","warn"),this._metaOpts=w.call(this),e.formats&&S.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&k.call(this,e.keywords),"object"==typeof e.meta&&this.addMetaSchema(e.meta),$.call(this),e.validateFormats=B}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:e,meta:t,schemaId:r}=this.opts,i=p;"id"===r&&((i={...p}).id=i.$id,delete i.$id),t&&e&&this.addMetaSchema(i,i[r],!1)}defaultMeta(){let{meta:e,schemaId:t}=this.opts;return this.opts.defaultMeta="object"==typeof e?e[t]||e:void 0}validate(e,t){let r;if("string"==typeof e){if(!(r=this.getSchema(e)))throw Error(`no schema with key or ref "${e}"`)}else r=this.compile(e);let i=r(t);return"$async"in r||(this.errors=r.errors),i}compile(e,t){let r=this._addSchema(e,t);return r.validate||this._compileSchemaEnv(r)}compileAsync(e,t){if("function"!=typeof this.opts.loadSchema)throw Error("options.loadSchema should be a function");let{loadSchema:r}=this.opts;return i.call(this,e,t);async function i(e,t){await n.call(this,e.$schema);let r=this._addSchema(e,t);return r.validate||a.call(this,r)}async function n(e){e&&!this.getSchema(e)&&await i.call(this,{$ref:e},!0)}async function a(e){try{return this._compileSchemaEnv(e)}catch(t){if(!(t instanceof o.default))throw t;return s.call(this,t),await d.call(this,t.missingSchema),a.call(this,e)}}function s({missingSchema:e,missingRef:t}){if(this.refs[e])throw Error(`AnySchema ${e} is loaded but ${t} cannot be resolved`)}async function d(e){let r=await c.call(this,e);this.refs[e]||await n.call(this,r.$schema),this.refs[e]||this.addSchema(r,e,t)}async function c(e){let t=this._loading[e];if(t)return t;try{return await (this._loading[e]=r(e))}finally{delete this._loading[e]}}}addSchema(e,t,r,i=this.opts.validateSchema){let o;if(Array.isArray(e)){for(let t of e)this.addSchema(t,void 0,r,i);return this}if("object"==typeof e){let{schemaId:t}=this.opts;if(void 0!==(o=e[t])&&"string"!=typeof o)throw Error(`schema ${t} must be string`)}return t=(0,d.normalizeId)(t||o),this._checkUnique(t),this.schemas[t]=this._addSchema(e,r,t,i,!0),this}addMetaSchema(e,t,r=this.opts.validateSchema){return this.addSchema(e,t,!0,r),this}validateSchema(e,t){let r;if("boolean"==typeof e)return!0;if(void 0!==(r=e.$schema)&&"string"!=typeof r)throw Error("$schema must be a string");if(!(r=r||this.opts.defaultMeta||this.defaultMeta()))return this.logger.warn("meta-schema not available"),this.errors=null,!0;let i=this.validate(r,e);if(!i&&t){let e="schema is invalid: "+this.errorsText();if("log"===this.opts.validateSchema)this.logger.error(e);else throw Error(e)}return i}getSchema(e){let t;for(;"string"==typeof(t=b.call(this,e));)e=t;if(void 0===t){let{schemaId:r}=this.opts,i=new a.SchemaEnv({schema:{},schemaId:r});if(!(t=a.resolveSchema.call(this,i,e)))return;this.refs[e]=t}return t.validate||this._compileSchemaEnv(t)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let t=b.call(this,e);return"object"==typeof t&&this._cache.delete(t.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{this._cache.delete(e);let t=e[this.opts.schemaId];return t&&(t=(0,d.normalizeId)(t),delete this.schemas[t],delete this.refs[t]),this}default:throw Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(let t of e)this.addKeyword(t);return this}addKeyword(e,t){let r;if("string"==typeof e)r=e,"object"==typeof t&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),t.keyword=r);else if("object"==typeof e&&void 0===t){if(Array.isArray(r=(t=e).keyword)&&!r.length)throw Error("addKeywords: keyword must be string or non-empty array")}else throw Error("invalid addKeywords parameters");if(V.call(this,r,t),!t)return(0,l.eachItem)(r,e=>q.call(this,e)),this;x.call(this,t);let i={...t,type:(0,c.getJSONTypes)(t.type),schemaType:(0,c.getJSONTypes)(t.schemaType)};return(0,l.eachItem)(r,0===i.type.length?e=>q.call(this,e,i):e=>i.type.forEach(t=>q.call(this,e,i,t))),this}getKeyword(e){let t=this.RULES.all[e];return"object"==typeof t?t.definition:!!t}removeKeyword(e){let{RULES:t}=this;for(let r of(delete t.keywords[e],delete t.all[e],t.rules)){let t=r.rules.findIndex(t=>t.keyword===e);t>=0&&r.rules.splice(t,1)}return this}addFormat(e,t){return"string"==typeof t&&(t=new RegExp(t)),this.formats[e]=t,this}errorsText(e=this.errors,{separator:t=", ",dataVar:r="data"}={}){return e&&0!==e.length?e.map(e=>`${r}${e.instancePath} ${e.message}`).reduce((e,r)=>e+t+r):"No errors"}$dataMetaSchema(e,t){let r=this.RULES.all;for(let i of(e=JSON.parse(JSON.stringify(e)),t)){let t=i.split("/").slice(1),o=e;for(let e of t)o=o[e];for(let e in r){let t=r[e];if("object"!=typeof t)continue;let{$data:i}=t.definition,n=o[e];i&&n&&(o[e]=C(n))}}return e}_removeAllSchemas(e,t){for(let r in e){let i=e[r];(!t||t.test(r))&&("string"==typeof i?delete e[r]:i&&!i.meta&&(this._cache.delete(i.schema),delete e[r]))}}_addSchema(e,t,r,i=this.opts.validateSchema,o=this.opts.addUsedSchema){let n,{schemaId:s}=this.opts;if("object"==typeof e)n=e[s];else if(this.opts.jtd)throw Error("schema must be object");else if("boolean"!=typeof e)throw Error("schema must be object or boolean");let c=this._cache.get(e);if(void 0!==c)return c;r=(0,d.normalizeId)(n||r);let l=d.getSchemaRefs.call(this,e,r);return c=new a.SchemaEnv({schema:e,schemaId:s,meta:t,baseId:r,localRefs:l}),this._cache.set(c.schema,c),o&&!r.startsWith("#")&&(r&&this._checkUnique(r),this.refs[r]=c),i&&this.validateSchema(e,!0),c}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):a.compileSchema.call(this,e),!e.validate)throw Error("ajv implementation error");return e.validate}_compileMetaSchema(e){let t=this.opts;this.opts=this._metaOpts;try{a.compileSchema.call(this,e)}finally{this.opts=t}}};function v(e,t,r,i="error"){for(let o in e)o in t&&this.logger[i](`${r}: option ${o}. ${e[o]}`)}function b(e){return e=(0,d.normalizeId)(e),this.schemas[e]||this.refs[e]}function $(){let e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(let t in e)this.addSchema(e[t],t)}function S(){for(let e in this.opts.formats){let t=this.opts.formats[e];t&&this.addFormat(e,t)}}function k(e){if(Array.isArray(e))return void this.addVocabulary(e);for(let t in this.logger.warn("keywords option as map is deprecated, pass array"),e){let r=e[t];r.keyword||(r.keyword=t),this.addKeyword(r)}}function w(){let e={...this.opts};for(let t of f)delete e[t];return e}_.ValidationError=i.default,_.MissingRefError=o.default,e.default=_;let R={log(){},warn(){},error(){}},P=/^[a-z_$][a-z0-9_$:-]*$/i;function V(e,t){let{RULES:r}=this;if((0,l.eachItem)(e,e=>{if(r.keywords[e])throw Error(`Keyword ${e} is already defined`);if(!P.test(e))throw Error(`Keyword ${e} has invalid name`)}),t&&t.$data&&!("code"in t||"validate"in t))throw Error('$data keyword must have "code" or "validate" function')}function q(e,t,r){var i;let o=null==t?void 0:t.post;if(r&&o)throw Error('keyword with "post" flag cannot have "type"');let{RULES:n}=this,a=o?n.post:n.rules.find(({type:e})=>e===r);if(a||(a={type:r,rules:[]},n.rules.push(a)),n.keywords[e]=!0,!t)return;let s={keyword:e,definition:{...t,type:(0,c.getJSONTypes)(t.type),schemaType:(0,c.getJSONTypes)(t.schemaType)}};t.before?I.call(this,a,s,t.before):a.rules.push(s),n.all[e]=s,null==(i=t.implements)||i.forEach(e=>this.addKeyword(e))}function I(e,t,r){let i=e.rules.findIndex(e=>e.keyword===r);i>=0?e.rules.splice(i,0,t):(e.rules.push(t),this.logger.warn(`rule ${r} is not defined`))}function x(e){let{metaSchema:t}=e;void 0!==t&&(e.$data&&this.opts.$data&&(t=C(t)),e.validateSchema=this.compile(t,!0))}let j={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function C(e){return{anyOf:[e,j]}}}),pf=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={keyword:"id",code(){throw Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}}}),ph=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.callRef=e.getValidate=void 0;let t=pa(),r=l8(),i=lY(),o=l0(),n=ps(),a=l1();function s(e,t){let{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):(0,i._)`${r.scopeValue("wrapper",{ref:t})}.validate`}function d(e,t,n,s){let{gen:d,it:c}=e,{allErrors:l,schemaEnv:p,opts:u}=c,m=u.passContext?o.default.this:i.nil;function f(e){let t=(0,i._)`${e}.errors`;d.assign(o.default.vErrors,(0,i._)`${o.default.vErrors} === null ? ${t} : ${o.default.vErrors}.concat(${t})`),d.assign(o.default.errors,(0,i._)`${o.default.vErrors}.length`)}function h(e){var t;if(!c.opts.unevaluated)return;let r=null==(t=null==n?void 0:n.validate)?void 0:t.evaluated;if(!0!==c.props)if(r&&!r.dynamicProps)void 0!==r.props&&(c.props=a.mergeEvaluated.props(d,r.props,c.props));else{let t=d.var("props",(0,i._)`${e}.evaluated.props`);c.props=a.mergeEvaluated.props(d,t,c.props,i.Name)}if(!0!==c.items)if(r&&!r.dynamicItems)void 0!==r.items&&(c.items=a.mergeEvaluated.items(d,r.items,c.items));else{let t=d.var("items",(0,i._)`${e}.evaluated.items`);c.items=a.mergeEvaluated.items(d,t,c.items,i.Name)}}s?function(){if(!p.$async)throw Error("async schema referenced by sync schema");let o=d.let("valid");d.try(()=>{d.code((0,i._)`await ${(0,r.callValidateCode)(e,t,m)}`),h(t),l||d.assign(o,!0)},e=>{d.if((0,i._)`!(${e} instanceof ${c.ValidationError})`,()=>d.throw(e)),f(e),l||d.assign(o,!1)}),e.ok(o)}():e.result((0,r.callValidateCode)(e,t,m),()=>h(t),()=>f(t))}e.getValidate=s,e.callRef=d,e.default={keyword:"$ref",schemaType:"string",code(e){var r,o;let a,c,l,{gen:p,schema:u,it:m}=e,{baseId:f,schemaEnv:h,validateName:y,opts:g,self:_}=m,{root:v}=h;if(("#"===u||"#/"===u)&&f===v.baseId){if(h===v)return d(e,y,h,h.$async);let t=p.scopeValue("root",{ref:v});return d(e,(0,i._)`${t}.validate`,v,v.$async)}let b=n.resolveRef.call(_,v,f,u);if(void 0===b)throw new t.default(m.opts.uriResolver,f,u);return b instanceof n.SchemaEnv?void d(e,s(e,r=b),r,r.$async):(o=b,a=p.scopeValue("schema",!0===g.code.source?{ref:o,code:(0,i.stringify)(o)}:{ref:o}),c=p.name("valid"),l=e.subschema({schema:o,dataTypes:[],schemaPath:i.nil,topSchemaRef:a,errSchemaPath:u},c),void(e.mergeEvaluated(l),e.ok(c)))}}}),py=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=pf(),r=ph();e.default=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",t.default,r.default]}),pg=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=lY(),r=t.operators,i={maximum:{okStr:"<=",ok:r.LTE,fail:r.GT},minimum:{okStr:">=",ok:r.GTE,fail:r.LT},exclusiveMaximum:{okStr:"<",ok:r.LT,fail:r.GTE},exclusiveMinimum:{okStr:">",ok:r.GT,fail:r.LTE}};e.default={keyword:Object.keys(i),type:"number",schemaType:"number",$data:!0,error:{message:({keyword:e,schemaCode:r})=>(0,t.str)`must be ${i[e].okStr} ${r}`,params:({keyword:e,schemaCode:r})=>(0,t._)`{comparison: ${i[e].okStr}, limit: ${r}}`},code(e){let{keyword:r,data:o,schemaCode:n}=e;e.fail$data((0,t._)`${o} ${i[r].fail} ${n} || isNaN(${o})`)}}}),p_=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=lY();e.default={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:e})=>(0,t.str)`must be multiple of ${e}`,params:({schemaCode:e})=>(0,t._)`{multipleOf: ${e}}`},code(e){let{gen:r,data:i,schemaCode:o,it:n}=e,a=n.opts.multipleOfPrecision,s=r.let("res"),d=a?(0,t._)`Math.abs(Math.round(${s}) - ${s}) > 1e-${a}`:(0,t._)`${s} !== parseInt(${s})`;e.fail$data((0,t._)`(${o} === 0 || (${s} = ${i}/${o}, ${d}))`)}}}),pv=eb(e=>{function t(e){let t,r=e.length,i=0,o=0;for(;o=55296&&t<=56319&&o{Object.defineProperty(e,"__esModule",{value:!0});let t=lY(),r=l1(),i=pv();e.default={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message:({keyword:e,schemaCode:r})=>(0,t.str)`must NOT have ${"maxLength"===e?"more":"fewer"} than ${r} characters`,params:({schemaCode:e})=>(0,t._)`{limit: ${e}}`},code(e){let{keyword:o,data:n,schemaCode:a,it:s}=e,d="maxLength"===o?t.operators.GT:t.operators.LT,c=!1===s.opts.unicode?(0,t._)`${n}.length`:(0,t._)`${(0,r.useFunc)(e.gen,i.default)}(${n})`;e.fail$data((0,t._)`${c} ${d} ${a}`)}}}),p$=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=l8(),r=l1(),i=lY();e.default={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>(0,i.str)`must match pattern "${e}"`,params:({schemaCode:e})=>(0,i._)`{pattern: ${e}}`},code(e){let{gen:o,data:n,$data:a,schema:s,schemaCode:d,it:c}=e,l=c.opts.unicodeRegExp?"u":"";if(a){let{regExp:t}=c.opts.code,a="new RegExp"===t.code?(0,i._)`new RegExp`:(0,r.useFunc)(o,t),s=o.let("valid");o.try(()=>o.assign(s,(0,i._)`${a}(${d}, ${l}).test(${n})`),()=>o.assign(s,!1)),e.fail$data((0,i._)`!${s}`)}else{let r=(0,t.usePattern)(e,s);e.fail$data((0,i._)`!${r}.test(${n})`)}}}}),pS=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=lY();e.default={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message:({keyword:e,schemaCode:r})=>(0,t.str)`must NOT have ${"maxProperties"===e?"more":"fewer"} than ${r} properties`,params:({schemaCode:e})=>(0,t._)`{limit: ${e}}`},code(e){let{keyword:r,data:i,schemaCode:o}=e,n="maxProperties"===r?t.operators.GT:t.operators.LT;e.fail$data((0,t._)`Object.keys(${i}).length ${n} ${o}`)}}}),pk=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=l8(),r=lY(),i=l1();e.default={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:e}})=>(0,r.str)`must have required property '${e}'`,params:({params:{missingProperty:e}})=>(0,r._)`{missingProperty: ${e}}`},code(e){let{gen:o,schema:n,schemaCode:a,data:s,$data:d,it:c}=e,{opts:l}=c;if(!d&&0===n.length)return;let p=n.length>=l.loopRequired;if(c.allErrors?function(){if(p||d)e.block$data(r.nil,u);else for(let r of n)(0,t.checkReportMissingProp)(e,r)}():function(){let i=o.let("missing");if(p||d){let n=o.let("valid",!0);e.block$data(n,()=>{var d,c;return d=i,c=n,void(e.setParams({missingProperty:d}),o.forOf(d,a,()=>{o.assign(c,(0,t.propertyInData)(o,s,d,l.ownProperties)),o.if((0,r.not)(c),()=>{e.error(),o.break()})},r.nil))}),e.ok(n)}else o.if((0,t.checkMissingProp)(e,n,i)),(0,t.reportMissingProp)(e,i),o.else()}(),l.strictRequired){let t=e.parentSchema.properties,{definedProperties:r}=e.it;for(let e of n)if((null==t?void 0:t[e])===void 0&&!r.has(e)){let t=`required property "${e}" is not defined at "${c.schemaEnv.baseId+c.errSchemaPath}" (strictRequired)`;(0,i.checkStrictMode)(c,t,c.opts.strictRequired)}}function u(){o.forOf("prop",a,r=>{e.setParams({missingProperty:r}),o.if((0,t.noPropertyInData)(o,s,r,l.ownProperties),()=>e.error())})}}}}),pw=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=lY();e.default={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message:({keyword:e,schemaCode:r})=>(0,t.str)`must NOT have ${"maxItems"===e?"more":"fewer"} than ${r} items`,params:({schemaCode:e})=>(0,t._)`{limit: ${e}}`},code(e){let{keyword:r,data:i,schemaCode:o}=e,n="maxItems"===r?t.operators.GT:t.operators.LT;e.fail$data((0,t._)`${i}.length ${n} ${o}`)}}}),pR=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=pt();t.code='require("ajv/dist/runtime/equal").default',e.default=t}),pP=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=l9(),r=lY(),i=l1(),o=pR();e.default={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:e,j:t}})=>(0,r.str)`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>(0,r._)`{i: ${e}, j: ${t}}`},code(e){let{gen:n,data:a,$data:s,schema:d,parentSchema:c,schemaCode:l,it:p}=e;if(!s&&!d)return;let u=n.let("valid"),m=c.items?(0,t.getSchemaTypes)(c.items):[];e.block$data(u,function(){let s=n.let("i",(0,r._)`${a}.length`),d=n.let("j");e.setParams({i:s,j:d}),n.assign(u,!0),n.if((0,r._)`${s} > 1`,()=>(m.length>0&&!m.some(e=>"object"===e||"array"===e)?function(i,o){let s=n.name("item"),d=(0,t.checkDataTypes)(m,s,p.opts.strictNumbers,t.DataType.Wrong),c=n.const("indices",(0,r._)`{}`);n.for((0,r._)`;${i}--;`,()=>{n.let(s,(0,r._)`${a}[${i}]`),n.if(d,(0,r._)`continue`),m.length>1&&n.if((0,r._)`typeof ${s} == "string"`,(0,r._)`${s} += "_"`),n.if((0,r._)`typeof ${c}[${s}] == "number"`,()=>{n.assign(o,(0,r._)`${c}[${s}]`),e.error(),n.assign(u,!1).break()}).code((0,r._)`${c}[${s}] = ${i}`)})}:function(t,s){let d=(0,i.useFunc)(n,o.default),c=n.name("outer");n.label(c).for((0,r._)`;${t}--;`,()=>n.for((0,r._)`${s} = ${t}; ${s}--;`,()=>n.if((0,r._)`${d}(${a}[${t}], ${a}[${s}])`,()=>{e.error(),n.assign(u,!1).break(c)})))})(s,d))},(0,r._)`${l} === false`),e.ok(u)}}}),pV=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=lY(),r=l1(),i=pR();e.default={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:e})=>(0,t._)`{allowedValue: ${e}}`},code(e){let{gen:o,data:n,$data:a,schemaCode:s,schema:d}=e;a||d&&"object"==typeof d?e.fail$data((0,t._)`!${(0,r.useFunc)(o,i.default)}(${n}, ${s})`):e.fail((0,t._)`${d} !== ${n}`)}}}),pq=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=lY(),r=l1(),i=pR();e.default={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:e})=>(0,t._)`{allowedValues: ${e}}`},code(e){let o,n,{gen:a,data:s,$data:d,schema:c,schemaCode:l,it:p}=e;if(!d&&0===c.length)throw Error("enum must have non-empty array");let u=c.length>=p.opts.loopEnum,m=()=>null!=o?o:o=(0,r.useFunc)(a,i.default);if(u||d)n=a.let("valid"),e.block$data(n,function(){a.assign(n,!1),a.forOf("v",l,e=>a.if((0,t._)`${m()}(${s}, ${e})`,()=>a.assign(n,!0).break()))});else{if(!Array.isArray(c))throw Error("ajv implementation error");let e=a.const("vSchema",l);n=(0,t.or)(...c.map((r,i)=>{var o,n;let a;return o=e,"object"==typeof(a=c[n=i])&&null!==a?(0,t._)`${m()}(${s}, ${o}[${n}])`:(0,t._)`${s} === ${a}`}))}e.pass(n)}}}),pI=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=pg(),r=p_(),i=pb(),o=p$(),n=pS(),a=pk(),s=pw(),d=pP(),c=pV(),l=pq();e.default=[t.default,r.default,i.default,o.default,n.default,a.default,s.default,d.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},c.default,l.default]}),px=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateAdditionalItems=void 0;let t=lY(),r=l1();function i(e,i){let{gen:o,schema:n,data:a,keyword:s,it:d}=e;d.items=!0;let c=o.const("len",(0,t._)`${a}.length`);if(!1===n)e.setParams({len:i.length}),e.pass((0,t._)`${c} <= ${i.length}`);else if("object"==typeof n&&!(0,r.alwaysValidSchema)(d,n)){let n=o.var("valid",(0,t._)`${c} <= ${i.length}`);o.if((0,t.not)(n),()=>{var a;return a=n,void o.forRange("i",i.length,c,i=>{e.subschema({keyword:s,dataProp:i,dataPropType:r.Type.Num},a),d.allErrors||o.if((0,t.not)(a),()=>o.break())})}),e.ok(n)}}e.validateAdditionalItems=i,e.default={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:e}})=>(0,t.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,t._)`{limit: ${e}}`},code(e){let{parentSchema:t,it:o}=e,{items:n}=t;Array.isArray(n)?i(e,n):(0,r.checkStrictMode)(o,'"additionalItems" is ignored when "items" is not an array of schemas')}}}),pj=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateTuple=void 0;let t=lY(),r=l1(),i=l8();function o(e,i,n=e.schema){let{gen:a,parentSchema:s,data:d,keyword:c,it:l}=e;(function(e){let{opts:t,errSchemaPath:o}=l,a=n.length,s=a===e.minItems&&(a===e.maxItems||!1===e[i]);if(t.strictTuples&&!s){let e=`"${c}" is ${a}-tuple, but minItems or maxItems/${i} are not specified or different at path "${o}"`;(0,r.checkStrictMode)(l,e,t.strictTuples)}})(s),l.opts.unevaluated&&n.length&&!0!==l.items&&(l.items=r.mergeEvaluated.items(a,n.length,l.items));let p=a.name("valid"),u=a.const("len",(0,t._)`${d}.length`);n.forEach((i,o)=>{(0,r.alwaysValidSchema)(l,i)||(a.if((0,t._)`${u} > ${o}`,()=>e.subschema({keyword:c,schemaProp:o,dataProp:o},p)),e.ok(p))})}e.validateTuple=o,e.default={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){let{schema:t,it:n}=e;if(Array.isArray(t))return o(e,"additionalItems",t);n.items=!0,(0,r.alwaysValidSchema)(n,t)||e.ok((0,i.validateArray)(e))}}}),pC=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=pj();e.default={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,t.validateTuple)(e,"items")}}),pT=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=lY(),r=l1(),i=l8(),o=px();e.default={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:e}})=>(0,t.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,t._)`{limit: ${e}}`},code(e){let{schema:t,parentSchema:n,it:a}=e,{prefixItems:s}=n;a.items=!0,(0,r.alwaysValidSchema)(a,t)||(s?(0,o.validateAdditionalItems)(e,s):e.ok((0,i.validateArray)(e)))}}}),pO=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=lY(),r=l1();e.default={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:e,max:r}})=>void 0===r?(0,t.str)`must contain at least ${e} valid item(s)`:(0,t.str)`must contain at least ${e} and no more than ${r} valid item(s)`,params:({params:{min:e,max:r}})=>void 0===r?(0,t._)`{minContains: ${e}}`:(0,t._)`{minContains: ${e}, maxContains: ${r}}`},code(e){let i,o,{gen:n,schema:a,parentSchema:s,data:d,it:c}=e,{minContains:l,maxContains:p}=s;c.opts.next?(i=void 0===l?1:l,o=p):i=1;let u=n.const("len",(0,t._)`${d}.length`);if(e.setParams({min:i,max:o}),void 0===o&&0===i)return void(0,r.checkStrictMode)(c,'"minContains" == 0 without "maxContains": "contains" keyword ignored');if(void 0!==o&&i>o){(0,r.checkStrictMode)(c,'"minContains" > "maxContains" is always invalid'),e.fail();return}if((0,r.alwaysValidSchema)(c,a)){let r=(0,t._)`${u} >= ${i}`;void 0!==o&&(r=(0,t._)`${r} && ${u} <= ${o}`),e.pass(r);return}c.items=!0;let m=n.name("valid");function f(){let e=n.name("_valid"),r=n.let("count",0);h(e,()=>n.if(e,()=>{var e;return e=r,void(n.code((0,t._)`${e}++`),void 0===o?n.if((0,t._)`${e} >= ${i}`,()=>n.assign(m,!0).break()):(n.if((0,t._)`${e} > ${o}`,()=>n.assign(m,!1).break()),1===i?n.assign(m,!0):n.if((0,t._)`${e} >= ${i}`,()=>n.assign(m,!0))))}))}function h(t,i){n.forRange("i",0,u,o=>{e.subschema({keyword:"contains",dataProp:o,dataPropType:r.Type.Num,compositeRule:!0},t),i()})}void 0===o&&1===i?h(m,()=>n.if(m,()=>n.break())):0===i?(n.let(m,!0),void 0!==o&&n.if((0,t._)`${d}.length > 0`,f)):(n.let(m,!1),f()),e.result(m,()=>e.reset())}}}),pE=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;let t=lY(),r=l1(),i=l8();e.error={message:({params:{property:e,depsCount:r,deps:i}})=>(0,t.str)`must have ${1===r?"property":"properties"} ${i} when property ${e} is present`,params:({params:{property:e,depsCount:r,deps:i,missingProperty:o}})=>(0,t._)`{property: ${e}, + || ${s} === "boolean" || ${o} === null`).assign(d,(0,a._)`[${o}]`)}}(e);i.else(),m(e),i.endIf(),i.if((0,a._)`${d} !== undefined`,()=>{i.assign(o,d),function({gen:e,parentData:t,parentDataProperty:r},i){e.if((0,a._)`${t} !== undefined`,()=>e.assign((0,a._)`${t}[${r}]`,i))}(e,d)})}(e,r,u):m(e)})}return f};let c=new Set(["string","number","integer","boolean","null"]);function l(e,r,i,o=t.Correct){let n,s=o===t.Correct?a.operators.EQ:a.operators.NEQ;switch(e){case"null":return(0,a._)`${r} ${s} null`;case"array":n=(0,a._)`Array.isArray(${r})`;break;case"object":n=(0,a._)`${r} && typeof ${r} == "object" && !Array.isArray(${r})`;break;case"integer":n=d((0,a._)`!(${r} % 1) && !isNaN(${r})`);break;case"number":n=d();break;default:return(0,a._)`typeof ${r} ${s} ${e}`}return o===t.Correct?n:(0,a.not)(n);function d(e=a.nil){return(0,a.and)((0,a._)`typeof ${r} == "number"`,e,i?(0,a._)`isFinite(${r})`:a.nil)}}function p(e,t,r,i){let o;if(1===e.length)return l(e[0],t,r,i);let n=(0,s.toHash)(e);if(n.array&&n.object){let e=(0,a._)`typeof ${t} != "object"`;o=n.null?e:(0,a._)`!${t} || ${e}`,delete n.null,delete n.array,delete n.object}else o=a.nil;for(let e in n.number&&delete n.integer,n)o=(0,a.and)(o,l(e,t,r,i));return o}e.checkDataType=l,e.checkDataTypes=p;let u={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>"string"==typeof e?(0,a._)`{type: ${e}}`:(0,a._)`{type: ${t}}`};function m(e){let t=function(e){let{gen:t,data:r,schema:i}=e,o=(0,s.schemaRefOrVal)(e,i,"type");return{gen:t,keyword:"type",data:r,schema:i.type,schemaCode:o,schemaValue:o,parentSchema:i,params:{},it:e}}(e);(0,n.reportError)(t,u)}e.reportTypeError=m}),l5=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.assignDefaults=void 0;let t=lY(),r=l1();function i(e,i,o){let{gen:n,compositeRule:a,data:s,opts:d}=e;if(void 0===o)return;let c=(0,t._)`${s}${(0,t.getProperty)(i)}`;if(a)return void(0,r.checkStrictMode)(e,`default is ignored for: ${c}`);let l=(0,t._)`${c} === undefined`;"empty"===d.useDefaults&&(l=(0,t._)`${l} || ${c} === null || ${c} === ""`),n.if(l,(0,t._)`${c} = ${(0,t.stringify)(o)}`)}e.assignDefaults=function(e,t){let{properties:r,items:o}=e.schema;if("object"===t&&r)for(let t in r)i(e,t,r[t].default);else"array"===t&&Array.isArray(o)&&o.forEach((t,r)=>i(e,r,t.default))}}),l8=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateUnion=e.validateArray=e.usePattern=e.callValidateCode=e.schemaProperties=e.allSchemaProperties=e.noPropertyInData=e.propertyInData=e.isOwnProperty=e.hasPropFunc=e.reportMissingProp=e.checkMissingProp=e.checkReportMissingProp=void 0;let t=lY(),r=l1(),i=l0(),o=l1();function n(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,t._)`Object.prototype.hasOwnProperty`})}function a(e,r,i){return(0,t._)`${n(e)}.call(${r}, ${i})`}function s(e,r,i,o){let n=(0,t._)`${r}${(0,t.getProperty)(i)} === undefined`;return o?(0,t.or)(n,(0,t.not)(a(e,r,i))):n}function d(e){return e?Object.keys(e).filter(e=>"__proto__"!==e):[]}e.checkReportMissingProp=function(e,r){let{gen:i,data:o,it:n}=e;i.if(s(i,o,r,n.opts.ownProperties),()=>{e.setParams({missingProperty:(0,t._)`${r}`},!0),e.error()})},e.checkMissingProp=function({gen:e,data:r,it:{opts:i}},o,n){return(0,t.or)(...o.map(o=>(0,t.and)(s(e,r,o,i.ownProperties),(0,t._)`${n} = ${o}`)))},e.reportMissingProp=function(e,t){e.setParams({missingProperty:t},!0),e.error()},e.hasPropFunc=n,e.isOwnProperty=a,e.propertyInData=function(e,r,i,o){let n=(0,t._)`${r}${(0,t.getProperty)(i)} !== undefined`;return o?(0,t._)`${n} && ${a(e,r,i)}`:n},e.noPropertyInData=s,e.allSchemaProperties=d,e.schemaProperties=function(e,t){return d(t).filter(i=>!(0,r.alwaysValidSchema)(e,t[i]))},e.callValidateCode=function({schemaCode:e,data:r,it:{gen:o,topSchemaRef:n,schemaPath:a,errorPath:s},it:d},c,l,p){let u=p?(0,t._)`${e}, ${r}, ${n}${a}`:r,m=[[i.default.instancePath,(0,t.strConcat)(i.default.instancePath,s)],[i.default.parentData,d.parentData],[i.default.parentDataProperty,d.parentDataProperty],[i.default.rootData,i.default.rootData]];d.opts.dynamicRef&&m.push([i.default.dynamicAnchors,i.default.dynamicAnchors]);let f=(0,t._)`${u}, ${o.object(...m)}`;return l!==t.nil?(0,t._)`${c}.call(${l}, ${f})`:(0,t._)`${c}(${f})`};let c=(0,t._)`new RegExp`;e.usePattern=function({gen:e,it:{opts:r}},i){let n=r.unicodeRegExp?"u":"",{regExp:a}=r.code,s=a(i,n);return e.scopeValue("pattern",{key:s.toString(),ref:s,code:(0,t._)`${"new RegExp"===a.code?c:(0,o.useFunc)(e,a)}(${i}, ${n})`})},e.validateArray=function(e){let{gen:i,data:o,keyword:n,it:a}=e,s=i.name("valid");if(a.allErrors){let e=i.let("valid",!0);return d(()=>i.assign(e,!1)),e}return i.var(s,!0),d(()=>i.break()),s;function d(a){let d=i.const("len",(0,t._)`${o}.length`);i.forRange("i",0,d,o=>{e.subschema({keyword:n,dataProp:o,dataPropType:r.Type.Num},s),i.if((0,t.not)(s),a)})}},e.validateUnion=function(e){let{gen:i,schema:o,keyword:n,it:a}=e;if(!Array.isArray(o))throw Error("ajv implementation error");if(o.some(e=>(0,r.alwaysValidSchema)(a,e))&&!a.opts.unevaluated)return;let s=i.let("valid",!1),d=i.name("_valid");i.block(()=>o.forEach((r,o)=>{let a=e.subschema({keyword:n,schemaProp:o,compositeRule:!0},d);i.assign(s,(0,t._)`${s} || ${d}`),e.mergeValidEvaluated(a,d)||i.if((0,t.not)(s))})),e.result(s,()=>e.reset(),()=>e.error(!0))}}),l7=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateKeywordUsage=e.validSchemaType=e.funcKeywordCode=e.macroKeywordCode=void 0;let t=lY(),r=l0(),i=l8(),o=l2();function n(e){let{gen:r,data:i,it:o}=e;r.if(o.parentData,()=>r.assign(i,(0,t._)`${o.parentData}[${o.parentDataProperty}]`))}function a(e,r,i){if(void 0===i)throw Error(`keyword "${r}" failed to compile`);return e.scopeValue("keyword","function"==typeof i?{ref:i}:{ref:i,code:(0,t.stringify)(i)})}e.macroKeywordCode=function(e,r){let{gen:i,keyword:o,schema:n,parentSchema:s,it:d}=e,c=r.macro.call(d.self,n,s,d),l=a(i,o,c);!1!==d.opts.validateSchema&&d.self.validateSchema(c,!0);let p=i.name("valid");e.subschema({schema:c,schemaPath:t.nil,errSchemaPath:`${d.errSchemaPath}/${o}`,topSchemaRef:l,compositeRule:!0},p),e.pass(p,()=>e.error(!0))},e.funcKeywordCode=function(e,s){var d;let{gen:c,keyword:l,schema:p,parentSchema:u,$data:m,it:f}=e;!function({schemaEnv:e},t){if(t.async&&!e.$async)throw Error("async keyword in sync schema")}(f,s);let h=a(c,l,!m&&s.compile?s.compile.call(f.self,p,u,f):s.validate),y=c.let("valid");function g(o=s.async?(0,t._)`await `:t.nil){let n=f.opts.passContext?r.default.this:r.default.self,a=!("compile"in s&&!m||!1===s.schema);c.assign(y,(0,t._)`${o}${(0,i.callValidateCode)(e,h,n,a)}`,s.modifying)}function _(e){var r;c.if((0,t.not)(null!=(r=s.valid)?r:y),e)}e.block$data(y,function(){if(!1===s.errors)g(),s.modifying&&n(e),_(()=>e.error());else{let i,a,d=s.async?(i=c.let("ruleErrs",null),c.try(()=>g((0,t._)`await `),e=>c.assign(y,!1).if((0,t._)`${e} instanceof ${f.ValidationError}`,()=>c.assign(i,(0,t._)`${e}.errors`),()=>c.throw(e))),i):(a=(0,t._)`${h}.errors`,c.assign(a,null),g(t.nil),a);s.modifying&&n(e),_(()=>(function(e,i){let{gen:n}=e;n.if((0,t._)`Array.isArray(${i})`,()=>{n.assign(r.default.vErrors,(0,t._)`${r.default.vErrors} === null ? ${i} : ${r.default.vErrors}.concat(${i})`).assign(r.default.errors,(0,t._)`${r.default.vErrors}.length`),(0,o.extendErrors)(e)},()=>e.error())})(e,d))}}),e.ok(null!=(d=s.valid)?d:y)},e.validSchemaType=function(e,t,r=!1){return!t.length||t.some(t=>"array"===t?Array.isArray(e):"object"===t?e&&"object"==typeof e&&!Array.isArray(e):typeof e==t||r&&void 0===e)},e.validateKeywordUsage=function({schema:e,opts:t,self:r,errSchemaPath:i},o,n){if(Array.isArray(o.keyword)?!o.keyword.includes(n):o.keyword!==n)throw Error("ajv implementation error");let a=o.dependencies;if(null==a?void 0:a.some(t=>!Object.prototype.hasOwnProperty.call(e,t)))throw Error(`parent schema must have dependencies of ${n}: ${a.join(",")}`);if(o.validateSchema&&!o.validateSchema(e[n])){let e=`keyword "${n}" value is invalid at path "${i}": `+r.errorsText(o.validateSchema.errors);if("log"===t.validateSchema)r.logger.error(e);else throw Error(e)}}}),pe=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.extendSubschemaMode=e.extendSubschemaData=e.getSubschema=void 0;let t=lY(),r=l1();e.getSubschema=function(e,{keyword:i,schemaProp:o,schema:n,schemaPath:a,errSchemaPath:s,topSchemaRef:d}){if(void 0!==i&&void 0!==n)throw Error('both "keyword" and "schema" passed, only one allowed');if(void 0!==i){let n=e.schema[i];return void 0===o?{schema:n,schemaPath:(0,t._)`${e.schemaPath}${(0,t.getProperty)(i)}`,errSchemaPath:`${e.errSchemaPath}/${i}`}:{schema:n[o],schemaPath:(0,t._)`${e.schemaPath}${(0,t.getProperty)(i)}${(0,t.getProperty)(o)}`,errSchemaPath:`${e.errSchemaPath}/${i}/${(0,r.escapeFragment)(o)}`}}if(void 0!==n){if(void 0===a||void 0===s||void 0===d)throw Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:n,schemaPath:a,topSchemaRef:d,errSchemaPath:s}}throw Error('either "keyword" or "schema" must be passed')},e.extendSubschemaData=function(e,i,{dataProp:o,dataPropType:n,data:a,dataTypes:s,propertyName:d}){if(void 0!==a&&void 0!==o)throw Error('both "data" and "dataProp" passed, only one allowed');let{gen:c}=i;if(void 0!==o){let{errorPath:a,dataPathArr:s,opts:d}=i;l(c.let("data",(0,t._)`${i.data}${(0,t.getProperty)(o)}`,!0)),e.errorPath=(0,t.str)`${a}${(0,r.getErrorPath)(o,n,d.jsPropertySyntax)}`,e.parentDataProperty=(0,t._)`${o}`,e.dataPathArr=[...s,e.parentDataProperty]}function l(t){e.data=t,e.dataLevel=i.dataLevel+1,e.dataTypes=[],i.definedProperties=new Set,e.parentData=i.data,e.dataNames=[...i.dataNames,t]}void 0!==a&&(l(a instanceof t.Name?a:c.let("data",a,!0)),void 0!==d&&(e.propertyName=d)),s&&(e.dataTypes=s)},e.extendSubschemaMode=function(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:i,createErrors:o,allErrors:n}){void 0!==i&&(e.compositeRule=i),void 0!==o&&(e.createErrors=o),void 0!==n&&(e.allErrors=n),e.jtdDiscriminator=t,e.jtdMetadata=r}}),pt=eb((e,t)=>{t.exports=function e(t,r){if(t===r)return!0;if(t&&r&&"object"==typeof t&&"object"==typeof r){if(t.constructor!==r.constructor)return!1;if(Array.isArray(t)){if((i=t.length)!=r.length)return!1;for(o=i;0!=o--;)if(!e(t[o],r[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if((i=(n=Object.keys(t)).length)!==Object.keys(r).length)return!1;for(o=i;0!=o--;)if(!Object.prototype.hasOwnProperty.call(r,n[o]))return!1;for(o=i;0!=o--;){var i,o,n,a=n[o];if(!e(t[a],r[a]))return!1}return!0}return t!=t&&r!=r}}),pr=eb((e,t)=>{var r=t.exports=function(e,t,i){"function"==typeof t&&(i=t,t={});var o="function"==typeof(i=t.cb||i)?i:i.pre||function(){};!function e(t,i,o,n,a,s,d,c,l,p){if(n&&"object"==typeof n&&!Array.isArray(n)){for(var u in i(n,a,s,d,c,l,p),n){var m=n[u];if(Array.isArray(m)){if(u in r.arrayKeywords)for(var f=0;f{Object.defineProperty(e,"__esModule",{value:!0}),e.getSchemaRefs=e.resolveUrl=e.normalizeId=e._getFullPath=e.getFullPath=e.inlineRef=void 0;let t=l1(),r=pt(),i=pr(),o=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);e.inlineRef=function(e,r=!0){return"boolean"==typeof e||(!0===r?!function e(t){for(let r in t){if(n.has(r))return!0;let i=t[r];if(Array.isArray(i)&&i.some(e)||"object"==typeof i&&e(i))return!0}return!1}(e):!!r&&function e(r){let i=0;for(let n in r)if("$ref"===n||(i++,!o.has(n)&&("object"==typeof r[n]&&(0,t.eachItem)(r[n],t=>i+=e(t)),1/0===i)))return 1/0;return i}(e)<=r)};let n=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function a(e,t="",r){return!1!==r&&(t=c(t)),s(e,e.parse(t))}function s(e,t){return e.serialize(t).split("#")[0]+"#"}e.getFullPath=a,e._getFullPath=s;let d=/#\/?$/;function c(e){return e?e.replace(d,""):""}e.normalizeId=c,e.resolveUrl=function(e,t,r){return r=c(r),e.resolve(t,r)};let l=/^[a-z_][-a-z0-9._]*$/i;e.getSchemaRefs=function(e,t){if("boolean"==typeof e)return{};let{schemaId:o,uriResolver:n}=this.opts,s=c(e[o]||t),d={"":s},p=a(n,s,!1),u={},m=new Set;return i(e,{allKeys:!0},(e,t,r,i)=>{if(void 0===i)return;let n=p+t,a=d[i];function s(t){let r=this.opts.uriResolver.resolve;if(t=c(a?r(a,t):t),m.has(t))throw h(t);m.add(t);let i=this.refs[t];return"string"==typeof i&&(i=this.refs[i]),"object"==typeof i?f(e,i.schema,t):t!==c(n)&&("#"===t[0]?(f(e,u[t],t),u[t]=e):this.refs[t]=n),t}function y(e){if("string"==typeof e){if(!l.test(e))throw Error(`invalid anchor "${e}"`);s.call(this,`#${e}`)}}"string"==typeof e[o]&&(a=s.call(this,e[o])),y.call(this,e.$anchor),y.call(this,e.$dynamicAnchor),d[t]=a}),u;function f(e,t,i){if(void 0!==t&&!r(e,t))throw h(i)}function h(e){return Error(`reference "${e}" resolves to more than one schema`)}}}),po=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getData=e.KeywordCxt=e.validateFunctionCode=void 0;let t=l4(),r=l9(),i=l3(),o=l9(),n=l5(),a=l7(),s=pe(),d=lY(),c=l0(),l=pi(),p=l1(),u=l2();function m({gen:e,validateName:t,schema:r,schemaEnv:i,opts:o},n){var a;o.code.es5?e.func(t,(0,d._)`${c.default.data}, ${c.default.valCxt}`,i.$async,()=>{var t,i;e.code((0,d._)`"use strict"; ${f(r,o)}`),t=e,i=o,t.if(c.default.valCxt,()=>{t.var(c.default.instancePath,(0,d._)`${c.default.valCxt}.${c.default.instancePath}`),t.var(c.default.parentData,(0,d._)`${c.default.valCxt}.${c.default.parentData}`),t.var(c.default.parentDataProperty,(0,d._)`${c.default.valCxt}.${c.default.parentDataProperty}`),t.var(c.default.rootData,(0,d._)`${c.default.valCxt}.${c.default.rootData}`),i.dynamicRef&&t.var(c.default.dynamicAnchors,(0,d._)`${c.default.valCxt}.${c.default.dynamicAnchors}`)},()=>{t.var(c.default.instancePath,(0,d._)`""`),t.var(c.default.parentData,(0,d._)`undefined`),t.var(c.default.parentDataProperty,(0,d._)`undefined`),t.var(c.default.rootData,c.default.data),i.dynamicRef&&t.var(c.default.dynamicAnchors,(0,d._)`{}`)}),e.code(n)}):e.func(t,(0,d._)`${c.default.data}, ${(a=o,(0,d._)`{${c.default.instancePath}="", ${c.default.parentData}, ${c.default.parentDataProperty}, ${c.default.rootData}=${c.default.data}${a.dynamicRef?(0,d._)`, ${c.default.dynamicAnchors}={}`:d.nil}}={}`)}`,i.$async,()=>e.code(f(r,o)).code(n))}function f(e,t){let r="object"==typeof e&&e[t.schemaId];return r&&(t.code.source||t.code.process)?(0,d._)`/*# sourceURL=${r} */`:d.nil}function h({schema:e,self:t}){if("boolean"==typeof e)return!e;for(let r in e)if(t.RULES.all[r])return!0;return!1}function y(e){return"boolean"!=typeof e.schema}function g(e){(0,p.checkUnknownRules)(e),function(e){let{schema:t,errSchemaPath:r,opts:i,self:o}=e;t.$ref&&i.ignoreKeywordsWithRef&&(0,p.schemaHasRulesButRef)(t,o.RULES)&&o.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}(e)}function _(e,t){if(e.opts.jtd)return b(e,[],!1,t);let i=(0,r.getSchemaTypes)(e.schema);b(e,i,!(0,r.coerceAndCheckDataType)(e,i),t)}function v({gen:e,schemaEnv:t,schema:r,errSchemaPath:i,opts:o}){let n=r.$comment;if(!0===o.$comment)e.code((0,d._)`${c.default.self}.logger.log(${n})`);else if("function"==typeof o.$comment){let r=(0,d.str)`${i}/$comment`,o=e.scopeValue("root",{ref:t.root});e.code((0,d._)`${c.default.self}.opts.$comment(${n}, ${r}, ${o}.schema)`)}}function b(e,t,r,n){var a,s,l,u;let{gen:m,schema:f,data:h,allErrors:y,opts:g,self:_}=e,{RULES:v}=_;if(f.$ref&&(g.ignoreKeywordsWithRef||!(0,p.schemaHasRulesButRef)(f,v)))return void m.block(()=>V(e,"$ref",v.all.$ref.definition));function b(a){(0,i.shouldUseGroup)(f,a)&&(a.type?(m.if((0,o.checkDataType)(a.type,h,g.strictNumbers)),$(e,a),1===t.length&&t[0]===a.type&&r&&(m.else(),(0,o.reportTypeError)(e)),m.endIf()):$(e,a),y||m.if((0,d._)`${c.default.errors} === ${n||0}`))}g.jtd||(a=e,s=t,!a.schemaEnv.meta&&a.opts.strictTypes&&(function(e,t){if(t.length){if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach(t=>{S(e.dataTypes,t)||k(e,`type "${t}" not allowed by context "${e.dataTypes.join(",")}"`)}),function(e,t){let r=[];for(let i of e.dataTypes)S(t,i)?r.push(i):t.includes("integer")&&"number"===i&&r.push("integer");e.dataTypes=r}(e,t)}}(a,s),a.opts.allowUnionTypes||(l=a,(u=s).length>1&&!(2===u.length&&u.includes("null"))&&k(l,"use allowUnionTypes to allow union type keyword")),function(e,t){let r=e.self.RULES.all;for(let o in r){let n=r[o];if("object"==typeof n&&(0,i.shouldUseRule)(e.schema,n)){let{type:r}=n.definition;r.length&&!r.some(e=>{var r,i;return r=t,i=e,r.includes(i)||"number"===i&&r.includes("integer")})&&k(e,`missing type "${r.join(",")}" for keyword "${o}"`)}}}(a,a.dataTypes))),m.block(()=>{for(let e of v.rules)b(e);b(v.post)})}function $(e,t){let{gen:r,schema:o,opts:{useDefaults:a}}=e;a&&(0,n.assignDefaults)(e,t.type),r.block(()=>{for(let r of t.rules)(0,i.shouldUseRule)(o,r)&&V(e,r.keyword,r.definition,t.type)})}function S(e,t){return e.includes(t)||"integer"===t&&e.includes("number")}function k(e,t){let r=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${r}" (strictTypes)`,(0,p.checkStrictMode)(e,t,e.opts.strictTypes)}e.validateFunctionCode=function(e){y(e)&&(g(e),h(e))?function(e){let{schema:t,opts:r,gen:i}=e;m(e,()=>{r.$comment&&t.$comment&&v(e),function(e){let{schema:t,opts:r}=e;void 0!==t.default&&r.useDefaults&&r.strictSchema&&(0,p.checkStrictMode)(e,"default is ignored in the schema root")}(e),i.let(c.default.vErrors,null),i.let(c.default.errors,0),r.unevaluated&&function(e){let{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",(0,d._)`${r}.evaluated`),t.if((0,d._)`${e.evaluated}.dynamicProps`,()=>t.assign((0,d._)`${e.evaluated}.props`,(0,d._)`undefined`)),t.if((0,d._)`${e.evaluated}.dynamicItems`,()=>t.assign((0,d._)`${e.evaluated}.items`,(0,d._)`undefined`))}(e),_(e),function(e){let{gen:t,schemaEnv:r,validateName:i,ValidationError:o,opts:n}=e;r.$async?t.if((0,d._)`${c.default.errors} === 0`,()=>t.return(c.default.data),()=>t.throw((0,d._)`new ${o}(${c.default.vErrors})`)):(t.assign((0,d._)`${i}.errors`,c.default.vErrors),n.unevaluated&&function({gen:e,evaluated:t,props:r,items:i}){r instanceof d.Name&&e.assign((0,d._)`${t}.props`,r),i instanceof d.Name&&e.assign((0,d._)`${t}.items`,i)}(e),t.return((0,d._)`${c.default.errors} === 0`))}(e)})}(e):m(e,()=>(0,t.topBoolOrEmptySchema)(e))};var w=class{constructor(e,t,r){if((0,a.validateKeywordUsage)(e,t,r),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=r,this.data=e.data,this.schema=e.schema[r],this.$data=t.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,p.schemaRefOrVal)(e,this.schema,r,this.$data),this.schemaType=t.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=t,this.$data)this.schemaCode=e.gen.const("vSchema",q(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,a.validSchemaType)(this.schema,t.schemaType,t.allowUndefined))throw Error(`${r} value must be ${JSON.stringify(t.schemaType)}`);("code"in t?t.trackErrors:!1!==t.errors)&&(this.errsCount=e.gen.const("_errs",c.default.errors))}result(e,t,r){this.failResult((0,d.not)(e),t,r)}failResult(e,t,r){this.gen.if(e),r?r():this.error(),t?(this.gen.else(),t(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,t){this.failResult((0,d.not)(e),void 0,t)}fail(e){if(void 0===e){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);let{schemaCode:t}=this;this.fail((0,d._)`${t} !== undefined && (${(0,d.or)(this.invalid$data(),e)})`)}error(e,t,r){if(t){this.setParams(t),this._error(e,r),this.setParams({});return}this._error(e,r)}_error(e,t){(e?u.reportExtraError:u.reportError)(this,this.def.error,t)}$dataError(){(0,u.reportError)(this,this.def.$dataError||u.keyword$DataError)}reset(){if(void 0===this.errsCount)throw Error('add "trackErrors" to keyword definition');(0,u.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,t){t?Object.assign(this.params,e):this.params=e}block$data(e,t,r=d.nil){this.gen.block(()=>{this.check$data(e,r),t()})}check$data(e=d.nil,t=d.nil){if(!this.$data)return;let{gen:r,schemaCode:i,schemaType:o,def:n}=this;r.if((0,d.or)((0,d._)`${i} === undefined`,t)),e!==d.nil&&r.assign(e,!0),(o.length||n.validateSchema)&&(r.elseIf(this.invalid$data()),this.$dataError(),e!==d.nil&&r.assign(e,!1)),r.else()}invalid$data(){let{gen:e,schemaCode:t,schemaType:r,def:i,it:n}=this;return(0,d.or)(function(){if(r.length){if(!(t instanceof d.Name))throw Error("ajv implementation error");let e=Array.isArray(r)?r:[r];return(0,d._)`${(0,o.checkDataTypes)(e,t,n.opts.strictNumbers,o.DataType.Wrong)}`}return d.nil}(),function(){if(i.validateSchema){let r=e.scopeValue("validate$data",{ref:i.validateSchema});return(0,d._)`!${r}(${t})`}return d.nil}())}subschema(e,r){let i=(0,s.getSubschema)(this.it,e);(0,s.extendSubschemaData)(i,this.it,e),(0,s.extendSubschemaMode)(i,e);let o={...this.it,...i,items:void 0,props:void 0};return!function(e,r){if(y(e)&&(g(e),h(e)))return function(e,t){var r;let i,{schema:o,gen:n,opts:a}=e;a.$comment&&o.$comment&&v(e),(i=(r=e).schema[r.opts.schemaId])&&(r.baseId=(0,l.resolveUrl)(r.opts.uriResolver,r.baseId,i)),function(e){if(e.schema.$async&&!e.schemaEnv.$async)throw Error("async schema in sync schema")}(e);let s=n.const("_errs",c.default.errors);_(e,s),n.var(t,(0,d._)`${s} === ${c.default.errors}`)}(e,r);(0,t.boolOrEmptySchema)(e,r)}(o,r),o}mergeEvaluated(e,t){let{it:r,gen:i}=this;r.opts.unevaluated&&(!0!==r.props&&void 0!==e.props&&(r.props=p.mergeEvaluated.props(i,e.props,r.props,t)),!0!==r.items&&void 0!==e.items&&(r.items=p.mergeEvaluated.items(i,e.items,r.items,t)))}mergeValidEvaluated(e,t){let{it:r,gen:i}=this;if(r.opts.unevaluated&&(!0!==r.props||!0!==r.items))return i.if(t,()=>this.mergeEvaluated(e,d.Name)),!0}};function V(e,t,r,i){let o=new w(e,r,t);"code"in r?r.code(o,i):o.$data&&r.validate?(0,a.funcKeywordCode)(o,r):"macro"in r?(0,a.macroKeywordCode)(o,r):(r.compile||r.validate)&&(0,a.funcKeywordCode)(o,r)}e.KeywordCxt=w;let P=/^\/(?:[^~]|~0|~1)*$/,R=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function q(e,{dataLevel:t,dataNames:r,dataPathArr:i}){let o,n;if(""===e)return c.default.rootData;if("/"===e[0]){if(!P.test(e))throw Error(`Invalid JSON-pointer: ${e}`);o=e,n=c.default.rootData}else{let a=R.exec(e);if(!a)throw Error(`Invalid JSON-pointer: ${e}`);let d=+a[1];if("#"===(o=a[2])){if(d>=t)throw Error(s("property/index",d));return i[t-d]}if(d>t)throw Error(s("data",d));if(n=r[t-d],!o)return n}let a=n;for(let e of o.split("/"))e&&(n=(0,d._)`${n}${(0,d.getProperty)((0,p.unescapeJsonPointer)(e))}`,a=(0,d._)`${a} && ${n}`);return a;function s(e,r){return`Cannot access ${e} ${r} levels up, current level is ${t}`}}e.getData=q}),pn=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=class extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}}}),pa=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=pi();e.default=class extends Error{constructor(e,r,i,o){super(o||`can't resolve reference ${i} from id ${r}`),this.missingRef=(0,t.resolveUrl)(e,r,i),this.missingSchema=(0,t.normalizeId)((0,t.getFullPath)(e,this.missingRef))}}}),ps=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.resolveSchema=e.getCompilingSchema=e.resolveRef=e.compileSchema=e.SchemaEnv=void 0;let t=lY(),r=pn(),i=l0(),o=pi(),n=l1(),a=po();var s=class{constructor(e){var t;let r;this.refs={},this.dynamicAnchors={},"object"==typeof e.schema&&(r=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=null!=(t=e.baseId)?t:(0,o.normalizeId)(null==r?void 0:r[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=null==r?void 0:r.$async,this.refs={}}};function d(e){let n,s,d=l.call(this,e);if(d)return d;let c=(0,o.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:p,lines:u}=this.opts.code,{ownProperties:m}=this.opts,f=new t.CodeGen(this.scope,{es5:p,lines:u,ownProperties:m});e.$async&&(n=f.scopeValue("Error",{ref:r.default,code:(0,t._)`require("ajv/dist/runtime/validation_error").default`}));let h=f.scopeName("validate");e.validateName=h;let y={gen:f,allErrors:this.opts.allErrors,data:i.default.data,parentData:i.default.parentData,parentDataProperty:i.default.parentDataProperty,dataNames:[i.default.data],dataPathArr:[t.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:f.scopeValue("schema",!0===this.opts.code.source?{ref:e.schema,code:(0,t.stringify)(e.schema)}:{ref:e.schema}),validateName:h,ValidationError:n,schema:e.schema,schemaEnv:e,rootId:c,baseId:e.baseId||c,schemaPath:t.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,t._)`""`,opts:this.opts,self:this};try{this._compilations.add(e),(0,a.validateFunctionCode)(y),f.optimize(this.opts.code.optimize);let r=f.toString();s=`${f.scopeRefs(i.default.scope)}return ${r}`,this.opts.code.process&&(s=this.opts.code.process(s,e));let o=Function(`${i.default.self}`,`${i.default.scope}`,s)(this,this.scope.get());if(this.scope.value(h,{ref:o}),o.errors=null,o.schema=e.schema,o.schemaEnv=e,e.$async&&(o.$async=!0),!0===this.opts.code.source&&(o.source={validateName:h,validateCode:r,scopeValues:f._values}),this.opts.unevaluated){let{props:e,items:r}=y;o.evaluated={props:e instanceof t.Name?void 0:e,items:r instanceof t.Name?void 0:r,dynamicProps:e instanceof t.Name,dynamicItems:r instanceof t.Name},o.source&&(o.source.evaluated=(0,t.stringify)(o.evaluated))}return e.validate=o,e}catch(t){throw delete e.validate,delete e.validateName,s&&this.logger.error("Error compiling schema, function code:",s),t}finally{this._compilations.delete(e)}}function c(e){return(0,o.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:d.call(this,e)}function l(e){for(let i of this._compilations){var t,r;if(t=i,r=e,t.schema===r.schema&&t.root===r.root&&t.baseId===r.baseId)return i}}function p(e,t){let r;for(;"string"==typeof(r=this.refs[t]);)t=r;return r||this.schemas[t]||u.call(this,e,t)}function u(e,t){let r=this.opts.uriResolver.parse(t),i=(0,o._getFullPath)(this.opts.uriResolver,r),n=(0,o.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&i===n)return f.call(this,r,e);let a=(0,o.normalizeId)(i),c=this.refs[a]||this.schemas[a];if("string"==typeof c){let t=u.call(this,e,c);if("object"!=typeof(null==t?void 0:t.schema))return;return f.call(this,r,t)}if("object"==typeof(null==c?void 0:c.schema)){if(c.validate||d.call(this,c),a===(0,o.normalizeId)(t)){let{schema:t}=c,{schemaId:r}=this.opts,i=t[r];return i&&(n=(0,o.resolveUrl)(this.opts.uriResolver,n,i)),new s({schema:t,schemaId:r,root:e,baseId:n})}return f.call(this,r,c)}}e.SchemaEnv=s,e.compileSchema=d,e.resolveRef=function(e,t,r){var i;r=(0,o.resolveUrl)(this.opts.uriResolver,t,r);let n=e.refs[r];if(n)return n;let a=p.call(this,e,r);if(void 0===a){let o=null==(i=e.localRefs)?void 0:i[r],{schemaId:n}=this.opts;o&&(a=new s({schema:o,schemaId:n,root:e,baseId:t}))}if(void 0!==a)return e.refs[r]=c.call(this,a)},e.getCompilingSchema=l,e.resolveSchema=u;let m=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function f(e,{baseId:t,schema:r,root:i}){var a;let d;if((null==(a=e.fragment)?void 0:a[0])!=="/")return;for(let i of e.fragment.slice(1).split("/")){if("boolean"==typeof r)return;let e=r[(0,n.unescapeFragment)(i)];if(void 0===e)return;let a="object"==typeof(r=e)&&r[this.opts.schemaId];!m.has(i)&&a&&(t=(0,o.resolveUrl)(this.opts.uriResolver,t,a))}if("boolean"!=typeof r&&r.$ref&&!(0,n.schemaHasRulesButRef)(r,this.RULES)){let e=(0,o.resolveUrl)(this.opts.uriResolver,t,r.$ref);d=u.call(this,i,e)}let{schemaId:c}=this.opts;if((d=d||new s({schema:r,schemaId:c,root:i,baseId:t})).schema!==d.root.schema)return d}}),pd=eb((e,t)=>{t.exports={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}}),pc=eb((e,t)=>{let r=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),i=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u),o=RegExp.prototype.test.bind(/^\d*$/u),n=RegExp.prototype.test.bind(/^[\da-f]{2}$/iu),a=RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu),s=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:@/]$/u),d=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:@/?]$/u),c=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:]$/u),l=Array(256);{let e="0123456789ABCDEF";for(let t=0;t<256;t++)l[t]="%"+e[t>>4]+e[15&t]}function p(e){return e<2048?l[192|e>>6]+l[128|63&e]:e<65536?l[224|e>>12]+l[128|e>>6&63]+l[128|63&e]:l[240|e>>18]+l[128|e>>12&63]+l[128|e>>6&63]+l[128|63&e]}let u=RegExp.prototype.test.bind(/^[\dA-Fa-f]{1,4}$/),m=RegExp.prototype.test.bind(/^[vV][\dA-Fa-f]+\.[A-Za-z\d\-._~!$&'()*+,;=:]+$/),f=RegExp.prototype.test.bind(/^[A-Za-z\d\-._~]$/),h=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function y(e){let t=-1,r=0,i=-1,o=0;for(let n=0;nr&&(r=o,t=i)):(i=-1,o=0);return r<2?e.join(":"):e.slice(0,t).join(":")+"::"+e.slice(t+r).join(":")}function g(e){let t="["===e[0]&&"]"===e[e.length-1];if(("["===e[0]||"]"===e[e.length-1])&&!t)return{host:e,isIPV6:!1,error:!0};let r=t?e.slice(1,-1):e;if(t&&m(r))return r=r.toLowerCase(),{host:`[${r}]`,escapedHost:r,isIPV6:!1,isIPVFuture:!0};if(2>function(e){let t=0;for(let r=0;r=8)return;let s=n.slice(0,r.length);for(let e=a;e<8;e++)s.push("0");for(let e=r.length;e_[e])}function S(e,t=!1){if(-1===e.indexOf("%"))return e;let r="";for(let i=0;i57343)r+=p(t);else if(t<=56319&&i+1=56320&&o<=57343?(r+=p(65536+(t-55296<<10)+(o-56320)),i++):r+=p(65533)}else r+=p(65533)}}return r}function w(e){return k(e,c)}function V(e){return e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122||42===e||43===e||45===e||46===e||47===e||64===e||95===e}t.exports={nonSimpleDomain:h,recomposeAuthority:function(e){let t=[];if(void 0!==e.userinfo&&(t.push(w(e.userinfo)),t.push("@")),void 0!==e.host){let r=e.host;if(!i(r)){let e=g(r);!0!==e.isIPV6&&!0!==e.isIPVFuture&&(e=g(r=S(r,!0))),r=!0===e.isIPV6||!0===e.isIPVFuture?`[${e.escapedHost}]`:$(r,!1)}t.push(r)}if("number"==typeof e.port||"string"==typeof e.port){let r=String(e.port);if(!o(r))throw TypeError("URI port is malformed.");t.push(":"),t.push(r)}return t.length?t.join(""):void 0},reescapeHostDelimiters:$,normalizePercentEncoding:S,normalizePathEncoding:function(e){let t="";for(let r=0;r57343)t+=p(o);else if(o<=56319&&r+1=56320&&i<=57343?(t+=p(65536+(o-55296<<10)+(i-56320)),r++):t+=p(65533)}else t+=p(65533)}}return t},serializePathEncoding:function(e,t=!1){let r="",i=t&&"/"!==e[0];for(let t=0;t57343)r+=p(i);else if(i<=56319&&t+1=56320&&o<=57343?(r+=p(65536+(i-55296<<10)+(o-56320)),t++):r+=p(65533)}else r+=p(65533)}}return r},normalizeQueryFragmentEncoding:function(e){let t="";for(let r=0;r57343)t+=p(o);else if(o<=56319&&r+1=56320&&i<=57343?(t+=p(65536+(o-55296<<10)+(i-56320)),r++):t+=p(65533)}else t+=p(65533)}}return t},encodeUserinfo:w,encodeQuery:function(e){return k(e,d)},encodeFragment:function(e){return k(e,d)},escapePreservingEscapes:function(e){let t="";for(let r=0;r=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";t+=e[i];break}for(i+=1;i=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";t+=e[i]}return t}}}),pl=eb((e,t)=>{let{isUUID:r}=pc(),i=/^([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-./:;=@]|%[\da-f]{2})+)$/iu,o=["http","https","ws","wss","urn","urn:uuid"];function n(e){return!0===e.secure||!1!==e.secure&&!!e.scheme&&3===e.scheme.length&&("w"===e.scheme[0]||"W"===e.scheme[0])&&("s"===e.scheme[1]||"S"===e.scheme[1])&&("s"===e.scheme[2]||"S"===e.scheme[2])}function a(e){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e}function s(e){let t="https"===String(e.scheme).toLowerCase();return(e.port===(t?443:80)||""===e.port)&&(e.port=void 0),e.path||(e.path="/"),e}let d={scheme:"http",domainHost:!0,parse:a,serialize:s},c={scheme:"https",domainHost:d.domainHost,parse:a,serialize:s},l={scheme:"ws",domainHost:!0,parse:function(e){return e.secure=n(e),e.resourceName=(e.path||"/")+(e.query?"?"+e.query:""),e.path=void 0,e.query=void 0,e},serialize:function(e){if((e.port===(n(e)?443:80)||""===e.port)&&(e.port=void 0),"boolean"==typeof e.secure&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){let t=e.resourceName.indexOf("?"),r=-1===t?e.resourceName:e.resourceName.slice(0,t);e.path=r&&"/"!==r?r:void 0,e.query=-1===t?void 0:e.resourceName.slice(t+1),e.resourceName=void 0}return e.fragment=void 0,e}},p={scheme:"wss",domainHost:l.domainHost,parse:l.parse,serialize:l.serialize},u={http:d,https:c,ws:l,wss:p,urn:{scheme:"urn",parse:function(e,t){if(!e.path)return e.error="URN can not be parsed",e;let r=e.path.match(i);if(r&&r[0]===e.path){let i=t.scheme||e.scheme||"urn";e.nid=r[1].toLowerCase(),e.nss=r[2];let o=m(`${i}:${t.nid||e.nid}`);e.path=void 0,o&&(e=o.parse(e,t))}else e.error=e.error||"URN can not be parsed.";return e},serialize:function(e,t){if(void 0===e.nid)throw Error("URN without nid cannot be serialized");let r=t.scheme||e.scheme||"urn",i=e.nid.toLowerCase(),o=m(`${r}:${t.nid||i}`);o&&(e=o.serialize(e,t));let n=e,a=e.nss;return n.path=`${i||t.nid}:${a}`,t.skipEscape=!0,n},skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:function(e,t){return e.uuid=e.nss,e.nss=void 0,t.tolerant||e.uuid&&r(e.uuid)||(e.error=e.error||"UUID is not valid."),e},serialize:function(e){return e.nss=(e.uuid||"").toLowerCase(),e},skipNormalize:!0}};function m(e){return e&&(u[e]||u[e.toLowerCase()])||void 0}Object.setPrototypeOf(u,null),t.exports={wsIsSecure:n,SCHEMES:u,isValidSchemeName:function(e){return -1!==o.indexOf(e)},getSchemeHandler:m}}),pp=eb((e,t)=>{let{normalizeIPv6:r,removeDotSegments:i,recomposeAuthority:o,normalizePercentEncoding:n,normalizePathEncoding:a,serializePathEncoding:s,normalizeQueryFragmentEncoding:d,encodeQuery:c,encodeFragment:l,reescapeHostDelimiters:p,isIPv4:u,nonSimpleDomain:m}=pc(),{SCHEMES:f,getSchemeHandler:h}=pl(),y=/^[A-Za-z][A-Za-z0-9+.-]*$/u,g="URI scheme is malformed.";function _(e){let t=unescape(String(e));if(!y.test(t))throw TypeError(g);return t}function v(e,t,r,o){let n={};return o||(e=q(b(e,r),r),t=q(b(t,r),r)),!(r=r||{}).tolerant&&t.scheme?(n.scheme=t.scheme,n.userinfo=t.userinfo,n.host=t.host,n.port=t.port,n.path=i(t.path||""),n.query=t.query):(void 0!==t.userinfo||void 0!==t.host||void 0!==t.port?(n.userinfo=t.userinfo,n.host=t.host,n.port=t.port,n.path=i(t.path||""),n.query=t.query):(t.path?("/"===t.path[0]?n.path=i(t.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?n.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:n.path=t.path:n.path="/"+t.path,n.path=i(n.path)),n.query=t.query):(n.path=e.path,void 0!==t.query?n.query=t.query:n.query=e.query),n.userinfo=e.userinfo,n.host=e.host,n.port=e.port),n.scheme=e.scheme),n.fragment=t.fragment,n}function b(e,t){let r={host:e.host,scheme:e.scheme,userinfo:e.userinfo,port:e.port,path:e.path,query:e.query,nid:e.nid,nss:e.nss,uuid:e.uuid,fragment:e.fragment,reference:e.reference,resourceName:e.resourceName,secure:e.secure,error:""},a=Object.assign({},t),d=[];r.scheme&&(r.scheme=_(r.scheme));let p=h(a.scheme||r.scheme);p&&p.serialize&&p.serialize(r,a);let u=void 0!==r.userinfo||void 0!==r.host||void 0!==r.port,m=!a.skipEscape&&void 0===r.scheme&&!u;void 0!==r.path&&(a.skipEscape?r.path=n(r.path):r.path=s(r.path,m)),"suffix"!==a.reference&&r.scheme&&(r.scheme=_(r.scheme),d.push(r.scheme,":"));let f=o(r);if(void 0!==f&&("suffix"!==a.reference&&d.push("//"),d.push(f),r.path&&"/"!==r.path[0]&&d.push("/")),void 0!==r.path){let e=r.path;a.absolutePath||p&&p.absolutePath||(e=i(e)),m&&(e=s(e,!0)),void 0===f&&"/"===e[0]&&"/"===e[1]&&(e="/%2F"+e.slice(2)),d.push(e)}return void 0!==r.query&&d.push("?",c(r.query)),void 0!==r.fragment&&d.push("#",l(r.fragment)),d.join("")}let $=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u,S=/^(?:[^#/:?]+:)?\/\/([^/?#]*)/,k=/^(?:[^#/:?]+:)?([/\\\t\n\r]*)/;function w(e){if(void 0===e)return!1;let t=e.indexOf("%");for(;-1!==t;){if(t+2>=e.length||!/^[\da-f]{2}$/iu.test(e.slice(t+1,t+3)))return!0;t=e.indexOf("%",t+3)}return!1}function V(e){return"["===e[0]&&"]"===e[e.length-1]}function P(e,t,r,i){if(!t.unicodeSupport&&(!r||!r.unicodeSupport)&&e.host&&!V(e.host)&&(t.domainHost||r&&r.domainHost)&&!1===i&&m(e.host))try{e.host=new URL("http://"+e.host).hostname}catch(t){return e.error=e.error||"Host's domain name can not be converted to ASCII: "+t,!0}return!1}function R(e,t){let i=Object.assign({},t),o={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},s=!1,c=!1,l=!1,m=!1,_=!1,v=!1,b=!1;"suffix"===i.reference&&(e=i.scheme?i.scheme+":"+e:"//"+e);let R=e.match(S);null!==R&&-1!==R[1].indexOf("\\")&&(o.error="URI authority must not contain a literal backslash.",s=!0);let q=e.match(k);if(null!==q){let e=q[1],t=e.replace(/[\t\n\r]/g,"");t.length>=2&&("//"!==t.slice(0,2)?(o.error=o.error||"URI authority must not contain a literal backslash.",s=!0):e.length!==t.length&&(o.error=o.error||"URI authority introducer must not contain whitespace.",s=!0))}let I=e.match($);if(I){let t;if(o.scheme=I[1],o.userinfo=I[3],o.host=I[4],o.port=parseInt(I[5],10),o.path=I[6]||"",o.query=I[7],o.fragment=I[8],void 0!==o.scheme){let e=unescape(o.scheme);y.test(e)?o.scheme=e.toLowerCase():(o.error=o.error||g,v=!0)}t=I[4],(c=w(I[3])||void 0!==t&&!V(t)&&w(t)||w(I[6])||w(I[7])||w(I[8]))&&(o.error=o.error||"URI contains malformed percent-encoding."),isNaN(o.port)&&(o.port=I[5]);let $=void 0!==I[2]&&o.path&&"/"!==o.path[0]?'URI path must start with "/" when authority is present.':"number"==typeof o.port&&(o.port<0||o.port>65535)?"URI port is malformed.":void 0;if(void 0!==$&&(o.error=o.error||$,s=!0),o.host)if(!1===u(o.host)){let e=V(o.host),t=-1!==o.host.indexOf("[")||-1!==o.host.indexOf("]"),i=r(o.host);b=i.isIPV6||!0===i.isIPVFuture,_=t&&(!e||!0===i.error),o.host=b?i.host:i.host.toLowerCase(),_&&(o.error=o.error||"URI host is malformed.",s=!0)}else b=!0;void 0!==o.scheme||void 0!==o.userinfo||void 0!==o.host||void 0!==o.port||void 0!==o.query||o.path?void 0===o.scheme?o.reference="relative":void 0===o.fragment?o.reference="absolute":o.reference="uri":o.reference="same-document",i.reference&&"suffix"!==i.reference&&i.reference!==o.reference&&(o.error=o.error||"URI is not a "+i.reference+" reference.");let S=h(i.scheme||o.scheme);if(_||(m=P(o,i,S,b)),-1!==e.indexOf("%")&&void 0!==o.host&&!_){let e=b?o.host:n(o.host,!0);b||(e=n(e.toLowerCase())),o.host=p(e,b)}(!S||S&&!S.skipNormalize)&&(o.path&&(o.path=a(o.path)),o.query&&(o.query=d(o.query)),o.fragment&&(o.fragment=d(o.fragment))),S&&S.parse&&(S.parse(o,i),S===f.urn&&void 0===o.nid&&(l=!0))}else o.error=o.error||"URI can not be parsed.";return{parsed:o,malformedAuthorityOrPort:s,malformedPercentEncoding:c,malformedSchemeSpecific:l,malformedHost:m,malformedScheme:v}}function q(e,t){return R(e,t).parsed}function I(e,t){let{parsed:r,malformedAuthorityOrPort:i,malformedPercentEncoding:o,malformedSchemeSpecific:n,malformedHost:a,malformedScheme:s}=R(e,t);return{normalized:i||o||n||a||s?e:b(r,t),malformedAuthorityOrPort:i,malformedPercentEncoding:o,malformedSchemeSpecific:n,malformedHost:a,malformedScheme:s}}function x(e,t){let r;if("string"!=typeof e&&"object"!=typeof e)return;try{r="string"==typeof e?e:b(e,t)}catch{return}let{normalized:i,malformedAuthorityOrPort:o,malformedPercentEncoding:n,malformedSchemeSpecific:a,malformedHost:s,malformedScheme:d}=I(r,t);return o||n||a||s||d?void 0:i}let j={SCHEMES:f,normalize:function(e,t){return"string"==typeof e?e=I(e,t).normalized:"object"==typeof e&&(e=q(b(e,t),t)),e},resolve:function(e,t,i){let o=i?Object.assign({scheme:"null"},i):{scheme:"null"},{parsed:n,malformedAuthorityOrPort:a,malformedPercentEncoding:s,malformedSchemeSpecific:d,malformedHost:c,malformedScheme:l}=R(e,o),{parsed:p,malformedAuthorityOrPort:m,malformedPercentEncoding:f,malformedSchemeSpecific:y,malformedHost:g,malformedScheme:_}=R(t,o);if(a||m||s||f||d||y||c||g||l||_)throw Error(n.error||p.error||"URI is malformed.");let $=v(n,p,o,!0),S=h(i&&i.scheme||$.scheme),k=$.host;P($,i||{},S,void 0!==k&&""!==k&&(u(k)||r(k).isIPV6));let w=k&&-1!==k.indexOf("%")&&!/\P{ASCII}/u.test(k);if($.error&&!w)throw Error($.error);return o.skipEscape=!0,b($,o)},resolveComponent:v,equal:function(e,t,r){let i=x(e,r),o=x(t,r);return void 0!==i&&void 0!==o&&i===o},serialize:b,parse:q};t.exports=j,t.exports.default=j,t.exports.fastUri=j}),pu=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=pp();t.code='require("ajv/dist/runtime/uri").default',e.default=t}),pm=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var t=po();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var r=lY();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return r.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return r.CodeGen}});let i=pn(),o=pa(),n=l6(),a=ps(),s=lY(),d=pi(),c=l9(),l=l1(),p=pd(),u=pu(),m=(e,t)=>new RegExp(e,t);m.code="new RegExp";let f=["removeAdditional","useDefaults","coerceTypes"],h=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),y={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},g={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'};var _=class{constructor(e={}){var t,r,i,o,a,d,c,l,p,f,_,b,P,R,q,I,x,j,C,T,O,E,A,W,M,N;let z,D,F,L,U;this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...(z=(t=e).strict,F=!0===(D=null==(r=t.code)?void 0:r.optimize)||void 0===D?1:D||0,L=null!=(o=null==(i=t.code)?void 0:i.regExp)?o:m,U=null!=(a=t.uriResolver)?a:u.default,{strictSchema:null==(c=null!=(d=t.strictSchema)?d:z)||c,strictNumbers:null==(p=null!=(l=t.strictNumbers)?l:z)||p,strictTypes:null!=(_=null!=(f=t.strictTypes)?f:z)?_:"log",strictTuples:null!=(P=null!=(b=t.strictTuples)?b:z)?P:"log",strictRequired:null!=(q=null!=(R=t.strictRequired)?R:z)&&q,code:t.code?{...t.code,optimize:F,regExp:L}:{optimize:F,regExp:L},loopRequired:null!=(I=t.loopRequired)?I:200,loopEnum:null!=(x=t.loopEnum)?x:200,meta:null==(j=t.meta)||j,messages:null==(C=t.messages)||C,inlineRefs:null==(T=t.inlineRefs)||T,schemaId:null!=(O=t.schemaId)?O:"$id",addUsedSchema:null==(E=t.addUsedSchema)||E,validateSchema:null==(A=t.validateSchema)||A,validateFormats:null==(W=t.validateFormats)||W,unicodeRegExp:null==(M=t.unicodeRegExp)||M,int32range:null==(N=t.int32range)||N,uriResolver:U})};let{es5:H,lines:G}=this.opts.code;this.scope=new s.ValueScope({scope:{},prefixes:h,es5:H,lines:G}),this.logger=function(e){if(!1===e)return V;if(void 0===e)return console;if(e.log&&e.warn&&e.error)return e;throw Error("logger must implement log, warn and error methods")}(e.logger);let B=e.validateFormats;e.validateFormats=!1,this.RULES=(0,n.getRules)(),v.call(this,y,e,"NOT SUPPORTED"),v.call(this,g,e,"DEPRECATED","warn"),this._metaOpts=w.call(this),e.formats&&S.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&k.call(this,e.keywords),"object"==typeof e.meta&&this.addMetaSchema(e.meta),$.call(this),e.validateFormats=B}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:e,meta:t,schemaId:r}=this.opts,i=p;"id"===r&&((i={...p}).id=i.$id,delete i.$id),t&&e&&this.addMetaSchema(i,i[r],!1)}defaultMeta(){let{meta:e,schemaId:t}=this.opts;return this.opts.defaultMeta="object"==typeof e?e[t]||e:void 0}validate(e,t){let r;if("string"==typeof e){if(!(r=this.getSchema(e)))throw Error(`no schema with key or ref "${e}"`)}else r=this.compile(e);let i=r(t);return"$async"in r||(this.errors=r.errors),i}compile(e,t){let r=this._addSchema(e,t);return r.validate||this._compileSchemaEnv(r)}compileAsync(e,t){if("function"!=typeof this.opts.loadSchema)throw Error("options.loadSchema should be a function");let{loadSchema:r}=this.opts;return i.call(this,e,t);async function i(e,t){await n.call(this,e.$schema);let r=this._addSchema(e,t);return r.validate||a.call(this,r)}async function n(e){e&&!this.getSchema(e)&&await i.call(this,{$ref:e},!0)}async function a(e){try{return this._compileSchemaEnv(e)}catch(t){if(!(t instanceof o.default))throw t;return s.call(this,t),await d.call(this,t.missingSchema),a.call(this,e)}}function s({missingSchema:e,missingRef:t}){if(this.refs[e])throw Error(`AnySchema ${e} is loaded but ${t} cannot be resolved`)}async function d(e){let r=await c.call(this,e);this.refs[e]||await n.call(this,r.$schema),this.refs[e]||this.addSchema(r,e,t)}async function c(e){let t=this._loading[e];if(t)return t;try{return await (this._loading[e]=r(e))}finally{delete this._loading[e]}}}addSchema(e,t,r,i=this.opts.validateSchema){let o;if(Array.isArray(e)){for(let t of e)this.addSchema(t,void 0,r,i);return this}if("object"==typeof e){let{schemaId:t}=this.opts;if(void 0!==(o=e[t])&&"string"!=typeof o)throw Error(`schema ${t} must be string`)}return t=(0,d.normalizeId)(t||o),this._checkUnique(t),this.schemas[t]=this._addSchema(e,r,t,i,!0),this}addMetaSchema(e,t,r=this.opts.validateSchema){return this.addSchema(e,t,!0,r),this}validateSchema(e,t){let r;if("boolean"==typeof e)return!0;if(void 0!==(r=e.$schema)&&"string"!=typeof r)throw Error("$schema must be a string");if(!(r=r||this.opts.defaultMeta||this.defaultMeta()))return this.logger.warn("meta-schema not available"),this.errors=null,!0;let i=this.validate(r,e);if(!i&&t){let e="schema is invalid: "+this.errorsText();if("log"===this.opts.validateSchema)this.logger.error(e);else throw Error(e)}return i}getSchema(e){let t;for(;"string"==typeof(t=b.call(this,e));)e=t;if(void 0===t){let{schemaId:r}=this.opts,i=new a.SchemaEnv({schema:{},schemaId:r});if(!(t=a.resolveSchema.call(this,i,e)))return;this.refs[e]=t}return t.validate||this._compileSchemaEnv(t)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let t=b.call(this,e);return"object"==typeof t&&this._cache.delete(t.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{this._cache.delete(e);let t=e[this.opts.schemaId];return t&&(t=(0,d.normalizeId)(t),delete this.schemas[t],delete this.refs[t]),this}default:throw Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(let t of e)this.addKeyword(t);return this}addKeyword(e,t){let r;if("string"==typeof e)r=e,"object"==typeof t&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),t.keyword=r);else if("object"==typeof e&&void 0===t){if(Array.isArray(r=(t=e).keyword)&&!r.length)throw Error("addKeywords: keyword must be string or non-empty array")}else throw Error("invalid addKeywords parameters");if(R.call(this,r,t),!t)return(0,l.eachItem)(r,e=>q.call(this,e)),this;x.call(this,t);let i={...t,type:(0,c.getJSONTypes)(t.type),schemaType:(0,c.getJSONTypes)(t.schemaType)};return(0,l.eachItem)(r,0===i.type.length?e=>q.call(this,e,i):e=>i.type.forEach(t=>q.call(this,e,i,t))),this}getKeyword(e){let t=this.RULES.all[e];return"object"==typeof t?t.definition:!!t}removeKeyword(e){let{RULES:t}=this;for(let r of(delete t.keywords[e],delete t.all[e],t.rules)){let t=r.rules.findIndex(t=>t.keyword===e);t>=0&&r.rules.splice(t,1)}return this}addFormat(e,t){return"string"==typeof t&&(t=new RegExp(t)),this.formats[e]=t,this}errorsText(e=this.errors,{separator:t=", ",dataVar:r="data"}={}){return e&&0!==e.length?e.map(e=>`${r}${e.instancePath} ${e.message}`).reduce((e,r)=>e+t+r):"No errors"}$dataMetaSchema(e,t){let r=this.RULES.all;for(let i of(e=JSON.parse(JSON.stringify(e)),t)){let t=i.split("/").slice(1),o=e;for(let e of t)o=o[e];for(let e in r){let t=r[e];if("object"!=typeof t)continue;let{$data:i}=t.definition,n=o[e];i&&n&&(o[e]=C(n))}}return e}_removeAllSchemas(e,t){for(let r in e){let i=e[r];(!t||t.test(r))&&("string"==typeof i?delete e[r]:i&&!i.meta&&(this._cache.delete(i.schema),delete e[r]))}}_addSchema(e,t,r,i=this.opts.validateSchema,o=this.opts.addUsedSchema){let n,{schemaId:s}=this.opts;if("object"==typeof e)n=e[s];else if(this.opts.jtd)throw Error("schema must be object");else if("boolean"!=typeof e)throw Error("schema must be object or boolean");let c=this._cache.get(e);if(void 0!==c)return c;r=(0,d.normalizeId)(n||r);let l=d.getSchemaRefs.call(this,e,r);return c=new a.SchemaEnv({schema:e,schemaId:s,meta:t,baseId:r,localRefs:l}),this._cache.set(c.schema,c),o&&!r.startsWith("#")&&(r&&this._checkUnique(r),this.refs[r]=c),i&&this.validateSchema(e,!0),c}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):a.compileSchema.call(this,e),!e.validate)throw Error("ajv implementation error");return e.validate}_compileMetaSchema(e){let t=this.opts;this.opts=this._metaOpts;try{a.compileSchema.call(this,e)}finally{this.opts=t}}};function v(e,t,r,i="error"){for(let o in e)o in t&&this.logger[i](`${r}: option ${o}. ${e[o]}`)}function b(e){return e=(0,d.normalizeId)(e),this.schemas[e]||this.refs[e]}function $(){let e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(let t in e)this.addSchema(e[t],t)}function S(){for(let e in this.opts.formats){let t=this.opts.formats[e];t&&this.addFormat(e,t)}}function k(e){if(Array.isArray(e))return void this.addVocabulary(e);for(let t in this.logger.warn("keywords option as map is deprecated, pass array"),e){let r=e[t];r.keyword||(r.keyword=t),this.addKeyword(r)}}function w(){let e={...this.opts};for(let t of f)delete e[t];return e}_.ValidationError=i.default,_.MissingRefError=o.default,e.default=_;let V={log(){},warn(){},error(){}},P=/^[a-z_$][a-z0-9_$:-]*$/i;function R(e,t){let{RULES:r}=this;if((0,l.eachItem)(e,e=>{if(r.keywords[e])throw Error(`Keyword ${e} is already defined`);if(!P.test(e))throw Error(`Keyword ${e} has invalid name`)}),t&&t.$data&&!("code"in t||"validate"in t))throw Error('$data keyword must have "code" or "validate" function')}function q(e,t,r){var i;let o=null==t?void 0:t.post;if(r&&o)throw Error('keyword with "post" flag cannot have "type"');let{RULES:n}=this,a=o?n.post:n.rules.find(({type:e})=>e===r);if(a||(a={type:r,rules:[]},n.rules.push(a)),n.keywords[e]=!0,!t)return;let s={keyword:e,definition:{...t,type:(0,c.getJSONTypes)(t.type),schemaType:(0,c.getJSONTypes)(t.schemaType)}};t.before?I.call(this,a,s,t.before):a.rules.push(s),n.all[e]=s,null==(i=t.implements)||i.forEach(e=>this.addKeyword(e))}function I(e,t,r){let i=e.rules.findIndex(e=>e.keyword===r);i>=0?e.rules.splice(i,0,t):(e.rules.push(t),this.logger.warn(`rule ${r} is not defined`))}function x(e){let{metaSchema:t}=e;void 0!==t&&(e.$data&&this.opts.$data&&(t=C(t)),e.validateSchema=this.compile(t,!0))}let j={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function C(e){return{anyOf:[e,j]}}}),pf=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={keyword:"id",code(){throw Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}}}),ph=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.callRef=e.getValidate=void 0;let t=pa(),r=l8(),i=lY(),o=l0(),n=ps(),a=l1();function s(e,t){let{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):(0,i._)`${r.scopeValue("wrapper",{ref:t})}.validate`}function d(e,t,n,s){let{gen:d,it:c}=e,{allErrors:l,schemaEnv:p,opts:u}=c,m=u.passContext?o.default.this:i.nil;function f(e){let t=(0,i._)`${e}.errors`;d.assign(o.default.vErrors,(0,i._)`${o.default.vErrors} === null ? ${t} : ${o.default.vErrors}.concat(${t})`),d.assign(o.default.errors,(0,i._)`${o.default.vErrors}.length`)}function h(e){var t;if(!c.opts.unevaluated)return;let r=null==(t=null==n?void 0:n.validate)?void 0:t.evaluated;if(!0!==c.props)if(r&&!r.dynamicProps)void 0!==r.props&&(c.props=a.mergeEvaluated.props(d,r.props,c.props));else{let t=d.var("props",(0,i._)`${e}.evaluated.props`);c.props=a.mergeEvaluated.props(d,t,c.props,i.Name)}if(!0!==c.items)if(r&&!r.dynamicItems)void 0!==r.items&&(c.items=a.mergeEvaluated.items(d,r.items,c.items));else{let t=d.var("items",(0,i._)`${e}.evaluated.items`);c.items=a.mergeEvaluated.items(d,t,c.items,i.Name)}}s?function(){if(!p.$async)throw Error("async schema referenced by sync schema");let o=d.let("valid");d.try(()=>{d.code((0,i._)`await ${(0,r.callValidateCode)(e,t,m)}`),h(t),l||d.assign(o,!0)},e=>{d.if((0,i._)`!(${e} instanceof ${c.ValidationError})`,()=>d.throw(e)),f(e),l||d.assign(o,!1)}),e.ok(o)}():e.result((0,r.callValidateCode)(e,t,m),()=>h(t),()=>f(t))}e.getValidate=s,e.callRef=d,e.default={keyword:"$ref",schemaType:"string",code(e){var r,o;let a,c,l,{gen:p,schema:u,it:m}=e,{baseId:f,schemaEnv:h,validateName:y,opts:g,self:_}=m,{root:v}=h;if(("#"===u||"#/"===u)&&f===v.baseId){if(h===v)return d(e,y,h,h.$async);let t=p.scopeValue("root",{ref:v});return d(e,(0,i._)`${t}.validate`,v,v.$async)}let b=n.resolveRef.call(_,v,f,u);if(void 0===b)throw new t.default(m.opts.uriResolver,f,u);return b instanceof n.SchemaEnv?void d(e,s(e,r=b),r,r.$async):(o=b,a=p.scopeValue("schema",!0===g.code.source?{ref:o,code:(0,i.stringify)(o)}:{ref:o}),c=p.name("valid"),l=e.subschema({schema:o,dataTypes:[],schemaPath:i.nil,topSchemaRef:a,errSchemaPath:u},c),void(e.mergeEvaluated(l),e.ok(c)))}}}),py=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=pf(),r=ph();e.default=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",t.default,r.default]}),pg=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=lY(),r=t.operators,i={maximum:{okStr:"<=",ok:r.LTE,fail:r.GT},minimum:{okStr:">=",ok:r.GTE,fail:r.LT},exclusiveMaximum:{okStr:"<",ok:r.LT,fail:r.GTE},exclusiveMinimum:{okStr:">",ok:r.GT,fail:r.LTE}};e.default={keyword:Object.keys(i),type:"number",schemaType:"number",$data:!0,error:{message:({keyword:e,schemaCode:r})=>(0,t.str)`must be ${i[e].okStr} ${r}`,params:({keyword:e,schemaCode:r})=>(0,t._)`{comparison: ${i[e].okStr}, limit: ${r}}`},code(e){let{keyword:r,data:o,schemaCode:n}=e;e.fail$data((0,t._)`${o} ${i[r].fail} ${n} || isNaN(${o})`)}}}),p_=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=lY();e.default={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:e})=>(0,t.str)`must be multiple of ${e}`,params:({schemaCode:e})=>(0,t._)`{multipleOf: ${e}}`},code(e){let{gen:r,data:i,schemaCode:o,it:n}=e,a=n.opts.multipleOfPrecision,s=r.let("res"),d=a?(0,t._)`Math.abs(Math.round(${s}) - ${s}) > 1e-${a}`:(0,t._)`${s} !== parseInt(${s})`;e.fail$data((0,t._)`(${o} === 0 || (${s} = ${i}/${o}, ${d}))`)}}}),pv=eb(e=>{function t(e){let t,r=e.length,i=0,o=0;for(;o=55296&&t<=56319&&o{Object.defineProperty(e,"__esModule",{value:!0});let t=lY(),r=l1(),i=pv();e.default={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message:({keyword:e,schemaCode:r})=>(0,t.str)`must NOT have ${"maxLength"===e?"more":"fewer"} than ${r} characters`,params:({schemaCode:e})=>(0,t._)`{limit: ${e}}`},code(e){let{keyword:o,data:n,schemaCode:a,it:s}=e,d="maxLength"===o?t.operators.GT:t.operators.LT,c=!1===s.opts.unicode?(0,t._)`${n}.length`:(0,t._)`${(0,r.useFunc)(e.gen,i.default)}(${n})`;e.fail$data((0,t._)`${c} ${d} ${a}`)}}}),p$=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=l8(),r=l1(),i=lY();e.default={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>(0,i.str)`must match pattern "${e}"`,params:({schemaCode:e})=>(0,i._)`{pattern: ${e}}`},code(e){let{gen:o,data:n,$data:a,schema:s,schemaCode:d,it:c}=e,l=c.opts.unicodeRegExp?"u":"";if(a){let{regExp:t}=c.opts.code,a="new RegExp"===t.code?(0,i._)`new RegExp`:(0,r.useFunc)(o,t),s=o.let("valid");o.try(()=>o.assign(s,(0,i._)`${a}(${d}, ${l}).test(${n})`),()=>o.assign(s,!1)),e.fail$data((0,i._)`!${s}`)}else{let r=(0,t.usePattern)(e,s);e.fail$data((0,i._)`!${r}.test(${n})`)}}}}),pS=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=lY();e.default={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message:({keyword:e,schemaCode:r})=>(0,t.str)`must NOT have ${"maxProperties"===e?"more":"fewer"} than ${r} properties`,params:({schemaCode:e})=>(0,t._)`{limit: ${e}}`},code(e){let{keyword:r,data:i,schemaCode:o}=e,n="maxProperties"===r?t.operators.GT:t.operators.LT;e.fail$data((0,t._)`Object.keys(${i}).length ${n} ${o}`)}}}),pk=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=l8(),r=lY(),i=l1();e.default={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:e}})=>(0,r.str)`must have required property '${e}'`,params:({params:{missingProperty:e}})=>(0,r._)`{missingProperty: ${e}}`},code(e){let{gen:o,schema:n,schemaCode:a,data:s,$data:d,it:c}=e,{opts:l}=c;if(!d&&0===n.length)return;let p=n.length>=l.loopRequired;if(c.allErrors?function(){if(p||d)e.block$data(r.nil,u);else for(let r of n)(0,t.checkReportMissingProp)(e,r)}():function(){let i=o.let("missing");if(p||d){let n=o.let("valid",!0);e.block$data(n,()=>{var d,c;return d=i,c=n,void(e.setParams({missingProperty:d}),o.forOf(d,a,()=>{o.assign(c,(0,t.propertyInData)(o,s,d,l.ownProperties)),o.if((0,r.not)(c),()=>{e.error(),o.break()})},r.nil))}),e.ok(n)}else o.if((0,t.checkMissingProp)(e,n,i)),(0,t.reportMissingProp)(e,i),o.else()}(),l.strictRequired){let t=e.parentSchema.properties,{definedProperties:r}=e.it;for(let e of n)if((null==t?void 0:t[e])===void 0&&!r.has(e)){let t=`required property "${e}" is not defined at "${c.schemaEnv.baseId+c.errSchemaPath}" (strictRequired)`;(0,i.checkStrictMode)(c,t,c.opts.strictRequired)}}function u(){o.forOf("prop",a,r=>{e.setParams({missingProperty:r}),o.if((0,t.noPropertyInData)(o,s,r,l.ownProperties),()=>e.error())})}}}}),pw=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=lY();e.default={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message:({keyword:e,schemaCode:r})=>(0,t.str)`must NOT have ${"maxItems"===e?"more":"fewer"} than ${r} items`,params:({schemaCode:e})=>(0,t._)`{limit: ${e}}`},code(e){let{keyword:r,data:i,schemaCode:o}=e,n="maxItems"===r?t.operators.GT:t.operators.LT;e.fail$data((0,t._)`${i}.length ${n} ${o}`)}}}),pV=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=pt();t.code='require("ajv/dist/runtime/equal").default',e.default=t}),pP=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=l9(),r=lY(),i=l1(),o=pV();e.default={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:e,j:t}})=>(0,r.str)`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>(0,r._)`{i: ${e}, j: ${t}}`},code(e){let{gen:n,data:a,$data:s,schema:d,parentSchema:c,schemaCode:l,it:p}=e;if(!s&&!d)return;let u=n.let("valid"),m=c.items?(0,t.getSchemaTypes)(c.items):[];e.block$data(u,function(){let s=n.let("i",(0,r._)`${a}.length`),d=n.let("j");e.setParams({i:s,j:d}),n.assign(u,!0),n.if((0,r._)`${s} > 1`,()=>(m.length>0&&!m.some(e=>"object"===e||"array"===e)?function(i,o){let s=n.name("item"),d=(0,t.checkDataTypes)(m,s,p.opts.strictNumbers,t.DataType.Wrong),c=n.const("indices",(0,r._)`{}`);n.for((0,r._)`;${i}--;`,()=>{n.let(s,(0,r._)`${a}[${i}]`),n.if(d,(0,r._)`continue`),m.length>1&&n.if((0,r._)`typeof ${s} == "string"`,(0,r._)`${s} += "_"`),n.if((0,r._)`typeof ${c}[${s}] == "number"`,()=>{n.assign(o,(0,r._)`${c}[${s}]`),e.error(),n.assign(u,!1).break()}).code((0,r._)`${c}[${s}] = ${i}`)})}:function(t,s){let d=(0,i.useFunc)(n,o.default),c=n.name("outer");n.label(c).for((0,r._)`;${t}--;`,()=>n.for((0,r._)`${s} = ${t}; ${s}--;`,()=>n.if((0,r._)`${d}(${a}[${t}], ${a}[${s}])`,()=>{e.error(),n.assign(u,!1).break(c)})))})(s,d))},(0,r._)`${l} === false`),e.ok(u)}}}),pR=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=lY(),r=l1(),i=pV();e.default={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:e})=>(0,t._)`{allowedValue: ${e}}`},code(e){let{gen:o,data:n,$data:a,schemaCode:s,schema:d}=e;a||d&&"object"==typeof d?e.fail$data((0,t._)`!${(0,r.useFunc)(o,i.default)}(${n}, ${s})`):e.fail((0,t._)`${d} !== ${n}`)}}}),pq=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=lY(),r=l1(),i=pV();e.default={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:e})=>(0,t._)`{allowedValues: ${e}}`},code(e){let o,n,{gen:a,data:s,$data:d,schema:c,schemaCode:l,it:p}=e;if(!d&&0===c.length)throw Error("enum must have non-empty array");let u=c.length>=p.opts.loopEnum,m=()=>null!=o?o:o=(0,r.useFunc)(a,i.default);if(u||d)n=a.let("valid"),e.block$data(n,function(){a.assign(n,!1),a.forOf("v",l,e=>a.if((0,t._)`${m()}(${s}, ${e})`,()=>a.assign(n,!0).break()))});else{if(!Array.isArray(c))throw Error("ajv implementation error");let e=a.const("vSchema",l);n=(0,t.or)(...c.map((r,i)=>{var o,n;let a;return o=e,"object"==typeof(a=c[n=i])&&null!==a?(0,t._)`${m()}(${s}, ${o}[${n}])`:(0,t._)`${s} === ${a}`}))}e.pass(n)}}}),pI=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=pg(),r=p_(),i=pb(),o=p$(),n=pS(),a=pk(),s=pw(),d=pP(),c=pR(),l=pq();e.default=[t.default,r.default,i.default,o.default,n.default,a.default,s.default,d.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},c.default,l.default]}),px=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateAdditionalItems=void 0;let t=lY(),r=l1();function i(e,i){let{gen:o,schema:n,data:a,keyword:s,it:d}=e;d.items=!0;let c=o.const("len",(0,t._)`${a}.length`);if(!1===n)e.setParams({len:i.length}),e.pass((0,t._)`${c} <= ${i.length}`);else if("object"==typeof n&&!(0,r.alwaysValidSchema)(d,n)){let n=o.var("valid",(0,t._)`${c} <= ${i.length}`);o.if((0,t.not)(n),()=>{var a;return a=n,void o.forRange("i",i.length,c,i=>{e.subschema({keyword:s,dataProp:i,dataPropType:r.Type.Num},a),d.allErrors||o.if((0,t.not)(a),()=>o.break())})}),e.ok(n)}}e.validateAdditionalItems=i,e.default={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:e}})=>(0,t.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,t._)`{limit: ${e}}`},code(e){let{parentSchema:t,it:o}=e,{items:n}=t;Array.isArray(n)?i(e,n):(0,r.checkStrictMode)(o,'"additionalItems" is ignored when "items" is not an array of schemas')}}}),pj=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateTuple=void 0;let t=lY(),r=l1(),i=l8();function o(e,i,n=e.schema){let{gen:a,parentSchema:s,data:d,keyword:c,it:l}=e;(function(e){let{opts:t,errSchemaPath:o}=l,a=n.length,s=a===e.minItems&&(a===e.maxItems||!1===e[i]);if(t.strictTuples&&!s){let e=`"${c}" is ${a}-tuple, but minItems or maxItems/${i} are not specified or different at path "${o}"`;(0,r.checkStrictMode)(l,e,t.strictTuples)}})(s),l.opts.unevaluated&&n.length&&!0!==l.items&&(l.items=r.mergeEvaluated.items(a,n.length,l.items));let p=a.name("valid"),u=a.const("len",(0,t._)`${d}.length`);n.forEach((i,o)=>{(0,r.alwaysValidSchema)(l,i)||(a.if((0,t._)`${u} > ${o}`,()=>e.subschema({keyword:c,schemaProp:o,dataProp:o},p)),e.ok(p))})}e.validateTuple=o,e.default={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){let{schema:t,it:n}=e;if(Array.isArray(t))return o(e,"additionalItems",t);n.items=!0,(0,r.alwaysValidSchema)(n,t)||e.ok((0,i.validateArray)(e))}}}),pC=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=pj();e.default={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,t.validateTuple)(e,"items")}}),pT=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=lY(),r=l1(),i=l8(),o=px();e.default={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:e}})=>(0,t.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,t._)`{limit: ${e}}`},code(e){let{schema:t,parentSchema:n,it:a}=e,{prefixItems:s}=n;a.items=!0,(0,r.alwaysValidSchema)(a,t)||(s?(0,o.validateAdditionalItems)(e,s):e.ok((0,i.validateArray)(e)))}}}),pO=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=lY(),r=l1();e.default={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:e,max:r}})=>void 0===r?(0,t.str)`must contain at least ${e} valid item(s)`:(0,t.str)`must contain at least ${e} and no more than ${r} valid item(s)`,params:({params:{min:e,max:r}})=>void 0===r?(0,t._)`{minContains: ${e}}`:(0,t._)`{minContains: ${e}, maxContains: ${r}}`},code(e){let i,o,{gen:n,schema:a,parentSchema:s,data:d,it:c}=e,{minContains:l,maxContains:p}=s;c.opts.next?(i=void 0===l?1:l,o=p):i=1;let u=n.const("len",(0,t._)`${d}.length`);if(e.setParams({min:i,max:o}),void 0===o&&0===i)return void(0,r.checkStrictMode)(c,'"minContains" == 0 without "maxContains": "contains" keyword ignored');if(void 0!==o&&i>o){(0,r.checkStrictMode)(c,'"minContains" > "maxContains" is always invalid'),e.fail();return}if((0,r.alwaysValidSchema)(c,a)){let r=(0,t._)`${u} >= ${i}`;void 0!==o&&(r=(0,t._)`${r} && ${u} <= ${o}`),e.pass(r);return}c.items=!0;let m=n.name("valid");function f(){let e=n.name("_valid"),r=n.let("count",0);h(e,()=>n.if(e,()=>{var e;return e=r,void(n.code((0,t._)`${e}++`),void 0===o?n.if((0,t._)`${e} >= ${i}`,()=>n.assign(m,!0).break()):(n.if((0,t._)`${e} > ${o}`,()=>n.assign(m,!1).break()),1===i?n.assign(m,!0):n.if((0,t._)`${e} >= ${i}`,()=>n.assign(m,!0))))}))}function h(t,i){n.forRange("i",0,u,o=>{e.subschema({keyword:"contains",dataProp:o,dataPropType:r.Type.Num,compositeRule:!0},t),i()})}void 0===o&&1===i?h(m,()=>n.if(m,()=>n.break())):0===i?(n.let(m,!0),void 0!==o&&n.if((0,t._)`${d}.length > 0`,f)):(n.let(m,!1),f()),e.result(m,()=>e.reset())}}}),pE=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;let t=lY(),r=l1(),i=l8();e.error={message:({params:{property:e,depsCount:r,deps:i}})=>(0,t.str)`must have ${1===r?"property":"properties"} ${i} when property ${e} is present`,params:({params:{property:e,depsCount:r,deps:i,missingProperty:o}})=>(0,t._)`{property: ${e}, missingProperty: ${o}, depsCount: ${r}, - deps: ${i}}`};let o={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(e){let[t,r]=function({schema:e}){let t={},r={};for(let i in e)"__proto__"!==i&&((Array.isArray(e[i])?t:r)[i]=e[i]);return[t,r]}(e);n(e,t),a(e,r)}};function n(e,r=e.schema){let{gen:o,data:a,it:s}=e;if(0===Object.keys(r).length)return;let d=o.let("missing");for(let n in r){let c=r[n];if(0===c.length)continue;let l=(0,i.propertyInData)(o,a,n,s.opts.ownProperties);e.setParams({property:n,depsCount:c.length,deps:c.join(", ")}),s.allErrors?o.if(l,()=>{for(let t of c)(0,i.checkReportMissingProp)(e,t)}):(o.if((0,t._)`${l} && (${(0,i.checkMissingProp)(e,c,d)})`),(0,i.reportMissingProp)(e,d),o.else())}}function a(e,t=e.schema){let{gen:o,data:n,keyword:s,it:d}=e,c=o.name("valid");for(let a in t)(0,r.alwaysValidSchema)(d,t[a])||(o.if((0,i.propertyInData)(o,n,a,d.opts.ownProperties),()=>{let t=e.subschema({keyword:s,schemaProp:a},c);e.mergeValidEvaluated(t,c)},()=>o.var(c,!0)),e.ok(c))}e.validatePropertyDeps=n,e.validateSchemaDeps=a,e.default=o}),pA=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=lY(),r=l1();e.default={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:e})=>(0,t._)`{propertyName: ${e.propertyName}}`},code(e){let{gen:i,schema:o,data:n,it:a}=e;if((0,r.alwaysValidSchema)(a,o))return;let s=i.name("valid");i.forIn("key",n,r=>{e.setParams({propertyName:r}),e.subschema({keyword:"propertyNames",data:r,dataTypes:["string"],propertyName:r,compositeRule:!0},s),i.if((0,t.not)(s),()=>{e.error(!0),a.allErrors||i.break()})}),e.ok(s)}}}),pM=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=l8(),r=lY(),i=l0(),o=l1();e.default={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:e})=>(0,r._)`{additionalProperty: ${e.additionalProperty}}`},code(e){let{gen:n,schema:a,parentSchema:s,data:d,errsCount:c,it:l}=e;if(!c)throw Error("ajv implementation error");let{allErrors:p,opts:u}=l;if(l.props=!0,"all"!==u.removeAdditional&&(0,o.alwaysValidSchema)(l,a))return;let m=(0,t.allSchemaProperties)(s.properties),f=(0,t.allSchemaProperties)(s.patternProperties);function h(e){n.code((0,r._)`delete ${d}[${e}]`)}function y(t){if("all"===u.removeAdditional||u.removeAdditional&&!1===a)return void h(t);if(!1===a){e.setParams({additionalProperty:t}),e.error(),p||n.break();return}if("object"==typeof a&&!(0,o.alwaysValidSchema)(l,a)){let i=n.name("valid");"failing"===u.removeAdditional?(g(t,i,!1),n.if((0,r.not)(i),()=>{e.reset(),h(t)})):(g(t,i),p||n.if((0,r.not)(i),()=>n.break()))}}function g(t,r,i){let n={keyword:"additionalProperties",dataProp:t,dataPropType:o.Type.Str};!1===i&&Object.assign(n,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(n,r)}n.forIn("key",d,i=>{m.length||f.length?n.if(function(i){let a;if(m.length>8){let e=(0,o.schemaRefOrVal)(l,s.properties,"properties");a=(0,t.isOwnProperty)(n,e,i)}else a=m.length?(0,r.or)(...m.map(e=>(0,r._)`${i} === ${e}`)):r.nil;return f.length&&(a=(0,r.or)(a,...f.map(o=>(0,r._)`${(0,t.usePattern)(e,o)}.test(${i})`))),(0,r.not)(a)}(i),()=>y(i)):y(i)}),e.ok((0,r._)`${c} === ${i.default.errors}`)}}}),pW=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=po(),r=l8(),i=l1(),o=pM();e.default={keyword:"properties",type:"object",schemaType:"object",code(e){let{gen:n,schema:a,parentSchema:s,data:d,it:c}=e;"all"===c.opts.removeAdditional&&void 0===s.additionalProperties&&o.default.code(new t.KeywordCxt(c,o.default,"additionalProperties"));let l=(0,r.allSchemaProperties)(a);for(let e of l)c.definedProperties.add(e);c.opts.unevaluated&&l.length&&!0!==c.props&&(c.props=i.mergeEvaluated.props(n,(0,i.toHash)(l),c.props));let p=l.filter(e=>!(0,i.alwaysValidSchema)(c,a[e]));if(0===p.length)return;let u=n.name("valid");for(let t of p){var m;(m=t,c.opts.useDefaults&&!c.compositeRule&&void 0!==a[m].default)?f(t):(n.if((0,r.propertyInData)(n,d,t,c.opts.ownProperties)),f(t),c.allErrors||n.else().var(u,!0),n.endIf()),e.it.definedProperties.add(t),e.ok(u)}function f(t){e.subschema({keyword:"properties",schemaProp:t,dataProp:t},u)}}}}),pN=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=l8(),r=lY(),i=l1(),o=l1();e.default={keyword:"patternProperties",type:"object",schemaType:"object",code(e){let{gen:n,schema:a,data:s,parentSchema:d,it:c}=e,{opts:l}=c,p=(0,t.allSchemaProperties)(a),u=p.filter(e=>(0,i.alwaysValidSchema)(c,a[e]));if(0===p.length||u.length===p.length&&(!c.opts.unevaluated||!0===c.props))return;let m=l.strictSchema&&!l.allowMatchingProperties&&d.properties,f=n.name("valid");!0===c.props||c.props instanceof r.Name||(c.props=(0,o.evaluatedPropsToName)(n,c.props));let{props:h}=c;for(let e of p)m&&function(e){for(let t in m)new RegExp(e).test(t)&&(0,i.checkStrictMode)(c,`property ${t} matches pattern ${e} (use allowMatchingProperties)`)}(e),c.allErrors?y(e):(n.var(f,!0),y(e),n.if(f));function y(i){n.forIn("key",s,a=>{n.if((0,r._)`${(0,t.usePattern)(e,i)}.test(${a})`,()=>{let t=u.includes(i);t||e.subschema({keyword:"patternProperties",schemaProp:i,dataProp:a,dataPropType:o.Type.Str},f),c.opts.unevaluated&&!0!==h?n.assign((0,r._)`${h}[${a}]`,!0):t||c.allErrors||n.if((0,r.not)(f),()=>n.break())})})}}}}),pz=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=l1();e.default={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){let{gen:r,schema:i,it:o}=e;if((0,t.alwaysValidSchema)(o,i))return void e.fail();let n=r.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},n),e.failResult(n,()=>e.reset(),()=>e.error())},error:{message:"must NOT be valid"}}}),pD=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:l8().validateUnion,error:{message:"must match a schema in anyOf"}}}),pF=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=lY(),r=l1();e.default={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:e})=>(0,t._)`{passingSchemas: ${e.passing}}`},code(e){let{gen:i,schema:o,parentSchema:n,it:a}=e;if(!Array.isArray(o))throw Error("ajv implementation error");if(a.opts.discriminator&&n.discriminator)return;let s=i.let("valid",!1),d=i.let("passing",null),c=i.name("_valid");e.setParams({passing:d}),i.block(function(){o.forEach((o,n)=>{let l;(0,r.alwaysValidSchema)(a,o)?i.var(c,!0):l=e.subschema({keyword:"oneOf",schemaProp:n,compositeRule:!0},c),n>0&&i.if((0,t._)`${c} && ${s}`).assign(s,!1).assign(d,(0,t._)`[${d}, ${n}]`).else(),i.if(c,()=>{i.assign(s,!0),i.assign(d,n),l&&e.mergeEvaluated(l,t.Name)})})}),e.result(s,()=>e.reset(),()=>e.error(!0))}}}),pL=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=l1();e.default={keyword:"allOf",schemaType:"array",code(e){let{gen:r,schema:i,it:o}=e;if(!Array.isArray(i))throw Error("ajv implementation error");let n=r.name("valid");i.forEach((r,i)=>{if((0,t.alwaysValidSchema)(o,r))return;let a=e.subschema({keyword:"allOf",schemaProp:i},n);e.ok(n),e.mergeEvaluated(a)})}}}),pU=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=lY(),r=l1();function i(e,t){let i=e.schema[t];return void 0!==i&&!(0,r.alwaysValidSchema)(e,i)}e.default={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:e})=>(0,t.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,t._)`{failingKeyword: ${e.ifClause}}`},code(e){let o,{gen:n,parentSchema:a,it:s}=e;void 0===a.then&&void 0===a.else&&(0,r.checkStrictMode)(s,'"if" without "then" and "else" is ignored');let d=i(s,"then"),c=i(s,"else");if(!d&&!c)return;let l=n.let("valid",!0),p=n.name("_valid");if(o=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},p),e.mergeEvaluated(o),e.reset(),d&&c){let t=n.let("ifClause");e.setParams({ifClause:t}),n.if(p,u("then",t),u("else",t))}else d?n.if(p,u("then")):n.if((0,t.not)(p),u("else"));function u(r,i){return()=>{let o=e.subschema({keyword:r},p);n.assign(l,p),e.mergeValidEvaluated(o,l),i?n.assign(i,(0,t._)`${r}`):e.setParams({ifClause:r})}}e.pass(l,()=>e.error(!0))}}}),pH=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=l1();e.default={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:r,it:i}){void 0===r.if&&(0,t.checkStrictMode)(i,`"${e}" without "if" is ignored`)}}}),pG=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=px(),r=pC(),i=pj(),o=pT(),n=pO(),a=pE(),s=pA(),d=pM(),c=pW(),l=pN(),p=pz(),u=pD(),m=pF(),f=pL(),h=pU(),y=pH();e.default=function(e=!1){let g=[p.default,u.default,m.default,f.default,h.default,y.default,s.default,d.default,a.default,c.default,l.default];return e?g.push(r.default,o.default):g.push(t.default,i.default),g.push(n.default),g}}),pB=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=lY();e.default={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>(0,t.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,t._)`{format: ${e}}`},code(e,r){let i,o,n,a,s,d,{gen:c,data:l,$data:p,schema:u,schemaCode:m,it:f}=e,{opts:h,errSchemaPath:y,schemaEnv:g,self:_}=f;h.validateFormats&&(p?(i=c.scopeValue("formats",{ref:_.formats,code:h.code.formats}),o=c.const("fDef",(0,t._)`${i}[${m}]`),n=c.let("fType"),a=c.let("format"),c.if((0,t._)`typeof ${o} == "object" && !(${o} instanceof RegExp)`,()=>c.assign(n,(0,t._)`${o}.type || "string"`).assign(a,(0,t._)`${o}.validate`),()=>c.assign(n,(0,t._)`"string"`).assign(a,o)),e.fail$data((0,t.or)(!1===h.strictSchema?t.nil:(0,t._)`${m} && !${a}`,(s=g.$async?(0,t._)`(${o}.async ? await ${a}(${l}) : ${a}(${l}))`:(0,t._)`${a}(${l})`,d=(0,t._)`(typeof ${a} == "function" ? ${s} : ${a}.test(${l}))`,(0,t._)`${a} && ${a} !== true && ${n} === ${r} && !${d}`)))):function(){var i;let o,n,a=_.formats[u];if(!a){if(!1===h.strictSchema)return _.logger.warn(s());throw Error(s());function s(){return`unknown format "${u}" ignored in schema at path "${y}"`}}if(!0===a)return;let[d,p,m]=(o=(i=a)instanceof RegExp?(0,t.regexpCode)(i):h.code.formats?(0,t._)`${h.code.formats}${(0,t.getProperty)(u)}`:void 0,n=c.scopeValue("formats",{key:u,ref:i,code:o}),"object"!=typeof i||i instanceof RegExp?["string",i,n]:[i.type||"string",i.validate,(0,t._)`${n}.validate`]);d===r&&e.pass(function(){if("object"==typeof a&&!(a instanceof RegExp)&&a.async){if(!g.$async)throw Error("async format in sync schema");return(0,t._)`await ${m}(${l})`}return"function"==typeof p?(0,t._)`${m}(${l})`:(0,t._)`${m}.test(${l})`}())}())}}}),pK=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=[pB().default]}),pJ=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.contentVocabulary=e.metadataVocabulary=void 0,e.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],e.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]}),pZ=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=py(),r=pI(),i=pG(),o=pK(),n=pJ();e.default=[t.default,r.default,(0,i.default)(),o.default,n.metadataVocabulary,n.contentVocabulary]}),pQ=eb(e=>{var t,r;Object.defineProperty(e,"__esModule",{value:!0}),e.DiscrError=void 0,(r=t||(e.DiscrError=t={})).Tag="tag",r.Mapping="mapping"}),pX=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=lY(),r=pQ(),i=ps(),o=pa(),n=l1();e.default={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:e,tagName:t}})=>e===r.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:r,tagName:i}})=>(0,t._)`{error: ${e}, tag: ${i}, tagValue: ${r}}`},code(e){let{gen:a,data:s,schema:d,parentSchema:c,it:l}=e,{oneOf:p}=c;if(!l.opts.discriminator)throw Error("discriminator: requires discriminator option");let u=d.propertyName;if("string"!=typeof u)throw Error("discriminator: requires propertyName");if(d.mapping)throw Error("discriminator: mapping is not supported");if(!p)throw Error("discriminator: requires oneOf keyword");let m=a.let("valid",!1),f=a.const("tag",(0,t._)`${s}${(0,t.getProperty)(u)}`);a.if((0,t._)`typeof ${f} == "string"`,()=>(function(){let s=function(){var e;let t={},r=s(c),a=!0;for(let t=0;te.error(!1,{discrError:r.DiscrError.Tag,tag:f,tagName:u})),e.ok(m)}}}),pY=eb((e,t)=>{t.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}}),p1=eb((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.MissingRefError=e.ValidationError=e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=e.Ajv=void 0;let r=pm(),i=pZ(),o=pX(),n=pY(),a=["/properties"],s="http://json-schema.org/draft-07/schema";var d=class extends r.default{_addVocabularies(){super._addVocabularies(),i.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(o.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let e=this.opts.$data?this.$dataMetaSchema(n,a):n;this.addMetaSchema(e,s,!1),this.refs["http://json-schema.org/schema"]=s}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(s)?s:void 0)}};e.Ajv=d,t.exports=e=d,t.exports.Ajv=d,Object.defineProperty(e,"__esModule",{value:!0}),e.default=d;var c=po();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return c.KeywordCxt}});var l=lY();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return l._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return l.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return l.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return l.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return l.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return l.CodeGen}});var p=pn();Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return p.default}});var u=pa();Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return u.default}})}),p0=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.dynamicAnchor=void 0;let t=lY(),r=l0(),i=ps(),o=ph();function n(e,n){let{gen:a,it:s}=e;s.schemaEnv.root.dynamicAnchors[n]=!0;let d=(0,t._)`${r.default.dynamicAnchors}${(0,t.getProperty)(n)}`,c="#"===s.errSchemaPath?s.validateName:function(e){let{schemaEnv:t,schema:r,self:n}=e.it,{root:a,baseId:s,localRefs:d,meta:c}=t.root,{schemaId:l}=n.opts,p=new i.SchemaEnv({schema:r,schemaId:l,root:a,baseId:s,localRefs:d,meta:c});return i.compileSchema.call(n,p),(0,o.getValidate)(e,p)}(e);a.if((0,t._)`!${d}`,()=>a.assign(d,c))}e.dynamicAnchor=n,e.default={keyword:"$dynamicAnchor",schemaType:"string",code:e=>n(e,e.schema)}}),p2=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.dynamicRef=void 0;let t=lY(),r=l0(),i=ph();function o(e,o){let{gen:n,keyword:a,it:s}=e;if("#"!==o[0])throw Error(`"${a}" only supports hash fragment reference`);let d=o.slice(1);if(s.allErrors)c();else{let t=n.let("valid",!1);c(t),e.ok(t)}function c(e){if(s.schemaEnv.root.dynamicAnchors[d]){let i=n.let("_v",(0,t._)`${r.default.dynamicAnchors}${(0,t.getProperty)(d)}`);n.if(i,l(i,e),l(s.validateName,e))}else l(s.validateName,e)()}function l(t,r){return r?()=>n.block(()=>{(0,i.callRef)(e,t),n.let(r,!0)}):()=>(0,i.callRef)(e,t)}}e.dynamicRef=o,e.default={keyword:"$dynamicRef",schemaType:"string",code:e=>o(e,e.schema)}}),p4=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=p0(),r=l1();e.default={keyword:"$recursiveAnchor",schemaType:"boolean",code(e){e.schema?(0,t.dynamicAnchor)(e,""):(0,r.checkStrictMode)(e.it,"$recursiveAnchor: false is ignored")}}}),p6=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=p2();e.default={keyword:"$recursiveRef",schemaType:"string",code:e=>(0,t.dynamicRef)(e,e.schema)}}),p3=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=p0(),r=p2(),i=p4(),o=p6();e.default=[t.default,r.default,i.default,o.default]}),p9=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=pE();e.default={keyword:"dependentRequired",type:"object",schemaType:"object",error:t.error,code:e=>(0,t.validatePropertyDeps)(e)}}),p5=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=pE();e.default={keyword:"dependentSchemas",type:"object",schemaType:"object",code:e=>(0,t.validateSchemaDeps)(e)}}),p8=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=l1();e.default={keyword:["maxContains","minContains"],type:"array",schemaType:"number",code({keyword:e,parentSchema:r,it:i}){void 0===r.contains&&(0,t.checkStrictMode)(i,`"${e}" without "contains" is ignored`)}}}),p7=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=p9(),r=p5(),i=p8();e.default=[t.default,r.default,i.default]}),ue=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=lY(),r=l1(),i=l0();e.default={keyword:"unevaluatedProperties",type:"object",schemaType:["boolean","object"],trackErrors:!0,error:{message:"must NOT have unevaluated properties",params:({params:e})=>(0,t._)`{unevaluatedProperty: ${e.unevaluatedProperty}}`},code(e){let{gen:o,schema:n,data:a,errsCount:s,it:d}=e;if(!s)throw Error("ajv implementation error");let{allErrors:c,props:l}=d;function p(i){if(!1===n){e.setParams({unevaluatedProperty:i}),e.error(),c||o.break();return}if(!(0,r.alwaysValidSchema)(d,n)){let n=o.name("valid");e.subschema({keyword:"unevaluatedProperties",dataProp:i,dataPropType:r.Type.Str},n),c||o.if((0,t.not)(n),()=>o.break())}}l instanceof t.Name?o.if((0,t._)`${l} !== true`,()=>o.forIn("key",a,e=>{var r,i;return o.if((r=l,i=e,(0,t._)`!${r} || !${r}[${i}]`),()=>p(e))})):!0!==l&&o.forIn("key",a,e=>void 0===l?p(e):o.if(function(e,r){let i=[];for(let o in e)!0===e[o]&&i.push((0,t._)`${r} !== ${o}`);return(0,t.and)(...i)}(l,e),()=>p(e))),d.props=!0,e.ok((0,t._)`${s} === ${i.default.errors}`)}}}),ut=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=lY(),r=l1();e.default={keyword:"unevaluatedItems",type:"array",schemaType:["boolean","object"],error:{message:({params:{len:e}})=>(0,t.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,t._)`{limit: ${e}}`},code(e){let{gen:i,schema:o,data:n,it:a}=e,s=a.items||0;if(!0===s)return;let d=i.const("len",(0,t._)`${n}.length`);if(!1===o)e.setParams({len:s}),e.fail((0,t._)`${d} > ${s}`);else if("object"==typeof o&&!(0,r.alwaysValidSchema)(a,o)){let o=i.var("valid",(0,t._)`${d} <= ${s}`);i.if((0,t.not)(o),()=>{var n,c;return n=o,c=s,void i.forRange("i",c,d,o=>{e.subschema({keyword:"unevaluatedItems",dataProp:o,dataPropType:r.Type.Num},n),a.allErrors||i.if((0,t.not)(n),()=>i.break())})}),e.ok(o)}a.items=!0}}}),ur=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=ue(),r=ut();e.default=[t.default,r.default]}),ui=eb((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/schema",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/core":!0,"https://json-schema.org/draft/2019-09/vocab/applicator":!0,"https://json-schema.org/draft/2019-09/vocab/validation":!0,"https://json-schema.org/draft/2019-09/vocab/meta-data":!0,"https://json-schema.org/draft/2019-09/vocab/format":!1,"https://json-schema.org/draft/2019-09/vocab/content":!0},$recursiveAnchor:!0,title:"Core and Validation specifications meta-schema",allOf:[{$ref:"meta/core"},{$ref:"meta/applicator"},{$ref:"meta/validation"},{$ref:"meta/meta-data"},{$ref:"meta/format"},{$ref:"meta/content"}],type:["object","boolean"],properties:{definitions:{$comment:"While no longer an official keyword as it is replaced by $defs, this keyword is retained in the meta-schema to prevent incompatible extensions as it remains in common use.",type:"object",additionalProperties:{$recursiveRef:"#"},default:{}},dependencies:{$comment:'"dependencies" is no longer a keyword, but schema authors should avoid redefining it to facilitate a smooth transition to "dependentSchemas" and "dependentRequired"',type:"object",additionalProperties:{anyOf:[{$recursiveRef:"#"},{$ref:"meta/validation#/$defs/stringArray"}]}}}}}),uo=eb((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/meta/applicator",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/applicator":!0},$recursiveAnchor:!0,title:"Applicator vocabulary meta-schema",type:["object","boolean"],properties:{additionalItems:{$recursiveRef:"#"},unevaluatedItems:{$recursiveRef:"#"},items:{anyOf:[{$recursiveRef:"#"},{$ref:"#/$defs/schemaArray"}]},contains:{$recursiveRef:"#"},additionalProperties:{$recursiveRef:"#"},unevaluatedProperties:{$recursiveRef:"#"},properties:{type:"object",additionalProperties:{$recursiveRef:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$recursiveRef:"#"},propertyNames:{format:"regex"},default:{}},dependentSchemas:{type:"object",additionalProperties:{$recursiveRef:"#"}},propertyNames:{$recursiveRef:"#"},if:{$recursiveRef:"#"},then:{$recursiveRef:"#"},else:{$recursiveRef:"#"},allOf:{$ref:"#/$defs/schemaArray"},anyOf:{$ref:"#/$defs/schemaArray"},oneOf:{$ref:"#/$defs/schemaArray"},not:{$recursiveRef:"#"}},$defs:{schemaArray:{type:"array",minItems:1,items:{$recursiveRef:"#"}}}}}),un=eb((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/meta/content",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/content":!0},$recursiveAnchor:!0,title:"Content vocabulary meta-schema",type:["object","boolean"],properties:{contentMediaType:{type:"string"},contentEncoding:{type:"string"},contentSchema:{$recursiveRef:"#"}}}}),ua=eb((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/meta/core",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/core":!0},$recursiveAnchor:!0,title:"Core vocabulary meta-schema",type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference",$comment:"Non-empty fragments not allowed.",pattern:"^[^#]*#?$"},$schema:{type:"string",format:"uri"},$anchor:{type:"string",pattern:"^[A-Za-z][-A-Za-z0-9.:_]*$"},$ref:{type:"string",format:"uri-reference"},$recursiveRef:{type:"string",format:"uri-reference"},$recursiveAnchor:{type:"boolean",default:!1},$vocabulary:{type:"object",propertyNames:{type:"string",format:"uri"},additionalProperties:{type:"boolean"}},$comment:{type:"string"},$defs:{type:"object",additionalProperties:{$recursiveRef:"#"},default:{}}}}}),us=eb((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/meta/format",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/format":!0},$recursiveAnchor:!0,title:"Format vocabulary meta-schema",type:["object","boolean"],properties:{format:{type:"string"}}}}),ud=eb((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/meta/meta-data",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/meta-data":!0},$recursiveAnchor:!0,title:"Meta-data vocabulary meta-schema",type:["object","boolean"],properties:{title:{type:"string"},description:{type:"string"},default:!0,deprecated:{type:"boolean",default:!1},readOnly:{type:"boolean",default:!1},writeOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0}}}}),uc=eb((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/meta/validation",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/validation":!0},$recursiveAnchor:!0,title:"Validation vocabulary meta-schema",type:["object","boolean"],properties:{multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/$defs/nonNegativeInteger"},minLength:{$ref:"#/$defs/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},maxItems:{$ref:"#/$defs/nonNegativeInteger"},minItems:{$ref:"#/$defs/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxContains:{$ref:"#/$defs/nonNegativeInteger"},minContains:{$ref:"#/$defs/nonNegativeInteger",default:1},maxProperties:{$ref:"#/$defs/nonNegativeInteger"},minProperties:{$ref:"#/$defs/nonNegativeIntegerDefault0"},required:{$ref:"#/$defs/stringArray"},dependentRequired:{type:"object",additionalProperties:{$ref:"#/$defs/stringArray"}},const:!0,enum:{type:"array",items:!0},type:{anyOf:[{$ref:"#/$defs/simpleTypes"},{type:"array",items:{$ref:"#/$defs/simpleTypes"},minItems:1,uniqueItems:!0}]}},$defs:{nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{$ref:"#/$defs/nonNegativeInteger",default:0},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}}}}),ul=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=ui(),r=uo(),i=un(),o=ua(),n=us(),a=ud(),s=uc(),d=["/properties"];e.default=function(e){return[t,r,i,o,c(this,n),a,c(this,s)].forEach(e=>this.addMetaSchema(e,void 0,!1)),this;function c(t,r){return e?t.$dataMetaSchema(r,d):r}}}),up=eb((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.MissingRefError=e.ValidationError=e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=e.Ajv2019=void 0;let r=pm(),i=pZ(),o=p3(),n=p7(),a=ur(),s=pX(),d=ul(),c="https://json-schema.org/draft/2019-09/schema";var l=class extends r.default{constructor(e={}){super({...e,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),this.addVocabulary(o.default),i.default.forEach(e=>this.addVocabulary(e)),this.addVocabulary(n.default),this.addVocabulary(a.default),this.opts.discriminator&&this.addKeyword(s.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();let{$data:e,meta:t}=this.opts;t&&(d.default.call(this,e),this.refs["http://json-schema.org/schema"]=c)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(c)?c:void 0)}};e.Ajv2019=l,t.exports=e=l,t.exports.Ajv2019=l,Object.defineProperty(e,"__esModule",{value:!0}),e.default=l;var p=po();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return p.KeywordCxt}});var u=lY();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return u._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return u.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return u.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return u.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return u.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return u.CodeGen}});var m=pn();Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return m.default}});var f=pa();Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return f.default}})}),uu=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=py(),r=pI(),i=pG(),o=p3(),n=p7(),a=ur(),s=pK(),d=pJ();e.default=[o.default,t.default,r.default,(0,i.default)(!0),s.default,d.metadataVocabulary,d.contentVocabulary,n.default,a.default]}),um=eb((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/schema",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/core":!0,"https://json-schema.org/draft/2020-12/vocab/applicator":!0,"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0,"https://json-schema.org/draft/2020-12/vocab/validation":!0,"https://json-schema.org/draft/2020-12/vocab/meta-data":!0,"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0,"https://json-schema.org/draft/2020-12/vocab/content":!0},$dynamicAnchor:"meta",title:"Core and Validation specifications meta-schema",allOf:[{$ref:"meta/core"},{$ref:"meta/applicator"},{$ref:"meta/unevaluated"},{$ref:"meta/validation"},{$ref:"meta/meta-data"},{$ref:"meta/format-annotation"},{$ref:"meta/content"}],type:["object","boolean"],$comment:"This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.",properties:{definitions:{$comment:'"definitions" has been replaced by "$defs".',type:"object",additionalProperties:{$dynamicRef:"#meta"},deprecated:!0,default:{}},dependencies:{$comment:'"dependencies" has been split and replaced by "dependentSchemas" and "dependentRequired" in order to serve their differing semantics.',type:"object",additionalProperties:{anyOf:[{$dynamicRef:"#meta"},{$ref:"meta/validation#/$defs/stringArray"}]},deprecated:!0,default:{}},$recursiveAnchor:{$comment:'"$recursiveAnchor" has been replaced by "$dynamicAnchor".',$ref:"meta/core#/$defs/anchorString",deprecated:!0},$recursiveRef:{$comment:'"$recursiveRef" has been replaced by "$dynamicRef".',$ref:"meta/core#/$defs/uriReferenceString",deprecated:!0}}}}),uf=eb((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/applicator",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/applicator":!0},$dynamicAnchor:"meta",title:"Applicator vocabulary meta-schema",type:["object","boolean"],properties:{prefixItems:{$ref:"#/$defs/schemaArray"},items:{$dynamicRef:"#meta"},contains:{$dynamicRef:"#meta"},additionalProperties:{$dynamicRef:"#meta"},properties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},patternProperties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},propertyNames:{format:"regex"},default:{}},dependentSchemas:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},propertyNames:{$dynamicRef:"#meta"},if:{$dynamicRef:"#meta"},then:{$dynamicRef:"#meta"},else:{$dynamicRef:"#meta"},allOf:{$ref:"#/$defs/schemaArray"},anyOf:{$ref:"#/$defs/schemaArray"},oneOf:{$ref:"#/$defs/schemaArray"},not:{$dynamicRef:"#meta"}},$defs:{schemaArray:{type:"array",minItems:1,items:{$dynamicRef:"#meta"}}}}}),uh=eb((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/unevaluated",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0},$dynamicAnchor:"meta",title:"Unevaluated applicator vocabulary meta-schema",type:["object","boolean"],properties:{unevaluatedItems:{$dynamicRef:"#meta"},unevaluatedProperties:{$dynamicRef:"#meta"}}}}),uy=eb((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/content",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/content":!0},$dynamicAnchor:"meta",title:"Content vocabulary meta-schema",type:["object","boolean"],properties:{contentEncoding:{type:"string"},contentMediaType:{type:"string"},contentSchema:{$dynamicRef:"#meta"}}}}),ug=eb((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/core",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/core":!0},$dynamicAnchor:"meta",title:"Core vocabulary meta-schema",type:["object","boolean"],properties:{$id:{$ref:"#/$defs/uriReferenceString",$comment:"Non-empty fragments not allowed.",pattern:"^[^#]*#?$"},$schema:{$ref:"#/$defs/uriString"},$ref:{$ref:"#/$defs/uriReferenceString"},$anchor:{$ref:"#/$defs/anchorString"},$dynamicRef:{$ref:"#/$defs/uriReferenceString"},$dynamicAnchor:{$ref:"#/$defs/anchorString"},$vocabulary:{type:"object",propertyNames:{$ref:"#/$defs/uriString"},additionalProperties:{type:"boolean"}},$comment:{type:"string"},$defs:{type:"object",additionalProperties:{$dynamicRef:"#meta"}}},$defs:{anchorString:{type:"string",pattern:"^[A-Za-z_][-A-Za-z0-9._]*$"},uriString:{type:"string",format:"uri"},uriReferenceString:{type:"string",format:"uri-reference"}}}}),u_=eb((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/format-annotation",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0},$dynamicAnchor:"meta",title:"Format vocabulary meta-schema for annotation results",type:["object","boolean"],properties:{format:{type:"string"}}}}),uv=eb((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/meta-data",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/meta-data":!0},$dynamicAnchor:"meta",title:"Meta-data vocabulary meta-schema",type:["object","boolean"],properties:{title:{type:"string"},description:{type:"string"},default:!0,deprecated:{type:"boolean",default:!1},readOnly:{type:"boolean",default:!1},writeOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0}}}}),ub=eb((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/validation",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/validation":!0},$dynamicAnchor:"meta",title:"Validation vocabulary meta-schema",type:["object","boolean"],properties:{type:{anyOf:[{$ref:"#/$defs/simpleTypes"},{type:"array",items:{$ref:"#/$defs/simpleTypes"},minItems:1,uniqueItems:!0}]},const:!0,enum:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/$defs/nonNegativeInteger"},minLength:{$ref:"#/$defs/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},maxItems:{$ref:"#/$defs/nonNegativeInteger"},minItems:{$ref:"#/$defs/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxContains:{$ref:"#/$defs/nonNegativeInteger"},minContains:{$ref:"#/$defs/nonNegativeInteger",default:1},maxProperties:{$ref:"#/$defs/nonNegativeInteger"},minProperties:{$ref:"#/$defs/nonNegativeIntegerDefault0"},required:{$ref:"#/$defs/stringArray"},dependentRequired:{type:"object",additionalProperties:{$ref:"#/$defs/stringArray"}}},$defs:{nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{$ref:"#/$defs/nonNegativeInteger",default:0},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}}}}),u$=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=um(),r=uf(),i=uh(),o=uy(),n=ug(),a=u_(),s=uv(),d=ub(),c=["/properties"];e.default=function(e){return[t,r,i,o,n,l(this,a),s,l(this,d)].forEach(e=>this.addMetaSchema(e,void 0,!1)),this;function l(t,r){return e?t.$dataMetaSchema(r,c):r}}}),uS=eb((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.MissingRefError=e.ValidationError=e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=e.Ajv2020=void 0;let r=pm(),i=uu(),o=pX(),n=u$(),a="https://json-schema.org/draft/2020-12/schema";var s=class extends r.default{constructor(e={}){super({...e,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),i.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(o.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();let{$data:e,meta:t}=this.opts;t&&(n.default.call(this,e),this.refs["http://json-schema.org/schema"]=a)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(a)?a:void 0)}};e.Ajv2020=s,t.exports=e=s,t.exports.Ajv2020=s,Object.defineProperty(e,"__esModule",{value:!0}),e.default=s;var d=po();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return d.KeywordCxt}});var c=lY();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return c._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return c.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return c.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return c.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return c.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return c.CodeGen}});var l=pn();Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return l.default}});var p=pa();Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return p.default}})}),uk=eb(e=>{function t(e,t){return{validate:e,compare:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.formatNames=e.fastFormats=e.fullFormats=void 0,e.fullFormats={date:t(o,n),time:t(s(!0),d),"date-time":t(p(!0),u),"iso-time":t(s(),c),"iso-date-time":t(p(),m),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:function(e){return f.test(e)&&h.test(e)},"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:function(e){if(b.test(e))return!1;try{return new RegExp(e),!0}catch(e){return!1}},uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:function(e){return y.lastIndex=0,y.test(e)},int32:{type:"number",validate:function(e){return Number.isInteger(e)&&e<=_&&e>=g}},int64:{type:"number",validate:function(e){return Number.isInteger(e)}},float:{type:"number",validate:v},double:{type:"number",validate:v},password:!0,binary:!0},e.fastFormats={...e.fullFormats,date:t(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,n),time:t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,d),"date-time":t(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,u),"iso-time":t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,c),"iso-date-time":t(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,m),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},e.formatNames=Object.keys(e.fullFormats);let r=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,i=[0,31,28,31,30,31,30,31,31,30,31,30,31];function o(e){var t;let o=r.exec(e);if(!o)return!1;let n=+o[1],a=+o[2],s=+o[3];return a>=1&&a<=12&&s>=1&&s<=(2===a&&(t=n)%4==0&&(t%100!=0||t%400==0)?29:i[a])}function n(e,t){if(e&&t)return e>t?1:e23||l>59||e&&!s)return!1;if(i<=23&&o<=59&&n<60)return!0;let p=o-l*d,u=i-c*d-(p<0);return(23===u||-1===u)&&(59===p||-1===p)&&n<61}}function d(e,t){if(!(e&&t))return;let r=(new Date("2020-01-01T"+e)).valueOf(),i=(new Date("2020-01-01T"+t)).valueOf();if(r&&i)return r-i}function c(e,t){if(!(e&&t))return;let r=a.exec(e),i=a.exec(t);if(r&&i)return(e=r[1]+r[2]+r[3])>(t=i[1]+i[2]+i[3])?1:e{Object.defineProperty(e,"__esModule",{value:!0}),e.formatLimitDefinition=void 0;let t=p1(),r=lY(),i=r.operators,o={formatMaximum:{okStr:"<=",ok:i.LTE,fail:i.GT},formatMinimum:{okStr:">=",ok:i.GTE,fail:i.LT},formatExclusiveMaximum:{okStr:"<",ok:i.LT,fail:i.GTE},formatExclusiveMinimum:{okStr:">",ok:i.GT,fail:i.LTE}};e.formatLimitDefinition={keyword:Object.keys(o),type:"string",schemaType:"string",$data:!0,error:{message:({keyword:e,schemaCode:t})=>(0,r.str)`should be ${o[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,r._)`{comparison: ${o[e].okStr}, limit: ${t}}`},code(e){let i,n,{gen:a,data:s,schemaCode:d,keyword:c,it:l}=e,{opts:p,self:u}=l;if(!p.validateFormats)return;let m=new t.KeywordCxt(l,u.RULES.all.format.definition,"format");function f(e){return(0,r._)`${e}.compare(${s}, ${d}) ${o[c].fail} 0`}m.$data?(i=a.scopeValue("formats",{ref:u.formats,code:p.code.formats}),n=a.const("fmt",(0,r._)`${i}[${m.schemaCode}]`),e.fail$data((0,r.or)((0,r._)`typeof ${n} != "object"`,(0,r._)`${n} instanceof RegExp`,(0,r._)`typeof ${n}.compare != "function"`,f(n)))):function(){let t=m.schema,i=u.formats[t];if(!i||!0===i)return;if("object"!=typeof i||i instanceof RegExp||"function"!=typeof i.compare)throw Error(`"${c}": format "${t}" does not define "compare" function`);let o=a.scopeValue("formats",{key:t,ref:i,code:p.code.formats?(0,r._)`${p.code.formats}${(0,r.getProperty)(t)}`:void 0});e.fail$data(f(o))}()},dependencies:["format"]},e.default=t=>(t.addKeyword(e.formatLimitDefinition),t)}),uR=eb((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0});let r=uk(),i=uw(),o=lY(),n=new o.Name("fullFormats"),a=new o.Name("fastFormats"),s=(e,t={keywords:!0})=>{if(Array.isArray(t))return d(e,t,r.fullFormats,n),e;let[o,s]="fast"===t.mode?[r.fastFormats,a]:[r.fullFormats,n];return d(e,t.formats||r.formatNames,o,s),t.keywords&&(0,i.default)(e),e};function d(e,t,r,i){var n;for(let a of(null!=(n=e.opts.code).formats||(n.formats=(0,o._)`require("ajv-formats/dist/formats").${i}`),t))e.addFormat(a,r[a])}s.get=(e,t="full")=>{let i=("fast"===t?r.fastFormats:r.fullFormats)[e];if(!i)throw Error(`Unknown format "${e}"`);return i},t.exports=e=s,Object.defineProperty(e,"__esModule",{value:!0}),e.default=s}),uP=p1(),uV=up(),uq=uS();let uI=(e$(uR(),1)).default;function ux(e){let t=new e({strict:!1,validateFormats:!0,validateSchema:!1,allErrors:!0});return uI(t),t}var uj=class{_ajv;_ajvDraft7;_ajv2019;_userAjv;constructor(e){this._userAjv=void 0!==e,this._ajv=e}get ajv(){return this._ajv??=ux(uq.Ajv2020)}_engineFor(e){if(this._userAjv)return this.ajv;let t=function(e,t){if(!("$schema"in e)||"string"!=typeof e.$schema)return"2020-12";let r=e.$schema.replace(/#$/,"");if(eS.has(r))return"2020-12";if(ek.has(r))return"2019-09";if(ew.has(r)||eR.has(r))return"draft-7";throw Error(`JSON Schema declares an unsupported dialect ("$schema": "${e.$schema.slice(0,200)}"). The default validator supports JSON Schema 2020-12, 2019-09, draft-07, and draft-06; ${t}`)}(e,"pass a pre-configured Ajv instance to AjvJsonSchemaValidator(ajv) to validate other dialects.");return"2020-12"===t?this.ajv:"2019-09"===t?this._ajv2019??=ux(uV.Ajv2019):this._ajvDraft7??=ux(uP.Ajv)}getValidator(e){let t=this._engineFor(e),r="$id"in e&&"string"==typeof e.$id?t.getSchema(e.$id)??t.compile(e):t.compile(e);return e=>r(e)?{valid:!0,data:e,errorMessage:void 0}:{valid:!1,data:void 0,errorMessage:t.errorsText(r.errors)}}};uP.Ajv;let uC=Symbol.for("mcp.completable");function uT(e){return!!e&&"object"==typeof e&&uC in e}function uO(e,t){if(!Number.isFinite(e)||e<1)return;let r=setInterval(t,Math.min(e,0x7fffffff));return r.unref?.(),r}var uE=class{static{s=e=>e._classification}onclose;onerror;onmessage;_classification;_responseMode;_started=!1;_used=!1;_closed=!1;_terminalDelivered=!1;_dispatchWindowOpen=!1;_requestId;_deferredResponse;_sse;_abortCleanup;_keepAliveMs;constructor(e){this._classification=e.classification,this._responseMode=e.responseMode??"auto",this._keepAliveMs=e.keepAliveMs??15e3}async start(){if(this._started)throw Error("PerRequestHTTPServerTransport is already started");this._started=!0}async handleMessage(e,t){if(this._used)throw Error("PerRequestHTTPServerTransport serves exactly one exchange; construct a new transport per request");if(!this._started||void 0===this.onmessage)throw Error("PerRequestHTTPServerTransport is not connected: connect a server to this transport before handling a message");if(this._closed)throw Error("PerRequestHTTPServerTransport is closed");this._used=!0;let r=t?.request?.signal;if(r?.aborted)throw await this.close(),new cf(cm.ConnectionClosed,"The request was aborted before it could be handled");let i={classification:this._classification,...t?.request!==void 0&&{request:t.request},...t?.authInfo!==void 0&&{authInfo:t.authInfo}};if(ll(e)){let t,o;this._requestId=e.id;let n=new Promise((e,r)=>{t=e,o=r});if(this._deferredResponse={promise:n,resolve:t,reject:o,settled:!1},void 0!==r){let e=()=>void this.close();r.addEventListener("abort",e,{once:!0}),this._abortCleanup=()=>r.removeEventListener("abort",e)}this._dispatchWindowOpen=!0;try{this.onmessage(e,i)}finally{this._dispatchWindowOpen=!1}return"sse"!==this._responseMode||this._closed||this._deferredResponse.settled||this.upgradeToSse(),n}return this.onmessage(e,i),new Response(null,{status:202})}async send(e,t){if(this._closed)return;let r=aE.safeParse(e).success||aA.safeParse(e).success,i=r?e.id:t?.relatedRequestId;if(void 0===this._requestId||void 0===i||i!==this._requestId){r&&this.onerror?.(Error(`Received a response for an unknown request id: ${String(e.id)}`));return}if(r){if(this._terminalDelivered)return;this._terminalDelivered=!0;let t=aA.safeParse(e).success?e.error.code:void 0,r=void 0!==t&&(this._dispatchWindowOpen||t===cG.MissingRequiredClientCapability)?l_[t]:void 0;if(void 0!==r&&void 0===this._sse){this.settleResponse(Response.json(e,{status:r,headers:{"Content-Type":"application/json"}})),queueMicrotask(()=>void this.close());return}if(void 0!==this._sse||"sse"===this._responseMode){void 0===this._sse&&this.upgradeToSse(),this.writeMessageFrame(e),this.finalizeStream();return}this.settleResponse(Response.json(e,{status:200,headers:{"Content-Type":"application/json"}})),queueMicrotask(()=>void this.close());return}"json"!==this._responseMode&&(void 0===this._sse&&this.upgradeToSse(),this.writeMessageFrame(e))}writeCommentFrame(e){if(this._closed||void 0===this._sse||this._sse.closed)return;let t=e.split("\n").map(e=>`: ${e}`).join("\n");this.writeFrame(`${t} + deps: ${i}}`};let o={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(e){let[t,r]=function({schema:e}){let t={},r={};for(let i in e)"__proto__"!==i&&((Array.isArray(e[i])?t:r)[i]=e[i]);return[t,r]}(e);n(e,t),a(e,r)}};function n(e,r=e.schema){let{gen:o,data:a,it:s}=e;if(0===Object.keys(r).length)return;let d=o.let("missing");for(let n in r){let c=r[n];if(0===c.length)continue;let l=(0,i.propertyInData)(o,a,n,s.opts.ownProperties);e.setParams({property:n,depsCount:c.length,deps:c.join(", ")}),s.allErrors?o.if(l,()=>{for(let t of c)(0,i.checkReportMissingProp)(e,t)}):(o.if((0,t._)`${l} && (${(0,i.checkMissingProp)(e,c,d)})`),(0,i.reportMissingProp)(e,d),o.else())}}function a(e,t=e.schema){let{gen:o,data:n,keyword:s,it:d}=e,c=o.name("valid");for(let a in t)(0,r.alwaysValidSchema)(d,t[a])||(o.if((0,i.propertyInData)(o,n,a,d.opts.ownProperties),()=>{let t=e.subschema({keyword:s,schemaProp:a},c);e.mergeValidEvaluated(t,c)},()=>o.var(c,!0)),e.ok(c))}e.validatePropertyDeps=n,e.validateSchemaDeps=a,e.default=o}),pA=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=lY(),r=l1();e.default={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:e})=>(0,t._)`{propertyName: ${e.propertyName}}`},code(e){let{gen:i,schema:o,data:n,it:a}=e;if((0,r.alwaysValidSchema)(a,o))return;let s=i.name("valid");i.forIn("key",n,r=>{e.setParams({propertyName:r}),e.subschema({keyword:"propertyNames",data:r,dataTypes:["string"],propertyName:r,compositeRule:!0},s),i.if((0,t.not)(s),()=>{e.error(!0),a.allErrors||i.break()})}),e.ok(s)}}}),pW=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=l8(),r=lY(),i=l0(),o=l1();e.default={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:e})=>(0,r._)`{additionalProperty: ${e.additionalProperty}}`},code(e){let{gen:n,schema:a,parentSchema:s,data:d,errsCount:c,it:l}=e;if(!c)throw Error("ajv implementation error");let{allErrors:p,opts:u}=l;if(l.props=!0,"all"!==u.removeAdditional&&(0,o.alwaysValidSchema)(l,a))return;let m=(0,t.allSchemaProperties)(s.properties),f=(0,t.allSchemaProperties)(s.patternProperties);function h(e){n.code((0,r._)`delete ${d}[${e}]`)}function y(t){if("all"===u.removeAdditional||u.removeAdditional&&!1===a)return void h(t);if(!1===a){e.setParams({additionalProperty:t}),e.error(),p||n.break();return}if("object"==typeof a&&!(0,o.alwaysValidSchema)(l,a)){let i=n.name("valid");"failing"===u.removeAdditional?(g(t,i,!1),n.if((0,r.not)(i),()=>{e.reset(),h(t)})):(g(t,i),p||n.if((0,r.not)(i),()=>n.break()))}}function g(t,r,i){let n={keyword:"additionalProperties",dataProp:t,dataPropType:o.Type.Str};!1===i&&Object.assign(n,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(n,r)}n.forIn("key",d,i=>{m.length||f.length?n.if(function(i){let a;if(m.length>8){let e=(0,o.schemaRefOrVal)(l,s.properties,"properties");a=(0,t.isOwnProperty)(n,e,i)}else a=m.length?(0,r.or)(...m.map(e=>(0,r._)`${i} === ${e}`)):r.nil;return f.length&&(a=(0,r.or)(a,...f.map(o=>(0,r._)`${(0,t.usePattern)(e,o)}.test(${i})`))),(0,r.not)(a)}(i),()=>y(i)):y(i)}),e.ok((0,r._)`${c} === ${i.default.errors}`)}}}),pM=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=po(),r=l8(),i=l1(),o=pW();e.default={keyword:"properties",type:"object",schemaType:"object",code(e){let{gen:n,schema:a,parentSchema:s,data:d,it:c}=e;"all"===c.opts.removeAdditional&&void 0===s.additionalProperties&&o.default.code(new t.KeywordCxt(c,o.default,"additionalProperties"));let l=(0,r.allSchemaProperties)(a);for(let e of l)c.definedProperties.add(e);c.opts.unevaluated&&l.length&&!0!==c.props&&(c.props=i.mergeEvaluated.props(n,(0,i.toHash)(l),c.props));let p=l.filter(e=>!(0,i.alwaysValidSchema)(c,a[e]));if(0===p.length)return;let u=n.name("valid");for(let t of p){var m;(m=t,c.opts.useDefaults&&!c.compositeRule&&void 0!==a[m].default)?f(t):(n.if((0,r.propertyInData)(n,d,t,c.opts.ownProperties)),f(t),c.allErrors||n.else().var(u,!0),n.endIf()),e.it.definedProperties.add(t),e.ok(u)}function f(t){e.subschema({keyword:"properties",schemaProp:t,dataProp:t},u)}}}}),pN=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=l8(),r=lY(),i=l1(),o=l1();e.default={keyword:"patternProperties",type:"object",schemaType:"object",code(e){let{gen:n,schema:a,data:s,parentSchema:d,it:c}=e,{opts:l}=c,p=(0,t.allSchemaProperties)(a),u=p.filter(e=>(0,i.alwaysValidSchema)(c,a[e]));if(0===p.length||u.length===p.length&&(!c.opts.unevaluated||!0===c.props))return;let m=l.strictSchema&&!l.allowMatchingProperties&&d.properties,f=n.name("valid");!0===c.props||c.props instanceof r.Name||(c.props=(0,o.evaluatedPropsToName)(n,c.props));let{props:h}=c;for(let e of p)m&&function(e){for(let t in m)new RegExp(e).test(t)&&(0,i.checkStrictMode)(c,`property ${t} matches pattern ${e} (use allowMatchingProperties)`)}(e),c.allErrors?y(e):(n.var(f,!0),y(e),n.if(f));function y(i){n.forIn("key",s,a=>{n.if((0,r._)`${(0,t.usePattern)(e,i)}.test(${a})`,()=>{let t=u.includes(i);t||e.subschema({keyword:"patternProperties",schemaProp:i,dataProp:a,dataPropType:o.Type.Str},f),c.opts.unevaluated&&!0!==h?n.assign((0,r._)`${h}[${a}]`,!0):t||c.allErrors||n.if((0,r.not)(f),()=>n.break())})})}}}}),pz=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=l1();e.default={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){let{gen:r,schema:i,it:o}=e;if((0,t.alwaysValidSchema)(o,i))return void e.fail();let n=r.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},n),e.failResult(n,()=>e.reset(),()=>e.error())},error:{message:"must NOT be valid"}}}),pD=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:l8().validateUnion,error:{message:"must match a schema in anyOf"}}}),pF=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=lY(),r=l1();e.default={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:e})=>(0,t._)`{passingSchemas: ${e.passing}}`},code(e){let{gen:i,schema:o,parentSchema:n,it:a}=e;if(!Array.isArray(o))throw Error("ajv implementation error");if(a.opts.discriminator&&n.discriminator)return;let s=i.let("valid",!1),d=i.let("passing",null),c=i.name("_valid");e.setParams({passing:d}),i.block(function(){o.forEach((o,n)=>{let l;(0,r.alwaysValidSchema)(a,o)?i.var(c,!0):l=e.subschema({keyword:"oneOf",schemaProp:n,compositeRule:!0},c),n>0&&i.if((0,t._)`${c} && ${s}`).assign(s,!1).assign(d,(0,t._)`[${d}, ${n}]`).else(),i.if(c,()=>{i.assign(s,!0),i.assign(d,n),l&&e.mergeEvaluated(l,t.Name)})})}),e.result(s,()=>e.reset(),()=>e.error(!0))}}}),pL=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=l1();e.default={keyword:"allOf",schemaType:"array",code(e){let{gen:r,schema:i,it:o}=e;if(!Array.isArray(i))throw Error("ajv implementation error");let n=r.name("valid");i.forEach((r,i)=>{if((0,t.alwaysValidSchema)(o,r))return;let a=e.subschema({keyword:"allOf",schemaProp:i},n);e.ok(n),e.mergeEvaluated(a)})}}}),pU=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=lY(),r=l1();function i(e,t){let i=e.schema[t];return void 0!==i&&!(0,r.alwaysValidSchema)(e,i)}e.default={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:e})=>(0,t.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,t._)`{failingKeyword: ${e.ifClause}}`},code(e){let o,{gen:n,parentSchema:a,it:s}=e;void 0===a.then&&void 0===a.else&&(0,r.checkStrictMode)(s,'"if" without "then" and "else" is ignored');let d=i(s,"then"),c=i(s,"else");if(!d&&!c)return;let l=n.let("valid",!0),p=n.name("_valid");if(o=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},p),e.mergeEvaluated(o),e.reset(),d&&c){let t=n.let("ifClause");e.setParams({ifClause:t}),n.if(p,u("then",t),u("else",t))}else d?n.if(p,u("then")):n.if((0,t.not)(p),u("else"));function u(r,i){return()=>{let o=e.subschema({keyword:r},p);n.assign(l,p),e.mergeValidEvaluated(o,l),i?n.assign(i,(0,t._)`${r}`):e.setParams({ifClause:r})}}e.pass(l,()=>e.error(!0))}}}),pH=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=l1();e.default={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:r,it:i}){void 0===r.if&&(0,t.checkStrictMode)(i,`"${e}" without "if" is ignored`)}}}),pG=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=px(),r=pC(),i=pj(),o=pT(),n=pO(),a=pE(),s=pA(),d=pW(),c=pM(),l=pN(),p=pz(),u=pD(),m=pF(),f=pL(),h=pU(),y=pH();e.default=function(e=!1){let g=[p.default,u.default,m.default,f.default,h.default,y.default,s.default,d.default,a.default,c.default,l.default];return e?g.push(r.default,o.default):g.push(t.default,i.default),g.push(n.default),g}}),pB=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=lY();e.default={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>(0,t.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,t._)`{format: ${e}}`},code(e,r){let i,o,n,a,s,d,{gen:c,data:l,$data:p,schema:u,schemaCode:m,it:f}=e,{opts:h,errSchemaPath:y,schemaEnv:g,self:_}=f;h.validateFormats&&(p?(i=c.scopeValue("formats",{ref:_.formats,code:h.code.formats}),o=c.const("fDef",(0,t._)`${i}[${m}]`),n=c.let("fType"),a=c.let("format"),c.if((0,t._)`typeof ${o} == "object" && !(${o} instanceof RegExp)`,()=>c.assign(n,(0,t._)`${o}.type || "string"`).assign(a,(0,t._)`${o}.validate`),()=>c.assign(n,(0,t._)`"string"`).assign(a,o)),e.fail$data((0,t.or)(!1===h.strictSchema?t.nil:(0,t._)`${m} && !${a}`,(s=g.$async?(0,t._)`(${o}.async ? await ${a}(${l}) : ${a}(${l}))`:(0,t._)`${a}(${l})`,d=(0,t._)`(typeof ${a} == "function" ? ${s} : ${a}.test(${l}))`,(0,t._)`${a} && ${a} !== true && ${n} === ${r} && !${d}`)))):function(){var i;let o,n,a=_.formats[u];if(!a){if(!1===h.strictSchema)return _.logger.warn(s());throw Error(s());function s(){return`unknown format "${u}" ignored in schema at path "${y}"`}}if(!0===a)return;let[d,p,m]=(o=(i=a)instanceof RegExp?(0,t.regexpCode)(i):h.code.formats?(0,t._)`${h.code.formats}${(0,t.getProperty)(u)}`:void 0,n=c.scopeValue("formats",{key:u,ref:i,code:o}),"object"!=typeof i||i instanceof RegExp?["string",i,n]:[i.type||"string",i.validate,(0,t._)`${n}.validate`]);d===r&&e.pass(function(){if("object"==typeof a&&!(a instanceof RegExp)&&a.async){if(!g.$async)throw Error("async format in sync schema");return(0,t._)`await ${m}(${l})`}return"function"==typeof p?(0,t._)`${m}(${l})`:(0,t._)`${m}.test(${l})`}())}())}}}),pK=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=[pB().default]}),pJ=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.contentVocabulary=e.metadataVocabulary=void 0,e.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],e.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]}),pZ=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=py(),r=pI(),i=pG(),o=pK(),n=pJ();e.default=[t.default,r.default,(0,i.default)(),o.default,n.metadataVocabulary,n.contentVocabulary]}),pQ=eb(e=>{var t,r;Object.defineProperty(e,"__esModule",{value:!0}),e.DiscrError=void 0,(r=t||(e.DiscrError=t={})).Tag="tag",r.Mapping="mapping"}),pX=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=lY(),r=pQ(),i=ps(),o=pa(),n=l1();e.default={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:e,tagName:t}})=>e===r.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:r,tagName:i}})=>(0,t._)`{error: ${e}, tag: ${i}, tagValue: ${r}}`},code(e){let{gen:a,data:s,schema:d,parentSchema:c,it:l}=e,{oneOf:p}=c;if(!l.opts.discriminator)throw Error("discriminator: requires discriminator option");let u=d.propertyName;if("string"!=typeof u)throw Error("discriminator: requires propertyName");if(d.mapping)throw Error("discriminator: mapping is not supported");if(!p)throw Error("discriminator: requires oneOf keyword");let m=a.let("valid",!1),f=a.const("tag",(0,t._)`${s}${(0,t.getProperty)(u)}`);a.if((0,t._)`typeof ${f} == "string"`,()=>(function(){let s=function(){var e;let t={},r=s(c),a=!0;for(let t=0;te.error(!1,{discrError:r.DiscrError.Tag,tag:f,tagName:u})),e.ok(m)}}}),pY=eb((e,t)=>{t.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}}),p1=eb((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.MissingRefError=e.ValidationError=e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=e.Ajv=void 0;let r=pm(),i=pZ(),o=pX(),n=pY(),a=["/properties"],s="http://json-schema.org/draft-07/schema";var d=class extends r.default{_addVocabularies(){super._addVocabularies(),i.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(o.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let e=this.opts.$data?this.$dataMetaSchema(n,a):n;this.addMetaSchema(e,s,!1),this.refs["http://json-schema.org/schema"]=s}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(s)?s:void 0)}};e.Ajv=d,t.exports=e=d,t.exports.Ajv=d,Object.defineProperty(e,"__esModule",{value:!0}),e.default=d;var c=po();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return c.KeywordCxt}});var l=lY();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return l._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return l.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return l.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return l.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return l.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return l.CodeGen}});var p=pn();Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return p.default}});var u=pa();Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return u.default}})}),p0=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.dynamicAnchor=void 0;let t=lY(),r=l0(),i=ps(),o=ph();function n(e,n){let{gen:a,it:s}=e;s.schemaEnv.root.dynamicAnchors[n]=!0;let d=(0,t._)`${r.default.dynamicAnchors}${(0,t.getProperty)(n)}`,c="#"===s.errSchemaPath?s.validateName:function(e){let{schemaEnv:t,schema:r,self:n}=e.it,{root:a,baseId:s,localRefs:d,meta:c}=t.root,{schemaId:l}=n.opts,p=new i.SchemaEnv({schema:r,schemaId:l,root:a,baseId:s,localRefs:d,meta:c});return i.compileSchema.call(n,p),(0,o.getValidate)(e,p)}(e);a.if((0,t._)`!${d}`,()=>a.assign(d,c))}e.dynamicAnchor=n,e.default={keyword:"$dynamicAnchor",schemaType:"string",code:e=>n(e,e.schema)}}),p2=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.dynamicRef=void 0;let t=lY(),r=l0(),i=ph();function o(e,o){let{gen:n,keyword:a,it:s}=e;if("#"!==o[0])throw Error(`"${a}" only supports hash fragment reference`);let d=o.slice(1);if(s.allErrors)c();else{let t=n.let("valid",!1);c(t),e.ok(t)}function c(e){if(s.schemaEnv.root.dynamicAnchors[d]){let i=n.let("_v",(0,t._)`${r.default.dynamicAnchors}${(0,t.getProperty)(d)}`);n.if(i,l(i,e),l(s.validateName,e))}else l(s.validateName,e)()}function l(t,r){return r?()=>n.block(()=>{(0,i.callRef)(e,t),n.let(r,!0)}):()=>(0,i.callRef)(e,t)}}e.dynamicRef=o,e.default={keyword:"$dynamicRef",schemaType:"string",code:e=>o(e,e.schema)}}),p4=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=p0(),r=l1();e.default={keyword:"$recursiveAnchor",schemaType:"boolean",code(e){e.schema?(0,t.dynamicAnchor)(e,""):(0,r.checkStrictMode)(e.it,"$recursiveAnchor: false is ignored")}}}),p6=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=p2();e.default={keyword:"$recursiveRef",schemaType:"string",code:e=>(0,t.dynamicRef)(e,e.schema)}}),p3=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=p0(),r=p2(),i=p4(),o=p6();e.default=[t.default,r.default,i.default,o.default]}),p9=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=pE();e.default={keyword:"dependentRequired",type:"object",schemaType:"object",error:t.error,code:e=>(0,t.validatePropertyDeps)(e)}}),p5=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=pE();e.default={keyword:"dependentSchemas",type:"object",schemaType:"object",code:e=>(0,t.validateSchemaDeps)(e)}}),p8=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=l1();e.default={keyword:["maxContains","minContains"],type:"array",schemaType:"number",code({keyword:e,parentSchema:r,it:i}){void 0===r.contains&&(0,t.checkStrictMode)(i,`"${e}" without "contains" is ignored`)}}}),p7=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=p9(),r=p5(),i=p8();e.default=[t.default,r.default,i.default]}),ue=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=lY(),r=l1(),i=l0();e.default={keyword:"unevaluatedProperties",type:"object",schemaType:["boolean","object"],trackErrors:!0,error:{message:"must NOT have unevaluated properties",params:({params:e})=>(0,t._)`{unevaluatedProperty: ${e.unevaluatedProperty}}`},code(e){let{gen:o,schema:n,data:a,errsCount:s,it:d}=e;if(!s)throw Error("ajv implementation error");let{allErrors:c,props:l}=d;function p(i){if(!1===n){e.setParams({unevaluatedProperty:i}),e.error(),c||o.break();return}if(!(0,r.alwaysValidSchema)(d,n)){let n=o.name("valid");e.subschema({keyword:"unevaluatedProperties",dataProp:i,dataPropType:r.Type.Str},n),c||o.if((0,t.not)(n),()=>o.break())}}l instanceof t.Name?o.if((0,t._)`${l} !== true`,()=>o.forIn("key",a,e=>{var r,i;return o.if((r=l,i=e,(0,t._)`!${r} || !${r}[${i}]`),()=>p(e))})):!0!==l&&o.forIn("key",a,e=>void 0===l?p(e):o.if(function(e,r){let i=[];for(let o in e)!0===e[o]&&i.push((0,t._)`${r} !== ${o}`);return(0,t.and)(...i)}(l,e),()=>p(e))),d.props=!0,e.ok((0,t._)`${s} === ${i.default.errors}`)}}}),ut=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=lY(),r=l1();e.default={keyword:"unevaluatedItems",type:"array",schemaType:["boolean","object"],error:{message:({params:{len:e}})=>(0,t.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,t._)`{limit: ${e}}`},code(e){let{gen:i,schema:o,data:n,it:a}=e,s=a.items||0;if(!0===s)return;let d=i.const("len",(0,t._)`${n}.length`);if(!1===o)e.setParams({len:s}),e.fail((0,t._)`${d} > ${s}`);else if("object"==typeof o&&!(0,r.alwaysValidSchema)(a,o)){let o=i.var("valid",(0,t._)`${d} <= ${s}`);i.if((0,t.not)(o),()=>{var n,c;return n=o,c=s,void i.forRange("i",c,d,o=>{e.subschema({keyword:"unevaluatedItems",dataProp:o,dataPropType:r.Type.Num},n),a.allErrors||i.if((0,t.not)(n),()=>i.break())})}),e.ok(o)}a.items=!0}}}),ur=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=ue(),r=ut();e.default=[t.default,r.default]}),ui=eb((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/schema",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/core":!0,"https://json-schema.org/draft/2019-09/vocab/applicator":!0,"https://json-schema.org/draft/2019-09/vocab/validation":!0,"https://json-schema.org/draft/2019-09/vocab/meta-data":!0,"https://json-schema.org/draft/2019-09/vocab/format":!1,"https://json-schema.org/draft/2019-09/vocab/content":!0},$recursiveAnchor:!0,title:"Core and Validation specifications meta-schema",allOf:[{$ref:"meta/core"},{$ref:"meta/applicator"},{$ref:"meta/validation"},{$ref:"meta/meta-data"},{$ref:"meta/format"},{$ref:"meta/content"}],type:["object","boolean"],properties:{definitions:{$comment:"While no longer an official keyword as it is replaced by $defs, this keyword is retained in the meta-schema to prevent incompatible extensions as it remains in common use.",type:"object",additionalProperties:{$recursiveRef:"#"},default:{}},dependencies:{$comment:'"dependencies" is no longer a keyword, but schema authors should avoid redefining it to facilitate a smooth transition to "dependentSchemas" and "dependentRequired"',type:"object",additionalProperties:{anyOf:[{$recursiveRef:"#"},{$ref:"meta/validation#/$defs/stringArray"}]}}}}}),uo=eb((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/meta/applicator",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/applicator":!0},$recursiveAnchor:!0,title:"Applicator vocabulary meta-schema",type:["object","boolean"],properties:{additionalItems:{$recursiveRef:"#"},unevaluatedItems:{$recursiveRef:"#"},items:{anyOf:[{$recursiveRef:"#"},{$ref:"#/$defs/schemaArray"}]},contains:{$recursiveRef:"#"},additionalProperties:{$recursiveRef:"#"},unevaluatedProperties:{$recursiveRef:"#"},properties:{type:"object",additionalProperties:{$recursiveRef:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$recursiveRef:"#"},propertyNames:{format:"regex"},default:{}},dependentSchemas:{type:"object",additionalProperties:{$recursiveRef:"#"}},propertyNames:{$recursiveRef:"#"},if:{$recursiveRef:"#"},then:{$recursiveRef:"#"},else:{$recursiveRef:"#"},allOf:{$ref:"#/$defs/schemaArray"},anyOf:{$ref:"#/$defs/schemaArray"},oneOf:{$ref:"#/$defs/schemaArray"},not:{$recursiveRef:"#"}},$defs:{schemaArray:{type:"array",minItems:1,items:{$recursiveRef:"#"}}}}}),un=eb((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/meta/content",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/content":!0},$recursiveAnchor:!0,title:"Content vocabulary meta-schema",type:["object","boolean"],properties:{contentMediaType:{type:"string"},contentEncoding:{type:"string"},contentSchema:{$recursiveRef:"#"}}}}),ua=eb((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/meta/core",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/core":!0},$recursiveAnchor:!0,title:"Core vocabulary meta-schema",type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference",$comment:"Non-empty fragments not allowed.",pattern:"^[^#]*#?$"},$schema:{type:"string",format:"uri"},$anchor:{type:"string",pattern:"^[A-Za-z][-A-Za-z0-9.:_]*$"},$ref:{type:"string",format:"uri-reference"},$recursiveRef:{type:"string",format:"uri-reference"},$recursiveAnchor:{type:"boolean",default:!1},$vocabulary:{type:"object",propertyNames:{type:"string",format:"uri"},additionalProperties:{type:"boolean"}},$comment:{type:"string"},$defs:{type:"object",additionalProperties:{$recursiveRef:"#"},default:{}}}}}),us=eb((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/meta/format",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/format":!0},$recursiveAnchor:!0,title:"Format vocabulary meta-schema",type:["object","boolean"],properties:{format:{type:"string"}}}}),ud=eb((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/meta/meta-data",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/meta-data":!0},$recursiveAnchor:!0,title:"Meta-data vocabulary meta-schema",type:["object","boolean"],properties:{title:{type:"string"},description:{type:"string"},default:!0,deprecated:{type:"boolean",default:!1},readOnly:{type:"boolean",default:!1},writeOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0}}}}),uc=eb((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/meta/validation",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/validation":!0},$recursiveAnchor:!0,title:"Validation vocabulary meta-schema",type:["object","boolean"],properties:{multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/$defs/nonNegativeInteger"},minLength:{$ref:"#/$defs/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},maxItems:{$ref:"#/$defs/nonNegativeInteger"},minItems:{$ref:"#/$defs/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxContains:{$ref:"#/$defs/nonNegativeInteger"},minContains:{$ref:"#/$defs/nonNegativeInteger",default:1},maxProperties:{$ref:"#/$defs/nonNegativeInteger"},minProperties:{$ref:"#/$defs/nonNegativeIntegerDefault0"},required:{$ref:"#/$defs/stringArray"},dependentRequired:{type:"object",additionalProperties:{$ref:"#/$defs/stringArray"}},const:!0,enum:{type:"array",items:!0},type:{anyOf:[{$ref:"#/$defs/simpleTypes"},{type:"array",items:{$ref:"#/$defs/simpleTypes"},minItems:1,uniqueItems:!0}]}},$defs:{nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{$ref:"#/$defs/nonNegativeInteger",default:0},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}}}}),ul=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=ui(),r=uo(),i=un(),o=ua(),n=us(),a=ud(),s=uc(),d=["/properties"];e.default=function(e){return[t,r,i,o,c(this,n),a,c(this,s)].forEach(e=>this.addMetaSchema(e,void 0,!1)),this;function c(t,r){return e?t.$dataMetaSchema(r,d):r}}}),up=eb((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.MissingRefError=e.ValidationError=e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=e.Ajv2019=void 0;let r=pm(),i=pZ(),o=p3(),n=p7(),a=ur(),s=pX(),d=ul(),c="https://json-schema.org/draft/2019-09/schema";var l=class extends r.default{constructor(e={}){super({...e,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),this.addVocabulary(o.default),i.default.forEach(e=>this.addVocabulary(e)),this.addVocabulary(n.default),this.addVocabulary(a.default),this.opts.discriminator&&this.addKeyword(s.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();let{$data:e,meta:t}=this.opts;t&&(d.default.call(this,e),this.refs["http://json-schema.org/schema"]=c)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(c)?c:void 0)}};e.Ajv2019=l,t.exports=e=l,t.exports.Ajv2019=l,Object.defineProperty(e,"__esModule",{value:!0}),e.default=l;var p=po();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return p.KeywordCxt}});var u=lY();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return u._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return u.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return u.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return u.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return u.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return u.CodeGen}});var m=pn();Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return m.default}});var f=pa();Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return f.default}})}),uu=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=py(),r=pI(),i=pG(),o=p3(),n=p7(),a=ur(),s=pK(),d=pJ();e.default=[o.default,t.default,r.default,(0,i.default)(!0),s.default,d.metadataVocabulary,d.contentVocabulary,n.default,a.default]}),um=eb((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/schema",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/core":!0,"https://json-schema.org/draft/2020-12/vocab/applicator":!0,"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0,"https://json-schema.org/draft/2020-12/vocab/validation":!0,"https://json-schema.org/draft/2020-12/vocab/meta-data":!0,"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0,"https://json-schema.org/draft/2020-12/vocab/content":!0},$dynamicAnchor:"meta",title:"Core and Validation specifications meta-schema",allOf:[{$ref:"meta/core"},{$ref:"meta/applicator"},{$ref:"meta/unevaluated"},{$ref:"meta/validation"},{$ref:"meta/meta-data"},{$ref:"meta/format-annotation"},{$ref:"meta/content"}],type:["object","boolean"],$comment:"This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.",properties:{definitions:{$comment:'"definitions" has been replaced by "$defs".',type:"object",additionalProperties:{$dynamicRef:"#meta"},deprecated:!0,default:{}},dependencies:{$comment:'"dependencies" has been split and replaced by "dependentSchemas" and "dependentRequired" in order to serve their differing semantics.',type:"object",additionalProperties:{anyOf:[{$dynamicRef:"#meta"},{$ref:"meta/validation#/$defs/stringArray"}]},deprecated:!0,default:{}},$recursiveAnchor:{$comment:'"$recursiveAnchor" has been replaced by "$dynamicAnchor".',$ref:"meta/core#/$defs/anchorString",deprecated:!0},$recursiveRef:{$comment:'"$recursiveRef" has been replaced by "$dynamicRef".',$ref:"meta/core#/$defs/uriReferenceString",deprecated:!0}}}}),uf=eb((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/applicator",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/applicator":!0},$dynamicAnchor:"meta",title:"Applicator vocabulary meta-schema",type:["object","boolean"],properties:{prefixItems:{$ref:"#/$defs/schemaArray"},items:{$dynamicRef:"#meta"},contains:{$dynamicRef:"#meta"},additionalProperties:{$dynamicRef:"#meta"},properties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},patternProperties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},propertyNames:{format:"regex"},default:{}},dependentSchemas:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},propertyNames:{$dynamicRef:"#meta"},if:{$dynamicRef:"#meta"},then:{$dynamicRef:"#meta"},else:{$dynamicRef:"#meta"},allOf:{$ref:"#/$defs/schemaArray"},anyOf:{$ref:"#/$defs/schemaArray"},oneOf:{$ref:"#/$defs/schemaArray"},not:{$dynamicRef:"#meta"}},$defs:{schemaArray:{type:"array",minItems:1,items:{$dynamicRef:"#meta"}}}}}),uh=eb((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/unevaluated",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0},$dynamicAnchor:"meta",title:"Unevaluated applicator vocabulary meta-schema",type:["object","boolean"],properties:{unevaluatedItems:{$dynamicRef:"#meta"},unevaluatedProperties:{$dynamicRef:"#meta"}}}}),uy=eb((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/content",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/content":!0},$dynamicAnchor:"meta",title:"Content vocabulary meta-schema",type:["object","boolean"],properties:{contentEncoding:{type:"string"},contentMediaType:{type:"string"},contentSchema:{$dynamicRef:"#meta"}}}}),ug=eb((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/core",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/core":!0},$dynamicAnchor:"meta",title:"Core vocabulary meta-schema",type:["object","boolean"],properties:{$id:{$ref:"#/$defs/uriReferenceString",$comment:"Non-empty fragments not allowed.",pattern:"^[^#]*#?$"},$schema:{$ref:"#/$defs/uriString"},$ref:{$ref:"#/$defs/uriReferenceString"},$anchor:{$ref:"#/$defs/anchorString"},$dynamicRef:{$ref:"#/$defs/uriReferenceString"},$dynamicAnchor:{$ref:"#/$defs/anchorString"},$vocabulary:{type:"object",propertyNames:{$ref:"#/$defs/uriString"},additionalProperties:{type:"boolean"}},$comment:{type:"string"},$defs:{type:"object",additionalProperties:{$dynamicRef:"#meta"}}},$defs:{anchorString:{type:"string",pattern:"^[A-Za-z_][-A-Za-z0-9._]*$"},uriString:{type:"string",format:"uri"},uriReferenceString:{type:"string",format:"uri-reference"}}}}),u_=eb((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/format-annotation",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0},$dynamicAnchor:"meta",title:"Format vocabulary meta-schema for annotation results",type:["object","boolean"],properties:{format:{type:"string"}}}}),uv=eb((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/meta-data",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/meta-data":!0},$dynamicAnchor:"meta",title:"Meta-data vocabulary meta-schema",type:["object","boolean"],properties:{title:{type:"string"},description:{type:"string"},default:!0,deprecated:{type:"boolean",default:!1},readOnly:{type:"boolean",default:!1},writeOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0}}}}),ub=eb((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/validation",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/validation":!0},$dynamicAnchor:"meta",title:"Validation vocabulary meta-schema",type:["object","boolean"],properties:{type:{anyOf:[{$ref:"#/$defs/simpleTypes"},{type:"array",items:{$ref:"#/$defs/simpleTypes"},minItems:1,uniqueItems:!0}]},const:!0,enum:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/$defs/nonNegativeInteger"},minLength:{$ref:"#/$defs/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},maxItems:{$ref:"#/$defs/nonNegativeInteger"},minItems:{$ref:"#/$defs/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxContains:{$ref:"#/$defs/nonNegativeInteger"},minContains:{$ref:"#/$defs/nonNegativeInteger",default:1},maxProperties:{$ref:"#/$defs/nonNegativeInteger"},minProperties:{$ref:"#/$defs/nonNegativeIntegerDefault0"},required:{$ref:"#/$defs/stringArray"},dependentRequired:{type:"object",additionalProperties:{$ref:"#/$defs/stringArray"}}},$defs:{nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{$ref:"#/$defs/nonNegativeInteger",default:0},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}}}}),u$=eb(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=um(),r=uf(),i=uh(),o=uy(),n=ug(),a=u_(),s=uv(),d=ub(),c=["/properties"];e.default=function(e){return[t,r,i,o,n,l(this,a),s,l(this,d)].forEach(e=>this.addMetaSchema(e,void 0,!1)),this;function l(t,r){return e?t.$dataMetaSchema(r,c):r}}}),uS=eb((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.MissingRefError=e.ValidationError=e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=e.Ajv2020=void 0;let r=pm(),i=uu(),o=pX(),n=u$(),a="https://json-schema.org/draft/2020-12/schema";var s=class extends r.default{constructor(e={}){super({...e,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),i.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(o.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();let{$data:e,meta:t}=this.opts;t&&(n.default.call(this,e),this.refs["http://json-schema.org/schema"]=a)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(a)?a:void 0)}};e.Ajv2020=s,t.exports=e=s,t.exports.Ajv2020=s,Object.defineProperty(e,"__esModule",{value:!0}),e.default=s;var d=po();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return d.KeywordCxt}});var c=lY();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return c._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return c.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return c.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return c.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return c.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return c.CodeGen}});var l=pn();Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return l.default}});var p=pa();Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return p.default}})}),uk=eb(e=>{function t(e,t){return{validate:e,compare:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.formatNames=e.fastFormats=e.fullFormats=void 0,e.fullFormats={date:t(o,n),time:t(s(!0),d),"date-time":t(p(!0),u),"iso-time":t(s(),c),"iso-date-time":t(p(),m),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:function(e){return f.test(e)&&h.test(e)},"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:function(e){if(b.test(e))return!1;try{return new RegExp(e),!0}catch(e){return!1}},uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:function(e){return y.lastIndex=0,y.test(e)},int32:{type:"number",validate:function(e){return Number.isInteger(e)&&e<=_&&e>=g}},int64:{type:"number",validate:function(e){return Number.isInteger(e)}},float:{type:"number",validate:v},double:{type:"number",validate:v},password:!0,binary:!0},e.fastFormats={...e.fullFormats,date:t(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,n),time:t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,d),"date-time":t(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,u),"iso-time":t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,c),"iso-date-time":t(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,m),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},e.formatNames=Object.keys(e.fullFormats);let r=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,i=[0,31,28,31,30,31,30,31,31,30,31,30,31];function o(e){var t;let o=r.exec(e);if(!o)return!1;let n=+o[1],a=+o[2],s=+o[3];return a>=1&&a<=12&&s>=1&&s<=(2===a&&(t=n)%4==0&&(t%100!=0||t%400==0)?29:i[a])}function n(e,t){if(e&&t)return e>t?1:e23||l>59||e&&!s)return!1;if(i<=23&&o<=59&&n<60)return!0;let p=o-l*d,u=i-c*d-(p<0);return(23===u||-1===u)&&(59===p||-1===p)&&n<61}}function d(e,t){if(!(e&&t))return;let r=(new Date("2020-01-01T"+e)).valueOf(),i=(new Date("2020-01-01T"+t)).valueOf();if(r&&i)return r-i}function c(e,t){if(!(e&&t))return;let r=a.exec(e),i=a.exec(t);if(r&&i)return(e=r[1]+r[2]+r[3])>(t=i[1]+i[2]+i[3])?1:e{Object.defineProperty(e,"__esModule",{value:!0}),e.formatLimitDefinition=void 0;let t=p1(),r=lY(),i=r.operators,o={formatMaximum:{okStr:"<=",ok:i.LTE,fail:i.GT},formatMinimum:{okStr:">=",ok:i.GTE,fail:i.LT},formatExclusiveMaximum:{okStr:"<",ok:i.LT,fail:i.GTE},formatExclusiveMinimum:{okStr:">",ok:i.GT,fail:i.LTE}};e.formatLimitDefinition={keyword:Object.keys(o),type:"string",schemaType:"string",$data:!0,error:{message:({keyword:e,schemaCode:t})=>(0,r.str)`should be ${o[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,r._)`{comparison: ${o[e].okStr}, limit: ${t}}`},code(e){let i,n,{gen:a,data:s,schemaCode:d,keyword:c,it:l}=e,{opts:p,self:u}=l;if(!p.validateFormats)return;let m=new t.KeywordCxt(l,u.RULES.all.format.definition,"format");function f(e){return(0,r._)`${e}.compare(${s}, ${d}) ${o[c].fail} 0`}m.$data?(i=a.scopeValue("formats",{ref:u.formats,code:p.code.formats}),n=a.const("fmt",(0,r._)`${i}[${m.schemaCode}]`),e.fail$data((0,r.or)((0,r._)`typeof ${n} != "object"`,(0,r._)`${n} instanceof RegExp`,(0,r._)`typeof ${n}.compare != "function"`,f(n)))):function(){let t=m.schema,i=u.formats[t];if(!i||!0===i)return;if("object"!=typeof i||i instanceof RegExp||"function"!=typeof i.compare)throw Error(`"${c}": format "${t}" does not define "compare" function`);let o=a.scopeValue("formats",{key:t,ref:i,code:p.code.formats?(0,r._)`${p.code.formats}${(0,r.getProperty)(t)}`:void 0});e.fail$data(f(o))}()},dependencies:["format"]},e.default=t=>(t.addKeyword(e.formatLimitDefinition),t)}),uV=eb((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0});let r=uk(),i=uw(),o=lY(),n=new o.Name("fullFormats"),a=new o.Name("fastFormats"),s=(e,t={keywords:!0})=>{if(Array.isArray(t))return d(e,t,r.fullFormats,n),e;let[o,s]="fast"===t.mode?[r.fastFormats,a]:[r.fullFormats,n];return d(e,t.formats||r.formatNames,o,s),t.keywords&&(0,i.default)(e),e};function d(e,t,r,i){var n;for(let a of(null!=(n=e.opts.code).formats||(n.formats=(0,o._)`require("ajv-formats/dist/formats").${i}`),t))e.addFormat(a,r[a])}s.get=(e,t="full")=>{let i=("fast"===t?r.fastFormats:r.fullFormats)[e];if(!i)throw Error(`Unknown format "${e}"`);return i},t.exports=e=s,Object.defineProperty(e,"__esModule",{value:!0}),e.default=s}),uP=p1(),uR=up(),uq=uS();let uI=(e$(uV(),1)).default;function ux(e){let t=new e({strict:!1,validateFormats:!0,validateSchema:!1,allErrors:!0});return uI(t),t}var uj=class{_ajv;_ajvDraft7;_ajv2019;_userAjv;constructor(e){this._userAjv=void 0!==e,this._ajv=e}get ajv(){return this._ajv??=ux(uq.Ajv2020)}_engineFor(e){if(this._userAjv)return this.ajv;let t=function(e,t){if(!("$schema"in e)||"string"!=typeof e.$schema)return"2020-12";let r=e.$schema.replace(/#$/,"");if(eS.has(r))return"2020-12";if(ek.has(r))return"2019-09";if(ew.has(r)||eV.has(r))return"draft-7";throw Error(`JSON Schema declares an unsupported dialect ("$schema": "${e.$schema.slice(0,200)}"). The default validator supports JSON Schema 2020-12, 2019-09, draft-07, and draft-06; ${t}`)}(e,"pass a pre-configured Ajv instance to AjvJsonSchemaValidator(ajv) to validate other dialects.");return"2020-12"===t?this.ajv:"2019-09"===t?this._ajv2019??=ux(uR.Ajv2019):this._ajvDraft7??=ux(uP.Ajv)}getValidator(e){let t=this._engineFor(e),r="$id"in e&&"string"==typeof e.$id?t.getSchema(e.$id)??t.compile(e):t.compile(e);return e=>r(e)?{valid:!0,data:e,errorMessage:void 0}:{valid:!1,data:void 0,errorMessage:t.errorsText(r.errors)}}};uP.Ajv;let uC=Symbol.for("mcp.completable");function uT(e){return!!e&&"object"==typeof e&&uC in e}function uO(e,t){if(!Number.isFinite(e)||e<1)return;let r=setInterval(t,Math.min(e,0x7fffffff));return r.unref?.(),r}var uE=class{static{s=e=>e._classification}onclose;onerror;onmessage;_classification;_responseMode;_started=!1;_used=!1;_closed=!1;_terminalDelivered=!1;_dispatchWindowOpen=!1;_requestId;_deferredResponse;_sse;_abortCleanup;_keepAliveMs;constructor(e){this._classification=e.classification,this._responseMode=e.responseMode??"auto",this._keepAliveMs=e.keepAliveMs??15e3}async start(){if(this._started)throw Error("PerRequestHTTPServerTransport is already started");this._started=!0}async handleMessage(e,t){if(this._used)throw Error("PerRequestHTTPServerTransport serves exactly one exchange; construct a new transport per request");if(!this._started||void 0===this.onmessage)throw Error("PerRequestHTTPServerTransport is not connected: connect a server to this transport before handling a message");if(this._closed)throw Error("PerRequestHTTPServerTransport is closed");this._used=!0;let r=t?.request?.signal;if(r?.aborted)throw await this.close(),new cf(cm.ConnectionClosed,"The request was aborted before it could be handled");let i={classification:this._classification,...t?.request!==void 0&&{request:t.request},...t?.authInfo!==void 0&&{authInfo:t.authInfo}};if(ll(e)){let t,o;this._requestId=e.id;let n=new Promise((e,r)=>{t=e,o=r});if(this._deferredResponse={promise:n,resolve:t,reject:o,settled:!1},void 0!==r){let e=()=>void this.close();r.addEventListener("abort",e,{once:!0}),this._abortCleanup=()=>r.removeEventListener("abort",e)}this._dispatchWindowOpen=!0;try{this.onmessage(e,i)}finally{this._dispatchWindowOpen=!1}return"sse"!==this._responseMode||this._closed||this._deferredResponse.settled||this.upgradeToSse(),n}return this.onmessage(e,i),new Response(null,{status:202})}async send(e,t){if(this._closed)return;let r=aE.safeParse(e).success||aA.safeParse(e).success,i=r?e.id:t?.relatedRequestId;if(void 0===this._requestId||void 0===i||i!==this._requestId){r&&this.onerror?.(Error(`Received a response for an unknown request id: ${String(e.id)}`));return}if(r){if(this._terminalDelivered)return;this._terminalDelivered=!0;let t=aA.safeParse(e).success?e.error.code:void 0,r=void 0!==t&&(this._dispatchWindowOpen||t===cG.MissingRequiredClientCapability)?l_[t]:void 0;if(void 0!==r&&void 0===this._sse){this.settleResponse(Response.json(e,{status:r,headers:{"Content-Type":"application/json"}})),queueMicrotask(()=>void this.close());return}if(void 0!==this._sse||"sse"===this._responseMode){void 0===this._sse&&this.upgradeToSse(),this.writeMessageFrame(e),this.finalizeStream();return}this.settleResponse(Response.json(e,{status:200,headers:{"Content-Type":"application/json"}})),queueMicrotask(()=>void this.close());return}"json"!==this._responseMode&&(void 0===this._sse&&this.upgradeToSse(),this.writeMessageFrame(e))}writeCommentFrame(e){if(this._closed||void 0===this._sse||this._sse.closed)return;let t=e.split("\n").map(e=>`: ${e}`).join("\n");this.writeFrame(`${t} `)}async close(){if(!this._closed){if(this._closed=!0,this._abortCleanup?.(),this._abortCleanup=void 0,this._sse?.keepAliveTimer!==void 0&&clearInterval(this._sse.keepAliveTimer),void 0!==this._sse&&!this._sse.closed){this._sse.closed=!0;try{this._sse.controller.close()}catch{}}void 0===this._deferredResponse||this._deferredResponse.settled||(this._deferredResponse.settled=!0,this._deferredResponse.reject(new cf(cm.ConnectionClosed,"Connection closed before a response was produced"))),this.onclose?.()}}settleResponse(e){void 0===this._deferredResponse||this._deferredResponse.settled||(this._deferredResponse.settled=!0,this._deferredResponse.resolve(e))}upgradeToSse(){let e,t=new ReadableStream({start:t=>{e=t},cancel:()=>{this.close()}});this._sse={controller:e,encoder:new TextEncoder,closed:!1},this._sse.keepAliveTimer=uO(this._keepAliveMs,()=>this.writeCommentFrame("keepalive")),this.settleResponse(new Response(t,{status:200,headers:{"Content-Type":"text/event-stream","Cache-Control":"no-cache, no-transform",Connection:"keep-alive","X-Accel-Buffering":"no"}}))}finalizeStream(){if(this._sse?.keepAliveTimer!==void 0&&clearInterval(this._sse.keepAliveTimer),void 0!==this._sse&&!this._sse.closed){this._sse.closed=!0;try{this._sse.controller.close()}catch{}}queueMicrotask(()=>void this.close())}writeMessageFrame(e){this.writeFrame(`event: message data: ${JSON.stringify(e)} -`)}writeFrame(e){if(void 0!==this._sse&&!this._sse.closed)try{this._sse.controller.enqueue(this._sse.encoder.encode(e))}catch(e){this.onerror?.(Error(`Failed to write to the response stream: ${e}`))}}};function uA(e){return e.replaceAll(/[\\"]/g,String.raw`\$&`).replaceAll(/[^\u0020-\u007E]/g," ")}function uM(e,t,r,i){let o=`Bearer error="${uA(e)}", error_description="${uA(t)}"`;return r.length>0&&(o+=`, scope="${uA(r.join(" "))}"`),i&&(o+=`, resource_metadata="${uA(i)}"`),o}function uW(e,t,r){if(null===r||"object"!=typeof r||"string"!=typeof r.method)throw new cB(cG.InternalError,`Handler for ${e} returned an invalid input request '${t}': each inputRequests entry must be an embedded elicitation/create, sampling/createMessage, or roots/list request`);let i=function(e){switch(e.method){case"elicitation/create":if(e.params?.mode==="url")return{elicitation:{url:{}}};return{elicitation:{form:{}}};case"sampling/createMessage":{let t=e.params;if(void 0!==t&&(void 0!==t.tools||void 0!==t.toolChoice))return{sampling:{tools:{}}};return{sampling:{}}}case"roots/list":return{roots:{}};default:return}}(r);if(void 0===i)throw new cB(cG.InternalError,`Handler for ${e} returned an input request '${t}' of kind '${r.method}', which is not an embedded request the 2026-07-28 revision defines`);return{embedded:r,required:i}}function uN(e,t){if("tools/call"===e)return{content:[{type:"text",text:t}],isError:!0};throw new cB(cG.InternalError,t)}var uz=class{constructor(e){this._host=e}async fulfill(e,t,r,i,o){let{maxRounds:n,roundTimeoutMs:a}=this._host,s=i.mcpReq.signal,d=o,c=0;for(;;){let o;if((c+=1)>n)return uN(e,`Multi-round-trip request '${e}' still required input after ${n} rounds (inputRequired.maxRounds)`);let l=d.inputRequests,p=null!=l&&Object.keys(l).length>0,u="string"==typeof d.requestState?d.requestState:void 0;if(!p&&void 0===u)throw new cB(cG.InternalError,`Handler for ${e} returned an input-required result with neither inputRequests nor requestState (every InputRequiredResult must include at least one of the two)`);if(p){let t=this._host.resolvedClientCapabilities(i),r=[];for(let[i,o]of Object.entries(l)){let{embedded:n,required:a}=uW(e,i,o);if("roots/list"!==n.method&&void 0===n.params)throw new cB(cG.InternalError,`Handler for ${e} returned an input request '${i}' of kind '${n.method}' without params`);if(void 0!==cy(a,t))return uN(e,`Cannot request input '${i}' (${n.method}): the client on this 2025-era connection did not declare the required capability${void 0===t?" (no client capabilities are available on this connection — per-request legacy serving cannot receive server-to-client requests)":""}`);r.push([i,n])}let n=function(e){let t=new AbortController,r=()=>t.abort(e?.reason);return e?.addEventListener("abort",r,{once:!0}),e?.aborted&&t.abort(e.reason),{signal:t.signal,abort:e=>t.abort(e),dispose:()=>e?.removeEventListener("abort",r)}}(s);try{let e={relatedRequestId:i.mcpReq.id,timeout:a,resetTimeoutOnProgress:!0,onprogress:()=>{},signal:n.signal},t=await Promise.all(r.map(async([t,r])=>{try{return[t,await this._dispatchLeg(r,e)]}catch(e){throw n.abort(e),e}}));o=Object.fromEntries(t)}catch(t){if(s.aborted)throw t;return uN(e,`Fulfilling input required by '${e}' failed: ${t instanceof Error?t.message:String(t)}`)}finally{n.dispose()}}else await function(e){return new Promise((t,r)=>{if(e?.aborted)return void r(e.reason instanceof cf?e.reason:new cf(cm.RequestTimeout,String(e.reason)));let i=setTimeout(()=>{e?.removeEventListener("abort",o),t()},250),o=()=>{clearTimeout(i),r(e?.reason instanceof cf?e.reason:new cf(cm.RequestTimeout,String(e?.reason)))};e?.addEventListener("abort",o,{once:!0})})}(s);let m={...i,mcpReq:{...i.mcpReq,inputResponses:o,droppedInputResponseKeys:void 0,requestState:function(e){return()=>e}(u)}};if(void 0!==u){let t=await this._host.verifyRequestState(u,m,e);void 0!==t&&(m=lD(m,t))}let f=await t(r,m);if(!lp(f))return f;d=f}}async _dispatchLeg(e,t){switch(e.method){case"elicitation/create":{let r=e.params;return"url"===r.mode&&void 0===r.elicitationId&&(r={...r,elicitationId:function(){let e=globalThis.crypto;if(e?.randomUUID!==void 0)return e.randomUUID();let t=new Uint8Array(16);e.getRandomValues(t),t[6]=15&t[6]|64,t[8]=63&t[8]|128;let r=[...t].map(e=>e.toString(16).padStart(2,"0")).join("");return`${r.slice(0,8)}-${r.slice(8,12)}-${r.slice(12,16)}-${r.slice(16,20)}-${r.slice(20)}`}()}),await this._host.sendElicitation(r,t)}case"sampling/createMessage":return await this._host.sendSampling(e.params,t);case"roots/list":return await this._host.listRoots(e.params,t)}}};let uD=new Set(["tools/call","prompts/get","resources/read"]);var uF=class extends lF{_clientCapabilities;_clientVersion;_capabilities;_instructions;_jsonSchemaValidator;_cacheHints;_requestStateVerify;_inputRequiredServing;_legacyShim;_boundFromTransport=!1;_legacyInputRequiredShim(){return this._legacyShim??=new uz({maxRounds:this._inputRequiredServing.maxRounds,roundTimeoutMs:this._inputRequiredServing.roundTimeoutMs,resolvedClientCapabilities:e=>this._inputRequestCapabilityView(e),verifyRequestState:(e,t,r)=>this._verifyRequestState(e,t,r),sendElicitation:(e,t)=>this._sendElicitationLeg(e,t,{validateAcceptedContent:!1}),sendSampling:(e,t)=>this.createMessage(e,t),listRoots:(e,t)=>this.listRoots(e,t)})}oninitialized;constructor(e,t){if(super(t),this._serverInfo=e,this._capabilities=t?.capabilities?{...t.capabilities}:{},this._instructions=t?.instructions,this._jsonSchemaValidator=t?.jsonSchemaValidator??new uj,this._requestStateVerify=t?.requestState?.verify,this._inputRequiredServing=function(e){if(e?.maxRounds!==void 0&&(!Number.isInteger(e.maxRounds)||e.maxRounds<1))throw RangeError(`inputRequired.maxRounds must be a positive integer (got ${e.maxRounds})`);if(e?.roundTimeoutMs!==void 0&&(!Number.isFinite(e.roundTimeoutMs)||e.roundTimeoutMs<=0))throw RangeError(`inputRequired.roundTimeoutMs must be a positive number (got ${e.roundTimeoutMs})`);return{maxRounds:e?.maxRounds??8,roundTimeoutMs:e?.roundTimeoutMs??6e5,legacyShim:e?.legacyShim??!0}}(t?.inputRequired),t?.cacheHints!==void 0){for(let[e,r]of Object.entries(t.cacheHints))void 0!==r&&cH(r,`cacheHints['${e}']`);this._cacheHints=t.cacheHints}this.setRequestHandler("initialize",e=>this._oninitialize(e)),this.setNotificationHandler("notifications/initialized",()=>this.oninitialized?.()),cv(this._supportedProtocolVersions).length>0&&this.setRequestHandler("server/discover",()=>this._ondiscover()),this._capabilities.logging&&this._registerLoggingHandler()}async connect(e){if(void 0!==this.transport)throw new cf(cm.AlreadyConnected,"Use a separate Server instance per connection: this instance is already connected to a transport. To connect it to a new transport, call close() first.");this._boundFromTransport&&(this._boundFromTransport=!1,this._negotiatedProtocolVersion=void 0);let t=(e instanceof uE?s(e):void 0)?.revision;void 0!==t&&!this._servedModernEra()&&c_.includes(t)&&cv(this._supportedProtocolVersions).includes(t)&&(this._negotiatedProtocolVersion=t,this._boundFromTransport=!0),await super.connect(e)}_registerLoggingHandler(){this.setRequestHandler("logging/setLevel",async(e,t)=>{let r=t.sessionId||t.http?.req?.headers.get("mcp-session-id")||void 0,{level:i}=e.params,o=oJ(s0,i);return o.success&&this._loggingLevels.set(r,o.data),{}})}buildContext(e,t){let r=e.http||t?.request||t?.closeSSEStream||t?.closeStandaloneSSEStream;return{...e,mcpReq:{...e.mcpReq,log:(t,r,i)=>{let o;if(!this._capabilities.logging)return Promise.resolve();if(this._servedModernEra()){if(void 0===(o=e.mcpReq.envelope?.[ay]))return Promise.resolve()}else o=this._loggingLevels.get(e.sessionId)??this._loggingLevels.get(void 0);return void 0!==o&&this.LOG_LEVEL_SEVERITY.get(t)this.elicitInput(e,t),requestSampling:(e,t)=>this.createMessage(e,t)},http:r?{...e.http,req:t?.request,closeSSE:t?.closeSSEStream,closeStandaloneSSE:t?.closeStandaloneSSEStream}:void 0}}_loggingLevels=new Map;LOG_LEVEL_SEVERITY=new Map(s0.options.map((e,t)=>[e,t]));isMessageIgnored=(e,t)=>{let r=this._loggingLevels.get(t);return!!r&&this.LOG_LEVEL_SEVERITY.get(e){let a=i?await this._invokeInputRequiredCapableHandler(e,t,o,n):await t(o,n);if(lp(a)){if(!i)throw new cB(cG.InternalError,`Handler for ${e} returned an input-required result, but only tools/call, prompts/get and resources/read support input_required (protocol revision 2026-07-28)`);return a}return void 0===r?a:cF(a,r)}:async(r,i)=>{let o=await t(r,i);if(lp(o))throw new cB(cG.InternalError,`Handler for ${e} returned an input-required result, but only tools/call, prompts/get and resources/read support input_required (protocol revision 2026-07-28)`);return o}}return async(e,r)=>{let i=li(this._negotiatedProtocolVersion),o=i.validateRequest("tools/call",e);if(!o.ok)throw new cB("not-in-era"===o.reason?cG.InternalError:cG.InvalidParams,"not-in-era"===o.reason?"No wire schema for tools/call in the resolved era":`Invalid tools/call request: ${o.message}`);let n=await this._invokeInputRequiredCapableHandler("tools/call",t,e,r);if(lp(n))return n;let a=cS(n),s=i.validateResult("tools/call",a);if(!s.ok)throw new cB("not-in-era"===s.reason?cG.InternalError:cG.InvalidParams,"not-in-era"===s.reason?"No wire schema for tools/call in the resolved era":`Invalid tools/call result: ${s.message}`);return s.value}}_servedModernEra(){return void 0!==this._negotiatedProtocolVersion&&this._negotiatedProtocolVersion>=cg}async _invokeInputRequiredCapableHandler(e,t,r,i){let o,n=this._servedModernEra(),a=i.mcpReq.requestState();if(void 0!==a&&"string"!=typeof a)throw new cB(cG.InvalidParams,"Invalid or expired requestState",{reason:"invalid_request_state"});let s=i;if("string"==typeof a){let t=await this._verifyRequestState(a,i,e);void 0!==t&&(s=lD(i,t))}try{o=await t(r,s)}catch(e){if(e instanceof cB&&e.code===cG.UrlElicitationRequired){if(!n)throw e;throw new cB(cG.InternalError,`URL elicitation cannot be signalled by throwing UrlElicitationRequiredError on protocol revision ${this._negotiatedProtocolVersion}: return inputRequired({ inputRequests: { …: inputRequired.elicitUrl(...) } }) from the handler instead. The urlElicitationRequired error (-32042) of earlier revisions is not available on this revision.`)}throw e}if(!lp(o))return o;if(!n){if(!this._inputRequiredServing.legacyShim)throw new cB(cG.InternalError,`Handler for ${e} returned an input-required result, but this request is served on protocol revision ${this._negotiatedProtocolVersion??al}, which has no input_required vocabulary`);return await this._legacyInputRequiredShim().fulfill(e,t,r,s,o)}let d=o.inputRequests,c=null!=d&&Object.keys(d).length>0,l="string"==typeof o.requestState;if(!c&&!l)throw new cB(cG.InternalError,`Handler for ${e} returned an input-required result with neither inputRequests nor requestState (every InputRequiredResult must include at least one of the two)`);if(c){let t=this._inputRequestCapabilityView(i);for(let[r,i]of Object.entries(d)){let{embedded:o,required:n}=uW(e,r,i),a=cy(n,t);if(void 0!==a)throw new cQ({requiredCapabilities:a},`Cannot request input '${r}' (${o.method}): the request's client capabilities do not declare the required capability`)}}return o}async _verifyRequestState(e,t,r){if(void 0!==this._requestStateVerify)try{return await this._requestStateVerify(e,t)}catch(e){throw this.onerror?.(Error(`requestState verification rejected ${r}: ${e instanceof Error?e.message:String(e)}`)),new cB(cG.InvalidParams,"Invalid or expired requestState",{reason:"invalid_request_state"})}}_inputRequestCapabilityView(e){return this._servedModernEra()?e.mcpReq.envelope?.[ah]:this._clientCapabilities}_assertPushApiInServedEra(e){if(this._servedModernEra())throw new cf(cm.MethodNotSupportedByProtocolVersion,`Server-to-client requests are not available on protocol revision ${this._negotiatedProtocolVersion}: '${e}' cannot be sent while serving a request on that revision. Return inputRequired({ ... }) from the handler instead — the client fulfils the embedded requests and retries the original request (multi round-trip requests).`,{method:e,era:"2026-07-28"})}assertCapabilityForMethod(e){switch(e){case"sampling/createMessage":if(!this._clientCapabilities?.sampling)throw new cf(cm.CapabilityNotSupported,`Client does not support sampling (required for ${e})`);break;case"elicitation/create":if(!this._clientCapabilities?.elicitation)throw new cf(cm.CapabilityNotSupported,`Client does not support elicitation (required for ${e})`);break;case"roots/list":if(!this._clientCapabilities?.roots)throw new cf(cm.CapabilityNotSupported,`Client does not support listing roots (required for ${e})`)}}assertNotificationCapability(e){switch(e){case"notifications/message":if(!this._capabilities.logging)throw new cf(cm.CapabilityNotSupported,`Server does not support logging (required for ${e})`);break;case"notifications/resources/updated":case"notifications/resources/list_changed":if(!this._capabilities.resources)throw new cf(cm.CapabilityNotSupported,`Server does not support notifying about resources (required for ${e})`);break;case"notifications/tools/list_changed":if(!this._capabilities.tools)throw new cf(cm.CapabilityNotSupported,`Server does not support notifying of tool list changes (required for ${e})`);break;case"notifications/prompts/list_changed":if(!this._capabilities.prompts)throw new cf(cm.CapabilityNotSupported,`Server does not support notifying of prompt list changes (required for ${e})`);break;case"notifications/elicitation/complete":if(!this._clientCapabilities?.elicitation?.url)throw new cf(cm.CapabilityNotSupported,`Client does not support URL elicitation (required for ${e})`)}}assertRequestHandlerCapability(e){switch(e){case"completion/complete":if(!this._capabilities.completions)throw new cf(cm.CapabilityNotSupported,`Server does not support completions (required for ${e})`);break;case"logging/setLevel":if(!this._capabilities.logging)throw new cf(cm.CapabilityNotSupported,`Server does not support logging (required for ${e})`);break;case"prompts/get":case"prompts/list":if(!this._capabilities.prompts)throw new cf(cm.CapabilityNotSupported,`Server does not support prompts (required for ${e})`);break;case"resources/list":case"resources/templates/list":case"resources/read":if(!this._capabilities.resources)throw new cf(cm.CapabilityNotSupported,`Server does not support resources (required for ${e})`);break;case"tools/call":case"tools/list":if(!this._capabilities.tools)throw new cf(cm.CapabilityNotSupported,`Server does not support tools (required for ${e})`)}}async _oninitialize(e){let t=e.params.protocolVersion;this._clientCapabilities=e.params.capabilities,this._clientVersion=e.params.clientInfo;let r=this._supportedProtocolVersions.filter(e=>!(e>=cg)),i=r.includes(t)?t:r[0]??al;return this._negotiatedProtocolVersion=i,this.transport?.setProtocolVersion?.(i),{protocolVersion:i,capabilities:this.getCapabilities(),serverInfo:this._serverInfo,...this._instructions&&{instructions:this._instructions}}}_ondiscover(){return{supportedVersions:cv(this._supportedProtocolVersions),capabilities:{...this.getCapabilities()},...this._instructions&&{instructions:this._instructions}}}_outboundServerInfo(){return this._serverInfo}getClientCapabilities(){return this._clientCapabilities}getClientVersion(){return this._clientVersion}getNegotiatedProtocolVersion(){return this._negotiatedProtocolVersion}projectCallToolResult(e,t){return this._wireCodec().projectCallToolResult(e,t)}getCapabilities(){return this._capabilities}async ping(){return this._assertPushApiInServedEra("ping"),this.request({method:"ping"})}async createMessage(e,t){if(this._assertPushApiInServedEra("sampling/createMessage"),(e.tools||e.toolChoice)&&!this._clientCapabilities?.sampling?.tools)throw new cf(cm.CapabilityNotSupported,"Client does not support sampling tools capability.");if(e.messages.length>0){let t=e.messages.at(-1),r=Array.isArray(t.content)?t.content:[t.content],i=r.some(e=>"tool_result"===e.type),o=e.messages.length>1?e.messages.at(-2):void 0,n=o?Array.isArray(o.content)?o.content:[o.content]:[],a=n.some(e=>"tool_use"===e.type);if(i){if(r.some(e=>"tool_result"!==e.type))throw new cB(cG.InvalidParams,"The last message must contain only tool_result content if any is present");if(!a)throw new cB(cG.InvalidParams,"tool_result blocks are not matching any tool_use from the previous message")}if(a){let e=new Set(n.filter(e=>"tool_use"===e.type).map(e=>e.id)),t=new Set(r.filter(e=>"tool_result"===e.type).map(e=>e.toolUseId));if(e.size!==t.size||![...e].every(e=>t.has(e)))throw new cB(cG.InvalidParams,"ids of tool_result blocks and tool_use blocks from previous message do not match")}}let r=!!(e.tools||e.toolChoice),i=await this.request({method:"sampling/createMessage",params:e},t),o=this._wireCodec().samplingResultVariant(r,i);if(!o.ok)throw new cf(cm.InvalidResult,`Invalid sampling/createMessage result: ${"invalid"===o.reason?o.message:o.reason}`);return o.value}async elicitInput(e,t){switch(this._assertPushApiInServedEra("elicitation/create"),e.mode??"form"){case"url":if(!this._clientCapabilities?.elicitation?.url)throw new cf(cm.CapabilityNotSupported,"Client does not support url elicitation.");break;case"form":if(!this._clientCapabilities?.elicitation?.form)throw new cf(cm.CapabilityNotSupported,"Client does not support form elicitation.")}return this._sendElicitationLeg(e,t)}async _sendElicitationLeg(e,t,r){let i=e.mode??"form",o=r?.validateAcceptedContent??!0;switch(i){case"url":return this.request({method:"elicitation/create",params:e},t);case"form":{let r="form"===e.mode?e:{...e,mode:"form"},i=await this.request({method:"elicitation/create",params:r},t);if(o&&"accept"===i.action&&i.content&&r.requestedSchema)try{let e=this._jsonSchemaValidator.getValidator(r.requestedSchema)(i.content);if(!e.valid)throw new cB(cG.InvalidParams,`Elicitation response content does not match requested schema: ${e.errorMessage}`)}catch(e){if(e instanceof cB)throw e;throw new cB(cG.InternalError,`Error validating elicitation response: ${e instanceof Error?e.message:String(e)}`)}return i}}}createElicitationCompletionNotifier(e,t){if(!this._clientCapabilities?.elicitation?.url)throw new cf(cm.CapabilityNotSupported,"Client does not support URL elicitation (required for notifications/elicitation/complete)");return()=>this.notification({method:"notifications/elicitation/complete",params:{elicitationId:e}},t)}async listRoots(e,t){return this._assertPushApiInServedEra("roots/list"),this.request({method:"roots/list",params:e},t)}async sendLoggingMessage(e,t){if(this._capabilities.logging&&!this.isMessageIgnored(e.level,t))return this.notification({method:"notifications/message",params:e})}async sendResourceUpdated(e){return this.notification({method:"notifications/resources/updated",params:e})}async sendResourceListChanged(){return this.notification({method:"notifications/resources/list_changed"})}async sendToolListChanged(){return this.notification({method:"notifications/tools/list_changed"})}async sendPromptListChanged(){return this.notification({method:"notifications/prompts/list_changed"})}},uL=class{server;_maxToolInputElements;_registeredResources={};_registeredResourceTemplates={};_registeredTools={};_registeredPrompts={};_toolInputSchemaJson={};toolInputSchemaJson(e){let t=this._registeredTools[e];if(void 0!==t&&t.enabled){if(Object.hasOwn(this._toolInputSchemaJson,e))return this._toolInputSchemaJson[e];if(void 0===t.inputSchema)return uG;try{let r=lk(t.inputSchema,"input");return this._toolInputSchemaJson[e]=r,r}catch{return}}}constructor(e,t){this.server=new uF(e,t),this._maxToolInputElements=function(e){if(void 0!==e&&1/0!==e){if("number"!=typeof e||Number.isNaN(e)||e<1)throw RangeError(`maxToolInputElements must be a number of at least 1, or Infinity, got ${String(e)}`);return e}}(t?.maxToolInputElements),t?.capabilities?.tools&&this.setToolRequestHandlers(),t?.capabilities?.resources&&this.setResourceRequestHandlers(),t?.capabilities?.prompts&&this.setPromptRequestHandlers()}async connect(e){return"object"==typeof e&&null!==e&&"setScopeChallengeResolver"in e&&"function"==typeof e.setScopeChallengeResolver&&e.setScopeChallengeResolver(e=>this.resolveScopeChallenge(e)),await this.server.connect(e)}async close(){await this.server.close()}resolveScopeChallenge=e=>{switch(e.request.method){case"tools/call":{let t=e.request.params?.name;if("string"!=typeof t)return;let r=this._registeredTools[t];if(void 0===r||!r.enabled)return;return r.scopeChallenge?.(e)}case"resources/read":{let t,r=e.request.params?.uri;if("string"!=typeof r)return;try{t=new URL(r)}catch{return}let i=this._registeredResources[t.toString()];if(void 0!==i)return i.enabled?i.scopeChallenge?.(e):void 0;for(let r of Object.values(this._registeredResourceTemplates))if(r.resourceTemplate.uriTemplate.match(t.toString()))return r.enabled?r.scopeChallenge?.(e):void 0;return}case"prompts/get":{let t=e.request.params?.name;if("string"!=typeof t)return;let r=this._registeredPrompts[t];if(void 0===r||!r.enabled)return;return r.scopeChallenge?.(e)}default:return}};_toolHandlersInitialized=!1;setToolRequestHandlers(){this._toolHandlersInitialized||(this.server.assertCanSetRequestHandler("tools/list"),this.server.assertCanSetRequestHandler("tools/call"),this.server.registerCapabilities({tools:{listChanged:this.server.getCapabilities().tools?.listChanged??!0}}),this.server.setRequestHandler("tools/list",()=>({tools:Object.entries(this._registeredTools).filter(([,e])=>e.enabled).map(([e,t])=>{let r={name:e,title:t.title,description:t.description,inputSchema:t.inputSchema?function(e,t){let r,i,o,n,a,s=lk(t,"input"),d=(i=[],o=new Map,void 0!==(a=(n=(e,t,a)=>{if(null===e||"object"!=typeof e)return;if(lu in e){if(!a||0===t.length)return`${lg(t)}: x-mcp-header is only permitted on properties statically reachable via a chain of 'properties' keys (not under items, additionalProperties, oneOf/anyOf/allOf/not, if/then/else, or $ref)`;let n=e[lu];if("string"!=typeof n||0===n.length)return`${lg(t)}: x-mcp-header MUST be a non-empty string`;if(!lm.test(n))return`${lg(t)}: x-mcp-header '${n}' is not a valid RFC 9110 token (no spaces, control characters or HTTP delimiters)`;let s="string"==typeof e.type?e.type:void 0;if(void 0===s||!lf.has(s)){let e=`${lg(t)}: x-mcp-header is only permitted on primitive-typed properties (string, integer, boolean); got ${s??""}`;if("number"!==s)return e;r??=e}let d=n.toLowerCase(),c=o.get(d);if(void 0!==c)return`x-mcp-header '${n}' is not case-insensitively unique (also declared as '${c}')`;o.set(d,n),i.push({path:t,headerName:n,type:s})}let s=e.properties;if(null!==s&&"object"==typeof s)for(let[e,r]of Object.entries(s)){let i=n(r,[...t,e],a);if(void 0!==i)return i}for(let r of lh){let i=e[r];if(void 0!==i)for(let e of Array.isArray(i)?i:null!==i&&"object"==typeof i&&ly.has(r)?Object.values(i):[i]){let i=n(e,[...t,`<${r}>`],!1);if(void 0!==i)return i}}})(s,[],!0))?{valid:!1,reason:r??a}:void 0===r?{valid:!0,declarations:i}:{valid:!1,reason:r,declarations:i});return d.valid||console.warn(`[mcp-sdk] tool '${e}' carries an invalid x-mcp-header declaration and will be excluded by conforming Streamable HTTP clients: ${d.reason}`),s}(e,t.inputSchema):uG,annotations:t.annotations,icons:t.icons,execution:t.execution,_meta:t._meta};return t.outputSchema&&(r.outputSchema=lk(t.outputSchema,"output")),r})})),this.server.setRequestHandler("tools/call",async(e,t)=>{let r=this._registeredTools[e.params.name];if(!r)throw new cB(cG.InvalidParams,`Tool ${e.params.name} not found`);if(!r.enabled)throw new cB(cG.InvalidParams,`Tool ${e.params.name} disabled`);try{let i=await this.validateToolInput(r,e.params.arguments,e.params.name),o=await this.executeToolHandler(r,i,t);if(await this.validateToolOutput(r,o,e.params.name),lp(o))return o;return this.server.projectCallToolResult(o,r.outputSchemaJson)}catch(e){if(e instanceof cB&&e.code===cG.UrlElicitationRequired)throw e;return this.createToolError(e instanceof Error?e.message:String(e))}}),this._toolHandlersInitialized=!0)}createToolError(e){return{content:[{type:"text",text:e}],isError:!0}}async validateToolInput(e,t,r){if(void 0!==this._maxToolInputElements&&function(e,t){let r=0,i=[e];for(;i.length>0;){let e=i.pop();if(null!==e&&"object"==typeof e)if(Array.isArray(e))for(let o of e){if(++r>t)return r;null!==o&&"object"==typeof o&&i.push(o)}else for(let o in e){if(!Object.prototype.hasOwnProperty.call(e,o))continue;if(++r>t)return r;let n=e[o];null!==n&&"object"==typeof n&&i.push(n)}}return r}(t,this._maxToolInputElements)>this._maxToolInputElements)throw new cB(cG.InvalidParams,`Invalid arguments for tool ${r}: arguments contain more than the maximum of ${this._maxToolInputElements} elements`);if(!e.inputSchema)return;let i=await lR(e.inputSchema,t??{});if(!i.success)throw new cB(cG.InvalidParams,`Input validation error: Invalid arguments for tool ${r}: ${i.error}`);return i.data}async validateToolOutput(e,t,r){if(!e.outputSchema||lp(t)||t.isError)return;if(void 0===t.structuredContent)throw new cB(cG.InvalidParams,`Output validation error: Tool ${r} has an output schema but no structured content was provided`);let i=await lR(e.outputSchema,t.structuredContent);if(!i.success)throw new cB(cG.InvalidParams,`Output validation error: Invalid structured content for tool ${r}: ${i.error}`)}async executeToolHandler(e,t,r){return e.executor(t,r)}_completionHandlerInitialized=!1;setCompletionRequestHandler(){this._completionHandlerInitialized||(this.server.assertCanSetRequestHandler("completion/complete"),this.server.registerCapabilities({completions:{}}),this.server.setRequestHandler("completion/complete",async e=>{switch(e.params.ref.type){case"ref/prompt":if("ref/prompt"!==e.params.ref.type)throw TypeError(`Expected CompleteRequestPrompt, but got ${e.params.ref.type}`);return this.handlePromptCompletion(e,e.params.ref);case"ref/resource":if("ref/resource"!==e.params.ref.type)throw TypeError(`Expected CompleteRequestResourceTemplate, but got ${e.params.ref.type}`);return this.handleResourceCompletion(e,e.params.ref);default:throw new cB(cG.InvalidParams,`Invalid completion reference: ${e.params.ref}`)}}),this._completionHandlerInitialized=!0)}async handlePromptCompletion(e,t){let r=this._registeredPrompts[t.name];if(!r)throw new cB(cG.InvalidParams,`Prompt ${t.name} not found`);if(!r.enabled)throw new cB(cG.InvalidParams,`Prompt ${t.name} disabled`);if(!r.argsSchema)return uZ;let i=uX(uQ(r.argsSchema)?.[e.params.argument.name]);if(!uT(i))return uZ;let o=i[uC]?.complete;return o?uJ(await o(e.params.argument.value,e.params.context)):uZ}async handleResourceCompletion(e,t){let r=Object.values(this._registeredResourceTemplates).find(e=>e.resourceTemplate.uriTemplate.toString()===t.uri);if(!r){if(this._registeredResources[t.uri])return uZ;throw new cB(cG.InvalidParams,`Resource template ${e.params.ref.uri} not found`)}let i=r.resourceTemplate.completeCallback(e.params.argument.name);return i?uJ(await i(e.params.argument.value,e.params.context)):uZ}_resourceHandlersInitialized=!1;setResourceRequestHandlers(){this._resourceHandlersInitialized||(this.server.assertCanSetRequestHandler("resources/list"),this.server.assertCanSetRequestHandler("resources/templates/list"),this.server.assertCanSetRequestHandler("resources/read"),this.server.registerCapabilities({resources:{listChanged:this.server.getCapabilities().resources?.listChanged??!0}}),this.server.setRequestHandler("resources/list",async(e,t)=>{let r=Object.entries(this._registeredResources).filter(([e,t])=>t.enabled).map(([e,t])=>({uri:e,name:t.name,...t.metadata})),i=[];for(let e of Object.values(this._registeredResourceTemplates))if(e.resourceTemplate.listCallback)for(let r of(await e.resourceTemplate.listCallback(t)).resources)i.push({...e.metadata,...r});return{resources:[...r,...i]}}),this.server.setRequestHandler("resources/templates/list",async()=>({resourceTemplates:Object.entries(this._registeredResourceTemplates).map(([e,t])=>({name:e,uriTemplate:t.resourceTemplate.uriTemplate.toString(),...t.metadata}))})),this.server.setRequestHandler("resources/read",async(e,t)=>{let r;try{r=new URL(e.params.uri)}catch{throw new cB(cG.InvalidParams,`Resource URI ${e.params.uri} is invalid`,{uri:e.params.uri,reason:"invalid_uri"})}let i=this._registeredResources[r.toString()];if(i){if(!i.enabled)throw new cB(cG.InvalidParams,`Resource ${r} disabled`);return cF(await i.readCallback(r,t),i.cacheHint)}for(let e of Object.values(this._registeredResourceTemplates)){let i=e.resourceTemplate.uriTemplate.match(r.toString());if(i){if(!e.enabled)throw new cB(cG.InvalidParams,`Resource template ${e.resourceTemplate.uriTemplate} disabled`);return cF(await e.readCallback(r,i,t),e.cacheHint)}}throw new cK(e.params.uri)}),this._resourceHandlersInitialized=!0)}_promptHandlersInitialized=!1;setPromptRequestHandlers(){this._promptHandlersInitialized||(this.server.assertCanSetRequestHandler("prompts/list"),this.server.assertCanSetRequestHandler("prompts/get"),this.server.registerCapabilities({prompts:{listChanged:this.server.getCapabilities().prompts?.listChanged??!0}}),this.server.setRequestHandler("prompts/list",()=>({prompts:Object.entries(this._registeredPrompts).filter(([,e])=>e.enabled).map(([e,t])=>{let r,i,o;return{name:e,title:t.title,description:t.description,arguments:t.argsSchema?(i=(r=lk(t.argsSchema,"input")).properties||{},o=r.required||[],Object.entries(i).map(([e,t])=>({name:e,description:t?.description,required:o.includes(e)}))):void 0,icons:t.icons,_meta:t._meta}})})),this.server.setRequestHandler("prompts/get",async(e,t)=>{let r=this._registeredPrompts[e.params.name];if(!r)throw new cB(cG.InvalidParams,`Prompt ${e.params.name} not found`);if(!r.enabled)throw new cB(cG.InvalidParams,`Prompt ${e.params.name} disabled`);return r.handler(e.params.arguments,t)}),this._promptHandlersInitialized=!0)}registerResource(e,t,r,i){let{cacheHint:o,scopeChallenge:n,...a}=r;if(void 0!==o&&cH(o,`resource ${e}`),"string"==typeof t){if(this._registeredResources[t])throw Error(`Resource ${t} is already registered`);let s=this._createRegisteredResource(e,r.title,t,a,n,i);return void 0!==o&&(s.cacheHint=o),this.setResourceRequestHandlers(),this.sendResourceListChanged(),s}{if(this._registeredResourceTemplates[e])throw Error(`Resource template ${e} is already registered`);let s=this._createRegisteredResourceTemplate(e,r.title,t,a,n,i);return void 0!==o&&(s.cacheHint=o),this.setResourceRequestHandlers(),this.sendResourceListChanged(),s}}_createRegisteredResource(e,t,r,i,o,n){let a={name:e,title:t,metadata:i,readCallback:n,scopeChallenge:o,enabled:!0,disable:()=>a.update({enabled:!1}),enable:()=>a.update({enabled:!0}),remove:()=>a.update({uri:null}),update:e=>{void 0!==e.uri&&e.uri!==r&&(delete this._registeredResources[r],e.uri&&(this._registeredResources[e.uri]=a)),void 0!==e.name&&(a.name=e.name),void 0!==e.metadata&&(a.metadata=e.metadata),void 0!==e.title&&(a.title=e.title,a.metadata={...a.metadata,title:e.title}),void 0!==e.callback&&(a.readCallback=e.callback),void 0!==e.scopeChallenge&&(a.scopeChallenge=null===e.scopeChallenge?void 0:e.scopeChallenge),void 0!==e.enabled&&(a.enabled=e.enabled),this.sendResourceListChanged()}};return this._registeredResources[r]=a,a}_createRegisteredResourceTemplate(e,t,r,i,o,n){let a={resourceTemplate:r,title:t,metadata:i,readCallback:n,scopeChallenge:o,enabled:!0,disable:()=>a.update({enabled:!1}),enable:()=>a.update({enabled:!0}),remove:()=>a.update({name:null}),update:t=>{void 0!==t.name&&t.name!==e&&(delete this._registeredResourceTemplates[e],t.name&&(this._registeredResourceTemplates[t.name]=a)),void 0!==t.template&&(a.resourceTemplate=t.template),void 0!==t.metadata&&(a.metadata=t.metadata),void 0!==t.title&&(a.title=t.title,a.metadata={...a.metadata,title:t.title}),void 0!==t.callback&&(a.readCallback=t.callback),void 0!==t.scopeChallenge&&(a.scopeChallenge=null===t.scopeChallenge?void 0:t.scopeChallenge),void 0!==t.enabled&&(a.enabled=t.enabled),this.sendResourceListChanged()}};this._registeredResourceTemplates[e]=a;let s=r.uriTemplate.variableNames;return Array.isArray(s)&&s.some(e=>!!r.completeCallback(e))&&this.setCompletionRequestHandler(),a}_createRegisteredPrompt(e,t,r,i,o,n,a,s){let d=i,c=o,l={title:t,description:r,argsSchema:i,icons:n,scopeChallenge:a,_meta:s,handler:uK(e,i,o),enabled:!0,disable:()=>l.update({enabled:!1}),enable:()=>l.update({enabled:!0}),remove:()=>l.update({name:null}),update:t=>{void 0!==t.name&&t.name!==e&&(delete this._registeredPrompts[e],t.name&&(this._registeredPrompts[t.name]=l)),void 0!==t.title&&(l.title=t.title),void 0!==t.description&&(l.description=t.description),void 0!==t.icons&&(l.icons=t.icons),void 0!==t.scopeChallenge&&(l.scopeChallenge=null===t.scopeChallenge?void 0:t.scopeChallenge),void 0!==t._meta&&(l._meta=t._meta);let r=!1;void 0!==t.argsSchema&&(l.argsSchema=t.argsSchema,d=t.argsSchema,r=!0),void 0!==t.callback&&(c=t.callback,r=!0),r&&(l.handler=uK(e,d,c)),void 0!==t.enabled&&(l.enabled=t.enabled),this.sendPromptListChanged()}};if(this._registeredPrompts[e]=l,i){let e=uQ(i);e&&Object.values(e).some(e=>uT(uX(e)))&&this.setCompletionRequestHandler()}return l}_createRegisteredTool(e,t,r,i,o,n,a,s,d,c,l){let p;lK(e);let u=l,m={title:t,description:r,inputSchema:i,outputSchema:o,get outputSchemaJson(){return p??=uB(m.outputSchema)},set outputSchemaJson(e){p=e},annotations:n,icons:a,execution:s,scopeChallenge:d,_meta:c,handler:l,executor:uH(i,l),enabled:!0,disable:()=>m.update({enabled:!1}),enable:()=>m.update({enabled:!0}),remove:()=>m.update({name:null}),update:t=>{void 0!==t.name&&t.name!==e&&("string"==typeof t.name&&lK(t.name),delete this._registeredTools[e],delete this._toolInputSchemaJson[e],t.name&&(delete this._toolInputSchemaJson[t.name],this._registeredTools[t.name]=m,e=t.name)),void 0!==t.title&&(m.title=t.title),void 0!==t.description&&(m.description=t.description);let r=!1;void 0!==t.paramsSchema&&(m.inputSchema=t.paramsSchema,delete this._toolInputSchemaJson[e],r=!0),void 0!==t.callback&&(m.handler=t.callback,u=t.callback,r=!0),r&&(m.executor=uH(m.inputSchema,u)),void 0!==t.outputSchema&&(m.outputSchema=t.outputSchema,m.outputSchemaJson=uB(t.outputSchema)),void 0!==t.annotations&&(m.annotations=t.annotations),void 0!==t.icons&&(m.icons=t.icons),void 0!==t.scopeChallenge&&(m.scopeChallenge=null===t.scopeChallenge?void 0:t.scopeChallenge),void 0!==t._meta&&(m._meta=t._meta),void 0!==t.enabled&&(m.enabled=t.enabled),this.sendToolListChanged()}};return this._registeredTools[e]=m,this.setToolRequestHandlers(),this.sendToolListChanged(),m}registerTool(e,t,r){if(this._registeredTools[e])throw Error(`Tool ${e} is already registered`);let{title:i,description:o,inputSchema:n,outputSchema:a,annotations:s,icons:d,scopeChallenge:c,_meta:l}=t;return this._createRegisteredTool(e,i,o,lZ(n),lZ(a),s,d,void 0,c,l,r)}registerPrompt(e,t,r){if(this._registeredPrompts[e])throw Error(`Prompt ${e} is already registered`);let{title:i,description:o,argsSchema:n,icons:a,scopeChallenge:s,_meta:d}=t,c=this._createRegisteredPrompt(e,i,o,lZ(n),r,a,s,d);return this.setPromptRequestHandlers(),this.sendPromptListChanged(),c}isConnected(){return void 0!==this.server.transport}async sendLoggingMessage(e,t){return this.server.sendLoggingMessage(e,t)}sendResourceListChanged(){this.isConnected()&&this.server.sendResourceListChanged()}sendToolListChanged(){this.isConnected()&&this.server.sendToolListChanged()}sendPromptListChanged(){this.isConnected()&&this.server.sendPromptListChanged()}},uU=class{_uriTemplate;constructor(e,t){this._callbacks=t,this._uriTemplate="string"==typeof e?new lJ(e):e}get uriTemplate(){return this._uriTemplate}get listCallback(){return this._callbacks.list}completeCallback(e){return this._callbacks.complete?.[e]}};function uH(e,t){return e?async(e,r)=>t(e,r):async(e,r)=>t(r)}let uG={type:"object",properties:{}};function uB(e){if(void 0!==e)try{return lk(e,"output")}catch{return}}function uK(e,t,r){return t?async(i,o)=>{let n=await lR(t,i??{});if(!n.success)throw new cB(cG.InvalidParams,`Invalid arguments for prompt ${e}: ${n.error}`);return r(n.data,o)}:async(e,t)=>r(t)}function uJ(e){return{completion:{values:e.map(String).slice(0,100),total:e.length,hasMore:e.length>100}}}let uZ={completion:{values:[],hasMore:!1}};function uQ(e){if(e.shape&&"object"==typeof e.shape)return e.shape}function uX(e){return e?.type!=="optional"?e:e.def?.innerType??e}var uY=class{sessionIdGenerator;_started=!1;_hasHandledRequest=!1;_closed=!1;_streamMapping=new Map;_requestToStreamMapping=new Map;_requestResponseMap=new Map;_initialized=!1;_enableJsonResponse=!1;_standaloneSseStreamId="_GET_stream";_eventStore;_onsessioninitialized;_onsessionclosed;_allowedHosts;_allowedOrigins;_enableDnsRebindingProtection;_retryInterval;_supportedProtocolVersions;_keepAliveMs;_maxRequestBodySize;_scopeChallengeResolver;sessionId;onclose;onerror;onmessage;constructor(e={}){this.sessionIdGenerator=e.sessionIdGenerator,this._enableJsonResponse=e.enableJsonResponse??!1,this._eventStore=e.eventStore,this._onsessioninitialized=e.onsessioninitialized,this._onsessionclosed=e.onsessionclosed,this._allowedHosts=e.allowedHosts,this._allowedOrigins=e.allowedOrigins,this._enableDnsRebindingProtection=e.enableDnsRebindingProtection??!1,this._retryInterval=e.retryInterval,this._supportedProtocolVersions=e.supportedProtocolVersions??ap,this._keepAliveMs=e.keepAliveMs??15e3,this._maxRequestBodySize=function(e){if(void 0===e)return 4194304;if("number"!=typeof e||!Number.isFinite(e)||e<=0)throw RangeError(`maxRequestBodySize must be a positive number of bytes, got ${String(e)}`);return e}(e.maxRequestBodySize)}startKeepAlive(e,t){if(this._closed)return;let r=uO(this._keepAliveMs,()=>{try{e.enqueue(t.encode(": keepalive\n\n"))}catch{void 0!==r&&clearInterval(r)}});return r}setScopeChallengeResolver(e){this._scopeChallengeResolver=e}async start(){if(this._started)throw Error("Transport already started");this._started=!0}setSupportedProtocolVersions(e){this._supportedProtocolVersions=e}createJsonErrorResponse(e,t,r,i){let o={code:t,message:r};return i?.data!==void 0&&(o.data=i.data),Response.json({jsonrpc:"2.0",error:o,id:null},{status:e,headers:{"Content-Type":"application/json",...i?.headers}})}async _checkScopeChallenge(e,t){var r;if(!this._scopeChallengeResolver)return;let i=await async function(e,t,r){for(let o of e){let e=await r({request:o,...void 0!==t&&{authInfo:t}});if(void 0!==e){if(null===e||"object"!=typeof e||!Array.isArray(e.scopes)||0===e.scopes.length)throw TypeError("scope challenge must contain at least one scope");for(let[t,r]of e.scopes.entries()){var i=`scope challenge scopes[${t}]`;if("string"!=typeof r||!/^[\u0021\u0023-\u005B\u005D-\u007E]+$/.test(r))throw TypeError(`${i} must satisfy the OAuth scope-token grammar`)}if(void 0!==e.errorDescription&&"string"!=typeof e.errorDescription)throw TypeError("scope challenge errorDescription must be a string");if(void 0!==e.errorDescription&&!/^[\u0020-\u0021\u0023-\u005B\u005D-\u007E]+$/.test(e.errorDescription))throw TypeError("scope challenge errorDescription must satisfy the RFC 6750 error-description grammar");return e}}}(e.filter(e=>ll(e)),t,this._scopeChallengeResolver);return void 0===i?void 0:(r=function(e){if(e?.resourceMetadataUrl!==void 0)return e.resourceMetadataUrl;if(e?.resource?.protocol==="https:"||e?.resource?.protocol==="http:"){var t,r;let i,o;return i=new URL(t=e.resource),o=(r=t.pathname).length>1&&r.endsWith("/")?r.slice(0,-1):r,i.pathname=`/.well-known/oauth-protected-resource${"/"===o?"":o}`,i.hash="",i.href}}(t),function(e,t){let{requiredScopes:r=[],resourceMetadataUrl:i}=t??{};if(!(e instanceof cu)){let e=new cu(cp.ServerError,"Internal Server Error");return Response.json(e.toResponseObject(),{status:500})}switch(e.code){case cp.InvalidToken:{let t=uM(e.code,e.message,r,i);return Response.json(e.toResponseObject(),{status:401,headers:{"WWW-Authenticate":t}})}case cp.InsufficientScope:{let t=uM(e.code,e.message,r,i);return Response.json(e.toResponseObject(),{status:403,headers:{"WWW-Authenticate":t}})}case cp.ServerError:return Response.json(e.toResponseObject(),{status:500});default:return Response.json(e.toResponseObject(),{status:400})}}(new cu(cp.InsufficientScope,i.errorDescription??"Insufficient scope"),{requiredScopes:[...i.scopes],resourceMetadataUrl:r}))}validateRequestHeaders(e){if(this._enableDnsRebindingProtection){if(this._allowedHosts&&this._allowedHosts.length>0){let t=e.headers.get("host");if(!t||!this._allowedHosts.includes(t)){let e=`Invalid Host header: ${t}`;return this.onerror?.(Error(e)),this.createJsonErrorResponse(403,-32e3,e)}}if(this._allowedOrigins&&this._allowedOrigins.length>0){let t=e.headers.get("origin");if(t&&!this._allowedOrigins.includes(t)){let e=`Invalid Origin header: ${t}`;return this.onerror?.(Error(e)),this.createJsonErrorResponse(403,-32e3,e)}}}}async handleRequest(e,t){if(this._closed)return this.createJsonErrorResponse(404,-32001,"Session not found");if(!this.sessionIdGenerator&&this._hasHandledRequest)throw Error("Stateless transport cannot be reused across requests. Create a new transport per request.");this._hasHandledRequest=!0;let r=this.validateRequestHeaders(e);if(r)return r;switch(e.method){case"POST":return this.handlePostRequest(e,t);case"GET":return this.handleGetRequest(e);case"DELETE":return this.handleDeleteRequest(e);default:return this.handleUnsupportedRequest()}}supportsEmptySSEData(e){return this._supportedProtocolVersions.includes(e)&&e>="2025-11-25"}async writePrimingEvent(e,t,r,i){if(!this._eventStore||!this.supportsEmptySSEData(i))return;let o=await this._eventStore.storeEvent(r,{}),n=`id: ${o} +`)}writeFrame(e){if(void 0!==this._sse&&!this._sse.closed)try{this._sse.controller.enqueue(this._sse.encoder.encode(e))}catch(e){this.onerror?.(Error(`Failed to write to the response stream: ${e}`))}}};function uA(e){return e.replaceAll(/[\\"]/g,String.raw`\$&`).replaceAll(/[^\u0020-\u007E]/g," ")}function uW(e,t,r,i){let o=`Bearer error="${uA(e)}", error_description="${uA(t)}"`;return r.length>0&&(o+=`, scope="${uA(r.join(" "))}"`),i&&(o+=`, resource_metadata="${uA(i)}"`),o}function uM(e,t,r){if(null===r||"object"!=typeof r||"string"!=typeof r.method)throw new cB(cG.InternalError,`Handler for ${e} returned an invalid input request '${t}': each inputRequests entry must be an embedded elicitation/create, sampling/createMessage, or roots/list request`);let i=function(e){switch(e.method){case"elicitation/create":if(e.params?.mode==="url")return{elicitation:{url:{}}};return{elicitation:{form:{}}};case"sampling/createMessage":{let t=e.params;if(void 0!==t&&(void 0!==t.tools||void 0!==t.toolChoice))return{sampling:{tools:{}}};return{sampling:{}}}case"roots/list":return{roots:{}};default:return}}(r);if(void 0===i)throw new cB(cG.InternalError,`Handler for ${e} returned an input request '${t}' of kind '${r.method}', which is not an embedded request the 2026-07-28 revision defines`);return{embedded:r,required:i}}function uN(e,t){if("tools/call"===e)return{content:[{type:"text",text:t}],isError:!0};throw new cB(cG.InternalError,t)}var uz=class{constructor(e){this._host=e}async fulfill(e,t,r,i,o){let{maxRounds:n,roundTimeoutMs:a}=this._host,s=i.mcpReq.signal,d=o,c=0;for(;;){let o;if((c+=1)>n)return uN(e,`Multi-round-trip request '${e}' still required input after ${n} rounds (inputRequired.maxRounds)`);let l=d.inputRequests,p=null!=l&&Object.keys(l).length>0,u="string"==typeof d.requestState?d.requestState:void 0;if(!p&&void 0===u)throw new cB(cG.InternalError,`Handler for ${e} returned an input-required result with neither inputRequests nor requestState (every InputRequiredResult must include at least one of the two)`);if(p){let t=this._host.resolvedClientCapabilities(i),r=[];for(let[i,o]of Object.entries(l)){let{embedded:n,required:a}=uM(e,i,o);if("roots/list"!==n.method&&void 0===n.params)throw new cB(cG.InternalError,`Handler for ${e} returned an input request '${i}' of kind '${n.method}' without params`);if(void 0!==cy(a,t))return uN(e,`Cannot request input '${i}' (${n.method}): the client on this 2025-era connection did not declare the required capability${void 0===t?" (no client capabilities are available on this connection — per-request legacy serving cannot receive server-to-client requests)":""}`);r.push([i,n])}let n=function(e){let t=new AbortController,r=()=>t.abort(e?.reason);return e?.addEventListener("abort",r,{once:!0}),e?.aborted&&t.abort(e.reason),{signal:t.signal,abort:e=>t.abort(e),dispose:()=>e?.removeEventListener("abort",r)}}(s);try{let e={relatedRequestId:i.mcpReq.id,timeout:a,resetTimeoutOnProgress:!0,onprogress:()=>{},signal:n.signal},t=await Promise.all(r.map(async([t,r])=>{try{return[t,await this._dispatchLeg(r,e)]}catch(e){throw n.abort(e),e}}));o=Object.fromEntries(t)}catch(t){if(s.aborted)throw t;return uN(e,`Fulfilling input required by '${e}' failed: ${t instanceof Error?t.message:String(t)}`)}finally{n.dispose()}}else await function(e){return new Promise((t,r)=>{if(e?.aborted)return void r(e.reason instanceof cf?e.reason:new cf(cm.RequestTimeout,String(e.reason)));let i=setTimeout(()=>{e?.removeEventListener("abort",o),t()},250),o=()=>{clearTimeout(i),r(e?.reason instanceof cf?e.reason:new cf(cm.RequestTimeout,String(e?.reason)))};e?.addEventListener("abort",o,{once:!0})})}(s);let m={...i,mcpReq:{...i.mcpReq,inputResponses:o,droppedInputResponseKeys:void 0,requestState:function(e){return()=>e}(u)}};if(void 0!==u){let t=await this._host.verifyRequestState(u,m,e);void 0!==t&&(m=lD(m,t))}let f=await t(r,m);if(!lp(f))return f;d=f}}async _dispatchLeg(e,t){switch(e.method){case"elicitation/create":{let r=e.params;return"url"===r.mode&&void 0===r.elicitationId&&(r={...r,elicitationId:function(){let e=globalThis.crypto;if(e?.randomUUID!==void 0)return e.randomUUID();let t=new Uint8Array(16);e.getRandomValues(t),t[6]=15&t[6]|64,t[8]=63&t[8]|128;let r=[...t].map(e=>e.toString(16).padStart(2,"0")).join("");return`${r.slice(0,8)}-${r.slice(8,12)}-${r.slice(12,16)}-${r.slice(16,20)}-${r.slice(20)}`}()}),await this._host.sendElicitation(r,t)}case"sampling/createMessage":return await this._host.sendSampling(e.params,t);case"roots/list":return await this._host.listRoots(e.params,t)}}};let uD=new Set(["tools/call","prompts/get","resources/read"]);var uF=class extends lF{_clientCapabilities;_clientVersion;_capabilities;_instructions;_jsonSchemaValidator;_cacheHints;_requestStateVerify;_inputRequiredServing;_legacyShim;_boundFromTransport=!1;_legacyInputRequiredShim(){return this._legacyShim??=new uz({maxRounds:this._inputRequiredServing.maxRounds,roundTimeoutMs:this._inputRequiredServing.roundTimeoutMs,resolvedClientCapabilities:e=>this._inputRequestCapabilityView(e),verifyRequestState:(e,t,r)=>this._verifyRequestState(e,t,r),sendElicitation:(e,t)=>this._sendElicitationLeg(e,t,{validateAcceptedContent:!1}),sendSampling:(e,t)=>this.createMessage(e,t),listRoots:(e,t)=>this.listRoots(e,t)})}oninitialized;constructor(e,t){if(super(t),this._serverInfo=e,this._capabilities=t?.capabilities?{...t.capabilities}:{},this._instructions=t?.instructions,this._jsonSchemaValidator=t?.jsonSchemaValidator??new uj,this._requestStateVerify=t?.requestState?.verify,this._inputRequiredServing=function(e){if(e?.maxRounds!==void 0&&(!Number.isInteger(e.maxRounds)||e.maxRounds<1))throw RangeError(`inputRequired.maxRounds must be a positive integer (got ${e.maxRounds})`);if(e?.roundTimeoutMs!==void 0&&(!Number.isFinite(e.roundTimeoutMs)||e.roundTimeoutMs<=0))throw RangeError(`inputRequired.roundTimeoutMs must be a positive number (got ${e.roundTimeoutMs})`);return{maxRounds:e?.maxRounds??8,roundTimeoutMs:e?.roundTimeoutMs??6e5,legacyShim:e?.legacyShim??!0}}(t?.inputRequired),t?.cacheHints!==void 0){for(let[e,r]of Object.entries(t.cacheHints))void 0!==r&&cH(r,`cacheHints['${e}']`);this._cacheHints=t.cacheHints}this.setRequestHandler("initialize",e=>this._oninitialize(e)),this.setNotificationHandler("notifications/initialized",()=>this.oninitialized?.()),cv(this._supportedProtocolVersions).length>0&&this.setRequestHandler("server/discover",()=>this._ondiscover()),this._capabilities.logging&&this._registerLoggingHandler()}async connect(e){if(void 0!==this.transport)throw new cf(cm.AlreadyConnected,"Use a separate Server instance per connection: this instance is already connected to a transport. To connect it to a new transport, call close() first.");this._boundFromTransport&&(this._boundFromTransport=!1,this._negotiatedProtocolVersion=void 0);let t=(e instanceof uE?s(e):void 0)?.revision;void 0!==t&&!this._servedModernEra()&&c_.includes(t)&&cv(this._supportedProtocolVersions).includes(t)&&(this._negotiatedProtocolVersion=t,this._boundFromTransport=!0),await super.connect(e)}_registerLoggingHandler(){this.setRequestHandler("logging/setLevel",async(e,t)=>{let r=t.sessionId||t.http?.req?.headers.get("mcp-session-id")||void 0,{level:i}=e.params,o=oJ(s0,i);return o.success&&this._loggingLevels.set(r,o.data),{}})}buildContext(e,t){let r=e.http||t?.request||t?.closeSSEStream||t?.closeStandaloneSSEStream;return{...e,mcpReq:{...e.mcpReq,log:(t,r,i)=>{let o;if(!this._capabilities.logging)return Promise.resolve();if(this._servedModernEra()){if(void 0===(o=e.mcpReq.envelope?.[ay]))return Promise.resolve()}else o=this._loggingLevels.get(e.sessionId)??this._loggingLevels.get(void 0);return void 0!==o&&this.LOG_LEVEL_SEVERITY.get(t)this.elicitInput(e,t),requestSampling:(e,t)=>this.createMessage(e,t)},http:r?{...e.http,req:t?.request,closeSSE:t?.closeSSEStream,closeStandaloneSSE:t?.closeStandaloneSSEStream}:void 0}}_loggingLevels=new Map;LOG_LEVEL_SEVERITY=new Map(s0.options.map((e,t)=>[e,t]));isMessageIgnored=(e,t)=>{let r=this._loggingLevels.get(t);return!!r&&this.LOG_LEVEL_SEVERITY.get(e){let a=i?await this._invokeInputRequiredCapableHandler(e,t,o,n):await t(o,n);if(lp(a)){if(!i)throw new cB(cG.InternalError,`Handler for ${e} returned an input-required result, but only tools/call, prompts/get and resources/read support input_required (protocol revision 2026-07-28)`);return a}return void 0===r?a:cF(a,r)}:async(r,i)=>{let o=await t(r,i);if(lp(o))throw new cB(cG.InternalError,`Handler for ${e} returned an input-required result, but only tools/call, prompts/get and resources/read support input_required (protocol revision 2026-07-28)`);return o}}return async(e,r)=>{let i=li(this._negotiatedProtocolVersion),o=i.validateRequest("tools/call",e);if(!o.ok)throw new cB("not-in-era"===o.reason?cG.InternalError:cG.InvalidParams,"not-in-era"===o.reason?"No wire schema for tools/call in the resolved era":`Invalid tools/call request: ${o.message}`);let n=await this._invokeInputRequiredCapableHandler("tools/call",t,e,r);if(lp(n))return n;let a=cS(n),s=i.validateResult("tools/call",a);if(!s.ok)throw new cB("not-in-era"===s.reason?cG.InternalError:cG.InvalidParams,"not-in-era"===s.reason?"No wire schema for tools/call in the resolved era":`Invalid tools/call result: ${s.message}`);return s.value}}_servedModernEra(){return void 0!==this._negotiatedProtocolVersion&&this._negotiatedProtocolVersion>=cg}async _invokeInputRequiredCapableHandler(e,t,r,i){let o,n=this._servedModernEra(),a=i.mcpReq.requestState();if(void 0!==a&&"string"!=typeof a)throw new cB(cG.InvalidParams,"Invalid or expired requestState",{reason:"invalid_request_state"});let s=i;if("string"==typeof a){let t=await this._verifyRequestState(a,i,e);void 0!==t&&(s=lD(i,t))}try{o=await t(r,s)}catch(e){if(e instanceof cB&&e.code===cG.UrlElicitationRequired){if(!n)throw e;throw new cB(cG.InternalError,`URL elicitation cannot be signalled by throwing UrlElicitationRequiredError on protocol revision ${this._negotiatedProtocolVersion}: return inputRequired({ inputRequests: { …: inputRequired.elicitUrl(...) } }) from the handler instead. The urlElicitationRequired error (-32042) of earlier revisions is not available on this revision.`)}throw e}if(!lp(o))return o;if(!n){if(!this._inputRequiredServing.legacyShim)throw new cB(cG.InternalError,`Handler for ${e} returned an input-required result, but this request is served on protocol revision ${this._negotiatedProtocolVersion??al}, which has no input_required vocabulary`);return await this._legacyInputRequiredShim().fulfill(e,t,r,s,o)}let d=o.inputRequests,c=null!=d&&Object.keys(d).length>0,l="string"==typeof o.requestState;if(!c&&!l)throw new cB(cG.InternalError,`Handler for ${e} returned an input-required result with neither inputRequests nor requestState (every InputRequiredResult must include at least one of the two)`);if(c){let t=this._inputRequestCapabilityView(i);for(let[r,i]of Object.entries(d)){let{embedded:o,required:n}=uM(e,r,i),a=cy(n,t);if(void 0!==a)throw new cQ({requiredCapabilities:a},`Cannot request input '${r}' (${o.method}): the request's client capabilities do not declare the required capability`)}}return o}async _verifyRequestState(e,t,r){if(void 0!==this._requestStateVerify)try{return await this._requestStateVerify(e,t)}catch(e){throw this.onerror?.(Error(`requestState verification rejected ${r}: ${e instanceof Error?e.message:String(e)}`)),new cB(cG.InvalidParams,"Invalid or expired requestState",{reason:"invalid_request_state"})}}_inputRequestCapabilityView(e){return this._servedModernEra()?e.mcpReq.envelope?.[ah]:this._clientCapabilities}_assertPushApiInServedEra(e){if(this._servedModernEra())throw new cf(cm.MethodNotSupportedByProtocolVersion,`Server-to-client requests are not available on protocol revision ${this._negotiatedProtocolVersion}: '${e}' cannot be sent while serving a request on that revision. Return inputRequired({ ... }) from the handler instead — the client fulfils the embedded requests and retries the original request (multi round-trip requests).`,{method:e,era:"2026-07-28"})}assertCapabilityForMethod(e){switch(e){case"sampling/createMessage":if(!this._clientCapabilities?.sampling)throw new cf(cm.CapabilityNotSupported,`Client does not support sampling (required for ${e})`);break;case"elicitation/create":if(!this._clientCapabilities?.elicitation)throw new cf(cm.CapabilityNotSupported,`Client does not support elicitation (required for ${e})`);break;case"roots/list":if(!this._clientCapabilities?.roots)throw new cf(cm.CapabilityNotSupported,`Client does not support listing roots (required for ${e})`)}}assertNotificationCapability(e){switch(e){case"notifications/message":if(!this._capabilities.logging)throw new cf(cm.CapabilityNotSupported,`Server does not support logging (required for ${e})`);break;case"notifications/resources/updated":case"notifications/resources/list_changed":if(!this._capabilities.resources)throw new cf(cm.CapabilityNotSupported,`Server does not support notifying about resources (required for ${e})`);break;case"notifications/tools/list_changed":if(!this._capabilities.tools)throw new cf(cm.CapabilityNotSupported,`Server does not support notifying of tool list changes (required for ${e})`);break;case"notifications/prompts/list_changed":if(!this._capabilities.prompts)throw new cf(cm.CapabilityNotSupported,`Server does not support notifying of prompt list changes (required for ${e})`);break;case"notifications/elicitation/complete":if(!this._clientCapabilities?.elicitation?.url)throw new cf(cm.CapabilityNotSupported,`Client does not support URL elicitation (required for ${e})`)}}assertRequestHandlerCapability(e){switch(e){case"completion/complete":if(!this._capabilities.completions)throw new cf(cm.CapabilityNotSupported,`Server does not support completions (required for ${e})`);break;case"logging/setLevel":if(!this._capabilities.logging)throw new cf(cm.CapabilityNotSupported,`Server does not support logging (required for ${e})`);break;case"prompts/get":case"prompts/list":if(!this._capabilities.prompts)throw new cf(cm.CapabilityNotSupported,`Server does not support prompts (required for ${e})`);break;case"resources/list":case"resources/templates/list":case"resources/read":if(!this._capabilities.resources)throw new cf(cm.CapabilityNotSupported,`Server does not support resources (required for ${e})`);break;case"tools/call":case"tools/list":if(!this._capabilities.tools)throw new cf(cm.CapabilityNotSupported,`Server does not support tools (required for ${e})`)}}async _oninitialize(e){let t=e.params.protocolVersion;this._clientCapabilities=e.params.capabilities,this._clientVersion=e.params.clientInfo;let r=this._supportedProtocolVersions.filter(e=>!(e>=cg)),i=r.includes(t)?t:r[0]??al;return this._negotiatedProtocolVersion=i,this.transport?.setProtocolVersion?.(i),{protocolVersion:i,capabilities:this.getCapabilities(),serverInfo:this._serverInfo,...this._instructions&&{instructions:this._instructions}}}_ondiscover(){return{supportedVersions:cv(this._supportedProtocolVersions),capabilities:{...this.getCapabilities()},...this._instructions&&{instructions:this._instructions}}}_outboundServerInfo(){return this._serverInfo}getClientCapabilities(){return this._clientCapabilities}getClientVersion(){return this._clientVersion}getNegotiatedProtocolVersion(){return this._negotiatedProtocolVersion}projectCallToolResult(e,t){return this._wireCodec().projectCallToolResult(e,t)}getCapabilities(){return this._capabilities}async ping(){return this._assertPushApiInServedEra("ping"),this.request({method:"ping"})}async createMessage(e,t){if(this._assertPushApiInServedEra("sampling/createMessage"),(e.tools||e.toolChoice)&&!this._clientCapabilities?.sampling?.tools)throw new cf(cm.CapabilityNotSupported,"Client does not support sampling tools capability.");if(e.messages.length>0){let t=e.messages.at(-1),r=Array.isArray(t.content)?t.content:[t.content],i=r.some(e=>"tool_result"===e.type),o=e.messages.length>1?e.messages.at(-2):void 0,n=o?Array.isArray(o.content)?o.content:[o.content]:[],a=n.some(e=>"tool_use"===e.type);if(i){if(r.some(e=>"tool_result"!==e.type))throw new cB(cG.InvalidParams,"The last message must contain only tool_result content if any is present");if(!a)throw new cB(cG.InvalidParams,"tool_result blocks are not matching any tool_use from the previous message")}if(a){let e=new Set(n.filter(e=>"tool_use"===e.type).map(e=>e.id)),t=new Set(r.filter(e=>"tool_result"===e.type).map(e=>e.toolUseId));if(e.size!==t.size||![...e].every(e=>t.has(e)))throw new cB(cG.InvalidParams,"ids of tool_result blocks and tool_use blocks from previous message do not match")}}let r=!!(e.tools||e.toolChoice),i=await this.request({method:"sampling/createMessage",params:e},t),o=this._wireCodec().samplingResultVariant(r,i);if(!o.ok)throw new cf(cm.InvalidResult,`Invalid sampling/createMessage result: ${"invalid"===o.reason?o.message:o.reason}`);return o.value}async elicitInput(e,t){switch(this._assertPushApiInServedEra("elicitation/create"),e.mode??"form"){case"url":if(!this._clientCapabilities?.elicitation?.url)throw new cf(cm.CapabilityNotSupported,"Client does not support url elicitation.");break;case"form":if(!this._clientCapabilities?.elicitation?.form)throw new cf(cm.CapabilityNotSupported,"Client does not support form elicitation.")}return this._sendElicitationLeg(e,t)}async _sendElicitationLeg(e,t,r){let i=e.mode??"form",o=r?.validateAcceptedContent??!0;switch(i){case"url":return this.request({method:"elicitation/create",params:e},t);case"form":{let r="form"===e.mode?e:{...e,mode:"form"},i=await this.request({method:"elicitation/create",params:r},t);if(o&&"accept"===i.action&&i.content&&r.requestedSchema)try{let e=this._jsonSchemaValidator.getValidator(r.requestedSchema)(i.content);if(!e.valid)throw new cB(cG.InvalidParams,`Elicitation response content does not match requested schema: ${e.errorMessage}`)}catch(e){if(e instanceof cB)throw e;throw new cB(cG.InternalError,`Error validating elicitation response: ${e instanceof Error?e.message:String(e)}`)}return i}}}createElicitationCompletionNotifier(e,t){if(!this._clientCapabilities?.elicitation?.url)throw new cf(cm.CapabilityNotSupported,"Client does not support URL elicitation (required for notifications/elicitation/complete)");return()=>this.notification({method:"notifications/elicitation/complete",params:{elicitationId:e}},t)}async listRoots(e,t){return this._assertPushApiInServedEra("roots/list"),this.request({method:"roots/list",params:e},t)}async sendLoggingMessage(e,t){if(this._capabilities.logging&&!this.isMessageIgnored(e.level,t))return this.notification({method:"notifications/message",params:e})}async sendResourceUpdated(e){return this.notification({method:"notifications/resources/updated",params:e})}async sendResourceListChanged(){return this.notification({method:"notifications/resources/list_changed"})}async sendToolListChanged(){return this.notification({method:"notifications/tools/list_changed"})}async sendPromptListChanged(){return this.notification({method:"notifications/prompts/list_changed"})}},uL=class{server;_maxToolInputElements;_registeredResources={};_registeredResourceTemplates={};_registeredTools={};_registeredPrompts={};_toolInputSchemaJson={};toolInputSchemaJson(e){let t=this._registeredTools[e];if(void 0!==t&&t.enabled){if(Object.hasOwn(this._toolInputSchemaJson,e))return this._toolInputSchemaJson[e];if(void 0===t.inputSchema)return uG;try{let r=lk(t.inputSchema,"input");return this._toolInputSchemaJson[e]=r,r}catch{return}}}constructor(e,t){this.server=new uF(e,t),this._maxToolInputElements=function(e){if(void 0!==e&&1/0!==e){if("number"!=typeof e||Number.isNaN(e)||e<1)throw RangeError(`maxToolInputElements must be a number of at least 1, or Infinity, got ${String(e)}`);return e}}(t?.maxToolInputElements),t?.capabilities?.tools&&this.setToolRequestHandlers(),t?.capabilities?.resources&&this.setResourceRequestHandlers(),t?.capabilities?.prompts&&this.setPromptRequestHandlers()}async connect(e){return"object"==typeof e&&null!==e&&"setScopeChallengeResolver"in e&&"function"==typeof e.setScopeChallengeResolver&&e.setScopeChallengeResolver(e=>this.resolveScopeChallenge(e)),await this.server.connect(e)}async close(){await this.server.close()}resolveScopeChallenge=e=>{switch(e.request.method){case"tools/call":{let t=e.request.params?.name;if("string"!=typeof t)return;let r=this._registeredTools[t];if(void 0===r||!r.enabled)return;return r.scopeChallenge?.(e)}case"resources/read":{let t,r=e.request.params?.uri;if("string"!=typeof r)return;try{t=new URL(r)}catch{return}let i=this._registeredResources[t.toString()];if(void 0!==i)return i.enabled?i.scopeChallenge?.(e):void 0;for(let r of Object.values(this._registeredResourceTemplates))if(r.resourceTemplate.uriTemplate.match(t.toString()))return r.enabled?r.scopeChallenge?.(e):void 0;return}case"prompts/get":{let t=e.request.params?.name;if("string"!=typeof t)return;let r=this._registeredPrompts[t];if(void 0===r||!r.enabled)return;return r.scopeChallenge?.(e)}default:return}};_toolHandlersInitialized=!1;setToolRequestHandlers(){this._toolHandlersInitialized||(this.server.assertCanSetRequestHandler("tools/list"),this.server.assertCanSetRequestHandler("tools/call"),this.server.registerCapabilities({tools:{listChanged:this.server.getCapabilities().tools?.listChanged??!0}}),this.server.setRequestHandler("tools/list",()=>({tools:Object.entries(this._registeredTools).filter(([,e])=>e.enabled).map(([e,t])=>{let r={name:e,title:t.title,description:t.description,inputSchema:t.inputSchema?function(e,t){let r,i,o,n,a,s=lk(t,"input"),d=(i=[],o=new Map,void 0!==(a=(n=(e,t,a)=>{if(null===e||"object"!=typeof e)return;if(lu in e){if(!a||0===t.length)return`${lg(t)}: x-mcp-header is only permitted on properties statically reachable via a chain of 'properties' keys (not under items, additionalProperties, oneOf/anyOf/allOf/not, if/then/else, or $ref)`;let n=e[lu];if("string"!=typeof n||0===n.length)return`${lg(t)}: x-mcp-header MUST be a non-empty string`;if(!lm.test(n))return`${lg(t)}: x-mcp-header '${n}' is not a valid RFC 9110 token (no spaces, control characters or HTTP delimiters)`;let s="string"==typeof e.type?e.type:void 0;if(void 0===s||!lf.has(s)){let e=`${lg(t)}: x-mcp-header is only permitted on primitive-typed properties (string, integer, boolean); got ${s??""}`;if("number"!==s)return e;r??=e}let d=n.toLowerCase(),c=o.get(d);if(void 0!==c)return`x-mcp-header '${n}' is not case-insensitively unique (also declared as '${c}')`;o.set(d,n),i.push({path:t,headerName:n,type:s})}let s=e.properties;if(null!==s&&"object"==typeof s)for(let[e,r]of Object.entries(s)){let i=n(r,[...t,e],a);if(void 0!==i)return i}for(let r of lh){let i=e[r];if(void 0!==i)for(let e of Array.isArray(i)?i:null!==i&&"object"==typeof i&&ly.has(r)?Object.values(i):[i]){let i=n(e,[...t,`<${r}>`],!1);if(void 0!==i)return i}}})(s,[],!0))?{valid:!1,reason:r??a}:void 0===r?{valid:!0,declarations:i}:{valid:!1,reason:r,declarations:i});return d.valid||console.warn(`[mcp-sdk] tool '${e}' carries an invalid x-mcp-header declaration and will be excluded by conforming Streamable HTTP clients: ${d.reason}`),s}(e,t.inputSchema):uG,annotations:t.annotations,icons:t.icons,execution:t.execution,_meta:t._meta};return t.outputSchema&&(r.outputSchema=lk(t.outputSchema,"output")),r})})),this.server.setRequestHandler("tools/call",async(e,t)=>{let r=this._registeredTools[e.params.name];if(!r)throw new cB(cG.InvalidParams,`Tool ${e.params.name} not found`);if(!r.enabled)throw new cB(cG.InvalidParams,`Tool ${e.params.name} disabled`);try{let i=await this.validateToolInput(r,e.params.arguments,e.params.name),o=await this.executeToolHandler(r,i,t);if(await this.validateToolOutput(r,o,e.params.name),lp(o))return o;return this.server.projectCallToolResult(o,r.outputSchemaJson)}catch(e){if(e instanceof cB&&e.code===cG.UrlElicitationRequired)throw e;return this.createToolError(e instanceof Error?e.message:String(e))}}),this._toolHandlersInitialized=!0)}createToolError(e){return{content:[{type:"text",text:e}],isError:!0}}async validateToolInput(e,t,r){if(void 0!==this._maxToolInputElements&&function(e,t){let r=0,i=[e];for(;i.length>0;){let e=i.pop();if(null!==e&&"object"==typeof e)if(Array.isArray(e))for(let o of e){if(++r>t)return r;null!==o&&"object"==typeof o&&i.push(o)}else for(let o in e){if(!Object.prototype.hasOwnProperty.call(e,o))continue;if(++r>t)return r;let n=e[o];null!==n&&"object"==typeof n&&i.push(n)}}return r}(t,this._maxToolInputElements)>this._maxToolInputElements)throw new cB(cG.InvalidParams,`Invalid arguments for tool ${r}: arguments contain more than the maximum of ${this._maxToolInputElements} elements`);if(!e.inputSchema)return;let i=await lV(e.inputSchema,t??{});if(!i.success)throw new cB(cG.InvalidParams,`Input validation error: Invalid arguments for tool ${r}: ${i.error}`);return i.data}async validateToolOutput(e,t,r){if(!e.outputSchema||lp(t)||t.isError)return;if(void 0===t.structuredContent)throw new cB(cG.InvalidParams,`Output validation error: Tool ${r} has an output schema but no structured content was provided`);let i=await lV(e.outputSchema,t.structuredContent);if(!i.success)throw new cB(cG.InvalidParams,`Output validation error: Invalid structured content for tool ${r}: ${i.error}`)}async executeToolHandler(e,t,r){return e.executor(t,r)}_completionHandlerInitialized=!1;setCompletionRequestHandler(){this._completionHandlerInitialized||(this.server.assertCanSetRequestHandler("completion/complete"),this.server.registerCapabilities({completions:{}}),this.server.setRequestHandler("completion/complete",async e=>{switch(e.params.ref.type){case"ref/prompt":if("ref/prompt"!==e.params.ref.type)throw TypeError(`Expected CompleteRequestPrompt, but got ${e.params.ref.type}`);return this.handlePromptCompletion(e,e.params.ref);case"ref/resource":if("ref/resource"!==e.params.ref.type)throw TypeError(`Expected CompleteRequestResourceTemplate, but got ${e.params.ref.type}`);return this.handleResourceCompletion(e,e.params.ref);default:throw new cB(cG.InvalidParams,`Invalid completion reference: ${e.params.ref}`)}}),this._completionHandlerInitialized=!0)}async handlePromptCompletion(e,t){let r=this._registeredPrompts[t.name];if(!r)throw new cB(cG.InvalidParams,`Prompt ${t.name} not found`);if(!r.enabled)throw new cB(cG.InvalidParams,`Prompt ${t.name} disabled`);if(!r.argsSchema)return uZ;let i=uX(uQ(r.argsSchema)?.[e.params.argument.name]);if(!uT(i))return uZ;let o=i[uC]?.complete;return o?uJ(await o(e.params.argument.value,e.params.context)):uZ}async handleResourceCompletion(e,t){let r=Object.values(this._registeredResourceTemplates).find(e=>e.resourceTemplate.uriTemplate.toString()===t.uri);if(!r){if(this._registeredResources[t.uri])return uZ;throw new cB(cG.InvalidParams,`Resource template ${e.params.ref.uri} not found`)}let i=r.resourceTemplate.completeCallback(e.params.argument.name);return i?uJ(await i(e.params.argument.value,e.params.context)):uZ}_resourceHandlersInitialized=!1;setResourceRequestHandlers(){this._resourceHandlersInitialized||(this.server.assertCanSetRequestHandler("resources/list"),this.server.assertCanSetRequestHandler("resources/templates/list"),this.server.assertCanSetRequestHandler("resources/read"),this.server.registerCapabilities({resources:{listChanged:this.server.getCapabilities().resources?.listChanged??!0}}),this.server.setRequestHandler("resources/list",async(e,t)=>{let r=Object.entries(this._registeredResources).filter(([e,t])=>t.enabled).map(([e,t])=>({uri:e,name:t.name,...t.metadata})),i=[];for(let e of Object.values(this._registeredResourceTemplates))if(e.resourceTemplate.listCallback)for(let r of(await e.resourceTemplate.listCallback(t)).resources)i.push({...e.metadata,...r});return{resources:[...r,...i]}}),this.server.setRequestHandler("resources/templates/list",async()=>({resourceTemplates:Object.entries(this._registeredResourceTemplates).map(([e,t])=>({name:e,uriTemplate:t.resourceTemplate.uriTemplate.toString(),...t.metadata}))})),this.server.setRequestHandler("resources/read",async(e,t)=>{let r;try{r=new URL(e.params.uri)}catch{throw new cB(cG.InvalidParams,`Resource URI ${e.params.uri} is invalid`,{uri:e.params.uri,reason:"invalid_uri"})}let i=this._registeredResources[r.toString()];if(i){if(!i.enabled)throw new cB(cG.InvalidParams,`Resource ${r} disabled`);return cF(await i.readCallback(r,t),i.cacheHint)}for(let e of Object.values(this._registeredResourceTemplates)){let i=e.resourceTemplate.uriTemplate.match(r.toString());if(i){if(!e.enabled)throw new cB(cG.InvalidParams,`Resource template ${e.resourceTemplate.uriTemplate} disabled`);return cF(await e.readCallback(r,i,t),e.cacheHint)}}throw new cK(e.params.uri)}),this._resourceHandlersInitialized=!0)}_promptHandlersInitialized=!1;setPromptRequestHandlers(){this._promptHandlersInitialized||(this.server.assertCanSetRequestHandler("prompts/list"),this.server.assertCanSetRequestHandler("prompts/get"),this.server.registerCapabilities({prompts:{listChanged:this.server.getCapabilities().prompts?.listChanged??!0}}),this.server.setRequestHandler("prompts/list",()=>({prompts:Object.entries(this._registeredPrompts).filter(([,e])=>e.enabled).map(([e,t])=>{let r,i,o;return{name:e,title:t.title,description:t.description,arguments:t.argsSchema?(i=(r=lk(t.argsSchema,"input")).properties||{},o=r.required||[],Object.entries(i).map(([e,t])=>({name:e,description:t?.description,required:o.includes(e)}))):void 0,icons:t.icons,_meta:t._meta}})})),this.server.setRequestHandler("prompts/get",async(e,t)=>{let r=this._registeredPrompts[e.params.name];if(!r)throw new cB(cG.InvalidParams,`Prompt ${e.params.name} not found`);if(!r.enabled)throw new cB(cG.InvalidParams,`Prompt ${e.params.name} disabled`);return r.handler(e.params.arguments,t)}),this._promptHandlersInitialized=!0)}registerResource(e,t,r,i){let{cacheHint:o,scopeChallenge:n,...a}=r;if(void 0!==o&&cH(o,`resource ${e}`),"string"==typeof t){if(this._registeredResources[t])throw Error(`Resource ${t} is already registered`);let s=this._createRegisteredResource(e,r.title,t,a,n,i);return void 0!==o&&(s.cacheHint=o),this.setResourceRequestHandlers(),this.sendResourceListChanged(),s}{if(this._registeredResourceTemplates[e])throw Error(`Resource template ${e} is already registered`);let s=this._createRegisteredResourceTemplate(e,r.title,t,a,n,i);return void 0!==o&&(s.cacheHint=o),this.setResourceRequestHandlers(),this.sendResourceListChanged(),s}}_createRegisteredResource(e,t,r,i,o,n){let a={name:e,title:t,metadata:i,readCallback:n,scopeChallenge:o,enabled:!0,disable:()=>a.update({enabled:!1}),enable:()=>a.update({enabled:!0}),remove:()=>a.update({uri:null}),update:e=>{void 0!==e.uri&&e.uri!==r&&(delete this._registeredResources[r],e.uri&&(this._registeredResources[e.uri]=a)),void 0!==e.name&&(a.name=e.name),void 0!==e.metadata&&(a.metadata=e.metadata),void 0!==e.title&&(a.title=e.title,a.metadata={...a.metadata,title:e.title}),void 0!==e.callback&&(a.readCallback=e.callback),void 0!==e.scopeChallenge&&(a.scopeChallenge=null===e.scopeChallenge?void 0:e.scopeChallenge),void 0!==e.enabled&&(a.enabled=e.enabled),this.sendResourceListChanged()}};return this._registeredResources[r]=a,a}_createRegisteredResourceTemplate(e,t,r,i,o,n){let a={resourceTemplate:r,title:t,metadata:i,readCallback:n,scopeChallenge:o,enabled:!0,disable:()=>a.update({enabled:!1}),enable:()=>a.update({enabled:!0}),remove:()=>a.update({name:null}),update:t=>{void 0!==t.name&&t.name!==e&&(delete this._registeredResourceTemplates[e],t.name&&(this._registeredResourceTemplates[t.name]=a)),void 0!==t.template&&(a.resourceTemplate=t.template),void 0!==t.metadata&&(a.metadata=t.metadata),void 0!==t.title&&(a.title=t.title,a.metadata={...a.metadata,title:t.title}),void 0!==t.callback&&(a.readCallback=t.callback),void 0!==t.scopeChallenge&&(a.scopeChallenge=null===t.scopeChallenge?void 0:t.scopeChallenge),void 0!==t.enabled&&(a.enabled=t.enabled),this.sendResourceListChanged()}};this._registeredResourceTemplates[e]=a;let s=r.uriTemplate.variableNames;return Array.isArray(s)&&s.some(e=>!!r.completeCallback(e))&&this.setCompletionRequestHandler(),a}_createRegisteredPrompt(e,t,r,i,o,n,a,s){let d=i,c=o,l={title:t,description:r,argsSchema:i,icons:n,scopeChallenge:a,_meta:s,handler:uK(e,i,o),enabled:!0,disable:()=>l.update({enabled:!1}),enable:()=>l.update({enabled:!0}),remove:()=>l.update({name:null}),update:t=>{void 0!==t.name&&t.name!==e&&(delete this._registeredPrompts[e],t.name&&(this._registeredPrompts[t.name]=l)),void 0!==t.title&&(l.title=t.title),void 0!==t.description&&(l.description=t.description),void 0!==t.icons&&(l.icons=t.icons),void 0!==t.scopeChallenge&&(l.scopeChallenge=null===t.scopeChallenge?void 0:t.scopeChallenge),void 0!==t._meta&&(l._meta=t._meta);let r=!1;void 0!==t.argsSchema&&(l.argsSchema=t.argsSchema,d=t.argsSchema,r=!0),void 0!==t.callback&&(c=t.callback,r=!0),r&&(l.handler=uK(e,d,c)),void 0!==t.enabled&&(l.enabled=t.enabled),this.sendPromptListChanged()}};if(this._registeredPrompts[e]=l,i){let e=uQ(i);e&&Object.values(e).some(e=>uT(uX(e)))&&this.setCompletionRequestHandler()}return l}_createRegisteredTool(e,t,r,i,o,n,a,s,d,c,l){let p;lK(e);let u=l,m={title:t,description:r,inputSchema:i,outputSchema:o,get outputSchemaJson(){return p??=uB(m.outputSchema)},set outputSchemaJson(e){p=e},annotations:n,icons:a,execution:s,scopeChallenge:d,_meta:c,handler:l,executor:uH(i,l),enabled:!0,disable:()=>m.update({enabled:!1}),enable:()=>m.update({enabled:!0}),remove:()=>m.update({name:null}),update:t=>{void 0!==t.name&&t.name!==e&&("string"==typeof t.name&&lK(t.name),delete this._registeredTools[e],delete this._toolInputSchemaJson[e],t.name&&(delete this._toolInputSchemaJson[t.name],this._registeredTools[t.name]=m,e=t.name)),void 0!==t.title&&(m.title=t.title),void 0!==t.description&&(m.description=t.description);let r=!1;void 0!==t.paramsSchema&&(m.inputSchema=t.paramsSchema,delete this._toolInputSchemaJson[e],r=!0),void 0!==t.callback&&(m.handler=t.callback,u=t.callback,r=!0),r&&(m.executor=uH(m.inputSchema,u)),void 0!==t.outputSchema&&(m.outputSchema=t.outputSchema,m.outputSchemaJson=uB(t.outputSchema)),void 0!==t.annotations&&(m.annotations=t.annotations),void 0!==t.icons&&(m.icons=t.icons),void 0!==t.scopeChallenge&&(m.scopeChallenge=null===t.scopeChallenge?void 0:t.scopeChallenge),void 0!==t._meta&&(m._meta=t._meta),void 0!==t.enabled&&(m.enabled=t.enabled),this.sendToolListChanged()}};return this._registeredTools[e]=m,this.setToolRequestHandlers(),this.sendToolListChanged(),m}registerTool(e,t,r){if(this._registeredTools[e])throw Error(`Tool ${e} is already registered`);let{title:i,description:o,inputSchema:n,outputSchema:a,annotations:s,icons:d,scopeChallenge:c,_meta:l}=t;return this._createRegisteredTool(e,i,o,lZ(n),lZ(a),s,d,void 0,c,l,r)}registerPrompt(e,t,r){if(this._registeredPrompts[e])throw Error(`Prompt ${e} is already registered`);let{title:i,description:o,argsSchema:n,icons:a,scopeChallenge:s,_meta:d}=t,c=this._createRegisteredPrompt(e,i,o,lZ(n),r,a,s,d);return this.setPromptRequestHandlers(),this.sendPromptListChanged(),c}isConnected(){return void 0!==this.server.transport}async sendLoggingMessage(e,t){return this.server.sendLoggingMessage(e,t)}sendResourceListChanged(){this.isConnected()&&this.server.sendResourceListChanged()}sendToolListChanged(){this.isConnected()&&this.server.sendToolListChanged()}sendPromptListChanged(){this.isConnected()&&this.server.sendPromptListChanged()}},uU=class{_uriTemplate;constructor(e,t){this._callbacks=t,this._uriTemplate="string"==typeof e?new lJ(e):e}get uriTemplate(){return this._uriTemplate}get listCallback(){return this._callbacks.list}completeCallback(e){return this._callbacks.complete?.[e]}};function uH(e,t){return e?async(e,r)=>t(e,r):async(e,r)=>t(r)}let uG={type:"object",properties:{}};function uB(e){if(void 0!==e)try{return lk(e,"output")}catch{return}}function uK(e,t,r){return t?async(i,o)=>{let n=await lV(t,i??{});if(!n.success)throw new cB(cG.InvalidParams,`Invalid arguments for prompt ${e}: ${n.error}`);return r(n.data,o)}:async(e,t)=>r(t)}function uJ(e){return{completion:{values:e.map(String).slice(0,100),total:e.length,hasMore:e.length>100}}}let uZ={completion:{values:[],hasMore:!1}};function uQ(e){if(e.shape&&"object"==typeof e.shape)return e.shape}function uX(e){return e?.type!=="optional"?e:e.def?.innerType??e}var uY=class{sessionIdGenerator;_started=!1;_hasHandledRequest=!1;_closed=!1;_streamMapping=new Map;_requestToStreamMapping=new Map;_requestResponseMap=new Map;_initialized=!1;_enableJsonResponse=!1;_standaloneSseStreamId="_GET_stream";_eventStore;_onsessioninitialized;_onsessionclosed;_allowedHosts;_allowedOrigins;_enableDnsRebindingProtection;_retryInterval;_supportedProtocolVersions;_keepAliveMs;_maxRequestBodySize;_scopeChallengeResolver;sessionId;onclose;onerror;onmessage;constructor(e={}){this.sessionIdGenerator=e.sessionIdGenerator,this._enableJsonResponse=e.enableJsonResponse??!1,this._eventStore=e.eventStore,this._onsessioninitialized=e.onsessioninitialized,this._onsessionclosed=e.onsessionclosed,this._allowedHosts=e.allowedHosts,this._allowedOrigins=e.allowedOrigins,this._enableDnsRebindingProtection=e.enableDnsRebindingProtection??!1,this._retryInterval=e.retryInterval,this._supportedProtocolVersions=e.supportedProtocolVersions??ap,this._keepAliveMs=e.keepAliveMs??15e3,this._maxRequestBodySize=function(e){if(void 0===e)return 4194304;if("number"!=typeof e||!Number.isFinite(e)||e<=0)throw RangeError(`maxRequestBodySize must be a positive number of bytes, got ${String(e)}`);return e}(e.maxRequestBodySize)}startKeepAlive(e,t){if(this._closed)return;let r=uO(this._keepAliveMs,()=>{try{e.enqueue(t.encode(": keepalive\n\n"))}catch{void 0!==r&&clearInterval(r)}});return r}setScopeChallengeResolver(e){this._scopeChallengeResolver=e}async start(){if(this._started)throw Error("Transport already started");this._started=!0}setSupportedProtocolVersions(e){this._supportedProtocolVersions=e}createJsonErrorResponse(e,t,r,i){let o={code:t,message:r};return i?.data!==void 0&&(o.data=i.data),Response.json({jsonrpc:"2.0",error:o,id:null},{status:e,headers:{"Content-Type":"application/json",...i?.headers}})}async _checkScopeChallenge(e,t){var r;if(!this._scopeChallengeResolver)return;let i=await async function(e,t,r){for(let o of e){let e=await r({request:o,...void 0!==t&&{authInfo:t}});if(void 0!==e){if(null===e||"object"!=typeof e||!Array.isArray(e.scopes)||0===e.scopes.length)throw TypeError("scope challenge must contain at least one scope");for(let[t,r]of e.scopes.entries()){var i=`scope challenge scopes[${t}]`;if("string"!=typeof r||!/^[\u0021\u0023-\u005B\u005D-\u007E]+$/.test(r))throw TypeError(`${i} must satisfy the OAuth scope-token grammar`)}if(void 0!==e.errorDescription&&"string"!=typeof e.errorDescription)throw TypeError("scope challenge errorDescription must be a string");if(void 0!==e.errorDescription&&!/^[\u0020-\u0021\u0023-\u005B\u005D-\u007E]+$/.test(e.errorDescription))throw TypeError("scope challenge errorDescription must satisfy the RFC 6750 error-description grammar");return e}}}(e.filter(e=>ll(e)),t,this._scopeChallengeResolver);return void 0===i?void 0:(r=function(e){if(e?.resourceMetadataUrl!==void 0)return e.resourceMetadataUrl;if(e?.resource?.protocol==="https:"||e?.resource?.protocol==="http:"){var t,r;let i,o;return i=new URL(t=e.resource),o=(r=t.pathname).length>1&&r.endsWith("/")?r.slice(0,-1):r,i.pathname=`/.well-known/oauth-protected-resource${"/"===o?"":o}`,i.hash="",i.href}}(t),function(e,t){let{requiredScopes:r=[],resourceMetadataUrl:i}=t??{};if(!(e instanceof cu)){let e=new cu(cp.ServerError,"Internal Server Error");return Response.json(e.toResponseObject(),{status:500})}switch(e.code){case cp.InvalidToken:{let t=uW(e.code,e.message,r,i);return Response.json(e.toResponseObject(),{status:401,headers:{"WWW-Authenticate":t}})}case cp.InsufficientScope:{let t=uW(e.code,e.message,r,i);return Response.json(e.toResponseObject(),{status:403,headers:{"WWW-Authenticate":t}})}case cp.ServerError:return Response.json(e.toResponseObject(),{status:500});default:return Response.json(e.toResponseObject(),{status:400})}}(new cu(cp.InsufficientScope,i.errorDescription??"Insufficient scope"),{requiredScopes:[...i.scopes],resourceMetadataUrl:r}))}validateRequestHeaders(e){if(this._enableDnsRebindingProtection){if(this._allowedHosts&&this._allowedHosts.length>0){let t=e.headers.get("host");if(!t||!this._allowedHosts.includes(t)){let e=`Invalid Host header: ${t}`;return this.onerror?.(Error(e)),this.createJsonErrorResponse(403,-32e3,e)}}if(this._allowedOrigins&&this._allowedOrigins.length>0){let t=e.headers.get("origin");if(t&&!this._allowedOrigins.includes(t)){let e=`Invalid Origin header: ${t}`;return this.onerror?.(Error(e)),this.createJsonErrorResponse(403,-32e3,e)}}}}async handleRequest(e,t){if(this._closed)return this.createJsonErrorResponse(404,-32001,"Session not found");if(!this.sessionIdGenerator&&this._hasHandledRequest)throw Error("Stateless transport cannot be reused across requests. Create a new transport per request.");this._hasHandledRequest=!0;let r=this.validateRequestHeaders(e);if(r)return r;switch(e.method){case"POST":return this.handlePostRequest(e,t);case"GET":return this.handleGetRequest(e);case"DELETE":return this.handleDeleteRequest(e);default:return this.handleUnsupportedRequest()}}supportsEmptySSEData(e){return this._supportedProtocolVersions.includes(e)&&e>="2025-11-25"}async writePrimingEvent(e,t,r,i){if(!this._eventStore||!this.supportsEmptySSEData(i))return;let o=await this._eventStore.storeEvent(r,{}),n=`id: ${o} data: `;void 0!==this._retryInterval&&(n=`id: ${o} @@ -74,16 +74,16 @@ data: `;return i&&(o+=`id: ${i} `),o+=`data: ${JSON.stringify(r)} -`,e.enqueue(t.encode(o)),!0}catch(e){return this.onerror?.(e),!1}}handleUnsupportedRequest(){return this.onerror?.(Error("Method not allowed.")),Response.json({jsonrpc:"2.0",error:{code:-32e3,message:"Method not allowed."},id:null},{status:405,headers:{Allow:"GET, POST, DELETE","Content-Type":"application/json"}})}async handlePostRequest(e,t){try{var r,i;let o,n,a,s,d,c=e.headers.get("accept");if(!c?.includes("application/json")||!c.includes("text/event-stream"))return this.onerror?.(Error("Not Acceptable: Client must accept both application/json and text/event-stream")),this.createJsonErrorResponse(406,-32e3,"Not Acceptable: Client must accept both application/json and text/event-stream");if(r=e.headers.get("content-type"),"application/json"!==r&&"application/json"!==function(e){if(e)try{return lH.parse(e).type}catch{let t=(e.split(";",1)[0]??"").trim().toLowerCase();if(""===t||e.slice(t.length).includes(","))return;return t}}(r))return this.onerror?.(Error("Unsupported Media Type: Content-Type must be application/json")),this.createJsonErrorResponse(415,-32e3,"Unsupported Media Type: Content-Type must be application/json");if(t?.parsedBody===void 0)try{let t=await async function(e,t=4194304){if(Number(e.headers.get("content-length"))>t)return{tooLarge:!0};if(null===e.body)return{tooLarge:!1,text:""};let r=e.body.getReader(),i=new TextDecoder,o=0,n="";try{for(;;){let{done:e,value:a}=await r.read();if(e)break;if((o+=a.byteLength)>t)return{tooLarge:!0};n+=i.decode(a,{stream:!0})}}finally{r.releaseLock()}return{tooLarge:!1,text:n+i.decode()}}(e,this._maxRequestBodySize);if(t.tooLarge){let e=(i=this._maxRequestBodySize,`Payload Too Large: Request body must not exceed ${i} bytes`);return this.onerror?.(Error(e)),this.createJsonErrorResponse(413,-32e3,e)}o=JSON.parse(t.text)}catch(e){return this.onerror?.(e),this.createJsonErrorResponse(400,-32700,"Parse error: Invalid JSON")}else o=t.parsedBody;if(Array.isArray(o)&&o.length>100)return this.onerror?.(Error("Invalid Request: Batch must not exceed 100 messages")),this.createJsonErrorResponse(400,-32600,"Invalid Request: Batch must not exceed 100 messages");try{n=Array.isArray(o)?o.map(e=>aM.parse(e)):[aM.parse(o)]}catch(e){return this.onerror?.(e),this.createJsonErrorResponse(400,-32700,"Parse error: Invalid JSON-RPC message")}if(this._closed)return this.createJsonErrorResponse(404,-32001,"Session not found");let l=n.some(e=>aX.safeParse(e).success);if(l){if(this._initialized&&void 0!==this.sessionId)return this.onerror?.(Error("Invalid Request: Server already initialized")),this.createJsonErrorResponse(400,-32600,"Invalid Request: Server already initialized");if(n.length>1)return this.onerror?.(Error("Invalid Request: Only one initialization request is allowed")),this.createJsonErrorResponse(400,-32600,"Invalid Request: Only one initialization request is allowed");this.sessionId=this.sessionIdGenerator?.(),this._initialized=!0,this.sessionId&&this._onsessioninitialized&&await Promise.resolve(this._onsessioninitialized(this.sessionId))}if(!l){let t=this.validateSession(e);if(t)return t;let r=this.validateProtocolVersion(e);if(r)return r}if(this._closed)return this.createJsonErrorResponse(404,-32001,"Session not found");try{a=await this._checkScopeChallenge(n,t?.authInfo)}catch(e){return this.onerror?.(e),this.createJsonErrorResponse(500,-32603,"Internal server error")}if(a)return a;if(!n.some(e=>ll(e))){for(let r of n)this.onmessage?.(r,{authInfo:t?.authInfo,request:e});return new Response(null,{status:202})}let p=crypto.randomUUID(),u=n.find(e=>aX.safeParse(e).success),m=u?u.params.protocolVersion:e.headers.get("mcp-protocol-version")??"2025-03-26";if(this._enableJsonResponse)return new Promise(r=>{for(let e of(this._streamMapping.set(p,{resolveJson:r,cleanup:()=>{this._streamMapping.delete(p)}}),n))ll(e)&&this._requestToStreamMapping.set(e.id,p);for(let r of n)this.onmessage?.(r,{authInfo:t?.authInfo,request:e})});let f=new TextEncoder,h=new ReadableStream({start:e=>{s=e},cancel:()=>{void 0!==d&&clearInterval(d),this._streamMapping.get(p)?.controller===s&&this._streamMapping.delete(p)}}),y={"Content-Type":"text/event-stream","Cache-Control":"no-cache, no-transform",Connection:"keep-alive","X-Accel-Buffering":"no"};for(let e of(void 0!==this.sessionId&&(y["mcp-session-id"]=this.sessionId),n))ll(e)&&(this._streamMapping.set(p,{controller:s,encoder:f,cleanup:()=>{void 0!==d&&clearInterval(d),this._streamMapping.delete(p);try{s.close()}catch{}}}),this._requestToStreamMapping.set(e.id,p));for(let r of(await this.writePrimingEvent(s,f,p,m),n)){let i,o;ll(r)&&this._eventStore&&this.supportsEmptySSEData(m)&&(i=()=>{this.closeSSEStream(r.id)},o=()=>{this.closeStandaloneSSEStream()}),this.onmessage?.(r,{authInfo:t?.authInfo,request:e,closeSSEStream:i,closeStandaloneSSEStream:o})}return this._streamMapping.get(p)?.controller===s&&(d=this.startKeepAlive(s,f)),new Response(h,{status:200,headers:y})}catch(e){return this.onerror?.(e),this.createJsonErrorResponse(400,-32700,"Parse error",{data:String(e)})}}async handleDeleteRequest(e){let t=this.validateSession(e);if(t)return t;let r=this.validateProtocolVersion(e);if(r)return r;try{return await Promise.resolve(this._onsessionclosed?.(this.sessionId)),new Response(null,{status:200})}finally{await this.close()}}validateSession(e){if(void 0===this.sessionIdGenerator)return;if(!this._initialized)return this.onerror?.(Error("Bad Request: Server not initialized")),this.createJsonErrorResponse(400,-32e3,"Bad Request: Server not initialized");let t=e.headers.get("mcp-session-id");return t?t!==this.sessionId?(this.onerror?.(Error("Session not found")),this.createJsonErrorResponse(404,-32001,"Session not found")):void 0:(this.onerror?.(Error("Bad Request: Mcp-Session-Id header is required")),this.createJsonErrorResponse(400,-32e3,"Bad Request: Mcp-Session-Id header is required"))}validateProtocolVersion(e){let t=e.headers.get("mcp-protocol-version");if(null!==t&&!this._supportedProtocolVersions.includes(t)){let e=`Bad Request: Unsupported protocol version: ${t} (supported versions: ${this._supportedProtocolVersions.join(", ")})`;return this.onerror?.(Error(e)),this.createJsonErrorResponse(400,-32e3,e)}}async close(){if(!this._closed){for(let{cleanup:e}of(this._closed=!0,this._streamMapping.values()))e();this._streamMapping.clear(),this._requestResponseMap.clear(),this.onclose?.()}}closeSSEStream(e){let t=this._requestToStreamMapping.get(e);if(!t)return;let r=this._streamMapping.get(t);r&&r.cleanup()}closeStandaloneSSEStream(){let e=this._streamMapping.get(this._standaloneSseStreamId);e&&e.cleanup()}async send(e,t){let r=t?.relatedRequestId;if((aE.safeParse(e).success||aA.safeParse(e).success)&&(r=e.id),void 0===r){let t;if(aE.safeParse(e).success||aA.safeParse(e).success)throw Error("Cannot send a response on a standalone SSE stream unless resuming a previous client request");this._eventStore&&(t=await this._eventStore.storeEvent(this._standaloneSseStreamId,e));let r=this._streamMapping.get(this._standaloneSseStreamId);if(void 0===r)return;r.controller&&r.encoder&&(void 0===t||!r.replayedEventIds?.has(t))&&this.writeSSEEvent(r.controller,r.encoder,e,t);return}let i=this._requestToStreamMapping.get(r);if(!i)throw Error(`No connection established for request ID: ${String(r)}`);let o=this._streamMapping.get(i);if(!this._enableJsonResponse){let t;this._eventStore&&(t=await this._eventStore.storeEvent(i,e),o=this._streamMapping.get(i)),o?.controller&&o?.encoder&&(void 0===t||!o.replayedEventIds?.has(t))&&this.writeSSEEvent(o.controller,o.encoder,e,t)}if(aE.safeParse(e).success||aA.safeParse(e).success){this._requestResponseMap.set(r,e);let t=[...this._requestToStreamMapping.entries()].filter(([e,t])=>t===i).map(([e])=>e);if(t.every(e=>this._requestResponseMap.has(e))){if(!o){if(this._enableJsonResponse)throw Error(`No connection established for request ID: ${String(r)}`);if(!this._eventStore){for(let e of(this.onerror?.(Error(`Response for request ID ${String(r)} is undeliverable: per-request stream is disconnected and no eventStore is configured`)),t))this._requestResponseMap.delete(e),this._requestToStreamMapping.delete(e);return}for(let e of t)this._requestResponseMap.delete(e),this._requestToStreamMapping.delete(e);return}if(this._enableJsonResponse&&o.resolveJson){let e={"Content-Type":"application/json"};void 0!==this.sessionId&&(e["mcp-session-id"]=this.sessionId);let r=t.map(e=>this._requestResponseMap.get(e));1===r.length?o.resolveJson(Response.json(r[0],{status:200,headers:e})):o.resolveJson(Response.json(r,{status:200,headers:e})),o.cleanup()}else o.cleanup();for(let e of t)this._requestResponseMap.delete(e),this._requestToStreamMapping.delete(e)}}}};let u1=Symbol("swallowsErrorsAfterClose");var u0=class{_readBuffer;_started=!1;_closed=!1;constructor(e=W.stdin,t=W.stdout,r){this._stdin=e,this._stdout=t,this._readBuffer=new lG({maxBufferSize:r?.maxBufferSize})}onclose;onerror;onmessage;_ondata=e=>{try{this._readBuffer.append(e),this.processReadBuffer()}catch(e){this.onerror?.(e),this.close().catch(()=>{})}};_onerror=e=>{this.onerror?.(e)};_onstdouterror=e=>{this._closed||(this.onerror?.(e),this.close().catch(()=>{}))};_onstdinclose=()=>{this.close().catch(()=>{})};async start(){if(this._started)throw Error("StdioServerTransport already started! If using Server class, note that connect() calls start() automatically.");for(let e of(this._started=!0,this._stdout.listeners("error")))e[u1]&&this._stdout.off("error",e);(this._stdin.readableEnded||this._stdin.destroyed)&&setImmediate(this._onstdinclose),this._stdin.on("data",this._ondata),this._stdin.on("error",this._onerror),this._stdin.on("end",this._onstdinclose),this._stdin.on("close",this._onstdinclose),this._stdout.on("error",this._onstdouterror)}processReadBuffer(){for(;;)try{let e=this._readBuffer.readMessage();if(null===e)break;this.onmessage?.(e)}catch(e){this.onerror?.(e)}}async close(){this._closed||(this._closed=!0,this._stdin.off("data",this._ondata),this._stdin.off("error",this._onerror),this._stdin.off("end",this._onstdinclose),this._stdin.off("close",this._onstdinclose),this._onstdouterror[u1]=!0,0===this._stdin.listenerCount("data")&&this._stdin.pause(),this._readBuffer.clear(),this.onclose?.())}send(e){return this._closed?Promise.reject(Error("StdioServerTransport is closed")):new Promise((t,r)=>{let i=JSON.stringify(e)+"\n",o=!1,n=e=>{o||(o=!0,this._stdout.off("error",n),this._stdout.off("drain",a),r(e))},a=()=>{o||(o=!0,this._stdout.off("error",n),this._stdout.off("drain",a),t())};if(this._stdout.once("error",n),this._stdout.write(i)){if(o)return;o=!0,this._stdout.off("error",n),t()}else o||this._stdout.once("drain",a)})}},u2=class extends Error{constructor(e,t){super(e,t),this.name="RequestError"}},u4=global.Request,u6=class extends u4{constructor(e,t){"object"==typeof e&&u9 in e&&(e=e[u9]()),void 0!==t?.body?.getReader&&(t.duplex??="half"),super(e,t)}},u3=Symbol("wrapBodyStream"),u9=Symbol("getRequestCache"),u5=Symbol("requestCache"),u8=Symbol("incomingKey"),u7=Symbol("urlKey"),me=Symbol("headersKey"),mt=Symbol("abortControllerKey"),mr=Symbol("getAbortController"),mi={get method(){return this[u8].method||"GET"},get url(){return this[u7]},get headers(){return this[me]||=(e=>{let t=[],r=e.rawHeaders;for(let e=0;e{let n={method:e,headers:r,signal:o.signal};if("TRACE"===e){n.method="GET";let e=new u6(t,n);return Object.defineProperty(e,"method",{get:()=>"TRACE"}),e}if("GET"!==e&&"HEAD"!==e)if("rawBody"in i&&i.rawBody instanceof Buffer)n.body=new ReadableStream({start(e){e.enqueue(i.rawBody),e.close()}});else if(i[u3]){let e;n.body=new ReadableStream({async pull(t){try{e||=D.toWeb(i).getReader();let{done:r,value:o}=await e.read();r?t.close():t.enqueue(o)}catch(e){t.error(e)}}})}else n.body=D.toWeb(i);return new u6(t,n)})(this.method,this[u7],this.headers,this[u8],this[mt])}};["body","bodyUsed","cache","credentials","destination","integrity","mode","redirect","referrer","referrerPolicy","signal","keepalive"].forEach(e=>{Object.defineProperty(mi,e,{get(){return this[u9]()[e]}})}),["arrayBuffer","blob","clone","formData","json","text"].forEach(e=>{Object.defineProperty(mi,e,{value:function(){return this[u9]()[e]()}})}),Object.defineProperty(mi,Symbol.for("nodejs.util.inspect.custom"),{value:function(e,t,r){let i={method:this.method,url:this.url,headers:this.headers,nativeRequest:this[u5]};return`Request (lightweight) ${r(i,{...t,depth:null==e?null:e-1})}`}}),Object.setPrototypeOf(mi,u6.prototype);var mo=Symbol("responseCache"),mn=Symbol("getResponseCache"),ma=Symbol("cache"),ms=global.Response,md=class e{#e;#t;[mn](){return delete this[ma],this[mo]||=new ms(this.#e,this.#t)}constructor(t,r){let i;if(this.#e=t,r instanceof e){let e=r[mo];if(e){this.#t=e,this[mn]();return}this.#t=r.#t,i=new Headers(r.#t.headers)}else this.#t=r;("string"==typeof t||void 0!==t?.getReader||t instanceof Blob||t instanceof Uint8Array)&&(this[ma]=[r?.status||200,t,i||r?.headers])}get headers(){let e=this[ma];return e?(e[2]instanceof Headers||(e[2]=new Headers(e[2]||{"content-type":"text/plain; charset=UTF-8"})),e[2]):this[mn]().headers}get status(){return this[ma]?.[0]??this[mn]().status}get ok(){let e=this.status;return e>=200&&e<300}};function mc(e,t,r){let i=t=>{e.cancel(t).catch(()=>{})};return t.on("close",i),t.on("error",i),(r??e.read()).then(a,o),e.closed.finally(()=>{t.off("close",i),t.off("error",i)});function o(e){e&&t.destroy(e)}function n(){e.read().then(a,o)}function a({done:r,value:i}){try{if(r)t.end();else{if(t.write(i))return e.read().then(a,o);t.once("drain",n)}}catch(e){o(e)}}}["body","bodyUsed","redirected","statusText","trailers","type","url"].forEach(e=>{Object.defineProperty(md.prototype,e,{get(){return this[mn]()[e]}})}),["arrayBuffer","blob","clone","formData","json","text"].forEach(e=>{Object.defineProperty(md.prototype,e,{value:function(){return this[mn]()[e]()}})}),Object.defineProperty(md.prototype,Symbol.for("nodejs.util.inspect.custom"),{value:function(e,t,r){let i={status:this.status,headers:this.headers,ok:this.ok,nativeResponse:this[mo]};return`Response (lightweight) ${r(i,{...t,depth:null==e?null:e-1})}`}}),Object.setPrototypeOf(md,ms),Object.setPrototypeOf(md.prototype,ms.prototype);var ml=e=>{let t={};e instanceof Headers||(e=new Headers(e??void 0));let r=[];for(let[i,o]of e)"set-cookie"===i?r.push(o):t[i]=o;return r.length>0&&(t["set-cookie"]=r),t["content-type"]??="text/plain; charset=UTF-8",t};void 0===global.crypto&&(global.crypto=F);var mp=Symbol("outgoingEnded"),mu=Symbol("incomingDraining"),mm=e=>{if(e.destroyed||e[mu])return;if(e[mu]=!0,e instanceof N){try{e.stream?.close?.(z.NGHTTP2_NO_ERROR)}catch{}return}let t=0,r=()=>{clearTimeout(o),e.off("data",n),e.off("end",r),e.off("error",r)},i=()=>{r();let t=e.socket;t&&!t.destroyed&&t.destroySoon()},o=setTimeout(i,500);o.unref?.();let n=e=>{(t+=e.length)>0x4000000&&i()};e.on("data",n),e.on("end",r),e.on("error",r),e.resume()},mf=e=>new Response(null,{status:e instanceof Error&&("TimeoutError"===e.name||"TimeoutError"===e.constructor.name)?504:500}),mh=(e,t)=>{let r=e instanceof Error?e:Error("unknown error",{cause:e});"ERR_STREAM_PREMATURE_CLOSE"===r.code?console.info("The user aborted a request."):(console.error(e),t.headersSent||t.writeHead(500,{"Content-Type":"text/plain"}),t.end(`Error: ${r.message}`),t.destroy(r))},my=e=>{"flushHeaders"in e&&e.writable&&e.flushHeaders()},mg=async(e,t)=>{let[r,i,o]=e[ma],n=!1;if(o){if(o instanceof Headers)n=o.has("content-length"),o=ml(o);else if(Array.isArray(o)){let e=new Headers(o);n=e.has("content-length"),o=ml(e)}else for(let e in o)if(14===e.length&&"content-length"===e.toLowerCase()){n=!0;break}}else o={"content-type":"text/plain; charset=UTF-8"};!n&&("string"==typeof i?o["Content-Length"]=Buffer.byteLength(i):i instanceof Uint8Array?o["Content-Length"]=i.byteLength:i instanceof Blob&&(o["Content-Length"]=i.size)),t.writeHead(r,o),"string"==typeof i||i instanceof Uint8Array?t.end(i):i instanceof Blob?t.end(new Uint8Array(await i.arrayBuffer())):(my(t),await (function(e,t){if(e.locked)throw TypeError("ReadableStream is locked.");if(!t.destroyed)return mc(e.getReader(),t)})(i,t)?.catch(e=>mh(e,t))),t[mp]?.()},m_=(e,t={})=>{let r=t.autoCleanupIncoming??!0;return!1!==t.overrideGlobalObjects&&global.Request!==u6&&(Object.defineProperty(global,"Request",{value:u6}),Object.defineProperty(global,"Response",{value:md})),async(i,o)=>{let n,a;try{a=((e,t)=>{let r,i=Object.create(mi);i[u8]=e;let o=e.url||"";if("/"!==o[0]&&(o.startsWith("http://")||o.startsWith("https://"))){if(e instanceof N)throw new u2("Absolute URL for :path is not allowed in HTTP/2");try{let e=new URL(o);i[u7]=e.href}catch(e){throw new u2("Invalid absolute URL",{cause:e})}return i}let n=(e instanceof N?e.authority:e.headers.host)||t;if(!n)throw new u2("Missing host header");if(e instanceof N){if("http"!==(r=e.scheme)&&"https"!==r)throw new u2("Unsupported scheme")}else r=e.socket&&e.socket.encrypted?"https":"http";let a=new URL(`${r}://${n}${o}`);if(a.hostname.length!==n.length&&a.hostname!==n.replace(/:\d+$/,""))throw new u2("Invalid host header");return i[u7]=a.href,i})(i,t.hostname);let s=!r||"GET"===i.method||"HEAD"===i.method;if(s||(i[u3]=!0,i.on("end",()=>{s=!0}),i instanceof N&&(o[mp]=()=>{s||setTimeout(()=>{s||setTimeout(()=>{mm(i)})})}),o.on("finish",()=>{s||mm(i)})),o.on("close",()=>{a[mt]&&(i.errored?a[mt].abort(i.errored.toString()):o.writableFinished||a[mt].abort("Client connection prematurely closed.")),s||setTimeout(()=>{s||setTimeout(()=>{mm(i)})})}),n=e(a,{incoming:i,outgoing:o}),ma in n)return mg(n,o)}catch(e){if(n)return mh(e,o);if(t.errorHandler){if(!(n=await t.errorHandler(a||e instanceof u2?e:new u2(e.message,{cause:e}))))return}else n=a?mf(e):new Response(null,{status:400})}try{return await (async(e,t,r={})=>{if("function"==typeof e.then)if(r.errorHandler)try{e=await e}catch(i){let t=await r.errorHandler(i);if(!t)return;e=t}else e=await e.catch(mf);if(ma in e)return mg(e,t);let i=ml(e.headers);if(e.body){let r,o=e.body.getReader(),n=[],a=!1;if("chunked"!==i["transfer-encoding"]){let e=2;for(let t=0;tPromise.resolve(void 0))])})(r).catch(e=>{console.error(e),a=!0});if(!i){if(1===t){await new Promise(e=>setTimeout(e)),e=3;continue}break}if(r=void 0,i.value&&n.push(i.value),i.done){a=!0;break}}!a||"content-length"in i||(i["content-length"]=n.reduce((e,t)=>e+t.length,0))}t.writeHead(e.status,i),n.forEach(e=>{t.write(e)}),a?t.end():(0===n.length&&my(t),await mc(o,t,r))}else i["x-hono-already-sent"]||(t.writeHead(e.status,i),t.end());t[mp]?.()})(n,o,t)}catch(e){return mh(e,o)}}},mv=class{_webStandardTransport;_requestListener;_requestContext=new WeakMap;constructor(e={}){this._webStandardTransport=new uY(e),this._requestListener=m_(async e=>{let t=this._requestContext.get(e);return this._webStandardTransport.handleRequest(e,{authInfo:t?.authInfo,parsedBody:t?.parsedBody})},{overrideGlobalObjects:!1})}get sessionId(){return this._webStandardTransport.sessionId}set onclose(e){this._webStandardTransport.onclose=e}get onclose(){return this._webStandardTransport.onclose}set onerror(e){this._webStandardTransport.onerror=e}get onerror(){return this._webStandardTransport.onerror}set onmessage(e){this._webStandardTransport.onmessage=e}get onmessage(){return this._webStandardTransport.onmessage}async start(){return this._webStandardTransport.start()}async close(){return this._webStandardTransport.close()}async send(e,t){return this._webStandardTransport.send(e,t)}setSupportedProtocolVersions(e){this._webStandardTransport.setSupportedProtocolVersions(e)}setScopeChallengeResolver(e){this._webStandardTransport.setScopeChallengeResolver(e)}async handleRequest(e,t,r){let i=e.auth;await m_(async e=>this._webStandardTransport.handleRequest(e,{authInfo:i,parsedBody:r}),{overrideGlobalObjects:!1})(e,t)}closeSSEStream(e){this._webStandardTransport.closeSSEStream(e)}closeStandaloneSSEStream(){this._webStandardTransport.closeStandaloneSSEStream()}};function mb(e=process.env){let t=e.TRACEDECAY_DATA_DIR;if(void 0!==t&&t.length>0)return O.resolve(t);let r="win32"===process.platform?e.USERPROFILE:e.HOME,i=void 0!==r&&r.length>0?r:L.homedir();return O.join(i,".tracedecay")}let m$=o7().min(1),mS=nz({pid:nR().int().nonnegative(),process_run_id:o7(),started_at_unix_secs:nR().int(),epoch:nR().int().nonnegative(),version:o7(),endpoint:nE(),http_application_endpoint:m$.nullable().optional(),auth_token:o7().min(1),profile_root:o7().min(1)});function mk(e){let t=e.http_application_endpoint;return null==t?null:`http://${t}`}function mw(e){let t=JSON.stringify(function e(t){return Array.isArray(t)?t.map(e):"object"==typeof t&&null!==t?Object.fromEntries(Object.entries(t).sort(([e],[t])=>et)).map(([t,r])=>[t,e(r)])):t}(e));if(void 0===t)throw TypeError("value is not canonical JSON");return t}function mR(e,t){if("object"!=typeof e||null===e||Array.isArray(e))throw TypeError(`malformed canonical schema: ${t} must be an object`);return e}function mP(e,t){switch(t){case"null":return null===e;case"boolean":return"boolean"==typeof e;case"integer":return"number"==typeof e&&Number.isSafeInteger(e);case"number":return"number"==typeof e&&Number.isFinite(e);case"string":return"string"==typeof e;case"array":return Array.isArray(e);case"object":return"object"==typeof e&&null!==e&&!Array.isArray(e);default:throw TypeError(`unsupported canonical schema type: ${t}`)}}function mV(e,t){if("object"!=typeof e||null===e||Array.isArray(e))throw TypeError(`malformed canonical envelope: ${t} must be an object`);return e}function mq(e,t){if("string"!=typeof e)throw TypeError(`malformed canonical envelope: ${t} must be a string`);return e}function mI(e,t){if("number"!=typeof e||!Number.isFinite(e))throw TypeError(`malformed canonical envelope: ${t} must be a finite number`);return e}function mx(e,t){if(!Array.isArray(e))throw TypeError(`malformed canonical envelope: ${t} must be an array`);return e}function mj(e,t){let r=mI(e,t);if(!Number.isSafeInteger(r))throw TypeError(`malformed canonical envelope: ${t} must be a safe integer`);return r}function mC(e,t){let r=mj(e,t);if(r<0)throw TypeError(`malformed canonical envelope: ${t} must be non-negative`);return r}let mT=new TextEncoder;function mO(e,t,r){let i=mq(e,t);if(0===i.length||i.trim()!==i||mT.encode(i).byteLength>r||/\p{Cc}/u.test(i))throw TypeError(`malformed canonical envelope: ${t} is not a bounded identifier`);return i}function mE(e,t,r,i,o,n,a,s,d){let c=mV(e,"success envelope");if(mq(c.binding_id,"binding_id")!==t)throw TypeError("malformed canonical envelope: binding mismatch");let l=mV(c.contract,"contract");if(mq(l.schema_id,"contract.schema_id")!==r||mI(l.schema_revision,"contract.schema_revision")!==i)throw TypeError("malformed canonical envelope: result contract mismatch");mq(c.request_id,"request_id"),mV(c.scope,"scope");let p=mV(c.outcome,"outcome"),u=mq(p.outcome,"outcome.outcome");return{...c,outcome:{...p,outcome:u,value:function(e,t,r,i,o,n,a){let s=mV(t,"outcome.value");if(!("payload"in s))throw TypeError("malformed canonical envelope: outcome.value.payload is required");if(("durable_effect"!==o||"required"!==n||"effect"!==e)&&("operation"!==o||"not_required"!==n||"evidence"!==e&&"preview"!==e))throw TypeError(`malformed canonical envelope: outcome ${e} is outside the operation receipt contract`);if(!function(e,t,r){let i=mV(e,"outcome.value.execution");if(mI(i.started_at,"execution.started_at"),mI(i.ended_at,"execution.ended_at"),!("effective_deadline"in i)||!("cancellation"in i))throw TypeError("malformed canonical envelope: receipt fields are required");let o=mV(i.budget,"execution.budget");mI(o.units_consumed,"budget.units_consumed"),mI(o.bytes_consumed,"budget.bytes_consumed"),mI(o.elapsed_micros,"budget.elapsed_micros");let n=mq(i.termination,"execution.termination");if(!t.includes(n))throw TypeError(`malformed canonical envelope: termination ${n} is not legal for this operation`);if(null!==i.cancellation){let e=mV(r,"operation.cancellation");if("not_cancellable"===mq(e.mode,"operation.cancellation.mode"))throw TypeError("malformed canonical envelope: non-cancellable operation returned cancellation evidence");let t=mq(mV(i.cancellation,"execution.cancellation").stage,"execution.cancellation.stage");if(!mx(e.points,"operation.cancellation.points").includes(t))throw TypeError(`malformed canonical envelope: cancellation stage ${t} is not legal for this operation`)}}(s.execution,r,i),"evidence"===e)mV(s.temporal,"temporal"),mV(s.authority,"authority"),mx(s.evidence_authorities,"evidence_authorities"),mV(s.coverage,"coverage"),mx(s.omissions,"omissions"),mx(s.scores,"scores"),mx(s.contributions,"contributions"),function(e){let t=mV(e,"outcome.value.page");if(mO(t.sort_contract_id,"page.sort_contract_id",192),1>mC(t.sort_revision,"page.sort_revision"))throw TypeError("malformed canonical envelope: page sort_revision must be positive");let r=null===t.total?null:mC(t.total,"page.total"),i=mC(t.returned,"page.returned");if(null!==r&&i>r)throw TypeError("malformed canonical envelope: page returned exceeds total");null!==t.cursor&&function(e){let t=mV(e,"page.cursor"),r=mq(t.kind,"page.cursor.kind");if("opaque"===r)mO(t.cursor,"page.cursor.cursor",4096);else throw TypeError(`malformed canonical envelope: unsupported page cursor kind ${r}`)}(t.cursor),null!==t.expires_at&&mj(t.expires_at,"page.expires_at")}(s.page);else if("preview"===e)mq(s.preview_id,"preview_id"),mq(s.preview_digest,"preview_digest"),mq(s.effect_class,"effect_class"),mV(s.authority,"authority"),mq(s.expected_state,"expected_state");else if("effect"===e)mq(s.effect_id,"effect_id"),mq(s.effect_class,"effect_class"),mq(s.idempotency_key,"idempotency_key"),mV(s.authority,"authority"),mq(s.expected_state,"expected_state"),mq(s.reconciliation,"reconciliation"),mV(s.receipt,"receipt");else throw TypeError(`malformed canonical envelope: unsupported outcome ${e}`);return{...s,payload:null===s.payload?null:a(s.payload)}}(u,p.value,o,n,a,s,d)}}}let mA={description:"Strongly typed algorithm-tagged integrity digest: `AccessPolicyDigest`.",type:"string"},mM={description:"Strongly typed canonical identity: `AccessRuleId`.",type:"string"},mW={description:"Strongly typed canonical identity: `ActorId`.",type:"string"},mN={description:"Strongly typed canonical identity: `AgentInstanceId`.",type:"string"},mz={enum:["memory_curator","session_reflector","skill_writer","combined_review","user_job"],type:"string"},mD={properties:{coverage:{$ref:"#/$defs/MetricCoverageV1"},current:{anyOf:[{$ref:"#/$defs/AnalyticsModeV1"},{type:"null"}]},transition_watermark:{type:["string","null"]},unavailable_reason:{type:["string","null"]}},required:["coverage"],type:"object"},mF={enum:["off","local_only","aggregate_share"],type:"string"},mL={oneOf:[{const:"project",description:"Analytics events of the resolved project.",type:"string"},{const:"all",description:"Analytics events of every registered project.",type:"string"}]},mU={description:"Strongly typed canonical identity: `AnalyzerEnvironmentVariable`.",type:"string"},mH={description:"Strongly typed canonical identity: `AnalyzerExecutableId`.",type:"string"},mG={oneOf:[{properties:{executable_id:{$ref:"#/$defs/AnalyzerExecutableId"},kind:{const:"built_in",type:"string"}},required:["kind","executable_id"],type:"object"},{properties:{executable_digest:{$ref:"#/$defs/ManifestDigest"},kind:{const:"approved_external",type:"string"}},required:["kind","executable_digest"],type:"object"}]},mB={description:"Strongly typed canonical identity: `AnalyzerLanguageId`.",type:"string"},mK={additionalProperties:!1,description:"One language's analyzer selection. Host registration may project only the\nnon-sensitive `language_id`/`enabled` pair; all other fields remain in the\nconfiguration authority.",properties:{arguments:{items:{type:"string"},type:"array"},enabled:{type:"boolean"},environment_allowlist:{items:{$ref:"#/$defs/AnalyzerEnvironmentVariable"},type:"array",uniqueItems:!0},executable:{$ref:"#/$defs/AnalyzerExecutableReferenceV1"},initialization_options:{additionalProperties:{$ref:"#/$defs/AnalyzerStructuredValueV1"},type:"object"},language_id:{$ref:"#/$defs/AnalyzerLanguageId"},privacy_class:{$ref:"#/$defs/AnalyzerPrivacyClassV1"},resource_limits:{$ref:"#/$defs/AnalyzerResourceLimitsV1"},restart_policy:{$ref:"#/$defs/AnalyzerRestartPolicyV1"},settings:{additionalProperties:{$ref:"#/$defs/AnalyzerStructuredValueV1"},type:"object"}},required:["language_id","enabled","executable","arguments","initialization_options","settings","environment_allowlist","privacy_class","resource_limits","restart_policy"],type:"object"},mJ={enum:["non_sensitive","sensitive","restricted"],type:"string"},mZ={additionalProperties:!1,properties:{maximum_memory_mib:{format:"uint32",minimum:0,type:"integer"},request_timeout_millis:{format:"uint64",minimum:0,type:"integer"},startup_timeout_millis:{format:"uint64",minimum:0,type:"integer"}},required:["maximum_memory_mib","startup_timeout_millis","request_timeout_millis"],type:"object"},mQ={enum:["restart_on_configuration_change","manual_restart_only"],type:"string"},mX={additionalProperties:!1,description:"Canonical analyzer settings. A changed selection produces a new\nconfiguration revision/digest; cache invalidation remains owned elsewhere.",properties:{schema_version:{format:"uint16",maximum:65535,minimum:0,type:"integer"},selections:{items:{$ref:"#/$defs/AnalyzerLanguageSelectionV1"},type:"array"}},required:["schema_version","selections"],type:"object"},mY={description:"A structured analyzer option value. This deliberately excludes raw\nenvironment values, commands, credential material, and transport blobs.",oneOf:[{properties:{kind:{const:"boolean",type:"string"},value:{type:"boolean"}},required:["kind","value"],type:"object"},{properties:{kind:{const:"integer",type:"string"},value:{format:"int64",type:"integer"}},required:["kind","value"],type:"object"},{properties:{kind:{const:"text",type:"string"},value:{type:"string"}},required:["kind","value"],type:"object"},{properties:{kind:{const:"text_list",type:"string"},value:{items:{type:"string"},type:"array"}},required:["kind","value"],type:"object"},{properties:{kind:{const:"object",type:"string"},value:{additionalProperties:{$ref:"#/$defs/AnalyzerStructuredValueV1"},type:"object"}},required:["kind","value"],type:"object"}]},m1={description:"Strongly typed canonical identity: `AttemptId`.",type:"string"},m0={description:"Authoritative scope of a source binding. A mutable path, label, or host\nprofile cannot be represented as authority.",oneOf:[{properties:{id:{$ref:"#/$defs/ProjectId"},kind:{const:"project",type:"string"}},required:["kind","id"],type:"object"},{properties:{id:{$ref:"#/$defs/UserProfileId"},kind:{const:"projectless_hermes",type:"string"}},required:["kind","id"],type:"object"}]},m2={additionalProperties:!1,description:"One exact application scope paired with its registered physical locator.\n\nThe scope remains the identity authority. The locator is retained only so\na later read or restart can reopen the exact registered root without an\nactive-graph or CWD fallback.",properties:{locator:{anyOf:[{$ref:"#/$defs/RegisteredRootLocatorV1"},{type:"null"}]},scope:{$ref:"#/$defs/ResolvedScope"}},required:["scope"],type:"object"},m4={additionalProperties:!1,description:"Immutable canonical set of exact roots admitted by their existing request\ncontexts. A registered locator participates only as frozen reopening\nevidence; its paired [`ResolvedScope`](crate::context::ResolvedScope) remains\nthe root identity authority.",properties:{actor_id:{$ref:"#/$defs/ActorId"},digest:{$ref:"#/$defs/ManifestDigest"},revision:{$ref:"#/$defs/ScopeSetRevision"},roots:{items:{$ref:"#/$defs/AuthorizedRoot"},type:"array"},scope_set_id:{$ref:"#/$defs/ScopeSetId"}},required:["scope_set_id","revision","actor_id","roots","digest"],type:"object"},m6={description:"A terminal automatic-fact receipt state.",enum:["applied","quarantined"],type:"string"},m3={oneOf:[{properties:{kind:{const:"disabled",type:"string"}},required:["kind"],type:"object"},{properties:{kind:{const:"eligible_only",type:"string"},maximum_per_run:{format:"uint16",maximum:65535,minimum:1,type:"integer"},minimum_idle_seconds:{format:"uint64",minimum:1,type:"integer"}},required:["kind","minimum_idle_seconds","maximum_per_run"],type:"object"}]},m9={enum:["disabled","codex_app_server"],type:"string"},m5={enum:["standalone","delegated_host"],type:"string"},m8={description:"The settled status every successful read in this family reports.",enum:["ok"],type:"string"},m7={description:"Which owner's automation schedulers a reconcile covers.",oneOf:[{const:"project",description:"The served project's scheduler, answered by the project's owner.",type:"string"},{const:"profile",description:"Every cached project scheduler of the profile, answered by the\ndaemon's profile owner.",type:"string"}]},fe={properties:{created_at:{type:"string"},kind:{type:"string"},path:{type:"string"},schema_version:{format:"uint32",minimum:0,type:"integer"},sha256:{type:"string"},summary:{type:["string","null"]}},required:["schema_version","kind","path","sha256","created_at"],type:"object"},ft={description:"Automation run reads answer from the active project's ledger only.",enum:["active_project"],type:"string"},fr={enum:["queued","running","succeeded","failed","skipped"],type:"string"},fi={additionalProperties:!1,properties:{allow_job_commands:{type:"boolean"},backend:{$ref:"#/$defs/AutomationBackendV1"},combine_due_tasks:{type:"boolean"},enabled:{type:"boolean"},host_mode:{$ref:"#/$defs/AutomationHostModeV1"},model_id:{type:["string","null"]},scheduler_tick_secs:{format:"uint64",minimum:0,type:"integer"},schema_version:{format:"uint16",maximum:65535,minimum:0,type:"integer"},tasks:{$ref:"#/$defs/AutomationTaskSetV1"},timeout_secs:{format:"uint64",minimum:0,type:"integer"}},required:["schema_version","enabled","backend","host_mode","timeout_secs","scheduler_tick_secs","combine_due_tasks","allow_job_commands","tasks"],type:"object"},fo={additionalProperties:!1,properties:{memory_curator:{$ref:"#/$defs/AutomationTaskSettingsV1"},session_reflector:{$ref:"#/$defs/AutomationTaskSettingsV1"},skill_writer:{$ref:"#/$defs/AutomationTaskSettingsV1"}},required:["memory_curator","session_reflector","skill_writer"],type:"object"},fn={additionalProperties:!1,properties:{cooldown_secs:{format:"uint64",minimum:0,type:["integer","null"]},enabled:{type:"boolean"},interval_secs:{format:"uint64",minimum:0,type:["integer","null"]},min_idle_secs:{format:"uint64",minimum:0,type:["integer","null"]},schedule:{type:["string","null"]},session_evidence_budget_backoff_secs:{description:"Suppression window between session-evidence retrieval attempts while\nthe evidence budget stays exhausted. Unset uses the automation crate's\none-hour default. Distinct from `cooldown_secs`, which paces retries\nafter failed runs; budget exhaustion is a skip, not a failure.",format:"uint64",minimum:0,type:["integer","null"]},stale_lock_secs:{format:"uint64",minimum:0,type:["integer","null"]}},required:["enabled"],type:"object"},fa={enum:["manual_cli","manual_mcp","dashboard","application","scheduler","host_receipt"],type:"string"},fs={description:"Strongly typed canonical identity: `BrainId`.",type:"string"},fd={oneOf:[{properties:{kind:{const:"reject",type:"string"}},required:["kind"],type:"object"},{properties:{kind:{const:"append_monotonic_ordinal",type:"string"},maximum_attempts:{format:"uint16",maximum:65535,minimum:1,type:"integer"}},required:["kind","maximum_attempts"],type:"object"}]},fc={oneOf:[{properties:{bytes:{format:"uint8",maximum:255,minimum:1,type:"integer"},kind:{const:"task_id_digest_prefix",type:"string"}},required:["kind","bytes"],type:"object"},{properties:{kind:{const:"repository_slug",type:"string"}},required:["kind"],type:"object"},{properties:{kind:{const:"work_class",type:"string"}},required:["kind"],type:"object"},{properties:{kind:{const:"monotonic_collision_ordinal",type:"string"}},required:["kind"],type:"object"}]},fl={enum:["hyphen","underscore","slash"],type:"string"},fp={additionalProperties:!1,properties:{collision:{$ref:"#/$defs/BranchCollisionPolicyV1"},components:{items:{$ref:"#/$defs/BranchNameComponentV1"},type:"array"},maximum_bytes:{format:"uint16",maximum:65535,minimum:1,type:"integer"},prefix:{$ref:"#/$defs/CanonicalGitRefPrefix"},separator:{$ref:"#/$defs/BranchNameSeparatorV1"}},required:["prefix","components","separator","maximum_bytes","collision"],type:"object"},fu={additionalProperties:!1,description:"A declared dependency edge; propagation direction remains an application\ndecision and is never inferred from this edge.",properties:{dependency:{$ref:"#/$defs/StackNodeId"},dependent:{$ref:"#/$defs/StackNodeId"}},required:["dependency","dependent"],type:"object"},fm={description:"Strongly typed canonical identity: `BranchStackId`.",type:"string"},ff={additionalProperties:!1,description:"One visible branch/ref at one immutable tip.",properties:{node_id:{$ref:"#/$defs/StackNodeId"},project_id:{$ref:"#/$defs/ProjectId"},reference:{$ref:"#/$defs/RefId"},repository_id:{$ref:"#/$defs/RepositoryId"},tip:{$ref:"#/$defs/CommitId"},worktree_id:{anyOf:[{$ref:"#/$defs/WorktreeId"},{type:"null"}]}},required:["node_id","project_id","repository_id","reference","tip"],type:"object"},fh={description:"Strongly typed canonical identity: `BranchStackRevisionId`.",type:"string"},fy={additionalProperties:!1,description:"Immutable branch-stack projection at one exact inventory revision.",properties:{canonical_order:{items:{$ref:"#/$defs/StackNodeId"},type:"array"},digest:{$ref:"#/$defs/ManifestDigest"},edges:{items:{$ref:"#/$defs/BranchStackEdgeV1"},type:"array"},inventory_epoch:{$ref:"#/$defs/WorktreeInventoryEpoch"},inventory_snapshot_id:{$ref:"#/$defs/WorktreeInventorySnapshotId"},nodes:{items:{$ref:"#/$defs/BranchStackNodeV1"},type:"array"},revision_id:{$ref:"#/$defs/BranchStackRevisionId"},source:{$ref:"#/$defs/BranchStackSourceV1"},stack_id:{$ref:"#/$defs/BranchStackId"}},required:["stack_id","revision_id","inventory_snapshot_id","inventory_epoch","source","nodes","edges","canonical_order","digest"],type:"object"},fg={description:"Authoritative source that declared the exact stack topology.",enum:["explicit_declaration","accepted_task_branch_topology"],type:"string"},f_={enum:["no_branches","unbranched","independent_branches","local_stack"],type:"string"},fv={additionalProperties:!1,properties:{allowed:{items:{$ref:"#/$defs/BranchTopologyKindV1"},type:"array",uniqueItems:!0}},required:["allowed"],type:"object"},fb={description:"Strongly typed canonical identity: `CalibrationProfileId`.",type:"string"},f$={additionalProperties:!1,description:"Surface-owned query semantics. Page size remains an invocation control, but\ncontinuation is a request field so CLI, MCP, and HTTP callers all have the\nsame channel for spending a `next_cursor`.",properties:{cursor:{default:null,type:["string","null"]},order:{$ref:"#/$defs/RetrievalOrder"},projection:{$ref:"#/$defs/ResultProjection"}},required:["projection","order"],type:"object"},fS={additionalProperties:!1,properties:{observed_at:{$ref:"#/$defs/UtcMicros"},stage:{$ref:"#/$defs/CancellationStage"}},required:["stage","observed_at"],type:"object"},fk={description:"Exact stage at which cancellation or deadline state was observed.",enum:["before_admission","before_read","during_read","before_effect","effect_in_flight","reconciling","after_commit"],type:"string"},fw={additionalProperties:!1,description:"One retriever's scored contribution to a fused candidate. Every ranked\ncandidate retains every retriever's raw score domain, ordinal rank,\ncalibrated feature, weight, and weighted contribution.",properties:{calibrated_feature_micros:{format:"uint32",minimum:0,type:"integer"},calibration_profile_id:{$ref:"#/$defs/CalibrationProfileId"},ordinal_rank:{format:"uint32",minimum:0,type:"integer"},raw_score:{$ref:"#/$defs/FixedPointScore"},retriever:{$ref:"#/$defs/RetrieverKind"},retriever_revision:{$ref:"#/$defs/ComponentRevision"},score_domain:{$ref:"#/$defs/ScoreDomainId"},source_occurrence_id:{$ref:"#/$defs/SourceOccurrenceId"},weight_micros:{format:"uint32",minimum:0,type:"integer"},weighted_contribution_micros:{format:"uint64",minimum:0,type:"integer"}},required:["retriever","retriever_revision","source_occurrence_id","ordinal_rank","raw_score","score_domain","calibration_profile_id","calibrated_feature_micros","weight_micros","weighted_contribution_micros"],type:"object"},fR={description:"A validated full native Git ref name, such as `refs/heads/main`.",type:"string"},fP={description:"A validated ref/branch prefix. Branch naming accepts a short branch prefix\n(for example `tracedecay/`) while protected-ref selectors use full\n`refs/.../` prefixes.",type:"string"},fV={description:"Strongly typed canonical identity: `CapabilityId`.",type:"string"},fq={description:"Strongly typed canonical identity: `CatalogGenerationId`.",type:"string"},fI={description:"Strongly typed canonical identity: `ChangePlanId`.",type:"string"},fx={additionalProperties:!1,properties:{from_inclusive:{format:"int64",type:["integer","null"]},through_inclusive:{format:"int64",type:["integer","null"]}},type:"object"},fj={additionalProperties:!1,description:'Why co-change mining produced no answer, so an empty\n`missing_co_change_partners` does not read as "no partner is missing".',properties:{reason:{type:"string"},retryable:{type:"boolean"}},required:["reason","retryable"],type:"object"},fC={enum:["kind","language","path"],type:"string"},fT={description:"Strongly typed canonical identity: `CodeGenerationId`.",type:"string"},fO={description:"Freshness of the generation a verified graph read serves.",oneOf:[{properties:{state:{const:"current",type:"string"}},required:["state"],type:"object"},{properties:{rebuild_in_flight:{type:"boolean"},sealed_at:{$ref:"#/$defs/UtcMicros"},state:{const:"last_complete_stale",type:"string"}},required:["state","sealed_at","rebuild_in_flight"],type:"object"}]},fE={description:"A typed reason an otherwise active generation cannot make durable progress.",enum:["resident_memory","source_unavailable","artifact_store_unavailable","retry_backoff","publication_authority_corrupt"],type:"string"},fA={description:'A deterministic contract violation that parked background convergence.\n\nParked is not dead: the worker keeps re-observing the violation on its\nordinary wake cadence, so an operator fix (for example restoring an\nowner-private mode) is picked up on the next wake without a restart. The\nstate exists so `status`, doctor, and the dashboard report the violation\ntyped instead of an indefinite "warming".',properties:{blocked_reason:{anyOf:[{$ref:"#/$defs/CodeIndexBuildBlockedReasonV1"},{type:"null"}],description:"Stable class for callers that must decide whether new work is admissible."},observed_passes:{description:"Background passes that re-observed the violation since parking.",format:"uint64",minimum:0,type:"integer"},parked_at_micros:{description:"When the violation was first observed (microseconds since the Unix epoch).",format:"int64",type:"integer"},reason:{description:"Exact typed failure that parked convergence.",type:"string"},remediation:{description:"Operator action that clears the violation.",type:"string"},retries_on_wake:{description:"Whether the worker re-checks this violation on every ordinary wake.\nTrue for filesystem/contract violations an operator fix clears in\nplace; false for an abnormal task failure that only changed input (a\nnew sealed generation) retries.",type:"boolean"}},required:["reason","remediation","parked_at_micros","observed_passes","retries_on_wake"],type:"object"},fM={properties:{display_path:{description:"`git_path_bytes` decoded for display, invalid UTF-8 replaced.",type:"string"},git_path_bytes:{description:"The exact Git path bytes, which need not be UTF-8.",items:{format:"uint8",maximum:255,minimum:0,type:"integer"},type:"array"},reason:{$ref:"#/$defs/CodeIndexSourceOmissionReasonV1"}},required:["git_path_bytes","display_path","reason"],type:"object"},fW={description:"Sources a sealed snapshot captured but does not index.",properties:{count:{description:"Every omitted source in the snapshot.",format:"uint64",minimum:0,type:"integer"},sources:{description:"The first omitted sources in Git path order, at most\n[`CODE_INDEX_OMITTED_SOURCE_LIST_LIMIT`].",items:{$ref:"#/$defs/CodeIndexOmittedSourceV1"},type:"array"}},required:["count","sources"],type:"object"},fN={oneOf:[{description:"No logical path can carry the Git path: not UTF-8, a backslash, a\ncontrol character, or leading or trailing whitespace.",properties:{kind:{const:"unrepresentable_path",type:"string"}},required:["kind"],type:"object"},{description:"The privacy boundary withheld the file's bytes.",properties:{detail:{type:"string"},kind:{const:"privacy_withheld",type:"string"}},required:["kind","detail"],type:"object"}]},fz={description:"Closed staleness ladder for one mounted worktree.\n\nThe scheduler publishes one of these tokens. MCP, the dashboard, and the\nCLI must match the variant, not a hand-copied string, so a new ladder\nstate cannot appear at one caller and be missed at the others.",enum:["fresh","stale","indexing","refreshing","restoring","verifying","parked"],type:"string"},fD={description:"Profile-level worker-count intent for the process-wide code-index pool.\n`Automatic` delegates the concrete count to runtime resource admission;\n`Exact` persists an operator-requested positive worker count.",oneOf:[{additionalProperties:!1,properties:{mode:{const:"automatic",type:"string"}},required:["mode"],type:"object"},{additionalProperties:!1,properties:{mode:{const:"exact",type:"string"},workers:{format:"uint16",maximum:65535,minimum:0,type:"integer"}},required:["mode","workers"],type:"object"}]},fF={additionalProperties:!1,properties:{chunk:{anyOf:[{$ref:"#/$defs/CodeSearchChunkId"},{type:"null"}]},file:{$ref:"#/$defs/FileOccurrenceId"},path:{type:"string"},span:{$ref:"#/$defs/SourceSpan"},symbol:{anyOf:[{$ref:"#/$defs/SymbolOccurrenceId"},{type:"null"}]}},required:["file","path","span"],type:"object"},fL={additionalProperties:!1,description:"One immutable code-index generation inside the authorized single root.\nThe path prefix narrows a query but never establishes project identity.",properties:{generation:{$ref:"#/$defs/CodeGenerationId"},path_prefix:{type:["string","null"]}},required:["generation"],type:"object"},fU={description:"Strongly typed canonical identity: `CodeSearchChunkId`.",type:"string"},fH={description:"Strongly typed canonical identity: `CommitId`.",type:"string"},fG={enum:["promote","reject","insufficient_evidence"],type:"string"},fB={description:"Whether the bounded complexity walk over a symbol's body ran to the end.\n\nThe extractor stops walking a body once its traversal budget is spent. The\ncounters accumulated by then are lower bounds over the visited prefix, not\nfacts about the whole body, so every surface that prints, ranks, or\naggregates complexity must render this state instead of treating those\ncounters as exact.",oneOf:[{enum:["complete"],type:"string"},{const:"traversal_budget_exhausted",description:"The walk stopped when the traversal budget ran out.",type:"string"}]},fK={description:"Strongly typed canonical identity: `ComponentRevision`.",type:"string"},fJ={description:"Strongly typed canonical identity: `ComponentVersion`.",type:"string"},fZ={enum:["config_summary"],type:"string"},fQ={additionalProperties:!1,description:"One entry per changed config file instead of one per config key.",properties:{config_keys:{format:"uint",minimum:0,type:"integer"},file:{type:"string"},kind:{$ref:"#/$defs/ConfigSummaryKindV1"}},required:["file","kind","config_keys"],type:"object"},fX={description:"Strongly typed canonical identity: `ConfigurationIdempotencyKey`.",type:"string"},fY={description:"A typed configuration layer identity. The default layer intentionally has\nno caller-controlled identifier.",oneOf:[{properties:{kind:{const:"default",type:"string"}},required:["kind"],type:"object"},{properties:{kind:{const:"user_profile",type:"string"},profile_id:{$ref:"#/$defs/UserProfileId"}},required:["kind","profile_id"],type:"object"},{properties:{kind:{const:"project",type:"string"},project_id:{$ref:"#/$defs/ProjectId"}},required:["kind","project_id"],type:"object"},{properties:{collection_id:{$ref:"#/$defs/QueryCollectionId"},kind:{const:"collection",type:"string"}},required:["kind","collection_id"],type:"object"}]},f1={description:"Strongly typed canonical identity: `ConfigurationReceiptId`.",type:"string"},f0={description:"Strongly typed canonical identity: `ConfigurationRevisionId`.",type:"string"},f2={description:"Strongly typed canonical identity: `ConfigurationSnapshotId`.",type:"string"},f4={description:"Values that the typed registry can accept.",oneOf:[{properties:{kind:{const:"boolean",type:"string"},value:{type:"boolean"}},required:["kind","value"],type:"object"},{properties:{kind:{const:"unsigned",type:"string"},value:{format:"uint64",minimum:0,type:"integer"}},required:["kind","value"],type:"object"},{properties:{kind:{const:"code_index_worker_selection",type:"string"},value:{$ref:"#/$defs/CodeIndexWorkerSelectionV1"}},required:["kind","value"],type:"object"},{properties:{kind:{const:"text",type:"string"},value:{type:"string"}},required:["kind","value"],type:"object"},{properties:{kind:{const:"string_list",type:"string"},value:{items:{type:"string"},type:"array"}},required:["kind","value"],type:"object"},{properties:{kind:{const:"source_bindings",type:"string"},value:{items:{$ref:"#/$defs/ScopeSourceBinding"},type:"array"}},required:["kind","value"],type:"object"},{properties:{kind:{const:"access_rules",type:"string"},value:{items:{$ref:"#/$defs/ScopeAccessRule"},type:"array"}},required:["kind","value"],type:"object"},{properties:{kind:{const:"analyzer_settings",type:"string"},value:{$ref:"#/$defs/AnalyzerSettingsV1"}},required:["kind","value"],type:"object"},{properties:{kind:{const:"work_topology_policy",type:"string"},value:{$ref:"#/$defs/WorkTopologyPolicyV1"}},required:["kind","value"],type:"object"},{properties:{kind:{const:"work_executable_bindings",type:"string"},value:{items:{$ref:"#/$defs/WorkExecutableBindingV1"},type:"array"}},required:["kind","value"],type:"object"},{properties:{kind:{const:"work_expertise_consent",type:"string"},value:{$ref:"#/$defs/WorkExpertiseConsentV1"}},required:["kind","value"],type:"object"},{properties:{kind:{const:"context_scout_settings",type:"string"},value:{$ref:"#/$defs/ContextScoutSettingsV1"}},required:["kind","value"],type:"object"},{properties:{kind:{const:"automation_settings",type:"string"},value:{$ref:"#/$defs/AutomationSettingsV1"}},required:["kind","value"],type:"object"},{properties:{kind:{const:"lcm_summarizer_executables",type:"string"},value:{$ref:"#/$defs/LcmSummarizerExecutablesV1"}},required:["kind","value"],type:"object"}]},f6={description:"Strongly typed algorithm-tagged integrity digest: `ContentDigest`.",type:"string"},f3={description:"What one caller `lexical_anchors` entry contributed to the response, in\ncaller order.",oneOf:[{additionalProperties:!1,description:"`matched` indexed rows carried the anchor; `admitted` result sites\ncarrying it are in this response, and `dropped` counts the sites the\nlexical lane admitted that a later stage removed, by reason.",properties:{admitted:{format:"uint64",minimum:0,type:"integer"},anchor:{type:"string"},dropped:{items:{$ref:"#/$defs/LexicalAnchorDropV1"},type:"array"},matched:{format:"uint64",minimum:0,type:"integer"},outcome:{const:"matched",type:"string"}},required:["outcome","anchor","matched","admitted"],type:"object"},{additionalProperties:!1,description:"No indexed row carries the anchor.",properties:{anchor:{type:"string"},outcome:{const:"unmatched",type:"string"}},required:["outcome","anchor"],type:"object"},{additionalProperties:!1,description:"The anchor's route did not serve; `coverage` names the lane state.",properties:{anchor:{type:"string"},outcome:{const:"not_served",type:"string"}},required:["outcome","anchor"],type:"object"}]},f9={enum:["explore","plan"],type:"string"},f5={additionalProperties:!1,description:"Exact opaque destination for one public Context Scout operation.\n\nThe daemon converts this transport-neutral address into its runtime value\nonly after catalog admission. Keeping the public wire here makes CLI, MCP,\nHTTP, and both SDKs share one generated schema authority.",properties:{agent_id:{items:{format:"uint8",maximum:255,minimum:0,type:"integer"},maxItems:16,minItems:16,type:"array"},logical_message_id:{items:{format:"uint8",maximum:255,minimum:0,type:"integer"},maxItems:16,minItems:16,type:"array"},profile_id:{items:{format:"uint8",maximum:255,minimum:0,type:"integer"},maxItems:16,minItems:16,type:"array"},project_id:{items:{format:"uint8",maximum:255,minimum:0,type:"integer"},maxItems:16,minItems:16,type:"array"},protected_session_id:{items:{format:"uint8",maximum:255,minimum:0,type:"integer"},maxItems:32,minItems:32,type:"array"},provider_id:{items:{format:"uint8",maximum:255,minimum:0,type:"integer"},maxItems:16,minItems:16,type:"array"},thread_id:{items:{format:"uint8",maximum:255,minimum:0,type:"integer"},maxItems:16,minItems:16,type:"array"},turn_id:{items:{format:"uint8",maximum:255,minimum:0,type:"integer"},maxItems:16,minItems:16,type:"array"}},required:["profile_id","provider_id","protected_session_id","thread_id","turn_id","agent_id","logical_message_id","project_id"],type:"object"},f8={enum:["retrieval","diagnostic","coordination","verification"],type:"string"},f7={additionalProperties:!1,description:"Public lease proof. It carries only opaque identities; the daemon resolves\nit back to the durable queue row before recording delivery.",properties:{envelope_id:{items:{format:"uint8",maximum:255,minimum:0,type:"integer"},maxItems:16,minItems:16,type:"array"},lease_expires_at:{$ref:"#/$defs/UtcMicros"},lease_id:{items:{format:"uint8",maximum:255,minimum:0,type:"integer"},maxItems:16,minItems:16,type:"array"},work:{$ref:"#/$defs/ContextScoutWorkV1"}},required:["work","envelope_id","lease_id","lease_expires_at"],type:"object"},he={additionalProperties:!1,properties:{max_candidates:{format:"uint32",minimum:0,type:"integer"},max_evidence:{format:"uint32",minimum:0,type:"integer"},max_model_input_tokens:{format:"uint32",minimum:0,type:"integer"},max_model_output_tokens:{format:"uint32",minimum:0,type:"integer"},max_text_bytes:{format:"uint32",minimum:0,type:"integer"}},required:["max_candidates","max_evidence","max_text_bytes","max_model_input_tokens","max_model_output_tokens"],type:"object"},ht={enum:["deterministic","configured_model"],type:"string"},hr={enum:["active","paused","disabled"],type:"string"},hi={enum:["codex_app_server"],type:"string"},ho={enum:["attempted","delayed","displayed","expanded","explicitly_accepted","explicitly_rejected","dismissed","expired_unseen","corrected","unknown"],type:"string"},hn={additionalProperties:!1,properties:{delivered_at:{$ref:"#/$defs/UtcMicros"},envelope_id:{items:{format:"uint8",maximum:255,minimum:0,type:"integer"},maxItems:16,minItems:16,type:"array"},outcome:{$ref:"#/$defs/ContextScoutDeliveryOutcomeV1"},receipt_id:{items:{format:"uint8",maximum:255,minimum:0,type:"integer"},maxItems:16,minItems:16,type:"array"}},required:["receipt_id","envelope_id","delivered_at","outcome"],type:"object"},ha={enum:["immediate","next_boundary","idle_window","on_request","suppressed"],type:"string"},hs={enum:["complete","partial","stale","cancelled","unavailable"],type:"string"},hd={additionalProperties:!1,properties:{anchor_ids:{items:{$ref:"#/$defs/RetrievalAnchorId"},type:"array"},availability:{$ref:"#/$defs/ContextScoutEvidenceAvailabilityV1"},claim_digest:{$ref:"#/$defs/ManifestDigest"},content_generation:{$ref:"#/$defs/CodeGenerationId"}},required:["content_generation","availability","anchor_ids","claim_digest"],type:"object"},hc={enum:["explicitly_accepted","explicitly_rejected","dismissed","corrected"],type:"string"},hl={additionalProperties:!1,properties:{kind:{$ref:"#/$defs/ContextScoutFeedbackKindV1"},receipt_id:{items:{format:"uint8",maximum:255,minimum:0,type:"integer"},maxItems:16,minItems:16,type:"array"}},required:["receipt_id","kind"],type:"object"},hp={additionalProperties:!1,properties:{max_candidates:{format:"uint",minimum:0,type:"integer"},max_evidence:{format:"uint",minimum:0,type:"integer"},max_model_input_tokens:{format:"uint",minimum:0,type:"integer"},max_model_output_tokens:{format:"uint",minimum:0,type:"integer"},max_text_bytes:{format:"uint",minimum:0,type:"integer"}},required:["max_candidates","max_evidence","max_text_bytes","max_model_input_tokens","max_model_output_tokens"],type:"object"},hu={enum:["disabled","codex_app_server","unsupported"],type:"string"},hm={enum:["not_requested","succeeded","disabled","unavailable","denied","disconnected","cancelled","deadline_exceeded","token_budget_exceeded","invalid_output"],type:"string"},hf={additionalProperties:!1,properties:{actual_model:{type:["string","null"]},actual_provider:{type:["string","null"]},estimated_cost_microusd:{format:"uint64",minimum:0,type:["integer","null"]},input_tokens:{format:"uint64",minimum:0,type:["integer","null"]},output_tokens:{format:"uint64",minimum:0,type:["integer","null"]},requested_backend:{$ref:"#/$defs/ContextScoutModelBackendV1"}},required:["requested_backend"],type:"object"},hh={additionalProperties:!1,properties:{feedback:{anyOf:[{$ref:"#/$defs/ContextScoutFeedbackV1"},{type:"null"}]},receipt:{$ref:"#/$defs/ContextScoutDeliveryReceiptV1"},suggestion:{$ref:"#/$defs/ContextScoutSuggestionProjectionV1"}},required:["suggestion","receipt"],type:"object"},hy={enum:["deterministic","model_assisted","deterministic_fallback"],type:"string"},hg={enum:["deterministic","configured_model"],type:"string"},h_={enum:["active","paused","disabled"],type:"string"},hv={additionalProperties:!1,description:"Canonical Context Scout control-plane value. Disabled is the only stock\nstate; deterministic or configured-model execution requires an explicit\nconfiguration revision.",properties:{limits:{$ref:"#/$defs/ContextScoutConfigurationLimitsV1"},mode:{$ref:"#/$defs/ContextScoutConfigurationModeV1"},model_id:{type:["string","null"]},model_path:{anyOf:[{$ref:"#/$defs/ContextScoutConfiguredModelPathV1"},{type:"null"}]},model_timeout_secs:{format:"uint64",minimum:0,type:["integer","null"]},schema_version:{format:"uint16",maximum:65535,minimum:0,type:"integer"},state:{$ref:"#/$defs/ContextScoutConfigurationStateV1"}},required:["schema_version","state","mode","limits"],type:"object"},hb={enum:["stored","duplicate","superseded"],type:"string"},h$={additionalProperties:!1,properties:{category:{$ref:"#/$defs/ContextScoutCategoryV1"},configuration_revision:{items:{format:"uint8",maximum:255,minimum:0,type:"integer"},maxItems:32,minItems:32,type:"array"},dedupe_key:{items:{format:"uint8",maximum:255,minimum:0,type:"integer"},maxItems:32,minItems:32,type:"array"},delivery_window:{$ref:"#/$defs/ContextScoutDeliveryWindowV1"},envelope_id:{items:{format:"uint8",maximum:255,minimum:0,type:"integer"},maxItems:16,minItems:16,type:"array"},evidence:{$ref:"#/$defs/ContextScoutEvidenceProjectionV1"},expires_at:{$ref:"#/$defs/UtcMicros"},model_outcome:{$ref:"#/$defs/ContextScoutModelOutcomeV1"},model_receipt:{anyOf:[{$ref:"#/$defs/ContextScoutModelReceiptV1"},{type:"null"}]},relevance_score:{format:"uint16",maximum:65535,minimum:0,type:"integer"},route:{$ref:"#/$defs/ContextScoutRouteV1"},suggestion_text:{type:"string"},work:{$ref:"#/$defs/ContextScoutWorkV1"}},required:["work","envelope_id","configuration_revision","delivery_window","route","model_outcome","dedupe_key","category","relevance_score","suggestion_text","evidence","expires_at"],type:"object"},hS={enum:["disabled","paused","dirty_overlay","quiet_or_unreceptive","no_eligible_candidate","expired","duplicate","cancelled","model_output_invalid","evidence_partial","evidence_stale","evidence_unavailable"],type:"string"},hk={additionalProperties:!1,properties:{address:{$ref:"#/$defs/ContextScoutAddressV1"},generation:{format:"uint64",minimum:0,type:"integer"},input_watermark:{items:{format:"uint8",maximum:255,minimum:0,type:"integer"},maxItems:32,minItems:32,type:"array"}},required:["address","generation","input_watermark"],type:"object"},hw={properties:{authorized_scope_ref:{type:"string"},current:{type:"boolean"},estimated_cost:{items:{$ref:"#/$defs/MetricValueV1"},type:"array"},horizon:{$ref:"#/$defs/ObservabilityHorizonV1"},latency:{description:"Provider-backed operation latency, projected from the same retained\nPlan 26 operation-resource events as Observatory. Each entry keeps\nprovider/model identity explicit; `None` is a real uncorrelated state,\nnever a client-side guess.",items:{$ref:"#/$defs/ProviderLatencyReadModelV1"},type:"array"},observed_at_micros:{format:"int64",type:"integer"},pricing_revision:{type:["string","null"]},usage:{items:{$ref:"#/$defs/MetricValueV1"},type:"array"},watermark:{type:"string"}},required:["authorized_scope_ref","horizon","watermark","observed_at_micros","current","usage","estimated_cost","latency"],type:"object"},hR={description:"Which side of a file dependency the coupling report counts.",enum:["fan_in","fan_out"],type:"string"},hP={description:"Completeness is explicit; unknown never renders as clean.",enum:["complete","partial","unknown"],type:"string"},hV={enum:["known","partial","stale","unknown","sampled","capped"],type:"string"},hq={description:"Strongly typed canonical identity: `CredentialReferenceId`.",type:"string"},hI={enum:["disabled","manual_receipt_only","fast_forward_only","merge_commit","cherry_pick_exact_commits"],type:"string"},hx={additionalProperties:!1,properties:{allow_cross_repository:{type:"boolean"},allowed_modes:{items:{$ref:"#/$defs/CrossMergeModeV1"},type:"array",uniqueItems:!0},default_mode:{$ref:"#/$defs/CrossMergeModeV1"}},required:["allowed_modes","default_mode","allow_cross_repository"],type:"object"},hj={additionalProperties:!1,description:"One immutable deadline supplied by the caller or upstream admission layer.",properties:{expires_at:{$ref:"#/$defs/UtcMicros"}},required:["expires_at"],type:"object"},hC={description:"Diagnostic severity. Source severity is preserved exactly; TraceDecay\nnever raises severity because several producers agree.",enum:["error","warning","information","hint"],type:"string"},hT={description:"Whether Doctor observed all of a family's evidence sources.",oneOf:[{const:"complete",description:"Every relevant evidence source for the family was observed.",type:"string"},{const:"partial",description:"Some evidence sources were observed; others were omitted.",type:"string"},{const:"unknown",description:"Whether coverage is complete could not be determined.",type:"string"}]},hO={description:"Shape of the design-structure-matrix report.",enum:["stats","clusters","matrix"],type:"string"},hE={enum:["prevented","committed","unknown","not_applicable"],type:"string"},hA={enum:["exact_duplicate","superseded_overlap","repeated_investigation","duplicate_effect","not_duplicate","censored","unknown"],type:"string"},hM={description:"Evidence role used by dedupe/diversity caps. Independent corroboration\nand contradictions are preserved.",enum:["primary","corroboration","contradiction","context"],type:"string"},hW={description:"The exact tiers, lexicographically ordered above all approximate\ncandidates. Fusion derives this only from a validated [`ExactAdmissionProof`].",enum:["exact_message","exact_literal_phrase","approximate"],type:"string"},hN={description:"The classification of one whole exact technical term. Whole exact terms\nand language-profiled subtokens are distinct fields.",enum:["whole_symbol","qualified_name","path","compiler_error_code","compiler_error_text","runtime_error_code","runtime_error_text","cli_flag","tool_name","configuration_key","commit_identifier"],type:"string"},hz={description:"Strongly typed canonical identity: `FactAssertionId`.",type:"string"},hD={enum:["general","user_pref","project","tool","decision","code_area"],type:"string"},hF={enum:["committed","idempotent_replay"],type:"string"},hL={oneOf:[{additionalProperties:!1,properties:{kind:{const:"profile",type:"string"}},required:["kind"],type:"object"},{additionalProperties:!1,properties:{kind:{const:"project",type:"string"},project_id:{$ref:"#/$defs/ProjectId"}},required:["kind","project_id"],type:"object"}]},hU={additionalProperties:!1,properties:{active_assertion_id:{anyOf:[{$ref:"#/$defs/FactAssertionId"},{type:"null"}]},committed_event_ids:{items:{$ref:"#/$defs/FactEventId"},type:"array"},disposition:{$ref:"#/$defs/FactCommitDispositionV1"},fact_id:{$ref:"#/$defs/FactId"},last_event_id:{$ref:"#/$defs/FactEventId"},owner:{$ref:"#/$defs/FactCommitOwnerV1"}},required:["disposition","fact_id","owner","committed_event_ids","last_event_id"],type:"object"},hH={description:"Strongly typed canonical identity: `FactEventId`.",type:"string"},hG={enum:["helpful","unhelpful"],type:"string"},hB={description:"Strongly typed canonical identity: `FactId`.",type:"string"},hK={oneOf:[{additionalProperties:!1,properties:{anchor_id:{$ref:"#/$defs/RetrievalAnchorId"},kind:{const:"evidence",type:"string"},stable_key:{$ref:"#/$defs/LocatorDigest"}},required:["kind","anchor_id","stable_key"],type:"object"},{additionalProperties:!1,properties:{kind:{const:"application",type:"string"},operation_id:{$ref:"#/$defs/ProvenanceId"}},required:["kind","operation_id"],type:"object"}]},hJ={description:"Payload states that structurally cannot expose an available fact payload.",enum:["redacted","quarantined","retention_expired","deleted","unavailable","ambiguous"],type:"string"},hZ={oneOf:[{additionalProperties:!1,properties:{fact:{$ref:"#/$defs/FactV1"},kind:{const:"available",type:"string"}},required:["kind","fact"],type:"object"},{additionalProperties:!1,properties:{fact:{$ref:"#/$defs/FactV1"},kind:{const:"superseded",type:"string"},superseded_by:{$ref:"#/$defs/FactId"}},required:["kind","fact","superseded_by"],type:"object"},{additionalProperties:!1,properties:{kind:{const:"unavailable",type:"string"},status:{$ref:"#/$defs/FactStatusV1"}},required:["kind","status"],type:"object"}]},hQ={oneOf:[{additionalProperties:!1,properties:{kind:{const:"not_applicable",type:"string"}},required:["kind"],type:"object"},{additionalProperties:!1,properties:{kind:{const:"not_mounted",type:"string"}},required:["kind"],type:"object"},{additionalProperties:!1,properties:{expanded_fact_count:{format:"uint",minimum:0,type:"integer"},kind:{const:"complete",type:"string"},relation_count:{format:"uint",minimum:0,type:"integer"},root_count:{format:"uint",minimum:0,type:"integer"}},required:["kind","root_count","relation_count","expanded_fact_count"],type:"object"},{additionalProperties:!1,properties:{kind:{const:"degraded",type:"string"},reason:{$ref:"#/$defs/FactSearchGraphDegradationV1"}},required:["kind","reason"],type:"object"}]},hX={enum:["conflict","unavailable","budget_exhausted","deadline_exceeded"],type:"string"},hY={additionalProperties:!1,properties:{fact:{$ref:"#/$defs/FactV1"},scores:{$ref:"#/$defs/FactSearchScoresV1"},why:{type:["string","null"]}},required:["fact","scores"],type:"object"},h1={additionalProperties:!1,properties:{fts_score_millionths:{format:"uint32",minimum:0,type:"integer"},holographic_score_millionths:{format:"uint32",minimum:0,type:"integer"},jaccard_score_millionths:{format:"uint32",minimum:0,type:"integer"},score_millionths:{format:"uint32",minimum:0,type:"integer"},trust_score_millionths:{format:"uint32",minimum:0,type:"integer"}},required:["score_millionths","fts_score_millionths","jaccard_score_millionths","holographic_score_millionths","trust_score_millionths"],type:"object"},h0={additionalProperties:!1,properties:{fact_id:{$ref:"#/$defs/FactId"},owner:{$ref:"#/$defs/FactCommitOwnerV1"},payload_access:{$ref:"#/$defs/FactPayloadAccessV1"},projected_as_of:{$ref:"#/$defs/UtcMicros"}},required:["owner","fact_id","payload_access","projected_as_of"],type:"object"},h2={additionalProperties:!1,properties:{access_count:{format:"uint64",minimum:0,type:"integer"},created_at:{$ref:"#/$defs/UtcMicros"},helpful_count:{format:"uint64",minimum:0,type:"integer"},last_feedback_at:{anyOf:[{$ref:"#/$defs/UtcMicros"},{type:"null"}]},last_recalled_at:{anyOf:[{$ref:"#/$defs/UtcMicros"},{type:"null"}]},last_retrieved_at:{anyOf:[{$ref:"#/$defs/UtcMicros"},{type:"null"}]},retrieval_count:{format:"uint64",minimum:0,type:"integer"},unhelpful_count:{format:"uint64",minimum:0,type:"integer"},updated_at:{$ref:"#/$defs/UtcMicros"}},required:["retrieval_count","access_count","helpful_count","unhelpful_count","created_at","updated_at"],type:"object"},h4={additionalProperties:!1,description:"Available fact projection. Unavailable payload states use\n[`FactProjectionV1::Unavailable`] and cannot fabricate payload fields.",properties:{active_assertion_id:{$ref:"#/$defs/FactAssertionId"},category:{$ref:"#/$defs/FactCategoryV1"},content:{type:"string"},entities:{items:{type:"string"},type:"array"},fact_id:{$ref:"#/$defs/FactId"},last_event_id:{$ref:"#/$defs/FactEventId"},metadata:{additionalProperties:!0,type:"object"},owner:{$ref:"#/$defs/FactCommitOwnerV1"},projected_as_of:{$ref:"#/$defs/UtcMicros"},source:{$ref:"#/$defs/FactIdentitySourceResultV1"},source_label:{type:["string","null"]},tags:{items:{type:"string"},type:"array"},telemetry:{$ref:"#/$defs/FactTelemetryV1"},trust_score_millionths:{format:"uint32",minimum:0,type:"integer"}},required:["owner","fact_id","content","category","tags","entities","trust_score_millionths","source","active_assertion_id","last_event_id","projected_as_of","telemetry","metadata"],type:"object"},h6={additionalProperties:!1,description:"Exact source-owned state for one advisory producer in a composed feedback\ncycle. The producer tag is part of the durable cycle result so consumers\nnever infer provenance from the position of an aggregate provider state.",properties:{producer:{$ref:"#/$defs/FeedbackDiagnosticProducerV1"},state:{$ref:"#/$defs/ProviderEvaluationStateV1"}},required:["producer","state"],type:"object"},h3={description:"Availability of the canonical baseline used to classify a current\ndiagnostic. An unavailable or partial baseline never upgrades a finding\nto `New`; only an authoritative `NoPriorBaseline` state may do so without\na baseline record.",oneOf:[{enum:["complete","partial","stale","unavailable"],type:"string"},{const:"no_prior_baseline",description:"The authoritative runtime confirmed that there is no prior saved\ngeneration to compare. This is authoritative empty history, not an\ninvented horizon and not unavailable/partial coverage.",type:"string"}]},h9={description:"Content identity distinguishes durable saved content from an authorized\nephemeral document overlay. Overlay identity is deliberately local to its\nowning session and cannot be made durable by converting it to a digest.",oneOf:[{properties:{file_digest:{$ref:"#/$defs/ManifestDigest"},generation_digest:{$ref:"#/$defs/ManifestDigest"},kind:{const:"saved_content",type:"string"}},required:["kind","generation_digest","file_digest"],type:"object"},{properties:{agent_id:{anyOf:[{$ref:"#/$defs/AgentInstanceId"},{type:"null"}]},document_version:{format:"uint64",minimum:0,type:"integer"},kind:{const:"ephemeral_overlay",type:"string"},overlay_digest:{$ref:"#/$defs/ManifestDigest"},owner_client_id:{$ref:"#/$defs/HostInstanceId"},session_id:{$ref:"#/$defs/SessionId"}},required:["kind","session_id","owner_client_id","document_version","overlay_digest"],type:"object"}]},h5={description:"Strongly typed canonical identity: `FeedbackCycleId`.",type:"string"},h8={enum:["clean","duplicate_noop","blocked","incomplete_coverage","stale_replan_required","budget_exceeded","cancelled","user_stop","daemon_unavailable"],type:"string"},h7={enum:["new","pre_existing","unknown"],type:"string"},ye={description:"Closed producer vocabulary for standard diagnostic projection.",enum:["code_diagnostic","git_hub_review","ci_localization","proximity"],type:"string"},yt={additionalProperties:!1,description:"Bounded code location used only to project an anchored advisory finding\ninto an editor. The finding's `retrieval_anchor_id` remains the evidence\nexpansion authority; this value carries no source body or provider payload.",properties:{code:{type:"string"},code_description_uri:{type:["string","null"]},file:{$ref:"#/$defs/FileOccurrenceId"},producer:{$ref:"#/$defs/FeedbackDiagnosticProducerV1"},safe_bounded_message:{type:"string"},severity:{$ref:"#/$defs/DiagnosticSeverityV1"},span:{$ref:"#/$defs/SourceSpan"},symbol:{anyOf:[{$ref:"#/$defs/SymbolOccurrenceId"},{type:"null"}]}},required:["file","span","code","severity","safe_bounded_message","producer"],type:"object"},yr={enum:["durable","session_only"],type:"string"},yi={description:"Strongly typed canonical identity: `FeedbackFindingId`.",type:"string"},yo={enum:["active","superseded","resolved","cleared"],type:"string"},yn={additionalProperties:!1,properties:{cycle_id:{$ref:"#/$defs/FeedbackCycleId"},expand_handle:{description:"Server-minted request handle for `feedback_expand`, present only when\nthe canonical finding has a retained retrieval anchor.",type:["string","null"]},finding:{$ref:"#/$defs/FeedbackFindingV1"},get_handle:{description:"Server-minted request handle for `feedback_get`; durable identity remains\n`finding.finding_id`.\n\nCursor identity types are deliberately absent from the generated schema\nsurface; the public wire form is the bounded opaque string.",type:"string"},result_id:{$ref:"#/$defs/FeedbackResultId"},scope:{$ref:"#/$defs/FeedbackScopeV1"}},required:["result_id","cycle_id","scope","finding","get_handle"],type:"object"},ya={additionalProperties:!1,description:"Reference-only post-edit feedback finding. The safe preview is bounded display framing,\nnever a source-text copy or a second diagnostic store.",properties:{classification:{$ref:"#/$defs/FeedbackDiagnosticClassificationV1"},diagnostic_projection:{anyOf:[{$ref:"#/$defs/FeedbackDiagnosticProjectionV1"},{type:"null"}]},finding_id:{$ref:"#/$defs/FeedbackFindingId"},lifecycle:{$ref:"#/$defs/FeedbackFindingLifecycleV1"},provider_state:{$ref:"#/$defs/ProviderEvaluationStateV1"},retrieval_anchor_id:{anyOf:[{$ref:"#/$defs/RetrievalAnchorId"},{type:"null"}]},safe_bounded_preview:{type:["string","null"]}},required:["finding_id","classification","lifecycle","provider_state"],type:"object"},ys={description:"Coverage state for graph impact and affected-test evidence. An empty impact\nset is clean only when its state is complete.",enum:["complete","partial","stale","unavailable"],type:"string"},yd={additionalProperties:!1,description:"Reference-only graph and test impact for one feedback target. The owning\ngraph/query layer supplies these identities; this contract does not create\nanother graph, test map, or evidence store.",properties:{affected_callers:{items:{$ref:"#/$defs/SymbolOccurrenceId"},type:"array"},affected_files:{items:{$ref:"#/$defs/FileOccurrenceId"},type:"array"},affected_tests:{items:{$ref:"#/$defs/SymbolOccurrenceId"},type:"array"},affected_tests_state:{$ref:"#/$defs/FeedbackImpactStateV1"},evidence_anchors:{items:{$ref:"#/$defs/RetrievalAnchorId"},type:"array"},state:{$ref:"#/$defs/FeedbackImpactStateV1"},target:{$ref:"#/$defs/FeedbackTargetV1"}},required:["target","affected_files","affected_callers","affected_tests","evidence_anchors","state","affected_tests_state"],type:"object"},yc={description:"Strongly typed canonical identity: `FeedbackResultId`.",type:"string"},yl={additionalProperties:!1,description:"Exact repository scope used for a feedback evaluation. A path, current\nworking directory, repository display name, or mutable branch label is not\na substitute for this identity.",properties:{branch_ref:{type:"string"},head_commit_id:{$ref:"#/$defs/CommitId"},project_id:{$ref:"#/$defs/ProjectId"},repository_id:{$ref:"#/$defs/RepositoryId"},worktree_id:{$ref:"#/$defs/WorktreeId"}},required:["project_id","repository_id","worktree_id","branch_ref","head_commit_id"],type:"object"},yp={additionalProperties:!1,description:"Exact changed-code address for one single-root feedback evaluation. The\naddress carries canonical file/range/symbol identities, never a path or\nmutable line number.",properties:{file:{$ref:"#/$defs/FileOccurrenceId"},generation_id:{anyOf:[{$ref:"#/$defs/CodeGenerationId"},{type:"null"}]},span:{anyOf:[{$ref:"#/$defs/SourceSpan"},{type:"null"}]},symbol:{anyOf:[{$ref:"#/$defs/SymbolOccurrenceId"},{type:"null"}]}},required:["file"],type:"object"},yu={description:"Strongly typed canonical identity: `FileOccurrenceId`.",type:"string"},ym={description:"How `tracedecay_files` lays out its listing.",oneOf:[{const:"flat",description:"One file per line.",type:"string"},{const:"grouped",description:"Grouped by directory.",type:"string"}]},yf={description:"Deterministic fixed-point score in millionths. No floating point crosses\nthis boundary.",format:"uint64",minimum:0,type:"integer"},yh={description:"Compatibility state of one source/projection pair.",enum:["current","stale","incompatible","missing","unknown"],type:"string"},yy={additionalProperties:!1,description:"A candidate after contribution grouping and fixed-point fusion.",properties:{anchor_id:{$ref:"#/$defs/RetrievalAnchorId"},contributions:{items:{$ref:"#/$defs/CandidateContribution"},type:"array"},decisions:{items:{$ref:"#/$defs/RankingDecision"},type:"array"},exact_class:{$ref:"#/$defs/ExactClass"},freshness:{items:{$ref:"#/$defs/SourceFreshness"},type:"array"},logical_evidence_id:{$ref:"#/$defs/LogicalEvidenceId"},occurrences:{items:{$ref:"#/$defs/OccurrenceProvenance"},type:"array"},utility_micros:{format:"uint64",minimum:0,type:"integer"}},required:["anchor_id","logical_evidence_id","occurrences","exact_class","utility_micros","contributions","freshness","decisions"],type:"object"},yg={description:"Metric whose distribution the Gini report measures.",enum:["complexity","lines","fan_in","fan_out","members"],type:"string"},y_={description:"Unit the Gini report aggregates its metric over.",enum:["file","symbol"],type:"string"},yv={description:"Expected blob identity, or explicit absent-file state.",oneOf:[{enum:["absent_file"],type:"string"},{additionalProperties:!1,properties:{present:{$ref:"#/$defs/GitOidV1"}},required:["present"],type:"object"}]},yb={additionalProperties:!1,description:"A symbol the exact base/head branch-generation comparison reports.",properties:{content_digest:{type:"string"},file:{type:"string"},id:{type:"string"},kind:{type:"string"},name:{type:"string"},qualified_name:{type:"string"}},required:["id","name","qualified_name","kind","file","content_digest"],type:"object"},y$={additionalProperties:!1,description:"A verified-graph symbol a git-context read reports.",properties:{file:{type:"string"},id:{type:"string"},kind:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},name:{type:"string"}},required:["id","name","kind","file","line"],type:"object"},yS={additionalProperties:!1,description:"Typed coverage of a read-only Git result: the sorted, de-duplicated set\nof degradations observed while capturing it.",properties:{degradations:{items:{$ref:"#/$defs/GitDegradationV1"},type:"array"}},required:["degradations"],type:"object"},yk={description:"Typed coverage/degradation reasons for a read-only Git result. A result\ncarrying any degradation is truthful but not complete; callers must not\ntreat it as a clean full view.",oneOf:[{enum:["detached_head","unborn_branch","sparse_checkout","split_index","unreadable_state","unsupported_object_format","in_progress_operation","shallow_boundary","truncated_output"],type:"string"},{const:"ignored_collision",description:"Ignored content shares a directory with live tracked/untracked\nentries, so the untracked/ignored view may be collapsed by Git.",type:"string"},{const:"conflicted_state",description:"Unmerged index stages are present.",type:"string"},{const:"submodule_state",description:"Submodule entries exist; the adapter does not recurse into them.",type:"string"}]},yw={description:"A native Git file mode as stored in tree/index records (six octal digits,\ne.g. `100644`, `100755`, `120000` symlink, `160000` gitlink/submodule).",type:"string"},yR={description:"Native HEAD state. Missing, unborn, and detached states are explicit,\nnever guessed.",oneOf:[{properties:{branch:{type:"string"},commit:{$ref:"#/$defs/GitOidV1"},state:{const:"attached",type:"string"}},required:["state","branch","commit"],type:"object"},{properties:{commit:{$ref:"#/$defs/GitOidV1"},state:{const:"detached",type:"string"}},required:["state","commit"],type:"object"},{properties:{branch:{type:"string"},state:{const:"unborn",type:"string"}},required:["state","branch"],type:"object"}]},yP={enum:["disabled","probe_private_preview"],type:"string"},yV={additionalProperties:!1,description:"Expected index entry state for compare-and-swap: blob identity (or\nabsent), mode, and unmerged-stage state. `unmerged_stage` is `None` for a\nmerged (stage-0) entry.",properties:{blob:{$ref:"#/$defs/GitBlobExpectationV1"},mode:{anyOf:[{$ref:"#/$defs/GitFileModeV1"},{type:"null"}]},unmerged_stage:{format:"uint8",maximum:255,minimum:0,type:["integer","null"]}},required:["blob"],type:"object"},yq={description:"Strongly typed canonical identity: `GitIndexPreviewId`.",type:"string"},yI={description:"The only native Git mutations represented by the index-transaction runtime. Generic Git execution,\nref rewrites, commits, merge/rebase/cherry-pick, push, and worktree writes are\ndeliberately absent.",enum:["stage_hunks","unstage_hunks"],type:"string"},yx={description:"A native Git object id (commit, tree, or blob), lowercase hex, SHA-1 or\nSHA-256 length. This is identity evidence only; it never authorizes\nobject reconstruction or traversal outside native Git.",type:"string"},yj={description:"In-progress native Git operation state, read from repository metadata.",enum:["none","merge","rebase","cherry_pick","revert","bisect","sequencer","unknown"],type:"string"},yC={description:"Whether a bounded page holds every answer or stopped at its limit.",enum:["complete","partial"],type:"string"},yT={enum:["complete"],type:"string"},yO={enum:["partial"],type:"string"},yE={enum:["unavailable"],type:"string"},yA={enum:["result_limit"],type:"string"},yM={additionalProperties:!1,properties:{branch:{type:["string","null"]},commit:{type:["string","null"]},worktree:{type:["string","null"]}},type:"object"},yW={description:"Flat public selector for an admitted Git diff scope.\n\nThis intentionally differs from [`tracedecay_domain::GitDiffScopeV1`]: MCP\nand CLI accept `scope`, `base`, and `head` as sibling fields, then\ntransport parsing builds the canonical domain scope after checking their\nlegal combinations.",enum:["working_tree","staged","commit_range"],type:"string"},yN={enum:["git"],type:"string"},yz={additionalProperties:!1,properties:{kind:{$ref:"#/$defs/GitToolErrorKindV1"},message:{type:"string"},operation:{$ref:"#/$defs/GitToolOperationV1"}},required:["kind","operation","message"],type:"object"},yD={additionalProperties:!1,description:"Git itself refused the refs, worktree status, or history the tool reads.",properties:{error:{$ref:"#/$defs/GitToolErrorV1"}},required:["error"],type:"object"},yF={description:"The git step that refused the read.",enum:["diff","status","log"],type:"string"},yL={additionalProperties:!1,properties:{binding_digest:{$ref:"#/$defs/ManifestDigest"},consumed_at:{$ref:"#/$defs/UtcMicros"},input_digest:{$ref:"#/$defs/ManifestDigest"},receipt_digest:{$ref:"#/$defs/ManifestDigest"},request_id:{type:"string"},token_digest:{$ref:"#/$defs/ManifestDigest"}},required:["binding_digest","token_digest","request_id","input_digest","consumed_at","receipt_digest"],type:"object"},yU={enum:["forbid_force_and_rebase"],type:"string"},yH={description:"Strongly typed canonical identity: `HostInstanceId`.",type:"string"},yG={description:"`HunkRef` operation direction: working tree to index, or index to\nHEAD/base. No other direction is encodable.",enum:["working_tree_to_index","index_to_head"],type:"string"},yB={additionalProperties:!1,description:"Immutable hunk identity for compare-and-swap. A hunk is identified by exact repository,\ndirection, path, expected base/index/worktree identity, normalized hunk\nheader, context and patch digests, and the preview that issued the\nreference, never by display ordinal or line number alone.\n\nquery mints these as read-only identity evidence only. Applying them is a\ndaemon Git mutation path and is not representable here.",properties:{attributes_digest:{anyOf:[{$ref:"#/$defs/ManifestDigest"},{type:"null"}],description:"Attributes/filter identity relevant to clean/smudge and EOL handling."},context_digest:{$ref:"#/$defs/ManifestDigest"},direction:{$ref:"#/$defs/HunkDirectionV1"},expected_base_blob:{$ref:"#/$defs/GitBlobExpectationV1"},expected_index_entry:{$ref:"#/$defs/GitIndexEntryExpectationV1"},expected_worktree_blob:{anyOf:[{$ref:"#/$defs/GitBlobExpectationV1"},{type:"null"}],description:"Expected working-tree identity when the operation reads the worktree:\na native content digest or explicit absent-file state. `None` means\nthe operation direction does not read the worktree."},expected_worktree_mode:{anyOf:[{$ref:"#/$defs/GitFileModeV1"},{type:"null"}]},hunk_header:{description:"Normalized `@@ -o,l +n,m @@` header text.",type:"string"},original_path:{description:"Old path for a rename or copy.",type:["string","null"]},patch_digest:{$ref:"#/$defs/ManifestDigest"},path:{type:"string"},preview_id:{type:"string"},repository:{$ref:"#/$defs/RepositoryId"},schema_version:{type:"string"},selected_line_bitmap:{description:"Selected hunk-line bitmap (little-endian word order, line 1 = bit 0\nof word 0). Full-hunk identity covers the larger old/new side so\ndeletion-only hunks remain representable.",items:{format:"uint64",minimum:0,type:"integer"},type:"array"},snapshot_digest:{$ref:"#/$defs/ManifestDigest"},worktree:{$ref:"#/$defs/WorktreeId"}},required:["repository","worktree","direction","path","expected_base_blob","expected_index_entry","hunk_header","context_digest","patch_digest","selected_line_bitmap","preview_id","schema_version","snapshot_digest"],type:"object"},yK={enum:["available","retained_but_unavailable","redacted","deleted","retention_expired","unauthorized","locked","unverifiable"],type:"string"},yJ={description:"p50/p95/p99 for one provider operation latency stage.",properties:{p50:{$ref:"#/$defs/MetricValueV1"},p95:{$ref:"#/$defs/MetricValueV1"},p99:{$ref:"#/$defs/MetricValueV1"}},required:["p50","p95","p99"],type:"object"},yZ={oneOf:[{properties:{state:{const:"ready",type:"string"}},required:["state"],type:"object"},{properties:{state:{const:"denied",type:"string"}},required:["state"],type:"object"},{properties:{state:{const:"cancelled",type:"string"}},required:["state"],type:"object"},{properties:{state:{const:"timed_out",type:"string"}},required:["state"],type:"object"},{properties:{reason:{type:"string"},state:{const:"unavailable",type:"string"}},required:["state","reason"],type:"object"},{properties:{diagnostic:{type:"string"},state:{const:"failed",type:"string"}},required:["state","diagnostic"],type:"object"}]},yQ={additionalProperties:!1,properties:{limit:{format:"uint64",minimum:0,type:"integer"},offset:{format:"uint64",minimum:0,type:"integer"},returned_chars:{format:"uint64",minimum:0,type:"integer"},total_chars:{format:"uint64",minimum:0,type:"integer"},truncated:{type:"boolean"}},required:["offset","limit","returned_chars","total_chars","truncated"],type:"object"},yX={description:"Whether historical discovery, projection publication, and summary\nconvergence have all settled for everything the store's sources hold.",oneOf:[{const:"converging",description:"A stage still owes committed work.",type:"string"},{const:"converged",description:"The worker committed the last owed item and has nothing pending.",type:"string"},{const:"blocked",description:"Every runnable stage settled, but historical discovery is blocked.",type:"string"},{const:"unavailable",description:"No worker is serving the store.",type:"string"}]},yY={additionalProperties:!1,properties:{converged_at_unix_micros:{description:"When the latest convergence event was published.",format:"int64",type:["integer","null"]},epoch:{description:"Convergence events this worker has published; a larger value is a\nnewer event.",format:"uint64",minimum:0,type:"integer"},reason:{description:"The historical discovery blocker when `state` is `blocked`.",type:["string","null"]},state:{$ref:"#/$defs/LcmConvergenceStateV1"}},required:["state","epoch"],type:"object"},y1={description:"Whether the refresh worker that serves this store's temporal projection\nis current, still converging history, or not serving at all.",enum:["current","stale","unavailable"],type:"string"},y0={additionalProperties:!1,description:"The temporal projection's serving state at diagnosis time. A store whose\nschema is healthy can still have nothing to serve while history is being\nre-derived (for example on a fresh profile); this is where\nthat state is named instead of being read as absent data.",properties:{convergence:{$ref:"#/$defs/LcmConvergenceV1"},reason:{description:"Machine reason for a non-current state: `historical_convergence`,\n`historical_retry:`, `historical_blocked:`, or the worker\nunavailability (`worker_missing`, `worker_recovering`, `worker_stalled`,\n`worker_stopped`).",type:["string","null"]},state:{$ref:"#/$defs/LcmDoctorProjectionStateV1"},worker:{$ref:"#/$defs/RetrievalWorkerStatusV1"}},required:["state","worker","convergence"],type:"object"},y2={additionalProperties:!1,properties:{content:{type:"string"},content_hash:{type:"string"},message_id:{type:"string"},metadata_json:{type:["string","null"]},ordinal:{format:"int64",type:"integer"},payload_ref:{type:["string","null"]},provider:{type:"string"},role:{type:"string"},session_id:{type:"string"},storage_kind:{$ref:"#/$defs/LcmStorageKindV1"},store_id:{format:"int64",type:"integer"},timestamp:{format:"int64",type:["integer","null"]}},required:["provider","message_id","session_id","store_id","role","ordinal","content","content_hash","storage_kind"],type:"object"},y4={oneOf:[{properties:{freshness:{$ref:"#/$defs/TemporalFreshnessV1"},outcome:{const:"complete",type:"string"}},required:["outcome","freshness"],type:"object"},{properties:{freshness:{$ref:"#/$defs/TemporalFreshnessV1"},omitted:{format:"uint64",minimum:0,type:"integer"},outcome:{const:"partial",type:"string"}},required:["outcome","freshness","omitted"],type:"object"},{properties:{freshness:{$ref:"#/$defs/TemporalFreshnessV1"},outcome:{const:"stale",type:"string"}},required:["outcome","freshness"],type:"object"}]},y6={oneOf:[{properties:{kind:{const:"raw_message",type:"string"},store_id:{format:"int64",type:"integer"}},required:["kind","store_id"],type:"object"},{properties:{kind:{const:"summary_node",type:"string"},node_id:{type:"string"}},required:["kind","node_id"],type:"object"}]},y3={enum:["inline","external","canonical_occurrence"],type:"string"},y9={description:"One provider's summarizer executable: absent by default, or the exact\nabsolute path the operator configured with its optional tuning.",oneOf:[{properties:{state:{const:"unconfigured",type:"string"}},required:["state"],type:"object"},{properties:{canonical_path:{type:"string"},model:{description:"Model requested for summary turns; the provider default when absent.",type:["string","null"]},state:{const:"configured",type:"string"},timeout_secs:{description:"Wall-clock budget for one summary run, within\n[`LCM_SUMMARIZER_TIMEOUT_SECS_RANGE`]; the caller's default when absent.",format:"uint64",minimum:0,type:["integer","null"]}},required:["state","canonical_path"],type:"object"}]},y5={additionalProperties:!1,description:"The per-provider summarizer executables one configuration snapshot admits.",properties:{codex:{$ref:"#/$defs/LcmSummarizerExecutableV1",default:{state:"unconfigured"},description:"`codex`, driven over app-server JSON-RPC for Codex sessions."},cursor_agent:{$ref:"#/$defs/LcmSummarizerExecutableV1",default:{state:"unconfigured"},description:"`cursor-agent`, asked for a summary of Cursor sessions."}},type:"object"},y8={additionalProperties:!1,properties:{conversation_id:{type:"string"},created_at:{format:"int64",type:"integer"},depth:{format:"int64",type:"integer"},expand_hint:{type:["string","null"]},metadata_json:{type:["string","null"]},node_id:{type:"string"},provider:{type:"string"},session_id:{type:"string"},source_refs:{items:{$ref:"#/$defs/LcmSourceRefV1"},type:"array"},source_time_end:{format:"int64",type:["integer","null"]},source_time_start:{format:"int64",type:["integer","null"]},source_token_count:{format:"int64",type:"integer"},summary_hash:{type:"string"},summary_text:{type:"string"},summary_token_count:{format:"int64",type:"integer"}},required:["node_id","provider","conversation_id","session_id","depth","summary_text","summary_hash","source_refs","summary_token_count","source_token_count","created_at"],type:"object"},y7={additionalProperties:!1,properties:{anchors:{items:{type:"string"},type:"array"},authorized_root:{type:["string","null"]},coverage:{$ref:"#/$defs/TemporalCoverageV1"},explanations:{items:{$ref:"#/$defs/TemporalExplanationV1"},type:"array"},next_cursor:{type:["string","null"]},omissions:{items:{$ref:"#/$defs/TemporalOmissionV1"},type:"array"},source_coverage:{items:{$ref:"#/$defs/SessionSourceCoverageV1"},type:"array"},watermarks:{$ref:"#/$defs/TemporalWatermarksV1"}},required:["anchors","watermarks","coverage","explanations"],type:"object"},ge={description:"Why a site the lexical lane admitted for a caller anchor is absent from\nthe response.",oneOf:[{const:"diversity_cap",description:"Collapsed as a duplicate or held back by the per-file diversity cap.",type:"string"},{const:"outside_page",description:"Ranked, but outside the returned page: an earlier page, or behind\n`next_cursor`.",type:"string"},{const:"not_hydrated",description:"On the page, but late hydration returned no source for it.",type:"string"},{const:"out_of_scope",description:"Outside the caller's scope prefix.",type:"string"}]},gt={additionalProperties:!1,description:"Anchor sites one serving stage removed from the response.",properties:{reason:{$ref:"#/$defs/LexicalAnchorDropReasonV1"},sites:{format:"uint64",minimum:0,type:"integer"}},required:["reason","sites"],type:"object"},gr={description:"Strongly typed algorithm-tagged integrity digest: `LocatorDigest`.",type:"string"},gi={description:"Strongly typed canonical identity: `LogicalCopyClusterId`.",type:"string"},go={description:"Strongly typed canonical identity: `LogicalEvidenceId`.",type:"string"},gn={enum:["global","project"],type:"string"},ga={properties:{absorbed_into:{type:["string","null"]},activated_at:{format:"int64",type:["integer","null"]},archived_reason:{type:["string","null"]},category:{type:"string"},checksum:{type:"string"},created_at:{format:"int64",type:"integer"},id:{type:"string"},materialization_scope:{$ref:"#/$defs/ManagedSkillMaterializationScope"},pinned:{type:"boolean"},provenance:{$ref:"#/$defs/ManagedSkillProvenance"},routing_description:{type:"string"},state:{$ref:"#/$defs/ManagedSkillState"},summary:{type:"string"},targets:{default:["cursor","codex","claude","agents","opencode","kimi","kiro","hermes"],items:{$ref:"#/$defs/SkillInstallTarget"},type:"array"},title:{type:"string"},updated_at:{format:"int64",type:"integer"}},required:["id","title","summary","routing_description","category","state","pinned","checksum","created_at","updated_at","provenance"],type:"object"},gs={properties:{actor:{type:"string"},run_id:{type:["string","null"]},source:{$ref:"#/$defs/ManagedSkillSource"}},required:["source","actor"],type:"object"},gd={enum:["automation_run","user","import"],type:"string"},gc={enum:["active","disabled","archived"],type:"string"},gl={description:"Strongly typed algorithm-tagged integrity digest: `ManifestDigest`.",type:"string"},gp={description:"The only Git histories this product operation can create.",enum:["fast_forward","two_parent_merge","cherry_pick_exact_commits"],type:"string"},gu={enum:["project","user"],type:"string"},gm={enum:["all","parents_only","subagents_only"],type:"string"},gf={enum:["all","direct_user","tool_result"],type:"string"},gh={properties:{calibration_revision:{type:"string"},cohort_revision:{type:"string"},drift_valid:{type:"boolean"},estimator_revision:{type:"string"},support:{format:"uint64",minimum:0,type:"integer"}},required:["estimator_revision","calibration_revision","cohort_revision","support","drift_valid"],type:"object"},gy={properties:{descriptor_revision:{type:"string"},eligible_population:{type:"string"}},required:["descriptor_revision","eligible_population"],type:"object"},gg={properties:{censored:{format:"uint64",minimum:0,type:"integer"},completed:{format:"uint64",minimum:0,type:"integer"},eligible:{description:"Exact denominator cardinality. `None` means the denominator is unknown.",format:"uint64",minimum:0,type:["integer","null"]},excluded:{format:"uint64",minimum:0,type:"integer"},observed:{format:"uint64",minimum:0,type:"integer"},state:{$ref:"#/$defs/CoverageStateV1"},unknown:{format:"uint64",minimum:0,type:"integer"}},required:["observed","completed","censored","unknown","excluded","state"],type:"object"},g_={enum:["measurement","association","calibrated_prediction"],type:"string"},gv={properties:{projector_revision:{type:"string"},source:{$ref:"#/$defs/MetricSourceV1"},source_revision:{type:"string"},watermark:{type:"string"}},required:["source","source_revision","projector_revision","watermark"],type:"object"},gb={enum:["observability_envelope","feedback_observations","provider_usage_observation","savings_ledger"],type:"string"},g$={properties:{baseline_watermark:{type:["string","null"]},delta:{format:"double",type:["number","null"]},horizon:{$ref:"#/$defs/ObservabilityHorizonV1"}},required:["horizon"],type:"object"},gS={properties:{lower:{format:"double",type:["number","null"]},reason:{type:["string","null"]},upper:{format:"double",type:["number","null"]}},type:"object"},gk={properties:{calibration:{anyOf:[{$ref:"#/$defs/MetricCalibrationV1"},{type:"null"}]},cohort:{$ref:"#/$defs/MetricCohortV1"},coverage:{$ref:"#/$defs/MetricCoverageV1"},denominator:{type:"string"},denominator_value:{format:"uint64",minimum:0,type:["integer","null"]},descriptor_revision:{type:"string"},evidence_class:{$ref:"#/$defs/MetricEvidenceClassV1"},metric:{type:"string"},provenance:{$ref:"#/$defs/MetricProvenanceV1"},temporal:{$ref:"#/$defs/MetricTemporalV1"},unavailable_reason:{type:["string","null"]},uncertainty:{$ref:"#/$defs/MetricUncertaintyV1"},unit:{type:"string"},value:{description:"Aggregate value. It is absent whenever its denominator or coverage is\ninsufficient; observed lower bounds remain available in `coverage`.",format:"double",type:["number","null"]}},required:["descriptor_revision","metric","unit","denominator","coverage","evidence_class","provenance","cohort","temporal","uncertainty"],type:"object"},gw={additionalProperties:!1,description:"A file that historically changes with `partner_of` but is missing from the\nchange set under review, e.g. a migration beside its schema.",properties:{co_changes:{description:"Commits that changed both `partner_of` and `file`.",format:"uint64",minimum:0,type:"integer"},file:{type:"string"},partner_of:{type:"string"},partner_of_changes:{description:"Commits that changed `partner_of`.",format:"uint64",minimum:0,type:"integer"}},required:["file","partner_of","co_changes","partner_of_changes"],type:"object"},gR={additionalProperties:!1,description:"Frozen continuation identity shared by all participating roots.",properties:{digest:{$ref:"#/$defs/ManifestDigest"},next_page:{format:"uint64",minimum:1,type:"integer"},order_digest:{$ref:"#/$defs/ManifestDigest"},query_digest:{$ref:"#/$defs/ManifestDigest"},root_cursors:{items:{$ref:"#/$defs/RootScopeOutcomeV1_for_Nullable_string"},type:"array"},root_generations:{items:{$ref:"#/$defs/RootScopeOutcomeV1_for_Nullable_RootGenerationV1"},type:"array"},scope_set_digest:{$ref:"#/$defs/ManifestDigest"}},required:["scope_set_digest","root_generations","root_cursors","query_digest","order_digest","next_page","digest"],type:"object"},gP={description:"Strongly typed canonical identity: `NativeIntegrationApprovalId`.",type:"string"},gV={description:"Explicit direction of one integration. Stack meaning is never inferred.",enum:["propagate_dependency_to_dependent","land_dependent_into_dependency","integrate_independent_branch"],type:"string"},gq={description:"Truthful preview classification. Only `MechanicalIntegrationEligible`\ncarries apply-eligible evidence.",oneOf:[{properties:{detail:{$ref:"#/$defs/MechanicalIntegrationModeV1"},state:{const:"mechanical_integration_eligible",type:"string"}},required:["state","detail"],type:"object"},{properties:{state:{const:"already_integrated",type:"string"}},required:["state"],type:"object"},{properties:{detail:{properties:{conflict_digest:{$ref:"#/$defs/ManifestDigest"}},required:["conflict_digest"],type:"object"},state:{const:"native_conflict",type:"string"}},required:["state","detail"],type:"object"},{properties:{detail:{properties:{evidence_digest:{$ref:"#/$defs/ManifestDigest"}},required:["evidence_digest"],type:"object"},state:{const:"semantic_review_required",type:"string"}},required:["state","detail"],type:"object"},{properties:{detail:{properties:{reason:{$ref:"#/$defs/NativeIntegrationUnavailabilityV1"}},required:["reason"],type:"object"},state:{const:"partial",type:"string"}},required:["state","detail"],type:"object"},{properties:{detail:{properties:{reason:{$ref:"#/$defs/NativeIntegrationUnavailabilityV1"}},required:["reason"],type:"object"},state:{const:"unavailable",type:"string"}},required:["state","detail"],type:"object"}]},gI={description:"Strongly typed canonical identity: `NativeIntegrationPreviewId`.",type:"string"},gx={additionalProperties:!1,description:"Canonical stack-snapshot proof returned by `stack_snapshot` and consumed\nverbatim by preflight.",properties:{authorized_scope_set_digest:{$ref:"#/$defs/ManifestDigest"},authorized_scope_set_id:{$ref:"#/$defs/ScopeSetId"},authorized_scope_set_revision:{$ref:"#/$defs/ScopeSetRevision"},destination:{$ref:"#/$defs/ResolvedScope"},grant_digest:{$ref:"#/$defs/ManifestDigest"},inventory_epoch:{$ref:"#/$defs/WorktreeInventoryEpoch"},inventory_snapshot_id:{$ref:"#/$defs/WorktreeInventorySnapshotId"},policy_digest:{$ref:"#/$defs/ManifestDigest"},selection:{$ref:"#/$defs/NativeIntegrationSelectionBindingV1"},source:{$ref:"#/$defs/ResolvedScope"}},required:["source","destination","authorized_scope_set_id","authorized_scope_set_revision","authorized_scope_set_digest","inventory_snapshot_id","inventory_epoch","selection","grant_digest","policy_digest"],type:"object"},gj={description:"Canonically sealed selection passed to the topology authority.\n\n`stack_snapshot` requests carry declaration content; its boundary seals\nthat declaration into this proof, and preflight accepts the proof verbatim.\nThe topology authority never discovers roots or edges.",oneOf:[{properties:{binding:{properties:{declared_revision:{$ref:"#/$defs/BranchStackRevisionV1"},destination_node_id:{$ref:"#/$defs/StackNodeId"},direction:{$ref:"#/$defs/NativeIntegrationDirectionV1"},revision_digest:{$ref:"#/$defs/ManifestDigest"},revision_id:{$ref:"#/$defs/BranchStackRevisionId"},source_node_id:{$ref:"#/$defs/StackNodeId"},stack_id:{$ref:"#/$defs/BranchStackId"}},required:["stack_id","revision_id","revision_digest","declared_revision","source_node_id","destination_node_id","direction"],type:"object"},kind:{const:"declared_stack_edge",type:"string"}},required:["kind","binding"],type:"object"},{properties:{binding:{properties:{destination_ref:{$ref:"#/$defs/RefId"},proposal_digest:{$ref:"#/$defs/ManifestDigest"},source_ref:{$ref:"#/$defs/RefId"}},required:["proposal_digest","source_ref","destination_ref"],type:"object"},kind:{const:"independent_branch",type:"string"}},required:["kind","binding"],type:"object"}]},gC={description:"The only truthful terminal outcomes after recovery.",enum:["committed","aborted_no_change","rolled_back","needs_inspection"],type:"string"},gT={description:"Strongly typed canonical identity: `NativeIntegrationTransactionId`.",type:"string"},gO={description:"Why a preflight cannot authorize apply.",enum:["partial_evidence","stale_scope","denied","native_state_unavailable","reset_required","durability_uncertain","unsupported_hooks","signing_required","destination_occupied"],type:"string"},gE={description:"A target selected by exact registered identity. Repository inventory names\none repository; cleanup names one worktree within that repository.",oneOf:[{properties:{kind:{const:"repository",type:"string"},project_id:{$ref:"#/$defs/ProjectId"},repository_id:{$ref:"#/$defs/RepositoryId"}},required:["kind","project_id","repository_id"],type:"object"},{properties:{kind:{const:"worktree",type:"string"},project_id:{$ref:"#/$defs/ProjectId"},repository_id:{$ref:"#/$defs/RepositoryId"},worktree_id:{$ref:"#/$defs/WorktreeId"}},required:["kind","project_id","repository_id","worktree_id"],type:"object"}]},gA={additionalProperties:!1,properties:{body:{format:"uint64",minimum:0,type:"integer"},full_file:{format:"uint64",minimum:0,type:"integer"}},required:["body","full_file"],type:"object"},gM={properties:{since_micros:{format:"int64",type:"integer"},until_micros:{format:"int64",type:"integer"}},required:["since_micros","until_micros"],type:"object"},gW={additionalProperties:!1,description:"Stable logical identity of one provider observation source.\n\nThe session identity is provider-native evidence. The physical file identity\nis represented separately by [`ObservationSourceGenerationV1`].",properties:{provider:{$ref:"#/$defs/ProviderId"},session_id:{$ref:"#/$defs/SessionId"},source_key:{anyOf:[{$ref:"#/$defs/SessionId"},{type:"null"}]}},required:["provider","session_id"],type:"object"},gN={properties:{analytics_mode:{$ref:"#/$defs/AnalyticsModeReadModelV1"},authorized_scope_ref:{type:"string"},comparison:{$ref:"#/$defs/PerformanceComparisonReadModelV1"},current:{type:"boolean"},horizon:{$ref:"#/$defs/ObservabilityHorizonV1"},metrics:{items:{$ref:"#/$defs/MetricValueV1"},type:"array"},observed_at_micros:{format:"int64",type:"integer"},rejected_arguments:{$ref:"#/$defs/RejectedArgumentAnalyticsV1"},watermark:{type:"string"}},required:["authorized_scope_ref","horizon","watermark","observed_at_micros","current","metrics","analytics_mode","comparison","rejected_arguments"],type:"object"},gz={additionalProperties:!1,description:"Structured occurrence provenance retained through fusion. Fusion\npreserves each exact `(source_occurrence_id, retriever_evidence_anchor)`\npair; parallel unassociated provenance vectors are forbidden.",properties:{evidence_role:{$ref:"#/$defs/EvidenceRole"},file_occurrence_id:{anyOf:[{$ref:"#/$defs/FileOccurrenceId"},{type:"null"}]},freshness:{$ref:"#/$defs/SourceFreshness"},logical_copy_cluster_id:{anyOf:[{$ref:"#/$defs/LogicalCopyClusterId"},{type:"null"}]},logical_copy_evidence_anchor:{anyOf:[{$ref:"#/$defs/RetrievalAnchorId"},{type:"null"}]},repository_id:{anyOf:[{$ref:"#/$defs/RepositoryId"},{type:"null"}]},retriever_evidence_anchor:{$ref:"#/$defs/RetrievalAnchorId"},session_or_thread_id:{anyOf:[{$ref:"#/$defs/SessionOrThreadId"},{type:"null"}]},source_namespace:{$ref:"#/$defs/SourceNamespace"},source_occurrence_id:{$ref:"#/$defs/SourceOccurrenceId"}},required:["source_occurrence_id","retriever_evidence_anchor","source_namespace","evidence_role","freshness"],type:"object"},gD={additionalProperties:!1,description:"Bounded work accounting supplied by an owning port or transaction.",properties:{bytes_consumed:{format:"uint64",minimum:0,type:"integer"},elapsed_micros:{format:"uint64",minimum:0,type:"integer"},units_consumed:{format:"uint64",minimum:0,type:"integer"}},required:["units_consumed","bytes_consumed","elapsed_micros"],type:"object"},gF={additionalProperties:!1,description:"Canonical operation evidence. An admitted failure remains represented here\nrather than being replaced by a transport exception.",properties:{budget:{$ref:"#/$defs/OperationBudgetUsage"},cancellation:{anyOf:[{$ref:"#/$defs/CancellationObservation"},{type:"null"}]},effective_deadline:{$ref:"#/$defs/Deadline"},ended_at:{$ref:"#/$defs/UtcMicros"},started_at:{$ref:"#/$defs/UtcMicros"},termination:{$ref:"#/$defs/OperationTermination"}},required:["started_at","ended_at","effective_deadline","budget","termination"],type:"object"},gL={description:"Terminal state after an operation has been admitted.",enum:["completed","cancelled","timed_out","failed","unavailable","partial","effect_unknown"],type:"string"},gU={additionalProperties:!1,description:"Bounded opaque page request. Resume authorization occurs before an adapter\ndecodes or hydrates the cursor.",properties:{cursor:{description:"Opaque resume token. The identifier type is deliberately absent from the\ngenerated schema surface, so the public wire form is its bounded string.",type:["string","null"]},page_size:{format:"uint32",minimum:0,type:"integer"}},required:["page_size"],type:"object"},gH={properties:{baseline_build:{type:["string","null"]},candidate_build:{type:["string","null"]},configuration:{type:["string","null"]},corpus:{type:["string","null"]},coverage:{$ref:"#/$defs/MetricCoverageV1"},disposition:{$ref:"#/$defs/ComparisonDispositionV1"},eligible_outcomes:{format:"uint64",minimum:0,type:["integer","null"]},environment:{type:["string","null"]},oracle:{type:["string","null"]},paired_outcomes:{format:"uint64",minimum:0,type:["integer","null"]},platform:{type:["string","null"]},regression_observed:{type:["boolean","null"]},rollback_profile:{type:["string","null"]},unavailable_reason:{type:["string","null"]},workload:{type:["string","null"]}},required:["disposition","coverage"],type:"object"},gG={description:"Whether the served code generation is known current at serve time.",enum:["fresh","possibly_stale"],type:"string"},gB={additionalProperties:!1,description:"The indexing state behind a `possibly_stale` verdict: the served\ngeneration, the scheduler's latest sealed generation, its staleness-ladder\nstate, and the lanes that answered from an older generation. `summary` is\nthe one-line rendering agents read.",properties:{latest_generation:{type:["string","null"]},parked:{anyOf:[{$ref:"#/$defs/CodeIndexConvergenceParkedV1"},{type:"null"}],description:"The park holding convergence until the operator applies its remedy.\nNo wake retries it, so repeating the request cannot change the answer."},reason:{type:["string","null"]},rebuild_in_flight:{type:["boolean","null"]},served_generation:{type:["string","null"]},stale_lanes:{items:{type:"string"},type:"array"},staleness_state:{anyOf:[{$ref:"#/$defs/CodeIndexStalenessStateV1"},{type:"null"}]},summary:{type:"string"}},required:["summary"],type:"object"},gK={enum:["complete"],type:"string"},gJ={additionalProperties:!1,properties:{freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},message:{type:"string"},node_id:{type:"string"},reason_code:{type:"string"},status:{type:"string"},suggestions:{description:"Nearest served symbols by edit distance to the requested id, by id,\nsimple name, or qualified name.",items:{$ref:"#/$defs/PrimitiveSymbolLocationV1"},type:"array"}},required:["status","reason_code","node_id","message"],type:"object"},gZ={enum:["full","partial"],type:"string"},gQ={additionalProperties:!1,description:"Freshness verdict carried by every search and context response. `indexing`\nis present exactly when the state is `possibly_stale`.",properties:{indexing:{anyOf:[{$ref:"#/$defs/PrimitiveIndexingStateV1"},{type:"null"}]},state:{$ref:"#/$defs/PrimitiveFreshnessStateV1"}},required:["state"],type:"object"},gX={additionalProperties:!1,properties:{language:{type:["string","null"]},provider:{type:["string","null"]},reason:{type:"string"}},required:["reason"],type:"object"},gY={additionalProperties:!1,properties:{end_line:{format:"uint32",minimum:0,type:"integer"},file:{type:"string"},kind:{type:"string"},name:{type:"string"},node_id:{type:"string"},qualified_name:{type:"string"},start_line:{format:"uint32",minimum:0,type:"integer"},unavailable_fields:{items:{type:"string"},type:"array"}},required:["node_id","name","qualified_name","kind","file","start_line","end_line","unavailable_fields"],type:"object"},g1={additionalProperties:!1,properties:{detail:{type:"string"},reason_code:{type:"string"},retryable:{type:"boolean"},status:{$ref:"#/$defs/PrimitiveUnavailableStatusV1"}},required:["status","reason_code","retryable","detail"],type:"object"},g0={enum:["unavailable"],type:"string"},g2={description:"Strongly typed canonical identity: `ProjectId`.",type:"string"},g4={properties:{alias_count:{format:"uint",minimum:0,type:"integer"},artifact_count:{format:"uint",minimum:0,type:"integer"},branches:{items:{type:"string"},type:"array"},canonical_root:{type:"string"},default_branch:{description:"Repository default branch recorded at registration.",type:["string","null"]},head_branch:{description:"Branch the checkout's HEAD names now; `None` when HEAD is detached or\nno checkout of this project could be read.",type:["string","null"]},is_active:{type:["boolean","null"]},kind:{type:"string"},label:{type:"string"},last_seen_at:{format:"int64",type:"integer"},project_id:{type:"string"},project_root:{type:"string"},store_count:{format:"uint",minimum:0,type:"integer"}},required:["project_id","label","project_root","canonical_root","kind","branches","store_count","artifact_count","alias_count","last_seen_at"],type:"object"},g6={properties:{project_count:{format:"uint",minimum:0,type:"integer"},repo_count:{format:"uint",minimum:0,type:"integer"},truncated:{type:"boolean"}},required:["project_count","repo_count","truncated"],type:"object"},g3={properties:{branches:{items:{type:"string"},type:"array"},git_common_dir:{type:["string","null"]},label:{type:"string"},project_count:{format:"uint",minimum:0,type:"integer"},projects:{items:{$ref:"#/$defs/ProjectRegistryEntry"},type:"array"}},required:["label","project_count","branches","projects"],type:"object"},g9={description:"Strongly typed canonical identity: `ProjectionGenerationId`.",type:"string"},g5={description:"Strongly typed canonical identity: `ProposalId`.",type:"string"},g8={enum:["reject","require_human_approval_and_independent_review"],type:"string"},g7={additionalProperties:!1,properties:{disposition:{$ref:"#/$defs/ProtectedRefDispositionV1"},selector:{$ref:"#/$defs/ProtectedRefSelectorV1"}},required:["selector","disposition"],type:"object"},_e={oneOf:[{properties:{kind:{const:"native_default_branch",type:"string"}},required:["kind"],type:"object"},{properties:{kind:{const:"exact",type:"string"},value:{$ref:"#/$defs/CanonicalGitRefNameV1"}},required:["kind","value"],type:"object"},{properties:{kind:{const:"prefix",type:"string"},value:{$ref:"#/$defs/CanonicalGitRefPrefix"}},required:["kind","value"],type:"object"}]},_t={description:"Strongly typed canonical identity: `ProvenanceId`.",type:"string"},_r={description:"Complete provider states remain distinct. Empty findings are clean only\nwhen every requested provider completed with complete supported coverage.",enum:["supported_completed_complete","unsupported","absent","indexing","stale","cancelled","timed_out","failed","partial","unavailable"],type:"string"},_i={description:"Strongly typed canonical identity: `ProviderId`.",type:"string"},_o={description:"One provider/model cohort in the Costs latency read model.\n\nThe percentile cells are ordinary canonical metrics so every value carries\nits exact unit, horizon, denominator, coverage/censoring, and projector\nprovenance. Identity provenance is kept separately because latency is\nmeasured by `OperationResourceObservedV1`, while provider/model identity\nmay be joined from an exact `ProviderUsageObservationV1` request/session.",properties:{first_progress:{$ref:"#/$defs/LatencyDistributionReadModelV1"},identity_provenance:{$ref:"#/$defs/MetricProvenanceV1"},identity_unavailable_reason:{type:["string","null"]},model:{type:["string","null"]},provider:{type:["string","null"]},queue:{$ref:"#/$defs/LatencyDistributionReadModelV1"},service:{$ref:"#/$defs/LatencyDistributionReadModelV1"},start:{$ref:"#/$defs/LatencyDistributionReadModelV1"},terminal:{$ref:"#/$defs/LatencyDistributionReadModelV1"}},required:["identity_provenance","queue","start","first_progress","service","terminal"],type:"object"},_n={properties:{canonical_root:{type:"string"},created_at:{format:"int64",type:"integer"},default_branch:{description:"Repository default branch recorded at registration.",type:["string","null"]},display_root:{type:"string"},git_common_dir:{type:["string","null"]},head_branch:{description:"Branch the checkout's HEAD names now; `None` when HEAD is detached or\nno checkout of this project could be read.",type:["string","null"]},is_active:{type:["boolean","null"]},label:{type:"string"},last_seen_at:{format:"int64",type:"integer"},project_id:{type:"string"},project_root:{type:"string"}},required:["project_id","label","project_root","display_root","canonical_root","created_at","last_seen_at"],type:"object"},_a={enum:["owner_receipt","locally_measured","estimated","unknown"],type:"string"},_s={description:"Strongly typed canonical identity: `QueryCollectionId`.",type:"string"},_d={description:"Which endpoint of each counted edge the rank report ranks.",enum:["incoming","outgoing"],type:"string"},_c={description:"Relationship the rank report counts.",enum:["implements","extends","calls","uses","contains","annotates","derives_macro","type_of","returns","receives"],type:"string"},_l={additionalProperties:!1,description:"One recorded ranking decision. Explanations are rendered from this\nprovenance, never reconstructed from a final scalar score.",properties:{detail:{type:"string"},evidence_anchor:{anyOf:[{$ref:"#/$defs/RetrievalAnchorId"},{type:"null"}]},kind:{$ref:"#/$defs/RankingDecisionKind"},policy_anchor:{anyOf:[{$ref:"#/$defs/RetrievalAnchorId"},{type:"null"}]},retriever:{anyOf:[{$ref:"#/$defs/RetrieverKind"},{type:"null"}]}},required:["kind","detail"],type:"object"},_p={description:"The decision kinds the pipeline must record.",enum:["exact_tier_admission","same_source_duplicate_collapse","logical_copy_representative_selection","contradiction_preservation","diversity_cap","comparator_provenance","fallback"],type:"string"},_u={description:"Strongly typed canonical identity: `RefId`.",type:"string"},_m={additionalProperties:!1,description:"Exact registered root locator retained with an authorized scope.\n\n`canonical_root` is routing evidence for the already-resolved\n[`ResolvedScope`]. It cannot replace or manufacture that scope identity.",properties:{canonical_root:{type:"string"},profile:{$ref:"#/$defs/SharedProfileStoreLocatorV1"},project_id:{$ref:"#/$defs/ProjectId"}},required:["project_id","profile","canonical_root"],type:"object"},_f={description:"Frequency and rate projection for dispatcher rejected-argument observations.\n\nCounts may be known while `rejection_rate` stays absent: Plan 26 forbids\nfabricating a rate when the eligible-attempt denominator is unknown.",properties:{coverage:{$ref:"#/$defs/MetricCoverageV1"},eligible_attempts:{format:"uint64",minimum:0,type:["integer","null"]},groups:{items:{$ref:"#/$defs/RejectedArgumentGroupV1"},type:"array"},projector_revision:{type:"string"},redacted_name_count:{format:"uint64",minimum:0,type:"integer"},rejected_total:{format:"uint64",minimum:0,type:["integer","null"]},rejection_rate:{format:"double",type:["number","null"]},unavailable_reason:{type:["string","null"]},watermark:{type:"string"}},required:["coverage","projector_revision","watermark","redacted_name_count","groups"],type:"object"},_h={description:"Closed error class for a rejected surface argument.",enum:["missing","invalid_shape","out_of_bounds","unsupported","unauthorized","stale","unknown"],type:"string"},_y={description:"One surface \xd7 operation \xd7 argument \xd7 error-class cell in the rejected-argument view.",properties:{argument:{$ref:"#/$defs/RejectedArgumentNameV1"},count:{format:"uint64",minimum:0,type:"integer"},error_class:{$ref:"#/$defs/RejectedArgumentErrorClassV1"},operation:{type:"string"},rate:{description:"Eligible-attempt rate for this cell. Absent when the attempt\ndenominator or coverage is insufficient.",format:"double",type:["number","null"]},surface:{$ref:"#/$defs/RejectedArgumentSurfaceV1"}},required:["surface","operation","argument","error_class","count"],type:"object"},_g={description:"Normalized rejected-argument name. Raw flags, values, and tokens never\nenter this vocabulary.",enum:["request_body","pagination","request_handle","operation","lifecycle","unknown"],type:"string"},__={description:"Transport that rejected a surface argument. Unknown preserves missing\nattribution instead of inventing cli/mcp/http.",enum:["cli","mcp","http","unknown"],type:"string"},_v={description:"Strongly typed canonical identity: `RepositoryId`.",type:"string"},_b={oneOf:[{properties:{kind:{const:"all_authorized",type:"string"}},required:["kind"],type:"object"},{properties:{kind:{const:"allowlist",type:"string"},repositories:{items:{$ref:"#/$defs/RepositoryId"},type:"array",uniqueItems:!0}},required:["kind","repositories"],type:"object"}]},_$={enum:["successful_terminal"],type:"string"},_S={additionalProperties:!1,properties:{capability_id:{$ref:"#/$defs/CapabilityId"},expectation:{$ref:"#/$defs/RequiredCheckExpectationV1"},maximum_age_seconds:{format:"uint32",minimum:1,type:"integer"}},required:["capability_id","expectation","maximum_age_seconds"],type:"object"},_k={additionalProperties:!1,description:"The resolved configuration scope is one exact project/repository/worktree root.\n\nPaths, CWDs, labels, and mutable branch spellings are deliberately absent.",properties:{project_id:{$ref:"#/$defs/ProjectId"},reference:{anyOf:[{$ref:"#/$defs/RefId"},{type:"null"}]},repository_id:{$ref:"#/$defs/RepositoryId"},scope_digest:{$ref:"#/$defs/ManifestDigest"},worktree_id:{$ref:"#/$defs/WorktreeId"}},required:["project_id","repository_id","worktree_id","scope_digest"],type:"object"},_w={description:"Bounded output projection chosen by a concrete use case.",enum:["summary","evidence","references_only"],type:"string"},_R={additionalProperties:!1,properties:{code:{type:"string"},kind:{type:["string","null"]},maximum:{format:"uint",minimum:0,type:["integer","null"]},message:{type:"string"},observed:{format:"uint",minimum:0,type:["integer","null"]},reason:{type:["string","null"]},retryable:{type:["boolean","null"]}},required:["code","message"],type:"object"},_P={enum:["aborted","budget_exhausted","busy","cancelled","complete","complete_zero","cursor_manifest_limit_exceeded","deadline_exceeded","deleted","denied","error","failed","joined","locked","not_found","ok","partial","recorded","redacted","running","stale","started","unavailable","unsupported_filter","wrong_scope"],type:"string"},_V={anyOf:[{format:"uint64",minimum:0,type:"integer"},{type:"string"}],description:"The temporal filter intentionally retains the established integer-or-text\nwire form (Unix timestamps, RFC3339, and relative expressions)."},_q={description:"Strongly typed canonical identity: `RetrievalAnchorId`.",type:"string"},_I={description:"Stable semantic ordering; adapters may not replace it with transport order.",enum:["relevance","source_position","temporal_descending","stable_identity"],type:"string"},_x={additionalProperties:!1,properties:{order:{$ref:"#/$defs/RetrievalOrder"},page:{$ref:"#/$defs/PageRequest"},projection:{$ref:"#/$defs/ResultProjection"},temporal:{$ref:"#/$defs/TemporalModeV1"}},required:["temporal","page","projection","order"],type:"object"},_j={additionalProperties:!1,properties:{backlog:{format:"uint",minimum:0,type:"integer"},blocker:{type:["string","null"]},last_progress_at_unix_micros:{format:"int64",type:["integer","null"]},retry_class:{type:["string","null"]}},required:["backlog"],type:"object"},_C={description:"Runtime-backed retrieval lanes. Each lane is independently testable,\ndisableable, budgeted, and attributable; one lane is never an alias over\nanother.",enum:["exact_literal","lexical","graph","temporal","task_session","diagnostic"],type:"string"},_T={oneOf:[{properties:{kind:{const:"none",type:"string"}},required:["kind"],type:"object"},{properties:{count:{format:"uint16",maximum:65535,minimum:1,type:"integer"},kind:{const:"independent_review_count",type:"string"}},required:["kind","count"],type:"object"},{properties:{kind:{const:"code_owner_and_independent_review",type:"string"}},required:["kind"],type:"object"}]},_O={enum:["no_review","independent_review","standard_pull_requests","git_hub_stacked_pull_requests"],type:"string"},_E={additionalProperties:!1,properties:{allowed:{items:{$ref:"#/$defs/ReviewTopologyKindV1"},type:"array",uniqueItems:!0},github_stacked_prs:{$ref:"#/$defs/GitHubStackedPullRequestPolicyV1"}},required:["allowed","github_stacked_prs"],type:"object"},_A={additionalProperties:!1,description:"Immutable collection and stack revisions for one exact resolved root.",properties:{collection_revision:{$ref:"#/$defs/ManifestDigest"},generation_digest:{$ref:"#/$defs/ManifestDigest"},scope_digest:{$ref:"#/$defs/ManifestDigest"},stack_revision:{$ref:"#/$defs/ManifestDigest"}},required:["scope_digest","collection_revision","stack_revision","generation_digest"],type:"object"},_M={additionalProperties:!1,description:"One typed outcome pinned to the digest of an exact resolved root.",properties:{outcome:{$ref:"#/$defs/ScopeOutcome_for_Nullable_RootGenerationV1"},scope_digest:{$ref:"#/$defs/ManifestDigest"}},required:["scope_digest","outcome"],type:"object"},_W={additionalProperties:!1,description:"One typed outcome pinned to the digest of an exact resolved root.",properties:{outcome:{$ref:"#/$defs/ScopeOutcome_for_Nullable_string"},scope_digest:{$ref:"#/$defs/ManifestDigest"}},required:["scope_digest","outcome"],type:"object"},_N={enum:["allow","deny"],type:"string"},_z={description:"Strongly typed canonical identity: `RunId`.",type:"string"},_D={additionalProperties:!1,properties:{degraded_row:{type:["string","null"]},progress:{anyOf:[{$ref:"#/$defs/SchemaConvergenceProgressV1"},{type:"null"}]},stage:{$ref:"#/$defs/SchemaConvergenceStageV1"},started_at_micros:{format:"int64",type:"integer"},state:{$ref:"#/$defs/SchemaConvergenceStateV1"},store:{type:"string"}},required:["store","stage","state","started_at_micros"],type:"object"},_F={oneOf:[{additionalProperties:!1,properties:{done:{format:"uint64",minimum:0,type:"integer"},remaining:{format:"uint64",minimum:0,type:"integer"},unit:{const:"rows",type:"string"}},required:["unit","done","remaining"],type:"object"},{additionalProperties:!1,properties:{done:{format:"uint64",minimum:0,type:"integer"},remaining:{format:"uint64",minimum:0,type:"integer"},unit:{const:"pages",type:"string"}},required:["unit","done","remaining"],type:"object"}]},_L={enum:["registered_schema"],type:"string"},_U={enum:["pending_schema_migration","released_shape_convergence_in_progress","degraded","completed"],type:"string"},_H={additionalProperties:!1,description:"Restrictive policy input. An allow never grants capabilities absent from\nthe independently authorized capability set passed to the resolver.",properties:{authority:{$ref:"#/$defs/AuthorityRef"},capabilities:{items:{$ref:"#/$defs/CapabilityId"},type:"array",uniqueItems:!0},effect:{$ref:"#/$defs/RuleEffect"},expires_at:{anyOf:[{$ref:"#/$defs/UtcMicros"},{type:"null"}]},rule_id:{$ref:"#/$defs/AccessRuleId"},subject:{$ref:"#/$defs/ScopeAccessSubjectV1"}},required:["rule_id","subject","authority","capabilities","effect"],type:"object"},_G={additionalProperties:!1,description:"Typed rule selectors. Unset dimensions match all values at that dimension,\nbut at least one dimension must be constrained. Free-form paths, labels,\ncollection names, and branch names are deliberately absent.",properties:{actor:{anyOf:[{$ref:"#/$defs/ActorId"},{type:"null"}]},operation:{anyOf:[{$ref:"#/$defs/ScopeControlOperationV1"},{type:"null"}]},source_kind:{anyOf:[{$ref:"#/$defs/SourceKindV1"},{type:"null"}]}},type:"object"},_B={enum:["read","source_bind","source_rebind","source_unbind","access_rule_upsert","access_rule_remove","replace_topology_policy","rollback"],type:"string"},_K={description:"Truthful outcome for one authorized root or an aggregate over roots.\n\n`Denied` and `Unavailable` carry no value and therefore cannot be confused\nwith a successful empty result.",oneOf:[{properties:{outcome:{const:"exact",type:"string"},value:{anyOf:[{$ref:"#/$defs/RootGenerationV1"},{type:"null"}]}},required:["outcome","value"],type:"object"},{properties:{outcome:{const:"partial",type:"string"},value:{properties:{reason:{$ref:"#/$defs/ScopePartialReasonV1"},value:{anyOf:[{$ref:"#/$defs/RootGenerationV1"},{type:"null"}]}},required:["reason"],type:"object"}},required:["outcome","value"],type:"object"},{properties:{outcome:{const:"denied",type:"string"}},required:["outcome"],type:"object"},{properties:{outcome:{const:"unavailable",type:"string"},value:{properties:{reason:{$ref:"#/$defs/ScopeUnavailableReasonV1"}},required:["reason"],type:"object"}},required:["outcome","value"],type:"object"}]},_J={description:"Truthful outcome for one authorized root or an aggregate over roots.\n\n`Denied` and `Unavailable` carry no value and therefore cannot be confused\nwith a successful empty result.",oneOf:[{properties:{outcome:{const:"exact",type:"string"},value:{type:["string","null"]}},required:["outcome","value"],type:"object"},{properties:{outcome:{const:"partial",type:"string"},value:{properties:{reason:{$ref:"#/$defs/ScopePartialReasonV1"},value:{type:["string","null"]}},required:["reason"],type:"object"}},required:["outcome","value"],type:"object"},{properties:{outcome:{const:"denied",type:"string"}},required:["outcome"],type:"object"},{properties:{outcome:{const:"unavailable",type:"string"},value:{properties:{reason:{$ref:"#/$defs/ScopeUnavailableReasonV1"}},required:["reason"],type:"object"}},required:["outcome","value"],type:"object"}]},_Z={description:"Typed explanation for a root that returned usable but incomplete data.",enum:["incomplete","stale","budget_exceeded","root_denied","root_unavailable"],type:"string"},_Q={description:"Stable identity of one authorized scope-set record.",type:"string"},_X={description:"Monotonic optimistic-concurrency revision of one scope set.",format:"uint64",minimum:1,type:"integer"},_Y={additionalProperties:!1,description:"A source-to-authority binding. It stores only the source kind, a redacted\nlocator digest, and the pre-resolved authority reference.",properties:{authority:{$ref:"#/$defs/AuthorityRef"},binding_id:{$ref:"#/$defs/SourceBindingId"},source_kind:{$ref:"#/$defs/SourceKindV1"},source_locator_digest:{$ref:"#/$defs/LocatorDigest"}},required:["binding_id","source_kind","source_locator_digest","authority"],type:"object"},_1={description:"Typed explanation for a root that could not return usable data.",enum:["authority_unavailable","root_missing","store_unavailable"],type:"string"},_0={description:"Strongly typed canonical identity: `ScoreDomainId`.",type:"string"},_2={additionalProperties:!1,description:"Reference-only filesystem locator. The raw path is sealed outside this\ncontract; only the privacy-bound locator digest and sealed-value digest are\nrepresentable here.",properties:{locator_digest:{$ref:"#/$defs/LocatorDigest"},sealed_value_digest:{$ref:"#/$defs/ManifestDigest"}},required:["locator_digest","sealed_value_digest"],type:"object"},_4={additionalProperties:!1,properties:{knowledge:{$ref:"#/$defs/ClosedUtcIntervalV1"},valid:{$ref:"#/$defs/ValidCoverageIntervalV1"}},required:["knowledge","valid"],type:"object"},_6={oneOf:[{properties:{kind:{const:"caught_up",type:"string"}},required:["kind"],type:"object"},{properties:{kind:{const:"projection_behind_source",type:"string"},lag:{format:"uint64",minimum:0,type:"integer"}},required:["kind","lag"],type:"object"},{properties:{kind:{const:"source_behind_target",type:"string"},lag:{format:"uint64",minimum:0,type:"integer"}},required:["kind","lag"],type:"object"},{properties:{kind:{const:"projection_and_source_behind",type:"string"},projection_lag:{format:"uint64",minimum:0,type:"integer"},source_lag:{format:"uint64",minimum:0,type:"integer"}},required:["kind","projection_lag","source_lag"],type:"object"},{properties:{kind:{const:"locked",type:"string"}},required:["kind"],type:"object"},{properties:{kind:{const:"redacted",type:"string"}},required:["kind"],type:"object"},{properties:{kind:{const:"retention_withheld",type:"string"}},required:["kind"],type:"object"},{properties:{kind:{const:"unavailable",type:"string"}},required:["kind"],type:"object"}]},_3={additionalProperties:!1,properties:{mode:{$ref:"#/$defs/TemporalModeV1"}},required:["mode"],type:"object"},_9={enum:["fresh","stale","partial","locked","redacted","retention_withheld","unavailable"],type:"string"},_5={description:"Strongly typed canonical identity: `SessionId`.",type:"string"},_8={description:"Strongly typed canonical identity: `SessionOrThreadId`.",type:"string"},_7={additionalProperties:!1,properties:{committed_through:{format:"uint64",minimum:0,type:"integer"},observed_through:{format:"uint64",minimum:0,type:"integer"}},required:["observed_through","committed_through"],type:"object"},ve={additionalProperties:!1,properties:{committed_batches:{format:"uint64",minimum:0,type:"integer"},committed_records:{format:"uint64",minimum:0,type:"integer"},coverage:{$ref:"#/$defs/TemporalCoverageV1"},frontier:{$ref:"#/$defs/SessionRefreshFrontierResultV1"},operation_id:{type:"string"},session_id:{type:"string"},source_coverage:{items:{$ref:"#/$defs/SessionSourceCoverageV1"},type:"array"},updated_at:{format:"int64",type:"integer"}},required:["operation_id","session_id","frontier","coverage","committed_batches","committed_records","updated_at"],type:"object"},vt={additionalProperties:!1,properties:{coverage:{$ref:"#/$defs/TemporalCoverageV1"},failure_code:{type:["string","null"]},frontier:{$ref:"#/$defs/SessionRefreshFrontierResultV1"},operation_id:{type:"string"},session_id:{type:"string"},source_coverage:{items:{$ref:"#/$defs/SessionSourceCoverageV1"},type:"array"},state:{$ref:"#/$defs/SessionRefreshTerminalStateResultV1"},terminal_at:{format:"int64",type:"integer"}},required:["operation_id","session_id","frontier","coverage","state","terminal_at"],type:"object"},vr={enum:["complete","failed","cancelled"],type:"string"},vi={description:"Structural budget boundary that rejected a session retrieval request.\nThese causes are non-retryable request corrections; concurrent permit or\nqueue pressure remains a separate capacity-saturation failure.",enum:["request_result_limit","request_hydration_limit","request_context_bytes","request_candidate_bytes","request_record_bytes","request_hydration_bytes","estimator_version_mismatch","execution_work_exhausted","candidate_read_exhausted","record_read_exhausted","kernel_result_limit","participant_manifest_participants","participant_manifest_canonical_bytes","cursor_manifest_limit","hydration_bytes","context_bytes","context_tokens"],type:"string"},vo={additionalProperties:!1,properties:{committed_frontier:{format:"uint64",minimum:0,type:"integer"},covered_intervals:{items:{$ref:"#/$defs/SessionCoverageIntervalV1"},type:"array"},missing_intervals:{items:{$ref:"#/$defs/SessionCoverageIntervalV1"},type:"array"},observed_frontier:{format:"uint64",minimum:0,type:"integer"},reason:{$ref:"#/$defs/SessionCoverageReasonV1"},request:{$ref:"#/$defs/SessionCoverageRequestV1"},source_id:{type:"string"},state:{$ref:"#/$defs/SessionCoverageStateV1"},target_watermark:{format:"uint64",minimum:0,type:"integer"}},required:["source_id","observed_frontier","committed_frontier","target_watermark","request","covered_intervals","missing_intervals","state","reason"],type:"object"},vn={description:"Typed configuration key. Keys are lowercase, dotted product identifiers;\nuntyped host/adapter keys are not representable.",type:"string"},va={additionalProperties:!1,description:"Logical and verified physical identity of the shared Profile shard.\n\nBrain and profile IDs select the shard; the verified store locator binds its\nphysical store. Lease incarnations and authority epochs remain runtime fences.",properties:{brain_id:{$ref:"#/$defs/BrainId"},profile_id:{$ref:"#/$defs/UserProfileId"},store_id:{type:"string"}},required:["brain_id","profile_id","store_id"],type:"object"},vs={additionalProperties:!1,properties:{complete:{type:"boolean"},family_digest:{$ref:"#/$defs/ManifestDigest"},match_class:{$ref:"#/$defs/SimilarMatchClassV1"},member_count:{format:"uint",minimum:0,type:"integer"},members:{items:{$ref:"#/$defs/SimilarOccurrenceV1"},type:"array"},next_cursor:{type:["string","null"]},normalization_revision:{format:"uint16",maximum:65535,minimum:0,type:"integer"},representative_payload_digest:{$ref:"#/$defs/ManifestDigest"}},required:["match_class","normalization_revision","family_digest","representative_payload_digest","member_count","members","complete"],type:"object"},vd={enum:["conservative_exact","rename_normalized_exact"],type:"string"},vc={additionalProperties:!1,properties:{body_span:{$ref:"#/$defs/SourceSpan"},path:{type:"string"},project_id:{$ref:"#/$defs/ProjectId"},repository_id:{$ref:"#/$defs/RepositoryId"},snapshot_digest:{$ref:"#/$defs/ManifestDigest"},source_generation:{$ref:"#/$defs/CodeGenerationId"},symbol_occurrence_id:{$ref:"#/$defs/SymbolOccurrenceId"},worktree_id:{anyOf:[{$ref:"#/$defs/WorktreeId"},{type:"null"}]}},required:["project_id","repository_id","source_generation","snapshot_digest","symbol_occurrence_id","path","body_span"],type:"object"},vl={properties:{evidence:{default:[],items:{type:"string"},type:"array"},improvement:{type:"boolean"},priority:{type:"string"},reason:{type:"string"},recommendation:{type:"string"},skill_id:{type:"string"}},required:["skill_id","improvement","recommendation","reason","priority"],type:"object"},vp={enum:["cursor","codex","claude","agents","opencode","kimi","kiro","hermes"],type:"string"},vu={properties:{evidence:{default:[],items:{type:"string"},type:"array"},reason:{type:"string"},recommendation:{type:"string"},skill_id:{type:"string"},stale:{type:"boolean"}},required:["skill_id","stale","recommendation","reason"],type:"object"},vm={description:"One skill's durable usage counters. The ledger stores one per skill; a\nsummary is the same record merged with the skill's current metadata.",properties:{activated_at:{description:"When the skill last transitioned into the active state; mirrors the\nmanaged skill metadata so outcome scoring works from summaries alone.",format:"int64",type:["integer","null"]},category:{type:["string","null"]},created_by:{type:["string","null"]},first_seen_at:{format:"int64",type:"integer"},imported_analytics_events:{description:"Import keys that already counted toward this skill. They are not a\nstore-wide set: each key names this skill, so another skill must not\nshare the write.",items:{type:"string"},type:"array",uniqueItems:!0},last_activity_at:{format:"int64",type:"integer"},last_patched_at:{format:"int64",type:["integer","null"]},last_used_at:{format:"int64",type:["integer","null"]},last_viewed_at:{format:"int64",type:["integer","null"]},patch_count:{format:"uint64",minimum:0,type:"integer"},pinned:{type:"boolean"},provenance_source:{anyOf:[{$ref:"#/$defs/ManagedSkillSource"},{type:"null"}]},schema_version:{format:"uint32",minimum:0,type:"integer"},skill_id:{type:"string"},state:{anyOf:[{$ref:"#/$defs/ManagedSkillState"},{type:"null"}]},targets:{default:[],items:{type:"string"},type:"array"},title:{type:["string","null"]},use_count:{format:"uint64",minimum:0,type:"integer"},use_count_at_activation:{format:"uint64",minimum:0,type:["integer","null"]},view_count:{format:"uint64",minimum:0,type:"integer"},view_count_at_activation:{description:"View/use totals captured at activation time so activity since activation\nis an exact delta rather than a heuristic.",format:"uint64",minimum:0,type:["integer","null"]}},required:["schema_version","skill_id","pinned","view_count","use_count","patch_count","first_seen_at","last_activity_at"],type:"object"},vf={description:"Strongly typed canonical identity: `SourceBindingId`.",type:"string"},vh={additionalProperties:!1,description:"Source freshness is source- and retriever-specific: there is no global\nage-decay multiplier. Missing, stale, incompatible, and current are\ndistinct states.",properties:{compatibility:{$ref:"#/$defs/FreshnessCompatibilityV1"},generation_lag:{format:"uint64",minimum:0,type:["integer","null"]},observed_at:{$ref:"#/$defs/UtcMicros"},policy_revision:{$ref:"#/$defs/ComponentRevision"},projection_watermark:{format:"uint64",minimum:0,type:["integer","null"]},source_generation:{format:"uint64",minimum:0,type:["integer","null"]},source_instance:{$ref:"#/$defs/SourceInstanceKey"},source_namespace:{$ref:"#/$defs/SourceNamespace"},source_watermark:{format:"uint64",minimum:0,type:["integer","null"]}},required:["source_namespace","source_instance","observed_at","compatibility","policy_revision"],type:"object"},vy={description:"Strongly typed canonical identity: `SourceInstanceKey`.",type:"string"},vg={enum:["claude","codex","cursor","git_hub","hermes","kiro"],type:"string"},v_={description:"Strongly typed canonical identity: `SourceNamespace`.",type:"string"},vv={description:"Strongly typed canonical identity: `SourceOccurrenceId`.",type:"string"},vb={additionalProperties:!1,description:"Byte range inside one sanitized source file. Mutable line numbers are\nnever part of identity.",properties:{end_byte:{format:"uint64",minimum:0,type:"integer"},start_byte:{format:"uint64",minimum:0,type:"integer"}},required:["start_byte","end_byte"],type:"object"},v$={description:"Strongly typed canonical identity: `SourceStoreId`.",type:"string"},vS={description:"Strongly typed canonical identity: `StackDeliveryWatermarkId`.",type:"string"},vk={description:"Strongly typed canonical identity: `StackNodeId`.",type:"string"},vw={description:"Strongly typed canonical identity: `StackSignalId`.",type:"string"},vR={additionalProperties:!1,description:"Exact base/head symbol comparison was unavailable; the git evidence beside\nit is still the answer.",properties:{reason:{type:"string"},retryable:{type:"boolean"},status:{$ref:"#/$defs/GitReadUnavailableV1"}},required:["status","reason","retryable"],type:"object"},vP={additionalProperties:!1,description:"Optional narrowing inside the immutable project/repository/worktree scope\ncarried by [`RequestContext`]. A path prefix never establishes identity or\nauthorization.",properties:{path_prefix:{type:["string","null"]}},type:"object"},vV={description:"Strongly typed canonical identity: `SymbolOccurrenceId`.",type:"string"},vq={additionalProperties:!1,properties:{end_line:{format:"uint32",minimum:0,type:"integer"},file:{type:"string"},is_async:{type:"boolean"},kind:{type:"string"},line:{description:"One-based user-facing line.",format:"uint32",minimum:0,type:"integer"},name:{type:"string"},node_id:{type:"string"},qualified_name:{type:"string"},score:{format:"double",type:["number","null"]},signature:{type:["string","null"]}},required:["node_id","name","qualified_name","kind","file","line","end_line","is_async"],type:"object"},vI={additionalProperties:!1,properties:{depth:{format:"uint32",minimum:0,type:["integer","null"]},dispatch_from:{type:["string","null"]},dispatch_via_trait:{type:"boolean"},edge_kind:{type:"string"},symbol:{$ref:"#/$defs/SymbolPrimitiveRecord"}},required:["symbol","edge_kind","dispatch_via_trait"],type:"object"},vx={additionalProperties:!1,properties:{anchor_id:{$ref:"#/$defs/RetrievalAnchorId"},evidence_digest:{$ref:"#/$defs/ManifestDigest"},link_id:{type:"string"},observed_at:{$ref:"#/$defs/UtcMicros"},revision:{format:"uint64",minimum:0,type:"integer"},task_id:{$ref:"#/$defs/TaskId"}},required:["link_id","revision","task_id","anchor_id","evidence_digest","observed_at"],type:"object"},vj={additionalProperties:!1,properties:{definition_id:{$ref:"#/$defs/WorkflowDefinitionId"},definition_version:{format:"uint64",minimum:1,type:"integer"},from_actor_id:{$ref:"#/$defs/ActorId"},project_id:{$ref:"#/$defs/ProjectId"},repository_id:{$ref:"#/$defs/RepositoryId"},run_id:{$ref:"#/$defs/RunId"},step_id:{$ref:"#/$defs/WorkflowStepId"},task_id:{$ref:"#/$defs/TaskId"},thread_id:{$ref:"#/$defs/ThreadId"},to_actor_id:{$ref:"#/$defs/ActorId"},worktree_id:{$ref:"#/$defs/WorktreeId"}},required:["project_id","repository_id","worktree_id","definition_id","definition_version","step_id","task_id","thread_id","run_id","from_actor_id","to_actor_id"],type:"object"},vC={description:"Strongly typed canonical identity: `TaskId`.",type:"string"},vT={additionalProperties:!1,properties:{hidden:{format:"uint64",minimum:0,type:"integer"},redacted:{format:"uint64",minimum:0,type:"integer"},unknown:{format:"uint64",minimum:0,type:"integer"},visible:{format:"uint64",minimum:0,type:"integer"}},required:["visible","hidden","unknown","redacted"],type:"object"},vO={additionalProperties:!1,properties:{anchor:{type:"string"},summary:{type:"string"}},required:["anchor","summary"],type:"object"},vE={oneOf:[{properties:{state:{const:"fresh",type:"string"}},required:["state"],type:"object"},{properties:{generation_lag:{format:"uint64",minimum:0,type:"integer"},state:{const:"stored",type:"string"}},required:["state","generation_lag"],type:"object"},{properties:{generation_lag:{format:"uint64",minimum:0,type:"integer"},state:{const:"partial",type:"string"}},required:["state","generation_lag"],type:"object"}]},vA={description:"Requested temporal interpretation.",oneOf:[{additionalProperties:!1,properties:{kind:{const:"current",type:"string"}},required:["kind"],type:"object"},{additionalProperties:!1,properties:{cutoff:{$ref:"#/$defs/UtcMicros"},kind:{const:"as_of",type:"string"}},required:["kind","cutoff"],type:"object"},{additionalProperties:!1,properties:{kind:{const:"evolution",type:"string"}},required:["kind"],type:"object"},{additionalProperties:!1,properties:{kind:{const:"forensic",type:"string"}},required:["kind"],type:"object"}]},vM={additionalProperties:!1,properties:{anchor:{type:"string"},rank:{format:"uint32",minimum:0,type:"integer"},reason:{$ref:"#/$defs/HydrationStateResultV1"}},required:["rank","anchor","reason"],type:"object"},vW={additionalProperties:!1,properties:{generation:{format:"uint64",minimum:0,type:"integer"},index:{format:"uint64",minimum:0,type:"integer"},projection:{format:"uint64",minimum:0,type:"integer"},source:{format:"uint64",minimum:0,type:"integer"},summary:{format:"uint64",minimum:0,type:"integer"}},required:["generation","source","projection","index","summary"],type:"object"},vN={description:"Strongly typed canonical identity: `ThreadId`.",type:"string"},vz={additionalProperties:!1,description:"What a token budget did to an answer. `est_tokens` is the kept rows.\n`over_ceiling` means a single row was larger than its section quota and\nwas kept anyway.",properties:{budget_tokens:{format:"uint32",minimum:0,type:"integer"},est_tokens:{format:"uint32",minimum:0,type:"integer"},over_ceiling:{type:"boolean"},sections:{items:{$ref:"#/$defs/TokenBudgetSectionV1"},type:"array"}},required:["budget_tokens","est_tokens","over_ceiling","sections"],type:"object"},vD={additionalProperties:!1,description:"One section a token budget kept or cut.",properties:{section:{type:"string"},shown:{format:"uint32",minimum:0,type:"integer"},total:{format:"uint32",minimum:0,type:"integer"}},required:["section","total","shown"],type:"object"},vF={additionalProperties:!1,properties:{maximum_active_per_repository:{format:"uint16",maximum:65535,minimum:1,type:"integer"},maximum_global_active:{format:"uint16",maximum:65535,minimum:1,type:"integer"},maximum_parallel_per_task:{format:"uint16",maximum:65535,minimum:1,type:"integer"},maximum_stack_depth:{format:"uint16",maximum:65535,minimum:1,type:"integer"}},required:["maximum_active_per_repository","maximum_parallel_per_task","maximum_global_active","maximum_stack_depth"],type:"object"},vL={enum:["reject","require_explicit_human_approval","require_human_approval_and_independent_review"],type:"string"},vU={additionalProperties:!1,properties:{cleanliness:{$ref:"#/$defs/WorktreeCleanlinessRequirementV1"},maximum_preflight_age_seconds:{format:"uint32",minimum:1,type:"integer"},require_fresh_preflight:{type:"boolean"},review:{$ref:"#/$defs/ReviewRequirementV1"},tests:{items:{$ref:"#/$defs/RequiredCheckV1"},type:"array"}},required:["cleanliness","tests","review","require_fresh_preflight","maximum_preflight_age_seconds"],type:"object"},vH={enum:["critical_only","lifecycle","verbose"],type:"string"},vG={description:"Risky construct the pattern scan looks for.",enum:["unwrap","expect","panic","todo","unimplemented","unsafe_block"],type:"string"},vB={description:"Strongly typed canonical identity: `UserProfileId`.",type:"string"},vK={description:"UTC timestamp represented as microseconds from the Unix epoch.",format:"int64",type:"integer"},vJ={oneOf:[{properties:{interval:{$ref:"#/$defs/ClosedUtcIntervalV1"},kind:{const:"known",type:"string"}},required:["kind","interval"],type:"object"},{properties:{kind:{const:"unknown",type:"string"}},required:["kind"],type:"object"}]},vZ={additionalProperties:!1,description:"One exact verified graph snapshot identity.",properties:{event_sequence:{format:"uint64",minimum:0,type:"integer"},graph_version:{format:"uint64",minimum:0,type:"integer"},recovered_graph_digest:{$ref:"#/$defs/ManifestDigest"},source_watermark:{additionalProperties:{format:"uint64",minimum:0,type:"integer"},type:"object"}},required:["graph_version","event_sequence","source_watermark","recovered_graph_digest"],type:"object"},vQ={additionalProperties:!1,properties:{criterion_id:{type:"string"},description:{type:"string"},evidence_required:{type:"boolean"}},required:["criterion_id","description","evidence_required"],type:"object"},vX={enum:["never","on_request"],type:"string"},vY={description:"Strongly typed canonical identity: `WorkArtifactId`.",type:"string"},v1={additionalProperties:!1,properties:{artifact_id:{$ref:"#/$defs/WorkArtifactId"},byte_length:{format:"uint64",minimum:0,type:"integer"},digest:{$ref:"#/$defs/ManifestDigest"}},required:["artifact_id","digest","byte_length"],type:"object"},v0={additionalProperties:!1,description:"Sealed terminal evidence for one provider attempt. The digest of this\nrecord is the evidence digest carried by [`WorkTerminalEvidenceV1`] and by\nthe `RuntimeEvidenceRef` attached to the Work projection, so the receipt\nin Work always names an inspectable record.",properties:{actual_route:{anyOf:[{$ref:"#/$defs/WorkProviderRouteV1"},{type:"null"}]},identity:{$ref:"#/$defs/WorkAttemptIdentityV1"},observed_at:{$ref:"#/$defs/UtcMicros"},outcome:{$ref:"#/$defs/WorkAttemptProviderOutcomeV1"},provider_fallback:{anyOf:[{$ref:"#/$defs/WorkProviderFallbackRecordV1"},{type:"null"}],description:"Present only when the pinned preferred backend was disqualified before\nstartup. `None` means the attempt ran on its first-choice backend."},provider_session:{anyOf:[{$ref:"#/$defs/ObservationSourceIdentityV1"},{type:"null"}],description:"Native provider-qualified session/thread identity, when the provider\nreported one. Admission cannot supply this value and no fallback is\nfabricated."},requested_route:{$ref:"#/$defs/WorkProviderRouteV1"},stderr:{anyOf:[{$ref:"#/$defs/WorkAttemptStreamSummaryV1"},{type:"null"}]},stdout:{anyOf:[{$ref:"#/$defs/WorkAttemptStreamSummaryV1"},{type:"null"}]}},required:["identity","requested_route","outcome","observed_at"],type:"object"},v2={additionalProperties:!1,properties:{attempt_id:{$ref:"#/$defs/AttemptId"},run_id:{$ref:"#/$defs/RunId"},task_id:{$ref:"#/$defs/TaskId"}},required:["task_id","run_id","attempt_id"],type:"object"},v4={description:"How much of the authorized attempt set one page covers.",oneOf:[{additionalProperties:!1,description:"Every attempt after the page start was returned; zero returned is the\nexplicit empty authorized result, not a concealment.",properties:{coverage:{const:"complete",type:"string"},returned:{format:"uint32",minimum:0,type:"integer"}},required:["coverage","returned"],type:"object"},{additionalProperties:!1,description:"The page cap was reached; `resume` continues under the same verified\ntopology generation.",properties:{coverage:{const:"capped",type:"string"},remaining:{format:"uint32",minimum:0,type:"integer"},resume:{$ref:"#/$defs/WorkAttemptListCursorV1"},returned:{format:"uint32",minimum:0,type:"integer"}},required:["coverage","returned","remaining","resume"],type:"object"}]},v6={description:"Opaque resume point for the next page of one attempt-list-family read,\nbound to the operation and `page_size` that minted it and pinned to the\nverified topology generation the page was read under.",type:"string"},v3={additionalProperties:!1,properties:{completed:{format:"uint64",minimum:0,type:"integer"},total:{format:"uint64",minimum:0,type:"integer"}},required:["completed","total"],type:"object"},v9={additionalProperties:!1,properties:{accepted_proposal:{$ref:"#/$defs/ProposalId",description:"Exact accepted proposal the attempt was admitted against. A superseded\nor cleared proposal is a different binding, not a compatible refresh."},event_sequence:{description:"Exact immutable product event that verified this graph version.",format:"uint64",minimum:0,type:"integer"},graph_version:{format:"uint64",minimum:0,type:"integer"},recovered_graph_digest:{$ref:"#/$defs/ManifestDigest",description:"Digest of the graph recovered and verified at admission."},source_watermark:{additionalProperties:{format:"uint64",minimum:0,type:"integer"},description:"Source-frontier identity preserved from the verified product graph.",type:"object"}},required:["graph_version","event_sequence","source_watermark","recovered_graph_digest","accepted_proposal"],type:"object"},v5={description:"How one provider attempt ended, as observed by the daemon runtime.",oneOf:[{properties:{code:{format:"int32",type:"integer"},outcome:{const:"exited",type:"string"}},required:["outcome","code"],type:"object"},{properties:{outcome:{const:"signalled",type:"string"},signal:{format:"int32",type:"integer"}},required:["outcome","signal"],type:"object"},{properties:{outcome:{const:"timed_out",type:"string"}},required:["outcome"],type:"object"},{properties:{outcome:{const:"cancelled",type:"string"}},required:["outcome"],type:"object"},{properties:{outcome:{const:"provider_unavailable",type:"string"},state:{$ref:"#/$defs/WorkProviderAvailabilityV1"}},required:["outcome","state"],type:"object"},{properties:{channel:{$ref:"#/$defs/WorkAttemptStreamChannelV1"},outcome:{const:"stream_overflow",type:"string"}},required:["outcome","channel"],type:"object"},{properties:{outcome:{const:"launch_failed",type:"string"}},required:["outcome"],type:"object"},{description:"The provider started but its typed protocol session did not reach a\nterminal answer: a malformed, out-of-order, oversized, or lost frame.\nPlan 32 requires such a stream to seal failed evidence rather than a\ntext-scraped success.",properties:{outcome:{const:"protocol_failed",type:"string"}},required:["outcome"],type:"object"}]},v8={additionalProperties:!1,properties:{artifacts:{items:{$ref:"#/$defs/WorkArtifactRefV1"},type:"array"},evidence:{anyOf:[{$ref:"#/$defs/WorkAttemptEvidenceRecordV1"},{type:"null"}]},identity:{$ref:"#/$defs/WorkAttemptIdentityV1"}},required:["identity","artifacts"],type:"object"},v7={enum:["leased","running","cancellation_requested","cancellation_acknowledged","cancellation_escalated","recovery_required","succeeded","failed","timed_out","cancelled"],type:"string"},be={enum:["stdout","stderr"],type:"string"},bt={additionalProperties:!1,description:"Bounded summary of one captured provider stream.",properties:{byte_length:{format:"uint64",minimum:0,type:"integer"},digest:{$ref:"#/$defs/ManifestDigest"},truncated:{type:"boolean"}},required:["byte_length","truncated","digest"],type:"object"},br={additionalProperties:!1,description:"The verified Work topology snapshot one attempt-list page was read under.",properties:{generation:{description:"The verified graph generation the topology snapshot is published under.",type:"string"},task_count:{description:"The number of tasks in the verified topology.",format:"uint32",minimum:0,type:"integer"}},required:["generation","task_count"],type:"object"},bi={properties:{actual_route:{anyOf:[{$ref:"#/$defs/WorkProviderRouteV1"},{type:"null"}]},artifacts:{items:{$ref:"#/$defs/WorkArtifactRefV1"},type:"array"},cancellation:{$ref:"#/$defs/WorkCancellationStateV1"},execution:{$ref:"#/$defs/WorkExecutionEnvelopeV1"},identity:{$ref:"#/$defs/WorkAttemptIdentityV1"},lease:{$ref:"#/$defs/WorkLeaseFenceV1"},progress:{anyOf:[{$ref:"#/$defs/WorkAttemptProgressV1"},{type:"null"}]},projection_binding:{$ref:"#/$defs/WorkAttemptProjectionBindingV1"},recovery:{$ref:"#/$defs/WorkRecoveryStateV1"},requested_route:{$ref:"#/$defs/WorkProviderRouteV1"},state:{$ref:"#/$defs/WorkAttemptStateV1"},terminal:{anyOf:[{$ref:"#/$defs/WorkTerminalEvidenceV1"},{type:"null"}]}},required:["identity","projection_binding","execution","lease","state","artifacts","cancellation","recovery","requested_route"],type:"object"},bo={additionalProperties:!1,properties:{acknowledged_at:{$ref:"#/$defs/UtcMicros"},request:{$ref:"#/$defs/WorkCancellationRequestV1"}},required:["request","acknowledged_at"],type:"object"},bn={additionalProperties:!1,properties:{acknowledgement:{$ref:"#/$defs/WorkCancellationAcknowledgementV1"},escalated_at:{$ref:"#/$defs/UtcMicros"}},required:["acknowledgement","escalated_at"],type:"object"},ba={description:"Strongly typed canonical identity: `WorkCancellationRequestId`.",type:"string"},bs={additionalProperties:!1,properties:{request_id:{$ref:"#/$defs/WorkCancellationRequestId"},requested_at:{$ref:"#/$defs/UtcMicros"}},required:["request_id","requested_at"],type:"object"},bd={oneOf:[{properties:{state:{const:"none",type:"string"}},required:["state"],type:"object"},{properties:{state:{const:"requested",type:"string"},value:{$ref:"#/$defs/WorkCancellationRequestV1"}},required:["state","value"],type:"object"},{properties:{state:{const:"acknowledged",type:"string"},value:{$ref:"#/$defs/WorkCancellationAcknowledgementV1"}},required:["state","value"],type:"object"},{properties:{state:{const:"escalated",type:"string"},value:{$ref:"#/$defs/WorkCancellationEscalationV1"}},required:["state","value"],type:"object"}]},bc={description:"Strongly typed canonical identity: `WorkCommandId`.",type:"string"},bl={description:"Where a configured route places task content.",enum:["local","tenant","external"],type:"string"},bp={additionalProperties:!1,properties:{topology_generation:{$ref:"#/$defs/WorkTopologyGenerationRefV1"},work_generation:{$ref:"#/$defs/ProjectionGenerationId"}},required:["work_generation","topology_generation"],type:"object"},bu={additionalProperties:!1,properties:{cost_micros:{format:"uint64",minimum:0,type:["integer","null"]},coverage:{$ref:"#/$defs/CoverageStateV1"},effect_count:{format:"uint64",minimum:0,type:["integer","null"]},effect_outcome:{$ref:"#/$defs/DuplicateEffectOutcomeV1"},evidence:{$ref:"#/$defs/QuantityEvidenceClassV1"},test_count:{format:"uint64",minimum:0,type:["integer","null"]},token_count:{format:"uint64",minimum:0,type:["integer","null"]},wall_micros:{format:"uint64",minimum:0,type:["integer","null"]}},required:["evidence","effect_outcome","coverage"],type:"object"},bm={description:"Effect semantics admitted for one provider attempt.",enum:["observational","intercepted","compound_non_repeatable"],type:"string"},bf={description:"Declared effort class of a configured route.",enum:["minimal","standard","extended"],type:"string"},bh={enum:["deny","allowlisted"],type:"string"},by={oneOf:[{additionalProperties:!1,properties:{cursor:{type:"string"},kind:{const:"anchor",type:"string"},link_id:{type:"string"}},required:["kind","link_id","cursor"],type:"object"},{additionalProperties:!1,properties:{continuation:{$ref:"#/$defs/WorkTaskSessionContinuationV1"},kind:{const:"task_session",type:"string"}},required:["kind","continuation"],type:"object"}]},bg={additionalProperties:!1,description:"One immutable evidence frontier. Local code/session evidence and live Git\nevidence each carry their own frontier; the evaluator never merges,\nsubstitutes, or advances one from the other.",properties:{digest:{$ref:"#/$defs/ManifestDigest"},watermark:{$ref:"#/$defs/UtcMicros"}},required:["watermark","digest"],type:"object"},b_={additionalProperties:!1,description:"Exact on-disk executable selected for one opaque executable identity.\n\nThe path is configuration data, never a lookup hint. Runtime admission\ncanonicalizes it again and verifies the file bytes against\n`executable.artifact_digest` before returning an executable binding.",properties:{canonical_path:{type:"string"},capabilities:{items:{$ref:"#/$defs/WorkExecutableCapabilityV1"},type:"array"},executable:{$ref:"#/$defs/WorkExecutableReference"},routes:{items:{$ref:"#/$defs/WorkRouteCandidateV1"},type:"array"}},required:["executable","canonical_path","capabilities","routes"],type:"object"},bv={description:"One executable capability admitted by a configured artifact binding.\n\nThe closed variants bind a provider backend to its exact wire protocol.\nCallers cannot claim an arbitrary backend/protocol combination.",enum:["claude_code_stream_json","codex_app_server_json_rpc","codex_cli_exec_json"],type:"string"},bb={additionalProperties:!1,properties:{artifact_digest:{$ref:"#/$defs/ManifestDigest"},executable_id:{type:"string"}},required:["executable_id","artifact_digest"],type:"object"},b$={additionalProperties:!1,description:"Exact immutable provider admission attached to the durable Work attempt.\n\nCallers name typed route and scope facts, never argv, environment entries,\nor executable paths. The daemon resolves the registered executable only\nafter this envelope has been persisted and admitted to the canonical queue.",properties:{attempt_identity:{$ref:"#/$defs/WorkAttemptIdentityV1"},cancellation_generation:{format:"uint64",minimum:0,type:"integer"},commit:{$ref:"#/$defs/CommitId"},effect_state:{$ref:"#/$defs/WorkEffectStateV1"},execution_snapshot:{$ref:"#/$defs/WorkExecutionSnapshot"},instructions:{description:"Exact provider instructions admitted with this attempt. The adapter\ndelivers these bytes verbatim on the provider's typed input channel;\nthey are never interpolated into argv or an ambient prompt source.",type:"string"},operation:{$ref:"#/$defs/WorkflowOperationRef"},project_id:{$ref:"#/$defs/ProjectId"},projection_binding:{$ref:"#/$defs/WorkAttemptProjectionBindingV1"},reference:{anyOf:[{$ref:"#/$defs/RefId"},{type:"null"}]},repository_id:{$ref:"#/$defs/RepositoryId"},worktree_id:{$ref:"#/$defs/WorktreeId"},worktree_root:{type:"string"}},required:["attempt_identity","projection_binding","operation","execution_snapshot","project_id","repository_id","worktree_id","worktree_root","commit","instructions","cancellation_generation","effect_state"],type:"object"},bS={additionalProperties:!1,properties:{max_concurrency:{format:"uint32",minimum:0,type:"integer"},max_input_tokens:{format:"uint64",minimum:0,type:"integer"},max_output_tokens:{format:"uint64",minimum:0,type:"integer"},max_protocol_bytes:{format:"uint64",minimum:0,type:"integer"},max_stderr_bytes:{format:"uint64",minimum:0,type:"integer"},max_stdout_bytes:{format:"uint64",minimum:0,type:"integer"}},required:["max_input_tokens","max_output_tokens","max_stdout_bytes","max_stderr_bytes","max_protocol_bytes","max_concurrency"],type:"object"},bk={additionalProperties:!1,description:"Immutable provider and topology authority pinned for exactly one Work\nexecution. Every constraint the execution is governed by is named here;\nnothing in this value is an opaque stand-in that a reader must resolve\nagainst a mutable store.",properties:{approval:{$ref:"#/$defs/WorkApprovalPolicy"},backend:{$ref:"#/$defs/WorkProviderBackendV1"},configuration_revision_id:{$ref:"#/$defs/ConfigurationRevisionId"},configuration_snapshot_id:{$ref:"#/$defs/ConfigurationSnapshotId"},credential_references:{items:{$ref:"#/$defs/CredentialReferenceId"},type:"array",uniqueItems:!0},deadline:{$ref:"#/$defs/UtcMicros"},effective_behavior_digest:{$ref:"#/$defs/ManifestDigest"},egress:{$ref:"#/$defs/WorkEgressPolicy"},environment_allowlist:{items:{type:"string"},type:"array",uniqueItems:!0},executable:{$ref:"#/$defs/WorkExecutableReference"},fallback:{$ref:"#/$defs/WorkFallbackTopology"},filesystem:{$ref:"#/$defs/WorkFilesystemPolicy"},limits:{$ref:"#/$defs/WorkExecutionLimits"},model:{type:"string"},protocol:{$ref:"#/$defs/WorkProviderProtocol"},resolution_provenance_digest:{$ref:"#/$defs/ManifestDigest"},route:{$ref:"#/$defs/WorkProviderRouteV1"},sandbox:{$ref:"#/$defs/WorkSandboxPolicy"},topology:{$ref:"#/$defs/WorkTopologyPolicyV1",description:"See [`WorkExecutionSnapshotInput::topology`]. Validated on construction,\nso an admitted snapshot can never pin a topology that weakens the\nprotected-ref floor or permits a native integration without its gates."}},required:["configuration_revision_id","configuration_snapshot_id","effective_behavior_digest","resolution_provenance_digest","route","backend","protocol","model","executable","sandbox","approval","filesystem","egress","environment_allowlist","credential_references","limits","deadline","fallback","topology"],type:"object"},bw={enum:["language","framework","architecture","testing","operations","security","domain"],type:"string"},bR={additionalProperties:!1,description:"Explicit, expiring consent for ephemeral expertise context.\n\nUser-profile and project authorization are separate registered settings;\nWork requires both and uses only their category intersection.",properties:{allowed_categories:{items:{$ref:"#/$defs/WorkExpertiseCategoryV1"},type:"array",uniqueItems:!0},enabled:{type:"boolean"},expires_at:{anyOf:[{$ref:"#/$defs/UtcMicros"},{type:"null"}]},granted_at:{anyOf:[{$ref:"#/$defs/UtcMicros"},{type:"null"}]},schema_version:{format:"uint16",maximum:65535,minimum:0,type:"integer"}},required:["schema_version","enabled","allowed_categories"],type:"object"},bP={oneOf:[{additionalProperties:!1,properties:{kind:{const:"disabled",type:"string"}},required:["kind"],type:"object"},{additionalProperties:!1,properties:{executable:{$ref:"#/$defs/WorkExecutableReference"},kind:{const:"codex_cli",type:"string"},route:{$ref:"#/$defs/WorkProviderRouteV1"}},required:["kind","route","executable"],type:"object"}]},bV={format:"uint64",minimum:0,title:"WorkFenceEpochV1",type:"integer"},bq={enum:["read_only","workspace_write"],type:"string"},bI={oneOf:[{additionalProperties:!1,properties:{item:{$ref:"#/$defs/WorkItemV1"},kind:{const:"task_added",type:"string"}},required:["kind","item"],type:"object"},{additionalProperties:!1,properties:{initiative:{$ref:"#/$defs/WorkInitiativeV1"},item:{$ref:"#/$defs/WorkItemV1"},kind:{const:"task_created",type:"string"},milestone:{$ref:"#/$defs/WorkMilestoneV1"},plan:{$ref:"#/$defs/WorkPlanV1"}},required:["kind","initiative","plan","milestone","item"],type:"object"},{additionalProperties:!1,properties:{decided_at:{$ref:"#/$defs/UtcMicros"},disposition:{$ref:"#/$defs/WorkProposalDispositionV1"},kind:{const:"relation_replan_decided",type:"string"},proposal:{$ref:"#/$defs/WorkRelationReplanProposalV1"}},required:["kind","proposal","disposition","decided_at"],type:"object"},{additionalProperties:!1,properties:{applied_at:{$ref:"#/$defs/UtcMicros"},kind:{const:"task_relations_replanned",type:"string"},proposal_id:{$ref:"#/$defs/ProposalId"}},required:["kind","proposal_id","applied_at"],type:"object"},{additionalProperties:!1,properties:{evidence:{$ref:"#/$defs/TaskEvidenceLinkV1"},kind:{const:"evidence_linked",type:"string"},task_id:{$ref:"#/$defs/TaskId"}},required:["kind","task_id","evidence"],type:"object"},{additionalProperties:!1,properties:{decided_at:{$ref:"#/$defs/UtcMicros"},disposition:{$ref:"#/$defs/WorkProposalDispositionV1"},kind:{const:"proposal_decided",type:"string"},proposal:{$ref:"#/$defs/WorkProposalV1"}},required:["kind","proposal","disposition","decided_at"],type:"object"},{additionalProperties:!1,properties:{accepted_at:{$ref:"#/$defs/UtcMicros"},kind:{const:"proposal_accepted",type:"string"},proposal:{$ref:"#/$defs/WorkProposalV1"}},required:["kind","proposal","accepted_at"],type:"object"},{additionalProperties:!1,properties:{admitted_at:{$ref:"#/$defs/UtcMicros"},based_on_version:{format:"uint64",minimum:0,type:"integer"},kind:{const:"execution_admitted",type:"string"},task_id:{$ref:"#/$defs/TaskId"}},required:["kind","task_id","based_on_version","admitted_at"],type:"object"},{additionalProperties:!1,properties:{based_on_version:{format:"uint64",minimum:0,type:"integer"},identity:{$ref:"#/$defs/WorkAttemptIdentityV1"},kind:{const:"accepted_attempt_linked",type:"string"},linked_at:{$ref:"#/$defs/UtcMicros"},task_id:{$ref:"#/$defs/TaskId"}},required:["kind","task_id","based_on_version","identity","linked_at"],type:"object"},{additionalProperties:!1,properties:{accepted_at:{$ref:"#/$defs/UtcMicros"},evidence_by_criterion:{additionalProperties:{type:"string"},type:"object"},kind:{const:"task_accepted",type:"string"},task_id:{$ref:"#/$defs/TaskId"}},required:["kind","task_id","evidence_by_criterion","accepted_at"],type:"object"},{additionalProperties:!1,properties:{handoff:{$ref:"#/$defs/WorkHandoffV1"},kind:{const:"handoff_recorded",type:"string"}},required:["kind","handoff"],type:"object"}]},bx={additionalProperties:!1,description:"One attempt on the evidence frontier: exactly which attempt, in which\nstate, backed by which sealed evidence digest (when the attempt has\nreported one). No lease or fence is part of the frontier. Those are\nruntime authority, not checkpoint evidence.",properties:{evidence_digest:{anyOf:[{$ref:"#/$defs/ManifestDigest"},{type:"null"}],description:"The digest of the sealed terminal evidence record, when the attempt\nhas one. `None` is the typed not-yet-reported state."},identity:{$ref:"#/$defs/WorkAttemptIdentityV1"},state:{$ref:"#/$defs/WorkAttemptStateV1"}},required:["identity","state"],type:"object"},bj={additionalProperties:!1,description:"The exact work/evidence frontier one handoff records.",properties:{attempts:{description:"The evidence frontier: every attempt the issuer knows about, in\nstable identity order.",items:{$ref:"#/$defs/WorkHandoffAttemptFrontierV1"},type:"array"},blockers:{description:"What is blocking progress. Bounded, non-empty entries.",items:{type:"string"},type:"array"},legal_actions:{description:"The actions the issuer believes are legal next steps.",items:{type:"string"},type:"array"},lineage:{$ref:"#/$defs/WorkHandoffLineageV1"},task_id:{$ref:"#/$defs/TaskId"},unknowns:{description:"What the issuer does not know yet. Bounded, non-empty entries.",items:{type:"string"},type:"array"},work_version:{description:"The exact Work version the frontier was cut at.",format:"uint64",minimum:0,type:"integer"}},required:["task_id","work_version","attempts","unknowns","blockers","legal_actions","lineage"],type:"object"},bC={additionalProperties:!1,description:"Who issued this frontier and what it supersedes.",properties:{issued_at:{$ref:"#/$defs/UtcMicros"},issued_by:{$ref:"#/$defs/ActorId"},prior_frontier_digest:{anyOf:[{$ref:"#/$defs/ManifestDigest"},{type:"null"}],description:"The canonical digest of the frontier this one supersedes, when the\ntask has been handed off before. `None` states a first handoff."}},required:["issued_by","issued_at"],type:"object"},bT={additionalProperties:!1,properties:{evidence_frontier:{items:{type:"string"},type:"array",uniqueItems:!0},from_actor:{$ref:"#/$defs/ActorId"},handed_off_at:{$ref:"#/$defs/UtcMicros"},handoff_id:{type:"string"},task_id:{$ref:"#/$defs/TaskId"},to_actor:{$ref:"#/$defs/ActorId"},unknowns:{items:{type:"string"},type:"array",uniqueItems:!0}},required:["handoff_id","task_id","from_actor","to_actor","evidence_frontier","unknowns","handed_off_at"],type:"object"},bO={additionalProperties:!1,properties:{initiative_id:{type:"string"},milestone_id:{type:"string"},plan_id:{type:"string"}},required:["initiative_id","plan_id","milestone_id"],type:"object"},bE={additionalProperties:!1,properties:{created_at:{$ref:"#/$defs/UtcMicros"},id:{type:"string"},title:{type:"string"}},required:["id","title","created_at"],type:"object"},bA={additionalProperties:!1,properties:{acceptance_criteria:{items:{$ref:"#/$defs/WorkAcceptanceCriterionV1"},type:"array"},causal_candidates:{items:{$ref:"#/$defs/TaskId"},type:"array",uniqueItems:!0},created_at:{$ref:"#/$defs/UtcMicros"},deadline:{anyOf:[{$ref:"#/$defs/UtcMicros"},{type:"null"}]},dependencies:{items:{$ref:"#/$defs/TaskId"},type:"array",uniqueItems:!0},effort:{format:"uint32",minimum:0,type:"integer"},hierarchy:{$ref:"#/$defs/WorkHierarchyV1"},informational_relations:{items:{$ref:"#/$defs/TaskId"},type:"array",uniqueItems:!0},scheduled_at:{anyOf:[{$ref:"#/$defs/UtcMicros"},{type:"null"}]},task_id:{$ref:"#/$defs/TaskId"},title:{type:"string"},updated_at:{$ref:"#/$defs/UtcMicros"}},required:["task_id","hierarchy","title","dependencies","informational_relations","causal_candidates","acceptance_criteria","effort","created_at","updated_at"],type:"object"},bM={additionalProperties:!1,properties:{accepted_at:{anyOf:[{$ref:"#/$defs/UtcMicros"},{type:"null"}]},accepted_attempts:{items:{$ref:"#/$defs/WorkAttemptIdentityV1"},type:"array"},accepted_criteria:{additionalProperties:{type:"string"},type:"object"},accepted_proposal:{anyOf:[{$ref:"#/$defs/ProposalId"},{type:"null"}]},accepted_route:{anyOf:[{$ref:"#/$defs/WorkRouteDecisionV1"},{type:"null"}]},archived_at:{anyOf:[{$ref:"#/$defs/UtcMicros"},{type:"null"}]},evidence_links:{items:{type:"string"},type:"array",uniqueItems:!0},execution_admitted_at:{anyOf:[{$ref:"#/$defs/UtcMicros"},{type:"null"}]},handoffs:{items:{$ref:"#/$defs/WorkHandoffV1"},type:"array"},input:{$ref:"#/$defs/WorkItemInputV1"}},required:["input","evidence_links","accepted_criteria","accepted_attempts","handoffs"],type:"object"},bW={additionalProperties:!1,properties:{epoch:{$ref:"#/$defs/WorkFenceEpochV1"},lease_id:{$ref:"#/$defs/WorkLeaseId"}},required:["lease_id","epoch"],type:"object"},bN={description:"Strongly typed canonical identity: `WorkLeaseId`.",type:"string"},bz={additionalProperties:!1,properties:{created_at:{$ref:"#/$defs/UtcMicros"},id:{type:"string"},plan_id:{type:"string"},title:{type:"string"}},required:["id","plan_id","title","created_at"],type:"object"},bD={description:"Ordinal band. Never a probability, never a scalar score.\n\nBands are ordered `Lowest` .. `Highest`. Comparison is the only operation\nconsumers perform over them, so no weighted sum can be reconstructed from\na recorded decision.",enum:["lowest","low","moderate","high","highest"],type:"string"},bF={description:"Closed set of conditions that block admission or removal.",oneOf:[{const:"dirty_tracked_files",description:"Tracked files differ from the index or HEAD.",type:"string"},{const:"untracked_data",description:"Untracked data is present in the target.",type:"string"},{const:"unique_commits",description:"The target holds commits reachable from nowhere else.",type:"string"},{const:"active_holder",description:"Another admitted placement holds this target.",type:"string"},{const:"unresolved_effect",description:"An effect against this placement is unresolved.",type:"string"},{const:"unacknowledged_receipt",description:"A receipt produced against this placement is unacknowledged.",type:"string"},{const:"uncertain_pull_request",description:"A pull request produced from this placement is in an uncertain state.",type:"string"},{const:"shared_ref",description:"A ref in this target is shared with another holder.",type:"string"},{const:"missing_anchor",description:"A retrieval or evidence anchor this placement referenced is missing.",type:"string"},{const:"stale_scope",description:"The authorized scope no longer matches the placement.",type:"string"},{const:"authorization_lost",description:"Authorization for this placement was lost.",type:"string"},{const:"target_unreadable",description:"The target could not be read, so its state is unknown.",type:"string"},{const:"network_required",description:"The placement declared itself network-free but the action needs network.",type:"string"}],title:"WorkPlacementBlockerV1"},bL={additionalProperties:!1,description:"Which run a placement belongs to. Placement never redefines TaskId.",properties:{run_id:{$ref:"#/$defs/RunId"},task_id:{$ref:"#/$defs/TaskId"}},required:["task_id","run_id"],title:"WorkPlacementIdentityV1",type:"object"},bU={description:"The supported placement choices, and only those.",oneOf:[{const:"no_managed_placement",description:"TraceDecay manages no checkout for this run. No-Git work is first class.",type:"string"},{const:"clean_in_place",description:"The caller's own strictly clean checkout, explicitly acknowledged.",type:"string"},{const:"linked_worktree",description:"A linked worktree of the same repository.",type:"string"},{const:"isolated_clone",description:"An isolated local clone.",type:"string"}],title:"WorkPlacementKindV1"},bH={description:"The durable state of one admitted placement.",oneOf:[{const:"admitted",description:"The placement holds its target.",type:"string"},{const:"released",description:"The placement gave its target up cleanly. Nothing was deleted by this\ntransition; removal is a separate cleanup preflight.",type:"string"},{const:"quarantined",description:"The placement was retained because removal is blocked.",type:"string"}],title:"WorkPlacementStateV1"},bG={additionalProperties:!1,description:"The exact placement a caller asked for.",properties:{in_place_acknowledged:{description:"Set only for `CleanInPlace`: the caller states it accepts running in\nits own checkout. Acknowledgement is explicit, never inferred.",type:"boolean"},kind:{$ref:"#/$defs/WorkPlacementKindV1"},network_free:{description:"The placement declares it needs no network. Declared, not detected.",type:"boolean"},root:{description:"Absolute root, present exactly when the kind manages one.",type:["string","null"]}},required:["kind","in_place_acknowledged","network_free"],title:"WorkPlacementTargetV1",type:"object"},bB={additionalProperties:!1,description:"One run's durable placement relation.",properties:{authority_version:{format:"uint64",minimum:0,type:"integer"},blockers:{items:{$ref:"#/$defs/WorkPlacementBlockerV1"},type:"array",uniqueItems:!0},identity:{$ref:"#/$defs/WorkPlacementIdentityV1"},retention_eligible_at:{anyOf:[{$ref:"#/$defs/UtcMicros"},{type:"null"}],description:"When retention makes this placement *eligible* for a fresh cleanup\npreflight. Eligibility is not delete authority."},state:{$ref:"#/$defs/WorkPlacementStateV1"},target:{$ref:"#/$defs/WorkPlacementTargetV1"},transitioned_at:{$ref:"#/$defs/UtcMicros"}},required:["identity","target","state","authority_version","transitioned_at","blockers"],title:"WorkPlacementV1",type:"object"},bK={additionalProperties:!1,properties:{created_at:{$ref:"#/$defs/UtcMicros"},id:{type:"string"},initiative_id:{type:"string"},title:{type:"string"}},required:["id","initiative_id","title","created_at"],type:"object"},bJ={oneOf:[{additionalProperties:!1,properties:{kind:{const:"project",type:"string"},project_id:{$ref:"#/$defs/ProjectId"}},required:["kind","project_id"],type:"object"},{additionalProperties:!1,properties:{kind:{const:"repository",type:"string"},project_id:{$ref:"#/$defs/ProjectId"},repository_id:{$ref:"#/$defs/RepositoryId"}},required:["kind","project_id","repository_id"],type:"object"}]},bZ={additionalProperties:!1,properties:{anchor_id:{$ref:"#/$defs/RetrievalAnchorId"},evidence_digest:{$ref:"#/$defs/ManifestDigest"},source_store_id:{$ref:"#/$defs/SourceStoreId"}},required:["source_store_id","anchor_id","evidence_digest"],type:"object"},bQ={oneOf:[{additionalProperties:!1,properties:{graph:{$ref:"#/$defs/WorkProductGraphV1"},kind:{const:"created",type:"string"}},required:["kind","graph"],type:"object"},{additionalProperties:!1,properties:{change:{$ref:"#/$defs/WorkGraphChangeV1"},kind:{const:"changed",type:"string"}},required:["kind","change"],type:"object"}]},bX={additionalProperties:!1,properties:{actor_id:{$ref:"#/$defs/ActorId"},authorized_relation_scopes:{items:{$ref:"#/$defs/WorkProductAuthorizedRelationScopeV1"},type:"array"},canonical_input_digest:{$ref:"#/$defs/ManifestDigest"},catalog_generation_id:{$ref:"#/$defs/CatalogGenerationId"},causation_event_id:{type:["string","null"]},command_id:{$ref:"#/$defs/WorkCommandId"},configuration_revision_id:{$ref:"#/$defs/ConfigurationRevisionId"},event_id:{type:"string"},evidence:{items:{$ref:"#/$defs/WorkProductEventEvidenceV1"},type:"array"},expected_graph_version:{format:"uint64",minimum:0,type:["integer","null"]},occurred_at:{$ref:"#/$defs/UtcMicros"},owner_scope:{$ref:"#/$defs/WorkProductProfileScopeV1"},payload:{$ref:"#/$defs/WorkProductEventPayloadV1"},policy_revision_id:{type:"string"},result_graph_version:{format:"uint64",minimum:0,type:"integer"},sequence:{format:"uint64",minimum:0,type:"integer"},source_watermark:{additionalProperties:{format:"uint64",minimum:0,type:"integer"},type:"object"}},required:["event_id","sequence","actor_id","owner_scope","authorized_relation_scopes","result_graph_version","command_id","canonical_input_digest","evidence","source_watermark","occurred_at","policy_revision_id","configuration_revision_id","catalog_generation_id","payload"],type:"object"},bY={oneOf:[{additionalProperties:!1,properties:{authority:{const:"no_prior_graph",type:"string"}},required:["authority"],type:"object"},{additionalProperties:!1,properties:{authority:{const:"verified",type:"string"},verified_version:{$ref:"#/$defs/VerifiedWorkGraphVersionV1"}},required:["authority","verified_version"],type:"object"}]},b1={additionalProperties:!1,properties:{evidence:{items:{$ref:"#/$defs/TaskEvidenceLinkV1"},type:"array"},initiatives:{items:{$ref:"#/$defs/WorkInitiativeV1"},type:"array"},items:{items:{$ref:"#/$defs/WorkItemV1"},type:"array"},milestones:{items:{$ref:"#/$defs/WorkMilestoneV1"},type:"array"},plans:{items:{$ref:"#/$defs/WorkPlanV1"},type:"array"},proposal_decisions:{items:{$ref:"#/$defs/WorkProposalDecisionV1"},type:"array"},relation_replan_decisions:{items:{$ref:"#/$defs/WorkRelationReplanDecisionV1"},type:"array"},version:{format:"uint64",minimum:0,type:"integer"}},required:["version","initiatives","plans","milestones","items","proposal_decisions","relation_replan_decisions","evidence"],type:"object"},b0={additionalProperties:!1,properties:{causation_event_id:{type:["string","null"]},command_id:{$ref:"#/$defs/WorkCommandId"},evidence:{items:{$ref:"#/$defs/WorkProductEventEvidenceV1"},type:"array"},expected_authority:{$ref:"#/$defs/WorkProductExpectedAuthorityV1"},occurred_at:{$ref:"#/$defs/UtcMicros"},revisions:{$ref:"#/$defs/WorkProductRevisionPinsV1"}},required:["expected_authority","command_id","evidence","occurred_at","revisions"],type:"object"},b2={additionalProperties:!1,properties:{brain_id:{$ref:"#/$defs/BrainId"},profile_id:{$ref:"#/$defs/UserProfileId"}},required:["brain_id","profile_id"],type:"object"},b4={oneOf:[{properties:{initiative_id:{type:"string"},kind:{const:"initiative_contains_plan",type:"string"},plan_id:{type:"string"}},required:["kind","initiative_id","plan_id"],type:"object"},{properties:{kind:{const:"plan_contains_milestone",type:"string"},milestone_id:{type:"string"},plan_id:{type:"string"}},required:["kind","plan_id","milestone_id"],type:"object"},{properties:{kind:{const:"milestone_contains_task",type:"string"},milestone_id:{type:"string"},task_id:{$ref:"#/$defs/TaskId"}},required:["kind","milestone_id","task_id"],type:"object"},{properties:{dependency:{$ref:"#/$defs/TaskId"},dependent:{$ref:"#/$defs/TaskId"},kind:{const:"gates",type:"string"}},required:["kind","dependency","dependent"],type:"object"},{properties:{kind:{const:"informational",type:"string"},source:{$ref:"#/$defs/TaskId"},target:{$ref:"#/$defs/TaskId"}},required:["kind","source","target"],type:"object"},{properties:{cause:{$ref:"#/$defs/TaskId"},effect:{$ref:"#/$defs/TaskId"},kind:{const:"causal_candidate",type:"string"}},required:["kind","cause","effect"],type:"object"},{properties:{kind:{const:"evidence",type:"string"},link_id:{type:"string"},task_id:{$ref:"#/$defs/TaskId"}},required:["kind","task_id","link_id"],type:"object"},{properties:{identity:{$ref:"#/$defs/WorkAttemptIdentityV1"},kind:{const:"accepted_attempt",type:"string"},task_id:{$ref:"#/$defs/TaskId"}},required:["kind","task_id","identity"],type:"object"},{properties:{handoff_id:{type:"string"},kind:{const:"handoff",type:"string"},task_id:{$ref:"#/$defs/TaskId"}},required:["kind","task_id","handoff_id"],type:"object"},{properties:{kind:{const:"proposal_decision",type:"string"},proposal_id:{$ref:"#/$defs/ProposalId"},task_id:{$ref:"#/$defs/TaskId"}},required:["kind","task_id","proposal_id"],type:"object"}]},b6={additionalProperties:!1,properties:{catalog_generation_id:{$ref:"#/$defs/CatalogGenerationId"},configuration_revision_id:{$ref:"#/$defs/ConfigurationRevisionId"},policy_revision_id:{type:"string"}},required:["policy_revision_id","configuration_revision_id","catalog_generation_id"],type:"object"},b3={description:"The exact owner-relative relation set selected for a canonical Work graph.\n\nThis identity lives in the domain because attempt admission must retain\nit byte-for-byte through provider settlement. Reconstructing it from a\nproject context would conflate explicit no-Git work with a scoped\nrepository relation.",oneOf:[{properties:{selection:{const:"profile_owned_no_git",type:"string"}},required:["selection"],type:"object"},{properties:{relation_scopes:{items:{$ref:"#/$defs/WorkProductAuthorizedRelationScopeV1"},type:"array",uniqueItems:!0},selection:{const:"relations",type:"string"}},required:["selection","relation_scopes"],type:"object"}]},b9={additionalProperties:!1,properties:{decided_at:{$ref:"#/$defs/UtcMicros"},disposition:{$ref:"#/$defs/WorkProposalDispositionV1"},proposal:{$ref:"#/$defs/WorkProposalV1"}},required:["proposal","disposition","decided_at"],type:"object"},b5={enum:["accepted","rejected","superseded"],type:"string"},b8={additionalProperties:!1,properties:{based_on_version:{format:"uint64",minimum:0,type:"integer"},children:{items:{$ref:"#/$defs/WorkProposedChildV1"},type:"array"},configuration_digest:{$ref:"#/$defs/ManifestDigest"},evidence_digest:{$ref:"#/$defs/ManifestDigest"},explanation:{type:"string"},proposal_id:{$ref:"#/$defs/ProposalId"},route:{$ref:"#/$defs/WorkRouteDecisionV1"},shape:{$ref:"#/$defs/WorkShapeAssessmentV1"},sizing:{$ref:"#/$defs/WorkSizingV1"},task_id:{$ref:"#/$defs/TaskId"}},required:["proposal_id","task_id","based_on_version","shape","sizing","children","route","explanation","evidence_digest","configuration_digest"],type:"object"},b7={additionalProperties:!1,properties:{dependencies:{items:{$ref:"#/$defs/TaskId"},type:"array",uniqueItems:!0},effort:{format:"uint32",minimum:0,type:"integer"},task_id:{$ref:"#/$defs/TaskId"},title:{type:"string"}},required:["task_id","title","effort","dependencies"],type:"object"},$e={description:"Typed provider availability observed at negotiation. These are product\nstates, not transport errors: each one names why the configured native\nprovider could not run, without inventing a fallback.",oneOf:[{const:"absent",description:"No executable binding is configured for the pinned executable identity.",type:"string"},{const:"stale",description:"The configured binding no longer matches the pinned reference.",type:"string"},{const:"unsupported",description:"The configured binding does not admit the pinned backend/protocol.",type:"string"},{const:"digest_mismatch",description:"The on-disk executable bytes do not match the pinned digest.",type:"string"},{const:"unavailable",description:"The configured executable could not be read or is not executable.",type:"string"}]},$t={description:"Provider protocol selected by the pinned Work configuration snapshot.",enum:["claude_code_cli","codex_app_server","codex_cli"],type:"string"},$r={additionalProperties:!1,description:'Why an admitted attempt did not run on the backend its pinned execution\nsnapshot preferred.\n\nPlan 32 (`docs/plans/tracedecay-v2/32-dynamic-workflow-runtime-and-sdk.md`,\n"Native provider execution") admits the Codex CLI "only when app-server is\nunsupported or absent before session start and the pinned Plan 20 snapshot\nexplicitly allows that fallback", and the plan index requires that fallback\nto be "reported rather than hidden". This record is that report: it names\nthe preferred backend, the typed state that disqualified it, and the\nconfiguration-bounded fallback that was selected, so a fallback run can\nnever be read as a first choice.\n\nIt is also written when the fallback itself was refused, so a denial keeps\nboth failures instead of collapsing them into one state.',properties:{fallback_backend:{$ref:"#/$defs/WorkProviderBackendV1",description:"The backend named by the snapshot's configured fallback topology."},fallback_route:{$ref:"#/$defs/WorkProviderRouteV1",description:"The route that fallback runs on."},fallback_state:{anyOf:[{$ref:"#/$defs/WorkProviderAvailabilityV1"},{type:"null"}],description:"`None` when the fallback actually started; `Some(state)` when the\nfallback was itself refused."},preferred_backend:{$ref:"#/$defs/WorkProviderBackendV1",description:"The backend the pinned snapshot named first."},preferred_route:{$ref:"#/$defs/WorkProviderRouteV1",description:"The route that backend would have run on."},preferred_state:{$ref:"#/$defs/WorkProviderAvailabilityV1",description:"Why the preferred backend could not be used."}},required:["preferred_backend","preferred_route","preferred_state","fallback_backend","fallback_route"],type:"object"},$i={enum:["claude_stream_json","codex_app_server_json_rpc","codex_exec_json"],type:"string"},$o={description:"Strongly typed canonical identity: `WorkProviderRouteId`.",type:"string"},$n={additionalProperties:!1,properties:{provider_id:{$ref:"#/$defs/ProviderId"},route_id:{$ref:"#/$defs/WorkProviderRouteId"}},required:["provider_id","route_id"],type:"object"},$a={oneOf:[{properties:{state:{const:"fresh",type:"string"}},required:["state"],type:"object"},{properties:{checkpoint:{anyOf:[{$ref:"#/$defs/WorkArtifactRefV1"},{type:"null"}]},source_attempt_id:{$ref:"#/$defs/AttemptId"},state:{const:"resumed",type:"string"}},required:["state","source_attempt_id"],type:"object"},{properties:{reason:{$ref:"#/$defs/WorkRestartReasonV1"},source_attempt_id:{$ref:"#/$defs/AttemptId"},state:{const:"restarted",type:"string"}},required:["state","source_attempt_id","reason"],type:"object"},{description:"The attempt cannot continue and must be recovered. A first attempt\nlost before it ever resumed anything has no predecessor, so the source\nis absent rather than pointing at the attempt itself.",properties:{observed_at:{$ref:"#/$defs/UtcMicros"},reason:{$ref:"#/$defs/WorkRestartReasonV1"},source_attempt_id:{anyOf:[{$ref:"#/$defs/AttemptId"},{type:"null"}],default:null},state:{const:"recovery_required",type:"string"}},required:["state","reason","observed_at"],type:"object"}]},$s={additionalProperties:!1,properties:{decided_at:{$ref:"#/$defs/UtcMicros"},disposition:{$ref:"#/$defs/WorkProposalDispositionV1"},proposal:{$ref:"#/$defs/WorkRelationReplanProposalV1"}},required:["proposal","disposition","decided_at"],type:"object"},$d={additionalProperties:!1,properties:{based_on_version:{format:"uint64",minimum:0,type:"integer"},causal_candidates:{items:{$ref:"#/$defs/TaskId"},type:"array",uniqueItems:!0},dependencies:{items:{$ref:"#/$defs/TaskId"},type:"array",uniqueItems:!0},informational_relations:{items:{$ref:"#/$defs/TaskId"},type:"array",uniqueItems:!0},payload_digest:{$ref:"#/$defs/ManifestDigest"},proposal_id:{$ref:"#/$defs/ProposalId"},task_id:{$ref:"#/$defs/TaskId"}},required:["proposal_id","task_id","based_on_version","dependencies","informational_relations","causal_candidates","payload_digest"],type:"object"},$c={enum:["lease_lost","provider_unavailable","process_lost","failure_observed"],type:"string"},$l={enum:["runtime_failure","restart_recovery_required"],type:"string"},$p={additionalProperties:!1,description:"A selector into the owning runtime-terminal evidence authority.\n\n`evidence_ref` is an opaque local reference. The Work retry owner resolves\nit through [`WorkRetryEvidencePortV1`]; callers never submit the evidence\ndigest, outcome, or observation time that decides eligibility.",properties:{cause:{$ref:"#/$defs/WorkRetryCauseV1"},evidence_ref:{type:"string"},source:{$ref:"#/$defs/WorkRetrySourceV1"}},required:["source","cause","evidence_ref"],type:"object"},$u={enum:["runtime"],type:"string"},$m={additionalProperties:!1,description:"One eligible route supplied by the authorized configuration snapshot.\n\nThe application filters these candidates by the current request grant and\nverifies the exact pinned executable before policy evaluates them.",properties:{autonomy:{$ref:"#/$defs/WorkOrdinalBandV1"},content_location:{$ref:"#/$defs/WorkContentLocationClassV1"},correctness:{$ref:"#/$defs/WorkOrdinalBandV1"},cost:{$ref:"#/$defs/WorkOrdinalBandV1"},declared_budget_ceiling:{format:"uint64",minimum:0,type:"integer"},effort:{$ref:"#/$defs/WorkEffortClassV1"},evidence_quality:{$ref:"#/$defs/WorkOrdinalBandV1"},execution:{$ref:"#/$defs/WorkRouteExecutionProfileV1"},latency:{$ref:"#/$defs/WorkOrdinalBandV1"},model_id:{type:"string"},provider_capability_id:{type:"string"},route_id:{type:"string"},sensitive_data_fitness:{$ref:"#/$defs/WorkOrdinalBandV1"}},required:["route_id","provider_capability_id","model_id","effort","declared_budget_ceiling","content_location","correctness","sensitive_data_fitness","latency","cost","autonomy","evidence_quality","execution"],type:"object"},$f={oneOf:[{properties:{alternatives:{items:{$ref:"#/$defs/WorkProviderRouteV1"},type:"array"},decision:{const:"selected",type:"string"},exclusions:{items:{type:"string"},type:"array",uniqueItems:!0},fallback:{type:"string"},recommended:{$ref:"#/$defs/WorkProviderRouteV1"}},required:["decision","recommended","alternatives","exclusions","fallback"],type:"object"},{properties:{decision:{const:"abstained",type:"string"},reason:{type:"string"}},required:["decision","reason"],type:"object"}]},$h={additionalProperties:!1,description:"Complete execution constraints configured for one provider route.\n\nThe route candidate is the configuration authority for these values. Work\nadmission copies them into the immutable execution snapshot; provider\nadapters never supply defaults.",properties:{approval:{$ref:"#/$defs/WorkApprovalPolicy"},credential_references:{items:{$ref:"#/$defs/CredentialReferenceId"},type:"array",uniqueItems:!0},egress:{$ref:"#/$defs/WorkEgressPolicy"},environment_allowlist:{items:{type:"string"},type:"array",uniqueItems:!0},fallback:{$ref:"#/$defs/WorkFallbackTopology"},filesystem:{$ref:"#/$defs/WorkFilesystemPolicy"},limits:{$ref:"#/$defs/WorkExecutionLimits"},maximum_duration_micros:{description:"Maximum elapsed time from execution admission to provider completion.",format:"uint64",minimum:0,type:"integer"},sandbox:{$ref:"#/$defs/WorkSandboxPolicy"}},required:["sandbox","approval","filesystem","egress","environment_allowlist","credential_references","limits","maximum_duration_micros","fallback"],type:"object"},$y={description:"A monotonically versioned control authority.",format:"uint64",minimum:0,title:"WorkRunControlAuthorityV1",type:"integer"},$g={description:"Why a run was paused or resumed. A closed vocabulary keeps the reason out\nof free text so it can be read by a projection without being a prompt.",oneOf:[{const:"operator_request",description:"An authorized operator asked for the transition.",type:"string"},{const:"human_wait",description:"The run is waiting on a human approval or answer.",type:"string"},{const:"budget_exhausted",description:"The shared budget ledger is exhausted for now.",type:"string"},{const:"recovery",description:"Recovery or failover is reconciling the run.",type:"string"}],title:"WorkRunControlReasonV1"},$_={description:'The published control state of one run.\n\nThere is no `Cancelled` here: cancellation is an attempt-level authority\nowned through the lease fence, and duplicating it as a run state would\ncreate a second place a run could be "over".',oneOf:[{const:"running",description:"New reservations are admitted.",type:"string"},{const:"paused",description:"New reservations are fenced; committed evidence is preserved.",type:"string"}],title:"WorkRunControlStateV1"},$v={additionalProperties:!1,description:"The run's deadline as of the last control transition.\n\n`remaining_micros` is the authority; `deadline` is the absolute instant that\nremaining resolves to while the run is running. Both are recorded so a\nreader never has to recompute one from a clock it does not trust.",properties:{checkpoint_at:{$ref:"#/$defs/UtcMicros",description:"The instant the checkpoint was taken."},deadline:{$ref:"#/$defs/UtcMicros",description:"The absolute deadline the run is measured against right now."},remaining_micros:{description:"Micros left against that deadline at `checkpoint_at`. Never negative,\nand never larger than the value the previous checkpoint carried.",format:"int64",type:"integer"}},required:["deadline","remaining_micros","checkpoint_at"],title:"WorkRunDeadlineCheckpointV1",type:"object"},$b={enum:["required"],type:"string"},$$={enum:["ordinal","heuristic","calibrated_range"],type:"string"},$S={additionalProperties:!1,properties:{ambiguity:{format:"uint8",maximum:255,minimum:0,type:"integer"},blast_radius:{format:"uint8",maximum:255,minimum:0,type:"integer"},complexity:{format:"uint8",maximum:255,minimum:0,type:"integer"},integration_overhead:{format:"uint8",maximum:255,minimum:0,type:"integer"},score_kind:{$ref:"#/$defs/WorkScoreKindV1"}},required:["score_kind","complexity","ambiguity","blast_radius","integration_overhead"],type:"object"},$k={additionalProperties:!1,properties:{coverage:{type:"string"},high:{format:"uint32",minimum:0,type:"integer"},likely:{format:"uint32",minimum:0,type:"integer"},low:{format:"uint32",minimum:0,type:"integer"},score_kind:{$ref:"#/$defs/WorkScoreKindV1"}},required:["score_kind","low","likely","high","coverage"],type:"object"},$w={additionalProperties:!1,properties:{attempt:{$ref:"#/$defs/WorkAttemptIdentityV1"},binding:{description:"Binds the continuation to the retrieve-evidence operation and the\nresult-shaping request fields the envelope does not echo.",type:"string"},participant_epoch:{$ref:"#/$defs/ManifestDigest"},ranking_cursor:{type:["string","null"]},source:{$ref:"#/$defs/ObservationSourceIdentityV1"},temporal_cursor:{type:["string","null"]},verified_version:{$ref:"#/$defs/VerifiedWorkGraphVersionV1"}},required:["verified_version","attempt","source","participant_epoch","binding"],type:"object"},$R={oneOf:[{properties:{evidence_digest:{$ref:"#/$defs/ManifestDigest"},observed_at:{$ref:"#/$defs/UtcMicros"},outcome:{const:"succeeded",type:"string"}},required:["outcome","evidence_digest","observed_at"],type:"object"},{properties:{evidence_digest:{$ref:"#/$defs/ManifestDigest"},observed_at:{$ref:"#/$defs/UtcMicros"},outcome:{const:"failed",type:"string"}},required:["outcome","evidence_digest","observed_at"],type:"object"},{properties:{evidence_digest:{$ref:"#/$defs/ManifestDigest"},observed_at:{$ref:"#/$defs/UtcMicros"},outcome:{const:"timed_out",type:"string"}},required:["outcome","evidence_digest","observed_at"],type:"object"},{properties:{evidence_digest:{$ref:"#/$defs/ManifestDigest"},observed_at:{$ref:"#/$defs/UtcMicros"},outcome:{const:"cancelled",type:"string"}},required:["outcome","evidence_digest","observed_at"],type:"object"}]},$P={description:"Strongly typed algorithm-tagged integrity digest: `WorkTopologyGenerationRefV1`.",type:"string"},$V={additionalProperties:!1,description:"Complete V1 policy. Partial values are intentionally impossible: callers\nmust provide the entire policy and validation rejects adapter-local defaults.",properties:{branch_naming:{$ref:"#/$defs/BranchNamingPolicyV1"},branch_topology:{$ref:"#/$defs/BranchTopologyPolicyV1"},concurrency:{$ref:"#/$defs/TopologyConcurrencyPolicyV1"},cross_merge:{$ref:"#/$defs/CrossMergePolicyV1"},escalation:{$ref:"#/$defs/TopologyEscalationPolicyV1"},gates:{$ref:"#/$defs/TopologyGatePolicyV1"},history_rewrite:{$ref:"#/$defs/HistoryRewritePolicyV1"},notifications:{$ref:"#/$defs/TopologyNotificationLevelV1"},placement:{$ref:"#/$defs/WorktreePlacementModeV1"},protected_refs:{items:{$ref:"#/$defs/ProtectedRefRuleV1"},type:"array"},retention:{$ref:"#/$defs/WorktreeRetentionPolicyV1"},review_topology:{$ref:"#/$defs/ReviewTopologyPolicyV1"},roots:{items:{$ref:"#/$defs/WorktreeRootPolicyV1"},type:"array"},schema_version:{format:"uint16",maximum:65535,minimum:0,type:"integer"}},required:["schema_version","placement","roots","branch_topology","review_topology","branch_naming","concurrency","cross_merge","gates","protected_refs","history_rewrite","escalation","retention","notifications"],type:"object"},$q={additionalProperties:!1,properties:{definition_id:{$ref:"#/$defs/WorkflowDefinitionId"},definition_version:{format:"uint64",minimum:0,type:"integer"},pinned_catalog_digest:{$ref:"#/$defs/ManifestDigest",description:"Must equal the live Work executable catalog digest. Validation and\nactivation report the current digest when this pin is stale."},pinned_configuration_digest:{$ref:"#/$defs/ManifestDigest"},pinned_policy_digest:{$ref:"#/$defs/ManifestDigest"},project_id:{$ref:"#/$defs/ProjectId"},steps:{items:{$ref:"#/$defs/WorkflowStep"},type:"array"}},required:["definition_id","definition_version","project_id","steps","pinned_policy_digest","pinned_configuration_digest","pinned_catalog_digest"],type:"object"},$I={description:"Strongly typed canonical identity: `WorkflowDefinitionId`.",type:"string"},$x={additionalProperties:!1,properties:{max_width:{format:"uint32",minimum:0,type:"integer"}},required:["max_width"],type:"object"},$j={description:"Strongly typed canonical identity: `WorkflowOperationRef`.",type:"string"},$C={description:"Strongly typed canonical identity: `WorkflowOutputName`.",type:"string"},$T={additionalProperties:!1,properties:{output_name:{$ref:"#/$defs/WorkflowOutputName"},producer_step_id:{$ref:"#/$defs/WorkflowStepId"}},required:["producer_step_id","output_name"],type:"object"},$O={additionalProperties:!1,properties:{fan_out:{anyOf:[{$ref:"#/$defs/WorkflowFanOut"},{type:"null"}]},inputs:{items:{$ref:"#/$defs/WorkflowOutputReference"},type:"array"},operation:{$ref:"#/$defs/WorkflowOperationRef"},outputs:{items:{$ref:"#/$defs/WorkflowOutputName"},type:"array"},predecessors:{items:{$ref:"#/$defs/WorkflowStepId"},type:"array",uniqueItems:!0},step_id:{$ref:"#/$defs/WorkflowStepId"}},required:["step_id","operation","predecessors","inputs","outputs"],type:"object"},$E={description:"Strongly typed canonical identity: `WorkflowStepId`.",type:"string"},$A={enum:["require_clean","allow_untracked_only_for_preflight","read_only_preflight_only"],type:"string"},$M={description:"Strongly typed canonical identity: `WorktreeId`.",type:"string"},$W={description:"Monotonic epoch of the worktree inventory frozen into a stack revision.",format:"uint64",minimum:0,type:"integer"},$N={description:"Strongly typed canonical identity: `WorktreeInventorySnapshotId`.",type:"string"},$z={oneOf:[{properties:{kind:{const:"existing_worktree_only",type:"string"}},required:["kind"],type:"object"},{properties:{kind:{const:"sibling_of_primary_checkout",type:"string"}},required:["kind"],type:"object"},{properties:{kind:{const:"repository_local_root",type:"string"}},required:["kind"],type:"object"},{properties:{kind:{const:"configured_root",type:"string"},root_id:{type:"string"}},required:["kind","root_id"],type:"object"}]},$D={additionalProperties:!1,properties:{abandoned_retention_seconds:{format:"uint64",minimum:1,type:["integer","null"]},automatic_gc:{$ref:"#/$defs/AutomaticWorktreeGcV1"},maximum_retained_per_repository:{format:"uint16",maximum:65535,minimum:1,type:["integer","null"]},terminal_retention_seconds:{format:"uint64",minimum:1,type:["integer","null"]}},required:["automatic_gc"],type:"object"},$F={additionalProperties:!1,properties:{locator:{$ref:"#/$defs/SensitiveFilesystemLocatorV1"},maximum_active_worktrees:{format:"uint16",maximum:65535,minimum:1,type:"integer"},repository_scope:{$ref:"#/$defs/RepositoryPlacementScopeV1"},root_id:{type:"string"}},required:["root_id","locator","repository_scope","maximum_active_worktrees"],type:"object"},$L=[{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,title:"ActiveProjectSurfaceRequestV1",type:"object"},{$defs:{ActiveProjectBranchV1:{additionalProperties:!1,properties:{branch_drifted:{type:"boolean"},branch_resolution:{type:"string"},current_branch:{type:["string","null"]},open_active_branch:{type:["string","null"]},serving_branch:{type:["string","null"]},tracked_branch_count:{format:"uint",minimum:0,type:"integer"},warnings:{items:{type:"string"},type:"array"}},required:["branch_resolution","branch_drifted","tracked_branch_count","warnings"],type:"object"},ActiveProjectResolutionSourceV1:{enum:["active_project"],type:"string"},ActiveProjectStorageV1:{additionalProperties:!1,properties:{class:{type:"string"},data_root:{type:"string"},graph_db_exists:{type:"boolean"},graph_db_path:{type:"string"},graph_db_size_bytes:{format:"uint64",minimum:0,type:"integer"},lcm_payload_root:{type:"string"},mode:{type:"string"},response_handle_root:{type:"string"},sessions_db_path:{type:"string"}},required:["class","mode","data_root","graph_db_path","graph_db_exists","graph_db_size_bytes","sessions_db_path","response_handle_root","lcm_payload_root"],type:"object"}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"The resolved active project of this MCP session.",properties:{branch:{$ref:"#/$defs/ActiveProjectBranchV1"},project_id:{type:["string","null"]},project_root:{type:"string"},repository_id:{type:"string"},resolution_source:{$ref:"#/$defs/ActiveProjectResolutionSourceV1"},scope_prefix:{type:["string","null"]},storage:{$ref:"#/$defs/ActiveProjectStorageV1"}},required:["repository_id","project_root","resolution_source","storage","branch"],title:"ActiveProjectResultV1",type:"object"},{$defs:{AdminCliScopeV1:{description:"What a cost or analytics action reads: the served project's ledgers and\nsessions, or the whole profile's.",enum:["project","profile"],type:"string"}},$schema:"https://json-schema.org/draft/2020-12/schema",oneOf:[{additionalProperties:!1,description:"Savings and provider-usage cost over `range` (`today`, `7d`, ...).",properties:{action:{const:"cost_summary",type:"string"},range:{type:"string"},scope:{$ref:"#/$defs/AdminCliScopeV1"}},required:["action","range","scope"],type:"object"},{additionalProperties:!1,description:"Import every host's transcripts into the project's session store.",properties:{action:{const:"sessions_import",type:"string"}},required:["action"],type:"object"},{additionalProperties:!1,description:"Converge project sessions with Git history.",properties:{action:{const:"sessions_git_sync",type:"string"},dry_run:{type:"boolean"},limit_sessions:{format:"uint",minimum:0,type:"integer"},since:{format:"int64",type:"integer"}},required:["action","since","limit_sessions","dry_run"],type:"object"},{additionalProperties:!1,properties:{action:{const:"sessions_sync_status",type:"string"},idempotency_key:{type:"string"}},required:["action","idempotency_key"],type:"object"},{additionalProperties:!1,properties:{action:{const:"sessions_sync_cancel",type:"string"},idempotency_key:{type:"string"}},required:["action","idempotency_key"],type:"object"},{additionalProperties:!1,properties:{action:{const:"sessions_unfinished",type:"string"},limit:{format:"uint",minimum:0,type:"integer"}},required:["action","limit"],type:"object"},{additionalProperties:!1,description:"Import hook analytics JSONL into the accounting ledger.",properties:{action:{const:"analytics_sync",type:"string"},scope:{$ref:"#/$defs/AdminCliScopeV1"}},required:["action","scope"],type:"object"},{additionalProperties:!1,properties:{action:{const:"analytics_diagnostics",type:"string"},all:{type:"boolean"},no_sync:{type:"boolean"},scope:{$ref:"#/$defs/AdminCliScopeV1"}},required:["action","scope","all","no_sync"],type:"object"},{additionalProperties:!1,description:"Record the served project's saved-token total.",properties:{action:{const:"registry_update",type:"string"},tokens:{format:"uint64",minimum:0,type:"integer"}},required:["action","tokens"],type:"object"},{additionalProperties:!1,properties:{action:{const:"registry_list",type:"string"},limit:{format:"uint",minimum:0,type:"integer"},project_arg:{description:"Checkout to mark active when the caller's connection names no\nproject.",type:["string","null"]},query:{type:["string","null"]}},required:["action","limit"],type:"object"},{additionalProperties:!1,properties:{action:{const:"registry_context",type:"string"},project_arg:{description:"Project path or alias; the caller's project when omitted.",type:["string","null"]}},required:["action"],type:"object"},{additionalProperties:!1,properties:{action:{const:"registry_empty",type:"string"}},required:["action"],type:"object"},{additionalProperties:!1,properties:{action:{const:"registry_project_tokens",type:"string"},project_args:{items:{type:"string"},type:"array"}},required:["action","project_args"],type:"object"},{additionalProperties:!1,description:"Plan, or with `apply` execute, collection of registry rows whose\ncheckout is gone.",properties:{action:{const:"registry_gc",type:"string"},apply:{type:"boolean"},prefix:{type:["string","null"]}},required:["action","apply"],type:"object"},{additionalProperties:!1,description:"One project's storage (`project_id` with `project_root`), or one page\nof the profile's.",properties:{action:{const:"storage_report",type:"string"},cursor:{default:null,type:["string","null"]},limit:{default:8,format:"uint",minimum:0,type:"integer"},project_id:{type:["string","null"]},project_root:{type:["string","null"]}},required:["action"],type:"object"},{additionalProperties:!1,properties:{action:{const:"gain_query",type:"string"},history:{type:"boolean"},project_arg:{type:["string","null"]},since:{format:"int64",type:"integer"}},required:["action","since","history"],type:"object"}],title:"AdminCliSurfaceRequestV1"},{$defs:{AdminCliAnalyticsImportV1:{additionalProperties:!1,properties:{imported:{format:"uint64",minimum:0,type:"integer"},sources:{description:"One row per hook JSONL source: `path`, `imported`, `skipped`, `error`.",items:!0,type:"array"}},required:["imported","sources"],type:"object"},AdminCliCostSummaryV1:{additionalProperties:!1,properties:{range:{type:"string"},summary:{$ref:"#/$defs/AdminCliCostTotalsV1"},today:{$ref:"#/$defs/AdminCliCostTodayV1"}},required:["range","summary","today"],type:"object"},AdminCliCostTodayV1:{additionalProperties:!1,properties:{provider_usage:!0},required:["provider_usage"],type:"object"},AdminCliCostTotalsV1:{additionalProperties:!1,properties:{efficiency_ratio:{description:"Saved over saved-plus-consumed; null when consumption is unmeasured.",format:"double",type:["number","null"]},provider_usage:{description:"The provider-usage cost summary as the session memory prices it."},tokens_saved:{format:"uint64",minimum:0,type:"integer"}},required:["provider_usage","tokens_saved"],type:"object"},AdminCliGainDayV1:{additionalProperties:!1,properties:{calls:{format:"uint64",minimum:0,type:"integer"},day:{description:"Start-of-day epoch seconds (UTC).",format:"int64",type:"integer"},saved_tokens:{format:"uint64",minimum:0,type:"integer"}},required:["day","saved_tokens","calls"],type:"object"},AdminCliGainHistoryV1:{additionalProperties:!1,properties:{history:{items:{$ref:"#/$defs/AdminCliGainDayV1"},type:"array"}},required:["history"],type:"object"},AdminCliGainTotalV1:{additionalProperties:!1,properties:{calls:{format:"uint64",minimum:0,type:"integer"},saved_tokens:{format:"uint64",minimum:0,type:"integer"}},required:["saved_tokens","calls"],type:"object"},AdminCliProjectTokenTotalV1:{additionalProperties:!1,description:"A project whose ledger could not be read reports a null total and the\nreason, never a measured zero.",properties:{error:{type:["string","null"]},project:{type:"string"},tokens:{format:"uint64",minimum:0,type:["integer","null"]}},required:["project"],type:"object"},AdminCliProjectTokensV1:{additionalProperties:!1,properties:{projects:{items:{$ref:"#/$defs/AdminCliProjectTokenTotalV1"},type:"array"}},required:["projects"],type:"object"},AdminCliRegistryContextV1:{oneOf:[{additionalProperties:!1,properties:{aliases:{description:"Alias rows exactly as the registry serializes them.",items:!0,type:"array"},profile_id:{type:"string"},project:{$ref:"#/$defs/PublicCodeProject"},status:{const:"ok",type:"string"},stores:{description:"Store rows exactly as the registry serializes them.",items:!0,type:"array"}},required:["status","profile_id","project","aliases","stores"],type:"object"},{additionalProperties:!1,description:"The call named no project and its connection has none.",properties:{project:{type:"null"},status:{const:"invalid",type:"string"}},required:["status","project"],type:"object"},{additionalProperties:!1,properties:{project:{type:"null"},status:{const:"not_found",type:"string"}},required:["status","project"],type:"object"}]},AdminCliRegistryEmptyV1:{additionalProperties:!1,properties:{empty:{type:"boolean"}},required:["empty"],type:"object"},AdminCliRegistryGcV1:{additionalProperties:!1,description:"The registry collection plan, with its deletion counters filled when it\nwas applied.",properties:{apply:{type:"boolean"},candidate_count:{format:"uint",minimum:0,type:"integer"},candidate_paths:{items:{type:"string"},type:"array"},candidates:{description:"Registry project rows exactly as the registry serializes them.",items:!0,type:"array"},code_project_candidate_count:{format:"uint",minimum:0,type:"integer"},deleted_code_project_count:{format:"uint",minimum:0,type:"integer"},deleted_count:{format:"uint",minimum:0,type:"integer"},deleted_storage_project_count:{format:"uint",minimum:0,type:"integer"},metadata_candidate_count:{format:"uint",minimum:0,type:"integer"},prefix:{type:["string","null"]},protected_code_project_count:{format:"uint",minimum:0,type:"integer"},protected_code_projects:{items:!0,type:"array"},storage_project_candidate_count:{format:"uint",minimum:0,type:"integer"},storage_project_candidates:{items:{type:"string"},type:"array"}},required:["apply","candidate_count","metadata_candidate_count","code_project_candidate_count","storage_project_candidate_count","protected_code_project_count","deleted_count","deleted_code_project_count","deleted_storage_project_count","candidate_paths","candidates","protected_code_projects","storage_project_candidates"],type:"object"},AdminCliRegistryListV1:{oneOf:[{additionalProperties:!1,properties:{limit:{format:"uint",minimum:0,type:"integer"},project_tree:{items:{$ref:"#/$defs/ProjectRepoGroup"},type:"array"},projects:{items:{$ref:"#/$defs/PublicCodeProject"},type:"array"},query:{type:["string","null"]},status:{const:"ok",type:"string"},summary:{$ref:"#/$defs/ProjectRegistrySummary"},truncated:{type:"boolean"}},required:["status","limit","truncated","summary","project_tree","projects"],type:"object"}]},AdminCliRegistryUpdateV1:{additionalProperties:!1,properties:{current:{format:"uint64",minimum:0,type:"integer"},previous:{description:"The total before this write; null when the ledger could not be read.",format:"uint64",minimum:0,type:["integer","null"]},previous_error:{type:["string","null"]}},required:["current"],type:"object"},AdminCliSessionSyncV1:{description:"The daemon session-sync owner's answer.",oneOf:[{additionalProperties:!1,properties:{accepted_at:{$ref:"#/$defs/UtcMicros"},idempotency_key:{type:"string"},operation_id:{type:"string"},status:{const:"accepted",type:"string"}},required:["status","operation_id","idempotency_key","accepted_at"],type:"object"},{additionalProperties:!1,description:"An identical sync was already running; this call joined it.",properties:{accepted_at:{$ref:"#/$defs/UtcMicros"},idempotency_key:{type:"string"},operation_id:{type:"string"},status:{const:"joined",type:"string"}},required:["status","operation_id","idempotency_key","accepted_at"],type:"object"},{additionalProperties:!1,properties:{coalesced_primary:{type:["string","null"]},completed_at:{$ref:"#/$defs/UtcMicros"},coverage:{items:{$ref:"#/$defs/SessionSyncSourceCoverageV1"},type:"array"},failure_codes:{items:{type:"string"},type:"array"},idempotency_key:{type:"string"},operation_id:{type:"string"},source:{$ref:"#/$defs/SessionSyncSourceV1"},source_frontiers:{items:{$ref:"#/$defs/SessionSyncSourceFrontierV1"},type:"array"},stats:{$ref:"#/$defs/SessionSyncStatsV1"},status:{const:"complete",type:"string"},termination:{$ref:"#/$defs/OperationTermination"}},required:["status","operation_id","idempotency_key","source","termination","stats","coverage","source_frontiers","failure_codes","completed_at"],type:"object"},{additionalProperties:!1,properties:{status:{const:"cancelled",type:"string"}},required:["status"],type:"object"},{additionalProperties:!1,properties:{status:{const:"deadline_exceeded",type:"string"}},required:["status"],type:"object"},{additionalProperties:!1,properties:{status:{const:"wrong_scope",type:"string"}},required:["status"],type:"object"},{additionalProperties:!1,properties:{reason_code:{type:"string"},status:{const:"unavailable",type:"string"}},required:["status","reason_code"],type:"object"}]},AdminCliStorageReportV1:{additionalProperties:!1,description:"One storage report page, or one project's report.",properties:{code_generation_retention:{items:!0,type:"array"},code_generation_retention_availability:{items:!0,type:"array"},coverage:!0,full_profile_size:!0,global_db_bytes:{format:"uint64",minimum:0,type:"integer"},profile_root:{type:"string"},stores:{description:"Report rows exactly as the retention report serializes them.",items:!0,type:"array"},unregistered_bytes:{format:"uint64",minimum:0,type:"integer"},unregistered_dir_count:{format:"uint",minimum:0,type:"integer"}},required:["profile_root","stores","code_generation_retention","code_generation_retention_availability","unregistered_dir_count","unregistered_bytes","global_db_bytes","coverage"],type:"object"},AdminCliUnfinishedSessionsV1:{additionalProperties:!1,properties:{items:{description:"Workflow state rows exactly as the session store serializes them.",items:!0,type:"array"}},required:["items"],type:"object"},OperationTermination:gL,ProjectRegistryEntry:g4,ProjectRegistrySummary:g6,ProjectRepoGroup:g3,PublicCodeProject:_n,SessionSyncCoverageV1:{oneOf:[{properties:{outcome:{const:"complete",type:"string"}},required:["outcome"],type:"object"},{properties:{deferred_units:{format:"uint64",minimum:0,type:"integer"},outcome:{const:"partial",type:"string"}},required:["outcome","deferred_units"],type:"object"},{properties:{admitted_units:{format:"uint64",minimum:0,type:"integer"},outcome:{const:"backpressured",type:"string"},rejected_units:{format:"uint64",minimum:0,type:"integer"}},required:["outcome","admitted_units","rejected_units"],type:"object"}]},SessionSyncSourceCoverageV1:{properties:{coverage:{$ref:"#/$defs/SessionSyncCoverageV1"},store_scope:{type:"string"}},required:["store_scope","coverage"],type:"object"},SessionSyncSourceFrontierV1:{description:"Exact canonical observation cursor committed by one source/store authority.",properties:{committed_cursor_json:{type:"string"},scope_json:{type:"string"},source_json:{type:"string"},store_scope:{type:"string"}},required:["store_scope","source_json","scope_json","committed_cursor_json"],type:"object"},SessionSyncSourceV1:{description:"The command that started a session sync, without its options.",oneOf:[{const:"import_transcripts",description:"Hands its remaining historical catch-up to the background refresh\nworkers.",type:"string"},{const:"synchronize_git",description:"A bounded foreground pass; nothing resumes its unfinished coverage.",type:"string"}]},SessionSyncStatsV1:{properties:{commits_attributed:{format:"uint64",minimum:0,type:"integer"},messages_imported:{format:"uint64",minimum:0,type:"integer"},sessions_imported:{format:"uint64",minimum:0,type:"integer"},sessions_scanned:{format:"uint64",minimum:0,type:"integer"},skipped:{format:"uint64",minimum:0,type:"integer"},spans_written:{format:"uint64",minimum:0,type:"integer"}},required:["sessions_imported","messages_imported","sessions_scanned","spans_written","commits_attributed","skipped"],type:"object"},UtcMicros:vK},$schema:"https://json-schema.org/draft/2020-12/schema",anyOf:[{$ref:"#/$defs/AdminCliCostSummaryV1"},{$ref:"#/$defs/AdminCliSessionSyncV1"},{$ref:"#/$defs/AdminCliUnfinishedSessionsV1"},{$ref:"#/$defs/AdminCliAnalyticsImportV1"},{$ref:"#/$defs/AdminCliRegistryUpdateV1"},{$ref:"#/$defs/AdminCliRegistryListV1"},{$ref:"#/$defs/AdminCliRegistryContextV1"},{$ref:"#/$defs/AdminCliRegistryEmptyV1"},{$ref:"#/$defs/AdminCliProjectTokensV1"},{$ref:"#/$defs/AdminCliRegistryGcV1"},{$ref:"#/$defs/AdminCliStorageReportV1"},{$ref:"#/$defs/AdminCliGainHistoryV1"},{$ref:"#/$defs/AdminCliGainTotalV1"},{description:"The diagnostics report is the analytics bridge's open document; it\ndecodes last so it never claims another action's body."}],description:"One action's answer.",title:"AdminCliResultV1"},{$defs:{AutomaticFactReceiptStateV1:m6,AutomationReconcileScope:m7},$schema:"https://json-schema.org/draft/2020-12/schema",description:"Every action is a struct variant: an internally tagged unit variant would\nignore keys beside its tag instead of refusing them.",oneOf:[{additionalProperties:!1,description:"Read the project's local usage counter.",properties:{action:{const:"counter_get",type:"string"}},required:["action"],type:"object"},{additionalProperties:!1,description:"Reset the project's local usage counter to zero.",properties:{action:{const:"counter_reset",type:"string"}},required:["action"],type:"object"},{additionalProperties:!1,description:"Record the project's saved-token total in the profile registry and\nread it back beside the other projects' total.",properties:{action:{const:"status_accounting",type:"string"}},required:["action"],type:"object"},{additionalProperties:!1,description:"List terminal automatic-fact receipts.",properties:{action:{const:"automatic_fact_receipt_list",type:"string"},limit:{format:"uint",minimum:0,type:"integer"},state:{anyOf:[{$ref:"#/$defs/AutomaticFactReceiptStateV1"},{type:"null"}],description:"Only receipts in this state (default: every state)."}},required:["action","limit"],type:"object"},{additionalProperties:!1,description:"Read one automatic-fact receipt by its apply id.",properties:{action:{const:"automatic_fact_receipt_view",type:"string"},id:{type:"string"}},required:["action","id"],type:"object"},{additionalProperties:!1,description:"Reconcile automation schedulers with the saved configuration.",properties:{action:{const:"automation_reconcile",type:"string"},scope:{$ref:"#/$defs/AutomationReconcileScope"}},required:["action","scope"],type:"object"}],title:"AdminProjectSurfaceRequestV1"},{$defs:{AdminProjectCounterResetV1:{additionalProperties:!1,properties:{reset:{description:"Always true: a reset that did not settle is a refusal.",type:"boolean"}},required:["reset"],type:"object"},AdminProjectCounterV1:{additionalProperties:!1,properties:{counter:{format:"uint64",minimum:0,type:"integer"}},required:["counter"],type:"object"},AdminProjectStatusAccountingV1:{additionalProperties:!1,properties:{global_tokens_saved:{description:"Tokens the profile's other projects saved; null when they saved none.",format:"uint64",minimum:0,type:["integer","null"]},tokens_saved:{format:"uint64",minimum:0,type:"integer"}},required:["tokens_saved"],type:"object"},AutomaticFactAddRequestV1:{additionalProperties:!1,description:"The add-fact request an automatic apply recorded.",properties:{category:{$ref:"#/$defs/FactCategoryV1"},content:{type:"string"},entities:{items:{type:"string"},type:"array"},metadata:!0,source_label:{type:["string","null"]},tags:{items:{type:"string"},type:"array"},trust:{format:"double",type:"number"}},required:["content","category","tags","entities","trust","metadata"],type:"object"},AutomaticFactEvidenceV1:{additionalProperties:!1,description:"Automation evidence retained with the receipt.",properties:{evidence_hash:{type:["string","null"]},item:!0,validation:!0},type:"object"},AutomaticFactReceiptAvailabilityV1:{oneOf:[{additionalProperties:!1,properties:{state:{const:"available",type:"string"}},required:["state"],type:"object"}]},AutomaticFactReceiptListV1:{additionalProperties:!1,properties:{availability:{$ref:"#/$defs/AutomaticFactReceiptAvailabilityV1"},count:{format:"uint",minimum:0,type:"integer"},next_after_apply_id:{description:"Continue after this apply id; null on the last page.",type:["string","null"]},receipts:{items:{$ref:"#/$defs/AutomaticFactReceiptV1"},type:"array"}},required:["availability","count","receipts"],type:"object"},AutomaticFactReceiptStateV1:m6,AutomaticFactReceiptV1:{additionalProperties:!1,description:"One terminal automatic-fact apply receipt.",properties:{add_fact_request:{$ref:"#/$defs/AutomaticFactAddRequestV1"},applied_fact_id:{description:"Present when the fact was applied.",type:["string","null"]},apply_id:{type:"string"},evidence:{$ref:"#/$defs/AutomaticFactEvidenceV1"},operation_id:{type:"string"},quarantine_reason:{description:"Present when the fact was quarantined.",type:["string","null"]},recorded_at_micros:{format:"int64",type:"integer"},state:{$ref:"#/$defs/AutomaticFactReceiptStateV1"}},required:["apply_id","state","operation_id","add_fact_request","evidence","recorded_at_micros"],type:"object"},AutomaticFactReceiptViewV1:{additionalProperties:!1,properties:{receipt:{$ref:"#/$defs/AutomaticFactReceiptV1"}},required:["receipt"],type:"object"},AutomationReconcileScope:m7,AutomationSchedulerOwnerReconcileOutcome:{additionalProperties:!1,properties:{graph_db_path:{type:"string"},outcome:{$ref:"#/$defs/AutomationSchedulerReconcileOutcome"},project_id:{type:["string","null"]},scope_prefix:{type:["string","null"]},store_root:{type:"string"}},required:["store_root","graph_db_path","outcome"],type:"object"},AutomationSchedulerReconcileOutcome:{description:"What reconciling one automation scheduler did.",enum:["started","running_notified","exiting","finished","retiring","not_configured","lifecycle_inactive","owner_unavailable"],type:"string"},FactCategoryV1:hD,ProfileAutomationReconcileReport:{additionalProperties:!1,description:"Every cached project scheduler of the profile, reconciled.",properties:{cached_owners:{format:"uint",minimum:0,type:"integer"},outcomes:{items:{$ref:"#/$defs/AutomationSchedulerOwnerReconcileOutcome"},type:"array"},scope:{$ref:"#/$defs/AutomationReconcileScope",description:"Always `profile`."},uncached_projects:{$ref:"#/$defs/UncachedProjectReconcileOutcome"}},required:["scope","cached_owners","outcomes","uncached_projects"],type:"object"},ProjectAutomationReconcileReport:{additionalProperties:!1,description:"The served project's scheduler reconcile.",properties:{outcome:{$ref:"#/$defs/AutomationSchedulerReconcileOutcome"},scope:{$ref:"#/$defs/AutomationReconcileScope",description:"Always `project`."}},required:["scope","outcome"],type:"object"},UncachedProjectReconcileOutcome:{description:"A project whose scheduler is not cached reconciles when it next starts.",enum:["deferred_until_project_startup"],type:"string"}},$schema:"https://json-schema.org/draft/2020-12/schema",anyOf:[{$ref:"#/$defs/AdminProjectCounterV1"},{$ref:"#/$defs/AdminProjectCounterResetV1"},{$ref:"#/$defs/AdminProjectStatusAccountingV1"},{$ref:"#/$defs/AutomaticFactReceiptListV1"},{$ref:"#/$defs/AutomaticFactReceiptViewV1"},{$ref:"#/$defs/ProjectAutomationReconcileReport"},{$ref:"#/$defs/ProfileAutomationReconcileReport"}],description:"One action's result, in the shape the action has always answered.",title:"AdminProjectResultV1"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"`tracedecay_admin_sync` takes no arguments: it reconciles the served\nproject.",title:"AdminSyncSurfaceRequestV1",type:"object"},{$defs:{AdminSyncAdmissionV1:{description:"The code-index scheduler's admission of the reconcile.",oneOf:[{enum:["queued"],type:"string"},{const:"not_applicable",description:"Code indexing does not apply to this project.",type:"string"}]},AdminSyncReconcileScopeV1:{description:"What the reconcile covers.",enum:["authoritative_project"],type:"string"}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{project_root:{type:"string"},reconcile_scope:{$ref:"#/$defs/AdminSyncReconcileScopeV1"},status:{$ref:"#/$defs/AdminSyncAdmissionV1"}},required:["reconcile_scope","status","project_root"],title:"AdminSyncResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{depth:{description:"Maximum dependency traversal depth (default: 5, at most 10).",format:"uint32",minimum:0,type:["integer","null"]},files:{description:"List of changed file paths to analyze.",items:{type:"string"},type:"array"},filter:{description:"Custom glob pattern for test files (default: common test patterns).",type:["string","null"]}},required:["files"],title:"AffectedSurfaceRequestV1",type:"object"},{$defs:{AffectedRankingMetadataV1:{additionalProperties:!1,properties:{compatibility_field:{type:"string"},distance:{type:"string"},recommended_proximity:{items:{type:"string"},type:"array"},strategy:{type:"string"}},required:["strategy","distance","recommended_proximity","compatibility_field"],type:"object"},CodeIndexBuildBlockedReasonV1:fE,CodeIndexConvergenceParkedV1:fA,CodeIndexStalenessStateV1:fz,PrimitiveFreshnessStateV1:gG,PrimitiveIndexingStateV1:gB,PrimitiveSearchFreshnessV1:gQ,RankedAffectedTestV1:{additionalProperties:!1,properties:{distance:{format:"uint",minimum:0,type:"integer"},path:{type:"string"},proximity:{type:"string"},rank:{format:"uint",minimum:0,type:"integer"}},required:["path","rank","distance","proximity"],type:"object"}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{affected_tests:{items:{type:"string"},type:"array"},changed_files:{items:{type:"string"},type:"array"},count:{format:"uint",minimum:0,type:"integer"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},ranked_tests:{items:{$ref:"#/$defs/RankedAffectedTestV1"},type:"array"},ranking_metadata:{$ref:"#/$defs/AffectedRankingMetadataV1"},recommended_tests:{description:"Tests within two dependency hops of a changed file.",items:{type:"string"},type:"array"}},required:["changed_files","affected_tests","count","ranked_tests","recommended_tests","ranking_metadata"],title:"AffectedResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Opaque daemon-minted handle accepted by the first feedback read invocation.",properties:{request_handle:{type:"string"}},required:["request_handle"],title:"FeedbackHandleRequestV1",type:"object"},{$defs:{AgentInstanceId:mN,CodeGenerationId:fT,CommitId:fH,FeedbackContentIdentityV1:h9,FeedbackCycleId:h5,FeedbackImpactStateV1:ys,FeedbackResultId:yc,FeedbackScopeV1:yl,FeedbackTargetV1:yp,FileOccurrenceId:yu,HostInstanceId:yH,ManifestDigest:gl,ProjectId:g2,RepositoryId:_v,RetrievalAnchorId:_q,SessionId:_5,SourceSpan:vb,SymbolOccurrenceId:vV,WorktreeId:$M},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Canonical affected-tests projection returned by `affected_tests`.",properties:{affected_tests:{items:{$ref:"#/$defs/SymbolOccurrenceId"},type:"array"},content_identity:{anyOf:[{$ref:"#/$defs/FeedbackContentIdentityV1"},{type:"null"}]},cycle_id:{$ref:"#/$defs/FeedbackCycleId"},evidence_anchors:{items:{$ref:"#/$defs/RetrievalAnchorId"},type:"array"},result_id:{$ref:"#/$defs/FeedbackResultId"},scope:{$ref:"#/$defs/FeedbackScopeV1"},state:{anyOf:[{$ref:"#/$defs/FeedbackImpactStateV1"},{type:"null"}]},target:{anyOf:[{$ref:"#/$defs/FeedbackTargetV1"},{type:"null"}]}},required:["result_id","cycle_id","scope","affected_tests","evidence_anchors"],title:"CanonicalAffectedTestsProjectionV1",type:"object"},{$defs:{AnalyticsScopeV1:mL,AnalyticsSectionV1:{enum:["tools","hints","facts","automation"],type:"string"}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{scope:{anyOf:[{$ref:"#/$defs/AnalyticsScopeV1"},{type:"null"}],description:'"project" (default) scopes analytics_events to the resolved project;\n"all" reports across every registered project.'},section:{anyOf:[{$ref:"#/$defs/AnalyticsSectionV1"},{type:"null"}],description:"Optional filter to a single section. Omit to return all sections."},window_days:{description:"Lookback window in days for events and automation runs (default: 14,\n1-365).",format:"uint32",maximum:365,minimum:1,type:["integer","null"]}},title:"AnalyticsSurfaceRequestV1",type:"object"},{$defs:{AnalyticsAutomationJobOutcomesV1:{additionalProperties:!1,properties:{failed:{format:"int64",type:"integer"},job:{type:"string"},other:{format:"int64",type:"integer"},skipped:{format:"int64",type:"integer"},succeeded:{format:"int64",type:"integer"}},required:["job","succeeded","failed","skipped","other"],type:"object"},AnalyticsAutomationOutcomesV1:{additionalProperties:!1,description:"`available` is always `true`.",properties:{available:{type:"boolean"},by_job:{items:{$ref:"#/$defs/AnalyticsAutomationJobOutcomesV1"},type:"array"},dashboard_root:{type:"string"},records_considered:{format:"uint",minimum:0,type:"integer"},records_in_window:{format:"uint",minimum:0,type:"integer"},records_truncated:{type:"boolean"}},required:["available","dashboard_root","records_considered","records_in_window","records_truncated","by_job"],type:"object"},AnalyticsAutomationSectionV1:{anyOf:[{$ref:"#/$defs/AnalyticsAutomationOutcomesV1"},{$ref:"#/$defs/AnalyticsLedgerUnavailableV1"},{$ref:"#/$defs/AnalyticsSectionUnavailableV1"}],description:"The automation run outcomes of the resolved project's ledger, or why the\nledger is unavailable."},AnalyticsCanonicalCallNameV1:{additionalProperties:!1,description:"A recorded event name that resolved to a canonical tool under another\nspelling.",properties:{calls:{format:"int64",type:"integer"},canonical_tool_name:{type:"string"},errors:{format:"int64",type:"integer"},event_name:{type:"string"}},required:["event_name","canonical_tool_name","calls","errors"],type:"object"},AnalyticsEventCallNameV1:{additionalProperties:!1,description:"A recorded event name with no advertised canonical tool.",properties:{calls:{format:"int64",type:"integer"},errors:{format:"int64",type:"integer"},event_name:{type:"string"}},required:["event_name","calls","errors"],type:"object"},AnalyticsFactFunnelV1:{additionalProperties:!1,description:"`available` is always `true`.",properties:{available:{type:"boolean"},facts:{format:"uint64",minimum:0,type:"integer"},facts_rated:{format:"uint64",minimum:0,type:"integer"},facts_retrieved:{format:"uint64",minimum:0,type:"integer"},helpful_feedback:{format:"uint64",minimum:0,type:"integer"},project_root:{type:"string"},retrievals:{format:"uint64",minimum:0,type:"integer"},unhelpful_feedback:{format:"uint64",minimum:0,type:"integer"}},required:["available","project_root","facts","retrievals","facts_retrieved","helpful_feedback","unhelpful_feedback","facts_rated"],type:"object"},AnalyticsFactsSectionV1:{anyOf:[{$ref:"#/$defs/AnalyticsFactFunnelV1"},{$ref:"#/$defs/AnalyticsProjectSectionUnavailableV1"},{$ref:"#/$defs/AnalyticsSectionUnavailableV1"}],description:"The fact-store funnel of the resolved project, or why it is unavailable.\n\nThe variants are distinguished by their exact field sets, so each one\ndenies unknown fields and the most specific shape is tried first."},AnalyticsHintCategoryV1:{properties:{category:{type:"string"},emitted:{format:"int64",type:"integer"},followed:{format:"int64",type:"integer"},ignored:{format:"int64",type:"integer"},suppressed:{format:"int64",type:"integer"}},required:["category","emitted","followed","ignored","suppressed"],type:"object"},AnalyticsHintsPayloadV1:{properties:{available:{type:"boolean"},by_category:{items:{$ref:"#/$defs/AnalyticsHintCategoryV1"},type:"array"},error:{default:null,type:["string","null"]},source:{type:"string"}},required:["available","source","by_category"],type:"object"},AnalyticsLedgerUnavailableV1:{additionalProperties:!1,description:"The ledger exists but failed to read. `available` is always `false`.",properties:{available:{type:"boolean"},dashboard_root:{type:"string"},reason:{type:"string"}},required:["available","reason","dashboard_root"],type:"object"},AnalyticsModeReadModelV1:mD,AnalyticsModeV1:mF,AnalyticsProjectSectionUnavailableV1:{additionalProperties:!1,description:"A project-scoped section whose store failed to read. `available` is\nalways `false`.",properties:{available:{type:"boolean"},project_root:{type:"string"},reason:{type:"string"}},required:["available","reason","project_root"],type:"object"},AnalyticsReportStatusV1:{description:"The settled status of an analytics report.",enum:["ok"],type:"string"},AnalyticsScopeV1:mL,AnalyticsSectionUnavailableV1:{additionalProperties:!1,description:"A section the report could not read. `available` is always `false`.",properties:{available:{type:"boolean"},reason:{type:"string"}},required:["available","reason"],type:"object"},AnalyticsTierCountsV1:{additionalProperties:!1,properties:{calls:{format:"int64",type:"integer"},errors:{format:"int64",type:"integer"},tier:{type:"string"}},required:["tier","calls","errors"],type:"object"},AnalyticsToolsSectionV1:{additionalProperties:!1,properties:{aliased_call_names:{items:{$ref:"#/$defs/AnalyticsCanonicalCallNameV1"},type:"array"},available:{type:"boolean"},available_defined_tool_count:{format:"uint",minimum:0,type:"integer"},bound_internal_call_names:{items:{$ref:"#/$defs/AnalyticsEventCallNameV1"},type:"array"},called_available_defined_tool_count:{format:"uint",minimum:0,type:"integer"},maximal_defined_tool_count:{format:"uint",minimum:0,type:"integer"},raw_distinct_event_name_count:{format:"uint",minimum:0,type:"integer"},tiers:{items:{$ref:"#/$defs/AnalyticsTierCountsV1"},type:"array"},top_tools:{items:{$ref:"#/$defs/AnalyticsTopToolV1"},type:"array"},unavailable_public_call_names:{items:{$ref:"#/$defs/AnalyticsCanonicalCallNameV1"},type:"array"},unknown_or_retired_call_names:{items:{$ref:"#/$defs/AnalyticsEventCallNameV1"},type:"array"},zero_call_available_defined_tools:{$ref:"#/$defs/AnalyticsZeroCallToolsV1"}},required:["available","tiers","top_tools","raw_distinct_event_name_count","called_available_defined_tool_count","available_defined_tool_count","maximal_defined_tool_count","aliased_call_names","bound_internal_call_names","unavailable_public_call_names","unknown_or_retired_call_names","zero_call_available_defined_tools"],type:"object"},AnalyticsTopToolV1:{additionalProperties:!1,properties:{calls:{format:"int64",type:"integer"},errors:{format:"int64",type:"integer"},tier:{type:"string"},tool_name:{type:"string"}},required:["tool_name","tier","calls","errors"],type:"object"},AnalyticsZeroCallToolsV1:{additionalProperties:!1,properties:{count:{format:"uint",minimum:0,type:"integer"},sample:{items:{type:"string"},type:"array"},sample_truncated:{type:"boolean"}},required:["count","sample","sample_truncated"],type:"object"},ComparisonDispositionV1:fG,CostsReadModelV1:hw,CoverageStateV1:hV,LatencyDistributionReadModelV1:yJ,MetricCalibrationV1:gh,MetricCohortV1:gy,MetricCoverageV1:gg,MetricEvidenceClassV1:g_,MetricProvenanceV1:gv,MetricSourceV1:gb,MetricTemporalV1:g$,MetricUncertaintyV1:gS,MetricValueV1:gk,ObservabilityHorizonV1:gM,ObservatoryReadModelV1:gN,PerformanceComparisonReadModelV1:gH,ProviderLatencyReadModelV1:_o,RejectedArgumentAnalyticsV1:_f,RejectedArgumentErrorClassV1:_h,RejectedArgumentGroupV1:_y,RejectedArgumentNameV1:_g,RejectedArgumentSurfaceV1:__},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{automation:{anyOf:[{$ref:"#/$defs/AnalyticsAutomationSectionV1"},{type:"null"}]},costs:{anyOf:[{$ref:"#/$defs/CostsReadModelV1"},{type:"null"}],description:"Present only when no section filter was requested."},event_count:{format:"int64",type:"integer"},event_count_truncated:{type:"boolean"},facts:{anyOf:[{$ref:"#/$defs/AnalyticsFactsSectionV1"},{type:"null"}]},hints:{anyOf:[{$ref:"#/$defs/AnalyticsHintsPayloadV1"},{type:"null"}]},observatory:{anyOf:[{$ref:"#/$defs/ObservatoryReadModelV1"},{type:"null"}],description:"Present only when no section filter was requested."},project_id:{description:'The canonical analytics project key; `None` for `scope: "all"`.',type:["string","null"]},project_root:{type:"string"},scope:{$ref:"#/$defs/AnalyticsScopeV1"},since:{format:"int64",type:"integer"},status:{$ref:"#/$defs/AnalyticsReportStatusV1"},tools:{anyOf:[{$ref:"#/$defs/AnalyticsToolsSectionV1"},{type:"null"}]},window_days:{format:"uint32",minimum:0,type:"integer"}},required:["status","scope","project_root","window_days","since","event_count","event_count_truncated"],title:"AnalyticsResultV1",type:"object"},{$defs:{ManifestDigest:gl,NativeIntegrationApprovalId:gP,NativeIntegrationPreviewId:gI,NativeIntegrationTransactionId:gT},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Exact one-use apply request.\n\nApply accepts only an unexpired preview identity/digest plus a one-use\ncontent-bound approval. Arbitrary Git arguments, caller-supplied paths,\nSHAs, patches, commit lists, messages, environment, or config are\nunrepresentable.",properties:{approval_digest:{$ref:"#/$defs/ManifestDigest"},approval_id:{$ref:"#/$defs/NativeIntegrationApprovalId"},preview_digest:{$ref:"#/$defs/ManifestDigest"},preview_id:{$ref:"#/$defs/NativeIntegrationPreviewId"},transaction_id:{$ref:"#/$defs/NativeIntegrationTransactionId"}},required:["preview_id","preview_digest","approval_id","approval_digest","transaction_id"],title:"NativeIntegrationApplySurfaceRequest",type:"object"},{$defs:{ActorId:mW,BranchStackEdgeV1:fu,BranchStackId:fm,BranchStackNodeV1:ff,BranchStackRevisionId:fh,BranchStackRevisionV1:fy,BranchStackSourceV1:fg,CapabilityId:fV,CodeGenerationId:fT,CommitId:fH,ContentDigest:f6,GitOidV1:yx,GitOperationStateV1:yj,ManifestDigest:gl,MechanicalIntegrationModeV1:gp,NativeIntegrationAnalysisAnchorV1:{additionalProperties:!1,description:"Source-local anchor for a semantic conflict finding.",properties:{generation_id:{$ref:"#/$defs/CodeGenerationId"},logical_path:{type:"string"},source_span:{$ref:"#/$defs/SourceSpan"}},required:["generation_id","logical_path","source_span"],type:"object"},NativeIntegrationAnalysisCoverageV1:{description:"Completeness of one independently evaluated semantic evidence lane.",enum:["complete","partial","unsupported"],type:"string"},NativeIntegrationAnalysisGapV1:{description:"Why one semantic evidence lane cannot authorize integration.",enum:["parser_failure","unresolved_required_edge","withheld_source","stale_evidence","unsupported_language","dynamic_schema","unbound_migration_order","capacity_unavailable","authority_unavailable"],type:"string"},NativeIntegrationAnalysisLaneV1:{additionalProperties:!1,description:"Coverage and exact gaps for one independently evaluated analysis lane.",properties:{coverage:{$ref:"#/$defs/NativeIntegrationAnalysisCoverageV1"},gaps:{items:{$ref:"#/$defs/NativeIntegrationAnalysisGapV1"},type:"array"}},required:["coverage","gaps"],type:"object"},NativeIntegrationAnalysisReportV1:{additionalProperties:!1,description:"Daemon-produced semantic evidence for one exact native candidate tree.",properties:{analyzer_revision:{type:"string"},candidate:{$ref:"#/$defs/NativeIntegrationGenerationBindingV1"},conflicts:{items:{$ref:"#/$defs/NativeIntegrationSemanticConflictV1"},type:"array"},destination:{$ref:"#/$defs/NativeIntegrationGenerationBindingV1"},digest:{$ref:"#/$defs/ManifestDigest"},graph:{$ref:"#/$defs/NativeIntegrationAnalysisLaneV1"},merge_base:{$ref:"#/$defs/NativeIntegrationGenerationBindingV1"},migrations:{$ref:"#/$defs/NativeIntegrationAnalysisLaneV1"},schema:{$ref:"#/$defs/NativeIntegrationAnalysisLaneV1"},source:{$ref:"#/$defs/NativeIntegrationGenerationBindingV1"},tests:{$ref:"#/$defs/NativeIntegrationAnalysisLaneV1"}},required:["merge_base","source","destination","candidate","graph","tests","schema","migrations","conflicts","analyzer_revision","digest"],type:"object"},NativeIntegrationApprovalId:gP,NativeIntegrationDirectionV1:gV,NativeIntegrationGenerationBindingV1:{additionalProperties:!1,description:"One immutable code-generation binding used by native integration analysis.",properties:{content_identity:{$ref:"#/$defs/ContentDigest"},generation_id:{$ref:"#/$defs/CodeGenerationId"},project_id:{$ref:"#/$defs/ProjectId"},reference:{anyOf:[{$ref:"#/$defs/RefId"},{type:"null"}]},repository_id:{$ref:"#/$defs/RepositoryId"},seal_digest:{$ref:"#/$defs/ManifestDigest"},snapshot_digest:{$ref:"#/$defs/ManifestDigest"},source_revision:{anyOf:[{$ref:"#/$defs/GitOidV1"},{type:"null"}]},source_tree:{$ref:"#/$defs/GitOidV1"},worktree_id:{anyOf:[{$ref:"#/$defs/WorktreeId"},{type:"null"}]}},required:["generation_id","project_id","repository_id","snapshot_digest","content_identity","source_tree","seal_digest"],type:"object"},NativeIntegrationPhaseV1:{description:"Durable transaction phase. `RefCommitStarted` is the cancellation boundary.",enum:["prepared","candidate_verified","ref_commit_started","final_state_verification","terminal"],type:"string"},NativeIntegrationPreviewDispositionV1:gq,NativeIntegrationPreviewId:gI,NativeIntegrationSealedStackSnapshotV1:gx,NativeIntegrationSelectionBindingV1:gj,NativeIntegrationSemanticConflictKindV1:{description:"Static conflict class produced from canonical generation evidence.",enum:["divergent_symbol","signature_dependent","test_write_interaction","divergent_schema","migration_order"],type:"string"},NativeIntegrationSemanticConflictV1:{additionalProperties:!1,description:"One deterministic conflict finding with source evidence from both branches.",properties:{destination:{$ref:"#/$defs/NativeIntegrationAnalysisAnchorV1"},evidence_digest:{$ref:"#/$defs/ManifestDigest"},kind:{$ref:"#/$defs/NativeIntegrationSemanticConflictKindV1"},source:{$ref:"#/$defs/NativeIntegrationAnalysisAnchorV1"}},required:["kind","source","destination","evidence_digest"],type:"object"},NativeIntegrationSnapshotProjectionV1:{additionalProperties:!1,description:"Bounded projection of one frozen selection.",properties:{destination_ref:{$ref:"#/$defs/RefId"},frozen_at:{$ref:"#/$defs/UtcMicros"},inventory_epoch:{$ref:"#/$defs/WorktreeInventoryEpoch"},project_id:{$ref:"#/$defs/ProjectId"},repository_id:{$ref:"#/$defs/RepositoryId"},selection_digest:{$ref:"#/$defs/ManifestDigest"},source_ref:{$ref:"#/$defs/RefId"}},required:["selection_digest","project_id","repository_id","source_ref","destination_ref","inventory_epoch","frozen_at"],type:"object"},NativeIntegrationStatusProjectionV1:{additionalProperties:!1,description:"Bounded projection of one durable transaction status.",properties:{cancellation_requested:{type:"boolean"},destination_ref:{$ref:"#/$defs/RefId"},phase:{$ref:"#/$defs/NativeIntegrationPhaseV1"},phase_revision:{format:"uint64",minimum:0,type:"integer"},preview_digest:{$ref:"#/$defs/ManifestDigest"},preview_id:{$ref:"#/$defs/NativeIntegrationPreviewId"},repository_id:{$ref:"#/$defs/RepositoryId"},terminal_outcome:{anyOf:[{$ref:"#/$defs/NativeIntegrationTerminalOutcomeV1"},{type:"null"}]},transaction_id:{$ref:"#/$defs/NativeIntegrationTransactionId"},updated_at:{$ref:"#/$defs/UtcMicros"}},required:["transaction_id","preview_id","preview_digest","repository_id","destination_ref","phase","phase_revision","cancellation_requested","updated_at"],type:"object"},NativeIntegrationSurfaceUnavailableV1:{description:"Why a native-integration operation produced no advancing state.\n\nEvery variant is read-only and truthful. None of them authorizes apply, and\na denied or absent target is reported indistinguishably from an unavailable\nauthority so no identity, path, count, or topology leaks.",oneOf:[{enum:["partial","stale","denied","reset_required","durability_uncertain","cancelled","approval_conflict","transaction_conflict","recovery_required","needs_inspection","unknown_transaction"],type:"string"},{const:"authority_unmounted",description:"No native-integration runtime authority is mounted for this daemon.",type:"string"}]},NativeIntegrationTerminalOutcomeV1:gC,NativeIntegrationTransactionId:gT,NativeIntegrationUnavailabilityV1:gO,NativeWorktreeSurfaceResultV1:{oneOf:[{oneOf:[{properties:{coverage:{$ref:"#/$defs/WorktreeCoverageV1"},digest:{$ref:"#/$defs/ManifestDigest"},entries:{items:{$ref:"#/$defs/WorktreeInventoryEntryV1"},type:"array"},epoch:{$ref:"#/$defs/WorktreeInventoryEpoch"},observed_at:{$ref:"#/$defs/UtcMicros"},scope_set_digest:{$ref:"#/$defs/ManifestDigest"},scope_set_id:{$ref:"#/$defs/ScopeSetId"},scope_set_revision:{$ref:"#/$defs/ScopeSetRevision"},snapshot_id:{$ref:"#/$defs/WorktreeInventorySnapshotId"},state:{const:"snapshot",type:"string"}},required:["state","scope_set_id","scope_set_revision","scope_set_digest","snapshot_id","epoch","entries","coverage","observed_at","digest"],type:"object"},{properties:{state:{const:"stale",type:"string"}},required:["state"],type:"object"},{properties:{state:{const:"denied",type:"string"}},required:["state"],type:"object"},{properties:{state:{const:"unavailable",type:"string"}},required:["state"],type:"object"}],properties:{operation:{const:"inventory",type:"string"}},required:["operation"],type:"object"},{oneOf:[{properties:{clean:{$ref:"#/$defs/WorktreeObservationV1",description:"Whether Git status contains no tracked or untracked changes."},head:{anyOf:[{$ref:"#/$defs/GitOidV1"},{type:"null"}]},holder:{$ref:"#/$defs/WorktreeObservationV1"},inspection_digest:{$ref:"#/$defs/ManifestDigest"},kind:{anyOf:[{$ref:"#/$defs/WorktreeKindV1"},{type:"null"}]},locked:{$ref:"#/$defs/WorktreeObservationV1"},observed_at:{$ref:"#/$defs/UtcMicros"},operation_state:{anyOf:[{$ref:"#/$defs/GitOperationStateV1"},{type:"null"}]},presence:{$ref:"#/$defs/WorktreePresenceV1"},reference:{anyOf:[{$ref:"#/$defs/RefId"},{type:"null"}]},state:{const:"inspection",type:"string"},target:{$ref:"#/$defs/NativeWorktreeTargetV1"},unique_data:{$ref:"#/$defs/WorktreeObservationV1"},worktree_id:{$ref:"#/$defs/WorktreeId"}},required:["state","target","presence","worktree_id","clean","locked","holder","unique_data","observed_at","inspection_digest"],type:"object"},{properties:{state:{const:"stale",type:"string"}},required:["state"],type:"object"},{properties:{state:{const:"foreign",type:"string"}},required:["state"],type:"object"},{properties:{state:{const:"denied",type:"string"}},required:["state"],type:"object"},{properties:{state:{const:"unavailable",type:"string"}},required:["state"],type:"object"}],properties:{operation:{const:"inspection",type:"string"}},required:["operation"],type:"object"},{oneOf:[{properties:{confirmation_digest:{$ref:"#/$defs/ManifestDigest"},confirmed_at:{$ref:"#/$defs/UtcMicros"},inspection_digest:{$ref:"#/$defs/ManifestDigest"},state:{const:"confirmed",type:"string"},target:{$ref:"#/$defs/NativeWorktreeTargetV1"}},required:["state","target","inspection_digest","confirmation_digest","confirmed_at"],type:"object"},{properties:{state:{const:"stale",type:"string"}},required:["state"],type:"object"},{properties:{state:{const:"denied",type:"string"}},required:["state"],type:"object"},{properties:{state:{const:"needs_inspection",type:"string"}},required:["state"],type:"object"},{properties:{state:{const:"unavailable",type:"string"}},required:["state"],type:"object"}],properties:{operation:{const:"confirmation",type:"string"}},required:["operation"],type:"object"},{$ref:"#/$defs/WorktreeCleanupRemovalV1",properties:{operation:{const:"removal",type:"string"}},required:["operation"],type:"object"},{$ref:"#/$defs/WorktreeCleanupReconciliationV1",properties:{operation:{const:"reconciliation",type:"string"}},required:["operation"],type:"object"}]},NativeWorktreeTargetV1:gE,ProjectId:g2,RefId:_u,RepositoryId:_v,ResolvedScope:_k,ScopeSetId:_Q,ScopeSetRevision:_X,SourceSpan:vb,StackNodeId:vk,UtcMicros:vK,WorktreeCleanupReconciliationV1:{oneOf:[{properties:{confirmation_digest:{$ref:"#/$defs/ManifestDigest"},observed_at:{$ref:"#/$defs/UtcMicros"},state:{const:"removed",type:"string"}},required:["state","confirmation_digest","observed_at"],type:"object"},{properties:{state:{const:"still_present",type:"string"}},required:["state"],type:"object"},{properties:{state:{const:"durability_uncertain",type:"string"}},required:["state"],type:"object"},{properties:{state:{const:"stale",type:"string"}},required:["state"],type:"object"},{properties:{state:{const:"denied",type:"string"}},required:["state"],type:"object"},{properties:{state:{const:"unavailable",type:"string"}},required:["state"],type:"object"}]},WorktreeCleanupRemovalV1:{oneOf:[{properties:{confirmation_digest:{$ref:"#/$defs/ManifestDigest"},observed_at:{$ref:"#/$defs/UtcMicros"},state:{const:"removed",type:"string"}},required:["state","confirmation_digest","observed_at"],type:"object"},{properties:{confirmation_digest:{$ref:"#/$defs/ManifestDigest"},observed_at:{$ref:"#/$defs/UtcMicros"},state:{const:"already_removed",type:"string"}},required:["state","confirmation_digest","observed_at"],type:"object"},{properties:{state:{const:"denied",type:"string"}},required:["state"],type:"object"},{properties:{state:{const:"stale",type:"string"}},required:["state"],type:"object"},{properties:{state:{const:"durability_uncertain",type:"string"}},required:["state"],type:"object"},{properties:{state:{const:"unavailable",type:"string"}},required:["state"],type:"object"}]},WorktreeCoverageV1:{enum:["complete","partial"],type:"string"},WorktreeId:$M,WorktreeInventoryEntryV1:{additionalProperties:!1,properties:{clean:{$ref:"#/$defs/WorktreeObservationV1",description:"Whether Git status contains no tracked or untracked changes."},evidence_digest:{$ref:"#/$defs/ManifestDigest"},head:{anyOf:[{$ref:"#/$defs/GitOidV1"},{type:"null"}]},holder:{$ref:"#/$defs/WorktreeObservationV1"},kind:{anyOf:[{$ref:"#/$defs/WorktreeKindV1"},{type:"null"}]},locked:{$ref:"#/$defs/WorktreeObservationV1"},observed_at:{$ref:"#/$defs/UtcMicros"},operation:{anyOf:[{$ref:"#/$defs/GitOperationStateV1"},{type:"null"}]},presence:{$ref:"#/$defs/WorktreePresenceV1"},reference:{anyOf:[{$ref:"#/$defs/RefId"},{type:"null"}]},target:{$ref:"#/$defs/NativeWorktreeTargetV1"},unique_data:{$ref:"#/$defs/WorktreeObservationV1"},worktree_id:{anyOf:[{$ref:"#/$defs/WorktreeId"},{type:"null"}]}},required:["target","presence","clean","locked","holder","unique_data","observed_at","evidence_digest"],type:"object"},WorktreeInventoryEpoch:$W,WorktreeInventorySnapshotId:$N,WorktreeKindV1:{description:"Native Git worktree kind visible to an authorized caller.",enum:["main","linked","bare"],type:"string"},WorktreeObservationV1:{enum:["yes","no","unknown"],type:"string"},WorktreePresenceV1:{description:"Presence is intentionally not a bool: stale, unavailable and foreign are\npolicy-safe states with different reconciliation consequences.",enum:["present","stale","unavailable","foreign"],type:"string"}},$schema:"https://json-schema.org/draft/2020-12/schema",description:"One typed result for every native-integration surface operation.",oneOf:[{additionalProperties:!1,description:"Frozen selection summary plus the exact sealed proof preflight accepts.",properties:{outcome:{const:"stack_snapshot",type:"string"},sealed_snapshot:{$ref:"#/$defs/NativeIntegrationSealedStackSnapshotV1"},selection:{$ref:"#/$defs/NativeIntegrationSnapshotProjectionV1"}},required:["outcome","selection","sealed_snapshot"],type:"object"},{additionalProperties:!1,description:"Bounded projection of one immutable preview.\n\nCandidate trees, conflict bodies, and ordered commit objects stay behind the\npreview digest: the surface reports identity, classification, and expiry so\na caller can approve exactly this preview and nothing else.",properties:{analysis:{anyOf:[{$ref:"#/$defs/NativeIntegrationAnalysisReportV1"},{type:"null"}]},created_at:{$ref:"#/$defs/UtcMicros"},disposition:{$ref:"#/$defs/NativeIntegrationPreviewDispositionV1"},expires_at:{$ref:"#/$defs/UtcMicros"},ordered_commit_count:{format:"uint32",minimum:0,type:"integer"},outcome:{const:"preview",type:"string"},preview_digest:{$ref:"#/$defs/ManifestDigest"},preview_id:{$ref:"#/$defs/NativeIntegrationPreviewId"},selection:{$ref:"#/$defs/NativeIntegrationSnapshotProjectionV1"}},required:["outcome","preview_id","preview_digest","selection","disposition","ordered_commit_count","created_at","expires_at"],type:"object"},{additionalProperties:!1,description:"Bounded projection of one issued one-use approval.\n\nThe approval digest is the caller's proof-of-issuance handle for apply;\nthe preview binding and expiry are audit metadata. No preview body,\ncandidate tree, or commit content crosses this boundary.",properties:{approval_digest:{$ref:"#/$defs/ManifestDigest"},approval_id:{$ref:"#/$defs/NativeIntegrationApprovalId"},capability:{$ref:"#/$defs/CapabilityId"},expires_at:{$ref:"#/$defs/UtcMicros"},issued_at:{$ref:"#/$defs/UtcMicros"},outcome:{const:"approval",type:"string"},preview_digest:{$ref:"#/$defs/ManifestDigest"},preview_id:{$ref:"#/$defs/NativeIntegrationPreviewId"},principal:{$ref:"#/$defs/ActorId"},transaction_id:{$ref:"#/$defs/NativeIntegrationTransactionId",description:"Daemon-minted identity consumed verbatim by apply, status, and cancel."}},required:["outcome","transaction_id","approval_id","preview_id","preview_digest","principal","capability","issued_at","expires_at","approval_digest"],type:"object"},{additionalProperties:!1,description:"Bounded projection of one durable terminal receipt.\n\nThe receipt digest and final ref/tree identity are audit metadata; no patch,\nworktree body, or source content crosses this boundary.",properties:{completed_at:{$ref:"#/$defs/UtcMicros"},final_ref_tip:{type:"string"},final_tree:{type:"string"},outcome:{const:"receipt",type:"string"},receipt_digest:{$ref:"#/$defs/ManifestDigest"},status:{$ref:"#/$defs/NativeIntegrationStatusProjectionV1"},terminal_outcome:{$ref:"#/$defs/NativeIntegrationTerminalOutcomeV1"}},required:["outcome","status","terminal_outcome","final_ref_tip","final_tree","completed_at","receipt_digest"],type:"object"},{additionalProperties:!1,description:"Bounded projection of one durable transaction status.",properties:{cancellation_requested:{type:"boolean"},destination_ref:{$ref:"#/$defs/RefId"},outcome:{const:"status",type:"string"},phase:{$ref:"#/$defs/NativeIntegrationPhaseV1"},phase_revision:{format:"uint64",minimum:0,type:"integer"},preview_digest:{$ref:"#/$defs/ManifestDigest"},preview_id:{$ref:"#/$defs/NativeIntegrationPreviewId"},repository_id:{$ref:"#/$defs/RepositoryId"},terminal_outcome:{anyOf:[{$ref:"#/$defs/NativeIntegrationTerminalOutcomeV1"},{type:"null"}]},transaction_id:{$ref:"#/$defs/NativeIntegrationTransactionId"},updated_at:{$ref:"#/$defs/UtcMicros"}},required:["outcome","transaction_id","preview_id","preview_digest","repository_id","destination_ref","phase","phase_revision","cancellation_requested","updated_at"],type:"object"},{description:"Cancellation disposition. After the native commit point the committed\nreceipt is returned instead of a cancellation claim.",oneOf:[{enum:["cancellation_requested","commit_point_passed"],type:"string"},{properties:{already_terminal:{$ref:"#/$defs/NativeIntegrationTerminalOutcomeV1"}},required:["already_terminal"],type:"object"}],properties:{outcome:{const:"cancellation",type:"string"}},required:["outcome"],type:"object"},{$ref:"#/$defs/NativeWorktreeSurfaceResultV1",properties:{outcome:{const:"worktree",type:"string"}},required:["outcome"],type:"object"},{properties:{outcome:{const:"unavailable",type:"string"},reason:{$ref:"#/$defs/NativeIntegrationSurfaceUnavailableV1"}},required:["outcome","reason"],type:"object"}],title:"NativeIntegrationSurfaceResultV1"},{$defs:{ManifestDigest:gl,NativeIntegrationPreviewId:gI},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Exact approval-issuance request (the owner-decided sixth operation).\n\nThe caller names one unexpired preview by exact identity *and* digest;\napproving an identity without its content digest is unrepresentable. The\ndaemon mints the one-use approval bound to the requesting principal, the\napply capability, the current grant lineage, and a bounded expiry, none\nof which the caller can choose.",properties:{preview_digest:{$ref:"#/$defs/ManifestDigest"},preview_id:{$ref:"#/$defs/NativeIntegrationPreviewId"}},required:["preview_id","preview_digest"],title:"NativeIntegrationApproveSurfaceRequest",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Exact public input accepted by `tracedecay_ast_grep_rewrite`.",properties:{dry_run:{default:!1,type:"boolean"},expected_state:{description:"Exact `preview_digest`/`expected_state` returned by the dry run. Apply\nre-resolves the typed plan and rejects any candidate-state drift.",type:["string","null"]},idempotency_key:{type:["string","null"]},path:{type:"string"},pattern:{type:"string"},rewrite:{type:"string"},verify:{default:!1,type:"boolean"}},required:["path","pattern","rewrite"],title:"AstGrepRewriteSurfaceRequestV1",type:"object"},{$defs:{ActorId:mW,AstGrepResult:{description:"Result of an ast-grep rewrite operation.",properties:{diff:{description:"Bounded preview of the would-be change. Populated only on a successful\ndry run; `None` for real edits and for failures.",type:["string","null"]},dry_run:{description:"True when this was a dry run: the rewrite was resolved (via the built-in\nliteral fallback or an ast-grep preview run) but nothing was written.",type:"boolean"},file_path:{type:"string"},message:{type:"string"},pattern:{type:"string"},rewrite:{type:"string"},success:{type:"boolean"}},required:["success","file_path","pattern","rewrite","message"],type:"object"},AuthorityReceipt:{additionalProperties:!1,description:"Proof that this request crossed the current authorization boundary.",properties:{authorized_scope_digest:{$ref:"#/$defs/ManifestDigest"},disclosure:{$ref:"#/$defs/DisclosureClass"},grant_digest:{$ref:"#/$defs/ManifestDigest"},grant_id:{type:"string"},grant_revision:{format:"uint64",minimum:0,type:"integer"},policy:{$ref:"#/$defs/PolicyDecisionRef"},revalidated_at:{$ref:"#/$defs/UtcMicros"}},required:["grant_id","grant_revision","grant_digest","authorized_scope_digest","disclosure","policy","revalidated_at"],type:"object"},CancellationObservation:fS,CancellationStage:fk,ComponentVersion:fJ,Deadline:hj,DisclosureClass:{description:"Disclosure ceiling carried by an immutable grant and revalidated at sinks.",enum:["metadata","evidence","sensitive"],type:"string"},EditResult:{description:"Result of a single string replacement edit.",properties:{diff:{description:"Bounded preview diff of the would-be change. Populated only on a\nsuccessful dry run; `None` for real edits and for failures.",type:["string","null"]},dry_run:{description:"True when this was a dry run: validation, spans, and the resulting\ncontent were all computed, but nothing was written to disk.",type:"boolean"},file_path:{type:"string"},matched_str:{type:"string"},message:{type:"string"},new_str:{type:"string"},replaced_span:{description:"The exact source text that was replaced. For `replace_symbol` this is\nthe item's full span, including any leading doc-comment / attribute\nblock, so callers can recover its docs/attrs if the replacement\ndropped them; for `str_replace` it is the matched `old_str` text.\n`None` only on a failed edit, where nothing was resolved to replace.",type:["string","null"]},success:{type:"boolean"}},required:["success","file_path","matched_str","new_str","message"],type:"object"},EffectClass:{description:"The stable effect classification of one application operation.\n\nGit index writes remain separate classes so policy cannot accidentally\nsubstitute one index mutation for another.",oneOf:[{enum:["read","preview","source_edit","git_index_stage","git_index_unstage","configuration_write","administrative"],type:"string"},{const:"spawns_process",description:"Runs a child process in the project (e.g. the project's test runner).",type:"string"},{const:"binds_server",description:"Binds a listening server in the daemon process.",type:"string"},{const:"schedules_work",description:"Queues work on a daemon-owned scheduler; the call answers with the\nscheduler's admission, not the finished work.",type:"string"},{const:"maintains_owner_state",description:"Maintains bookkeeping the daemon keeps for the project or profile it\nserves: resets a usage counter, records registry token accounting, or\nreconciles automation schedulers with the saved configuration. Each\nwrite settles within the call and answers its new state.",type:"string"},{const:"maintains_profile_state",description:"Reads and rewrites the daemon profile's own state: its project\nregistry, accounting ledgers, and session stores. Unlike bookkeeping,\nit includes long work, a registry collection or a transcript import,\nthat a cancelled call stops.",type:"string"},{const:"records_host_evidence",description:"Records a host's session evidence (transcripts, hook admissions,\nreceipts) in daemon-owned session stores.",type:"string"}]},EffectReceipt:{additionalProperties:!1,description:"Durable effect proof. It records identities and receipts, never credentials\nor arbitrary command text.",properties:{actor:{$ref:"#/$defs/ActorId"},catalog_digest:{$ref:"#/$defs/ManifestDigest"},committed_state:{anyOf:[{$ref:"#/$defs/ManifestDigest"},{type:"null"}]},configuration_digest:{$ref:"#/$defs/ManifestDigest"},effect_class:{$ref:"#/$defs/EffectClass"},expected_state:{$ref:"#/$defs/ManifestDigest"},external_proof:{anyOf:[{$ref:"#/$defs/RetrievalAnchorId"},{type:"null"}]},idempotency_key:{type:"string"},input_digest:{$ref:"#/$defs/ManifestDigest"},operation:{$ref:"#/$defs/UseCaseId"},outcome:{$ref:"#/$defs/EffectTermination"},policy_digest:{$ref:"#/$defs/ManifestDigest"},privacy_digest:{$ref:"#/$defs/ManifestDigest"},request_id:{type:"string"},scope:{$ref:"#/$defs/ResolvedScope"}},required:["operation","request_id","actor","scope","effect_class","idempotency_key","input_digest","expected_state","policy_digest","configuration_digest","catalog_digest","privacy_digest","outcome"],type:"object"},EffectResult:{additionalProperties:!1,description:"Result of an admitted effect. `EffectUnknown` remains a receipt state and\ncannot be remapped into a pre-admission problem.",properties:{authority:{$ref:"#/$defs/AuthorityReceipt"},effect_class:{$ref:"#/$defs/EffectClass"},effect_id:{type:"string"},execution:{$ref:"#/$defs/OperationReceipt"},expected_state:{$ref:"#/$defs/ManifestDigest"},idempotency_key:{type:"string"},payload:{anyOf:[{$ref:"#/$defs/SourceEditDurableEffectPayloadV1"},{type:"null"}]},receipt:{$ref:"#/$defs/EffectReceipt"},reconciliation:{$ref:"#/$defs/ReconciliationState"}},required:["effect_id","effect_class","idempotency_key","authority","expected_state","execution","reconciliation","receipt"],type:"object"},EffectTermination:{description:"Durable effect receipt terminal state.",enum:["completed","cancelled","timed_out","failed","partial","effect_unknown"],type:"string"},InsertResult:{description:"Result of an insert-at operation.",properties:{anchor_line:{format:"uint32",minimum:0,type:"integer"},before:{type:"boolean"},content:{type:"string"},diff:{description:"Bounded preview diff of the would-be change. Populated only on a\nsuccessful dry run; `None` for real edits and for failures.",type:["string","null"]},dry_run:{description:"True when this was a dry run: the insertion point was resolved and the\nresulting content computed, but nothing was written to disk.",type:"boolean"},file_path:{type:"string"},message:{type:"string"},success:{type:"boolean"}},required:["success","file_path","anchor_line","content","before","message"],type:"object"},ManifestDigest:gl,MoveHint:{description:"One evidence-based, actionable finding produced by the `move_symbol` impact\nengine. Each hint points at a concrete file/line and carries a suggestion\nthe caller (or a follow-up refactor) can act on. Hints are derived from graph\nedges (callers/callees) and parse-level facts (identifiers, `use` lines,\nmodule declarations), never speculative noise.",properties:{detail:{description:"Human-readable description of what the move breaks or affects.",type:"string"},file:{description:"File the finding concerns (the caller's file, the destination, or the\nsource), project-relative.",type:"string"},kind:{description:"Taxonomy tag: `caller_reference`, `dependency_broken`, `import_needed`,\n`visibility_required`, `collision`, `module_missing`, `cycle_risk`,\n`orphaned_import`, or `cfg_context`.",type:"string"},line:{description:"1-based line the finding concerns, when a specific site is known.",format:"uint32",minimum:0,type:["integer","null"]},suggestion:{description:"The exact change to make (e.g. a `use` line to add, a path to rewrite, a\nvisibility to escalate). `None` when no single mechanical fix applies.",type:["string","null"]}},required:["kind","file","detail"],type:"object"},MoveResult:{description:"Result of a `move_symbol` operation: the moved span, a dry-run diff of the\nsource + destination files, and the centerpiece, the impact report of\neverything the move breaks or that needs attention.",properties:{applied_imports:{description:"`use` lines auto-inserted at the destination because the moved body's\ndependency on them was unambiguous. Reported so the caller sees exactly\nwhat the move added.",items:{type:"string"},type:"array"},dest_file:{type:"string"},diff:{description:"Combined preview diff of the source (removal) and destination (insertion)\nfiles. Populated on a successful dry run; `None` for real moves.",type:["string","null"]},dry_run:{description:"True when this was a dry run: spans, the destination shape, and the\nimpact report were all computed, but nothing was written to disk.",type:"boolean"},impact:{description:"The impact report: every actionable finding. Empty on a truly clean\nmove.",items:{$ref:"#/$defs/MoveHint"},type:"array"},message:{type:"string"},moved_span:{description:"The exact source span that was moved, including its leading\ndoc-comment / attribute block. `None` on failure.",type:["string","null"]},source_file:{type:"string"},success:{type:"boolean"},symbol:{description:"The resolved symbol that was (or would be) moved, `name (kind)`.",type:"string"}},required:["success","symbol","source_file","dest_file","message"],type:"object"},MultiEditResult:{description:"Result of a multi-string replacement edit.",properties:{applied_count:{format:"uint",minimum:0,type:"integer"},diff:{description:"Bounded preview diff of the would-be change. Populated only on a\nsuccessful dry run; `None` for real edits and for failures.",type:["string","null"]},dry_run:{description:"True when this was a dry run: replacements were validated and the\nresulting content computed, but nothing was written to disk.",type:"boolean"},file_path:{type:"string"},message:{type:"string"},success:{type:"boolean"}},required:["success","file_path","applied_count","message"],type:"object"},OperationBudgetUsage:gD,OperationReceipt:gF,OperationTermination:gL,PolicyDecisionRef:{additionalProperties:!1,description:"A policy decision pinned into a receipt or provider identity.",properties:{decision_id:{type:"string"},digest:{$ref:"#/$defs/ManifestDigest"},evaluator_revision:{$ref:"#/$defs/ComponentVersion"},revision:{format:"uint64",minimum:0,type:"integer"}},required:["decision_id","revision","digest","evaluator_revision"],type:"object"},ProjectId:g2,ReconciliationState:{description:"Reconciliation state retained after an admitted effect.",enum:["pending","reconciled","failed"],type:"string"},RefId:_u,RenameDispositionCountsV1:{additionalProperties:!1,properties:{blocked:{format:"uint",minimum:0,type:"integer"},changed:{format:"uint",minimum:0,type:"integer"},skipped:{format:"uint",minimum:0,type:"integer"},unchanged:{format:"uint",minimum:0,type:"integer"}},required:["changed","unchanged","skipped","blocked"],type:"object"},RenameFileEditV1:{additionalProperties:!1,description:"One file a rename changed (or would change), with the exact bound-site count.",properties:{file:{type:"string"},replaced_count:{format:"uint",minimum:0,type:"integer"}},required:["file","replaced_count"],type:"object"},RenameHazardKindV1:{enum:["invalid_identifier","stale_evidence","ambiguous_symbol","namespace_collision","changed_resolution","shadowing","unsupported_syntax","macro_expansion","generated_source","overlapping_site"],type:"string"},RenameHazardV1:{additionalProperties:!1,properties:{blocking:{type:"boolean"},kind:{$ref:"#/$defs/RenameHazardKindV1"},message:{type:"string"},site_id:{type:["string","null"]}},required:["kind","blocking","message"],type:"object"},RenameImpactV1:{additionalProperties:!1,properties:{affected_files:{items:{type:"string"},type:"array"},affected_tests:{items:{type:"string"},type:"array"},callers:{items:{type:"string"},type:"array"},reexports:{items:{type:"string"},type:"array"}},required:["callers","reexports","affected_files","affected_tests"],type:"object"},RenameProtectedValueCategoryV1:{enum:["wire_value","serialized_name","sql_identifier","persisted_name","schema_epoch","hash_domain","protocol_name","contract_snapshot","string_literal","byte_literal"],type:"string"},RenameProtectedValueV1:{additionalProperties:!1,description:"A byte-exact stable value deliberately preserved by the rename.",properties:{category:{$ref:"#/$defs/RenameProtectedValueCategoryV1"},end_byte:{format:"uint64",minimum:0,type:"integer"},exact_bytes:{type:"string"},file:{type:"string"},site_id:{type:"string"},start_byte:{format:"uint64",minimum:0,type:"integer"}},required:["site_id","file","start_byte","end_byte","category","exact_bytes"],type:"object"},RenameResult:{description:"The same typed payload is serialized by application, CLI, and MCP paths.",properties:{diff:{type:["string","null"]},dispositions:{$ref:"#/$defs/RenameDispositionCountsV1"},dry_run:{type:"boolean"},files:{items:{$ref:"#/$defs/RenameFileEditV1"},type:"array"},graph_revision:{anyOf:[{$ref:"#/$defs/ManifestDigest"},{type:"null"}],description:"Digest of the admitted generation, exact target, same-name symbols,\nand graph edges used to classify bound and protected sites."},hazards:{items:{$ref:"#/$defs/RenameHazardV1"},type:"array"},impact:{$ref:"#/$defs/RenameImpactV1"},message:{type:"string"},new_name:{type:"string"},old_name:{type:"string"},plan_digest:{anyOf:[{$ref:"#/$defs/ManifestDigest"},{type:"null"}],description:"Digest of the complete typed site/hazard/protected-value manifest."},preview_digest:{anyOf:[{$ref:"#/$defs/ManifestDigest"},{type:"null"}],description:"Exact candidate-state digest that apply must echo as `expected_state`."},preview_id:{anyOf:[{$ref:"#/$defs/ManifestDigest"},{type:"null"}],description:"Digest-addressed identity of the bound symbol plus proposed name."},protected_values:{items:{$ref:"#/$defs/RenameProtectedValueV1"},type:"array"},reference_count:{format:"uint",minimum:0,type:"integer"},repository_revision:{default:null,description:"Current Git HEAD when the worktree has one; dirty bytes remain bound by\n`preview_digest` independently of this revision.",type:["string","null"]},rolled_back:{description:"True only when apply published the accepted edit and post-apply\nverification then restored every exact preimage.",type:"boolean"},sites:{items:{$ref:"#/$defs/RenameSiteV1"},type:"array"},success:{type:"boolean"},symbol:{description:"Qualified name of the renamed symbol at plan time.",type:"string"}},required:["success","symbol","old_name","new_name","reference_count","dispositions","impact","message"],type:"object"},RenameSiteDispositionV1:{enum:["changed","unchanged","skipped","blocked"],type:"string"},RenameSiteKindV1:{enum:["declaration","import","reexport","qualified_path","unqualified_path","annotation","generic_argument","constructor","pattern","trait_declaration","trait_implementation","resolved_call","inherent_method","enum_variant","test","example","documentation","protected_value","unresolved_text"],type:"string"},RenameSiteV1:{additionalProperties:!1,description:"One exact old-name occurrence and the rename planner's disposition.",properties:{disposition:{$ref:"#/$defs/RenameSiteDispositionV1"},end_byte:{format:"uint64",minimum:0,type:"integer"},expected_bytes:{type:"string"},file:{type:"string"},kind:{$ref:"#/$defs/RenameSiteKindV1"},line:{format:"uint32",minimum:0,type:"integer"},reason:{type:"string"},replacement_bytes:{type:"string"},site_id:{type:"string"},source_node_id:{description:"Canonical source `SymbolOccurrenceId` that attested this site.",type:["string","null"]},start_byte:{format:"uint64",minimum:0,type:"integer"}},required:["site_id","kind","disposition","file","line","start_byte","end_byte","expected_bytes","replacement_bytes","reason"],type:"object"},RepositoryId:_v,ResolvedScope:_k,RetrievalAnchorId:_q,SourceEditCancelledResultV1:{description:"Terminal payload when cancellation is observed before an edit commits.",properties:{cancelled:{type:"boolean"},message:{type:"string"},success:{type:"boolean"}},required:["success","cancelled","message"],type:"object"},SourceEditDiagnosticV1:{properties:{code:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},message:{type:"string"}},required:["line","code","message"],type:"object"},SourceEditDurableEffectPayloadV1:{additionalProperties:!1,description:"Body-free source-edit evidence retained inside durable effect receipts.\n\nThis payload intentionally contains no caller-supplied edit text, preview\ndiff, moved span, import, diagnostic, or impact detail. It is also the\nexact replay outcome, so replay never fabricates a live edit body.",properties:{before:{type:["boolean","null"]},cancelled:{type:"boolean"},change_count:{format:"uint",minimum:0,type:["integer","null"]},durable_metadata_only:{type:"boolean"},effect_unknown:{type:"boolean"},failed:{type:"boolean"},files:{items:{type:"string"},type:"array"},finding_count:{format:"uint",minimum:0,type:["integer","null"]},import_count:{format:"uint",minimum:0,type:["integer","null"]},line:{format:"uint32",minimum:0,type:["integer","null"]},message:{type:"string"},operation:{$ref:"#/$defs/UseCaseId"},reconciled:{type:"boolean"},success:{type:"boolean"},timed_out:{type:"boolean"}},required:["operation","success","files","failed","cancelled","timed_out","effect_unknown","reconciled","durable_metadata_only","message"],type:"object"},SourceEditEffectUnknownResultV1:{description:"Terminal payload when publication may have occurred and inspection is required.",properties:{effect_unknown:{type:"boolean"},message:{type:"string"},success:{type:"boolean"}},required:["success","effect_unknown","message"],type:"object"},SourceEditFailedResultV1:{description:"Terminal payload when an edit is refused before it can publish an effect.",properties:{failed:{type:"boolean"},message:{type:"string"},success:{type:"boolean"}},required:["success","failed","message"],type:"object"},SourceEditReconciledResultV1:{description:"Terminal payload returned by explicit reconciliation and rollback.",properties:{message:{type:"string"},reconciled:{type:"boolean"},success:{type:"boolean"}},required:["success","reconciled","message"],type:"object"},SourceEditTimedOutResultV1:{description:"Terminal payload when an edit deadline expires before commit.",properties:{message:{type:"string"},success:{type:"boolean"},timed_out:{type:"boolean"}},required:["success","timed_out","message"],type:"object"},SourceEditVerificationStateV1:{enum:["clean","errors","unavailable","failed","cancelled"],type:"string"},SourceEditVerificationV1:{properties:{error_count:{format:"uint",minimum:0,type:"integer"},first_errors:{items:{$ref:"#/$defs/SourceEditDiagnosticV1"},type:"array"},message:{type:["string","null"]},state:{$ref:"#/$defs/SourceEditVerificationStateV1"},verdict:{type:"string"},warning_count:{format:"uint",minimum:0,type:"integer"}},required:["state","verdict","error_count","warning_count","first_errors"],type:"object"},UseCaseId:{description:"Stable, canonical catalog identity for `UseCaseId`.",type:"string"},UtcMicros:vK,WorktreeId:$M},$schema:"https://json-schema.org/draft/2020-12/schema",anyOf:[{$ref:"#/$defs/EditResult"},{$ref:"#/$defs/MultiEditResult"},{$ref:"#/$defs/InsertResult"},{$ref:"#/$defs/AstGrepResult"},{$ref:"#/$defs/MoveResult"},{$ref:"#/$defs/RenameResult"},{$ref:"#/$defs/SourceEditFailedResultV1"},{$ref:"#/$defs/SourceEditCancelledResultV1"},{$ref:"#/$defs/SourceEditTimedOutResultV1"},{$ref:"#/$defs/SourceEditEffectUnknownResultV1"},{$ref:"#/$defs/SourceEditReconciledResultV1"},{$ref:"#/$defs/SourceEditDurableEffectPayloadV1"}],description:"Canonical result returned directly by every source-edit use case.",properties:{effect:{anyOf:[{$ref:"#/$defs/EffectResult"},{type:"null"}]},expected_state:{$ref:"#/$defs/ManifestDigest"},predicted_state:{anyOf:[{$ref:"#/$defs/ManifestDigest"},{type:"null"}]},replayed:{type:"boolean"},verification:{anyOf:[{$ref:"#/$defs/SourceEditVerificationV1"},{type:"null"}]}},required:["expected_state","replayed"],title:"SourceEditSurfaceResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{lang:{description:"Optional language key to force (e.g. 'rust', 'typescript', 'python').\nOmit to auto-detect each file from its extension.",type:["string","null"]},max_results:{description:"Maximum number of matches to return (default: 50, max: 200).",format:"uint32",minimum:0,type:["integer","null"]},path_glob:{description:"Optional glob restricting which files are searched, matched against\nproject-relative paths (e.g. 'src/**/*.rs').",type:["string","null"]},pattern:{description:"ast-grep structural pattern (SGPattern syntax), e.g.\n'reserve_stock($$$)' or 'Result<$T, $E>'.",type:"string"}},required:["pattern"],title:"AstGrepSearchSurfaceRequestV1",type:"object"},{$defs:{AstGrepSearchMatchV1:{additionalProperties:!1,properties:{column:{format:"uint32",minimum:0,type:"integer"},file:{type:"string"},lang:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},line_text:{type:"string"},match:{type:"string"}},required:["file","line","column","lang","match","line_text"],type:"object"},CodeIndexBuildBlockedReasonV1:fE,CodeIndexConvergenceParkedV1:fA,CodeIndexStalenessStateV1:fz,PrimitiveFreshnessStateV1:gG,PrimitiveIndexingStateV1:gB,PrimitiveSearchFreshnessV1:gQ},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{files_scanned:{format:"uint64",minimum:0,type:"integer"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},match_count:{format:"uint64",minimum:0,type:"integer"},results:{items:{$ref:"#/$defs/AstGrepSearchMatchV1"},type:"array"},truncated:{type:"boolean"}},required:["results","match_count","files_scanned","truncated"],title:"AstGrepSearchResultV1",type:"object"},{$defs:{AutomationRunArtifactKind:{enum:["traces","feedback","generated_evals","validation_gate","optimizer_diagnosis","codex_handoff"],type:"string"}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{kind:{$ref:"#/$defs/AutomationRunArtifactKind",description:"Artifact kind to read."},run_id:{description:"Automation run id to inspect.",type:"string"}},required:["run_id","kind"],title:"AutomationRunArtifactViewSurfaceRequestV1",type:"object"},{$defs:{AutomationReadStatusV1:m8,AutomationRunArtifact:fe},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{artifact:{$ref:"#/$defs/AutomationRunArtifact"},payload:{description:"The hash-verified artifact document, as the run wrote it."},run_id:{type:"string"},status:{$ref:"#/$defs/AutomationReadStatusV1"}},required:["status","run_id","artifact","payload"],title:"AutomationRunArtifactViewResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{limit:{description:"Maximum run records to return (default: 50, max: 200).",format:"uint32",maximum:200,minimum:1,type:["integer","null"]}},title:"AutomationRunListSurfaceRequestV1",type:"object"},{$defs:{AgentTaskKind:mz,AutomationReadStatusV1:m8,AutomationRunListEntryV1:{additionalProperties:!1,description:"One run as the list shows it: the ledger record's identity, outcome and\nartifact kinds, without the artifact payloads or operation bodies.",properties:{accepted_count:{format:"uint",minimum:0,type:"integer"},artifact_kinds:{items:{type:"string"},type:"array"},backend:{type:"string"},completed_at:{type:"string"},error:{type:["string","null"]},model:{type:["string","null"]},rejected_count:{format:"uint",minimum:0,type:"integer"},reviewed_count:{format:"uint",minimum:0,type:"integer"},run_id:{type:"string"},skipped_count:{format:"uint",minimum:0,type:"integer"},started_at:{type:"string"},status:{$ref:"#/$defs/AutomationRunStatus"},task:{$ref:"#/$defs/AgentTaskKind"},task_key:{type:["string","null"]},trigger:{$ref:"#/$defs/AutomationTrigger"}},required:["run_id","task","trigger","backend","status","reviewed_count","accepted_count","rejected_count","skipped_count","started_at","completed_at","artifact_kinds"],type:"object"},AutomationRunPageCompletenessV1:{description:"Whether a run page read every ledger row it examined.",oneOf:[{const:"known",description:"Every examined row decoded.",type:"string"},{const:"partial",description:"The page skipped malformed rows or more runs exist past it.",type:"string"}]},AutomationRunScopeV1:ft,AutomationRunStatus:fr,AutomationTrigger:fa},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{completeness:{$ref:"#/$defs/AutomationRunPageCompletenessV1"},count:{format:"uint",minimum:0,type:"integer"},has_more:{type:"boolean"},limit:{format:"uint32",minimum:0,type:"integer"},malformed_row_count:{format:"uint",minimum:0,type:"integer"},runs:{items:{$ref:"#/$defs/AutomationRunListEntryV1"},type:"array"},scope:{$ref:"#/$defs/AutomationRunScopeV1"},status:{$ref:"#/$defs/AutomationReadStatusV1"}},required:["status","scope","runs","count","limit","has_more","malformed_row_count","completeness"],title:"AutomationRunListResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{run_id:{description:"Exact automation run id to inspect.",minLength:1,type:"string"}},required:["run_id"],title:"AutomationRunViewSurfaceRequestV1",type:"object"},{$defs:{AgentTaskFailureClass:{oneOf:[{enum:["retryable","permanent","timeout","unavailable","denied","disconnected","malformed_output"],type:"string"},{const:"input_too_large",description:"The backend refused the request because it exceeds its input or\ncontext-window limit.",type:"string"}]},AgentTaskKind:mz,AgentTaskRetryAttempt:{properties:{attempt:{format:"uint32",minimum:0,type:"integer"},backoff_millis:{format:"uint64",minimum:0,type:"integer"},failure_classification:{anyOf:[{$ref:"#/$defs/AgentTaskFailureClass"},{type:"null"}]},succeeded:{type:"boolean"}},required:["attempt","succeeded","backoff_millis"],type:"object"},AutomationReadStatusV1:m8,AutomationRunArtifact:fe,AutomationRunLedgerRecord:{properties:{accepted_count:{format:"uint",minimum:0,type:"integer"},applied_ops:!0,artifacts:{items:{$ref:"#/$defs/AutomationRunArtifact"},type:"array"},backend:{type:"string"},backend_attempt_count:{default:0,format:"uint",minimum:0,type:"integer"},backend_attempts:{items:{$ref:"#/$defs/AgentTaskRetryAttempt"},type:"array"},backend_identity:{description:"The durable backend/configuration identity this run executed under.\n\nA settled deterministic failure stays suppressed only while this\nmatches the identity now configured, so the scheduler can re-admit the\ntask the moment the backend or configuration changes. Records written\nbefore this field existed carry `None` and never suppress: an\nunidentified failure cannot be shown to have failed under the current\nidentity.",type:["string","null"]},completed_at:{type:"string"},completed_at_micros:{format:"int64",type:["integer","null"]},error:{type:["string","null"]},error_classification:{anyOf:[{$ref:"#/$defs/AgentTaskFailureClass"},{type:"null"}]},error_retryable:{type:["boolean","null"]},evidence_hash:{type:["string","null"]},fallback_status:{type:["string","null"]},host_mode:{type:["string","null"]},input_hash:{type:["string","null"]},model:{type:["string","null"]},output_hash:{type:["string","null"]},prompt_version:{type:["string","null"]},proposed_ops:!0,rejected_count:{format:"uint",minimum:0,type:"integer"},rejected_ops:!0,report_ref:!0,response_schema:!0,reviewed_count:{default:0,format:"uint",minimum:0,type:"integer"},run_id:{type:"string"},schema_version:{format:"uint32",minimum:0,type:"integer"},session_evidence_budget_stage:{anyOf:[{$ref:"#/$defs/SessionRetrievalBudgetStageV1"},{type:"null"}],description:"Exhausted retrieval boundary of a `session_evidence_budget_exhausted`\nskip; present exactly on those skips."},skipped_count:{default:0,format:"uint",minimum:0,type:"integer"},started_at:{type:"string"},status:{$ref:"#/$defs/AutomationRunStatus"},strict_json:{type:["boolean","null"]},task:{$ref:"#/$defs/AgentTaskKind"},task_key:{type:["string","null"]},trigger:{$ref:"#/$defs/AutomationTrigger"},validation_report:!0},required:["schema_version","run_id","trigger","task","backend","status","accepted_count","rejected_count","started_at","completed_at"],type:"object"},AutomationRunScopeV1:ft,AutomationRunStatus:fr,AutomationTrigger:fa,SessionRetrievalBudgetStageV1:vi},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{run:{$ref:"#/$defs/AutomationRunLedgerRecord"},scope:{$ref:"#/$defs/AutomationRunScopeV1"},status:{$ref:"#/$defs/AutomationReadStatusV1"}},required:["status","scope","run"],title:"AutomationRunViewResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{base:{description:"Base local branch name (e.g. 'main').",type:"string"},cursor:{description:"Authenticated continuation cursor returned by the preceding exact\nbranch-diff page.",type:["string","null"]},file:{description:"Optional file path filter, only show diffs for symbols in this file.",type:["string","null"]},head:{description:"Head local branch name (e.g. 'feature/foo'). Defaults to the current\nbranch.",type:["string","null"]},kind:{description:"Optional kind filter, only show diffs for this symbol kind (e.g.\n'function', 'struct').",type:["string","null"]},limit:{description:"Maximum combined added, removed, and changed results (default: 100,\nat most 256).",format:"uint32",minimum:0,type:["integer","null"]}},required:["base"],title:"BranchDiffSurfaceRequestV1",type:"object"},{$defs:{BranchDiffCompleteV1:{additionalProperties:!1,properties:{base:{type:"string"},base_generation:{type:"string"},base_revision:{type:"string"},base_tree:{type:"string"},changes:{items:{$ref:"#/$defs/BranchSymbolChangeV1"},type:"array"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},head:{type:"string"},head_generation:{type:"string"},head_revision:{type:"string"},head_tree:{type:"string"},status:{$ref:"#/$defs/GitReadCompleteV1"},summary:{$ref:"#/$defs/BranchDiffSummaryV1"},total_changes:{format:"uint",minimum:0,type:"integer"}},required:["status","base","head","base_revision","base_tree","head_revision","head_tree","base_generation","head_generation","total_changes","summary","changes"],type:"object"},BranchDiffPartialV1:{additionalProperties:!1,properties:{base:{type:"string"},base_generation:{type:"string"},base_revision:{type:"string"},base_tree:{type:"string"},changes:{items:{$ref:"#/$defs/BranchSymbolChangeV1"},type:"array"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},head:{type:"string"},head_generation:{type:"string"},head_revision:{type:"string"},head_tree:{type:"string"},next_cursor:{type:"string"},reason:{$ref:"#/$defs/GitResultLimitV1"},status:{$ref:"#/$defs/GitReadPartialV1"},summary:{$ref:"#/$defs/BranchDiffSummaryV1"},total_changes:{format:"uint",minimum:0,type:"integer"}},required:["status","reason","base","head","base_revision","base_tree","head_revision","head_tree","base_generation","head_generation","total_changes","next_cursor","summary","changes"],type:"object"},BranchDiffReferenceUnavailableV1:{additionalProperties:!1,description:"Either branch of `base..head` does not resolve to a local commit.",properties:{base_or_head:{description:"The requested range, `base..head`.",type:"string"},reason:{type:"string"},retryable:{type:"boolean"},status:{$ref:"#/$defs/GitReadUnavailableV1"}},required:["status","base_or_head","reason","retryable"],type:"object"},BranchDiffSummaryV1:{additionalProperties:!1,properties:{added:{format:"uint",minimum:0,type:"integer"},changed:{format:"uint",minimum:0,type:"integer"},removed:{format:"uint",minimum:0,type:"integer"}},required:["added","removed","changed"],type:"object"},BranchDiffUnavailableV1:{additionalProperties:!1,description:"No sealed code-index generations compare the two branches' commits.",properties:{base:{type:"string"},base_generation:{type:["string","null"]},base_revision:{type:"string"},head:{type:"string"},head_generation:{type:["string","null"]},head_revision:{type:"string"},reason:{type:"string"},retryable:{type:"boolean"},status:{$ref:"#/$defs/GitReadUnavailableV1"}},required:["status","base","head","base_revision","head_revision","reason","retryable"],type:"object"},BranchSymbolChangeV1:{oneOf:[{additionalProperties:!1,properties:{change:{const:"added",type:"string"},symbol:{$ref:"#/$defs/BranchSymbolV1"}},required:["change","symbol"],type:"object"},{additionalProperties:!1,properties:{change:{const:"removed",type:"string"},symbol:{$ref:"#/$defs/BranchSymbolV1"}},required:["change","symbol"],type:"object"},{additionalProperties:!1,properties:{base:{$ref:"#/$defs/BranchSymbolV1"},change:{const:"changed",type:"string"},head:{$ref:"#/$defs/BranchSymbolV1"}},required:["change","base","head"],type:"object"}]},BranchSymbolV1:{additionalProperties:!1,description:"A symbol in one branch's sealed generation.",properties:{content_digest:{type:"string"},file:{type:"string"},file_identity:{type:"string"},file_occurrence_id:{type:"string"},kind:{type:"string"},name:{type:"string"},qualified_name:{type:"string"},symbol_identity:{type:"string"},symbol_occurrence_id:{type:"string"}},required:["symbol_identity","symbol_occurrence_id","file_identity","file_occurrence_id","name","qualified_name","kind","file","content_digest"],type:"object"},CodeIndexBuildBlockedReasonV1:fE,CodeIndexConvergenceParkedV1:fA,CodeIndexStalenessStateV1:fz,GitReadCompleteV1:yT,GitReadPartialV1:yO,GitReadUnavailableV1:yE,GitResultLimitV1:yA,PrimitiveFreshnessStateV1:gG,PrimitiveIndexingStateV1:gB,PrimitiveSearchFreshnessV1:gQ},$schema:"https://json-schema.org/draft/2020-12/schema",anyOf:[{$ref:"#/$defs/BranchDiffCompleteV1"},{$ref:"#/$defs/BranchDiffPartialV1"},{$ref:"#/$defs/BranchDiffUnavailableV1"},{$ref:"#/$defs/BranchDiffReferenceUnavailableV1"}],title:"BranchDiffResultV1"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{cursor:{description:"Continuation cursor returned as `next_cursor` by the preceding page\nwith the same `limit`.",type:["string","null"]},limit:{description:"Maximum local refs to return (default: 100, at most 128).",format:"uint32",minimum:0,type:["integer","null"]}},title:"BranchListSurfaceRequestV1",type:"object"},{$defs:{BranchListPageV1:{additionalProperties:!1,properties:{examined:{format:"uint",minimum:0,type:"integer"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},limit:{format:"uint",minimum:0,type:"integer"},next_cursor:{type:["string","null"]},reason:{anyOf:[{$ref:"#/$defs/GitReferenceLimitV1"},{type:"null"}]},snapshot_count:{format:"uint",minimum:0,type:"integer"},snapshots:{items:{$ref:"#/$defs/BranchSnapshotEntryV1"},type:"array"},status:{$ref:"#/$defs/GitPageStatusV1"}},required:["status","snapshot_count","examined","limit","snapshots"],type:"object"},BranchReadUnavailableV1:{additionalProperties:!1,description:"A local branch read refused before any snapshot was taken.",properties:{reason:{type:"string"},retryable:{type:"boolean"},status:{$ref:"#/$defs/GitReadUnavailableV1"}},required:["status","reason","retryable"],type:"object"},BranchSnapshotEntryV1:{additionalProperties:!1,properties:{branch:{type:"string"},source_revision:{type:"string"},source_tree:{type:"string"}},required:["branch","source_revision","source_tree"],type:"object"},CodeIndexBuildBlockedReasonV1:fE,CodeIndexConvergenceParkedV1:fA,CodeIndexStalenessStateV1:fz,GitPageStatusV1:yC,GitReadUnavailableV1:yE,GitReferenceLimitV1:{enum:["reference_limit"],type:"string"},PrimitiveFreshnessStateV1:gG,PrimitiveIndexingStateV1:gB,PrimitiveSearchFreshnessV1:gQ},$schema:"https://json-schema.org/draft/2020-12/schema",anyOf:[{$ref:"#/$defs/BranchListPageV1"},{$ref:"#/$defs/BranchReadUnavailableV1"}],title:"BranchListResultV1"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{branch:{description:"Exact local branch name to search.",type:"string"},cursor:{description:"Authenticated continuation cursor returned by the preceding exact\nbranch-search page.",type:["string","null"]},limit:{description:"Maximum number of results to return (default: 10, at most 500).",format:"uint32",minimum:0,type:["integer","null"]},query:{description:"Search query string to match against symbol names.",type:"string"}},required:["branch","query"],title:"BranchSearchSurfaceRequestV1",type:"object"},{$defs:{BranchReferenceUnavailableV1:{additionalProperties:!1,description:"The named branch does not resolve to a local commit.",properties:{branch:{type:"string"},reason:{type:"string"},retryable:{type:"boolean"},status:{$ref:"#/$defs/GitReadUnavailableV1"}},required:["status","branch","reason","retryable"],type:"object"},BranchSearchHitV1:{additionalProperties:!1,properties:{branch:{type:"string"},candidate:{$ref:"#/$defs/RankedCandidate"},code_generation:{type:"string"},kind:{type:["string","null"]},name:{type:["string","null"]},path:{type:["string","null"]},qualified_name:{type:["string","null"]},source_reference:{type:"string"},source_revision:{type:"string"},source_tree:{type:"string"}},required:["candidate","branch","source_reference","source_revision","source_tree","code_generation"],type:"object"},BranchSearchPageV1:{additionalProperties:!1,properties:{branch:{type:"string"},code_generation:{type:"string"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},next_cursor:{type:["string","null"]},reason:{anyOf:[{$ref:"#/$defs/GitResultLimitV1"},{type:"null"}]},results:{items:{$ref:"#/$defs/BranchSearchHitV1"},type:"array"},source_reference:{type:"string"},source_revision:{type:"string"},source_tree:{type:"string"},status:{$ref:"#/$defs/GitPageStatusV1"}},required:["status","branch","source_reference","source_revision","source_tree","code_generation","results"],type:"object"},BranchSearchUnavailableV1:{additionalProperties:!1,description:"No sealed code-index generation answers for the branch's commit.",properties:{branch:{type:"string"},code_generation:{type:["string","null"]},reason:{type:"string"},retryable:{type:"boolean"},source_revision:{type:"string"},status:{$ref:"#/$defs/GitReadUnavailableV1"}},required:["status","branch","source_revision","reason","retryable"],type:"object"},CalibrationProfileId:fb,CandidateContribution:fw,CodeIndexBuildBlockedReasonV1:fE,CodeIndexConvergenceParkedV1:fA,CodeIndexStalenessStateV1:fz,ComponentRevision:fK,EvidenceRole:hM,ExactClass:hW,FileOccurrenceId:yu,FixedPointScore:yf,FreshnessCompatibilityV1:yh,FusedCandidate:yy,GitPageStatusV1:yC,GitReadUnavailableV1:yE,GitResultLimitV1:yA,LogicalCopyClusterId:gi,LogicalEvidenceId:go,OccurrenceProvenance:gz,PrimitiveFreshnessStateV1:gG,PrimitiveIndexingStateV1:gB,PrimitiveSearchFreshnessV1:gQ,RankedCandidate:{additionalProperties:!1,description:"A fused candidate with its final deterministic ordinal.",properties:{candidate:{$ref:"#/$defs/FusedCandidate"},final_ordinal:{format:"uint32",minimum:0,type:"integer"}},required:["candidate","final_ordinal"],type:"object"},RankingDecision:_l,RankingDecisionKind:_p,RepositoryId:_v,RetrievalAnchorId:_q,RetrieverKind:_C,ScoreDomainId:_0,SessionOrThreadId:_8,SourceFreshness:vh,SourceInstanceKey:vy,SourceNamespace:v_,SourceOccurrenceId:vv,UtcMicros:vK},$schema:"https://json-schema.org/draft/2020-12/schema",anyOf:[{$ref:"#/$defs/BranchSearchPageV1"},{$ref:"#/$defs/BranchSearchUnavailableV1"},{$ref:"#/$defs/BranchReferenceUnavailableV1"}],title:"BranchSearchResultV1"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{qualified_name:{description:"The exact qualified name to look up.",type:"string"}},required:["qualified_name"],title:"ByQualifiedNameSurfaceRequestV1",type:"object"},{$defs:{PrimitiveSymbolLocationV1:gY},$schema:"https://json-schema.org/draft/2020-12/schema",description:"Every indexed symbol sharing one qualified name (overloads, generics,\nseparate impl blocks).",items:{$ref:"#/$defs/PrimitiveSymbolLocationV1"},title:"ByQualifiedNameResultV1",type:"array"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{from_node_id:{type:"string"},maximum_depth:{default:8,format:"uint32",minimum:0,type:"integer"},to_node_id:{type:"string"}},required:["from_node_id","to_node_id"],title:"CallChainPrimitiveRequest",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{edge_kinds:{items:{type:"string"},type:"array"},node_ids:{items:{type:"string"},type:"array"}},required:["node_ids","edge_kinds"],title:"CallChainPrimitiveResult",type:"object"},{$defs:{NativeIntegrationTransactionId:gT},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{transaction_id:{$ref:"#/$defs/NativeIntegrationTransactionId"}},required:["transaction_id"],title:"NativeIntegrationCancelSurfaceRequest",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{from_ref:{description:"Starting git ref (commit, branch, tag).",type:"string"},to_ref:{description:"Ending git ref (commit, branch, tag).",type:"string"}},required:["from_ref","to_ref"],title:"ChangelogSurfaceRequestV1",type:"object"},{$defs:{ChangelogCompleteV1:{additionalProperties:!1,properties:{base_generation:{type:"string"},changed_file_count:{format:"uint",minimum:0,type:"integer"},changed_files:{items:{type:"string"},type:"array"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},from_ref:{type:"string"},head_generation:{type:"string"},status:{$ref:"#/$defs/GitReadCompleteV1"},symbol_changes_coverage:{$ref:"#/$defs/SymbolChangesCompleteV1"},symbols_added:{items:{$ref:"#/$defs/GitComparedSymbolV1"},type:"array"},symbols_modified:{items:{$ref:"#/$defs/GitComparedSymbolV1"},type:"array"},symbols_removed:{items:{$ref:"#/$defs/GitComparedSymbolV1"},type:"array"},to_ref:{type:"string"}},required:["status","from_ref","to_ref","changed_file_count","changed_files","base_generation","head_generation","symbols_added","symbols_removed","symbols_modified","symbol_changes_coverage"],type:"object"},ChangelogPartialV1:{additionalProperties:!1,description:"The tree diff without symbol changes: the refs are not both exact local\nbranches with sealed generations.",properties:{changed_file_count:{format:"uint",minimum:0,type:"integer"},changed_files:{items:{type:"string"},type:"array"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},from_ref:{type:"string"},status:{$ref:"#/$defs/GitReadPartialV1"},symbol_changes_coverage:{$ref:"#/$defs/SymbolChangesUnavailableV1"},symbols_added:{items:{$ref:"#/$defs/GitComparedSymbolV1"},type:"array"},symbols_modified:{items:{$ref:"#/$defs/GitComparedSymbolV1"},type:"array"},symbols_removed:{items:{$ref:"#/$defs/GitComparedSymbolV1"},type:"array"},to_ref:{type:"string"}},required:["status","from_ref","to_ref","changed_file_count","changed_files","symbols_added","symbols_removed","symbols_modified","symbol_changes_coverage"],type:"object"},CodeIndexBuildBlockedReasonV1:fE,CodeIndexConvergenceParkedV1:fA,CodeIndexStalenessStateV1:fz,GitComparedSymbolV1:yb,GitReadCompleteV1:yT,GitReadPartialV1:yO,GitReadUnavailableV1:yE,GitToolErrorKindV1:yN,GitToolErrorV1:yz,GitToolFailureV1:yD,GitToolOperationV1:yF,PrimitiveFreshnessStateV1:gG,PrimitiveIndexingStateV1:gB,PrimitiveSearchFreshnessV1:gQ,SymbolChangesCompleteV1:{additionalProperties:!1,properties:{status:{$ref:"#/$defs/GitReadCompleteV1"}},required:["status"],type:"object"},SymbolChangesUnavailableV1:vR},$schema:"https://json-schema.org/draft/2020-12/schema",anyOf:[{$ref:"#/$defs/ChangelogCompleteV1"},{$ref:"#/$defs/ChangelogPartialV1"},{$ref:"#/$defs/GitToolFailureV1"}],title:"ChangelogResultV1"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{limit:{description:"Maximum number of cycles to report, largest first (default: 25, max:\n200). The response always states the total detected and how many were\nomitted.",format:"uint32",minimum:0,type:["integer","null"]},member_limit:{description:"Maximum member files listed per reported cycle (default: 12, max:\n200). Each entry states its true member_count and\nomitted_member_count.",format:"uint32",minimum:0,type:["integer","null"]}},title:"CircularSurfaceRequestV1",type:"object"},{$defs:{CircularCycleV1:{additionalProperties:!1,description:"One reported file cycle: the members that fit the member bound, plus the\ncomponent's true size so the omission is stated rather than hidden.",properties:{member_count:{format:"uint64",minimum:0,type:"integer"},members:{items:{type:"string"},type:"array"},omitted_member_count:{format:"uint64",minimum:0,type:"integer"}},required:["members","member_count","omitted_member_count"],type:"object"},CodeIndexBuildBlockedReasonV1:fE,CodeIndexConvergenceParkedV1:fA,CodeIndexStalenessStateV1:fz,PrimitiveFreshnessStateV1:gG,PrimitiveIndexingStateV1:gB,PrimitiveSearchFreshnessV1:gQ},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{cycle_count:{format:"uint64",minimum:0,type:"integer"},cycles:{items:{$ref:"#/$defs/CircularCycleV1"},type:"array"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},limit:{format:"uint64",minimum:0,type:"integer"},member_limit:{format:"uint64",minimum:0,type:"integer"},omitted_cycle_count:{format:"uint64",minimum:0,type:"integer"},reported_cycle_count:{format:"uint64",minimum:0,type:"integer"}},required:["cycle_count","reported_cycle_count","omitted_cycle_count","limit","member_limit","cycles"],title:"CircularResultV1",type:"object"},{$defs:{CallableCodeSurfaceMeta:f$,CodeGenerationId:fT,CodeQueryScope:fL,ResultProjection:_w,RetrievalOrder:_I},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{maximum_depth:{default:3,format:"uint32",minimum:0,type:"integer"},meta:{$ref:"#/$defs/CallableCodeSurfaceMeta",default:{cursor:null,order:"source_position",projection:"evidence"}},node_id:{type:"string"},resolve_trait_dispatch:{default:!0,type:"boolean"},scope:{$ref:"#/$defs/CodeQueryScope",default:{generation:"code-generation:unpinned-latest.v1",path_prefix:null}}},required:["node_id"],title:"CodeCalleesSurfaceRequest",type:"object"},{$defs:{CodeGenerationId:fT,SymbolPrimitiveRecord:vq,SymbolRelationRecord:vI},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Generation-bound page returned by every callable code query. Coverage,\nomissions, scoring, and terminal state remain in the enclosing\n[`crate::result::RetrievalEvidence`].",properties:{generation:{$ref:"#/$defs/CodeGenerationId"},items:{items:{$ref:"#/$defs/SymbolRelationRecord"},type:"array"},next_cursor:{description:"Opaque resume token; its bounded string is the public wire form.",type:["string","null"]},query_fallback:{description:"Independently hashed exact/lexical/graph subpayload. Callers preserve it\nbyte-for-byte rather than interpreting it, so the public schema admits\nthe canonical JSON it carries without re-declaring its internals."},total:{format:"uint64",minimum:0,type:["integer","null"]}},required:["generation","items"],title:"CodeQueryPage",type:"object"},{$defs:{CallableCodeSurfaceMeta:f$,ResultProjection:_w,RetrievalOrder:_I,SymbolGraphScope:vP},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{maximum_depth:{default:3,format:"uint32",minimum:0,type:"integer"},meta:{$ref:"#/$defs/CallableCodeSurfaceMeta",default:{cursor:null,order:"source_position",projection:"evidence"}},node_id:{type:"string"},scope:{$ref:"#/$defs/SymbolGraphScope",default:{path_prefix:null}}},required:["node_id"],title:"CodeCallersSurfaceRequest",type:"object"},{$defs:{CodeGenerationId:fT,CodeGraphReadFreshnessV1:fO,PrimitiveSupportGap:gX,SymbolPrimitiveRecord:vq,SymbolRelationRecord:vI,UtcMicros:vK},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Bounded semantic result shared by the compatibility surfaces. Rendering,\ntransport envelopes, and MCP content blocks remain outside this contract.",properties:{freshness:{$ref:"#/$defs/CodeGraphReadFreshnessV1"},generation:{$ref:"#/$defs/CodeGenerationId"},items:{items:{$ref:"#/$defs/SymbolRelationRecord"},type:"array"},next_cursor:{description:"Opaque resume token; its bounded string is the public wire form.",type:["string","null"]},related_edge_count:{format:"uint64",minimum:0,type:["integer","null"]},support_gaps:{items:{$ref:"#/$defs/PrimitiveSupportGap"},type:"array"},total:{format:"uint64",minimum:0,type:["integer","null"]},truncated:{type:"boolean"}},required:["generation","freshness","items","truncated","support_gaps"],title:"SymbolGraphPage",type:"object"},{$defs:{CallableCodeSurfaceMeta:f$,CodeGenerationId:fT,CodeQueryScope:fL,ResultProjection:_w,RetrievalOrder:_I},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{meta:{$ref:"#/$defs/CallableCodeSurfaceMeta"},node_id:{type:"string"},scope:{$ref:"#/$defs/CodeQueryScope"}},required:["node_id","scope","meta"],title:"CodeNavigationSurfaceRequest",type:"object"},{$defs:{CodeGenerationId:fT,SymbolPrimitiveRecord:vq},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Generation-bound page returned by every callable code query. Coverage,\nomissions, scoring, and terminal state remain in the enclosing\n[`crate::result::RetrievalEvidence`].",properties:{generation:{$ref:"#/$defs/CodeGenerationId"},items:{items:{$ref:"#/$defs/SymbolPrimitiveRecord"},type:"array"},next_cursor:{description:"Opaque resume token; its bounded string is the public wire form.",type:["string","null"]},query_fallback:{description:"Independently hashed exact/lexical/graph subpayload. Callers preserve it\nbyte-for-byte rather than interpreting it, so the public schema admits\nthe canonical JSON it carries without re-declaring its internals."},total:{format:"uint64",minimum:0,type:["integer","null"]}},required:["generation","items"],title:"CodeQueryPage",type:"object"},{$defs:{CallableCodeSurfaceMeta:f$,CodeGenerationId:fT,CodeQueryScope:fL,ExactTechnicalTermKindV1:hN,ResultProjection:_w,RetrievalOrder:_I},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{kind:{anyOf:[{$ref:"#/$defs/ExactTechnicalTermKindV1"},{type:"null"}]},literal:{type:"string"},meta:{$ref:"#/$defs/CallableCodeSurfaceMeta"},scope:{$ref:"#/$defs/CodeQueryScope"}},required:["literal","scope","meta"],title:"CodeExactOccurrenceSurfaceRequest",type:"object"},{$defs:{CodeGenerationId:fT,CodeOccurrenceRecord:fF,CodeSearchChunkId:fU,ExactOccurrenceRecord:{additionalProperties:!1,properties:{matched_kind:{$ref:"#/$defs/ExactTechnicalTermKindV1"},matched_literal:{type:"string"},occurrence:{$ref:"#/$defs/CodeOccurrenceRecord"}},required:["occurrence","matched_kind","matched_literal"],type:"object"},ExactTechnicalTermKindV1:hN,FileOccurrenceId:yu,SourceSpan:vb,SymbolOccurrenceId:vV},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Generation-bound page returned by every callable code query. Coverage,\nomissions, scoring, and terminal state remain in the enclosing\n[`crate::result::RetrievalEvidence`].",properties:{generation:{$ref:"#/$defs/CodeGenerationId"},items:{items:{$ref:"#/$defs/ExactOccurrenceRecord"},type:"array"},next_cursor:{description:"Opaque resume token; its bounded string is the public wire form.",type:["string","null"]},query_fallback:{description:"Independently hashed exact/lexical/graph subpayload. Callers preserve it\nbyte-for-byte rather than interpreting it, so the public schema admits\nthe canonical JSON it carries without re-declaring its internals."},total:{format:"uint64",minimum:0,type:["integer","null"]}},required:["generation","items"],title:"CodeQueryPage",type:"object"},{$defs:{CallableCodeSurfaceMeta:f$,CodeFacetDimension:fC,CodeGenerationId:fT,CodeQueryScope:fL,ResultProjection:_w,RetrievalOrder:_I},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{dimension:{$ref:"#/$defs/CodeFacetDimension"},meta:{$ref:"#/$defs/CallableCodeSurfaceMeta"},scope:{$ref:"#/$defs/CodeQueryScope"}},required:["dimension","scope","meta"],title:"CodeFacetSurfaceRequest",type:"object"},{$defs:{CodeFacetDimension:fC,CodeFacetRecord:{additionalProperties:!1,properties:{count:{format:"uint64",minimum:0,type:"integer"},dimension:{$ref:"#/$defs/CodeFacetDimension"},value:{type:"string"}},required:["dimension","value","count"],type:"object"},CodeGenerationId:fT},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Generation-bound page returned by every callable code query. Coverage,\nomissions, scoring, and terminal state remain in the enclosing\n[`crate::result::RetrievalEvidence`].",properties:{generation:{$ref:"#/$defs/CodeGenerationId"},items:{items:{$ref:"#/$defs/CodeFacetRecord"},type:"array"},next_cursor:{description:"Opaque resume token; its bounded string is the public wire form.",type:["string","null"]},query_fallback:{description:"Independently hashed exact/lexical/graph subpayload. Callers preserve it\nbyte-for-byte rather than interpreting it, so the public schema admits\nthe canonical JSON it carries without re-declaring its internals."},total:{format:"uint64",minimum:0,type:["integer","null"]}},required:["generation","items"],title:"CodeQueryPage",type:"object"},{$defs:{CallableCodeSurfaceMeta:f$,ImplementationSelector:{oneOf:[{properties:{name:{type:"string"},selector:{const:"trait",type:"string"}},required:["selector","name"],type:"object"},{properties:{name:{type:"string"},selector:{const:"method",type:"string"}},required:["selector","name"],type:"object"}]},ResultProjection:_w,RetrievalOrder:_I,SymbolGraphScope:vP},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{meta:{$ref:"#/$defs/CallableCodeSurfaceMeta",default:{cursor:null,order:"source_position",projection:"evidence"}},scope:{$ref:"#/$defs/SymbolGraphScope",default:{path_prefix:null}},selector:{$ref:"#/$defs/ImplementationSelector"}},required:["selector"],title:"CodeImplementationsSurfaceRequest",type:"object"},{$defs:{CodeGenerationId:fT,CodeGraphReadFreshnessV1:fO,ImplementationRecord:{additionalProperties:!1,description:"One implementation match with its exact source: the implementing\nimpl/class block (methods included) for a trait selector, or the function\nbody for a method selector.",properties:{body:{type:"string"},dispatch_from:{description:"Trait or interface node a trait-selector match was reached through.",type:["string","null"]},edge_kind:{type:"string"},symbol:{$ref:"#/$defs/SymbolPrimitiveRecord"}},required:["symbol","edge_kind","body"],type:"object"},PrimitiveSupportGap:gX,SymbolPrimitiveRecord:vq,UtcMicros:vK},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Bounded semantic result shared by the compatibility surfaces. Rendering,\ntransport envelopes, and MCP content blocks remain outside this contract.",properties:{freshness:{$ref:"#/$defs/CodeGraphReadFreshnessV1"},generation:{$ref:"#/$defs/CodeGenerationId"},items:{items:{$ref:"#/$defs/ImplementationRecord"},type:"array"},next_cursor:{description:"Opaque resume token; its bounded string is the public wire form.",type:["string","null"]},related_edge_count:{format:"uint64",minimum:0,type:["integer","null"]},support_gaps:{items:{$ref:"#/$defs/PrimitiveSupportGap"},type:"array"},total:{format:"uint64",minimum:0,type:["integer","null"]},truncated:{type:"boolean"}},required:["generation","freshness","items","truncated","support_gaps"],title:"SymbolGraphPage",type:"object"},{$defs:{CallableCodeSurfaceMeta:f$,CodeGenerationId:fT,CodeLexicalField:{description:"Typed code fields accepted by the generation-owned lexical authority.",enum:["symbol_name","qualified_name","path","signature","documentation","body_text","preamble_text","exact_term","subtoken"],type:"string"},CodeLexicalFieldFilter:{additionalProperties:!1,properties:{field:{$ref:"#/$defs/CodeLexicalField"},include:{type:"boolean"}},required:["field","include"],type:"object"},CodeQueryScope:fL,ResultProjection:_w,RetrievalOrder:_I},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Serializable adapter DTO for the request-local phrase query view.\n\nThe callable application request deliberately keeps its sanitized query\nnon-serializable. The owning runtime supplies the exact sanitizer\nrevisions when converting this transport DTO.",properties:{field_filters:{default:[],items:{$ref:"#/$defs/CodeLexicalFieldFilter"},type:"array"},fuzzy_budget:{default:0,format:"uint32",minimum:0,type:"integer"},meta:{$ref:"#/$defs/CallableCodeSurfaceMeta"},phrases:{items:{type:"string"},type:"array"},query:{type:"string"},scope:{$ref:"#/$defs/CodeQueryScope"}},required:["query","phrases","scope","meta"],title:"CodePhraseSearchSurfaceRequest",type:"object"},{$defs:{CodeGenerationId:fT,CodeOccurrenceRecord:fF,CodeSearchChunkId:fU,FileOccurrenceId:yu,LexicalOccurrenceRecord:{additionalProperties:!1,properties:{matched_phrases:{items:{type:"string"},type:"array"},matched_terms:{items:{type:"string"},type:"array"},occurrence:{$ref:"#/$defs/CodeOccurrenceRecord"},score_micros:{format:"uint64",minimum:0,type:"integer"}},required:["occurrence","score_micros","matched_phrases","matched_terms"],type:"object"},SourceSpan:vb,SymbolOccurrenceId:vV},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Generation-bound page returned by every callable code query. Coverage,\nomissions, scoring, and terminal state remain in the enclosing\n[`crate::result::RetrievalEvidence`].",properties:{generation:{$ref:"#/$defs/CodeGenerationId"},items:{items:{$ref:"#/$defs/LexicalOccurrenceRecord"},type:"array"},next_cursor:{description:"Opaque resume token; its bounded string is the public wire form.",type:["string","null"]},query_fallback:{description:"Independently hashed exact/lexical/graph subpayload. Callers preserve it\nbyte-for-byte rather than interpreting it, so the public schema admits\nthe canonical JSON it carries without re-declaring its internals."},total:{format:"uint64",minimum:0,type:["integer","null"]}},required:["generation","items"],title:"CodeQueryPage",type:"object"},{$defs:{CallableCodeSurfaceMeta:f$,ResultProjection:_w,RetrievalOrder:_I,SymbolGraphScope:vP},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{is_async:{type:["boolean","null"]},meta:{$ref:"#/$defs/CallableCodeSurfaceMeta",default:{cursor:null,order:"source_position",projection:"evidence"}},params:{default:[],items:{type:"string"},type:"array"},returns:{type:["string","null"]},scope:{$ref:"#/$defs/SymbolGraphScope",default:{path_prefix:null}}},title:"CodeSignatureSearchSurfaceRequest",type:"object"},{$defs:{CodeGenerationId:fT,CodeGraphReadFreshnessV1:fO,PrimitiveSupportGap:gX,SymbolPrimitiveRecord:vq,UtcMicros:vK},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Bounded semantic result shared by the compatibility surfaces. Rendering,\ntransport envelopes, and MCP content blocks remain outside this contract.",properties:{freshness:{$ref:"#/$defs/CodeGraphReadFreshnessV1"},generation:{$ref:"#/$defs/CodeGenerationId"},items:{items:{$ref:"#/$defs/SymbolPrimitiveRecord"},type:"array"},next_cursor:{description:"Opaque resume token; its bounded string is the public wire form.",type:["string","null"]},related_edge_count:{format:"uint64",minimum:0,type:["integer","null"]},support_gaps:{items:{$ref:"#/$defs/PrimitiveSupportGap"},type:"array"},total:{format:"uint64",minimum:0,type:["integer","null"]},truncated:{type:"boolean"}},required:["generation","freshness","items","truncated","support_gaps"],title:"SymbolGraphPage",type:"object"},{$defs:{CallableCodeSurfaceMeta:f$,ResultProjection:_w,RetrievalOrder:_I,SymbolGraphScope:vP},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{lazy_index_ignored_dependencies:{type:"boolean"},meta:{$ref:"#/$defs/CallableCodeSurfaceMeta"},query:{type:"string"},scope:{$ref:"#/$defs/SymbolGraphScope"}},required:["query","scope","lazy_index_ignored_dependencies","meta"],title:"CodeSymbolSearchSurfaceRequest",type:"object"},{$defs:{CallableCodeSurfaceMeta:f$,CodeGenerationId:fT,CodeQueryScope:fL,ResultProjection:_w,RetrievalOrder:_I},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{meta:{$ref:"#/$defs/CallableCodeSurfaceMeta"},scope:{$ref:"#/$defs/CodeQueryScope"}},required:["scope","meta"],title:"CodeTimelineSurfaceRequest",type:"object"},{$defs:{CodeGenerationId:fT,CodeTimelineRecord:{additionalProperties:!1,properties:{file_count:{format:"uint64",minimum:0,type:"integer"},generation:{$ref:"#/$defs/CodeGenerationId"},indexed_at:{$ref:"#/$defs/UtcMicros"},symbol_count:{format:"uint64",minimum:0,type:"integer"}},required:["generation","indexed_at","file_count","symbol_count"],type:"object"},UtcMicros:vK},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Generation-bound page returned by every callable code query. Coverage,\nomissions, scoring, and terminal state remain in the enclosing\n[`crate::result::RetrievalEvidence`].",properties:{generation:{$ref:"#/$defs/CodeGenerationId"},items:{items:{$ref:"#/$defs/CodeTimelineRecord"},type:"array"},next_cursor:{description:"Opaque resume token; its bounded string is the public wire form.",type:["string","null"]},query_fallback:{description:"Independently hashed exact/lexical/graph subpayload. Callers preserve it\nbyte-for-byte rather than interpreting it, so the public schema admits\nthe canonical JSON it carries without re-declaring its internals."},total:{format:"uint64",minimum:0,type:["integer","null"]}},required:["generation","items"],title:"CodeQueryPage",type:"object"},{$defs:{CallableCodeSurfaceMeta:f$,ResultProjection:_w,RetrievalOrder:_I,SymbolGraphScope:vP},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{maximum_depth:{default:5,format:"uint32",minimum:0,type:"integer"},meta:{$ref:"#/$defs/CallableCodeSurfaceMeta",default:{cursor:null,order:"source_position",projection:"evidence"}},node_id:{type:"string"},scope:{$ref:"#/$defs/SymbolGraphScope",default:{path_prefix:null}}},required:["node_id"],title:"CodeTypeHierarchySurfaceRequest",type:"object"},{$defs:{CodeGenerationId:fT,CodeGraphReadFreshnessV1:fO,PrimitiveSupportGap:gX,SymbolPrimitiveRecord:vq,TypeHierarchyRecord:{additionalProperties:!1,properties:{depth:{format:"uint32",minimum:0,type:"integer"},edge_kind:{type:"string"},parent_node_id:{type:"string"},symbol:{$ref:"#/$defs/SymbolPrimitiveRecord"}},required:["symbol","parent_node_id","edge_kind","depth"],type:"object"},UtcMicros:vK},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Bounded semantic result shared by the compatibility surfaces. Rendering,\ntransport envelopes, and MCP content blocks remain outside this contract.",properties:{freshness:{$ref:"#/$defs/CodeGraphReadFreshnessV1"},generation:{$ref:"#/$defs/CodeGenerationId"},items:{items:{$ref:"#/$defs/TypeHierarchyRecord"},type:"array"},next_cursor:{description:"Opaque resume token; its bounded string is the public wire form.",type:["string","null"]},related_edge_count:{format:"uint64",minimum:0,type:["integer","null"]},support_gaps:{items:{$ref:"#/$defs/PrimitiveSupportGap"},type:"array"},total:{format:"uint64",minimum:0,type:["integer","null"]},truncated:{type:"boolean"}},required:["generation","freshness","items","truncated","support_gaps"],title:"SymbolGraphPage",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{staged_only:{description:"If true, only analyze staged changes (default: false = all uncommitted\nchanges).",type:["boolean","null"]}},title:"CommitContextSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fE,CodeIndexConvergenceParkedV1:fA,CodeIndexStalenessStateV1:fz,CommitCategoryV1:{description:"The commit category the changed file roles suggest.",enum:["feature/fix (source + tests)","feature/fix/refactor","test","chore/docs/config"],type:"string"},CommitContextSummaryV1:{additionalProperties:!1,properties:{changed_files:{items:{$ref:"#/$defs/CommitFileRoleV1"},type:"array"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},recent_commits:{items:{type:"string"},type:"array"},suggested_category:{anyOf:[{$ref:"#/$defs/CommitCategoryV1"},{type:"null"}],description:"Absent when the worktree has no changes."},summary:{type:"string"},symbols_by_role:{additionalProperties:!1,properties:{config:{items:{$ref:"#/$defs/CommitSymbolEntryV1"},type:"array"},docs:{items:{$ref:"#/$defs/CommitSymbolEntryV1"},type:"array"},source:{items:{$ref:"#/$defs/CommitSymbolEntryV1"},type:"array"},test:{items:{$ref:"#/$defs/CommitSymbolEntryV1"},type:"array"}},type:"object"}},required:["changed_files","symbols_by_role","recent_commits","summary"],type:"object"},CommitFileRoleV1:{additionalProperties:!1,properties:{file:{type:"string"},role:{$ref:"#/$defs/GitFileRoleV1"},symbols:{format:"uint",minimum:0,type:"integer"}},required:["file","role","symbols"],type:"object"},CommitSymbolEntryV1:{anyOf:[{$ref:"#/$defs/CommitSymbolV1"},{$ref:"#/$defs/ConfigSummaryV1"}]},CommitSymbolV1:{additionalProperties:!1,properties:{file:{type:"string"},kind:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},name:{type:"string"}},required:["name","kind","file","line"],type:"object"},ConfigSummaryKindV1:fZ,ConfigSummaryV1:fQ,GitFileRoleV1:{description:"A changed file's semantic role.",enum:["config","docs","source","test"],type:"string"},GitToolErrorKindV1:yN,GitToolErrorV1:yz,GitToolFailureV1:yD,GitToolOperationV1:yF,PrimitiveFreshnessStateV1:gG,PrimitiveIndexingStateV1:gB,PrimitiveSearchFreshnessV1:gQ},$schema:"https://json-schema.org/draft/2020-12/schema",anyOf:[{$ref:"#/$defs/CommitContextSummaryV1"},{$ref:"#/$defs/GitToolFailureV1"}],title:"CommitContextResultV1"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{limit:{description:"Maximum number of results to return (default: 10, at most 100).",format:"uint32",minimum:0,type:["integer","null"]},node_kind:{description:"Filter by node kind (default: every kind).",type:["string","null"]},path:{description:"Filter to files under this directory path (e.g. 'src/main/java').",type:["string","null"]}},title:"ComplexitySurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fE,CodeIndexConvergenceParkedV1:fA,CodeIndexStalenessStateV1:fz,ComplexityAnalysisV1:fB,ComplexityReportEntryV1:{additionalProperties:!1,properties:{branches:{format:"uint32",minimum:0,type:["integer","null"]},complexity_analysis:{$ref:"#/$defs/ComplexityAnalysisV1"},cyclomatic_complexity:{description:"The counters are `None` when `complexity_analysis` reports the bounded\nwalk did not cover the body.",format:"uint32",minimum:0,type:["integer","null"]},fan_in:{format:"uint64",minimum:0,type:"integer"},fan_out:{format:"uint64",minimum:0,type:"integer"},file:{type:"string"},id:{type:"string"},kind:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},lines:{format:"uint32",minimum:0,type:"integer"},loops:{format:"uint32",minimum:0,type:["integer","null"]},max_nesting:{format:"uint32",minimum:0,type:["integer","null"]},name:{type:"string"},score:{format:"uint64",minimum:0,type:"integer"}},required:["id","name","kind","file","line","lines","complexity_analysis","fan_out","fan_in","score"],type:"object"},PrimitiveFreshnessStateV1:gG,PrimitiveIndexingStateV1:gB,PrimitiveSearchFreshnessV1:gQ},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{formula:{type:"string"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},note:{type:"string"},ranking:{items:{$ref:"#/$defs/ComplexityReportEntryV1"},type:"array"},result_count:{format:"uint64",minimum:0,type:"integer"}},required:["formula","note","result_count","ranking"],title:"ComplexityReportV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Exactly one of `path` or `glob` names the files to query.",properties:{glob:{description:"Glob pattern to match multiple config files (e.g. '**/Cargo.toml').\nMutually exclusive with 'path'.",type:["string","null"]},key:{description:"Dot-separated key path (e.g. 'package.version',\n'dependencies.tokio.version').",type:"string"},path:{description:"Project-relative path to a single config file (e.g. 'Cargo.toml').\nMutually exclusive with 'glob'.",type:["string","null"]}},required:["key"],title:"ConfigSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fE,CodeIndexConvergenceParkedV1:fA,CodeIndexStalenessStateV1:fz,ConfigKeyFoundV1:{additionalProperties:!1,properties:{file:{type:"string"},key:{type:"string"},line:{description:"The first line whose text starts with the key's leaf segment.",format:"uint32",minimum:0,type:["integer","null"]},value:!0},required:["file","key","value"],type:"object"},ConfigKeyMissingV1:{additionalProperties:!1,description:"`value` is always null and `found` always false; both stay on the wire\nso a missing key reads the same as it always has.",properties:{file:{type:"string"},found:{type:"boolean"},key:{type:"string"},value:{type:"null"}},required:["file","key","value","found"],type:"object"},ConfigMatchV1:{anyOf:[{$ref:"#/$defs/ConfigParseErrorV1"},{$ref:"#/$defs/ConfigKeyMissingV1"},{$ref:"#/$defs/ConfigKeyFoundV1"}],description:"One queried config file: the file's parse error, the key's absence, or the\nkey's value and defining line.\n\nThe variants are distinguished by their exact field sets, so each one\ndenies unknown fields and the most specific shapes are tried first."},ConfigParseErrorV1:{additionalProperties:!1,properties:{error:{type:"string"},file:{type:"string"}},required:["file","error"],type:"object"},PrimitiveFreshnessStateV1:gG,PrimitiveIndexingStateV1:gB,PrimitiveSearchFreshnessV1:gQ},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},match_count:{description:"Files where the key was found or that failed to parse.",format:"uint",minimum:0,type:"integer"},matches:{items:{$ref:"#/$defs/ConfigMatchV1"},type:"array"}},required:["match_count","matches"],title:"ConfigResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{cursor:{default:null,description:"The previous page's `next_cursor`, valid only with the same `limit`.",type:["string","null"]},limit:{format:"uint",minimum:0,type:"integer"}},required:["limit"],title:"ConfigurationAuditRequestV1",type:"object"},{$defs:{ActorId:mW,ConfigurationAuditEvent:{additionalProperties:!1,description:"Append-only audit record. `target_commitment` is event-scoped and cannot be\njoined across audit events; a caller must be separately authorized before\nany canonical target is resolved by the store/application layer.",properties:{actor_id:{$ref:"#/$defs/ActorId"},base_revision_id:{$ref:"#/$defs/ConfigurationRevisionId"},event_id:{$ref:"#/$defs/ConfigurationAuditEventId"},event_kind:{$ref:"#/$defs/ConfigurationAuditEventKindV1"},idempotency_key:{anyOf:[{$ref:"#/$defs/ConfigurationIdempotencyKey"},{type:"null"}]},occurred_at:{$ref:"#/$defs/UtcMicros"},operation_digest:{$ref:"#/$defs/ManifestDigest"},receipt_id:{anyOf:[{$ref:"#/$defs/ConfigurationReceiptId"},{type:"null"}]},result_revision_id:{anyOf:[{$ref:"#/$defs/ConfigurationRevisionId"},{type:"null"}]},safe_reason_code:{type:["string","null"]},target_commitment:{$ref:"#/$defs/ManifestDigest"}},required:["event_id","event_kind","actor_id","base_revision_id","operation_digest","target_commitment","occurred_at"],type:"object"},ConfigurationAuditEventId:{description:"Strongly typed canonical identity: `ConfigurationAuditEventId`.",type:"string"},ConfigurationAuditEventKindV1:{enum:["dry_run_created","applied","rejected","expired","activation_failed","rollback_dry_run_created","rollback_applied","recovered"],type:"string"},ConfigurationIdempotencyKey:fX,ConfigurationReceiptId:f1,ConfigurationRevisionId:f0,ManifestDigest:gl,UtcMicros:vK},$schema:"https://json-schema.org/draft/2020-12/schema",properties:{events:{items:{$ref:"#/$defs/ConfigurationAuditEvent"},type:"array"},next_cursor:{description:"Opaque continuation, bound to this operation and request.",type:["string","null"]}},required:["events"],title:"ConfigurationAuditPage",type:"object"},{$defs:{AccessRuleId:mM,ActorId:mW,AnalyzerEnvironmentVariable:mU,AnalyzerExecutableId:mH,AnalyzerExecutableReferenceV1:mG,AnalyzerLanguageId:mB,AnalyzerLanguageSelectionV1:mK,AnalyzerPrivacyClassV1:mJ,AnalyzerResourceLimitsV1:mZ,AnalyzerRestartPolicyV1:mQ,AnalyzerSettingsV1:mX,AnalyzerStructuredValueV1:mY,AuthorityRef:m0,AutomaticWorktreeGcV1:m3,AutomationBackendV1:m9,AutomationHostModeV1:m5,AutomationSettingsV1:fi,AutomationTaskSetV1:fo,AutomationTaskSettingsV1:fn,BranchCollisionPolicyV1:fd,BranchNameComponentV1:fc,BranchNameSeparatorV1:fl,BranchNamingPolicyV1:fp,BranchTopologyKindV1:f_,BranchTopologyPolicyV1:fv,CanonicalGitRefNameV1:fR,CanonicalGitRefPrefix:fP,CapabilityId:fV,CodeIndexWorkerSelectionV1:fD,ConfigurationDirectMutationRequestV1:{oneOf:[{properties:{key:{$ref:"#/$defs/SettingKey"},layer:{$ref:"#/$defs/ConfigurationLayerIdV1"},operation:{const:"set",type:"string"},value:{$ref:"#/$defs/ConfigurationValueV1"}},required:["operation","layer","key","value"],type:"object"},{properties:{key:{$ref:"#/$defs/SettingKey"},layer:{$ref:"#/$defs/ConfigurationLayerIdV1"},operation:{const:"unset",type:"string"}},required:["operation","layer","key"],type:"object"}]},ConfigurationIdempotencyKey:fX,ConfigurationLayerIdV1:fY,ConfigurationRevisionId:f0,ConfigurationValueV1:f4,ContextScoutConfigurationLimitsV1:he,ContextScoutConfigurationModeV1:ht,ContextScoutConfigurationStateV1:hr,ContextScoutConfiguredModelPathV1:hi,ContextScoutSettingsV1:hv,CredentialReferenceId:hq,CrossMergeModeV1:hI,CrossMergePolicyV1:hx,GitHubStackedPullRequestPolicyV1:yP,HistoryRewritePolicyV1:yU,LcmSummarizerExecutableV1:y9,LcmSummarizerExecutablesV1:y5,LocatorDigest:gr,ManifestDigest:gl,ProjectId:g2,ProtectedRefDispositionV1:g8,ProtectedRefRuleV1:g7,ProtectedRefSelectorV1:_e,ProviderId:_i,QueryCollectionId:_s,RepositoryId:_v,RepositoryPlacementScopeV1:_b,RequiredCheckExpectationV1:_$,RequiredCheckV1:_S,ReviewRequirementV1:_T,ReviewTopologyKindV1:_O,ReviewTopologyPolicyV1:_E,RuleEffect:_N,ScopeAccessRule:_H,ScopeAccessSubjectV1:_G,ScopeControlOperationV1:_B,ScopeSourceBinding:_Y,SensitiveFilesystemLocatorV1:_2,SettingKey:vn,SourceBindingId:vf,SourceKindV1:vg,TopologyConcurrencyPolicyV1:vF,TopologyEscalationPolicyV1:vL,TopologyGatePolicyV1:vU,TopologyNotificationLevelV1:vH,UserProfileId:vB,UtcMicros:vK,WorkApprovalPolicy:vX,WorkContentLocationClassV1:bl,WorkEffortClassV1:bf,WorkEgressPolicy:bh,WorkExecutableBindingV1:b_,WorkExecutableCapabilityV1:bv,WorkExecutableReference:bb,WorkExecutionLimits:bS,WorkExpertiseCategoryV1:bw,WorkExpertiseConsentV1:bR,WorkFallbackTopology:bP,WorkFilesystemPolicy:bq,WorkOrdinalBandV1:bD,WorkProviderRouteId:$o,WorkProviderRouteV1:$n,WorkRouteCandidateV1:$m,WorkRouteExecutionProfileV1:$h,WorkSandboxPolicy:$b,WorkTopologyPolicyV1:$V,WorktreeCleanlinessRequirementV1:$A,WorktreePlacementModeV1:$z,WorktreeRetentionPolicyV1:$D,WorktreeRootPolicyV1:$F},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{expected_revision:{$ref:"#/$defs/ConfigurationRevisionId"},idempotency_key:{$ref:"#/$defs/ConfigurationIdempotencyKey"},mutations:{items:{$ref:"#/$defs/ConfigurationDirectMutationRequestV1"},type:"array"}},required:["mutations","expected_revision","idempotency_key"],title:"ConfigurationBatchRequestV1",type:"object"},{$defs:{AccessPolicyDigest:mA,ConfigurationReceiptId:f1,ConfigurationRevisionId:f0,ConfigurationSettlementAuthorityV1:{additionalProperties:!1,description:"Original authorization evidence pinned to a durable configuration effect.\nA retry reauthorizes access separately without replacing these fields.",properties:{policy_digest:{$ref:"#/$defs/AccessPolicyDigest"},policy_epoch:{format:"uint64",minimum:0,type:"integer"},revalidated_at:{$ref:"#/$defs/UtcMicros"}},required:["policy_epoch","policy_digest","revalidated_at"],type:"object"},ConfigurationSnapshotId:f2,ManifestDigest:gl,UtcMicros:vK},$schema:"https://json-schema.org/draft/2020-12/schema",properties:{base_revision_id:{$ref:"#/$defs/ConfigurationRevisionId"},created_at:{$ref:"#/$defs/UtcMicros"},effective_deadline_at:{$ref:"#/$defs/UtcMicros"},operation_digest:{$ref:"#/$defs/ManifestDigest"},receipt_id:{$ref:"#/$defs/ConfigurationReceiptId"},result_revision_id:{$ref:"#/$defs/ConfigurationRevisionId"},settlement_authority:{$ref:"#/$defs/ConfigurationSettlementAuthorityV1"},snapshot_id:{$ref:"#/$defs/ConfigurationSnapshotId"}},required:["receipt_id","base_revision_id","result_revision_id","snapshot_id","operation_digest","settlement_authority","created_at","effective_deadline_at"],title:"ConfigurationMutationReceipt",type:"object"},{$defs:{SettingKey:vn},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{key:{$ref:"#/$defs/SettingKey"}},required:["key"],title:"ConfigurationGetRequestV1",type:"object"},{$defs:{AccessRuleId:mM,ActorId:mW,AnalyzerEnvironmentVariable:mU,AnalyzerExecutableId:mH,AnalyzerExecutableReferenceV1:mG,AnalyzerLanguageId:mB,AnalyzerLanguageSelectionV1:mK,AnalyzerPrivacyClassV1:mJ,AnalyzerResourceLimitsV1:mZ,AnalyzerRestartPolicyV1:mQ,AnalyzerSettingsV1:mX,AnalyzerStructuredValueV1:mY,AuthorityRef:m0,AutomaticWorktreeGcV1:m3,AutomationBackendV1:m9,AutomationHostModeV1:m5,AutomationSettingsV1:fi,AutomationTaskSetV1:fo,AutomationTaskSettingsV1:fn,BranchCollisionPolicyV1:fd,BranchNameComponentV1:fc,BranchNameSeparatorV1:fl,BranchNamingPolicyV1:fp,BranchTopologyKindV1:f_,BranchTopologyPolicyV1:fv,CandidateDispositionV1:{enum:["winning","overridden","rejected","defaulted"],type:"string"},CanonicalGitRefNameV1:fR,CanonicalGitRefPrefix:fP,CapabilityId:fV,CodeIndexWorkerSelectionV1:fD,ConfigurationCandidateV1:{additionalProperties:!1,description:"Resolution provenance is intentionally distinct from behavior. Moving the\nsame winner between layers can change this material without changing the\neffective behavior digest.",properties:{disposition:{$ref:"#/$defs/CandidateDispositionV1"},layer:{$ref:"#/$defs/ConfigurationLayerIdV1"},revision_id:{$ref:"#/$defs/ConfigurationRevisionId"},safe_reason:{type:["string","null"]}},required:["layer","revision_id","disposition"],type:"object"},ConfigurationLayerIdV1:fY,ConfigurationRevisionId:f0,ConfigurationSettingActionV1:{enum:["set","unset"],type:"string"},ConfigurationSettingFindingV1:{description:"A stored value the running release keeps but does not apply. The value\nstays readable so `legal_actions` on the same key can replace it.",oneOf:[{additionalProperties:!1,description:"An `index.exclude.v1` / `index.include.v1` pattern that does not\ncompile. An earlier release stored it unchecked; indexing runs\nwithout it.",properties:{kind:{const:"invalid_index_path_pattern",type:"string"},legal_actions:{items:{$ref:"#/$defs/ConfigurationSettingActionV1"},type:"array"},message:{type:"string"},pattern:{type:"string"}},required:["kind","pattern","message","legal_actions"],type:"object"}]},ConfigurationSnapshotId:f2,ConfigurationValueV1:f4,ContextScoutConfigurationLimitsV1:he,ContextScoutConfigurationModeV1:ht,ContextScoutConfigurationStateV1:hr,ContextScoutConfiguredModelPathV1:hi,ContextScoutSettingsV1:hv,CredentialReferenceId:hq,CrossMergeModeV1:hI,CrossMergePolicyV1:hx,GitHubStackedPullRequestPolicyV1:yP,HistoryRewritePolicyV1:yU,LcmSummarizerExecutableV1:y9,LcmSummarizerExecutablesV1:y5,LocatorDigest:gr,ManifestDigest:gl,ProjectId:g2,ProtectedRefDispositionV1:g8,ProtectedRefRuleV1:g7,ProtectedRefSelectorV1:_e,ProviderId:_i,QueryCollectionId:_s,RepositoryId:_v,RepositoryPlacementScopeV1:_b,RequiredCheckExpectationV1:_$,RequiredCheckV1:_S,ReviewRequirementV1:_T,ReviewTopologyKindV1:_O,ReviewTopologyPolicyV1:_E,RuleEffect:_N,ScopeAccessRule:_H,ScopeAccessSubjectV1:_G,ScopeControlOperationV1:_B,ScopeSourceBinding:_Y,SensitiveFilesystemLocatorV1:_2,SettingKey:vn,SourceBindingId:vf,SourceKindV1:vg,TopologyConcurrencyPolicyV1:vF,TopologyEscalationPolicyV1:vL,TopologyGatePolicyV1:vU,TopologyNotificationLevelV1:vH,UserProfileId:vB,UtcMicros:vK,WorkApprovalPolicy:vX,WorkContentLocationClassV1:bl,WorkEffortClassV1:bf,WorkEgressPolicy:bh,WorkExecutableBindingV1:b_,WorkExecutableCapabilityV1:bv,WorkExecutableReference:bb,WorkExecutionLimits:bS,WorkExpertiseCategoryV1:bw,WorkExpertiseConsentV1:bR,WorkFallbackTopology:bP,WorkFilesystemPolicy:bq,WorkOrdinalBandV1:bD,WorkProviderRouteId:$o,WorkProviderRouteV1:$n,WorkRouteCandidateV1:$m,WorkRouteExecutionProfileV1:$h,WorkSandboxPolicy:$b,WorkTopologyPolicyV1:$V,WorktreeCleanlinessRequirementV1:$A,WorktreePlacementModeV1:$z,WorktreeRetentionPolicyV1:$D,WorktreeRootPolicyV1:$F},$schema:"https://json-schema.org/draft/2020-12/schema",properties:{candidates:{items:{$ref:"#/$defs/ConfigurationCandidateV1"},type:"array"},effective_behavior_digest:{$ref:"#/$defs/ManifestDigest"},effective_value:{$ref:"#/$defs/ConfigurationValueV1"},findings:{description:"Parts of the stored value this release does not apply. Empty when the\neffective value applies in full.",items:{$ref:"#/$defs/ConfigurationSettingFindingV1"},type:"array"},key:{$ref:"#/$defs/SettingKey"},resolution_provenance_digest:{$ref:"#/$defs/ManifestDigest"},revision_id:{$ref:"#/$defs/ConfigurationRevisionId",description:"Current configuration revision accepted by mutation `expected_revision` CAS."},snapshot_id:{$ref:"#/$defs/ConfigurationSnapshotId",description:"Content identity of the fully resolved configuration snapshot."}},required:["key","effective_value","revision_id","snapshot_id","effective_behavior_digest","resolution_provenance_digest","candidates","findings"],title:"ResolvedSetting",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Typed input for the configuration list read through the daemon\ninvocation boundary.",title:"ConfigurationListRequestV1",type:"object"},{$defs:{RestartRequirementV1:{enum:["none","analyzer_restart","daemon_restart"],type:"string"},SettingKey:vn,SettingSensitivityV1:{enum:["public","sensitive"],type:"string"},SettingSummary:{properties:{key:{$ref:"#/$defs/SettingKey"},restart_requirement:{$ref:"#/$defs/RestartRequirementV1"},sensitivity:{$ref:"#/$defs/SettingSensitivityV1"}},required:["key","sensitivity","restart_requirement"],type:"object"}},$schema:"https://json-schema.org/draft/2020-12/schema",items:{$ref:"#/$defs/SettingSummary"},title:"Array_of_SettingSummary",type:"array"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,title:"ConfigurationObservedStateRequestV1",type:"object"},{$defs:{ActivationDriftV1:{enum:["current","never_activated","pending_restart","activation_failed"],type:"string"},ComponentConfigurationState:{properties:{activation_error_code:{type:["string","null"]},component:{type:"string"},desired_revision_id:{$ref:"#/$defs/ConfigurationRevisionId"},drift:{$ref:"#/$defs/ActivationDriftV1"},last_working_revision_id:{anyOf:[{$ref:"#/$defs/ConfigurationRevisionId"},{type:"null"}]},observed_revision_id:{anyOf:[{$ref:"#/$defs/ConfigurationRevisionId"},{type:"null"}]},restart_required:{type:"boolean"}},required:["component","desired_revision_id","restart_required","drift"],type:"object"},ConfigurationRevisionId:f0},$schema:"https://json-schema.org/draft/2020-12/schema",items:{$ref:"#/$defs/ComponentConfigurationState"},title:"Array_of_ComponentConfigurationState",type:"array"},{$defs:{ChangePlanId:fI,ConfigurationIdempotencyKey:fX,ConfigurationRevisionId:f0,ManifestDigest:gl},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{expected_base_revision_id:{$ref:"#/$defs/ConfigurationRevisionId"},idempotency_key:{$ref:"#/$defs/ConfigurationIdempotencyKey"},operation_digest:{$ref:"#/$defs/ManifestDigest"},plan_id:{$ref:"#/$defs/ChangePlanId"}},required:["plan_id","expected_base_revision_id","operation_digest","idempotency_key"],title:"ConfigurationProtectedApplyRequestV1",type:"object"},{$defs:{AccessRuleId:mM,ActorId:mW,AuthorityRef:m0,AutomaticWorktreeGcV1:m3,BranchCollisionPolicyV1:fd,BranchNameComponentV1:fc,BranchNameSeparatorV1:fl,BranchNamingPolicyV1:fp,BranchTopologyKindV1:f_,BranchTopologyPolicyV1:fv,CanonicalGitRefNameV1:fR,CanonicalGitRefPrefix:fP,CapabilityId:fV,ConfigurationRevisionId:f0,CrossMergeModeV1:hI,CrossMergePolicyV1:hx,GitHubStackedPullRequestPolicyV1:yP,HistoryRewritePolicyV1:yU,LocatorDigest:gr,ManifestDigest:gl,ProjectId:g2,ProtectedChange:{description:"The protected configuration operation set. Ordinary scalar mutations are\nintentionally absent; they activate directly after validation.",oneOf:[{properties:{kind:{const:"bind_source",type:"string"},value:{$ref:"#/$defs/ScopeSourceBinding"}},required:["kind","value"],type:"object"},{properties:{kind:{const:"rebind_source",type:"string"},value:{$ref:"#/$defs/ScopeSourceBinding"}},required:["kind","value"],type:"object"},{properties:{kind:{const:"unbind_source",type:"string"},value:{properties:{binding_id:{$ref:"#/$defs/SourceBindingId"}},required:["binding_id"],type:"object"}},required:["kind","value"],type:"object"},{properties:{kind:{const:"upsert_access_rule",type:"string"},value:{$ref:"#/$defs/ScopeAccessRule"}},required:["kind","value"],type:"object"},{properties:{kind:{const:"remove_access_rule",type:"string"},value:{properties:{rule_id:{$ref:"#/$defs/AccessRuleId"}},required:["rule_id"],type:"object"}},required:["kind","value"],type:"object"},{properties:{kind:{const:"replace_work_topology_policy",type:"string"},value:{$ref:"#/$defs/WorkTopologyPolicyV1"}},required:["kind","value"],type:"object"}]},ProtectedRefDispositionV1:g8,ProtectedRefRuleV1:g7,ProtectedRefSelectorV1:_e,RepositoryId:_v,RepositoryPlacementScopeV1:_b,RequiredCheckExpectationV1:_$,RequiredCheckV1:_S,ReviewRequirementV1:_T,ReviewTopologyKindV1:_O,ReviewTopologyPolicyV1:_E,RuleEffect:_N,ScopeAccessRule:_H,ScopeAccessSubjectV1:_G,ScopeControlOperationV1:_B,ScopeSourceBinding:_Y,SensitiveFilesystemLocatorV1:_2,SourceBindingId:vf,SourceKindV1:vg,TopologyConcurrencyPolicyV1:vF,TopologyEscalationPolicyV1:vL,TopologyGatePolicyV1:vU,TopologyNotificationLevelV1:vH,UserProfileId:vB,UtcMicros:vK,WorkTopologyPolicyV1:$V,WorktreeCleanlinessRequirementV1:$A,WorktreePlacementModeV1:$z,WorktreeRetentionPolicyV1:$D,WorktreeRootPolicyV1:$F},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{change:{$ref:"#/$defs/ProtectedChange"},expected_revision:{$ref:"#/$defs/ConfigurationRevisionId"}},required:["change","expected_revision"],title:"ConfigurationProtectedPreviewRequestV1",type:"object"},{$defs:{AccessPolicyDigest:mA,ActorId:mW,ChangePlanId:fI,ConfigurationRevisionId:f0,ManifestDigest:gl,RedactedConfigurationChangeV1:{additionalProperties:!1,properties:{after_digest:{anyOf:[{$ref:"#/$defs/ManifestDigest"},{type:"null"}]},before_digest:{anyOf:[{$ref:"#/$defs/ManifestDigest"},{type:"null"}]},operation:{$ref:"#/$defs/ScopeControlOperationV1"},setting_key:{$ref:"#/$defs/SettingKey"}},required:["setting_key","operation"],type:"object"},ScopeControlOperationV1:_B,SettingKey:vn,UtcMicros:vK},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Immutable dry-run result. It contains no raw locator, secret, target\nidentity, or plaintext configuration value.",properties:{actor_id:{$ref:"#/$defs/ActorId"},authorization_policy_digest:{$ref:"#/$defs/AccessPolicyDigest"},base_revision_id:{$ref:"#/$defs/ConfigurationRevisionId"},created_at:{$ref:"#/$defs/UtcMicros"},expires_at:{$ref:"#/$defs/UtcMicros"},membership_digest:{anyOf:[{$ref:"#/$defs/ManifestDigest"},{type:"null"}]},operation_digest:{$ref:"#/$defs/ManifestDigest"},plan_id:{$ref:"#/$defs/ChangePlanId"},policy_epoch:{format:"uint64",minimum:0,type:"integer"},redacted_changes:{items:{$ref:"#/$defs/RedactedConfigurationChangeV1"},type:"array"},resolved_scope_digest:{$ref:"#/$defs/ManifestDigest"}},required:["plan_id","actor_id","base_revision_id","operation_digest","resolved_scope_digest","authorization_policy_digest","policy_epoch","expires_at","created_at","redacted_changes"],title:"ProtectedChangePlan",type:"object"},{$defs:{ConfigurationRevisionId:f0,RollbackModeV1:{enum:["all_or_nothing","partial"],type:"string"}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{mode:{$ref:"#/$defs/RollbackModeV1"},target_revision_id:{$ref:"#/$defs/ConfigurationRevisionId"}},required:["target_revision_id","mode"],title:"ConfigurationRollbackPreviewRequestV1",type:"object"},{$defs:{AccessRuleId:mM,ActorId:mW,AnalyzerEnvironmentVariable:mU,AnalyzerExecutableId:mH,AnalyzerExecutableReferenceV1:mG,AnalyzerLanguageId:mB,AnalyzerLanguageSelectionV1:mK,AnalyzerPrivacyClassV1:mJ,AnalyzerResourceLimitsV1:mZ,AnalyzerRestartPolicyV1:mQ,AnalyzerSettingsV1:mX,AnalyzerStructuredValueV1:mY,AuthorityRef:m0,AutomaticWorktreeGcV1:m3,AutomationBackendV1:m9,AutomationHostModeV1:m5,AutomationSettingsV1:fi,AutomationTaskSetV1:fo,AutomationTaskSettingsV1:fn,BranchCollisionPolicyV1:fd,BranchNameComponentV1:fc,BranchNameSeparatorV1:fl,BranchNamingPolicyV1:fp,BranchTopologyKindV1:f_,BranchTopologyPolicyV1:fv,CanonicalGitRefNameV1:fR,CanonicalGitRefPrefix:fP,CapabilityId:fV,CodeIndexWorkerSelectionV1:fD,ConfigurationIdempotencyKey:fX,ConfigurationLayerIdV1:fY,ConfigurationRevisionId:f0,ConfigurationValueV1:f4,ContextScoutConfigurationLimitsV1:he,ContextScoutConfigurationModeV1:ht,ContextScoutConfigurationStateV1:hr,ContextScoutConfiguredModelPathV1:hi,ContextScoutSettingsV1:hv,CredentialReferenceId:hq,CrossMergeModeV1:hI,CrossMergePolicyV1:hx,GitHubStackedPullRequestPolicyV1:yP,HistoryRewritePolicyV1:yU,LcmSummarizerExecutableV1:y9,LcmSummarizerExecutablesV1:y5,LocatorDigest:gr,ManifestDigest:gl,ProjectId:g2,ProtectedRefDispositionV1:g8,ProtectedRefRuleV1:g7,ProtectedRefSelectorV1:_e,ProviderId:_i,QueryCollectionId:_s,RepositoryId:_v,RepositoryPlacementScopeV1:_b,RequiredCheckExpectationV1:_$,RequiredCheckV1:_S,ReviewRequirementV1:_T,ReviewTopologyKindV1:_O,ReviewTopologyPolicyV1:_E,RuleEffect:_N,ScopeAccessRule:_H,ScopeAccessSubjectV1:_G,ScopeControlOperationV1:_B,ScopeSourceBinding:_Y,SensitiveFilesystemLocatorV1:_2,SettingKey:vn,SourceBindingId:vf,SourceKindV1:vg,TopologyConcurrencyPolicyV1:vF,TopologyEscalationPolicyV1:vL,TopologyGatePolicyV1:vU,TopologyNotificationLevelV1:vH,UserProfileId:vB,UtcMicros:vK,WorkApprovalPolicy:vX,WorkContentLocationClassV1:bl,WorkEffortClassV1:bf,WorkEgressPolicy:bh,WorkExecutableBindingV1:b_,WorkExecutableCapabilityV1:bv,WorkExecutableReference:bb,WorkExecutionLimits:bS,WorkExpertiseCategoryV1:bw,WorkExpertiseConsentV1:bR,WorkFallbackTopology:bP,WorkFilesystemPolicy:bq,WorkOrdinalBandV1:bD,WorkProviderRouteId:$o,WorkProviderRouteV1:$n,WorkRouteCandidateV1:$m,WorkRouteExecutionProfileV1:$h,WorkSandboxPolicy:$b,WorkTopologyPolicyV1:$V,WorktreeCleanlinessRequirementV1:$A,WorktreePlacementModeV1:$z,WorktreeRetentionPolicyV1:$D,WorktreeRootPolicyV1:$F},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Typed revision-CAS input for a configuration write through the daemon\ninvocation boundary.",properties:{expected_revision:{$ref:"#/$defs/ConfigurationRevisionId"},idempotency_key:{$ref:"#/$defs/ConfigurationIdempotencyKey"},key:{$ref:"#/$defs/SettingKey"},layer:{$ref:"#/$defs/ConfigurationLayerIdV1"},value:{$ref:"#/$defs/ConfigurationValueV1"}},required:["layer","key","value","expected_revision","idempotency_key"],title:"ConfigurationSetRequestV1",type:"object"},{$defs:{ConfigurationIdempotencyKey:fX,ConfigurationLayerIdV1:fY,ConfigurationRevisionId:f0,ProjectId:g2,QueryCollectionId:_s,SettingKey:vn,UserProfileId:vB},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{expected_revision:{$ref:"#/$defs/ConfigurationRevisionId"},idempotency_key:{$ref:"#/$defs/ConfigurationIdempotencyKey"},key:{$ref:"#/$defs/SettingKey"},layer:{$ref:"#/$defs/ConfigurationLayerIdV1"}},required:["layer","key","expected_revision","idempotency_key"],title:"ConfigurationUnsetRequestV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{limit:{description:"Maximum number of literal sites to return (default: 100, max: 1000).",format:"uint32",minimum:0,type:["integer","null"]},struct:{description:"Struct name to search literal sites of (e.g. 'GraphStats', 'Config').",type:"string"}},required:["struct"],title:"ConstructorsSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fE,CodeIndexConvergenceParkedV1:fA,CodeIndexStalenessStateV1:fz,ConstructorFieldCoverageV1:{description:"Whether a literal site's field lists are complete relative to the\nstruct's graph definition.",enum:["complete","unknown"],type:"string"},ConstructorResolutionReasonV1:{enum:["ambiguous_simple_name","syntax_only_simple_name"],type:"string"},ConstructorResolutionStatusV1:{description:"Syntax alone cannot link same-name types across modules, so every\nresolution is unverified.",enum:["unverified"],type:"string"},ConstructorSiteV1:{additionalProperties:!1,properties:{field_coverage:{$ref:"#/$defs/ConstructorFieldCoverageV1"},fields:{items:{type:"string"},type:"array"},file:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},missing_fields:{items:{type:"string"},type:"array"},update_fields:{items:{type:"string"},type:"array"}},required:["file","line","fields","update_fields","missing_fields","field_coverage"],type:"object"},ConstructorsNotFoundV1:{additionalProperties:!1,properties:{found:{description:"Always `false`: no struct, class, or case class has the name.",type:"boolean"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},match_count:{format:"uint64",minimum:0,type:"integer"},message:{type:"string"},sites:{items:{$ref:"#/$defs/ConstructorSiteV1"},type:"array"},struct:{type:"string"}},required:["found","struct","message","match_count","sites"],type:"object"},ConstructorsReportV1:{additionalProperties:!1,properties:{candidate_count:{format:"uint64",minimum:0,type:"integer"},expected_fields:{description:"`None` when the name resolves to more than one definition.",items:{type:"string"},type:["array","null"]},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},match_count:{format:"uint64",minimum:0,type:"integer"},resolution_reason:{$ref:"#/$defs/ConstructorResolutionReasonV1"},resolution_status:{$ref:"#/$defs/ConstructorResolutionStatusV1"},sites:{items:{$ref:"#/$defs/ConstructorSiteV1"},type:"array"},struct:{type:"string"}},required:["struct","candidate_count","resolution_status","resolution_reason","match_count","sites"],type:"object"},PrimitiveFreshnessStateV1:gG,PrimitiveIndexingStateV1:gB,PrimitiveSearchFreshnessV1:gQ},$schema:"https://json-schema.org/draft/2020-12/schema",anyOf:[{$ref:"#/$defs/ConstructorsNotFoundV1"},{$ref:"#/$defs/ConstructorsReportV1"}],title:"ConstructorsResultV1"},{$defs:{ContextModeV1:f9},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{budget_tokens:{description:"Cap the ranked sections of the answer at about this many tokens.\nQuotas are fixed shares of the budget. The cut is reported on the result.",format:"uint32",minimum:0,type:["integer","null"]},include_code:{type:["boolean","null"]},include_memory:{type:["boolean","null"]},lexical_anchors:{description:"Exact identifiers or technical terms the answer must be about. Each\nruns as its own lexical route: hits carrying an anchor outrank hits\ncarrying none, exact hits included, every anchor with matches keeps at\nleast its best sites through the lane cap, and `lexical_anchors` in the\nresult reports each anchor's outcome: the sites this result returns\nand, by reason, the admitted sites it could not carry. Bounded and\nvalidated by the retrieval kernel; a\nviolation is a typed request rejection. Identifiers the task names\n(`snake_case`, `camelCase`, `a::b`) are anchored after these.",items:{type:"string"},type:["array","null"]},max_code_blocks:{format:"uint32",minimum:0,type:["integer","null"]},max_nodes:{format:"uint32",minimum:0,type:["integer","null"]},memory_limit:{format:"uint32",minimum:0,type:["integer","null"]},memory_min_trust:{format:"double",type:["number","null"]},mode:{anyOf:[{$ref:"#/$defs/ContextModeV1"},{type:"null"}]},prefer_symbol:{description:"Add a symbol-name lexical route for the identifier-shaped words of the\ntask text.",type:["boolean","null"]},task:{type:"string"}},required:["task"],title:"ContextSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fE,CodeIndexConvergenceParkedV1:fA,CodeIndexStalenessStateV1:fz,ContextCodeBlockV1:{additionalProperties:!1,properties:{code:{type:"string"},end_line:{format:"uint32",minimum:0,type:"integer"},file:{type:"string"},node_id:{type:"string"},start_line:{format:"uint32",minimum:0,type:"integer"}},required:["node_id","file","start_line","end_line","code"],type:"object"},ContextExtensionPointV1:{additionalProperties:!1,description:"A public trait or interface among the context's selected symbols.",properties:{file:{type:"string"},implementor_count:{format:"uint",minimum:0,type:"integer"},kind:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},name:{type:"string"}},required:["name","kind","file","line","implementor_count"],type:"object"},ContextLexicalAnchorV1:f3,ContextModeV1:f9,ContextPlanV1:{additionalProperties:!1,description:"Plan-mode enrichment: where the selected code can be extended and which\ntest files reach it.",properties:{extension_points:{items:{$ref:"#/$defs/ContextExtensionPointV1"},type:"array"},test_files:{description:"Test files calling the selected symbols within two hops; absent when\nno symbol was selected to trace from.",items:{type:"string"},type:["array","null"]}},required:["extension_points"],type:"object"},ContextRelatedOmissionV1:{additionalProperties:!1,description:"Related symbols `context` ranked but did not return.",properties:{omitted:{description:"Ranked related symbols the `max_nodes` cut dropped.",format:"uint",minimum:0,type:"integer"},total:{description:"Distinct related symbols the walk found and ranked.",format:"uint",minimum:0,type:"integer"},total_is_lower_bound:{description:"The neighbor walk stopped at its row limit, so `total` is a lower\nbound.",type:"boolean"}},required:["total","omitted","total_is_lower_bound"],type:"object"},ContextRetrievalPlanV1:{additionalProperties:!1,description:"The retrieval plan `context` executed: which stages ran, what each\nadmitted, and where a budget bounded the answer. Lane-level serving state\nstays in `coverage`.",properties:{code:{$ref:"#/$defs/ContextStageV1",description:"Source bodies for selected symbols, bounded by `max_code_blocks`."},graph:{$ref:"#/$defs/ContextStageV1",description:"Candidates resolved to verified graph symbols."},memory:{$ref:"#/$defs/ContextStageV1",description:"Project memory facts, bounded by `memory_limit`."},related:{$ref:"#/$defs/ContextStageV1",description:"Ranked neighbors of the selected symbols, bounded by `max_nodes`."},search:{$ref:"#/$defs/ContextStageV1",description:"Ranked code-index candidates, bounded by `max_nodes`."}},required:["search","graph","related","code","memory"],type:"object"},ContextRetrievalRouteV1:{description:"Which retrieval route `context` ran.\n\n`name` is the preferred-symbol route. `prose` is the ordinary task\nroute. A caller that omits `prefer_symbol` gets `name` only when the\ntask is one identifier or one `Type.method` / `path::name` token.",enum:["name","prose"],type:"string"},ContextSearchMatchV1:{additionalProperties:!1,properties:{anchor_id:{type:"string"},exact_class:{type:"string"},file:{type:"string"},kind:{type:"string"},name:{type:"string"},qualified_name:{type:"string"},rank:{format:"uint32",minimum:0,type:"integer"},utility_micros:{format:"uint64",minimum:0,type:"integer"}},required:["anchor_id","name","qualified_name","kind","file","exact_class","rank","utility_micros"],type:"object"},ContextStageV1:{description:"What one `context` stage ran with and kept.",oneOf:[{description:"The request did not ask for this stage.",properties:{state:{const:"not_requested",type:"string"}},required:["state"],type:"object"},{description:"A stage this one reads from produced nothing to work on.",properties:{state:{const:"skipped",type:"string"}},required:["state"],type:"object"},{description:"The stage's authority could not answer.",properties:{state:{const:"unavailable",type:"string"}},required:["state"],type:"object"},{description:"The stage admitted `admitted` entries under `budget`. `truncated` is\ntrue when it stopped at that budget, so more entries may exist.",properties:{admitted:{format:"uint32",minimum:0,type:"integer"},budget:{format:"uint32",minimum:0,type:"integer"},state:{const:"ran",type:"string"},truncated:{type:"boolean"}},required:["state","budget","admitted","truncated"],type:"object"}]},FactAssertionId:hz,FactCategoryV1:hD,FactCommitOwnerV1:hL,FactEventId:hH,FactId:hB,FactIdentitySourceResultV1:hK,FactSearchGraphCoverageV1:hQ,FactSearchGraphDegradationV1:hX,FactSearchHitV1:hY,FactSearchScoresV1:h1,FactTelemetryV1:h2,FactV1:h4,LexicalAnchorDropReasonV1:ge,LexicalAnchorDropV1:gt,LocatorDigest:gr,PrimitiveFreshnessStateV1:gG,PrimitiveIndexingStateV1:gB,PrimitiveLaneCompleteV1:gK,PrimitiveLaneStateV1:{enum:["stale","partial","unavailable"],type:"string"},PrimitiveLaneStatusV1:{anyOf:[{$ref:"#/$defs/PrimitiveLaneCompleteV1"},{properties:{generation:{type:["string","null"]},reason:{type:["string","null"]},status:{$ref:"#/$defs/PrimitiveLaneStateV1"}},required:["status"],type:"object"}]},PrimitiveRecallV1:gZ,PrimitiveSearchCoverageV1:{additionalProperties:!1,properties:{exact:{$ref:"#/$defs/PrimitiveLaneStatusV1"},graph:{$ref:"#/$defs/PrimitiveLaneStatusV1"},lexical:{$ref:"#/$defs/PrimitiveLaneStatusV1"},recall:{$ref:"#/$defs/PrimitiveRecallV1"}},required:["exact","lexical","graph","recall"],type:"object"},PrimitiveSearchFreshnessV1:gQ,PrimitiveSymbolLocationV1:gY,PrimitiveUnavailableEvidenceV1:g1,PrimitiveUnavailableStatusV1:g0,ProjectId:g2,ProvenanceId:_t,RetrievalAnchorId:_q,TokenBudgetCutV1:vz,TokenBudgetSectionV1:vD,UtcMicros:vK},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{code:{items:{$ref:"#/$defs/ContextCodeBlockV1"},type:"array"},code_generation:{type:["string","null"]},coverage:{$ref:"#/$defs/PrimitiveSearchCoverageV1"},freshness:{$ref:"#/$defs/PrimitiveSearchFreshnessV1",description:"Freshness of the served code generation, derived from the typed lane\ncoverage and the daemon scheduler's worktree state."},lexical_anchors:{description:"Outcome of every caller `lexical_anchors` entry, then of each\nidentifier the task names; empty when there are neither.",items:{$ref:"#/$defs/ContextLexicalAnchorV1"},type:"array"},memory_graph_coverage:{anyOf:[{$ref:"#/$defs/FactSearchGraphCoverageV1"},{type:"null"}]},memory_matches:{items:{$ref:"#/$defs/FactSearchHitV1"},type:"array"},memory_matches_error:{type:["string","null"]},mode:{$ref:"#/$defs/ContextModeV1"},plan:{anyOf:[{$ref:"#/$defs/ContextPlanV1"},{type:"null"}],description:"Present in plan mode when the verified graph answered."},related_omission:{anyOf:[{$ref:"#/$defs/ContextRelatedOmissionV1"},{type:"null"}],description:"Present when related symbols were left out: by the `max_nodes` cut,\nor because the neighbor walk stopped at its row limit."},related_symbols:{description:"Neighbors of `symbols`, ranked before the `max_nodes` cut: best edge\nkind to a selected symbol (calls, implements, extends, `type_of`,\nreturns, receives, uses, annotates, contains), then total degree\ndescending, then qualified name.",items:{$ref:"#/$defs/PrimitiveSymbolLocationV1"},type:"array"},retrieval:{$ref:"#/$defs/ContextRetrievalPlanV1"},route:{$ref:"#/$defs/ContextRetrievalRouteV1"},search_matches:{items:{$ref:"#/$defs/ContextSearchMatchV1"},type:"array"},symbols:{items:{$ref:"#/$defs/PrimitiveSymbolLocationV1"},type:"array"},task:{type:"string"},token_budget:{anyOf:[{$ref:"#/$defs/TokenBudgetCutV1"},{type:"null"}],description:"Budget accounting when the request supplies `budget_tokens`."},verified_graph_evidence:{anyOf:[{$ref:"#/$defs/PrimitiveUnavailableEvidenceV1"},{type:"null"}]}},required:["task","route","mode","freshness","symbols","related_symbols","code","coverage","memory_matches","retrieval"],title:"ContextResultV1",type:"object"},{$defs:{ContextScoutAddressV1:f5},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{address:{$ref:"#/$defs/ContextScoutAddressV1"}},required:["address"],title:"ContextScoutExactAddressRequestV1",type:"object"},{$defs:{ContextScoutLimitsV1:hp,ContextScoutModelOutcomeV1:hm},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{exhausted:{type:"boolean"},last_estimated_cost_microusd:{format:"uint64",minimum:0,type:["integer","null"]},last_input_tokens:{format:"uint64",minimum:0,type:["integer","null"]},last_model_outcome:{anyOf:[{$ref:"#/$defs/ContextScoutModelOutcomeV1"},{type:"null"}]},last_output_tokens:{format:"uint64",minimum:0,type:["integer","null"]},limits:{$ref:"#/$defs/ContextScoutLimitsV1"}},required:["limits","exhausted"],title:"ContextScoutBudgetResultV1",type:"object"},{$defs:{ContextScoutAddressV1:f5,ContextScoutWorkV1:hk},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{address:{$ref:"#/$defs/ContextScoutAddressV1"},idempotency_key:{type:"string"},work:{$ref:"#/$defs/ContextScoutWorkV1"}},required:["address","work","idempotency_key"],title:"ContextScoutCancelRequestV1",type:"object"},{$defs:{ContextScoutStoreOutcomeV1:hb},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{outcome:{$ref:"#/$defs/ContextScoutStoreOutcomeV1"}},required:["outcome"],title:"ContextScoutMutationResultV1",type:"object"},{$defs:{ContextScoutModelBackendV1:hu,ContextScoutModelOutcomeV1:hm,ContextScoutRuntimeModeV1:hg,ContextScoutServiceStateV1:h_},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{configured_model:{anyOf:[{$ref:"#/$defs/ContextScoutModelBackendV1"},{type:"null"}]},configured_model_available:{type:"boolean"},deterministic_available:{type:"boolean"},last_model_outcome:{anyOf:[{$ref:"#/$defs/ContextScoutModelOutcomeV1"},{type:"null"}]},mode:{$ref:"#/$defs/ContextScoutRuntimeModeV1"},state:{$ref:"#/$defs/ContextScoutServiceStateV1"}},required:["state","mode","deterministic_available","configured_model_available"],title:"ContextScoutCapabilityResultV1",type:"object"},{$defs:{ContextScoutAddressV1:f5,ContextScoutClaimWindowV1:{enum:["idle_window","on_request"],type:"string"}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{address:{$ref:"#/$defs/ContextScoutAddressV1"},idempotency_key:{type:"string"},window:{$ref:"#/$defs/ContextScoutClaimWindowV1"}},required:["address","window","idempotency_key"],title:"ContextScoutClaimRequestV1",type:"object"},{$defs:{CodeGenerationId:fT,ContextScoutAddressV1:f5,ContextScoutCategoryV1:f8,ContextScoutClaimHandleV1:f7,ContextScoutDeliveryWindowV1:ha,ContextScoutEvidenceAvailabilityV1:hs,ContextScoutEvidenceProjectionV1:hd,ContextScoutModelBackendV1:hu,ContextScoutModelOutcomeV1:hm,ContextScoutModelReceiptV1:hf,ContextScoutRouteV1:hy,ContextScoutSuggestionProjectionV1:h$,ContextScoutWorkV1:hk,ManifestDigest:gl,RetrievalAnchorId:_q,UtcMicros:vK},$schema:"https://json-schema.org/draft/2020-12/schema",oneOf:[{properties:{claim:{$ref:"#/$defs/ContextScoutClaimHandleV1"},outcome:{const:"claimed",type:"string"},suggestion:{$ref:"#/$defs/ContextScoutSuggestionProjectionV1"}},required:["outcome","claim","suggestion"],type:"object"},{properties:{outcome:{const:"empty",type:"string"}},required:["outcome"],type:"object"}],title:"ContextScoutClaimResultV1"},{$defs:{ContextScoutAddressV1:f5,ContextScoutClaimHandleV1:f7,ContextScoutDeliveryOutcomeV1:ho,ContextScoutWorkV1:hk,UtcMicros:vK},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{address:{$ref:"#/$defs/ContextScoutAddressV1"},claim:{$ref:"#/$defs/ContextScoutClaimHandleV1"},delivered_at:{$ref:"#/$defs/UtcMicros"},idempotency_key:{type:"string"},outcome:{$ref:"#/$defs/ContextScoutDeliveryOutcomeV1"}},required:["address","claim","delivered_at","outcome","idempotency_key"],title:"ContextScoutDeliveryRequestV1",type:"object"},{$defs:{ContextScoutDeliveryOutcomeV1:ho,ContextScoutDeliveryReceiptV1:hn,ContextScoutStoreOutcomeV1:hb,UtcMicros:vK},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{outcome:{$ref:"#/$defs/ContextScoutStoreOutcomeV1"},receipt:{$ref:"#/$defs/ContextScoutDeliveryReceiptV1"}},required:["outcome","receipt"],title:"ContextScoutDeliveryResultV1",type:"object"},{$defs:{ContextScoutAddressV1:f5},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{address:{$ref:"#/$defs/ContextScoutAddressV1"},limit:{default:8,format:"uint",minimum:0,type:"integer"}},required:["address"],title:"ContextScoutRecentRequestV1",type:"object"},{$defs:{CodeGenerationId:fT,ContextScoutAddressV1:f5,ContextScoutCategoryV1:f8,ContextScoutDeliveryOutcomeV1:ho,ContextScoutDeliveryReceiptV1:hn,ContextScoutDeliveryWindowV1:ha,ContextScoutEvidenceAvailabilityV1:hs,ContextScoutEvidenceProjectionV1:hd,ContextScoutFeedbackKindV1:hc,ContextScoutFeedbackV1:hl,ContextScoutLimitsV1:hp,ContextScoutModelBackendV1:hu,ContextScoutModelOutcomeV1:hm,ContextScoutModelReceiptV1:hf,ContextScoutRecentDeliveryV1:hh,ContextScoutRecentResultV1:{additionalProperties:!1,properties:{configuration_revision:{items:{format:"uint8",maximum:255,minimum:0,type:"integer"},maxItems:32,minItems:32,type:"array"},deliveries:{items:{$ref:"#/$defs/ContextScoutRecentDeliveryV1"},type:"array"},observed_at:{$ref:"#/$defs/UtcMicros"},omitted:{format:"uint",minimum:0,type:"integer"},pending:{items:{$ref:"#/$defs/ContextScoutSuggestionProjectionV1"},type:"array"}},required:["configuration_revision","observed_at","pending","deliveries","omitted"],type:"object"},ContextScoutRouteV1:hy,ContextScoutRuntimeModeV1:hg,ContextScoutServiceStateV1:h_,ContextScoutStatusResultV1:{additionalProperties:!1,properties:{active_suggestions:{format:"uint",minimum:0,type:"integer"},configuration_revision:{items:{format:"uint8",maximum:255,minimum:0,type:"integer"},maxItems:32,minItems:32,type:"array"},last_delivery_outcome:{anyOf:[{$ref:"#/$defs/ContextScoutDeliveryOutcomeV1"},{type:"null"}]},last_feedback:{anyOf:[{$ref:"#/$defs/ContextScoutFeedbackKindV1"},{type:"null"}]},last_model_outcome:{anyOf:[{$ref:"#/$defs/ContextScoutModelOutcomeV1"},{type:"null"}]},last_model_receipt:{anyOf:[{$ref:"#/$defs/ContextScoutModelReceiptV1"},{type:"null"}]},last_route:{anyOf:[{$ref:"#/$defs/ContextScoutRouteV1"},{type:"null"}]},last_suppression:{anyOf:[{$ref:"#/$defs/ContextScoutSuppressionV1"},{type:"null"}]},limits:{$ref:"#/$defs/ContextScoutLimitsV1"},mode:{$ref:"#/$defs/ContextScoutRuntimeModeV1"},model_path:{anyOf:[{$ref:"#/$defs/ContextScoutModelBackendV1"},{type:"null"}]},state:{$ref:"#/$defs/ContextScoutServiceStateV1"}},required:["configuration_revision","state","mode","limits","active_suggestions"],type:"object"},ContextScoutSuggestionProjectionV1:h$,ContextScoutSuppressionV1:hS,ContextScoutWorkV1:hk,ManifestDigest:gl,RetrievalAnchorId:_q,UtcMicros:vK},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{recent:{$ref:"#/$defs/ContextScoutRecentResultV1"},status:{$ref:"#/$defs/ContextScoutStatusResultV1"}},required:["status","recent"],title:"ContextScoutExplanationResultV1",type:"object"},{$defs:{ContextScoutAddressV1:f5,ContextScoutDeliveryOutcomeV1:ho,ContextScoutDeliveryReceiptV1:hn,ContextScoutFeedbackKindV1:hc,ContextScoutFeedbackV1:hl,UtcMicros:vK},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{address:{$ref:"#/$defs/ContextScoutAddressV1"},feedback:{$ref:"#/$defs/ContextScoutFeedbackV1"},idempotency_key:{type:"string"},receipt:{$ref:"#/$defs/ContextScoutDeliveryReceiptV1"}},required:["address","receipt","feedback","idempotency_key"],title:"ContextScoutFeedbackRequestV1",type:"object"},{$defs:{ConfigurationIdempotencyKey:fX,ConfigurationRevisionId:f0,ContextScoutAddressV1:f5},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{address:{$ref:"#/$defs/ContextScoutAddressV1"},expected_revision:{$ref:"#/$defs/ConfigurationRevisionId"},idempotency_key:{$ref:"#/$defs/ConfigurationIdempotencyKey"}},required:["address","expected_revision","idempotency_key"],title:"ContextScoutControlRequestV1",type:"object"},{$defs:{CodeGenerationId:fT,ContextScoutAddressV1:f5,ContextScoutCategoryV1:f8,ContextScoutDeliveryOutcomeV1:ho,ContextScoutDeliveryReceiptV1:hn,ContextScoutDeliveryWindowV1:ha,ContextScoutEvidenceAvailabilityV1:hs,ContextScoutEvidenceProjectionV1:hd,ContextScoutFeedbackKindV1:hc,ContextScoutFeedbackV1:hl,ContextScoutModelBackendV1:hu,ContextScoutModelOutcomeV1:hm,ContextScoutModelReceiptV1:hf,ContextScoutRecentDeliveryV1:hh,ContextScoutRouteV1:hy,ContextScoutSuggestionProjectionV1:h$,ContextScoutWorkV1:hk,ManifestDigest:gl,RetrievalAnchorId:_q,UtcMicros:vK},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{configuration_revision:{items:{format:"uint8",maximum:255,minimum:0,type:"integer"},maxItems:32,minItems:32,type:"array"},deliveries:{items:{$ref:"#/$defs/ContextScoutRecentDeliveryV1"},type:"array"},observed_at:{$ref:"#/$defs/UtcMicros"},omitted:{format:"uint",minimum:0,type:"integer"},pending:{items:{$ref:"#/$defs/ContextScoutSuggestionProjectionV1"},type:"array"}},required:["configuration_revision","observed_at","pending","deliveries","omitted"],title:"ContextScoutRecentResultV1",type:"object"},{$defs:{ContextScoutDeliveryOutcomeV1:ho,ContextScoutFeedbackKindV1:hc,ContextScoutLimitsV1:hp,ContextScoutModelBackendV1:hu,ContextScoutModelOutcomeV1:hm,ContextScoutModelReceiptV1:hf,ContextScoutRouteV1:hy,ContextScoutRuntimeModeV1:hg,ContextScoutServiceStateV1:h_,ContextScoutSuppressionV1:hS},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{active_suggestions:{format:"uint",minimum:0,type:"integer"},configuration_revision:{items:{format:"uint8",maximum:255,minimum:0,type:"integer"},maxItems:32,minItems:32,type:"array"},last_delivery_outcome:{anyOf:[{$ref:"#/$defs/ContextScoutDeliveryOutcomeV1"},{type:"null"}]},last_feedback:{anyOf:[{$ref:"#/$defs/ContextScoutFeedbackKindV1"},{type:"null"}]},last_model_outcome:{anyOf:[{$ref:"#/$defs/ContextScoutModelOutcomeV1"},{type:"null"}]},last_model_receipt:{anyOf:[{$ref:"#/$defs/ContextScoutModelReceiptV1"},{type:"null"}]},last_route:{anyOf:[{$ref:"#/$defs/ContextScoutRouteV1"},{type:"null"}]},last_suppression:{anyOf:[{$ref:"#/$defs/ContextScoutSuppressionV1"},{type:"null"}]},limits:{$ref:"#/$defs/ContextScoutLimitsV1"},mode:{$ref:"#/$defs/ContextScoutRuntimeModeV1"},model_path:{anyOf:[{$ref:"#/$defs/ContextScoutModelBackendV1"},{type:"null"}]},state:{$ref:"#/$defs/ContextScoutServiceStateV1"}},required:["configuration_revision","state","mode","limits","active_suggestions"],title:"ContextScoutStatusResultV1",type:"object"},{$defs:{CouplingDirectionV1:hR},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{direction:{anyOf:[{$ref:"#/$defs/CouplingDirectionV1"},{type:"null"}],description:"fan_in: files depended on by the most others. fan_out: files that\ndepend on the most others (default: fan_in)."},limit:{description:"Maximum number of results to return (default: 10, at most 100).",format:"uint32",minimum:0,type:["integer","null"]},path:{description:"Filter to files under this directory path (e.g. 'src/main/java').",type:["string","null"]}},title:"CouplingSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fE,CodeIndexConvergenceParkedV1:fA,CodeIndexStalenessStateV1:fz,CouplingDirectionV1:hR,CouplingEntryV1:{additionalProperties:!1,properties:{coupled_files:{format:"uint64",minimum:0,type:"integer"},file:{type:"string"}},required:["file","coupled_files"],type:"object"},PrimitiveFreshnessStateV1:gG,PrimitiveIndexingStateV1:gB,PrimitiveSearchFreshnessV1:gQ},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{direction:{$ref:"#/$defs/CouplingDirectionV1"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},ranking:{items:{$ref:"#/$defs/CouplingEntryV1"},type:"array"},result_count:{format:"uint64",minimum:0,type:"integer"}},required:["direction","result_count","ranking"],title:"CouplingResultV1",type:"object"},{$defs:{DashboardActionV1:{description:"What `tracedecay_dashboard` does.",enum:["start","stop"],type:"string"}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{action:{anyOf:[{$ref:"#/$defs/DashboardActionV1"},{type:"null"}],description:'Action to perform (default: "start"). "stop" shuts down a previously\nstarted dashboard if any.'},host:{description:'Loopback host address to bind: 127.0.0.1, localhost, or ::1\n(default: "127.0.0.1"). Wildcard, LAN, public IPs, and other\nhostnames are rejected.',type:["string","null"]},port:{description:"Port to listen on; 0 picks an ephemeral port (default: 7341).",format:"uint16",maximum:65535,minimum:0,type:["integer","null"]}},title:"DashboardSurfaceRequestV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",oneOf:[{additionalProperties:!1,properties:{host:{type:"string"},port:{format:"uint16",maximum:65535,minimum:0,type:"integer"},status:{const:"started",type:"string"},url:{type:"string"}},required:["status","url","host","port"],type:"object"},{additionalProperties:!1,description:"A dashboard that was already bound when `start` was asked again.",properties:{host:{type:"string"},port:{format:"uint16",maximum:65535,minimum:0,type:"integer"},requested_host:{type:"string"},requested_port:{format:"uint16",maximum:65535,minimum:0,type:"integer"},requested_port_honored:{description:"Whether the bound port is the one asked for (always true for 0).",type:"boolean"},status:{const:"already_running",type:"string"},url:{type:"string"}},required:["status","url","host","port","requested_host","requested_port","requested_port_honored"],type:"object"},{additionalProperties:!1,description:"The bound server is shutting down.",properties:{host:{type:"string"},port:{format:"uint16",maximum:65535,minimum:0,type:"integer"},requested_host:{type:"string"},requested_port:{format:"uint16",maximum:65535,minimum:0,type:"integer"},requested_port_honored:{description:"Whether the bound port is the one asked for (always true for 0).",type:"boolean"},status:{const:"stopping",type:"string"},url:{type:"string"}},required:["status","url","host","port","requested_host","requested_port","requested_port_honored"],type:"object"},{additionalProperties:!1,properties:{previous_url:{type:"string"},status:{const:"stopped",type:"string"}},required:["status","previous_url"],type:"object"},{additionalProperties:!1,properties:{status:{const:"not_running",type:"string"}},required:["status"],type:"object"}],title:"DashboardResultV1"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{include_public:{description:"When true, do NOT exclude pub items. Default false.",type:["boolean","null"]},kinds:{description:'Node kinds to check (default: ["function", "method"]).',items:{type:"string"},type:["array","null"]},limit:{description:"Maximum symbols to return (default: 100, max: 1000).",format:"uint32",minimum:0,type:["integer","null"]},path:{description:"Filter reported symbols to files under this directory path (e.g.\n'crates/tracedecay-mcp'). Omit for the entire codebase.",type:["string","null"]}},title:"DeadCodeSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fE,CodeIndexConvergenceParkedV1:fA,CodeIndexStalenessStateV1:fz,DeadCodeSymbolV1:{additionalProperties:!1,properties:{file:{type:"string"},id:{type:"string"},kind:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},name:{type:"string"},signature:{type:["string","null"]}},required:["id","name","kind","file","line"],type:"object"},PrimitiveFreshnessStateV1:gG,PrimitiveIndexingStateV1:gB,PrimitiveSearchFreshnessV1:gQ},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{dead_code_count:{format:"uint64",minimum:0,type:"integer"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},symbols:{items:{$ref:"#/$defs/DeadCodeSymbolV1"},type:"array"}},required:["dead_code_count","symbols"],title:"DeadCodeResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{limit:{description:"Maximum number of chains to return (default: 10, at most 100).",format:"uint32",minimum:0,type:["integer","null"]},path:{description:"Filter to files under this directory path.",type:["string","null"]}},title:"DependencyDepthSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fE,CodeIndexConvergenceParkedV1:fA,CodeIndexStalenessStateV1:fz,DependencyDepthChainV1:{additionalProperties:!1,properties:{chain:{items:{type:"string"},type:"array"},depth:{format:"uint64",minimum:0,type:"integer"},file:{type:"string"}},required:["file","depth","chain"],type:"object"},PrimitiveFreshnessStateV1:gG,PrimitiveIndexingStateV1:gB,PrimitiveSearchFreshnessV1:gQ},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"`ideal_depth` is `ceil(log2(file_count))`.",properties:{chains:{items:{$ref:"#/$defs/DependencyDepthChainV1"},type:"array"},depth_score:{format:"double",type:"number"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},ideal_depth:{format:"uint64",minimum:0,type:"integer"},max_depth:{format:"uint64",minimum:0,type:"integer"}},required:["max_depth","ideal_depth","depth_score","chains"],title:"DependencyDepthResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Addresses indexed symbols by node id or by qualified name; the node id\nwins when both are present.",properties:{node_id:{description:"Look up a single node by its ID instead of qualified_name.",type:["string","null"]},qualified_name:{description:"The exact qualified name (or short name) to look up.",type:["string","null"]}},title:"SymbolSelectorSurfaceRequestV1",type:"object"},{$defs:{DeriveAnnotationV1:{additionalProperties:!1,properties:{evidence_class:{$ref:"#/$defs/DeriveEvidenceClassV1"},name:{type:"string"},unavailable_fields:{items:{type:"string"},type:"array"}},required:["name","evidence_class","unavailable_fields"],type:"object"},DeriveEvidenceClassV1:{description:"How a derive name is known: read from the declaration's attributes, not\nfrom macro expansion.",enum:["syntax_exact"],type:"string"},DerivesSymbolV1:{additionalProperties:!1,properties:{derives:{items:{$ref:"#/$defs/DeriveAnnotationV1"},type:"array"},file:{type:"string"},kind:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},name:{type:"string"},node_id:{type:"string"},qualified_name:{type:"string"}},required:["node_id","name","qualified_name","kind","file","line","derives"],type:"object"}},$schema:"https://json-schema.org/draft/2020-12/schema",description:"Derive annotations of every addressed symbol; empty when no symbol matched.",items:{$ref:"#/$defs/DerivesSymbolV1"},title:"DerivesResultV1",type:"array"},{$defs:{DiagnoseSeverityFilterV1:{description:"Compiler severity the diagnose report keeps.",enum:["error","warning","all"],type:"string"}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{cargo_output:{description:"Raw stderr text from `cargo check` / `cargo clippy` / `rustc`.",type:"string"},include_callers:{description:"Attach up to 5 callers per diagnostic (default: true).",type:["boolean","null"]},max_diagnostics:{description:"Cap on diagnostics in the response (default: 50, at most 500).",format:"uint32",minimum:0,type:["integer","null"]},severity:{anyOf:[{$ref:"#/$defs/DiagnoseSeverityFilterV1"},{type:"null"}],description:"Filter by severity (default: all)."}},required:["cargo_output"],title:"DiagnoseSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fE,CodeIndexConvergenceParkedV1:fA,CodeIndexStalenessStateV1:fz,DiagnoseItemV1:{additionalProperties:!1,properties:{callers:{description:"Absent when the request turned caller attachment off.",items:{$ref:"#/$defs/DiagnoseSymbolV1"},type:["array","null"]},code:{type:["string","null"]},column:{format:"uint32",minimum:0,type:"integer"},file:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},message:{type:"string"},node:{anyOf:[{$ref:"#/$defs/DiagnoseSymbolV1"},{type:"null"}]},severity:{$ref:"#/$defs/DiagnoseSeverityV1"}},required:["severity","message","file","line","column"],type:"object"},DiagnosePublicationV1:{description:"Outcome of publishing the parsed diagnostics into the managed store.",oneOf:[{additionalProperties:!1,properties:{reason:{type:"string"},status:{const:"skipped",type:"string"},unresolved:{items:{type:"string"},type:["array","null"]}},required:["status","reason"],type:"object"},{additionalProperties:!1,properties:{cleared:{format:"uint64",minimum:0,type:"integer"},generation:{type:"string"},inserted:{format:"uint64",minimum:0,type:"integer"},publication_revision:{format:"uint64",minimum:0,type:"integer"},rejected:{items:{type:"string"},type:"array"},status:{const:"published",type:"string"},unresolved:{items:{type:"string"},type:"array"}},required:["status","generation","publication_revision","inserted","cleared","unresolved","rejected"],type:"object"},{additionalProperties:!1,properties:{reason:{type:"string"},status:{const:"failed",type:"string"}},required:["status","reason"],type:"object"}]},DiagnoseSeverityV1:{description:"Severity of one parsed compiler diagnostic.",enum:["error","warning","note","help"],type:"string"},DiagnoseSymbolV1:{additionalProperties:!1,description:"The graph symbol a diagnostic line falls in, or one of its callers.",properties:{end_line:{format:"uint32",minimum:0,type:"integer"},file:{type:"string"},kind:{type:"string"},line:{description:"One-based display line.",format:"uint32",minimum:0,type:"integer"},name:{type:"string"},node_id:{type:"string"},qualified_name:{type:"string"},start_line:{format:"uint32",minimum:0,type:"integer"}},required:["node_id","name","kind","qualified_name","file","line","start_line","end_line"],type:"object"},PrimitiveFreshnessStateV1:gG,PrimitiveIndexingStateV1:gB,PrimitiveSearchFreshnessV1:gQ},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{diagnostics:{items:{$ref:"#/$defs/DiagnoseItemV1"},type:"array"},diagnostics_parsed:{format:"uint64",minimum:0,type:"integer"},diagnostics_returned:{format:"uint64",minimum:0,type:"integer"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},mapped_to_node:{format:"uint64",minimum:0,type:"integer"},published:{$ref:"#/$defs/DiagnosePublicationV1"},truncated:{type:"boolean"},unmapped:{format:"uint64",minimum:0,type:"integer"}},required:["diagnostics_parsed","diagnostics_returned","mapped_to_node","unmapped","truncated","published","diagnostics"],title:"DiagnoseResultV1",type:"object"},{$defs:{DiagnosticsPrimitiveScope:{oneOf:[{enum:["workspace"],type:"string"},{additionalProperties:!1,properties:{package:{type:"string"}},required:["package"],type:"object"},{additionalProperties:!1,properties:{file:{type:"string"}},required:["file"],type:"object"}]}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{cursor:{default:null,type:["string","null"]},maximum_diagnostics:{format:"uint32",minimum:0,type:"integer"},scope:{$ref:"#/$defs/DiagnosticsPrimitiveScope"}},required:["scope","maximum_diagnostics"],title:"DiagnosticsPrimitiveRequest",type:"object"},{$defs:{CodeGenerationId:fT,CommitId:fH,ComponentVersion:fJ,ContentDigest:f6,DiagnosticEvidenceClassV1:{description:"Evidence class for one diagnostic record. Evidence class is part of\ncanonical diagnostic identity.",oneOf:[{const:"observed_current",description:"Directly observed against the exact clean generation it names.",type:"string"},{const:"producer_reported",description:"Reported by the cataloged producer for the exact clean generation.",type:"string"},{const:"derived_structural",description:"Derived from TraceDecay structural/graph analysis of the generation.",type:"string"},{const:"unknown_unsupported",description:"The evidence class cannot be established; the record is retained for\naudit but must not be treated as current truth.",type:"string"}]},DiagnosticPrimitiveRecord:{additionalProperties:!1,properties:{diagnostic:{$ref:"#/$defs/GenerationDiagnosticV1"},logical_path:{type:"string"}},required:["logical_path","diagnostic"],type:"object"},DiagnosticProducerKindV1:{description:"The cataloged producer kinds that may publish durable diagnostics.\nRuntime, storage, migration,\nconfiguration, session, or daemon-health findings without a truthful\nsource range are Doctor or application findings and never become\n`GenerationDiagnosticV1` records.",enum:["upstream_compiler","language_server","tracedecay_structural","tracedecay_graph_integrity","tracedecay_policy","tracedecay_code_health","generation_consistency","authorized_external_analyzer"],type:"string"},DiagnosticProvenanceV1:{additionalProperties:!1,description:"Producer provenance for one diagnostic. Diagnostic identity includes\nproducer provenance: identical findings from the same logical producer and\nrevision collapse; findings from distinct producers remain distinct.",properties:{analyzer_revision:{$ref:"#/$defs/ComponentVersion"},configuration_revision:{$ref:"#/$defs/ComponentVersion"},producer:{$ref:"#/$defs/ProviderId"},producer_kind:{$ref:"#/$defs/DiagnosticProducerKindV1"},sanitization_receipt:{anyOf:[{$ref:"#/$defs/SanitizationReceiptId"},{type:"null"}]}},required:["producer_kind","producer","analyzer_revision","configuration_revision"],type:"object"},DiagnosticRecordStateV1:{description:"Current-vs-stale typing for a durable diagnostic record. Publication is\nversion-monotone: a newer clean generation clears the prior publication\ndeterministically, and stale findings cannot cross snapshots.\nStale and historical records remain queryable through\napplication APIs but are excluded from active publication.",oneOf:[{description:"Current for exactly the clean generation named by the record.",properties:{kind:{const:"current",type:"string"}},required:["kind"],type:"object"},{description:"A clean generation completed and deterministically removed this\nfinding (resolution, deletion, source-revision drift, or content or\ngeneration change).",properties:{cleared_in_generation:{$ref:"#/$defs/CodeGenerationId"},kind:{const:"cleared",type:"string"}},required:["kind","cleared_in_generation"],type:"object"}]},DiagnosticSeverityV1:hC,FileOccurrenceId:yu,GenerationDiagnosticV1:{additionalProperties:!1,description:"One durable, generation-bound diagnostic record. Its diagnostic payload,\nscope, and producer provenance form observation identity; the display\nmessage remains sanitized product data.",properties:{code:{description:"Stable producer diagnostic code (for example `E0308`).",type:"string"},collected_at:{$ref:"#/$defs/UtcMicros",description:"Time the server first accepted this evidence observation. Compiler\noutput does not carry a trustworthy producer capture time, and an exact\nsemantic replay retains the first accepted value."},content_digest:{$ref:"#/$defs/ContentDigest",description:"Content digest of the attached file inside the generation."},diagnostic_anchor:{$ref:"#/$defs/RetrievalAnchorId",description:"Retrieval anchor addressing this record. The code index's\n`GenerationDiagnosticAttachmentV1::diagnostic_anchor` points here."},evidence_class:{$ref:"#/$defs/DiagnosticEvidenceClassV1"},file_occurrence_id:{$ref:"#/$defs/FileOccurrenceId",description:"Canonical file identity the diagnostic attaches to."},generation_id:{$ref:"#/$defs/CodeGenerationId",description:"The immutable clean code-intelligence generation this record is bound\nto. Findings never cross generations."},message:{description:"Sanitized display message; bounded by [`MAX_DIAGNOSTIC_MESSAGE_BYTES`].",type:"string"},message_digest:{$ref:"#/$defs/ManifestDigest",description:"Integrity digest over the sanitized message."},provenance:{$ref:"#/$defs/DiagnosticProvenanceV1"},reference:{anyOf:[{$ref:"#/$defs/RefId"},{type:"null"}]},repository:{$ref:"#/$defs/RepositoryId"},severity:{$ref:"#/$defs/DiagnosticSeverityV1"},source_revision:{anyOf:[{$ref:"#/$defs/CommitId"},{type:"null"}]},span:{$ref:"#/$defs/SourceSpan",description:"Range encoding inside the sanitized file (byte range; mutable line\nnumbers are never identity)."},state:{$ref:"#/$defs/DiagnosticRecordStateV1",description:"Current-vs-stale typing; publication is version-monotone."},symbol_occurrence_id:{anyOf:[{$ref:"#/$defs/SymbolOccurrenceId"},{type:"null"}],description:"Enclosing symbol occurrence, when exact attachment is possible."},worktree:{anyOf:[{$ref:"#/$defs/WorktreeId"},{type:"null"}]}},required:["diagnostic_anchor","generation_id","repository","file_occurrence_id","content_digest","span","code","severity","message","message_digest","provenance","evidence_class","collected_at","state"],type:"object"},ManifestDigest:gl,ProviderId:_i,RefId:_u,RepositoryId:_v,RetrievalAnchorId:_q,SanitizationReceiptId:{description:"Strongly typed canonical identity: `SanitizationReceiptId`.",type:"string"},SourceSpan:vb,SymbolOccurrenceId:vV,UtcMicros:vK,WorktreeId:$M},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{clean_generation:{type:"boolean"},diagnostics:{items:{$ref:"#/$defs/DiagnosticPrimitiveRecord"},type:"array"},findings_cleared:{type:"boolean"},generation_id:{$ref:"#/$defs/CodeGenerationId"},next_cursor:{type:["string","null"]}},required:["generation_id","clean_generation","findings_cleared","diagnostics"],title:"DiagnosticsPrimitiveResult",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{budget_tokens:{description:"Cap the symbol, test, and co-change sections at about this many tokens.",format:"uint32",minimum:0,type:["integer","null"]},depth:{description:"Maximum impact traversal depth (default: 2, at most 10).",format:"uint32",minimum:0,type:["integer","null"]},files:{description:"List of changed file paths.",items:{type:"string"},type:"array"}},required:["files"],title:"DiffContextSurfaceRequestV1",type:"object"},{$defs:{CoChangeUnavailableV1:fj,CodeIndexBuildBlockedReasonV1:fE,CodeIndexConvergenceParkedV1:fA,CodeIndexStalenessStateV1:fz,GitContextSymbolV1:y$,IncompatibleCallSiteV1:{additionalProperties:!1,description:"A call site whose argument count cannot invoke the new parameter list.",properties:{arguments:{format:"uint32",minimum:0,type:"integer"},file:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},name:{type:"string"}},required:["name","file","line","arguments"],type:"object"},MissingCoChangePartnerV1:gw,PrimitiveFreshnessStateV1:gG,PrimitiveIndexingStateV1:gB,PrimitiveSearchFreshnessV1:gQ,SignatureEditStatusV1:{description:"How a modified function's parameter list compares with HEAD.",enum:["contract_change"],type:"string"},SignatureEditV1:{additionalProperties:!1,description:"A Rust free function whose parameter count differs from HEAD.",properties:{file:{type:"string"},incompatible:{items:{$ref:"#/$defs/IncompatibleCallSiteV1"},type:"array"},new_parameters:{format:"uint32",minimum:0,type:["integer","null"]},old_parameters:{format:"uint32",minimum:0,type:["integer","null"]},status:{$ref:"#/$defs/SignatureEditStatusV1"},symbol:{type:"string"}},required:["symbol","file","status","incompatible"],type:"object"},TestGateV1:{additionalProperties:!1,description:"Whether tests reach the symbols in a diff's blast radius.\n\n`pass` and exit 0 when every counted symbol is reached. `fail` and exit 4\nname the ones that are not. `incomplete` and exit 0 mean the caller walk\nstopped before that absence is known.",properties:{exit_code:{format:"uint8",maximum:255,minimum:0,type:"integer"},untested:{items:{type:"string"},type:"array"},verdict:{type:"string"}},required:["verdict","exit_code","untested"],type:"object"},TokenBudgetCutV1:vz,TokenBudgetSectionV1:vD},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{affected_tests:{items:{type:"string"},type:"array"},changed_files:{items:{type:"string"},type:"array"},co_change_unavailable:{anyOf:[{$ref:"#/$defs/CoChangeUnavailableV1"},{type:"null"}],description:"Present when Git history could not be mined for co-change partners."},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},impact_complete:{description:"False when the impact walk stopped at its depth or budget with callers\nstill unexplored.",type:"boolean"},impacted_symbols:{items:{$ref:"#/$defs/GitContextSymbolV1"},type:"array"},impacted_symbols_count:{format:"uint",minimum:0,type:"integer"},missing_co_change_partners:{description:"Files that usually change with a changed file, per bounded Git\nhistory, but are absent from this change set.",items:{$ref:"#/$defs/MissingCoChangePartnerV1"},type:"array"},modified_symbols:{items:{$ref:"#/$defs/GitContextSymbolV1"},type:"array"},signature_edits:{description:"Rust free functions whose parameter count changed since HEAD, with the\ncall sites that list cannot accept. Omitted when nothing changed.",items:{$ref:"#/$defs/SignatureEditV1"},type:"array"},test_gate:{$ref:"#/$defs/TestGateV1",description:"Symbols in this diff that no test reaches, and the verdict a CLI exits on."},token_budget:{anyOf:[{$ref:"#/$defs/TokenBudgetCutV1"},{type:"null"}],description:"Budget accounting when the request supplies `budget_tokens`."}},required:["changed_files","modified_symbols","impacted_symbols_count","impacted_symbols","impact_complete","affected_tests","missing_co_change_partners","test_gate"],title:"DiffContextResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{limit:{description:"Maximum number of files in the per-file breakdown, highest node count\nfirst (default: 100, max: 1000). Ignored when summary is true; the\nresponse states total_file_count and omitted_file_count.",format:"uint32",minimum:0,type:["integer","null"]},path:{description:"Directory or file path prefix to filter (e.g.\n'src/main/java/com/example'). Omit for entire codebase.",type:["string","null"]},summary:{description:"If true, aggregate counts across all matching files instead of\nper-file breakdown (default: false).",type:["boolean","null"]}},title:"DistributionSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fE,CodeIndexConvergenceParkedV1:fA,CodeIndexStalenessStateV1:fz,DistributionFileV1:{additionalProperties:!1,properties:{file:{type:"string"},kinds:{items:{$ref:"#/$defs/DistributionKindCountV1"},type:"array"}},required:["file","kinds"],type:"object"},DistributionKindCountV1:{additionalProperties:!1,properties:{count:{format:"uint64",minimum:0,type:"integer"},kind:{type:"string"}},required:["kind","count"],type:"object"},PrimitiveFreshnessStateV1:gG,PrimitiveIndexingStateV1:gB,PrimitiveSearchFreshnessV1:gQ},$schema:"https://json-schema.org/draft/2020-12/schema",description:"Flattening the tagged view keeps `path_filter` ahead of `mode` on the\nwire; serde cannot deny unknown fields through a flattened member.",oneOf:[{properties:{distribution:{items:{$ref:"#/$defs/DistributionKindCountV1"},type:"array"},mode:{const:"summary",type:"string"},total_kinds:{format:"uint64",minimum:0,type:"integer"}},required:["mode","total_kinds","distribution"],type:"object"},{properties:{file_count:{format:"uint64",minimum:0,type:"integer"},files:{items:{$ref:"#/$defs/DistributionFileV1"},type:"array"},mode:{const:"per_file",type:"string"},omitted_file_count:{format:"uint64",minimum:0,type:"integer"},total_file_count:{format:"uint64",minimum:0,type:"integer"}},required:["mode","file_count","total_file_count","omitted_file_count","files"],type:"object"}],properties:{freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},path_filter:{type:["string","null"]}},title:"DistributionResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{limit:{description:"Maximum number of results to return (default: 50, at most 500).",format:"uint32",minimum:0,type:["integer","null"]},path:{description:"Directory or file path prefix to filter (e.g. 'src/main'). Omit for\nentire codebase.",type:["string","null"]}},title:"DocCoverageSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fE,CodeIndexConvergenceParkedV1:fA,CodeIndexStalenessStateV1:fz,DocCoverageFileV1:{additionalProperties:!1,properties:{count:{format:"uint64",minimum:0,type:"integer"},file:{type:"string"},symbols:{items:{$ref:"#/$defs/DocCoverageSymbolV1"},type:"array"}},required:["file","count","symbols"],type:"object"},DocCoverageSymbolV1:{additionalProperties:!1,properties:{id:{type:"string"},kind:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},name:{type:"string"},signature:{type:["string","null"]}},required:["id","name","kind","line"],type:"object"},PrimitiveFreshnessStateV1:gG,PrimitiveIndexingStateV1:gB,PrimitiveSearchFreshnessV1:gQ},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{complete:{type:"boolean"},file_count:{format:"uint64",minimum:0,type:"integer"},files:{items:{$ref:"#/$defs/DocCoverageFileV1"},type:"array"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},limit:{format:"uint64",minimum:0,type:"integer"},omitted_count:{format:"uint64",minimum:0,type:"integer"},path_filter:{type:["string","null"]},returned_count:{format:"uint64",minimum:0,type:"integer"},total_undocumented:{format:"uint64",minimum:0,type:"integer"}},required:["total_undocumented","returned_count","omitted_count","complete","limit","file_count","files"],title:"DocCoverageResultV1",type:"object"},{$defs:{DsmShapeV1:hO},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{max_files:{description:"Maximum files in matrix format (default: 30, at most 200).",format:"uint32",minimum:0,type:["integer","null"]},path:{description:"Filter to files under this directory path.",type:["string","null"]},shape:{anyOf:[{$ref:"#/$defs/DsmShapeV1"},{type:"null"}],description:"DSM data shape: stats, clusters, or matrix (default: stats)."}},title:"DsmSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fE,CodeIndexConvergenceParkedV1:fA,CodeIndexStalenessStateV1:fz,DsmClusterV1:{additionalProperties:!1,properties:{boundary_edges:{format:"uint64",minimum:0,type:"integer"},directory:{type:"string"},file_count:{format:"uint64",minimum:0,type:"integer"},incoming_edges:{format:"uint64",minimum:0,type:"integer"},internal_edges:{format:"uint64",minimum:0,type:"integer"},outgoing_edges:{format:"uint64",minimum:0,type:"integer"}},required:["directory","file_count","internal_edges","outgoing_edges","incoming_edges","boundary_edges"],type:"object"},DsmMatrixV1:{additionalProperties:!1,properties:{files:{items:{type:"string"},type:"array"},matrix:{items:{items:{format:"uint8",maximum:255,minimum:0,type:"integer"},type:"array"},type:"array"},note:{type:"string"}},required:["files","matrix","note"],type:"object"},DsmShapeV1:hO,DsmStatsV1:{additionalProperties:!1,properties:{clusters:{format:"uint64",minimum:0,type:"integer"},density:{format:"double",type:"number"},edges:{format:"uint64",minimum:0,type:"integer"},files:{format:"uint64",minimum:0,type:"integer"},largest_cluster:{format:"uint64",minimum:0,type:"integer"}},required:["files","edges","density","clusters","largest_cluster"],type:"object"},PrimitiveFreshnessStateV1:gG,PrimitiveIndexingStateV1:gB,PrimitiveSearchFreshnessV1:gQ},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{clusters:{items:{$ref:"#/$defs/DsmClusterV1"},type:"array"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},matrix:{anyOf:[{$ref:"#/$defs/DsmMatrixV1"},{type:"null"}]},shape:{$ref:"#/$defs/DsmShapeV1"},stats:{$ref:"#/$defs/DsmStatsV1"}},required:["shape","stats","clusters"],title:"DsmResultV1",type:"object"},{$defs:{FactEventId:hH,FactFeedbackActionV1:hG,FactId:hB,MemoryScopeV1:gu,ProjectId:g2},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{action:{$ref:"#/$defs/FactFeedbackActionV1"},expected_last_event_id:{anyOf:[{$ref:"#/$defs/FactEventId"},{type:"null"}]},fact_id:{$ref:"#/$defs/FactId"},memory_scope:{anyOf:[{$ref:"#/$defs/MemoryScopeV1"},{type:"null"}]},project_selector:{additionalProperties:!1,description:'Exact registered-project selector. Reads and fact effects run against the\nselected project.\n\nInlined so every request schema advertises the closed selector contract\n(`required: ["project_id"]`, no additional properties) directly on its\n`project_selector` property instead of behind a `$defs` reference, matching\nthe selector shape the MCP dispatch policy promises for selector-accepting\ntools.',properties:{project_id:{$ref:"#/$defs/ProjectId"}},required:["project_id"],type:["object","null"]},reason:{type:["string","null"]},source_label:{type:["string","null"]}},required:["fact_id","action"],title:"FactFeedbackRequestV1",type:"object"},{$defs:{FactAssertionId:hz,FactCategoryV1:hD,FactCommitDispositionV1:hF,FactCommitOwnerV1:hL,FactCommitReceiptV1:hU,FactEventId:hH,FactFeedbackActionV1:hG,FactFeedbackV1:{additionalProperties:!1,properties:{action:{$ref:"#/$defs/FactFeedbackActionV1"},event_id:{$ref:"#/$defs/FactEventId"},fact_id:{$ref:"#/$defs/FactId"},helpful_count:{format:"uint64",minimum:0,type:"integer"},new_trust_millionths:{format:"uint32",minimum:0,type:"integer"},old_trust_millionths:{format:"uint32",minimum:0,type:"integer"},trust_delta_millionths:{format:"int32",type:"integer"},unhelpful_count:{format:"uint64",minimum:0,type:"integer"}},required:["event_id","fact_id","action","old_trust_millionths","new_trust_millionths","trust_delta_millionths","helpful_count","unhelpful_count"],type:"object"},FactId:hB,FactIdentitySourceResultV1:hK,FactPayloadAccessV1:hJ,FactProjectionV1:hZ,FactStatusV1:h0,FactTelemetryV1:h2,FactV1:h4,LocatorDigest:gr,ProjectId:g2,ProvenanceId:_t,RetrievalAnchorId:_q,UtcMicros:vK},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{commit:{$ref:"#/$defs/FactCommitReceiptV1"},fact:{$ref:"#/$defs/FactProjectionV1"},feedback:{$ref:"#/$defs/FactFeedbackV1"}},required:["fact","feedback","commit"],title:"FactFeedbackResultV1",type:"object"},{$defs:{FactCategoryV1:hD,MemoryScopeV1:gu,ProjectId:g2},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{category:{anyOf:[{$ref:"#/$defs/FactCategoryV1"},{type:"null"}]},content:{type:"string"},entities:{default:[],items:{type:"string"},type:"array"},memory_scope:{anyOf:[{$ref:"#/$defs/MemoryScopeV1"},{type:"null"}]},metadata:{additionalProperties:!0,type:["object","null"]},project_selector:{additionalProperties:!1,description:'Exact registered-project selector. Reads and fact effects run against the\nselected project.\n\nInlined so every request schema advertises the closed selector contract\n(`required: ["project_id"]`, no additional properties) directly on its\n`project_selector` property instead of behind a `$defs` reference, matching\nthe selector shape the MCP dispatch policy promises for selector-accepting\ntools.',properties:{project_id:{$ref:"#/$defs/ProjectId"}},required:["project_id"],type:["object","null"]},source_label:{type:["string","null"]},tags:{default:[],items:{type:"string"},type:"array"},trust:{format:"double",type:["number","null"]}},required:["content"],title:"FactStoreAddRequestV1",type:"object"},{$defs:{FactAssertionId:hz,FactCategoryV1:hD,FactCommitDispositionV1:hF,FactCommitOwnerV1:hL,FactCommitReceiptV1:hU,FactEventId:hH,FactId:hB,FactIdentitySourceResultV1:hK,FactPayloadAccessV1:hJ,FactProjectionV1:hZ,FactStatusV1:h0,FactStoreAddCommitV1:{oneOf:[{additionalProperties:!1,properties:{commit:{$ref:"#/$defs/FactCommitReceiptV1"},disposition:{const:"added",type:"string"},fact:{$ref:"#/$defs/FactProjectionV1"}},required:["disposition","fact","commit"],type:"object"},{additionalProperties:!1,properties:{closest_fact_id:{$ref:"#/$defs/FactId"},commit:{$ref:"#/$defs/FactCommitReceiptV1"},disposition:{const:"near_duplicate",type:"string"},fact:{$ref:"#/$defs/FactProjectionV1"},similarity_millionths:{format:"uint32",minimum:0,type:"integer"}},required:["disposition","fact","closest_fact_id","similarity_millionths","commit"],type:"object"},{additionalProperties:!1,properties:{closest_fact_id:{$ref:"#/$defs/FactId"},commit:{$ref:"#/$defs/FactCommitReceiptV1"},disposition:{const:"possible_conflict",type:"string"},fact:{$ref:"#/$defs/FactProjectionV1"},similarity_millionths:{format:"uint32",minimum:0,type:"integer"}},required:["disposition","fact","closest_fact_id","similarity_millionths","commit"],type:"object"}]},FactTelemetryV1:h2,FactV1:h4,LocatorDigest:gr,ProjectId:g2,ProvenanceId:_t,RetrievalAnchorId:_q,UtcMicros:vK},$schema:"https://json-schema.org/draft/2020-12/schema",oneOf:[{additionalProperties:!1,properties:{outcome:{const:"secret_rejected",type:"string"}},required:["outcome"],type:"object"},{additionalProperties:!1,properties:{closest_fact_id:{$ref:"#/$defs/FactId"},fact:{$ref:"#/$defs/FactProjectionV1"},outcome:{const:"normalized_duplicate",type:"string"}},required:["outcome","fact","closest_fact_id"],type:"object"},{additionalProperties:!1,properties:{outcome:{const:"committed",type:"string"},result:{$ref:"#/$defs/FactStoreAddCommitV1"}},required:["outcome","result"],type:"object"}],title:"FactStoreAddResultV1"},{$defs:{FactCategoryV1:hD,MemoryScopeV1:gu,ProjectId:g2},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{category:{anyOf:[{$ref:"#/$defs/FactCategoryV1"},{type:"null"}]},limit:{format:"uint64",minimum:0,type:["integer","null"]},memory_scope:{anyOf:[{$ref:"#/$defs/MemoryScopeV1"},{type:"null"}]},project_selector:{additionalProperties:!1,description:'Exact registered-project selector. Reads and fact effects run against the\nselected project.\n\nInlined so every request schema advertises the closed selector contract\n(`required: ["project_id"]`, no additional properties) directly on its\n`project_selector` property instead of behind a `$defs` reference, matching\nthe selector shape the MCP dispatch policy promises for selector-accepting\ntools.',properties:{project_id:{$ref:"#/$defs/ProjectId"}},required:["project_id"],type:["object","null"]},threshold_millionths:{format:"uint32",minimum:0,type:["integer","null"]}},title:"FactStoreContradictRequestV1",type:"object"},{$defs:{FactAssertionId:hz,FactCategoryV1:hD,FactCommitOwnerV1:hL,FactContradictionV1:{additionalProperties:!1,properties:{existing_fact:{$ref:"#/$defs/FactV1"},new_content:{type:"string"},score_millionths:{format:"uint32",minimum:0,type:"integer"},why:{type:["string","null"]}},required:["existing_fact","new_content","score_millionths"],type:"object"},FactEventId:hH,FactId:hB,FactIdentitySourceResultV1:hK,FactTelemetryV1:h2,FactV1:h4,LocatorDigest:gr,ProjectId:g2,ProvenanceId:_t,RetrievalAnchorId:_q,UtcMicros:vK},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{contradictions:{items:{$ref:"#/$defs/FactContradictionV1"},type:"array"},owner:{$ref:"#/$defs/FactCommitOwnerV1"}},required:["owner","contradictions"],title:"FactStoreContradictResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Closed public launcher for the automatic Memory Curator.\n\nRun identity, task selection, operations, proposals, approval, and apply\nauthority are deliberately absent and rejected by `deny_unknown_fields`.",properties:{fact_review_limit:{default:24,format:"uint32",maximum:1e3,minimum:1,type:"integer"},min_confidence_millionths:{default:72e4,format:"uint32",maximum:1e6,minimum:0,type:"integer"}},title:"FactStoreCurateRequestV1",type:"object"},{$defs:{AutomationTaskV1:{description:"Automation capability selected after one registered application admission.",enum:["memory_curator","session_reflector","skill_writer","combined_review","user_job"],type:"string"},FactStoreCurateStateV1:{description:"Lifecycle state a `fact_store_curate` receipt reports.",oneOf:[{const:"started",description:"The run was admitted and continues on the daemon.",type:"string"}]},ManifestDigest:gl,RunId:_z},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Receipt of one admitted automatic curation.\n\nThe curator runs on the daemon after this receipt is returned. Its terminal\nis the automation run ledger record for `run_id`, read with\n`automation_run_view`.",properties:{request_digest:{$ref:"#/$defs/ManifestDigest"},run_id:{$ref:"#/$defs/RunId"},state:{$ref:"#/$defs/FactStoreCurateStateV1"},task:{$ref:"#/$defs/AutomationTaskV1"}},required:["run_id","task","request_digest","state"],title:"FactStoreCurateResultV1",type:"object"},{$defs:{FactId:hB,MemoryScopeV1:gu,ProjectId:g2},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{fact_id:{$ref:"#/$defs/FactId"},memory_scope:{anyOf:[{$ref:"#/$defs/MemoryScopeV1"},{type:"null"}]},project_selector:{additionalProperties:!1,description:'Exact registered-project selector. Reads and fact effects run against the\nselected project.\n\nInlined so every request schema advertises the closed selector contract\n(`required: ["project_id"]`, no additional properties) directly on its\n`project_selector` property instead of behind a `$defs` reference, matching\nthe selector shape the MCP dispatch policy promises for selector-accepting\ntools.',properties:{project_id:{$ref:"#/$defs/ProjectId"}},required:["project_id"],type:["object","null"]}},required:["fact_id"],title:"FactStoreGetRequestV1",type:"object"},{$defs:{FactAssertionId:hz,FactCategoryV1:hD,FactCommitOwnerV1:hL,FactEventId:hH,FactFeedbackActionV1:hG,FactFeedbackDetailsAvailabilityV1:{enum:["available","redacted","unknown"],type:"string"},FactId:hB,FactIdentitySourceResultV1:hK,FactPayloadAccessV1:hJ,FactProjectionV1:hZ,FactStatusV1:h0,FactTelemetryV1:h2,FactV1:h4,LocatorDigest:gr,ProjectId:g2,ProvenanceId:_t,RetrievalAnchorId:_q,TrustHistoryEntryV1:{additionalProperties:!1,properties:{action:{$ref:"#/$defs/FactFeedbackActionV1"},details_availability:{$ref:"#/$defs/FactFeedbackDetailsAvailabilityV1"},event_id:{$ref:"#/$defs/FactEventId"},new_trust_millionths:{format:"uint32",minimum:0,type:"integer"},occurred_at:{$ref:"#/$defs/UtcMicros"},old_trust_millionths:{format:"uint32",minimum:0,type:"integer"},reason:{type:["string","null"]},source_label:{type:["string","null"]}},required:["event_id","occurred_at","action","old_trust_millionths","new_trust_millionths","details_availability"],type:"object"},UtcMicros:vK},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{fact:{$ref:"#/$defs/FactProjectionV1"},trust_history:{items:{$ref:"#/$defs/TrustHistoryEntryV1"},type:"array"}},required:["fact","trust_history"],title:"FactStoreGetResultV1",type:"object"},{$defs:{FactCategoryV1:hD,MemoryScopeV1:gu,ProjectId:g2},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{after:{description:"The previous page's `next_after`, valid only with the same parameters.",type:["string","null"]},category:{anyOf:[{$ref:"#/$defs/FactCategoryV1"},{type:"null"}]},limit:{format:"uint64",minimum:0,type:["integer","null"]},memory_scope:{anyOf:[{$ref:"#/$defs/MemoryScopeV1"},{type:"null"}]},min_trust:{format:"double",type:["number","null"]},project_selector:{additionalProperties:!1,description:'Exact registered-project selector. Reads and fact effects run against the\nselected project.\n\nInlined so every request schema advertises the closed selector contract\n(`required: ["project_id"]`, no additional properties) directly on its\n`project_selector` property instead of behind a `$defs` reference, matching\nthe selector shape the MCP dispatch policy promises for selector-accepting\ntools.',properties:{project_id:{$ref:"#/$defs/ProjectId"}},required:["project_id"],type:["object","null"]}},title:"FactStoreListRequestV1",type:"object"},{$defs:{FactAssertionId:hz,FactCategoryV1:hD,FactCommitOwnerV1:hL,FactEventId:hH,FactId:hB,FactIdentitySourceResultV1:hK,FactPayloadAccessV1:hJ,FactProjectionV1:hZ,FactStatusV1:h0,FactTelemetryV1:h2,FactV1:h4,LocatorDigest:gr,ProjectId:g2,ProvenanceId:_t,RetrievalAnchorId:_q,UtcMicros:vK},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{facts:{items:{$ref:"#/$defs/FactProjectionV1"},type:"array"},next_after:{description:"Opaque continuation, bound to this operation and request.",type:["string","null"]},owner:{$ref:"#/$defs/FactCommitOwnerV1"}},required:["owner","facts"],title:"FactStoreListResultV1",type:"object"},{$defs:{FactCategoryV1:hD,MemoryScopeV1:gu,ProjectId:g2},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{after:{description:"The previous page's `next_after`, valid only with the same parameters.",type:["string","null"]},category:{anyOf:[{$ref:"#/$defs/FactCategoryV1"},{type:"null"}]},entity:{type:"string"},limit:{format:"uint64",minimum:0,type:["integer","null"]},memory_scope:{anyOf:[{$ref:"#/$defs/MemoryScopeV1"},{type:"null"}]},min_trust:{format:"double",type:["number","null"]},project_selector:{additionalProperties:!1,description:'Exact registered-project selector. Reads and fact effects run against the\nselected project.\n\nInlined so every request schema advertises the closed selector contract\n(`required: ["project_id"]`, no additional properties) directly on its\n`project_selector` property instead of behind a `$defs` reference, matching\nthe selector shape the MCP dispatch policy promises for selector-accepting\ntools.',properties:{project_id:{$ref:"#/$defs/ProjectId"}},required:["project_id"],type:["object","null"]}},required:["entity"],title:"FactStoreProbeRequestV1",type:"object"},{$defs:{FactAssertionId:hz,FactCategoryV1:hD,FactCommitOwnerV1:hL,FactEventId:hH,FactId:hB,FactIdentitySourceResultV1:hK,FactSearchGraphCoverageV1:hQ,FactSearchGraphDegradationV1:hX,FactSearchHitV1:hY,FactSearchScoresV1:h1,FactTelemetryV1:h2,FactV1:h4,LocatorDigest:gr,ProjectId:g2,ProvenanceId:_t,RetrievalAnchorId:_q,UtcMicros:vK},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{graph_coverage:{$ref:"#/$defs/FactSearchGraphCoverageV1"},hits:{items:{$ref:"#/$defs/FactSearchHitV1"},type:"array"},next_after:{description:"Opaque continuation, bound to this operation and request.",type:["string","null"]},owner:{$ref:"#/$defs/FactCommitOwnerV1"}},required:["owner","hits","graph_coverage"],title:"FactStoreProbeResultV1",type:"object"},{$defs:{FactCategoryV1:hD,MemoryScopeV1:gu,ProjectId:g2},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{after:{description:"The previous page's `next_after`, valid only with the same parameters.",type:["string","null"]},category:{anyOf:[{$ref:"#/$defs/FactCategoryV1"},{type:"null"}]},entities:{items:{type:"string"},minItems:1,type:"array"},limit:{format:"uint64",minimum:0,type:["integer","null"]},memory_scope:{anyOf:[{$ref:"#/$defs/MemoryScopeV1"},{type:"null"}]},min_trust:{format:"double",type:["number","null"]},project_selector:{additionalProperties:!1,description:'Exact registered-project selector. Reads and fact effects run against the\nselected project.\n\nInlined so every request schema advertises the closed selector contract\n(`required: ["project_id"]`, no additional properties) directly on its\n`project_selector` property instead of behind a `$defs` reference, matching\nthe selector shape the MCP dispatch policy promises for selector-accepting\ntools.',properties:{project_id:{$ref:"#/$defs/ProjectId"}},required:["project_id"],type:["object","null"]}},required:["entities"],title:"FactStoreReasonRequestV1",type:"object"},{$defs:{FactAssertionId:hz,FactCategoryV1:hD,FactCommitOwnerV1:hL,FactEventId:hH,FactId:hB,FactIdentitySourceResultV1:hK,FactSearchGraphCoverageV1:hQ,FactSearchGraphDegradationV1:hX,FactSearchHitV1:hY,FactSearchScoresV1:h1,FactTelemetryV1:h2,FactV1:h4,LocatorDigest:gr,ProjectId:g2,ProvenanceId:_t,RetrievalAnchorId:_q,UtcMicros:vK},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{graph_coverage:{$ref:"#/$defs/FactSearchGraphCoverageV1"},hits:{items:{$ref:"#/$defs/FactSearchHitV1"},type:"array"},next_after:{description:"Opaque continuation, bound to this operation and request.",type:["string","null"]},owner:{$ref:"#/$defs/FactCommitOwnerV1"}},required:["owner","hits","graph_coverage"],title:"FactStoreReasonResultV1",type:"object"},{$defs:{FactCategoryV1:hD,MemoryScopeV1:gu,ProjectId:g2},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{after:{description:"The previous page's `next_after`, valid only with the same parameters.",type:["string","null"]},category:{anyOf:[{$ref:"#/$defs/FactCategoryV1"},{type:"null"}]},entity:{type:"string"},limit:{format:"uint64",minimum:0,type:["integer","null"]},memory_scope:{anyOf:[{$ref:"#/$defs/MemoryScopeV1"},{type:"null"}]},min_trust:{format:"double",type:["number","null"]},project_selector:{additionalProperties:!1,description:'Exact registered-project selector. Reads and fact effects run against the\nselected project.\n\nInlined so every request schema advertises the closed selector contract\n(`required: ["project_id"]`, no additional properties) directly on its\n`project_selector` property instead of behind a `$defs` reference, matching\nthe selector shape the MCP dispatch policy promises for selector-accepting\ntools.',properties:{project_id:{$ref:"#/$defs/ProjectId"}},required:["project_id"],type:["object","null"]}},required:["entity"],title:"FactStoreRelatedRequestV1",type:"object"},{$defs:{FactAssertionId:hz,FactCategoryV1:hD,FactCommitOwnerV1:hL,FactEventId:hH,FactId:hB,FactIdentitySourceResultV1:hK,FactSearchGraphCoverageV1:hQ,FactSearchGraphDegradationV1:hX,FactSearchHitV1:hY,FactSearchScoresV1:h1,FactTelemetryV1:h2,FactV1:h4,LocatorDigest:gr,ProjectId:g2,ProvenanceId:_t,RetrievalAnchorId:_q,UtcMicros:vK},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{graph_coverage:{$ref:"#/$defs/FactSearchGraphCoverageV1"},hits:{items:{$ref:"#/$defs/FactSearchHitV1"},type:"array"},next_after:{description:"Opaque continuation, bound to this operation and request.",type:["string","null"]},owner:{$ref:"#/$defs/FactCommitOwnerV1"}},required:["owner","hits","graph_coverage"],title:"FactStoreRelatedResultV1",type:"object"},{$defs:{FactEventId:hH,FactId:hB,MemoryScopeV1:gu,ProjectId:g2},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{expected_last_event_id:{anyOf:[{$ref:"#/$defs/FactEventId"},{type:"null"}]},fact_id:{$ref:"#/$defs/FactId"},memory_scope:{anyOf:[{$ref:"#/$defs/MemoryScopeV1"},{type:"null"}]},project_selector:{additionalProperties:!1,description:'Exact registered-project selector. Reads and fact effects run against the\nselected project.\n\nInlined so every request schema advertises the closed selector contract\n(`required: ["project_id"]`, no additional properties) directly on its\n`project_selector` property instead of behind a `$defs` reference, matching\nthe selector shape the MCP dispatch policy promises for selector-accepting\ntools.',properties:{project_id:{$ref:"#/$defs/ProjectId"}},required:["project_id"],type:["object","null"]}},required:["fact_id"],title:"FactStoreRemoveRequestV1",type:"object"},{$defs:{FactAssertionId:hz,FactCategoryV1:hD,FactCommitDispositionV1:hF,FactCommitOwnerV1:hL,FactCommitReceiptV1:hU,FactEventId:hH,FactId:hB,FactIdentitySourceResultV1:hK,FactPayloadAccessV1:hJ,FactProjectionV1:hZ,FactStatusV1:h0,FactTelemetryV1:h2,FactV1:h4,LocatorDigest:gr,ProjectId:g2,ProvenanceId:_t,RetrievalAnchorId:_q,UtcMicros:vK},$schema:"https://json-schema.org/draft/2020-12/schema",oneOf:[{additionalProperties:!1,properties:{commit:{$ref:"#/$defs/FactCommitReceiptV1"},fact:{$ref:"#/$defs/FactProjectionV1"},outcome:{const:"removed",type:"string"},remaining_fact_count:{format:"uint64",minimum:0,type:"integer"}},required:["outcome","fact","remaining_fact_count","commit"],type:"object"},{additionalProperties:!1,properties:{fact:{$ref:"#/$defs/FactProjectionV1"},outcome:{const:"already_removed",type:"string"},remaining_fact_count:{format:"uint64",minimum:0,type:"integer"}},required:["outcome","fact","remaining_fact_count"],type:"object"}],title:"FactStoreRemoveResultV1"},{$defs:{FactCategoryV1:hD,MemoryScopeV1:gu,ProjectId:g2},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{after:{description:"The previous page's `next_after`, valid only with the same parameters.",type:["string","null"]},category:{anyOf:[{$ref:"#/$defs/FactCategoryV1"},{type:"null"}]},limit:{format:"uint64",minimum:0,type:["integer","null"]},memory_scope:{anyOf:[{$ref:"#/$defs/MemoryScopeV1"},{type:"null"}]},min_trust:{format:"double",type:["number","null"]},project_selector:{additionalProperties:!1,description:'Exact registered-project selector. Reads and fact effects run against the\nselected project.\n\nInlined so every request schema advertises the closed selector contract\n(`required: ["project_id"]`, no additional properties) directly on its\n`project_selector` property instead of behind a `$defs` reference, matching\nthe selector shape the MCP dispatch policy promises for selector-accepting\ntools.',properties:{project_id:{$ref:"#/$defs/ProjectId"}},required:["project_id"],type:["object","null"]},query:{type:"string"}},required:["query"],title:"FactStoreSearchRequestV1",type:"object"},{$defs:{FactAssertionId:hz,FactCategoryV1:hD,FactCommitOwnerV1:hL,FactEventId:hH,FactId:hB,FactIdentitySourceResultV1:hK,FactRetrievalTelemetryDegradationV1:{enum:["unavailable","saturated"],type:"string"},FactRetrievalTelemetryV1:{description:"Whether an explicit search recorded retrieval telemetry for its hits.\n\nThe telemetry write is recall bookkeeping, not part of the returned\nevidence: when only that lane is unavailable the search still delivers its\nresult and reports the degradation here instead of refusing the read.",oneOf:[{additionalProperties:!1,description:"The result had no hits, so there was nothing to record.",properties:{kind:{const:"not_applicable",type:"string"}},required:["kind"],type:"object"},{additionalProperties:!1,description:"The selected store is mounted read-only; recording is never attempted.",properties:{kind:{const:"read_only",type:"string"}},required:["kind"],type:"object"},{additionalProperties:!1,properties:{fact_count:{format:"uint",minimum:0,type:"integer"},kind:{const:"recorded",type:"string"}},required:["kind","fact_count"],type:"object"},{additionalProperties:!1,properties:{kind:{const:"degraded",type:"string"},reason:{$ref:"#/$defs/FactRetrievalTelemetryDegradationV1"}},required:["kind","reason"],type:"object"}]},FactSearchGraphCoverageV1:hQ,FactSearchGraphDegradationV1:hX,FactSearchHitV1:hY,FactSearchScoresV1:h1,FactTelemetryV1:h2,FactV1:h4,LocatorDigest:gr,ProjectId:g2,ProvenanceId:_t,RetrievalAnchorId:_q,UtcMicros:vK},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Explicit search additionally records retrieval telemetry for its returned\nhits; `retrieval_telemetry` reports whether that recall bookkeeping\nhappened, so a served result can truthfully carry a degraded write lane.",properties:{graph_coverage:{$ref:"#/$defs/FactSearchGraphCoverageV1"},hits:{items:{$ref:"#/$defs/FactSearchHitV1"},type:"array"},next_after:{description:"Opaque continuation, bound to this operation and request.",type:["string","null"]},owner:{$ref:"#/$defs/FactCommitOwnerV1"},retrieval_telemetry:{$ref:"#/$defs/FactRetrievalTelemetryV1"}},required:["owner","hits","graph_coverage","retrieval_telemetry"],title:"FactStoreSearchResultV1",type:"object"},{$defs:{FactEventId:hH,FactId:hB,MemoryScopeV1:gu,ProjectId:g2},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Mark `fact_id` as superseded by `superseded_by`. The old fact leaves the\ndefault retrieval surfaces but stays readable by id through its history;\npayload and trust are never rewritten.",properties:{expected_last_event_id:{anyOf:[{$ref:"#/$defs/FactEventId"},{type:"null"}]},fact_id:{$ref:"#/$defs/FactId"},memory_scope:{anyOf:[{$ref:"#/$defs/MemoryScopeV1"},{type:"null"}]},project_selector:{additionalProperties:!1,description:'Exact registered-project selector. Reads and fact effects run against the\nselected project.\n\nInlined so every request schema advertises the closed selector contract\n(`required: ["project_id"]`, no additional properties) directly on its\n`project_selector` property instead of behind a `$defs` reference, matching\nthe selector shape the MCP dispatch policy promises for selector-accepting\ntools.',properties:{project_id:{$ref:"#/$defs/ProjectId"}},required:["project_id"],type:["object","null"]},superseded_by:{$ref:"#/$defs/FactId"}},required:["fact_id","superseded_by"],title:"FactStoreSupersedeRequestV1",type:"object"},{$defs:{FactAssertionId:hz,FactCommitDispositionV1:hF,FactCommitOwnerV1:hL,FactCommitReceiptV1:hU,FactEventId:hH,FactId:hB,ProjectId:g2},$schema:"https://json-schema.org/draft/2020-12/schema",description:"Outcome of an explicit supersession. `superseded` carries the durable\ncommit receipt of the `Curated { SupersededBy }` lineage event;\n`already_superseded` reports the successor already recorded for the fact.",oneOf:[{additionalProperties:!1,properties:{commit:{$ref:"#/$defs/FactCommitReceiptV1"},fact_id:{$ref:"#/$defs/FactId"},outcome:{const:"superseded",type:"string"},superseded_by:{$ref:"#/$defs/FactId"}},required:["outcome","fact_id","superseded_by","commit"],type:"object"},{additionalProperties:!1,properties:{fact_id:{$ref:"#/$defs/FactId"},outcome:{const:"already_superseded",type:"string"},superseded_by:{$ref:"#/$defs/FactId"}},required:["outcome","fact_id","superseded_by"],type:"object"}],title:"FactStoreSupersedeResultV1"},{$defs:{FactCategoryV1:hD,FactEventId:hH,FactId:hB,FactSourceLabelPatchV1:{oneOf:[{additionalProperties:!1,properties:{kind:{const:"set",type:"string"},value:{type:"string"}},required:["kind","value"],type:"object"},{additionalProperties:!1,properties:{kind:{const:"clear",type:"string"}},required:["kind"],type:"object"}]},MemoryScopeV1:gu,ProjectId:g2},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{category:{anyOf:[{$ref:"#/$defs/FactCategoryV1"},{type:"null"}]},content:{type:["string","null"]},entities:{items:{type:"string"},type:["array","null"]},expected_last_event_id:{anyOf:[{$ref:"#/$defs/FactEventId"},{type:"null"}]},fact_id:{$ref:"#/$defs/FactId"},memory_scope:{anyOf:[{$ref:"#/$defs/MemoryScopeV1"},{type:"null"}]},metadata:{additionalProperties:!0,type:["object","null"]},project_selector:{additionalProperties:!1,description:'Exact registered-project selector. Reads and fact effects run against the\nselected project.\n\nInlined so every request schema advertises the closed selector contract\n(`required: ["project_id"]`, no additional properties) directly on its\n`project_selector` property instead of behind a `$defs` reference, matching\nthe selector shape the MCP dispatch policy promises for selector-accepting\ntools.',properties:{project_id:{$ref:"#/$defs/ProjectId"}},required:["project_id"],type:["object","null"]},source_label:{anyOf:[{$ref:"#/$defs/FactSourceLabelPatchV1"},{type:"null"}]},tags:{items:{type:"string"},type:["array","null"]},trust:{format:"double",type:["number","null"]}},required:["fact_id"],title:"FactStoreUpdateRequestV1",type:"object"},{$defs:{FactAssertionId:hz,FactCategoryV1:hD,FactCommitDispositionV1:hF,FactCommitOwnerV1:hL,FactCommitReceiptV1:hU,FactEventId:hH,FactId:hB,FactIdentitySourceResultV1:hK,FactPayloadAccessV1:hJ,FactProjectionV1:hZ,FactStatusV1:h0,FactTelemetryV1:h2,FactV1:h4,LocatorDigest:gr,ProjectId:g2,ProvenanceId:_t,RetrievalAnchorId:_q,UtcMicros:vK},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{commit:{$ref:"#/$defs/FactCommitReceiptV1"},fact:{$ref:"#/$defs/FactProjectionV1"},trust_delta_millionths:{format:"int32",type:"integer"}},required:["fact","trust_delta_millionths","commit"],title:"FactStoreUpdateResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Explicit advisory-cycle trigger for one document in the admitted project.",properties:{document_uri:{type:"string"}},required:["document_uri"],title:"FeedbackAdvisoryCycleSurfaceRequestV1",type:"object"},{$defs:{AgentInstanceId:mN,CodeGenerationId:fT,CommitId:fH,DiagnosticSeverityV1:hC,FeedbackAdvisoryCycleWireV1:{additionalProperties:!1,description:"One canonical cycle result plus whether its durable publication committed.\n\n`published` intentionally remains adjacent to the cycle fields on the\nwire: publication is a property of this exact cycle, not of a page or a\nlater lookup.",properties:{advisory_only:{type:"boolean"},advisory_provider_states:{items:{$ref:"#/$defs/FeedbackAdvisoryProviderStateV1"},type:"array"},affected_tests_state:{anyOf:[{$ref:"#/$defs/FeedbackImpactStateV1"},{type:"null"}]},baseline_states:{items:{$ref:"#/$defs/FeedbackBaselineStateV1"},type:"array"},configuration_digest:{$ref:"#/$defs/ManifestDigest"},content_identity:{anyOf:[{$ref:"#/$defs/FeedbackContentIdentityV1"},{type:"null"}]},cycle_id:{$ref:"#/$defs/FeedbackCycleId"},durability:{$ref:"#/$defs/FeedbackDurabilityV1"},findings:{items:{$ref:"#/$defs/FeedbackFindingV1"},type:"array"},impact:{anyOf:[{$ref:"#/$defs/FeedbackImpactV1"},{type:"null"}]},impact_state:{anyOf:[{$ref:"#/$defs/FeedbackImpactStateV1"},{type:"null"}]},omitted_findings:{format:"uint64",minimum:0,type:"integer"},policy_digest:{$ref:"#/$defs/ManifestDigest"},provider_states:{items:{$ref:"#/$defs/ProviderEvaluationStateV1"},type:"array"},published:{type:"boolean"},result_id:{$ref:"#/$defs/FeedbackResultId"},returned_findings:{format:"uint64",minimum:0,type:"integer"},scope:{$ref:"#/$defs/FeedbackScopeV1"},termination:{$ref:"#/$defs/FeedbackCycleTerminationV1"},total_findings:{format:"uint64",minimum:0,type:"integer"}},required:["result_id","cycle_id","scope","durability","policy_digest","configuration_digest","termination","provider_states","baseline_states","findings","total_findings","returned_findings","omitted_findings","advisory_only","published"],type:"object"},FeedbackAdvisoryFindingHandleV1:{additionalProperties:!1,description:"One daemon-minted read-handle pair for a finding in the published cycle.",properties:{expansion_handle:{type:["string","null"]},finding_id:{$ref:"#/$defs/FeedbackFindingId"},get_handle:{type:"string"},retrieval_anchor_id:{anyOf:[{$ref:"#/$defs/RetrievalAnchorId"},{type:"null"}]}},required:["finding_id","get_handle"],type:"object"},FeedbackAdvisoryProviderStateV1:h6,FeedbackAdvisoryReadHandlesV1:{additionalProperties:!1,description:"Daemon-minted handles for reads over this exact publication.",properties:{affected_tests_handle:{type:"string"},diagnostics_handle:{type:"string"},impact_handle:{type:"string"},list_handle:{type:"string"}},required:["diagnostics_handle","impact_handle","affected_tests_handle","list_handle"],type:"object"},FeedbackBaselineStateV1:h3,FeedbackContentIdentityV1:h9,FeedbackCycleId:h5,FeedbackCycleTerminationV1:h8,FeedbackDiagnosticClassificationV1:h7,FeedbackDiagnosticProducerV1:ye,FeedbackDiagnosticProjectionV1:yt,FeedbackDurabilityV1:yr,FeedbackFindingId:yi,FeedbackFindingLifecycleV1:yo,FeedbackFindingV1:ya,FeedbackImpactStateV1:ys,FeedbackImpactV1:yd,FeedbackResultId:yc,FeedbackScopeV1:yl,FeedbackTargetV1:yp,FileOccurrenceId:yu,HostInstanceId:yH,ManifestDigest:gl,ProjectId:g2,ProviderEvaluationStateV1:_r,RepositoryId:_v,RetrievalAnchorId:_q,SessionId:_5,SourceSpan:vb,SymbolOccurrenceId:vV,WorktreeId:$M},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Exact advisory-cycle payload serialized by the mounted daemon route.",properties:{cycle:{$ref:"#/$defs/FeedbackAdvisoryCycleWireV1"},finding_handles:{items:{$ref:"#/$defs/FeedbackAdvisoryFindingHandleV1"},type:"array"},read_handles:{anyOf:[{$ref:"#/$defs/FeedbackAdvisoryReadHandlesV1"},{type:"null"}]}},required:["cycle","finding_handles"],title:"FeedbackAdvisoryCycleSurfaceResultV1",type:"object"},{$defs:{AgentInstanceId:mN,CodeGenerationId:fT,CommitId:fH,DiagnosticSeverityV1:hC,FeedbackAdvisoryProviderStateV1:h6,FeedbackBaselineStateV1:h3,FeedbackContentIdentityV1:h9,FeedbackCycleId:h5,FeedbackCycleResultV1:{additionalProperties:!1,description:"One deterministic result for one trigger. The result represents a\nterminal advisory evaluation and contains no next-action execution hook.",properties:{advisory_only:{type:"boolean"},advisory_provider_states:{items:{$ref:"#/$defs/FeedbackAdvisoryProviderStateV1"},type:"array"},affected_tests_state:{anyOf:[{$ref:"#/$defs/FeedbackImpactStateV1"},{type:"null"}]},baseline_states:{items:{$ref:"#/$defs/FeedbackBaselineStateV1"},type:"array"},configuration_digest:{$ref:"#/$defs/ManifestDigest"},content_identity:{anyOf:[{$ref:"#/$defs/FeedbackContentIdentityV1"},{type:"null"}]},cycle_id:{$ref:"#/$defs/FeedbackCycleId"},durability:{$ref:"#/$defs/FeedbackDurabilityV1"},findings:{items:{$ref:"#/$defs/FeedbackFindingV1"},type:"array"},impact:{anyOf:[{$ref:"#/$defs/FeedbackImpactV1"},{type:"null"}]},impact_state:{anyOf:[{$ref:"#/$defs/FeedbackImpactStateV1"},{type:"null"}]},omitted_findings:{format:"uint64",minimum:0,type:"integer"},policy_digest:{$ref:"#/$defs/ManifestDigest"},provider_states:{items:{$ref:"#/$defs/ProviderEvaluationStateV1"},type:"array"},result_id:{$ref:"#/$defs/FeedbackResultId"},returned_findings:{format:"uint64",minimum:0,type:"integer"},scope:{$ref:"#/$defs/FeedbackScopeV1"},termination:{$ref:"#/$defs/FeedbackCycleTerminationV1"},total_findings:{format:"uint64",minimum:0,type:"integer"}},required:["result_id","cycle_id","scope","durability","policy_digest","configuration_digest","termination","provider_states","baseline_states","findings","total_findings","returned_findings","omitted_findings","advisory_only"],type:"object"},FeedbackCycleTerminationV1:h8,FeedbackDiagnosticClassificationV1:h7,FeedbackDiagnosticProducerV1:ye,FeedbackDiagnosticProjectionV1:yt,FeedbackDurabilityV1:yr,FeedbackFindingId:yi,FeedbackFindingLifecycleV1:yo,FeedbackFindingV1:ya,FeedbackImpactStateV1:ys,FeedbackImpactV1:yd,FeedbackResultId:yc,FeedbackScopeV1:yl,FeedbackTargetV1:yp,FileOccurrenceId:yu,HostInstanceId:yH,ManifestDigest:gl,ProjectId:g2,ProviderEvaluationStateV1:_r,RepositoryId:_v,RetrievalAnchorId:_q,SessionId:_5,SourceSpan:vb,SymbolOccurrenceId:vV,WorktreeId:$M},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{cycle:{$ref:"#/$defs/FeedbackCycleResultV1"}},required:["cycle"],title:"FeedbackDiagnosticsReadResultV1",type:"object"},{$defs:{AnchorExpandResult:{additionalProperties:!1,properties:{anchors:{items:{$ref:"#/$defs/RetrievalAnchorId"},type:"array"}},required:["anchors"],type:"object"},CommitId:fH,DiagnosticSeverityV1:hC,FeedbackCycleId:h5,FeedbackDiagnosticClassificationV1:h7,FeedbackDiagnosticProducerV1:ye,FeedbackDiagnosticProjectionV1:yt,FeedbackFindingId:yi,FeedbackFindingLifecycleV1:yo,FeedbackFindingReadV1:yn,FeedbackFindingV1:ya,FeedbackResultId:yc,FeedbackScopeV1:yl,FileOccurrenceId:yu,ProjectId:g2,ProviderEvaluationStateV1:_r,RepositoryId:_v,RetrievalAnchorId:_q,SourceSpan:vb,SymbolOccurrenceId:vV,WorktreeId:$M},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{expansion:{$ref:"#/$defs/AnchorExpandResult"},finding:{$ref:"#/$defs/FeedbackFindingReadV1"}},required:["finding","expansion"],title:"FeedbackExpandResultV1",type:"object"},{$defs:{CommitId:fH,DiagnosticSeverityV1:hC,FeedbackCycleId:h5,FeedbackDiagnosticClassificationV1:h7,FeedbackDiagnosticProducerV1:ye,FeedbackDiagnosticProjectionV1:yt,FeedbackFindingId:yi,FeedbackFindingLifecycleV1:yo,FeedbackFindingReadV1:yn,FeedbackFindingV1:ya,FeedbackResultId:yc,FeedbackScopeV1:yl,FileOccurrenceId:yu,ProjectId:g2,ProviderEvaluationStateV1:_r,RepositoryId:_v,RetrievalAnchorId:_q,SourceSpan:vb,SymbolOccurrenceId:vV,WorktreeId:$M},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{finding:{$ref:"#/$defs/FeedbackFindingReadV1"}},required:["finding"],title:"FeedbackGetResultV1",type:"object"},{$defs:{AgentInstanceId:mN,CodeGenerationId:fT,CommitId:fH,FeedbackContentIdentityV1:h9,FeedbackCycleId:h5,FeedbackImpactStateV1:ys,FeedbackImpactV1:yd,FeedbackResultId:yc,FeedbackScopeV1:yl,FeedbackTargetV1:yp,FileOccurrenceId:yu,HostInstanceId:yH,ManifestDigest:gl,ProjectId:g2,RepositoryId:_v,RetrievalAnchorId:_q,SessionId:_5,SourceSpan:vb,SymbolOccurrenceId:vV,WorktreeId:$M},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Canonical impact projection returned by `feedback_impact`.\n\nThe daemon-side projection owner (usecases) re-exports this type; it lives\nhere so the catalog contribution can register its schema body as the single\nRust-owned wire authority. Results project from an authorized completed\ncycle, and the canonical response wire remains consumable by typed SDKs.",properties:{content_identity:{anyOf:[{$ref:"#/$defs/FeedbackContentIdentityV1"},{type:"null"}]},cycle_id:{$ref:"#/$defs/FeedbackCycleId"},impact:{anyOf:[{$ref:"#/$defs/FeedbackImpactV1"},{type:"null"}]},result_id:{$ref:"#/$defs/FeedbackResultId"},scope:{$ref:"#/$defs/FeedbackScopeV1"},state:{anyOf:[{$ref:"#/$defs/FeedbackImpactStateV1"},{type:"null"}]}},required:["result_id","cycle_id","scope"],title:"CanonicalFeedbackImpactProjectionV1",type:"object"},{$defs:{CommitId:fH,DiagnosticSeverityV1:hC,FeedbackCycleId:h5,FeedbackDiagnosticClassificationV1:h7,FeedbackDiagnosticProducerV1:ye,FeedbackDiagnosticProjectionV1:yt,FeedbackFindingId:yi,FeedbackFindingLifecycleV1:yo,FeedbackFindingReadV1:yn,FeedbackFindingV1:ya,FeedbackResultId:yc,FeedbackScopeV1:yl,FileOccurrenceId:yu,ProjectId:g2,ProviderEvaluationStateV1:_r,RepositoryId:_v,RetrievalAnchorId:_q,SourceSpan:vb,SymbolOccurrenceId:vV,WorktreeId:$M},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{findings:{items:{$ref:"#/$defs/FeedbackFindingReadV1"},type:"array"}},required:["findings"],title:"FeedbackListResultV1",type:"object"},{$defs:{UtcMicros:vK},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{observed_at:{$ref:"#/$defs/UtcMicros"}},required:["observed_at"],title:"FeedbackProximityReadRequestV1",type:"object"},{$defs:{AgentInstanceId:mN,CodeGenerationId:fT,CommitId:fH,FeedbackProximityAccessKindV1:{enum:["read","write"],type:"string"},FeedbackProximityCloneHandleV1:{additionalProperties:!1,properties:{retrieval_anchor_ids:{items:{$ref:"#/$defs/RetrievalAnchorId"},type:"array"},source_generation:{$ref:"#/$defs/CodeGenerationId"},source_symbol:{$ref:"#/$defs/SymbolOccurrenceId"}},required:["source_generation","source_symbol","retrieval_anchor_ids"],type:"object"},FeedbackProximityConflictDifferenceV1:{additionalProperties:!1,properties:{difference_digest:{$ref:"#/$defs/ManifestDigest"},file:{$ref:"#/$defs/FileOccurrenceId"},span:{$ref:"#/$defs/SourceSpan"}},required:["file","span","difference_digest"],type:"object"},FeedbackProximityConflictHandleV1:{additionalProperties:!1,properties:{common_base_revision:{$ref:"#/$defs/CommitId"},differences:{items:{$ref:"#/$defs/FeedbackProximityConflictDifferenceV1"},type:"array"},evidence_digest:{$ref:"#/$defs/ManifestDigest"},left_head_revision:{$ref:"#/$defs/CommitId"},right_head_revision:{$ref:"#/$defs/CommitId"}},required:["common_base_revision","left_head_revision","right_head_revision","evidence_digest","differences"],type:"object"},FeedbackProximityEncounterV1:{additionalProperties:!1,properties:{coverage:{$ref:"#/$defs/ProximityCoverageV1"},encounter_id:{$ref:"#/$defs/ManifestDigest"},expires_at:{$ref:"#/$defs/UtcMicros"},interval:{$ref:"#/$defs/FeedbackProximityIntervalV1"},observed_at:{$ref:"#/$defs/UtcMicros"},participants:{items:{$ref:"#/$defs/FeedbackProximityParticipantV1"},type:"array"},relation:{$ref:"#/$defs/FeedbackProximityRelationV1"},scope:{$ref:"#/$defs/FeedbackScopeV1"}},required:["encounter_id","scope","interval","participants","relation","observed_at","expires_at","coverage"],type:"object"},FeedbackProximityIntervalV1:{additionalProperties:!1,properties:{end:{$ref:"#/$defs/UtcMicros"},start:{$ref:"#/$defs/UtcMicros"}},required:["start","end"],type:"object"},FeedbackProximityOmissionV1:{enum:["active_session_limit","session_activity_limit","recent_observation_limit","edited_path_limit","encounter_limit","missing_participant_observation","missing_participant_worktree","missing_participant_revision","missing_code_address","clone_coverage_partial","conflict_evidence_unavailable","code_index_revision_mismatch"],type:"string"},FeedbackProximityParticipantV1:{additionalProperties:!1,properties:{access:{$ref:"#/$defs/FeedbackProximityAccessKindV1"},activity:{$ref:"#/$defs/FeedbackProximityIntervalV1"},address:{$ref:"#/$defs/ProximityAddressV1"},agent_id:{$ref:"#/$defs/AgentInstanceId"},branch_ref:{anyOf:[{$ref:"#/$defs/RefId"},{type:"null"}]},head_revision:{anyOf:[{$ref:"#/$defs/CommitId"},{type:"null"}]},source:{$ref:"#/$defs/ObservationSourceIdentityV1"},worktree_id:{anyOf:[{$ref:"#/$defs/WorktreeId"},{type:"null"}]},worktree_root:{type:"string"}},required:["source","agent_id","worktree_root","access","activity","address"],type:"object"},FeedbackProximityReadPageV1:{additionalProperties:!1,properties:{encounters:{items:{$ref:"#/$defs/FeedbackProximityEncounterV1"},type:"array"},expires_at:{$ref:"#/$defs/UtcMicros"},observed_at:{$ref:"#/$defs/UtcMicros"},scope:{$ref:"#/$defs/FeedbackScopeV1"},source_generation:{$ref:"#/$defs/CodeGenerationId"}},required:["scope","source_generation","observed_at","expires_at","encounters"],type:"object"},FeedbackProximityRelationV1:{oneOf:[{additionalProperties:!1,properties:{relation_kind:{const:"code_neighborhood_candidate",type:"string"},warning_class:{$ref:"#/$defs/ProximityWarningClassV1"}},required:["relation_kind","warning_class"],type:"object"},{additionalProperties:!1,properties:{clone_handle:{$ref:"#/$defs/FeedbackProximityCloneHandleV1"},relation_kind:{const:"shared_code_candidate",type:"string"},warning_class:{$ref:"#/$defs/ProximityWarningClassV1"}},required:["relation_kind","warning_class","clone_handle"],type:"object"},{additionalProperties:!1,properties:{relation_kind:{const:"overlapping_edit",type:"string"},warning_class:{$ref:"#/$defs/ProximityWarningClassV1"}},required:["relation_kind","warning_class"],type:"object"},{additionalProperties:!1,properties:{conflict_handle:{$ref:"#/$defs/FeedbackProximityConflictHandleV1"},relation_kind:{const:"confirmed_conflict",type:"string"}},required:["relation_kind","conflict_handle"],type:"object"}]},FeedbackScopeV1:yl,FileOccurrenceId:yu,ManifestDigest:gl,ObservationSourceIdentityV1:gW,ProjectId:g2,ProviderId:_i,ProximityAddressV1:{additionalProperties:!1,description:"A privacy-scoped code address. It identifies the coarse changed-code shape\nbut carries no other actor, session, or private-source content.",properties:{file:{$ref:"#/$defs/FileOccurrenceId"},scope:{$ref:"#/$defs/FeedbackScopeV1"},span:{anyOf:[{$ref:"#/$defs/SourceSpan"},{type:"null"}]},symbol:{anyOf:[{$ref:"#/$defs/SymbolOccurrenceId"},{type:"null"}]}},required:["scope","file"],type:"object"},ProximityCoverageV1:{enum:["complete","partial","stale","unavailable","denied","private"],type:"string"},ProximityWarningClassV1:{enum:["same_file","overlapping_range","same_symbol","same_package","same_crate","neighborhood","shared_caller","shared_dependency","shared_test","incompatible_branch_worktree"],type:"string"},RefId:_u,RepositoryId:_v,RetrievalAnchorId:_q,SessionId:_5,SourceSpan:vb,SymbolOccurrenceId:vV,UtcMicros:vK,WorktreeId:$M},$schema:"https://json-schema.org/draft/2020-12/schema",oneOf:[{additionalProperties:!1,properties:{page:{$ref:"#/$defs/FeedbackProximityReadPageV1"},state:{const:"complete",type:"string"}},required:["state","page"],type:"object"},{additionalProperties:!1,properties:{page:{$ref:"#/$defs/FeedbackProximityReadPageV1"},state:{const:"complete_zero",type:"string"}},required:["state","page"],type:"object"},{additionalProperties:!1,properties:{omissions:{items:{$ref:"#/$defs/FeedbackProximityOmissionV1"},type:"array"},page:{$ref:"#/$defs/FeedbackProximityReadPageV1"},state:{const:"partial",type:"string"}},required:["state","page","omissions"],type:"object"},{additionalProperties:!1,properties:{omissions:{items:{$ref:"#/$defs/FeedbackProximityOmissionV1"},type:"array"},page:{$ref:"#/$defs/FeedbackProximityReadPageV1"},state:{const:"stale",type:"string"}},required:["state","page","omissions"],type:"object"},{additionalProperties:!1,properties:{observed_at:{$ref:"#/$defs/UtcMicros"},state:{const:"denied",type:"string"}},required:["state","observed_at"],type:"object"},{additionalProperties:!1,properties:{observed_at:{$ref:"#/$defs/UtcMicros"},state:{const:"unavailable",type:"string"}},required:["state","observed_at"],type:"object"}],title:"FeedbackProximityReadResultV1"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{field:{description:"Field name. Bare name ('last_sync_at') matches across structs;\nqualified form ('GraphStats::last_sync_at') narrows to one struct's\nfield.",type:"string"},limit:{description:"Maximum sites per kind (default: 200, max: 2000).",format:"uint32",minimum:0,type:["integer","null"]},writes_only:{description:"When true, returns only write_sites and omits reads. Default false.",type:["boolean","null"]}},required:["field"],title:"FieldSitesSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fE,CodeIndexConvergenceParkedV1:fA,CodeIndexStalenessStateV1:fz,FieldSiteV1:{additionalProperties:!1,properties:{enclosing:{type:["string","null"]},file:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},snippet:{type:"string"}},required:["file","line","snippet"],type:"object"},PrimitiveFreshnessStateV1:gG,PrimitiveIndexingStateV1:gB,PrimitiveSearchFreshnessV1:gQ},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"`read_count` and `read_sites` are absent when the request asked for\nwrites only.",properties:{field:{type:"string"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},qualifier:{type:["string","null"]},qualifier_applied:{type:"boolean"},read_count:{format:"uint64",minimum:0,type:["integer","null"]},read_sites:{items:{$ref:"#/$defs/FieldSiteV1"},type:["array","null"]},write_count:{format:"uint64",minimum:0,type:"integer"},write_sites:{items:{$ref:"#/$defs/FieldSiteV1"},type:"array"}},required:["field","qualifier_applied","write_count","write_sites"],title:"FieldSitesResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{file:{type:"string"}},required:["file"],title:"FileDependentsPrimitiveRequest",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{dependent_files:{items:{type:"string"},type:"array"},file:{type:"string"}},required:["file","dependent_files"],title:"FileDependentsPrimitiveResult",type:"object"},{$defs:{FilesLayoutV1:ym},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{layout:{anyOf:[{$ref:"#/$defs/FilesLayoutV1"},{type:"null"}],description:"File listing layout: flat (one per line) or grouped by directory\n(default: grouped)."},path:{description:"Filter to files under this directory path.",type:["string","null"]},pattern:{description:"Filter files matching this glob pattern (e.g. '**/*.rs').",type:["string","null"]}},title:"FilesSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fE,CodeIndexConvergenceParkedV1:fA,CodeIndexOmittedSourceV1:fM,CodeIndexOmittedSourcesV1:fW,CodeIndexSourceOmissionReasonV1:fN,CodeIndexStalenessStateV1:fz,FilesLayoutV1:ym,IndexedFileV1:{additionalProperties:!1,properties:{bytes:{format:"uint64",minimum:0,type:"integer"},path:{type:"string"},symbols:{format:"uint64",minimum:0,type:"integer"}},required:["path","symbols","bytes"],type:"object"},PrimitiveFreshnessStateV1:gG,PrimitiveIndexingStateV1:gB,PrimitiveSearchFreshnessV1:gQ},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{count:{format:"uint",minimum:0,type:"integer"},files:{items:{$ref:"#/$defs/IndexedFileV1"},type:"array"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},layout:{$ref:"#/$defs/FilesLayoutV1"},worktree_omitted_sources:{anyOf:[{$ref:"#/$defs/CodeIndexOmittedSourcesV1"},{type:"null"}],description:"Sources the serving snapshot captured for the whole worktree but does\nnot index, unfiltered by `path` or `pattern`."}},required:["count","layout","files"],title:"FilesResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{lazy_index_ignored_dependencies:{description:"Opt in to bounded indexing of ignored dependency entry files when an\nimport hint matches (default: false).",type:["boolean","null"]},limit:{description:"Maximum matches to return (default: 20, max: 200).",format:"uint32",minimum:0,type:["integer","null"]},name:{description:"Exact bare symbol name (no `::`, no glob).",type:"string"}},required:["name"],title:"FindExactSymbolSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fE,CodeIndexConvergenceParkedV1:fA,CodeIndexStalenessStateV1:fz,FindExactSymbolMatchV1:{additionalProperties:!1,properties:{file:{type:"string"},id:{type:"string"},kind:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},name:{type:"string"},qualified_name:{type:"string"},signature:{type:["string","null"]}},required:["id","name","qualified_name","kind","file","line"],type:"object"},PrimitiveFreshnessStateV1:gG,PrimitiveIndexingStateV1:gB,PrimitiveSearchFreshnessV1:gQ},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{count:{format:"uint64",minimum:0,type:"integer"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},matches:{items:{$ref:"#/$defs/FindExactSymbolMatchV1"},type:"array"},name:{type:"string"},suggestions:{description:"Nearest indexed bare names when `count` is 0. Empty when the query\nmatched, or when it is not itself a bare identifier.",items:{type:"string"},type:"array"}},required:["name","count","matches"],title:"FindExactSymbolResultV1",type:"object"},{$defs:{GiniMetricV1:yg,GiniScopeV1:y_},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{limit:{description:"Number of top outliers to return (default: 10, at most 100).",format:"uint32",minimum:0,type:["integer","null"]},metric:{anyOf:[{$ref:"#/$defs/GiniMetricV1"},{type:"null"}],description:"Metric to measure inequality for (default: complexity)."},path:{description:"Filter to files under this directory path.",type:["string","null"]},scope:{anyOf:[{$ref:"#/$defs/GiniScopeV1"},{type:"null"}],description:"Aggregate per file or per symbol (default: file)."}},title:"GiniSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fE,CodeIndexConvergenceParkedV1:fA,CodeIndexStalenessStateV1:fz,GiniMetricV1:yg,GiniOutlierV1:{additionalProperties:!1,properties:{name:{type:"string"},pct_of_max:{format:"double",type:"number"},value:{format:"double",type:"number"}},required:["name","value","pct_of_max"],type:"object"},GiniScopeV1:y_,PrimitiveFreshnessStateV1:gG,PrimitiveIndexingStateV1:gB,PrimitiveSearchFreshnessV1:gQ},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},gini:{format:"double",type:"number"},incomplete_complexity_symbols:{description:"Symbols left out because their bounded complexity walk did not cover\nthe body; their counters are lower bounds and measure nothing here.",format:"uint64",minimum:0,type:"integer"},interpretation:{type:"string"},metric:{$ref:"#/$defs/GiniMetricV1"},outliers:{items:{$ref:"#/$defs/GiniOutlierV1"},type:"array"},scope:{$ref:"#/$defs/GiniScopeV1"},total_items:{format:"uint64",minimum:0,type:"integer"}},required:["gini","interpretation","total_items","metric","scope","incomplete_complexity_symbols","outliers"],title:"GiniResultV1",type:"object"},{$defs:{GitIndexPreviewId:yq,ManifestDigest:gl},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Public MCP/CLI request to apply one immutable Git index preview.",properties:{idempotency_key:{type:"string"},preview_digest:{$ref:"#/$defs/ManifestDigest"},preview_id:{$ref:"#/$defs/GitIndexPreviewId"}},required:["preview_id","preview_digest","idempotency_key"],title:"GitApplySurfaceRequest",type:"object"},{$defs:{GitIndexPreviewId:yq,GitIndexReceiptId:{description:"Strongly typed canonical identity: `GitIndexReceiptId`.",type:"string"},GitIndexReceiptOutcomeV1:{description:"Terminal outcome a recovery record can prove without re-running a native\nmutation.",enum:["committed","aborted_no_change","needs_inspection"],type:"string"},GitIndexTransactionId:{description:"Strongly typed canonical identity: `GitIndexTransactionId`.",type:"string"},GitIndexTransactionOperationV1:yI,GitOidV1:yx,ManifestDigest:gl,UtcMicros:vK},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Durable, integrity-protected receipt for one Git index transaction.",properties:{committed_at:{$ref:"#/$defs/UtcMicros"},final_snapshot_captured:{description:"Whether `final_snapshot_digest`, `new_index_tree`, and `new_head` came\nfrom a post-outcome native observation. An unavailable observation is\nvalid only for a terminal outcome that does not claim a commit.",type:"boolean"},final_snapshot_digest:{$ref:"#/$defs/ManifestDigest",description:"Digest of a snapshot that was actually captured after the terminal\nobservation. When `final_snapshot_captured` is false this retains the\nexpected snapshot digest only as a stable schema placeholder; callers\nmust not treat it as an observation."},new_head:{anyOf:[{$ref:"#/$defs/GitOidV1"},{type:"null"}]},new_index_tree:{anyOf:[{$ref:"#/$defs/GitOidV1"},{type:"null"}]},old_head:{anyOf:[{$ref:"#/$defs/GitOidV1"},{type:"null"}]},old_index_tree:{anyOf:[{$ref:"#/$defs/GitOidV1"},{type:"null"}]},old_snapshot_digest:{$ref:"#/$defs/ManifestDigest"},operation:{$ref:"#/$defs/GitIndexTransactionOperationV1"},outcome:{$ref:"#/$defs/GitIndexReceiptOutcomeV1"},preview_id:{$ref:"#/$defs/GitIndexPreviewId"},receipt_digest:{$ref:"#/$defs/ManifestDigest"},receipt_id:{$ref:"#/$defs/GitIndexReceiptId"},selected_hunk_digests:{items:{$ref:"#/$defs/ManifestDigest"},type:"array"},transaction_id:{$ref:"#/$defs/GitIndexTransactionId"}},required:["receipt_id","transaction_id","preview_id","operation","old_snapshot_digest","final_snapshot_digest","final_snapshot_captured","selected_hunk_digests","outcome","committed_at","receipt_digest"],title:"GitIndexTransactionReceiptV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Request shape for the public `git_blame` surface.",properties:{follow_renames:{default:!1,type:"boolean"},max_bytes:{format:"uint64",minimum:0,type:["integer","null"]},max_entries:{format:"uint32",minimum:0,type:["integer","null"]},path:{type:"string"}},required:["path"],title:"GitBlameSurfaceRequest",type:"object"},{$defs:{GitBlameAvailabilityV1:{description:"Why blame/line provenance is unavailable for a path.",enum:["available","path_not_tracked","unborn_branch","binary_file"],type:"string"},GitBlameLineV1:{additionalProperties:!1,description:"Line provenance for one final (current) line.",properties:{author:{$ref:"#/$defs/GitCommitIdentityV1"},boundary:{description:"True when the origin commit is a history boundary (e.g. shallow root).",type:"boolean"},commit:{$ref:"#/$defs/GitOidV1"},final_line:{description:"1-based line number in the blamed revision.",format:"uint32",minimum:0,type:"integer"},origin_line:{description:"1-based line number in the origin commit.",format:"uint32",minimum:0,type:"integer"},previous:{anyOf:[{$ref:"#/$defs/GitBlamePreviousV1"},{type:"null"}]}},required:["final_line","origin_line","commit","author","boundary"],type:"object"},GitBlamePreviousV1:{additionalProperties:!1,description:"Rename-following evidence for one blamed line (`previous` record).",properties:{commit:{$ref:"#/$defs/GitOidV1"},path:{type:"string"}},required:["commit","path"],type:"object"},GitBlameV1:{additionalProperties:!1,description:"Typed blame result: per-line provenance plus boundary, rename-following,\nand unavailable states.",properties:{availability:{$ref:"#/$defs/GitBlameAvailabilityV1"},coverage:{$ref:"#/$defs/GitCoverageV1"},lines:{items:{$ref:"#/$defs/GitBlameLineV1"},type:"array"},path:{type:"string"},repository:{$ref:"#/$defs/RepositoryId"}},required:["repository","path","lines","availability","coverage"],type:"object"},GitBlobExpectationV1:yv,GitChangeKindV1:{description:"Native change kind for one side (index or worktree) of a status entry,\nor for a whole-file diff record.",enum:["unmodified","modified","added","deleted","renamed","copied","type_changed","unmerged"],type:"string"},GitCommitIdentityV1:{additionalProperties:!1,description:"Author/committer identity and timestamp evidence for one commit.",properties:{at:{$ref:"#/$defs/UtcMicros"},email:{type:"string"},name:{type:"string"}},required:["name","email","at"],type:"object"},GitCommitMetadataV1:{additionalProperties:!1,description:"Bounded commit metadata. The full message is not retained;\n`message_digest` is its canonical digest evidence.",properties:{author:{$ref:"#/$defs/GitCommitIdentityV1"},commit:{$ref:"#/$defs/GitOidV1"},committer:{$ref:"#/$defs/GitCommitIdentityV1"},message_digest:{$ref:"#/$defs/ManifestDigest"},parents:{items:{$ref:"#/$defs/GitOidV1"},type:"array"},subject:{description:"First line of the commit message, bounded at capture.",type:"string"},tree:{$ref:"#/$defs/GitOidV1"}},required:["commit","tree","parents","author","committer","subject","message_digest"],type:"object"},GitCoverageV1:yS,GitDegradationV1:yk,GitDiffScopeV1:{description:"Diff scope: unstaged worktree changes, staged index changes, or an exact\ncommit range. Range diffs are read-only evidence and carry no index\nrelationship, so they cannot mint an applicable `HunkRefV1`.",oneOf:[{properties:{scope:{const:"working_tree",type:"string"}},required:["scope"],type:"object"},{properties:{scope:{const:"staged",type:"string"}},required:["scope"],type:"object"},{properties:{base:{$ref:"#/$defs/GitOidV1"},head:{$ref:"#/$defs/GitOidV1"},scope:{const:"commit_range",type:"string"}},required:["scope","base","head"],type:"object"}]},GitDiffV1:{additionalProperties:!1,description:"Typed diff result for one scope with explicit coverage.",properties:{coverage:{$ref:"#/$defs/GitCoverageV1"},files:{items:{$ref:"#/$defs/GitFileDiffV1"},type:"array"},repository:{$ref:"#/$defs/RepositoryId"},scope:{$ref:"#/$defs/GitDiffScopeV1"}},required:["repository","scope","files","coverage"],type:"object"},GitFileDiffV1:{additionalProperties:!1,description:"One file's structured diff record: change kind, modes, blob identities,\nbinary/submodule classification, bounded line totals, and hunks.",properties:{binary:{type:"boolean"},change:{$ref:"#/$defs/GitChangeKindV1"},deletions:{format:"uint32",minimum:0,type:["integer","null"]},hunks:{items:{$ref:"#/$defs/GitHunkV1"},type:"array"},insertions:{description:"Inserted/deleted line totals; absent for binary and submodule records.",format:"uint32",minimum:0,type:["integer","null"]},new_blob:{anyOf:[{$ref:"#/$defs/GitOidV1"},{type:"null"}]},new_mode:{anyOf:[{$ref:"#/$defs/GitFileModeV1"},{type:"null"}]},old_blob:{anyOf:[{$ref:"#/$defs/GitOidV1"},{type:"null"}]},old_mode:{anyOf:[{$ref:"#/$defs/GitFileModeV1"},{type:"null"}]},original_path:{description:"Source path for a rename or copy.",type:["string","null"]},path:{type:"string"},submodule:{description:"True when the entry is a gitlink (submodule) change.",type:"boolean"}},required:["path","change","binary","submodule","hunks"],type:"object"},GitFileModeV1:yw,GitHeadStateV1:yR,GitHistoryV1:{additionalProperties:!1,description:"Bounded commit history in native traversal order. `truncated` is true\nwhen the capture bound cut the walk; shallow/partial-clone boundaries are\ncoverage degradations, never silently clean.",properties:{commits:{items:{$ref:"#/$defs/GitCommitMetadataV1"},type:"array"},coverage:{$ref:"#/$defs/GitCoverageV1"},repository:{$ref:"#/$defs/RepositoryId"},truncated:{type:"boolean"}},required:["repository","commits","truncated","coverage"],type:"object"},GitHunkPreviewEntryV1:{additionalProperties:!1,description:"One minted hunk selection: the canonical selection digest plus the\n`HunkRef` identity evidence it selects.",properties:{digest:{$ref:"#/$defs/ManifestDigest"},hunk:{$ref:"#/$defs/HunkRefV1"}},required:["digest","hunk"],type:"object"},GitHunkPreviewInputV1:{additionalProperties:!1,description:"Bounded, expiring preview input minted by `git_hunks` from one exact\ndaemon-captured repository snapshot.",properties:{expires_at:{$ref:"#/$defs/UtcMicros"},hunks:{items:{$ref:"#/$defs/GitHunkPreviewEntryV1"},type:"array"},preview_input_id:{$ref:"#/$defs/GitIndexPreviewId"},repository_snapshot_digest:{$ref:"#/$defs/ManifestDigest"}},required:["preview_input_id","repository_snapshot_digest","expires_at","hunks"],type:"object"},GitHunkV1:{additionalProperties:!1,description:"One structured diff hunk. The hunk body is not retained; `patch_digest`\nis the canonical digest of the normalized header plus body lines, which\nis the stable hunk identity evidence.",properties:{new_lines:{format:"uint32",minimum:0,type:"integer"},new_start:{format:"uint32",minimum:0,type:"integer"},old_lines:{format:"uint32",minimum:0,type:"integer"},old_start:{format:"uint32",minimum:0,type:"integer"},patch_digest:{$ref:"#/$defs/ManifestDigest"},section:{description:"Function/section heading from the hunk header when Git emitted one.",type:["string","null"]}},required:["old_start","old_lines","new_start","new_lines","patch_digest"],type:"object"},GitIndexEntryExpectationV1:yV,GitIndexPreviewId:yq,GitOidV1:yx,GitOperationStateV1:yj,GitQueryEnvelopeV1:{additionalProperties:!1,description:"One typed query result with its merged coverage. `coverage` is the\nadapter-reported coverage plus any query-level degradation (entry-bound\ntruncation); `truncated_by_bound` distinguishes query-level truncation\nfrom adapter-level capture bounds.",properties:{coverage:{$ref:"#/$defs/GitCoverageV1"},truncated_by_bound:{type:"boolean"},value:{$ref:"#/$defs/GitStatusSummaryV1"}},required:["value","coverage","truncated_by_bound"],type:"object"},GitQueryEnvelopeV12:{additionalProperties:!1,description:"One typed query result with its merged coverage. `coverage` is the\nadapter-reported coverage plus any query-level degradation (entry-bound\ntruncation); `truncated_by_bound` distinguishes query-level truncation\nfrom adapter-level capture bounds.",properties:{coverage:{$ref:"#/$defs/GitCoverageV1"},truncated_by_bound:{type:"boolean"},value:{$ref:"#/$defs/GitDiffV1"}},required:["value","coverage","truncated_by_bound"],type:"object"},GitQueryEnvelopeV13:{additionalProperties:!1,description:"One typed query result with its merged coverage. `coverage` is the\nadapter-reported coverage plus any query-level degradation (entry-bound\ntruncation); `truncated_by_bound` distinguishes query-level truncation\nfrom adapter-level capture bounds.",properties:{coverage:{$ref:"#/$defs/GitCoverageV1"},truncated_by_bound:{type:"boolean"},value:{$ref:"#/$defs/GitHistoryV1"}},required:["value","coverage","truncated_by_bound"],type:"object"},GitQueryEnvelopeV14:{additionalProperties:!1,description:"One typed query result with its merged coverage. `coverage` is the\nadapter-reported coverage plus any query-level degradation (entry-bound\ntruncation); `truncated_by_bound` distinguishes query-level truncation\nfrom adapter-level capture bounds.",properties:{coverage:{$ref:"#/$defs/GitCoverageV1"},truncated_by_bound:{type:"boolean"},value:{$ref:"#/$defs/GitBlameV1"}},required:["value","coverage","truncated_by_bound"],type:"object"},GitQueryEnvelopeV15:{additionalProperties:!1,description:"One typed query result with its merged coverage. `coverage` is the\nadapter-reported coverage plus any query-level degradation (entry-bound\ntruncation); `truncated_by_bound` distinguishes query-level truncation\nfrom adapter-level capture bounds.",properties:{coverage:{$ref:"#/$defs/GitCoverageV1"},truncated_by_bound:{type:"boolean"},value:{$ref:"#/$defs/GitHunkPreviewInputV1"}},required:["value","coverage","truncated_by_bound"],type:"object"},GitStatusSummaryV1:{additionalProperties:!1,description:"Bounded status summary derived from the typed\n[`tracedecay_domain::git::GitStatusV1`]: HEAD and operation state,\nper-class counts, and a bounded sorted sample of changed paths.",properties:{changed_paths:{description:"Sorted, de-duplicated changed paths, truncated at the query entry bound.",items:{type:"string"},type:"array"},conflicted:{format:"uint32",minimum:0,type:"integer"},head:{$ref:"#/$defs/GitHeadStateV1"},ignored:{format:"uint32",minimum:0,type:"integer"},operation:{$ref:"#/$defs/GitOperationStateV1"},repository:{$ref:"#/$defs/RepositoryId"},schema_version:{type:"string"},staged:{format:"uint32",minimum:0,type:"integer"},unstaged:{format:"uint32",minimum:0,type:"integer"},untracked:{format:"uint32",minimum:0,type:"integer"}},required:["repository","head","operation","staged","unstaged","conflicted","untracked","ignored","changed_paths","schema_version"],type:"object"},HunkDirectionV1:yG,HunkRefV1:yB,ManifestDigest:gl,RepositoryId:_v,UtcMicros:vK,WorktreeId:$M},$schema:"https://json-schema.org/draft/2020-12/schema",description:"Actual payload emitted by each public Git read operation.",oneOf:[{properties:{query:{const:"status",type:"string"},result:{$ref:"#/$defs/GitQueryEnvelopeV1"}},required:["query","result"],type:"object"},{properties:{query:{const:"diff",type:"string"},result:{$ref:"#/$defs/GitQueryEnvelopeV12"}},required:["query","result"],type:"object"},{properties:{query:{const:"history",type:"string"},result:{$ref:"#/$defs/GitQueryEnvelopeV13"}},required:["query","result"],type:"object"},{properties:{query:{const:"blame",type:"string"},result:{$ref:"#/$defs/GitQueryEnvelopeV14"}},required:["query","result"],type:"object"},{properties:{query:{const:"hunks",type:"string"},result:{$ref:"#/$defs/GitQueryEnvelopeV15"}},required:["query","result"],type:"object"}],title:"GitReadResultV1"},{$defs:{GitOidV1:yx,GitSurfaceDiffScopeV1:yW},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Request shape for the public `git_diff` surface.",properties:{base:{anyOf:[{$ref:"#/$defs/GitOidV1"},{type:"null"}]},head:{anyOf:[{$ref:"#/$defs/GitOidV1"},{type:"null"}]},max_bytes:{format:"uint64",minimum:0,type:["integer","null"]},max_entries:{format:"uint32",minimum:0,type:["integer","null"]},scope:{$ref:"#/$defs/GitSurfaceDiffScopeV1",default:"working_tree"}},title:"GitDiffSurfaceRequest",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Request shape for the public `git_history` surface.",properties:{count:{format:"uint32",minimum:0,type:["integer","null"]},first_parent:{default:!1,type:"boolean"},follow:{default:!1,type:"boolean"},max_bytes:{format:"uint64",minimum:0,type:["integer","null"]},max_entries:{format:"uint32",minimum:0,type:["integer","null"]},path:{type:["string","null"]}},title:"GitHistorySurfaceRequest",type:"object"},{$defs:{GitSurfaceDiffScopeV1:yW},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Request shape for the public `git_hunks` surface.\n\nThe daemon captures exact repository state itself and injects the private\npreview binding after capture, so the public wire carries only the diff\nscope (commit ranges cannot mint applicable hunks).",properties:{max_bytes:{format:"uint64",minimum:0,type:["integer","null"]},max_entries:{format:"uint32",minimum:0,type:["integer","null"]},scope:{$ref:"#/$defs/GitSurfaceDiffScopeV1",default:"working_tree"}},title:"GitHunksSurfaceRequest",type:"object"},{$defs:{GitIndexPreviewId:yq,GitIndexTransactionOperationV1:yI,ManifestDigest:gl},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Public MCP/CLI request for one daemon-owned Git index preview.",properties:{operation:{$ref:"#/$defs/GitIndexTransactionOperationV1"},preview_input_id:{anyOf:[{$ref:"#/$defs/GitIndexPreviewId"},{type:"null"}],default:null,description:"Hunk preview input minted by `git_hunks`; required for stage/unstage."},selected_hunk_digests:{default:[],description:"Selection digests drawn from the referenced preview input.",items:{$ref:"#/$defs/ManifestDigest"},type:"array"}},required:["operation"],title:"GitPreviewSurfaceRequest",type:"object"},{$defs:{GitBlobExpectationV1:yv,GitCoverageV1:yS,GitDegradationV1:yk,GitFileModeV1:yw,GitHeadStateV1:yR,GitIndexEntryExpectationV1:yV,GitIndexPreviewDispositionV1:{description:"Whether a captured preview may reach the daemon's native apply path.",oneOf:[{properties:{state:{const:"applicable",type:"string"}},required:["state"],type:"object"},{properties:{reason:{$ref:"#/$defs/GitIndexUnsupportedStateV1"},state:{const:"unsupported",type:"string"}},required:["state","reason"],type:"object"}]},GitIndexPreviewId:yq,GitIndexTransactionOperationV1:yI,GitIndexUnsupportedStateV1:{description:"Why a preview is intentionally read-only. A caller must re-preview after\nresolving the condition; no variant grants a relaxed or partial apply.",enum:["bare_repository","detached_head","unborn_branch","index_lock_present","external_git_driver","unmerged_index","intent_to_add","split_index","sparse_index","unreadable_index","conflicted_working_tree","unreadable_working_tree","in_progress_operation","unsupported_object_format","binary_hunk","submodule","symlink","file_mode_only","rename_or_copy","filters_or_end_of_line","partial_hunk_selection"],type:"string"},GitObjectFormatV1:{description:"Repository object format, derived from object-id length.",enum:["sha1","sha256"],type:"string"},GitOidV1:yx,GitOperationStateV1:yj,HunkDirectionV1:yG,HunkRefV1:yB,ManifestDigest:gl,ProjectId:g2,RepositoryId:_v,RepositoryIndexSnapshotV1:{additionalProperties:!1,properties:{checksum:{$ref:"#/$defs/ManifestDigest"},state:{$ref:"#/$defs/RepositoryIndexStateV1"},tree_id:{anyOf:[{$ref:"#/$defs/GitOidV1"},{type:"null"}]},unmerged_stage_digest:{anyOf:[{$ref:"#/$defs/ManifestDigest"},{type:"null"}]}},required:["checksum","state"],type:"object"},RepositoryIndexStateV1:{enum:["clean","staged","unmerged","intent_to_add","split","sparse","unreadable"],type:"string"},RepositoryStateSnapshotV1:{additionalProperties:!1,description:"Immutable content-addressed native repository state. Missing/partial\nevidence remains typed by fields and coverage instead of being upgraded to\na guessed clean snapshot.",properties:{adapter_revision:{description:"Revision of the fixed native adapter that interpreted this state.",type:["string","null"]},attributes_digest:{anyOf:[{$ref:"#/$defs/ManifestDigest"},{type:"null"}]},captured_at:{$ref:"#/$defs/UtcMicros"},configuration_digest:{anyOf:[{$ref:"#/$defs/ManifestDigest"},{type:"null"}]},coverage:{$ref:"#/$defs/GitCoverageV1"},filesystem_capabilities_digest:{anyOf:[{$ref:"#/$defs/ManifestDigest"},{type:"null"}]},git_version:{description:"Exact native Git implementation observed by the fixed adapter. A\nread-only partial snapshot may omit this, but omitted native evidence\nis never mutation eligible.",type:["string","null"]},head:{$ref:"#/$defs/GitHeadStateV1"},index:{$ref:"#/$defs/RepositoryIndexSnapshotV1"},object_format:{$ref:"#/$defs/GitObjectFormatV1"},observation_epoch:{format:"uint64",minimum:0,type:"integer"},operation_state:{$ref:"#/$defs/GitOperationStateV1"},project_id:{$ref:"#/$defs/ProjectId"},refs_digest:{anyOf:[{$ref:"#/$defs/ManifestDigest"},{type:"null"}],description:"Digest of the complete native ref namespace at capture time."},repository_id:{$ref:"#/$defs/RepositoryId"},snapshot_id:{type:"string"},sparse_digest:{anyOf:[{$ref:"#/$defs/ManifestDigest"},{type:"null"}]},submodule_digest:{anyOf:[{$ref:"#/$defs/ManifestDigest"},{type:"null"}]},working_tree:{$ref:"#/$defs/RepositoryWorkingTreeSnapshotV1"},worktree_id:{anyOf:[{$ref:"#/$defs/WorktreeId"},{type:"null"}]}},required:["snapshot_id","project_id","repository_id","observation_epoch","object_format","head","index","working_tree","operation_state","captured_at","coverage"],type:"object"},RepositoryWorkingTreeSnapshotV1:{additionalProperties:!1,properties:{ignored_collision_digest:{anyOf:[{$ref:"#/$defs/ManifestDigest"},{type:"null"}]},state:{$ref:"#/$defs/RepositoryWorkingTreeStateV1"},tracked_digest:{$ref:"#/$defs/ManifestDigest"},untracked_name_digest:{anyOf:[{$ref:"#/$defs/ManifestDigest"},{type:"null"}]}},required:["state","tracked_digest"],type:"object"},RepositoryWorkingTreeStateV1:{enum:["clean","tracked_dirty","untracked_only","mixed","conflicted","unreadable"],type:"string"},UtcMicros:vK,WorktreeId:$M},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Immutable, content-bound preview for one daemon-serialized index\ntransaction. Applicability is only a precondition: the daemon must capture\nand compare the entire snapshot and every contained `HunkRefV1` again\nimmediately before a native mutation.",properties:{candidate_index_tree:{anyOf:[{$ref:"#/$defs/GitOidV1"},{type:"null"}]},created_at:{$ref:"#/$defs/UtcMicros"},disposition:{$ref:"#/$defs/GitIndexPreviewDispositionV1"},expires_at:{$ref:"#/$defs/UtcMicros"},operation:{$ref:"#/$defs/GitIndexTransactionOperationV1"},preview_digest:{$ref:"#/$defs/ManifestDigest"},preview_id:{$ref:"#/$defs/GitIndexPreviewId"},repository_snapshot:{$ref:"#/$defs/RepositoryStateSnapshotV1"},repository_snapshot_digest:{$ref:"#/$defs/ManifestDigest"},selected_hunks:{items:{$ref:"#/$defs/HunkRefV1"},type:"array"}},required:["preview_id","operation","repository_snapshot","repository_snapshot_digest","selected_hunks","disposition","created_at","expires_at","preview_digest"],title:"GitIndexPreviewV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Request shape for the public `git_status` surface.",properties:{max_bytes:{format:"uint64",minimum:0,type:["integer","null"]},max_entries:{format:"uint32",minimum:0,type:["integer","null"]}},title:"GitStatusSurfaceRequest",type:"object"},{$defs:{StackDeliveryWatermarkId:vS,StackSignalId:vw},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"The public, transport-neutral request for one durable stack signal.",properties:{expected_watermark_id:{anyOf:[{$ref:"#/$defs/StackDeliveryWatermarkId"},{type:"null"}]},signal_id:{anyOf:[{$ref:"#/$defs/StackSignalId"},{type:"null"}]}},title:"GitHubStackSignalExpandSurfaceRequest",type:"object"},{$defs:{BranchStackRevisionId:fh,GitHubStackSignalEvidenceRefV1:{additionalProperties:!1,description:"Bounded evidence for the exact signal the coordinator authorized.\n\nProvider payloads, paths, commit bodies, and delivery recipients remain\nbehind the durable signal evidence rather than copied to this result.",properties:{github_stack_digest:{anyOf:[{$ref:"#/$defs/ManifestDigest"},{type:"null"}]},kind:{$ref:"#/$defs/StackSignalKindV1"},native_source:{$ref:"#/$defs/GitHubStackSignalNativeSourceV1"},observed_at:{$ref:"#/$defs/UtcMicros"},signal_id:{$ref:"#/$defs/StackSignalId"},stack_revision_digest:{$ref:"#/$defs/ManifestDigest"},stack_revision_id:{$ref:"#/$defs/BranchStackRevisionId"},state_digest:{$ref:"#/$defs/ManifestDigest"},watermark_id:{$ref:"#/$defs/StackDeliveryWatermarkId"}},required:["signal_id","watermark_id","kind","stack_revision_id","stack_revision_digest","state_digest","observed_at","native_source"],type:"object"},GitHubStackSignalExpandUnavailableV1:{description:"Truthful non-success outcomes for signal expansion.\n\n`Concealed` intentionally combines absent and unauthorized signal handles;\nexposing that distinction would turn this operation into a signal probe.",enum:["concealed","stale","native_evidence_unavailable","authority_unmounted","cancelled"],type:"string"},GitHubStackSignalNativePreviewV1:{additionalProperties:!1,description:"Exact branch pair and native preflight that produced the selected signal.",properties:{destination_ref:{$ref:"#/$defs/RefId"},destination_tip:{$ref:"#/$defs/GitOidV1"},direction:{$ref:"#/$defs/NativeIntegrationDirectionV1"},disposition:{$ref:"#/$defs/NativeIntegrationPreviewDispositionV1"},preview_digest:{$ref:"#/$defs/ManifestDigest"},preview_id:{$ref:"#/$defs/NativeIntegrationPreviewId"},source_ref:{$ref:"#/$defs/RefId"},source_tip:{$ref:"#/$defs/GitOidV1"}},required:["preview_id","preview_digest","direction","source_ref","destination_ref","source_tip","destination_tip","disposition"],type:"object"},GitHubStackSignalNativeSourceV1:{oneOf:[{properties:{preview:{$ref:"#/$defs/GitHubStackSignalNativePreviewV1"},source:{const:"preflight",type:"string"}},required:["source","preview"],type:"object"},{properties:{preview:{$ref:"#/$defs/GitHubStackSignalNativePreviewV1"},source:{const:"terminal",type:"string"},terminal:{$ref:"#/$defs/GitHubStackSignalNativeTerminalV1"}},required:["source","preview","terminal"],type:"object"}]},GitHubStackSignalNativeTerminalV1:{additionalProperties:!1,properties:{completed_at:{$ref:"#/$defs/UtcMicros"},final_ref_tip:{$ref:"#/$defs/GitOidV1"},outcome:{$ref:"#/$defs/NativeIntegrationTerminalOutcomeV1"},receipt_digest:{$ref:"#/$defs/ManifestDigest"},transaction_id:{$ref:"#/$defs/NativeIntegrationTransactionId"}},required:["transaction_id","receipt_digest","outcome","final_ref_tip","completed_at"],type:"object"},GitOidV1:yx,ManifestDigest:gl,MechanicalIntegrationModeV1:gp,NativeIntegrationDirectionV1:gV,NativeIntegrationPreviewDispositionV1:gq,NativeIntegrationPreviewId:gI,NativeIntegrationTerminalOutcomeV1:gC,NativeIntegrationTransactionId:gT,NativeIntegrationUnavailabilityV1:gO,RefId:_u,StackDeliveryWatermarkId:vS,StackSignalId:vw,StackSignalKindV1:{description:"Durable classification of one GitHub stack transition.",enum:["dependency_ready","actual_conflict","stack_tip_drift","pull_request_drift","ci_evaluated_commit_drift","integration_committed","integration_needs_inspection"],type:"string"},UtcMicros:vK},$schema:"https://json-schema.org/draft/2020-12/schema",oneOf:[{properties:{evidence:{$ref:"#/$defs/GitHubStackSignalEvidenceRefV1"},outcome:{const:"expanded",type:"string"}},required:["outcome","evidence"],type:"object"},{properties:{outcome:{const:"unavailable",type:"string"},reason:{$ref:"#/$defs/GitHubStackSignalExpandUnavailableV1"}},required:["outcome","reason"],type:"object"}],title:"GitHubStackSignalExpandSurfaceResultV1"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{limit:{description:"Maximum number of results to return (default: 10, at most 100).",format:"uint32",minimum:0,type:["integer","null"]},path:{description:"Filter to files under this directory path (e.g. 'src/main/java').",type:["string","null"]}},title:"GodClassSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fE,CodeIndexConvergenceParkedV1:fA,CodeIndexStalenessStateV1:fz,GodClassEntryV1:{additionalProperties:!1,properties:{fields:{format:"uint64",minimum:0,type:"integer"},file:{type:"string"},id:{type:"string"},kind:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},methods:{format:"uint64",minimum:0,type:"integer"},name:{type:"string"},total_members:{format:"uint64",minimum:0,type:"integer"}},required:["id","name","kind","file","line","methods","fields","total_members"],type:"object"},PrimitiveFreshnessStateV1:gG,PrimitiveIndexingStateV1:gB,PrimitiveSearchFreshnessV1:gQ},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},ranking:{items:{$ref:"#/$defs/GodClassEntryV1"},type:"array"},result_count:{format:"uint64",minimum:0,type:"integer"}},required:["result_count","ranking"],title:"GodClassResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{case_sensitive:{description:"Match case-sensitively (default: false = case-insensitive).",type:["boolean","null"]},context_lines:{description:"Lines of surrounding context to include per hit (default: 0, max: 3).",format:"uint32",minimum:0,type:["integer","null"]},fixed_strings:{description:"Treat pattern as a literal string instead of a regex (default: false).",type:["boolean","null"]},max_results:{description:"Maximum number of matching lines to return (default: 50, max: 200).",format:"uint32",minimum:0,type:["integer","null"]},path_glob:{description:"Optional glob restricting which files are searched, matched against\nproject-relative paths (e.g. 'src/**/*.rs').",type:["string","null"]},pattern:{description:"Content to search for. Treated as a regular expression unless\nfixed_strings is true.",type:"string"}},required:["pattern"],title:"GrepSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fE,CodeIndexConvergenceParkedV1:fA,CodeIndexStalenessStateV1:fz,CoverageCompleteness:hP,CoverageDomainState:{additionalProperties:!1,properties:{completeness:{$ref:"#/$defs/CoverageCompleteness"},domain:{$ref:"#/$defs/EvidenceDomain"}},required:["domain","completeness"],type:"object"},EvidenceCoverage:{additionalProperties:!1,description:"Deterministic coverage fold input for an evidence packet.",properties:{completeness:{$ref:"#/$defs/CoverageCompleteness"},domains:{items:{$ref:"#/$defs/CoverageDomainState"},type:"array"},eligible:{format:"uint64",minimum:0,type:["integer","null"]},requested_domains:{items:{$ref:"#/$defs/EvidenceDomain"},type:"array"},returned:{format:"uint64",minimum:0,type:"integer"},visited:{format:"uint64",minimum:0,type:["integer","null"]}},required:["requested_domains","returned","completeness","domains"],type:"object"},EvidenceDomain:{description:"Requested evidence domain for bounded coverage and omissions.",enum:["symbol","source","graph","test","temporal","anchor","operational","diagnostic"],type:"string"},GrepGraphEnrichmentV1:{description:"Whether the verified graph resolved each hit's enclosing symbol. Hits are\nthe lexical answer either way.",oneOf:[{additionalProperties:!1,properties:{enriched:{format:"uint64",minimum:0,type:"integer"},returned:{format:"uint64",minimum:0,type:"integer"},status:{const:"complete",type:"string"}},required:["status","enriched","returned"],type:"object"},{additionalProperties:!1,properties:{detail:{type:"string"},reason_code:{type:"string"},retryable:{type:"boolean"},status:{const:"unavailable",type:"string"}},required:["status","reason_code","retryable","detail"],type:"object"}]},GrepMatchV1:{additionalProperties:!1,properties:{after:{items:{type:"string"},type:"array"},before:{items:{type:"string"},type:"array"},file:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},node_id:{type:["string","null"]},symbol:{description:"The smallest verified graph symbol enclosing the hit.",type:["string","null"]},text:{type:"string"}},required:["file","line","text"],type:"object"},GrepScanOmissionsV1:{additionalProperties:!1,description:"What the bounded scan skipped, by cause; absent when it skipped nothing.",properties:{oversized_files:{description:"Files larger than the interactive scan byte limit.",format:"uint64",minimum:0,type:"integer"},oversized_lines:{description:"Lines longer than the scan line byte limit.",format:"uint64",minimum:0,type:"integer"},unavailable_sources:{description:"Source candidates that could not be read during the scan.",format:"uint64",minimum:0,type:"integer"}},required:["oversized_files","oversized_lines","unavailable_sources"],type:"object"},Omission:{additionalProperties:!1,properties:{count:{format:"uint64",minimum:0,type:"integer"},domain:{$ref:"#/$defs/EvidenceDomain"},reason:{$ref:"#/$defs/OmissionReason"}},required:["domain","count","reason"],type:"object"},OmissionReason:{description:"Safe reason why authorized requested evidence was omitted.",oneOf:[{enum:["budget","redacted","unavailable","unsupported","stale","failed","cancelled","timed_out","conflict"],type:"string"},{const:"macro_body_unparsed",description:"Evidence came from a macro body that was not expanded, so what the\nexpansion defines or calls is not covered.",type:"string"},{const:"import_unmodeled",description:"A caller sits under a `use` whose binding the index could not model\n(a glob in a block or inline module), so whether it calls the target\nis not covered.",type:"string"},{const:"cursor_expired",description:"The continuation cursor can no longer be redeemed (its lifetime ended\nor the snapshot it pages is gone); restart the request without it.",type:"string"},{const:"cursor_foreign",description:"The continuation cursor was issued for another project, worktree, or\nref; redeem it where it was issued.",type:"string"}]},PrimitiveFreshnessStateV1:gG,PrimitiveIndexingStateV1:gB,PrimitiveSearchFreshnessV1:gQ},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{coverage:{$ref:"#/$defs/EvidenceCoverage"},files_scanned:{format:"uint64",minimum:0,type:"integer"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},graph_enrichment:{$ref:"#/$defs/GrepGraphEnrichmentV1"},match_count:{format:"uint64",minimum:0,type:"integer"},omissions:{items:{$ref:"#/$defs/Omission"},type:"array"},results:{items:{$ref:"#/$defs/GrepMatchV1"},type:"array"},scan_omissions:{$ref:"#/$defs/GrepScanOmissionsV1"},truncated:{type:"boolean"}},required:["results","match_count","files_scanned","truncated","coverage","omissions","graph_enrichment"],title:"GrepSearchResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{details:{description:"If true, include full dimension breakdown (default: false).",type:["boolean","null"]},path:{description:"Filter to files under this directory path.",type:["string","null"]}},title:"HealthSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fE,CodeIndexConvergenceParkedV1:fA,CodeIndexStalenessStateV1:fz,HealthAcyclicityV1:{additionalProperties:!1,properties:{edges_in_cycles:{format:"uint64",minimum:0,type:"integer"},score:{format:"double",type:"number"},source:{type:"string"}},required:["score","edges_in_cycles","source"],type:"object"},HealthCoverageDisciplineV1:{additionalProperties:!1,properties:{score:{format:"double",type:"number"},skip_test_coverage_count:{format:"uint64",minimum:0,type:"integer"},source:{type:"string"},total_fns:{format:"uint64",minimum:0,type:"integer"}},required:["score","skip_test_coverage_count","total_fns","source"],type:"object"},HealthDepthV1:{additionalProperties:!1,properties:{ideal_chain:{format:"uint64",minimum:0,type:"integer"},max_chain:{format:"uint64",minimum:0,type:"integer"},score:{format:"double",type:"number"},source:{type:"string"}},required:["score","max_chain","ideal_chain","source"],type:"object"},HealthDimensionsV1:{additionalProperties:!1,properties:{acyclicity:{$ref:"#/$defs/HealthAcyclicityV1"},coverage_discipline:{$ref:"#/$defs/HealthCoverageDisciplineV1"},depth:{$ref:"#/$defs/HealthDepthV1"},equality:{$ref:"#/$defs/HealthEqualityV1"},modularity:{$ref:"#/$defs/HealthModularityV1"},redundancy:{$ref:"#/$defs/HealthRedundancyV1"}},required:["acyclicity","depth","equality","redundancy","modularity","coverage_discipline"],type:"object"},HealthEqualityV1:{additionalProperties:!1,properties:{gini:{format:"double",type:"number"},incomplete_complexity_symbols:{format:"uint64",minimum:0,type:"integer"},interpretation:{type:"string"},score:{format:"double",type:"number"},source:{type:"string"}},required:["score","gini","interpretation","incomplete_complexity_symbols","source"],type:"object"},HealthModularityV1:{additionalProperties:!1,properties:{components_after_hub_removal:{format:"uint64",minimum:0,type:"integer"},interpretation:{type:"string"},score:{format:"double",type:"number"},source:{type:"string"}},required:["score","interpretation","components_after_hub_removal","source"],type:"object"},HealthRedundancyV1:{additionalProperties:!1,properties:{dead_count:{format:"uint64",minimum:0,type:"integer"},score:{format:"double",type:"number"},source:{type:"string"},total_fns:{format:"uint64",minimum:0,type:"integer"}},required:["score","dead_count","total_fns","source"],type:"object"},HealthWeightsV1:{additionalProperties:!1,properties:{note:{type:"string"}},required:["note"],type:"object"},PrimitiveFreshnessStateV1:gG,PrimitiveIndexingStateV1:gB,PrimitiveSearchFreshnessV1:gQ},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"`dimensions` and `weights` are present exactly when the request asked for\n`details`.",properties:{dimensions:{anyOf:[{$ref:"#/$defs/HealthDimensionsV1"},{type:"null"}]},files_analyzed:{format:"uint64",minimum:0,type:"integer"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},panel:{description:"Dimension names, worst score first.",type:"string"},quality_signal:{description:"Geometric mean of the dimensions, scaled to 0-10000. A breakdown of\n`panel`, not a number to maximize.",format:"uint32",minimum:0,type:"integer"},weights:{anyOf:[{$ref:"#/$defs/HealthWeightsV1"},{type:"null"}]}},required:["quality_signal","files_analyzed"],title:"HealthResultV1",type:"object"},{$defs:{PageRequest:gU,ResultProjection:_w,RetrievalOrder:_I,RetrievalRequestMeta:_x,TemporalModeV1:vA,UtcMicros:vK},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{before_cursor:{type:["string","null"]},meta:{$ref:"#/$defs/RetrievalRequestMeta"},path_prefix:{type:["string","null"]}},required:["meta"],title:"HealthDeltaRequest",type:"object"},{$defs:{HealthDeltaCoverageV1:{additionalProperties:!1,properties:{completeness:{type:"string"},denominator:{format:"uint64",minimum:0,type:["integer","null"]},eligible:{format:"uint64",minimum:0,type:["integer","null"]},visited:{format:"uint64",minimum:0,type:["integer","null"]}},required:["completeness"],type:"object"},HealthDeltaCurrentnessV1:{additionalProperties:!1,properties:{observed_at:{$ref:"#/$defs/UtcMicros"},state:{type:"string"}},required:["state","observed_at"],type:"object"},HealthDeltaPointV1:{additionalProperties:!1,properties:{dimensions:{additionalProperties:{$ref:"#/$defs/HealthDimensionPointV1"},type:"object"},files_analyzed:{format:"uint64",minimum:0,type:"integer"},function_denominator:{format:"uint64",minimum:0,type:"integer"},observed_at:{$ref:"#/$defs/UtcMicros"},quality_signal:{format:"uint32",minimum:0,type:"integer"},watermark:{$ref:"#/$defs/ManifestDigest"}},required:["watermark","observed_at","quality_signal","files_analyzed","function_denominator","dimensions"],type:"object"},HealthDeltaScopeV1:{additionalProperties:!1,properties:{path_prefix:{type:["string","null"]},project_id:{type:["string","null"]},scope_digest:{$ref:"#/$defs/ManifestDigest"}},required:["scope_digest"],type:"object"},HealthDimensionDeltaV1:{additionalProperties:!1,properties:{after_denominator:{format:"uint64",minimum:0,type:["integer","null"]},after_ppm:{format:"uint64",minimum:0,type:"integer"},before_denominator:{format:"uint64",minimum:0,type:["integer","null"]},before_ppm:{format:"uint64",minimum:0,type:"integer"},delta_ppm:{format:"int64",type:"integer"},status:{type:"string"}},required:["before_ppm","after_ppm","delta_ppm","status"],type:"object"},HealthDimensionPointV1:{additionalProperties:!1,properties:{denominator:{format:"uint64",minimum:0,type:["integer","null"]},score_ppm:{format:"uint64",minimum:0,type:"integer"}},required:["score_ppm"],type:"object"},ManifestDigest:gl,UtcMicros:vK},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{after:{$ref:"#/$defs/HealthDeltaPointV1"},after_cursor:{type:"string"},before:{$ref:"#/$defs/HealthDeltaPointV1"},before_cursor:{type:"string"},coverage:{$ref:"#/$defs/HealthDeltaCoverageV1"},currentness:{$ref:"#/$defs/HealthDeltaCurrentnessV1"},delta:{format:"int64",type:"integer"},dimensions:{additionalProperties:{$ref:"#/$defs/HealthDimensionDeltaV1"},type:"object"},pass:{type:"boolean"},schema_version:{format:"uint32",minimum:0,type:"integer"},scope:{$ref:"#/$defs/HealthDeltaScopeV1"}},required:["schema_version","scope","before","after","before_cursor","after_cursor","pass","delta","dimensions","coverage","currentness"],title:"HealthDeltaResult",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"The health read takes no parameters: it reports one serving status, with no\npage, projection, or temporal selection to make. The page and deadline\ncontrols every surface supplies travel in the dispatch envelope, not here.",title:"HealthReadRequest",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{status:{type:"string"}},required:["status"],title:"HealthReadResult",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{include_pending_payloads:{default:!1,description:"Include staged Hermes skill-write payloads (default: false).",type:"boolean"},include_skill_bodies:{default:!1,description:"Include bounded SKILL.md contents (default: false).",type:"boolean"}},title:"HermesSkillBridgeSurfaceRequestV1",type:"object"},{$defs:{AutomationReadStatusV1:m8,HermesPendingSkillWrite:{properties:{action:{type:["string","null"]},created_at:!0,id:{type:"string"},name:{type:["string","null"]},origin:{type:["string","null"]},payload:!0,source_path:{type:"string"},summary:{type:["string","null"]}},required:["id","source_path"],type:"object"},HermesSkillBridgeContracts:{properties:{discovery_policy:{type:"string"},lifecycle_owner:{type:"string"},mutation_policy:{type:"string"}},required:["lifecycle_owner","mutation_policy","discovery_policy"],type:"object"},HermesSkillBridgeSnapshot:{properties:{agent_home:{type:"string"},archive_count:{format:"uint",minimum:0,type:"integer"},contracts:{$ref:"#/$defs/HermesSkillBridgeContracts"},pending_skill_corrupt_count:{format:"uint",minimum:0,type:"integer"},pending_skill_count:{format:"uint",minimum:0,type:"integer"},pending_skills:{items:{$ref:"#/$defs/HermesPendingSkillWrite"},type:"array"},skill_count:{format:"uint",minimum:0,type:"integer"},skills:{items:{$ref:"#/$defs/HermesSkillSummary"},type:"array"},skills_dir:{type:"string"},usage_record_count:{format:"uint",minimum:0,type:"integer"},usage_records:{additionalProperties:!0,description:"Hermes-owned usage telemetry keyed by skill name, as Hermes wrote it.",type:"object"}},required:["agent_home","skills_dir","skill_count","pending_skill_count","pending_skill_corrupt_count","usage_record_count","archive_count","skills","pending_skills","usage_records","contracts"],type:"object"},HermesSkillSummary:{properties:{body_markdown:{type:["string","null"]},category:{type:["string","null"]},description:{type:["string","null"]},name:{type:"string"},path:{type:"string"},pending_write_ids:{items:{type:"string"},type:"array"},usage:!0},required:["name","path","pending_write_ids"],type:"object"}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{bridge:{$ref:"#/$defs/HermesSkillBridgeSnapshot"},status:{$ref:"#/$defs/AutomationReadStatusV1"}},required:["status","bridge"],title:"HermesSkillBridgeResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",oneOf:[{additionalProperties:!1,description:"Reset the project's local token counter.",properties:{action:{const:"reset_counter",type:"string"}},required:["action"],type:"object"},{additionalProperties:!1,description:"Admit one Hook V2 envelope for the bound project.",properties:{action:{const:"hook_v2_admit",type:"string"},envelope:!0,native_lifecycle:!0,native_session_id:{description:"The host's native session id; it binds only when it hashes to the\nenvelope's protected session.",type:["string","null"]}},required:["action","envelope"],type:"object"},{additionalProperties:!1,description:"Commit a Context Scout delivery receipt for guidance the last\nadmission handed out.",properties:{action:{const:"hook_v2_delivery_receipt",type:"string"},receipt:!0},required:["action","receipt"],type:"object"},{additionalProperties:!1,description:"Acknowledge delivery of an advisory feedback notice.",properties:{action:{const:"hook_v2_feedback_notice_delivery",type:"string"},envelope:!0,feedback_notice:!0},required:["action","envelope","feedback_notice"],type:"object"},{additionalProperties:!1,description:"Land a host transcript in the owning session store.",properties:{action:{const:"ingest_transcript",type:"string"},event_json:{description:"The host's raw hook event, for providers that locate the transcript\nfrom it.",type:["string","null"]},max_new_bytes:{description:"Byte budget for this pass across every scanned source.",format:"uint64",minimum:0,type:["integer","null"]},messages:{description:"One turn the host inlined instead of a source to scan.",items:!0,type:["array","null"]},provider:{type:"string"},session_id:{type:["string","null"]},user_scope:{description:"Land the transcript in the profile's user store instead of the\nproject's.",type:"boolean"}},required:["action","provider","user_scope"],type:"object"},{additionalProperties:!1,description:"Codex `PostCompact` pressure evidence.",properties:{action:{const:"codex_compact",type:"string"},event_json:{type:"string"}},required:["action","event_json"],type:"object"},{additionalProperties:!1,description:"Claude `PostCompact` pressure evidence; `user_scope` routes it to the\nprofile.",properties:{action:{const:"claude_compact",type:"string"},event_json:{type:"string"},user_scope:{type:"boolean"}},required:["action","event_json","user_scope"],type:"object"},{additionalProperties:!1,description:"Cursor `preCompact` pressure evidence.",properties:{action:{const:"cursor_compact",type:"string"},event_json:{type:"string"}},required:["action","event_json"],type:"object"},{additionalProperties:!1,description:"Review a finished user session.",properties:{action:{const:"user_review",type:"string"},provider:{type:"string"},session_id:{type:["string","null"]}},required:["action","provider"],type:"object"},{additionalProperties:!1,description:"Record a Hermes terminal receipt without a project route.",properties:{action:{const:"hermes_receipt",type:"string"},event:!0},required:["action","event"],type:"object"},{additionalProperties:!1,description:"Admit a native event without a project route into the profile's\nHook V2 ledger.",properties:{action:{const:"hook_v2_profile_admit",type:"string"},admission:!0},required:["action","admission"],type:"object"}],title:"HookRuntimeSurfaceRequestV1"},{$defs:{ContextScoutAddressV1:f5,ContextScoutStoreStatusV1:{enum:["stored","duplicate","superseded","unavailable"],type:"string"},HermesReceiptStatusV1:{oneOf:[{const:"recorded",description:"A terminal receipt was recorded.",type:"string"},{const:"ingested",description:"The turn was marked ingested and no receipt awaits review.",type:"string"},{const:"awaiting_transcript",description:"A receipt awaits a transcript that has not landed yet.",type:"string"}]},HookIngestAdmissionV1:{additionalProperties:!1,description:"The admission authority's verdict on one transcript ingest.",properties:{reason_code:{type:["string","null"]},retryable:{type:"boolean"},status:{description:"The session host-admission status, in its wire spelling.",type:"string"}},required:["status","retryable"],type:"object"},HookOrchestrationAdmissionV1:{description:"Outcome of admitting one hook envelope into the registered orchestrator.",enum:["enqueued","backpressured","unsupported_trigger","unavailable"],type:"string"},HookRuntimeDispositionV1:{description:"How the hook transport should treat a Hook V2 envelope.",oneOf:[{enum:["accepted"],type:"string"},{const:"catchup_required",description:"The published binding no longer authorizes the envelope; the host\nmust catch up before sending again.",type:"string"}]},HookV2RejectionReasonV1:{oneOf:[{const:"admission_identity_conflict",description:"The same event identity previously carried different bytes.",type:"string"}]}},$schema:"https://json-schema.org/draft/2020-12/schema",oneOf:[{additionalProperties:!1,properties:{action:{const:"reset_counter",type:"string"},reset:{type:"boolean"}},required:["action","reset"],type:"object"},{oneOf:[{properties:{context_scout_address:{anyOf:[{$ref:"#/$defs/ContextScoutAddressV1"},{type:"null"}]},disposition:{$ref:"#/$defs/HookRuntimeDispositionV1"},feedback_notice:{description:"The advisory `AdvisoryHookLookupNoticeV1` waiting for this\nworktree."},github_stack_signal_available:{type:"boolean"},orchestration:{$ref:"#/$defs/HookOrchestrationAdmissionV1"},ready_guidance:{description:"The hook's `HookReadyGuidanceV1`, when admission claimed one."},status:{const:"accepted",type:"string"}},required:["status","disposition","orchestration","github_stack_signal_available"],type:"object"},{description:"This exact envelope was already admitted; a retry may still receive\nguidance retained before a lost host response.",properties:{context_scout_address:{anyOf:[{$ref:"#/$defs/ContextScoutAddressV1"},{type:"null"}]},disposition:{$ref:"#/$defs/HookRuntimeDispositionV1"},ready_guidance:!0,status:{const:"exact_duplicate",type:"string"}},required:["status","disposition"],type:"object"},{properties:{disposition:{$ref:"#/$defs/HookRuntimeDispositionV1"},reason:{anyOf:[{$ref:"#/$defs/HookV2RejectionReasonV1"},{type:"null"}]},status:{const:"rejected",type:"string"}},required:["status","disposition"],type:"object"},{description:"Idempotency could not be recorded, so nothing was admitted.",properties:{status:{const:"backpressured",type:"string"}},required:["status"],type:"object"},{properties:{status:{const:"unavailable",type:"string"}},required:["status"],type:"object"}],properties:{action:{const:"hook_v2_admit",type:"string"}},required:["action"],type:"object"},{additionalProperties:!1,properties:{action:{const:"hook_v2_delivery_receipt",type:"string"},status:{$ref:"#/$defs/ContextScoutStoreStatusV1"}},required:["action","status"],type:"object"},{oneOf:[{properties:{status:{const:"stored",type:"string"}},required:["status"],type:"object"},{properties:{status:{const:"unavailable",type:"string"}},required:["status"],type:"object"},{properties:{disposition:{$ref:"#/$defs/HookRuntimeDispositionV1"},status:{const:"rejected",type:"string"}},required:["status","disposition"],type:"object"}],properties:{action:{const:"hook_v2_feedback_notice_delivery",type:"string"}},required:["action"],type:"object"},{additionalProperties:!1,properties:{action:{const:"ingest_transcript",type:"string"},admission:{$ref:"#/$defs/HookIngestAdmissionV1"},bytes_consumed:{format:"uint64",minimum:0,type:["integer","null"]},completed:{description:"False when the byte budget left work for a later pass.",type:"boolean"},cursor_advances:{format:"uint64",minimum:0,type:["integer","null"]},cursor_duplicates:{format:"uint64",minimum:0,type:["integer","null"]},deferred_by_byte_cap:{type:["boolean","null"]},deferred_sources:{format:"uint64",minimum:0,type:["integer","null"]},hint_outcomes:{description:"How emitted hook hints settled against the new project activity."},messages_upserted:{format:"uint64",minimum:0,type:"integer"},observation_duplicates:{format:"uint64",minimum:0,type:["integer","null"]},observations_committed:{format:"uint64",minimum:0,type:["integer","null"]},projection_duplicates:{format:"uint64",minimum:0,type:["integer","null"]},projections_completed:{format:"uint64",minimum:0,type:["integer","null"]},projections_skipped:{format:"uint64",minimum:0,type:["integer","null"]},provider:{type:"string"},records_quarantined:{format:"uint64",minimum:0,type:["integer","null"]},records_rejected:{format:"uint64",minimum:0,type:["integer","null"]},source_bytes_scanned:{format:"uint64",minimum:0,type:["integer","null"]},status:{type:"string"},user_scope:{type:"boolean"}},required:["action","provider","user_scope","completed","status","admission","messages_upserted"],type:"object"},{anyOf:[{description:"The LCM authority settled the compaction.",properties:{authority_outcome:!0,committed_state:!0,messages_upserted:{format:"uint64",minimum:0,type:"integer"},reason:{type:"string"},relation_projection_status:!0,retry_status:{type:["string","null"]},status:{type:"string"},summary_node_ids:{items:{type:"string"},type:"array"},summary_nodes_created:{format:"uint64",minimum:0,type:"integer"}},required:["status","reason","summary_nodes_created","summary_node_ids","relation_projection_status","authority_outcome","committed_state","messages_upserted"],type:"object"},{description:"The LCM authority answered without a compaction.",properties:{authority_outcome:!0,committed_state:!0,messages_upserted:{format:"uint64",minimum:0,type:"integer"},reason:{type:"string"},status:{type:"string"},summary_node_ids:{items:{type:"string"},type:"array"},summary_nodes_created:{format:"uint64",minimum:0,type:"integer"}},required:["status","reason","authority_outcome","committed_state","summary_nodes_created","summary_node_ids","messages_upserted"],type:"object"},{description:"No compaction ran: the authority is absent, the host supplied nothing\nto compact, or its summaries have no provenance.",properties:{reason:{type:"string"},relation_projection_status:!0,status:{type:"string"},summary_node_ids:{items:{type:"string"},type:"array"},summary_nodes_created:{format:"uint64",minimum:0,type:"integer"}},required:["status","reason","summary_nodes_created","summary_node_ids"],type:"object"},{description:"The host event named no session to compact.",properties:{messages_upserted:{format:"uint64",minimum:0,type:"integer"},reason:{type:"string"},status:{type:"string"}},required:["status","reason","messages_upserted"],type:"object"}],description:"A compaction hook's outcome. Variants are distinguished by the fields\nthey carry.",properties:{action:{const:"codex_compact",type:"string"}},required:["action"],type:"object"},{anyOf:[{description:"The LCM authority settled the compaction.",properties:{authority_outcome:!0,committed_state:!0,messages_upserted:{format:"uint64",minimum:0,type:"integer"},reason:{type:"string"},relation_projection_status:!0,retry_status:{type:["string","null"]},status:{type:"string"},summary_node_ids:{items:{type:"string"},type:"array"},summary_nodes_created:{format:"uint64",minimum:0,type:"integer"}},required:["status","reason","summary_nodes_created","summary_node_ids","relation_projection_status","authority_outcome","committed_state","messages_upserted"],type:"object"},{description:"The LCM authority answered without a compaction.",properties:{authority_outcome:!0,committed_state:!0,messages_upserted:{format:"uint64",minimum:0,type:"integer"},reason:{type:"string"},status:{type:"string"},summary_node_ids:{items:{type:"string"},type:"array"},summary_nodes_created:{format:"uint64",minimum:0,type:"integer"}},required:["status","reason","authority_outcome","committed_state","summary_nodes_created","summary_node_ids","messages_upserted"],type:"object"},{description:"No compaction ran: the authority is absent, the host supplied nothing\nto compact, or its summaries have no provenance.",properties:{reason:{type:"string"},relation_projection_status:!0,status:{type:"string"},summary_node_ids:{items:{type:"string"},type:"array"},summary_nodes_created:{format:"uint64",minimum:0,type:"integer"}},required:["status","reason","summary_nodes_created","summary_node_ids"],type:"object"},{description:"The host event named no session to compact.",properties:{messages_upserted:{format:"uint64",minimum:0,type:"integer"},reason:{type:"string"},status:{type:"string"}},required:["status","reason","messages_upserted"],type:"object"}],description:"A compaction hook's outcome. Variants are distinguished by the fields\nthey carry.",properties:{action:{const:"claude_compact",type:"string"}},required:["action"],type:"object"},{anyOf:[{description:"The LCM authority settled the compaction.",properties:{authority_outcome:!0,committed_state:!0,messages_upserted:{format:"uint64",minimum:0,type:"integer"},reason:{type:"string"},relation_projection_status:!0,retry_status:{type:["string","null"]},status:{type:"string"},summary_node_ids:{items:{type:"string"},type:"array"},summary_nodes_created:{format:"uint64",minimum:0,type:"integer"}},required:["status","reason","summary_nodes_created","summary_node_ids","relation_projection_status","authority_outcome","committed_state","messages_upserted"],type:"object"},{description:"The LCM authority answered without a compaction.",properties:{authority_outcome:!0,committed_state:!0,messages_upserted:{format:"uint64",minimum:0,type:"integer"},reason:{type:"string"},status:{type:"string"},summary_node_ids:{items:{type:"string"},type:"array"},summary_nodes_created:{format:"uint64",minimum:0,type:"integer"}},required:["status","reason","authority_outcome","committed_state","summary_nodes_created","summary_node_ids","messages_upserted"],type:"object"},{description:"No compaction ran: the authority is absent, the host supplied nothing\nto compact, or its summaries have no provenance.",properties:{reason:{type:"string"},relation_projection_status:!0,status:{type:"string"},summary_node_ids:{items:{type:"string"},type:"array"},summary_nodes_created:{format:"uint64",minimum:0,type:"integer"}},required:["status","reason","summary_nodes_created","summary_node_ids"],type:"object"},{description:"The host event named no session to compact.",properties:{messages_upserted:{format:"uint64",minimum:0,type:"integer"},reason:{type:"string"},status:{type:"string"}},required:["status","reason","messages_upserted"],type:"object"}],description:"A compaction hook's outcome. Variants are distinguished by the fields\nthey carry.",properties:{action:{const:"cursor_compact",type:"string"}},required:["action"],type:"object"},{additionalProperties:!1,properties:{action:{const:"hermes_receipt",type:"string"},status:{$ref:"#/$defs/HermesReceiptStatusV1"}},required:["action","status"],type:"object"},{oneOf:[{properties:{disposition:{$ref:"#/$defs/HookRuntimeDispositionV1"},status:{const:"accepted",type:"string"}},required:["status","disposition"],type:"object"},{properties:{disposition:{$ref:"#/$defs/HookRuntimeDispositionV1"},status:{const:"exact_duplicate",type:"string"}},required:["status","disposition"],type:"object"},{properties:{disposition:{$ref:"#/$defs/HookRuntimeDispositionV1"},status:{const:"rejected",type:"string"}},required:["status","disposition"],type:"object"},{properties:{status:{const:"unavailable",type:"string"}},required:["status"],type:"object"}],properties:{action:{const:"hook_v2_profile_admit",type:"string"}},required:["action"],type:"object"}],title:"HookRuntimeResultV1"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{limit:{description:"Maximum number of hotspots to return (default: 10, at most 100).",format:"uint32",minimum:0,type:["integer","null"]}},title:"HotspotsSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fE,CodeIndexConvergenceParkedV1:fA,CodeIndexStalenessStateV1:fz,HotspotV1:{additionalProperties:!1,properties:{churn:{description:"Commits touching `file` in the last 90 days. Absent when git history\ncould not be read; `0` means the file had no commits in that window.",format:"uint64",minimum:0,type:["integer","null"]},file:{type:"string"},id:{type:"string"},incoming:{format:"uint64",minimum:0,type:"integer"},kind:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},name:{type:"string"},outgoing:{format:"uint64",minimum:0,type:"integer"},total:{format:"uint64",minimum:0,type:"integer"}},required:["id","name","kind","file","line","incoming","outgoing","total"],type:"object"},PrimitiveFreshnessStateV1:gG,PrimitiveIndexingStateV1:gB,PrimitiveSearchFreshnessV1:gQ},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},hotspot_count:{format:"uint64",minimum:0,type:"integer"},hotspots:{items:{$ref:"#/$defs/HotspotV1"},type:"array"},unavailable_fields:{description:"Names a measurement this result could not make. `churn` means the\nranking is connectivity alone.",items:{type:"string"},type:"array"}},required:["hotspot_count","hotspots"],title:"HotspotsResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{max_depth:{format:"uint32",minimum:0,type:["integer","null"]},node_id:{type:"string"}},required:["node_id"],title:"NodeDepthSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fE,CodeIndexConvergenceParkedV1:fA,CodeIndexStalenessStateV1:fz,ImpactNodeV1:{additionalProperties:!1,properties:{depth:{format:"uint32",minimum:0,type:"integer"},file:{type:"string"},id:{type:"string"},kind:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},name:{type:"string"}},required:["id","name","kind","file","line","depth"],type:"object"},ImpactRadiusV1:{additionalProperties:!1,properties:{complete:{type:"boolean"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},node_count:{format:"uint",minimum:0,type:"integer"},nodes:{items:{$ref:"#/$defs/ImpactNodeV1"},type:"array"},unavailable_fields:{items:{type:"string"},type:"array"}},required:["node_count","complete","unavailable_fields","nodes"],type:"object"},PrimitiveFreshnessStateV1:gG,PrimitiveIndexingStateV1:gB,PrimitiveNotFoundV1:gJ,PrimitiveSearchFreshnessV1:gQ,PrimitiveSymbolLocationV1:gY},$schema:"https://json-schema.org/draft/2020-12/schema",anyOf:[{$ref:"#/$defs/ImpactRadiusV1"},{$ref:"#/$defs/PrimitiveNotFoundV1"}],title:"ImpactResultV1"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{limit:{description:"Maximum number of results to return (default: 10, at most 100).",format:"uint32",minimum:0,type:["integer","null"]},path:{description:"Filter to files under this directory path (e.g. 'src/main/java').",type:["string","null"]}},title:"InheritanceDepthSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fE,CodeIndexConvergenceParkedV1:fA,CodeIndexStalenessStateV1:fz,InheritanceDepthEntryV1:{additionalProperties:!1,properties:{depth:{format:"uint64",minimum:0,type:"integer"},file:{type:"string"},id:{type:"string"},kind:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},name:{type:"string"}},required:["id","name","kind","file","line","depth"],type:"object"},PrimitiveFreshnessStateV1:gG,PrimitiveIndexingStateV1:gB,PrimitiveSearchFreshnessV1:gQ},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},ranking:{items:{$ref:"#/$defs/InheritanceDepthEntryV1"},type:"array"},result_count:{format:"uint64",minimum:0,type:"integer"}},required:["result_count","ranking"],title:"InheritanceDepthResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Exact public input accepted by `tracedecay_insert_at`.",properties:{anchor:{type:"string"},before:{default:!1,type:"boolean"},content:{type:"string"},dry_run:{default:!1,type:"boolean"},expected_state:{description:"Exact `preview_digest`/`expected_state` returned by the dry run. Apply\nre-resolves the typed plan and rejects any candidate-state drift.",type:["string","null"]},idempotency_key:{type:["string","null"]},path:{type:"string"},verify:{default:!1,type:"boolean"}},required:["path","anchor","content"],title:"InsertAtSurfaceRequestV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Exact public input accepted by `tracedecay_insert_at_symbol`.",properties:{content:{type:"string"},dry_run:{default:!1,type:"boolean"},expected_state:{description:"Exact `preview_digest`/`expected_state` returned by the dry run. Apply\nre-resolves the typed plan and rejects any candidate-state drift.",type:["string","null"]},idempotency_key:{type:["string","null"]},position:{default:"after",type:"string"},symbol:{type:"string"},verify:{default:!1,type:"boolean"}},required:["symbol","content"],title:"InsertAtSymbolSurfaceRequestV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{limit:{description:"Maximum number of results to return (default: 10, at most 100).",format:"uint32",minimum:0,type:["integer","null"]},node_kind:{description:"Filter by node kind (e.g. 'class', 'method', 'function', 'interface',\n'enum', 'struct').",type:["string","null"]},path:{description:"Filter to files under this directory path (e.g. 'src/main/java').",type:["string","null"]}},title:"LargestSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fE,CodeIndexConvergenceParkedV1:fA,CodeIndexStalenessStateV1:fz,LargestEntryV1:{additionalProperties:!1,properties:{end_line:{format:"uint32",minimum:0,type:"integer"},file:{type:"string"},id:{type:"string"},kind:{type:"string"},lines:{format:"uint32",minimum:0,type:"integer"},name:{type:"string"},start_line:{format:"uint32",minimum:0,type:"integer"}},required:["id","name","kind","file","start_line","end_line","lines"],type:"object"},PrimitiveFreshnessStateV1:gG,PrimitiveIndexingStateV1:gB,PrimitiveSearchFreshnessV1:gQ},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},node_kind_filter:{type:["string","null"]},ranking:{items:{$ref:"#/$defs/LargestEntryV1"},type:"array"},result_count:{format:"uint64",minimum:0,type:"integer"}},required:["result_count","ranking"],title:"LargestResultV1",type:"object"},{$defs:{LcmDescribeTargetV1:{oneOf:[{properties:{kind:{const:"session",type:"string"}},required:["kind"],type:"object"},{properties:{kind:{const:"summary_node",type:"string"},node_id:{type:"string"}},required:["kind","node_id"],type:"object"},{properties:{kind:{const:"external_payload",type:"string"},payload_ref:{type:"string"}},required:["kind","payload_ref"],type:"object"}]}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{provider:{type:"string"},session_id:{type:"string"},target:{anyOf:[{$ref:"#/$defs/LcmDescribeTargetV1"},{type:"null"}]}},required:["provider","session_id"],title:"LcmDescribeRequestV1",type:"object"},{$defs:{ClosedUtcIntervalV1:fx,CompactLineageEdgeV1:{additionalProperties:!1,properties:{authority:{type:"string"},authorized:{type:"boolean"},kind:{type:"string"},knowledge_at:{format:"int64",type:"integer"},object_anchor_id:{type:"string"},subject_anchor_id:{type:"string"},supporting_anchor_ids:{items:{type:"string"},type:"array"}},required:["kind","subject_anchor_id","object_anchor_id","knowledge_at","authority","authorized","supporting_anchor_ids"],type:"object"},HydrationStateResultV1:yK,LcmContentRangeV1:yQ,LcmDescribeExternalPayloadV1:{additionalProperties:!1,properties:{byte_count:{format:"uint64",minimum:0,type:"integer"},char_count:{format:"uint64",minimum:0,type:"integer"},content_hash:{type:"string"},content_preview:{type:"string"},created_at:{format:"int64",type:"integer"},kind:{type:"string"},message_id:{type:"string"},metadata_json:{type:["string","null"]},payload_ref:{type:"string"},provider:{type:"string"},session_id:{type:"string"}},required:["payload_ref","provider","session_id","message_id","kind","content_hash","byte_count","char_count","created_at","content_preview"],type:"object"},LcmDescribeSourceOverviewV1:{additionalProperties:!1,properties:{expand_hint:{type:["string","null"]},node_id:{type:["string","null"]},role:{type:["string","null"]},source_kind:{type:"string"},source_ref:{$ref:"#/$defs/LcmSourceRefV1"},source_token_count:{format:"int64",type:["integer","null"]},storage_kind:{anyOf:[{$ref:"#/$defs/LcmStorageKindV1"},{type:"null"}]},store_id:{format:"int64",type:["integer","null"]},summary_token_count:{format:"int64",type:["integer","null"]}},required:["source_kind","source_ref"],type:"object"},LcmDescribeSummaryNodeV1:{additionalProperties:!1,properties:{children:{items:{$ref:"#/$defs/LcmDescribeSourceOverviewV1"},type:"array"},conversation_id:{type:"string"},created_at:{format:"int64",type:"integer"},depth:{format:"int64",type:"integer"},expand_hint:{type:["string","null"]},metadata_json:{type:["string","null"]},node_id:{type:"string"},source_count:{format:"uint",minimum:0,type:"integer"},source_time_end:{format:"int64",type:["integer","null"]},source_time_start:{format:"int64",type:["integer","null"]},source_token_count:{format:"int64",type:"integer"},summary_token_count:{format:"int64",type:"integer"}},required:["node_id","conversation_id","depth","summary_token_count","source_token_count","created_at","source_count","children"],type:"object"},LcmDescriptionV1:{additionalProperties:!1,properties:{external_payload:{anyOf:[{$ref:"#/$defs/LcmDescribeExternalPayloadV1"},{type:"null"}]},external_payload_count:{format:"int64",type:"integer"},first_store_id:{format:"int64",type:["integer","null"]},last_store_id:{format:"int64",type:["integer","null"]},provider:{type:"string"},raw_message_count:{format:"int64",type:"integer"},raw_messages:{items:{$ref:"#/$defs/LcmRawMessageOverviewV1"},type:"array"},session_id:{type:"string"},session_token_estimate:{format:"int64",type:["integer","null"]},summary_node:{anyOf:[{$ref:"#/$defs/LcmDescribeSummaryNodeV1"},{type:"null"}]},summary_node_count:{format:"int64",type:"integer"},summary_nodes:{items:{$ref:"#/$defs/LcmSummaryNodeOverviewV1"},type:"array"},target:{type:"string"}},required:["target","provider","session_id","raw_message_count","summary_node_count","external_payload_count","raw_messages","summary_nodes"],type:"object"},LcmRawMessageOverviewV1:{additionalProperties:!1,properties:{content_preview:{type:"string"},content_range:{$ref:"#/$defs/LcmContentRangeV1"},message_id:{type:"string"},payload_ref:{type:["string","null"]},role:{type:"string"},storage_kind:{$ref:"#/$defs/LcmStorageKindV1"},store_id:{format:"int64",type:"integer"}},required:["message_id","store_id","role","storage_kind","content_preview","content_range"],type:"object"},LcmRetrievalOutcomeV1:y4,LcmSourceRefV1:y6,LcmStorageKindV1:y3,LcmSummaryNodeOverviewV1:{additionalProperties:!1,properties:{conversation_id:{type:"string"},created_at:{format:"int64",type:"integer"},depth:{format:"int64",type:"integer"},node_id:{type:"string"},source_count:{format:"uint",minimum:0,type:"integer"},summary_preview:{type:"string"}},required:["node_id","conversation_id","depth","summary_preview","source_count","created_at"],type:"object"},LcmTemporalFieldsV1:y7,RetainedErrorV1:_R,RetainedOutcomeStatusV1:_P,RetrievalWorkerStatusV1:_j,SessionCoverageIntervalV1:_4,SessionCoverageReasonV1:_6,SessionCoverageRequestV1:_3,SessionCoverageStateV1:_9,SessionSourceCoverageV1:vo,TemporalCoverageV1:vT,TemporalExplanationV1:vO,TemporalFreshnessV1:vE,TemporalModeV1:vA,TemporalOmissionV1:vM,TemporalWatermarksV1:vW,UtcMicros:vK,ValidCoverageIntervalV1:vJ},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{capped_sessions:{additionalProperties:{format:"uint",minimum:0,type:"integer"},type:["object","null"]},description:{anyOf:[{$ref:"#/$defs/LcmDescriptionV1"},{type:"null"}]},error:{anyOf:[{$ref:"#/$defs/RetainedErrorV1"},{type:"null"}]},grain:{type:["string","null"]},lineage:{items:{$ref:"#/$defs/CompactLineageEdgeV1"},type:["array","null"]},omitted:{format:"uint64",minimum:0,type:["integer","null"]},provider:{type:["string","null"]},retrieval:{anyOf:[{$ref:"#/$defs/LcmRetrievalOutcomeV1"},{type:"null"}]},service_status:{anyOf:[{$ref:"#/$defs/RetrievalWorkerStatusV1"},{type:"null"}]},session_id:{type:["string","null"]},state:{anyOf:[{$ref:"#/$defs/HydrationStateResultV1"},{type:"null"}]},status:{$ref:"#/$defs/RetainedOutcomeStatusV1"},temporal:{anyOf:[{$ref:"#/$defs/LcmTemporalFieldsV1"},{type:"null"}]}},required:["status"],title:"LcmDescribeResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,title:"LcmDoctorRequestV1",type:"object"},{$defs:{LcmAuthorityOutcomeV1:yZ,LcmConvergenceStateV1:yX,LcmConvergenceV1:yY,LcmDoctorFindingKindV1:{enum:["trigger_audit_drift","occurrence_fts_corruption","summary_fts_corruption","missing_anchor","missing_receipt","invalid_generation","multi_active_generation","cursor_chain_absent","cursor_key_absent","ownership_drift","stuck_refresh","stuck_binding","stuck_progress","stuck_receipt","migration_gap","compatibility_drift","relation_graph_unavailable","relation_graph_corruption","relation_graph_cycle","stale_summary_closure"],type:"string"},LcmDoctorFindingV1:{additionalProperties:!1,properties:{count:{format:"uint64",minimum:0,type:"integer"},kind:{$ref:"#/$defs/LcmDoctorFindingKindV1"}},required:["kind","count"],type:"object"},LcmDoctorHealthStatusV1:{enum:["complete","partial","unavailable","locked"],type:"string"},LcmDoctorHealthV1:{additionalProperties:!1,properties:{findings:{items:{$ref:"#/$defs/LcmDoctorFindingV1"},type:"array"},reason:{type:["string","null"]},status:{$ref:"#/$defs/LcmDoctorHealthStatusV1"}},required:["status","findings"],type:"object"},LcmDoctorProjectionStateV1:y1,LcmDoctorProjectionV1:y0,RetainedOutcomeStatusV1:_P,RetrievalWorkerStatusV1:_j},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{authority_outcome:{$ref:"#/$defs/LcmAuthorityOutcomeV1"},health:{anyOf:[{$ref:"#/$defs/LcmDoctorHealthV1"},{type:"null"}]},projection:{anyOf:[{$ref:"#/$defs/LcmDoctorProjectionV1"},{type:"null"}],description:"Absent when the diagnosed store has no refresh worker (profile mounts)."},reason:{type:["string","null"]},status:{$ref:"#/$defs/RetainedOutcomeStatusV1"}},required:["status","authority_outcome"],title:"LcmDoctorResultV1",type:"object"},{$defs:{LcmExpandTargetV1:{oneOf:[{properties:{kind:{const:"canonical_occurrence",type:"string"},message_id:{type:"string"}},required:["kind","message_id"],type:"object"},{properties:{kind:{const:"raw_message",type:"string"},store_id:{format:"uint64",minimum:0,type:"integer"}},required:["kind","store_id"],type:"object"},{properties:{kind:{const:"summary_node",type:"string"},node_id:{type:"string"}},required:["kind","node_id"],type:"object"},{properties:{kind:{const:"external_payload",type:"string"},payload_ref:{type:"string"}},required:["kind","payload_ref"],type:"object"}]}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{content_limit:{format:"uint64",minimum:0,type:["integer","null"]},content_offset:{format:"uint64",minimum:0,type:["integer","null"]},cursor:{type:["string","null"]},provider:{type:"string"},session_id:{type:"string"},source_limit:{format:"uint64",minimum:0,type:["integer","null"]},target:{$ref:"#/$defs/LcmExpandTargetV1"}},required:["provider","session_id","target"],title:"LcmExpandRequestV1",type:"object"},{$defs:{ClosedUtcIntervalV1:fx,HydrationStateResultV1:yK,LcmContentRangeV1:yQ,LcmExpandedSourceV1:{additionalProperties:!1,properties:{content:{type:"string"},content_range:{anyOf:[{$ref:"#/$defs/LcmContentRangeV1"},{type:"null"}]},content_truncated:{type:"boolean"},raw_message:{anyOf:[{$ref:"#/$defs/LcmRawMessageV1"},{type:"null"}]},raw_message_metadata:{anyOf:[{$ref:"#/$defs/LcmRawMessageMetadataV1"},{type:"null"}]},source_ref:{$ref:"#/$defs/LcmSourceRefV1"},state:{$ref:"#/$defs/HydrationStateResultV1"},summary_node:{anyOf:[{$ref:"#/$defs/LcmSummaryNodeV1"},{type:"null"}]}},required:["source_ref","state","content","content_truncated"],type:"object"},LcmExpansionV1:{additionalProperties:!1,properties:{content:{type:"string"},content_range:{$ref:"#/$defs/LcmContentRangeV1"},from_current_session:{type:["boolean","null"]},kind:{type:"string"},payload_ref:{type:["string","null"]},raw_message:{anyOf:[{$ref:"#/$defs/LcmRawMessageV1"},{type:"null"}]},raw_message_metadata:{anyOf:[{$ref:"#/$defs/LcmRawMessageMetadataV1"},{type:"null"}]},source_pagination:{anyOf:[{$ref:"#/$defs/LcmSourcePaginationV1"},{type:"null"}]},summary_node:{anyOf:[{$ref:"#/$defs/LcmSummaryNodeV1"},{type:"null"}]},summary_sources:{items:{$ref:"#/$defs/LcmExpandedSourceV1"},type:"array"}},required:["kind","content","content_range","summary_sources"],type:"object"},LcmRawMessageMetadataV1:{additionalProperties:!1,properties:{content_hash:{type:"string"},message_id:{type:"string"},metadata_json:{type:["string","null"]},ordinal:{format:"int64",type:"integer"},payload_ref:{type:["string","null"]},provider:{type:"string"},role:{type:"string"},session_id:{type:"string"},storage_kind:{$ref:"#/$defs/LcmStorageKindV1"},store_id:{format:"int64",type:"integer"},timestamp:{format:"int64",type:["integer","null"]}},required:["provider","message_id","session_id","store_id","role","ordinal","content_hash","storage_kind"],type:"object"},LcmRawMessageV1:y2,LcmRetrievalOutcomeV1:y4,LcmSourcePaginationV1:{additionalProperties:!1,properties:{has_more:{type:"boolean"},remaining_sources:{format:"uint",minimum:0,type:"integer"},returned_sources:{format:"uint",minimum:0,type:"integer"},source_limit:{format:"uint",minimum:0,type:"integer"},total_sources:{format:"uint",minimum:0,type:"integer"}},required:["source_limit","returned_sources","total_sources","has_more","remaining_sources"],type:"object"},LcmSourceRefV1:y6,LcmStorageKindV1:y3,LcmSummaryNodeV1:y8,LcmTemporalFieldsV1:y7,RetainedErrorV1:_R,RetainedOutcomeStatusV1:_P,RetrievalWorkerStatusV1:_j,SessionCoverageIntervalV1:_4,SessionCoverageReasonV1:_6,SessionCoverageRequestV1:_3,SessionCoverageStateV1:_9,SessionSourceCoverageV1:vo,TemporalCoverageV1:vT,TemporalExplanationV1:vO,TemporalFreshnessV1:vE,TemporalModeV1:vA,TemporalOmissionV1:vM,TemporalWatermarksV1:vW,UtcMicros:vK,ValidCoverageIntervalV1:vJ},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{capped_sessions:{additionalProperties:{format:"uint",minimum:0,type:"integer"},type:["object","null"]},error:{anyOf:[{$ref:"#/$defs/RetainedErrorV1"},{type:"null"}]},expansion:{anyOf:[{$ref:"#/$defs/LcmExpansionV1"},{type:"null"}]},grain:{type:["string","null"]},omitted:{format:"uint64",minimum:0,type:["integer","null"]},provider:{type:["string","null"]},retrieval:{anyOf:[{$ref:"#/$defs/LcmRetrievalOutcomeV1"},{type:"null"}]},service_status:{anyOf:[{$ref:"#/$defs/RetrievalWorkerStatusV1"},{type:"null"}]},session_id:{type:["string","null"]},state:{anyOf:[{$ref:"#/$defs/HydrationStateResultV1"},{type:"null"}]},status:{$ref:"#/$defs/RetainedOutcomeStatusV1"},temporal:{anyOf:[{$ref:"#/$defs/LcmTemporalFieldsV1"},{type:"null"}]}},required:["status"],title:"LcmExpandResultV1",type:"object"},{$defs:{LcmNodeIdV1:{anyOf:[{type:"string"},{format:"uint64",minimum:0,type:"integer"}]}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{context_max_tokens:{format:"uint64",minimum:0,type:["integer","null"]},cursor:{type:["string","null"]},max_results:{format:"uint64",minimum:0,type:["integer","null"]},max_tokens:{format:"uint64",minimum:0,type:["integer","null"]},node_ids:{items:{$ref:"#/$defs/LcmNodeIdV1"},type:["array","null"]},prompt:{type:"string"},provider:{type:"string"},query:{type:["string","null"]},session_id:{type:"string"}},required:["provider","session_id","prompt"],title:"LcmExpandQueryRequestV1",type:"object"},{$defs:{ClosedUtcIntervalV1:fx,HydrationStateResultV1:yK,LcmContentRangeV1:yQ,LcmExpandQueryBudgetV1:{additionalProperties:!1,properties:{requested_max_chars:{format:"uint",minimum:0,type:"integer"},used_chars:{format:"uint",minimum:0,type:"integer"}},required:["requested_max_chars","used_chars"],type:"object"},LcmExpandQueryContextBlockV1:{additionalProperties:!1,properties:{content:{type:"string"},content_range:{$ref:"#/$defs/LcmContentRangeV1"},kind:{type:"string"},node_id:{type:["string","null"]},raw_message:{anyOf:[{$ref:"#/$defs/LcmRawMessageV1"},{type:"null"}]},source_ref:{anyOf:[{$ref:"#/$defs/LcmSourceRefV1"},{type:"null"}]},summary_node:{anyOf:[{$ref:"#/$defs/LcmSummaryNodeV1"},{type:"null"}]}},required:["kind","content","content_range"],type:"object"},LcmExpandQueryMatchV1:{additionalProperties:!1,properties:{kind:{type:"string"},node_id:{type:["string","null"]},snippet:{type:"string"},store_id:{format:"int64",type:["integer","null"]}},required:["kind","snippet"],type:"object"},LcmExpandQueryPaginationV1:{additionalProperties:!1,properties:{has_more:{type:"boolean"},kind:{type:"string"},next_content_offset:{format:"uint64",minimum:0,type:["integer","null"]},node_id:{type:["string","null"]},source_ref:{anyOf:[{$ref:"#/$defs/LcmSourceRefV1"},{type:"null"}]},state:{anyOf:[{$ref:"#/$defs/HydrationStateResultV1"},{type:"null"}]}},required:["kind","has_more"],type:"object"},LcmExpandQuerySynthesisPromptV1:{additionalProperties:!1,properties:{system:{type:"string"},user:{type:"string"},user_prompt_truncated_for_mcp:{type:["boolean","null"]}},required:["system","user"],type:"object"},LcmRawMessageV1:y2,LcmSourceRefV1:y6,LcmStorageKindV1:y3,LcmSummaryNodeV1:y8,LcmTemporalFieldsV1:y7,RetainedErrorV1:_R,RetainedOutcomeStatusV1:_P,RetrievalWorkerStatusV1:_j,SessionCoverageIntervalV1:_4,SessionCoverageReasonV1:_6,SessionCoverageRequestV1:_3,SessionCoverageStateV1:_9,SessionSourceCoverageV1:vo,TemporalCoverageV1:vT,TemporalExplanationV1:vO,TemporalModeV1:vA,TemporalOmissionV1:vM,TemporalWatermarksV1:vW,UtcMicros:vK,ValidCoverageIntervalV1:vJ},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{answer:{type:["string","null"]},capped_sessions:{additionalProperties:{format:"uint",minimum:0,type:"integer"},type:["object","null"]},context_blocks:{items:{$ref:"#/$defs/LcmExpandQueryContextBlockV1"},type:"array"},context_budget:{anyOf:[{$ref:"#/$defs/LcmExpandQueryBudgetV1"},{type:"null"}]},context_max_tokens:{format:"uint",minimum:0,type:["integer","null"]},context_pagination:{items:{$ref:"#/$defs/LcmExpandQueryPaginationV1"},type:["array","null"]},context_truncated:{type:["boolean","null"]},contract_truncated:{type:["boolean","null"]},error:{anyOf:[{$ref:"#/$defs/RetainedErrorV1"},{type:"null"}]},matches:{items:{$ref:"#/$defs/LcmExpandQueryMatchV1"},type:["array","null"]},max_tokens:{format:"uint",minimum:0,type:["integer","null"]},mcp_response_truncated:{type:["boolean","null"]},mcp_truncation_reason:{type:["string","null"]},needs_synthesis:{type:["boolean","null"]},node_ids:{items:{type:"string"},type:["array","null"]},omitted:{format:"uint64",minimum:0,type:["integer","null"]},prompt:{type:["string","null"]},prompt_truncated_for_mcp:{type:["boolean","null"]},provider:{type:["string","null"]},query:{type:["string","null"]},query_truncated_for_mcp:{type:["boolean","null"]},service_status:{anyOf:[{$ref:"#/$defs/RetrievalWorkerStatusV1"},{type:"null"}]},session_id:{type:["string","null"]},status:{$ref:"#/$defs/RetainedOutcomeStatusV1"},synthesis_prompt:{anyOf:[{$ref:"#/$defs/LcmExpandQuerySynthesisPromptV1"},{type:"null"}]},temporal:{anyOf:[{$ref:"#/$defs/LcmTemporalFieldsV1"},{type:"null"}]}},required:["status","context_blocks"],title:"LcmExpandQueryResultV1",type:"object"},{$defs:{LcmGrepSortV1:{enum:["recency","relevance","hybrid"],type:"string"},LcmRoleV1:{enum:["system","user","assistant","tool","unknown"],type:"string"},LcmSearchScopeV1:{enum:["current","session","all"],type:"string"},MessageRelationshipScopeV1:gm,MessageTypeFilterV1:gf,RetainedTimeFilterV1:_V,TemporalModeV1:vA,UtcMicros:vK},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{branch:{type:["string","null"]},commit:{type:["string","null"]},cursor:{type:["string","null"]},end_time:{anyOf:[{$ref:"#/$defs/RetainedTimeFilterV1"},{type:"null"}]},include_summaries:{type:["boolean","null"]},limit:{format:"uint64",minimum:0,type:["integer","null"]},message_type:{anyOf:[{$ref:"#/$defs/MessageTypeFilterV1"},{type:"null"}]},provider:{type:["string","null"]},query:{type:"string"},relationship_scope:{anyOf:[{$ref:"#/$defs/MessageRelationshipScopeV1"},{type:"null"}]},role:{anyOf:[{$ref:"#/$defs/LcmRoleV1"},{type:"null"}]},scope:{anyOf:[{$ref:"#/$defs/LcmSearchScopeV1"},{type:"null"}]},session_id:{type:["string","null"]},since:{anyOf:[{$ref:"#/$defs/RetainedTimeFilterV1"},{type:"null"}]},sort:{anyOf:[{$ref:"#/$defs/LcmGrepSortV1"},{type:"null"}]},source:{type:["string","null"]},start_time:{anyOf:[{$ref:"#/$defs/RetainedTimeFilterV1"},{type:"null"}]},temporal_mode:{anyOf:[{$ref:"#/$defs/TemporalModeV1"},{type:"null"}]},until:{anyOf:[{$ref:"#/$defs/RetainedTimeFilterV1"},{type:"null"}]},worktree:{type:["string","null"]}},required:["query"],title:"LcmGrepRequestV1",type:"object"},{$defs:{ClosedUtcIntervalV1:fx,HydrationStateResultV1:yK,LcmGrepHitV1:{additionalProperties:!1,properties:{kind:{type:"string"},message_id:{type:["string","null"]},node_id:{type:["string","null"]},provider:{type:"string"},role:{type:["string","null"]},score:{format:"double",type:"number"},session_id:{type:"string"},snippet:{type:"string"},store_id:{format:"int64",type:["integer","null"]}},required:["kind","provider","session_id","snippet","score"],type:"object"},LcmTemporalFieldsV1:y7,RetainedErrorV1:_R,RetainedOutcomeStatusV1:_P,RetrievalWorkerStatusV1:_j,SessionCoverageIntervalV1:_4,SessionCoverageReasonV1:_6,SessionCoverageRequestV1:_3,SessionCoverageStateV1:_9,SessionSourceCoverageV1:vo,TemporalCoverageV1:vT,TemporalExplanationV1:vO,TemporalModeV1:vA,TemporalOmissionV1:vM,TemporalWatermarksV1:vW,UtcMicros:vK,ValidCoverageIntervalV1:vJ},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{capped_sessions:{additionalProperties:{format:"uint",minimum:0,type:"integer"},type:["object","null"]},count:{format:"uint",minimum:0,type:["integer","null"]},error:{anyOf:[{$ref:"#/$defs/RetainedErrorV1"},{type:"null"}]},hits:{items:{$ref:"#/$defs/LcmGrepHitV1"},type:"array"},message_type:{type:["string","null"]},omitted:{format:"uint64",minimum:0,type:["integer","null"]},provider:{type:["string","null"]},query:{type:["string","null"]},relationship_scope:{type:["string","null"]},service_status:{anyOf:[{$ref:"#/$defs/RetrievalWorkerStatusV1"},{type:"null"}]},sort:{type:["string","null"]},status:{$ref:"#/$defs/RetainedOutcomeStatusV1"},temporal:{anyOf:[{$ref:"#/$defs/LcmTemporalFieldsV1"},{type:"null"}]}},required:["status","hits"],title:"LcmGrepResultV1",type:"object"},{$defs:{TemporalModeV1:vA,UtcMicros:vK},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{content_limit:{format:"uint64",minimum:0,type:["integer","null"]},content_offset:{format:"uint64",minimum:0,type:["integer","null"]},cursor:{type:["string","null"]},end_time:{format:"uint64",minimum:0,type:["integer","null"]},limit:{format:"uint64",minimum:0,type:["integer","null"]},provider:{type:["string","null"]},role:{type:["string","null"]},roles:{items:{type:"string"},type:["array","null"]},session_id:{type:"string"},start_time:{format:"uint64",minimum:0,type:["integer","null"]},temporal_mode:{anyOf:[{$ref:"#/$defs/TemporalModeV1"},{type:"null"}]}},required:["session_id"],title:"LcmLoadSessionRequestV1",type:"object"},{$defs:{ClosedUtcIntervalV1:fx,HydrationStateResultV1:yK,LcmContentRangeV1:yQ,LcmMessageV1:{additionalProperties:!1,properties:{content:{type:"string"},content_hash:{type:["string","null"]},content_range:{$ref:"#/$defs/LcmContentRangeV1"},message_id:{type:"string"},metadata_json:{type:["string","null"]},ordinal:{format:"int64",type:"integer"},payload_ref:{type:["string","null"]},provider:{type:"string"},role:{type:"string"},session_id:{type:"string"},storage_kind:{$ref:"#/$defs/LcmStorageKindV1"},store_id:{format:"int64",type:["integer","null"]},timestamp:{format:"int64",type:["integer","null"]}},required:["provider","message_id","session_id","role","ordinal","content","content_range","storage_kind"],type:"object"},LcmStorageKindV1:y3,LcmTemporalFieldsV1:y7,RetainedErrorV1:_R,RetainedOutcomeStatusV1:_P,RetrievalWorkerStatusV1:_j,SessionCoverageIntervalV1:_4,SessionCoverageReasonV1:_6,SessionCoverageRequestV1:_3,SessionCoverageStateV1:_9,SessionSourceCoverageV1:vo,TemporalCoverageV1:vT,TemporalExplanationV1:vO,TemporalModeV1:vA,TemporalOmissionV1:vM,TemporalWatermarksV1:vW,UtcMicros:vK,ValidCoverageIntervalV1:vJ},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{capped_sessions:{additionalProperties:{format:"uint",minimum:0,type:"integer"},type:["object","null"]},content_limit:{format:"uint",minimum:0,type:["integer","null"]},content_limit_clamped_from:{format:"uint",minimum:0,type:["integer","null"]},error:{anyOf:[{$ref:"#/$defs/RetainedErrorV1"},{type:"null"}]},messages:{items:{$ref:"#/$defs/LcmMessageV1"},type:"array"},omitted:{format:"uint64",minimum:0,type:["integer","null"]},provider:{type:["string","null"]},service_status:{anyOf:[{$ref:"#/$defs/RetrievalWorkerStatusV1"},{type:"null"}]},session_id:{type:["string","null"]},status:{$ref:"#/$defs/RetainedOutcomeStatusV1"},temporal:{anyOf:[{$ref:"#/$defs/LcmTemporalFieldsV1"},{type:"null"}]}},required:["status","messages"],title:"LcmLoadSessionResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{deep:{type:["boolean","null"]},provider:{type:["string","null"]},session_id:{type:["string","null"]}},title:"LcmStatusRequestV1",type:"object"},{$defs:{LcmAuthorityOutcomeV1:yZ,LcmConfigStatusV1:{additionalProperties:!1,properties:{compression_boundary_cooldown_seconds:{format:"int64",type:"integer"},fresh_tail_count:{format:"uint",minimum:0,type:"integer"},summary_fan_in:{format:"uint",minimum:0,type:"integer"}},required:["fresh_tail_count","summary_fan_in","compression_boundary_cooldown_seconds"],type:"object"},LcmConvergenceStateV1:yX,LcmConvergenceV1:yY,LcmDagDepthStatusV1:{additionalProperties:!1,properties:{count:{format:"int64",type:"integer"},source_tokens:{format:"int64",type:"integer"},tokens:{format:"int64",type:"integer"}},required:["count","tokens","source_tokens"],type:"object"},LcmDagStatusV1:{additionalProperties:!1,properties:{compression_ratio:{type:"string"},depths:{additionalProperties:{$ref:"#/$defs/LcmDagDepthStatusV1"},type:"object"},total_nodes:{format:"int64",type:"integer"},total_source_tokens:{format:"int64",type:"integer"},total_tokens:{format:"int64",type:"integer"}},required:["total_nodes","total_tokens","total_source_tokens","compression_ratio","depths"],type:"object"},LcmDoctorProjectionStateV1:y1,LcmDoctorProjectionV1:y0,LcmLifecycleStatusV1:{additionalProperties:!1,properties:{current_frontier_store_id:{format:"int64",type:["integer","null"]},current_session_id:{type:["string","null"]},frontier_count:{format:"int64",type:"integer"},last_finalized_frontier_store_id:{format:"int64",type:["integer","null"]},last_finalized_session_id:{type:["string","null"]},lifecycle_state_count:{format:"int64",type:"integer"},maintenance_debt_count:{format:"int64",type:"integer"}},required:["lifecycle_state_count","frontier_count","maintenance_debt_count"],type:"object"},LcmPayloadCoverageStateV1:{enum:["complete","partial"],type:"string"},LcmPayloadCoverageV1:{additionalProperties:!1,properties:{reason:{type:["string","null"]},scanned_files:{format:"int64",type:"integer"},scanned_metadata_refs:{format:"int64",type:"integer"},state:{$ref:"#/$defs/LcmPayloadCoverageStateV1"}},required:["state","scanned_metadata_refs","scanned_files"],type:"object"},LcmPayloadGcStatusV1:{additionalProperties:!1,properties:{grace_seconds:{format:"int64",type:"integer"},last_gc_at:{format:"int64",type:["integer","null"]},last_gc_duration_ms:{format:"uint64",minimum:0,type:["integer","null"]},last_gc_error:{type:["string","null"]},last_gc_status:{type:["string","null"]},last_reaped_bytes:{format:"uint64",minimum:0,type:["integer","null"]},last_reaped_refs:{format:"int64",type:["integer","null"]},next_run_eligible_at:{format:"int64",type:["integer","null"]},reap_missing_metadata_after_seconds:{format:"int64",type:"integer"}},required:["grace_seconds","reap_missing_metadata_after_seconds"],type:"object"},LcmPayloadStatusV1:{additionalProperties:!1,properties:{coverage:{$ref:"#/$defs/LcmPayloadCoverageV1"},externalized_count:{format:"int64",type:"integer"},gc_candidate_count:{format:"int64",type:"integer"},integrity_mismatch_count:{format:"int64",type:["integer","null"]},missing_count:{format:"int64",type:"integer"},missing_placeholder_file_count:{format:"int64",type:"integer"},missing_placeholder_metadata_count:{format:"int64",type:"integer"},orphan_file_bytes:{format:"uint64",minimum:0,type:"integer"},orphan_file_count:{format:"int64",type:"integer"},placeholder_ref_count:{format:"int64",type:"integer"},reclaimable_bytes:{format:"uint64",minimum:0,type:"integer"},reclaimable_bytes_after_grace:{format:"uint64",minimum:0,type:"integer"},referenced_bytes:{format:"uint64",minimum:0,type:"integer"},referenced_count:{format:"int64",type:"integer"},root_contained:{type:"boolean"},tombstoned_count:{format:"int64",type:"integer"},total_bytes:{format:"uint64",minimum:0,type:"integer"},unreferenced_count:{format:"int64",type:"integer"}},required:["coverage","externalized_count","missing_count","unreferenced_count","placeholder_ref_count","missing_placeholder_metadata_count","missing_placeholder_file_count","gc_candidate_count","root_contained","orphan_file_count","tombstoned_count","referenced_count","total_bytes","referenced_bytes","orphan_file_bytes","reclaimable_bytes","reclaimable_bytes_after_grace"],type:"object"},LcmRedactionStatusV1:{additionalProperties:!1,properties:{enabled:{type:"boolean"},lossy_records:{format:"int64",type:"integer"}},required:["enabled","lossy_records"],type:"object"},LcmStatusV1:{additionalProperties:!1,properties:{config:{$ref:"#/$defs/LcmConfigStatusV1"},dag:{$ref:"#/$defs/LcmDagStatusV1"},external_payload_count:{format:"int64",type:"integer"},lifecycle:{$ref:"#/$defs/LcmLifecycleStatusV1"},maintenance_debt_count:{format:"int64",type:"integer"},missing_payload_count:{format:"int64",type:"integer"},payload:{$ref:"#/$defs/LcmPayloadStatusV1"},payload_gc:{$ref:"#/$defs/LcmPayloadGcStatusV1"},raw_message_count:{format:"int64",type:"integer"},redaction:{$ref:"#/$defs/LcmRedactionStatusV1"},schema_version:{format:"int64",type:"integer"},store:{$ref:"#/$defs/LcmStoreStatusV1"},summary_convergence:{$ref:"#/$defs/LcmSummaryConvergenceStatusV1"},summary_node_count:{format:"int64",type:"integer"},unreferenced_payload_count:{format:"int64",type:"integer"}},required:["schema_version","raw_message_count","summary_node_count","external_payload_count","missing_payload_count","unreferenced_payload_count","maintenance_debt_count","store","dag","config","payload","payload_gc","lifecycle","summary_convergence","redaction"],type:"object"},LcmStoreStatusV1:{additionalProperties:!1,properties:{estimated_tokens:{format:"int64",type:"integer"},messages:{format:"int64",type:"integer"},token_estimate:{$ref:"#/$defs/LcmStoreTokenCoverageV1"}},required:["messages","estimated_tokens","token_estimate"],type:"object"},LcmStoreTokenCoverageV1:{additionalProperties:!1,properties:{complete:{type:"boolean"},next_after_store_id:{format:"int64",type:["integer","null"]},scanned_messages:{format:"int64",type:"integer"}},required:["complete","scanned_messages"],type:"object"},LcmSummaryConvergenceReasonV1:{additionalProperties:!1,properties:{reason:{type:"string"},session_count:{format:"int64",type:"integer"},state:{$ref:"#/$defs/LcmSummaryConvergenceStateV1"}},required:["state","reason","session_count"],type:"object"},LcmSummaryConvergenceStateV1:{enum:["pending","retryable","current","unavailable","permanent"],type:"string"},LcmSummaryConvergenceStatusV1:{additionalProperties:!1,description:"Retained-session summary convergence queue: disjoint per-state session\ncounts and the reasons parked or failed sessions record.",properties:{current_session_count:{format:"int64",type:"integer"},pending_session_count:{format:"int64",type:"integer"},permanent_session_count:{format:"int64",type:"integer"},reasons:{items:{$ref:"#/$defs/LcmSummaryConvergenceReasonV1"},type:"array"},retryable_session_count:{format:"int64",type:"integer"},unavailable_session_count:{format:"int64",type:"integer"}},required:["pending_session_count","retryable_session_count","current_session_count","unavailable_session_count","permanent_session_count","reasons"],type:"object"},RetainedOutcomeStatusV1:_P,RetrievalWorkerStatusV1:_j},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{authority_outcome:{anyOf:[{$ref:"#/$defs/LcmAuthorityOutcomeV1"},{type:"null"}]},deep:{type:["boolean","null"]},lcm:{anyOf:[{$ref:"#/$defs/LcmStatusV1"},{type:"null"}]},message:{type:["string","null"]},projection:{anyOf:[{$ref:"#/$defs/LcmDoctorProjectionV1"},{type:"null"}],description:"The store's refresh-worker serving and convergence state. Absent when\nno refresh worker serves the store."},provider:{type:["string","null"]},reason:{type:["string","null"]},session_id:{type:["string","null"]},status:{$ref:"#/$defs/RetainedOutcomeStatusV1"}},required:["status"],title:"LcmStatusResultV1",type:"object"},{$defs:{MemoryScopeV1:gu,ProjectId:g2},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{memory_scope:{anyOf:[{$ref:"#/$defs/MemoryScopeV1"},{type:"null"}]},project_selector:{additionalProperties:!1,description:'Exact registered-project selector. Reads and fact effects run against the\nselected project.\n\nInlined so every request schema advertises the closed selector contract\n(`required: ["project_id"]`, no additional properties) directly on its\n`project_selector` property instead of behind a `$defs` reference, matching\nthe selector shape the MCP dispatch policy promises for selector-accepting\ntools.',properties:{project_id:{$ref:"#/$defs/ProjectId"}},required:["project_id"],type:["object","null"]}},title:"MemoryStatusRequestV1",type:"object"},{$defs:{FactCommitOwnerV1:hL,MemoryAlgebraV1:{additionalProperties:!1,properties:{estimated_capacity:{format:"uint64",minimum:0,type:"integer"},hrr_dim:{format:"uint64",minimum:0,type:"integer"},name:{type:"string"}},required:["name","hrr_dim","estimated_capacity"],type:"object"},MemoryFeedbackFunnelV1:{additionalProperties:!1,properties:{access_count_total:{format:"uint64",minimum:0,type:"integer"},feedback_total:{format:"uint64",minimum:0,type:"integer"},rated_fact_count:{format:"uint64",minimum:0,type:"integer"},retrieval_count_total:{format:"uint64",minimum:0,type:"integer"},retrieved_fact_count:{format:"uint64",minimum:0,type:"integer"},seen_to_feedback_ratio:{format:"uint64",minimum:0,type:["integer","null"]}},required:["retrieval_count_total","access_count_total","retrieved_fact_count","rated_fact_count","feedback_total"],type:"object"},MemoryStatusV1:{additionalProperties:!1,properties:{algebra:{$ref:"#/$defs/MemoryAlgebraV1"},below_default_recall_threshold_count:{format:"uint64",minimum:0,type:"integer"},entity_count:{format:"uint64",minimum:0,type:"integer"},fact_count:{format:"uint64",minimum:0,type:"integer"},feedback_funnel:{$ref:"#/$defs/MemoryFeedbackFunnelV1"},helpful_count:{format:"uint64",minimum:0,type:"integer"},owner:{$ref:"#/$defs/FactCommitOwnerV1"},trust_025_050_count:{format:"uint64",minimum:0,type:"integer"},trust_050_075_count:{format:"uint64",minimum:0,type:"integer"},trust_075_100_count:{format:"uint64",minimum:0,type:"integer"},trust_0_025_count:{format:"uint64",minimum:0,type:"integer"},unhelpful_count:{format:"uint64",minimum:0,type:"integer"}},required:["owner","fact_count","entity_count","algebra","trust_0_025_count","trust_025_050_count","trust_050_075_count","trust_075_100_count","below_default_recall_threshold_count","helpful_count","unhelpful_count","feedback_funnel"],type:"object"},ProjectId:g2},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{memory:{$ref:"#/$defs/MemoryStatusV1"}},required:["memory"],title:"MemoryStatusResultV1",type:"object"},{$defs:{MessageRelationshipScopeV1:gm,MessageTypeFilterV1:gf,ProjectId:g2,RetainedTimeFilterV1:_V},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Exact public input accepted by `tracedecay_message_search`.",properties:{branch:{type:["string","null"]},commit:{type:["string","null"]},cursor:{type:["string","null"]},goals:{default:!1,type:"boolean"},include_subagents:{type:["boolean","null"]},limit:{format:"uint64",minimum:0,type:["integer","null"]},message_type:{anyOf:[{$ref:"#/$defs/MessageTypeFilterV1"},{type:"null"}]},parent_session_id:{type:["string","null"]},project_key:{type:["string","null"]},project_selector:{additionalProperties:!1,description:'Exact registered-project selector. Reads and fact effects run against the\nselected project.\n\nInlined so every request schema advertises the closed selector contract\n(`required: ["project_id"]`, no additional properties) directly on its\n`project_selector` property instead of behind a `$defs` reference, matching\nthe selector shape the MCP dispatch policy promises for selector-accepting\ntools.',properties:{project_id:{$ref:"#/$defs/ProjectId"}},required:["project_id"],type:["object","null"]},provider:{type:["string","null"]},query:{type:["string","null"]},require_fresh:{description:"Freshness precondition: stale or partial coverage returns\n`refresh_required` instead of stored evidence. The read never refreshes.",type:["boolean","null"]},scope:{anyOf:[{$ref:"#/$defs/MessageRelationshipScopeV1"},{type:"null"}]},since:{anyOf:[{$ref:"#/$defs/RetainedTimeFilterV1"},{type:"null"}]},until:{anyOf:[{$ref:"#/$defs/RetainedTimeFilterV1"},{type:"null"}]},workflow_agent:{type:["string","null"]},workflow_run:{type:["string","null"]},worktree:{type:["string","null"]}},title:"MessageSearchRequestV1",type:"object"},{$defs:{ClosedUtcIntervalV1:fx,GitScopeV1:yM,HydrationStateResultV1:yK,MessageSearchHitV1:{additionalProperties:!1,properties:{message:{$ref:"#/$defs/SessionMessageV1"},project_id:{type:["string","null"]},root:{type:["string","null"]},score:{format:"double",type:"number"},session:{$ref:"#/$defs/SessionRecordV1"}},required:["session","message","score"],type:"object"},RetainedErrorV1:_R,RetainedNextActionV1:{additionalProperties:!1,properties:{action:{type:"string"},kind:{type:"string"},reason:{type:"string"},tool:{type:"string"}},required:["kind","tool","action","reason"],type:"object"},RetainedOutcomeStatusV1:_P,RetrievalWorkerStatusV1:_j,SessionCoverageIntervalV1:_4,SessionCoverageReasonV1:_6,SessionCoverageRequestV1:_3,SessionCoverageStateV1:_9,SessionMessageV1:{additionalProperties:!1,properties:{kind:{type:["string","null"]},message_id:{type:"string"},metadata_json:{type:["string","null"]},model:{type:["string","null"]},ordinal:{format:"int64",type:"integer"},provider:{type:"string"},role:{type:"string"},session_id:{type:"string"},source_offset:{format:"int64",type:["integer","null"]},source_path:{type:["string","null"]},text:{type:"string"},timestamp:{format:"int64",type:["integer","null"]},tool_names:{type:["string","null"]}},required:["provider","message_id","session_id","role","ordinal","text"],type:"object"},SessionRecordV1:{additionalProperties:!1,properties:{agent_id:{type:["string","null"]},ended_at:{format:"int64",type:["integer","null"]},is_subagent:{type:"boolean"},metadata_json:{type:["string","null"]},parent_session_id:{type:["string","null"]},parent_tool_use_id:{type:["string","null"]},project_key:{type:"string"},project_path:{type:"string"},provider:{type:"string"},session_id:{type:"string"},started_at:{format:"int64",type:["integer","null"]},title:{type:["string","null"]},transcript_path:{type:["string","null"]}},required:["provider","session_id","project_key","project_path","is_subagent"],type:"object"},SessionSourceCoverageV1:vo,TemporalCoverageOmissionV1:{oneOf:[{properties:{detail:{type:"string"},kind:{const:"root_continuation_unavailable",type:"string"},strict_population:{$ref:"#/$defs/TemporalPopulationCountV1"}},required:["kind","strict_population","detail"],type:"object"}]},TemporalCoverageV1:vT,TemporalExplanationV1:vO,TemporalFreshnessV1:vE,TemporalMetadataV1:{additionalProperties:!1,properties:{anchors:{items:{type:"string"},type:"array"},coverage:{$ref:"#/$defs/TemporalCoverageV1"},coverage_omissions:{items:{$ref:"#/$defs/TemporalCoverageOmissionV1"},type:"array"},explanations:{items:{$ref:"#/$defs/TemporalExplanationV1"},type:"array"},freshness:{anyOf:[{$ref:"#/$defs/TemporalFreshnessV1"},{type:"null"}]},next_cursor:{type:["string","null"]},omissions:{items:{$ref:"#/$defs/TemporalOmissionV1"},type:"array"},source_coverage:{items:{$ref:"#/$defs/SessionSourceCoverageV1"},type:"array"},watermarks:{$ref:"#/$defs/TemporalWatermarksV1"}},required:["anchors","watermarks","coverage","explanations"],type:"object"},TemporalModeV1:vA,TemporalOmissionV1:vM,TemporalPopulationCountV1:{oneOf:[{properties:{count:{format:"uint64",minimum:0,type:"integer"},kind:{const:"exact",type:"string"}},required:["kind","count"],type:"object"},{properties:{count:{format:"uint64",minimum:0,type:"integer"},kind:{const:"at_least",type:"string"}},required:["kind","count"],type:"object"}]},TemporalWatermarksV1:vW,UtcMicros:vK,ValidCoverageIntervalV1:vJ},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{count:{format:"uint",minimum:0,type:["integer","null"]},error:{anyOf:[{$ref:"#/$defs/RetainedErrorV1"},{type:"null"}]},git_filter:{anyOf:[{$ref:"#/$defs/GitScopeV1"},{type:"null"}]},git_filter_applied:{type:["boolean","null"]},goals:{type:"boolean"},include_subagents:{type:"boolean"},message:{type:["string","null"]},message_type:{type:"string"},next_action:{anyOf:[{$ref:"#/$defs/RetainedNextActionV1"},{type:"null"}]},omitted:{format:"uint64",minimum:0,type:["integer","null"]},outcome:{$ref:"#/$defs/RetainedOutcomeStatusV1"},parent_session_id:{type:["string","null"]},project_key:{type:["string","null"]},provider:{type:"string"},query:{type:["string","null"]},refresh_required:{type:"boolean"},requested_provider:{type:["string","null"]},require_fresh:{type:"boolean"},results:{items:{$ref:"#/$defs/MessageSearchHitV1"},type:["array","null"]},scope:{type:"string"},service_status:{anyOf:[{$ref:"#/$defs/RetrievalWorkerStatusV1"},{type:"null"}]},since:{format:"int64",type:["integer","null"]},status:{$ref:"#/$defs/RetainedOutcomeStatusV1"},store_scope:{type:["string","null"]},temporal:{anyOf:[{$ref:"#/$defs/TemporalMetadataV1"},{type:"null"}]},until:{format:"int64",type:["integer","null"]},workflow_agent:{type:["string","null"]},workflow_filter_applied:{type:["boolean","null"]},workflow_run:{type:["string","null"]},workflow_run_parent_session:{type:["string","null"]}},required:["require_fresh","goals","include_subagents","message_type","outcome","provider","refresh_required","scope","status"],title:"MessageSearchResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{path:{type:"string"}},required:["path"],title:"ModuleApiPrimitiveRequest",type:"object"},{$defs:{SymbolPrimitiveRecord:vq},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{path:{type:"string"},symbols:{items:{$ref:"#/$defs/SymbolPrimitiveRecord"},type:"array"}},required:["path","symbols"],title:"ModuleApiPrimitiveResult",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Exact public input accepted by `tracedecay_move_symbol`.",properties:{dest_file:{type:"string"},dry_run:{default:!0,type:"boolean"},expected_state:{description:"Exact `preview_digest`/`expected_state` returned by the dry run. Apply\nre-resolves the typed plan and rejects any candidate-state drift.",type:["string","null"]},idempotency_key:{type:["string","null"]},symbol:{type:"string"}},required:["symbol","dest_file"],title:"MoveSymbolSurfaceRequestV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Exact public input accepted by `tracedecay_multi_str_replace`.",properties:{dry_run:{default:!1,type:"boolean"},expected_state:{description:"Exact `preview_digest`/`expected_state` returned by the dry run. Apply\nre-resolves the typed plan and rejects any candidate-state drift.",type:["string","null"]},idempotency_key:{type:["string","null"]},path:{type:"string"},replacements:{description:"Ordered `[old, new]` pairs, matching the existing MCP tool wire form.",items:{maxItems:2,minItems:2,prefixItems:[{type:"string"},{type:"string"}],type:"array"},type:"array"},verify:{default:!1,type:"boolean"}},required:["path","replacements"],title:"MultiStrReplaceSurfaceRequestV1",type:"object"},{$defs:{NativeIntegrationTransactionId:gT},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{transaction_id:{$ref:"#/$defs/NativeIntegrationTransactionId"}},required:["transaction_id"],title:"NativeIntegrationStatusSurfaceRequest",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{node_id:{type:"string"}},required:["node_id"],title:"NodeSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fE,CodeIndexConvergenceParkedV1:fA,CodeIndexStalenessStateV1:fz,ComplexityAnalysisV1:fB,NodeDetailsV1:{additionalProperties:!1,properties:{branches:{description:"Exact counters; `None`, and listed in `unavailable_fields`, when\n`complexity_analysis` reports the bounded walk did not cover the body.",format:"uint32",minimum:0,type:["integer","null"]},complexity_analysis:{$ref:"#/$defs/ComplexityAnalysisV1"},cost_to_expand:{$ref:"#/$defs/NodeExpansionCostV1"},cyclomatic_complexity:{format:"uint32",minimum:0,type:["integer","null"]},derives:{items:{type:"string"},type:"array"},docstring:{type:["string","null"]},end_line:{format:"uint32",minimum:0,type:"integer"},file:{type:"string"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},id:{type:"string"},is_async:{type:"boolean"},kind:{type:"string"},loops:{format:"uint32",minimum:0,type:["integer","null"]},max_nesting:{format:"uint32",minimum:0,type:["integer","null"]},name:{type:"string"},qualified_name:{type:"string"},signature:{type:["string","null"]},start_line:{format:"uint32",minimum:0,type:"integer"},unavailable_fields:{items:{type:"string"},type:"array"},visibility:{type:"string"}},required:["id","name","kind","qualified_name","file","start_line","end_line","is_async","derives","visibility","complexity_analysis","cost_to_expand","unavailable_fields"],type:"object"},NodeExpansionCostV1:gA,PrimitiveFreshnessStateV1:gG,PrimitiveIndexingStateV1:gB,PrimitiveNotFoundV1:gJ,PrimitiveSearchFreshnessV1:gQ,PrimitiveSymbolLocationV1:gY},$schema:"https://json-schema.org/draft/2020-12/schema",anyOf:[{$ref:"#/$defs/NodeDetailsV1"},{$ref:"#/$defs/PrimitiveNotFoundV1"}],title:"NodeResultV1"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"One project-scoped horizon for the canonical Observatory and Costs models.",properties:{window_days:{default:14,format:"uint16",maximum:365,minimum:1,type:"integer"}},title:"ObservatoryReadRequestV1",type:"object"},{$defs:{AnalyticsModeReadModelV1:mD,AnalyticsModeV1:mF,ComparisonDispositionV1:fG,CostsReadModelV1:hw,CoverageStateV1:hV,LatencyDistributionReadModelV1:yJ,MetricCalibrationV1:gh,MetricCohortV1:gy,MetricCoverageV1:gg,MetricEvidenceClassV1:g_,MetricProvenanceV1:gv,MetricSourceV1:gb,MetricTemporalV1:g$,MetricUncertaintyV1:gS,MetricValueV1:gk,ObservabilityHorizonV1:gM,ObservatoryReadModelV1:gN,PerformanceComparisonReadModelV1:gH,ProviderLatencyReadModelV1:_o,RejectedArgumentAnalyticsV1:_f,RejectedArgumentErrorClassV1:_h,RejectedArgumentGroupV1:_y,RejectedArgumentNameV1:_g,RejectedArgumentSurfaceV1:__},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Canonical project-scoped observability and costs read models.",properties:{costs:{$ref:"#/$defs/CostsReadModelV1"},observatory:{$ref:"#/$defs/ObservatoryReadModelV1"}},required:["observatory","costs"],title:"ObservatoryReadResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{kinds:{items:{type:"string"},type:["array","null"]},limit:{format:"uint32",minimum:0,type:["integer","null"]},source_dir:{type:"string"}},required:["source_dir"],title:"PortOrderSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fE,CodeIndexConvergenceParkedV1:fA,CodeIndexStalenessStateV1:fz,PortCycleAnchorV1:{additionalProperties:!1,properties:{file:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},name:{type:"string"},rationale:{type:["string","null"]}},required:["name","file","line"],type:"object"},PortCycleFileV1:{additionalProperties:!1,properties:{file:{type:"string"},members_in_cycle:{format:"uint",minimum:0,type:"integer"}},required:["file","members_in_cycle"],type:"object"},PortCycleSymbolV1:{additionalProperties:!1,properties:{file:{type:"string"},in_cycle_in_degree:{format:"uint",minimum:0,type:"integer"},in_cycle_out_degree:{format:"uint",minimum:0,type:"integer"},kind:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},name:{type:"string"}},required:["name","kind","file","line","in_cycle_out_degree","in_cycle_in_degree"],type:"object"},PortCycleV1:{additionalProperties:!1,properties:{break_point_candidate:{anyOf:[{$ref:"#/$defs/PortCycleAnchorV1"},{type:"null"}]},entry_point:{anyOf:[{$ref:"#/$defs/PortCycleAnchorV1"},{type:"null"}]},files:{items:{$ref:"#/$defs/PortCycleFileV1"},type:"array"},note:{type:"string"},size:{format:"uint",minimum:0,type:"integer"},symbols:{items:{$ref:"#/$defs/PortCycleSymbolV1"},type:"array"}},required:["size","files","symbols","note"],type:"object"},PortOrderLevelV1:{additionalProperties:!1,properties:{description:{type:"string"},level:{format:"uint",minimum:0,type:"integer"},symbols:{items:{$ref:"#/$defs/PortOrderSymbolV1"},type:"array"}},required:["level","description","symbols"],type:"object"},PortOrderSymbolV1:{additionalProperties:!1,properties:{depends_on:{items:{type:"string"},type:["array","null"]},file:{type:"string"},kind:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},name:{type:"string"}},required:["name","kind","file","line"],type:"object"},PrimitiveFreshnessStateV1:gG,PrimitiveIndexingStateV1:gB,PrimitiveSearchFreshnessV1:gQ},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{cycles:{items:{$ref:"#/$defs/PortCycleV1"},type:"array"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},levels:{items:{$ref:"#/$defs/PortOrderLevelV1"},type:"array"},returned:{format:"uint",minimum:0,type:"integer"},source_dir:{type:"string"},total_symbols:{format:"uint",minimum:0,type:"integer"}},required:["source_dir","total_symbols","returned","levels","cycles"],title:"PortOrderResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{kinds:{items:{type:"string"},type:["array","null"]},source_dir:{type:"string"},target_dir:{type:"string"}},required:["source_dir","target_dir"],title:"PortStatusSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fE,CodeIndexConvergenceParkedV1:fA,CodeIndexStalenessStateV1:fz,PortMatchedSymbolV1:{additionalProperties:!1,properties:{name:{type:"string"},source_file:{type:"string"},source_kind:{type:"string"},target_file:{type:"string"},target_kind:{type:"string"}},required:["name","source_kind","target_kind","source_file","target_file"],type:"object"},PortTargetOnlySymbolV1:{additionalProperties:!1,properties:{file:{type:"string"},kind:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},name:{type:"string"}},required:["name","kind","file","line"],type:"object"},PortUnmatchedSymbolV1:{additionalProperties:!1,properties:{kind:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},name:{type:"string"}},required:["name","kind","line"],type:"object"},PrimitiveFreshnessStateV1:gG,PrimitiveIndexingStateV1:gB,PrimitiveSearchFreshnessV1:gQ},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{coverage_percent:{format:"double",type:"number"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},matched:{format:"uint",minimum:0,type:"integer"},matched_symbols:{items:{$ref:"#/$defs/PortMatchedSymbolV1"},type:"array"},source_count:{format:"uint",minimum:0,type:"integer"},source_dir:{type:"string"},target_count:{format:"uint",minimum:0,type:"integer"},target_dir:{type:"string"},target_only:{format:"uint",minimum:0,type:"integer"},target_only_symbols:{items:{$ref:"#/$defs/PortTargetOnlySymbolV1"},type:"array"},unmatched:{format:"uint",minimum:0,type:"integer"},unmatched_by_file:{additionalProperties:{items:{$ref:"#/$defs/PortUnmatchedSymbolV1"},type:"array"},type:"object"}},required:["source_dir","target_dir","source_count","target_count","matched","unmatched","target_only","coverage_percent","unmatched_by_file","matched_symbols","target_only_symbols"],title:"PortStatusResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{base_ref:{description:"Base branch or ref to compare against (default: detected repository\ndefault branch). A short branch name selects the descendant of its\nlocal and origin tracking tips; use an explicit ref when they diverge.",type:["string","null"]},budget_tokens:{description:"Cap the symbol, test, and module sections at about this many tokens.",format:"uint32",minimum:0,type:["integer","null"]},cursor:{description:"Authenticated continuation cursor returned by a previous page.",type:["string","null"]},head_ref:{description:"Head branch or ref (default: 'HEAD'). Accepts local branches,\nremote-tracking refs such as origin/topic, full refs, and Git revision\nexpressions.",type:["string","null"]},maximum_symbols:{description:"Maximum symbols returned on this page (default: 200, clamped to 1-500).",format:"uint32",minimum:0,type:["integer","null"]}},title:"PrContextSurfaceRequestV1",type:"object"},{$defs:{CoChangeUnavailableV1:fj,CodeIndexBuildBlockedReasonV1:fE,CodeIndexConvergenceParkedV1:fA,CodeIndexStalenessStateV1:fz,ConfigSummaryKindV1:fZ,ConfigSummaryV1:fQ,GitCommitSubjectV1:{additionalProperties:!1,properties:{hash:{type:"string"},subject:{type:"string"}},required:["hash","subject"],type:"object"},GitComparedSymbolV1:yb,GitContextSymbolV1:y$,GitFileChangeStatusV1:{enum:["added","deleted","modified"],type:"string"},GitFileChangeV1:{additionalProperties:!1,properties:{path:{type:"string"},status:{$ref:"#/$defs/GitFileChangeStatusV1"}},required:["path","status"],type:"object"},GitReadCompleteV1:yT,GitReadPartialV1:yO,GitReadUnavailableV1:yE,GitToolErrorKindV1:yN,GitToolErrorV1:yz,GitToolFailureV1:yD,GitToolOperationV1:yF,MissingCoChangePartnerV1:gw,PrAnalysisCoverageV1:{additionalProperties:!1,properties:{complete:{type:"boolean"},direct_call_edges_admitted:{format:"uint",minimum:0,type:"integer"},impact_bytes_admitted:{format:"uint",minimum:0,type:"integer"},impact_nodes_admitted:{format:"uint",minimum:0,type:"integer"},impact_nodes_returned:{format:"uint",minimum:0,type:"integer"},impact_partial:{type:"boolean"},seed_symbols_analyzed:{format:"uint",minimum:0,type:"integer"},symbols_complete:{type:"boolean"},symbols_returned:{format:"uint",minimum:0,type:"integer"}},required:["seed_symbols_analyzed","symbols_returned","symbols_complete","impact_nodes_admitted","impact_nodes_returned","direct_call_edges_admitted","impact_bytes_admitted","impact_partial","complete"],type:"object"},PrContextCompleteV1:{additionalProperties:!1,properties:{added:{items:{$ref:"#/$defs/PrSymbolEntryV1"},type:"array"},affected_tests:{items:{type:"string"},type:"array"},affected_tests_coverage:{$ref:"#/$defs/PrSelectionCoverageV1"},analysis_coverage:{$ref:"#/$defs/PrAnalysisCoverageV1"},base:{type:"string"},base_oid:{type:"string"},changes:{items:{$ref:"#/$defs/GitFileChangeV1"},type:"array"},co_change_unavailable:{anyOf:[{$ref:"#/$defs/CoChangeUnavailableV1"},{type:"null"}],description:"Present when Git history could not be mined for co-change partners."},commits:{items:{$ref:"#/$defs/GitCommitSubjectV1"},type:"array"},files_changed:{format:"uint",minimum:0,type:"integer"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},graph_generation:{type:"string"},head:{type:"string"},head_oid:{type:"string"},impacted_modules:{items:{type:"string"},type:"array"},impacted_modules_coverage:{$ref:"#/$defs/PrSelectionCoverageV1"},merge_base:{type:"string"},missing_co_change_partners:{description:"Files that usually change with a changed file, per bounded Git\nhistory, but are absent from this change set.",items:{$ref:"#/$defs/MissingCoChangePartnerV1"},type:"array"},modified:{items:{$ref:"#/$defs/PrSymbolEntryV1"},type:"array"},next_cursor:{type:["string","null"]},removed:{items:{$ref:"#/$defs/GitComparedSymbolV1"},type:"array"},status:{$ref:"#/$defs/GitReadCompleteV1"},symbol_changes_coverage:{$ref:"#/$defs/PrSymbolChangesCompleteV1"},symbol_page:{$ref:"#/$defs/PrSymbolPageV1"},symbols_added:{format:"uint",minimum:0,type:"integer"},symbols_modified:{format:"uint",minimum:0,type:"integer"},symbols_removed:{format:"uint",minimum:0,type:"integer"},test_files_changed:{items:{type:"string"},type:"array"},token_budget:{anyOf:[{$ref:"#/$defs/TokenBudgetCutV1"},{type:"null"}],description:"Budget accounting when the request supplies `budget_tokens`."}},required:["status","base","head","base_oid","head_oid","merge_base","graph_generation","commits","files_changed","changes","missing_co_change_partners","symbols_added","symbols_removed","symbols_modified","added","removed","modified","symbol_changes_coverage","symbol_page","analysis_coverage","test_files_changed","affected_tests","affected_tests_coverage","impacted_modules","impacted_modules_coverage"],type:"object"},PrContextGraphPendingV1:{additionalProperties:!1,description:"The git comparison while the verified graph generation is still warming.",properties:{added:{items:{$ref:"#/$defs/PrSymbolEntryV1"},type:"array"},affected_tests:{items:{type:"string"},type:"array"},affected_tests_coverage:{$ref:"#/$defs/PrSelectionCoverageV1"},analysis_coverage:{$ref:"#/$defs/PrAnalysisCoverageV1"},base:{type:"string"},base_oid:{type:"string"},changes:{items:{$ref:"#/$defs/GitFileChangeV1"},type:"array"},co_change_unavailable:{anyOf:[{$ref:"#/$defs/CoChangeUnavailableV1"},{type:"null"}],description:"Present when Git history could not be mined for co-change partners."},commits:{items:{$ref:"#/$defs/GitCommitSubjectV1"},type:"array"},files_changed:{format:"uint",minimum:0,type:"integer"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},graph_generation:{description:"No verified generation was admitted.",type:["string","null"]},head:{type:"string"},head_oid:{type:"string"},impacted_modules:{items:{type:"string"},type:"array"},impacted_modules_coverage:{$ref:"#/$defs/PrSelectionCoverageV1"},merge_base:{type:"string"},message:{type:"string"},missing_co_change_partners:{description:"Files that usually change with a changed file, per bounded Git\nhistory, but are absent from this change set.",items:{$ref:"#/$defs/MissingCoChangePartnerV1"},type:"array"},modified:{items:{$ref:"#/$defs/PrSymbolEntryV1"},type:"array"},next_cursor:{type:["string","null"]},status:{$ref:"#/$defs/GitReadPartialV1"},symbol_page:{$ref:"#/$defs/PrSymbolPageV1"},symbols_added:{format:"uint",minimum:0,type:"integer"},symbols_modified:{format:"uint",minimum:0,type:"integer"},test_files_changed:{items:{type:"string"},type:"array"},token_budget:{anyOf:[{$ref:"#/$defs/TokenBudgetCutV1"},{type:"null"}],description:"Budget accounting when the request supplies `budget_tokens`."},verified_graph_evidence:{$ref:"#/$defs/PrimitiveUnavailableEvidenceV1"}},required:["status","message","base","head","base_oid","head_oid","merge_base","commits","files_changed","changes","missing_co_change_partners","symbols_added","symbols_modified","added","modified","symbol_page","analysis_coverage","test_files_changed","affected_tests","affected_tests_coverage","impacted_modules","impacted_modules_coverage","verified_graph_evidence"],type:"object"},PrContextSymbolsUnavailableV1:{additionalProperties:!1,description:"The git comparison while exact base/head symbol comparison is unavailable\nor does not describe the verified graph's head generation.",properties:{added:{items:{$ref:"#/$defs/PrSymbolEntryV1"},type:"array"},base:{type:"string"},base_oid:{type:"string"},changes:{items:{$ref:"#/$defs/GitFileChangeV1"},type:"array"},co_change_unavailable:{anyOf:[{$ref:"#/$defs/CoChangeUnavailableV1"},{type:"null"}],description:"Present when Git history could not be mined for co-change partners."},commits:{items:{$ref:"#/$defs/GitCommitSubjectV1"},type:"array"},files_changed:{format:"uint",minimum:0,type:"integer"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},graph_generation:{type:"string"},head:{type:"string"},head_oid:{type:"string"},merge_base:{type:"string"},message:{type:"string"},missing_co_change_partners:{description:"Files that usually change with a changed file, per bounded Git\nhistory, but are absent from this change set.",items:{$ref:"#/$defs/MissingCoChangePartnerV1"},type:"array"},modified:{items:{$ref:"#/$defs/PrSymbolEntryV1"},type:"array"},next_cursor:{type:["string","null"]},removed:{items:{$ref:"#/$defs/GitComparedSymbolV1"},type:"array"},status:{$ref:"#/$defs/GitReadPartialV1"},symbol_changes_coverage:{$ref:"#/$defs/SymbolChangesUnavailableV1"},symbols_added:{format:"uint",minimum:0,type:"integer"},symbols_modified:{format:"uint",minimum:0,type:"integer"},symbols_removed:{format:"uint",minimum:0,type:"integer"},token_budget:{anyOf:[{$ref:"#/$defs/TokenBudgetCutV1"},{type:"null"}],description:"Budget accounting when the request supplies `budget_tokens`."}},required:["status","message","base","head","base_oid","head_oid","merge_base","graph_generation","commits","files_changed","changes","missing_co_change_partners","symbols_added","symbols_removed","symbols_modified","added","removed","modified","symbol_changes_coverage"],type:"object"},PrCoverageSelectionV1:{enum:["unavailable","deterministic_bounded_prefix"],type:"string"},PrSelectionCoverageV1:{additionalProperties:!1,properties:{complete:{type:"boolean"},selection:{$ref:"#/$defs/PrCoverageSelectionV1"}},required:["complete","selection"],type:"object"},PrSymbolChangesCompleteV1:{additionalProperties:!1,properties:{base_generation:{type:"string"},head_generation:{type:"string"},status:{$ref:"#/$defs/GitReadCompleteV1"}},required:["status","base_generation","head_generation"],type:"object"},PrSymbolEntryV1:{anyOf:[{$ref:"#/$defs/GitContextSymbolV1"},{$ref:"#/$defs/ConfigSummaryV1"}]},PrSymbolPageV1:{additionalProperties:!1,properties:{complete:{type:"boolean"},continuation_available:{type:"boolean"},has_more:{type:"boolean"},limit:{format:"uint",minimum:0,type:"integer"},returned:{format:"uint",minimum:0,type:"integer"},selection:{$ref:"#/$defs/PrSymbolSelectionV1"}},required:["limit","returned","has_more","complete","selection","continuation_available"],type:"object"},PrSymbolSelectionV1:{enum:["unavailable","stable_prefix"],type:"string"},PrimitiveFreshnessStateV1:gG,PrimitiveIndexingStateV1:gB,PrimitiveSearchFreshnessV1:gQ,PrimitiveUnavailableEvidenceV1:g1,PrimitiveUnavailableStatusV1:g0,SymbolChangesUnavailableV1:vR,TokenBudgetCutV1:vz,TokenBudgetSectionV1:vD},$schema:"https://json-schema.org/draft/2020-12/schema",anyOf:[{$ref:"#/$defs/PrContextCompleteV1"},{$ref:"#/$defs/PrContextSymbolsUnavailableV1"},{$ref:"#/$defs/PrContextGraphPendingV1"},{$ref:"#/$defs/GitToolFailureV1"}],title:"PrContextResultV1"},{$defs:{BranchStackEdgeV1:fu,BranchStackId:fm,BranchStackNodeV1:ff,BranchStackRevisionId:fh,BranchStackRevisionV1:fy,BranchStackSourceV1:fg,CommitId:fH,ManifestDigest:gl,MechanicalIntegrationModeV1:gp,NativeIntegrationDirectionV1:gV,NativeIntegrationSealedStackSnapshotV1:gx,NativeIntegrationSelectionBindingV1:gj,ProjectId:g2,RefId:_u,RepositoryId:_v,ResolvedScope:_k,ScopeSetId:_Q,ScopeSetRevision:_X,StackNodeId:vk,WorktreeId:$M,WorktreeInventoryEpoch:$W,WorktreeInventorySnapshotId:$N},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Read-only preflight over one frozen snapshot identity.\n\n`preferred_mode` selects only one of the three fixed mechanical encodings.\nIt cannot change topology, commit order, or the commit set.",properties:{preferred_mode:{anyOf:[{$ref:"#/$defs/MechanicalIntegrationModeV1"},{type:"null"}],default:null},snapshot:{$ref:"#/$defs/NativeIntegrationSealedStackSnapshotV1"}},required:["snapshot"],title:"NativeIntegrationPreflightSurfaceRequest",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{path:{description:"Project path or registered alias to resolve.",type:["string","null"]},project_selector:{additionalProperties:!1,default:null,description:"Registered project id to inspect. Omit to use path or the active\nproject.",properties:{project_id:{description:"Registered project id to query.",type:"string"}},required:["project_id"],type:"object"}},title:"ProjectContextSurfaceRequestV1",type:"object"},{$defs:{PublicCodeProject:_n},$schema:"https://json-schema.org/draft/2020-12/schema",description:"One registered project's context, or the registry's typed miss.",oneOf:[{additionalProperties:!1,properties:{aliases:{description:"Alias rows exactly as the registry serializes them.",items:!0,type:"array"},is_active:{type:"boolean"},project:{$ref:"#/$defs/PublicCodeProject"},registry_path:{type:"string"},status:{const:"ok",type:"string"},stores:{description:"Store rows exactly as the registry serializes them.",items:!0,type:"array"}},required:["status","is_active","registry_path","project","aliases","stores"],type:"object"},{additionalProperties:!1,description:"The registry answered and no registered project matches the selector.",properties:{aliases:{items:!0,type:"array"},project:{type:"null"},registry_path:{type:"string"},status:{const:"not_found",type:"string"},stores:{items:!0,type:"array"}},required:["status","registry_path","project","aliases","stores"],type:"object"}],title:"ProjectContextResultV1"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{limit:{description:"Maximum projects to return (default: 25, max: 100).",format:"uint",minimum:0,type:["integer","null"]}},title:"ProjectListSurfaceRequestV1",type:"object"},{$defs:{ProjectRegistryEntry:g4,ProjectRegistrySummary:g6,ProjectRepoGroup:g3,PublicCodeProject:_n},$schema:"https://json-schema.org/draft/2020-12/schema",description:"A bounded page of the profile's registered projects.",oneOf:[{additionalProperties:!1,properties:{limit:{format:"uint",minimum:0,type:"integer"},project_tree:{items:{$ref:"#/$defs/ProjectRepoGroup"},type:"array"},projects:{items:{$ref:"#/$defs/PublicCodeProject"},type:"array"},query:{type:["string","null"]},registry_path:{type:"string"},status:{const:"ok",type:"string"},summary:{$ref:"#/$defs/ProjectRegistrySummary"},title:{type:"string"},truncated:{type:"boolean"}},required:["status","title","registry_path","limit","truncated","summary","project_tree","projects"],type:"object"}],title:"ProjectRegistryListingResultV1"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{limit:{description:"Maximum projects to return (default: 10, max: 50).",format:"uint",minimum:0,type:["integer","null"]},query:{description:"Case-insensitive substring query over registry project metadata.",type:"string"}},required:["query"],title:"ProjectSearchSurfaceRequestV1",type:"object"},{$defs:{PageRequest:gU},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{page:{$ref:"#/$defs/PageRequest"},qualified_name:{type:"string"}},required:["qualified_name","page"],title:"QualifiedNamePrimitiveRequest",type:"object"},{$defs:{SymbolPrimitiveRecord:vq},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{next_cursor:{description:"Opaque resume token; its bounded string is the public wire form.",type:["string","null"]},symbols:{items:{$ref:"#/$defs/SymbolPrimitiveRecord"},type:"array"},total:{format:"uint64",minimum:0,type:["integer","null"]}},required:["symbols"],title:"QualifiedNamePrimitiveResult",type:"object"},{$defs:{RankDirectionV1:_d,RankEdgeKindV1:_c},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{direction:{anyOf:[{$ref:"#/$defs/RankDirectionV1"},{type:"null"}],description:"Edge direction: 'incoming' ranks targets (default, e.g.\nmost-implemented interface), 'outgoing' ranks sources (e.g. class that\nimplements the most interfaces)."},edge_kind:{$ref:"#/$defs/RankEdgeKindV1",description:"The relationship type to rank by (e.g. 'implements' to find\nmost-implemented interfaces)."},limit:{description:"Maximum number of results to return (default: 10, at most 100).",format:"uint32",minimum:0,type:["integer","null"]},node_kind:{description:"Optional filter for node kind (e.g. 'interface', 'class', 'trait',\n'function', 'method').",type:["string","null"]},path:{description:"Filter to files under this directory path (e.g. 'src/main/java').",type:["string","null"]}},required:["edge_kind"],title:"RankSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fE,CodeIndexConvergenceParkedV1:fA,CodeIndexStalenessStateV1:fz,PrimitiveFreshnessStateV1:gG,PrimitiveIndexingStateV1:gB,PrimitiveSearchFreshnessV1:gQ,RankDirectionV1:_d,RankEdgeKindV1:_c,RankEntryV1:{additionalProperties:!1,properties:{count:{format:"uint64",minimum:0,type:"integer"},file:{type:"string"},id:{type:"string"},kind:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},name:{type:"string"}},required:["id","name","kind","file","line","count"],type:"object"}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{direction:{$ref:"#/$defs/RankDirectionV1"},edge_kind:{$ref:"#/$defs/RankEdgeKindV1"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},node_kind_filter:{type:["string","null"]},ranking:{items:{$ref:"#/$defs/RankEntryV1"},type:"array"},result_count:{format:"uint64",minimum:0,type:"integer"}},required:["edge_kind","direction","result_count","ranking"],title:"RankResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{limit:{description:"Maximum number of cycles to return (default: 10, at most 100).",format:"uint32",minimum:0,type:["integer","null"]},path:{description:"Filter to files under this directory path (e.g. 'src/main/java').",type:["string","null"]}},title:"RecursionSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fE,CodeIndexConvergenceParkedV1:fA,CodeIndexStalenessStateV1:fz,PrimitiveFreshnessStateV1:gG,PrimitiveIndexingStateV1:gB,PrimitiveSearchFreshnessV1:gQ,RecursionCycleV1:{additionalProperties:!1,description:"One call cycle; `chain` repeats its first symbol at the end.",properties:{chain:{items:{$ref:"#/$defs/RecursionSymbolV1"},type:"array"},length:{format:"uint64",minimum:0,type:"integer"}},required:["length","chain"],type:"object"},RecursionSymbolV1:{additionalProperties:!1,properties:{file:{type:"string"},id:{type:"string"},kind:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},name:{type:"string"}},required:["id","name","kind","file","line"],type:"object"}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{cycle_count:{format:"uint64",minimum:0,type:"integer"},cycles:{items:{$ref:"#/$defs/RecursionCycleV1"},type:"array"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."}},required:["cycle_count","cycles"],title:"RecursionResultV1",type:"object"},{$defs:{CommitId:fH,ProjectId:g2,ProviderId:_i,RedundancyScopeV1:{oneOf:[{additionalProperties:!1,properties:{kind:{const:"repository",type:"string"}},required:["kind"],type:"object"},{additionalProperties:!1,properties:{kind:{const:"path",type:"string"},path:{type:"string"}},required:["kind","path"],type:"object"},{additionalProperties:!1,properties:{changed_paths:{items:{type:"string"},type:"array"},head_commit_id:{$ref:"#/$defs/CommitId"},kind:{const:"pull_request",type:"string"},provider:{$ref:"#/$defs/ProviderId"},pull_request_id:{type:"string"}},required:["kind","provider","pull_request_id","head_commit_id","changed_paths"],type:"object"}]},RepositoryId:_v,SimilarMatchClassV1:vd},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{cursor:{type:["string","null"]},family_limit:{description:"Preferred family page size.",format:"uint32",minimum:0,type:"integer"},include_generated_paths:{type:"boolean"},match_classes:{items:{$ref:"#/$defs/SimilarMatchClassV1"},type:"array"},member_limit:{format:"uint32",minimum:0,type:"integer"},project_id:{$ref:"#/$defs/ProjectId"},repository_id:{$ref:"#/$defs/RepositoryId"},scope:{$ref:"#/$defs/RedundancyScopeV1"},work_limit:{format:"uint32",minimum:0,type:"integer"}},required:["project_id","repository_id","match_classes","scope","include_generated_paths","family_limit","member_limit","work_limit"],title:"RedundancySurfaceRequestV1",type:"object"},{$defs:{CodeGenerationId:fT,CodeIndexBuildBlockedReasonV1:fE,CodeIndexConvergenceParkedV1:fA,CodeIndexStalenessStateV1:fz,ManifestDigest:gl,PrimitiveFreshnessStateV1:gG,PrimitiveIndexingStateV1:gB,PrimitiveSearchFreshnessV1:gQ,ProjectId:g2,RedundancyCoverageV1:{oneOf:[{additionalProperties:!1,properties:{examined_families:{format:"uint",minimum:0,type:"integer"},examined_members:{format:"uint",minimum:0,type:"integer"},status:{const:"complete",type:"string"}},required:["status","examined_families","examined_members"],type:"object"},{additionalProperties:!1,properties:{examined_families:{format:"uint",minimum:0,type:"integer"},examined_members:{format:"uint",minimum:0,type:"integer"},reason:{$ref:"#/$defs/RedundancyPartialReasonV1"},status:{const:"partial",type:"string"}},required:["status","reason","examined_families","examined_members"],type:"object"}]},RedundancyFamilyV1:{additionalProperties:!1,properties:{family:{$ref:"#/$defs/SimilarFamilyV1"},generated_members:{items:{$ref:"#/$defs/SymbolOccurrenceId"},type:"array"},reviewable_source_bytes:{format:"uint64",minimum:0,type:"integer"},total_member_count:{format:"uint",minimum:0,type:"integer"}},required:["family","total_member_count","reviewable_source_bytes","generated_members"],type:"object"},RedundancyPartialReasonV1:{enum:["family_limit","work_limit"],type:"string"},RedundancyRankingV1:{enum:["reviewable_source_bytes"],type:"string"},RepositoryId:_v,SimilarFamilyV1:vs,SimilarMatchClassV1:vd,SimilarOccurrenceV1:vc,SourceSpan:vb,SymbolOccurrenceId:vV,WorktreeId:$M},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{coverage:{$ref:"#/$defs/RedundancyCoverageV1"},families:{items:{$ref:"#/$defs/RedundancyFamilyV1"},type:"array"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},next_cursor:{type:["string","null"]},ranked_by:{$ref:"#/$defs/RedundancyRankingV1"},source_generation:{$ref:"#/$defs/CodeGenerationId"}},required:["source_generation","ranked_by","families","coverage"],title:"RedundancyResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,title:"RemoteStatusSurfaceRequestV1",type:"object"},{$defs:{AuthorityEpoch:{description:"Monotonic epoch of the writer authority for a shard.",format:"uint64",minimum:0,type:"integer"},BrainId:fs,BrainNodeId:{description:"Strongly typed canonical identity: `BrainNodeId`.",type:"string"},CurrentRemoteAuthorityStateV1:{description:"Truthful authority lookup state. Missing evidence is never represented as\nan available authority or a successful empty response.",oneOf:[{properties:{state:{const:"available",type:"string"},value:{$ref:"#/$defs/CurrentRemoteAuthorityV1"}},required:["state","value"],type:"object"},{properties:{state:{const:"partial",type:"string"},value:{properties:{known_fence:{anyOf:[{$ref:"#/$defs/RemoteWriterFenceV1"},{type:"null"}]},missing:{items:{$ref:"#/$defs/RemoteAuthorityUnavailableReasonV1"},type:"array",uniqueItems:!0},observed_at:{$ref:"#/$defs/UtcMicros"}},required:["missing","observed_at"],type:"object"}},required:["state","value"],type:"object"},{properties:{state:{const:"unavailable",type:"string"},value:{properties:{observed_at:{$ref:"#/$defs/UtcMicros"},reason:{$ref:"#/$defs/RemoteAuthorityUnavailableReasonV1"}},required:["reason","observed_at"],type:"object"}},required:["state","value"],type:"object"}]},CurrentRemoteAuthorityV1:{additionalProperties:!1,description:"Authenticated current authority for a mutable shard.",properties:{credential_revision:{description:"Revision of the authority node's current enrollment credential.",format:"uint64",minimum:0,type:"integer"},fence:{$ref:"#/$defs/RemoteWriterFenceV1"},observed_at:{$ref:"#/$defs/UtcMicros"}},required:["fence","credential_revision","observed_at"],type:"object"},DoctorCoverageCompletenessV1:hT,ProjectionGenerationId:g9,RemoteAuthorityUnavailableReasonV1:{oneOf:[{enum:["registry_unavailable","placement_unknown","authority_unreachable","authority_authentication_failed","caller_authentication_failed","enrollment_expired","enrollment_revoked","insufficient_capability","scope_mismatch","fence_unverified","protocol_incompatible"],type:"string"},{const:"writer_authority_unpublished",description:"The RemoteNode store has never had a writer authority published for\nthis Brain, so no capture, replay, query, or failover can bind to one.",type:"string"}]},RemoteListenerReadV1:{enum:["serving","disabled","degraded"],type:"string"},RemoteOperationalReadinessV1:{enum:["unconfigured","partial","ready","recovery_required"],type:"string"},RemoteOperationalStatusV1:{additionalProperties:!1,properties:{authority:{$ref:"#/$defs/CurrentRemoteAuthorityStateV1"},enrollment_configured:{type:"boolean"},failover_in_progress:{type:"boolean"},observed_at:{$ref:"#/$defs/UtcMicros"},readiness:{$ref:"#/$defs/RemoteOperationalReadinessV1"},recovery_required:{type:"boolean"},replay_coverage_complete:{type:"boolean"},spool:{$ref:"#/$defs/RemoteSpoolOperationalStatusV1"}},required:["readiness","enrollment_configured","authority","spool","replay_coverage_complete","failover_in_progress","recovery_required","observed_at"],type:"object"},RemoteSpoolOperationalStatusV1:{additionalProperties:!1,properties:{has_sequence_gap:{type:"boolean"},pending_count:{format:"uint64",minimum:0,type:"integer"},quarantined_count:{format:"uint64",minimum:0,type:"integer"}},required:["pending_count","quarantined_count","has_sequence_gap"],type:"object"},RemoteWriterFenceV1:{additionalProperties:!1,description:"The complete single-writer identity for one mutable shard.",properties:{authority_epoch:{$ref:"#/$defs/AuthorityEpoch"},authority_node_id:{$ref:"#/$defs/BrainNodeId"},brain_id:{$ref:"#/$defs/BrainId"},generation_id:{$ref:"#/$defs/ProjectionGenerationId"},placement_revision:{format:"uint64",minimum:0,type:"integer"},shard_id:{$ref:"#/$defs/ShardId"}},required:["brain_id","shard_id","generation_id","placement_revision","authority_epoch","authority_node_id"],type:"object"},ShardId:{description:"Strongly typed canonical identity: `ShardId`.",type:"string"},UtcMicros:vK},$schema:"https://json-schema.org/draft/2020-12/schema",description:"Typed read of the Remote Brain operational plane as observed from the\nmounted daemon authorities. Every operator surface (Doctor, CLI, MCP,\ndashboard) reads this one shape; `Unavailable` is reserved for a genuinely\nunmounted or unreadable authority, never a rendering shortcut.",oneOf:[{properties:{coverage:{$ref:"#/$defs/DoctorCoverageCompletenessV1"},kind:{const:"observed",type:"string"},listener:{$ref:"#/$defs/RemoteListenerReadV1"},status:{$ref:"#/$defs/RemoteOperationalStatusV1"}},required:["kind","listener","status","coverage"],type:"object"},{properties:{kind:{const:"unconfigured",type:"string"}},required:["kind"],type:"object"},{properties:{kind:{const:"unavailable",type:"string"}},required:["kind"],type:"object"}],title:"RemoteOperationalStatusReadV1"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{new_name:{type:["string","null"]},node_id:{type:"string"}},required:["node_id"],title:"RenamePreviewPrimitiveRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fE,CodeIndexConvergenceParkedV1:fA,CodeIndexStalenessStateV1:fz,PrimitiveFreshnessStateV1:gG,PrimitiveIndexingStateV1:gB,PrimitiveNotFoundV1:gJ,PrimitiveSearchFreshnessV1:gQ,PrimitiveSymbolLocationV1:gY,RenamePreviewNodeV1:{additionalProperties:!1,properties:{file:{type:"string"},id:{type:"string"},kind:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},name:{type:"string"},qualified_name:{type:"string"},snippet:{type:["string","null"]}},required:["id","name","qualified_name","kind","file","line"],type:"object"},RenamePreviewPrimitiveResultV1:{additionalProperties:!1,properties:{freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},new_name:{type:["string","null"]},node:{$ref:"#/$defs/RenamePreviewNodeV1"},note:{type:"string"},read_only:{type:"boolean"},reference_count:{format:"uint",minimum:0,type:"integer"},references:{items:{$ref:"#/$defs/RenamePreviewReferenceV1"},type:"array"},symbol:{type:"string"},text_only_matches:{items:{$ref:"#/$defs/RenamePreviewTextOnlyMatchV1"},type:"array"}},required:["read_only","note","symbol","node","reference_count","references","text_only_matches"],type:"object"},RenamePreviewReferenceV1:{additionalProperties:!1,properties:{edge_kind:{type:"string"},file:{type:"string"},from_kind:{type:"string"},from_name:{type:"string"},from_node_id:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},snippet:{type:["string","null"]}},required:["from_node_id","from_name","from_kind","edge_kind","file","line"],type:"object"},RenamePreviewTextOnlyMatchV1:{additionalProperties:!1,properties:{file:{type:"string"},note:{type:"string"},text_only_count:{format:"uint",minimum:0,type:"integer"}},required:["file","text_only_count","note"],type:"object"}},$schema:"https://json-schema.org/draft/2020-12/schema",anyOf:[{$ref:"#/$defs/RenamePreviewPrimitiveResultV1"},{$ref:"#/$defs/PrimitiveNotFoundV1"}],title:"RenamePreviewPrimitiveOutcomeV1"},{$defs:{ManifestDigest:gl,RenamePreviewAcceptanceV1:{additionalProperties:!1,description:"Exact preview material an apply must echo. Preview calls omit this value;\napply rejects any mismatch before publishing a file.",properties:{graph_revision:{$ref:"#/$defs/ManifestDigest"},plan_digest:{$ref:"#/$defs/ManifestDigest"},preview_digest:{$ref:"#/$defs/ManifestDigest"},preview_id:{$ref:"#/$defs/ManifestDigest"},repository_revision:{default:null,type:["string","null"]}},required:["preview_id","preview_digest","plan_digest","graph_revision"],type:"object"}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Exact public input accepted by `tracedecay_rename_symbol`.\n\nThe five identity fields consume the preview's exact symbol identity; the\nflattened control consumes its exact candidate-state digest.",properties:{accepted_preview:{anyOf:[{$ref:"#/$defs/RenamePreviewAcceptanceV1"},{type:"null"}],description:"Exact output identity from the accepted dry-run preview. Required when\n`dry_run=false` and omitted when computing a preview."},dry_run:{default:!0,type:"boolean"},expected_state:{description:"Exact `preview_digest`/`expected_state` returned by the dry run. Apply\nre-resolves the typed plan and rejects any candidate-state drift.",type:["string","null"]},file:{type:"string"},idempotency_key:{type:["string","null"]},kind:{type:"string"},new_name:{type:"string"},node_id:{description:"Canonical `SymbolOccurrenceId` returned by `tracedecay_rename_preview`.",type:"string"},old_name:{type:"string"},qualified_name:{type:"string"},verify:{default:!0,type:"boolean"}},required:["node_id","qualified_name","kind","file","old_name","new_name"],title:"RenameSymbolSurfaceRequestV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Exact public input accepted by `tracedecay_replace_symbol`.",properties:{dry_run:{default:!1,type:"boolean"},expected_state:{description:"Exact `preview_digest`/`expected_state` returned by the dry run. Apply\nre-resolves the typed plan and rejects any candidate-state drift.",type:["string","null"]},idempotency_key:{type:["string","null"]},new_source:{type:"string"},symbol:{type:"string"},verify:{default:!1,type:"boolean"}},required:["symbol","new_source"],title:"ReplaceSymbolSurfaceRequestV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{handle:{description:"The required `handle` argument copied exactly from a truncated MCP\nresponse envelope.",type:"string"},max_chars:{description:"Maximum characters requested for this page. Values above the safe\nresponse-frame budget are clamped.",format:"uint64",minimum:1,type:["integer","null"]},offset:{default:0,description:"Character offset into the immutable stored response (default: 0). Use\nthe prior page's next_offset.",format:"uint64",minimum:0,type:["integer","null"]}},required:["handle"],title:"RetrieveSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fE,CodeIndexConvergenceParkedV1:fA,CodeIndexStalenessStateV1:fz,PrimitiveFreshnessStateV1:gG,PrimitiveIndexingStateV1:gB,PrimitiveSearchFreshnessV1:gQ,RetrieveHandleExpiredV1:{additionalProperties:!1,description:"The record expired and was removed.",properties:{content:{description:"Always null: the expired content was removed.",type:["string","null"]},created_at:{format:"int64",type:"integer"},expired:{description:"Always `true`.",type:"boolean"},expires_at:{format:"int64",type:"integer"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},handle:{type:"string"},message:{type:"string"},reason_code:{type:"string"},retry_instruction:{type:"string"},retryable:{type:"boolean"}},required:["handle","expired","reason_code","message","retryable","retry_instruction","created_at","expires_at"],type:"object"},RetrieveHandleMissingV1:{additionalProperties:!1,description:"No record exists under the handle in this project's store.",properties:{content:{description:"Always null: nothing is stored under the handle.",type:["string","null"]},expired:{description:"Always null: an absent record has no expiry to report.",type:["boolean","null"]},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},handle:{type:"string"},message:{type:"string"},reason_code:{type:"string"},retry_instruction:{type:"string"},retryable:{type:"boolean"}},required:["handle","reason_code","message","retryable","retry_instruction"],type:"object"},RetrievedPageV1:{additionalProperties:!1,description:"One page of the stored response, sized so its response frame fits the\nresponse budget.",properties:{content:{type:"string"},created_at:{format:"int64",type:"integer"},expired:{description:"Always `false`: a page is only served from a live record.",type:"boolean"},expires_at:{format:"int64",type:"integer"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},handle:{type:"string"},has_more:{type:"boolean"},next_offset:{description:"Where the next page starts; absent on the last page.",format:"uint64",minimum:0,type:["integer","null"]},offset:{format:"uint64",minimum:0,type:"integer"},original_chars:{format:"uint64",minimum:0,type:"integer"},total_chars:{format:"uint64",minimum:0,type:"integer"}},required:["handle","expired","original_chars","total_chars","offset","has_more","created_at","expires_at","content"],type:"object"}},$schema:"https://json-schema.org/draft/2020-12/schema",anyOf:[{$ref:"#/$defs/RetrievedPageV1"},{$ref:"#/$defs/RetrieveHandleMissingV1"},{$ref:"#/$defs/RetrieveHandleExpiredV1"}],description:"What a retrieve found under the handle.",title:"RetrieveResultV1"},{$defs:{TestProfileV1:{description:"The cargo profile an affected-test run builds with.",enum:["debug","release"],type:"string"}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{changed_paths:{description:"Explicit manifest of project-relative file paths used to compute\naffected tests.",items:{type:"string"},type:"array"},max_tests:{description:"Cap on tests dispatched in a single invocation, 1 through 500\n(default: 100).",format:"uint64",maximum:500,minimum:1,type:["integer","null"]},profile:{anyOf:[{$ref:"#/$defs/TestProfileV1"},{type:"null"}],description:"Cargo profile (default: debug)."},timeout_secs:{description:"Maximum wall time in seconds before the cargo subprocess is killed,\n1 through 300 (default: 300).",format:"uint64",maximum:300,minimum:1,type:["integer","null"]}},required:["changed_paths"],title:"RunAffectedTestsSurfaceRequestV1",type:"object"},{$defs:{AffectedTestErrorV1:{additionalProperties:!1,description:"Why a run failed or was refused.",properties:{kind:{type:"string"},message:{type:"string"},operation:{type:"string"}},required:["kind","operation","message"],type:"object"},AffectedTestOutcomeV1:{additionalProperties:!1,description:"One observed libtest outcome.",properties:{covers_source_ids:{description:"Graph symbols this test was selected to cover.",items:{type:"string"},type:"array"},passed:{type:"boolean"},test:{type:"string"}},required:["test","passed","covers_source_ids"],type:"object"},AffectedTestRunV1:{additionalProperties:!1,description:"A dispatched run, completed or failed, with what it observed.",properties:{dispatched_tests:{items:{type:"string"},type:"array"},error:{anyOf:[{$ref:"#/$defs/AffectedTestErrorV1"},{type:"null"}],description:"Present when the run did not complete."},exit_code:{format:"int32",type:["integer","null"]},failed:{format:"uint64",minimum:0,type:"integer"},ignored:{description:"Dispatched tests libtest reported as ignored.",format:"uint64",minimum:0,type:"integer"},passed:{format:"uint64",minimum:0,type:"integer"},results:{items:{$ref:"#/$defs/AffectedTestOutcomeV1"},type:"array"},stderr_tail:{type:"string"},stdout_tail:{type:"string"},terminal:{$ref:"#/$defs/ManagedTestTerminalV1"},total_observed:{format:"uint64",minimum:0,type:"integer"},truncated:{description:"More affected tests existed than `max_tests` admitted.",type:"boolean"}},required:["passed","failed","ignored","total_observed","dispatched_tests","truncated","results","stderr_tail","stdout_tail","terminal"],type:"object"},AffectedTestsNotRunV1:{additionalProperties:!1,description:"No test was dispatched: nothing covers the change, or the request was\nrefused before a run began.",properties:{error:{anyOf:[{$ref:"#/$defs/AffectedTestErrorV1"},{type:"null"}]},failed:{description:"Always 0.",format:"uint64",minimum:0,type:"integer"},note:{type:["string","null"]},passed:{description:"Always 0.",format:"uint64",minimum:0,type:"integer"},results:{description:"Always empty.",items:{$ref:"#/$defs/AffectedTestOutcomeV1"},type:"array"}},required:["passed","failed","results"],type:"object"},CancellationObservation:fS,CancellationStage:fk,Deadline:hj,ManagedTestTerminalV1:{additionalProperties:!1,description:"The managed test-run operation the run was recorded under.",properties:{operation_id:{type:"string"},receipt:{$ref:"#/$defs/OperationReceipt"},result_tool:{description:"The tool that reads the recorded results back.",type:"string"},session_id:{description:"The requesting session the run is recorded against; null when the\nrequest carried no session.",type:["string","null"]}},required:["operation_id","result_tool","receipt"],type:"object"},OperationBudgetUsage:gD,OperationReceipt:gF,OperationTermination:gL,UtcMicros:vK},$schema:"https://json-schema.org/draft/2020-12/schema",anyOf:[{$ref:"#/$defs/AffectedTestRunV1"},{$ref:"#/$defs/AffectedTestsNotRunV1"}],title:"RunAffectedTestsResultV1"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{authority_audit:{default:!1,description:"Run the exhaustive observation-authority audit and include\nauthority_audit_ok (true = audit ran and passed, false = audit ran and\nfailed, null = audit did not run), authority_audit_reason (typed:\nauthority_invariant_failed, authority_store_unavailable,\nauthority_store_missing, authority_audit_not_run), and\nauthority_audit_error (observed detail) in database telemetry. Also\nincludes session-temporal health. Default false.",type:"boolean"},doctor_report:{default:!1,description:"Include the daemon-owned canonical Doctor report and typed per-table\ngrowth evidence. Default false.",type:"boolean"},session_ingest_health:{default:!1,description:"Include Cursor transcript-ingest health from the daemon-retained\nproject session authority. Default false.",type:"boolean"},session_temporal_health:{default:!1,description:"Include session-temporal health without the authority audit. Default\nfalse.",type:"boolean"},startup_health:{default:!1,description:"Ask a connection's first request for only the daemon-mounted database\nintegrity telemetry, for post-update startup validation; the daemon\ncore answers that probe before a project owner exists, and a project\nowner's snapshot already carries the same telemetry. Default false.",type:"boolean"}},title:"RuntimeSurfaceRequestV1",type:"object"},{$defs:{DoctorCoverageCompletenessV1:hT,DoctorCoverageStatementV1:{description:"A bounded, human-readable coverage statement plus its completeness.",properties:{completeness:{$ref:"#/$defs/DoctorCoverageCompletenessV1"},statement:{type:"string"}},required:["completeness","statement"],type:"object"},DoctorEvidenceRefV1:{description:"A typed reference to one piece of evidence Doctor composed into a finding.\n\nThe `family` records which audited input surface produced the evidence, so\na finding may cross-cite evidence from more than one family without losing\nprovenance.",properties:{family:{$ref:"#/$defs/DoctorFindingFamilyV1"},reference:{$ref:"#/$defs/DoctorEvidenceReferenceV1"}},required:["family","reference"],type:"object"},DoctorEvidenceReferenceV1:{description:"Durable, non-disclosing reference to one owning-authority evidence\nrecord (for example a `FeedbackFindingId`, configuration revision, or\nruntime read coverage anchor). Doctor stores the reference only; the\nowning authority remains the single source of the record.",type:"string"},DoctorEvidenceStateV1:{description:"Exact Doctor evidence states.\n\nMissing, partial, or unknown truth never becomes healthy or clean. Only\n[`DoctorEvidenceStateV1::HealthyCompleteCoverage`] asserts a healthy result,\nand only when its finding carries complete coverage (see\n[`DoctorFindingV1::new`]).",oneOf:[{const:"unsupported",description:"The owning authority does not support this evidence on this platform.",type:"string"},{const:"absent",description:"The evidence source is supported but produced nothing.",type:"string"},{const:"stale",description:"The evidence exists but is behind the current generation/watermark.",type:"string"},{const:"degraded",description:"The evidence proves a degraded but observed condition.",type:"string"},{const:"partial",description:"Only part of the evidence was observed.",type:"string"},{const:"unknown",description:"The evidence state could not be determined.",type:"string"},{const:"denied",description:"Authorization to read the evidence was denied.",type:"string"},{const:"healthy_complete_coverage",description:"The evidence proves a healthy condition with complete coverage.",type:"string"}]},DoctorFamilyConsultationV1:{description:"Whether a family was consulted from an observed source or is unavailable.",oneOf:[{description:"A source produced observed evidence for this family.",properties:{status:{const:"consulted",type:"string"}},required:["status"],type:"object"},{description:"Complete family coverage was unavailable. Storage may still carry\nfindings from resolved producers when an independent producer failed.",properties:{reason:{$ref:"#/$defs/DoctorFamilyUnavailableReasonV1"},status:{const:"unavailable",type:"string"}},required:["status","reason"],type:"object"}]},DoctorFamilyCoverageV1:{description:"The consultation status of one finding family within a report.",properties:{consultation:{$ref:"#/$defs/DoctorFamilyConsultationV1"},family:{$ref:"#/$defs/DoctorFindingFamilyV1"}},required:["family","consultation"],type:"object"},DoctorFamilyUnavailableReasonV1:{description:"Why complete coverage of a finding family was unavailable.",oneOf:[{const:"unwired",description:"No source port is wired for this family in this composition.",type:"string"},{const:"unsupported",description:"The source is unsupported on this build/platform.",type:"string"},{const:"absent",description:"The source is supported but produced nothing.",type:"string"},{const:"denied",description:"The source read was denied.",type:"string"},{const:"unknown",description:"The source state could not be determined.",type:"string"},{const:"unavailable",description:"The source could not be reached. Named separately from `Unknown`: the\nsource is identified and its unreachability is an observation, not an\nundetermined state.",type:"string"},{const:"reset_required",description:"The source must be rebuilt before it can be read again.",type:"string"},{const:"corrupt",description:"The source was read and found corrupt.",type:"string"}]},DoctorFindingFamilyV1:{description:"Stable Doctor finding families.\n\nThe initial list covers advisory findings from\nBrain, Explorer, Loom, Code, and Observatory, plus the legacy\n`core_doctor` checks (graph quick-check, temporal/migration health,\nconfiguration compatibility drift, code-index mount state, session ingest).\nEach family maps to one audited typed input surface. The set is kept small\nand honest; new families are added through a future versioned enum rather\nthan by widening the meaning of an existing variant.",oneOf:[{const:"advisory",description:"advisory/scout findings (GitHub review, CI localization,\nproximity, context scout): `crate::advisory` / domain feedback.",type:"string"},{const:"configuration",description:"Desired-versus-effective configuration and compatibility drift from\n`ProjectConfigurationRuntime` / `ConfigurationControlPlane`.",type:"string"},{const:"storage_runtime",description:"Store, graph, and temporal runtime health plus migration coverage\n(`RuntimeReadOperationV1` health family, `StoreRuntimeClientLease`).",type:"string"},{const:"storage",description:"Storage retention, size, and efficiency over canonical observability\nread models. Distinct from [`Self::StorageRuntime`] health: this\nfamily surfaces over-budget stores, identity-drift orphans, incident\ndebris, and retention backlog. The typed\nsubclass vocabulary is [`DoctorStorageFindingKindV1`].",type:"string"},{const:"language_server",description:"Language-server / analyzer engine status from the LSP gateway's\n`AnalyzerState`.",type:"string"},{const:"code_index",description:"Code index mount state (mounted, indexing, stale, unmounted,\nincompatible, parked).",type:"string"},{const:"observability",description:"Denominator-safe measurement and telemetry health from analytics,\naccounting read models, and session ingest.",type:"string"},{const:"memory",description:"Retained daemon memory as the resident-memory inventory reports it:\nRSS against the admission limit and pressure line, and each retained\nowner's bytes.",type:"string"}]},DoctorFindingV1:{description:"One canonical Doctor finding.\n\nA finding pins its diagnosis `family`, its evidence `state`, the typed\nevidence it composed, and a coverage statement. Construction enforces the\ninvariants that keep unknown/partial evidence from collapsing into a\nhealthy or clean result.",properties:{coverage:{$ref:"#/$defs/DoctorCoverageStatementV1"},evidence:{items:{$ref:"#/$defs/DoctorEvidenceRefV1"},type:"array"},family:{$ref:"#/$defs/DoctorFindingFamilyV1"},state:{$ref:"#/$defs/DoctorEvidenceStateV1"}},required:["family","state","evidence","coverage"],type:"object"},DoctorReportCoverageV1:{description:"The report-wide coverage statement: which families were consulted versus\nunavailable, plus an overall completeness and a bounded human statement.",properties:{completeness:{$ref:"#/$defs/DoctorCoverageCompletenessV1"},families:{items:{$ref:"#/$defs/DoctorFamilyCoverageV1"},type:"array"},statement:{$ref:"#/$defs/DoctorCoverageStatementV1"}},required:["families","completeness","statement"],type:"object"},DoctorReportEntryV1:{description:"One entry in a Doctor report: a canonical finding plus, for the storage\nfamily, its typed subclass. The subclass is present only for storage findings\n(a non-storage entry never carries one).",properties:{finding:{$ref:"#/$defs/DoctorFindingV1"},storage_kind:{anyOf:[{$ref:"#/$defs/DoctorStorageFindingKindV1"},{type:"null"}]}},required:["finding"],type:"object"},DoctorReportV1:{description:"One composed Doctor report.\n\nThe report carries one or more entries per family (findings are never merged\nby label) plus a coverage statement that enumerates every family consulted\nversus unavailable. Severity (the finding's evidence state) and evidence\nquality (coverage completeness) are kept as separate dimensions: a degraded\nfinding with complete coverage does not weaken report completeness, and only\ngenuinely complete coverage with every finding healthy makes the whole report\nassert health.",properties:{coverage:{$ref:"#/$defs/DoctorReportCoverageV1"},entries:{items:{$ref:"#/$defs/DoctorReportEntryV1"},type:"array"}},required:["entries","coverage"],type:"object"},DoctorStorageFindingKindV1:{description:"Typed subclasses of the [`DoctorFindingFamilyV1::Storage`] finding family.\n\nThe storage family never reports a silent overage: each subclass names one\nobservable retention/size condition Doctor surfaces over canonical size\nobservability read models. The set is closed and grows only through a future\nversioned enum, never by widening an existing subclass.",oneOf:[{const:"over_budget_store",description:"A store exceeds its owner-configured soft size budget.",type:"string"},{const:"orphan_store",description:"A store whose project identity no longer resolves to a live repository\nroot (identity-drift orphan), reported with age and size.",type:"string"},{const:"incident_debris_present",description:"Recovery/corruption artifacts are present beside a store and awaiting\ndeletion.",type:"string"},{const:"retention_backlog",description:"Retention-eligible rows or stores are past their window and awaiting\noffload/collection.",type:"string"},{const:"table_growth",description:"Per-table SQLite payload growth observed between two retained\nwatermarks, including baseline and unavailable measurement states.",type:"string"},{const:"pending_schema_migration",description:"A store whose historical schema convergence has not completed: the\nmigrations whose cost scales with store size are still pending, still\nrunning, or stopped on a failure. The daemon serves while they run, so\nthis is the surface that says which store is still migrating and why.",type:"string"}]},LanguageServerAnalyzerStateV1:{description:"State of one analyzer as the daemon owner holds it.\n\n`Inactive` is the one state the aggregate never takes: the language has no\nfiles in the project, so Doctor does not grade it, but `lsp servers` still\nlists it from this same read so both surfaces share one authority.",enum:["ready","available","refreshing","disabled","unavailable","crashed","inactive"],type:"string"},LanguageServerAnalyzerV1:{description:"Live state of one analyzer the daemon resolved for the current project.\n\n`LanguageServerStateV1` is the aggregate the finding is graded on; this is\nthe per-analyzer evidence behind it, so an operator learns *which*\nexecutable is missing and how to install it, resolved by the daemon\nprocess (the only PATH that matters, since the daemon spawns analyzers)\nrather than by whichever shell ran the CLI.",properties:{command:{description:"The configured executable, after any operator command override.",type:"string"},detail:{description:"The owner's last recorded error for this analyzer, when one exists.",type:["string","null"]},executable_found:{description:"Whether the daemon process finds `command` on its own PATH. For an\nactive analyzer `state` is the finer verdict (a rustup proxy whose\ntoolchain lacks the component is found yet `Unavailable`); for an\ninactive one this is the only availability evidence.",type:"boolean"},install:{description:"The first install command the adapter advertises, when one exists.",type:["string","null"]},language:{description:"Adapter language (`typescript`, `rust`, …).",type:"string"},state:{$ref:"#/$defs/LanguageServerAnalyzerStateV1"}},required:["language","command","state","executable_found"],type:"object"},LanguageServerReadV1:{description:"One live read from the daemon language-server/analyzer owner.",oneOf:[{description:"The owner observed all project-active analyzer states.",properties:{analyzers:{default:[],description:"Every analyzer the owner resolved, active or not; the aggregate\n`state` covers the active ones only.",items:{$ref:"#/$defs/LanguageServerAnalyzerV1"},type:"array"},coverage:{$ref:"#/$defs/DoctorCoverageCompletenessV1"},kind:{const:"observed",type:"string"},state:{$ref:"#/$defs/LanguageServerStateV1"}},required:["kind","state","coverage"],type:"object"},{description:"Language-server inspection is unsupported on this build/platform.",properties:{kind:{const:"unsupported",type:"string"}},required:["kind"],type:"object"},{description:"No project-active analyzer is configured. The owner's inactive\nanalyzers are still carried so `lsp servers` can list them.",properties:{analyzers:{default:[],items:{$ref:"#/$defs/LanguageServerAnalyzerV1"},type:"array"},kind:{const:"absent",type:"string"}},required:["kind"],type:"object"},{description:"Authorization to inspect analyzer state was denied.",properties:{kind:{const:"denied",type:"string"}},required:["kind"],type:"object"},{description:"Analyzer state could not be determined.",properties:{kind:{const:"unknown",type:"string"}},required:["kind"],type:"object"}]},LanguageServerStateV1:{description:"Aggregate state of the project-active language-server analyzers.",oneOf:[{const:"ready",description:"Every active analyzer is ready.",type:"string"},{const:"available",description:"At least one analyzer is installed but has not produced a ready snapshot.",type:"string"},{const:"refreshing",description:"At least one analyzer is currently refreshing/indexing.",type:"string"},{const:"disabled",description:"At least one project analyzer is disabled.",type:"string"},{const:"unavailable",description:"At least one project analyzer executable is unavailable.",type:"string"},{const:"crashed",description:"At least one analyzer process crashed.",type:"string"}]},RuntimeDoctorReportV1:{description:"The daemon's canonical Doctor report as this route could read it.",oneOf:[{additionalProperties:!1,properties:{kind:{const:"observed",type:"string"},language_servers:{$ref:"#/$defs/LanguageServerReadV1"},report:{$ref:"#/$defs/DoctorReportV1"},schema_convergences:{items:{$ref:"#/$defs/SchemaConvergenceFindingV1"},type:"array"},table_growth_evidence:{items:{$ref:"#/$defs/TableGrowthDoctorEvidenceV1"},type:"array"}},required:["kind","report","table_growth_evidence","schema_convergences","language_servers"],type:"object"},{additionalProperties:!1,description:"The reader is mounted and the read failed.",properties:{kind:{const:"unknown",type:"string"},language_servers:{$ref:"#/$defs/LanguageServerReadV1"},schema_convergences:{items:{$ref:"#/$defs/SchemaConvergenceFindingV1"},type:"array"},table_growth_evidence:{items:{$ref:"#/$defs/TableGrowthDoctorEvidenceV1"},type:"array"}},required:["kind","table_growth_evidence","schema_convergences","language_servers"],type:"object"},{additionalProperties:!1,description:"No Doctor reader is mounted on this route.",properties:{kind:{const:"unsupported",type:"string"},language_servers:{$ref:"#/$defs/LanguageServerReadV1"},schema_convergences:{items:{$ref:"#/$defs/SchemaConvergenceFindingV1"},type:"array"},table_growth_evidence:{items:{$ref:"#/$defs/TableGrowthDoctorEvidenceV1"},type:"array"}},required:["kind","table_growth_evidence","schema_convergences","language_servers"],type:"object"}]},SchemaConvergenceFindingV1:_D,SchemaConvergenceProgressV1:_F,SchemaConvergenceStageV1:_L,SchemaConvergenceStateV1:_U,StorageByteSizeV1:{description:"A byte size measurement. A newtype keeps sizes from being confused with\ncounts, ratios, or timestamps in the read models and producers.",format:"uint64",minimum:0,type:"integer"},StoreKeyV1:{description:"Logical name of one owner-profile store (for example `sessions.db`,\n`graph.db`, or `projects/proj_x`). Never an absolute on-disk path.",type:"string"},TableGrowthDoctorEvidenceV1:{description:"Contract-independent evidence ready to wrap in a future `TableGrowth`\nStorage finding once that generated-contract variant is available.",oneOf:[{properties:{current_bytes:{$ref:"#/$defs/StorageByteSizeV1"},current_observed_at:{$ref:"#/$defs/UtcMicros"},growth_bytes:{$ref:"#/$defs/StorageByteSizeV1"},kind:{const:"significant_growth",type:"string"},previous_bytes:{$ref:"#/$defs/StorageByteSizeV1"},previous_observed_at:{$ref:"#/$defs/UtcMicros"},store:{$ref:"#/$defs/StoreKeyV1"},table:{$ref:"#/$defs/TableNameV1"}},required:["kind","store","table","previous_bytes","current_bytes","growth_bytes","previous_observed_at","current_observed_at"],type:"object"},{properties:{kind:{const:"baseline_established",type:"string"},observed_at:{$ref:"#/$defs/UtcMicros"},store:{$ref:"#/$defs/StoreKeyV1"},tables_observed:{format:"uint64",minimum:0,type:"integer"}},required:["kind","store","observed_at","tables_observed"],type:"object"},{properties:{current_bytes:{$ref:"#/$defs/StorageByteSizeV1"},kind:{const:"table_baseline_pending",type:"string"},observed_at:{$ref:"#/$defs/UtcMicros"},store:{$ref:"#/$defs/StoreKeyV1"},table:{$ref:"#/$defs/TableNameV1"}},required:["kind","store","table","current_bytes","observed_at"],type:"object"},{properties:{kind:{const:"unsupported",type:"string"},store:{$ref:"#/$defs/StoreKeyV1"}},required:["kind","store"],type:"object"},{properties:{kind:{const:"denied",type:"string"},store:{$ref:"#/$defs/StoreKeyV1"}},required:["kind","store"],type:"object"},{properties:{kind:{const:"unknown",type:"string"},store:{$ref:"#/$defs/StoreKeyV1"}},required:["kind","store"],type:"object"}]},TableNameV1:{description:"A physical table name inside a store, used for per-table growth telemetry.",type:"string"},UtcMicros:vK},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Process, database, and session-observation telemetry for the running\ndaemon, with the sections the request opted into.",properties:{captured_at:{description:"Unix epoch seconds.",format:"uint64",minimum:0,type:"integer"},cursor_session_ingest:!0,cursor_session_placeholder_paths:{items:{type:"string"},type:["array","null"]},database:{description:"Store telemetry, with the authority-audit verdict when it ran."},doctor_report:{anyOf:[{$ref:"#/$defs/RuntimeDoctorReportV1"},{type:"null"}]},host_os:{type:"string"},process:{description:"Cached process sample."},session_temporal_health:!0,tracedecay_version:{type:"string"}},required:["captured_at","tracedecay_version","host_os","process","database"],title:"RuntimeResultV1",type:"object"},{$defs:{SearchLexicalAliasV1:{additionalProperties:!1,description:"One named query-time vocabulary alias.",properties:{alternative:{maxLength:128,type:"string"},strict_query:{maxLength:128,type:"string"}},required:["strict_query","alternative"],type:"object"},SearchLexicalFieldFilterV1:{additionalProperties:!1,properties:{field:{$ref:"#/$defs/SearchLexicalFieldV1"},include:{type:"boolean"}},required:["field","include"],type:"object"},SearchLexicalFieldV1:{description:"A lexical posting field a search may include or exclude.",enum:["symbol_name","qualified_name","path","signature","documentation","body_text","preamble_text","exact_term","subtoken"],type:"string"},SearchLexicalProximityV1:{additionalProperties:!1,description:"Ordered terms that must occur in one field within `maximum_gap`\nintervening tokens of each other.",properties:{maximum_gap:{format:"uint32",maximum:8,minimum:0,type:"integer"},terms:{items:{type:"string"},maxItems:8,minItems:2,type:"array"}},required:["terms","maximum_gap"],type:"object"}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{cursor:{description:"Authenticated opaque continuation returned as next_cursor. Repeat the same query and lexical options with it.",type:["string","null"]},lazy_index_ignored_dependencies:{description:"Opt in to bounded indexing of ignored dependency entry files when an import hint matches (default: false).",type:["boolean","null"]},lexical_aliases:{description:"Named query-time vocabulary aliases. The strict query always ranks first. Alias-only hits follow it with the strict query, alternative, and configured-vocabulary reason disclosed.",items:{$ref:"#/$defs/SearchLexicalAliasV1"},maxItems:8,type:["array","null"]},lexical_anchors:{description:"Exact identifiers or technical terms (e.g. 'reserve_stock', 'Foo::bar', 'E0308') that the answer must be about. Each is ranked through the lexical lane as its own route: a hit carrying an anchor outranks every hit that carries none, exact hits included, every anchor with matches keeps at least its best sites through the lane cap, and `lexical_anchors` in the response reports each anchor's outcome (`matched` rows, `admitted` sites this response returns, `dropped` admitted sites it could not carry with the reason, `unmatched`, or `not_served`). Ranked retrieval, not exhaustive grep (use tracedecay_grep for that). Each result names the routes that ranked it. At most 8 anchors, each one whitespace-free term of at most 128 bytes, no repeats.",items:{type:"string"},maxItems:8,type:["array","null"]},lexical_field_filters:{description:"Include or exclude lexical symbol_name, qualified_name, path, signature, documentation, body_text, preamble_text, exact_term, or subtoken fields.",items:{$ref:"#/$defs/SearchLexicalFieldFilterV1"},maxItems:9,type:["array","null"]},lexical_phrases:{description:"Exact lexical phrases to rank through n-gram candidate pruning.",items:{type:"string"},maxItems:4,type:["array","null"]},lexical_proximities:{description:"Ordered lexical terms that must occur within the bounded intervening-token gap.",items:{$ref:"#/$defs/SearchLexicalProximityV1"},maxItems:4,type:["array","null"]},limit:{description:"Maximum number of results to return (default: 10)",format:"uint64",minimum:0,type:["integer","null"]},prefer_symbol:{description:"Add a lexical route restricted to symbol-name matches for the identifier-shaped words of the query. Omitted, it runs when the query is name-shaped (at least half its content words are identifiers such as 'getUserById' or 'Foo::bar'); true forces it, false suppresses it. `query_route` in the response reports the decision and its margin. Query words such as class/struct/function/find/explain are ignored; 'Foo::bar' and 'Foo.bar' contribute 'bar'.",type:["boolean","null"]},query:{description:"Search query string to match against symbol names",type:"string"}},required:["query"],title:"SearchSurfaceRequestV1",type:"object"},{$defs:{ApplicationProblemDetailV1:{description:"The structured facts behind a problem. Adapters read these fields; the\nproblem's `message` is only their one human rendering.",oneOf:[{additionalProperties:!1,description:"The worktree's code index is parked until the operator applies\n`remedy`; repeating the request cannot change the answer.",properties:{cause:{type:"string"},kind:{const:"parked",type:"string"},remedy:{type:"string"},retries_on_wake:{type:"boolean"}},required:["kind","cause","remedy","retries_on_wake"],type:"object"},{additionalProperties:!1,description:"A session refresh asked to begin from a source frontier the\ncommitted projection has already passed.",properties:{active:{format:"uint64",minimum:0,type:"integer"},committed:{format:"uint64",minimum:0,type:"integer"},kind:{const:"stale_refresh_frontier",type:"string"},requested:{format:"uint64",minimum:0,type:"integer"}},required:["kind","requested","committed","active"],type:"object"},{additionalProperties:!1,description:"A compare-and-swap request named `requested` in `field`, but the\nauthority holds `current`. Resending with `current` is a new request.",properties:{current:{format:"uint64",minimum:0,type:"integer"},field:{type:"string"},kind:{const:"stale_precondition",type:"string"},requested:{format:"uint64",minimum:0,type:"integer"}},required:["kind","field","requested","current"],type:"object"},{additionalProperties:!1,description:"A workflow step effect named placement digest `found`, but the step's\ncurrent placement is `expected`: the effect was settled against a\nplacement the run has since replaced.",properties:{expected:{type:"string"},found:{type:"string"},kind:{const:"workflow_placement_digest_stale",type:"string"}},required:["kind","expected","found"],type:"object"},{additionalProperties:!1,description:"A writer lock stayed held by other writers past its admission\ndeadline.",properties:{deadline_ms:{format:"uint64",minimum:0,type:"integer"},kind:{const:"lock_deadline",type:"string"},resource:{type:"string"}},required:["kind","resource","deadline_ms"],type:"object"},{additionalProperties:!1,description:"A persisted store whose shape this binary does not open. It is served\nin this typed state until the operator runs `remedy`, which deletes\nthe old data; nothing is migrated or backed up.",properties:{authority:{type:"string"},found_version:{format:"int64",type:["integer","null"]},kind:{const:"reset_required",type:"string"},reason:{type:"string"},remedy:{type:"string"},required_version:{format:"int64",type:["integer","null"]}},required:["kind","authority","reason","remedy"],type:"object"},{additionalProperties:!1,description:"No compiler runs automatically for the diagnostics scope: no tsconfig\nowns `file`, or, for a workspace read (`file` null), none exists under\nthe project root. `searched` lists the owner search's candidates,\nnearest first; it is empty for a workspace read or a file outside the\nproject root.",properties:{file:{type:["string","null"]},kind:{const:"diagnostics_unsupported",type:"string"},searched:{items:{$ref:"#/$defs/DiagnosticsSearchedTsconfigV1"},type:"array"}},required:["kind","searched"],type:"object"},{additionalProperties:!1,description:"The TypeScript `producer` has not published diagnostics for the\ncurrent code generation yet. `generation` is the last generation it\npublished, null when it has published none.",properties:{generation:{type:["string","null"]},kind:{const:"diagnostics_pending",type:"string"},producer:{type:"string"}},required:["kind","producer"],type:"object"},{additionalProperties:!1,description:"The code graph's engine or catalog was released for memory and was\nstill warming again when the read's budget ran out;\n`retry_after_millis` is the measured warm-up it still needs.",properties:{kind:{const:"code_graph_rewarming",type:"string"},retry_after_millis:{format:"uint64",minimum:0,type:"integer"}},required:["kind","retry_after_millis"],type:"object"},{additionalProperties:!1,description:"No TraceDecay daemon accepts connections on `socket`. `named_by` is\nthe environment variable that chose the socket, when one did;\n`service_unit` is what this client observed of the managed service.",properties:{kind:{const:"daemon_unreachable",type:"string"},named_by:{type:["string","null"]},service_unit:{$ref:"#/$defs/DaemonServiceUnitObservationV1"},socket:{type:"string"}},required:["kind","socket","service_unit"],type:"object"}]},CalibrationProfileId:fb,CandidateContribution:fw,CodeIndexBuildBlockedReasonV1:fE,CodeIndexConvergenceParkedV1:fA,CodeIndexStalenessStateV1:fz,ComponentRevision:fK,ContextLexicalAnchorV1:f3,DaemonServiceUnitObservationV1:{description:"The managed daemon service unit as a client observed it, from the unit\nfile alone.",oneOf:[{additionalProperties:!1,properties:{state:{const:"not_installed",type:"string"}},required:["state"],type:"object"},{additionalProperties:!1,description:"The unit file could not be read.",properties:{error:{type:"string"},state:{const:"unobservable",type:"string"}},required:["state","error"],type:"object"},{additionalProperties:!1,description:"The unit file at `path` serves the socket `serves`.",properties:{path:{type:"string"},serves:{type:"string"},state:{const:"installed",type:"string"}},required:["state","path","serves"],type:"object"}]},DiagnosticsSearchedTsconfigV1:{additionalProperties:!1,description:"One tsconfig location the diagnostics owner search checked.",properties:{path:{description:"Relative to the project root, forward-slash separated.",type:"string"},present:{description:"The config exists, but neither it nor its references include the\nfile.",type:"boolean"}},required:["path","present"],type:"object"},EvidenceRole:hM,ExactClass:hW,FileOccurrenceId:yu,FixedPointScore:yf,FreshnessCompatibilityV1:yh,FusedCandidate:yy,LexicalAnchorDropReasonV1:ge,LexicalAnchorDropV1:gt,LogicalCopyClusterId:gi,LogicalEvidenceId:go,OccurrenceProvenance:gz,PrimitiveFreshnessStateV1:gG,PrimitiveIndexingStateV1:gB,PrimitiveLaneCompleteV1:gK,PrimitiveRecallV1:gZ,PrimitiveSearchFreshnessV1:gQ,PrimitiveUnavailableEvidenceV1:g1,PrimitiveUnavailableStatusV1:g0,RankingDecision:_l,RankingDecisionKind:_p,RepositoryId:_v,RetrievalAnchorId:_q,RetrieverKind:_C,ScoreDomainId:_0,SearchCompleteV1:{additionalProperties:!1,properties:{code_generation:{type:"string"},coverage:{$ref:"#/$defs/SearchCoverageV1"},external_import_hint:{anyOf:[{$ref:"#/$defs/SearchExternalImportHintV1"},{type:"null"}]},freshness:{$ref:"#/$defs/PrimitiveSearchFreshnessV1",description:"Freshness of the served code generation, derived from the typed lane\ncoverage and the daemon scheduler's worktree state."},lexical_anchors:{description:"Outcome of every caller `lexical_anchors` entry, beside the routes.",items:{$ref:"#/$defs/ContextLexicalAnchorV1"},type:["array","null"]},lexical_routes:{description:"Every lexical route fused into this page; present only when a route\nbeyond the strict query ran or ranked a result.",items:{$ref:"#/$defs/SearchLexicalRouteV1"},type:["array","null"]},next_cursor:{description:"Authenticated continuation for the next page; null on the last page.",type:["string","null"]},query_fallback_digest:{type:"string"},query_route:{anyOf:[{$ref:"#/$defs/SearchQueryRouteV1"},{type:"null"}],description:"Which lane the query's shape selected, and its margin."},results:{items:{$ref:"#/$defs/SearchResultRowV1"},type:"array"},scope_prefix:{description:"The session's scope prefix. Ranked candidates carry no file path, so\nthe scope is reported and not applied.",type:["string","null"]},scope_prefix_applied:{type:["boolean","null"]},verified_graph_evidence:{anyOf:[{$ref:"#/$defs/PrimitiveUnavailableEvidenceV1"},{type:"null"}]}},required:["freshness","code_generation","query_fallback_digest","coverage","results"],type:"object"},SearchCoverageV1:{additionalProperties:!1,description:"Per-lane recall of one search, so a full-recall answer is told apart from\none produced while a lane was down.",properties:{exact:{$ref:"#/$defs/SearchLaneStatusV1"},graph:{$ref:"#/$defs/SearchLaneStatusV1"},lexical:{$ref:"#/$defs/SearchLaneStatusV1"},recall:{$ref:"#/$defs/PrimitiveRecallV1"}},required:["exact","lexical","graph","recall"],type:"object"},SearchDisplayUnavailableV1:{description:"Why a ranked candidate's display metadata was not hydrated: the answering\ngeneration no longer matches the request (`stale`), its record is\nincompatible or does not bind the candidate (`incompatible`, `invalid`),\nthe read failed (`internal`), the hydration budget was spent\n(`budget_exceeded`), or the request was cancelled (`cancelled`).",enum:["stale","incompatible","invalid","internal","budget_exceeded","cancelled"],type:"string"},SearchExternalImportCandidatesV1:{additionalProperties:!1,properties:{candidates:{items:{$ref:"#/$defs/SearchExternalImportV1"},type:"array"},evidence:{type:"string"},message:{type:"string"},resolution_status:{type:"string"},suggested_action:{type:"string"}},required:["message","evidence","resolution_status","candidates","suggested_action"],type:"object"},SearchExternalImportHintV1:{anyOf:[{$ref:"#/$defs/SearchExternalImportCandidatesV1"},{$ref:"#/$defs/PrimitiveUnavailableEvidenceV1"}],description:"Advisory evidence that a sparse search matched external-module imports,\nor why that evidence could not be read."},SearchExternalImportV1:{additionalProperties:!1,properties:{import_file:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},module:{type:"string"},symbol:{description:"The imported name; null for a whole-module import.",type:["string","null"]}},required:["module","import_file","line"],type:"object"},SearchLaneStateV1:{description:"A lane that did not serve the current complete generation. A partial\nlane names its generation and reason when it has them, null otherwise.",oneOf:[{additionalProperties:!1,properties:{generation:{type:"string"},status:{const:"stale",type:"string"}},required:["status","generation"],type:"object"},{additionalProperties:!1,properties:{generation:{type:["string","null"]},reason:{type:["string","null"]},status:{const:"partial",type:"string"}},required:["status"],type:"object"},{additionalProperties:!1,properties:{reason:{type:"string"},status:{const:"unavailable",type:"string"}},required:["status","reason"],type:"object"}]},SearchLaneStatusV1:{anyOf:[{$ref:"#/$defs/PrimitiveLaneCompleteV1"},{$ref:"#/$defs/SearchLaneStateV1"}]},SearchLexicalAlternativeReasonV1:{description:"Why the lexical lane tried a configured alternative.",enum:["configured_vocabulary_alias"],type:"string"},SearchLexicalRouteV1:{description:"One lexical route fused into the page, with its display label.",oneOf:[{additionalProperties:!1,description:"The caller's strict lexical query.",properties:{label:{type:"string"},route:{const:"query",type:"string"}},required:["route","label"],type:"object"},{additionalProperties:!1,description:"One caller-supplied exact identifier or term.",properties:{anchor:{type:"string"},label:{type:"string"},route:{const:"anchor",type:"string"}},required:["route","anchor","label"],type:"object"},{additionalProperties:!1,description:"Identifier-shaped tokens of the query, restricted to symbol names.",properties:{label:{type:"string"},route:{const:"preferred_symbol",type:"string"},tokens:{items:{type:"string"},type:"array"}},required:["route","tokens","label"],type:"object"},{additionalProperties:!1,description:"Identifier and path components recovered from the strict query.",properties:{label:{type:"string"},route:{const:"identifier_split",type:"string"},strict_query:{type:"string"},terms:{items:{type:"string"},type:"array"}},required:["route","strict_query","terms","label"],type:"object"},{additionalProperties:!1,description:"A configured query-time vocabulary alternative.",properties:{alternative:{type:"string"},label:{type:"string"},reason:{$ref:"#/$defs/SearchLexicalAlternativeReasonV1"},route:{const:"alias",type:"string"},strict_query:{type:"string"}},required:["route","strict_query","alternative","reason","label"],type:"object"}]},SearchQueryRouteDeciderV1:{description:"Who chose the query route: the query-shape gate or the caller's\n`prefer_symbol`.",enum:["query_shape","caller"],type:"string"},SearchQueryRouteKindV1:{description:"Which lexical lane the query's shape selected.",oneOf:[{const:"name",description:"The symbol-name route ran beside the strict query.",type:"string"},{const:"prose",description:"The strict query ran without the symbol-name route.",type:"string"}]},SearchQueryRouteV1:{additionalProperties:!1,description:"The query-shape routing decision behind a page.",properties:{decided_by:{$ref:"#/$defs/SearchQueryRouteDeciderV1"},margin:{description:"Distance from the name gate in [-0.5, 0.5]: the share of the query's\ncontent words that are identifier-shaped, minus one half. The gate\nselects `name` at or above 0. Reported when the caller decided too.\nIt describes query shape only and is not an answerability signal.",format:"double",type:"number"},route:{$ref:"#/$defs/SearchQueryRouteKindV1"}},required:["route","margin","decided_by"],type:"object"},SearchResultDisplayV1:{additionalProperties:!1,properties:{kind:{type:"string"},name:{type:"string"},path:{type:"string"},qualified_name:{type:"string"}},required:["name","qualified_name","kind","path"],type:"object"},SearchResultRowV1:{additionalProperties:!1,description:"One ranked candidate with its generation-bound display metadata.",properties:{candidate:{$ref:"#/$defs/FusedCandidate"},display:{anyOf:[{$ref:"#/$defs/SearchResultDisplayV1"},{type:"null"}]},display_unavailable:{anyOf:[{$ref:"#/$defs/SearchDisplayUnavailableV1"},{type:"null"}],description:"Why `display` is absent from this ranked candidate."},final_ordinal:{format:"uint32",minimum:0,type:"integer"},lexical_routes:{description:"The lexical routes that ranked this candidate.",items:{$ref:"#/$defs/SearchRouteMatchV1"},type:["array","null"]},node_id:{description:"The graph symbol to read with `tracedecay_source_body`.",type:["string","null"]}},required:["candidate","final_ordinal"],type:"object"},SearchRouteMatchV1:{additionalProperties:!1,description:"One route that ranked a candidate, named by its route label.",properties:{matched_terms:{items:{type:"string"},type:"array"},route:{type:"string"},score_micros:{format:"uint64",minimum:0,type:"integer"},spelling_variants:{items:{$ref:"#/$defs/SearchSpellingVariantV1"},type:"array"}},required:["route","score_micros","matched_terms"],type:"object"},SearchSpellingVariantV1:{additionalProperties:!1,properties:{alternative:{type:"string"},query:{type:"string"}},required:["query","alternative"],type:"object"},SearchUnavailableV1:{additionalProperties:!1,properties:{code_generation:{type:["string","null"]},coverage:{$ref:"#/$defs/SearchCoverageV1"},detail:{anyOf:[{$ref:"#/$defs/ApplicationProblemDetailV1"},{type:"null"}],description:"Present when indexing is parked: its cause, remedy, and wake retry."},freshness:{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},query_fallback_digest:{description:"Always null: no fallback subpayload was produced.",type:["string","null"]},reason:{type:"string"},results:{description:"Always empty: no generation answered.",items:{$ref:"#/$defs/SearchResultRowV1"},type:"array"},status:{$ref:"#/$defs/PrimitiveUnavailableStatusV1"},verified_graph_evidence:{anyOf:[{$ref:"#/$defs/PrimitiveUnavailableEvidenceV1"},{type:"null"}]}},required:["freshness","results","status","reason","coverage"],type:"object"},SessionOrThreadId:_8,SourceFreshness:vh,SourceInstanceKey:vy,SourceNamespace:v_,SourceOccurrenceId:vv,UtcMicros:vK},$schema:"https://json-schema.org/draft/2020-12/schema",anyOf:[{$ref:"#/$defs/SearchCompleteV1"},{$ref:"#/$defs/SearchUnavailableV1"}],description:"What a search served: a ranked page, or the typed reason no generation\ncould answer.",title:"SearchResultV1"},{$defs:{PageRequest:gU,ResultProjection:_w,RetrievalOrder:_I,RetrievalRequestMeta:_x,SessionId:_5,TemporalModeV1:vA,UtcMicros:vK},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{meta:{$ref:"#/$defs/RetrievalRequestMeta"},session_id:{$ref:"#/$defs/SessionId"}},required:["session_id","meta"],title:"SessionLookupRequest",type:"object"},{$defs:{RetrievalAnchorId:_q},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{anchors:{items:{$ref:"#/$defs/RetrievalAnchorId"},type:"array"}},required:["anchors"],title:"SessionLookupResult",type:"object"},{$defs:{SessionRefreshFrontierV1:{additionalProperties:!1,properties:{committed_through:{format:"uint64",minimum:0,type:"integer"},observed_through:{format:"uint64",minimum:0,type:"integer"}},required:["observed_through","committed_through"],type:"object"},SessionRefreshGrainV1:{enum:["occurrence","logical_message","turn","session","thread","agent","summary"],type:"string"},SessionRefreshScopeV1:{description:"Session-store owner one refresh is bound to.\n\nThe caller selects the already-mounted project or profile authority. Exact\nprofile, project, repository, worktree, branch, store, and root identities\nstay daemon-owned and are resolved from that authority during admission.",oneOf:[{additionalProperties:!1,properties:{kind:{const:"project",type:"string"}},required:["kind"],type:"object"},{additionalProperties:!1,properties:{kind:{const:"profile",type:"string"}},required:["kind"],type:"object"}]},SessionRefreshSessionV1:{additionalProperties:!1,properties:{id:{type:"string"}},required:["id"],type:"object"},SessionRefreshSourceV1:{additionalProperties:!1,properties:{scope:{type:"string"}},required:["scope"],type:"object"},SessionRefreshTargetV1:{additionalProperties:!1,properties:{frontier:{$ref:"#/$defs/SessionRefreshFrontierV1"},grain:{$ref:"#/$defs/SessionRefreshGrainV1"},temporal_mode:{$ref:"#/$defs/TemporalModeV1"}},required:["temporal_mode","grain","frontier"],type:"object"},TemporalModeV1:vA,UtcMicros:vK},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Exact route-selected session-refresh request body.\n\nEach current route selects the action itself; `scope` selects the mounted\nsession-store owner. Project-scoped requests are served under project-open\nadmission, profile-scoped requests by the authenticated profile authority.",properties:{handle:{type:["string","null"]},scope:{$ref:"#/$defs/SessionRefreshScopeV1"},session:{$ref:"#/$defs/SessionRefreshSessionV1"},source:{$ref:"#/$defs/SessionRefreshSourceV1"},target:{$ref:"#/$defs/SessionRefreshTargetV1"}},required:["scope","session","source","target"],title:"SessionRefreshActionRequestV1",type:"object"},{$defs:{ClosedUtcIntervalV1:fx,RetainedErrorV1:_R,RetainedOutcomeStatusV1:_P,SessionCoverageIntervalV1:_4,SessionCoverageReasonV1:_6,SessionCoverageRequestV1:_3,SessionCoverageStateV1:_9,SessionRefreshFrontierResultV1:_7,SessionRefreshProgressV1:ve,SessionRefreshReceiptV1:vt,SessionRefreshTerminalStateResultV1:vr,SessionSourceCoverageV1:vo,TemporalCoverageV1:vT,TemporalModeV1:vA,UtcMicros:vK,ValidCoverageIntervalV1:vJ},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{accepted_at:{format:"int64",type:["integer","null"]},error:{anyOf:[{$ref:"#/$defs/RetainedErrorV1"},{type:"null"}]},handle:{type:["string","null"]},operation_id:{type:["string","null"]},outcome:{$ref:"#/$defs/RetainedOutcomeStatusV1"},progress:{anyOf:[{$ref:"#/$defs/SessionRefreshProgressV1"},{type:"null"}]},receipt:{anyOf:[{$ref:"#/$defs/SessionRefreshReceiptV1"},{type:"null"}]},scope:{type:"string"},tool:{type:"string"}},required:["outcome","scope","tool"],title:"SessionRefreshBeginResultV1",type:"object"},{$defs:{ClosedUtcIntervalV1:fx,RetainedErrorV1:_R,RetainedOutcomeStatusV1:_P,SessionCoverageIntervalV1:_4,SessionCoverageReasonV1:_6,SessionCoverageRequestV1:_3,SessionCoverageStateV1:_9,SessionRefreshFrontierResultV1:_7,SessionRefreshProgressV1:ve,SessionRefreshReceiptV1:vt,SessionRefreshTerminalStateResultV1:vr,SessionSourceCoverageV1:vo,TemporalCoverageV1:vT,TemporalModeV1:vA,UtcMicros:vK,ValidCoverageIntervalV1:vJ},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{accepted_at:{format:"int64",type:["integer","null"]},error:{anyOf:[{$ref:"#/$defs/RetainedErrorV1"},{type:"null"}]},handle:{type:["string","null"]},operation_id:{type:["string","null"]},outcome:{$ref:"#/$defs/RetainedOutcomeStatusV1"},progress:{anyOf:[{$ref:"#/$defs/SessionRefreshProgressV1"},{type:"null"}]},receipt:{anyOf:[{$ref:"#/$defs/SessionRefreshReceiptV1"},{type:"null"}]},scope:{type:"string"},tool:{type:"string"}},required:["outcome","scope","tool"],title:"SessionRefreshCancelResultV1",type:"object"},{$defs:{ClosedUtcIntervalV1:fx,RetainedErrorV1:_R,RetainedOutcomeStatusV1:_P,SessionCoverageIntervalV1:_4,SessionCoverageReasonV1:_6,SessionCoverageRequestV1:_3,SessionCoverageStateV1:_9,SessionRefreshFrontierResultV1:_7,SessionRefreshProgressV1:ve,SessionRefreshReceiptV1:vt,SessionRefreshTerminalStateResultV1:vr,SessionSourceCoverageV1:vo,TemporalCoverageV1:vT,TemporalModeV1:vA,UtcMicros:vK,ValidCoverageIntervalV1:vJ},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{error:{anyOf:[{$ref:"#/$defs/RetainedErrorV1"},{type:"null"}]},outcome:{$ref:"#/$defs/RetainedOutcomeStatusV1"},progress:{anyOf:[{$ref:"#/$defs/SessionRefreshProgressV1"},{type:"null"}]},receipt:{anyOf:[{$ref:"#/$defs/SessionRefreshReceiptV1"},{type:"null"}]},scope:{type:"string"},tool:{type:"string"}},required:["outcome","scope","tool"],title:"SessionRefreshStatusResultV1",type:"object"},{$defs:{RetainedTimeFilterV1:_V,SessionGitRefV1:{enum:["branch","worktree","commit"],type:"string"},SessionGitRelationV1:{enum:["produced","observed","all"],type:"string"}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{git_ref:{$ref:"#/$defs/SessionGitRefV1"},limit:{format:"uint64",minimum:0,type:["integer","null"]},relation:{anyOf:[{$ref:"#/$defs/SessionGitRelationV1"},{type:"null"}]},since:{anyOf:[{$ref:"#/$defs/RetainedTimeFilterV1"},{type:"null"}]},until:{anyOf:[{$ref:"#/$defs/RetainedTimeFilterV1"},{type:"null"}]},value:{type:"string"}},required:["git_ref","value"],title:"SessionsForRequestV1",type:"object"},{$defs:{CorrelationIndexCountModeV1:{enum:["presence_only"],type:"string"},CorrelationIndexV1:{additionalProperties:!1,properties:{backfill_watermark:{format:"int64",type:["integer","null"]},commit_count:{format:"uint64",minimum:0,type:["integer","null"]},commits_present:{type:"boolean"},count_mode:{$ref:"#/$defs/CorrelationIndexCountModeV1"},generation:{type:["string","null"]},projection_available:{type:"boolean"},source_watermark:{type:["string","null"]},span_count:{format:"uint64",minimum:0,type:["integer","null"]},spans_present:{type:"boolean"}},required:["projection_available","spans_present","commits_present","count_mode"],type:"object"},RetainedOutcomeStatusV1:_P,SessionCorrelationHitV1:{additionalProperties:!1,properties:{branch:{type:["string","null"]},commit_sha:{type:["string","null"]},committed_at:{format:"int64",type:["integer","null"]},confidence:{format:"int64",type:["integer","null"]},event_count:{format:"int64",type:"integer"},evidence:{type:["string","null"]},evidence_message_id:{type:["string","null"]},first_ts:{format:"int64",type:["integer","null"]},last_ts:{format:"int64",type:["integer","null"]},provider:{type:"string"},relation:{type:["string","null"]},session_id:{type:"string"},sources:{items:{type:"string"},type:"array"},span_count:{format:"int64",type:"integer"},span_overlap_kind:{type:["string","null"]},worktree:{type:["string","null"]}},required:["provider","session_id","event_count","span_count","sources"],type:"object"}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{count:{format:"uint",minimum:0,type:"integer"},git_ref:{type:["string","null"]},index:{anyOf:[{$ref:"#/$defs/CorrelationIndexV1"},{type:"null"}]},index_empty:{type:["boolean","null"]},message:{type:["string","null"]},observed_count:{format:"uint",minimum:0,type:["integer","null"]},observed_sessions:{items:{$ref:"#/$defs/SessionCorrelationHitV1"},type:["array","null"]},problem_code:{type:["string","null"]},relation:{type:["string","null"]},results:{items:{$ref:"#/$defs/SessionCorrelationHitV1"},type:"array"},since:{format:"int64",type:["integer","null"]},status:{$ref:"#/$defs/RetainedOutcomeStatusV1"},until:{format:"int64",type:["integer","null"]},value:{type:["string","null"]}},required:["count","results","status"],title:"SessionsForResultV1",type:"object"},{$defs:{NodeExpansionCostV1:gA,SymbolSignatureV1:{additionalProperties:!1,properties:{cost_to_expand:{$ref:"#/$defs/NodeExpansionCostV1"},docstring:{type:["string","null"]},end_line:{format:"uint32",minimum:0,type:"integer"},file:{type:"string"},is_async:{type:"boolean"},kind:{type:"string"},name:{type:"string"},node_id:{type:"string"},qualified_name:{type:"string"},signature:{type:["string","null"]},start_line:{format:"uint32",minimum:0,type:"integer"},unavailable_fields:{items:{type:"string"},type:"array"},visibility:{type:"string"}},required:["node_id","name","qualified_name","kind","visibility","is_async","file","start_line","end_line","cost_to_expand","unavailable_fields"],type:"object"}},$schema:"https://json-schema.org/draft/2020-12/schema",items:{$ref:"#/$defs/SymbolSignatureV1"},title:"Array_of_SymbolSignatureV1",type:"array"},{$defs:{ProjectId:g2,RepositoryId:_v,SimilarMatchClassV1:vd,SimilarTargetV1:{oneOf:[{additionalProperties:!1,properties:{kind:{const:"symbol_occurrence",type:"string"},symbol_occurrence_id:{$ref:"#/$defs/SymbolOccurrenceId"}},required:["kind","symbol_occurrence_id"],type:"object"},{additionalProperties:!1,properties:{kind:{const:"source_range",type:"string"},path:{type:"string"},span:{$ref:"#/$defs/SourceSpan"}},required:["kind","path","span"],type:"object"}]},SourceSpan:vb,SymbolOccurrenceId:vV},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{cursor:{type:["string","null"]},match_classes:{items:{$ref:"#/$defs/SimilarMatchClassV1"},type:"array"},project_id:{$ref:"#/$defs/ProjectId"},repository_id:{$ref:"#/$defs/RepositoryId"},result_limit:{description:"Preferred result page size.",format:"uint32",minimum:0,type:"integer"},target:{$ref:"#/$defs/SimilarTargetV1"},work_limit:{format:"uint32",minimum:0,type:"integer"}},required:["project_id","repository_id","target","match_classes","result_limit","work_limit"],title:"SimilarSurfaceRequestV1",type:"object"},{$defs:{CodeGenerationId:fT,CodeIndexBuildBlockedReasonV1:fE,CodeIndexConvergenceParkedV1:fA,CodeIndexStalenessStateV1:fz,ManifestDigest:gl,PrimitiveFreshnessStateV1:gG,PrimitiveIndexingStateV1:gB,PrimitiveSearchFreshnessV1:gQ,ProjectId:g2,RepositoryId:_v,SimilarCoverageV1:{oneOf:[{additionalProperties:!1,properties:{status:{const:"complete",type:"string"}},required:["status"],type:"object"},{additionalProperties:!1,properties:{status:{const:"partial",type:"string"}},required:["status"],type:"object"},{additionalProperties:!1,properties:{minimum_tokens:{format:"uint32",minimum:0,type:"integer"},status:{const:"excluded_too_small",type:"string"}},required:["status","minimum_tokens"],type:"object"},{additionalProperties:!1,properties:{maximum_bytes:{format:"uint64",minimum:0,type:"integer"},maximum_tokens:{format:"uint32",minimum:0,type:"integer"},status:{const:"excluded_too_large",type:"string"}},required:["status","maximum_tokens","maximum_bytes"],type:"object"},{additionalProperties:!1,properties:{status:{const:"excluded_incomplete_tokenization",type:"string"}},required:["status"],type:"object"}]},SimilarFamilyV1:vs,SimilarMatchClassV1:vd,SimilarOccurrenceV1:vc,SourceSpan:vb,SymbolOccurrenceId:vV,WorktreeId:$M},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{coverage:{$ref:"#/$defs/SimilarCoverageV1"},families:{items:{$ref:"#/$defs/SimilarFamilyV1"},type:"array"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},source:{$ref:"#/$defs/SimilarOccurrenceV1"},source_generation:{$ref:"#/$defs/CodeGenerationId"}},required:["source","families","source_generation","coverage"],title:"SimilarResultV1",type:"object"},{$defs:{ManagedSkillState:gc},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{include_body:{default:!1,description:"If true, include each skill's body_markdown in the list response\n(default: false).",type:"boolean"},state:{anyOf:[{$ref:"#/$defs/ManagedSkillState"},{type:"null"}],description:"Optional managed-skill lifecycle state filter."}},title:"SkillListSurfaceRequestV1",type:"object"},{$defs:{AutomationReadStatusV1:m8,ManagedSkillMaterializationScope:gn,ManagedSkillMetadata:ga,ManagedSkillProvenance:gs,ManagedSkillSource:gd,ManagedSkillState:gc,SkillImprovementRecommendation:vl,SkillInstallTarget:vp,SkillListEntryV1:{additionalProperties:!1,properties:{body_markdown:{description:"Present only when the request asked for bodies.",type:["string","null"]},improvement_recommendation:{anyOf:[{$ref:"#/$defs/SkillImprovementRecommendation"},{type:"null"}]},metadata:{$ref:"#/$defs/ManagedSkillMetadata"},stale_recommendation:{anyOf:[{$ref:"#/$defs/SkillStaleRecommendation"},{type:"null"}]},support_file_count:{format:"uint",minimum:0,type:"integer"},support_file_paths:{items:{type:"string"},type:"array"},usage_summary:{$ref:"#/$defs/SkillUsageRecord"}},required:["metadata","support_file_count","support_file_paths","usage_summary"],type:"object"},SkillStaleRecommendation:vu,SkillUsageRecord:vm},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{count:{format:"uint",minimum:0,type:"integer"},profile_root:{type:"string"},skills:{items:{$ref:"#/$defs/SkillListEntryV1"},type:"array"},status:{$ref:"#/$defs/AutomationReadStatusV1"}},required:["status","profile_root","count","skills"],title:"SkillListResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{id:{description:"Managed skill id to read.",type:"string"},include_support_files:{default:!1,description:"Include support-file byte payloads. Default false; the response still\nlists each path and byte length.",type:"boolean"}},required:["id"],title:"SkillViewSurfaceRequestV1",type:"object"},{$defs:{AutomationReadStatusV1:m8,ManagedSkill:{properties:{body_markdown:{type:"string"},metadata:{$ref:"#/$defs/ManagedSkillMetadata"},support_files:{items:{$ref:"#/$defs/ManagedSupportFile"},type:"array"}},required:["metadata","body_markdown","support_files"],type:"object"},ManagedSkillMaterializationScope:gn,ManagedSkillMetadata:ga,ManagedSkillProvenance:gs,ManagedSkillSource:gd,ManagedSkillState:gc,ManagedSupportFile:{properties:{bytes:{items:{format:"uint8",maximum:255,minimum:0,type:"integer"},type:"array"},path:{type:"string"}},required:["path","bytes"],type:"object"},SkillImprovementRecommendation:vl,SkillInstallTarget:vp,SkillStaleRecommendation:vu,SkillSupportFileSummaryV1:{additionalProperties:!1,properties:{byte_len:{format:"uint",minimum:0,type:"integer"},path:{type:"string"}},required:["path","byte_len"],type:"object"},SkillUsageRecord:vm},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{improvement_recommendation:{anyOf:[{$ref:"#/$defs/SkillImprovementRecommendation"},{type:"null"}]},profile_root:{type:"string"},skill:{$ref:"#/$defs/ManagedSkill",description:"The skill package; `support_files` is empty unless the request\nincluded them."},stale_recommendation:{anyOf:[{$ref:"#/$defs/SkillStaleRecommendation"},{type:"null"}]},status:{$ref:"#/$defs/AutomationReadStatusV1"},support_file_summaries:{items:{$ref:"#/$defs/SkillSupportFileSummaryV1"},type:"array"},support_files_included:{type:"boolean"},usage_summary:{$ref:"#/$defs/SkillUsageRecord"}},required:["status","profile_root","skill","usage_summary","support_files_included","support_file_summaries"],title:"SkillViewResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{node_id:{type:"string"}},required:["node_id"],title:"SourceBodyPrimitiveRequest",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{body:{type:"string"},end_line:{format:"uint32",minimum:0,type:"integer"},file:{type:"string"},node_id:{type:"string"},start_line:{format:"uint32",minimum:0,type:"integer"}},required:["node_id","file","start_line","end_line","body"],title:"SourceBodyPrimitiveResult",type:"object"},{$defs:{ManifestDigest:gl,SourceEditKind:{enum:["str_replace","multi_str_replace","insert_at","ast_grep_rewrite","replace_symbol","insert_at_symbol","move_symbol","rename_symbol"],type:"string"},SourceEditReconciliationDispositionV1:{description:"Explicit conclusion supplied by an authorized reconciliation/inspection\noperation. The concrete authority independently recaptures every candidate\nfile and accepts only an exact matching state digest.",oneOf:[{properties:{committed_state:{$ref:"#/$defs/ManifestDigest"},disposition:{const:"confirm_committed",type:"string"}},required:["disposition","committed_state"],type:"object"},{properties:{disposition:{const:"confirm_rolled_back",type:"string"}},required:["disposition"],type:"object"}]}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Exact public input accepted by `tracedecay_source_edit_reconcile`.",properties:{attempt_idempotency_key:{type:"string"},confirm:{type:"boolean"},disposition:{$ref:"#/$defs/SourceEditReconciliationDispositionV1"},effect_id:{type:"string"},idempotency_key:{type:"string"},input_digest:{type:"string"},kind:{$ref:"#/$defs/SourceEditKind"}},required:["kind","effect_id","idempotency_key","attempt_idempotency_key","input_digest","disposition","confirm"],title:"SourceEditReconcileSurfaceRequestV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Exact public input accepted by `tracedecay_source_edit_rollback`.",properties:{confirm:{type:"boolean"},effect_id:{type:"string"},expected_state:{type:"string"},idempotency_key:{type:"string"},original_idempotency_key:{type:"string"},original_input_digest:{type:"string"}},required:["effect_id","original_idempotency_key","idempotency_key","original_input_digest","expected_state","confirm"],title:"SourceEditRollbackSurfaceRequestV1",type:"object"},{$defs:{FileOccurrenceId:yu,PageRequest:gU,ResultProjection:_w,RetrievalOrder:_I,RetrievalRequestMeta:_x,SourceSpan:vb,TemporalModeV1:vA,UtcMicros:vK},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{file:{$ref:"#/$defs/FileOccurrenceId",description:"Canonical file occurrence from `code_exact_occurrence` at\n`items[].occurrence.file`; a logical path is not a file occurrence identity."},meta:{$ref:"#/$defs/RetrievalRequestMeta"},span:{$ref:"#/$defs/SourceSpan"}},required:["file","span","meta"],title:"SourceLinesRequest",type:"object"},{$defs:{RetrievalAnchorId:_q,SourceReference:{additionalProperties:!1,properties:{anchor:{$ref:"#/$defs/RetrievalAnchorId"},span:{$ref:"#/$defs/SourceSpan"}},required:["anchor","span"],type:"object"},SourceSpan:vb},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{body:{type:["string","null"]},file:{type:["string","null"]},references:{items:{$ref:"#/$defs/SourceReference"},type:"array"}},required:["references"],title:"SourceLinesResult",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{file:{type:"string"}},required:["file"],title:"SourceOutlinePrimitiveRequest",type:"object"},{$defs:{SymbolPrimitiveRecord:vq},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{file:{type:"string"},symbols:{items:{$ref:"#/$defs/SymbolPrimitiveRecord"},type:"array"}},required:["file","symbols"],title:"SourceOutlinePrimitiveResult",type:"object"},{$defs:{BranchStackEdgeV1:fu,BranchStackId:fm,BranchStackNodeV1:ff,BranchStackRevisionId:fh,CommitId:fH,ManifestDigest:gl,NativeIntegrationDirectionV1:gV,NativeIntegrationSelectionDeclarationV1:{description:"Explicit caller declaration for one native-integration selection.\n\nDeclared stacks contain the visible nodes and edges, while the daemon\nderives canonical order and the revision digest through the domain\nconstructor. Callers cannot submit either derived field.",oneOf:[{additionalProperties:!1,properties:{binding:{additionalProperties:!1,properties:{destination_node_id:{$ref:"#/$defs/StackNodeId"},direction:{$ref:"#/$defs/NativeIntegrationDirectionV1"},edges:{items:{$ref:"#/$defs/BranchStackEdgeV1"},type:"array"},nodes:{items:{$ref:"#/$defs/BranchStackNodeV1"},type:"array"},revision_id:{$ref:"#/$defs/BranchStackRevisionId"},source_node_id:{$ref:"#/$defs/StackNodeId"},stack_id:{$ref:"#/$defs/BranchStackId"}},required:["stack_id","revision_id","nodes","edges","source_node_id","destination_node_id","direction"],type:"object"},kind:{const:"declared_stack_edge",type:"string"}},required:["kind","binding"],type:"object"},{additionalProperties:!1,properties:{binding:{additionalProperties:!1,properties:{destination_ref:{$ref:"#/$defs/RefId"},proposal_digest:{$ref:"#/$defs/ManifestDigest"},source_ref:{$ref:"#/$defs/RefId"}},required:["proposal_digest","source_ref","destination_ref"],type:"object"},kind:{const:"independent_branch",type:"string"}},required:["kind","binding"],type:"object"}]},ProjectId:g2,RefId:_u,RepositoryId:_v,ResolvedScope:_k,ScopeSetId:_Q,ScopeSetRevision:_X,StackNodeId:vk,WorktreeId:$M,WorktreeInventoryEpoch:$W,WorktreeInventorySnapshotId:$N},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Exact caller-supplied identity frozen by `stack_snapshot`.\n\nThis proof binds the exact authorized `ProjectId`, `RepositoryId`, source\nand destination worktree/ref identity, frozen inventory, scope/grant/policy\nrevisions, and one declared-edge or independent-branch selection. Paths,\nfree-form SHA values, branch display names, and provider topology remain\nunrepresentable.",properties:{authorized_scope_set_digest:{$ref:"#/$defs/ManifestDigest"},authorized_scope_set_id:{$ref:"#/$defs/ScopeSetId"},authorized_scope_set_revision:{$ref:"#/$defs/ScopeSetRevision"},destination:{$ref:"#/$defs/ResolvedScope"},grant_digest:{$ref:"#/$defs/ManifestDigest"},inventory_epoch:{$ref:"#/$defs/WorktreeInventoryEpoch"},inventory_snapshot_id:{$ref:"#/$defs/WorktreeInventorySnapshotId"},policy_digest:{$ref:"#/$defs/ManifestDigest"},selection:{$ref:"#/$defs/NativeIntegrationSelectionDeclarationV1"},source:{$ref:"#/$defs/ResolvedScope"}},required:["source","destination","authorized_scope_set_id","authorized_scope_set_revision","authorized_scope_set_digest","inventory_snapshot_id","inventory_epoch","selection","grant_digest","policy_digest"],title:"NativeIntegrationStackSnapshotSurfaceRequest",type:"object"},{$defs:{CodeIndexReadinessTargetV1:{description:"The readiness a status caller can wait for.",oneOf:[{const:"fresh",description:"A sealed complete generation serves exact and lexical reads for the\ncurrent source: `code_index_freshness.status` is `current`.",type:"string"},{const:"ready",description:"`fresh`, and the generation's native code graph also serves.",type:"string"},{const:"graph_ready",description:"A published generation's native code graph serves and no convergence\npark is set, whatever the source freshness. Waiting for it never\nsweeps the source, so it cannot arm the reconcile it would observe.",type:"string"}]},CodeIndexReadinessWaitV1:{additionalProperties:!1,description:"`tracedecay_status` `wait_for`: hold the status read until the worktree\nreaches `state`, for at most the caller's `timeout_ms`.",properties:{state:{$ref:"#/$defs/CodeIndexReadinessTargetV1"},timeout_ms:{format:"uint64",minimum:0,type:"integer"}},required:["state","timeout_ms"],type:"object"}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{admission_only:{default:!1,description:"Report only that the project route is admitted, reading no graph,\nindex, or session state. Default false.",type:"boolean"},include_branch_diagnostics:{default:!1,description:"Full tracked-branch diagnostic list. Default false.",type:"boolean"},include_session_ingest:{default:!1,description:"Session-ingest health. Default false.",type:"boolean"},include_staleness:{default:!1,description:"Git staleness object. Default false.",type:"boolean"},include_storage_health:{default:!1,description:"Storage-health snapshot. Default false.",type:"boolean"},wait_for:{anyOf:[{$ref:"#/$defs/CodeIndexReadinessWaitV1"},{type:"null"}],description:"Hold the status read until the code index reaches `state` (`fresh`:\nstatus `current`; `ready`: also native graph serving; `graph_ready`: a\npublished generation's native graph serves, whatever the freshness),\nfor at most `timeout_ms`. The payload's `wait` reports `reached`,\n`timed_out` with `last_state`, or `unavailable` with `reason`."}},title:"StatusSurfaceRequestV1",type:"object"},{$defs:{CodeCloneIndexBudgetsV1:{description:"Fixed per-request clone candidate and verification budgets.",properties:{candidate_bodies:{format:"uint64",minimum:0,type:"integer"},hot_posting_rows:{format:"uint64",minimum:0,type:"integer"},minimum_body_tokens:{format:"uint64",minimum:0,type:"integer"},minimum_directional_coverage_millionths:{format:"uint64",minimum:0,type:"integer"},posting_rows:{format:"uint64",minimum:0,type:"integer"},verification_bodies:{format:"uint64",minimum:0,type:"integer"},verification_token_work:{format:"uint64",minimum:0,type:"integer"}},required:["posting_rows","candidate_bodies","verification_bodies","verification_token_work","hot_posting_rows","minimum_body_tokens","minimum_directional_coverage_millionths"],type:"object"},CodeCloneIndexCoverageV1:{description:"Coverage retained by one clone-index artifact or in-progress successor.\n\nCounts are `None` until the clone artifact has observed the corresponding\ndenominator. A complete empty repository reports `Some(0)`, which keeps a\ndesigned zero distinct from unavailable coverage.",properties:{conservative_normalized_bodies:{description:"Eligible bodies with a conservative exact posting.",format:"uint64",minimum:0,type:["integer","null"]},eligible_source_bodies:{description:"Source bodies admitted for automatic clone discovery.",format:"uint64",minimum:0,type:["integer","null"]},exact_postings:{description:"Conservative and rename-normalized exact posting rows.",format:"uint64",minimum:0,type:["integer","null"]},excluded_incomplete_tokenization_bodies:{description:"Bodies excluded because conservative tokenization was incomplete.",format:"uint64",minimum:0,type:["integer","null"]},excluded_too_large_bodies:{description:"Bodies excluded because they exceed the automatic-discovery token maximum.",format:"uint64",minimum:0,type:["integer","null"]},excluded_too_small_bodies:{description:"Bodies excluded because they are below the automatic-discovery minimum.",format:"uint64",minimum:0,type:["integer","null"]},hot_posting_rows_skipped:{description:"Positional rows omitted when those hot posting lists are skipped.",format:"uint64",minimum:0,type:["integer","null"]},hot_postings_skipped:{description:"Fingerprint posting lists above the interactive read threshold.",format:"uint64",minimum:0,type:["integer","null"]},near_fingerprint_bodies:{description:"Eligible bodies represented by positional fingerprints.",format:"uint64",minimum:0,type:["integer","null"]},near_fingerprint_postings:{description:"Positional fingerprint posting rows retained by the artifact.",format:"uint64",minimum:0,type:["integer","null"]},payloads_reused:{description:"Current payload occurrences reused from the preceding generation.",format:"uint64",minimum:0,type:["integer","null"]},rename_normalized_bodies:{description:"Eligible bodies with a complete rename-normalized exact posting.",format:"uint64",minimum:0,type:["integer","null"]},rename_partial_bodies:{description:"Eligible bodies whose rename normalization is partial.",format:"uint64",minimum:0,type:["integer","null"]},rename_unsupported_bodies:{description:"Eligible bodies whose language has no rename normalization.",format:"uint64",minimum:0,type:["integer","null"]},source_bodies:{description:"Clone body occurrences observed in the sealed lexical source.",format:"uint64",minimum:0,type:["integer","null"]},unique_payloads:{description:"Distinct content-addressed payloads retained by the artifact.",format:"uint64",minimum:0,type:["integer","null"]}},type:"object"},CodeCloneIndexObservationV1:{description:"Generation-pinned clone-index evidence shared by non-error readiness states.",properties:{artifact_format_revision:{format:"uint32",minimum:0,type:["integer","null"]},budgets:{$ref:"#/$defs/CodeCloneIndexBudgetsV1"},conservative_normalization_revision:{format:"uint16",maximum:65535,minimum:0,type:"integer"},coverage:{$ref:"#/$defs/CodeCloneIndexCoverageV1"},generation_id:{type:"string"},rename_normalization_revision:{format:"uint16",maximum:65535,minimum:0,type:"integer"},resources:{$ref:"#/$defs/CodeCloneIndexResourcesV1"},source_revision:{type:["string","null"]}},required:["generation_id","conservative_normalization_revision","rename_normalization_revision","coverage","budgets","resources"],type:"object"},CodeCloneIndexResourcesV1:{description:"Measured resources and update accounting for one clone-index generation.",properties:{bytes_on_disk:{description:"Durable artifact bytes.",format:"uint64",minimum:0,type:["integer","null"]},changed_symbol_update_micros:{description:"Latest observed source-edit arrival through clone-ready publication.",format:"uint64",minimum:0,type:["integer","null"]},peak_scratch_memory_bytes:{description:"Largest measured clone-row serialization scratch during the build.",format:"uint64",minimum:0,type:["integer","null"]},stale_invalidations:{description:"Prior clone payload bindings invalidated by the latest publication.",format:"uint64",minimum:0,type:["integer","null"]}},type:"object"},CodeCloneIndexStatusV1:{description:"Clone readiness, independent from lexical and graph serving.",oneOf:[{description:"The sealed lexical artifact or its clone rows cannot be read.",properties:{reason:{type:"string"},state:{const:"unavailable",type:"string"}},required:["state","reason"],type:"object"},{description:"Some clone evidence is readable, but required postings are missing.",properties:{observation:{$ref:"#/$defs/CodeCloneIndexObservationV1"},omission_reasons:{items:{type:"string"},type:"array"},state:{const:"partial",type:"string"}},required:["state","observation","omission_reasons"],type:"object"},{description:"Required exact and fingerprint postings cover every eligible body.",properties:{observation:{$ref:"#/$defs/CodeCloneIndexObservationV1"},state:{const:"ready",type:"string"}},required:["state","observation"],type:"object"},{description:"The artifact is readable but belongs to a superseded source generation.",properties:{observation:{$ref:"#/$defs/CodeCloneIndexObservationV1"},reason:{type:"string"},state:{const:"stale",type:"string"}},required:["state","observation","reason"],type:"object"}]},CodeGraphServingReadinessV1:{description:"Interactive graph-serving state for the latest sealed generation.\n\nA sealed generation can expose truthful census statistics before its graph\nprojection is ready to serve queries, so readiness is reported separately.",oneOf:[{description:"No graph-serving authority exists for this worktree or generation.",properties:{reason:{type:"string"},state:{const:"unavailable",type:"string"}},required:["state","reason"],type:"object"},{description:"The sealed generation exists, but graph activation has not completed.",properties:{state:{const:"pending",type:"string"}},required:["state"],type:"object"},{description:"Graph activation completed without a serving projection.",properties:{reason:{type:"string"},state:{const:"refused",type:"string"}},required:["state","reason"],type:"object"},{description:"The verified graph projection is installed, but the engine or catalog\nits reads need is not resident: it is still being built, or it was\nreleased for memory. Graph reads answer the retryable warming state\nand restore it.",properties:{reason:{type:"string"},state:{const:"warming",type:"string"}},required:["state","reason"],type:"object"},{description:"The verified graph projection is installed for interactive reads.",properties:{state:{const:"ready",type:"string"}},required:["state"],type:"object"}]},CodeIndexBuildBlockedReasonV1:fE,CodeIndexBuildPhaseV1:{description:"The durable build phase whose committed boundary the dashboard is reading.\n\nA phase is not inferred from scheduler state. The mounted registry publishes\nthe exact phase that owns the active generation.",oneOf:[{enum:["source_scan","relational_preparation","bulk_commit","index_build","verification","ready"],type:"string"},{const:"graph_publication",description:"Text serving is built and the pass that sealed the generation is\nstill publishing its native graph.",type:"string"}]},CodeIndexBuildProgressV1:{description:"The latest committed progress boundary for one active code-index generation.\n\nEvery count is scoped to `generation_id`. The snapshot never includes a\nstaged page: work is reported only after the batch that owns it commits.",properties:{blocked_reason:{anyOf:[{$ref:"#/$defs/CodeIndexBuildBlockedReasonV1"},{type:"null"}],description:"Reason the active generation cannot currently advance, when known."},committed_chunks:{description:"Search chunks committed to the artifact database.",format:"uint64",minimum:0,type:"integer"},committed_imports:{description:"Import evidence rows committed to the artifact database.",format:"uint64",minimum:0,type:"integer"},committed_pages:{description:"Source pages committed to the artifact database.",format:"uint64",minimum:0,type:"integer"},committed_payload_bytes:{description:"Payload bytes committed to the artifact database.",format:"uint64",minimum:0,type:"integer"},completed_files:{description:"Authenticated sealed-source file boundary completed by committed work.",format:"uint64",minimum:0,type:"integer"},completed_lexical_units:{description:"Authenticated lexical-span boundary completed by committed work, in the\nsealed source's own advance unit.\n\nThe unit is the source's, not this surface's: a sealed-layout source\nadvances over the files-array byte span, while a published or\npartitioned source advances over file ordinals because its file records\nare not a contiguous byte range at all. Both are monotone and share the\ndenominator below, so completion and the derived estimate are truthful;\nnaming them bytes was not, and a consumer that multiplied this by an\naverage file size was wrong by orders of magnitude (issue #1205).",format:"uint64",minimum:0,type:"integer"},current_batch_pages:{description:"Source pages in the batch currently being processed.",format:"uint64",minimum:0,type:"integer"},current_batch_payload_bytes:{description:"Sealed payload bytes in the batch currently being processed.",format:"uint64",minimum:0,type:"integer"},daemon_incarnation:{description:"Durable daemon-authority epoch that produced this snapshot.\n\nThis orders snapshots across daemon restarts without relying on wall\nclock time.",format:"uint64",minimum:0,type:"integer"},elapsed_micros:{description:"Monotonic elapsed time for this process's active generation build.",format:"uint64",minimum:0,type:"integer"},estimated_remaining_seconds:{description:"Estimated remaining build duration, absent without a truthful rate.",format:"uint64",minimum:0,type:["integer","null"]},files_per_second:{description:"Rolling committed-file throughput, absent until it is established.",format:"double",type:["number","null"]},generation_id:{description:"Exact generation receiving the committed build work.",type:"string"},last_commit_latency_micros:{description:"Duration of the last committed SQLite batch, when one exists.",format:"uint64",minimum:0,type:["integer","null"]},last_progress_micros:{description:"Unix-epoch timestamp of the last durable progress publication.",format:"int64",type:"integer"},lexical_units_per_second:{description:"Rolling committed lexical-span throughput in units per second, absent\nuntil it is established. Not a byte rate; see\n[`Self::completed_lexical_units`].",format:"double",type:["number","null"]},phase:{$ref:"#/$defs/CodeIndexBuildPhaseV1",description:"Durable pipeline phase that published this snapshot."},producer_incarnation:{description:"Registry-minted scheduler incarnation within one daemon.\n\nA worktree retirement/remount creates a new value. `progress_epoch` is\ncomparable only when both incarnation fields match.",format:"uint64",minimum:0,type:"integer"},progress_epoch:{description:"Monotonic publication epoch for replacing delayed progress reads.",format:"uint64",minimum:0,type:"integer"},sealed_source_digest:{description:"Identity of the sealed source whose authenticated bounds define progress.",type:"string"},total_files:{description:"Authenticated sealed-source file bound for this generation.",format:"uint64",minimum:0,type:"integer"},total_lexical_units:{description:"Authenticated lexical-span bound for this generation, in the same unit\nas [`Self::completed_lexical_units`].",format:"uint64",minimum:0,type:"integer"}},required:["generation_id","daemon_incarnation","producer_incarnation","progress_epoch","sealed_source_digest","phase","committed_pages","committed_chunks","committed_imports","committed_payload_bytes","completed_files","total_files","completed_lexical_units","total_lexical_units","current_batch_pages","current_batch_payload_bytes","elapsed_micros","last_progress_micros"],type:"object"},CodeIndexConvergenceParkedV1:fA,CodeIndexFreshnessCoverageV1:{description:"Coverage of one freshness read. Distinct from [`CodeIndexStalenessStateV1`]:\na generation can be fresh and still omit hook-hint counts, or unverified\nwhile the ladder would otherwise say ready.\n\n`Unobserved` is only the constructed default. A projected read never emits\nit, so an absent observation cannot be mistaken for `complete`.",oneOf:[{enum:["unobserved","complete","partial_refresh_in_progress","partial_artifact_restore","partial_source_verification","partial_unverified_restore","partial_hook_hint_overflow"],type:"string"},{const:"partial_omitted_sources",description:"The sealed generation is fresh for every source it can index, and\n[`CodeIndexWorktreeFreshnessV1::omitted_sources`] names the sources it\ncannot. Waiting cannot change it.",type:"string"}]},CodeIndexGenerationRecoveryServingV1:{description:"Serving disposition of an incompatible generation during recovery.",enum:["preserved","refused"],type:"string"},CodeIndexGenerationRecoveryV1:{description:"Recovery state for a durable generation sealed under a different production\nowner configuration.",properties:{incompatibilities:{description:"Stable owner-input reason codes reported by the code-index authority.",items:{type:"string"},type:"array"},incompatible_generation_id:{description:"Generation retired from incremental reuse.",type:"string"},serving:{$ref:"#/$defs/CodeIndexGenerationRecoveryServingV1",description:"Whether the prior generation may continue serving while its replacement\nbuilds under the current configuration."}},required:["incompatible_generation_id","incompatibilities","serving"],type:"object"},CodeIndexOmittedSourceV1:fM,CodeIndexOmittedSourcesV1:fW,CodeIndexReadinessWaitOutcomeV1:{description:"How a `wait_for` status read ended. The status payload beside it is read\nafter the wait ends.",oneOf:[{properties:{outcome:{const:"reached",type:"string"}},required:["outcome"],type:"object"},{description:"The caller's budget elapsed; `last_state` is the last observed\n`code_index_freshness.status`.",properties:{last_state:{type:"string"},outcome:{const:"timed_out",type:"string"}},required:["outcome","last_state"],type:"object"},{description:"Waiting cannot reach the target: no scheduler is mounted, graph\nserving was refused, convergence is parked, or the request ended.",properties:{outcome:{const:"unavailable",type:"string"},reason:{type:"string"}},required:["outcome","reason"],type:"object"}]},CodeIndexRestoreProgressV1:{description:"Bounded authentication work required to restore one immutable lexical\nartifact as a serving reader.\n\nThe unit is a fixed restore check, not bytes or build work. Completed\nchecks are published only after they pass. `authenticated_remaining` is\nalways `authenticated_total - authenticated_completed`, so a caller can\ndistinguish bounded cold restore from an unbounded rebuild.",properties:{artifact_digest:{description:"Whole-file content address from the durable artifact descriptor.",type:"string"},authenticated_completed:{description:"Successfully completed authentication checks.",format:"uint64",minimum:0,type:"integer"},authenticated_remaining:{description:"Checks that have not completed yet.",format:"uint64",minimum:0,type:"integer"},authenticated_total:{description:"Fixed number of authentication checks for this restore.",format:"uint64",minimum:0,type:"integer"},generation_id:{description:"Generation whose lexical serving seat is being restored.",type:"string"}},required:["generation_id","artifact_digest","authenticated_completed","authenticated_total","authenticated_remaining"],type:"object"},CodeIndexSourceOmissionReasonV1:fN,CodeIndexStalenessStateV1:fz,CodeIndexWorktreeFreshnessV1:{description:"Freshness/generation state for one mounted worktree.\n\n`Deserialize` is part of the wire contract: the CLI status command decodes\nexactly this type back out of the daemon's `tracedecay_status` response,\nkeeping one authority for the freshness shape.",properties:{clone_index:{anyOf:[{$ref:"#/$defs/CodeCloneIndexStatusV1"},{type:"null"}],description:"Clone readiness from the same sealed lexical artifact."},code_graph_serving:{anyOf:[{$ref:"#/$defs/CodeGraphServingReadinessV1"},{type:"null"}],description:"Whether that generation's verified graph projection can serve reads."},coverage:{$ref:"#/$defs/CodeIndexFreshnessCoverageV1",description:"Whether this read covers the complete mounted scheduler state."},generation_recovery:{anyOf:[{$ref:"#/$defs/CodeIndexGenerationRecoveryV1"},{type:"null"}],description:"One-shot owner-configuration recovery currently replacing an\nincompatible durable generation."},hook_hint_count:{description:"Pending hook-hint count, when cheaply available.",format:"uint64",minimum:0,type:["integer","null"]},last_reconcile_micros:{description:"Last reconcile observation time (microseconds since the Unix epoch).",format:"int64",type:["integer","null"]},latest_generation_id:{description:"Latest sealed generation identity, when a complete generation exists.",type:["string","null"]},omitted_sources:{anyOf:[{$ref:"#/$defs/CodeIndexOmittedSourcesV1"},{type:"null"}],description:"Sources the serving snapshot captured but does not index, when any."},parked:{anyOf:[{$ref:"#/$defs/CodeIndexConvergenceParkedV1"},{type:"null"}],description:"Deterministic contract violation currently parking background\nconvergence, when one is observed. `staleness_state` reads `parked`\nwhile this is set and no generation serves."},progress:{anyOf:[{$ref:"#/$defs/CodeIndexBuildProgressV1"},{type:"null"}],description:"Latest committed progress for the active generation, if one is mounted."},rebuild_in_flight:{default:!1,description:"Whether the exact scheduler route owns a reconcile pass or has a\npending wake. A stale seated generation with this false is stalled,\nnot in a routine rebuild window.",type:"boolean"},repository_id:{description:"Stable repository identity resolved by the scheduler.",type:["string","null"]},restore_progress:{anyOf:[{$ref:"#/$defs/CodeIndexRestoreProgressV1"},{type:"null"}],description:"Bounded immutable-artifact restore work currently in flight. This is\nseparate from build progress because restore commits no index data."},sealed_at_micros:{description:"Time the complete generation was durably sealed.",format:"int64",type:["integer","null"]},snapshot_content_identity:{description:"Content identity of the complete source snapshot.",type:["string","null"]},source_reference:{description:"Exact source reference captured by the sealed generation.",type:["string","null"]},source_revision:{description:"Exact source revision captured by the sealed generation.",type:["string","null"]},staleness_state:{anyOf:[{$ref:"#/$defs/CodeIndexStalenessStateV1"},{type:"null"}],description:"Staleness-ladder state from the last scheduler execution. `fresh` means\nthe scheduler most recently observed a fresh source; the status read\ndoes not probe the worktree to revalidate that observation."},worktree_id:{description:"Stable worktree identity resolved by the scheduler.",type:["string","null"]},worktree_root:{description:"Display path of the mounted worktree root.",type:"string"}},required:["worktree_root","coverage"],type:"object"},LcmConvergenceStateV1:yX,LcmConvergenceV1:yY,LcmDoctorProjectionStateV1:y1,LcmDoctorProjectionV1:y0,NativeHostIdentityV1:{enum:["claude_code","cursor_desktop","cursor_cloud","codex","hermes","kiro","cline","roo_code","kilo","kimi_code","open_code","pi","factory_droid"],type:"string"},ProjectStatusV1:{additionalProperties:!1,properties:{active_branch:{type:["string","null"]},branch_diagnostics:!0,branch_drifted:{type:["boolean","null"]},branch_mismatch:{anyOf:[{$ref:"#/$defs/StatusBranchMismatchV1"},{type:"null"}]},branch_resolution:{type:["string","null"]},branch_warnings:{items:{type:"string"},type:["array","null"]},code_index_freshness:{$ref:"#/$defs/StatusCodeIndexFreshnessV1"},code_index_freshness_warning:{type:["string","null"]},current_branch:{type:["string","null"]},git_staleness:{anyOf:[{$ref:"#/$defs/StatusGitStalenessV1"},{type:"null"}]},github_source:{description:"The checkout's GitHub source as its advisory owner observed it."},graph_statistics:{description:"The exact-scope sealed-generation census."},hook_replay:{$ref:"#/$defs/StatusHookReplayV1",description:"The daemon's drain of this project's hook spools, as its last sweep\nleft it."},live_branch:{type:["string","null"]},memory:{$ref:"#/$defs/StatusMemoryV1"},parent_branch:{type:["string","null"]},project_root:{type:"string"},reset_required_stores:{description:"Registered stores this binary serves only as a typed reset-required\nrefusal, each with the command that resets it.",items:{$ref:"#/$defs/StoreResetRequiredV1"},type:"array"},retrieval_serving:{anyOf:[{$ref:"#/$defs/StatusRetrievalServingV1"},{type:"null"}],description:"Whether exact-scope retrieval can serve, when the census authority is\nattached."},schema_convergence:{$ref:"#/$defs/StatusSchemaConvergenceV1"},scope_prefix:{type:["string","null"]},server:{description:"The serving MCP server's request counters."},serving_branch:{type:["string","null"]},session_git_evidence:{$ref:"#/$defs/StatusSessionGitEvidenceV1",description:"The session↔Git evidence `tracedecay_sessions_for` and the\nbranch/commit session filters read."},session_history_catch_up:!0,session_ingest:!0,session_projection:{$ref:"#/$defs/LcmDoctorProjectionV1",description:"The project session projection's serving state, the same reading\n`tracedecay_lcm_doctor` reports."},storage_health:!0,tracked_branch_count:{format:"uint",minimum:0,type:["integer","null"]},wait:{anyOf:[{$ref:"#/$defs/CodeIndexReadinessWaitOutcomeV1"},{type:"null"}]}},required:["project_root","graph_statistics","memory","schema_convergence","reset_required_stores","code_index_freshness","github_source","session_projection","session_git_evidence","hook_replay"],type:"object"},ResidentMemoryHolderReadV1:{description:"One worktree holding a retained owner's memory, and what it holds: a\ngeneration id, or an LSP session id.",properties:{holding:{type:"string"},worktree_id:{type:"string"}},required:["worktree_id","holding"],type:"object"},RetrievalWorkerStatusV1:_j,SchemaConvergenceFindingV1:_D,SchemaConvergenceProgressV1:_F,SchemaConvergenceStageV1:_L,SchemaConvergenceStateV1:_U,StatusAdmissionV1:{additionalProperties:!1,properties:{project_admitted:{type:"boolean"},project_root:{type:"string"},scope_prefix:{type:["string","null"]},server:{description:"The serving MCP server's request counters."}},required:["project_admitted","project_root"],type:"object"},StatusBranchMismatchV1:{additionalProperties:!1,properties:{git_branch:{type:["string","null"]},indexed_branch:{type:["string","null"]},serving_branch:{type:["string","null"]}},type:"object"},StatusCodeIndexFreshnessV1:{description:"The code-index freshness of the served worktree, labeled the way readiness\nwaits report their last state.",oneOf:[{additionalProperties:!1,properties:{status:{const:"current",type:"string"},worktree:{$ref:"#/$defs/CodeIndexWorktreeFreshnessV1"}},required:["status","worktree"],type:"object"},{additionalProperties:!1,properties:{status:{const:"stale",type:"string"},worktree:{$ref:"#/$defs/CodeIndexWorktreeFreshnessV1"}},required:["status","worktree"],type:"object"},{additionalProperties:!1,properties:{status:{const:"restoring",type:"string"},worktree:{$ref:"#/$defs/CodeIndexWorktreeFreshnessV1"}},required:["status","worktree"],type:"object"},{additionalProperties:!1,properties:{status:{const:"warming",type:"string"},worktree:{$ref:"#/$defs/CodeIndexWorktreeFreshnessV1"}},required:["status","worktree"],type:"object"},{additionalProperties:!1,properties:{status:{const:"parked",type:"string"},worktree:{$ref:"#/$defs/CodeIndexWorktreeFreshnessV1"}},required:["status","worktree"],type:"object"},{additionalProperties:!1,description:"The last code-index mount failed; explicit reconciliation can retry it.",properties:{message:{type:"string"},remediation:{type:"string"},status:{const:"mount_failed",type:"string"}},required:["status","message","remediation"],type:"object"},{additionalProperties:!1,properties:{reason:{type:"string"},status:{const:"unavailable",type:"string"}},required:["status","reason"],type:"object"}]},StatusGitStalenessUnavailableV1:{oneOf:[{const:"no_sealed_generation",description:"No complete generation has sealed for the worktree yet.",type:"string"},{const:"sealed_generation_has_no_commit",description:"The sealed generation captured no commit, as in an unborn repository.",type:"string"},{const:"git_head_unreadable",description:"The worktree's checked-out commit could not be read.",type:"string"}]},StatusGitStalenessV1:{description:"The sealed generation's Git watermark, the commit its source snapshot was\ncaptured from, against the worktree's checked-out commit.",oneOf:[{additionalProperties:!1,description:"HEAD is the commit the sealed generation was built from.",properties:{status:{const:"current",type:"string"},watermark:{type:"string"}},required:["status","watermark"],type:"object"},{additionalProperties:!1,description:"HEAD has moved off the commit the sealed generation was built from.",properties:{head:{type:"string"},status:{const:"stale",type:"string"},watermark:{type:"string"}},required:["status","watermark","head"],type:"object"},{additionalProperties:!1,description:"No watermark or no HEAD to compare it with.",properties:{reason:{$ref:"#/$defs/StatusGitStalenessUnavailableV1"},status:{const:"unavailable",type:"string"}},required:["status","reason"],type:"object"}]},StatusHookReplayFailureV1:{additionalProperties:!1,description:"One hook spool the last replay sweep could not drain.",properties:{cause:{type:"string"},host:{$ref:"#/$defs/NativeHostIdentityV1"},spool:{$ref:"#/$defs/StatusHookReplaySpoolV1"}},required:["host","spool","cause"],type:"object"},StatusHookReplaySpoolV1:{oneOf:[{const:"records",description:"The host's spooled hook events.",type:"string"},{const:"delivery_receipts",description:"The host's hook delivery receipts.",type:"string"},{const:"pending_work",description:"The producer work the host's admission ledger still owes.",type:"string"}]},StatusHookReplayV1:{description:"The daemon's hook spool drain for one project.",oneOf:[{additionalProperties:!1,description:"No replay consumer drains this project's hook spools in this daemon.",properties:{status:{const:"unowned",type:"string"}},required:["status"],type:"object"},{additionalProperties:!1,description:"The replay consumer has not finished its first sweep.",properties:{status:{const:"starting",type:"string"}},required:["status"],type:"object"},{additionalProperties:!1,description:"The last sweep drained every hook spool it found.",properties:{status:{const:"drained",type:"string"}},required:["status"],type:"object"},{additionalProperties:!1,description:"The last sweep could not drain these spools. Their records stay\ndurable and the next sweep retries them.",properties:{failures:{items:{$ref:"#/$defs/StatusHookReplayFailureV1"},type:"array"},status:{const:"failed",type:"string"}},required:["status","failures"],type:"object"}]},StatusMemoryOwnerV1:{additionalProperties:!1,properties:{bytes:{format:"uint64",minimum:0,type:["integer","null"]},content_digest:{type:["string","null"]},holders:{items:{$ref:"#/$defs/ResidentMemoryHolderReadV1"},type:"array"},idle_seconds:{format:"uint64",minimum:0,type:"integer"},kind:{type:"string"},measured:{type:"boolean"},project_id:{type:"string"},protected:{type:"boolean"}},required:["project_id","kind","holders","measured","idle_seconds","protected"],type:"object"},StatusMemoryPressureV1:{enum:["unobserved","nominal","over_budget"],type:"string"},StatusMemoryV1:{additionalProperties:!1,description:"The daemon's resident memory as one project sees it.",properties:{high_watermark_bytes:{format:"uint64",minimum:0,type:"integer"},idle_window_seconds:{format:"uint64",minimum:0,type:"integer"},limit_bytes:{format:"uint64",minimum:0,type:"integer"},low_watermark_bytes:{format:"uint64",minimum:0,type:"integer"},owners:{description:"This project's retained owners; other projects' belong to the\ndaemon-wide Doctor inventory.",items:{$ref:"#/$defs/StatusMemoryOwnerV1"},type:"array"},psi_some_avg10:{format:"double",type:["number","null"]},resident_bytes:{format:"uint64",minimum:0,type:["integer","null"]},retained_bytes:{format:"uint64",minimum:0,type:"integer"},shed_order:{items:{type:"string"},type:"array"},status:{$ref:"#/$defs/StatusMemoryPressureV1"},unmeasured_owners:{format:"uint",minimum:0,type:"integer"}},required:["status","limit_bytes","high_watermark_bytes","low_watermark_bytes","idle_window_seconds","shed_order","retained_bytes","unmeasured_owners","owners"],type:"object"},StatusRetrievalServingV1:{oneOf:[{additionalProperties:!1,description:"A sealed complete generation serves the exact worktree. The ages tell a\nroutine rebuild window from a wedged route.",properties:{condition:{anyOf:[{$ref:"#/$defs/StatusServingConditionV1"},{type:"null"}]},freshness:{$ref:"#/$defs/StatusServingFreshnessV1"},last_reconcile_age_seconds:{format:"int64",type:["integer","null"]},seated_generation_age_seconds:{format:"int64",type:["integer","null"]},status:{const:"serving",type:"string"}},required:["status","freshness"],type:"object"},{additionalProperties:!1,description:"The census answered and nothing is servable yet.",properties:{reason:{type:"string"},status:{const:"unavailable",type:"string"}},required:["status","reason"],type:"object"}]},StatusSchemaConvergenceStateV1:{enum:["completed","in_progress","degraded"],type:"string"},StatusSchemaConvergenceV1:{additionalProperties:!1,properties:{findings:{items:{$ref:"#/$defs/SchemaConvergenceFindingV1"},type:"array"},status:{$ref:"#/$defs/StatusSchemaConvergenceStateV1"}},required:["status","findings"],type:"object"},StatusServingConditionV1:{enum:["artifact_restore","source_verification","rebuilding","stalled"],type:"string"},StatusServingFreshnessV1:{enum:["current","restoring","last_complete_stale","unknown"],type:"string"},StatusSessionGitEvidenceUnavailableV1:{oneOf:[{const:"session_store_denied",description:"This request holds no project session store.",type:"string"},{const:"read_failed",description:"The session store refused the evidence read.",type:"string"}]},StatusSessionGitEvidenceV1:{description:"The project's session↔Git evidence generation.",oneOf:[{additionalProperties:!1,description:"A convergence pass installed this generation.",properties:{backfill_watermark:{format:"int64",type:["integer","null"]},commit_count:{format:"uint64",minimum:0,type:"integer"},generation:{type:"string"},source_watermark:{type:"string"},span_count:{format:"uint64",minimum:0,type:"integer"},status:{const:"recorded",type:"string"}},required:["status","generation","source_watermark","span_count","commit_count"],type:"object"},{additionalProperties:!1,description:"No convergence pass has written evidence for this project yet.",properties:{backfill_watermark:{format:"int64",type:["integer","null"]},status:{const:"unrecorded",type:"string"}},required:["status"],type:"object"},{additionalProperties:!1,description:"The evidence could not be read.",properties:{message:{type:["string","null"]},reason:{$ref:"#/$defs/StatusSessionGitEvidenceUnavailableV1"},status:{const:"unavailable",type:"string"}},required:["status","reason"],type:"object"}]},StoreResetRequiredV1:{description:"A persisted store the daemon keeps mounted in a typed reset-required state\ninstead of refusing to serve: every read against it returns the typed\nrefusal, stores that admit keep serving, and `remedy` is the exact command\nthe operator runs to reset it.",properties:{authority:{type:"string"},found_version:{format:"int64",type:["integer","null"]},reason:{type:"string"},remedy:{type:"string"},required_version:{format:"int64",type:["integer","null"]},store:{type:"string"}},required:["store","authority","reason","remedy"],type:"object"}},$schema:"https://json-schema.org/draft/2020-12/schema",anyOf:[{$ref:"#/$defs/StatusAdmissionV1"},{$ref:"#/$defs/ProjectStatusV1"}],description:"`tracedecay_status` for an `admission_only` read, or the project's status.",title:"StatusResultV1"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{include_details:{default:!1,type:"boolean"}},title:"StorageStatusPrimitiveRequest",type:"object"},{$defs:{StorageStatusHistoryPointV1:{additionalProperties:!1,properties:{database_bytes:{format:"uint64",minimum:0,type:"integer"},observed_at:{format:"int64",type:"integer"}},required:["observed_at","database_bytes"],type:"object"}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{database_bytes:{format:"uint64",minimum:0,type:["integer","null"]},details:{items:{type:"string"},type:"array"},freelist_pages:{default:null,format:"uint64",minimum:0,type:["integer","null"]},history:{default:[],items:{$ref:"#/$defs/StorageStatusHistoryPointV1"},type:"array"},history_coverage:{default:null,type:["string","null"]},page_count:{default:null,format:"uint64",minimum:0,type:["integer","null"]},page_size_bytes:{default:null,format:"uint32",minimum:0,type:["integer","null"]},project_id:{default:null,type:["string","null"]},read_only:{type:"boolean"},status:{type:"string"},store_path:{default:null,type:["string","null"]}},required:["status","read_only","details"],title:"StorageStatusPrimitiveResult",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Exact public input accepted by `tracedecay_str_replace`.",properties:{dry_run:{default:!1,type:"boolean"},expected_state:{description:"Exact `preview_digest`/`expected_state` returned by the dry run. Apply\nre-resolves the typed plan and rejects any candidate-state drift.",type:["string","null"]},idempotency_key:{type:["string","null"]},new_str:{type:"string"},old_str:{type:"string"},path:{type:"string"},verify:{default:!1,type:"boolean"}},required:["path","old_str","new_str"],title:"StrReplaceSurfaceRequestV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{file:{description:"Source file path to find test coverage for.",type:["string","null"]},node_id:{description:"Specific node ID to find test coverage for (alternative to file).",type:["string","null"]}},title:"TestMapSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fE,CodeIndexConvergenceParkedV1:fA,CodeIndexStalenessStateV1:fz,PrimitiveFreshnessStateV1:gG,PrimitiveIndexingStateV1:gB,PrimitiveSearchFreshnessV1:gQ,TestMapSourceCoverageV1:{additionalProperties:!1,properties:{source_file:{type:"string"},source_id:{type:"string"},source_line:{format:"uint32",minimum:0,type:"integer"},source_name:{type:"string"},tests:{items:{$ref:"#/$defs/TestMapTestV1"},type:"array"}},required:["source_name","source_id","source_file","source_line","tests"],type:"object"},TestMapTestV1:{additionalProperties:!1,properties:{attribution_depth:{format:"uint32",minimum:0,type:"integer"},test_file:{type:"string"},test_line:{format:"uint32",minimum:0,type:"integer"},test_name:{type:"string"}},required:["test_name","test_file","test_line","attribution_depth"],type:"object"},TestMapUncoveredV1:{additionalProperties:!1,properties:{file:{type:"string"},id:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},name:{type:"string"}},required:["id","name","file","line"],type:"object"}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{coverage:{items:{$ref:"#/$defs/TestMapSourceCoverageV1"},type:"array"},covered_symbols:{format:"uint64",minimum:0,type:"integer"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},test_files:{items:{type:"string"},type:"array"},uncovered:{items:{$ref:"#/$defs/TestMapUncoveredV1"},type:"array"},uncovered_symbols:{format:"uint64",minimum:0,type:"integer"}},required:["covered_symbols","uncovered_symbols","test_files","coverage","uncovered"],title:"TestMapResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"The admitted project selects the retained managed test run, so this exact\nrequest intentionally carries no caller-selectable scope or identity.",title:"TestResultsSurfaceRequestV1",type:"object"},{$defs:{CancellationObservation:fS,CancellationStage:fk,CodeGenerationId:fT,CommitId:fH,Deadline:hj,OperationBudgetUsage:gD,OperationReceipt:gF,OperationTermination:gL,TestResultProjectionV1:{additionalProperties:!1,description:"One result emitted by the daemon-managed test-run authority.",properties:{passed:{type:"boolean"},test:{type:"string"}},required:["test","passed"],type:"object"},UtcMicros:vK},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Exact retained managed-test-run projection returned by `test_results`.\n\nThe daemon resolves the admitted project, reads its newest durable managed\nrun, and verifies that the run's head and code generation are current\nbefore it serializes this payload. `result_offset` and `available_results`\nretain the authoritative page position. The outcome fields (`finished_at`,\n`exit_code`, the counts, `termination`, `receipt`) are present only after\nthe managed run terminates.",properties:{available_results:{format:"uint64",minimum:0,type:"integer"},code_generation_id:{anyOf:[{$ref:"#/$defs/CodeGenerationId"},{type:"null"}]},completed:{format:"uint64",minimum:0,type:"integer"},exit_code:{format:"int32",type:["integer","null"]},failed:{format:"uint64",minimum:0,type:["integer","null"]},finished_at:{anyOf:[{$ref:"#/$defs/UtcMicros"},{type:"null"}]},head_commit_id:{anyOf:[{$ref:"#/$defs/CommitId"},{type:"null"}]},ignored:{format:"uint64",minimum:0,type:["integer","null"]},operation_id:{type:"string"},passed:{format:"uint64",minimum:0,type:["integer","null"]},receipt:{anyOf:[{$ref:"#/$defs/OperationReceipt"},{type:"null"}]},result_offset:{format:"uint64",minimum:0,type:"integer"},results:{items:{$ref:"#/$defs/TestResultProjectionV1"},type:"array"},session_id:{description:"The session the run was requested by; null when the request named none.",type:["string","null"]},started_at:{$ref:"#/$defs/UtcMicros"},termination:{anyOf:[{$ref:"#/$defs/OperationTermination"},{type:"null"}]},total:{format:"uint64",minimum:0,type:["integer","null"]}},required:["operation_id","started_at","results","completed","result_offset","available_results"],title:"TestResultsResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{include_tested:{description:"Include already-tested functions in results (default: false).",type:["boolean","null"]},limit:{description:"Maximum number of results to return (default: 20, at most 200).",format:"uint32",minimum:0,type:["integer","null"]},path:{description:"Filter to files under this directory path.",type:["string","null"]}},title:"TestRiskSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fE,CodeIndexConvergenceParkedV1:fA,CodeIndexStalenessStateV1:fz,ComplexityAnalysisV1:fB,PrimitiveFreshnessStateV1:gG,PrimitiveIndexingStateV1:gB,PrimitiveSearchFreshnessV1:gQ,TestAttributionMethodV1:{description:"How a source symbol's static test evidence was attributed.",enum:["none","direct_unit","closure"],type:"string"},TestRiskAttributionSummaryV1:{additionalProperties:!1,properties:{cli_entry_attributed:{format:"uint64",minimum:0,type:"integer"},closure_attributed:{format:"uint64",minimum:0,type:"integer"},depth:{format:"uint64",minimum:0,type:"integer"},direct_unit_attributed:{format:"uint64",minimum:0,type:"integer"},public_api_attributed:{format:"uint64",minimum:0,type:"integer"},total_attributed:{format:"uint64",minimum:0,type:"integer"},trait_resolved_attributed:{format:"uint64",minimum:0,type:"integer"}},required:["depth","direct_unit_attributed","closure_attributed","trait_resolved_attributed","public_api_attributed","cli_entry_attributed","total_attributed"],type:"object"},TestRiskBucketSummaryV1:{additionalProperties:!1,properties:{attributed:{format:"uint64",minimum:0,type:"integer"},excluded:{format:"uint64",minimum:0,type:"integer"},orphan_entry:{format:"uint64",minimum:0,type:"integer"},reachable_unattributed:{format:"uint64",minimum:0,type:"integer"}},required:["attributed","reachable_unattributed","orphan_entry","excluded"],type:"object"},TestRiskConfidenceV1:{description:"What the reported coverage percentage bounds.",enum:["static_lower_bound"],type:"string"},TestRiskEntryV1:{additionalProperties:!1,properties:{attribution_depth:{format:"uint64",minimum:0,type:["integer","null"]},attribution_method:{$ref:"#/$defs/TestAttributionMethodV1"},churn:{format:"uint64",minimum:0,type:"integer"},complexity:{description:"`None` when `complexity_analysis` reports the bounded walk did not\ncover the body; `risk` then weighs the lower-bound counters.",format:"uint32",minimum:0,type:["integer","null"]},complexity_analysis:{$ref:"#/$defs/ComplexityAnalysisV1"},fan_in:{format:"uint64",minimum:0,type:"integer"},file:{type:"string"},has_test:{type:"boolean"},id:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},name:{type:"string"},risk:{format:"double",type:"number"}},required:["id","name","file","line","complexity_analysis","fan_in","has_test","attribution_method","risk","churn"],type:"object"},TestRiskSummaryV1:{additionalProperties:!1,properties:{attribution:{$ref:"#/$defs/TestRiskAttributionSummaryV1"},buckets:{$ref:"#/$defs/TestRiskBucketSummaryV1"},confidence:{$ref:"#/$defs/TestRiskConfidenceV1"},confidence_note:{type:"string"},coverage_pct:{format:"double",type:"number"},skipped:{format:"uint64",minimum:0,type:"integer"},tested:{format:"uint64",minimum:0,type:"integer"},top_risk_unattributed:{type:"string"},top_risk_untested:{type:"string"},total_functions:{format:"uint64",minimum:0,type:"integer"}},required:["total_functions","tested","skipped","coverage_pct","top_risk_untested","top_risk_unattributed","attribution","buckets","confidence","confidence_note"],type:"object"}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},risks:{items:{$ref:"#/$defs/TestRiskEntryV1"},type:"array"},summary:{$ref:"#/$defs/TestRiskSummaryV1"}},required:["risks","summary"],title:"TestRiskResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{kinds:{items:{type:"string"},type:["array","null"]},limit:{format:"uint32",minimum:0,type:["integer","null"]},path:{type:["string","null"]}},title:"TodosSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fE,CodeIndexConvergenceParkedV1:fA,CodeIndexStalenessStateV1:fz,PrimitiveFreshnessStateV1:gG,PrimitiveIndexingStateV1:gB,PrimitiveSearchFreshnessV1:gQ,TodoMarkerV1:{additionalProperties:!1,properties:{enclosing:{type:["string","null"]},file:{type:"string"},kind:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},text:{type:"string"}},required:["kind","file","line","text"],type:"object"}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{by_kind:{additionalProperties:{format:"uint64",minimum:0,type:"integer"},type:"object"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},markers:{items:{$ref:"#/$defs/TodoMarkerV1"},type:"array"},match_count:{format:"uint",minimum:0,type:"integer"}},required:["match_count","by_kind","markers"],title:"TodosResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{ecosystem:{description:"Filter findings to one ecosystem ('rust' or 'typescript'). Every\necosystem section is still reported, so the scope of the answer stays\nvisible.",type:["string","null"]},limit:{description:"Maximum unmounted files to return (default: 200, max: 2000). The\nresponse always states the true total and how many rows were omitted.",format:"uint32",minimum:0,type:["integer","null"]},path:{description:"Filter findings to files under this directory path (e.g. 'src/daemon').\nThe whole project is still walked, reachability is not a per-directory\nquestion.",type:["string","null"]}},title:"UnmountedFilesSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fE,CodeIndexConvergenceParkedV1:fA,CodeIndexStalenessStateV1:fz,PrimitiveFreshnessStateV1:gG,PrimitiveIndexingStateV1:gB,PrimitiveSearchFreshnessV1:gQ,UnmountedEcosystemStatusV1:{description:"Whether an ecosystem was audited, absent, or recognised but unmodelled.",enum:["audited","not_present","unsupported"],type:"string"},UnmountedEcosystemV1:{additionalProperties:!1,properties:{blind_spots:{items:{type:"string"},type:"array"},ecosystem:{type:"string"},entry_point_count:{format:"uint64",minimum:0,type:"integer"},excluded_path_globs:{items:{type:"string"},type:"array"},mounted_file_count:{format:"uint64",minimum:0,type:"integer"},note:{type:["string","null"]},package_count:{format:"uint64",minimum:0,type:"integer"},scanned_file_count:{format:"uint64",minimum:0,type:"integer"},status:{$ref:"#/$defs/UnmountedEcosystemStatusV1"},unclaimed_file_count:{format:"uint64",minimum:0,type:"integer"},unmounted_file_count:{format:"uint64",minimum:0,type:"integer"},verdict:{type:"string"}},required:["ecosystem","status","package_count","entry_point_count","scanned_file_count","mounted_file_count","unclaimed_file_count","unmounted_file_count","verdict","blind_spots","excluded_path_globs"],type:"object"},UnmountedFileV1:{additionalProperties:!1,properties:{ecosystem:{type:"string"},file:{type:"string"},manifest:{type:"string"},nearest_mounted_parent:{type:["string","null"]},package:{type:"string"},suggested_declaration:{type:["string","null"]}},required:["file","ecosystem","package","manifest"],type:"object"}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{complete:{type:"boolean"},ecosystem:{type:["string","null"]},ecosystems:{items:{$ref:"#/$defs/UnmountedEcosystemV1"},type:"array"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},limit:{format:"uint64",minimum:0,type:"integer"},omitted_count:{format:"uint64",minimum:0,type:"integer"},path:{type:["string","null"]},returned_count:{format:"uint64",minimum:0,type:"integer"},unmounted:{items:{$ref:"#/$defs/UnmountedFileV1"},type:"array"},unmounted_file_count:{format:"uint64",minimum:0,type:"integer"}},required:["unmounted_file_count","returned_count","omitted_count","complete","ecosystems","limit","unmounted"],title:"UnmountedFilesResultV1",type:"object"},{$defs:{UnsafePatternKindV1:vG},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{exclude_tests:{description:"When true, skips files whose path looks like a test (default: false).",type:["boolean","null"]},kinds:{description:"Subset of patterns to search. Default (or an empty list): every kind.",items:{$ref:"#/$defs/UnsafePatternKindV1"},type:["array","null"]},limit:{description:"Maximum number of matches to return (default: 200, max: 2000).",format:"uint32",minimum:0,type:["integer","null"]},path:{description:"Filter to files under this directory (relative to project root).",type:["string","null"]}},title:"UnsafePatternsSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fE,CodeIndexConvergenceParkedV1:fA,CodeIndexStalenessStateV1:fz,CoverageCompleteness:hP,PrimitiveFreshnessStateV1:gG,PrimitiveIndexingStateV1:gB,PrimitiveSearchFreshnessV1:gQ,UnsafePatternFileOmissionV1:{additionalProperties:!1,description:"One scanned file whose sites are not reported as verified matches.",properties:{cause:{$ref:"#/$defs/UnsafePatternOmissionCauseV1"},file:{type:"string"},reason:{$ref:"#/$defs/UnsafePatternOmissionReasonV1"},withheld_match_count:{description:"Sites of the requested kinds found in the file and withheld.",format:"uint64",minimum:0,type:"integer"}},required:["file","reason","cause","withheld_match_count"],type:"object"},UnsafePatternKindV1:vG,UnsafePatternMatchV1:{additionalProperties:!1,properties:{enclosing:{type:["string","null"]},file:{type:"string"},in_test:{type:"boolean"},kind:{$ref:"#/$defs/UnsafePatternKindV1"},line:{format:"uint32",minimum:0,type:"integer"},snippet:{type:"string"}},required:["kind","file","line","snippet","in_test"],type:"object"},UnsafePatternOmissionCauseV1:{description:"What prevented the file from being classified.",oneOf:[{const:"syntax_errors",description:"The Rust grammar parsed the file with error nodes. Valid Rust it only\npartly parses (heavy `macro_rules!`) lands here.",type:"string"}]},UnsafePatternOmissionReasonV1:{description:"Why a file's risky-pattern sites are withheld from the verified result.",oneOf:[{const:"test_scope_unclassified",description:"Whether a site is test-only cannot be decided for this file.",type:"string"}]}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{by_kind:{additionalProperties:{format:"uint64",minimum:0,type:"integer"},description:"Match count per pattern kind, keyed by its wire spelling.",type:"object"},coverage:{$ref:"#/$defs/CoverageCompleteness",description:"`partial` exactly when `omissions` names a file whose sites are withheld."},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},match_count:{format:"uint64",minimum:0,type:"integer"},matches:{items:{$ref:"#/$defs/UnsafePatternMatchV1"},type:"array"},omissions:{items:{$ref:"#/$defs/UnsafePatternFileOmissionV1"},type:"array"}},required:["match_count","by_kind","matches","coverage","omissions"],title:"UnsafePatternsResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{agent_label:{type:["string","null"]},branch:{type:["string","null"]},commit:{type:["string","null"]},limit:{format:"uint64",minimum:0,type:["integer","null"]},run_id:{type:["string","null"]},session_id:{type:["string","null"]},worktree:{type:["string","null"]}},title:"WorkflowsRequestV1",type:"object"},{$defs:{GitScopeV1:yM,RetainedErrorV1:_R,RetainedOutcomeStatusV1:_P,WorkflowAgentV1:{additionalProperties:!1,properties:{agent_id:{type:"string"},agent_label:{type:"string"},agent_session_id:{type:["string","null"]},ended_ts:{format:"int64",type:["integer","null"]},model:{type:["string","null"]},phase:{type:["string","null"]},run_id:{type:"string"},started_ts:{format:"int64",type:["integer","null"]},status:{$ref:"#/$defs/WorkflowStatusV1"},tokens:{format:"int64",type:"integer"},transcript_path:{type:["string","null"]}},required:["run_id","agent_label","agent_id","status"],type:"object"},WorkflowCoverageV1:{enum:["complete","conclusive","bounded_prefix"],type:"string"},WorkflowQueryModeV1:{enum:["session","git_scope","run","agent"],type:"string"},WorkflowRunV1:{additionalProperties:!1,properties:{agent_count:{format:"int64",type:"integer"},description:{type:["string","null"]},ended_ts:{format:"int64",type:["integer","null"]},name:{type:["string","null"]},parent_session_id:{type:"string"},phase_json:{type:["string","null"]},result_summary:{type:["string","null"]},run_id:{type:"string"},started_ts:{format:"int64",type:["integer","null"]},status:{$ref:"#/$defs/WorkflowStatusV1"}},required:["run_id","parent_session_id","status"],type:"object"},WorkflowStatusV1:{enum:["running","completed","failed","unknown"],type:"string"}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{agent:{anyOf:[{$ref:"#/$defs/WorkflowAgentV1"},{type:"null"}]},agent_count:{format:"int64",type:["integer","null"]},agent_label:{type:["string","null"]},agents:{items:{$ref:"#/$defs/WorkflowAgentV1"},type:["array","null"]},agents_complete:{type:["boolean","null"]},agents_coverage:{anyOf:[{$ref:"#/$defs/WorkflowCoverageV1"},{type:"null"}]},agents_returned:{format:"uint",minimum:0,type:["integer","null"]},count:{format:"uint",minimum:0,type:["integer","null"]},error:{anyOf:[{$ref:"#/$defs/RetainedErrorV1"},{type:"null"}]},found:{type:["boolean","null"]},git_filter:{anyOf:[{$ref:"#/$defs/GitScopeV1"},{type:"null"}]},lookup_complete:{type:["boolean","null"]},lookup_coverage:{anyOf:[{$ref:"#/$defs/WorkflowCoverageV1"},{type:"null"}]},message:{type:["string","null"]},mode:{anyOf:[{$ref:"#/$defs/WorkflowQueryModeV1"},{type:"null"}]},run:{anyOf:[{$ref:"#/$defs/WorkflowRunV1"},{type:"null"}]},run_id:{type:["string","null"]},runs:{items:{$ref:"#/$defs/WorkflowRunV1"},type:["array","null"]},session_id:{type:["string","null"]},status:{$ref:"#/$defs/RetainedOutcomeStatusV1"}},required:["status"],title:"WorkflowsResultV1",type:"object"},{$defs:{ManifestDigest:gl,NativeWorktreeTargetV1:gE,ProjectId:g2,RepositoryId:_v,ScopeSetId:_Q,ScopeSetRevision:_X,WorktreeId:$M},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Confirmation names the exact inspection digest, not a worktree id alone.",properties:{inspection_digest:{$ref:"#/$defs/ManifestDigest"},scope_set_digest:{$ref:"#/$defs/ManifestDigest"},scope_set_id:{$ref:"#/$defs/ScopeSetId"},scope_set_revision:{$ref:"#/$defs/ScopeSetRevision"},target:{$ref:"#/$defs/NativeWorktreeTargetV1"}},required:["scope_set_id","scope_set_revision","scope_set_digest","target","inspection_digest"],title:"WorktreeCleanupConfirmRequestV1",type:"object"},{$defs:{ManifestDigest:gl,NativeWorktreeTargetV1:gE,ProjectId:g2,RepositoryId:_v,ScopeSetId:_Q,ScopeSetRevision:_X,WorktreeId:$M},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{scope_set_digest:{$ref:"#/$defs/ManifestDigest"},scope_set_id:{$ref:"#/$defs/ScopeSetId"},scope_set_revision:{$ref:"#/$defs/ScopeSetRevision"},target:{$ref:"#/$defs/NativeWorktreeTargetV1"}},required:["scope_set_id","scope_set_revision","scope_set_digest","target"],title:"WorktreeCleanupInspectRequestV1",type:"object"},{$defs:{ManifestDigest:gl,NativeWorktreeTargetV1:gE,ProjectId:g2,RepositoryId:_v,ScopeSetId:_Q,ScopeSetRevision:_X,WorktreeId:$M},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{confirmation_digest:{$ref:"#/$defs/ManifestDigest"},scope_set_digest:{$ref:"#/$defs/ManifestDigest"},scope_set_id:{$ref:"#/$defs/ScopeSetId"},scope_set_revision:{$ref:"#/$defs/ScopeSetRevision"},target:{$ref:"#/$defs/NativeWorktreeTargetV1"}},required:["scope_set_id","scope_set_revision","scope_set_digest","target","confirmation_digest"],title:"WorktreeCleanupReconcileRequestV1",type:"object"},{$defs:{ManifestDigest:gl,NativeWorktreeTargetV1:gE,ProjectId:g2,RepositoryId:_v,ScopeSetId:_Q,ScopeSetRevision:_X,UtcMicros:vK,WorktreeId:$M},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Removal carries both proofs so a stale confirmation cannot be replayed\nagainst another inspection of the same opaque worktree identity.",properties:{confirmation_digest:{$ref:"#/$defs/ManifestDigest"},confirmed_at:{$ref:"#/$defs/UtcMicros"},inspection_digest:{$ref:"#/$defs/ManifestDigest"},scope_set_digest:{$ref:"#/$defs/ManifestDigest"},scope_set_id:{$ref:"#/$defs/ScopeSetId"},scope_set_revision:{$ref:"#/$defs/ScopeSetRevision"},target:{$ref:"#/$defs/NativeWorktreeTargetV1"}},required:["scope_set_id","scope_set_revision","scope_set_digest","target","inspection_digest","confirmed_at","confirmation_digest"],title:"WorktreeCleanupRemoveRequestV1",type:"object"},{$defs:{ManifestDigest:gl,NativeWorktreeTargetV1:gE,ProjectId:g2,RepositoryId:_v,ScopeSetId:_Q,ScopeSetRevision:_X,WorktreeId:$M},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{scope_set_digest:{$ref:"#/$defs/ManifestDigest"},scope_set_id:{$ref:"#/$defs/ScopeSetId"},scope_set_revision:{$ref:"#/$defs/ScopeSetRevision"},target:{$ref:"#/$defs/NativeWorktreeTargetV1"}},required:["scope_set_id","scope_set_revision","scope_set_digest","target"],title:"WorktreeInventoryRequestV1",type:"object"},{$defs:{ActorId:mW,TaskId:vC},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Issues a short-lived, version-bound task-opening token.\n\nIdentity, scope, authority revisions, issuance time, and expiry are all\nsupplied by the admitted daemon request. The caller supplies only the\nbearer, destination session, exact task version, and enrolled recipient\nprincipal it intends to authorize.",properties:{recipient_actor_id:{$ref:"#/$defs/ActorId"},session_id:{type:"string"},task_id:{$ref:"#/$defs/TaskId"},token:{type:"string"},version:{format:"uint64",minimum:0,type:"integer"}},required:["token","session_id","task_id","version","recipient_actor_id"],title:"IssueTaskHandoffRequestV1",type:"object"},{$defs:{ManifestDigest:gl,TaskId:vC,UtcMicros:vK},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Flat public receipt for a committed task-handoff issue.\n\nThe complete binding remains inside the daemon authority. Publishing only\nthese exact identifiers avoids turning mutable grant and policy internals\ninto a second public wire authority.",properties:{expires_at:{$ref:"#/$defs/UtcMicros"},issued_at:{$ref:"#/$defs/UtcMicros"},issued_request_id:{type:"string"},session_id:{type:"string"},task_id:{$ref:"#/$defs/TaskId"},token_digest:{$ref:"#/$defs/ManifestDigest"},version:{format:"uint64",minimum:0,type:"integer"}},required:["token_digest","issued_request_id","session_id","task_id","version","issued_at","expires_at"],title:"IssueTaskHandoffResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:'Enumerates the handoff tokens this caller could redeem in one session.\n\nThe two `open_*` operations redeem a bearer the caller already holds; they\ncannot answer "what has been handed to me and not yet taken up". This one\ncan, and it does so without any bearer: the request carries no token, and\nthe result carries only digests.',properties:{session_id:{type:"string"}},required:["session_id"],title:"ListTaskHandoffsRequestV1",type:"object"},{$defs:{FeedbackFindingId:yi,HandoffOpenKindV1:{enum:["investigation","task"],type:"string"},HandoffOpenTargetV1:{oneOf:[{properties:{finding_id:{$ref:"#/$defs/FeedbackFindingId"},kind:{const:"investigation",type:"string"},owner_version_digest:{$ref:"#/$defs/ManifestDigest"}},required:["kind","finding_id","owner_version_digest"],type:"object"},{properties:{kind:{const:"task",type:"string"},owner_version_digest:{$ref:"#/$defs/ManifestDigest"},task_id:{$ref:"#/$defs/TaskId"},version:{format:"uint64",minimum:0,type:"integer"}},required:["kind","task_id","version","owner_version_digest"],type:"object"}]},ListedTaskHandoffV1:{additionalProperties:!1,description:"One handoff token, projected for public reading.\n\nMirrors [`IssueTaskHandoffResultV1`]'s doctrine: the complete binding stays\ninside the daemon authority, and only these identifiers cross the wire. No\nbearer secret exists to leak here. The authority never stored one, and the\nissuer's grant identity and policy digests stay concealed.",properties:{consumed_at:{anyOf:[{$ref:"#/$defs/UtcMicros"},{type:"null"}],description:"Set only when `state` is `consumed`."},expires_at:{$ref:"#/$defs/UtcMicros"},issued_at:{$ref:"#/$defs/UtcMicros"},issued_request_id:{type:"string"},kind:{$ref:"#/$defs/HandoffOpenKindV1"},session_id:{type:"string"},state:{$ref:"#/$defs/TaskHandoffTokenStateV1"},target:{$ref:"#/$defs/HandoffOpenTargetV1"},token_digest:{$ref:"#/$defs/ManifestDigest"}},required:["token_digest","issued_request_id","session_id","kind","target","issued_at","expires_at","state"],type:"object"},ManifestDigest:gl,TaskHandoffTokenStateV1:{description:"Where one enumerated token stands at the observed instant.",oneOf:[{const:"open",description:"Not yet redeemed, and not yet expired: the live frontier.",type:"string"},{const:"consumed",description:"Redeemed. Single-use, so it can never be redeemed again.",type:"string"},{const:"expired",description:"Its window closed with no redemption. A dropped handoff, which is\nexactly the fact a frontier exists to surface.",type:"string"}]},TaskId:vC,UtcMicros:vK},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"The handoff-token frontier for one session.",properties:{consumed_count:{format:"uint32",minimum:0,type:"integer"},expired_count:{format:"uint32",minimum:0,type:"integer"},handoffs:{items:{$ref:"#/$defs/ListedTaskHandoffV1"},type:"array"},observed_at:{$ref:"#/$defs/UtcMicros",description:"The instant the states below were decided at. Without it, `open` and\n`expired` are claims with no clock behind them."},open_count:{format:"uint32",minimum:0,type:"integer"},truncated:{description:"True when the enumeration ceiling was reached, so the counts describe a\nprefix of the frontier rather than all of it.",type:"boolean"}},required:["observed_at","handoffs","open_count","consumed_count","expired_count","truncated"],title:"ListTaskHandoffsResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{session_id:{type:"string"},token:{type:"string"}},required:["token","session_id"],title:"OpenInvestigationHandoffRequestV1",type:"object"},{$defs:{FeedbackFindingId:yi,HandoffOpenReceiptV1:yL,InvestigationHandoffSurfaceV1:{additionalProperties:!1,properties:{finding_id:{$ref:"#/$defs/FeedbackFindingId"},owner_version_digest:{$ref:"#/$defs/ManifestDigest"}},required:["finding_id","owner_version_digest"],type:"object"},ManifestDigest:gl,UtcMicros:vK},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{receipt:{$ref:"#/$defs/HandoffOpenReceiptV1"},surface:{$ref:"#/$defs/InvestigationHandoffSurfaceV1"}},required:["surface","receipt"],title:"OpenInvestigationHandoffResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{session_id:{type:"string"},token:{type:"string"}},required:["token","session_id"],title:"OpenTaskHandoffRequestV1",type:"object"},{$defs:{HandoffOpenReceiptV1:yL,ManifestDigest:gl,TaskHandoffSurfaceV1:{additionalProperties:!1,properties:{task_id:{$ref:"#/$defs/TaskId"},version:{format:"uint64",minimum:0,type:"integer"}},required:["task_id","version"],type:"object"},TaskId:vC,UtcMicros:vK},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{receipt:{$ref:"#/$defs/HandoffOpenReceiptV1"},surface:{$ref:"#/$defs/TaskHandoffSurfaceV1"}},required:["surface","receipt"],title:"OpenTaskHandoffResultV1",type:"object"},{$defs:{ManifestDigest:gl,MultiRootContinuationV1:gR,MultiRootOperationV1:{description:"Closed federated read families. The family is typed while its existing\noperation-specific request remains the canonical JSON payload owned by that\napplication surface.",oneOf:[{properties:{kind:{const:"work",type:"string"},request:!0},required:["kind","request"],type:"object"},{properties:{kind:{const:"git",type:"string"},request:!0},required:["kind","request"],type:"object"},{properties:{kind:{const:"feedback",type:"string"},request:!0},required:["kind","request"],type:"object"},{properties:{kind:{const:"impact",type:"string"},request:!0},required:["kind","request"],type:"object"},{properties:{kind:{const:"query",type:"string"},request:!0},required:["kind","request"],type:"object"}]},RootGenerationV1:_A,RootScopeOutcomeV1_for_Nullable_RootGenerationV1:_M,RootScopeOutcomeV1_for_Nullable_string:_W,ScopeOutcome_for_Nullable_RootGenerationV1:_K,ScopeOutcome_for_Nullable_string:_J,ScopePartialReasonV1:_Z,ScopeSetId:_Q,ScopeSetRevision:_X,ScopeUnavailableReasonV1:_1},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"External federated request bound to one persisted scope-set revision and\ndigest. Query/order digests and root generations are server-derived.",properties:{continuation:{anyOf:[{$ref:"#/$defs/MultiRootContinuationV1"},{type:"null"}]},operation:{$ref:"#/$defs/MultiRootOperationV1"},page:{format:"uint64",minimum:0,type:"integer"},scope_set_digest:{$ref:"#/$defs/ManifestDigest"},scope_set_id:{$ref:"#/$defs/ScopeSetId"},scope_set_revision:{$ref:"#/$defs/ScopeSetRevision"}},required:["scope_set_id","scope_set_revision","scope_set_digest","operation","page"],title:"MultiRootExecuteRequestV1",type:"object"},{$defs:{ManifestDigest:gl,MultiRootContinuationV1:gR,RootGenerationV1:_A,RootScopeOutcomeV1_for_Array_of_AnyValue:{additionalProperties:!1,description:"One typed outcome pinned to the digest of an exact resolved root.",properties:{outcome:{$ref:"#/$defs/ScopeOutcome_for_Array_of_AnyValue"},scope_digest:{$ref:"#/$defs/ManifestDigest"}},required:["scope_digest","outcome"],type:"object"},RootScopeOutcomeV1_for_Nullable_RootGenerationV1:_M,RootScopeOutcomeV1_for_Nullable_string:_W,ScopeOutcome_for_Array_of_AnyValue:{description:"Truthful outcome for one authorized root or an aggregate over roots.\n\n`Denied` and `Unavailable` carry no value and therefore cannot be confused\nwith a successful empty result.",oneOf:[{properties:{outcome:{const:"exact",type:"string"},value:{items:!0,type:"array"}},required:["outcome","value"],type:"object"},{properties:{outcome:{const:"partial",type:"string"},value:{properties:{reason:{$ref:"#/$defs/ScopePartialReasonV1"},value:{items:!0,type:"array"}},required:["value","reason"],type:"object"}},required:["outcome","value"],type:"object"},{properties:{outcome:{const:"denied",type:"string"}},required:["outcome"],type:"object"},{properties:{outcome:{const:"unavailable",type:"string"},value:{properties:{reason:{$ref:"#/$defs/ScopeUnavailableReasonV1"}},required:["reason"],type:"object"}},required:["outcome","value"],type:"object"}]},ScopeOutcome_for_Nullable_RootGenerationV1:_K,ScopeOutcome_for_Nullable_string:_J,ScopePartialReasonV1:_Z,ScopeSetId:_Q,ScopeSetRevision:_X,ScopeUnavailableReasonV1:_1},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Federated page preserving each root outcome and aggregate partial truth.",properties:{aggregate:{$ref:"#/$defs/ScopeOutcome_for_Array_of_AnyValue"},continuation:{anyOf:[{$ref:"#/$defs/MultiRootContinuationV1"},{type:"null"}]},roots:{items:{$ref:"#/$defs/RootScopeOutcomeV1_for_Array_of_AnyValue"},type:"array"},scope_set_digest:{$ref:"#/$defs/ManifestDigest"},scope_set_id:{$ref:"#/$defs/ScopeSetId"},scope_set_revision:{$ref:"#/$defs/ScopeSetRevision"}},required:["scope_set_id","scope_set_revision","scope_set_digest","roots","aggregate"],title:"MultiRootQueryPageV1_for_AnyValue",type:"object"},{$defs:{ProjectId:g2,RegisteredRootSelectorV1:{additionalProperties:!1,description:"Exact registered-root selector accepted by scope-set CAS.",properties:{project_id:{$ref:"#/$defs/ProjectId"},root:{type:"string"}},required:["project_id","root"],type:"object"},ScopeSetId:_Q,ScopeSetRevision:_X},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Canonical external selector for creating or updating an authorized scope\nset. Every member names one exact registered root; project-only selection\ncannot silently widen to an active or first-mounted graph.",properties:{expected_revision:{anyOf:[{$ref:"#/$defs/ScopeSetRevision"},{type:"null"}]},roots:{items:{$ref:"#/$defs/RegisteredRootSelectorV1"},type:"array"},scope_set_id:{$ref:"#/$defs/ScopeSetId"}},required:["scope_set_id","roots"],title:"MultiRootScopeSetCasRequestV1",type:"object"},{$defs:{ActorId:mW,AuthorizedRoot:m2,AuthorizedScopeSet:m4,BrainId:fs,ManifestDigest:gl,MultiRootScopeSetCasStatusV1:{enum:["applied","conflict"],type:"string"},ProjectId:g2,RefId:_u,RegisteredRootLocatorV1:_m,RepositoryId:_v,ResolvedScope:_k,ScopeSetId:_Q,ScopeSetRevision:_X,SharedProfileStoreLocatorV1:va,UserProfileId:vB,WorktreeId:$M},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{scope_set:{anyOf:[{$ref:"#/$defs/AuthorizedScopeSet"},{type:"null"}]},status:{$ref:"#/$defs/MultiRootScopeSetCasStatusV1"}},required:["status"],title:"MultiRootScopeSetCasResultV1",type:"object"},{$defs:{ScopeSetId:_Q},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{scope_set_id:{$ref:"#/$defs/ScopeSetId"}},required:["scope_set_id"],title:"MultiRootScopeSetReadRequestV1",type:"object"},{$defs:{ActorId:mW,AuthorizedRoot:m2,AuthorizedScopeSet:m4,BrainId:fs,ManifestDigest:gl,ProjectId:g2,RefId:_u,RegisteredRootLocatorV1:_m,RepositoryId:_v,ResolvedScope:_k,ScopeSetId:_Q,ScopeSetRevision:_X,SharedProfileStoreLocatorV1:va,UserProfileId:vB,WorktreeId:$M},$schema:"https://json-schema.org/draft/2020-12/schema",anyOf:[{$ref:"#/$defs/AuthorizedScopeSet"},{type:"null"}],title:"Nullable_AuthorizedScopeSet"},{$defs:{AcceptWorkProposalDispositionV1:{description:"The accept-proposal operation can commit acceptance only.",enum:["accepted"],type:"string"},CatalogGenerationId:fq,ConfigurationRevisionId:f0,ManifestDigest:gl,ProjectId:g2,ProposalId:g5,ProviderId:_i,RepositoryId:_v,RetrievalAnchorId:_q,SourceStoreId:v$,TaskId:vC,UtcMicros:vK,VerifiedWorkGraphVersionV1:vZ,WorkCommandId:bc,WorkProductAuthorizedRelationScopeV1:bJ,WorkProductEventEvidenceV1:bZ,WorkProductExpectedAuthorityV1:bY,WorkProductMutationIdentityV1:b0,WorkProductRevisionPinsV1:b6,WorkProductSelectionScopeV1:b3,WorkProposalV1:b8,WorkProposedChildV1:b7,WorkProviderRouteId:$o,WorkProviderRouteV1:$n,WorkRouteDecisionV1:$f,WorkScoreKindV1:$$,WorkShapeAssessmentV1:$S,WorkSizingV1:$k},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{disposition:{$ref:"#/$defs/AcceptWorkProposalDispositionV1"},mutation:{$ref:"#/$defs/WorkProductMutationIdentityV1"},proposal:{$ref:"#/$defs/WorkProposalV1"},selection:{$ref:"#/$defs/WorkProductSelectionScopeV1"}},required:["selection","proposal","disposition","mutation"],title:"AcceptWorkProposalRequestV1",type:"object"},{$defs:{ActorId:mW,AttemptId:m1,BrainId:fs,CatalogGenerationId:fq,ConfigurationRevisionId:f0,ManifestDigest:gl,ProjectId:g2,ProposalId:g5,ProviderId:_i,RepositoryId:_v,RetrievalAnchorId:_q,RunId:_z,SourceStoreId:v$,TaskEvidenceLinkV1:vx,TaskId:vC,UserProfileId:vB,UtcMicros:vK,VerifiedWorkGraphVersionV1:vZ,WorkAcceptanceCriterionV1:vQ,WorkAttemptIdentityV1:v2,WorkCommandId:bc,WorkGraphChangeV1:bI,WorkHandoffV1:bT,WorkHierarchyV1:bO,WorkInitiativeV1:bE,WorkItemInputV1:bA,WorkItemV1:bM,WorkMilestoneV1:bz,WorkPlanV1:bK,WorkProductAuthorizedRelationScopeV1:bJ,WorkProductEventEvidenceV1:bZ,WorkProductEventPayloadV1:bQ,WorkProductEventV1:bX,WorkProductGraphV1:b1,WorkProductProfileScopeV1:b2,WorkProposalDecisionV1:b9,WorkProposalDispositionV1:b5,WorkProposalV1:b8,WorkProposedChildV1:b7,WorkProviderRouteId:$o,WorkProviderRouteV1:$n,WorkRelationReplanDecisionV1:$s,WorkRelationReplanProposalV1:$d,WorkRouteDecisionV1:$f,WorkScoreKindV1:$$,WorkShapeAssessmentV1:$S,WorkSizingV1:$k},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{event:{$ref:"#/$defs/WorkProductEventV1"},replayed:{type:"boolean"},verified_graph_version:{$ref:"#/$defs/VerifiedWorkGraphVersionV1"}},required:["event","verified_graph_version","replayed"],title:"WorkProductMutationReceiptV1",type:"object"},{$defs:{AttemptId:m1,CoverageStateV1:hV,DuplicateEffectOutcomeV1:hE,DuplicateEffortKindV1:hA,ProjectionGenerationId:g9,QuantityEvidenceClassV1:_a,RunId:_z,TaskId:vC,UtcMicros:vK,WorkAttemptIdentityV1:v2,WorkCommandId:bc,WorkDuplicateAdjudicationEvidenceV1:bp,WorkDuplicateAdjudicationQuantitiesV1:bu,WorkTopologyGenerationRefV1:$P},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{command_id:{$ref:"#/$defs/WorkCommandId"},evidence:{$ref:"#/$defs/WorkDuplicateAdjudicationEvidenceV1"},expected_revision:{format:"uint64",minimum:0,type:["integer","null"]},first_attempt:{$ref:"#/$defs/WorkAttemptIdentityV1"},occurred_at:{$ref:"#/$defs/UtcMicros"},quantities:{$ref:"#/$defs/WorkDuplicateAdjudicationQuantitiesV1"},reason:{type:"string"},second_attempt:{$ref:"#/$defs/WorkAttemptIdentityV1"},verdict:{$ref:"#/$defs/DuplicateEffortKindV1"}},required:["first_attempt","second_attempt","evidence","verdict","quantities","reason","command_id","occurred_at"],title:"WorkDuplicateAdjudicationCommandV1",type:"object"},{$defs:{ActorId:mW,AttemptId:m1,CoverageStateV1:hV,DuplicateEffectOutcomeV1:hE,DuplicateEffortKindV1:hA,ManifestDigest:gl,ProjectionGenerationId:g9,QuantityEvidenceClassV1:_a,RunId:_z,TaskId:vC,UtcMicros:vK,WorkAttemptIdentityV1:v2,WorkCommandId:bc,WorkDuplicateAdjudicationCommandV1:{additionalProperties:!1,properties:{command_id:{$ref:"#/$defs/WorkCommandId"},evidence:{$ref:"#/$defs/WorkDuplicateAdjudicationEvidenceV1"},expected_revision:{format:"uint64",minimum:0,type:["integer","null"]},first_attempt:{$ref:"#/$defs/WorkAttemptIdentityV1"},occurred_at:{$ref:"#/$defs/UtcMicros"},quantities:{$ref:"#/$defs/WorkDuplicateAdjudicationQuantitiesV1"},reason:{type:"string"},second_attempt:{$ref:"#/$defs/WorkAttemptIdentityV1"},verdict:{$ref:"#/$defs/DuplicateEffortKindV1"}},required:["first_attempt","second_attempt","evidence","verdict","quantities","reason","command_id","occurred_at"],type:"object"},WorkDuplicateAdjudicationEvidenceV1:bp,WorkDuplicateAdjudicationQuantitiesV1:bu,WorkDuplicateAdjudicationReceiptV1:{additionalProperties:!1,properties:{actor_id:{$ref:"#/$defs/ActorId"},adjudication_ref:{$ref:"#/$defs/ManifestDigest"},canonical_input_digest:{$ref:"#/$defs/ManifestDigest"},command:{$ref:"#/$defs/WorkDuplicateAdjudicationCommandV1"},revision:{format:"uint64",minimum:0,type:"integer"}},required:["command","revision","actor_id","canonical_input_digest","adjudication_ref"],type:"object"},WorkTopologyGenerationRefV1:$P},$schema:"https://json-schema.org/draft/2020-12/schema",oneOf:[{properties:{outcome:{const:"appended",type:"string"},receipt:{$ref:"#/$defs/WorkDuplicateAdjudicationReceiptV1"}},required:["outcome","receipt"],type:"object"},{properties:{outcome:{const:"replayed",type:"string"},receipt:{$ref:"#/$defs/WorkDuplicateAdjudicationReceiptV1"}},required:["outcome","receipt"],type:"object"}],title:"WorkDuplicateAdjudicationAppendOutcomeV1"},{$defs:{AttemptId:m1,RunId:_z,TaskId:vC,WorkAttemptIdentityV1:v2,WorkCommandId:bc},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{adjudication_id:{type:"string"},attempt:{$ref:"#/$defs/WorkAttemptIdentityV1"},command_id:{$ref:"#/$defs/WorkCommandId"},detection_horizon_micros:{format:"uint64",minimum:0,type:"integer"},expected_revision:{format:"uint64",minimum:0,type:["integer","null"]}},required:["adjudication_id","attempt","detection_horizon_micros","command_id"],title:"AdjudicateWorkLeakCommandV1",type:"object"},{$defs:{AdjudicateWorkLeakCommandV1:{additionalProperties:!1,properties:{adjudication_id:{type:"string"},attempt:{$ref:"#/$defs/WorkAttemptIdentityV1"},command_id:{$ref:"#/$defs/WorkCommandId"},detection_horizon_micros:{format:"uint64",minimum:0,type:"integer"},expected_revision:{format:"uint64",minimum:0,type:["integer","null"]}},required:["adjudication_id","attempt","detection_horizon_micros","command_id"],title:"AdjudicateWorkLeakCommandV1",type:"object"},AttemptId:m1,CoverageStateV1:hV,LeakOwnerClassV1:{enum:["work","workflow","git","delivery","unknown"],type:"string"},ManifestDigest:gl,RunId:_z,TaskId:vC,UtcMicros:vK,VerifiedWorkLeakEvidenceV1:{additionalProperties:!1,description:"Exact result of one scan by the canonical lease/process/effect/placement/\ndelivery evidence owner. Evidence references are opaque local anchors;\ntheir owning records remain behind normal authorization.",properties:{attempt:{$ref:"#/$defs/WorkAttemptIdentityV1"},coverage:{$ref:"#/$defs/CoverageStateV1"},detection_horizon_micros:{format:"uint64",minimum:0,type:"integer"},evidence_refs:{items:{type:"string"},type:"array"},kind:{$ref:"#/$defs/WorkExecutionLeakKindV1"},owner_class:{$ref:"#/$defs/LeakOwnerClassV1"},recovery:{$ref:"#/$defs/WorkExecutionLeakRecoveryV1"},scan_completed_at:{$ref:"#/$defs/UtcMicros"},scan_started_at:{$ref:"#/$defs/UtcMicros"}},required:["attempt","kind","recovery","owner_class","coverage","detection_horizon_micros","scan_started_at","scan_completed_at","evidence_refs"],type:"object"},WorkAttemptIdentityV1:v2,WorkCommandId:bc,WorkExecutionLeakKindV1:{enum:["lease_after_terminal","attempt_without_live_owner","effect_unknown_past_deadline","missing_worktree_binding","unbounded_delivery","none","unknown"],type:"string"},WorkExecutionLeakRecoveryV1:{enum:["not_required","pending","recovered","failed","unknown"],type:"string"},WorkLeakAdjudicationReceiptV1:{additionalProperties:!1,properties:{canonical_input_digest:{$ref:"#/$defs/ManifestDigest"},command:{$ref:"#/$defs/AdjudicateWorkLeakCommandV1"},evidence:{$ref:"#/$defs/VerifiedWorkLeakEvidenceV1"},revision:{format:"uint64",minimum:0,type:"integer"},scan_deadline:{$ref:"#/$defs/UtcMicros",description:"Daemon/request-owned deadline that bounded the source scan."}},required:["command","revision","evidence","scan_deadline","canonical_input_digest"],type:"object"}},$schema:"https://json-schema.org/draft/2020-12/schema",oneOf:[{properties:{outcome:{const:"appended",type:"string"},receipt:{$ref:"#/$defs/WorkLeakAdjudicationReceiptV1"}},required:["outcome","receipt"],type:"object"},{properties:{outcome:{const:"replayed",type:"string"},receipt:{$ref:"#/$defs/WorkLeakAdjudicationReceiptV1"}},required:["outcome","receipt"],type:"object"}],title:"WorkLeakAdjudicationOutcomeV1"},{$defs:{CatalogGenerationId:fq,ConfigurationRevisionId:f0,ManifestDigest:gl,ProjectId:g2,RepositoryId:_v,RetrievalAnchorId:_q,SourceStoreId:v$,TaskId:vC,UtcMicros:vK,VerifiedWorkGraphVersionV1:vZ,WorkCommandId:bc,WorkProductAuthorizedRelationScopeV1:bJ,WorkProductEventEvidenceV1:bZ,WorkProductExpectedAuthorityV1:bY,WorkProductMutationIdentityV1:b0,WorkProductRevisionPinsV1:b6,WorkProductSelectionScopeV1:b3},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{based_on_version:{format:"uint64",minimum:0,type:"integer"},mutation:{$ref:"#/$defs/WorkProductMutationIdentityV1"},selection:{$ref:"#/$defs/WorkProductSelectionScopeV1"},task_id:{$ref:"#/$defs/TaskId"}},required:["selection","task_id","based_on_version","mutation"],title:"AdmitWorkExecutionRequestV1",type:"object"},{$defs:{ActorId:mW,AttemptId:m1,AutomaticWorktreeGcV1:m3,BrainId:fs,BranchCollisionPolicyV1:fd,BranchNameComponentV1:fc,BranchNameSeparatorV1:fl,BranchNamingPolicyV1:fp,BranchTopologyKindV1:f_,BranchTopologyPolicyV1:fv,CanonicalGitRefNameV1:fR,CanonicalGitRefPrefix:fP,CapabilityId:fV,CatalogGenerationId:fq,ConfigurationRevisionId:f0,ConfigurationSnapshotId:f2,CredentialReferenceId:hq,CrossMergeModeV1:hI,CrossMergePolicyV1:hx,GitHubStackedPullRequestPolicyV1:yP,HistoryRewritePolicyV1:yU,LocatorDigest:gr,ManifestDigest:gl,ProjectId:g2,ProposalId:g5,ProtectedRefDispositionV1:g8,ProtectedRefRuleV1:g7,ProtectedRefSelectorV1:_e,ProviderId:_i,RepositoryId:_v,RepositoryPlacementScopeV1:_b,RequiredCheckExpectationV1:_$,RequiredCheckV1:_S,RetrievalAnchorId:_q,ReviewRequirementV1:_T,ReviewTopologyKindV1:_O,ReviewTopologyPolicyV1:_E,RunId:_z,SensitiveFilesystemLocatorV1:_2,SourceStoreId:v$,TaskEvidenceLinkV1:vx,TaskId:vC,TopologyConcurrencyPolicyV1:vF,TopologyEscalationPolicyV1:vL,TopologyGatePolicyV1:vU,TopologyNotificationLevelV1:vH,UserProfileId:vB,UtcMicros:vK,VerifiedWorkGraphVersionV1:vZ,WorkAcceptanceCriterionV1:vQ,WorkApprovalPolicy:vX,WorkAttemptIdentityV1:v2,WorkCommandId:bc,WorkEgressPolicy:bh,WorkExecutableReference:bb,WorkExecutionLimits:bS,WorkExecutionSnapshot:bk,WorkFallbackTopology:bP,WorkFilesystemPolicy:bq,WorkGraphChangeV1:bI,WorkHandoffV1:bT,WorkHierarchyV1:bO,WorkInitiativeV1:bE,WorkItemInputV1:bA,WorkItemV1:bM,WorkMilestoneV1:bz,WorkPlanV1:bK,WorkProductAuthorizedRelationScopeV1:bJ,WorkProductEventEvidenceV1:bZ,WorkProductEventPayloadV1:bQ,WorkProductEventV1:bX,WorkProductGraphV1:b1,WorkProductMutationReceiptV1:{additionalProperties:!1,properties:{event:{$ref:"#/$defs/WorkProductEventV1"},replayed:{type:"boolean"},verified_graph_version:{$ref:"#/$defs/VerifiedWorkGraphVersionV1"}},required:["event","verified_graph_version","replayed"],type:"object"},WorkProductProfileScopeV1:b2,WorkProposalDecisionV1:b9,WorkProposalDispositionV1:b5,WorkProposalV1:b8,WorkProposedChildV1:b7,WorkProviderBackendV1:$t,WorkProviderProtocol:$i,WorkProviderRouteId:$o,WorkProviderRouteV1:$n,WorkRelationReplanDecisionV1:$s,WorkRelationReplanProposalV1:$d,WorkRouteDecisionV1:$f,WorkSandboxPolicy:$b,WorkScoreKindV1:$$,WorkShapeAssessmentV1:$S,WorkSizingV1:$k,WorkTopologyPolicyV1:$V,WorktreeCleanlinessRequirementV1:$A,WorktreePlacementModeV1:$z,WorktreeRetentionPolicyV1:$D,WorktreeRootPolicyV1:$F},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Execution admission together with the immutable provider snapshot licensed\nby the accepted proposal and current configuration authority.",properties:{execution_snapshot:{$ref:"#/$defs/WorkExecutionSnapshot"},mutation:{$ref:"#/$defs/WorkProductMutationReceiptV1"}},required:["mutation","execution_snapshot"],title:"AdmittedWorkExecutionV1",type:"object"},{$defs:{RunId:_z,TaskId:vC,UtcMicros:vK,WorkPlacementKindV1:bU,WorkPlacementTargetV1:bG},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{occurred_at:{$ref:"#/$defs/UtcMicros"},retention_eligible_at:{anyOf:[{$ref:"#/$defs/UtcMicros"},{type:"null"}],default:null,description:"When retention makes this placement eligible for a fresh cleanup\npreflight. Eligibility is not delete authority."},run_id:{$ref:"#/$defs/RunId"},target:{$ref:"#/$defs/WorkPlacementTargetV1"},task_id:{$ref:"#/$defs/TaskId"}},required:["task_id","run_id","target","occurred_at"],title:"AdmitWorkPlacementCommand",type:"object"},{$defs:{RunId:_z,TaskId:vC,UtcMicros:vK,WorkPlacementBlockerV1:bF,WorkPlacementIdentityV1:bL,WorkPlacementKindV1:bU,WorkPlacementStateV1:bH,WorkPlacementTargetV1:bG},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"One run's durable placement relation.",properties:{authority_version:{format:"uint64",minimum:0,type:"integer"},blockers:{items:{$ref:"#/$defs/WorkPlacementBlockerV1"},type:"array",uniqueItems:!0},identity:{$ref:"#/$defs/WorkPlacementIdentityV1"},retention_eligible_at:{anyOf:[{$ref:"#/$defs/UtcMicros"},{type:"null"}],description:"When retention makes this placement *eligible* for a fresh cleanup\npreflight. Eligibility is not delete authority."},state:{$ref:"#/$defs/WorkPlacementStateV1"},target:{$ref:"#/$defs/WorkPlacementTargetV1"},transitioned_at:{$ref:"#/$defs/UtcMicros"}},required:["identity","target","state","authority_version","transitioned_at","blockers"],title:"WorkPlacementV1",type:"object"},{$defs:{AttemptId:m1,RunId:_z,TaskId:vC},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{attempt_id:{$ref:"#/$defs/AttemptId"},run_id:{$ref:"#/$defs/RunId"},task_id:{$ref:"#/$defs/TaskId"}},required:["task_id","run_id","attempt_id"],title:"WorkAttemptStatusRequestV1",type:"object"},{$defs:{AttemptId:m1,AutomaticWorktreeGcV1:m3,BranchCollisionPolicyV1:fd,BranchNameComponentV1:fc,BranchNameSeparatorV1:fl,BranchNamingPolicyV1:fp,BranchTopologyKindV1:f_,BranchTopologyPolicyV1:fv,CanonicalGitRefNameV1:fR,CanonicalGitRefPrefix:fP,CapabilityId:fV,CommitId:fH,ConfigurationRevisionId:f0,ConfigurationSnapshotId:f2,CredentialReferenceId:hq,CrossMergeModeV1:hI,CrossMergePolicyV1:hx,GitHubStackedPullRequestPolicyV1:yP,HistoryRewritePolicyV1:yU,LocatorDigest:gr,ManifestDigest:gl,ProjectId:g2,ProposalId:g5,ProtectedRefDispositionV1:g8,ProtectedRefRuleV1:g7,ProtectedRefSelectorV1:_e,ProviderId:_i,RefId:_u,RepositoryId:_v,RepositoryPlacementScopeV1:_b,RequiredCheckExpectationV1:_$,RequiredCheckV1:_S,ReviewRequirementV1:_T,ReviewTopologyKindV1:_O,ReviewTopologyPolicyV1:_E,RunId:_z,SensitiveFilesystemLocatorV1:_2,TaskId:vC,TopologyConcurrencyPolicyV1:vF,TopologyEscalationPolicyV1:vL,TopologyGatePolicyV1:vU,TopologyNotificationLevelV1:vH,UtcMicros:vK,WorkApprovalPolicy:vX,WorkArtifactId:vY,WorkArtifactRefV1:v1,WorkAttemptIdentityV1:v2,WorkAttemptProgressV1:v3,WorkAttemptProjectionBindingV1:v9,WorkAttemptStateV1:v7,WorkCancellationAcknowledgementV1:bo,WorkCancellationEscalationV1:bn,WorkCancellationRequestId:ba,WorkCancellationRequestV1:bs,WorkCancellationStateV1:bd,WorkEffectStateV1:bm,WorkEgressPolicy:bh,WorkExecutableReference:bb,WorkExecutionEnvelopeV1:b$,WorkExecutionLimits:bS,WorkExecutionSnapshot:bk,WorkFallbackTopology:bP,WorkFenceEpochV1:bV,WorkFilesystemPolicy:bq,WorkLeaseFenceV1:bW,WorkLeaseId:bN,WorkProviderBackendV1:$t,WorkProviderProtocol:$i,WorkProviderRouteId:$o,WorkProviderRouteV1:$n,WorkRecoveryStateV1:$a,WorkRestartReasonV1:$c,WorkSandboxPolicy:$b,WorkTerminalEvidenceV1:$R,WorkTopologyPolicyV1:$V,WorkflowOperationRef:$j,WorktreeCleanlinessRequirementV1:$A,WorktreeId:$M,WorktreePlacementModeV1:$z,WorktreeRetentionPolicyV1:$D,WorktreeRootPolicyV1:$F},$schema:"https://json-schema.org/draft/2020-12/schema",properties:{actual_route:{anyOf:[{$ref:"#/$defs/WorkProviderRouteV1"},{type:"null"}]},artifacts:{items:{$ref:"#/$defs/WorkArtifactRefV1"},type:"array"},cancellation:{$ref:"#/$defs/WorkCancellationStateV1"},execution:{$ref:"#/$defs/WorkExecutionEnvelopeV1"},identity:{$ref:"#/$defs/WorkAttemptIdentityV1"},lease:{$ref:"#/$defs/WorkLeaseFenceV1"},progress:{anyOf:[{$ref:"#/$defs/WorkAttemptProgressV1"},{type:"null"}]},projection_binding:{$ref:"#/$defs/WorkAttemptProjectionBindingV1"},recovery:{$ref:"#/$defs/WorkRecoveryStateV1"},requested_route:{$ref:"#/$defs/WorkProviderRouteV1"},state:{$ref:"#/$defs/WorkAttemptStateV1"},terminal:{anyOf:[{$ref:"#/$defs/WorkTerminalEvidenceV1"},{type:"null"}]}},required:["identity","projection_binding","execution","lease","state","artifacts","cancellation","recovery","requested_route"],title:"WorkAttemptV1",type:"object"},{$defs:{AttemptId:m1,RunId:_z,TaskId:vC,UtcMicros:vK,WorkCancellationRequestId:ba},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{attempt_id:{$ref:"#/$defs/AttemptId"},occurred_at:{$ref:"#/$defs/UtcMicros"},request_id:{$ref:"#/$defs/WorkCancellationRequestId"},run_id:{$ref:"#/$defs/RunId"},task_id:{$ref:"#/$defs/TaskId"}},required:["task_id","run_id","attempt_id","request_id","occurred_at"],title:"CancelWorkAttemptCommand",type:"object"},{$defs:{ManifestDigest:gl,ProjectId:g2,RepositoryId:_v,TaskId:vC,UtcMicros:vK,VerifiedWorkGraphVersionV1:vZ,WorkProductAuthorizedRelationScopeV1:bJ,WorkProductSelectionScopeV1:b3},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{new_version:{$ref:"#/$defs/VerifiedWorkGraphVersionV1"},observed_at:{$ref:"#/$defs/UtcMicros"},old_version:{$ref:"#/$defs/VerifiedWorkGraphVersionV1"},selection:{$ref:"#/$defs/WorkProductSelectionScopeV1"},task_id:{$ref:"#/$defs/TaskId"}},required:["selection","task_id","old_version","new_version","observed_at"],title:"WorkProposalComparisonRequestV1",type:"object"},{$defs:{ActorId:mW,AttemptId:m1,ManifestDigest:gl,ProposalId:g5,ProviderId:_i,RetrievalAnchorId:_q,RunId:_z,TaskEvidenceLinkV1:vx,TaskId:vC,UtcMicros:vK,VerifiedWorkEvidenceRootV1:{additionalProperties:!1,properties:{item:{$ref:"#/$defs/WorkItemV1"},links:{items:{$ref:"#/$defs/TaskEvidenceLinkV1"},type:"array"},proposal_decisions:{items:{$ref:"#/$defs/WorkProposalDecisionV1"},type:"array"},relation_replan_decisions:{items:{$ref:"#/$defs/WorkRelationReplanDecisionV1"},type:"array"},relations:{items:{$ref:"#/$defs/WorkProductRelationV1"},type:"array"},verified_version:{$ref:"#/$defs/VerifiedWorkGraphVersionV1"}},required:["verified_version","item","relations","proposal_decisions","relation_replan_decisions","links"],type:"object"},VerifiedWorkGraphVersionV1:vZ,WorkAcceptanceCriterionV1:vQ,WorkAttemptIdentityV1:v2,WorkHandoffV1:bT,WorkHierarchyV1:bO,WorkItemInputV1:bA,WorkItemV1:bM,WorkProductRelationV1:b4,WorkProposalComparisonEffectV1:{oneOf:[{const:"advisory_only",description:"Comparison is evidence only. There is no apply edge from this result.",type:"string"}]},WorkProposalDecisionV1:b9,WorkProposalDispositionV1:b5,WorkProposalV1:b8,WorkProposedChildV1:b7,WorkProviderRouteId:$o,WorkProviderRouteV1:$n,WorkRelationReplanDecisionV1:$s,WorkRelationReplanProposalV1:$d,WorkRouteDecisionV1:$f,WorkScoreKindV1:$$,WorkShapeAssessmentV1:$S,WorkSizingV1:$k},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{added_evidence:{items:{$ref:"#/$defs/TaskEvidenceLinkV1"},type:"array"},added_relations:{items:{$ref:"#/$defs/WorkProductRelationV1"},type:"array"},effect:{$ref:"#/$defs/WorkProposalComparisonEffectV1"},item_changed:{type:"boolean"},new:{$ref:"#/$defs/VerifiedWorkEvidenceRootV1"},old:{$ref:"#/$defs/VerifiedWorkEvidenceRootV1"},removed_evidence:{items:{$ref:"#/$defs/TaskEvidenceLinkV1"},type:"array"},removed_relations:{items:{$ref:"#/$defs/WorkProductRelationV1"},type:"array"},task_id:{$ref:"#/$defs/TaskId"}},required:["task_id","old","new","added_relations","removed_relations","added_evidence","removed_evidence","item_changed","effect"],title:"WorkProposalComparisonV1",type:"object"},{$defs:{ActorId:mW,AttemptId:m1,CatalogGenerationId:fq,ConfigurationRevisionId:f0,ManifestDigest:gl,ProjectId:g2,ProposalId:g5,ProviderId:_i,RepositoryId:_v,RetrievalAnchorId:_q,RunId:_z,SourceStoreId:v$,TaskId:vC,UtcMicros:vK,VerifiedWorkGraphVersionV1:vZ,WorkAcceptanceCriterionV1:vQ,WorkAttemptIdentityV1:v2,WorkCommandId:bc,WorkHandoffV1:bT,WorkHierarchyV1:bO,WorkInitiativeV1:bE,WorkItemInputV1:bA,WorkItemV1:bM,WorkMilestoneV1:bz,WorkPlanV1:bK,WorkProductAuthorizedRelationScopeV1:bJ,WorkProductEventEvidenceV1:bZ,WorkProductExpectedAuthorityV1:bY,WorkProductMutationIdentityV1:b0,WorkProductRevisionPinsV1:b6,WorkProductSelectionScopeV1:b3,WorkProviderRouteId:$o,WorkProviderRouteV1:$n,WorkRouteDecisionV1:$f},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{initiative:{$ref:"#/$defs/WorkInitiativeV1"},item:{$ref:"#/$defs/WorkItemV1"},milestone:{$ref:"#/$defs/WorkMilestoneV1"},mutation:{$ref:"#/$defs/WorkProductMutationIdentityV1"},plan:{$ref:"#/$defs/WorkPlanV1"},selection:{$ref:"#/$defs/WorkProductSelectionScopeV1"}},required:["selection","initiative","plan","milestone","item","mutation"],title:"CreateWorkTaskRequestV1",type:"object"},{$defs:{WorkAttemptListCursorV1:v6},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{cursor:{anyOf:[{$ref:"#/$defs/WorkAttemptListCursorV1"},{type:"null"}],default:null},page_size:{format:"uint32",minimum:0,type:"integer"}},required:["page_size"],title:"WorkAttemptListRequestV1",type:"object"},{$defs:{AttemptId:m1,ManifestDigest:gl,RunId:_z,TaskId:vC,UtcMicros:vK,WorkAttemptIdentityV1:v2,WorkAttemptListCoverageV1:v4,WorkAttemptListCursorV1:v6,WorkAttemptStateV1:v7,WorkEffectStateV1:bm,WorkExecutionSpanV1:{additionalProperties:!1,properties:{admitted_projection_sequence:{description:"Durable Work projection sequence under which execution was admitted.",format:"uint64",minimum:0,type:"integer"},effect_state:{$ref:"#/$defs/WorkEffectStateV1"},ended_at:{anyOf:[{$ref:"#/$defs/UtcMicros"},{type:"null"}]},identity:{$ref:"#/$defs/WorkAttemptIdentityV1"},started_at:{$ref:"#/$defs/UtcMicros"},state:{$ref:"#/$defs/WorkAttemptStateV1"},terminal_evidence_digest:{anyOf:[{$ref:"#/$defs/ManifestDigest"},{type:"null"}]},wall_micros:{description:"Present only when both owner instants form a valid non-negative span.",format:"uint64",minimum:0,type:["integer","null"]}},required:["identity","admitted_projection_sequence","state","effect_state","started_at"],type:"object"},WorkExecutionTimingCoverageV1:{oneOf:[{additionalProperties:!1,properties:{coverage:{const:"complete",type:"string"}},required:["coverage"],type:"object"},{additionalProperties:!1,properties:{coverage:{const:"partial",type:"string"},invalid_terminal_span:{items:{$ref:"#/$defs/WorkAttemptIdentityV1"},type:"array"},missing_dispatch:{items:{$ref:"#/$defs/WorkAttemptIdentityV1"},type:"array"}},required:["coverage","missing_dispatch","invalid_terminal_span"],type:"object"}]},WorkObservedExecutionOrderBasisV1:{enum:["terminal_observed_at_then_admitted_projection_sequence_then_attempt_identity"],type:"string"},WorkObservedExecutionV1:{additionalProperties:!1,properties:{admitted_projection_sequence:{format:"uint64",minimum:0,type:"integer"},evidence_digest:{$ref:"#/$defs/ManifestDigest"},identity:{$ref:"#/$defs/WorkAttemptIdentityV1"},observed_at:{$ref:"#/$defs/UtcMicros"},ordinal:{description:"One-based order assigned after sorting the durable terminal instants.",format:"uint32",minimum:0,type:"integer"},state:{$ref:"#/$defs/WorkAttemptStateV1"}},required:["ordinal","identity","admitted_projection_sequence","observed_at","state","evidence_digest"],type:"object"}},$schema:"https://json-schema.org/draft/2020-12/schema",oneOf:[{additionalProperties:!1,properties:{state:{const:"absent",type:"string"}},required:["state"],type:"object"},{additionalProperties:!1,properties:{attempt_coverage:{$ref:"#/$defs/WorkAttemptListCoverageV1"},observed_order:{items:{$ref:"#/$defs/WorkObservedExecutionV1"},type:"array"},order_basis:{$ref:"#/$defs/WorkObservedExecutionOrderBasisV1"},spans:{items:{$ref:"#/$defs/WorkExecutionSpanV1"},type:"array"},state:{const:"listed",type:"string"},timing_coverage:{$ref:"#/$defs/WorkExecutionTimingCoverageV1"}},required:["state","spans","observed_order","order_basis","attempt_coverage","timing_coverage"],type:"object"}],title:"WorkExecutionHistoryV1"},{$defs:{ManifestDigest:gl,ProjectId:g2,RepositoryId:_v,TaskId:vC,UtcMicros:vK,VerifiedWorkGraphVersionV1:vZ,WorkExpertiseCategoryV1:bw,WorkProductAuthorizedRelationScopeV1:bJ,WorkProductSelectionScopeV1:b3},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{evidence_not_before:{$ref:"#/$defs/UtcMicros",description:"Evidence before this owner-supplied horizon is excluded as stale."},expertise_categories:{description:"Categories for which the returned context will be used ephemerally.",items:{$ref:"#/$defs/WorkExpertiseCategoryV1"},type:"array",uniqueItems:!0},limit:{format:"uint32",minimum:0,type:"integer"},observed_at:{$ref:"#/$defs/UtcMicros"},selection:{$ref:"#/$defs/WorkProductSelectionScopeV1"},task_id:{$ref:"#/$defs/TaskId"},verified_version:{$ref:"#/$defs/VerifiedWorkGraphVersionV1"}},required:["selection","task_id","verified_version","evidence_not_before","expertise_categories","limit","observed_at"],title:"WorkExperienceRequestV1",type:"object"},{$defs:{ActorId:mW,AttemptId:m1,ConfigurationRevisionId:f0,ConfigurationSnapshotId:f2,ManifestDigest:gl,ObservationSourceIdentityV1:gW,ProposalId:g5,ProviderId:_i,RetrievalAnchorId:_q,RunId:_z,SessionId:_5,TaskEvidenceLinkV1:vx,TaskId:vC,UtcMicros:vK,VerifiedWorkGraphVersionV1:vZ,WorkAcceptanceCriterionV1:vQ,WorkArtifactId:vY,WorkArtifactRefV1:v1,WorkAttemptEvidenceRecordV1:v0,WorkAttemptIdentityV1:v2,WorkAttemptProviderOutcomeV1:v5,WorkAttemptReceiptV1:v8,WorkAttemptStreamChannelV1:be,WorkAttemptStreamSummaryV1:bt,WorkExperienceApplicabilityV1:{enum:["same_accepted_route","same_milestone"],type:"string"},WorkExperienceCandidateV1:{additionalProperties:!1,properties:{applicability:{description:"Separate declared applicability facts. This is intentionally not a\nscore and candidates remain in canonical TaskId order.",items:{$ref:"#/$defs/WorkExperienceApplicabilityV1"},type:"array",uniqueItems:!0},attempt_receipts:{description:"Exact receipts for accepted successful attempts whose sealed provider\nevidence and declared artifacts establish reusable observed work. The\nidentity is also the canonical `work_retrieve_evidence` drill target.",items:{$ref:"#/$defs/WorkAttemptReceiptV1"},type:"array"},evidence:{description:"Exact anchored evidence establishing that this is observed experience.",items:{$ref:"#/$defs/TaskEvidenceLinkV1"},type:"array"},item:{$ref:"#/$defs/WorkItemV1"}},required:["item","evidence","attempt_receipts","applicability"],type:"object"},WorkExperienceCoverageV1:{oneOf:[{additionalProperties:!1,properties:{coverage:{const:"unavailable",type:"string"}},required:["coverage"],type:"object"},{additionalProperties:!1,properties:{applicable:{format:"uint32",minimum:0,type:"integer"},coverage:{const:"complete",type:"string"},returned:{format:"uint32",minimum:0,type:"integer"},stale_excluded:{format:"uint32",minimum:0,type:"integer"}},required:["coverage","returned","applicable","stale_excluded"],type:"object"},{additionalProperties:!1,properties:{applicable:{format:"uint32",minimum:0,type:"integer"},coverage:{const:"partial",type:"string"},omitted_by_limit:{format:"uint32",minimum:0,type:"integer"},returned:{format:"uint32",minimum:0,type:"integer"},stale_excluded:{format:"uint32",minimum:0,type:"integer"}},required:["coverage","returned","applicable","stale_excluded","omitted_by_limit"],type:"object"}]},WorkExpertiseAuthorizationV1:{oneOf:[{additionalProperties:!1,properties:{availability:{const:"available",type:"string"},categories:{items:{$ref:"#/$defs/WorkExpertiseCategoryV1"},type:"array",uniqueItems:!0},durability:{$ref:"#/$defs/WorkExpertiseContextDurabilityV1"},expires_at:{$ref:"#/$defs/UtcMicros"},pin:{$ref:"#/$defs/WorkExpertiseConsentPinV1"}},required:["availability","categories","expires_at","pin","durability"],type:"object"},{additionalProperties:!1,properties:{availability:{const:"unavailable",type:"string"},legal_actions:{items:{$ref:"#/$defs/WorkExpertiseLegalActionV1"},type:"array",uniqueItems:!0},pin:{$ref:"#/$defs/WorkExpertiseConsentPinV1"},reasons:{items:{$ref:"#/$defs/WorkExpertiseUnavailableReasonV1"},type:"array",uniqueItems:!0}},required:["availability","reasons","legal_actions","pin"],type:"object"}]},WorkExpertiseCategoryV1:bw,WorkExpertiseConsentPinV1:{additionalProperties:!1,properties:{configuration_digest:{$ref:"#/$defs/ManifestDigest"},configuration_revision:{$ref:"#/$defs/ConfigurationRevisionId"},configuration_snapshot:{$ref:"#/$defs/ConfigurationSnapshotId"},provenance_digest:{$ref:"#/$defs/ManifestDigest"}},required:["configuration_revision","configuration_snapshot","configuration_digest","provenance_digest"],type:"object"},WorkExpertiseContextDurabilityV1:{oneOf:[{const:"ephemeral_only",description:"Context is returned for this read only and cannot establish evidence,\nrouting, proposal acceptance, execution admission, or completion.",type:"string"}]},WorkExpertiseLegalActionV1:{enum:["grant_user_consent","grant_project_consent","renew_user_consent","renew_project_consent","allow_requested_categories"],type:"string"},WorkExpertiseUnavailableReasonV1:{enum:["user_consent_disabled","project_consent_disabled","user_consent_not_yet_effective","project_consent_not_yet_effective","user_consent_expired","project_consent_expired","requested_category_not_allowed"],type:"string"},WorkHandoffV1:bT,WorkHierarchyV1:bO,WorkItemInputV1:bA,WorkItemV1:bM,WorkProviderAvailabilityV1:$e,WorkProviderBackendV1:$t,WorkProviderFallbackRecordV1:$r,WorkProviderRouteId:$o,WorkProviderRouteV1:$n,WorkRouteDecisionV1:$f},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{candidates:{items:{$ref:"#/$defs/WorkExperienceCandidateV1"},type:"array"},coverage:{$ref:"#/$defs/WorkExperienceCoverageV1"},evidence_not_before:{$ref:"#/$defs/UtcMicros"},expertise:{$ref:"#/$defs/WorkExpertiseAuthorizationV1"},observed_at:{$ref:"#/$defs/UtcMicros"},task_id:{$ref:"#/$defs/TaskId"},verified_version:{$ref:"#/$defs/VerifiedWorkGraphVersionV1"}},required:["task_id","verified_version","evidence_not_before","observed_at","expertise","candidates","coverage"],title:"WorkExperienceV1",type:"object"},{$defs:{ManifestDigest:gl,ProjectId:g2,ProposalId:g5,RepositoryId:_v,TaskId:vC,UtcMicros:vK,WorkEvidenceFrontierV1:bg,WorkProductAuthorizedRelationScopeV1:bJ,WorkProductSelectionScopeV1:b3},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Read-only proposal generation over one exact current product graph.",properties:{live_git_evidence:{anyOf:[{$ref:"#/$defs/WorkEvidenceFrontierV1"},{type:"null"}],default:null},occurred_at:{$ref:"#/$defs/UtcMicros"},proposal_id:{$ref:"#/$defs/ProposalId"},selection:{$ref:"#/$defs/WorkProductSelectionScopeV1"},task_id:{$ref:"#/$defs/TaskId"}},required:["selection","task_id","proposal_id","occurred_at"],title:"GenerateProposalRequest",type:"object"},{$defs:{ConfigurationRevisionId:f0,ManifestDigest:gl,PolicyIdentifierV1:{description:"A bounded, canonical identifier owned by the policy input schema.\n\nIt represents immutable references only; it is never a path, display\nlabel, provider account, branch name, or native object identifier.",type:"string"},ProposalId:g5,ProviderId:_i,TaskId:vC,UtcMicros:vK,VerifiedWorkGraphVersionV1:vZ,WorkCalibratedSizingV1:{additionalProperties:!1,description:"Calibrated sizing. Emitted ONLY when support >= floor. Every field is\nnamed separately (Plan 06); `support_floor` carries the governing floor\ninto the record.",properties:{band:{$ref:"#/$defs/WorkOrdinalBandV1",description:"The sizing band itself: the stronger of the route's declared effort and\nthe derived shape magnitude, widened when the cohort error is high."},cohort:{description:"Identity of the cohort the sizing was calibrated over: the top-ranked\nroute id. Sizing from one cohort is never reused for another.",type:"string"},drift_valid:{description:"False when the cohort contains incomparable or stale observations, so a\nconsumer can refuse a sizing that drifted rather than silently trust it.",type:"boolean"},error:{$ref:"#/$defs/WorkOrdinalBandV1",description:"Observed adverse-outcome band over the cohort. An ordinal band, never a\nrate and never a probability."},horizon:{$ref:"#/$defs/UtcMicros",description:"Latest comparable observation in the cohort. Nothing after\n`evaluated_at` contributes, so the horizon never runs ahead of the input."},support:{description:"Count of comparable in-cohort outcomes backing this sizing.",format:"uint32",minimum:0,type:"integer"},support_floor:{description:"The floor that governed this emission, carried so replay shows which\nfloor applied rather than assuming the current constant.",format:"uint32",minimum:0,type:"integer"}},required:["cohort","horizon","support","support_floor","error","drift_valid","band"],type:"object"},WorkCalibrationEvidenceV1:{additionalProperties:!1,description:"Raw calibration values and their exact decision provenance.\n\nNo rate, probability, or composite score is derived here. Consumers see\nthe authority-supplied outcome rows, categorical uncertainty, and exact\ndenominator counts that produced the proposal's existing calibrated sizing.",properties:{cohort_route:{type:["string","null"]},comparable_outcomes:{format:"uint32",minimum:0,type:"integer"},eligible_route_count:{format:"uint32",minimum:0,type:"integer"},incomparable_outcomes:{format:"uint32",minimum:0,type:"integer"},provenance:{$ref:"#/$defs/WorkCalibrationProvenanceV1"},raw_outcomes:{items:{$ref:"#/$defs/WorkPriorOutcomeV1"},type:"array"},routes_with_outcomes:{format:"uint32",minimum:0,type:"integer"},uncertainty:{$ref:"#/$defs/WorkCalibrationUncertaintyV1"}},required:["raw_outcomes","eligible_route_count","routes_with_outcomes","comparable_outcomes","incomparable_outcomes","uncertainty","provenance"],type:"object"},WorkCalibrationProvenanceV1:{additionalProperties:!1,properties:{configuration_digest:{$ref:"#/$defs/ManifestDigest"},configuration_revision:{anyOf:[{$ref:"#/$defs/ConfigurationRevisionId"},{type:"null"}]},evaluated_at:{$ref:"#/$defs/UtcMicros"},evaluator_id:{type:"string"},evaluator_revision:{format:"uint64",minimum:0,type:"integer"},input_digest:{$ref:"#/$defs/ManifestDigest"},local_evidence:{anyOf:[{$ref:"#/$defs/WorkEvidenceFrontierV1"},{type:"null"}]}},required:["evaluator_id","evaluator_revision","input_digest","configuration_digest","evaluated_at"],type:"object"},WorkCalibrationUncertaintyV1:{enum:["supported","sparse","stale","incomparable"],type:"string"},WorkDecompositionProposalV1:{additionalProperties:!1,description:"A one-level decomposition proposal. Never recursive: a deeper split is a\nseparate sequenced capability, not something this evaluator may invent.",properties:{candidates:{description:"The proposed sketches, ordinal ascending from 0.",items:{$ref:"#/$defs/WorkSubtaskSketchV1"},type:"array"},rationale:{description:"Why the proposal was emitted, in the same ordered reason vocabulary the\ndecision uses.",items:{$ref:"#/$defs/WorkProposalReasonV1"},type:"array"}},required:["candidates","rationale"],type:"object"},WorkEvidenceFrontierV1:bg,WorkFrontierComparisonV1:{description:"Recorded relation between the two supplied frontiers. `Incomparable` means\nat least one side was absent; it is not collapsed into agreement.",enum:["agree","disagree","incomparable"],type:"string"},WorkOrdinalBandV1:bD,WorkPriorOutcomeV1:{additionalProperties:!1,description:"Cohort denominator. APPLICATION-supplied, never worker-supplied.\n\nA worker cannot widen its own calibration cohort, so a route cannot earn\ncalibrated sizing by reporting its own successes.",properties:{accepted:{description:"Whether the produced work was accepted.",type:"boolean"},escaped_defect:{description:"Whether a defect escaped review.",type:"boolean"},observed_at:{$ref:"#/$defs/UtcMicros",description:"When the outcome was observed. Outcomes later than `evaluated_at` are\nINCOMPARABLE and are excluded from support rather than trusted."},rework:{description:"Whether the accepted work required rework.",type:"boolean"},route_id:{description:"The route this outcome belongs to. May name a retired route; only\noutcomes matching the top-ranked route form the sizing cohort.",type:"string"},terminal:{$ref:"#/$defs/WorkPriorTerminalV1",description:"How the attempt terminated."}},required:["route_id","accepted","rework","escaped_defect","terminal","observed_at"],type:"object"},WorkPriorTerminalV1:{description:"How a prior attempt on a route ended. Recorded, never inferred.",enum:["succeeded","failed","timed_out","cancelled"],type:"string"},WorkProposalActionV1:{description:"The explicit command the decision recommends next. A recommendation never\nexecutes; each action names a separate version-checked application command.",enum:["proceed_to_acceptance","hold_for_dependencies","admit_execution","replan"],type:"string"},WorkProposalDecisionV1:{additionalProperties:!1,description:"One explained, replayable work-loop decision.",properties:{based_on_version:{format:"uint64",minimum:0,type:"integer"},configuration_digest:{$ref:"#/$defs/ManifestDigest"},configuration_revision:{anyOf:[{$ref:"#/$defs/ConfigurationRevisionId"},{type:"null"}]},decomposition:{anyOf:[{$ref:"#/$defs/WorkDecompositionProposalV1"},{type:"null"}],description:"One-level decomposition sketch, present only when more than one\ndependency is unresolved."},deterministic_fallback:{description:"True when the recommendation is the declared deterministic baseline\nselected because the evidence cannot support a stronger claim.",type:"boolean"},disposition:{$ref:"#/$defs/WorkProposalDispositionV1"},evaluator_id:{$ref:"#/$defs/PolicyIdentifierV1"},evaluator_revision:{format:"uint64",minimum:0,type:"integer"},frontier_comparison:{$ref:"#/$defs/WorkFrontierComparisonV1"},input_digest:{$ref:"#/$defs/ManifestDigest"},live_git_evidence:{anyOf:[{$ref:"#/$defs/WorkEvidenceFrontierV1"},{type:"null"}],description:"The live Git frontier, returned exactly as supplied."},local_evidence:{anyOf:[{$ref:"#/$defs/WorkEvidenceFrontierV1"},{type:"null"}],description:"The local code/session frontier, returned exactly as supplied."},ordered_reason_codes:{items:{$ref:"#/$defs/WorkProposalReasonV1"},type:"array"},policy_digest:{$ref:"#/$defs/ManifestDigest"},policy_revision:{format:"uint64",minimum:0,type:"integer"},recommended_action:{anyOf:[{$ref:"#/$defs/WorkProposalActionV1"},{type:"null"}]},route_plan:{anyOf:[{$ref:"#/$defs/WorkRoutePlanV1"},{type:"null"}],description:"The explained route plan. Present on every evaluation that reached the\ngates, including the one that found no eligible route."},shape:{anyOf:[{$ref:"#/$defs/WorkTaskShapeV1"},{type:"null"}],description:"Derived task shape. Absent on the invalid, cancelled, and deadline\nshort-circuits, where no planner claim is licensed."},sizing:{anyOf:[{$ref:"#/$defs/WorkCalibratedSizingV1"},{type:"null"}],description:"Calibrated sizing, present only when in-cohort support reached the\ngoverning floor. Absence is a recorded fact, never a fabricated estimate."},task_id:{$ref:"#/$defs/TaskId"}},required:["evaluator_id","evaluator_revision","input_digest","task_id","based_on_version","policy_revision","policy_digest","configuration_digest","disposition","deterministic_fallback","ordered_reason_codes","frontier_comparison"],type:"object"},WorkProposalDispositionV1:{description:"Exactly one disposition per decision.",enum:["allow","deny","abstain","indeterminate"],type:"string"},WorkProposalReasonV1:{enum:["invalid_request","request_cancelled","deadline_exceeded","frontier_agreement","frontier_disagreement","frontier_incomparable","task_accepted","runtime_coverage_partial","runtime_coverage_unavailable","terminal_evidence_observed","execution_in_flight","proposal_accepted","dependencies_unresolved","ready","insufficient_calibration_support","route_budget_exceeded","route_content_location_refused","route_evidence_sparse","route_evidence_stale","human_override_applied","no_eligible_routes","deterministic_baseline_selected"],type:"string"},WorkProposalV1:b8,WorkProposedChildV1:b7,WorkProviderRouteId:$o,WorkProviderRouteV1:$n,WorkRankedRouteV1:{additionalProperties:!1,description:"Ranked route. Dimensions stay SEPARATE. No scalar score field is permitted here.",properties:{autonomy:{$ref:"#/$defs/WorkOrdinalBandV1",description:"Autonomy fitness, echoed unmerged."},correctness:{$ref:"#/$defs/WorkOrdinalBandV1",description:"Correctness fitness, echoed so the ranking can be audited without the input."},cost:{$ref:"#/$defs/WorkOrdinalBandV1",description:"Cost fitness, oriented so `Highest` is best-fitting."},evidence_quality:{$ref:"#/$defs/WorkOrdinalBandV1",description:"Evidence-quality fitness, echoed unmerged."},latency:{$ref:"#/$defs/WorkOrdinalBandV1",description:"Latency fitness, oriented so `Highest` is best-fitting."},rank:{description:"Position in the ranking, ascending from 1.",format:"uint32",minimum:0,type:"integer"},route_id:{description:"The ranked route's identity.",type:"string"},sensitive_data_fitness:{$ref:"#/$defs/WorkOrdinalBandV1",description:"Sensitive-data fitness, echoed unmerged."}},required:["rank","route_id","correctness","sensitive_data_fitness","latency","cost","autonomy","evidence_quality"],type:"object"},WorkRouteDecisionV1:$f,WorkRouteExclusionV1:{additionalProperties:!1,description:"One refused route and the single reason that refused it. Exclusion is\nrecorded rather than silent so a missing route is always explained.",properties:{reason:{$ref:"#/$defs/WorkProposalReasonV1",description:"The first limit the route failed, in the declared exclusion order."},route_id:{description:"The refused route's identity.",type:"string"}},required:["route_id","reason"],type:"object"},WorkRoutePlanV1:{additionalProperties:!1,description:"The explained route plan for one decision. Recommends; never dispatches.",properties:{coverage:{$ref:"#/$defs/WorkOrdinalBandV1",description:"Fraction-free ordinal coverage of the cohort evidence over the ranked set."},deterministic_baseline:{description:"The declared deterministic baseline, selected when evidence cannot support a\nstronger claim. Always names a route that survived exclusion, or None when none did.",type:["string","null"]},exclusions:{description:"Every refused route with its reason, in supplied order.",items:{$ref:"#/$defs/WorkRouteExclusionV1"},type:"array"},human_override_applied:{description:"True only when a recorded human override named a route that survived\nexclusion. An excluded or unknown override leaves ranking untouched.",type:"boolean"},ranked:{description:"Surviving routes in total, deterministic order, rank ascending from 1.",items:{$ref:"#/$defs/WorkRankedRouteV1"},type:"array"},uncertainty:{$ref:"#/$defs/WorkOrdinalBandV1",description:"Widens on sparse / stale / incomparable evidence."}},required:["ranked","exclusions","coverage","uncertainty","human_override_applied"],type:"object"},WorkScoreKindV1:$$,WorkShapeAssessmentV1:$S,WorkSizingV1:$k,WorkSubtaskSketchV1:{additionalProperties:!1,description:"One level only (Q3). Read-only sketch; accepting it stays a separate version-checked command.",properties:{ordinal:{description:"Position in the proposal, ascending from 0. Stable across replays of the\nsame input.",format:"uint32",minimum:0,type:"integer"},shape:{$ref:"#/$defs/WorkTaskShapeKindV1",description:"Kind the sketch would carry if it were accepted as its own task."},summary:{description:"What the sketch covers, phrased from the declared counts alone.",type:"string"}},required:["ordinal","summary","shape"],type:"object"},WorkTaskShapeKindV1:{description:"Kind of work the snapshot facts describe. Derived only from facts already in\nthe input; `Unclassified` when those facts do not distinguish a kind.",enum:["investigation","change","synthesis","unclassified"],type:"string"},WorkTaskShapeV1:{additionalProperties:!1,description:"The derived shape of the task: what kind of work it is and how large the\ndeclared dependency and evidence counts make it.",properties:{band:{$ref:"#/$defs/WorkOrdinalBandV1",description:"Magnitude band derived from the declared dependency and evidence counts."},kind:{$ref:"#/$defs/WorkTaskShapeKindV1",description:"Kind derived from the gate booleans and counts. No new discovery."}},required:["kind","band"],type:"object"}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"A canonical product proposal and the exact verified graph that licensed it.\n\n`proposal` can be moved directly into a `DecideWorkProposalRequestV1`;\ncallers use `verified_graph_version` to construct that mutation's CAS pin.",properties:{calibration:{$ref:"#/$defs/WorkCalibrationEvidenceV1"},decision:{$ref:"#/$defs/WorkProposalDecisionV1"},proposal:{$ref:"#/$defs/WorkProposalV1"},verified_graph_version:{$ref:"#/$defs/VerifiedWorkGraphVersionV1"}},required:["proposal","verified_graph_version","decision","calibration"],title:"GeneratedWorkProposal",type:"object"},{$defs:{WorkAttemptListCursorV1:v6},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"One authority-scoped artifact hydration request, paged like the attempt\nlist and pinned to the same verified topology generation.",properties:{cursor:{anyOf:[{$ref:"#/$defs/WorkAttemptListCursorV1"},{type:"null"}],default:null},page_size:{format:"uint32",minimum:0,type:"integer"}},required:["page_size"],title:"WorkArtifactHydrationRequestV1",type:"object"},{$defs:{AttemptId:m1,ManifestDigest:gl,ObservationSourceIdentityV1:gW,ProviderId:_i,RunId:_z,SessionId:_5,TaskId:vC,UtcMicros:vK,WorkArtifactId:vY,WorkArtifactRefV1:v1,WorkAttemptArtifactsV1:{additionalProperties:!1,description:"The artifacts and evidence one attempt declared.",properties:{artifacts:{description:"Every artifact reference the attempt declared, in its canonical\nstored order. References carry digest and byte length; bytes are\nnever part of this read.",items:{$ref:"#/$defs/WorkArtifactRefV1"},type:"array"},evidence:{$ref:"#/$defs/WorkAttemptEvidenceStateV1"},identity:{$ref:"#/$defs/WorkAttemptIdentityV1"}},required:["identity","artifacts","evidence"],type:"object"},WorkAttemptEvidenceRecordV1:v0,WorkAttemptEvidenceStateV1:{description:"Whether an attempt's terminal evidence has been sealed. An attempt that\nhas not reported an outcome yet is a typed state, not a missing record.",oneOf:[{additionalProperties:!1,description:"The attempt has not sealed terminal evidence yet.",properties:{state:{const:"pending",type:"string"}},required:["state"],type:"object"},{additionalProperties:!1,description:"The sealed terminal evidence record, exactly as it was written.",properties:{record:{$ref:"#/$defs/WorkAttemptEvidenceRecordV1"},state:{const:"sealed",type:"string"}},required:["state","record"],type:"object"}]},WorkAttemptIdentityV1:v2,WorkAttemptListCoverageV1:v4,WorkAttemptListCursorV1:v6,WorkAttemptProviderOutcomeV1:v5,WorkAttemptStreamChannelV1:be,WorkAttemptStreamSummaryV1:bt,WorkAttemptTopologyBindingV1:br,WorkProviderAvailabilityV1:$e,WorkProviderBackendV1:$t,WorkProviderFallbackRecordV1:$r,WorkProviderRouteId:$o,WorkProviderRouteV1:$n},$schema:"https://json-schema.org/draft/2020-12/schema",description:"One authority-scoped artifact hydration read. Absence of any Work in\nscope is a typed state, distinct from an authorized-but-empty page.",oneOf:[{additionalProperties:!1,description:"No Work exists in this authority scope, so there is no attempt set to\nhydrate. Concealed scopes never reach this state: they are refused as\nnot-found-or-not-authorized before any read.",properties:{state:{const:"absent",type:"string"}},required:["state"],type:"object"},{additionalProperties:!1,description:"One page of attempt artifact sets under the verified topology\nsnapshot.",properties:{attempts:{items:{$ref:"#/$defs/WorkAttemptArtifactsV1"},type:"array"},coverage:{$ref:"#/$defs/WorkAttemptListCoverageV1"},state:{const:"hydrated",type:"string"},topology:{$ref:"#/$defs/WorkAttemptTopologyBindingV1"}},required:["state","topology","attempts","coverage"],type:"object"}],title:"WorkArtifactHydrationV1"},{$defs:{AttemptId:m1,AutomaticWorktreeGcV1:m3,BranchCollisionPolicyV1:fd,BranchNameComponentV1:fc,BranchNameSeparatorV1:fl,BranchNamingPolicyV1:fp,BranchTopologyKindV1:f_,BranchTopologyPolicyV1:fv,CanonicalGitRefNameV1:fR,CanonicalGitRefPrefix:fP,CapabilityId:fV,CommitId:fH,ConfigurationRevisionId:f0,ConfigurationSnapshotId:f2,CredentialReferenceId:hq,CrossMergeModeV1:hI,CrossMergePolicyV1:hx,GitHubStackedPullRequestPolicyV1:yP,HistoryRewritePolicyV1:yU,LocatorDigest:gr,ManifestDigest:gl,ProjectId:g2,ProposalId:g5,ProtectedRefDispositionV1:g8,ProtectedRefRuleV1:g7,ProtectedRefSelectorV1:_e,ProviderId:_i,RefId:_u,RepositoryId:_v,RepositoryPlacementScopeV1:_b,RequiredCheckExpectationV1:_$,RequiredCheckV1:_S,ReviewRequirementV1:_T,ReviewTopologyKindV1:_O,ReviewTopologyPolicyV1:_E,RunId:_z,SensitiveFilesystemLocatorV1:_2,TaskId:vC,TopologyConcurrencyPolicyV1:vF,TopologyEscalationPolicyV1:vL,TopologyGatePolicyV1:vU,TopologyNotificationLevelV1:vH,UtcMicros:vK,WorkApprovalPolicy:vX,WorkArtifactId:vY,WorkArtifactRefV1:v1,WorkAttemptIdentityV1:v2,WorkAttemptListCoverageV1:v4,WorkAttemptListCursorV1:v6,WorkAttemptProgressV1:v3,WorkAttemptProjectionBindingV1:v9,WorkAttemptStateV1:v7,WorkAttemptTopologyBindingV1:br,WorkAttemptV1:bi,WorkCancellationAcknowledgementV1:bo,WorkCancellationEscalationV1:bn,WorkCancellationRequestId:ba,WorkCancellationRequestV1:bs,WorkCancellationStateV1:bd,WorkEffectStateV1:bm,WorkEgressPolicy:bh,WorkExecutableReference:bb,WorkExecutionEnvelopeV1:b$,WorkExecutionLimits:bS,WorkExecutionSnapshot:bk,WorkFallbackTopology:bP,WorkFenceEpochV1:bV,WorkFilesystemPolicy:bq,WorkLeaseFenceV1:bW,WorkLeaseId:bN,WorkProviderBackendV1:$t,WorkProviderProtocol:$i,WorkProviderRouteId:$o,WorkProviderRouteV1:$n,WorkRecoveryStateV1:$a,WorkRestartReasonV1:$c,WorkSandboxPolicy:$b,WorkTerminalEvidenceV1:$R,WorkTopologyPolicyV1:$V,WorkflowOperationRef:$j,WorktreeCleanlinessRequirementV1:$A,WorktreeId:$M,WorktreePlacementModeV1:$z,WorktreeRetentionPolicyV1:$D,WorktreeRootPolicyV1:$F},$schema:"https://json-schema.org/draft/2020-12/schema",description:"One authority-scoped attempt-list read. Absence of any Work in scope is a\ntyped state, distinct from an authorized-but-empty page.",oneOf:[{additionalProperties:!1,description:"No Work exists in this authority scope, so there is no attempt set to\npage. Concealed scopes never reach this state: they are refused as\nnot-found-or-not-authorized before any read.",properties:{state:{const:"absent",type:"string"}},required:["state"],type:"object"},{additionalProperties:!1,description:"One page of durable attempts under the verified topology snapshot.",properties:{attempts:{items:{$ref:"#/$defs/WorkAttemptV1"},type:"array"},coverage:{$ref:"#/$defs/WorkAttemptListCoverageV1"},state:{const:"listed",type:"string"},topology:{$ref:"#/$defs/WorkAttemptTopologyBindingV1"}},required:["state","topology","attempts","coverage"],type:"object"}],title:"WorkAttemptListV1"},{$defs:{AcceptWorkTaskRequestV1:{additionalProperties:!1,properties:{evidence_by_criterion:{additionalProperties:{type:"string"},type:"object"},mutation:{$ref:"#/$defs/WorkProductMutationIdentityV1"},selection:{$ref:"#/$defs/WorkProductSelectionScopeV1"},task_id:{$ref:"#/$defs/TaskId"}},required:["selection","task_id","evidence_by_criterion","mutation"],type:"object"},ActorId:mW,AddWorkTaskRequestV1:{additionalProperties:!1,properties:{item:{$ref:"#/$defs/WorkItemV1"},mutation:{$ref:"#/$defs/WorkProductMutationIdentityV1"},selection:{$ref:"#/$defs/WorkProductSelectionScopeV1"}},required:["selection","item","mutation"],type:"object"},AdmitWorkExecutionRequestV1:{additionalProperties:!1,properties:{based_on_version:{format:"uint64",minimum:0,type:"integer"},mutation:{$ref:"#/$defs/WorkProductMutationIdentityV1"},selection:{$ref:"#/$defs/WorkProductSelectionScopeV1"},task_id:{$ref:"#/$defs/TaskId"}},required:["selection","task_id","based_on_version","mutation"],type:"object"},ApplyWorkRelationReplanRequestV1:{additionalProperties:!1,properties:{mutation:{$ref:"#/$defs/WorkProductMutationIdentityV1"},proposal_id:{$ref:"#/$defs/ProposalId"},selection:{$ref:"#/$defs/WorkProductSelectionScopeV1"}},required:["selection","proposal_id","mutation"],type:"object"},AttemptId:m1,CatalogGenerationId:fq,ConfigurationRevisionId:f0,CreateWorkProductRequestV1:{additionalProperties:!1,properties:{initial_graph:{$ref:"#/$defs/WorkProductGraphV1"},mutation:{$ref:"#/$defs/WorkProductMutationIdentityV1"},selection:{$ref:"#/$defs/WorkProductSelectionScopeV1"}},required:["selection","initial_graph","mutation"],type:"object"},CreateWorkTaskRequestV1:{additionalProperties:!1,properties:{initiative:{$ref:"#/$defs/WorkInitiativeV1"},item:{$ref:"#/$defs/WorkItemV1"},milestone:{$ref:"#/$defs/WorkMilestoneV1"},mutation:{$ref:"#/$defs/WorkProductMutationIdentityV1"},plan:{$ref:"#/$defs/WorkPlanV1"},selection:{$ref:"#/$defs/WorkProductSelectionScopeV1"}},required:["selection","initiative","plan","milestone","item","mutation"],type:"object"},DecideWorkProposalRequestV1:{additionalProperties:!1,properties:{disposition:{$ref:"#/$defs/WorkProposalDispositionV1"},mutation:{$ref:"#/$defs/WorkProductMutationIdentityV1"},proposal:{$ref:"#/$defs/WorkProposalV1"},selection:{$ref:"#/$defs/WorkProductSelectionScopeV1"}},required:["selection","proposal","disposition","mutation"],type:"object"},DecideWorkRelationReplanRequestV1:{additionalProperties:!1,properties:{disposition:{$ref:"#/$defs/WorkProposalDispositionV1"},mutation:{$ref:"#/$defs/WorkProductMutationIdentityV1"},proposal:{$ref:"#/$defs/WorkRelationReplanProposalV1"},selection:{$ref:"#/$defs/WorkProductSelectionScopeV1"}},required:["selection","proposal","disposition","mutation"],type:"object"},LinkAcceptedWorkAttemptRequestV1:{additionalProperties:!1,properties:{based_on_version:{format:"uint64",minimum:0,type:"integer"},identity:{$ref:"#/$defs/WorkAttemptIdentityV1"},mutation:{$ref:"#/$defs/WorkProductMutationIdentityV1"},selection:{$ref:"#/$defs/WorkProductSelectionScopeV1"},task_id:{$ref:"#/$defs/TaskId"}},required:["selection","task_id","based_on_version","identity","mutation"],type:"object"},ManifestDigest:gl,ProjectId:g2,ProposalId:g5,ProviderId:_i,RecordWorkHandoffRequestV1:{additionalProperties:!1,properties:{handoff:{$ref:"#/$defs/WorkHandoffV1"},mutation:{$ref:"#/$defs/WorkProductMutationIdentityV1"},selection:{$ref:"#/$defs/WorkProductSelectionScopeV1"}},required:["selection","handoff","mutation"],type:"object"},RepositoryId:_v,RetrievalAnchorId:_q,RunId:_z,SourceStoreId:v$,TaskEvidenceLinkV1:vx,TaskId:vC,UtcMicros:vK,VerifiedWorkGraphVersionV1:vZ,WorkAcceptanceCriterionV1:vQ,WorkAttemptIdentityV1:v2,WorkCommandId:bc,WorkHandoffV1:bT,WorkHierarchyV1:bO,WorkInitiativeV1:bE,WorkItemInputV1:bA,WorkItemV1:bM,WorkMilestoneV1:bz,WorkPlanV1:bK,WorkProductAuthorizedRelationScopeV1:bJ,WorkProductEventEvidenceV1:bZ,WorkProductExpectedAuthorityV1:bY,WorkProductGraphV1:b1,WorkProductMutationIdentityV1:b0,WorkProductRevisionPinsV1:b6,WorkProductSelectionScopeV1:b3,WorkProposalDecisionV1:b9,WorkProposalDispositionV1:b5,WorkProposalV1:b8,WorkProposedChildV1:b7,WorkProviderRouteId:$o,WorkProviderRouteV1:$n,WorkRelationReplanDecisionV1:$s,WorkRelationReplanProposalV1:$d,WorkRouteDecisionV1:$f,WorkScoreKindV1:$$,WorkShapeAssessmentV1:$S,WorkSizingV1:$k},$schema:"https://json-schema.org/draft/2020-12/schema",description:"Closed public mutation surface for the Work-product graph authority.",oneOf:[{properties:{mutation:{const:"create",type:"string"},request:{$ref:"#/$defs/CreateWorkProductRequestV1"}},required:["mutation","request"],type:"object"},{properties:{mutation:{const:"add_task",type:"string"},request:{$ref:"#/$defs/AddWorkTaskRequestV1"}},required:["mutation","request"],type:"object"},{properties:{mutation:{const:"create_task",type:"string"},request:{$ref:"#/$defs/CreateWorkTaskRequestV1"}},required:["mutation","request"],type:"object"},{properties:{mutation:{const:"decide_proposal",type:"string"},request:{$ref:"#/$defs/DecideWorkProposalRequestV1"}},required:["mutation","request"],type:"object"},{properties:{mutation:{const:"decide_relation_replan",type:"string"},request:{$ref:"#/$defs/DecideWorkRelationReplanRequestV1"}},required:["mutation","request"],type:"object"},{properties:{mutation:{const:"apply_relation_replan",type:"string"},request:{$ref:"#/$defs/ApplyWorkRelationReplanRequestV1"}},required:["mutation","request"],type:"object"},{properties:{mutation:{const:"accept_task",type:"string"},request:{$ref:"#/$defs/AcceptWorkTaskRequestV1"}},required:["mutation","request"],type:"object"},{properties:{mutation:{const:"admit_execution",type:"string"},request:{$ref:"#/$defs/AdmitWorkExecutionRequestV1"}},required:["mutation","request"],type:"object"},{properties:{mutation:{const:"link_accepted_attempt",type:"string"},request:{$ref:"#/$defs/LinkAcceptedWorkAttemptRequestV1"}},required:["mutation","request"],type:"object"},{properties:{mutation:{const:"record_handoff",type:"string"},request:{$ref:"#/$defs/RecordWorkHandoffRequestV1"}},required:["mutation","request"],type:"object"}],title:"WorkProductMutationRequestV1",type:"object"},{$defs:{RunId:_z,TaskId:vC,UtcMicros:vK,WorkRunControlReasonV1:$g},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{expected_authority_version:{default:null,description:'The authority version the caller read. Absent means "no control row was\npublished yet"; a mismatch is a conflict, never an overwrite.',format:"uint64",minimum:0,type:["integer","null"]},occurred_at:{$ref:"#/$defs/UtcMicros"},reason:{$ref:"#/$defs/WorkRunControlReasonV1"},run_id:{$ref:"#/$defs/RunId"},task_id:{$ref:"#/$defs/TaskId"}},required:["task_id","run_id","reason","occurred_at"],title:"PauseWorkRunCommand",type:"object"},{$defs:{AttemptId:m1,RunId:_z,TaskId:vC,UtcMicros:vK,WorkRunControlAuthorityV1:$y,WorkRunControlReasonV1:$g,WorkRunControlStateV1:$_,WorkRunDeadlineCheckpointV1:$v},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"One run's durable control aggregate.",properties:{authority:{$ref:"#/$defs/WorkRunControlAuthorityV1"},deadline:{$ref:"#/$defs/WorkRunDeadlineCheckpointV1"},fenced_attempts:{description:'The exact attempts that were live when the current state published.\nEmpty means "none were live", never "we did not look".',items:{$ref:"#/$defs/AttemptId"},type:"array"},reason:{anyOf:[{$ref:"#/$defs/WorkRunControlReasonV1"},{type:"null"}]},run_id:{$ref:"#/$defs/RunId"},state:{$ref:"#/$defs/WorkRunControlStateV1"},task_id:{$ref:"#/$defs/TaskId"},transitioned_at:{$ref:"#/$defs/UtcMicros"}},required:["task_id","run_id","state","authority","deadline","transitioned_at","fenced_attempts"],title:"WorkRunControlV1",type:"object"},{$defs:{RunId:_z,TaskId:vC,UtcMicros:vK,WorkPlacementKindV1:bU,WorkPlacementTargetV1:bG},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{occurred_at:{$ref:"#/$defs/UtcMicros"},run_id:{$ref:"#/$defs/RunId"},target:{$ref:"#/$defs/WorkPlacementTargetV1"},task_id:{$ref:"#/$defs/TaskId"}},required:["task_id","run_id","target","occurred_at"],title:"WorkPlacementPreflightRequestV1",type:"object"},{$defs:{RunId:_z,TaskId:vC,UtcMicros:vK,WorkPlacementBlockerV1:bF,WorkPlacementIdentityV1:bL,WorkPlacementKindV1:bU,WorkPlacementObservationV1:{additionalProperties:!1,description:'What was actually observed at the target, in counts rather than prose.\n\nCounts are measurements: a zero is "we looked and found none", and\n`readable: false` is the separate state for "we could not look". Collapsing\nthem would let an unreadable target read as a clean one.',properties:{active_holder:{description:"Whether another admitted placement already holds this target.",type:"boolean"},dirty_tracked_paths:{description:"Tracked paths that differ from the index or HEAD.",format:"uint32",minimum:0,type:"integer"},network_required:{description:"Whether the declared network-free placement would require network.",type:"boolean"},observed_at:{$ref:"#/$defs/UtcMicros"},readable:{description:"Whether the target could be read at all.",type:"boolean"},unique_commits:{description:'Commits in the target reachable from nowhere else.\n\n`None` means reachability was not measured, and it blocks removal\nexactly as a positive count does: an unmeasured target is "unknown"\nand is retained rather than assumed worthless. Only removal consults\nthis; admission does not.',format:"uint32",minimum:0,type:["integer","null"]},untracked_paths:{description:"Untracked paths present in the target.",format:"uint32",minimum:0,type:"integer"}},required:["dirty_tracked_paths","untracked_paths","readable","active_holder","network_required","observed_at"],title:"WorkPlacementObservationV1",type:"object"},WorkPlacementTargetV1:bG},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"One placement preflight reading: what was asked for, what was seen, and\nexactly what blocks it.",properties:{blockers:{items:{$ref:"#/$defs/WorkPlacementBlockerV1"},type:"array",uniqueItems:!0},identity:{$ref:"#/$defs/WorkPlacementIdentityV1"},observation:{$ref:"#/$defs/WorkPlacementObservationV1"},target:{$ref:"#/$defs/WorkPlacementTargetV1"}},required:["identity","target","observation","blockers"],title:"WorkPlacementPreflightV1",type:"object"},{$defs:{RunId:_z,TaskId:vC},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{run_id:{$ref:"#/$defs/RunId"},task_id:{$ref:"#/$defs/TaskId"}},required:["task_id","run_id"],title:"WorkPlacementStatusRequestV1",type:"object"},{$defs:{RunId:_z,TaskId:vC,UtcMicros:vK,WorkPlacementBlockerV1:bF,WorkPlacementIdentityV1:bL,WorkPlacementKindV1:bU,WorkPlacementStateV1:bH,WorkPlacementTargetV1:bG,WorkPlacementV1:bB},$schema:"https://json-schema.org/draft/2020-12/schema",description:"One placement reading. Absence is a state, not an empty placement.",oneOf:[{additionalProperties:!1,description:"No placement was ever admitted for this run.",properties:{state:{const:"absent",type:"string"}},required:["state"],type:"object"},{additionalProperties:!1,description:"The durable placement relation.",properties:{placement:{$ref:"#/$defs/WorkPlacementV1"},state:{const:"placed",type:"string"}},required:["state","placement"],type:"object"}],title:"WorkPlacementReadingV1"},{$defs:{AttemptId:m1,CoverageStateV1:hV,DuplicateEffectOutcomeV1:hE,DuplicateEffortKindV1:hA,QuantityEvidenceClassV1:_a,RunId:_z,TaskId:vC,WorkAttemptIdentityV1:v2,WorkDuplicateAdjudicationQuantitiesV1:bu},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Operator judgment before the owning Work authority binds exact current\ngenerations, relation revision, command identity, and observation time.",properties:{first_attempt:{$ref:"#/$defs/WorkAttemptIdentityV1"},quantities:{$ref:"#/$defs/WorkDuplicateAdjudicationQuantitiesV1"},reason:{type:"string"},second_attempt:{$ref:"#/$defs/WorkAttemptIdentityV1"},verdict:{$ref:"#/$defs/DuplicateEffortKindV1"}},required:["first_attempt","second_attempt","verdict","quantities","reason"],title:"PrepareWorkDuplicateAdjudicationRequestV1",type:"object"},{$defs:{ActorId:mW,AttemptId:m1,ManifestDigest:gl,ProjectId:g2,ProposalId:g5,ProviderId:_i,RepositoryId:_v,RetrievalAnchorId:_q,RunId:_z,SourceStoreId:v$,TaskId:vC,UtcMicros:vK,WorkAcceptanceCriterionV1:vQ,WorkAttemptIdentityV1:v2,WorkHandoffV1:bT,WorkHierarchyV1:bO,WorkInitiativeV1:bE,WorkItemInputV1:bA,WorkItemV1:bM,WorkMilestoneV1:bz,WorkPlanV1:bK,WorkProductAuthorizedRelationScopeV1:bJ,WorkProductChangeDraftV1:{description:"Operator-selected graph change before the owning Work authority binds the\ncurrent verified head and revision authorities.",oneOf:[{properties:{change:{const:"add_task",type:"string"},item:{$ref:"#/$defs/WorkItemV1"}},required:["change","item"],type:"object"},{properties:{change:{const:"create_task",type:"string"},initiative:{$ref:"#/$defs/WorkInitiativeV1"},item:{$ref:"#/$defs/WorkItemV1"},milestone:{$ref:"#/$defs/WorkMilestoneV1"},plan:{$ref:"#/$defs/WorkPlanV1"}},required:["change","initiative","plan","milestone","item"],type:"object"},{properties:{change:{const:"decide_proposal",type:"string"},disposition:{$ref:"#/$defs/WorkProposalDispositionV1"},proposal:{$ref:"#/$defs/WorkProposalV1"}},required:["change","proposal","disposition"],type:"object"},{properties:{change:{const:"decide_relation_replan",type:"string"},disposition:{$ref:"#/$defs/WorkProposalDispositionV1"},proposal:{$ref:"#/$defs/WorkRelationReplanProposalV1"}},required:["change","proposal","disposition"],type:"object"},{properties:{change:{const:"apply_relation_replan",type:"string"},proposal_id:{$ref:"#/$defs/ProposalId"}},required:["change","proposal_id"],type:"object"},{properties:{change:{const:"accept_task",type:"string"},evidence_by_criterion:{additionalProperties:{type:"string"},type:"object"},task_id:{$ref:"#/$defs/TaskId"}},required:["change","task_id","evidence_by_criterion"],type:"object"},{properties:{change:{const:"admit_execution",type:"string"},task_id:{$ref:"#/$defs/TaskId"}},required:["change","task_id"],type:"object"},{properties:{change:{const:"link_accepted_attempt",type:"string"},identity:{$ref:"#/$defs/WorkAttemptIdentityV1"},task_id:{$ref:"#/$defs/TaskId"}},required:["change","task_id","identity"],type:"object"},{properties:{change:{const:"record_handoff",type:"string"},handoff:{$ref:"#/$defs/WorkHandoffV1"}},required:["change","handoff"],type:"object"}]},WorkProductEventEvidenceV1:bZ,WorkProductSelectionScopeV1:b3,WorkProposalDispositionV1:b5,WorkProposalV1:b8,WorkProposedChildV1:b7,WorkProviderRouteId:$o,WorkProviderRouteV1:$n,WorkRelationReplanProposalV1:$d,WorkRouteDecisionV1:$f,WorkScoreKindV1:$$,WorkShapeAssessmentV1:$S,WorkSizingV1:$k},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Read-only preparation input. Authority identities, clocks, and revision\npins are deliberately absent because the backend owns them.",properties:{causation_event_id:{type:["string","null"]},change:{$ref:"#/$defs/WorkProductChangeDraftV1"},evidence:{items:{$ref:"#/$defs/WorkProductEventEvidenceV1"},type:"array"},selection:{$ref:"#/$defs/WorkProductSelectionScopeV1"}},required:["selection","change","evidence"],title:"PrepareWorkProductMutationRequestV1",type:"object"},{$defs:{RunId:_z,TaskId:vC,UtcMicros:vK},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{expected_authority_version:{format:"uint64",minimum:0,type:"integer"},occurred_at:{$ref:"#/$defs/UtcMicros"},run_id:{$ref:"#/$defs/RunId"},task_id:{$ref:"#/$defs/TaskId"}},required:["task_id","run_id","expected_authority_version","occurred_at"],title:"ReleaseWorkPlacementCommand",type:"object"},{$defs:{UtcMicros:vK},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{occurred_at:{$ref:"#/$defs/UtcMicros"}},required:["occurred_at"],title:"ResumeWorkAttemptsCommand",type:"object"},{$defs:{AttemptId:m1,AutomaticWorktreeGcV1:m3,BranchCollisionPolicyV1:fd,BranchNameComponentV1:fc,BranchNameSeparatorV1:fl,BranchNamingPolicyV1:fp,BranchTopologyKindV1:f_,BranchTopologyPolicyV1:fv,CanonicalGitRefNameV1:fR,CanonicalGitRefPrefix:fP,CapabilityId:fV,CommitId:fH,ConfigurationRevisionId:f0,ConfigurationSnapshotId:f2,CredentialReferenceId:hq,CrossMergeModeV1:hI,CrossMergePolicyV1:hx,GitHubStackedPullRequestPolicyV1:yP,HistoryRewritePolicyV1:yU,LocatorDigest:gr,ManifestDigest:gl,ProjectId:g2,ProposalId:g5,ProtectedRefDispositionV1:g8,ProtectedRefRuleV1:g7,ProtectedRefSelectorV1:_e,ProviderId:_i,RefId:_u,RepositoryId:_v,RepositoryPlacementScopeV1:_b,RequiredCheckExpectationV1:_$,RequiredCheckV1:_S,ReviewRequirementV1:_T,ReviewTopologyKindV1:_O,ReviewTopologyPolicyV1:_E,RunId:_z,SensitiveFilesystemLocatorV1:_2,TaskId:vC,TopologyConcurrencyPolicyV1:vF,TopologyEscalationPolicyV1:vL,TopologyGatePolicyV1:vU,TopologyNotificationLevelV1:vH,UtcMicros:vK,WorkApprovalPolicy:vX,WorkArtifactId:vY,WorkArtifactRefV1:v1,WorkAttemptIdentityV1:v2,WorkAttemptProgressV1:v3,WorkAttemptProjectionBindingV1:v9,WorkAttemptStateV1:v7,WorkAttemptV1:bi,WorkCancellationAcknowledgementV1:bo,WorkCancellationEscalationV1:bn,WorkCancellationRequestId:ba,WorkCancellationRequestV1:bs,WorkCancellationStateV1:bd,WorkEffectStateV1:bm,WorkEgressPolicy:bh,WorkExecutableReference:bb,WorkExecutionEnvelopeV1:b$,WorkExecutionLimits:bS,WorkExecutionSnapshot:bk,WorkFallbackTopology:bP,WorkFenceEpochV1:bV,WorkFilesystemPolicy:bq,WorkLeaseFenceV1:bW,WorkLeaseId:bN,WorkProviderBackendV1:$t,WorkProviderProtocol:$i,WorkProviderRouteId:$o,WorkProviderRouteV1:$n,WorkRecoveryStateV1:$a,WorkRestartReasonV1:$c,WorkSandboxPolicy:$b,WorkTerminalEvidenceV1:$R,WorkTopologyPolicyV1:$V,WorkflowOperationRef:$j,WorktreeCleanlinessRequirementV1:$A,WorktreeId:$M,WorktreePlacementModeV1:$z,WorktreeRetentionPolicyV1:$D,WorktreeRootPolicyV1:$F},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"What restart recovery did to each open attempt.\n\nThis report never claims that a provider resumed. An attempt in\n`recovery_required` remains fenced under its original identity. This report\ndoes not authorize another launch; an explicit `retry_attempt` must verify\nthe exact recovery fence and effect safety before it can atomically admit a\nnew identity.",properties:{cancelled:{description:"Attempts whose in-flight cancellation was completed during recovery.",items:{$ref:"#/$defs/WorkAttemptV1"},type:"array"},recovery_required:{description:"Attempts fenced onto a new epoch and awaiting an explicit recovery\ndecision.",items:{$ref:"#/$defs/WorkAttemptV1"},type:"array"}},required:["recovery_required","cancelled"],title:"WorkAttemptRecoveryReportV1",type:"object"},{$defs:{RunId:_z,TaskId:vC,UtcMicros:vK,WorkRunControlReasonV1:$g},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{expected_authority_version:{format:"uint64",minimum:0,type:"integer"},occurred_at:{$ref:"#/$defs/UtcMicros"},reason:{$ref:"#/$defs/WorkRunControlReasonV1"},run_id:{$ref:"#/$defs/RunId"},task_id:{$ref:"#/$defs/TaskId"}},required:["task_id","run_id","reason","expected_authority_version","occurred_at"],title:"ResumeWorkRunCommand",type:"object"},{$defs:{AttemptId:m1,ManifestDigest:gl,ObservationSourceIdentityV1:gW,ProjectId:g2,ProviderId:_i,RepositoryId:_v,RunId:_z,SessionId:_5,TaskId:vC,TemporalModeV1:vA,UtcMicros:vK,VerifiedWorkGraphVersionV1:vZ,WorkAttemptIdentityV1:v2,WorkEvidenceContinuationV1:by,WorkEvidenceExpansionSelectorV1:{oneOf:[{additionalProperties:!1,properties:{kind:{const:"anchor",type:"string"},link_id:{type:"string"}},required:["kind","link_id"],type:"object"},{additionalProperties:!1,properties:{attempt:{$ref:"#/$defs/WorkAttemptIdentityV1"},kind:{const:"task_session",type:"string"}},required:["kind","attempt"],type:"object"}]},WorkProductAuthorizedRelationScopeV1:bJ,WorkProductSelectionScopeV1:b3,WorkTaskSessionContinuationV1:$w},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"One TaskId-rooted read. The exact Work graph identity remains mandatory on\ncontinuation and expansion requests, so neither an anchor nor a cursor is\nauthority by possession.",properties:{continuation:{anyOf:[{$ref:"#/$defs/WorkEvidenceContinuationV1"},{type:"null"}],default:null},expansion:{anyOf:[{$ref:"#/$defs/WorkEvidenceExpansionSelectorV1"},{type:"null"}],default:null},observed_at:{$ref:"#/$defs/UtcMicros"},page_size:{format:"uint32",minimum:0,type:"integer"},selection:{$ref:"#/$defs/WorkProductSelectionScopeV1"},task_id:{$ref:"#/$defs/TaskId"},temporal:{$ref:"#/$defs/TemporalModeV1"},verified_version:{$ref:"#/$defs/VerifiedWorkGraphVersionV1"}},required:["selection","task_id","verified_version","temporal","page_size","observed_at"],title:"WorkEvidenceRetrieveRequestV1",type:"object"},{$defs:{ActorId:mW,AttemptId:m1,ManifestDigest:gl,ObservationSourceIdentityV1:gW,ProposalId:g5,ProviderId:_i,RetrievalAnchorId:_q,RunId:_z,SessionId:_5,SessionRetrievalBudgetAccountingV1:{additionalProperties:!1,description:"The ceiling and count behind a budget refusal.\n\n`stage` names which budget refused; this is what tells an oversized request\napart from a read whose cost was mis-sized for it. The ceiling value also\ndistinguishes the resources inside one stage: a record read that stopped at\n1024 hit the item count, one that stopped at 16 MiB hit the byte total, so\nthe kernel's resource spelling stays in the kernel instead of becoming a\nsecond wire vocabulary to keep in step.",properties:{limit:{format:"uint64",minimum:0,type:"integer"},observed:{$ref:"#/$defs/SessionRetrievalBudgetObservationV1"}},required:["limit","observed"],type:"object"},SessionRetrievalBudgetObservationV1:{description:"What a refusing budget boundary had counted.\n\nBoth variants are exact. A bounded read never counts the rows it declined to\nread, so an exhausted read reports what it consumed and that storage held\nmore, never a total it would have to run the refused scan to learn.",oneOf:[{additionalProperties:!1,description:"The request asked for more units than the admitted maximum.",properties:{observation:{const:"requested",type:"string"},units:{format:"uint64",minimum:0,type:"integer"}},required:["observation","units"],type:"object"},{additionalProperties:!1,description:"The read consumed its whole budget and storage still held more.",properties:{observation:{const:"consumed_with_more_available",type:"string"},units:{format:"uint64",minimum:0,type:"integer"}},required:["observation","units"],type:"object"}]},SessionRetrievalBudgetStageV1:vi,SessionRetrievalStructuralRefusalV1:{oneOf:[{additionalProperties:!1,properties:{kind:{type:"string"},maximum:{format:"uint",minimum:0,type:"integer"},observed:{format:"uint",minimum:0,type:"integer"},refusal:{const:"cursor_manifest_limit_exceeded",type:"string"}},required:["refusal","kind","observed","maximum"],type:"object"},{additionalProperties:!1,properties:{accounting:{anyOf:[{$ref:"#/$defs/SessionRetrievalBudgetAccountingV1"},{type:"null"}],description:"Present when the refusing boundary keeps a counter. A request-shape\ncheck has none and reports `None` rather than inventing numbers."},refusal:{const:"budget_exhausted",type:"string"},stage:{$ref:"#/$defs/SessionRetrievalBudgetStageV1"}},required:["refusal","stage"],type:"object"}]},TaskEvidenceLinkV1:vx,TaskId:vC,UtcMicros:vK,VerifiedWorkGraphVersionV1:vZ,WorkAcceptanceCriterionV1:vQ,WorkAnchorHydrationV1:{additionalProperties:!1,properties:{anchor_id:{$ref:"#/$defs/RetrievalAnchorId"},content:{items:{type:"string"},type:"array"},continuation:{type:["string","null"]},coverage:{$ref:"#/$defs/WorkEvidenceCoverageStateV1"},exact_anchors:{items:{$ref:"#/$defs/RetrievalAnchorId"},type:"array"},freshness:{$ref:"#/$defs/WorkEvidenceFreshnessV1"},redacted:{type:"boolean"}},required:["anchor_id","exact_anchors","content","coverage","freshness","redacted"],type:"object"},WorkArtifactId:vY,WorkArtifactRefV1:v1,WorkAttemptEvidenceRecordV1:v0,WorkAttemptIdentityV1:v2,WorkAttemptProviderOutcomeV1:v5,WorkAttemptReceiptV1:v8,WorkAttemptStreamChannelV1:be,WorkAttemptStreamSummaryV1:bt,WorkEvidenceContinuationV1:by,WorkEvidenceCoverageStateV1:{enum:["complete","partial","unknown"],type:"string"},WorkEvidenceCoverageV1:{additionalProperties:!1,properties:{hydrated:{format:"uint32",minimum:0,type:"integer"},omitted:{format:"uint32",minimum:0,type:"integer"},selected:{format:"uint32",minimum:0,type:"integer"},state:{$ref:"#/$defs/WorkEvidenceCoverageStateV1"}},required:["state","selected","hydrated","omitted"],type:"object"},WorkEvidenceFreshnessV1:{enum:["current","stale","unknown"],type:"string"},WorkEvidenceOmissionReasonV1:{oneOf:[{enum:["limit_reached","pending","not_found_or_not_authorized","unavailable","reset_required","stale","cancelled","timed_out","redacted"],type:"string"},{additionalProperties:!1,properties:{structural_refusal:{$ref:"#/$defs/SessionRetrievalStructuralRefusalV1"}},required:["structural_refusal"],type:"object"}]},WorkEvidenceOmissionV1:{additionalProperties:!1,properties:{reason:{$ref:"#/$defs/WorkEvidenceOmissionReasonV1"},relation:{type:"string"}},required:["relation","reason"],type:"object"},WorkEvidenceSourceV1:{oneOf:[{additionalProperties:!1,properties:{kind:{const:"attempt_receipt",type:"string"},receipt:{$ref:"#/$defs/WorkAttemptReceiptV1"}},required:["kind","receipt"],type:"object"},{additionalProperties:!1,properties:{attempt:{$ref:"#/$defs/WorkAttemptIdentityV1"},evidence:{$ref:"#/$defs/WorkTaskSessionEvidenceV1"},kind:{const:"task_session",type:"string"}},required:["kind","attempt","evidence"],type:"object"},{additionalProperties:!1,properties:{hydration:{$ref:"#/$defs/WorkAnchorHydrationV1"},kind:{const:"anchor",type:"string"},link:{$ref:"#/$defs/TaskEvidenceLinkV1"}},required:["kind","link","hydration"],type:"object"}]},WorkHandoffV1:bT,WorkHierarchyV1:bO,WorkItemInputV1:bA,WorkItemV1:bM,WorkProductRelationV1:b4,WorkProposalDecisionV1:b9,WorkProposalDispositionV1:b5,WorkProposalV1:b8,WorkProposedChildV1:b7,WorkProviderAvailabilityV1:$e,WorkProviderBackendV1:$t,WorkProviderFallbackRecordV1:$r,WorkProviderRouteId:$o,WorkProviderRouteV1:$n,WorkRelationReplanDecisionV1:$s,WorkRelationReplanProposalV1:$d,WorkRouteDecisionV1:$f,WorkScoreKindV1:$$,WorkShapeAssessmentV1:$S,WorkSizingV1:$k,WorkTaskSessionContinuationV1:$w,WorkTaskSessionCoverageV1:{additionalProperties:!1,properties:{hidden:{format:"uint64",minimum:0,type:"integer"},redacted:{format:"uint64",minimum:0,type:"integer"},unknown:{format:"uint64",minimum:0,type:"integer"},visible:{format:"uint64",minimum:0,type:"integer"}},required:["visible","hidden","unknown","redacted"],type:"object"},WorkTaskSessionEvidenceV1:{additionalProperties:!1,properties:{attempt:{$ref:"#/$defs/WorkAttemptIdentityV1"},continuation:{anyOf:[{$ref:"#/$defs/WorkTaskSessionContinuationV1"},{type:"null"}]},coverage:{$ref:"#/$defs/WorkEvidenceCoverageStateV1"},coverage_counts:{$ref:"#/$defs/WorkTaskSessionCoverageV1"},freshness:{$ref:"#/$defs/WorkEvidenceFreshnessV1"},hydrated:{items:{$ref:"#/$defs/WorkTaskSessionHydrationV1"},type:"array"},participant_epoch:{$ref:"#/$defs/ManifestDigest"},ranked_anchors:{items:{$ref:"#/$defs/WorkTaskSessionRankedAnchorV1"},type:"array"},redacted:{type:"boolean"},source:{$ref:"#/$defs/ObservationSourceIdentityV1"},task_id:{$ref:"#/$defs/TaskId"},verified_version:{$ref:"#/$defs/VerifiedWorkGraphVersionV1"}},required:["task_id","verified_version","attempt","source","participant_epoch","ranked_anchors","hydrated","coverage","coverage_counts","freshness","redacted"],type:"object"},WorkTaskSessionHydrationStateV1:{enum:["available","retained_but_unavailable","redacted","deleted","retention_expired","unauthorized","locked","unverifiable"],type:"string"},WorkTaskSessionHydrationV1:{additionalProperties:!1,properties:{anchor_id:{$ref:"#/$defs/RetrievalAnchorId"},content:{items:{format:"uint8",maximum:255,minimum:0,type:"integer"},type:["array","null"]},rank:{format:"uint32",minimum:0,type:"integer"},state:{$ref:"#/$defs/WorkTaskSessionHydrationStateV1"}},required:["rank","anchor_id","state"],type:"object"},WorkTaskSessionRankContributionV1:{additionalProperties:!1,properties:{calibrated_feature_micros:{format:"uint32",minimum:0,type:"integer"},calibration_profile:{type:"string"},ordinal_rank:{format:"uint32",minimum:0,type:"integer"},raw_score_micros:{format:"int64",type:"integer"},retriever:{type:"string"},retriever_revision:{type:"string"},score_domain:{type:"string"},source_occurrence:{type:"string"},weight_micros:{format:"uint32",minimum:0,type:"integer"},weighted_contribution_micros:{format:"uint64",minimum:0,type:"integer"}},required:["retriever","retriever_revision","source_occurrence","ordinal_rank","raw_score_micros","score_domain","calibration_profile","calibrated_feature_micros","weight_micros","weighted_contribution_micros"],type:"object"},WorkTaskSessionRankedAnchorV1:{additionalProperties:!1,properties:{anchor_id:{$ref:"#/$defs/RetrievalAnchorId"},contributions:{items:{$ref:"#/$defs/WorkTaskSessionRankContributionV1"},type:"array"},final_ordinal:{format:"uint32",minimum:0,type:"integer"},utility_micros:{format:"uint64",minimum:0,type:"integer"}},required:["anchor_id","final_ordinal","utility_micros","contributions"],type:"object"}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{continuations:{items:{$ref:"#/$defs/WorkEvidenceContinuationV1"},type:"array"},coverage:{$ref:"#/$defs/WorkEvidenceCoverageV1"},freshness:{$ref:"#/$defs/WorkEvidenceFreshnessV1"},item:{$ref:"#/$defs/WorkItemV1"},omissions:{items:{$ref:"#/$defs/WorkEvidenceOmissionV1"},type:"array"},proposal_decisions:{items:{$ref:"#/$defs/WorkProposalDecisionV1"},type:"array"},redacted:{type:"boolean"},relation_replan_decisions:{items:{$ref:"#/$defs/WorkRelationReplanDecisionV1"},type:"array"},relations:{items:{$ref:"#/$defs/WorkProductRelationV1"},type:"array"},sources:{items:{$ref:"#/$defs/WorkEvidenceSourceV1"},type:"array"},task_id:{$ref:"#/$defs/TaskId"},verified_version:{$ref:"#/$defs/VerifiedWorkGraphVersionV1"}},required:["task_id","verified_version","item","relations","proposal_decisions","relation_replan_decisions","sources","coverage","omissions","freshness","redacted","continuations"],title:"WorkEvidenceRetrievalV1",type:"object"},{$defs:{AttemptId:m1,RunId:_z,TaskId:vC,WorkAttemptIdentityV1:v2,WorkCommandId:bc,WorkRetryCauseV1:$l,WorkRetryFailureSelectorV1:$p,WorkRetrySourceV1:$u},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{command_id:{$ref:"#/$defs/WorkCommandId"},failure:{$ref:"#/$defs/WorkRetryFailureSelectorV1"},new_attempt_id:{$ref:"#/$defs/AttemptId"},original_attempt:{$ref:"#/$defs/WorkAttemptIdentityV1"}},required:["original_attempt","new_attempt_id","failure","command_id"],title:"RetryWorkAttemptCommandV1",type:"object"},{$defs:{AttemptId:m1,AutomaticWorktreeGcV1:m3,BranchCollisionPolicyV1:fd,BranchNameComponentV1:fc,BranchNameSeparatorV1:fl,BranchNamingPolicyV1:fp,BranchTopologyKindV1:f_,BranchTopologyPolicyV1:fv,CanonicalGitRefNameV1:fR,CanonicalGitRefPrefix:fP,CapabilityId:fV,CommitId:fH,ConfigurationRevisionId:f0,ConfigurationSnapshotId:f2,CredentialReferenceId:hq,CrossMergeModeV1:hI,CrossMergePolicyV1:hx,GitHubStackedPullRequestPolicyV1:yP,HistoryRewritePolicyV1:yU,LocatorDigest:gr,ManifestDigest:gl,ProjectId:g2,ProposalId:g5,ProtectedRefDispositionV1:g8,ProtectedRefRuleV1:g7,ProtectedRefSelectorV1:_e,ProviderId:_i,RefId:_u,RepositoryId:_v,RepositoryPlacementScopeV1:_b,RequiredCheckExpectationV1:_$,RequiredCheckV1:_S,RetryWorkAttemptCommandV1:{additionalProperties:!1,properties:{command_id:{$ref:"#/$defs/WorkCommandId"},failure:{$ref:"#/$defs/WorkRetryFailureSelectorV1"},new_attempt_id:{$ref:"#/$defs/AttemptId"},original_attempt:{$ref:"#/$defs/WorkAttemptIdentityV1"}},required:["original_attempt","new_attempt_id","failure","command_id"],title:"RetryWorkAttemptCommandV1",type:"object"},ReviewRequirementV1:_T,ReviewTopologyKindV1:_O,ReviewTopologyPolicyV1:_E,RunId:_z,SensitiveFilesystemLocatorV1:_2,TaskId:vC,TopologyConcurrencyPolicyV1:vF,TopologyEscalationPolicyV1:vL,TopologyGatePolicyV1:vU,TopologyNotificationLevelV1:vH,UtcMicros:vK,VerifiedWorkRetryFailureV1:{additionalProperties:!1,description:"Failure fact returned by a canonical evidence authority.",properties:{evidence_digest:{$ref:"#/$defs/ManifestDigest"},observed_at:{$ref:"#/$defs/UtcMicros"},selector:{$ref:"#/$defs/WorkRetryFailureSelectorV1"}},required:["selector","evidence_digest","observed_at"],type:"object"},WorkApprovalPolicy:vX,WorkArtifactId:vY,WorkArtifactRefV1:v1,WorkAttemptIdentityV1:v2,WorkAttemptProgressV1:v3,WorkAttemptProjectionBindingV1:v9,WorkAttemptStateV1:v7,WorkAttemptV1:bi,WorkCancellationAcknowledgementV1:bo,WorkCancellationEscalationV1:bn,WorkCancellationRequestId:ba,WorkCancellationRequestV1:bs,WorkCancellationStateV1:bd,WorkCommandId:bc,WorkEffectStateV1:bm,WorkEgressPolicy:bh,WorkExecutableReference:bb,WorkExecutionEnvelopeV1:b$,WorkExecutionLimits:bS,WorkExecutionSnapshot:bk,WorkFallbackTopology:bP,WorkFenceEpochV1:bV,WorkFilesystemPolicy:bq,WorkLeaseFenceV1:bW,WorkLeaseId:bN,WorkProviderBackendV1:$t,WorkProviderProtocol:$i,WorkProviderRouteId:$o,WorkProviderRouteV1:$n,WorkRecoveryStateV1:$a,WorkRestartReasonV1:$c,WorkRetryCauseV1:$l,WorkRetryFailureSelectorV1:$p,WorkRetryReceiptV1:{additionalProperties:!1,properties:{canonical_input_digest:{$ref:"#/$defs/ManifestDigest"},command:{$ref:"#/$defs/RetryWorkAttemptCommandV1"},failure:{$ref:"#/$defs/VerifiedWorkRetryFailureV1"},new_attempt:{$ref:"#/$defs/WorkAttemptIdentityV1"},owner_receipt_digest:{$ref:"#/$defs/ManifestDigest"},restarted_at:{$ref:"#/$defs/UtcMicros",description:"Daemon-owned admission time at which the new attempt was created."},retry_required_at:{$ref:"#/$defs/UtcMicros",description:"Exact source-owned time at which the failure made a retry necessary."}},required:["command","failure","new_attempt","retry_required_at","restarted_at","canonical_input_digest","owner_receipt_digest"],type:"object"},WorkRetrySourceV1:$u,WorkSandboxPolicy:$b,WorkTerminalEvidenceV1:$R,WorkTopologyPolicyV1:$V,WorkflowOperationRef:$j,WorktreeCleanlinessRequirementV1:$A,WorktreeId:$M,WorktreePlacementModeV1:$z,WorktreeRetentionPolicyV1:$D,WorktreeRootPolicyV1:$F},$schema:"https://json-schema.org/draft/2020-12/schema",oneOf:[{additionalProperties:!1,properties:{attempt:{$ref:"#/$defs/WorkAttemptV1"},outcome:{const:"created",type:"string"},receipt:{$ref:"#/$defs/WorkRetryReceiptV1"}},required:["outcome","receipt","attempt"],type:"object"},{additionalProperties:!1,properties:{attempt:{$ref:"#/$defs/WorkAttemptV1"},outcome:{const:"replayed",type:"string"},receipt:{$ref:"#/$defs/WorkRetryReceiptV1"}},required:["outcome","receipt","attempt"],type:"object"}],title:"WorkRetryAttemptOutcomeV1"},{$defs:{CatalogGenerationId:fq,ConfigurationRevisionId:f0,ManifestDigest:gl,ProjectId:g2,ProposalId:g5,ProviderId:_i,RepositoryId:_v,RetrievalAnchorId:_q,ReviewWorkProposalDispositionV1:{description:"The only non-accepting dispositions the proposal-review operation can\ncommit. The broader decision request remains available to the graph\nmutation operation, which owns all decision forms.",enum:["rejected","superseded"],type:"string"},SourceStoreId:v$,TaskId:vC,UtcMicros:vK,VerifiedWorkGraphVersionV1:vZ,WorkCommandId:bc,WorkProductAuthorizedRelationScopeV1:bJ,WorkProductEventEvidenceV1:bZ,WorkProductExpectedAuthorityV1:bY,WorkProductMutationIdentityV1:b0,WorkProductRevisionPinsV1:b6,WorkProductSelectionScopeV1:b3,WorkProposalV1:b8,WorkProposedChildV1:b7,WorkProviderRouteId:$o,WorkProviderRouteV1:$n,WorkRouteDecisionV1:$f,WorkScoreKindV1:$$,WorkShapeAssessmentV1:$S,WorkSizingV1:$k},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{disposition:{$ref:"#/$defs/ReviewWorkProposalDispositionV1"},mutation:{$ref:"#/$defs/WorkProductMutationIdentityV1"},proposal:{$ref:"#/$defs/WorkProposalV1"},selection:{$ref:"#/$defs/WorkProductSelectionScopeV1"}},required:["selection","proposal","disposition","mutation"],title:"ReviewWorkProposalRequestV1",type:"object"},{$defs:{RunId:_z,TaskId:vC},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{run_id:{$ref:"#/$defs/RunId"},task_id:{$ref:"#/$defs/TaskId"}},required:["task_id","run_id"],title:"WorkRunControlRequestV1",type:"object"},{$defs:{AttemptId:m1,RunId:_z,TaskId:vC,UtcMicros:vK,WorkRunControlAuthorityV1:$y,WorkRunControlReasonV1:$g,WorkRunControlStateV1:$_,WorkRunControlV1:{additionalProperties:!1,description:"One run's durable control aggregate.",properties:{authority:{$ref:"#/$defs/WorkRunControlAuthorityV1"},deadline:{$ref:"#/$defs/WorkRunDeadlineCheckpointV1"},fenced_attempts:{description:'The exact attempts that were live when the current state published.\nEmpty means "none were live", never "we did not look".',items:{$ref:"#/$defs/AttemptId"},type:"array"},reason:{anyOf:[{$ref:"#/$defs/WorkRunControlReasonV1"},{type:"null"}]},run_id:{$ref:"#/$defs/RunId"},state:{$ref:"#/$defs/WorkRunControlStateV1"},task_id:{$ref:"#/$defs/TaskId"},transitioned_at:{$ref:"#/$defs/UtcMicros"}},required:["task_id","run_id","state","authority","deadline","transitioned_at","fenced_attempts"],title:"WorkRunControlV1",type:"object"},WorkRunDeadlineCheckpointV1:$v},$schema:"https://json-schema.org/draft/2020-12/schema",description:"One run's control reading.\n\n`Uncontrolled` is a distinct answer from `Controlled`: it says the run is\nadmitted and running under its admitted deadline with no control transition\never published, which is not the same as a control row that happens to say\n`Running`.",oneOf:[{additionalProperties:!1,description:"The run holds durable attempts but no control transition has ever been\npublished for it.",properties:{deadline:{$ref:"#/$defs/UtcMicros",description:"The admitted deadline the run is running against."},live_attempts:{description:"Attempts that have not reached a terminal state.",items:{$ref:"#/$defs/AttemptId"},type:"array"},state:{const:"uncontrolled",type:"string"},total_attempts:{format:"uint32",minimum:0,type:"integer"}},required:["state","deadline","live_attempts","total_attempts"],type:"object"},{additionalProperties:!1,description:"The published control aggregate, plus the live frontier as of this\nread (which may differ from the frontier the transition fenced).",properties:{control:{$ref:"#/$defs/WorkRunControlV1"},live_attempts:{items:{$ref:"#/$defs/AttemptId"},type:"array"},state:{const:"controlled",type:"string"},total_attempts:{format:"uint32",minimum:0,type:"integer"}},required:["state","control","live_attempts","total_attempts"],type:"object"}],title:"WorkRunControlReadingV1"},{$defs:{AttemptId:m1,AutomaticWorktreeGcV1:m3,BranchCollisionPolicyV1:fd,BranchNameComponentV1:fc,BranchNameSeparatorV1:fl,BranchNamingPolicyV1:fp,BranchTopologyKindV1:f_,BranchTopologyPolicyV1:fv,CanonicalGitRefNameV1:fR,CanonicalGitRefPrefix:fP,CapabilityId:fV,CommitId:fH,ConfigurationRevisionId:f0,ConfigurationSnapshotId:f2,CredentialReferenceId:hq,CrossMergeModeV1:hI,CrossMergePolicyV1:hx,GitHubStackedPullRequestPolicyV1:yP,HistoryRewritePolicyV1:yU,LocatorDigest:gr,ManifestDigest:gl,ProtectedRefDispositionV1:g8,ProtectedRefRuleV1:g7,ProtectedRefSelectorV1:_e,ProviderId:_i,RefId:_u,RepositoryId:_v,RepositoryPlacementScopeV1:_b,RequiredCheckExpectationV1:_$,RequiredCheckV1:_S,ReviewRequirementV1:_T,ReviewTopologyKindV1:_O,ReviewTopologyPolicyV1:_E,RunId:_z,SensitiveFilesystemLocatorV1:_2,TaskId:vC,TopologyConcurrencyPolicyV1:vF,TopologyEscalationPolicyV1:vL,TopologyGatePolicyV1:vU,TopologyNotificationLevelV1:vH,UtcMicros:vK,WorkApprovalPolicy:vX,WorkEffectStateV1:bm,WorkEgressPolicy:bh,WorkExecutableReference:bb,WorkExecutionLimits:bS,WorkExecutionSnapshot:bk,WorkFallbackTopology:bP,WorkFilesystemPolicy:bq,WorkProviderBackendV1:$t,WorkProviderProtocol:$i,WorkProviderRouteId:$o,WorkProviderRouteV1:$n,WorkSandboxPolicy:$b,WorkTopologyPolicyV1:$V,WorkflowOperationRef:$j,WorktreeCleanlinessRequirementV1:$A,WorktreePlacementModeV1:$z,WorktreeRetentionPolicyV1:$D,WorktreeRootPolicyV1:$F},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Starts one admitted provider attempt. Every field is a typed fact; there\nis no argv, environment entry, executable path, or shell string here. The\nprojection binding and admission facts are re-read from the canonical Work\nauthority, never trusted from the caller.",properties:{attempt_id:{$ref:"#/$defs/AttemptId"},commit:{$ref:"#/$defs/CommitId"},effect_state:{$ref:"#/$defs/WorkEffectStateV1"},execution_snapshot:{$ref:"#/$defs/WorkExecutionSnapshot"},instructions:{type:"string"},occurred_at:{$ref:"#/$defs/UtcMicros"},operation:{$ref:"#/$defs/WorkflowOperationRef"},reference:{anyOf:[{$ref:"#/$defs/RefId"},{type:"null"}]},run_id:{$ref:"#/$defs/RunId"},task_id:{$ref:"#/$defs/TaskId"},worktree_root:{type:"string"}},required:["task_id","run_id","attempt_id","operation","execution_snapshot","worktree_root","commit","instructions","effect_state","occurred_at"],title:"StartWorkAttemptCommand",type:"object"},{$defs:{AttemptId:m1,AutomaticWorktreeGcV1:m3,BranchCollisionPolicyV1:fd,BranchNameComponentV1:fc,BranchNameSeparatorV1:fl,BranchNamingPolicyV1:fp,BranchTopologyKindV1:f_,BranchTopologyPolicyV1:fv,CanonicalGitRefNameV1:fR,CanonicalGitRefPrefix:fP,CapabilityId:fV,CommitId:fH,ConfigurationRevisionId:f0,ConfigurationSnapshotId:f2,CredentialReferenceId:hq,CrossMergeModeV1:hI,CrossMergePolicyV1:hx,GitHubStackedPullRequestPolicyV1:yP,HistoryRewritePolicyV1:yU,LocatorDigest:gr,ManifestDigest:gl,ProtectedRefDispositionV1:g8,ProtectedRefRuleV1:g7,ProtectedRefSelectorV1:_e,ProviderId:_i,RefId:_u,RepositoryId:_v,RepositoryPlacementScopeV1:_b,RequiredCheckExpectationV1:_$,RequiredCheckV1:_S,ReviewRequirementV1:_T,ReviewTopologyKindV1:_O,ReviewTopologyPolicyV1:_E,RunId:_z,SensitiveFilesystemLocatorV1:_2,StartWorkAttemptCommand:{additionalProperties:!1,description:"Starts one admitted provider attempt. Every field is a typed fact; there\nis no argv, environment entry, executable path, or shell string here. The\nprojection binding and admission facts are re-read from the canonical Work\nauthority, never trusted from the caller.",properties:{attempt_id:{$ref:"#/$defs/AttemptId"},commit:{$ref:"#/$defs/CommitId"},effect_state:{$ref:"#/$defs/WorkEffectStateV1"},execution_snapshot:{$ref:"#/$defs/WorkExecutionSnapshot"},instructions:{type:"string"},occurred_at:{$ref:"#/$defs/UtcMicros"},operation:{$ref:"#/$defs/WorkflowOperationRef"},reference:{anyOf:[{$ref:"#/$defs/RefId"},{type:"null"}]},run_id:{$ref:"#/$defs/RunId"},task_id:{$ref:"#/$defs/TaskId"},worktree_root:{type:"string"}},required:["task_id","run_id","attempt_id","operation","execution_snapshot","worktree_root","commit","instructions","effect_state","occurred_at"],type:"object"},TaskId:vC,TopologyConcurrencyPolicyV1:vF,TopologyEscalationPolicyV1:vL,TopologyGatePolicyV1:vU,TopologyNotificationLevelV1:vH,UtcMicros:vK,WorkApprovalPolicy:vX,WorkAttemptIdentityV1:v2,WorkEffectStateV1:bm,WorkEgressPolicy:bh,WorkExecutableReference:bb,WorkExecutionLimits:bS,WorkExecutionSnapshot:bk,WorkFallbackTopology:bP,WorkFilesystemPolicy:bq,WorkProviderBackendV1:$t,WorkProviderProtocol:$i,WorkProviderRouteId:$o,WorkProviderRouteV1:$n,WorkSandboxPolicy:$b,WorkTopologyPolicyV1:$V,WorkflowOperationRef:$j,WorkflowOutputName:$C,WorktreeCleanlinessRequirementV1:$A,WorktreePlacementModeV1:$z,WorktreeRetentionPolicyV1:$D,WorktreeRootPolicyV1:$F},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Admits one synthesis attempt over an ordered set of sibling sources.",properties:{output_name:{$ref:"#/$defs/WorkflowOutputName",description:"The fan-out output the synthesis belongs to, carried into the draft\nthe workflow completion path verifies."},sources:{description:"The ordered sibling sources the synthesis consumes.",items:{$ref:"#/$defs/WorkAttemptIdentityV1"},type:"array"},start:{$ref:"#/$defs/StartWorkAttemptCommand",description:"The synthesis attempt's own admission facts; it is started through\nthe same admission machinery as any other attempt."}},required:["start","output_name","sources"],title:"AdmitWorkSynthesisCommand",type:"object"},{$defs:{AttemptId:m1,AutomaticWorktreeGcV1:m3,BranchCollisionPolicyV1:fd,BranchNameComponentV1:fc,BranchNameSeparatorV1:fl,BranchNamingPolicyV1:fp,BranchTopologyKindV1:f_,BranchTopologyPolicyV1:fv,CanonicalGitRefNameV1:fR,CanonicalGitRefPrefix:fP,CapabilityId:fV,CommitId:fH,ConfigurationRevisionId:f0,ConfigurationSnapshotId:f2,CredentialReferenceId:hq,CrossMergeModeV1:hI,CrossMergePolicyV1:hx,GitHubStackedPullRequestPolicyV1:yP,HistoryRewritePolicyV1:yU,LocatorDigest:gr,ManifestDigest:gl,ProjectId:g2,ProposalId:g5,ProtectedRefDispositionV1:g8,ProtectedRefRuleV1:g7,ProtectedRefSelectorV1:_e,ProviderId:_i,RefId:_u,RepositoryId:_v,RepositoryPlacementScopeV1:_b,RequiredCheckExpectationV1:_$,RequiredCheckV1:_S,ReviewRequirementV1:_T,ReviewTopologyKindV1:_O,ReviewTopologyPolicyV1:_E,RunId:_z,SensitiveFilesystemLocatorV1:_2,TaskId:vC,TopologyConcurrencyPolicyV1:vF,TopologyEscalationPolicyV1:vL,TopologyGatePolicyV1:vU,TopologyNotificationLevelV1:vH,UtcMicros:vK,WorkApprovalPolicy:vX,WorkArtifactId:vY,WorkArtifactRefV1:v1,WorkAttemptIdentityV1:v2,WorkAttemptProgressV1:v3,WorkAttemptProjectionBindingV1:v9,WorkAttemptStateV1:v7,WorkAttemptV1:bi,WorkCancellationAcknowledgementV1:bo,WorkCancellationEscalationV1:bn,WorkCancellationRequestId:ba,WorkCancellationRequestV1:bs,WorkCancellationStateV1:bd,WorkEffectStateV1:bm,WorkEgressPolicy:bh,WorkExecutableReference:bb,WorkExecutionEnvelopeV1:b$,WorkExecutionLimits:bS,WorkExecutionSnapshot:bk,WorkFallbackTopology:bP,WorkFenceEpochV1:bV,WorkFilesystemPolicy:bq,WorkLeaseFenceV1:bW,WorkLeaseId:bN,WorkProviderBackendV1:$t,WorkProviderProtocol:$i,WorkProviderRouteId:$o,WorkProviderRouteV1:$n,WorkRecoveryStateV1:$a,WorkRestartReasonV1:$c,WorkSandboxPolicy:$b,WorkSynthesisEvidenceGroupV1:{additionalProperties:!1,description:"Succeeded sources grouped by the exact artifact digest list they produced.\nGroups are ordered largest first; smaller groups are the minority\nevidence, and more than one group is the disagreement, preserved as\nstructure instead of being resolved by fiat.",properties:{artifacts:{description:"The artifact digest list every source in this group produced.",items:{$ref:"#/$defs/ManifestDigest"},type:"array"},sources:{description:"The concurring sources, in the caller's requested order.",items:{$ref:"#/$defs/WorkAttemptIdentityV1"},type:"array"}},required:["artifacts","sources"],type:"object"},WorkSynthesisRefusalV1:{description:"Why a synthesis request was answered with the unsynthesized set instead\nof an admitted attempt.",oneOf:[{const:"no_citable_sources",description:"No source contributed a citable artifact: every source failed, was\ncancelled, timed out, is still unknown, or succeeded without\ndeclaring artifacts. There is nothing a synthesis could truthfully\ncite.",type:"string"}]},WorkSynthesisSourceEnvelopeV1:{additionalProperties:!1,description:"One immutable source envelope: which attempt, and what it truthfully\ncontributed at admission time.",properties:{outcome:{$ref:"#/$defs/WorkSynthesisSourceOutcomeV1"},source:{$ref:"#/$defs/WorkAttemptIdentityV1"}},required:["source","outcome"],type:"object"},WorkSynthesisSourceOutcomeV1:{description:"One sibling attempt's terminal contribution, captured verbatim from the\nWork authority at admission time.",oneOf:[{description:"The source succeeded; its declared artifact digests, in declaration\norder, are the evidence a synthesis may cite.",properties:{artifacts:{items:{$ref:"#/$defs/ManifestDigest"},type:"array"},outcome:{const:"succeeded",type:"string"}},required:["outcome","artifacts"],type:"object"},{description:"The source failed; its sealed terminal evidence digest is preserved\nso the failure stays visible in the synthesis record.",properties:{evidence:{$ref:"#/$defs/ManifestDigest"},outcome:{const:"failed",type:"string"}},required:["outcome","evidence"],type:"object"},{description:"The source timed out; preserved like a failure.",properties:{evidence:{$ref:"#/$defs/ManifestDigest"},outcome:{const:"timed_out",type:"string"}},required:["outcome","evidence"],type:"object"},{description:"The source was cancelled; preserved like a failure.",properties:{evidence:{$ref:"#/$defs/ManifestDigest"},outcome:{const:"cancelled",type:"string"}},required:["outcome","evidence"],type:"object"},{description:"The source has not reached a terminal state. The unknown is preserved\nas an unknown; it contributes no citable evidence and is never\nguessed at.",properties:{outcome:{const:"unknown",type:"string"},state:{$ref:"#/$defs/WorkAttemptStateV1"}},required:["outcome","state"],type:"object"}]},WorkSynthesisSourceSetV1:{additionalProperties:!1,description:"The ordered, digest-sealed source envelope set a synthesis admission\nconsumed. Reordering or mutating any envelope changes the digest, so a\nreplayed or tampered set is distinguishable from the admitted one.",properties:{set_digest:{$ref:"#/$defs/ManifestDigest",description:"Canonical digest over the ordered envelopes."},sources:{description:"The envelopes, exactly in the caller's requested order.",items:{$ref:"#/$defs/WorkSynthesisSourceEnvelopeV1"},type:"array"}},required:["sources","set_digest"],type:"object"},WorkTerminalEvidenceV1:$R,WorkTopologyPolicyV1:$V,WorkflowOperationRef:$j,WorkflowOutputName:$C,WorkflowSynthesisDraft:{additionalProperties:!1,description:"A provider's claim that one artifact of a fan-out output synthesizes its\nsibling source artifacts.",properties:{cited_source_digests:{description:"Content digests of every source artifact the synthesis consumed.",items:{$ref:"#/$defs/ManifestDigest"},type:"array",uniqueItems:!0},output_name:{$ref:"#/$defs/WorkflowOutputName",description:"The fan-out output the synthesis belongs to."},synthesis_attempt:{$ref:"#/$defs/WorkAttemptIdentityV1",description:"The attempt that produced the synthesis artifact inside that output."}},required:["output_name","synthesis_attempt","cited_source_digests"],type:"object"},WorktreeCleanlinessRequirementV1:$A,WorktreeId:$M,WorktreePlacementModeV1:$z,WorktreeRetentionPolicyV1:$D,WorktreeRootPolicyV1:$F},$schema:"https://json-schema.org/draft/2020-12/schema",description:"The typed outcome of a synthesis request: an admitted attempt, or the\nsealed unsynthesized set when synthesis could not truthfully begin.",oneOf:[{additionalProperties:!1,description:"The admitted synthesis attempt and everything it is accountable to.",properties:{attempt:{$ref:"#/$defs/WorkAttemptV1",description:"The leased (or idempotently replayed) synthesis attempt."},draft:{$ref:"#/$defs/WorkflowSynthesisDraft",description:"The citation obligation, complete by construction: the draft cites\nevery citable source digest and is verified downstream by\n[`crate::workflow_synthesis::verify_workflow_synthesis_draft`]."},groups:{description:"Disagreement structure over the succeeded sources.",items:{$ref:"#/$defs/WorkSynthesisEvidenceGroupV1"},type:"array"},source_set:{$ref:"#/$defs/WorkSynthesisSourceSetV1",description:"The sealed source envelopes the attempt was admitted against."},synthesis:{const:"admitted",type:"string"},uncited:{description:"Sources preserved without citations: failures, unknowns, and\nartifact-less successes, in the caller's requested order.",items:{$ref:"#/$defs/WorkAttemptIdentityV1"},type:"array"}},required:["synthesis","attempt","source_set","groups","draft","uncited"],type:"object"},{properties:{refusal:{$ref:"#/$defs/WorkSynthesisRefusalV1"},sources:{$ref:"#/$defs/WorkSynthesisSourceSetV1"},synthesis:{const:"unsynthesized",type:"string"}},required:["synthesis","sources","refusal"],type:"object"}],title:"WorkSynthesisAttemptV1"},{$defs:{WorkAttemptListCursorV1:v6},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"One page-bounded topology view read. The cursor vocabulary is the attempt\nlist's: a cursor minted under a superseded topology generation is a typed\nstaleness refusal, never a silently different page.",properties:{cursor:{anyOf:[{$ref:"#/$defs/WorkAttemptListCursorV1"},{type:"null"}],default:null},page_size:{format:"uint32",minimum:0,type:"integer"}},required:["page_size"],title:"WorkTopologyViewRequestV1",type:"object"},{$defs:{BranchTopologyKindV1:f_,BranchTopologyPolicyV1:fv,CanonicalGitRefNameV1:fR,CanonicalGitRefPrefix:fP,CapabilityId:fV,CrossMergeModeV1:hI,CrossMergePolicyV1:hx,GitHubStackedPullRequestPolicyV1:yP,ProtectedRefDispositionV1:g8,ProtectedRefRuleV1:g7,ProtectedRefSelectorV1:_e,RequiredCheckExpectationV1:_$,RequiredCheckV1:_S,ReviewRequirementV1:_T,ReviewTopologyKindV1:_O,ReviewTopologyPolicyV1:_E,RunId:_z,TaskId:vC,TopologyGatePolicyV1:vU,UtcMicros:vK,WorkAttemptListCoverageV1:v4,WorkAttemptListCursorV1:v6,WorkAttemptTopologyBindingV1:br,WorkPlacementBlockerV1:bF,WorkPlacementIdentityV1:bL,WorkPlacementKindV1:bU,WorkPlacementReadingV1:{description:"One placement reading. Absence is a state, not an empty placement.",oneOf:[{additionalProperties:!1,description:"No placement was ever admitted for this run.",properties:{state:{const:"absent",type:"string"}},required:["state"],type:"object"},{additionalProperties:!1,description:"The durable placement relation.",properties:{placement:{$ref:"#/$defs/WorkPlacementV1"},state:{const:"placed",type:"string"}},required:["state","placement"],type:"object"}],title:"WorkPlacementReadingV1"},WorkPlacementStateV1:bH,WorkPlacementTargetV1:bG,WorkPlacementV1:bB,WorkTopologyExecutionPlacementV1:{additionalProperties:!1,description:"The execution-placement dimension: the policy's placement mode plus one\nlane per distinct `(task, run)` pair in page order.",properties:{lanes:{items:{$ref:"#/$defs/WorkTopologyPlacementLaneV1"},type:"array"},mode:{$ref:"#/$defs/WorktreePlacementModeV1"}},required:["mode","lanes"],title:"WorkTopologyExecutionPlacementV1",type:"object"},WorkTopologyIntegrationStrategyV1:{additionalProperties:!1,description:"The integration-strategy dimension, read verbatim from the resolved work\ntopology policy the runs in scope are admitted against.",properties:{cross_merge:{$ref:"#/$defs/CrossMergePolicyV1"},gates:{$ref:"#/$defs/TopologyGatePolicyV1"},protected_refs:{items:{$ref:"#/$defs/ProtectedRefRuleV1"},type:"array"}},required:["cross_merge","gates","protected_refs"],title:"WorkTopologyIntegrationStrategyV1",type:"object"},WorkTopologyPlacementLaneV1:{additionalProperties:!1,description:"One execution-placement lane: a distinct `(task, run)` pair from the\nattempt page joined to its durable placement reading. Placement absence is\na state on the lane, not a dropped lane.",properties:{attempt_count:{description:"Attempts this lane carried within the requested page.",format:"uint32",minimum:0,type:"integer"},placement:{$ref:"#/$defs/WorkPlacementReadingV1"},run_id:{$ref:"#/$defs/RunId"},task_id:{$ref:"#/$defs/TaskId"}},required:["task_id","run_id","attempt_count","placement"],title:"WorkTopologyPlacementLaneV1",type:"object"},WorktreeCleanlinessRequirementV1:$A,WorktreePlacementModeV1:$z},$schema:"https://json-schema.org/draft/2020-12/schema",description:"The application-owned execution-topology view. Absence of any Work in\nscope is a typed state, distinct from an authorized-but-empty page.",oneOf:[{additionalProperties:!1,description:"No Work exists in this authority scope, so there is no topology to\ndraw. Concealed scopes are refused before any read.",properties:{state:{const:"absent",type:"string"}},required:["state"],type:"object"},{additionalProperties:!1,description:"The four dimensions, pinned to one verified topology generation.",properties:{branch_topology:{$ref:"#/$defs/BranchTopologyPolicyV1"},coverage:{$ref:"#/$defs/WorkAttemptListCoverageV1"},execution_placement:{$ref:"#/$defs/WorkTopologyExecutionPlacementV1"},integration_strategy:{$ref:"#/$defs/WorkTopologyIntegrationStrategyV1"},review_topology:{$ref:"#/$defs/ReviewTopologyPolicyV1"},state:{const:"view",type:"string"},topology:{$ref:"#/$defs/WorkAttemptTopologyBindingV1"}},required:["state","topology","coverage","execution_placement","branch_topology","review_topology","integration_strategy"],type:"object"}],title:"ExecutionTopologyViewV1"},{$defs:{ObservabilityHorizonV1:gM},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"One horizon-bounded execution-topology metrics read. The authorized scope\nis taken from the request context, not from the request, so a caller can\nnever widen the population it reads.",properties:{horizon:{$ref:"#/$defs/ObservabilityHorizonV1"},max_events:{description:"Event budget for this read, at most\n[`MAX_EXECUTION_TOPOLOGY_EVENTS_V1`].",format:"uint32",minimum:0,type:"integer"}},required:["horizon","max_events"],title:"ExecutionTopologyMetricsRequestV1",type:"object"},{$defs:{CoverageStateV1:hV,ExecutionBlockedCauseV1:{description:"Cause a work item was blocked for.",enum:["dependency","needs_input","capability","policy","scope","conflict","lease","backpressure","test","ci","review","effect_unknown","other","unknown"],type:"string"},ExecutionConcurrencyPhaseV1:{description:"Concurrency-width phase. `Useful` counts only distinct admitted\nattempts that advanced a committed progress frontier; heartbeats,\nqueued work, child processes, and transport fanout never reach it.",enum:["requested","accepted","admitted","active","useful"],type:"string"},ExecutionConflictKindV1:{description:"Conflict prediction kind. Mechanical and semantic keep separate\ndenominators because their adjudicators are not interchangeable.",enum:["mechanical","semantic","combined"],type:"string"},ExecutionConflictOutcomeV1:{description:"Independently observed conflict outcome. `Censored` and `Unknown`\nnever enter a confusion-matrix denominator.",enum:["conflict","no_conflict","censored","unknown"],type:"string"},ExecutionDeliveryOutcomeV1:{description:"Per-surface delivery outcome. A multi-surface delivery is never a\nduplicate of product work; only `Deduplicated` is.",enum:["delivered","deduplicated","dropped","unknown"],type:"string"},ExecutionDuplicateKindV1:{description:"Adjudicated duplicate-work relation. Similarity, proximity, shared\npaths, and concurrency never produce one of these.",enum:["exact_duplicate","superseded_overlap","repeated_investigation","duplicate_effect","not_duplicate","censored","unknown"],type:"string"},ExecutionDuplicateOutcomeV1:{description:"Whether a duplicate effect was prevented or actually committed. The\ntwo never collapse into one count.",enum:["prevented","committed","unknown","not_applicable"],type:"string"},ExecutionDurationBucketV1:{description:"Fixed duration buckets shared by stale stack age, blocked time, and\nrerun latency. Raw timestamps and exact durations stay authorized\nlocal detail.",enum:["under1m","from1m_to5m","from5m_to15m","from15m_to1h","from1h_to4h","from4h_to24h","from1d_to7d","over7d"],type:"string"},ExecutionFanoutPhaseV1:{description:"Fan-out width phase. `PeakActive` is the sampled active width; the\nfan-out distribution is unweighted so serialized and blocked samples,\nwhich carry no interval, are preserved rather than dropped.",enum:["requested","accepted","admitted","peak_active","useful"],type:"string"},ExecutionGitHubStackCapabilityReadingV1:{additionalProperties:!1,description:"Latest trustworthy GitHub stacked-PR capability observation in the\nhorizon. It is a typed operational state, not a metric or success claim.",properties:{capability:{anyOf:[{$ref:"#/$defs/ExecutionGitHubStackCapabilityV1"},{type:"null"}]},coverage:{$ref:"#/$defs/MetricCoverageV1"},other_forge_fallback_available:{type:["boolean","null"]},standard_git_fallback_available:{type:["boolean","null"]},unavailable:{anyOf:[{$ref:"#/$defs/ExecutionMetricUnavailableV1"},{type:"null"}]}},required:["coverage"],title:"ExecutionGitHubStackCapabilityReadingV1",type:"object"},ExecutionGitHubStackCapabilityV1:{description:"Last bounded GitHub stacked-PR capability state observed in the\nhorizon. This remains orthogonal to GitHub ingress and item lifecycle.",enum:["unavailable","private_preview_disabled","enabled","degraded"],type:"string"},ExecutionIntegrationKindV1:{description:"Integration operation kind. Rebase remains external observation only.",enum:["fast_forward","merge_commit","rebase","cherry_pick","stack_retarget","graph_only","external_observed","unknown"],type:"string"},ExecutionIntegrationOutcomeV1:{description:"Terminal result of an observed native integration.",enum:["succeeded","conflicted","rejected","denied","stale","locked","cancelled","timed_out","failed","partial","effect_unknown","unsupported","unknown"],type:"string"},ExecutionIntervalStateV1:{description:"Whether the owning drift interval is still open or exactly closed.",enum:["open","closed"],type:"string"},ExecutionLeakKindV1:{description:"Independently proved execution-leak class.",enum:["lease_after_terminal","attempt_without_live_owner","effect_unknown_past_deadline","missing_worktree_binding","unbounded_delivery","none","unknown"],type:"string"},ExecutionLeakOutcomeV1:{description:"Recovery state a proved leak reached.",enum:["not_required","pending","recovered","failed","unknown"],type:"string"},ExecutionMetricUnavailableV1:{description:"Why a measurement carries no value. Absence is always one of these typed\nreasons; it is never an empty string, a zero, or a silently dropped row.",oneOf:[{const:"store_unavailable",description:"The observation store could not be read at all for this horizon.",type:"string"},{const:"event_budget_exceeded",description:"The horizon holds more events than one read may draw, so every\ndenominator here would be a partial count presented as a total.",type:"string"},{const:"cell_budget_exceeded",description:"The bounded projection would exceed the Plan 26 result-cell ceiling.\nThe whole read refuses rather than returning a misleading subset.",type:"string"},{const:"no_eligible_evidence",description:"No recorded event in the family supplies this metric's numerator or\ndenominator.",type:"string"},{const:"support_floor_unmet",description:"Eligible cases exist but fall below the metric's support floor.",type:"string"},{const:"coverage_floor_unmet",description:"Observed cases cover less of the eligible population than the metric's\ncoverage floor allows.",type:"string"},{const:"censoring_ceiling_exceeded",description:"More of the eligible population is censored than the metric admits.",type:"string"},{const:"unbounded_interval",description:"The interval this metric integrates over has no proved upper bound, so\nits duration cannot be measured without inventing a terminal.",type:"string"}]},ExecutionQuantityUnitV1:{description:"Quantity unit for duplicate-effort accounting. Each unit is reported\nseparately: wall time, tokens, cost, tests, and effects are never\nsummed into one number.",enum:["wall_micros","tokens","cost_micros","tests","effects"],type:"string"},ExecutionRerunCauseV1:{description:"Typed rerun cause. Repeated logs and transport redelivery are not\nreruns and never carry one of these.",enum:["runtime_retry","runtime_fallback","test_rerun","ci_rerun","recovery","human_requested","unknown"],type:"string"},ExecutionRerunSourceV1:{description:"Which independent system observed the rerun.",enum:["runtime","test","ci"],type:"string"},ExecutionStackDriftKindV1:{description:"Exact reason a stack became stale. The enum is bounded and never\ncarries a branch, ref, worktree, repository, or provider identity.",enum:["head_advanced","base_advanced","merge_base_changed","retargeted","superseded"],type:"string"},ExecutionSurfaceFamilyV1:{description:"Delivery surface family. Addresses, payloads, principals, and\nrecipients are never observed, so the family is the whole label.",enum:["hook","mcp","lsp","dashboard","cli","other"],type:"string"},ExecutionTopologyDimensionV1:{description:"One allowed local grouping dimension. The set is closed by construction:\nevery value is produced by an exhaustive match over a bounded domain class,\nso no person, agent, task, project, repository, worktree, branch, ref,\ncommit, model version, or route can ever appear as a label.",oneOf:[{properties:{dimension:{const:"concurrency_phase",type:"string"},value:{$ref:"#/$defs/ExecutionConcurrencyPhaseV1"}},required:["dimension","value"],type:"object"},{properties:{dimension:{const:"fanout_phase",type:"string"},value:{$ref:"#/$defs/ExecutionFanoutPhaseV1"}},required:["dimension","value"],type:"object"},{properties:{dimension:{const:"width_bucket",type:"string"},value:{$ref:"#/$defs/ExecutionWidthBucketV1"}},required:["dimension","value"],type:"object"},{properties:{dimension:{const:"duration_bucket",type:"string"},value:{$ref:"#/$defs/ExecutionDurationBucketV1"}},required:["dimension","value"],type:"object"},{properties:{dimension:{const:"duplicate_kind",type:"string"},value:{$ref:"#/$defs/ExecutionDuplicateKindV1"}},required:["dimension","value"],type:"object"},{properties:{dimension:{const:"unit",type:"string"},value:{$ref:"#/$defs/ExecutionQuantityUnitV1"}},required:["dimension","value"],type:"object"},{properties:{dimension:{const:"duplicate_outcome",type:"string"},value:{$ref:"#/$defs/ExecutionDuplicateOutcomeV1"}},required:["dimension","value"],type:"object"},{properties:{dimension:{const:"conflict_kind",type:"string"},value:{$ref:"#/$defs/ExecutionConflictKindV1"}},required:["dimension","value"],type:"object"},{properties:{dimension:{const:"conflict_outcome",type:"string"},value:{$ref:"#/$defs/ExecutionConflictOutcomeV1"}},required:["dimension","value"],type:"object"},{properties:{dimension:{const:"integration_kind",type:"string"},value:{$ref:"#/$defs/ExecutionIntegrationKindV1"}},required:["dimension","value"],type:"object"},{properties:{dimension:{const:"integration_outcome",type:"string"},value:{$ref:"#/$defs/ExecutionIntegrationOutcomeV1"}},required:["dimension","value"],type:"object"},{properties:{dimension:{const:"stack_drift_kind",type:"string"},value:{$ref:"#/$defs/ExecutionStackDriftKindV1"}},required:["dimension","value"],type:"object"},{properties:{dimension:{const:"interval_state",type:"string"},value:{$ref:"#/$defs/ExecutionIntervalStateV1"}},required:["dimension","value"],type:"object"},{properties:{dimension:{const:"blocked_cause",type:"string"},value:{$ref:"#/$defs/ExecutionBlockedCauseV1"}},required:["dimension","value"],type:"object"},{properties:{dimension:{const:"rerun_source",type:"string"},value:{$ref:"#/$defs/ExecutionRerunSourceV1"}},required:["dimension","value"],type:"object"},{properties:{dimension:{const:"rerun_cause",type:"string"},value:{$ref:"#/$defs/ExecutionRerunCauseV1"}},required:["dimension","value"],type:"object"},{properties:{dimension:{const:"leak_kind",type:"string"},value:{$ref:"#/$defs/ExecutionLeakKindV1"}},required:["dimension","value"],type:"object"},{properties:{dimension:{const:"leak_outcome",type:"string"},value:{$ref:"#/$defs/ExecutionLeakOutcomeV1"}},required:["dimension","value"],type:"object"},{properties:{dimension:{const:"surface",type:"string"},value:{$ref:"#/$defs/ExecutionSurfaceFamilyV1"}},required:["dimension","value"],type:"object"},{properties:{dimension:{const:"delivery_outcome",type:"string"},value:{$ref:"#/$defs/ExecutionDeliveryOutcomeV1"}},required:["dimension","value"],type:"object"}]},ExecutionTopologyDrillAnchorV1:{additionalProperties:!1,description:"An opaque cursor minted by the registered observation authority. It can be\nresolved only through that same authorized local query boundary and is not\na metric dimension or exportable identity.",properties:{cursor:{type:"string"}},required:["cursor"],title:"ExecutionTopologyDrillAnchorV1",type:"object"},ExecutionTopologyEmissionCoverageV1:{additionalProperties:!1,description:"Envelope-level delivery evidence for this read. `None` means the store did\nnot answer, so no zero may be inferred. `dropped` is the proved lower bound\nfrom the bound producer scope, deduplicated across explicit loss receipts\nand their next-envelope carriers; it is not attributed to a topology\nfamily. Sampling stays a count of sampled topology envelopes and is never\nexpanded into a fabricated population estimate.",properties:{delayed:{format:"uint64",minimum:0,type:["integer","null"]},dropped:{format:"uint64",minimum:0,type:["integer","null"]},emitted:{format:"uint64",minimum:0,type:["integer","null"]},sampled_events:{format:"uint64",minimum:0,type:["integer","null"]}},title:"ExecutionTopologyEmissionCoverageV1",type:"object"},ExecutionTopologyMeasurementV1:{additionalProperties:!1,description:"One descriptor cell: the Plan 26 descriptor name, its grouping dimensions,\nand the landed metric envelope carrying value, denominator, coverage, and\nprovenance.",properties:{dimensions:{description:"Allowed local grouping dimensions, at most\n[`MAX_METRIC_DIMENSIONS_V1`], in a fixed order per descriptor.",items:{$ref:"#/$defs/ExecutionTopologyDimensionV1"},type:"array"},unavailable:{anyOf:[{$ref:"#/$defs/ExecutionMetricUnavailableV1"},{type:"null"}],description:"Typed absence reason. It is `Some` exactly when `value.value` is\n`None`, so a reader can never mistake a refused metric for a zero."},value:{$ref:"#/$defs/MetricValueV1"}},required:["dimensions","value"],title:"ExecutionTopologyMeasurementV1",type:"object"},ExecutionWidthBucketV1:{description:"Fixed width buckets. Raw widths stay authorized local detail; only\nbucket counts leave the projection.",enum:["zero","one","two","from3_to4","from5_to8","from9_to16","from17_to32","from33_to64","over64"],type:"string"},MetricCalibrationV1:gh,MetricCohortV1:gy,MetricCoverageV1:gg,MetricEvidenceClassV1:g_,MetricProvenanceV1:gv,MetricSourceV1:gb,MetricTemporalV1:g$,MetricUncertaintyV1:gS,MetricValueV1:gk,ObservabilityHorizonV1:gM},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"The canonical execution-topology read model. Observatory and Costs render\nthis without local formulas; CLI, MCP, and HTTP return the same bytes.",properties:{authorized_scope_ref:{description:"Local authorization anchor the read was admitted under. It is derived\nfrom the resolved scope, never from a caller-supplied string.",type:"string"},coverage:{$ref:"#/$defs/MetricCoverageV1",description:"Family-level coverage over the event population, independent of any\nsingle descriptor's denominator."},current:{description:"True only when the whole family was read with `Known` coverage. A\nfalse value means at least one descriptor below is a typed absence.",type:"boolean"},drill_anchors:{description:"Bounded registered source cursors for authorized local drill-down.\nPayload anchors, traces, and scope identifiers never enter this list.",items:{$ref:"#/$defs/ExecutionTopologyDrillAnchorV1"},type:"array"},emission_coverage:{$ref:"#/$defs/ExecutionTopologyEmissionCoverageV1"},github_stack_capability:{$ref:"#/$defs/ExecutionGitHubStackCapabilityReadingV1"},horizon:{$ref:"#/$defs/ObservabilityHorizonV1"},measurements:{items:{$ref:"#/$defs/ExecutionTopologyMeasurementV1"},type:"array"},observed_at_micros:{format:"int64",type:"integer"},watermark:{description:"Watermark of the last event this projection consumed. A rebuild at the\nsame watermark yields the same values.",type:"string"}},required:["authorized_scope_ref","horizon","watermark","observed_at_micros","current","coverage","emission_coverage","github_stack_capability","drill_anchors","measurements"],title:"ExecutionTopologyMetricsV1",type:"object"},{$defs:{ProjectId:g2,RepositoryId:_v,UtcMicros:vK,WorkGraphReadModeV1:{oneOf:[{properties:{mode:{const:"current",type:"string"}},required:["mode"],type:"object"},{properties:{mode:{const:"as_of",type:"string"},valid_at:{$ref:"#/$defs/UtcMicros"}},required:["mode","valid_at"],type:"object"},{properties:{from_valid_at:{$ref:"#/$defs/UtcMicros"},mode:{const:"evolution",type:"string"},through_valid_at:{$ref:"#/$defs/UtcMicros"}},required:["mode","from_valid_at","through_valid_at"],type:"object"},{properties:{from_observed_at:{$ref:"#/$defs/UtcMicros"},mode:{const:"forensic",type:"string"},through_observed_at:{$ref:"#/$defs/UtcMicros"}},required:["mode","from_observed_at","through_observed_at"],type:"object"}]},WorkProductAuthorizedRelationScopeV1:bJ,WorkProductSelectionScopeV1:b3},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{continuation:{type:["string","null"]},mode:{$ref:"#/$defs/WorkGraphReadModeV1"},observed_at:{$ref:"#/$defs/UtcMicros"},selection:{$ref:"#/$defs/WorkProductSelectionScopeV1"}},required:["selection","mode","observed_at"],title:"WorkGraphReadRequestV1",type:"object"},{$defs:{ActorId:mW,AttemptId:m1,AuthorizedWorkProductScopeV1:{additionalProperties:!1,description:"Owner identity resolved by the registered profile authority. It is never\naccepted from a Work request.",properties:{owner_brain_id:{$ref:"#/$defs/BrainId"},owner_profile_id:{$ref:"#/$defs/UserProfileId"},selection:{$ref:"#/$defs/WorkProductSelectionScopeV1"}},required:["owner_brain_id","owner_profile_id","selection"],type:"object"},BrainId:fs,ManifestDigest:gl,ProjectId:g2,ProjectionGenerationId:g9,ProposalId:g5,ProviderId:_i,RepositoryId:_v,RetrievalAnchorId:_q,RunId:_z,TaskEvidenceLinkV1:vx,TaskId:vC,UserProfileId:vB,UtcMicros:vK,VerifiedWorkGraphVersionV1:vZ,WorkAcceptanceCriterionV1:vQ,WorkAttemptIdentityV1:v2,WorkAttemptStateV1:v7,WorkCausalProjectionV1:{additionalProperties:!1,properties:{candidate_edges:{items:{$ref:"#/$defs/WorkDagEdgeV1"},type:"array"},graph_version:{format:"uint64",minimum:0,type:"integer"}},required:["graph_version","candidate_edges"],type:"object"},WorkCriticalPathProjectionV1:{additionalProperties:!1,properties:{graph_version:{format:"uint64",minimum:0,type:"integer"},task_ids:{items:{$ref:"#/$defs/TaskId"},type:"array"},total_effort:{format:"uint32",minimum:0,type:"integer"}},required:["graph_version","task_ids","total_effort"],type:"object"},WorkDagEdgeV1:{additionalProperties:!1,properties:{dependency:{$ref:"#/$defs/TaskId"},dependent:{$ref:"#/$defs/TaskId"}},required:["dependency","dependent"],type:"object"},WorkDagProjectionV1:{additionalProperties:!1,properties:{gating_edges:{items:{$ref:"#/$defs/WorkDagEdgeV1"},type:"array"},graph_version:{format:"uint64",minimum:0,type:"integer"},task_ids:{items:{$ref:"#/$defs/TaskId"},type:"array"}},required:["graph_version","task_ids","gating_edges"],type:"object"},WorkGraphSelectionCoverageV1:{description:"How much of the owner's journal the read's selection actually covers.\n\nA selection names a slice of the owner's work, not the whole journal: an\nevent records the relation scopes it was admitted under, and a selection\nthat does not name them puts that event *outside* the slice. The events\noutside a selection do not poison the ones inside it, but they must never be\nconcealed either, a caller who is shown the covered slice with no way to\nlearn that more exists is reading a silently incomplete graph.\n\nSo the read answers over the covered slice and says so, in the same\n`Complete`/`Partial` vocabulary [`WorkGraphTimelineCoverageV1`] and\n[`WorkHistoryCoverageV1`](crate::WorkHistoryCoverageV1) already use.\n\nThe covered slice is always a *prefix* of the journal, and that is a\nproperty of folding rather than a simplification. A graph version is folded\nfrom every event up to its own sequence, so the first event a selection does\nnot cover ends the readable slice: every later version, whatever scopes its\nown event named, would have to be folded across that event to exist at all.\n`excluded_events` therefore counts every event from the first uncovered one\nonward.",oneOf:[{description:"The selection covers the owner's whole journal. Nothing was withheld.",properties:{coverage:{const:"complete",type:"string"},covered_events:{format:"uint32",minimum:0,type:"integer"}},required:["coverage","covered_events"],type:"object"},{description:"The selection covers `covered_events` events and `excluded_events`\nevents lie outside it, starting at `first_excluded_sequence`. Every\nentry this read returned was folded from covered events alone.",properties:{coverage:{const:"partial",type:"string"},covered_events:{format:"uint32",minimum:0,type:"integer"},excluded_events:{format:"uint32",minimum:0,type:"integer"},first_excluded_sequence:{format:"uint64",minimum:0,type:"integer"}},required:["coverage","covered_events","excluded_events","first_excluded_sequence"],type:"object"}]},WorkGraphTimelineCoverageV1:{oneOf:[{properties:{coverage:{const:"complete",type:"string"},returned:{format:"uint32",minimum:0,type:"integer"}},required:["coverage","returned"],type:"object"},{properties:{continuation:{type:"string"},coverage:{const:"partial",type:"string"},returned:{format:"uint32",minimum:0,type:"integer"}},required:["coverage","returned","continuation"],type:"object"}]},WorkGraphTimelineV1:{additionalProperties:!1,properties:{coverage:{$ref:"#/$defs/WorkGraphTimelineCoverageV1"},entries:{items:{$ref:"#/$defs/WorkGraphVersionEntryV1"},type:"array"}},required:["entries","coverage"],type:"object"},WorkGraphVersionEntryV1:{additionalProperties:!1,description:"One immutable graph version and every Work projection derived from that\nsame version at the caller's explicit observation time.",properties:{graph:{$ref:"#/$defs/WorkProductGraphV1"},observed_at:{$ref:"#/$defs/UtcMicros"},projected_at:{$ref:"#/$defs/UtcMicros"},projections:{$ref:"#/$defs/WorkProductProjectionBundleV1"},runtime:{$ref:"#/$defs/WorkRuntimeProjectionV1"},valid_at:{$ref:"#/$defs/UtcMicros"},verified_version:{$ref:"#/$defs/VerifiedWorkGraphVersionV1"}},required:["valid_at","observed_at","projected_at","verified_version","graph","runtime","projections"],type:"object"},WorkHandoffV1:bT,WorkHierarchyV1:bO,WorkInitiativeV1:bE,WorkItemInputV1:bA,WorkItemV1:bM,WorkKanbanCardV1:{additionalProperties:!1,properties:{effort:{format:"uint32",minimum:0,type:"integer"},lane:{$ref:"#/$defs/WorkTimelineLaneV1"},legal_actions:{items:{$ref:"#/$defs/WorkLegalActionV1"},type:"array",uniqueItems:!0},task_id:{$ref:"#/$defs/TaskId"}},required:["task_id","lane","effort","legal_actions"],type:"object"},WorkKanbanProjectionV1:{additionalProperties:!1,properties:{cards:{items:{$ref:"#/$defs/WorkKanbanCardV1"},type:"array"},graph_version:{format:"uint64",minimum:0,type:"integer"}},required:["graph_version","cards"],type:"object"},WorkLegalActionV1:{enum:["view_evidence","generate_proposal","accept_proposal","link_accepted_attempt","accept_task","handoff","archive"],type:"string"},WorkMilestoneV1:bz,WorkPlanV1:bK,WorkProductAuthorizedRelationScopeV1:bJ,WorkProductGraphV1:b1,WorkProductProjectionBundleV1:{additionalProperties:!1,properties:{causal:{$ref:"#/$defs/WorkCausalProjectionV1"},critical_path:{$ref:"#/$defs/WorkCriticalPathProjectionV1"},dag:{$ref:"#/$defs/WorkDagProjectionV1"},graph_version:{format:"uint64",minimum:0,type:"integer"},kanban:{$ref:"#/$defs/WorkKanbanProjectionV1"},runtime:{$ref:"#/$defs/WorkRuntimeProjectionV1"},timeline:{$ref:"#/$defs/WorkTimelineProjectionV1"},workload:{$ref:"#/$defs/WorkWorkloadProjectionV1"}},required:["graph_version","runtime","kanban","dag","timeline","causal","critical_path","workload"],type:"object"},WorkProductSelectionScopeV1:b3,WorkProjectionSequenceV1:{format:"uint64",minimum:0,title:"WorkProjectionSequenceV1",type:"integer"},WorkProposalDecisionV1:b9,WorkProposalDispositionV1:b5,WorkProposalV1:b8,WorkProposedChildV1:b7,WorkProviderRouteId:$o,WorkProviderRouteV1:$n,WorkRelationReplanDecisionV1:$s,WorkRelationReplanProposalV1:$d,WorkRouteDecisionV1:$f,WorkRuntimeAttemptProjectionV1:{additionalProperties:!1,properties:{identity:{$ref:"#/$defs/WorkAttemptIdentityV1"},state:{$ref:"#/$defs/WorkAttemptStateV1"}},required:["identity","state"],type:"object"},WorkRuntimeProjectionCoverageV1:{oneOf:[{additionalProperties:!1,properties:{coverage:{const:"complete",type:"string"}},required:["coverage"],type:"object"},{additionalProperties:!1,properties:{coverage:{const:"partial",type:"string"},unavailable_attempts:{items:{$ref:"#/$defs/WorkAttemptIdentityV1"},type:"array",uniqueItems:!0}},required:["coverage","unavailable_attempts"],type:"object"},{additionalProperties:!1,properties:{coverage:{const:"unavailable",type:"string"}},required:["coverage"],type:"object"}]},WorkRuntimeProjectionV1:{additionalProperties:!1,properties:{attempts:{items:{$ref:"#/$defs/WorkRuntimeAttemptProjectionV1"},type:"array"},coverage:{$ref:"#/$defs/WorkRuntimeProjectionCoverageV1"},generation_id:{$ref:"#/$defs/ProjectionGenerationId"},graph_version:{format:"uint64",minimum:0,type:"integer"},observed_at:{$ref:"#/$defs/UtcMicros"},sequence:{$ref:"#/$defs/WorkProjectionSequenceV1"}},required:["graph_version","generation_id","sequence","observed_at","attempts","coverage"],type:"object"},WorkScoreKindV1:$$,WorkShapeAssessmentV1:$S,WorkSizingV1:$k,WorkTimelineEntryV1:{additionalProperties:!1,properties:{created_at:{$ref:"#/$defs/UtcMicros"},deadline:{anyOf:[{$ref:"#/$defs/UtcMicros"},{type:"null"}]},scheduled_at:{anyOf:[{$ref:"#/$defs/UtcMicros"},{type:"null"}]},task_id:{$ref:"#/$defs/TaskId"},updated_at:{$ref:"#/$defs/UtcMicros"}},required:["task_id","created_at","updated_at"],type:"object"},WorkTimelineLaneV1:{enum:["triage","todo","scheduled","ready","running","blocked","review","done","archived","cancelled","unavailable"],type:"string"},WorkTimelineProjectionV1:{additionalProperties:!1,properties:{entries:{items:{$ref:"#/$defs/WorkTimelineEntryV1"},type:"array"},graph_version:{format:"uint64",minimum:0,type:"integer"}},required:["graph_version","entries"],type:"object"},WorkWorkloadProjectionV1:{additionalProperties:!1,properties:{actual_concurrency:{format:"uint32",minimum:0,type:["integer","null"]},blocked_effort:{format:"uint32",minimum:0,type:["integer","null"]},graph_version:{format:"uint64",minimum:0,type:"integer"},ready_effort:{format:"uint32",minimum:0,type:["integer","null"]},requested_concurrency:{format:"uint32",minimum:0,type:["integer","null"]},running_effort:{format:"uint32",minimum:0,type:["integer","null"]},total_effort:{format:"uint32",minimum:0,type:"integer"}},required:["graph_version","total_effort"],type:"object"}},$schema:"https://json-schema.org/draft/2020-12/schema",oneOf:[{properties:{authorized_scope:{$ref:"#/$defs/AuthorizedWorkProductScopeV1"},mode:{const:"current",type:"string"},selection_coverage:{$ref:"#/$defs/WorkGraphSelectionCoverageV1"},snapshot:{$ref:"#/$defs/WorkGraphVersionEntryV1"}},required:["mode","authorized_scope","selection_coverage","snapshot"],type:"object"},{properties:{authorized_scope:{$ref:"#/$defs/AuthorizedWorkProductScopeV1"},mode:{const:"as_of",type:"string"},selection_coverage:{$ref:"#/$defs/WorkGraphSelectionCoverageV1"},snapshot:{$ref:"#/$defs/WorkGraphVersionEntryV1"}},required:["mode","authorized_scope","selection_coverage","snapshot"],type:"object"},{properties:{authorized_scope:{$ref:"#/$defs/AuthorizedWorkProductScopeV1"},mode:{const:"evolution",type:"string"},selection_coverage:{$ref:"#/$defs/WorkGraphSelectionCoverageV1"},timeline:{$ref:"#/$defs/WorkGraphTimelineV1"}},required:["mode","authorized_scope","selection_coverage","timeline"],type:"object"},{properties:{authorized_scope:{$ref:"#/$defs/AuthorizedWorkProductScopeV1"},mode:{const:"forensic",type:"string"},selection_coverage:{$ref:"#/$defs/WorkGraphSelectionCoverageV1"},timeline:{$ref:"#/$defs/WorkGraphTimelineV1"}},required:["mode","authorized_scope","selection_coverage","timeline"],type:"object"},{description:"A `Current` or `AsOf` point read under an authorized selection that has\nno published graph version at that point: no task has been created yet.\nThe caller was authorized; the legal next action is creating a task.",properties:{authorized_scope:{$ref:"#/$defs/AuthorizedWorkProductScopeV1"},mode:{const:"absent",type:"string"},selection_coverage:{$ref:"#/$defs/WorkGraphSelectionCoverageV1"}},required:["mode","authorized_scope","selection_coverage"],type:"object"}],title:"WorkGraphReadV1"},{$defs:{WorkflowDefinitionId:$I},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Wire request for [`WorkflowDefinitionService::activate`].",properties:{definition_id:{$ref:"#/$defs/WorkflowDefinitionId"},definition_version:{format:"uint64",minimum:1,type:"integer"},expected_revision:{description:"Current candidate disposition revision. A newly registered candidate\nstarts at revision 1; activation reports expected and observed values\nwhen this compare-and-swap precondition is stale.",format:"uint64",minimum:1,type:"integer"}},required:["definition_id","definition_version","expected_revision"],title:"WorkflowDefinitionActivateRequest",type:"object"},{$defs:{UtcMicros:vK,WorkflowDefinitionId:$I,WorkflowDefinitionLifecycleState:{description:'Durable lifecycle disposition of one immutable workflow definition version.\n\nPlan 32 ("Typed workflow definitions"): "Lifecycle retains candidate,\nvalidate, activate, retire, reject, list, get, diff, and history operations\nthrough the same application surfaces." The definition payload itself stays\nimmutable, "Editing creates a new version; admitted runs remain pinned",\nso the disposition is a separate revisioned aggregate keyed by the same\ndefinition identity.',enum:["candidate","validated","active","retired","rejected"],type:"string"}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Revisioned lifecycle disposition of one definition version.",properties:{definition_id:{$ref:"#/$defs/WorkflowDefinitionId"},definition_version:{format:"uint64",minimum:1,type:"integer"},revision:{format:"uint64",minimum:1,type:"integer"},state:{$ref:"#/$defs/WorkflowDefinitionLifecycleState"},transitioned_at:{$ref:"#/$defs/UtcMicros"}},required:["definition_id","definition_version","state","revision","transitioned_at"],title:"WorkflowDefinitionDisposition",type:"object"},{$defs:{RunId:_z,WorkCommandId:bc},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Requests cooperative cancellation as a durable typed transition; the run\nsettles to `Cancelled` when the runtime reconciles in-flight steps.",properties:{command_id:{$ref:"#/$defs/WorkCommandId"},expected_sequence:{format:"uint64",minimum:0,type:"integer"},run_id:{$ref:"#/$defs/RunId"}},required:["run_id","expected_sequence","command_id"],title:"WorkflowRunCancelRequest",type:"object"},{$defs:{ActorId:mW,AttemptId:m1,AutomaticWorktreeGcV1:m3,BranchCollisionPolicyV1:fd,BranchNameComponentV1:fc,BranchNameSeparatorV1:fl,BranchNamingPolicyV1:fp,BranchTopologyKindV1:f_,BranchTopologyPolicyV1:fv,CanonicalGitRefNameV1:fR,CanonicalGitRefPrefix:fP,CapabilityId:fV,CommitId:fH,ConfigurationRevisionId:f0,ConfigurationSnapshotId:f2,CredentialReferenceId:hq,CrossMergeModeV1:hI,CrossMergePolicyV1:hx,GitHubStackedPullRequestPolicyV1:yP,HistoryRewritePolicyV1:yU,LocatorDigest:gr,ManifestDigest:gl,ProjectId:g2,ProposalId:g5,ProtectedRefDispositionV1:g8,ProtectedRefRuleV1:g7,ProtectedRefSelectorV1:_e,ProviderId:_i,RefId:_u,RepositoryId:_v,RepositoryPlacementScopeV1:_b,RequiredCheckExpectationV1:_$,RequiredCheckV1:_S,ReviewRequirementV1:_T,ReviewTopologyKindV1:_O,ReviewTopologyPolicyV1:_E,RunId:_z,SensitiveFilesystemLocatorV1:_2,TaskId:vC,TopologyConcurrencyPolicyV1:vF,TopologyEscalationPolicyV1:vL,TopologyGatePolicyV1:vU,TopologyNotificationLevelV1:vH,UtcMicros:vK,WorkAcceptanceCriterionV1:vQ,WorkApprovalPolicy:vX,WorkArtifactId:vY,WorkArtifactRefV1:v1,WorkAttemptIdentityV1:v2,WorkAuthority:{additionalProperties:!1,properties:{actor_id:{$ref:"#/$defs/ActorId"},policy_digest:{$ref:"#/$defs/ManifestDigest"},project_id:{$ref:"#/$defs/ProjectId"},repository_id:{$ref:"#/$defs/RepositoryId"},worktree_id:{$ref:"#/$defs/WorktreeId"}},required:["project_id","repository_id","worktree_id","actor_id","policy_digest"],type:"object"},WorkCommandId:bc,WorkEffectStateV1:bm,WorkEgressPolicy:bh,WorkExecutableReference:bb,WorkExecutionLimits:bS,WorkExecutionSnapshot:bk,WorkFallbackTopology:bP,WorkFilesystemPolicy:bq,WorkHandoffV1:bT,WorkHierarchyV1:bO,WorkInitiativeV1:bE,WorkItemInputV1:bA,WorkItemV1:bM,WorkMilestoneV1:bz,WorkPlanV1:bK,WorkProposalV1:b8,WorkProposedChildV1:b7,WorkProviderBackendV1:$t,WorkProviderProtocol:$i,WorkProviderRouteId:$o,WorkProviderRouteV1:$n,WorkRouteDecisionV1:$f,WorkSandboxPolicy:$b,WorkScoreKindV1:$$,WorkShapeAssessmentV1:$S,WorkSizingV1:$k,WorkTopologyPolicyV1:$V,WorkflowDefinition:$q,WorkflowDefinitionId:$I,WorkflowFanOut:$x,WorkflowFanOutChildPlanV1:{additionalProperties:!1,properties:{admit_command_id:{$ref:"#/$defs/WorkCommandId"},attempt_identity:{$ref:"#/$defs/WorkAttemptIdentityV1"},create_command_id:{$ref:"#/$defs/WorkCommandId"},initiative:{$ref:"#/$defs/WorkInitiativeV1"},instructions:{type:"string"},item:{$ref:"#/$defs/WorkItemV1"},milestone:{$ref:"#/$defs/WorkMilestoneV1"},plan:{$ref:"#/$defs/WorkPlanV1"},proposal:{$ref:"#/$defs/WorkProposalV1"},proposal_command_id:{$ref:"#/$defs/WorkCommandId"},task_id:{$ref:"#/$defs/TaskId"}},required:["task_id","attempt_identity","create_command_id","proposal_command_id","admit_command_id","initiative","plan","milestone","item","proposal","instructions"],type:"object"},WorkflowFanOutFailurePolicyV1:{oneOf:[{properties:{policy:{const:"fail_fast",type:"string"}},required:["policy"],type:"object"},{properties:{policy:{const:"collect",type:"string"}},required:["policy"],type:"object"},{properties:{policy:{const:"require_at_least",type:"string"},successes:{format:"uint16",maximum:65535,minimum:1,type:"integer"}},required:["policy","successes"],type:"object"}]},WorkflowFanOutPlanV1:{additionalProperties:!1,properties:{admitted_at:{$ref:"#/$defs/UtcMicros"},authority:{$ref:"#/$defs/WorkAuthority",description:"Exact Work authority that admitted this plan. Recovery may execute the\nplan only from a runtime with this byte-identical authority."},children:{items:{$ref:"#/$defs/WorkflowFanOutChildPlanV1"},type:"array"},commit:{$ref:"#/$defs/CommitId"},effect_state:{$ref:"#/$defs/WorkEffectStateV1"},execution_snapshot:{$ref:"#/$defs/WorkExecutionSnapshot"},failure_policy:{$ref:"#/$defs/WorkflowFanOutFailurePolicyV1"},maximum_parallel:{format:"uint16",maximum:65535,minimum:1,type:"integer"},operation:{$ref:"#/$defs/WorkflowOperationRef"},plan_digest:{$ref:"#/$defs/ManifestDigest"},reference:{anyOf:[{$ref:"#/$defs/RefId"},{type:"null"}]},step_id:{$ref:"#/$defs/WorkflowStepId"}},required:["authority","step_id","operation","plan_digest","admitted_at","maximum_parallel","failure_policy","execution_snapshot","commit","effect_state","children"],type:"object"},WorkflowOperationRef:$j,WorkflowOutputArtifact:{additionalProperties:!1,properties:{artifact:{$ref:"#/$defs/WorkArtifactRefV1"},attempt_identity:{$ref:"#/$defs/WorkAttemptIdentityV1"}},required:["attempt_identity","artifact"],type:"object"},WorkflowOutputName:$C,WorkflowOutputReference:$T,WorkflowPlacementReceipt:{additionalProperties:!1,properties:{backend:{$ref:"#/$defs/WorkProviderBackendV1"},configuration_digest:{$ref:"#/$defs/ManifestDigest"},model:{type:"string"},placement_digest:{$ref:"#/$defs/ManifestDigest"},provider_registry_digest:{$ref:"#/$defs/ManifestDigest"},route:{$ref:"#/$defs/WorkProviderRouteV1"},run_id:{$ref:"#/$defs/RunId"},step_id:{$ref:"#/$defs/WorkflowStepId"},topology_digest:{$ref:"#/$defs/ManifestDigest"},worktree_placement:{$ref:"#/$defs/WorktreePlacementModeV1"}},required:["run_id","step_id","route","backend","model","configuration_digest","topology_digest","provider_registry_digest","worktree_placement","placement_digest"],type:"object"},WorkflowRunEvent:{additionalProperties:!1,properties:{command_id:{$ref:"#/$defs/WorkCommandId"},event:{$ref:"#/$defs/WorkflowRunEventKind"},input_digest:{$ref:"#/$defs/ManifestDigest"},occurred_at:{$ref:"#/$defs/UtcMicros"},run_id:{$ref:"#/$defs/RunId"},sequence:{format:"uint64",minimum:0,type:"integer"}},required:["run_id","sequence","command_id","input_digest","occurred_at","event"],type:"object"},WorkflowRunEventKind:{oneOf:[{properties:{definition:{$ref:"#/$defs/WorkflowDefinition"},fan_out_plans:{default:[],items:{$ref:"#/$defs/WorkflowFanOutPlanV1"},type:"array"},pinned_provider_registry_digest:{$ref:"#/$defs/ManifestDigest"},pinned_topology_digest:{$ref:"#/$defs/ManifestDigest"},type:{const:"admitted",type:"string"}},required:["type","definition","pinned_topology_digest","pinned_provider_registry_digest"],type:"object"},{properties:{attempts:{items:{$ref:"#/$defs/WorkAttemptIdentityV1"},type:"array"},step_id:{$ref:"#/$defs/WorkflowStepId"},type:{const:"fan_out_children_released",type:"string"}},required:["type","step_id","attempts"],type:"object"},{properties:{attempts:{items:{$ref:"#/$defs/WorkAttemptIdentityV1"},type:"array"},step_id:{$ref:"#/$defs/WorkflowStepId"},type:{const:"fan_out_children_settled",type:"string"}},required:["type","step_id","attempts"],type:"object"},{properties:{planned_attempt:{$ref:"#/$defs/WorkAttemptIdentityV1"},prior_attempt:{$ref:"#/$defs/WorkAttemptIdentityV1"},replacement_attempt:{$ref:"#/$defs/WorkAttemptIdentityV1"},retry_receipt_digest:{$ref:"#/$defs/ManifestDigest"},step_id:{$ref:"#/$defs/WorkflowStepId"},type:{const:"fan_out_child_retry_rebound",type:"string"}},required:["type","step_id","planned_attempt","prior_attempt","replacement_attempt","retry_receipt_digest"],type:"object"},{properties:{placement:{$ref:"#/$defs/WorkflowPlacementReceipt"},step_id:{$ref:"#/$defs/WorkflowStepId"},type:{const:"step_started",type:"string"}},required:["type","step_id","placement"],type:"object"},{properties:{effect_receipt:{$ref:"#/$defs/WorkflowStepEffectReceipt"},outputs:{items:{$ref:"#/$defs/WorkflowStepOutput"},type:"array"},step_id:{$ref:"#/$defs/WorkflowStepId"},type:{const:"step_completed",type:"string"}},required:["type","step_id","outputs","effect_receipt"],type:"object"},{properties:{effect_receipt:{$ref:"#/$defs/WorkflowStepEffectReceipt"},outputs:{items:{$ref:"#/$defs/WorkflowStepOutput"},type:"array"},step_id:{$ref:"#/$defs/WorkflowStepId"},type:{const:"step_failed",type:"string"}},required:["type","step_id","outputs","effect_receipt"],type:"object"},{properties:{type:{const:"paused",type:"string"}},required:["type"],type:"object"},{properties:{type:{const:"resumed",type:"string"}},required:["type"],type:"object"},{properties:{type:{const:"cancellation_requested",type:"string"}},required:["type"],type:"object"},{properties:{type:{const:"cancelled",type:"string"}},required:["type"],type:"object"}]},WorkflowRunStatus:{enum:["running","paused","cancelling","completed","failed","cancelled"],type:"string"},WorkflowStep:$O,WorkflowStepEffectOutcome:{enum:["completed","failed","cancelled","timed_out","unknown"],type:"string"},WorkflowStepEffectReceipt:{additionalProperties:!1,properties:{effect_digest:{$ref:"#/$defs/ManifestDigest"},outcome:{$ref:"#/$defs/WorkflowStepEffectOutcome"},output_set_digest:{$ref:"#/$defs/ManifestDigest"},placement_digest:{$ref:"#/$defs/ManifestDigest"},receipt_digest:{$ref:"#/$defs/ManifestDigest"},run_id:{$ref:"#/$defs/RunId"},step_id:{$ref:"#/$defs/WorkflowStepId"}},required:["run_id","step_id","placement_digest","outcome","effect_digest","output_set_digest","receipt_digest"],type:"object"},WorkflowStepId:$E,WorkflowStepOutput:{additionalProperties:!1,properties:{artifacts:{items:{$ref:"#/$defs/WorkflowOutputArtifact"},type:"array"},output_name:{$ref:"#/$defs/WorkflowOutputName"}},required:["output_name","artifacts"],type:"object"},WorkflowStepRunProjection:{additionalProperties:!1,properties:{effect_receipt:{anyOf:[{$ref:"#/$defs/WorkflowStepEffectReceipt"},{type:"null"}]},outputs:{additionalProperties:{$ref:"#/$defs/WorkflowStepOutput"},type:"object"},placement_receipt:{anyOf:[{$ref:"#/$defs/WorkflowPlacementReceipt"},{type:"null"}]},status:{$ref:"#/$defs/WorkflowStepStatus"}},required:["status","outputs"],type:"object"},WorkflowStepStatus:{enum:["blocked","ready","running","succeeded","failed","cancelled"],type:"string"},WorktreeCleanlinessRequirementV1:$A,WorktreeId:$M,WorktreePlacementModeV1:$z,WorktreeRetentionPolicyV1:$D,WorktreeRootPolicyV1:$F},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{definition:{$ref:"#/$defs/WorkflowDefinition"},fan_out_plans:{additionalProperties:{$ref:"#/$defs/WorkflowFanOutPlanV1"},type:"object"},history:{items:{$ref:"#/$defs/WorkflowRunEvent"},type:"array"},pinned_provider_registry_digest:{$ref:"#/$defs/ManifestDigest"},pinned_topology_digest:{$ref:"#/$defs/ManifestDigest"},released_fan_out_attempts:{items:{$ref:"#/$defs/WorkAttemptIdentityV1"},type:"array",uniqueItems:!0},run_id:{$ref:"#/$defs/RunId"},sequence:{format:"uint64",minimum:0,type:"integer"},settled_fan_out_attempts:{items:{$ref:"#/$defs/WorkAttemptIdentityV1"},type:"array",uniqueItems:!0},status:{$ref:"#/$defs/WorkflowRunStatus"},steps:{additionalProperties:{$ref:"#/$defs/WorkflowStepRunProjection"},type:"object"}},required:["run_id","definition","pinned_topology_digest","pinned_provider_registry_digest","status","sequence","steps","fan_out_plans","released_fan_out_attempts","settled_fan_out_attempts","history"],title:"WorkflowRunProjection",type:"object"},{$defs:{WorkflowDefinitionId:$I},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Wire request for [`WorkflowDefinitionService::history`].",properties:{definition_id:{$ref:"#/$defs/WorkflowDefinitionId"}},required:["definition_id"],title:"WorkflowDefinitionHistoryRequest",type:"object"},{$defs:{ManifestDigest:gl,ProjectId:g2,WorkflowDefinition:$q,WorkflowDefinitionId:$I,WorkflowFanOut:$x,WorkflowOperationRef:$j,WorkflowOutputName:$C,WorkflowOutputReference:$T,WorkflowStep:$O,WorkflowStepId:$E},$schema:"https://json-schema.org/draft/2020-12/schema",items:{$ref:"#/$defs/WorkflowDefinition"},title:"Array_of_WorkflowDefinition",type:"array"},{$defs:{WorkflowDefinitionId:$I},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Wire request for [`WorkflowDefinitionService::diff`].",properties:{definition_id:{$ref:"#/$defs/WorkflowDefinitionId"},from_version:{format:"uint64",minimum:1,type:"integer"},to_version:{format:"uint64",minimum:1,type:"integer"}},required:["definition_id","from_version","to_version"],title:"WorkflowDefinitionDiffRequest",type:"object"},{$defs:{WorkflowDefinitionId:$I,WorkflowStepId:$E},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{catalog_changed:{type:"boolean"},changed_steps:{items:{$ref:"#/$defs/WorkflowStepId"},type:"array",uniqueItems:!0},configuration_changed:{type:"boolean"},definition_id:{$ref:"#/$defs/WorkflowDefinitionId"},from_version:{format:"uint64",minimum:0,type:"integer"},policy_changed:{type:"boolean"},to_version:{format:"uint64",minimum:0,type:"integer"}},required:["definition_id","from_version","to_version","changed_steps","policy_changed","configuration_changed","catalog_changed"],title:"WorkflowDefinitionDiff",type:"object"},{$defs:{WorkflowDefinitionId:$I},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Wire request for [`WorkflowDefinitionService::get`].",properties:{definition_id:{$ref:"#/$defs/WorkflowDefinitionId"},definition_version:{format:"uint64",minimum:1,type:"integer"}},required:["definition_id","definition_version"],title:"WorkflowDefinitionGetRequest",type:"object"},{$defs:{ManifestDigest:gl,ProjectId:g2,WorkflowDefinitionId:$I,WorkflowFanOut:$x,WorkflowOperationRef:$j,WorkflowOutputName:$C,WorkflowOutputReference:$T,WorkflowStep:$O,WorkflowStepId:$E},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{definition_id:{$ref:"#/$defs/WorkflowDefinitionId"},definition_version:{format:"uint64",minimum:0,type:"integer"},pinned_catalog_digest:{$ref:"#/$defs/ManifestDigest",description:"Must equal the live Work executable catalog digest. Validation and\nactivation report the current digest when this pin is stale."},pinned_configuration_digest:{$ref:"#/$defs/ManifestDigest"},pinned_policy_digest:{$ref:"#/$defs/ManifestDigest"},project_id:{$ref:"#/$defs/ProjectId"},steps:{items:{$ref:"#/$defs/WorkflowStep"},type:"array"}},required:["definition_id","definition_version","project_id","steps","pinned_policy_digest","pinned_configuration_digest","pinned_catalog_digest"],title:"WorkflowDefinition",type:"object"},{$defs:{RunId:_z},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{run_id:{$ref:"#/$defs/RunId"}},required:["run_id"],title:"WorkflowRunGetRequest",type:"object"},{$defs:{ActorId:mW,AttemptId:m1,ManifestDigest:gl,ProjectId:g2,RepositoryId:_v,RunId:_z,TaskHandoffScope:vj,TaskId:vC,ThreadId:vN,UtcMicros:vK,WorkAttemptIdentityV1:v2,WorkAttemptStateV1:v7,WorkHandoffAttemptFrontierV1:bx,WorkHandoffFrontierV1:bj,WorkHandoffLineageV1:bC,WorkflowDefinitionId:$I,WorkflowStepId:$E,WorktreeId:$M},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Wire request for [`TaskHandoffService::issue`].\n\n`secret` is the caller-supplied bearer token; the authority persists only\nits digest, never the secret itself. The scope must name a step the\nActive definition version declares and a run admitted from that version;\nany other scope is refused as not found and journals no grant.",properties:{frontier:{$ref:"#/$defs/WorkHandoffFrontierV1",description:"The exact work/evidence frontier this handoff records (Plan 24)."},scope:{$ref:"#/$defs/TaskHandoffScope"},secret:{type:"string"}},required:["scope","secret","frontier"],title:"TaskHandoffIssueRequest",type:"object"},{$defs:{ActorId:mW,AttemptId:m1,ManifestDigest:gl,ProjectId:g2,RepositoryId:_v,RunId:_z,TaskHandoffScope:vj,TaskId:vC,ThreadId:vN,UtcMicros:vK,WorkAttemptIdentityV1:v2,WorkAttemptStateV1:v7,WorkHandoffAttemptFrontierV1:bx,WorkHandoffFrontierV1:bj,WorkHandoffLineageV1:bC,WorkflowDefinitionId:$I,WorkflowStepId:$E,WorktreeId:$M},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{expires_at:{$ref:"#/$defs/UtcMicros"},frontier:{$ref:"#/$defs/WorkHandoffFrontierV1",description:"The exact work/evidence frontier this handoff records (Plan 24)."},frontier_digest:{$ref:"#/$defs/ManifestDigest",description:"The canonical digest of `frontier`; lineage chains hold this value."},issued_at:{$ref:"#/$defs/UtcMicros"},scope:{$ref:"#/$defs/TaskHandoffScope"},token_digest:{$ref:"#/$defs/ManifestDigest"}},required:["scope","token_digest","issued_at","expires_at","frontier","frontier_digest"],title:"TaskHandoffGrant",type:"object"},{$defs:{ActorId:mW,ProjectId:g2,RepositoryId:_v,RunId:_z,TaskHandoffScope:vj,TaskId:vC,ThreadId:vN,WorkflowDefinitionId:$I,WorkflowStepId:$E,WorktreeId:$M},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Wire request for [`TaskHandoffService::redeem`].",properties:{expected_scope:{$ref:"#/$defs/TaskHandoffScope"},secret:{type:"string"}},required:["secret","expected_scope"],title:"TaskHandoffRedeemRequest",type:"object"},{$defs:{ActorId:mW,AttemptId:m1,ManifestDigest:gl,ProjectId:g2,RepositoryId:_v,RunId:_z,TaskHandoffScope:vj,TaskId:vC,ThreadId:vN,UtcMicros:vK,WorkAttemptIdentityV1:v2,WorkAttemptStateV1:v7,WorkHandoffAttemptFrontierV1:bx,WorkHandoffFrontierV1:bj,WorkHandoffLineageV1:bC,WorkflowDefinitionId:$I,WorkflowStepId:$E,WorktreeId:$M},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Wire response for [`TaskHandoffService::redeem`]: the redemption receipt,\nonce and only once, for the caller that actually consumed the grant.\n\nThe receipt is checkpoint evidence only. It deliberately carries no\nlease, fence, or acceptance authority: redeeming a handoff cannot renew\na lease, establish task acceptance, or mutate graph or runtime state\n(Plan 24). The redeemer must earn runtime authority through the normal\nadmission and lease paths.",properties:{frontier:{$ref:"#/$defs/WorkHandoffFrontierV1",description:"The frontier exactly as the issuer recorded it."},frontier_digest:{$ref:"#/$defs/ManifestDigest",description:"The canonical digest of `frontier`, for lineage chaining."},redeemed_at:{$ref:"#/$defs/UtcMicros"},scope:{$ref:"#/$defs/TaskHandoffScope"}},required:["scope","frontier","frontier_digest","redeemed_at"],title:"TaskHandoffRedeemed",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Wire request for [`WorkflowDefinitionService::list`].",title:"WorkflowDefinitionListRequest",type:"object"},{$defs:{RunId:_z,WorkCommandId:bc},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{command_id:{$ref:"#/$defs/WorkCommandId"},expected_sequence:{format:"uint64",minimum:0,type:"integer"},run_id:{$ref:"#/$defs/RunId"}},required:["run_id","expected_sequence","command_id"],title:"WorkflowRunPauseRequest",type:"object"},{$defs:{ManifestDigest:gl,ProjectId:g2,WorkflowDefinition:$q,WorkflowDefinitionId:$I,WorkflowFanOut:$x,WorkflowOperationRef:$j,WorkflowOutputName:$C,WorkflowOutputReference:$T,WorkflowStep:$O,WorkflowStepId:$E},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Wire request for [`WorkflowDefinitionService::register`].",properties:{definition:{$ref:"#/$defs/WorkflowDefinition"}},required:["definition"],title:"WorkflowDefinitionRegisterRequest",type:"object"},{$defs:{WorkflowDefinitionId:$I},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Wire request for [`WorkflowDefinitionService::reject`].",properties:{definition_id:{$ref:"#/$defs/WorkflowDefinitionId"},definition_version:{format:"uint64",minimum:1,type:"integer"},expected_revision:{format:"uint64",minimum:1,type:"integer"}},required:["definition_id","definition_version","expected_revision"],title:"WorkflowDefinitionRejectRequest",type:"object"},{$defs:{RunId:_z,WorkCommandId:bc},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{command_id:{$ref:"#/$defs/WorkCommandId"},expected_sequence:{format:"uint64",minimum:0,type:"integer"},run_id:{$ref:"#/$defs/RunId"}},required:["run_id","expected_sequence","command_id"],title:"WorkflowRunResumeRequest",type:"object"},{$defs:{WorkflowDefinitionId:$I},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Wire request for [`WorkflowDefinitionService::retire`].",properties:{definition_id:{$ref:"#/$defs/WorkflowDefinitionId"},definition_version:{format:"uint64",minimum:1,type:"integer"},expected_revision:{format:"uint64",minimum:1,type:"integer"}},required:["definition_id","definition_version","expected_revision"],title:"WorkflowDefinitionRetireRequest",type:"object"},{$defs:{ActorId:mW,AttemptId:m1,AutomaticWorktreeGcV1:m3,BranchCollisionPolicyV1:fd,BranchNameComponentV1:fc,BranchNameSeparatorV1:fl,BranchNamingPolicyV1:fp,BranchTopologyKindV1:f_,BranchTopologyPolicyV1:fv,CanonicalGitRefNameV1:fR,CanonicalGitRefPrefix:fP,CapabilityId:fV,CommitId:fH,ConfigurationRevisionId:f0,ConfigurationSnapshotId:f2,CredentialReferenceId:hq,CrossMergeModeV1:hI,CrossMergePolicyV1:hx,GitHubStackedPullRequestPolicyV1:yP,HistoryRewritePolicyV1:yU,LocatorDigest:gr,ManifestDigest:gl,ProposalId:g5,ProtectedRefDispositionV1:g8,ProtectedRefRuleV1:g7,ProtectedRefSelectorV1:_e,ProviderId:_i,RefId:_u,RepositoryId:_v,RepositoryPlacementScopeV1:_b,RequiredCheckExpectationV1:_$,RequiredCheckV1:_S,ReviewRequirementV1:_T,ReviewTopologyKindV1:_O,ReviewTopologyPolicyV1:_E,RunId:_z,SensitiveFilesystemLocatorV1:_2,TaskId:vC,TopologyConcurrencyPolicyV1:vF,TopologyEscalationPolicyV1:vL,TopologyGatePolicyV1:vU,TopologyNotificationLevelV1:vH,UtcMicros:vK,WorkAcceptanceCriterionV1:vQ,WorkApprovalPolicy:vX,WorkAttemptIdentityV1:v2,WorkCommandId:bc,WorkEffectStateV1:bm,WorkEgressPolicy:bh,WorkExecutableReference:bb,WorkExecutionLimits:bS,WorkExecutionSnapshot:bk,WorkFallbackTopology:bP,WorkFenceEpochV1:bV,WorkFilesystemPolicy:bq,WorkHandoffV1:bT,WorkHierarchyV1:bO,WorkInitiativeV1:bE,WorkItemInputV1:bA,WorkItemV1:bM,WorkLeaseFenceV1:bW,WorkLeaseId:bN,WorkMilestoneV1:bz,WorkPlanV1:bK,WorkProposalV1:b8,WorkProposedChildV1:b7,WorkProviderBackendV1:$t,WorkProviderProtocol:$i,WorkProviderRouteId:$o,WorkProviderRouteV1:$n,WorkRouteDecisionV1:$f,WorkSandboxPolicy:$b,WorkScoreKindV1:$$,WorkShapeAssessmentV1:$S,WorkSizingV1:$k,WorkTopologyPolicyV1:$V,WorkflowDefinitionId:$I,WorkflowExecutionFence:{additionalProperties:!1,properties:{attempt_id:{$ref:"#/$defs/AttemptId"},lease:{$ref:"#/$defs/WorkLeaseFenceV1"}},required:["attempt_id","lease"],type:"object"},WorkflowFailurePolicy:{oneOf:[{properties:{policy:{const:"fail_fast",type:"string"}},required:["policy"],type:"object"},{properties:{policy:{const:"collect",type:"string"}},required:["policy"],type:"object"},{properties:{policy:{const:"require_at_least",type:"string"},successes:{format:"uint32",minimum:1,type:"integer"}},required:["policy","successes"],type:"object"}]},WorkflowFanOutInput:{additionalProperties:!1,properties:{initiative:{$ref:"#/$defs/WorkInitiativeV1"},input_digest:{$ref:"#/$defs/ManifestDigest"},instructions:{type:"string"},item:{$ref:"#/$defs/WorkItemV1"},milestone:{$ref:"#/$defs/WorkMilestoneV1"},plan:{$ref:"#/$defs/WorkPlanV1"},proposal:{$ref:"#/$defs/WorkProposalV1"}},required:["instructions","input_digest","initiative","plan","milestone","item","proposal"],type:"object"},WorkflowFanOutStartV1:{additionalProperties:!1,description:"Caller input required to durably plan the entry fan-out of a workflow run.\nDaemon-owned registration and topology digests are resolved at admission.",properties:{commit:{$ref:"#/$defs/CommitId"},effect_state:{$ref:"#/$defs/WorkEffectStateV1"},execution_snapshot:{$ref:"#/$defs/WorkExecutionSnapshot"},failure_policy:{$ref:"#/$defs/WorkflowFailurePolicy"},fence:{$ref:"#/$defs/WorkflowExecutionFence"},inputs:{items:{$ref:"#/$defs/WorkflowFanOutInput"},type:"array"},max_parallel:{format:"uint32",minimum:1,type:"integer"},reference:{anyOf:[{$ref:"#/$defs/RefId"},{type:"null"}]}},required:["fence","max_parallel","failure_policy","execution_snapshot","commit","effect_state","inputs"],type:"object"},WorkflowProviderRegistration:{additionalProperties:!1,properties:{backend:{$ref:"#/$defs/WorkProviderBackendV1"},model:{type:"string"},priority:{format:"uint32",minimum:0,type:"integer"},route:{$ref:"#/$defs/WorkProviderRouteV1"}},required:["route","backend","model","priority"],type:"object"},WorktreeCleanlinessRequirementV1:$A,WorktreePlacementModeV1:$z,WorktreeRetentionPolicyV1:$D,WorktreeRootPolicyV1:$F},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Starts (admits) a journaled workflow run from an active definition.\n\nThe daemon derives every admission digest itself: the definition's own\npinned policy/configuration/catalog digests are checked against the live\nenvironment, the topology digest comes from the evaluated topology policy,\nand the provider registry digest is computed from this registration. The\ncaller never supplies a digest the runtime must trust.",properties:{command_id:{$ref:"#/$defs/WorkCommandId"},definition_id:{$ref:"#/$defs/WorkflowDefinitionId"},definition_version:{format:"uint64",minimum:1,type:"integer"},fan_out:{anyOf:[{$ref:"#/$defs/WorkflowFanOutStartV1"},{type:"null"}]},provider:{$ref:"#/$defs/WorkflowProviderRegistration"},run_id:{$ref:"#/$defs/RunId"}},required:["run_id","definition_id","definition_version","provider","command_id"],title:"WorkflowRunStartRequest",type:"object"},{$defs:{ManifestDigest:gl,ProjectId:g2,WorkflowDefinition:$q,WorkflowDefinitionId:$I,WorkflowFanOut:$x,WorkflowOperationRef:$j,WorkflowOutputName:$C,WorkflowOutputReference:$T,WorkflowStep:$O,WorkflowStepId:$E},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Wire request for [`WorkflowDefinitionService::validate`].",properties:{definition:{$ref:"#/$defs/WorkflowDefinition"}},required:["definition"],title:"WorkflowDefinitionValidateRequest",type:"object"},{$defs:{ManifestDigest:gl,ProjectId:g2,WorkflowDefinition:$q,WorkflowDefinitionId:$I,WorkflowFanOut:$x,WorkflowOperationRef:$j,WorkflowOutputName:$C,WorkflowOutputReference:$T,WorkflowStep:$O,WorkflowStepId:$E},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{definition:{$ref:"#/$defs/WorkflowDefinition"}},required:["definition"],title:"WorkflowDefinitionValidation",type:"object"}].map(e=>t=>(!function e(t,r,i,o,n){var a;if("boolean"==typeof r){if(!r)throw TypeError(`${o} is rejected by the canonical schema`);return}let s=mR(r,o);if("string"==typeof s.$ref){if(n.has(s.$ref))throw TypeError(`cyclic canonical schema reference: ${s.$ref}`);n.add(s.$ref),e(t,function(e,t){if(!t.startsWith("#/"))throw TypeError(`unsupported canonical schema reference: ${t}`);let r=e;for(let e of t.slice(2).split("/")){let i=e.replaceAll("~1","/").replaceAll("~0","~");r=mR(r,t)[i]}return mR(r,t)}(i,s.$ref),i,o,n),n.delete(s.$ref);return}if("const"in s&&(a=s.const,mw(t)!==mw(a)))throw TypeError(`${o} does not match the canonical constant`);if(Array.isArray(s.enum)&&!s.enum.some(e=>mw(t)===mw(e)))throw TypeError(`${o} is not a canonical enum value`);if(Array.isArray(s.allOf))for(let r of s.allOf)e(t,r,i,o,new Set(n));if(Array.isArray(s.anyOf)&&!s.anyOf.some(r=>{try{return e(t,r,i,o,new Set(n)),!0}catch{return!1}}))throw TypeError(`${o} does not match any canonical variant`);if(Array.isArray(s.oneOf)&&1!==s.oneOf.filter(r=>{try{return e(t,r,i,o,new Set(n)),!0}catch{return!1}}).length)throw TypeError(`${o} must match exactly one canonical variant`);let d=s.type;if("string"==typeof d&&!mP(t,d))throw TypeError(`${o} must be ${d}`);if(Array.isArray(d)&&!d.some(e=>"string"==typeof e&&mP(t,e)))throw TypeError(`${o} has no canonical type`);if("string"==typeof t){if("number"==typeof s.minLength&&t.lengths.maxLength)throw TypeError(`${o} exceeds maxLength`);if("string"==typeof s.pattern&&!RegExp(s.pattern,"u").test(t))throw TypeError(`${o} does not match the canonical pattern`)}if("number"==typeof t){if("integer"===s.type){if("uint32"===s.format&&(t<0||t>0xffffffff))throw TypeError(`${o} is outside uint32`);if("uint64"===s.format&&(t<0||t>Number.MAX_SAFE_INTEGER))throw TypeError(`${o} is outside safely representable uint64`);if("int64"===s.format&&(tNumber.MAX_SAFE_INTEGER))throw TypeError(`${o} is outside safely representable int64`)}if("number"==typeof s.minimum&&ts.maximum)throw TypeError(`${o} exceeds maximum`)}if(Array.isArray(t)){if("number"==typeof s.minItems&&t.lengths.maxItems)throw TypeError(`${o} has too many items`);if(!0===s.uniqueItems){let e=new Set;for(let r of t){let t=mw(r);if(e.has(t))throw TypeError(`${o} contains duplicate items`);e.add(t)}}Array.isArray(s.prefixItems)&&s.prefixItems.forEach((r,n)=>{ne(t,s.items,i,`${o}[${r}]`,new Set))}if("object"==typeof t&&null!==t&&!Array.isArray(t)){let r=void 0===s.properties?{}:mR(s.properties,`${o}.properties`);if(Array.isArray(s.required)){for(let e of s.required)if("string"==typeof e&&!(e in t))throw TypeError(`${o}.${e} is required`)}for(let[n,a]of Object.entries(t))if(n in r)e(a,r[n],i,`${o}.${n}`,new Set);else if(!1===s.additionalProperties)throw TypeError(`${o}.${n} is not allowed`);else"object"==typeof s.additionalProperties&&e(a,s.additionalProperties,i,`${o}.${n}`,new Set)}}(t,e,e,"value",new Set),t));function $U(e){let t=$L[e];if(void 0===t)throw TypeError(`generated canonical schema ${e} is missing`);return t}let $H=[{operation:"active_project",operationId:"operation.application.active_project",transport:{kind:"mcp_tool",toolName:"tracedecay_active_project"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.active_project.v1",requestSchema:{schemaId:"schema.application.primitive.active-project.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.active-project.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(0),decodeResult:$U(1)},{operation:"admin_cli",operationId:"operation.application.admin_cli",transport:{kind:"mcp_tool",toolName:"tracedecay_admin_cli"},effect:"maintains_profile_state",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.admin_cli.v1",requestSchema:{schemaId:"schema.application.primitive.admin-cli.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.admin-cli.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","effect_in_flight"]},deadline:{behavior:"return_operation_receipt",maximum_millis:6e5},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(2),decodeResult:$U(3)},{operation:"admin_project",operationId:"operation.application.admin_project",transport:{kind:"mcp_tool",toolName:"tracedecay_admin_project"},effect:"maintains_owner_state",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.admin_project.v1",requestSchema:{schemaId:"schema.application.primitive.admin-project.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.admin-project.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_operation_receipt",maximum_millis:6e5},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","timed_out","failed","unavailable","partial"],decodeRequest:$U(4),decodeResult:$U(5)},{operation:"admin_sync",operationId:"operation.application.admin_sync",transport:{kind:"mcp_tool",toolName:"tracedecay_admin_sync"},effect:"schedules_work",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.admin_sync.v1",requestSchema:{schemaId:"schema.application.primitive.admin-sync.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.admin-sync.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_operation_receipt",maximum_millis:6e5},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","timed_out","failed","unavailable","partial"],decodeRequest:$U(6),decodeResult:$U(7)},{operation:"affected",operationId:"operation.application.affected",transport:{kind:"mcp_tool",toolName:"tracedecay_affected"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.affected.v1",requestSchema:{schemaId:"schema.application.primitive.affected.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.affected.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(8),decodeResult:$U(9)},{operation:"application_affected_tests",operationId:"operation.application.affected_tests",transport:{kind:"http",route:"/application/tests/affected",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.affected_tests.v1",requestSchema:{schemaId:"schema.application.feedback.affected-tests.request",revision:1},resultSchema:{schemaId:"schema.application.feedback.affected-tests.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:15e3},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(10),decodeResult:$U(11),decodeSuccess:e=>mE(e,"binding.http.affected_tests.v1","schema.application.feedback.affected-tests.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(11))},{operation:"analytics",operationId:"operation.application.analytics",transport:{kind:"mcp_tool",toolName:"tracedecay_analytics"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.analytics.v1",requestSchema:{schemaId:"schema.application.primitive.analytics.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.analytics.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(12),decodeResult:$U(13)},{operation:"apply_native_integration",operationId:"operation.application.apply_native_integration",transport:{kind:"mcp_tool",toolName:"tracedecay_apply_native_integration"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.apply_native_integration.v1",requestSchema:{schemaId:"schema.application.native-integration.apply.request",revision:1},resultSchema:{schemaId:"schema.application.native-integration.apply.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:$U(14),decodeResult:$U(15)},{operation:"approve_native_integration",operationId:"operation.application.approve_native_integration",transport:{kind:"mcp_tool",toolName:"tracedecay_approve_native_integration"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.approve_native_integration.v1",requestSchema:{schemaId:"schema.application.native-integration.approve.request",revision:1},resultSchema:{schemaId:"schema.application.native-integration.approve.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:$U(16),decodeResult:$U(15)},{operation:"ast_grep_rewrite",operationId:"operation.application.ast_grep_rewrite",transport:{kind:"mcp_tool",toolName:"tracedecay_ast_grep_rewrite"},effect:"source_edit",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.ast_grep_rewrite.v1",requestSchema:{schemaId:"schema.application.source-edit.ast-grep-rewrite.request",revision:1},resultSchema:{schemaId:"schema.application.source-edit.ast-grep-rewrite.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:$U(17),decodeResult:$U(18)},{operation:"ast_grep_search",operationId:"operation.application.ast_grep_search",transport:{kind:"mcp_tool",toolName:"tracedecay_ast_grep_search"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.ast_grep_search.v1",requestSchema:{schemaId:"schema.application.primitive.ast-grep-search.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.ast-grep-search.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(19),decodeResult:$U(20)},{operation:"automation_run_artifact_view",operationId:"operation.application.automation_run_artifact_view",transport:{kind:"mcp_tool",toolName:"tracedecay_automation_run_artifact_view"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.automation_run_artifact_view.v1",requestSchema:{schemaId:"schema.application.primitive.automation-run-artifact-view.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.automation-run-artifact-view.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(21),decodeResult:$U(22)},{operation:"automation_run_list",operationId:"operation.application.automation_run_list",transport:{kind:"mcp_tool",toolName:"tracedecay_automation_run_list"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.automation_run_list.v1",requestSchema:{schemaId:"schema.application.primitive.automation-run-list.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.automation-run-list.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(23),decodeResult:$U(24)},{operation:"automation_run_view",operationId:"operation.application.automation_run_view",transport:{kind:"mcp_tool",toolName:"tracedecay_automation_run_view"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.automation_run_view.v1",requestSchema:{schemaId:"schema.application.primitive.automation-run-view.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.automation-run-view.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(25),decodeResult:$U(26)},{operation:"branch_diff",operationId:"operation.application.branch_diff",transport:{kind:"mcp_tool",toolName:"tracedecay_branch_diff"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.branch_diff.v1",requestSchema:{schemaId:"schema.application.primitive.branch-diff.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.branch-diff.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(27),decodeResult:$U(28)},{operation:"branch_list",operationId:"operation.application.branch_list",transport:{kind:"mcp_tool",toolName:"tracedecay_branch_list"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.branch_list.v1",requestSchema:{schemaId:"schema.application.primitive.branch-list.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.branch-list.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(29),decodeResult:$U(30)},{operation:"branch_search",operationId:"operation.application.branch_search",transport:{kind:"mcp_tool",toolName:"tracedecay_branch_search"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.branch_search.v1",requestSchema:{schemaId:"schema.application.primitive.branch-search.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.branch-search.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(31),decodeResult:$U(32)},{operation:"by_qualified_name",operationId:"operation.application.by_qualified_name",transport:{kind:"mcp_tool",toolName:"tracedecay_by_qualified_name"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.by_qualified_name.v1",requestSchema:{schemaId:"schema.application.primitive.by-qualified-name.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.by-qualified-name.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(33),decodeResult:$U(34)},{operation:"application_call_chain",operationId:"operation.application.call_chain",transport:{kind:"http",route:"/application/primitives/call_chain",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.call_chain.v1",requestSchema:{schemaId:"schema.application.primitive.call-chain.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.call-chain.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(35),decodeResult:$U(36),decodeSuccess:e=>mE(e,"binding.http.call_chain.v1","schema.application.primitive.call-chain.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(36))},{operation:"cancel_native_integration",operationId:"operation.application.cancel_native_integration",transport:{kind:"mcp_tool",toolName:"tracedecay_cancel_native_integration"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.cancel_native_integration.v1",requestSchema:{schemaId:"schema.application.native-integration.cancel.request",revision:1},resultSchema:{schemaId:"schema.application.native-integration.cancel.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:$U(37),decodeResult:$U(15)},{operation:"changelog",operationId:"operation.application.changelog",transport:{kind:"mcp_tool",toolName:"tracedecay_changelog"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.changelog.v1",requestSchema:{schemaId:"schema.application.primitive.changelog.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.changelog.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(38),decodeResult:$U(39)},{operation:"circular",operationId:"operation.application.circular",transport:{kind:"mcp_tool",toolName:"tracedecay_circular"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.circular.v1",requestSchema:{schemaId:"schema.application.primitive.circular.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.circular.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(40),decodeResult:$U(41)},{operation:"code_callees",operationId:"operation.application.code_callees",transport:{kind:"http",route:"/application/code/code_callees",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.code_callees.v1",requestSchema:{schemaId:"schema.application.code-query.callees.request",revision:1},resultSchema:{schemaId:"schema.application.code-query.callees.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(42),decodeResult:$U(43),decodeSuccess:e=>mE(e,"binding.http.code_callees.v1","schema.application.code-query.callees.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(43))},{operation:"code_callers",operationId:"operation.application.code_callers",transport:{kind:"http",route:"/application/code/code_callers",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.code_callers.v1",requestSchema:{schemaId:"schema.application.primitive.code-callers.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.code-callers.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(44),decodeResult:$U(45),decodeSuccess:e=>mE(e,"binding.http.code_callers.v1","schema.application.primitive.code-callers.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(45))},{operation:"code_declaration",operationId:"operation.application.code_declaration",transport:{kind:"http",route:"/application/code/code_declaration",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.code_declaration.v1",requestSchema:{schemaId:"schema.application.code-query.declaration.request",revision:1},resultSchema:{schemaId:"schema.application.code-query.declaration.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(46),decodeResult:$U(47),decodeSuccess:e=>mE(e,"binding.http.code_declaration.v1","schema.application.code-query.declaration.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(47))},{operation:"code_exact_occurrence",operationId:"operation.application.code_exact_occurrence",transport:{kind:"http",route:"/application/code/code_exact_occurrence",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.code_exact_occurrence.v1",requestSchema:{schemaId:"schema.application.code-query.exact-occurrence.request",revision:1},resultSchema:{schemaId:"schema.application.code-query.exact-occurrence.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(48),decodeResult:$U(49),decodeSuccess:e=>mE(e,"binding.http.code_exact_occurrence.v1","schema.application.code-query.exact-occurrence.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(49))},{operation:"code_facets",operationId:"operation.application.code_facets",transport:{kind:"http",route:"/application/code/code_facets",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.code_facets.v1",requestSchema:{schemaId:"schema.application.code-query.facets.request",revision:1},resultSchema:{schemaId:"schema.application.code-query.facets.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(50),decodeResult:$U(51),decodeSuccess:e=>mE(e,"binding.http.code_facets.v1","schema.application.code-query.facets.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(51))},{operation:"code_implementations",operationId:"operation.application.code_implementations",transport:{kind:"http",route:"/application/code/code_implementations",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.code_implementations.v1",requestSchema:{schemaId:"schema.application.primitive.code-implementations.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.code-implementations.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(52),decodeResult:$U(53),decodeSuccess:e=>mE(e,"binding.http.code_implementations.v1","schema.application.primitive.code-implementations.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(53))},{operation:"code_phrase_search",operationId:"operation.application.code_phrase_search",transport:{kind:"http",route:"/application/code/code_phrase_search",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.code_phrase_search.v1",requestSchema:{schemaId:"schema.application.code-query.phrase-search.request",revision:1},resultSchema:{schemaId:"schema.application.code-query.phrase-search.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(54),decodeResult:$U(55),decodeSuccess:e=>mE(e,"binding.http.code_phrase_search.v1","schema.application.code-query.phrase-search.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(55))},{operation:"code_references",operationId:"operation.application.code_references",transport:{kind:"http",route:"/application/code/code_references",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.code_references.v1",requestSchema:{schemaId:"schema.application.code-query.references.request",revision:1},resultSchema:{schemaId:"schema.application.code-query.references.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(46),decodeResult:$U(43),decodeSuccess:e=>mE(e,"binding.http.code_references.v1","schema.application.code-query.references.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(43))},{operation:"code_signature_search",operationId:"operation.application.code_signature_search",transport:{kind:"http",route:"/application/code/code_signature_search",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.code_signature_search.v1",requestSchema:{schemaId:"schema.application.primitive.code-signature-search.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.code-signature-search.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(56),decodeResult:$U(57),decodeSuccess:e=>mE(e,"binding.http.code_signature_search.v1","schema.application.primitive.code-signature-search.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(57))},{operation:"code_symbol_search",operationId:"operation.application.code_symbol_search",transport:{kind:"http",route:"/application/code/code_symbol_search",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.code_symbol_search.v1",requestSchema:{schemaId:"schema.application.symbol-search.request",revision:1},resultSchema:{schemaId:"schema.application.symbol-search.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(58),decodeResult:$U(57),decodeSuccess:e=>mE(e,"binding.http.code_symbol_search.v1","schema.application.symbol-search.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(57))},{operation:"code_timeline",operationId:"operation.application.code_timeline",transport:{kind:"http",route:"/application/code/code_timeline",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.code_timeline.v1",requestSchema:{schemaId:"schema.application.code-query.timeline.request",revision:1},resultSchema:{schemaId:"schema.application.code-query.timeline.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(59),decodeResult:$U(60),decodeSuccess:e=>mE(e,"binding.http.code_timeline.v1","schema.application.code-query.timeline.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(60))},{operation:"code_type_definition",operationId:"operation.application.code_type_definition",transport:{kind:"http",route:"/application/code/code_type_definition",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.code_type_definition.v1",requestSchema:{schemaId:"schema.application.code-query.type-definition.request",revision:1},resultSchema:{schemaId:"schema.application.code-query.type-definition.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(46),decodeResult:$U(47),decodeSuccess:e=>mE(e,"binding.http.code_type_definition.v1","schema.application.code-query.type-definition.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(47))},{operation:"code_type_hierarchy",operationId:"operation.application.code_type_hierarchy",transport:{kind:"http",route:"/application/code/code_type_hierarchy",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.code_type_hierarchy.v1",requestSchema:{schemaId:"schema.application.primitive.code-type-hierarchy.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.code-type-hierarchy.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(61),decodeResult:$U(62),decodeSuccess:e=>mE(e,"binding.http.code_type_hierarchy.v1","schema.application.primitive.code-type-hierarchy.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(62))},{operation:"commit_context",operationId:"operation.application.commit_context",transport:{kind:"mcp_tool",toolName:"tracedecay_commit_context"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.commit_context.v1",requestSchema:{schemaId:"schema.application.primitive.commit-context.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.commit-context.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(63),decodeResult:$U(64)},{operation:"complexity",operationId:"operation.application.complexity",transport:{kind:"mcp_tool",toolName:"tracedecay_complexity"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.complexity.v1",requestSchema:{schemaId:"schema.application.primitive.complexity.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.complexity.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(65),decodeResult:$U(66)},{operation:"config",operationId:"operation.application.config",transport:{kind:"mcp_tool",toolName:"tracedecay_config"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.config.v1",requestSchema:{schemaId:"schema.application.primitive.config.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.config.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(67),decodeResult:$U(68)},{operation:"application_configuration_audit",operationId:"operation.application.configuration_audit",transport:{kind:"http",route:"/application/configuration/configuration_audit",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.configuration_audit.v1",requestSchema:{schemaId:"schema.application.configuration.configuration_audit.request",revision:1},resultSchema:{schemaId:"schema.application.configuration.configuration_audit.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:15e3},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:$U(69),decodeResult:$U(70),decodeSuccess:e=>mE(e,"binding.http.configuration_audit.v1","schema.application.configuration.configuration_audit.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(70))},{operation:"application_configuration_batch",operationId:"operation.application.configuration_batch",transport:{kind:"http",route:"/application/configuration/configuration_batch",method:"POST"},effect:"configuration_write",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.configuration_batch.v1",requestSchema:{schemaId:"schema.application.configuration.configuration_batch.request",revision:1},resultSchema:{schemaId:"schema.application.configuration.configuration_batch.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_effect_receipt",maximum_millis:15e3},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","timed_out","failed","effect_unknown","partial"],decodeRequest:$U(71),decodeResult:$U(72),decodeSuccess:e=>mE(e,"binding.http.configuration_batch.v1","schema.application.configuration.configuration_batch.result",1,["completed","timed_out","failed","effect_unknown","partial"],{mode:"not_cancellable"},"durable_effect","required",$U(72))},{operation:"application_configuration_get",operationId:"operation.application.configuration_get",transport:{kind:"http",route:"/application/configuration/configuration_get",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.configuration_get.v1",requestSchema:{schemaId:"schema.application.configuration.configuration_get.request",revision:1},resultSchema:{schemaId:"schema.application.configuration.configuration_get.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:15e3},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:$U(73),decodeResult:$U(74),decodeSuccess:e=>mE(e,"binding.http.configuration_get.v1","schema.application.configuration.configuration_get.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(74))},{operation:"application_configuration_list",operationId:"operation.application.configuration_list",transport:{kind:"http",route:"/application/configuration/configuration_list",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.configuration_list.v1",requestSchema:{schemaId:"schema.application.configuration.configuration_list.request",revision:1},resultSchema:{schemaId:"schema.application.configuration.configuration_list.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:15e3},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:$U(75),decodeResult:$U(76),decodeSuccess:e=>mE(e,"binding.http.configuration_list.v1","schema.application.configuration.configuration_list.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(76))},{operation:"application_configuration_observed_state",operationId:"operation.application.configuration_observed_state",transport:{kind:"http",route:"/application/configuration/configuration_observed_state",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.configuration_observed_state.v1",requestSchema:{schemaId:"schema.application.configuration.configuration_observed_state.request",revision:1},resultSchema:{schemaId:"schema.application.configuration.configuration_observed_state.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:15e3},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:$U(77),decodeResult:$U(78),decodeSuccess:e=>mE(e,"binding.http.configuration_observed_state.v1","schema.application.configuration.configuration_observed_state.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(78))},{operation:"application_configuration_protected_apply",operationId:"operation.application.configuration_protected_apply",transport:{kind:"http",route:"/application/configuration/configuration_protected_apply",method:"POST"},effect:"configuration_write",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.configuration_protected_apply.v1",requestSchema:{schemaId:"schema.application.configuration.configuration_protected_apply.request",revision:1},resultSchema:{schemaId:"schema.application.configuration.configuration_protected_apply.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_effect_receipt",maximum_millis:15e3},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","timed_out","failed","effect_unknown","partial"],decodeRequest:$U(79),decodeResult:$U(72),decodeSuccess:e=>mE(e,"binding.http.configuration_protected_apply.v1","schema.application.configuration.configuration_protected_apply.result",1,["completed","timed_out","failed","effect_unknown","partial"],{mode:"not_cancellable"},"durable_effect","required",$U(72))},{operation:"application_configuration_protected_preview",operationId:"operation.application.configuration_protected_preview",transport:{kind:"http",route:"/application/configuration/configuration_protected_preview",method:"POST"},effect:"preview",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.configuration_protected_preview.v1",requestSchema:{schemaId:"schema.application.configuration.configuration_protected_preview.request",revision:1},resultSchema:{schemaId:"schema.application.configuration.configuration_protected_preview.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:15e3},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:$U(80),decodeResult:$U(81),decodeSuccess:e=>mE(e,"binding.http.configuration_protected_preview.v1","schema.application.configuration.configuration_protected_preview.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(81))},{operation:"application_configuration_rollback_apply",operationId:"operation.application.configuration_rollback_apply",transport:{kind:"http",route:"/application/configuration/configuration_rollback_apply",method:"POST"},effect:"configuration_write",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.configuration_rollback_apply.v1",requestSchema:{schemaId:"schema.application.configuration.configuration_rollback_apply.request",revision:1},resultSchema:{schemaId:"schema.application.configuration.configuration_rollback_apply.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_effect_receipt",maximum_millis:15e3},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","timed_out","failed","effect_unknown","partial"],decodeRequest:$U(79),decodeResult:$U(72),decodeSuccess:e=>mE(e,"binding.http.configuration_rollback_apply.v1","schema.application.configuration.configuration_rollback_apply.result",1,["completed","timed_out","failed","effect_unknown","partial"],{mode:"not_cancellable"},"durable_effect","required",$U(72))},{operation:"application_configuration_rollback_preview",operationId:"operation.application.configuration_rollback_preview",transport:{kind:"http",route:"/application/configuration/configuration_rollback_preview",method:"POST"},effect:"preview",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.configuration_rollback_preview.v1",requestSchema:{schemaId:"schema.application.configuration.configuration_rollback_preview.request",revision:1},resultSchema:{schemaId:"schema.application.configuration.configuration_rollback_preview.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:15e3},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:$U(82),decodeResult:$U(81),decodeSuccess:e=>mE(e,"binding.http.configuration_rollback_preview.v1","schema.application.configuration.configuration_rollback_preview.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(81))},{operation:"application_configuration_set",operationId:"operation.application.configuration_set",transport:{kind:"http",route:"/application/configuration/configuration_set",method:"POST"},effect:"configuration_write",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.configuration_set.v1",requestSchema:{schemaId:"schema.application.configuration.configuration_set.request",revision:1},resultSchema:{schemaId:"schema.application.configuration.configuration_set.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_effect_receipt",maximum_millis:15e3},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","timed_out","failed","effect_unknown","partial"],decodeRequest:$U(83),decodeResult:$U(72),decodeSuccess:e=>mE(e,"binding.http.configuration_set.v1","schema.application.configuration.configuration_set.result",1,["completed","timed_out","failed","effect_unknown","partial"],{mode:"not_cancellable"},"durable_effect","required",$U(72))},{operation:"application_configuration_unset",operationId:"operation.application.configuration_unset",transport:{kind:"http",route:"/application/configuration/configuration_unset",method:"POST"},effect:"configuration_write",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.configuration_unset.v1",requestSchema:{schemaId:"schema.application.configuration.configuration_unset.request",revision:1},resultSchema:{schemaId:"schema.application.configuration.configuration_unset.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_effect_receipt",maximum_millis:15e3},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","timed_out","failed","effect_unknown","partial"],decodeRequest:$U(84),decodeResult:$U(72),decodeSuccess:e=>mE(e,"binding.http.configuration_unset.v1","schema.application.configuration.configuration_unset.result",1,["completed","timed_out","failed","effect_unknown","partial"],{mode:"not_cancellable"},"durable_effect","required",$U(72))},{operation:"constructors",operationId:"operation.application.constructors",transport:{kind:"mcp_tool",toolName:"tracedecay_constructors"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.constructors.v1",requestSchema:{schemaId:"schema.application.primitive.constructors.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.constructors.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(85),decodeResult:$U(86)},{operation:"context",operationId:"operation.application.context",transport:{kind:"mcp_tool",toolName:"tracedecay_context"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.context.v1",requestSchema:{schemaId:"schema.application.primitive.context.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.context.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(87),decodeResult:$U(88)},{operation:"application_context_scout_budget",operationId:"operation.application.context_scout_budget",transport:{kind:"http",route:"/application/context-scout/context_scout_budget",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.context_scout_budget.v1",requestSchema:{schemaId:"schema.application.context-scout-budget.request",revision:1},resultSchema:{schemaId:"schema.application.context-scout-budget.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:15e3},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:$U(89),decodeResult:$U(90),decodeSuccess:e=>mE(e,"binding.http.context_scout_budget.v1","schema.application.context-scout-budget.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(90))},{operation:"application_context_scout_cancel",operationId:"operation.application.context_scout_cancel",transport:{kind:"http",route:"/application/context-scout/context_scout_cancel",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.context_scout_cancel.v1",requestSchema:{schemaId:"schema.application.context-scout-cancel.request",revision:1},resultSchema:{schemaId:"schema.application.context-scout-cancel.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_effect_receipt",maximum_millis:15e3},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","timed_out","failed","effect_unknown","partial"],decodeRequest:$U(91),decodeResult:$U(92),decodeSuccess:e=>mE(e,"binding.http.context_scout_cancel.v1","schema.application.context-scout-cancel.result",1,["completed","timed_out","failed","effect_unknown","partial"],{mode:"not_cancellable"},"durable_effect","required",$U(92))},{operation:"application_context_scout_capability",operationId:"operation.application.context_scout_capability",transport:{kind:"http",route:"/application/context-scout/context_scout_capability",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.context_scout_capability.v1",requestSchema:{schemaId:"schema.application.context-scout-capability.request",revision:1},resultSchema:{schemaId:"schema.application.context-scout-capability.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:15e3},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:$U(89),decodeResult:$U(93),decodeSuccess:e=>mE(e,"binding.http.context_scout_capability.v1","schema.application.context-scout-capability.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(93))},{operation:"application_context_scout_claim",operationId:"operation.application.context_scout_claim",transport:{kind:"http",route:"/application/context-scout/context_scout_claim",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.context_scout_claim.v1",requestSchema:{schemaId:"schema.application.context-scout-claim.request",revision:1},resultSchema:{schemaId:"schema.application.context-scout-claim.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_effect_receipt",maximum_millis:15e3},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","timed_out","failed","effect_unknown","partial"],decodeRequest:$U(94),decodeResult:$U(95),decodeSuccess:e=>mE(e,"binding.http.context_scout_claim.v1","schema.application.context-scout-claim.result",1,["completed","timed_out","failed","effect_unknown","partial"],{mode:"not_cancellable"},"durable_effect","required",$U(95))},{operation:"application_context_scout_delivery",operationId:"operation.application.context_scout_delivery",transport:{kind:"http",route:"/application/context-scout/context_scout_delivery",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.context_scout_delivery.v1",requestSchema:{schemaId:"schema.application.context-scout-delivery.request",revision:1},resultSchema:{schemaId:"schema.application.context-scout-delivery.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_effect_receipt",maximum_millis:15e3},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","timed_out","failed","effect_unknown","partial"],decodeRequest:$U(96),decodeResult:$U(97),decodeSuccess:e=>mE(e,"binding.http.context_scout_delivery.v1","schema.application.context-scout-delivery.result",1,["completed","timed_out","failed","effect_unknown","partial"],{mode:"not_cancellable"},"durable_effect","required",$U(97))},{operation:"application_context_scout_explain",operationId:"operation.application.context_scout_explain",transport:{kind:"http",route:"/application/context-scout/context_scout_explain",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.context_scout_explain.v1",requestSchema:{schemaId:"schema.application.context-scout-explain.request",revision:1},resultSchema:{schemaId:"schema.application.context-scout-explain.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:15e3},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:$U(98),decodeResult:$U(99),decodeSuccess:e=>mE(e,"binding.http.context_scout_explain.v1","schema.application.context-scout-explain.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(99))},{operation:"application_context_scout_feedback",operationId:"operation.application.context_scout_feedback",transport:{kind:"http",route:"/application/context-scout/context_scout_feedback",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.context_scout_feedback.v1",requestSchema:{schemaId:"schema.application.context-scout-feedback.request",revision:1},resultSchema:{schemaId:"schema.application.context-scout-feedback.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_effect_receipt",maximum_millis:15e3},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","timed_out","failed","effect_unknown","partial"],decodeRequest:$U(100),decodeResult:$U(92),decodeSuccess:e=>mE(e,"binding.http.context_scout_feedback.v1","schema.application.context-scout-feedback.result",1,["completed","timed_out","failed","effect_unknown","partial"],{mode:"not_cancellable"},"durable_effect","required",$U(92))},{operation:"application_context_scout_pause",operationId:"operation.application.context_scout_pause",transport:{kind:"http",route:"/application/context-scout/context_scout_pause",method:"POST"},effect:"configuration_write",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.context_scout_pause.v1",requestSchema:{schemaId:"schema.application.context-scout-pause.request",revision:1},resultSchema:{schemaId:"schema.application.context-scout-pause.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_effect_receipt",maximum_millis:15e3},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","timed_out","failed","effect_unknown","partial"],decodeRequest:$U(101),decodeResult:$U(72),decodeSuccess:e=>mE(e,"binding.http.context_scout_pause.v1","schema.application.context-scout-pause.result",1,["completed","timed_out","failed","effect_unknown","partial"],{mode:"not_cancellable"},"durable_effect","required",$U(72))},{operation:"application_context_scout_recent",operationId:"operation.application.context_scout_recent",transport:{kind:"http",route:"/application/context-scout/context_scout_recent",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.context_scout_recent.v1",requestSchema:{schemaId:"schema.application.context-scout-recent.request",revision:1},resultSchema:{schemaId:"schema.application.context-scout-recent.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:15e3},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:$U(98),decodeResult:$U(102),decodeSuccess:e=>mE(e,"binding.http.context_scout_recent.v1","schema.application.context-scout-recent.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(102))},{operation:"application_context_scout_resume",operationId:"operation.application.context_scout_resume",transport:{kind:"http",route:"/application/context-scout/context_scout_resume",method:"POST"},effect:"configuration_write",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.context_scout_resume.v1",requestSchema:{schemaId:"schema.application.context-scout-resume.request",revision:1},resultSchema:{schemaId:"schema.application.context-scout-resume.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_effect_receipt",maximum_millis:15e3},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","timed_out","failed","effect_unknown","partial"],decodeRequest:$U(101),decodeResult:$U(72),decodeSuccess:e=>mE(e,"binding.http.context_scout_resume.v1","schema.application.context-scout-resume.result",1,["completed","timed_out","failed","effect_unknown","partial"],{mode:"not_cancellable"},"durable_effect","required",$U(72))},{operation:"application_context_scout_status",operationId:"operation.application.context_scout_status",transport:{kind:"http",route:"/application/context-scout/context_scout_status",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.context_scout_status.v1",requestSchema:{schemaId:"schema.application.context-scout-status.request",revision:1},resultSchema:{schemaId:"schema.application.context-scout-status.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:15e3},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:$U(89),decodeResult:$U(103),decodeSuccess:e=>mE(e,"binding.http.context_scout_status.v1","schema.application.context-scout-status.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(103))},{operation:"coupling",operationId:"operation.application.coupling",transport:{kind:"mcp_tool",toolName:"tracedecay_coupling"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.coupling.v1",requestSchema:{schemaId:"schema.application.primitive.coupling.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.coupling.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(104),decodeResult:$U(105)},{operation:"dashboard",operationId:"operation.application.dashboard",transport:{kind:"mcp_tool",toolName:"tracedecay_dashboard"},effect:"binds_server",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.dashboard.v1",requestSchema:{schemaId:"schema.application.primitive.dashboard.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.dashboard.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","timed_out","failed","unavailable","partial"],decodeRequest:$U(106),decodeResult:$U(107)},{operation:"dead_code",operationId:"operation.application.dead_code",transport:{kind:"mcp_tool",toolName:"tracedecay_dead_code"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.dead_code.v1",requestSchema:{schemaId:"schema.application.primitive.dead-code.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.dead-code.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(108),decodeResult:$U(109)},{operation:"dependency_depth",operationId:"operation.application.dependency_depth",transport:{kind:"mcp_tool",toolName:"tracedecay_dependency_depth"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.dependency_depth.v1",requestSchema:{schemaId:"schema.application.primitive.dependency-depth.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.dependency-depth.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(110),decodeResult:$U(111)},{operation:"derives",operationId:"operation.application.derives",transport:{kind:"mcp_tool",toolName:"tracedecay_derives"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.derives.v1",requestSchema:{schemaId:"schema.application.primitive.derives.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.derives.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(112),decodeResult:$U(113)},{operation:"diagnose",operationId:"operation.application.diagnose",transport:{kind:"mcp_tool",toolName:"tracedecay_diagnose"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.diagnose.v1",requestSchema:{schemaId:"schema.application.primitive.diagnose.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.diagnose.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(114),decodeResult:$U(115)},{operation:"application_diagnostics_read",operationId:"operation.application.diagnostics_read",transport:{kind:"http",route:"/application/primitives/diagnostics_read",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.diagnostics_read.v1",requestSchema:{schemaId:"schema.application.primitive.diagnostics-read.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.diagnostics-read.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(116),decodeResult:$U(117),decodeSuccess:e=>mE(e,"binding.http.diagnostics_read.v1","schema.application.primitive.diagnostics-read.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(117))},{operation:"diff_context",operationId:"operation.application.diff_context",transport:{kind:"mcp_tool",toolName:"tracedecay_diff_context"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.diff_context.v1",requestSchema:{schemaId:"schema.application.primitive.diff-context.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.diff-context.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(118),decodeResult:$U(119)},{operation:"distribution",operationId:"operation.application.distribution",transport:{kind:"mcp_tool",toolName:"tracedecay_distribution"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.distribution.v1",requestSchema:{schemaId:"schema.application.primitive.distribution.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.distribution.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(120),decodeResult:$U(121)},{operation:"doc_coverage",operationId:"operation.application.doc_coverage",transport:{kind:"mcp_tool",toolName:"tracedecay_doc_coverage"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.doc_coverage.v1",requestSchema:{schemaId:"schema.application.primitive.doc-coverage.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.doc-coverage.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(122),decodeResult:$U(123)},{operation:"dsm",operationId:"operation.application.dsm",transport:{kind:"mcp_tool",toolName:"tracedecay_dsm"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.dsm.v1",requestSchema:{schemaId:"schema.application.primitive.dsm.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.dsm.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(124),decodeResult:$U(125)},{operation:"application_fact_feedback",operationId:"operation.application.fact_feedback",transport:{kind:"http",route:"/application/retained/fact_feedback",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.fact_feedback.v1",requestSchema:{schemaId:"schema.application.retained.fact-feedback.request",revision:1},resultSchema:{schemaId:"schema.application.retained.fact-feedback.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","reconciling","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","unavailable","effect_unknown","partial"],decodeRequest:$U(126),decodeResult:$U(127),decodeSuccess:e=>mE(e,"binding.http.fact_feedback.v1","schema.application.retained.fact-feedback.result",1,["completed","cancelled","timed_out","failed","unavailable","effect_unknown","partial"],{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","reconciling","after_commit"]},"durable_effect","required",$U(127))},{operation:"application_fact_store_add",operationId:"operation.application.fact_store_add",transport:{kind:"http",route:"/application/retained/fact_store_add",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.fact_store_add.v1",requestSchema:{schemaId:"schema.application.retained.fact-store-add.request",revision:1},resultSchema:{schemaId:"schema.application.retained.fact-store-add.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","reconciling","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","unavailable","effect_unknown","partial"],decodeRequest:$U(128),decodeResult:$U(129),decodeSuccess:e=>mE(e,"binding.http.fact_store_add.v1","schema.application.retained.fact-store-add.result",1,["completed","cancelled","timed_out","failed","unavailable","effect_unknown","partial"],{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","reconciling","after_commit"]},"durable_effect","required",$U(129))},{operation:"application_fact_store_contradict",operationId:"operation.application.fact_store_contradict",transport:{kind:"http",route:"/application/retained/fact_store_contradict",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.fact_store_contradict.v1",requestSchema:{schemaId:"schema.application.retained.fact-store-contradict.request",revision:1},resultSchema:{schemaId:"schema.application.retained.fact-store-contradict.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(130),decodeResult:$U(131),decodeSuccess:e=>mE(e,"binding.http.fact_store_contradict.v1","schema.application.retained.fact-store-contradict.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(131))},{operation:"application_fact_store_curate",operationId:"operation.application.fact_store_curate",transport:{kind:"http",route:"/application/retained/fact_store_curate",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"required",resultSemantics:"fact_store_curate_receipt",bindingId:"binding.http.fact_store_curate.v1",requestSchema:{schemaId:"schema.application.retained.fact-store-curate.request",revision:1},resultSchema:{schemaId:"schema.application.retained.fact-store-curate.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","reconciling","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:9e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","unavailable","effect_unknown","partial"],decodeRequest:$U(132),decodeResult:$U(133),decodeSuccess:e=>mE(e,"binding.http.fact_store_curate.v1","schema.application.retained.fact-store-curate.result",1,["completed","cancelled","timed_out","failed","unavailable","effect_unknown","partial"],{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","reconciling","after_commit"]},"durable_effect","required",$U(133))},{operation:"application_fact_store_get",operationId:"operation.application.fact_store_get",transport:{kind:"http",route:"/application/retained/fact_store_get",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.fact_store_get.v1",requestSchema:{schemaId:"schema.application.retained.fact-store-get.request",revision:1},resultSchema:{schemaId:"schema.application.retained.fact-store-get.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(134),decodeResult:$U(135),decodeSuccess:e=>mE(e,"binding.http.fact_store_get.v1","schema.application.retained.fact-store-get.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(135))},{operation:"application_fact_store_list",operationId:"operation.application.fact_store_list",transport:{kind:"http",route:"/application/retained/fact_store_list",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.fact_store_list.v1",requestSchema:{schemaId:"schema.application.retained.fact-store-list.request",revision:1},resultSchema:{schemaId:"schema.application.retained.fact-store-list.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(136),decodeResult:$U(137),decodeSuccess:e=>mE(e,"binding.http.fact_store_list.v1","schema.application.retained.fact-store-list.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(137))},{operation:"application_fact_store_probe",operationId:"operation.application.fact_store_probe",transport:{kind:"http",route:"/application/retained/fact_store_probe",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.fact_store_probe.v1",requestSchema:{schemaId:"schema.application.retained.fact-store-probe.request",revision:1},resultSchema:{schemaId:"schema.application.retained.fact-store-probe.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(138),decodeResult:$U(139),decodeSuccess:e=>mE(e,"binding.http.fact_store_probe.v1","schema.application.retained.fact-store-probe.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(139))},{operation:"application_fact_store_reason",operationId:"operation.application.fact_store_reason",transport:{kind:"http",route:"/application/retained/fact_store_reason",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.fact_store_reason.v1",requestSchema:{schemaId:"schema.application.retained.fact-store-reason.request",revision:1},resultSchema:{schemaId:"schema.application.retained.fact-store-reason.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(140),decodeResult:$U(141),decodeSuccess:e=>mE(e,"binding.http.fact_store_reason.v1","schema.application.retained.fact-store-reason.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(141))},{operation:"application_fact_store_related",operationId:"operation.application.fact_store_related",transport:{kind:"http",route:"/application/retained/fact_store_related",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.fact_store_related.v1",requestSchema:{schemaId:"schema.application.retained.fact-store-related.request",revision:1},resultSchema:{schemaId:"schema.application.retained.fact-store-related.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(142),decodeResult:$U(143),decodeSuccess:e=>mE(e,"binding.http.fact_store_related.v1","schema.application.retained.fact-store-related.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(143))},{operation:"application_fact_store_remove",operationId:"operation.application.fact_store_remove",transport:{kind:"http",route:"/application/retained/fact_store_remove",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.fact_store_remove.v1",requestSchema:{schemaId:"schema.application.retained.fact-store-remove.request",revision:1},resultSchema:{schemaId:"schema.application.retained.fact-store-remove.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","reconciling","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","unavailable","effect_unknown","partial"],decodeRequest:$U(144),decodeResult:$U(145),decodeSuccess:e=>mE(e,"binding.http.fact_store_remove.v1","schema.application.retained.fact-store-remove.result",1,["completed","cancelled","timed_out","failed","unavailable","effect_unknown","partial"],{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","reconciling","after_commit"]},"durable_effect","required",$U(145))},{operation:"application_fact_store_search",operationId:"operation.application.fact_store_search",transport:{kind:"http",route:"/application/retained/fact_store_search",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.fact_store_search.v1",requestSchema:{schemaId:"schema.application.retained.fact-store-search.request",revision:1},resultSchema:{schemaId:"schema.application.retained.fact-store-search.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(146),decodeResult:$U(147),decodeSuccess:e=>mE(e,"binding.http.fact_store_search.v1","schema.application.retained.fact-store-search.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(147))},{operation:"application_fact_store_supersede",operationId:"operation.application.fact_store_supersede",transport:{kind:"http",route:"/application/retained/fact_store_supersede",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.fact_store_supersede.v1",requestSchema:{schemaId:"schema.application.retained.fact-store-supersede.request",revision:1},resultSchema:{schemaId:"schema.application.retained.fact-store-supersede.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","reconciling","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","unavailable","effect_unknown","partial"],decodeRequest:$U(148),decodeResult:$U(149),decodeSuccess:e=>mE(e,"binding.http.fact_store_supersede.v1","schema.application.retained.fact-store-supersede.result",1,["completed","cancelled","timed_out","failed","unavailable","effect_unknown","partial"],{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","reconciling","after_commit"]},"durable_effect","required",$U(149))},{operation:"application_fact_store_update",operationId:"operation.application.fact_store_update",transport:{kind:"http",route:"/application/retained/fact_store_update",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.fact_store_update.v1",requestSchema:{schemaId:"schema.application.retained.fact-store-update.request",revision:1},resultSchema:{schemaId:"schema.application.retained.fact-store-update.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","reconciling","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","unavailable","effect_unknown","partial"],decodeRequest:$U(150),decodeResult:$U(151),decodeSuccess:e=>mE(e,"binding.http.fact_store_update.v1","schema.application.retained.fact-store-update.result",1,["completed","cancelled","timed_out","failed","unavailable","effect_unknown","partial"],{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","reconciling","after_commit"]},"durable_effect","required",$U(151))},{operation:"application_feedback_advisory_cycle",operationId:"operation.application.feedback_advisory_cycle",transport:{kind:"http",route:"/application/feedback/advisory_cycle",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.feedback_advisory_cycle.v1",requestSchema:{schemaId:"schema.application.feedback.advisory-cycle.request",revision:1},resultSchema:{schemaId:"schema.application.feedback.advisory-cycle.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:15e3},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(152),decodeResult:$U(153),decodeSuccess:e=>mE(e,"binding.http.feedback_advisory_cycle.v1","schema.application.feedback.advisory-cycle.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(153))},{operation:"application_feedback_diagnostics",operationId:"operation.application.feedback_diagnostics",transport:{kind:"http",route:"/application/feedback/diagnostics",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.feedback_diagnostics.v1",requestSchema:{schemaId:"schema.application.feedback.diagnostics.request",revision:1},resultSchema:{schemaId:"schema.application.feedback.diagnostics.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:15e3},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(10),decodeResult:$U(154),decodeSuccess:e=>mE(e,"binding.http.feedback_diagnostics.v1","schema.application.feedback.diagnostics.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(154))},{operation:"application_feedback_expand",operationId:"operation.application.feedback_expand",transport:{kind:"http",route:"/application/feedback/expand",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.feedback_expand.v1",requestSchema:{schemaId:"schema.application.feedback.expand.request",revision:1},resultSchema:{schemaId:"schema.application.feedback.expand.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:15e3},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(10),decodeResult:$U(155),decodeSuccess:e=>mE(e,"binding.http.feedback_expand.v1","schema.application.feedback.expand.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(155))},{operation:"application_feedback_get",operationId:"operation.application.feedback_get",transport:{kind:"http",route:"/application/feedback/get",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.feedback_get.v1",requestSchema:{schemaId:"schema.application.feedback.get.request",revision:1},resultSchema:{schemaId:"schema.application.feedback.get.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:15e3},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(10),decodeResult:$U(156),decodeSuccess:e=>mE(e,"binding.http.feedback_get.v1","schema.application.feedback.get.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(156))},{operation:"application_feedback_impact",operationId:"operation.application.feedback_impact",transport:{kind:"http",route:"/application/feedback/impact",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.feedback_impact.v1",requestSchema:{schemaId:"schema.application.feedback.impact.request",revision:1},resultSchema:{schemaId:"schema.application.feedback.impact.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:15e3},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(10),decodeResult:$U(157),decodeSuccess:e=>mE(e,"binding.http.feedback_impact.v1","schema.application.feedback.impact.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(157))},{operation:"application_feedback_list",operationId:"operation.application.feedback_list",transport:{kind:"http",route:"/application/feedback/list",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.feedback_list.v1",requestSchema:{schemaId:"schema.application.feedback.list.request",revision:1},resultSchema:{schemaId:"schema.application.feedback.list.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:15e3},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(10),decodeResult:$U(158),decodeSuccess:e=>mE(e,"binding.http.feedback_list.v1","schema.application.feedback.list.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(158))},{operation:"application_feedback_proximity",operationId:"operation.application.feedback_proximity",transport:{kind:"http",route:"/application/feedback/proximity",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.feedback_proximity.v1",requestSchema:{schemaId:"schema.application.feedback.proximity.request",revision:1},resultSchema:{schemaId:"schema.application.feedback.proximity.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:15e3},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(159),decodeResult:$U(160),decodeSuccess:e=>mE(e,"binding.http.feedback_proximity.v1","schema.application.feedback.proximity.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(160))},{operation:"field_sites",operationId:"operation.application.field_sites",transport:{kind:"mcp_tool",toolName:"tracedecay_field_sites"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.field_sites.v1",requestSchema:{schemaId:"schema.application.primitive.field-sites.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.field-sites.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(161),decodeResult:$U(162)},{operation:"application_file_dependents",operationId:"operation.application.file_dependents",transport:{kind:"http",route:"/application/primitives/file_dependents",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.file_dependents.v1",requestSchema:{schemaId:"schema.application.primitive.file-dependents.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.file-dependents.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(163),decodeResult:$U(164),decodeSuccess:e=>mE(e,"binding.http.file_dependents.v1","schema.application.primitive.file-dependents.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(164))},{operation:"files",operationId:"operation.application.files",transport:{kind:"mcp_tool",toolName:"tracedecay_files"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.files.v1",requestSchema:{schemaId:"schema.application.primitive.files.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.files.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(165),decodeResult:$U(166)},{operation:"find_exact_symbol",operationId:"operation.application.find_exact_symbol",transport:{kind:"mcp_tool",toolName:"tracedecay_find_exact_symbol"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.find_exact_symbol.v1",requestSchema:{schemaId:"schema.application.primitive.find-exact-symbol.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.find-exact-symbol.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(167),decodeResult:$U(168)},{operation:"gini",operationId:"operation.application.gini",transport:{kind:"mcp_tool",toolName:"tracedecay_gini"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.gini.v1",requestSchema:{schemaId:"schema.application.primitive.gini.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.gini.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(169),decodeResult:$U(170)},{operation:"git_apply",operationId:"operation.application.git_apply",transport:{kind:"mcp_tool",toolName:"tracedecay_git_apply"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.git_apply.v1",requestSchema:{schemaId:"schema.application.git.apply.request",revision:1},resultSchema:{schemaId:"schema.application.git.apply.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:$U(171),decodeResult:$U(172)},{operation:"application_git_blame",operationId:"operation.application.git_blame",transport:{kind:"http",route:"/application/git/blame",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.git_blame.v1",requestSchema:{schemaId:"schema.application.git.blame.request",revision:1},resultSchema:{schemaId:"schema.application.git.blame.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:$U(173),decodeResult:$U(174),decodeSuccess:e=>mE(e,"binding.http.git_blame.v1","schema.application.git.blame.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(174))},{operation:"application_git_diff",operationId:"operation.application.git_diff",transport:{kind:"http",route:"/application/git/diff",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.git_diff.v1",requestSchema:{schemaId:"schema.application.git.diff.request",revision:1},resultSchema:{schemaId:"schema.application.git.diff.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:$U(175),decodeResult:$U(174),decodeSuccess:e=>mE(e,"binding.http.git_diff.v1","schema.application.git.diff.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(174))},{operation:"application_git_history",operationId:"operation.application.git_history",transport:{kind:"http",route:"/application/git/history",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.git_history.v1",requestSchema:{schemaId:"schema.application.git.history.request",revision:1},resultSchema:{schemaId:"schema.application.git.history.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:$U(176),decodeResult:$U(174),decodeSuccess:e=>mE(e,"binding.http.git_history.v1","schema.application.git.history.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(174))},{operation:"application_git_hunks",operationId:"operation.application.git_hunks",transport:{kind:"http",route:"/application/git/hunks",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.git_hunks.v1",requestSchema:{schemaId:"schema.application.git.hunks.request",revision:1},resultSchema:{schemaId:"schema.application.git.hunks.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:$U(177),decodeResult:$U(174),decodeSuccess:e=>mE(e,"binding.http.git_hunks.v1","schema.application.git.hunks.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(174))},{operation:"git_preview",operationId:"operation.application.git_preview",transport:{kind:"mcp_tool",toolName:"tracedecay_git_preview"},effect:"preview",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.git_preview.v1",requestSchema:{schemaId:"schema.application.git.preview.request",revision:1},resultSchema:{schemaId:"schema.application.git.preview.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:$U(178),decodeResult:$U(179)},{operation:"application_git_status",operationId:"operation.application.git_status",transport:{kind:"http",route:"/application/git/status",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.git_status.v1",requestSchema:{schemaId:"schema.application.git.status.request",revision:1},resultSchema:{schemaId:"schema.application.git.status.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:$U(180),decodeResult:$U(174),decodeSuccess:e=>mE(e,"binding.http.git_status.v1","schema.application.git.status.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(174))},{operation:"application_github_stack_signal_expand",operationId:"operation.application.github_stack_signal_expand",transport:{kind:"http",route:"/application/github-stack/signal-expand",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.github_stack_signal_expand.v1",requestSchema:{schemaId:"schema.application.github-stack.signal-expand.request",revision:1},resultSchema:{schemaId:"schema.application.github-stack.signal-expand.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:$U(181),decodeResult:$U(182),decodeSuccess:e=>mE(e,"binding.http.github_stack_signal_expand.v1","schema.application.github-stack.signal-expand.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(182))},{operation:"god_class",operationId:"operation.application.god_class",transport:{kind:"mcp_tool",toolName:"tracedecay_god_class"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.god_class.v1",requestSchema:{schemaId:"schema.application.primitive.god-class.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.god-class.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(183),decodeResult:$U(184)},{operation:"grep",operationId:"operation.application.grep",transport:{kind:"mcp_tool",toolName:"tracedecay_grep"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.grep.v1",requestSchema:{schemaId:"schema.application.primitive.grep.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.grep.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(185),decodeResult:$U(186)},{operation:"health",operationId:"operation.application.health",transport:{kind:"mcp_tool",toolName:"tracedecay_health"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.health.v1",requestSchema:{schemaId:"schema.application.primitive.health.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.health.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(187),decodeResult:$U(188)},{operation:"application_health_delta",operationId:"operation.application.health_delta",transport:{kind:"http",route:"/application/primitives/health_delta",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.health_delta.v1",requestSchema:{schemaId:"schema.application.primitive.health-delta.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.health-delta.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(189),decodeResult:$U(190),decodeSuccess:e=>mE(e,"binding.http.health_delta.v1","schema.application.primitive.health-delta.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(190))},{operation:"application_health_read",operationId:"operation.application.health_read",transport:{kind:"http",route:"/application/primitives/health_read",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.health_read.v1",requestSchema:{schemaId:"schema.application.primitive.health-read.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.health-read.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(191),decodeResult:$U(192),decodeSuccess:e=>mE(e,"binding.http.health_read.v1","schema.application.primitive.health-read.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(192))},{operation:"hermes_skill_bridge",operationId:"operation.application.hermes_skill_bridge",transport:{kind:"mcp_tool",toolName:"tracedecay_hermes_skill_bridge"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.hermes_skill_bridge.v1",requestSchema:{schemaId:"schema.application.primitive.hermes-skill-bridge.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.hermes-skill-bridge.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(193),decodeResult:$U(194)},{operation:"hook_runtime",operationId:"operation.application.hook_runtime",transport:{kind:"mcp_tool",toolName:"tracedecay_hook_runtime"},effect:"records_host_evidence",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.hook_runtime.v1",requestSchema:{schemaId:"schema.application.primitive.hook-runtime.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.hook-runtime.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","timed_out","failed","unavailable","partial"],decodeRequest:$U(195),decodeResult:$U(196)},{operation:"hotspots",operationId:"operation.application.hotspots",transport:{kind:"mcp_tool",toolName:"tracedecay_hotspots"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.hotspots.v1",requestSchema:{schemaId:"schema.application.primitive.hotspots.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.hotspots.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(197),decodeResult:$U(198)},{operation:"impact",operationId:"operation.application.impact",transport:{kind:"mcp_tool",toolName:"tracedecay_impact"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.impact.v1",requestSchema:{schemaId:"schema.application.primitive.impact.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.impact.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(199),decodeResult:$U(200)},{operation:"inheritance_depth",operationId:"operation.application.inheritance_depth",transport:{kind:"mcp_tool",toolName:"tracedecay_inheritance_depth"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.inheritance_depth.v1",requestSchema:{schemaId:"schema.application.primitive.inheritance-depth.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.inheritance-depth.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(201),decodeResult:$U(202)},{operation:"insert_at",operationId:"operation.application.insert_at",transport:{kind:"mcp_tool",toolName:"tracedecay_insert_at"},effect:"source_edit",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.insert_at.v1",requestSchema:{schemaId:"schema.application.source-edit.insert-at.request",revision:1},resultSchema:{schemaId:"schema.application.source-edit.insert-at.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:$U(203),decodeResult:$U(18)},{operation:"insert_at_symbol",operationId:"operation.application.insert_at_symbol",transport:{kind:"mcp_tool",toolName:"tracedecay_insert_at_symbol"},effect:"source_edit",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.insert_at_symbol.v1",requestSchema:{schemaId:"schema.application.source-edit.insert-at-symbol.request",revision:1},resultSchema:{schemaId:"schema.application.source-edit.insert-at-symbol.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:$U(204),decodeResult:$U(18)},{operation:"largest",operationId:"operation.application.largest",transport:{kind:"mcp_tool",toolName:"tracedecay_largest"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.largest.v1",requestSchema:{schemaId:"schema.application.primitive.largest.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.largest.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(205),decodeResult:$U(206)},{operation:"application_lcm_describe",operationId:"operation.application.lcm_describe",transport:{kind:"http",route:"/application/retained/lcm_describe",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.lcm_describe.v1",requestSchema:{schemaId:"schema.application.retained.lcm-describe.request",revision:1},resultSchema:{schemaId:"schema.application.retained.lcm-describe.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(207),decodeResult:$U(208),decodeSuccess:e=>mE(e,"binding.http.lcm_describe.v1","schema.application.retained.lcm-describe.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(208))},{operation:"application_lcm_doctor",operationId:"operation.application.lcm_doctor",transport:{kind:"http",route:"/application/retained/lcm_doctor",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.lcm_doctor.v1",requestSchema:{schemaId:"schema.application.retained.lcm-doctor.request",revision:1},resultSchema:{schemaId:"schema.application.retained.lcm-doctor.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(209),decodeResult:$U(210),decodeSuccess:e=>mE(e,"binding.http.lcm_doctor.v1","schema.application.retained.lcm-doctor.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(210))},{operation:"application_lcm_expand",operationId:"operation.application.lcm_expand",transport:{kind:"http",route:"/application/retained/lcm_expand",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.lcm_expand.v1",requestSchema:{schemaId:"schema.application.retained.lcm-expand.request",revision:1},resultSchema:{schemaId:"schema.application.retained.lcm-expand.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(211),decodeResult:$U(212),decodeSuccess:e=>mE(e,"binding.http.lcm_expand.v1","schema.application.retained.lcm-expand.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(212))},{operation:"application_lcm_expand_query",operationId:"operation.application.lcm_expand_query",transport:{kind:"http",route:"/application/retained/lcm_expand_query",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.lcm_expand_query.v1",requestSchema:{schemaId:"schema.application.retained.lcm-expand-query.request",revision:1},resultSchema:{schemaId:"schema.application.retained.lcm-expand-query.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(213),decodeResult:$U(214),decodeSuccess:e=>mE(e,"binding.http.lcm_expand_query.v1","schema.application.retained.lcm-expand-query.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(214))},{operation:"application_lcm_grep",operationId:"operation.application.lcm_grep",transport:{kind:"http",route:"/application/retained/lcm_grep",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.lcm_grep.v1",requestSchema:{schemaId:"schema.application.retained.lcm-grep.request",revision:1},resultSchema:{schemaId:"schema.application.retained.lcm-grep.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(215),decodeResult:$U(216),decodeSuccess:e=>mE(e,"binding.http.lcm_grep.v1","schema.application.retained.lcm-grep.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(216))},{operation:"application_lcm_load_session",operationId:"operation.application.lcm_load_session",transport:{kind:"http",route:"/application/retained/lcm_load_session",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.lcm_load_session.v1",requestSchema:{schemaId:"schema.application.retained.lcm-load-session.request",revision:1},resultSchema:{schemaId:"schema.application.retained.lcm-load-session.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(217),decodeResult:$U(218),decodeSuccess:e=>mE(e,"binding.http.lcm_load_session.v1","schema.application.retained.lcm-load-session.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(218))},{operation:"application_lcm_status",operationId:"operation.application.lcm_status",transport:{kind:"http",route:"/application/retained/lcm_status",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.lcm_status.v1",requestSchema:{schemaId:"schema.application.retained.lcm-status.request",revision:1},resultSchema:{schemaId:"schema.application.retained.lcm-status.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(219),decodeResult:$U(220),decodeSuccess:e=>mE(e,"binding.http.lcm_status.v1","schema.application.retained.lcm-status.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(220))},{operation:"application_memory_status",operationId:"operation.application.memory_status",transport:{kind:"http",route:"/application/retained/memory_status",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.memory_status.v1",requestSchema:{schemaId:"schema.application.retained.memory-status.request",revision:1},resultSchema:{schemaId:"schema.application.retained.memory-status.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(221),decodeResult:$U(222),decodeSuccess:e=>mE(e,"binding.http.memory_status.v1","schema.application.retained.memory-status.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(222))},{operation:"application_message_search",operationId:"operation.application.message_search",transport:{kind:"http",route:"/application/retained/message_search",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.message_search.v1",requestSchema:{schemaId:"schema.application.retained.message-search.request",revision:1},resultSchema:{schemaId:"schema.application.retained.message-search.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(223),decodeResult:$U(224),decodeSuccess:e=>mE(e,"binding.http.message_search.v1","schema.application.retained.message-search.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(224))},{operation:"application_module_api",operationId:"operation.application.module_api",transport:{kind:"http",route:"/application/primitives/module_api",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.module_api.v1",requestSchema:{schemaId:"schema.application.primitive.module-api.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.module-api.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(225),decodeResult:$U(226),decodeSuccess:e=>mE(e,"binding.http.module_api.v1","schema.application.primitive.module-api.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(226))},{operation:"move_symbol",operationId:"operation.application.move_symbol",transport:{kind:"mcp_tool",toolName:"tracedecay_move_symbol"},effect:"source_edit",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.move_symbol.v1",requestSchema:{schemaId:"schema.application.source-edit.move-symbol.request",revision:1},resultSchema:{schemaId:"schema.application.source-edit.move-symbol.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:$U(227),decodeResult:$U(18)},{operation:"multi_str_replace",operationId:"operation.application.multi_str_replace",transport:{kind:"mcp_tool",toolName:"tracedecay_multi_str_replace"},effect:"source_edit",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.multi_str_replace.v1",requestSchema:{schemaId:"schema.application.source-edit.multi-str-replace.request",revision:1},resultSchema:{schemaId:"schema.application.source-edit.multi-str-replace.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:$U(228),decodeResult:$U(18)},{operation:"native_integration_status",operationId:"operation.application.native_integration_status",transport:{kind:"mcp_tool",toolName:"tracedecay_native_integration_status"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.native_integration_status.v1",requestSchema:{schemaId:"schema.application.native-integration.status.request",revision:1},resultSchema:{schemaId:"schema.application.native-integration.status.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:$U(229),decodeResult:$U(15)},{operation:"node",operationId:"operation.application.node",transport:{kind:"mcp_tool",toolName:"tracedecay_node"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.node.v1",requestSchema:{schemaId:"schema.application.primitive.node.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.node.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(230),decodeResult:$U(231)},{operation:"observatory_read",operationId:"operation.application.observatory_read",transport:{kind:"mcp_tool",toolName:"tracedecay_observatory_read"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.observatory_read.v1",requestSchema:{schemaId:"schema.application.observatory-read.request",revision:1},resultSchema:{schemaId:"schema.application.observatory-read.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:15e3},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(232),decodeResult:$U(233)},{operation:"port_order",operationId:"operation.application.port_order",transport:{kind:"mcp_tool",toolName:"tracedecay_port_order"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.port_order.v1",requestSchema:{schemaId:"schema.application.primitive.port-order.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.port-order.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(234),decodeResult:$U(235)},{operation:"port_status",operationId:"operation.application.port_status",transport:{kind:"mcp_tool",toolName:"tracedecay_port_status"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.port_status.v1",requestSchema:{schemaId:"schema.application.primitive.port-status.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.port-status.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(236),decodeResult:$U(237)},{operation:"pr_context",operationId:"operation.application.pr_context",transport:{kind:"mcp_tool",toolName:"tracedecay_pr_context"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.pr_context.v1",requestSchema:{schemaId:"schema.application.primitive.pr-context.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.pr-context.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(238),decodeResult:$U(239)},{operation:"preflight_native_integration",operationId:"operation.application.preflight_native_integration",transport:{kind:"mcp_tool",toolName:"tracedecay_preflight_native_integration"},effect:"preview",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.preflight_native_integration.v1",requestSchema:{schemaId:"schema.application.native-integration.preflight.request",revision:1},resultSchema:{schemaId:"schema.application.native-integration.preflight.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:$U(240),decodeResult:$U(15)},{operation:"project_context",operationId:"operation.application.project_context",transport:{kind:"mcp_tool",toolName:"tracedecay_project_context"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.project_context.v1",requestSchema:{schemaId:"schema.application.primitive.project-context.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.project-context.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(241),decodeResult:$U(242)},{operation:"project_list",operationId:"operation.application.project_list",transport:{kind:"mcp_tool",toolName:"tracedecay_project_list"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.project_list.v1",requestSchema:{schemaId:"schema.application.primitive.project-list.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.project-list.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(243),decodeResult:$U(244)},{operation:"project_search",operationId:"operation.application.project_search",transport:{kind:"mcp_tool",toolName:"tracedecay_project_search"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.project_search.v1",requestSchema:{schemaId:"schema.application.primitive.project-search.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.project-search.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(245),decodeResult:$U(244)},{operation:"application_qualified_name",operationId:"operation.application.qualified_name",transport:{kind:"http",route:"/application/primitives/qualified_name",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.qualified_name.v1",requestSchema:{schemaId:"schema.application.primitive.qualified-name.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.qualified-name.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(246),decodeResult:$U(247),decodeSuccess:e=>mE(e,"binding.http.qualified_name.v1","schema.application.primitive.qualified-name.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(247))},{operation:"rank",operationId:"operation.application.rank",transport:{kind:"mcp_tool",toolName:"tracedecay_rank"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.rank.v1",requestSchema:{schemaId:"schema.application.primitive.rank.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.rank.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(248),decodeResult:$U(249)},{operation:"recursion",operationId:"operation.application.recursion",transport:{kind:"mcp_tool",toolName:"tracedecay_recursion"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.recursion.v1",requestSchema:{schemaId:"schema.application.primitive.recursion.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.recursion.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(250),decodeResult:$U(251)},{operation:"redundancy",operationId:"operation.application.redundancy",transport:{kind:"mcp_tool",toolName:"tracedecay_redundancy"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.redundancy.v1",requestSchema:{schemaId:"schema.application.primitive.redundancy.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.redundancy.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(252),decodeResult:$U(253)},{operation:"remote_status",operationId:"operation.application.remote_status",transport:{kind:"mcp_tool",toolName:"tracedecay_remote_status"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.remote_status.v1",requestSchema:{schemaId:"schema.application.primitive.remote-status.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.remote-status.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(254),decodeResult:$U(255)},{operation:"rename_preview",operationId:"operation.application.rename_preview",transport:{kind:"mcp_tool",toolName:"tracedecay_rename_preview"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.rename_preview.v1",requestSchema:{schemaId:"schema.application.primitive.rename-preview.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.rename-preview.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(256),decodeResult:$U(257)},{operation:"rename_symbol",operationId:"operation.application.rename_symbol",transport:{kind:"mcp_tool",toolName:"tracedecay_rename_symbol"},effect:"source_edit",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.rename_symbol.v1",requestSchema:{schemaId:"schema.application.source-edit.rename-symbol.request",revision:1},resultSchema:{schemaId:"schema.application.source-edit.rename-symbol.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:$U(258),decodeResult:$U(18)},{operation:"replace_symbol",operationId:"operation.application.replace_symbol",transport:{kind:"mcp_tool",toolName:"tracedecay_replace_symbol"},effect:"source_edit",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.replace_symbol.v1",requestSchema:{schemaId:"schema.application.source-edit.replace-symbol.request",revision:1},resultSchema:{schemaId:"schema.application.source-edit.replace-symbol.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:$U(259),decodeResult:$U(18)},{operation:"retrieve",operationId:"operation.application.retrieve",transport:{kind:"mcp_tool",toolName:"tracedecay_retrieve"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.retrieve.v1",requestSchema:{schemaId:"schema.application.primitive.retrieve.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.retrieve.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(260),decodeResult:$U(261)},{operation:"run_affected_tests",operationId:"operation.application.run_affected_tests",transport:{kind:"mcp_tool",toolName:"tracedecay_run_affected_tests"},effect:"spawns_process",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.run_affected_tests.v1",requestSchema:{schemaId:"schema.application.primitive.run-affected-tests.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.run-affected-tests.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","effect_in_flight"]},deadline:{behavior:"return_operation_receipt",maximum_millis:6e5},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(262),decodeResult:$U(263)},{operation:"runtime",operationId:"operation.application.runtime",transport:{kind:"mcp_tool",toolName:"tracedecay_runtime"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.runtime.v1",requestSchema:{schemaId:"schema.application.primitive.runtime.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.runtime.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(264),decodeResult:$U(265)},{operation:"search",operationId:"operation.application.search",transport:{kind:"mcp_tool",toolName:"tracedecay_search"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.search.v1",requestSchema:{schemaId:"schema.application.primitive.search.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.search.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(266),decodeResult:$U(267)},{operation:"session_lookup",operationId:"operation.application.session_lookup",transport:{kind:"mcp_tool",toolName:"tracedecay_session_lookup"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.session_lookup.v1",requestSchema:{schemaId:"schema.application.primitive.session-lookup.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.session-lookup.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(268),decodeResult:$U(269)},{operation:"application_session_refresh_begin",operationId:"operation.application.session_refresh_begin",transport:{kind:"http",route:"/application/retained/session_refresh_begin",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.session_refresh_begin.v1",requestSchema:{schemaId:"schema.application.retained.session-refresh-begin.request",revision:1},resultSchema:{schemaId:"schema.application.retained.session-refresh-begin.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","reconciling","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","unavailable","effect_unknown","partial"],decodeRequest:$U(270),decodeResult:$U(271),decodeSuccess:e=>mE(e,"binding.http.session_refresh_begin.v1","schema.application.retained.session-refresh-begin.result",1,["completed","cancelled","timed_out","failed","unavailable","effect_unknown","partial"],{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","reconciling","after_commit"]},"durable_effect","required",$U(271))},{operation:"application_session_refresh_cancel",operationId:"operation.application.session_refresh_cancel",transport:{kind:"http",route:"/application/retained/session_refresh_cancel",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.session_refresh_cancel.v1",requestSchema:{schemaId:"schema.application.retained.session-refresh-cancel.request",revision:1},resultSchema:{schemaId:"schema.application.retained.session-refresh-cancel.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","reconciling","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","unavailable","effect_unknown","partial"],decodeRequest:$U(270),decodeResult:$U(272),decodeSuccess:e=>mE(e,"binding.http.session_refresh_cancel.v1","schema.application.retained.session-refresh-cancel.result",1,["completed","cancelled","timed_out","failed","unavailable","effect_unknown","partial"],{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","reconciling","after_commit"]},"durable_effect","required",$U(272))},{operation:"application_session_refresh_status",operationId:"operation.application.session_refresh_status",transport:{kind:"http",route:"/application/retained/session_refresh_status",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.session_refresh_status.v1",requestSchema:{schemaId:"schema.application.retained.session-refresh-status.request",revision:1},resultSchema:{schemaId:"schema.application.retained.session-refresh-status.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(270),decodeResult:$U(273),decodeSuccess:e=>mE(e,"binding.http.session_refresh_status.v1","schema.application.retained.session-refresh-status.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(273))},{operation:"application_sessions_for",operationId:"operation.application.sessions_for",transport:{kind:"http",route:"/application/retained/sessions_for",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.sessions_for.v1",requestSchema:{schemaId:"schema.application.retained.sessions-for.request",revision:1},resultSchema:{schemaId:"schema.application.retained.sessions-for.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(274),decodeResult:$U(275),decodeSuccess:e=>mE(e,"binding.http.sessions_for.v1","schema.application.retained.sessions-for.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(275))},{operation:"signature",operationId:"operation.application.signature",transport:{kind:"mcp_tool",toolName:"tracedecay_signature"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.signature.v1",requestSchema:{schemaId:"schema.application.primitive.signature.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.signature.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(112),decodeResult:$U(276)},{operation:"similar",operationId:"operation.application.similar",transport:{kind:"mcp_tool",toolName:"tracedecay_similar"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.similar.v1",requestSchema:{schemaId:"schema.application.primitive.similar.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.similar.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(277),decodeResult:$U(278)},{operation:"skill_list",operationId:"operation.application.skill_list",transport:{kind:"mcp_tool",toolName:"tracedecay_skill_list"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.skill_list.v1",requestSchema:{schemaId:"schema.application.primitive.skill-list.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.skill-list.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(279),decodeResult:$U(280)},{operation:"skill_view",operationId:"operation.application.skill_view",transport:{kind:"mcp_tool",toolName:"tracedecay_skill_view"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.skill_view.v1",requestSchema:{schemaId:"schema.application.primitive.skill-view.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.skill-view.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(281),decodeResult:$U(282)},{operation:"application_source_body",operationId:"operation.application.source_body",transport:{kind:"http",route:"/application/primitives/source_body",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.source_body.v1",requestSchema:{schemaId:"schema.application.primitive.source-body.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.source-body.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(283),decodeResult:$U(284),decodeSuccess:e=>mE(e,"binding.http.source_body.v1","schema.application.primitive.source-body.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(284))},{operation:"source_edit_reconcile",operationId:"operation.application.source_edit_reconcile",transport:{kind:"mcp_tool",toolName:"tracedecay_source_edit_reconcile"},effect:"source_edit",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.source_edit_reconcile.v1",requestSchema:{schemaId:"schema.application.source-edit.reconcile.request",revision:1},resultSchema:{schemaId:"schema.application.source-edit.reconcile.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:$U(285),decodeResult:$U(18)},{operation:"source_edit_rollback",operationId:"operation.application.source_edit_rollback",transport:{kind:"mcp_tool",toolName:"tracedecay_source_edit_rollback"},effect:"source_edit",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.source_edit_rollback.v1",requestSchema:{schemaId:"schema.application.source-edit.rollback.request",revision:1},resultSchema:{schemaId:"schema.application.source-edit.rollback.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:$U(286),decodeResult:$U(18)},{operation:"application_source_lines",operationId:"operation.application.source_lines",transport:{kind:"http",route:"/application/primitives/source_lines",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.source_lines.v1",requestSchema:{schemaId:"schema.application.primitive.source-lines.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.source-lines.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(287),decodeResult:$U(288),decodeSuccess:e=>mE(e,"binding.http.source_lines.v1","schema.application.primitive.source-lines.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(288))},{operation:"application_source_outline",operationId:"operation.application.source_outline",transport:{kind:"http",route:"/application/primitives/source_outline",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.source_outline.v1",requestSchema:{schemaId:"schema.application.primitive.source-outline.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.source-outline.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(289),decodeResult:$U(290),decodeSuccess:e=>mE(e,"binding.http.source_outline.v1","schema.application.primitive.source-outline.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(290))},{operation:"stack_snapshot",operationId:"operation.application.stack_snapshot",transport:{kind:"mcp_tool",toolName:"tracedecay_stack_snapshot"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.stack_snapshot.v1",requestSchema:{schemaId:"schema.application.native-integration.stack-snapshot.request",revision:1},resultSchema:{schemaId:"schema.application.native-integration.stack-snapshot.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:$U(291),decodeResult:$U(15)},{operation:"status",operationId:"operation.application.status",transport:{kind:"mcp_tool",toolName:"tracedecay_status"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.status.v1",requestSchema:{schemaId:"schema.application.primitive.status.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.status.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(292),decodeResult:$U(293)},{operation:"application_storage_status",operationId:"operation.application.storage_status",transport:{kind:"http",route:"/application/primitives/storage_status",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.storage_status.v1",requestSchema:{schemaId:"schema.application.primitive.storage-status.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.storage-status.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(294),decodeResult:$U(295),decodeSuccess:e=>mE(e,"binding.http.storage_status.v1","schema.application.primitive.storage-status.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(295))},{operation:"str_replace",operationId:"operation.application.str_replace",transport:{kind:"mcp_tool",toolName:"tracedecay_str_replace"},effect:"source_edit",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.str_replace.v1",requestSchema:{schemaId:"schema.application.source-edit.str-replace.request",revision:1},resultSchema:{schemaId:"schema.application.source-edit.str-replace.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:$U(296),decodeResult:$U(18)},{operation:"test_map",operationId:"operation.application.test_map",transport:{kind:"mcp_tool",toolName:"tracedecay_test_map"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.test_map.v1",requestSchema:{schemaId:"schema.application.primitive.test-map.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.test-map.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(297),decodeResult:$U(298)},{operation:"application_test_results",operationId:"operation.application.test_results",transport:{kind:"http",route:"/application/tests/results",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.test_results.v1",requestSchema:{schemaId:"schema.application.feedback.test-results.request",revision:1},resultSchema:{schemaId:"schema.application.feedback.test-results.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:15e3},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(299),decodeResult:$U(300),decodeSuccess:e=>mE(e,"binding.http.test_results.v1","schema.application.feedback.test-results.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(300))},{operation:"test_risk",operationId:"operation.application.test_risk",transport:{kind:"mcp_tool",toolName:"tracedecay_test_risk"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.test_risk.v1",requestSchema:{schemaId:"schema.application.primitive.test-risk.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.test-risk.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(301),decodeResult:$U(302)},{operation:"todos",operationId:"operation.application.todos",transport:{kind:"mcp_tool",toolName:"tracedecay_todos"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.todos.v1",requestSchema:{schemaId:"schema.application.primitive.todos.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.todos.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(303),decodeResult:$U(304)},{operation:"unmounted_files",operationId:"operation.application.unmounted_files",transport:{kind:"mcp_tool",toolName:"tracedecay_unmounted_files"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.unmounted_files.v1",requestSchema:{schemaId:"schema.application.primitive.unmounted-files.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.unmounted-files.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(305),decodeResult:$U(306)},{operation:"unsafe_patterns",operationId:"operation.application.unsafe_patterns",transport:{kind:"mcp_tool",toolName:"tracedecay_unsafe_patterns"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.unsafe_patterns.v1",requestSchema:{schemaId:"schema.application.primitive.unsafe-patterns.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.unsafe-patterns.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(307),decodeResult:$U(308)},{operation:"application_workflows",operationId:"operation.application.workflows",transport:{kind:"http",route:"/application/retained/workflows",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.workflows.v1",requestSchema:{schemaId:"schema.application.retained.workflows.request",revision:1},resultSchema:{schemaId:"schema.application.retained.workflows.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:$U(309),decodeResult:$U(310),decodeSuccess:e=>mE(e,"binding.http.workflows.v1","schema.application.retained.workflows.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(310))},{operation:"application_worktree_cleanup_confirm",operationId:"operation.application.worktree_cleanup_confirm",transport:{kind:"http",route:"/application/native-integration/worktree_cleanup_confirm",method:"POST"},effect:"preview",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.worktree_cleanup_confirm.v1",requestSchema:{schemaId:"schema.application.native-integration.worktree-cleanup-confirm.request",revision:1},resultSchema:{schemaId:"schema.application.native-integration.worktree-cleanup-confirm.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:$U(311),decodeResult:$U(15),decodeSuccess:e=>mE(e,"binding.http.worktree_cleanup_confirm.v1","schema.application.native-integration.worktree-cleanup-confirm.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(15))},{operation:"application_worktree_cleanup_inspect",operationId:"operation.application.worktree_cleanup_inspect",transport:{kind:"http",route:"/application/native-integration/worktree_cleanup_inspect",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.worktree_cleanup_inspect.v1",requestSchema:{schemaId:"schema.application.native-integration.worktree-cleanup-inspect.request",revision:1},resultSchema:{schemaId:"schema.application.native-integration.worktree-cleanup-inspect.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:$U(312),decodeResult:$U(15),decodeSuccess:e=>mE(e,"binding.http.worktree_cleanup_inspect.v1","schema.application.native-integration.worktree-cleanup-inspect.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(15))},{operation:"application_worktree_cleanup_reconcile",operationId:"operation.application.worktree_cleanup_reconcile",transport:{kind:"http",route:"/application/native-integration/worktree_cleanup_reconcile",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.worktree_cleanup_reconcile.v1",requestSchema:{schemaId:"schema.application.native-integration.worktree-cleanup-reconcile.request",revision:1},resultSchema:{schemaId:"schema.application.native-integration.worktree-cleanup-reconcile.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:$U(313),decodeResult:$U(15),decodeSuccess:e=>mE(e,"binding.http.worktree_cleanup_reconcile.v1","schema.application.native-integration.worktree-cleanup-reconcile.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(15))},{operation:"application_worktree_cleanup_remove",operationId:"operation.application.worktree_cleanup_remove",transport:{kind:"http",route:"/application/native-integration/worktree_cleanup_remove",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.worktree_cleanup_remove.v1",requestSchema:{schemaId:"schema.application.native-integration.worktree-cleanup-remove.request",revision:1},resultSchema:{schemaId:"schema.application.native-integration.worktree-cleanup-remove.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:$U(314),decodeResult:$U(15),decodeSuccess:e=>mE(e,"binding.http.worktree_cleanup_remove.v1","schema.application.native-integration.worktree-cleanup-remove.result",1,["completed","cancelled","timed_out","failed","effect_unknown","partial"],{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},"durable_effect","required",$U(15))},{operation:"application_worktree_inventory",operationId:"operation.application.worktree_inventory",transport:{kind:"http",route:"/application/native-integration/worktree_inventory",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.worktree_inventory.v1",requestSchema:{schemaId:"schema.application.native-integration.worktree-inventory.request",revision:1},resultSchema:{schemaId:"schema.application.native-integration.worktree-inventory.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:$U(315),decodeResult:$U(15),decodeSuccess:e=>mE(e,"binding.http.worktree_inventory.v1","schema.application.native-integration.worktree-inventory.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(15))},{operation:"handoff_issue_task_handoff",operationId:"operation.handoff.issue_task_handoff",transport:{kind:"http",route:"/application/handoff/issue-task",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.handoff.issue_task_handoff",requestSchema:{schemaId:"schema.handoff.issue_task_handoff.request",revision:1},resultSchema:{schemaId:"schema.handoff.issue_task_handoff.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","timed_out","failed","effect_unknown","partial"],decodeRequest:$U(316),decodeResult:$U(317),decodeSuccess:e=>mE(e,"binding.http.handoff.issue_task_handoff","schema.handoff.issue_task_handoff.result",1,["completed","timed_out","failed","effect_unknown","partial"],{mode:"not_cancellable"},"durable_effect","required",$U(317))},{operation:"handoff_list_task_handoffs",operationId:"operation.handoff.list_task_handoffs",transport:{kind:"http",route:"/application/handoff/list-task",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.handoff.list_task_handoffs",requestSchema:{schemaId:"schema.handoff.list_task_handoffs.request",revision:1},resultSchema:{schemaId:"schema.handoff.list_task_handoffs.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","timed_out","failed","partial"],decodeRequest:$U(318),decodeResult:$U(319),decodeSuccess:e=>mE(e,"binding.http.handoff.list_task_handoffs","schema.handoff.list_task_handoffs.result",1,["completed","timed_out","failed","partial"],{mode:"not_cancellable"},"operation","not_required",$U(319))},{operation:"handoff_open_investigation_handoff",operationId:"operation.handoff.open_investigation_handoff",transport:{kind:"http",route:"/application/handoff/open-investigation",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.handoff.open_investigation_handoff",requestSchema:{schemaId:"schema.handoff.open_investigation_handoff.request",revision:1},resultSchema:{schemaId:"schema.handoff.open_investigation_handoff.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","timed_out","failed","effect_unknown","partial"],decodeRequest:$U(320),decodeResult:$U(321),decodeSuccess:e=>mE(e,"binding.http.handoff.open_investigation_handoff","schema.handoff.open_investigation_handoff.result",1,["completed","timed_out","failed","effect_unknown","partial"],{mode:"not_cancellable"},"durable_effect","required",$U(321))},{operation:"handoff_open_task_handoff",operationId:"operation.handoff.open_task_handoff",transport:{kind:"http",route:"/application/handoff/open-task",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.handoff.open_task_handoff",requestSchema:{schemaId:"schema.handoff.open_task_handoff.request",revision:1},resultSchema:{schemaId:"schema.handoff.open_task_handoff.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","timed_out","failed","effect_unknown","partial"],decodeRequest:$U(322),decodeResult:$U(323),decodeSuccess:e=>mE(e,"binding.http.handoff.open_task_handoff","schema.handoff.open_task_handoff.result",1,["completed","timed_out","failed","effect_unknown","partial"],{mode:"not_cancellable"},"durable_effect","required",$U(323))},{operation:"multi_root_execute",operationId:"operation.multi_root.execute",transport:{kind:"http",route:"/application/multi-root/execute",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.multi_root.execute.v1",requestSchema:{schemaId:"schema.tracedecay.multi-root.execute-request.v1",revision:1},resultSchema:{schemaId:"schema.tracedecay.multi-root.execute-result.v1",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:$U(324),decodeResult:$U(325),decodeSuccess:e=>mE(e,"binding.http.multi_root.execute.v1","schema.tracedecay.multi-root.execute-result.v1",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(325))},{operation:"multi_root_scope_set_compare_and_swap",operationId:"operation.multi_root.scope_set_compare_and_swap",transport:{kind:"http",route:"/application/multi-root/scope-set/compare-and-swap",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.multi_root.scope_set_compare_and_swap.v1",requestSchema:{schemaId:"schema.tracedecay.multi-root.scope-set-compare-and-swap-request.v1",revision:1},resultSchema:{schemaId:"schema.tracedecay.multi-root.scope-set-compare-and-swap-result.v1",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:$U(326),decodeResult:$U(327),decodeSuccess:e=>mE(e,"binding.http.multi_root.scope_set_compare_and_swap.v1","schema.tracedecay.multi-root.scope-set-compare-and-swap-result.v1",1,["completed","cancelled","timed_out","failed","effect_unknown","partial"],{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},"durable_effect","required",$U(327))},{operation:"multi_root_scope_set_read",operationId:"operation.multi_root.scope_set_read",transport:{kind:"http",route:"/application/multi-root/scope-set/read",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.multi_root.scope_set_read.v1",requestSchema:{schemaId:"schema.tracedecay.multi-root.scope-set-read-request.v1",revision:1},resultSchema:{schemaId:"schema.tracedecay.multi-root.scope-set-read-result.v1",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:$U(328),decodeResult:$U(329),decodeSuccess:e=>mE(e,"binding.http.multi_root.scope_set_read.v1","schema.tracedecay.multi-root.scope-set-read-result.v1",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(329))},{operation:"work_accept_proposal",operationId:"operation.work.accept_proposal",transport:{kind:"http",route:"/application/work/accept-proposal",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.accept_proposal",requestSchema:{schemaId:"schema.work.accept_proposal.request",revision:1},resultSchema:{schemaId:"schema.work.accept_proposal.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:$U(330),decodeResult:$U(331),decodeSuccess:e=>mE(e,"binding.http.work.accept_proposal","schema.work.accept_proposal.result",1,["completed","cancelled","timed_out","failed","effect_unknown","partial"],{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},"durable_effect","required",$U(331))},{operation:"work_adjudicate_duplicate",operationId:"operation.work.adjudicate_duplicate",transport:{kind:"http",route:"/application/work/adjudicate-duplicate",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.adjudicate_duplicate",requestSchema:{schemaId:"schema.work.adjudicate_duplicate.request",revision:1},resultSchema:{schemaId:"schema.work.adjudicate_duplicate.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:$U(332),decodeResult:$U(333),decodeSuccess:e=>mE(e,"binding.http.work.adjudicate_duplicate","schema.work.adjudicate_duplicate.result",1,["completed","cancelled","timed_out","failed","effect_unknown","partial"],{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},"durable_effect","required",$U(333))},{operation:"work_adjudicate_leak",operationId:"operation.work.adjudicate_leak",transport:{kind:"http",route:"/application/work/adjudicate-leak",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.adjudicate_leak",requestSchema:{schemaId:"schema.work.adjudicate_leak.request",revision:1},resultSchema:{schemaId:"schema.work.adjudicate_leak.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:$U(334),decodeResult:$U(335),decodeSuccess:e=>mE(e,"binding.http.work.adjudicate_leak","schema.work.adjudicate_leak.result",1,["completed","cancelled","timed_out","failed","effect_unknown","partial"],{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},"durable_effect","required",$U(335))},{operation:"work_admit_execution",operationId:"operation.work.admit_execution",transport:{kind:"http",route:"/application/work/admit-execution",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.admit_execution",requestSchema:{schemaId:"schema.work.admit_execution.request",revision:1},resultSchema:{schemaId:"schema.work.admit_execution.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:$U(336),decodeResult:$U(337),decodeSuccess:e=>mE(e,"binding.http.work.admit_execution","schema.work.admit_execution.result",1,["completed","cancelled","timed_out","failed","effect_unknown","partial"],{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},"durable_effect","required",$U(337))},{operation:"work_admit_placement",operationId:"operation.work.admit_placement",transport:{kind:"http",route:"/application/work/admit-placement",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.admit_placement",requestSchema:{schemaId:"schema.work.admit_placement.request",revision:1},resultSchema:{schemaId:"schema.work.admit_placement.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:$U(338),decodeResult:$U(339),decodeSuccess:e=>mE(e,"binding.http.work.admit_placement","schema.work.admit_placement.result",1,["completed","cancelled","timed_out","failed","effect_unknown","partial"],{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},"durable_effect","required",$U(339))},{operation:"work_attempt_status",operationId:"operation.work.attempt_status",transport:{kind:"http",route:"/application/work/attempt-status",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.attempt_status",requestSchema:{schemaId:"schema.work.attempt_status.request",revision:1},resultSchema:{schemaId:"schema.work.attempt_status.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:$U(340),decodeResult:$U(341),decodeSuccess:e=>mE(e,"binding.http.work.attempt_status","schema.work.attempt_status.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(341))},{operation:"work_cancel_attempt",operationId:"operation.work.cancel_attempt",transport:{kind:"http",route:"/application/work/cancel-attempt",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.cancel_attempt",requestSchema:{schemaId:"schema.work.cancel_attempt.request",revision:1},resultSchema:{schemaId:"schema.work.cancel_attempt.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:$U(342),decodeResult:$U(341),decodeSuccess:e=>mE(e,"binding.http.work.cancel_attempt","schema.work.cancel_attempt.result",1,["completed","cancelled","timed_out","failed","effect_unknown","partial"],{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},"durable_effect","required",$U(341))},{operation:"work_compare_proposal",operationId:"operation.work.compare_proposal",transport:{kind:"http",route:"/application/work/compare-proposal",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.compare_proposal",requestSchema:{schemaId:"schema.work.compare_proposal.request",revision:1},resultSchema:{schemaId:"schema.work.compare_proposal.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:$U(343),decodeResult:$U(344),decodeSuccess:e=>mE(e,"binding.http.work.compare_proposal","schema.work.compare_proposal.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(344))},{operation:"work_create",operationId:"operation.work.create",transport:{kind:"http",route:"/application/work/create",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.create",requestSchema:{schemaId:"schema.work.create.request",revision:1},resultSchema:{schemaId:"schema.work.create.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:$U(345),decodeResult:$U(331),decodeSuccess:e=>mE(e,"binding.http.work.create","schema.work.create.result",1,["completed","cancelled","timed_out","failed","effect_unknown","partial"],{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},"durable_effect","required",$U(331))},{operation:"work_execution_history",operationId:"operation.work.execution_history",transport:{kind:"http",route:"/application/work/execution-history",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.execution_history",requestSchema:{schemaId:"schema.work.execution_history.request",revision:1},resultSchema:{schemaId:"schema.work.execution_history.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:$U(346),decodeResult:$U(347),decodeSuccess:e=>mE(e,"binding.http.work.execution_history","schema.work.execution_history.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(347))},{operation:"work_experience",operationId:"operation.work.experience",transport:{kind:"http",route:"/application/work/experience",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.experience",requestSchema:{schemaId:"schema.work.experience.request",revision:1},resultSchema:{schemaId:"schema.work.experience.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:$U(348),decodeResult:$U(349),decodeSuccess:e=>mE(e,"binding.http.work.experience","schema.work.experience.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(349))},{operation:"work_generate_proposal",operationId:"operation.work.generate_proposal",transport:{kind:"http",route:"/application/work/generate-proposal",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.generate_proposal",requestSchema:{schemaId:"schema.work.generate_proposal.request",revision:1},resultSchema:{schemaId:"schema.work.generate_proposal.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:$U(350),decodeResult:$U(351),decodeSuccess:e=>mE(e,"binding.http.work.generate_proposal","schema.work.generate_proposal.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(351))},{operation:"work_hydrate_artifacts",operationId:"operation.work.hydrate_artifacts",transport:{kind:"http",route:"/application/work/hydrate-artifacts",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.hydrate_artifacts",requestSchema:{schemaId:"schema.work.hydrate_artifacts.request",revision:1},resultSchema:{schemaId:"schema.work.hydrate_artifacts.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:$U(352),decodeResult:$U(353),decodeSuccess:e=>mE(e,"binding.http.work.hydrate_artifacts","schema.work.hydrate_artifacts.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(353))},{operation:"work_list_attempts",operationId:"operation.work.list_attempts",transport:{kind:"http",route:"/application/work/list-attempts",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.list_attempts",requestSchema:{schemaId:"schema.work.list_attempts.request",revision:1},resultSchema:{schemaId:"schema.work.list_attempts.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:$U(346),decodeResult:$U(354),decodeSuccess:e=>mE(e,"binding.http.work.list_attempts","schema.work.list_attempts.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(354))},{operation:"work_mutate_graph",operationId:"operation.work.mutate_graph",transport:{kind:"http",route:"/application/work/mutate-graph",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.mutate_graph",requestSchema:{schemaId:"schema.work.mutate_graph.request",revision:1},resultSchema:{schemaId:"schema.work.mutate_graph.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:$U(355),decodeResult:$U(331),decodeSuccess:e=>mE(e,"binding.http.work.mutate_graph","schema.work.mutate_graph.result",1,["completed","cancelled","timed_out","failed","effect_unknown","partial"],{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},"durable_effect","required",$U(331))},{operation:"work_pause_run",operationId:"operation.work.pause_run",transport:{kind:"http",route:"/application/work/pause-run",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.pause_run",requestSchema:{schemaId:"schema.work.pause_run.request",revision:1},resultSchema:{schemaId:"schema.work.pause_run.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:$U(356),decodeResult:$U(357),decodeSuccess:e=>mE(e,"binding.http.work.pause_run","schema.work.pause_run.result",1,["completed","cancelled","timed_out","failed","effect_unknown","partial"],{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},"durable_effect","required",$U(357))},{operation:"work_placement_preflight",operationId:"operation.work.placement_preflight",transport:{kind:"http",route:"/application/work/placement-preflight",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.placement_preflight",requestSchema:{schemaId:"schema.work.placement_preflight.request",revision:1},resultSchema:{schemaId:"schema.work.placement_preflight.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:$U(358),decodeResult:$U(359),decodeSuccess:e=>mE(e,"binding.http.work.placement_preflight","schema.work.placement_preflight.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(359))},{operation:"work_placement_status",operationId:"operation.work.placement_status",transport:{kind:"http",route:"/application/work/placement-status",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.placement_status",requestSchema:{schemaId:"schema.work.placement_status.request",revision:1},resultSchema:{schemaId:"schema.work.placement_status.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:$U(360),decodeResult:$U(361),decodeSuccess:e=>mE(e,"binding.http.work.placement_status","schema.work.placement_status.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(361))},{operation:"work_prepare_duplicate_adjudication",operationId:"operation.work.prepare_duplicate_adjudication",transport:{kind:"http",route:"/application/work/prepare-duplicate-adjudication",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.prepare_duplicate_adjudication",requestSchema:{schemaId:"schema.work.prepare_duplicate_adjudication.request",revision:1},resultSchema:{schemaId:"schema.work.prepare_duplicate_adjudication.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:$U(362),decodeResult:$U(332),decodeSuccess:e=>mE(e,"binding.http.work.prepare_duplicate_adjudication","schema.work.prepare_duplicate_adjudication.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(332))},{operation:"work_prepare_graph_mutation",operationId:"operation.work.prepare_graph_mutation",transport:{kind:"http",route:"/application/work/prepare-graph-mutation",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.prepare_graph_mutation",requestSchema:{schemaId:"schema.work.prepare_graph_mutation.request",revision:1},resultSchema:{schemaId:"schema.work.prepare_graph_mutation.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:$U(363),decodeResult:$U(355),decodeSuccess:e=>mE(e,"binding.http.work.prepare_graph_mutation","schema.work.prepare_graph_mutation.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(355))},{operation:"work_release_placement",operationId:"operation.work.release_placement",transport:{kind:"http",route:"/application/work/release-placement",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.release_placement",requestSchema:{schemaId:"schema.work.release_placement.request",revision:1},resultSchema:{schemaId:"schema.work.release_placement.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:$U(364),decodeResult:$U(339),decodeSuccess:e=>mE(e,"binding.http.work.release_placement","schema.work.release_placement.result",1,["completed","cancelled","timed_out","failed","effect_unknown","partial"],{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},"durable_effect","required",$U(339))},{operation:"work_resume_attempts",operationId:"operation.work.resume_attempts",transport:{kind:"http",route:"/application/work/resume-attempts",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.resume_attempts",requestSchema:{schemaId:"schema.work.resume_attempts.request",revision:1},resultSchema:{schemaId:"schema.work.resume_attempts.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:$U(365),decodeResult:$U(366),decodeSuccess:e=>mE(e,"binding.http.work.resume_attempts","schema.work.resume_attempts.result",1,["completed","cancelled","timed_out","failed","effect_unknown","partial"],{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},"durable_effect","required",$U(366))},{operation:"work_resume_run",operationId:"operation.work.resume_run",transport:{kind:"http",route:"/application/work/resume-run",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.resume_run",requestSchema:{schemaId:"schema.work.resume_run.request",revision:1},resultSchema:{schemaId:"schema.work.resume_run.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:$U(367),decodeResult:$U(357),decodeSuccess:e=>mE(e,"binding.http.work.resume_run","schema.work.resume_run.result",1,["completed","cancelled","timed_out","failed","effect_unknown","partial"],{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},"durable_effect","required",$U(357))},{operation:"work_retrieve_evidence",operationId:"operation.work.retrieve_evidence",transport:{kind:"http",route:"/application/work/retrieve-evidence",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.retrieve_evidence",requestSchema:{schemaId:"schema.work.retrieve_evidence.request",revision:1},resultSchema:{schemaId:"schema.work.retrieve_evidence.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:$U(368),decodeResult:$U(369),decodeSuccess:e=>mE(e,"binding.http.work.retrieve_evidence","schema.work.retrieve_evidence.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(369))},{operation:"work_retry_attempt",operationId:"operation.work.retry_attempt",transport:{kind:"http",route:"/application/work/retry-attempt",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.retry_attempt",requestSchema:{schemaId:"schema.work.retry_attempt.request",revision:1},resultSchema:{schemaId:"schema.work.retry_attempt.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:$U(370),decodeResult:$U(371),decodeSuccess:e=>mE(e,"binding.http.work.retry_attempt","schema.work.retry_attempt.result",1,["completed","cancelled","timed_out","failed","effect_unknown","partial"],{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},"durable_effect","required",$U(371))},{operation:"work_review_proposal",operationId:"operation.work.review_proposal",transport:{kind:"http",route:"/application/work/review-proposal",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.review_proposal",requestSchema:{schemaId:"schema.work.review_proposal.request",revision:1},resultSchema:{schemaId:"schema.work.review_proposal.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:$U(372),decodeResult:$U(331),decodeSuccess:e=>mE(e,"binding.http.work.review_proposal","schema.work.review_proposal.result",1,["completed","cancelled","timed_out","failed","effect_unknown","partial"],{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},"durable_effect","required",$U(331))},{operation:"work_run_control",operationId:"operation.work.run_control",transport:{kind:"http",route:"/application/work/run-control",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.run_control",requestSchema:{schemaId:"schema.work.run_control.request",revision:1},resultSchema:{schemaId:"schema.work.run_control.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:$U(373),decodeResult:$U(374),decodeSuccess:e=>mE(e,"binding.http.work.run_control","schema.work.run_control.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(374))},{operation:"work_start_attempt",operationId:"operation.work.start_attempt",transport:{kind:"http",route:"/application/work/start-attempt",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.start_attempt",requestSchema:{schemaId:"schema.work.start_attempt.request",revision:1},resultSchema:{schemaId:"schema.work.start_attempt.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:$U(375),decodeResult:$U(341),decodeSuccess:e=>mE(e,"binding.http.work.start_attempt","schema.work.start_attempt.result",1,["completed","cancelled","timed_out","failed","effect_unknown","partial"],{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},"durable_effect","required",$U(341))},{operation:"work_synthesize",operationId:"operation.work.synthesize",transport:{kind:"http",route:"/application/work/synthesize",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.synthesize",requestSchema:{schemaId:"schema.work.synthesize.request",revision:1},resultSchema:{schemaId:"schema.work.synthesize.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:$U(376),decodeResult:$U(377),decodeSuccess:e=>mE(e,"binding.http.work.synthesize","schema.work.synthesize.result",1,["completed","cancelled","timed_out","failed","effect_unknown","partial"],{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},"durable_effect","required",$U(377))},{operation:"work_topology",operationId:"operation.work.topology",transport:{kind:"http",route:"/application/work/topology",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.topology",requestSchema:{schemaId:"schema.work.topology.request",revision:1},resultSchema:{schemaId:"schema.work.topology.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:$U(378),decodeResult:$U(379),decodeSuccess:e=>mE(e,"binding.http.work.topology","schema.work.topology.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(379))},{operation:"work_topology_metrics",operationId:"operation.work.topology_metrics",transport:{kind:"http",route:"/application/work/topology-metrics",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.topology_metrics",requestSchema:{schemaId:"schema.work.topology_metrics.request",revision:1},resultSchema:{schemaId:"schema.work.topology_metrics.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:$U(380),decodeResult:$U(381),decodeSuccess:e=>mE(e,"binding.http.work.topology_metrics","schema.work.topology_metrics.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(381))},{operation:"work_views",operationId:"operation.work.views",transport:{kind:"http",route:"/application/work/views",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.views",requestSchema:{schemaId:"schema.work.views.request",revision:1},resultSchema:{schemaId:"schema.work.views.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:$U(382),decodeResult:$U(383),decodeSuccess:e=>mE(e,"binding.http.work.views","schema.work.views.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(383))},{operation:"workflow_activate_definition",operationId:"operation.workflow.activate_definition",transport:{kind:"http",route:"/application/workflow/activate-definition",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.workflow.activate_definition",requestSchema:{schemaId:"schema.workflow.activate_definition.request",revision:1},resultSchema:{schemaId:"schema.workflow.activate_definition.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","timed_out","failed","effect_unknown","partial"],decodeRequest:$U(384),decodeResult:$U(385),decodeSuccess:e=>mE(e,"binding.http.workflow.activate_definition","schema.workflow.activate_definition.result",1,["completed","timed_out","failed","effect_unknown","partial"],{mode:"not_cancellable"},"durable_effect","required",$U(385))},{operation:"workflow_cancel_run",operationId:"operation.workflow.cancel_run",transport:{kind:"http",route:"/application/workflow/cancel-run",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.workflow.cancel_run",requestSchema:{schemaId:"schema.workflow.cancel_run.request",revision:1},resultSchema:{schemaId:"schema.workflow.cancel_run.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","timed_out","failed","effect_unknown","partial"],decodeRequest:$U(386),decodeResult:$U(387),decodeSuccess:e=>mE(e,"binding.http.workflow.cancel_run","schema.workflow.cancel_run.result",1,["completed","timed_out","failed","effect_unknown","partial"],{mode:"not_cancellable"},"durable_effect","required",$U(387))},{operation:"workflow_definition_history",operationId:"operation.workflow.definition_history",transport:{kind:"http",route:"/application/workflow/definition-history",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.workflow.definition_history",requestSchema:{schemaId:"schema.workflow.definition_history.request",revision:1},resultSchema:{schemaId:"schema.workflow.definition_history.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:$U(388),decodeResult:$U(389),decodeSuccess:e=>mE(e,"binding.http.workflow.definition_history","schema.workflow.definition_history.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(389))},{operation:"workflow_diff_definition",operationId:"operation.workflow.diff_definition",transport:{kind:"http",route:"/application/workflow/diff-definition",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.workflow.diff_definition",requestSchema:{schemaId:"schema.workflow.diff_definition.request",revision:1},resultSchema:{schemaId:"schema.workflow.diff_definition.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:$U(390),decodeResult:$U(391),decodeSuccess:e=>mE(e,"binding.http.workflow.diff_definition","schema.workflow.diff_definition.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(391))},{operation:"workflow_get_definition",operationId:"operation.workflow.get_definition",transport:{kind:"http",route:"/application/workflow/get-definition",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.workflow.get_definition",requestSchema:{schemaId:"schema.workflow.get_definition.request",revision:1},resultSchema:{schemaId:"schema.workflow.get_definition.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:$U(392),decodeResult:$U(393),decodeSuccess:e=>mE(e,"binding.http.workflow.get_definition","schema.workflow.get_definition.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(393))},{operation:"workflow_get_run",operationId:"operation.workflow.get_run",transport:{kind:"http",route:"/application/workflow/get-run",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.workflow.get_run",requestSchema:{schemaId:"schema.workflow.get_run.request",revision:1},resultSchema:{schemaId:"schema.workflow.get_run.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:$U(394),decodeResult:$U(387),decodeSuccess:e=>mE(e,"binding.http.workflow.get_run","schema.workflow.get_run.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(387))},{operation:"workflow_handoff_issue",operationId:"operation.workflow.handoff_issue",transport:{kind:"http",route:"/application/workflow/handoff-issue",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.workflow.handoff_issue",requestSchema:{schemaId:"schema.workflow.handoff_issue.request",revision:1},resultSchema:{schemaId:"schema.workflow.handoff_issue.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","timed_out","failed","effect_unknown","partial"],decodeRequest:$U(395),decodeResult:$U(396),decodeSuccess:e=>mE(e,"binding.http.workflow.handoff_issue","schema.workflow.handoff_issue.result",1,["completed","timed_out","failed","effect_unknown","partial"],{mode:"not_cancellable"},"durable_effect","required",$U(396))},{operation:"workflow_handoff_redeem",operationId:"operation.workflow.handoff_redeem",transport:{kind:"http",route:"/application/workflow/handoff-redeem",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.workflow.handoff_redeem",requestSchema:{schemaId:"schema.workflow.handoff_redeem.request",revision:1},resultSchema:{schemaId:"schema.workflow.handoff_redeem.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","timed_out","failed","effect_unknown","partial"],decodeRequest:$U(397),decodeResult:$U(398),decodeSuccess:e=>mE(e,"binding.http.workflow.handoff_redeem","schema.workflow.handoff_redeem.result",1,["completed","timed_out","failed","effect_unknown","partial"],{mode:"not_cancellable"},"durable_effect","required",$U(398))},{operation:"workflow_list_definitions",operationId:"operation.workflow.list_definitions",transport:{kind:"http",route:"/application/workflow/list-definitions",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.workflow.list_definitions",requestSchema:{schemaId:"schema.workflow.list_definitions.request",revision:1},resultSchema:{schemaId:"schema.workflow.list_definitions.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:$U(399),decodeResult:$U(389),decodeSuccess:e=>mE(e,"binding.http.workflow.list_definitions","schema.workflow.list_definitions.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(389))},{operation:"workflow_pause_run",operationId:"operation.workflow.pause_run",transport:{kind:"http",route:"/application/workflow/pause-run",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.workflow.pause_run",requestSchema:{schemaId:"schema.workflow.pause_run.request",revision:1},resultSchema:{schemaId:"schema.workflow.pause_run.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","timed_out","failed","effect_unknown","partial"],decodeRequest:$U(400),decodeResult:$U(387),decodeSuccess:e=>mE(e,"binding.http.workflow.pause_run","schema.workflow.pause_run.result",1,["completed","timed_out","failed","effect_unknown","partial"],{mode:"not_cancellable"},"durable_effect","required",$U(387))},{operation:"workflow_register_definition",operationId:"operation.workflow.register_definition",transport:{kind:"http",route:"/application/workflow/register-definition",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.workflow.register_definition",requestSchema:{schemaId:"schema.workflow.register_definition.request",revision:1},resultSchema:{schemaId:"schema.workflow.register_definition.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","timed_out","failed","effect_unknown","partial"],decodeRequest:$U(401),decodeResult:$U(393),decodeSuccess:e=>mE(e,"binding.http.workflow.register_definition","schema.workflow.register_definition.result",1,["completed","timed_out","failed","effect_unknown","partial"],{mode:"not_cancellable"},"durable_effect","required",$U(393))},{operation:"workflow_reject_definition",operationId:"operation.workflow.reject_definition",transport:{kind:"http",route:"/application/workflow/reject-definition",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.workflow.reject_definition",requestSchema:{schemaId:"schema.workflow.reject_definition.request",revision:1},resultSchema:{schemaId:"schema.workflow.reject_definition.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","timed_out","failed","effect_unknown","partial"],decodeRequest:$U(402),decodeResult:$U(385),decodeSuccess:e=>mE(e,"binding.http.workflow.reject_definition","schema.workflow.reject_definition.result",1,["completed","timed_out","failed","effect_unknown","partial"],{mode:"not_cancellable"},"durable_effect","required",$U(385))},{operation:"workflow_resume_run",operationId:"operation.workflow.resume_run",transport:{kind:"http",route:"/application/workflow/resume-run",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.workflow.resume_run",requestSchema:{schemaId:"schema.workflow.resume_run.request",revision:1},resultSchema:{schemaId:"schema.workflow.resume_run.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","timed_out","failed","effect_unknown","partial"],decodeRequest:$U(403),decodeResult:$U(387),decodeSuccess:e=>mE(e,"binding.http.workflow.resume_run","schema.workflow.resume_run.result",1,["completed","timed_out","failed","effect_unknown","partial"],{mode:"not_cancellable"},"durable_effect","required",$U(387))},{operation:"workflow_retire_definition",operationId:"operation.workflow.retire_definition",transport:{kind:"http",route:"/application/workflow/retire-definition",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.workflow.retire_definition",requestSchema:{schemaId:"schema.workflow.retire_definition.request",revision:1},resultSchema:{schemaId:"schema.workflow.retire_definition.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","timed_out","failed","effect_unknown","partial"],decodeRequest:$U(404),decodeResult:$U(385),decodeSuccess:e=>mE(e,"binding.http.workflow.retire_definition","schema.workflow.retire_definition.result",1,["completed","timed_out","failed","effect_unknown","partial"],{mode:"not_cancellable"},"durable_effect","required",$U(385))},{operation:"workflow_start_run",operationId:"operation.workflow.start_run",transport:{kind:"http",route:"/application/workflow/start-run",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.workflow.start_run",requestSchema:{schemaId:"schema.workflow.start_run.request",revision:1},resultSchema:{schemaId:"schema.workflow.start_run.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","timed_out","failed","effect_unknown","partial"],decodeRequest:$U(405),decodeResult:$U(387),decodeSuccess:e=>mE(e,"binding.http.workflow.start_run","schema.workflow.start_run.result",1,["completed","timed_out","failed","effect_unknown","partial"],{mode:"not_cancellable"},"durable_effect","required",$U(387))},{operation:"workflow_validate_definition",operationId:"operation.workflow.validate_definition",transport:{kind:"http",route:"/application/workflow/validate-definition",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.workflow.validate_definition",requestSchema:{schemaId:"schema.workflow.validate_definition.request",revision:1},resultSchema:{schemaId:"schema.workflow.validate_definition.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:$U(406),decodeResult:$U(407),decodeSuccess:e=>mE(e,"binding.http.workflow.validate_definition","schema.workflow.validate_definition.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",$U(407))}];function $G(e){return"object"!=typeof e||null===e||Array.isArray(e)?void 0:e}let $B=["request_digest","run_id","state","task"],$K=new TextEncoder;class $J extends Error{cause;constructor(e,t){super(e),this.name=new.target.name,this.cause=t}}class $Z extends $J{constructor(e){super("the caller aborted the request",e)}}class $Q extends $J{}class $X extends $J{status;constructor(e){super(401===e?"the daemon rejected HTTP authentication":"the daemon rejected the HTTP origin"),this.status=e}}class $Y extends Error{status;payload;constructor(e,t={}){super(e),this.name=new.target.name,this.status=t.status,this.payload=t.payload}}class $1 extends $Y{}class $0 extends Error{status;envelope;problem;constructor(e,t){super(`${t.problem.kind}/${t.problem.code}: ${t.problem.message}`),this.name=new.target.name,this.status=e,this.envelope=t,this.problem=t.problem}}class $2 extends $0{}class $4 extends $0{}class $6 extends $0{}class $3 extends $0{}class $9 extends $0{}class $5 extends $0{}class $8 extends $0{}class $7 extends $0{}class Se extends $0{}class St extends $0{}class Sr extends $0{}let Si=new Set(["completed","cancelled","timed_out","failed","partial","effect_unknown"]),So=new TextEncoder;function Sn(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}function Sa(e){return"number"==typeof e&&Number.isSafeInteger(e)&&e>=0}function Ss(e){return"number"==typeof e&&Number.isSafeInteger(e)}function Sd(e,t){return"string"==typeof e&&e.length>0&&e.trim()===e&&So.encode(e).byteLength<=t&&!/\p{Cc}/u.test(e)}function Sc(e,t){let r=e.headers.get("content-type");return null!==r&&r.split(";",1)[0]?.trim().toLowerCase()===t}function Sl(e){return Sn(e)&&"string"==typeof e.code&&"string"==typeof e.message}function Sp(e){return!!Sn(e)&&!!Ss(e.started_at)&&!!Ss(e.ended_at)&&!(e.ended_at{if(""===e){if(c=!1,0===d.length)return a="",null;let e={event:""===a?"message":a,id:""===s?null:s,data:d.join("\n"),...void 0===r?{}:{retryDelayMs:r}};return a="",d=[],e}if(e.startsWith(":"))return null;c=!0;let t=e.indexOf(":"),i=t<0?e:e.slice(0,t),o=t<0?"":e.slice(t+1);switch(o.startsWith(" ")&&(o=o.slice(1)),i){case"event":a=o;break;case"id":o.includes("\0")||(s=o);break;case"data":d.push(o);break;case"retry":if(/^[0-9]+$/.test(o)){let e=BigInt(o);r=e>2147483647n?0x7fffffff:Number(e)}}return null},p=function*(e){for(;;){let t=-1;for(let e=0;e0||c||d.length>0)throw new $Q("operation stream ended with an incomplete SSE event")}catch(e){if(e instanceof $Y||e instanceof $J)throw e;throw new $Q("operation stream transport was interrupted",e)}finally{i.releaseLock()}}class Sh{operations;projectRoot;applicationRoot;token;origin;doFetch;mcp;constructor(e){let t=new URL(e.baseUrl);if("http:"!==t.protocol&&"https:"!==t.protocol||""!==t.username||""!==t.password||""!==t.search||""!==t.hash)throw new $Y("baseUrl must be an absolute HTTP URL without credentials, query, or fragment");let r=t.toString().replace(/\/+$/u,"");this.projectRoot=`${r}/projects/${encodeURIComponent(e.projectId)}`,this.applicationRoot=`${this.projectRoot}/application`,this.token=e.token,this.origin=e.origin??t.origin,this.doFetch=e.fetch??globalThis.fetch.bind(globalThis),this.mcp=e.mcp;let i={};for(let e of $H)i[e.operation]=(t,r)=>this.#r(e,t,r);this.operations=Object.freeze(i)}headers(e){return new Headers({accept:e,authorization:`Bearer ${this.token}`,origin:this.origin})}operationUrl(e,t){if(t?.size!==void 0&&(!Number.isSafeInteger(t.size)||t.size<1||t.size>1e3))throw new $Y("page size must be an integer between 1 and 1000");if(t?.cursor!==void 0&&!Sd(t.cursor,4096))throw new $Y("page cursor is not a canonical opaque cursor");let r=new URL(`${this.projectRoot}${e}`);return t?.size!==void 0&&r.searchParams.set("page_size",String(t.size)),t?.cursor!==void 0&&r.searchParams.set("cursor",t.cursor),r}lifecycleUrl(e,t){if(!Sd(e,512))throw new $Y("operationId is not a canonical request handle");return new URL(`${this.applicationRoot}/operations/${encodeURIComponent(e)}/${t}`)}async fetchResponse(e,t,r){try{return await this.doFetch(e,t)}catch(t){if(r?.aborted)throw new $Z(r.reason??t);throw new $Q(`transport failure requesting ${e.pathname}`,t)}}async readJson(e,t,r){if(401===e.status||403===e.status)throw new $X(e.status);if(!Sc(e,"application/json")){let t=await e.text();throw new $1("the daemon returned JSON with an invalid media type",{status:e.status,payload:t})}let i=Su(await e.text(),e.status);if(Sn(i)&&"problem"===i.kind){let o=i.value;if(!function(e){var t,r,i;if(!Sn(e)||void 0!==e.binding_id&&"string"!=typeof e.binding_id||!(Sn(t=e.contract)&&Sd(t.schema_id,512)&&Sa(t.schema_revision)&&t.schema_revision>0)||!Sd(e.request_id,512)||!Sn(e.problem))return!1;let o=e.problem,n=Array.isArray(o.legal_actions)?o.legal_actions:null,a="never"===o.retry?null:"same_request"===o.retry||"after_delay"===o.retry?"same_request":"after_revalidate"===o.retry?"fresh_request":"after_reconcile"===o.retry?"same_operation":void 0;if(!(1===o.revision&&"string"==typeof o.kind&&["invalid_request","not_found_or_not_authorized","conflict","partial_effect","stale","unsupported","unavailable","execution_failed","reset_required","saturated","cancelled","timed_out"].includes(o.kind)&&"string"==typeof o.code&&"string"==typeof o.message&&(null===o.diagnostic||Sl(o.diagnostic))&&"detail"in o&&(null===o.detail||function(e){if(!Sn(e))return!1;switch(e.kind){case"parked":return"string"==typeof e.cause&&"string"==typeof e.remedy&&"boolean"==typeof e.retries_on_wake;case"stale_refresh_frontier":return Sa(e.requested)&&Sa(e.committed)&&Sa(e.active);case"stale_precondition":return"string"==typeof e.field&&Sa(e.requested)&&Sa(e.current);case"lock_deadline":return"string"==typeof e.resource&&Sa(e.deadline_ms);case"diagnostics_unsupported":return(null===e.file||"string"==typeof e.file)&&Array.isArray(e.searched)&&e.searched.every(e=>Sn(e)&&"string"==typeof e.path&&"boolean"==typeof e.present);case"diagnostics_pending":return"string"==typeof e.producer&&(null===e.generation||"string"==typeof e.generation);case"code_graph_rewarming":return Sa(e.retry_after_millis);case"reset_required":return"string"==typeof e.authority&&(null===e.found_version||Ss(e.found_version))&&(null===e.required_version||Ss(e.required_version))&&"string"==typeof e.reason&&"string"==typeof e.remedy;default:return!1}}(o.detail))&&"committed_receipt"in o&&"string"==typeof o.owning_layer&&"string"==typeof o.terminality&&"boolean"==typeof o.retryable&&"string"==typeof o.retry&&(null===o.retry_scope||"string"==typeof o.retry_scope)&&(null===o.retry_after_millis||Sa(o.retry_after_millis))&&"cancellation_stage"in o&&(null===o.cancellation_stage||"string"==typeof o.cancellation_stage&&["before_admission","before_read","during_read","before_effect","effect_in_flight"].includes(o.cancellation_stage))&&"unavailable_classification"in o&&(null===o.unavailable_classification||"string"==typeof o.unavailable_classification&&["authority","backend_unavailable","backend_disconnected","backend_retryable"].includes(o.unavailable_classification))&&"execution_failure_classification"in o&&(null===o.execution_failure_classification||"string"==typeof o.execution_failure_classification&&["denied","malformed_output","permanent"].includes(o.execution_failure_classification))&&o.request_id===e.request_id&&Sd(o.trace_id,512)&&Array.isArray(o.details)&&o.details.every(Sl)&&null!==n&&n.every(e=>"string"==typeof e)&&"coverage"in o)||null===n)return!1;let s=null!==o.cancellation_stage&&"before_admission"!==o.cancellation_stage,d=null!==o.unavailable_classification&&"authority"!==o.unavailable_classification,c="partial_effect"===o.kind||"reset_required"===o.kind||"execution_failed"===o.kind||s||d;return o.terminality===(c?"admitted_terminal":"pre_admission")&&"unavailable"===o.kind==(null!==o.unavailable_classification)&&"execution_failed"===o.kind==(null!==o.execution_failure_classification)&&("cancelled"===o.kind||"timed_out"===o.kind)==(null!==o.cancellation_stage)&&null!==o.diagnostic===("string"==typeof o.kind&&["invalid_request","conflict","partial_effect","stale","unsupported","unavailable","execution_failed","reset_required","saturated"].includes(o.kind))&&(null===o.detail||!!("string"==typeof o.kind&&["stale","unsupported","unavailable","reset_required","saturated"].includes(o.kind)))&&o.retryable===("never"!==o.retry)&&void 0!==a&&o.retry_scope===a&&"after_delay"===o.retry==(null!==o.retry_after_millis)&&("partial_effect"===o.kind?"admitted_terminal"===o.terminality&&!1===o.retryable&&"never"===o.retry&&(r=o.committed_receipt,i=e.request_id,Sn(r)&&r.request_id===i&&"partial"===r.outcome&&"string"==typeof r.operation&&"string"==typeof r.effect_class&&"string"==typeof r.idempotency_key&&"string"==typeof r.input_digest&&("string"==typeof r.committed_state||"string"==typeof r.external_proof))&&1===n.length&&"reconcile"===n[0]:"reset_required"===o.kind?"admitted_terminal"===o.terminality&&!1===o.retryable&&"never"===o.retry&&null===o.committed_receipt&&1===n.length&&"reset"===n[0]:"unavailable"===o.kind&&"authority"!==o.unavailable_classification?"admitted_terminal"===o.terminality&&!0===o.retryable&&"after_revalidate"===o.retry&&null===o.committed_receipt&&1===n.length&&"retry"===n[0]:"execution_failed"===o.kind?"admitted_terminal"===o.terminality&&!1===o.retryable&&"never"===o.retry&&null===o.committed_receipt&&1===n.length&&"contact_administrator"===n[0]:null===o.committed_receipt)}(o))throw new $1("the daemon returned a malformed problem envelope",{status:e.status,payload:o});let n=void 0===t||("not_found_or_not_authorized"===o.problem.kind?void 0===o.binding_id:o.binding_id===t);if(e.ok||!n||void 0!==r&&o.request_id!==r||!function(e,t){switch(t){case"invalid_request":return 400===e;case"not_found_or_not_authorized":return 404===e;case"conflict":case"partial_effect":case"stale":return 409===e;case"unsupported":return 422===e;case"unavailable":case"reset_required":return 503===e;case"execution_failed":return 500===e;case"saturated":return 429===e;case"cancelled":return 408===e;case"timed_out":return 504===e;default:return!1}}(e.status,o.problem.kind))throw new $1("the daemon returned a malformed problem envelope",{status:e.status,payload:o});throw function(e,t){switch(t.problem.kind){case"not_found_or_not_authorized":return new $2(e,t);case"unavailable":return new $4(e,t);case"unsupported":return new $6(e,t);case"stale":return new $3(e,t);case"conflict":return new $9(e,t);case"partial_effect":return new $5(e,t);case"reset_required":return new $8(e,t);case"saturated":return new $7(e,t);case"cancelled":return new Se(e,t);case"timed_out":return new St(e,t);case"invalid_request":return new Sr(e,t);default:return new $0(e,t)}}(e.status,o)}return i}async #r(e,t,r={}){var i,o,n,a;let s=e.decodeRequest(t);if("http"!==e.transport.kind){let t;if(void 0!==r.page||void 0!==r.deadlineMicros||void 0!==r.requestId)throw new $Y(`${e.operation} does not accept HTTP transport options`);if(void 0===this.mcp)throw new $J(`${e.operation} requires an MCP tool adapter`);try{t=await this.mcp.callTool(e.transport.toolName,s,{signal:r.signal})}catch(t){if(r.signal?.aborted)throw new $Z(r.signal.reason??t);throw new $J(`MCP tool ${e.transport.toolName} failed`,t)}try{return e.decodeResult(t)}catch(r){throw new $1(`MCP tool ${e.transport.toolName} returned an invalid ${e.operation} result`,{payload:{response:t,cause:r}})}}let d=this.operationUrl(e.transport.route,r.page),c=JSON.stringify(s);if(void 0===c)throw new $Y(`${e.operation} request decoder returned a non-JSON value`);let l=this.headers("application/json");l.set("content-type","application/json");let p=(i=l,o=e,void 0!==(n=r).deadlineMicros&&(!Number.isSafeInteger(n.deadlineMicros)||n.deadlineMicros<=0)?"deadlineMicros must be a positive safe integer":"required"===o.requestIdControl&&void 0===n.requestId?`${o.operation} requires a stable requestId replay handle`:"server_minted"===o.requestIdControl&&void 0!==n.requestId?`${o.operation} uses a server-minted request ID`:void 0===n.requestId||(a=n.requestId).length>0&&a.trim()===a&&$K.encode(a).byteLength<=512&&!/\p{Cc}/u.test(a)?void(void 0!==n.deadlineMicros&&i.set("x-tracedecay-deadline-micros",String(n.deadlineMicros)),void 0!==n.requestId&&i.set("x-tracedecay-request-id",n.requestId)):"requestId is not a canonical request identity");if(void 0!==p)throw new $Y(p);let u=await this.fetchResponse(d,{method:e.transport.method,headers:l,body:c,signal:r.signal},r.signal),m=await this.readJson(u,e.bindingId,r.requestId);if(!Sn(m)||"success"!==m.kind)throw new $1("the daemon returned an unknown HTTP envelope",{status:u.status,payload:m});if(!u.ok)throw new $1("the daemon returned success with a failing HTTP status",{status:u.status,payload:m});try{let t=e.decodeSuccess(m.value);if(!(Sn(t)&&Sn(t.outcome)&&Sn(t.outcome.value)&&"payload"in t.outcome.value&&Sp(t.outcome.value.execution))||("evidence"===t.outcome.outcome?"completed"===t.outcome.value.execution.termination&&null===t.outcome.value.payload:"preview"!==t.outcome.outcome&&"effect"!==t.outcome.outcome))throw TypeError("decoded application success invariants are invalid");if(void 0!==r.requestId&&t.request_id!==r.requestId)throw TypeError("daemon returned a different application request ID");if("fact_store_curate_receipt"===e.resultSemantics&&!await async function(e,t){var r;let i=$G(e),o=$G(t),n=$G(o?.outcome),a=$G(n?.value),s=$G(a?.payload);if(void 0===i||void 0===o||n?.outcome!=="effect"||void 0===s||!("string"==typeof(r=o.request_id)&&r.length>0&&r.trim()===r&&new TextEncoder().encode(r).length<=512&&!/\p{Cc}/u.test(r))||Object.keys(s).sort().join(",")!==$B.join(",")||s.run_id!==o.request_id||"memory_curator"!==s.task||"started"!==s.state)return!1;let d=i.fact_review_limit??24,c=i.min_confidence_millionths??72e4;return"number"==typeof d&&!!Number.isSafeInteger(d)&&!(d<1)&&!(d>1e3)&&"number"==typeof c&&!!Number.isSafeInteger(c)&&!(c<0)&&!(c>1e6)&&s.request_digest===await async function(e){let t=await crypto.subtle.digest("SHA-256",new TextEncoder().encode(function e(t){return Array.isArray(t)?`[${t.map(e).join(",")}]`:null!==t&&"object"==typeof t?`{${Object.entries(t).sort(([e],[t])=>et)).map(([t,r])=>`${JSON.stringify(t)}:${e(r)}`).join(",")}}`:JSON.stringify(t)??"null"}(e)));return`sha256:${Array.from(new Uint8Array(t),e=>e.toString(16).padStart(2,"0")).join("")}`}(["tracedecay.automation-run.request-identity.v1",{kind:"memory_curator",options:{fact_review_limit:d,min_confidence_millionths:c}}])}(s,t))throw TypeError("automatic curation receipt invariants are invalid");return t}catch(t){throw new $1(`the daemon returned an invalid ${e.operation} success envelope`,{status:u.status,payload:{envelope:m.value,cause:t}})}}async *streamOperation(e,t={}){let r=t.resume?.resumeToken,i=t.resume?.nextSequence===void 0?void 0:function(e,t){let r;if("number"==typeof e){if(!Sa(e))throw new $Y(`${t} must be an unsigned safe integer`);r=BigInt(e)}else if("bigint"==typeof e)r=e;else if(/^[0-9]+$/.test(e))r=BigInt(e);else throw new $Y(`${t} must be unsigned decimal`);if(r<0n||r>0xffffffffffffffffn)throw new $Y(`${t} exceeds the canonical u64 range`);return r.toString()}(t.resume.nextSequence,"resume nextSequence");if(void 0!==r&&!Sd(r,4096))throw new $Y("resumeToken is not a canonical stream resume token");let o=t.maxReconnects??0;if(!Number.isSafeInteger(o)||o<0)throw new $Y("maxReconnects must be a non-negative integer");let n=0,a=void 0===i||"0"===i?void 0:(BigInt(i)-1n).toString(),s=0;for(;;){if(t.signal?.aborted)throw new $Z(t.signal.reason);let d=this.lifecycleUrl(e,"events");void 0!==i&&d.searchParams.set("next_sequence",i),void 0!==r&&d.searchParams.set("resume_token",r);let c=await this.fetchResponse(d,{method:"GET",headers:this.headers("text/event-stream"),signal:t.signal},t.signal);if(!c.ok||null===c.body)throw await this.readJson(c),new $1("the daemon did not open an SSE stream",{status:c.status});if(!Sc(c,"text/event-stream"))throw new $1("the daemon opened an operation stream with an invalid media type",{status:c.status});try{for await(let t of Sf(c.body)){void 0!==t.retryDelayMs&&(s=t.retryDelayMs);let o=function(e,t,r){let i=Su(e.data,t);if(!Sn(i)||"string"!=typeof i.event||i.event!==e.event||!Sn(i.data))throw new $1("the daemon returned a malformed SSE event",{status:t,payload:i});let o=i.event,n=i.data;if("open"===o){let e=n.frontier;if(n.correlation_id!==r||!Sn(e)||!Sa(e.next_sequence)||!Sa(e.retained_from_sequence)||null!==e.resume_token&&"string"!=typeof e.resume_token)throw new $1("the daemon returned a malformed SSE open frontier",{status:t,payload:i});return{event:{...i,event:o,data:n},frontier:{nextSequence:String(e.next_sequence),..."string"==typeof e.resume_token?{resumeToken:e.resume_token}:{}}}}if(!Sa(n.sequence)||null===e.id)throw new $1("the daemon returned an SSE event without a valid sequence",{status:t,payload:i});let a=String(n.sequence);if(e.id!==a)throw new $1("the SSE event ID does not match its canonical sequence",{status:t,payload:i});if("item"===o&&!("item"in n))throw new $1("the SSE item payload is missing",{status:t,payload:i});if("progress"===o&&(!Sa(n.completed)||null!==n.total&&!Sa(n.total)))throw new $1("the SSE progress payload is malformed",{status:t,payload:i});if("resume_gap"===o){let e=n.gap;if(!Sn(e)||!Sa(e.first_missing_sequence)||!Sa(e.last_missing_sequence)||e.first_missing_sequence>e.last_missing_sequence||!Sn(e.frontier)||!Sa(e.frontier.next_sequence)||!Sa(e.frontier.retained_from_sequence)||null!==e.frontier.resume_token&&"string"!=typeof e.frontier.resume_token)throw new $1("the SSE resume gap is malformed",{status:t,payload:i})}if(Si.has(o)){let e=n.terminal;if(!Sn(e)||!Sp(e.receipt))throw new $1("the SSE terminal event is malformed",{status:t,payload:i});if(e.termination!==o||e.receipt.termination!==o)throw new $1("the SSE terminal event is inconsistent",{status:t,payload:i})}return{event:{...i,event:o,data:n},sequence:a}}(t,c.status,e);if(void 0!==o.frontier&&(i=o.frontier.nextSequence,r=o.frontier.resumeToken),void 0!==o.sequence){if(void 0!==a&&BigInt(o.sequence)<=BigInt(a))continue;let e=void 0===a?void 0:Sm(a);if(void 0!==e&&o.sequence!==e)throw new $1("the daemon returned a non-contiguous SSE sequence",{status:c.status,payload:o.event});a=o.sequence,i=Sm(o.sequence)}if(yield{event:t.event,id:o.sequence??null,data:o.event},Si.has(t.event))return}}catch(e){if(e instanceof $Y)throw e;if(t.signal?.aborted)throw new $Z(t.signal.reason??e);if(n>=o){if(e instanceof $Q)throw e;throw new $Q(`operation stream disconnected after ${n} reconnects`,e)}}if(n>=o)throw new $Q(`operation stream ended before a terminal event after ${n} reconnects`);if(void 0===i||void 0===r)throw new $Q("operation stream ended before exposing a resumable frontier");n+=1,await async function(e,t){if(t?.aborted)throw new $Z(t.reason);await new Promise((r,i)=>{let o=setTimeout(()=>{t?.removeEventListener("abort",n),r()},e),n=()=>{clearTimeout(o),i(new $Z(t?.reason))};t?.addEventListener("abort",n,{once:!0})})}(s,t.signal)}}async cancelOperation(e,t={}){let r=await this.fetchResponse(this.lifecycleUrl(e,"cancel"),{method:"POST",headers:this.headers("application/json"),signal:t.signal},t.signal),i=await this.readJson(r);if(!Sn(i))throw new $1("the daemon returned a malformed cancellation response",{status:r.status,payload:i});let o=i.status,n="requested"===o&&202===r.status||("already_requested"===o||"already_terminal"===o)&&200===r.status;if(!r.ok||"requested"!==o&&"already_requested"!==o&&"already_terminal"!==o||!n)throw new $1("the daemon returned a malformed cancellation response",{status:r.status,payload:i});return{...i,status:o}}}function Sy(e){let t=$H.find(t=>t.operation===e);if(void 0===t||"mcp_tool"!==t.transport.kind)throw TypeError(`${e} is not an MCP-backed operation in the canonical catalog`);return t}let Sg=Sy("project_list"),S_=Sy("project_context");class Sv{#i;constructor(e){this.#i=e}projectList(e,t){return this.#o(Sg,e,t)}projectContext(e,t){return this.#o(S_,e,t)}async #o(e,t,r){let i,o=e.transport.toolName,n=e.decodeRequest(t);try{i=await this.#i(o,n,r)}catch(e){if(r?.aborted)throw new $Z(r.reason??e);throw new $J(`MCP tool ${o} failed`,e)}try{return e.decodeResult(i)}catch(t){throw new $1(`MCP tool ${o} returned an invalid ${e.operation} result`,{payload:{response:i,cause:t}})}}}var Sb=Object.create,S$=Object.defineProperty,SS=Object.getOwnPropertyDescriptor,Sk=Object.getOwnPropertyNames,Sw=Object.getPrototypeOf,SR=Object.prototype.hasOwnProperty,SP=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);let SV=new Set(["https://json-schema.org/draft/2020-12/schema","http://json-schema.org/draft/2020-12/schema"]),Sq=new Set(["https://json-schema.org/draft/2019-09/schema","http://json-schema.org/draft/2019-09/schema"]),SI=new Set(["https://json-schema.org/draft-07/schema","http://json-schema.org/draft-07/schema"]),Sx=new Set(["https://json-schema.org/draft-06/schema","http://json-schema.org/draft-06/schema"]),Sj=["2025-11-25","2025-06-18","2025-03-26","2024-11-05","2024-10-07"],SC="io.modelcontextprotocol/protocolVersion",ST="io.modelcontextprotocol/clientInfo",SO="io.modelcontextprotocol/serverInfo",SE="io.modelcontextprotocol/clientCapabilities",SA="io.modelcontextprotocol/subscriptionId",SM="io.modelcontextprotocol/logLevel",SW=aa(()=>nL([o7(),nR(),nI(),nj(),nJ(o7(),SW),nW(SW)])),SN=nJ(o7(),SW),Sz=nW(SW),SD=nL([o7(),nR().int()]),SF=o7(),SL=nz({ttl:nR().optional()}),SU=nz({taskId:o7()}),SH=nD({progressToken:SD.optional(),"io.modelcontextprotocol/related-task":SU.optional()}),SG=nz({_meta:SH.optional()}),SB=SG.extend({task:SL.optional()}),SK=nz({method:o7(),params:SG.loose().optional()}),SJ=nz({_meta:SH.optional()}),SZ=nz({method:o7(),params:SJ.loose().optional()}),SQ=nD({get[SO](){return kr.optional().catch(void 0)}}),SX=nD({_meta:SQ.optional()}),SY=nL([o7(),nR().int()]),S1=nz({jsonrpc:nY("2.0"),id:SY,...SK.shape}).strict(),S0=nz({jsonrpc:nY("2.0"),...SZ.shape}).strict(),S2=nz({jsonrpc:nY("2.0"),id:SY,result:SX}).strict(),S4=nz({jsonrpc:nY("2.0"),id:SY.optional(),error:nz({code:nR().int(),message:o7(),data:nE().optional()})}).strict(),S6=nL([S1,S0,S2,S4]),S3=nL([S2,S4]),S9=SX.strict(),S5=SJ.extend({requestId:SY.optional(),reason:o7().optional()}),S8=SZ.extend({method:nY("notifications/cancelled"),params:S5}),S7=nz({src:o7(),mimeType:o7().optional(),sizes:nW(o7()).optional(),theme:nQ(["light","dark"]).optional()}),ke=nz({icons:nW(S7).optional()}),kt=nz({name:o7(),title:o7().optional()}),kr=kt.extend({...kt.shape,...ke.shape,version:o7(),websiteUrl:o7().optional(),description:o7().optional()}),ki=nB(nz({applyDefaults:nI().optional()}),SN),ko=ad(e=>e&&"object"==typeof e&&!Array.isArray(e)&&0===Object.keys(e).length?{form:{}}:e,nB(nz({form:ki.optional(),url:SN.optional()}),SN.optional())),kn=nD({list:SN.optional(),cancel:SN.optional(),requests:nD({sampling:nD({createMessage:SN.optional()}).optional(),elicitation:nD({create:SN.optional()}).optional()}).optional()}),ka=nD({list:SN.optional(),cancel:SN.optional(),requests:nD({tools:nD({call:SN.optional()}).optional()}).optional()}),ks=nz({experimental:nJ(o7(),SN).optional(),sampling:nz({context:SN.optional(),tools:SN.optional()}).optional(),elicitation:ko.optional(),roots:nz({listChanged:nI().optional()}).optional(),tasks:kn.optional(),extensions:nJ(o7(),SN).optional()}),kd=SG.extend({protocolVersion:o7(),capabilities:ks,clientInfo:kr}),kc=SK.extend({method:nY("initialize"),params:kd}),kl=nz({experimental:nJ(o7(),SN).optional(),logging:SN.optional(),completions:SN.optional(),prompts:nz({listChanged:nI().optional()}).optional(),resources:nz({subscribe:nI().optional(),listChanged:nI().optional()}).optional(),tools:nz({listChanged:nI().optional()}).optional(),tasks:ka.optional(),extensions:nJ(o7(),SN).optional()}),kp=SX.extend({protocolVersion:o7(),capabilities:kl,serverInfo:kr,instructions:o7().optional()}),ku=SZ.extend({method:nY("notifications/initialized"),params:SJ.optional()}),km=SK.extend({method:nY("server/discover"),params:SG.optional()}),kf=SX.extend({supportedVersions:nW(o7()),capabilities:kl,instructions:o7().optional()}),kh=SK.extend({method:nY("ping"),params:SG.optional()}),ky=nz({progress:nR(),total:n4(nR()),message:n4(o7())}),kg=nz({...SJ.shape,...ky.shape,progressToken:SD}),k_=SZ.extend({method:nY("notifications/progress"),params:kg}),kv=SG.extend({cursor:SF.optional()}),kb=SK.extend({params:kv.optional()}),k$=SX.extend({nextCursor:SF.optional()}),kS=nz({uri:o7(),mimeType:n4(o7()),_meta:nJ(o7(),nE()).optional()}),kk=kS.extend({text:o7()}),kw=o7().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:"Invalid Base64 string"}),kR=kS.extend({blob:kw}),kP=nQ(["user","assistant"]),kV=nz({audience:nW(kP).optional(),priority:nR().min(0).max(1).optional(),lastModified:ac({offset:!0}).optional()}),kq=nz({...kt.shape,...ke.shape,uri:o7(),description:n4(o7()),mimeType:n4(o7()),size:n4(nR()),annotations:kV.optional(),_meta:n4(nD({}))}),kI=nz({...kt.shape,...ke.shape,uriTemplate:o7(),description:n4(o7()),mimeType:n4(o7()),annotations:kV.optional(),_meta:n4(nD({}))}),kx=kb.extend({method:nY("resources/list")}),kj=k$.extend({resources:nW(kq)}),kC=kb.extend({method:nY("resources/templates/list")}),kT=k$.extend({resourceTemplates:nW(kI)}),kO=SG.extend({uri:o7()}),kE=SK.extend({method:nY("resources/read"),params:kO}),kA=SX.extend({contents:nW(nL([kk,kR]))}),kM=SZ.extend({method:nY("notifications/resources/list_changed"),params:SJ.optional()}),kW=SK.extend({method:nY("resources/subscribe"),params:kO}),kN=SK.extend({method:nY("resources/unsubscribe"),params:kO}),kz=nz({toolsListChanged:nI().optional(),promptsListChanged:nI().optional(),resourcesListChanged:nI().optional(),resourceSubscriptions:nW(o7()).optional()}),kD=SG.extend({notifications:kz}),kF=SK.extend({method:nY("subscriptions/listen"),params:kD}),kL=SJ.extend({notifications:kz}),kU=SZ.extend({method:nY("notifications/subscriptions/acknowledged"),params:kL}),kH=SQ.extend({[SA]:SY}),kG=SX.extend({_meta:kH}),kB=SJ.extend({uri:o7()}),kK=SZ.extend({method:nY("notifications/resources/updated"),params:kB}),kJ=nz({name:o7(),description:n4(o7()),required:n4(nI())}),kZ=nz({...kt.shape,...ke.shape,description:n4(o7()),arguments:n4(nW(kJ)),_meta:n4(nD({}))}),kQ=kb.extend({method:nY("prompts/list")}),kX=k$.extend({prompts:nW(kZ)}),kY=SG.extend({name:o7(),arguments:nJ(o7(),o7()).optional()}),k1=SK.extend({method:nY("prompts/get"),params:kY}),k0=nz({type:nY("text"),text:o7(),annotations:kV.optional(),_meta:nJ(o7(),nE()).optional()}),k2=nz({type:nY("image"),data:kw,mimeType:o7(),annotations:kV.optional(),_meta:nJ(o7(),nE()).optional()}),k4=nz({type:nY("audio"),data:kw,mimeType:o7(),annotations:kV.optional(),_meta:nJ(o7(),nE()).optional()}),k6=nz({type:nY("tool_use"),name:o7(),id:o7(),input:nJ(o7(),nE()),_meta:nJ(o7(),nE()).optional()}),k3=nz({type:nY("resource"),resource:nL([kk,kR]),annotations:kV.optional(),_meta:nJ(o7(),nE()).optional()}),k9=kq.extend({type:nY("resource_link")}),k5=nL([k0,k2,k4,k9,k3]),k8=nz({role:kP,content:k5}),k7=SX.extend({description:o7().optional(),messages:nW(k8)}),we=SZ.extend({method:nY("notifications/prompts/list_changed"),params:SJ.optional()}),wt=nz({title:o7().optional(),readOnlyHint:nI().optional(),destructiveHint:nI().optional(),idempotentHint:nI().optional(),openWorldHint:nI().optional()}),wr=nz({taskSupport:nQ(["required","optional","forbidden"]).optional()}),wi=nz({...kt.shape,...ke.shape,description:o7().optional(),inputSchema:nz({type:nY("object"),properties:nJ(o7(),SW).optional(),required:nW(o7()).optional()}).catchall(nE()),outputSchema:nD({$schema:o7().optional()}).optional(),annotations:wt.optional(),execution:wr.optional(),_meta:nJ(o7(),nE()).optional()}),wo=kb.extend({method:nY("tools/list")}),wn=k$.extend({tools:nW(wi)}),wa=SX.extend({content:nW(k5).default([]),structuredContent:nE().optional(),isError:nI().optional()}),ws=wa.or(SX.extend({toolResult:nE()})),wd=SB.extend({name:o7(),arguments:nJ(o7(),nE()).optional()}),wc=SK.extend({method:nY("tools/call"),params:wd}),wl=SZ.extend({method:nY("notifications/tools/list_changed"),params:SJ.optional()}),wp=nz({autoRefresh:nI().default(!0),debounceMs:nR().int().nonnegative().default(300)}),wu=nQ(["debug","info","notice","warning","error","critical","alert","emergency"]),wm=SG.extend({level:wu}),wf=SK.extend({method:nY("logging/setLevel"),params:wm}),wh=SJ.extend({level:wu,logger:o7().optional(),data:nE()}),wy=SZ.extend({method:nY("notifications/message"),params:wh}),wg=nz({name:o7().optional()}),w_=nz({hints:nW(wg).optional(),costPriority:nR().min(0).max(1).optional(),speedPriority:nR().min(0).max(1).optional(),intelligencePriority:nR().min(0).max(1).optional()}),wv=nz({mode:nQ(["auto","required","none"]).optional()}),wb=nz({type:nY("tool_result"),toolUseId:o7().describe("The unique identifier for the corresponding tool call."),content:nW(k5),structuredContent:nE().optional(),isError:nI().optional(),_meta:nJ(o7(),nE()).optional()}),w$=nH("type",[k0,k2,k4]),wS=nH("type",[k0,k2,k4,k6,wb]),wk=nz({role:kP,content:nL([wS,nW(wS)]),_meta:nJ(o7(),nE()).optional()}),ww=SB.extend({messages:nW(wk),modelPreferences:w_.optional(),systemPrompt:o7().optional(),includeContext:nQ(["none","thisServer","allServers"]).optional(),temperature:nR().optional(),maxTokens:nR().int(),stopSequences:nW(o7()).optional(),metadata:SN.optional(),tools:nW(wi).optional(),toolChoice:wv.optional()}),wR=SK.extend({method:nY("sampling/createMessage"),params:ww}),wP=SX.extend({model:o7(),stopReason:n4(nQ(["endTurn","stopSequence","maxTokens"]).or(o7())),role:kP,content:w$}),wV=SX.extend({model:o7(),stopReason:n4(nQ(["endTurn","stopSequence","maxTokens","toolUse"]).or(o7())),role:kP,content:nL([wS,nW(wS)])}),wq=nz({type:nY("boolean"),title:o7().optional(),description:o7().optional(),default:nI().optional()}),wI=nz({type:nY("string"),title:o7().optional(),description:o7().optional(),minLength:nR().optional(),maxLength:nR().optional(),format:nQ(["email","uri","date","date-time"]).optional(),default:o7().optional()}),wx=nz({type:nQ(["number","integer"]),title:o7().optional(),description:o7().optional(),minimum:nR().optional(),maximum:nR().optional(),default:nR().optional()}),wj=nz({type:nY("string"),title:o7().optional(),description:o7().optional(),enum:nW(o7()),default:o7().optional()}),wC=nz({type:nY("string"),title:o7().optional(),description:o7().optional(),oneOf:nW(nz({const:o7(),title:o7()})),default:o7().optional()}),wT=nz({type:nY("string"),title:o7().optional(),description:o7().optional(),enum:nW(o7()),enumNames:nW(o7()).optional(),default:o7().optional()}),wO=nL([wj,wC]),wE=nz({type:nY("array"),title:o7().optional(),description:o7().optional(),minItems:nR().optional(),maxItems:nR().optional(),items:nz({type:nY("string"),enum:nW(o7())}),default:nW(o7()).optional()}),wA=nz({type:nY("array"),title:o7().optional(),description:o7().optional(),minItems:nR().optional(),maxItems:nR().optional(),items:nz({anyOf:nW(nz({const:o7(),title:o7()}))}),default:nW(o7()).optional()}),wM=nL([wE,wA]),wW=nL([wT,wO,wM]),wN=nL([wW,wq,wI,wx]),wz=SB.extend({mode:nY("form").optional(),message:o7(),requestedSchema:nz({type:nY("object"),properties:nJ(o7(),wN),required:nW(o7()).optional()}).catchall(nE())}),wD=SB.extend({mode:nY("url"),message:o7(),elicitationId:o7(),url:o7().url()}),wF=nL([wz,wD]),wL=SK.extend({method:nY("elicitation/create"),params:wF}),wU=SJ.extend({elicitationId:o7()}),wH=SZ.extend({method:nY("notifications/elicitation/complete"),params:wU}),wG=SX.extend({action:nQ(["accept","decline","cancel"]),content:ad(e=>null===e?void 0:e,nJ(o7(),nL([o7(),nR(),nI(),nW(o7())])).optional())}),wB=nz({type:nY("ref/resource"),uri:o7()}),wK=nz({type:nY("ref/prompt"),name:o7()}),wJ=SG.extend({ref:nL([wK,wB]),argument:nz({name:o7(),value:o7()}),context:nz({arguments:nJ(o7(),o7()).optional()}).optional()}),wZ=SK.extend({method:nY("completion/complete"),params:wJ}),wQ=SX.extend({completion:nD({values:nW(o7()).max(100),total:n4(nR().int()),hasMore:n4(nI())})}),wX=nz({uri:o7().startsWith("file://"),name:o7().optional(),_meta:nJ(o7(),nE()).optional()}),wY=SK.extend({method:nY("roots/list"),params:SG.optional()}),w1=SX.extend({roots:nW(wX)}),w0=SZ.extend({method:nY("notifications/roots/list_changed"),params:SJ.optional()}),w2=nD({ttl:nR().optional(),pollInterval:nR().optional()}),w4=nQ(["working","input_required","completed","failed","cancelled"]),w6=nz({taskId:o7(),status:w4,ttl:nL([nR(),nj()]),createdAt:o7(),lastUpdatedAt:o7(),pollInterval:n4(nR()),statusMessage:n4(o7())}),w3=SX.extend({task:w6}),w9=SJ.merge(w6),w5=SZ.extend({method:nY("notifications/tasks/status"),params:w9}),w8=SK.extend({method:nY("tasks/get"),params:SG.extend({taskId:o7()})}),w7=SX.merge(w6),Re=SK.extend({method:nY("tasks/result"),params:SG.extend({taskId:o7()})}),Rt=SX.loose(),Rr=kb.extend({method:nY("tasks/list")}),Ri=k$.extend({tasks:nW(w6)}),Ro=SK.extend({method:nY("tasks/cancel"),params:SG.extend({taskId:o7()})}),Rn=SX.merge(w6),Ra=nL([kh,kc,km,wZ,wf,k1,kQ,kx,kC,kE,kW,kN,kF,wc,wo]),Rs=nL([S8,k_,ku,w0]),Rd=nL([S9,wP,wV,wG,w1]),Rc=nL([kh,wR,wL,wY]),Rl=nL([S8,k_,wy,kK,kM,wl,we,kU,wH]),Rp=nL([S9,kp,kf,wQ,k7,kX,kj,kT,kA,wa,wn,kG]),Ru=iR(nd,void 0).superRefine((e,t)=>{if(!URL.canParse(e))return t.addIssue({code:d2,message:"URL must be parseable",fatal:!0}),ta}).refine(e=>{let t=new URL(e);return"javascript:"!==t.protocol&&"data:"!==t.protocol&&"vbscript:"!==t.protocol},{message:"URL cannot use javascript:, data:, or vbscript: scheme"}),Rm=nD({resource:o7().url(),authorization_servers:nW(Ru).optional(),jwks_uri:o7().url().optional(),scopes_supported:nW(o7()).optional(),bearer_methods_supported:nW(o7()).optional(),resource_signing_alg_values_supported:nW(o7()).optional(),resource_name:o7().optional(),resource_documentation:o7().optional(),resource_policy_uri:o7().url().optional(),resource_tos_uri:o7().url().optional(),tls_client_certificate_bound_access_tokens:nI().optional(),authorization_details_types_supported:nW(o7()).optional(),dpop_signing_alg_values_supported:nW(o7()).optional(),dpop_bound_access_tokens_required:nI().optional()}),Rf=nD({issuer:o7(),authorization_endpoint:Ru,token_endpoint:Ru,registration_endpoint:Ru.optional(),scopes_supported:nW(o7()).optional(),response_types_supported:nW(o7()),response_modes_supported:nW(o7()).optional(),grant_types_supported:nW(o7()).optional(),token_endpoint_auth_methods_supported:nW(o7()).optional(),token_endpoint_auth_signing_alg_values_supported:nW(o7()).optional(),service_documentation:Ru.optional(),revocation_endpoint:Ru.optional(),revocation_endpoint_auth_methods_supported:nW(o7()).optional(),revocation_endpoint_auth_signing_alg_values_supported:nW(o7()).optional(),introspection_endpoint:o7().optional(),introspection_endpoint_auth_methods_supported:nW(o7()).optional(),introspection_endpoint_auth_signing_alg_values_supported:nW(o7()).optional(),code_challenge_methods_supported:nW(o7()).optional(),client_id_metadata_document_supported:nI().optional(),authorization_response_iss_parameter_supported:nI().optional().catch(void 0),dpop_signing_alg_values_supported:nW(o7()).optional()}),Rh=nD({issuer:o7(),authorization_endpoint:Ru,token_endpoint:Ru,userinfo_endpoint:Ru.optional(),jwks_uri:Ru,registration_endpoint:Ru.optional(),scopes_supported:nW(o7()).optional(),response_types_supported:nW(o7()),response_modes_supported:nW(o7()).optional(),grant_types_supported:nW(o7()).optional(),acr_values_supported:nW(o7()).optional(),subject_types_supported:nW(o7()),id_token_signing_alg_values_supported:nW(o7()),id_token_encryption_alg_values_supported:nW(o7()).optional(),id_token_encryption_enc_values_supported:nW(o7()).optional(),userinfo_signing_alg_values_supported:nW(o7()).optional(),userinfo_encryption_alg_values_supported:nW(o7()).optional(),userinfo_encryption_enc_values_supported:nW(o7()).optional(),request_object_signing_alg_values_supported:nW(o7()).optional(),request_object_encryption_alg_values_supported:nW(o7()).optional(),request_object_encryption_enc_values_supported:nW(o7()).optional(),token_endpoint_auth_methods_supported:nW(o7()).optional(),token_endpoint_auth_signing_alg_values_supported:nW(o7()).optional(),display_values_supported:nW(o7()).optional(),claim_types_supported:nW(o7()).optional(),claims_supported:nW(o7()).optional(),service_documentation:o7().optional(),claims_locales_supported:nW(o7()).optional(),ui_locales_supported:nW(o7()).optional(),claims_parameter_supported:nI().optional(),request_parameter_supported:nI().optional(),request_uri_parameter_supported:nI().optional(),require_request_uri_registration:nI().optional(),op_policy_uri:Ru.optional(),op_tos_uri:Ru.optional(),client_id_metadata_document_supported:nI().optional(),authorization_response_iss_parameter_supported:nI().optional().catch(void 0)}),Ry=nz({...Rh.shape,...Rf.pick({code_challenge_methods_supported:!0}).shape}),Rg=nz({access_token:o7(),id_token:o7().optional(),token_type:o7(),expires_in:d4().optional(),scope:o7().optional(),refresh_token:o7().optional(),issuer:o7().optional().catch(void 0)}).strip(),R_=nz({issued_token_type:nY("urn:ietf:params:oauth:token-type:id-jag"),access_token:o7(),token_type:o7().optional(),expires_in:nR().optional(),scope:o7().optional()}).strip(),Rv=nz({error:o7(),error_description:o7().optional(),error_uri:o7().optional()}),Rb=Ru.optional().or(nY("").transform(()=>void 0)),R$=nz({redirect_uris:nW(Ru),token_endpoint_auth_method:o7().optional(),grant_types:nW(o7()).optional(),response_types:nW(o7()).optional(),application_type:o7().optional(),client_name:o7().optional(),client_uri:Ru.optional(),logo_uri:Rb,scope:o7().optional(),contacts:nW(o7()).optional(),tos_uri:Rb,policy_uri:o7().optional(),jwks_uri:Ru.optional(),jwks:nT().optional(),software_id:o7().optional(),software_version:o7().optional(),software_statement:o7().optional()}).strip(),RS=nz({client_id:o7(),client_secret:o7().optional(),client_id_issued_at:nR().optional(),client_secret_expires_at:nR().optional(),issuer:o7().optional().catch(void 0)}).strip(),Rk=R$.merge(RS),Rw=nz({error:o7(),error_description:o7().optional()}).strip(),RR=nz({token:o7(),token_type_hint:o7().optional()}).strip(),RP=Symbol.for("mcp.sdk.errorBrands");function RV(e,t){let r=new Set,i=t;for(;"function"==typeof i;){let e=i.mcpBrand;Object.prototype.hasOwnProperty.call(i,"mcpBrand")&&"string"==typeof e&&r.add(e),i=Object.getPrototypeOf(i)}0!==r.size&&Object.defineProperty(e,RP,{value:r,enumerable:!1,configurable:!0})}function Rq(e,t){try{if("object"==typeof t&&null!==t&&Object.prototype.hasOwnProperty.call(e,"mcpBrand")&&"string"==typeof e.mcpBrand&&Object.prototype.hasOwnProperty.call(t,RP)){let r=t[RP];if(r&&"function"==typeof r.has&&r.has(e.mcpBrand))return!0}}catch{}return Function.prototype[Symbol.hasInstance].call(e,t)}(class e extends Error{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.OAuthError"})}static[Symbol.hasInstance](e){return Rq(this,e)}static isInstance(e){if("function"!=typeof this)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return Rq(this,e)}constructor(e,t,r){super(t),this.code=e,this.errorUri=r,this.name="OAuthError",RV(this,new.target)}toResponseObject(){let e={error:this.code,error_description:this.message};return this.errorUri&&(e.error_uri=this.errorUri),e}static fromResponse(t){return new e(t.error,t.error_description??t.error,t.error_uri)}});let RI=((X={}).NotConnected="NOT_CONNECTED",X.AlreadyConnected="ALREADY_CONNECTED",X.NotInitialized="NOT_INITIALIZED",X.CapabilityNotSupported="CAPABILITY_NOT_SUPPORTED",X.RequestTimeout="REQUEST_TIMEOUT",X.ConnectionClosed="CONNECTION_CLOSED",X.SendFailed="SEND_FAILED",X.InvalidResult="INVALID_RESULT",X.UnsupportedResultType="UNSUPPORTED_RESULT_TYPE",X.InputRequiredRoundsExceeded="INPUT_REQUIRED_ROUNDS_EXCEEDED",X.ListPaginationExceeded="LIST_PAGINATION_EXCEEDED",X.MethodNotSupportedByProtocolVersion="METHOD_NOT_SUPPORTED_BY_PROTOCOL_VERSION",X.EraNegotiationFailed="ERA_NEGOTIATION_FAILED",X.ClientHttpNotImplemented="CLIENT_HTTP_NOT_IMPLEMENTED",X.ClientHttpAuthentication="CLIENT_HTTP_AUTHENTICATION",X.ClientHttpForbidden="CLIENT_HTTP_FORBIDDEN",X.ClientHttpUnexpectedContent="CLIENT_HTTP_UNEXPECTED_CONTENT",X.ClientHttpFailedToOpenStream="CLIENT_HTTP_FAILED_TO_OPEN_STREAM",X.ClientHttpFailedToTerminateSession="CLIENT_HTTP_FAILED_TO_TERMINATE_SESSION",X);var Rx=class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.SdkError"})}static[Symbol.hasInstance](e){return Rq(this,e)}static isInstance(e){if("function"!=typeof this)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return Rq(this,e)}constructor(e,t,r,i){super(t,i),this.code=e,this.data=r,this.name="SdkError",RV(this,new.target)}},Rj=class extends Rx{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.SdkHttpError"})}constructor(e,t,r,i){super(e,t,r,i),this.name="SdkHttpError"}get status(){return this.data.status}get statusText(){return this.data.statusText}};let RC="2026-07-28",RT=[RC];function RO(e){return e.filter(e=>!(e>=RC))}function RE(e){return e.filter(e=>e>=RC)}function RA(e){let t=e.structuredContent;return void 0===t||!("object"!=typeof t||null===t||Array.isArray(t))||e.content?.some(e=>"text"===e.type)?e:{...e,content:[...e.content??[],{type:"text",text:JSON.stringify(t)}]}}let RM=["task","inputRequests","requestState"];function RW(e){return null===e||"object"!=typeof e||Array.isArray(e)||void 0!==e.content||RM.some(t=>t in e)?e:{...e,content:[]}}function RN(){let e,t,r,i,o,n,a,s,c,l,p,u,m,f,h,y,g,_,v,b,$,S,k,w,R,P,V,q,I,x,j,C,T,O,E,A,M,W,N,z,D,F,L,U,H,G,B,K,J,Z,Q,X,Y,ee,et,er,ei,eo,en,ea,es,ed,ec,el,ep,eu,em,ef,eh,ey,eg,e_,ev,eb,e$,eS,ek,ew,eR,eP,eV,eq,eI,ex,ej,eC,eT,eO,eE,eA,eM,eW,eN,ez,eD,eF,eL,eU,eH,eG,eB,eK,eJ,eZ,eQ,eX,eY,e1,e0,e2,e4,e6,e3,e9,e5,e8,e7,te,tt,tr,ti,to,tn,ta,ts,td,tc,tl,tp,tu,tm,tf,th,ty,tg,t_,tv,tb,t$,tS;return d??=(e=aa(()=>nL([o7(),nR(),nI(),nj(),nJ(o7(),e),nW(e)])),t=nJ(o7(),e),r=nL([o7(),nR().int()]),i=o7(),o=nz({ttl:nR().optional()}),n=nz({taskId:o7()}),c=(s=nz({_meta:(a=nD({progressToken:r.optional(),"io.modelcontextprotocol/related-task":n.optional()})).optional()})).extend({task:o.optional()}),l=nz({method:o7(),params:s.loose().optional()}),p=nz({_meta:a.optional()}),u=nz({method:o7(),params:p.loose().optional()}),m=nD({_meta:a.optional()}),f=nL([o7(),nR().int()]),h=m.strict(),y=p.extend({requestId:f.optional(),reason:o7().optional()}),g=u.extend({method:nY("notifications/cancelled"),params:y}),_=nz({src:o7(),mimeType:o7().optional(),sizes:nW(o7()).optional(),theme:nQ(["light","dark"]).optional()}),v=nz({icons:nW(_).optional()}),$=(b=nz({name:o7(),title:o7().optional()})).extend({...b.shape,...v.shape,version:o7(),websiteUrl:o7().optional(),description:o7().optional()}),S=nB(nz({applyDefaults:nI().optional()}),t),k=ad(e=>e&&"object"==typeof e&&!Array.isArray(e)&&0===Object.keys(e).length?{form:{}}:e,nB(nz({form:S.optional(),url:t.optional()}),t.optional())),w=nD({list:t.optional(),cancel:t.optional(),requests:nD({sampling:nD({createMessage:t.optional()}).optional(),elicitation:nD({create:t.optional()}).optional()}).optional()}),R=nD({list:t.optional(),cancel:t.optional(),requests:nD({tools:nD({call:t.optional()}).optional()}).optional()}),P=nz({experimental:nJ(o7(),t).optional(),sampling:nz({context:t.optional(),tools:t.optional()}).optional(),elicitation:k.optional(),roots:nz({listChanged:nI().optional()}).optional(),tasks:w.optional(),extensions:nJ(o7(),t).optional()}),V=s.extend({protocolVersion:o7(),capabilities:P,clientInfo:$}),q=l.extend({method:nY("initialize"),params:V}),I=nz({experimental:nJ(o7(),t).optional(),logging:t.optional(),completions:t.optional(),prompts:nz({listChanged:nI().optional()}).optional(),resources:nz({subscribe:nI().optional(),listChanged:nI().optional()}).optional(),tools:nz({listChanged:nI().optional()}).optional(),tasks:R.optional(),extensions:nJ(o7(),t).optional()}),x=m.extend({protocolVersion:o7(),capabilities:I,serverInfo:$,instructions:o7().optional()}),j=u.extend({method:nY("notifications/initialized"),params:p.optional()}),C=l.extend({method:nY("ping"),params:s.optional()}),T=nz({progress:nR(),total:n4(nR()),message:n4(o7())}),O=nz({...p.shape,...T.shape,progressToken:r}),E=u.extend({method:nY("notifications/progress"),params:O}),A=s.extend({cursor:i.optional()}),M=l.extend({params:A.optional()}),W=m.extend({nextCursor:i.optional()}),z=(N=nz({uri:o7(),mimeType:n4(o7()),_meta:nJ(o7(),nE()).optional()})).extend({text:o7()}),D=o7().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:"Invalid Base64 string"}),F=N.extend({blob:D}),U=nz({audience:nW(L=nQ(["user","assistant"])).optional(),priority:nR().min(0).max(1).optional(),lastModified:ac({offset:!0}).optional()}),H=nz({...b.shape,...v.shape,uri:o7(),description:n4(o7()),mimeType:n4(o7()),size:n4(nR()),annotations:U.optional(),_meta:n4(nD({}))}),G=nz({...b.shape,...v.shape,uriTemplate:o7(),description:n4(o7()),mimeType:n4(o7()),annotations:U.optional(),_meta:n4(nD({}))}),B=M.extend({method:nY("resources/list")}),K=W.extend({resources:nW(H)}),J=M.extend({method:nY("resources/templates/list")}),Z=W.extend({resourceTemplates:nW(G)}),Q=s.extend({uri:o7()}),X=l.extend({method:nY("resources/read"),params:Q}),Y=m.extend({contents:nW(nL([z,F]))}),ee=u.extend({method:nY("notifications/resources/list_changed"),params:p.optional()}),et=l.extend({method:nY("resources/subscribe"),params:Q}),er=l.extend({method:nY("resources/unsubscribe"),params:Q}),ei=p.extend({uri:o7()}),eo=u.extend({method:nY("notifications/resources/updated"),params:ei}),en=nz({name:o7(),description:n4(o7()),required:n4(nI())}),ea=nz({...b.shape,...v.shape,description:n4(o7()),arguments:n4(nW(en)),_meta:n4(nD({}))}),es=M.extend({method:nY("prompts/list")}),ed=W.extend({prompts:nW(ea)}),ec=s.extend({name:o7(),arguments:nJ(o7(),o7()).optional()}),el=l.extend({method:nY("prompts/get"),params:ec}),ep=nz({type:nY("text"),text:o7(),annotations:U.optional(),_meta:nJ(o7(),nE()).optional()}),eu=nz({type:nY("image"),data:D,mimeType:o7(),annotations:U.optional(),_meta:nJ(o7(),nE()).optional()}),em=nz({type:nY("audio"),data:D,mimeType:o7(),annotations:U.optional(),_meta:nJ(o7(),nE()).optional()}),ef=nz({type:nY("tool_use"),name:o7(),id:o7(),input:nJ(o7(),nE()),_meta:nJ(o7(),nE()).optional()}),eh=nz({type:nY("resource"),resource:nL([z,F]),annotations:U.optional(),_meta:nJ(o7(),nE()).optional()}),e_=nz({role:L,content:eg=nL([ep,eu,em,ey=H.extend({type:nY("resource_link")}),eh])}),ev=m.extend({description:o7().optional(),messages:nW(e_)}),eb=u.extend({method:nY("notifications/prompts/list_changed"),params:p.optional()}),e$=nz({title:o7().optional(),readOnlyHint:nI().optional(),destructiveHint:nI().optional(),idempotentHint:nI().optional(),openWorldHint:nI().optional()}),eS=nz({taskSupport:nQ(["required","optional","forbidden"]).optional()}),ek=nz({...b.shape,...v.shape,description:o7().optional(),inputSchema:nz({type:nY("object"),properties:nJ(o7(),e).optional(),required:nW(o7()).optional()}).catchall(nE()),outputSchema:nz({type:nY("object"),properties:nJ(o7(),e).optional(),required:nW(o7()).optional()}).catchall(nE()).optional(),annotations:e$.optional(),execution:eS.optional(),_meta:nJ(o7(),nE()).optional()}),ew=M.extend({method:nY("tools/list")}),eR=W.extend({tools:nW(ek)}),eP=m.extend({content:nW(eg),structuredContent:nJ(o7(),nE()).optional(),isError:nI().optional()}),eV=c.extend({name:o7(),arguments:nJ(o7(),nE()).optional()}),eq=l.extend({method:nY("tools/call"),params:eV}),eI=u.extend({method:nY("notifications/tools/list_changed"),params:p.optional()}),ex=nQ(["debug","info","notice","warning","error","critical","alert","emergency"]),ej=s.extend({level:ex}),eC=l.extend({method:nY("logging/setLevel"),params:ej}),eT=p.extend({level:ex,logger:o7().optional(),data:nE()}),eO=u.extend({method:nY("notifications/message"),params:eT}),eE=nz({name:o7().optional()}),eA=nz({hints:nW(eE).optional(),costPriority:nR().min(0).max(1).optional(),speedPriority:nR().min(0).max(1).optional(),intelligencePriority:nR().min(0).max(1).optional()}),eM=nz({mode:nQ(["auto","required","none"]).optional()}),eW=nz({type:nY("tool_result"),toolUseId:o7().describe("The unique identifier for the corresponding tool call."),content:nW(eg),structuredContent:nz({}).loose().optional(),isError:nI().optional(),_meta:nJ(o7(),nE()).optional()}),eN=nH("type",[ep,eu,em]),eD=nz({role:L,content:nL([ez=nH("type",[ep,eu,em,ef,eW]),nW(ez)]),_meta:nJ(o7(),nE()).optional()}),eF=c.extend({messages:nW(eD),modelPreferences:eA.optional(),systemPrompt:o7().optional(),includeContext:nQ(["none","thisServer","allServers"]).optional(),temperature:nR().optional(),maxTokens:nR().int(),stopSequences:nW(o7()).optional(),metadata:t.optional(),tools:nW(ek).optional(),toolChoice:eM.optional()}),eL=l.extend({method:nY("sampling/createMessage"),params:eF}),eU=m.extend({model:o7(),stopReason:n4(nQ(["endTurn","stopSequence","maxTokens"]).or(o7())),role:L,content:eN}),eH=m.extend({model:o7(),stopReason:n4(nQ(["endTurn","stopSequence","maxTokens","toolUse"]).or(o7())),role:L,content:nL([ez,nW(ez)])}),eG=nz({type:nY("boolean"),title:o7().optional(),description:o7().optional(),default:nI().optional()}),eB=nz({type:nY("string"),title:o7().optional(),description:o7().optional(),minLength:nR().optional(),maxLength:nR().optional(),format:nQ(["email","uri","date","date-time"]).optional(),default:o7().optional()}),eK=nz({type:nQ(["number","integer"]),title:o7().optional(),description:o7().optional(),minimum:nR().optional(),maximum:nR().optional(),default:nR().optional()}),eJ=nz({type:nY("string"),title:o7().optional(),description:o7().optional(),enum:nW(o7()),default:o7().optional()}),eZ=nz({type:nY("string"),title:o7().optional(),description:o7().optional(),oneOf:nW(nz({const:o7(),title:o7()})),default:o7().optional()}),eQ=nz({type:nY("string"),title:o7().optional(),description:o7().optional(),enum:nW(o7()),enumNames:nW(o7()).optional(),default:o7().optional()}),eX=nL([eJ,eZ]),eY=nz({type:nY("array"),title:o7().optional(),description:o7().optional(),minItems:nR().optional(),maxItems:nR().optional(),items:nz({type:nY("string"),enum:nW(o7())}),default:nW(o7()).optional()}),e0=nL([eY,e1=nz({type:nY("array"),title:o7().optional(),description:o7().optional(),minItems:nR().optional(),maxItems:nR().optional(),items:nz({anyOf:nW(nz({const:o7(),title:o7()}))}),default:nW(o7()).optional()})]),e2=nL([eQ,eX,e0]),e4=nL([e2,eG,eB,eK]),e6=c.extend({mode:nY("form").optional(),message:o7(),requestedSchema:nz({type:nY("object"),properties:nJ(o7(),e4),required:nW(o7()).optional()}).catchall(nE())}),e9=nL([e6,e3=c.extend({mode:nY("url"),message:o7(),elicitationId:o7(),url:o7().url()})]),e5=l.extend({method:nY("elicitation/create"),params:e9}),e8=p.extend({elicitationId:o7()}),e7=u.extend({method:nY("notifications/elicitation/complete"),params:e8}),te=m.extend({action:nQ(["accept","decline","cancel"]),content:ad(e=>null===e?void 0:e,nJ(o7(),nL([o7(),nR(),nI(),nW(o7())])).optional())}),tt=nz({type:nY("ref/resource"),uri:o7()}),tr=nz({type:nY("ref/prompt"),name:o7()}),ti=s.extend({ref:nL([tr,tt]),argument:nz({name:o7(),value:o7()}),context:nz({arguments:nJ(o7(),o7()).optional()}).optional()}),to=l.extend({method:nY("completion/complete"),params:ti}),tn=m.extend({completion:nD({values:nW(o7()).max(100),total:n4(nR().int()),hasMore:n4(nI())})}),ta=nz({uri:o7().startsWith("file://"),name:o7().optional(),_meta:nJ(o7(),nE()).optional()}),ts=l.extend({method:nY("roots/list"),params:s.optional()}),td=m.extend({roots:nW(ta)}),tc=u.extend({method:nY("notifications/roots/list_changed"),params:p.optional()}),tl=nD({ttl:nR().optional(),pollInterval:nR().optional()}),tp=nQ(["working","input_required","completed","failed","cancelled"]),tu=nz({taskId:o7(),status:tp,ttl:nL([nR(),nj()]),createdAt:o7(),lastUpdatedAt:o7(),pollInterval:n4(nR()),statusMessage:n4(o7())}),tm=m.extend({task:tu}),tf=p.merge(tu),th=u.extend({method:nY("notifications/tasks/status"),params:tf}),ty=l.extend({method:nY("tasks/get"),params:s.extend({taskId:o7()})}),tg=m.merge(tu),t_=l.extend({method:nY("tasks/result"),params:s.extend({taskId:o7()})}),tv=m.loose(),tb=M.extend({method:nY("tasks/list")}),t$=W.extend({tasks:nW(tu)}),tS=l.extend({method:nY("tasks/cancel"),params:s.extend({taskId:o7()})}),{JSONValueSchema:e,JSONObjectSchema:t,ProgressTokenSchema:r,CursorSchema:i,TaskMetadataSchema:o,RelatedTaskMetadataSchema:n,RequestMetaSchema:a,BaseRequestParamsSchema:s,TaskAugmentedRequestParamsSchema:c,RequestSchema:l,NotificationsParamsSchema:p,NotificationSchema:u,ResultSchema:m,RequestIdSchema:f,EmptyResultSchema:h,CancelledNotificationParamsSchema:y,CancelledNotificationSchema:g,IconSchema:_,IconsSchema:v,BaseMetadataSchema:b,ImplementationSchema:$,ClientTasksCapabilitySchema:w,ServerTasksCapabilitySchema:R,ClientCapabilitiesSchema:P,InitializeRequestParamsSchema:V,InitializeRequestSchema:q,ServerCapabilitiesSchema:I,InitializeResultSchema:x,InitializedNotificationSchema:j,PingRequestSchema:C,ProgressSchema:T,ProgressNotificationParamsSchema:O,ProgressNotificationSchema:E,PaginatedRequestParamsSchema:A,PaginatedRequestSchema:M,PaginatedResultSchema:W,ResourceContentsSchema:N,TextResourceContentsSchema:z,BlobResourceContentsSchema:F,RoleSchema:L,AnnotationsSchema:U,ResourceSchema:H,ResourceTemplateSchema:G,ListResourcesRequestSchema:B,ListResourcesResultSchema:K,ListResourceTemplatesRequestSchema:J,ListResourceTemplatesResultSchema:Z,ResourceRequestParamsSchema:Q,ReadResourceRequestParamsSchema:Q,ReadResourceRequestSchema:X,ReadResourceResultSchema:Y,ResourceListChangedNotificationSchema:ee,SubscribeRequestParamsSchema:Q,SubscribeRequestSchema:et,UnsubscribeRequestParamsSchema:Q,UnsubscribeRequestSchema:er,ResourceUpdatedNotificationParamsSchema:ei,ResourceUpdatedNotificationSchema:eo,PromptArgumentSchema:en,PromptSchema:ea,ListPromptsRequestSchema:es,ListPromptsResultSchema:ed,GetPromptRequestParamsSchema:ec,GetPromptRequestSchema:el,TextContentSchema:ep,ImageContentSchema:eu,AudioContentSchema:em,ToolUseContentSchema:ef,EmbeddedResourceSchema:eh,ResourceLinkSchema:ey,ContentBlockSchema:eg,PromptMessageSchema:e_,GetPromptResultSchema:ev,PromptListChangedNotificationSchema:eb,ToolAnnotationsSchema:e$,ToolExecutionSchema:eS,ToolSchema:ek,ListToolsRequestSchema:ew,ListToolsResultSchema:eR,CallToolResultSchema:eP,CallToolRequestParamsSchema:eV,CallToolRequestSchema:eq,ToolListChangedNotificationSchema:eI,LoggingLevelSchema:ex,SetLevelRequestParamsSchema:ej,SetLevelRequestSchema:eC,LoggingMessageNotificationParamsSchema:eT,LoggingMessageNotificationSchema:eO,ModelHintSchema:eE,ModelPreferencesSchema:eA,ToolChoiceSchema:eM,ToolResultContentSchema:eW,SamplingContentSchema:eN,SamplingMessageContentBlockSchema:ez,SamplingMessageSchema:eD,CreateMessageRequestParamsSchema:eF,CreateMessageRequestSchema:eL,CreateMessageResultSchema:eU,CreateMessageResultWithToolsSchema:eH,BooleanSchemaSchema:eG,StringSchemaSchema:eB,NumberSchemaSchema:eK,UntitledSingleSelectEnumSchemaSchema:eJ,TitledSingleSelectEnumSchemaSchema:eZ,LegacyTitledEnumSchemaSchema:eQ,SingleSelectEnumSchemaSchema:eX,UntitledMultiSelectEnumSchemaSchema:eY,TitledMultiSelectEnumSchemaSchema:e1,MultiSelectEnumSchemaSchema:e0,EnumSchemaSchema:e2,PrimitiveSchemaDefinitionSchema:e4,ElicitRequestFormParamsSchema:e6,ElicitRequestURLParamsSchema:e3,ElicitRequestParamsSchema:e9,ElicitRequestSchema:e5,ElicitationCompleteNotificationParamsSchema:e8,ElicitationCompleteNotificationSchema:e7,ElicitResultSchema:te,ResourceTemplateReferenceSchema:tt,PromptReferenceSchema:tr,CompleteRequestParamsSchema:ti,CompleteRequestSchema:to,CompleteResultSchema:tn,RootSchema:ta,ListRootsRequestSchema:ts,ListRootsResultSchema:td,RootsListChangedNotificationSchema:tc,TaskCreationParamsSchema:tl,TaskStatusSchema:tp,TaskSchema:tu,CreateTaskResultSchema:tm,TaskStatusNotificationParamsSchema:tf,TaskStatusNotificationSchema:th,GetTaskRequestSchema:ty,GetTaskResultSchema:tg,GetTaskPayloadRequestSchema:t_,GetTaskPayloadResultSchema:tv,ListTasksRequestSchema:tb,ListTasksResultSchema:t$,CancelTaskRequestSchema:tS,CancelTaskResultSchema:m.merge(tu),ClientRequestSchema:nL([C,q,to,eC,el,es,B,J,X,et,er,eq,ew,ty,t_,tb,tS]),ClientNotificationSchema:nL([g,E,j,tc,th]),ClientResultSchema:nL([h,eU,eH,te,td,tg,t$,tm]),ServerRequestSchema:nL([C,eL,e5,ts,ty,t_,tb,tS]),ServerNotificationSchema:nL([g,E,eO,eo,ee,eI,eb,th,e7]),ServerResultSchema:nL([h,x,tn,ev,ed,K,Z,Y,eP,eR,tg,t$,tm]),CallToolResultWireSchema:nE().superRefine((e,t)=>{if(!("object"!=typeof e||null===e||Array.isArray(e))&&void 0===e.content){for(let r of RM)if(r in e)return void t.addIssue({code:"custom",message:`content is required when the body carries '${r}' — another result family cannot default into an empty tools/call success`})}}).transform(RW).pipe(eP)})}function Rz(e){return"object"!==e.type}let RD=new Set(["const","enum","default","examples"]),RF=new Set(["properties","patternProperties","$defs","definitions","dependentSchemas","dependencies"]);function RL(e){return void 0!==e&&!("string"==typeof e&&e.startsWith("#"))}let RU={ping:null,initialize:null,"completion/complete":null,"logging/setLevel":null,"prompts/get":null,"prompts/list":null,"resources/list":null,"resources/templates/list":null,"resources/read":null,"resources/subscribe":null,"resources/unsubscribe":null,"tools/call":null,"tools/list":null,"tasks/get":null,"tasks/result":null,"tasks/list":null,"tasks/cancel":null,"sampling/createMessage":null,"elicitation/create":null,"roots/list":null},RH={"notifications/cancelled":null,"notifications/progress":null,"notifications/initialized":null,"notifications/roots/list_changed":null,"notifications/tasks/status":null,"notifications/message":null,"notifications/resources/updated":null,"notifications/resources/list_changed":null,"notifications/tools/list_changed":null,"notifications/prompts/list_changed":null,"notifications/elicitation/complete":null},RG={ping:null,initialize:null,"completion/complete":null,"logging/setLevel":null,"prompts/get":null,"prompts/list":null,"resources/list":null,"resources/templates/list":null,"resources/read":null,"resources/subscribe":null,"resources/unsubscribe":null,"tools/call":null,"tools/list":null,"sampling/createMessage":null,"elicitation/create":null,"roots/list":null};function RB(){if(c)return c;let e=RN();return c={requestSchemas:{ping:e.PingRequestSchema,initialize:e.InitializeRequestSchema,"completion/complete":e.CompleteRequestSchema,"logging/setLevel":e.SetLevelRequestSchema,"prompts/get":e.GetPromptRequestSchema,"prompts/list":e.ListPromptsRequestSchema,"resources/list":e.ListResourcesRequestSchema,"resources/templates/list":e.ListResourceTemplatesRequestSchema,"resources/read":e.ReadResourceRequestSchema,"resources/subscribe":e.SubscribeRequestSchema,"resources/unsubscribe":e.UnsubscribeRequestSchema,"tools/call":e.CallToolRequestSchema,"tools/list":e.ListToolsRequestSchema,"tasks/get":e.GetTaskRequestSchema,"tasks/result":e.GetTaskPayloadRequestSchema,"tasks/list":e.ListTasksRequestSchema,"tasks/cancel":e.CancelTaskRequestSchema,"sampling/createMessage":e.CreateMessageRequestSchema,"elicitation/create":e.ElicitRequestSchema,"roots/list":e.ListRootsRequestSchema},notificationSchemas:{"notifications/cancelled":e.CancelledNotificationSchema,"notifications/progress":e.ProgressNotificationSchema,"notifications/initialized":e.InitializedNotificationSchema,"notifications/roots/list_changed":e.RootsListChangedNotificationSchema,"notifications/tasks/status":e.TaskStatusNotificationSchema,"notifications/message":e.LoggingMessageNotificationSchema,"notifications/resources/updated":e.ResourceUpdatedNotificationSchema,"notifications/resources/list_changed":e.ResourceListChangedNotificationSchema,"notifications/tools/list_changed":e.ToolListChangedNotificationSchema,"notifications/prompts/list_changed":e.PromptListChangedNotificationSchema,"notifications/elicitation/complete":e.ElicitationCompleteNotificationSchema},resultSchemas:{ping:e.EmptyResultSchema,initialize:e.InitializeResultSchema,"completion/complete":e.CompleteResultSchema,"logging/setLevel":e.EmptyResultSchema,"prompts/get":e.GetPromptResultSchema,"prompts/list":e.ListPromptsResultSchema,"resources/list":e.ListResourcesResultSchema,"resources/templates/list":e.ListResourceTemplatesResultSchema,"resources/read":e.ReadResourceResultSchema,"resources/subscribe":e.EmptyResultSchema,"resources/unsubscribe":e.EmptyResultSchema,"tools/call":e.CallToolResultWireSchema,"tools/list":e.ListToolsResultSchema,"sampling/createMessage":e.CreateMessageResultWithToolsSchema,"elicitation/create":e.ElicitResultSchema,"roots/list":e.ListRootsResultSchema}}}function RK(e){return Object.prototype.hasOwnProperty.call(RU,e)}function RJ(e){return Object.prototype.hasOwnProperty.call(RH,e)}function RZ(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)}function RQ(e,t){if(void 0===e)return{ok:!1,reason:"not-in-era"};let r=e.safeParse(t);return r.success?{ok:!0,value:r.data}:{ok:!1,reason:"invalid",message:String(r.error)}}Object.keys(RU),Object.keys(RH);let RX={ok:!1,reason:"not-in-era"};function RY(e){return RZ(e)&&RZ(e.outputSchema)&&Rz(e.outputSchema)}let R1={era:"2025-11-25",hasRequestMethod:RK,hasNotificationMethod:RJ,validateRequest:(e,t)=>RQ(RK(e)?RB().requestSchemas[e]:void 0,t),validateResult:(e,t)=>RQ(Object.prototype.hasOwnProperty.call(RG,e)?RB().resultSchemas[e]:void 0,t),validateNotification:(e,t)=>RQ(RJ(e)?RB().notificationSchemas[e]:void 0,t),hasInputRequestMethod:()=>!1,validateInputRequest:()=>RX,validateInputResponse:()=>RX,samplingResultVariant:(e,t)=>{let r=RN();return RQ(e?r.CreateMessageResultWithToolsSchema:r.CreateMessageResultSchema,t)},outboundEnvelope:e=>void 0,validateEnvelopeMeta:e=>[],projectCallToolResult(e,t){let r=RA(e),i=r.structuredContent;if(void 0===i)return r;let o="object"!=typeof i||null===i||Array.isArray(i),n=void 0!==t&&Rz(t);return o||n?{...r,structuredContent:{result:i}}:r},decodeResult(e,t){if(RZ(t)&&"resultType"in t){let e={...t};return delete e.resultType,{kind:"complete",result:e}}return{kind:"complete",result:t}},encodeResult(e,t){if("tools/list"!==e)return t;let r=t.tools;return Array.isArray(r)&&r.some(e=>RY(e))?{...t,tools:r.map(e=>RY(e)?{...e,outputSchema:function(e){var t;let r="string"==typeof e.$schema?e.$schema:void 0;if(RL(e.$id))return{...void 0!==r&&{$schema:r},type:"object",properties:{result:e},required:["result"]};let i="string"==typeof(t=e.$schema)&&Sq.has(t.replace(/#$/,""))&&!0!==e.$recursiveAnchor,o=(e,t)=>{if(Array.isArray(e))return e.map(e=>o(e,!1));if(null===e||"object"!=typeof e||!t&&RL(e.$id))return e;let r={},n=!1;for(let[a,s]of Object.entries(e))t?r[a]=o(s,!1):("$ref"===a||"$dynamicRef"===a)&&"string"==typeof s?r[a]="#"===s?"#/properties/result":s.startsWith("#/")?`#/properties/result${s.slice(1)}`:s:"$recursiveRef"===a&&"#"===s&&i?n=!0:RD.has(a)?r[a]=s:RF.has(a)?r[a]=o(s,!0):r[a]=o(s,!1);return n&&("$ref"in r?r.allOf=[...Array.isArray(r.allOf)?r.allOf:[],{$ref:"#/properties/result"}]:r.$ref="#/properties/result"),r};return{...void 0!==r&&{$schema:r},type:"object",properties:{result:o(e,!1)},required:["result"]}}(e.outputSchema)}:e)}:t},encodeErrorCode:e=>-32002===e?-32602:e,checkInboundEnvelope:e=>void 0};function R0(){return l??=function(){let e=aa(()=>nL([o7(),nR(),nI(),nj(),nJ(o7(),e),nW(e)])),t=nJ(o7(),e),r=nL([o7(),nR().int()]),i=o7(),o=nL([o7(),nR().int()]),n=nQ(["user","assistant"]),a=nQ(["debug","info","notice","warning","error","critical","alert","emergency"]),s=o7().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:"Invalid Base64 string"}),d=nz({ttl:nR().optional()}),c=nz({taskId:o7()}),l=nD({progressToken:r.optional(),"io.modelcontextprotocol/related-task":c.optional()}),p=nz({_meta:l.optional()}),u=p.extend({task:d.optional()}),m=nz({_meta:l.optional()}),f=nz({method:o7(),params:m.loose().optional()}),h=nz({src:o7(),mimeType:o7().optional(),sizes:nW(o7()).optional(),theme:nQ(["light","dark"]).optional()}),y=nz({icons:nW(h).optional()}),g=nz({name:o7(),title:o7().optional()}),_=g.extend({...g.shape,...y.shape,version:o7(),websiteUrl:o7().optional(),description:o7().optional()}),v=nB(nz({applyDefaults:nI().optional()}),t),b=ad(e=>e&&"object"==typeof e&&!Array.isArray(e)&&0===Object.keys(e).length?{form:{}}:e,nB(nz({form:v.optional(),url:t.optional()}),t.optional())),$=nD({list:t.optional(),cancel:t.optional(),requests:nD({sampling:nD({createMessage:t.optional()}).optional(),elicitation:nD({create:t.optional()}).optional()}).optional()}),S=nD({list:t.optional(),cancel:t.optional(),requests:nD({tools:nD({call:t.optional()}).optional()}).optional()}),k=nz({experimental:nJ(o7(),t).optional(),sampling:nz({context:t.optional(),tools:t.optional()}).optional(),elicitation:b.optional(),roots:nz({listChanged:nI().optional()}).optional(),tasks:$.optional(),extensions:nJ(o7(),t).optional()}),w=nz({experimental:nJ(o7(),t).optional(),logging:t.optional(),completions:t.optional(),prompts:nz({listChanged:nI().optional()}).optional(),resources:nz({subscribe:nI().optional(),listChanged:nI().optional()}).optional(),tools:nz({listChanged:nI().optional()}).optional(),tasks:S.optional(),extensions:nJ(o7(),t).optional()}),R=nz({progress:nR(),total:n4(nR()),message:n4(o7())}),P=nz({...m.shape,...R.shape,progressToken:r}),V=f.extend({method:nY("notifications/progress"),params:P}),q=m.extend({level:a,logger:o7().optional(),data:nE()}),I=f.extend({method:nY("notifications/message"),params:q}),x=nz({uri:o7(),mimeType:n4(o7()),_meta:nJ(o7(),nE()).optional()}),j=x.extend({text:o7()}),C=x.extend({blob:s}),T=nz({audience:nW(n).optional(),priority:nR().min(0).max(1).optional(),lastModified:ac({offset:!0}).optional()}),O=nz({...g.shape,...y.shape,uri:o7(),description:n4(o7()),mimeType:n4(o7()),size:n4(nR()),annotations:T.optional(),_meta:n4(nD({}))}),E=nz({...g.shape,...y.shape,uriTemplate:o7(),description:n4(o7()),mimeType:n4(o7()),annotations:T.optional(),_meta:n4(nD({}))}),A=f.extend({method:nY("notifications/resources/list_changed"),params:m.optional()}),M=m.extend({uri:o7()}),W=f.extend({method:nY("notifications/resources/updated"),params:M}),N=nz({name:o7(),description:n4(o7()),required:n4(nI())}),z=nz({...g.shape,...y.shape,description:n4(o7()),arguments:n4(nW(N)),_meta:n4(nD({}))}),D=f.extend({method:nY("notifications/prompts/list_changed"),params:m.optional()}),F=nz({type:nY("text"),text:o7(),annotations:T.optional(),_meta:nJ(o7(),nE()).optional()}),L=nz({type:nY("image"),data:s,mimeType:o7(),annotations:T.optional(),_meta:nJ(o7(),nE()).optional()}),U=nz({type:nY("audio"),data:s,mimeType:o7(),annotations:T.optional(),_meta:nJ(o7(),nE()).optional()}),H=nz({type:nY("tool_use"),name:o7(),id:o7(),input:nJ(o7(),nE()),_meta:nJ(o7(),nE()).optional()}),G=nz({type:nY("resource"),resource:nL([j,C]),annotations:T.optional(),_meta:nJ(o7(),nE()).optional()}),B=O.extend({type:nY("resource_link")}),K=nL([F,L,U,B,G]),J=nz({role:n,content:K}),Z=nz({title:o7().optional(),readOnlyHint:nI().optional(),destructiveHint:nI().optional(),idempotentHint:nI().optional(),openWorldHint:nI().optional()}),Q=f.extend({method:nY("notifications/tools/list_changed"),params:m.optional()}),X=nz({name:o7().optional()}),Y=nz({hints:nW(X).optional(),costPriority:nR().min(0).max(1).optional(),speedPriority:nR().min(0).max(1).optional(),intelligencePriority:nR().min(0).max(1).optional()}),ee=nz({mode:nQ(["auto","required","none"]).optional()}),et=nz({type:nY("boolean"),title:o7().optional(),description:o7().optional(),default:nI().optional()}),er=nz({type:nY("string"),title:o7().optional(),description:o7().optional(),minLength:nR().optional(),maxLength:nR().optional(),format:nQ(["email","uri","date","date-time"]).optional(),default:o7().optional()}),ei=nz({type:nQ(["number","integer"]),title:o7().optional(),description:o7().optional(),minimum:nR().optional(),maximum:nR().optional(),default:nR().optional()}),eo=nz({type:nY("string"),title:o7().optional(),description:o7().optional(),enum:nW(o7()),default:o7().optional()}),en=nz({type:nY("string"),title:o7().optional(),description:o7().optional(),oneOf:nW(nz({const:o7(),title:o7()})),default:o7().optional()}),ea=nz({type:nY("string"),title:o7().optional(),description:o7().optional(),enum:nW(o7()),enumNames:nW(o7()).optional(),default:o7().optional()}),es=nL([eo,en]),ed=nz({type:nY("array"),title:o7().optional(),description:o7().optional(),minItems:nR().optional(),maxItems:nR().optional(),items:nz({type:nY("string"),enum:nW(o7())}),default:nW(o7()).optional()}),ec=nz({type:nY("array"),title:o7().optional(),description:o7().optional(),minItems:nR().optional(),maxItems:nR().optional(),items:nz({anyOf:nW(nz({const:o7(),title:o7()}))}),default:nW(o7()).optional()}),el=nL([ed,ec]),ep=nL([ea,es,el]),eu=nL([ep,et,er,ei]),em=u.extend({mode:nY("form").optional(),message:o7(),requestedSchema:nz({type:nY("object"),properties:nJ(o7(),eu),required:nW(o7()).optional()}).catchall(nE())}),ef=nz({type:nY("ref/resource"),uri:o7()}),eh=nz({type:nY("ref/prompt"),name:o7()}),ey=nz({uri:o7().startsWith("file://"),name:o7().optional(),_meta:nJ(o7(),nE()).optional()}),eg=k.shape,e_=nz({experimental:eg.experimental,sampling:eg.sampling,elicitation:eg.elicitation,roots:eg.roots,extensions:eg.extensions}),ev=w.shape,eb=nz({experimental:ev.experimental,logging:ev.logging,completions:ev.completions,prompts:ev.prompts,resources:ev.resources,tools:ev.tools,extensions:ev.extensions}),e$=nD({progressToken:r.optional(),[SC]:o7(),[ST]:_.optional(),[SE]:e_,[SM]:a.optional()}),eS=nz({...g.shape,...y.shape,description:o7().optional(),inputSchema:nD({$schema:o7().optional(),type:nY("object")}),outputSchema:nD({$schema:o7().optional()}).optional(),annotations:Z.optional(),_meta:nJ(o7(),nE()).optional()}),ek=nz({type:nY("tool_result"),toolUseId:o7(),content:nW(K),structuredContent:nE().optional(),isError:nI().optional(),_meta:nJ(o7(),nE()).optional()}),ew=nL([F,L,U,H,ek]),eR=nz({role:n,content:nL([ew,nW(ew)]),_meta:nJ(o7(),nE()).optional()}),eP=o7(),eV=nD({[SO]:_.optional().catch(void 0)}),eq=eV.optional();function eI(e){return nD({_meta:eq,resultType:eP.default("complete"),...e})}let ex=eI({}),ej=eI({nextCursor:i.optional()}),eC=eI({content:nW(K),structuredContent:nE().optional(),isError:nI().optional()}),eT=eI({ttlMs:nR().int().min(0),cacheScope:nQ(["public","private"]),tools:nW(eS),nextCursor:i.optional()}),eO=eI({ttlMs:nR().int().min(0),cacheScope:nQ(["public","private"]),prompts:nW(z),nextCursor:i.optional()}),eE=eI({description:o7().optional(),messages:nW(J)}),eA=eI({ttlMs:nR().int().min(0),cacheScope:nQ(["public","private"]),resources:nW(O),nextCursor:i.optional()}),eM=eI({ttlMs:nR().int().min(0),cacheScope:nQ(["public","private"]),resourceTemplates:nW(E),nextCursor:i.optional()}),eW=eI({ttlMs:nR().int().min(0),cacheScope:nQ(["public","private"]),contents:nW(nL([j,C]))}),eN=eI({completion:nz({values:nW(o7()).max(100),total:nR().int().optional(),hasMore:nI().optional()}).loose()}),ez=eI({ttlMs:nR().int().min(0),cacheScope:nQ(["public","private"])}),eD=eI({ttlMs:nR().int().min(0).catch(0),cacheScope:nQ(["public","private"]).catch("private"),supportedVersions:nW(o7()),capabilities:eb,instructions:o7().optional()}),eF=nz({messages:nW(eR),modelPreferences:Y.optional(),systemPrompt:o7().optional(),includeContext:nQ(["none","thisServer","allServers"]).optional(),temperature:nR().optional(),maxTokens:nR().int(),stopSequences:nW(o7()).optional(),metadata:t.optional(),tools:nW(eS).optional(),toolChoice:ee.optional()}),eL=nz({method:nY("sampling/createMessage"),params:eF}),eU=nz({method:nY("roots/list"),params:nz({_meta:nJ(o7(),nE()).optional()}).optional()}),eH=nz({...eR.shape,model:o7(),stopReason:o7().optional()}),eG=nz({roots:nW(ey)}),eB=nz({action:nQ(["accept","decline","cancel"]),content:nJ(o7(),nL([o7(),nR(),nI(),nW(o7())])).optional()}),eK=nz({mode:nY("url"),message:o7(),url:o7().url()}),eJ=nL([em,eK]),eZ=nz({method:nY("elicitation/create"),params:eJ}),eQ=nL([eL,eU,eZ]),eX=nL([eH,eG,eB]),eY=nJ(o7(),eQ),e1=nJ(o7(),eX),e0=eI({inputRequests:eY.optional(),requestState:o7().optional()}),e2={inputResponses:e1.optional(),requestState:o7().optional()},e4=nz({_meta:e$,...e2}),e6=nD({progressToken:r.optional()});function e3(e,t){return nz({method:nY(e),params:nz({_meta:e$,...t})})}function e9(e,t){return nz({method:nY(e),params:nz({_meta:e6.optional(),...t}).optional()})}let e5={name:o7(),arguments:nJ(o7(),nE()).optional(),...e2},e8={cursor:i.optional()},e7=e3("tools/call",e5),te=e3("tools/list",e8),tt=e3("prompts/list",e8),tr=e3("prompts/get",{name:o7(),arguments:nJ(o7(),o7()).optional(),...e2}),ti=e3("resources/list",e8),to=e3("resources/templates/list",e8),tn=e3("resources/read",{uri:o7(),...e2}),ta={ref:nL([eh,ef]),argument:nz({name:o7(),value:o7()}),context:nz({arguments:nJ(o7(),o7()).optional()}).optional()},ts=e3("completion/complete",ta),td=e3("server/discover",{}),tc=nz({toolsListChanged:nI().optional(),promptsListChanged:nI().optional(),resourcesListChanged:nI().optional(),resourceSubscriptions:nW(o7()).optional()}),tl={notifications:tc},tp=e3("subscriptions/listen",tl),tu=eV.extend({"io.modelcontextprotocol/subscriptionId":o}),tm=nD({_meta:tu,resultType:eP.default("complete")}),tf={"tools/call":e9("tools/call",e5),"tools/list":e9("tools/list",e8),"prompts/get":e9("prompts/get",{name:o7(),arguments:nJ(o7(),o7()).optional()}),"prompts/list":e9("prompts/list",e8),"resources/list":e9("resources/list",e8),"resources/templates/list":e9("resources/templates/list",e8),"resources/read":e9("resources/read",{uri:o7()}),"completion/complete":e9("completion/complete",ta),"server/discover":e9("server/discover",{}),"subscriptions/listen":e9("subscriptions/listen",tl)};function th(e){return nD({_meta:eq,...e})}let ty={"tools/call":th({content:nW(K),structuredContent:nE().optional(),isError:nI().optional()}),"tools/list":th({ttlMs:nR().int().min(0),cacheScope:nQ(["public","private"]),tools:nW(eS),nextCursor:i.optional()}),"prompts/get":th({description:o7().optional(),messages:nW(J)}),"prompts/list":th({ttlMs:nR().int().min(0),cacheScope:nQ(["public","private"]),prompts:nW(z),nextCursor:i.optional()}),"resources/list":th({ttlMs:nR().int().min(0),cacheScope:nQ(["public","private"]),resources:nW(O),nextCursor:i.optional()}),"resources/templates/list":th({ttlMs:nR().int().min(0),cacheScope:nQ(["public","private"]),resourceTemplates:nW(E),nextCursor:i.optional()}),"resources/read":th({ttlMs:nR().int().min(0),cacheScope:nQ(["public","private"]),contents:nW(nL([j,C]))}),"completion/complete":th({completion:nz({values:nW(o7()).max(100),total:nR().int().optional(),hasMore:nI().optional()}).loose()}),"server/discover":th({ttlMs:nR().int().min(0).catch(0),cacheScope:nQ(["public","private"]).catch("private"),supportedVersions:nW(o7()),capabilities:eb,instructions:o7().optional()}),"subscriptions/listen":th({})},tg=nD({"io.modelcontextprotocol/subscriptionId":o.optional()}),t_=nz({method:nY("notifications/subscriptions/acknowledged"),params:nz({_meta:tg.optional(),notifications:tc})}),tv=nz({_meta:tg.optional(),requestId:o,reason:o7().optional()}),tb=nz({method:nY("notifications/cancelled"),params:tv}),t$=e=>nz({jsonrpc:nY("2.0"),id:nL([o7(),nR().int()]),result:e}).strict();return{JSONValueSchema:e,JSONObjectSchema:t,ProgressTokenSchema:r,CursorSchema:i,RequestIdSchema:o,RoleSchema:n,LoggingLevelSchema:a,TaskMetadataSchema:d,RelatedTaskMetadataSchema:c,RequestMetaSchema:l,BaseRequestParamsSchema:p,TaskAugmentedRequestParamsSchema:u,NotificationsParamsSchema:m,NotificationSchema:f,IconSchema:h,IconsSchema:y,BaseMetadataSchema:g,ImplementationSchema:_,ClientTasksCapabilitySchema:$,ServerTasksCapabilitySchema:S,ClientCapabilitiesSchema:k,ServerCapabilitiesSchema:w,ProgressSchema:R,ProgressNotificationParamsSchema:P,ProgressNotificationSchema:V,LoggingMessageNotificationParamsSchema:q,LoggingMessageNotificationSchema:I,ResourceContentsSchema:x,TextResourceContentsSchema:j,BlobResourceContentsSchema:C,AnnotationsSchema:T,ResourceSchema:O,ResourceTemplateSchema:E,ResourceListChangedNotificationSchema:A,ResourceUpdatedNotificationParamsSchema:M,ResourceUpdatedNotificationSchema:W,PromptArgumentSchema:N,PromptSchema:z,PromptListChangedNotificationSchema:D,TextContentSchema:F,ImageContentSchema:L,AudioContentSchema:U,ToolUseContentSchema:H,EmbeddedResourceSchema:G,ResourceLinkSchema:B,ContentBlockSchema:K,PromptMessageSchema:J,ToolAnnotationsSchema:Z,ToolListChangedNotificationSchema:Q,ModelHintSchema:X,ModelPreferencesSchema:Y,ToolChoiceSchema:ee,BooleanSchemaSchema:et,StringSchemaSchema:er,NumberSchemaSchema:ei,UntitledSingleSelectEnumSchemaSchema:eo,TitledSingleSelectEnumSchemaSchema:en,LegacyTitledEnumSchemaSchema:ea,SingleSelectEnumSchemaSchema:es,UntitledMultiSelectEnumSchemaSchema:ed,TitledMultiSelectEnumSchemaSchema:ec,MultiSelectEnumSchemaSchema:el,EnumSchemaSchema:ep,PrimitiveSchemaDefinitionSchema:eu,ElicitRequestFormParamsSchema:em,ResourceTemplateReferenceSchema:ef,PromptReferenceSchema:eh,RootSchema:ey,ClientCapabilities2026Schema:e_,ServerCapabilities2026Schema:eb,RequestMetaEnvelopeSchema:e$,ToolSchema:eS,ToolResultContentSchema:ek,SamplingMessageContentBlockSchema:ew,SamplingMessageSchema:eR,ResultTypeSchema:eP,ResultMetaSchema:eV,ResultSchema:ex,PaginatedResultSchema:ej,CallToolResultSchema:eC,ListToolsResultSchema:eT,ListPromptsResultSchema:eO,GetPromptResultSchema:eE,ListResourcesResultSchema:eA,ListResourceTemplatesResultSchema:eM,ReadResourceResultSchema:eW,CompleteResultSchema:eN,CacheableResultSchema:ez,DiscoverResultSchema:eD,CreateMessageRequestParamsSchema:eF,CreateMessageRequestSchema:eL,ListRootsRequestSchema:eU,CreateMessageResultSchema:eH,ListRootsResultSchema:eG,ElicitResultSchema:eB,ElicitRequestURLParamsSchema:eK,ElicitRequestParamsSchema:eJ,ElicitRequestSchema:eZ,InputRequestSchema:eQ,InputResponseSchema:eX,InputRequestsSchema:eY,InputResponsesSchema:e1,InputRequiredResultSchema:e0,InputResponseRequestParamsSchema:e4,CallToolRequestSchema:e7,ListToolsRequestSchema:te,ListPromptsRequestSchema:tt,GetPromptRequestSchema:tr,ListResourcesRequestSchema:ti,ListResourceTemplatesRequestSchema:to,ReadResourceRequestSchema:tn,CompleteRequestSchema:ts,DiscoverRequestSchema:td,SubscriptionFilterSchema:tc,SubscriptionsListenRequestSchema:tp,SubscriptionsListenResultMetaSchema:tu,SubscriptionsListenResultSchema:tm,dispatchRequestSchemas:tf,dispatchResultSchemas:ty,NotificationMetaSchema:tg,SubscriptionsAcknowledgedNotificationSchema:t_,CancelledNotificationParamsSchema:tv,CancelledNotificationSchema:tb,notificationSchemas2026:{"notifications/cancelled":tb,"notifications/progress":V,"notifications/message":I,"notifications/resources/updated":W,"notifications/resources/list_changed":A,"notifications/tools/list_changed":Q,"notifications/prompts/list_changed":D,"notifications/subscriptions/acknowledged":t_},JSONRPCResultResponseSchema:t$(ex),CallToolResultResponseSchema:t$(nL([eC,e0])),ListToolsResultResponseSchema:t$(eT),ListPromptsResultResponseSchema:t$(eO),GetPromptResultResponseSchema:t$(nL([eE,e0])),ListResourcesResultResponseSchema:t$(eA),ListResourceTemplatesResultResponseSchema:t$(eM),ReadResourceResultResponseSchema:t$(nL([eW,e0])),CompleteResultResponseSchema:t$(eN),DiscoverResultResponseSchema:t$(eD),SubscriptionsListenResultResponseSchema:t$(tm)}}()}let R2=["tools/list","prompts/list","resources/list","resources/templates/list","resources/read","server/discover"],R4=Symbol("modelcontextprotocol.resultCacheHintFallback");function R6(e){return"number"==typeof e&&Number.isSafeInteger(e)&&e>=0}function R3(e){return"public"===e||"private"===e}let R9=((Y={})[Y.ParseError=-32700]="ParseError",Y[Y.InvalidRequest=-32600]="InvalidRequest",Y[Y.MethodNotFound=-32601]="MethodNotFound",Y[Y.InvalidParams=-32602]="InvalidParams",Y[Y.InternalError=-32603]="InternalError",Y[Y.ResourceNotFound=-32002]="ResourceNotFound",Y[Y.MissingRequiredClientCapability=-32021]="MissingRequiredClientCapability",Y[Y.UnsupportedProtocolVersion=-32022]="UnsupportedProtocolVersion",Y[Y.UrlElicitationRequired=-32042]="UrlElicitationRequired",Y);var R5=class e extends Error{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.ProtocolError"})}static[Symbol.hasInstance](e){return Rq(this,e)}static isInstance(e){if("function"!=typeof this)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return Rq(this,e)}constructor(e,t,r){super(t),this.code=e,this.data=r,this.name="ProtocolError",RV(this,new.target)}static fromError(t,r,i){return t===R9.UrlElicitationRequired&&i&&i.elicitations?new R7(i.elicitations,r):t===R9.UnsupportedProtocolVersion&&i&&Array.isArray(i.supported)&&"string"==typeof i.requested?new Pe({supported:i.supported,requested:i.requested},r):(t===R9.InvalidParams||t===R9.ResourceNotFound)&&"string"==typeof i?.uri&&(t===R9.ResourceNotFound||1===Object.keys(i).length)?new R8(i.uri,r):t===R9.MissingRequiredClientCapability&&i&&null!==i.requiredCapabilities&&"object"==typeof i.requiredCapabilities&&!Array.isArray(i.requiredCapabilities)?new Pt({requiredCapabilities:i.requiredCapabilities},r):new e(t,r,i)}},R8=class extends R5{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.ResourceNotFoundError"})}constructor(e,t=`Resource not found: ${e}`){super(R9.InvalidParams,t,{uri:e})}get uri(){return this.data.uri}},R7=class extends R5{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.UrlElicitationRequiredError"})}constructor(e,t=`URL elicitation${e.length>1?"s":""} required`){super(R9.UrlElicitationRequired,t,{elicitations:e})}get elicitations(){return this.data?.elicitations??[]}},Pe=class extends R5{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.UnsupportedProtocolVersionError"})}constructor(e,t=`Unsupported protocol version: ${e.requested}`){super(R9.UnsupportedProtocolVersion,t,e)}get supported(){return this.data.supported}get requested(){return this.data.requested}},Pt=class extends R5{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.MissingRequiredClientCapabilityError"})}constructor(e,t=`Missing required client capabilities: ${Object.keys(e.requiredCapabilities).join(", ")}`){super(R9.MissingRequiredClientCapability,t,e)}get requiredCapabilities(){return this.data.requiredCapabilities}};let Pr=["tools/call","prompts/get","resources/read"],Pi=["elicitation/create","sampling/createMessage","roots/list"];function Po(){if(p)return p;let e=R0();return p={request:{"elicitation/create":nz({method:nY("elicitation/create"),params:e.ElicitRequestParamsSchema}),"sampling/createMessage":nz({method:nY("sampling/createMessage"),params:e.CreateMessageRequestParamsSchema}),"roots/list":nz({method:nY("roots/list"),params:nD({}).optional()})},response:{"elicitation/create":e.ElicitResultSchema,"sampling/createMessage":e.CreateMessageResultSchema,"roots/list":e.ListRootsResultSchema}}}function Pn(e){return Pi.includes(e)}function Pa(e){return Pn(e)?Po().request[e]:void 0}let Ps={"tools/call":null,"tools/list":null,"prompts/get":null,"prompts/list":null,"resources/list":null,"resources/templates/list":null,"resources/read":null,"completion/complete":null,"server/discover":null,"subscriptions/listen":null},Pd={"notifications/cancelled":null,"notifications/progress":null,"notifications/message":null,"notifications/resources/updated":null,"notifications/resources/list_changed":null,"notifications/tools/list_changed":null,"notifications/prompts/list_changed":null,"notifications/subscriptions/acknowledged":null};function Pc(e){return Object.prototype.hasOwnProperty.call(Ps,e)}function Pl(e){return Object.prototype.hasOwnProperty.call(Pd,e)}function Pp(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)}function Pu(e,t){if(void 0===e)return{ok:!1,reason:"not-in-era"};let r=e.safeParse(t);return r.success?{ok:!0,value:r.data}:{ok:!1,reason:"invalid",message:String(r.error)}}Object.keys(Ps),Object.keys(Pd);let Pm={ok:!1,reason:"not-in-era"},Pf=[SC,SE],Ph={era:"2026-07-28",hasRequestMethod:Pc,hasNotificationMethod:Pl,hasInputRequestMethod:e=>void 0!==Pa(e),validateRequest:(e,t)=>Pu(Pc(e)?R0().dispatchRequestSchemas[e]:void 0,t),validateResult:(e,t)=>Pu(Object.prototype.hasOwnProperty.call(Ps,e)?R0().dispatchResultSchemas[e]:void 0,t),validateNotification:(e,t)=>Pu(Pl(e)?R0().notificationSchemas2026[e]:void 0,t),validateInputRequest:(e,t)=>Pu(Pa(e),t),validateInputResponse:(e,t)=>Pu(Pn(e)?Po().response[e]:void 0,t),samplingResultVariant:()=>Pm,outboundEnvelope:e=>({[SC]:e.protocolVersion,[ST]:e.clientInfo,[SE]:e.clientCapabilities,...void 0!==e.logLevel&&{[SM]:e.logLevel}}),validateEnvelopeMeta(e){let t=[];for(let r of Pf)r in e||t.push({key:r,problem:"missing"});let r=R0().RequestMetaEnvelopeSchema.safeParse(e);if(!r.success)for(let e of r.error.issues){let r=e.path.map(String),i=r.length>0?r.join("."):"_meta";1===r.length&&t.some(e=>e.key===i&&"missing"===e.problem)||t.push({key:i,problem:e.message})}return t},projectCallToolResult:e=>RA(e),inputRequestSchema:Pa,decodeResult(e,t){if(!Pp(t))return{kind:"invalid",error:new Rx(RI.InvalidResult,`Invalid result for ${e}: not an object`,{method:e})};let r=t.resultType;if(void 0===r)return{kind:"invalid",error:new Rx(RI.InvalidResult,`Invalid result for ${e}: missing required resultType — servers implementing protocol revision 2026-07-28 MUST include it (the absent-means-complete bridge applies only to earlier-revision servers)`,{method:e,violation:"missing-resultType"})};if("string"!=typeof r)return{kind:"invalid",error:new Rx(RI.InvalidResult,`Invalid result for ${e}: non-string resultType`,{method:e,resultType:r})};if("input_required"===r){let r=t.inputRequests,i=Pp(r)?r:{},o=t.requestState,n=void 0===t._meta?void 0:R0().ResultMetaSchema.safeParse(t._meta),a=n?.success?n.data:void 0;return 0===Object.keys(i).length&&"string"!=typeof o?{kind:"invalid",error:new Rx(RI.InvalidResult,`Invalid result for ${e}: input_required carries neither inputRequests nor requestState (every input_required result must include at least one of the two)`,{method:e,violation:"input-required-missing-both"})}:{kind:"input_required",inputRequests:i,..."string"==typeof o&&{requestState:o},...void 0!==a&&{_meta:a}}}if("complete"!==r)return{kind:"invalid",error:new Rx(RI.UnsupportedResultType,`Unsupported result type '${r}' for ${e}`,{resultType:r,method:e})};let i=function(){if(u)return u;let e=R0();return u={"tools/call":e.CallToolResultSchema,"tools/list":e.ListToolsResultSchema,"prompts/get":e.GetPromptResultSchema,"prompts/list":e.ListPromptsResultSchema,"resources/list":e.ListResourcesResultSchema,"resources/templates/list":e.ListResourceTemplatesResultSchema,"resources/read":e.ReadResourceResultSchema,"completion/complete":e.CompleteResultSchema,"server/discover":e.DiscoverResultSchema}}(),o=Object.hasOwn(i,e)?i[e]:void 0;if(void 0!==o){let r=o.safeParse(t);if(!r.success)return{kind:"invalid",error:new Rx(RI.InvalidResult,`Invalid result for ${e}: ${r.error}`,{method:e})}}let n={...t};return delete n.resultType,{kind:"complete",result:n}},encodeResult:(e,t,r)=>(function(e,t){if(void 0===t)return e;let r=e._meta;return void 0===r?{...e,_meta:{[SO]:t}}:null===r||"object"!=typeof r||Array.isArray(r)||void 0!==r[SO]?e:{...e,_meta:{...r,[SO]:t}}})(function(e,t){var r,i;let o=t[R4];if("complete"!==t.resultType||!R2.includes(e)){let e;return void 0===o?t:(e={...t},delete e[R4],e)}let n=R6(t.ttlMs)?t.ttlMs:void 0!==(r=o)&&R6(r.ttlMs)?r.ttlMs:0,a=R3(t.cacheScope)?t.cacheScope:void 0!==(i=o)&&R3(i.cacheScope)?i.cacheScope:"private",s={...t,ttlMs:n,cacheScope:a};return delete s[R4],s}(e,function(e,t){let r=t.resultType;if(void 0===r)return{...t,resultType:"complete"};if("complete"===r||Pr.includes(e))return t;throw new R5(R9.InternalError,`Handler for ${e} returned resultType '${String(r)}', but results of ${e} only support 'complete' on protocol revision 2026-07-28`)}(e,function(e,t){let r=t,i=!1,o=()=>(i||(r={...r},i=!0),r),n=t.tools;"tools/list"===e&&Array.isArray(n)&&n.some(e=>Pp(e)&&"execution"in e)&&(o().tools=n.map(e=>{if(!Pp(e)||!("execution"in e))return e;let t={...e};return delete t.execution,t}));let a=t.capabilities;if(Pp(a)&&"tasks"in a){let e={...a};delete e.tasks,o().capabilities=e}return r}(e,t))),r),encodeErrorCode:e=>-32002===e?-32602:e,checkInboundEnvelope(e){if(void 0===e.envelope)return"Request is missing the required _meta envelope for protocol revision 2026-07-28 (io.modelcontextprotocol/protocolVersion, io.modelcontextprotocol/clientCapabilities)";let t=R0().RequestMetaEnvelopeSchema.safeParse(e.envelope);if(!t.success)return`Invalid _meta envelope for protocol revision 2026-07-28: ${t.error.issues.map(e=>e.message).join("; ")}`}},Py="2026-07-28";function Pg(e){return void 0!==e&&e>=RC?Ph:R1}function P_(e){return void 0!==e.revision?Pg(e.revision).era:"modern"===e.era?Ph.era:R1.era}function Pv(e){return PS.some(t=>t.hasRequestMethod(e))}function Pb(e){return PS.some(t=>t.hasNotificationMethod(e))}function P$(e){return"tasks/get"===e||"tasks/cancel"===e}let PS=[R1,Ph];var Pk=(e=>{let t={};for(var r in e)S$(t,r,{get:e[r],enumerable:!0});return t})({AnnotationsSchema:()=>kV,AudioContentSchema:()=>k4,BaseMetadataSchema:()=>kt,BaseRequestParamsSchema:()=>SG,BlobResourceContentsSchema:()=>kR,BooleanSchemaSchema:()=>wq,CallToolRequestParamsSchema:()=>wd,CallToolRequestSchema:()=>wc,CallToolResultSchema:()=>wa,CancelTaskRequestSchema:()=>Ro,CancelTaskResultSchema:()=>Rn,CancelledNotificationParamsSchema:()=>S5,CancelledNotificationSchema:()=>S8,ClientCapabilitiesSchema:()=>ks,ClientNotificationSchema:()=>Rs,ClientRequestSchema:()=>Ra,ClientResultSchema:()=>Rd,ClientTasksCapabilitySchema:()=>kn,CompatibilityCallToolResultSchema:()=>ws,CompleteRequestParamsSchema:()=>wJ,CompleteRequestSchema:()=>wZ,CompleteResultSchema:()=>wQ,ContentBlockSchema:()=>k5,CreateMessageRequestParamsSchema:()=>ww,CreateMessageRequestSchema:()=>wR,CreateMessageResultSchema:()=>wP,CreateMessageResultWithToolsSchema:()=>wV,CreateTaskResultSchema:()=>w3,CursorSchema:()=>SF,DiscoverRequestSchema:()=>km,DiscoverResultSchema:()=>kf,ElicitRequestFormParamsSchema:()=>wz,ElicitRequestParamsSchema:()=>wF,ElicitRequestSchema:()=>wL,ElicitRequestURLParamsSchema:()=>wD,ElicitResultSchema:()=>wG,ElicitationCompleteNotificationParamsSchema:()=>wU,ElicitationCompleteNotificationSchema:()=>wH,EmbeddedResourceSchema:()=>k3,EmptyResultSchema:()=>S9,EnumSchemaSchema:()=>wW,GetPromptRequestParamsSchema:()=>kY,GetPromptRequestSchema:()=>k1,GetPromptResultSchema:()=>k7,GetTaskPayloadRequestSchema:()=>Re,GetTaskPayloadResultSchema:()=>Rt,GetTaskRequestSchema:()=>w8,GetTaskResultSchema:()=>w7,IconSchema:()=>S7,IconsSchema:()=>ke,ImageContentSchema:()=>k2,ImplementationSchema:()=>kr,InitializeRequestParamsSchema:()=>kd,InitializeRequestSchema:()=>kc,InitializeResultSchema:()=>kp,InitializedNotificationSchema:()=>ku,JSONArraySchema:()=>Sz,JSONObjectSchema:()=>SN,JSONRPCErrorResponseSchema:()=>S4,JSONRPCMessageSchema:()=>S6,JSONRPCNotificationSchema:()=>S0,JSONRPCRequestSchema:()=>S1,JSONRPCResponseSchema:()=>S3,JSONRPCResultResponseSchema:()=>S2,JSONValueSchema:()=>SW,LegacyTitledEnumSchemaSchema:()=>wT,ListChangedOptionsBaseSchema:()=>wp,ListPromptsRequestSchema:()=>kQ,ListPromptsResultSchema:()=>kX,ListResourceTemplatesRequestSchema:()=>kC,ListResourceTemplatesResultSchema:()=>kT,ListResourcesRequestSchema:()=>kx,ListResourcesResultSchema:()=>kj,ListRootsRequestSchema:()=>wY,ListRootsResultSchema:()=>w1,ListTasksRequestSchema:()=>Rr,ListTasksResultSchema:()=>Ri,ListToolsRequestSchema:()=>wo,ListToolsResultSchema:()=>wn,LoggingLevelSchema:()=>wu,LoggingMessageNotificationParamsSchema:()=>wh,LoggingMessageNotificationSchema:()=>wy,ModelHintSchema:()=>wg,ModelPreferencesSchema:()=>w_,MultiSelectEnumSchemaSchema:()=>wM,NotificationSchema:()=>SZ,NotificationsParamsSchema:()=>SJ,NumberSchemaSchema:()=>wx,PaginatedRequestParamsSchema:()=>kv,PaginatedRequestSchema:()=>kb,PaginatedResultSchema:()=>k$,PingRequestSchema:()=>kh,PrimitiveSchemaDefinitionSchema:()=>wN,ProgressNotificationParamsSchema:()=>kg,ProgressNotificationSchema:()=>k_,ProgressSchema:()=>ky,ProgressTokenSchema:()=>SD,PromptArgumentSchema:()=>kJ,PromptListChangedNotificationSchema:()=>we,PromptMessageSchema:()=>k8,PromptReferenceSchema:()=>wK,PromptSchema:()=>kZ,ReadResourceRequestParamsSchema:()=>kO,ReadResourceRequestSchema:()=>kE,ReadResourceResultSchema:()=>kA,RelatedTaskMetadataSchema:()=>SU,RequestIdSchema:()=>SY,RequestMetaSchema:()=>SH,RequestSchema:()=>SK,ResourceContentsSchema:()=>kS,ResourceLinkSchema:()=>k9,ResourceListChangedNotificationSchema:()=>kM,ResourceRequestParamsSchema:()=>kO,ResourceSchema:()=>kq,ResourceTemplateReferenceSchema:()=>wB,ResourceTemplateSchema:()=>kI,ResourceUpdatedNotificationParamsSchema:()=>kB,ResourceUpdatedNotificationSchema:()=>kK,ResultMetaObjectSchema:()=>SQ,ResultSchema:()=>SX,RoleSchema:()=>kP,RootSchema:()=>wX,RootsListChangedNotificationSchema:()=>w0,SamplingContentSchema:()=>w$,SamplingMessageContentBlockSchema:()=>wS,SamplingMessageSchema:()=>wk,ServerCapabilitiesSchema:()=>kl,ServerNotificationSchema:()=>Rl,ServerRequestSchema:()=>Rc,ServerResultSchema:()=>Rp,ServerTasksCapabilitySchema:()=>ka,SetLevelRequestParamsSchema:()=>wm,SetLevelRequestSchema:()=>wf,SingleSelectEnumSchemaSchema:()=>wO,StringSchemaSchema:()=>wI,SubscribeRequestParamsSchema:()=>kO,SubscribeRequestSchema:()=>kW,SubscriptionFilterSchema:()=>kz,SubscriptionsAcknowledgedNotificationParamsSchema:()=>kL,SubscriptionsAcknowledgedNotificationSchema:()=>kU,SubscriptionsListenRequestParamsSchema:()=>kD,SubscriptionsListenRequestSchema:()=>kF,SubscriptionsListenResultMetaSchema:()=>kH,SubscriptionsListenResultSchema:()=>kG,TaskAugmentedRequestParamsSchema:()=>SB,TaskCreationParamsSchema:()=>w2,TaskMetadataSchema:()=>SL,TaskSchema:()=>w6,TaskStatusNotificationParamsSchema:()=>w9,TaskStatusNotificationSchema:()=>w5,TaskStatusSchema:()=>w4,TextContentSchema:()=>k0,TextResourceContentsSchema:()=>kk,TitledMultiSelectEnumSchemaSchema:()=>wA,TitledSingleSelectEnumSchemaSchema:()=>wC,ToolAnnotationsSchema:()=>wt,ToolChoiceSchema:()=>wv,ToolExecutionSchema:()=>wr,ToolListChangedNotificationSchema:()=>wl,ToolResultContentSchema:()=>wb,ToolSchema:()=>wi,ToolUseContentSchema:()=>k6,UnsubscribeRequestParamsSchema:()=>kO,UnsubscribeRequestSchema:()=>kN,UntitledMultiSelectEnumSchemaSchema:()=>wE,UntitledSingleSelectEnumSchemaSchema:()=>wj});let Pw=e=>"object"==typeof e&&null!==e&&!Array.isArray(e)&&"input_required"===e.resultType,PR="x-mcp-header",PP=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/,PV=new Set(["string","integer","boolean","number"]);function Pq(e){let t=[],r=new Map,i=(e,o,n)=>{if(null===e||"object"!=typeof e)return;if(PR in e){if(!n||0===o.length)return`${Pj(o)}: x-mcp-header is only permitted on properties statically reachable via a chain of 'properties' keys (not under items, additionalProperties, oneOf/anyOf/allOf/not, if/then/else, or $ref)`;let i=e[PR];if("string"!=typeof i||0===i.length)return`${Pj(o)}: x-mcp-header MUST be a non-empty string`;if(!PP.test(i))return`${Pj(o)}: x-mcp-header '${i}' is not a valid RFC 9110 token (no spaces, control characters or HTTP delimiters)`;let a="string"==typeof e.type?e.type:void 0;if(void 0===a||!PV.has(a))return`${Pj(o)}: x-mcp-header is only permitted on primitive-typed properties (string, integer, boolean); got ${a??""}`;let s=i.toLowerCase(),d=r.get(s);if(void 0!==d)return`x-mcp-header '${i}' is not case-insensitively unique (also declared as '${d}')`;r.set(s,i),t.push({path:o,headerName:i,type:a})}let a=e.properties;if(null!==a&&"object"==typeof a)for(let[e,t]of Object.entries(a)){let r=i(t,[...o,e],n);if(void 0!==r)return r}for(let t of PI){let r=e[t];if(void 0!==r)for(let e of Array.isArray(r)?r:null!==r&&"object"==typeof r&&Px.has(t)?Object.values(r):[r]){let r=i(e,[...o,`<${t}>`],!1);if(void 0!==r)return r}}},o=i(e,[],!0);return void 0===o?{valid:!0,declarations:t}:{valid:!1,reason:o}}let PI=["items","prefixItems","contains","additionalProperties","unevaluatedProperties","unevaluatedItems","propertyNames","patternProperties","dependentSchemas","oneOf","anyOf","allOf","not","if","then","else","$defs","definitions"],Px=new Set(["patternProperties","dependentSchemas","$defs","definitions"]);function Pj(e){return 0===e.length?"":e.join(".")}let PC="=?base64?";function PT(e){return new Set(e.flatMap(e=>Object.keys(e.shape)))}function PO(e){if(null==e)return!1;let t=typeof e;return("object"===t||"function"===t)&&"~standard"in e&&"function"==typeof e["~standard"]?.validate}R9.InvalidRequest,R9.UnsupportedProtocolVersion,R9.InvalidParams,R9.MethodNotFound,R9.InvalidParams,R9.MissingRequiredClientCapability,R9.ParseError,R9.InvalidRequest,R9.MethodNotFound,R9.UnsupportedProtocolVersion,R9.MissingRequiredClientCapability;let PE=!1,PA="draft-2020-12";async function PM(e,t){let r=await e["~standard"].validate(t);return r.issues&&r.issues.length>0?{success:!1,error:r.issues.map(e=>e.path?.length?`${e.path.map(e=>String("object"==typeof e?e.key:e)).join(".")}: ${e.message}`:e.message).join(", ")}:{success:!0,data:r.value}}let PW=/\\\.\\d\{(\d+)\}/;function PN(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}let Pz=new Set(["$comment","deprecated","description","examples","readOnly","title","writeOnly"]);function PD(e){return Pz.has(e)||e.startsWith("x-")}let PF=new Set(["$schema",...Object.keys(wz.shape.requestedSchema.shape)]),PL={string:PT([wI,wj,wC,wT]),number:PT([wx]),integer:PT([wx]),boolean:PT([wq]),array:PT([wE,wA])},PU=new Set(wI.shape.format.unwrap().options);Object.assign(function(e){let t=void 0!==e.inputRequests&&Object.keys(e.inputRequests).length>0,r="string"==typeof e.requestState;if(!t&&!r)throw TypeError("inputRequired() requires at least one of inputRequests (with at least one entry) or requestState (spec: every InputRequiredResult MUST include at least one of the two)");return{resultType:"input_required",...void 0!==e.inputRequests&&{inputRequests:e.inputRequests},...void 0!==e.requestState&&{requestState:e.requestState}}},{elicit(e){try{return{method:"elicitation/create",params:function(e){var t;if(!PO(e.requestedSchema))return{...e,mode:"form",requestedSchema:e.requestedSchema};let r=e.requestedSchema["~standard"].vendor,i=function(e,t){let r={},i=[];for(let[o,n]of Object.entries(e))"properties"===o&&PN(n)?r[o]=Object.fromEntries(Object.entries(n).map(([e,r])=>[e,function(e,t,r,i){if(!PN(e))return e;let o="string"==typeof e.type&&Object.hasOwn(PL,e.type)?PL[e.type]:void 0;if(void 0===o)return e;let n={};for(let[s,d]of Object.entries(e))if(o.has(s)||PD(s))n[s]=d;else if("pattern"===s&&"string"===e.type&&"string"==typeof e.format)if(PU.has(e.format)){var a;"string"==typeof d&&(a=e.format,"zod"!==r||(function(e,t){let r;switch(e){case"email":r=[iw(nn,void 0)];break;case"uri":r=[iR(nd,void 0)];break;case"date":r=[iV(nr,void 0)];break;case"date-time":let i,o;i=PW.exec(t),o=[void 0,-1,0],i&&o.push(Number(i[1])),r=[!1,!0].flatMap(e=>[!1,!0].flatMap(t=>o.map(r=>ac({local:e,offset:t,precision:r}))))}return new Set(r.map(e=>{let t;return t=ox(e,{target:PA,io:"input"}),"string"==typeof t.pattern?t.pattern:void 0}).filter(e=>void 0!==e))})(a,d).has(d))||i.push(`${t}.${s}`)}else n[s]=d;else i.push(`${t}.${s}`);return n}(r,`properties.${e}`,t,i)])):PF.has(o)?r[o]=n:PD(o)||i.push(o);if(i.length>0)throw new R5(R9.InvalidParams,`Elicitation requestedSchema contains unsupported JSON Schema constraint(s) after Standard Schema conversion: ${i.join(", ")}`);return r}(function(e){try{return function(e,t="input"){let r,i=e["~standard"];if(i.jsonSchema)r=i.jsonSchema[t]({target:PA});else if("zod"===i.vendor){if(!("_zod"in e))throw Error("Schema appears to be from zod 3, which the SDK cannot convert to JSON Schema. Upgrade to zod >=4.2.0, or wrap your JSON Schema with fromJsonSchema().");PE||(PE=!0,console.warn("[mcp-sdk] Your zod version does not implement `~standard.jsonSchema` (added in zod 4.2.0). Falling back to z.toJSONSchema(). Upgrade to zod >=4.2.0 to silence this warning.")),r=ox(e,{target:PA,io:t})}else throw Error(`Schema library "${i.vendor}" does not implement StandardJSONSchemaV1 (\`~standard.jsonSchema\`). Upgrade to a version that does, or wrap your JSON Schema with fromJsonSchema().`);if("output"===t)return void 0!==r.type||!function e(t){if("properties"in t||"patternProperties"in t||"additionalProperties"in t||"required"in t)return!0;for(let r of["oneOf","anyOf","allOf"]){let i=t[r];if(Array.isArray(i)&&i.length>0)return i.every(t=>null!==t&&"object"==typeof t&&("object"===t.type||e(t)))}return!1}(r)?r:{type:"object",...r};if(void 0!==r.type&&"object"!==r.type)throw Error(`MCP tool and prompt schemas must describe objects (got type: ${JSON.stringify(r.type)}). Wrap your schema in z.object({...}) or equivalent.`);return{type:"object",...r}}(e,"input")}catch(t){let e=t instanceof Error?t.message:String(t);throw new R5(R9.InvalidParams,`Elicitation requestedSchema must describe an object with flat primitive properties: ${e}`)}}(e.requestedSchema),r),o=(t=wz.shape.requestedSchema,oJ(t,i));if(!o.success)throw new R5(R9.InvalidParams,`Elicitation requestedSchema only supports flat primitive properties (string, number, integer, boolean, and string enums): ${function(e,t){if(!PN(e.properties))return t;let r=Object.entries(e.properties).filter(([,e])=>!oJ(wN,e).success).map(([e])=>`properties.${e}`);return r.length>0?r.join(", "):t}(i,o.error.message)}`);let n=function e(t,r,i=""){return Array.isArray(t)&&Array.isArray(r)?t.flatMap((t,o)=>e(t,r[o],`${i}[${o}]`)):PN(t)&&PN(r)?Object.entries(t).flatMap(([t,o])=>{let n=i?`${i}.${t}`:t;return Object.prototype.hasOwnProperty.call(r,t)?e(o,r[t],n):PD(t)?[]:[n]}):[]}(i,o.data);if(n.length>0)throw new R5(R9.InvalidParams,`Elicitation requestedSchema contains unsupported JSON Schema constraint(s) after Standard Schema conversion: ${n.join(", ")}`);let a=(o.data.required??[]).filter(e=>!Object.prototype.hasOwnProperty.call(o.data.properties,e));if(a.length>0)throw new R5(R9.InvalidParams,`Elicitation requestedSchema lists required properties that are not defined in properties: ${a.join(", ")}`);return{...e,mode:"form",requestedSchema:o.data}}(e)}}catch(e){throw e instanceof R5?TypeError(e.message,{cause:e}):e}},elicitUrl:e=>({method:"elicitation/create",params:{...e,mode:"url"}}),createMessage:e=>({method:"sampling/createMessage",params:e}),listRoots:()=>({method:"roots/list"})});let PH={},PG={};function PB(e,t){let r=e.slice(0,-6);PH[r]=t,PG[r]=e=>t.safeParse(e).success}for(let e of["AnnotationsSchema","AudioContentSchema","BaseMetadataSchema","BlobResourceContentsSchema","BooleanSchemaSchema","CallToolRequestSchema","CallToolRequestParamsSchema","CallToolResultSchema","CancelledNotificationSchema","CancelledNotificationParamsSchema","CancelTaskRequestSchema","CancelTaskResultSchema","ClientCapabilitiesSchema","ClientNotificationSchema","ClientRequestSchema","ClientResultSchema","CompatibilityCallToolResultSchema","CompleteRequestSchema","CompleteRequestParamsSchema","CompleteResultSchema","ContentBlockSchema","CreateMessageRequestSchema","CreateMessageRequestParamsSchema","CreateMessageResultSchema","CreateMessageResultWithToolsSchema","CreateTaskResultSchema","CursorSchema","DiscoverRequestSchema","DiscoverResultSchema","ElicitationCompleteNotificationSchema","ElicitationCompleteNotificationParamsSchema","ElicitRequestSchema","ElicitRequestFormParamsSchema","ElicitRequestParamsSchema","ElicitRequestURLParamsSchema","ElicitResultSchema","EmbeddedResourceSchema","EmptyResultSchema","EnumSchemaSchema","GetPromptRequestSchema","GetPromptRequestParamsSchema","GetPromptResultSchema","GetTaskPayloadRequestSchema","GetTaskPayloadResultSchema","GetTaskRequestSchema","GetTaskResultSchema","IconSchema","IconsSchema","ImageContentSchema","ImplementationSchema","InitializedNotificationSchema","InitializeRequestSchema","InitializeRequestParamsSchema","InitializeResultSchema","JSONArraySchema","JSONObjectSchema","JSONRPCErrorResponseSchema","JSONRPCMessageSchema","JSONRPCNotificationSchema","JSONRPCRequestSchema","JSONRPCResponseSchema","JSONRPCResultResponseSchema","JSONValueSchema","LegacyTitledEnumSchemaSchema","ListPromptsRequestSchema","ListPromptsResultSchema","ListResourcesRequestSchema","ListResourcesResultSchema","ListResourceTemplatesRequestSchema","ListResourceTemplatesResultSchema","ListRootsRequestSchema","ListRootsResultSchema","ListTasksRequestSchema","ListTasksResultSchema","ListToolsRequestSchema","ListToolsResultSchema","LoggingLevelSchema","LoggingMessageNotificationSchema","LoggingMessageNotificationParamsSchema","ModelHintSchema","ModelPreferencesSchema","MultiSelectEnumSchemaSchema","NotificationSchema","NumberSchemaSchema","PaginatedRequestSchema","PaginatedRequestParamsSchema","PaginatedResultSchema","PingRequestSchema","PrimitiveSchemaDefinitionSchema","ProgressSchema","ProgressNotificationSchema","ProgressNotificationParamsSchema","ProgressTokenSchema","PromptSchema","PromptArgumentSchema","PromptListChangedNotificationSchema","PromptMessageSchema","PromptReferenceSchema","ReadResourceRequestSchema","ReadResourceRequestParamsSchema","ReadResourceResultSchema","RelatedTaskMetadataSchema","RequestSchema","RequestIdSchema","RequestMetaSchema","ResourceSchema","ResourceContentsSchema","ResourceLinkSchema","ResourceListChangedNotificationSchema","ResourceRequestParamsSchema","ResourceTemplateSchema","ResourceTemplateReferenceSchema","ResourceUpdatedNotificationSchema","ResourceUpdatedNotificationParamsSchema","ResultMetaObjectSchema","ResultSchema","RoleSchema","RootSchema","RootsListChangedNotificationSchema","SamplingContentSchema","SamplingMessageSchema","SamplingMessageContentBlockSchema","ServerCapabilitiesSchema","ServerNotificationSchema","ServerRequestSchema","ServerResultSchema","SetLevelRequestSchema","SetLevelRequestParamsSchema","SingleSelectEnumSchemaSchema","StringSchemaSchema","SubscribeRequestSchema","SubscribeRequestParamsSchema","SubscriptionFilterSchema","SubscriptionsAcknowledgedNotificationSchema","SubscriptionsAcknowledgedNotificationParamsSchema","SubscriptionsListenRequestSchema","SubscriptionsListenRequestParamsSchema","SubscriptionsListenResultSchema","SubscriptionsListenResultMetaSchema","TaskAugmentedRequestParamsSchema","TaskCreationParamsSchema","TaskMetadataSchema","TaskSchema","TaskStatusSchema","TaskStatusNotificationSchema","TaskStatusNotificationParamsSchema","TextContentSchema","TextResourceContentsSchema","TitledMultiSelectEnumSchemaSchema","TitledSingleSelectEnumSchemaSchema","ToolSchema","ToolAnnotationsSchema","ToolChoiceSchema","ToolExecutionSchema","ToolListChangedNotificationSchema","ToolResultContentSchema","ToolUseContentSchema","UnsubscribeRequestSchema","UnsubscribeRequestParamsSchema","UntitledMultiSelectEnumSchemaSchema","UntitledSingleSelectEnumSchemaSchema"])PB(e,Pk[e]);for(let[e,t]of Object.entries({IdJagTokenExchangeResponseSchema:R_,OAuthClientInformationFullSchema:Rk,OAuthClientInformationSchema:RS,OAuthClientMetadataSchema:R$,OAuthClientRegistrationErrorSchema:Rw,OAuthErrorResponseSchema:Rv,OAuthMetadataSchema:Rf,OAuthProtectedResourceMetadataSchema:Rm,OAuthTokenRevocationRequestSchema:RR,OAuthTokensSchema:Rg,OpenIdProviderDiscoveryMetadataSchema:Ry,OpenIdProviderMetadataSchema:Rh}))PB(e,t);Object.freeze(PH);let PK=Object.freeze(PG),PJ=[SC,ST,SE,SM],PZ=["inputResponses","requestState"];function PQ(e,t){let r=e.params;if(!P0(r))return{message:e,lifted:{}};let i=r._meta,o=P0(i)?PJ.filter(e=>e in i):[],n="request"===t?PZ.filter(e=>e in r):[];if(0===o.length&&0===n.length)return{message:e,lifted:{}};let a={},s={...r};if(o.length>0&&P0(i)){let e={},t={...i};for(let r of o)e[r]=i[r],delete t[r];a.envelope=e,Object.keys(t).length>0?s._meta=t:delete s._meta}for(let e of n)"inputResponses"===e&&(a.inputResponses=s[e]),"requestState"===e&&(a.requestState=s[e]),delete s[e];return{message:{...e,params:s},lifted:a}}function PX(e,t){let r=e.validateResult(t,void 0);if(r.ok||"not-in-era"!==r.reason)return{"~standard":{version:1,vendor:"mcp-wire-codec",validate(r){let i=e.validateResult(t,r);return i.ok?{value:i.value}:{issues:[{message:"invalid"===i.reason?i.message:`not-in-era: ${t}`}]}}}}}let PY=(ee=void 0,()=>ee);var P1=class{_transport;_requestMessageId=0;_requestHandlers=new Map;_customSchemaRequestMethods=new Set;_requestHandlerAbortControllers=new Map;_notificationHandlers=new Map;_responseHandlers=new Map;_progressHandlers=new Map;_timeoutInfo=new Map;_pendingDebouncedNotifications=new Set;_negotiatedProtocolVersion;_supportedProtocolVersions;onclose;onerror;fallbackRequestHandler;fallbackNotificationHandler;constructor(e){this._options=e,this._supportedProtocolVersions=e?.supportedProtocolVersions??Sj,this.setNotificationHandler("notifications/cancelled",e=>{this._oncancel(e)}),this.setNotificationHandler("notifications/progress",e=>{this._onprogress(e)}),this.setRequestHandler("ping",e=>({}))}_shouldDropInbound(e){}_outboundMetaEnvelope(){}_envelopeOutbound(e){let t=this._outboundMetaEnvelope();if(void 0===t)return e;let r=e.params??{};return{...e,params:{...r,_meta:{...t,...r._meta}}}}_resolveNonCompleteResult(e,t){return Promise.reject(new Rx(RI.UnsupportedResultType,`Unsupported result type '${e.kind}' for ${t.request.method}`,{resultType:e.kind,method:t.request.method}))}_getRequestHandler(e){return this._requestHandlers.get(e)}async _oncancel(e){void 0!==e.params.requestId&&this._requestHandlerAbortControllers.get(e.params.requestId)?.abort(e.params.reason)}_setupTimeout(e,t,r,i,o=!1){this._timeoutInfo.set(e,{timeoutId:setTimeout(i,t),startTime:Date.now(),timeout:t,maxTotalTimeout:r,resetTimeoutOnProgress:o,onTimeout:i})}_resetTimeout(e){let t=this._timeoutInfo.get(e);if(!t)return!1;let r=Date.now()-t.startTime;if(t.maxTotalTimeout&&r>=t.maxTotalTimeout)throw this._timeoutInfo.delete(e),new Rx(RI.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:t.maxTotalTimeout,totalElapsed:r});return clearTimeout(t.timeoutId),t.timeoutId=setTimeout(t.onTimeout,t.timeout),!0}_cleanupTimeout(e){let t=this._timeoutInfo.get(e);t&&(clearTimeout(t.timeoutId),this._timeoutInfo.delete(e))}async connect(e){this._transport=e;let t=this.transport?.onclose;this._transport.onclose=()=>{try{t?.()}finally{this._onclose()}};let r=this.transport?.onerror;this._transport.onerror=e=>{r?.(e),this._onerror(e)};let i=this._transport?.onmessage;this._transport.onmessage=(e,t)=>{if(i?.(e,t),S2.safeParse(e).success||S4.safeParse(e).success)this._onresponse(e);else if(S1.safeParse(e).success)this._onrequest(e,t);else S0.safeParse(e).success?this._onnotification(e,t):this._onerror(Error(`Unknown message type: ${JSON.stringify(e)}`))},e.setSupportedProtocolVersions?.(this._supportedProtocolVersions),await this._transport.start()}_onclose(){let e=this._responseHandlers;for(let e of(this._responseHandlers=new Map,this._progressHandlers.clear(),this._pendingDebouncedNotifications.clear(),this._timeoutInfo.values()))clearTimeout(e.timeoutId);this._timeoutInfo.clear();let t=this._requestHandlerAbortControllers;this._requestHandlerAbortControllers=new Map;let r=new Rx(RI.ConnectionClosed,"Connection closed");this._transport=void 0;try{this.onclose?.()}finally{for(let t of e.values())t(r);for(let e of t.values())e.abort(r)}}_onerror(e){this.onerror?.(e)}_onnotification(e,t){let{message:r}=PQ(e,"notification"),i=this._negotiatedWireCodec();if(t?.classification===void 0&&"drop"===this._shouldDropInbound(e))return;if(t?.classification!==void 0){let e=P_(t.classification);if(e!==i.era)return void this._onerror(Error(`Era mismatch on inbound notification '${r.method}': classified as ${e} but this instance serves ${i.era}`))}if(Pb(r.method)&&!i.hasNotificationMethod(r.method))return;let o=this._notificationHandlers.get(r.method),n=this.fallbackNotificationHandler;(void 0!==o||void 0!==n)&&Promise.resolve().then(()=>void 0===o?n(r):o(r,i)).catch(e=>this._onerror(Error(`Uncaught error in notification handler: ${e}`)))}_onrequest(e,t){var r;let{message:i,lifted:o}=PQ(e,"request"),n=this._negotiatedWireCodec();if(t?.classification===void 0&&"drop"===this._shouldDropInbound(e))return void this._onerror(Error(`Dropped inbound request '${e.method}': not servable on this connection's protocol era`));let a=this._transport,s=(e,t,r)=>{let o={jsonrpc:"2.0",id:i.id,error:{code:e,message:t,...void 0!==r&&{data:r}}};a?.send(o).catch(e=>this._onerror(Error(`Failed to send an error response: ${e}`)))};if(t?.classification!==void 0){let e=P_(t.classification);if(e!==n.era){this._onerror(Error(`Era mismatch on inbound request '${i.method}': classified as ${e} but this instance serves ${n.era}`));let r=t.classification.revision??e;s(R9.UnsupportedProtocolVersion,`Unsupported protocol version: ${r}`,{supported:this._supportedProtocolVersions,requested:r});return}}if(Pv(i.method)&&!n.hasRequestMethod(i.method)&&!(P$(i.method)&&this._customSchemaRequestMethods.has(i.method)))return void s(R9.MethodNotFound,"Method not found");let d=this._requestHandlers.get(i.method)??this.fallbackRequestHandler;if(void 0===d)return void s(R9.MethodNotFound,"Method not found");let c=n.checkInboundEnvelope(o);if(void 0!==c)return void s(R9.InvalidParams,c);let l=(e,t)=>this._notificationViaCodec(this._resolveOutboundCodec(e.method),e,{...t,relatedRequestId:i.id}),p=(e,t,r)=>this._requestWithSchemaViaCodec(this._resolveOutboundCodec(e.method),e,t,{...r,relatedRequestId:i.id}),u=new AbortController;this._requestHandlerAbortControllers.set(i.id,u);let m=void 0===o.inputResponses?void 0:function(e){let t={},r=[];if(!P2(e))return{accepted:t,droppedKeys:r};for(let[i,o]of Object.entries(e)){if(!P2(o)||"method"in o||"result"in o){r.push(i);continue}t[i]=o}return{accepted:t,droppedKeys:r}}(o.inputResponses),f={sessionId:a?.sessionId,mcpReq:{id:i.id,method:i.method,_meta:i.params?._meta,...void 0!==o.envelope&&{envelope:o.envelope},...void 0!==m&&{inputResponses:m.accepted},...void 0!==m&&m.droppedKeys.length>0&&{droppedInputResponseKeys:m.droppedKeys},requestState:void 0===o.requestState?PY:(r=o.requestState,()=>r),signal:u.signal,send:(e,t,r)=>{let i=this._resolveOutboundCodec(e.method);if(this._assertOutboundRequestInEra(i,e.method),PO(t))return p(e,t,r);let o=PX(i,e.method);if(void 0===o)throw TypeError(`'${e.method}' is not a spec method; pass a result schema as the second argument to ctx.mcpReq.send().`);return p(e,o,t)},notify:l},http:t?.authInfo?{authInfo:t.authInfo}:void 0},h=this.buildContext(f,t);Promise.resolve().then(()=>d(i,h)).then(async e=>{let t;if(u.signal.aborted)return;try{t=n.encodeResult(i.method,e,this._outboundServerInfo())}catch(e){this._onerror(Error(`Failed to encode result for ${i.method}: ${e}`)),s(R9.InternalError,"Internal error");return}let r={result:t,jsonrpc:"2.0",id:i.id};await a?.send(r)},async e=>{if(u.signal.aborted)return;let t=Number.isSafeInteger(e.code)?e.code:R9.InternalError,r={jsonrpc:"2.0",id:i.id,error:{code:n.encodeErrorCode(t),message:e.message??"Internal error",...void 0!==e.data&&{data:e.data}}};await a?.send(r)}).catch(e=>this._onerror(Error(`Failed to send response: ${e}`))).finally(()=>{this._requestHandlerAbortControllers.get(i.id)===u&&this._requestHandlerAbortControllers.delete(i.id)})}_onprogress(e){let{progressToken:t,...r}=e.params,i=Number(t),o=this._progressHandlers.get(i);if(!o)return void this._onerror(Error(`Received a progress notification for an unknown token: ${JSON.stringify(e)}`));let n=this._responseHandlers.get(i),a=this._timeoutInfo.get(i);if(a&&n&&a.resetTimeoutOnProgress)try{this._resetTimeout(i)}catch(e){this._responseHandlers.delete(i),this._progressHandlers.delete(i),this._cleanupTimeout(i),n(e);return}o(r)}_onresponse(e){let t=Number(e.id),r=this._responseHandlers.get(t);void 0===r?this._onerror(Error(`Received a response for an unknown message ID: ${JSON.stringify(e)}`)):(this._responseHandlers.delete(t),this._cleanupTimeout(t),this._progressHandlers.delete(t),r(S2.safeParse(e).success?e:R5.fromError(e.error.code,e.error.message,e.error.data)))}get transport(){return this._transport}async close(){await this._transport?.close()}request(e,t,r){let i=this._resolveOutboundCodec(e.method);if(PO(t))return P$(e.method)||this._assertOutboundRequestInEra(i,e.method),this._requestWithSchemaViaCodec(i,e,t,r);this._assertOutboundRequestInEra(i,e.method);let o=PX(i,e.method);if(void 0===o)throw TypeError(`'${e.method}' is not a spec method; pass a result schema as the second argument to request().`);return this._requestWithSchemaViaCodec(i,e,o,t)}_negotiatedWireCodec(){return Pg(this._negotiatedProtocolVersion)}_wireCodec(){return this._negotiatedWireCodec()}_resolveOutboundCodec(e){if(void 0===this._negotiatedProtocolVersion){let t=function(e){switch(e){case"initialize":case"notifications/initialized":return Pg(void 0);case"server/discover":return Pg(Py);default:return}}(e);if(t)return t}return this._negotiatedWireCodec()}_assertOutboundRequestInEra(e,t){if(Pv(t)&&!e.hasRequestMethod(t))throw new Rx(RI.MethodNotSupportedByProtocolVersion,`Method '${t}' is not supported by the negotiated protocol version (wire era ${e.era})`,{method:t,era:e.era})}_requestWithSchema(e,t,r){let i=this._resolveOutboundCodec(e.method);return this._assertOutboundRequestInEra(i,e.method),this._requestWithSchemaViaCodec(i,e,t,r)}_requestWithSchemaViaCodec(e,t,r,i){let o,n,{relatedRequestId:a,resumptionToken:s,onresumptiontoken:d,headers:c}=i??{},l=Date.now();return new Promise((p,u)=>{let m=e=>{u(e)};if(!this._transport)return void m(Error("Not connected"));if(this._options?.enforceStrictCapabilities===!0)try{this.assertCapabilityForMethod(t.method)}catch(e){m(e);return}if(i?.signal?.aborted){let e=i.signal.reason;throw e instanceof Rx?e:new Rx(RI.RequestTimeout,String(e))}let f=e.era===Py&&!0===this._transport.hasPerRequestStream?new AbortController:void 0,h=this._requestMessageId++;n=h;let y={...t,jsonrpc:"2.0",id:h};i?.onprogress&&(this._progressHandlers.set(h,i.onprogress),y.params={...t.params,_meta:{...t.params?._meta,progressToken:h}});let g=this._envelopeOutbound(y),_=!1,v=e=>{_||(this._progressHandlers.delete(h),void 0===f?"initialize"!==t.method&&this._transport?.send(this._envelopeOutbound({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:h,reason:String(e)}}),{relatedRequestId:a,resumptionToken:s,onresumptiontoken:d}).catch(e=>this._onerror(Error(`Failed to send cancellation: ${e}`))):f.abort(),u(e instanceof Rx?e:new Rx(RI.RequestTimeout,String(e))))};this._responseHandlers.set(h,o=>{let n;if(!i?.signal?.aborted){if(_=!0,o instanceof Error)return u(o);try{n=e.decodeResult(t.method,o.result)}catch(e){return u(e instanceof Error?e:Error(String(e)))}if("invalid"===n.kind)return u(n.error);if("input_required"===n.kind){var a;return i?.allowInputRequired===!0?p({resultType:"input_required",inputRequests:(a=n).inputRequests,...void 0!==a.requestState&&{requestState:a.requestState},...void 0!==a._meta&&{_meta:a._meta}}):p(this._resolveNonCompleteResult(n,{codec:e,request:t,resultSchema:r,options:i,flowStartedAt:l,retry:(i,o)=>this._requestWithSchemaViaCodec(e,void 0===i?{method:t.method}:{method:t.method,params:i},r,o)}))}PM(r,n.result).then(e=>{e.success?p(e.data):u(new Rx(RI.InvalidResult,`Invalid result for ${t.method}: ${e.error}`))},u)}}),o=()=>v(i?.signal?.reason),i?.signal?.addEventListener("abort",o,{once:!0});let b=i?.timeout??6e4;this._setupTimeout(h,b,i?.maxTotalTimeout,()=>v(new Rx(RI.RequestTimeout,"Request timed out",{timeout:b})),i?.resetTimeoutOnProgress??!1),this._transport.send(g,{relatedRequestId:a,resumptionToken:s,onresumptiontoken:d,headers:c,requestSignal:f?.signal}).catch(e=>{this._progressHandlers.delete(h),u(e)})}).finally(()=>{o&&i?.signal?.removeEventListener("abort",o),void 0!==n&&(this._responseHandlers.delete(n),this._cleanupTimeout(n))})}async notification(e,t){return await this._notificationViaCodec(this._resolveOutboundCodec(e.method),e,t)}async _notificationViaCodec(e,t,r){if(!this._transport)throw new Rx(RI.NotConnected,"Not connected");if(Pb(t.method)&&!e.hasNotificationMethod(t.method))throw new Rx(RI.MethodNotSupportedByProtocolVersion,`Notification '${t.method}' is not supported by the negotiated protocol version (wire era ${e.era})`,{method:t.method,era:e.era});this.assertNotificationCapability(t.method);let i=this._envelopeOutbound({jsonrpc:"2.0",...t});if((this._options?.debouncedNotificationMethods??[]).includes(t.method)&&!t.params&&r?.relatedRequestId===void 0){if(this._pendingDebouncedNotifications.has(t.method))return;this._pendingDebouncedNotifications.add(t.method),Promise.resolve().then(()=>{this._pendingDebouncedNotifications.delete(t.method),this._transport&&this._transport?.send(i,r).catch(e=>this._onerror(e))});return}await this._transport.send(i,r)}setRequestHandler(e,t,r){let i;if(this.assertRequestHandlerCapability(e),"function"==typeof t){if(!Pv(e))throw TypeError(`'${e}' is not a spec request method; pass schemas as the second argument to setRequestHandler().`);i=(r,i)=>{let o=this._negotiatedWireCodec(),n=o.validateRequest(e,r);if(n.ok||"not-in-era"!==n.reason||(n=o.validateInputRequest(e,r)),!n.ok){if("not-in-era"===n.reason)throw new R5(R9.InternalError,`No wire schema for ${e} in the resolved era`);throw Error(n.message)}return Promise.resolve(t(n.value,i))}}else if(r)i=async(i,o)=>{let n=await PM(t.params,{...i.params});if(!n.success)throw new R5(R9.InvalidParams,`Invalid params for ${e}: ${n.error}`);return r(n.data,o)};else throw TypeError("setRequestHandler: handler is required");"function"==typeof t?this._customSchemaRequestMethods.delete(e):this._customSchemaRequestMethods.add(e),this._requestHandlers.set(e,this._wrapHandler(e,i))}_wrapHandler(e,t){return t}_outboundServerInfo(){}removeRequestHandler(e){this._requestHandlers.delete(e),this._customSchemaRequestMethods.delete(e)}assertCanSetRequestHandler(e){if(this._requestHandlers.has(e))throw Error(`A request handler for ${e} already exists, which would be overridden`)}setNotificationHandler(e,t,r){if("function"==typeof t){if(!Pb(e))throw TypeError(`'${e}' is not a spec notification method; pass schemas as the second argument to setNotificationHandler().`);this._notificationHandlers.set(e,(r,i)=>{let o=i.validateNotification(e,r);if(!o.ok){if("not-in-era"===o.reason)throw new R5(R9.InternalError,`No wire schema for ${e} in the resolved era`);throw Error(o.message)}return Promise.resolve(t(o.value))});return}if(!r)throw TypeError("setNotificationHandler: handler is required");this._notificationHandlers.set(e,async i=>{let o=await PM(t.params,{...i.params});if(!o.success)throw new R5(R9.InvalidParams,`Invalid params for notification ${e}: ${o.error}`);await r(o.data,i)})}removeNotificationHandler(e){this._notificationHandlers.delete(e)}};function P0(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)}function P2(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}function P4(e){throw new Rx(RI.SendFailed,`ctx.mcpReq.${e} is not available while fulfilling an embedded input request: the request is fulfilled locally and has no related peer request`)}(SP(e=>{var t=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,r=/\\([\u000b\u0020-\u00ff])/g,i=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;function o(e){this.parameters=Object.create(null),this.type=e}e.parse=function(e){if(!e)throw TypeError("argument string is required");var n,a,s,d="object"==typeof e?function(e){var t;if("function"==typeof e.getHeader?t=e.getHeader("content-type"):"object"==typeof e.headers&&(t=e.headers&&e.headers["content-type"]),"string"!=typeof t)throw TypeError("content-type header is missing from object");return t}(e):e;if("string"!=typeof d)throw TypeError("argument string is required to be a string");var c=d.indexOf(";"),l=-1!==c?d.slice(0,c).trim():d.trim();if(!i.test(l))throw TypeError("invalid media type");var p=new o(l.toLowerCase());if(-1!==c){for(t.lastIndex=c;a=t.exec(d);){if(a.index!==c)throw TypeError("invalid parameter format");c+=a[0].length,n=a[1].toLowerCase(),34===(s=a[2]).charCodeAt(0)&&-1!==(s=s.slice(1,-1)).indexOf("\\")&&(s=s.replace(r,"$1")),p.parameters[n]=s}if(c!==d.length)throw TypeError("invalid parameter format")}return p}}))();var P6=class{_buffer;_maxBufferSize;constructor(e){this._maxBufferSize=e?.maxBufferSize??0xa00000}append(e){if((this._buffer?.length??0)+e.length>this._maxBufferSize)throw this.clear(),Error(`ReadBuffer exceeded maximum size of ${this._maxBufferSize} bytes`);this._buffer=this._buffer?Buffer.concat([this._buffer,e]):e}readMessage(){for(;this._buffer;){let t=this._buffer.indexOf("\n");if(-1===t)break;let r=this._buffer.toString("utf8",0,t).replace(/\r$/,"");this._buffer=this._buffer.subarray(t+1);try{var e;return e=r,S6.parse(JSON.parse(e))}catch(e){if(e instanceof SyntaxError)continue;throw e}}return null}clear(){this._buffer=void 0}};let P3=el("../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/index.js"),P9="win32"===W.platform?["APPDATA","COMSPEC","HOMEDRIVE","HOMEPATH","LOCALAPPDATA","PATH","PATHEXT","PROCESSOR_ARCHITECTURE","PROGRAMDATA","PROGRAMFILES","PROGRAMFILES(X86)","PROGRAMW6432","SYSTEMDRIVE","SYSTEMROOT","TEMP","USERNAME","USERPROFILE","WINDIR"]:["HOME","LOGNAME","PATH","SHELL","TERM","USER"];var P5=class{_process;_readBuffer;_serverParams;_stderrStream=null;onclose;onerror;onmessage;constructor(e){this._serverParams=e,this._readBuffer=new P6({maxBufferSize:e.maxBufferSize}),("pipe"===e.stderr||"overlapped"===e.stderr)&&(this._stderrStream=new H)}async start(){if(this._process)throw Error("StdioClientTransport already started! If using Client class, note that connect() calls start() automatically.");return new Promise((e,t)=>{this._process=P3(this._serverParams.command,this._serverParams.args??[],{env:{...function(){let e={};for(let t of P9){let r=W.env[t];void 0!==r&&(r.startsWith("()")||(e[t]=r))}return e}(),...this._serverParams.env},stdio:["pipe","pipe",this._serverParams.stderr??"inherit"],shell:!1,windowsHide:"win32"===W.platform,cwd:this._serverParams.cwd}),this._process.on("error",e=>{t(e),this.onerror?.(e)}),this._process.on("spawn",()=>{e()}),this._process.on("close",e=>{this._process=void 0,this.onclose?.()}),this._process.stdin?.on("error",e=>{this.onerror?.(e)}),this._process.stdout?.on("data",e=>{try{this._readBuffer.append(e),this.processReadBuffer()}catch(e){this.onerror?.(e),this.close().catch(()=>{})}}),this._process.stdout?.on("error",e=>{this.onerror?.(e)}),this._stderrStream&&this._process.stderr&&this._process.stderr.pipe(this._stderrStream)})}get stderr(){return this._stderrStream?this._stderrStream:this._process?.stderr??null}get pid(){return this._process?.pid??null}processReadBuffer(){for(;;)try{let e=this._readBuffer.readMessage();if(null===e)break;this.onmessage?.(e)}catch(e){this.onerror?.(e)}}async _dispose(){let e=this._process;if(this._process=void 0,e&&null===e.exitCode&&null===e.signalCode){let t=new Promise(t=>e.once("exit",()=>t()));try{e.stdin?.end()}catch{}try{e.kill("SIGTERM")}catch{}if(await Promise.race([t,new Promise(e=>setTimeout(e,1e3).unref())]),null===e.exitCode&&null===e.signalCode)try{e.kill("SIGKILL")}catch{}await t}try{e?.stdout?.destroy()}catch{}try{e?.stdin?.destroy()}catch{}try{e?.stderr?.destroy()}catch{}this._readBuffer.clear()}async close(){if(this._process){let e=this._process;this._process=void 0;let t=new Promise(t=>{e.once("close",()=>{t()})});try{e.stdin?.end()}catch{}if(await Promise.race([t,new Promise(e=>setTimeout(e,2e3).unref())]),null===e.exitCode){try{e.kill("SIGTERM")}catch{}await Promise.race([t,new Promise(e=>setTimeout(e,2e3).unref())])}if(null===e.exitCode)try{e.kill("SIGKILL")}catch{}}this._readBuffer.clear()}send(e){return new Promise(t=>{if(!this._process?.stdin)throw new Rx(RI.NotConnected,"Not connected");let r=JSON.stringify(e)+"\n";this._process.stdin.write(r)?t():this._process.stdin.once("drain",t)})}};let P8=new TextEncoder,P7=new TextDecoder,Ve=new TextDecoder("utf-8",{fatal:!0});function Vt(...e){let t=new Uint8Array(e.reduce((e,{length:t})=>e+t,0)),r=0;for(let i of e)t.set(i,r),r+=i.length;return t}function Vr(e,t,r){if(t<0||t>=0x100000000)throw RangeError(`value must be >= 0 and <= 4294967295. Received ${t}`);e.set([t>>>24,t>>>16,t>>>8,255&t],r)}function Vi(e){let t=Math.floor(e/0x100000000),r=new Uint8Array(8);return Vr(r,t,0),Vr(r,e%0x100000000,4),r}function Vo(e){let t=new Uint8Array(4);return Vr(t,e),t}let Vn=/[^\x00-\x7f]/;function Va(e){if("string"==typeof e&&e.length>=128){if(Vn.test(e))throw TypeError("non-ASCII string encountered in encode()");return P8.encode(e)}let t=new Uint8Array(e.length);for(let r=0;r127)throw TypeError("non-ASCII string encountered in encode()");t[r]=i}return t}function Vs(e,t=!1){if(Uint8Array.prototype.toBase64)return e.toBase64({alphabet:t?"base64url":"base64",omitPadding:t});let r=[];for(let t=0;t"string"!=typeof e)))throw TypeError(`"${e}" option must be an array of strings`);return void 0===t?void 0:new Set(t)}function VW(e,t){let{crit:r}=t??{};if(Array.isArray(r)&&new Set(r).size!==r.length)throw new e('"crit" (Critical) Header Parameter MUST NOT contain duplicate values')}function VN(e,t,r,i,o){if(void 0!==o.crit&&i?.crit===void 0)throw new e('"crit" (Critical) Header Parameter MUST be integrity protected');if(!i||void 0===i.crit)return[];if(!Array.isArray(i.crit)||0===i.crit.length||i.crit.some(e=>"string"!=typeof e||0===e.length))throw new e('"crit" (Critical) Header Parameter MUST be an array of non-empty strings when present');let n=void 0===r?t:{__proto__:null,...r,...t};for(let t of i.crit){if(!(t in n))throw new Vf(`Extension Header Parameter "${t}" is not recognized`);if(!Object.hasOwn(o,t)||void 0===o[t])throw new e(`Extension Header Parameter "${t}" is missing`);if(n[t]&&(!Object.hasOwn(i,t)||void 0===i[t]))throw new e(`Extension Header Parameter "${t}" MUST be integrity protected`)}return i.crit}function Vz(e,t){if(t.includes("b64")){let t=e.b64;if("boolean"!=typeof t)throw new Vg('The "b64" (base64url-encode payload) Header Parameter must be a boolean');return t}return!0}function VD(e,t){let r,i;try{r=JSON.stringify(t),i=JSON.parse(r)}catch(t){throw new e("JOSE Header is not valid JSON",{cause:t})}if(!Vq(i))throw new e("JOSE Header is not a JSON object");return[i,r]}async function VF(e,t,r){let i,o,{alg:n,secret:a}=e,s="decrypt"===r||"sign"===r;if(a&&t instanceof Uint8Array)return t;if(Vq(t)){if("string"!=typeof(i=V2(t)).kty)throw VZ(n,t,a);if(!(a?"oct"===i.kty&&"string"==typeof i.k:"oct"!==i.kty&&(s?"AKP"===i.kty&&"string"==typeof i.priv||"string"==typeof i.d:void 0===i.d&&void 0===i.priv)))throw TypeError(a?'JSON Web Key for symmetric algorithms must have JWK "kty" (Key Type) equal to "oct" and the JWK "k" (Key Value) present':`JSON Web Key for this operation must be a ${s?"private":"public"} JWK`);if(((e,t,r)=>{let{alg:i}=e;if(void 0!==t.use){let e="sign"===r||"verify"===r?"sig":"enc";if(t.use!==e)throw TypeError(`Invalid key for this operation, its "use" must be "${e}" when present`)}if(void 0!==t.alg&&t.alg!==i)throw TypeError(`Invalid key for this operation, its "alg" must be "${i}" when present`);if(Array.isArray(t.key_ops)){let i="encrypt"===r||"decrypt"===r?e.ops?.[+("encrypt"!==r)]:r;if(i&&!t.key_ops.includes(i))throw TypeError(`Invalid key for this operation, its "key_ops" must include "${i}" when present`)}})(e,i,r),"oct"===i.kty)return VR(i.k);if(!Object.isFrozen(t)){let{key_ops:e}=t;Array.isArray(e)&&Object.freeze(e),Object.freeze(t)}}else{if(!VB(t))throw VZ(n,t,a);let e=a?"secret":s?"private":"public";if(t.type!==e&&(a||["secret","public","private"].includes(t.type)))throw TypeError(`${t[Symbol.toStringTag]} instances must be of type "${e}" for the ${n} algorithm`);if(VH(t))return t;if("secret"===(o=t).type)return o.export()}let d=(m||=new WeakMap).get(t);if(d?.[n])return d[n];if(d||m.set(t,d={}),o&&"function"==typeof o.toCryptoKey){let t="public"===o.type,r=VL[o.asymmetricKeyDetails?.namedCurve],i=e.resolve?.({crv:r,asymmetricKeyType:o.asymmetricKeyType})??e.subtle;return d[n]=o.toCryptoKey(i,t,e.usages[+!t])}return(i??=o.export({format:"jwk"})).alg=n,d[n]=await V6(e,i)}let VL={__proto__:null,prime256v1:"P-256",secp384r1:"P-384",secp521r1:"P-521"};function VU(e){if(!VH(e))throw Error("CryptoKey instance expected")}let VH=e=>{if(e?.[Symbol.toStringTag]==="CryptoKey")return!0;try{return e instanceof CryptoKey}catch{return!1}},VG=e=>e?.[Symbol.toStringTag]==="KeyObject",VB=e=>VH(e)||VG(e);function VK(e,t,...r){if(r.length>2){let t=r.pop();e+=`one of type ${r.join(", ")}, or ${t}.`}else 2===r.length?e+=`one of type ${r[0]} or ${r[1]}.`:e+=`of type ${r[0]}.`;return null==t?e+=` Received ${t}`:"function"==typeof t&&t.name?e+=` Received function ${t.name}`:"object"==typeof t&&null!=t&&t.constructor?.name&&(e+=` Received an instance of ${t.constructor.name}`),e}let VJ=(e,...t)=>VK("Key must be ",e,...t);function VZ(e,t,r){let i=["CryptoKey","KeyObject","JSON Web Key"];return r&&i.push("Uint8Array"),TypeError(VK(`Key for the ${e} algorithm must be `,t,...i))}let VQ=(e,t="algorithm.name")=>TypeError(`CryptoKey does not support this operation, its ${t} must be ${e}`);function VX(e,t){if(t&&!e.usages.includes(t))throw TypeError(`CryptoKey does not support this operation, its usages must include ${t}.`)}function VY(e,t){let{modulusLength:r}=t.algorithm;if("number"!=typeof r||r<2048)throw TypeError(`${e} requires key modulusLength to be 2048 bits or larger`)}function V1(e,t,r){let i=e.algorithm;if(i.name!==t.name)throw VQ(t.name);if(t.hash&&i.hash?.name!==t.hash)throw VQ(t.hash,"algorithm.hash");if(t.namedCurve&&i.namedCurve!==t.namedCurve)throw VQ(t.namedCurve,"algorithm.namedCurve");if(void 0!==t.length&&i.length!==t.length)throw VQ(t.length,"algorithm.length");VX(e,r)}function V0(e){return{__proto__:null,...e}}function V2(e){let t=V0(e);if(void 0!==t.ext&&"boolean"!=typeof t.ext)throw TypeError('"ext" (Extractable) Parameter must be a boolean');if(void 0!==t.key_ops){let e=t.key_ops,r=Array.isArray(e)?[...e]:void 0;if(!r||r.some(e=>"string"!=typeof e)||new Set(r).size!==r.length)throw TypeError('"key_ops" (Key Operations) Parameter must be an array of unique strings');t.key_ops=r}return t}function V4(e){if(void 0!==e&&"boolean"!=typeof e)throw TypeError('"extractable" option must be a boolean');return e}async function V6(e,t,r){if(!e.kty.includes(t.kty))throw new Vf('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');let i=e.resolve?.({kty:t.kty,crv:t.crv})??e.subtle,o=!!(t.d||t.priv),n={...t,ext:r??t.ext};return"AKP"!==n.kty&&delete n.alg,delete n.use,crypto.subtle.importKey("jwk",n,i,n.ext??!o,t.key_ops??e.usages[+!!o])}async function V3(e,t,r,i=!1){return e instanceof Uint8Array&&(e=await crypto.subtle.importKey("raw",e,t,i,[r])),V1(e,t,r),e}let V9=e=>crypto.getRandomValues(new Uint8Array(e.cekBits>>3));function V5(e,t){let r=e.byteLength<<3;if(r!==t)throw new Vy(`Invalid Content Encryption Key length. Expected ${t} bits, got ${r} bits`)}function V8(e,t){if(t.length<<3!==e.ivBits)throw new Vy("Invalid Initialization Vector length")}async function V7(e,t,r){if(!(t instanceof Uint8Array))throw TypeError(VJ(t,"Uint8Array"));let i=e.cekBits>>1;return[await crypto.subtle.importKey("raw",t.subarray(i>>3),"AES-CBC",!1,[r]),await crypto.subtle.importKey("raw",t.subarray(0,i>>3),{hash:`SHA-${i<<1}`,name:"HMAC"},!1,["sign"]),i]}async function qe(e,t,r){return new Uint8Array((await crypto.subtle.sign("HMAC",e,t)).slice(0,r>>3))}async function qt(e,t,r,i,o){if(!VH(r)&&!(r instanceof Uint8Array))throw TypeError(VJ(r,"CryptoKey","KeyObject","Uint8Array","JSON Web Key"));if(i?V8(e,i):i=crypto.getRandomValues(new Uint8Array(e.ivBits>>3)),r instanceof Uint8Array&&V5(r,e.cekBits),e.cbc)return async function(e,t,r,i,o){let[n,a,s]=await V7(e,r,"encrypt"),d=new Uint8Array(await crypto.subtle.encrypt({iv:i,name:"AES-CBC"},n,t)),c=Vt(o,i,d,Vi(8*o.length));return{ciphertext:d,tag:await qe(a,c,s),iv:i}}(e,t,r,i,o);let n=await V3(r,e.subtle,"encrypt"),a=new Uint8Array(await crypto.subtle.encrypt({additionalData:o,iv:i,name:"AES-GCM",tagLength:128},n,t));return{ciphertext:a.subarray(0,-16),tag:a.subarray(-16),iv:i}}async function qr(e,t,r,i,o,n){if(!VH(t)&&!(t instanceof Uint8Array))throw TypeError(VJ(t,"CryptoKey","KeyObject","Uint8Array","JSON Web Key"));if(!i)throw new Vy("JWE Initialization Vector missing");if(!o)throw new Vy("JWE Authentication Tag missing");if(!e.cbc&&16!==o.length)throw new Vy("Invalid Authentication Tag length");if(V8(e,i),t instanceof Uint8Array&&V5(t,e.cekBits),e.cbc)return async function(e,t,r,i,o,n){let[a,s,d]=await V7(e,t,"decrypt"),c=Vt(n,i,r,Vi(8*n.length)),l=await qe(s,c,d);try{if(await async function(e,t){let r={name:"HMAC",hash:"SHA-256"},i=await crypto.subtle.generateKey(r,!1,["sign","verify"]),o=await crypto.subtle.sign(r,i,e);return crypto.subtle.verify(r,i,o,t)}(o,l))return new Uint8Array(await crypto.subtle.decrypt({iv:i,name:"AES-CBC"},a,r))}catch{}throw new Vh}(e,t,r,i,o,n);let a=await V3(t,e.subtle,"decrypt");try{return new Uint8Array(await crypto.subtle.decrypt({additionalData:n,iv:i,name:"AES-GCM",tagLength:128},a,Vt(r,o)))}catch{throw new Vh}}function qi(e){let t={__proto__:null};for(let r in e)t[r]={...e[r],alg:r};return t}let qo=[["encrypt","wrapKey"],["decrypt","unwrapKey"]],qn=[[],["deriveBits"]],qa=[[],[]];function qs(e){return{kty:["RSA"],mode:"key-encryption",subtle:{name:"RSA-OAEP",hash:`SHA-${e}`},usages:qo,ops:["wrapKey","unwrapKey"]}}function qd(e){return{kty:["EC","OKP"],mode:e,subtle:{name:"ECDH"},resolve:({kty:e,crv:t,asymmetricKeyType:r})=>{if("X25519"===t||"x25519"===r)return{name:"X25519"};if("OKP"===e)throw new Vf('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');return{name:"ECDH",namedCurve:t}},usages:qn,ops:[void 0,"deriveBits"]}}function qc(e,t=!1){return{kty:["oct"],mode:"key-wrapping",secret:!0,subtle:{name:t?"AES-GCM":"AES-KW",length:e},usages:qa,ops:t?["encrypt","decrypt"]:["wrapKey","unwrapKey"]}}function ql(){return{kty:["oct"],mode:"key-wrapping",secret:!0,subtle:{name:"PBKDF2"},usages:qa,ops:["deriveBits","deriveBits"]}}let qp=qi({dir:{kty:["oct"],mode:"direct-encryption",secret:!0,subtle:{name:"AES-GCM"},usages:qa,ops:["encrypt","decrypt"]},"RSA-OAEP":qs(1),"RSA-OAEP-256":qs(256),"RSA-OAEP-384":qs(384),"RSA-OAEP-512":qs(512),"ECDH-ES":qd("direct-key-agreement"),"ECDH-ES+A128KW":qd("key-agreement-with-key-wrapping"),"ECDH-ES+A192KW":qd("key-agreement-with-key-wrapping"),"ECDH-ES+A256KW":qd("key-agreement-with-key-wrapping"),A128KW:qc(128),A192KW:qc(192),A256KW:qc(256),A128GCMKW:qc(128,!0),A192GCMKW:qc(192,!0),A256GCMKW:qc(256,!0),"PBES2-HS256+A128KW":ql(),"PBES2-HS384+A192KW":ql(),"PBES2-HS512+A256KW":ql()}),qu=["encrypt","decrypt"];function qm(e,t=!1){return{kty:["oct"],secret:!0,subtle:{name:t?"AES-CBC":"AES-GCM",length:e},usages:qa,ops:qu,cekBits:e,ivBits:t?128:96,cbc:t}}let qf=qi({A128GCM:qm(128),A192GCM:qm(192),A256GCM:qm(256),"A128CBC-HS256":qm(256,!0),"A192CBC-HS384":qm(384,!0),"A256CBC-HS512":qm(512,!0)});function qh(e,t){throw new Vf(`Invalid or unsupported "${e}" (JWE ${t}) header value`)}function qy(e){return("string"==typeof e?qp[e]:void 0)??qh("alg","Algorithm")}function qg(e){return"key-wrapping"===e.mode||"key-encryption"===e.mode||"key-agreement-with-key-wrapping"===e.mode}function q_(e){return("string"==typeof e?qf[e]:void 0)??qh("enc","Encryption Algorithm")}function qv(e,t){if("ECDH"!==e.algorithm.name&&"X25519"!==e.algorithm.name)throw TypeError("CryptoKey does not support this operation, its algorithm.name must be ECDH or X25519");VX(e,t)}function qb(e,t,r){V1(t,qy(e).subtle,r),VY(e,t)}async function q$(e,t,r,i){if(!(e instanceof Uint8Array)||e.length<8)throw new Vy("PBES2 Salt Input must be 8 or more octets");if(!Number.isSafeInteger(r)||1!==Math.sign(r))throw new Vy("PBES2 Count Input must be a positive integer");let o=Vt(Va(t),Uint8Array.of(0),e),n=parseInt(t.slice(13,16),10),a={hash:`SHA-${t.slice(8,11)}`,iterations:r,name:"PBKDF2",salt:o},s=await V3(i,qy(t).subtle,"deriveBits");return new Uint8Array(await crypto.subtle.deriveBits(a,s,n))}function qS(e){return Vt(Vo(e.length),e)}async function qk(e,t,r,i,o=new Uint8Array,n=new Uint8Array){qv(e),qv(t,"deriveBits");let a=Vt(qS(Va(r)),qS(o),qS(n),Vo(i));return async function(e,t,r){let i=t>>3,o=Math.ceil(i/32),n=new Uint8Array(32*o);for(let t=1;t<=o;t++){let i=await Vc("sha256",Vt(Vo(t),e,r));n.set(i,(t-1)*32)}return n.slice(0,i)}(new Uint8Array(await crypto.subtle.deriveBits({name:e.algorithm.name,public:e},t,"X25519"===e.algorithm.name?256:Math.ceil(parseInt(e.algorithm.namedCurve.slice(-3),10)/8)<<3)),i,a)}function qw(e){VU(e);let t=e.algorithm.namedCurve;if("P-256"!==t&&"P-384"!==t&&"P-521"!==t&&"X25519"!==e.algorithm.name)throw new Vf("ECDH with the provided key is not allowed or not supported by your javascript runtime")}function qR(e,t){let r=e[t];if(void 0!==r){if("string"!=typeof r)throw new Vy(`JOSE Header "${t}" (Agreement Party${"apu"===t?"U":"V"}Info) invalid`);return VC(r,t,Vy)}}function qP(e,t){if(void 0!==e&&void 0!==t&&e.byteLength===t.byteLength){for(let r=0;r"u")throw new Vf(`JWE "zip" (Compression Algorithm) Header Parameter requires the ${e} API.`)}async function qj(e,t,r=1/0){let i=e.writable.getWriter();i.write(t).catch(()=>{}),i.close().catch(()=>{});let o=[],n=0,a=e.readable.getReader();for(;;){let{value:e,done:t}=await a.read();if(t)break;if(o.push(e),n+=e.byteLength,1/0!==r&&n>r)throw new Vy("Decompressed plaintext exceeded the configured limit")}return Vt(...o)}function qC(e){let{aad:t,ciphertext:r,iv:i,protected:o,tag:n,unprotected:a}=e;if(void 0!==i&&("string"!=typeof i||!i))throw new Vy("JWE Initialization Vector incorrect type");if("string"!=typeof r)throw new Vy("JWE Ciphertext missing or incorrect type");if(void 0!==n&&("string"!=typeof n||!n))throw new Vy("JWE Authentication Tag incorrect type");if(void 0!==o&&"string"!=typeof o)throw new Vy("JWE Protected Header incorrect type");if(void 0!==t&&("string"!=typeof t||!t))throw new Vy("JWE AAD incorrect type");if(void 0!==a&&!Vq(a))throw new Vy("JWE Shared Unprotected Header incorrect type");return{aad:t,ciphertext:r,iv:i,protected:o,tag:n,unprotected:void 0===a?void 0:{...a}}}function qT(e){let t,r;try{let{header:i}=e;if(Vq(i)){r=i.alg;let e=Object.keys(i);e.includes("alg")||(r=void 0),t=Object.fromEntries(e.map(e=>[e,"alg"===e?r:i[e]]))}else t=i;let{encrypted_key:o}=e;return[{encrypted_key:o,header:t},r]}catch(e){return[void 0,r,e]}}function qO(e){let{encrypted_key:t,header:r}=e;if(void 0!==t&&"string"!=typeof t)throw new Vy("JWE Encrypted Key incorrect type");if(void 0!==r&&!Vq(r))throw new Vy("JWE Per-Recipient Unprotected Header incorrect type");if(void 0===e.protected&&void 0===r&&void 0===e.unprotected)throw new Vy("JOSE Header missing")}function qE(e){let t,{protected:r,ciphertext:i,iv:o,tag:n,aad:a}=e;return void 0!==r&&(t=VO(r,Vy,"JWE Protected Header is invalid")),[t,VC(i,"ciphertext",Vy),void 0!==o?VC(o,"iv",Vy):void 0,void 0!==n?VC(n,"tag",Vy):void 0,VT((r??"")+(void 0!==a?`.${a}`:""),"aad",Vy)]}function qA(e){return[e&&VM("keyManagementAlgorithms",e.keyManagementAlgorithms),e&&VM("contentEncryptionAlgorithms",e.contentEncryptionAlgorithms),e?.crit,e?.maxPBES2Count,e?.maxDecompressedLength]}async function qM(e,t,r,i=qE(e)){let o,n,a,s,[d,c,l,p,u]=i,{header:m,unprotected:f,aad:h}=e;if(void 0!==m||void 0!==f){if(!Vx(d,m,f))throw new Vy("JWE Protected, JWE Unprotected Header, and JWE Per-Recipient Unprotected Header Parameter names must be disjoint");o={...d,...m,...f}}else o=d??{};let[y,g,_,v,b]=t,{encrypted_key:$}=e;VN(Vy,VA,_,d,o),qI(o,d);let{alg:S,enc:k}=o;if("string"!=typeof S||!S)throw new Vy("missing JWE Algorithm (alg) in JWE Header");let w=qp[S];if(""===$&&(!w||!qg(w)))throw new Vy("JWE Encrypted Key incorrect type");let R=w?.mode==="integrated-encryption";if(!R&&("string"!=typeof k||!k))throw new Vy("missing JWE Encryption Algorithm (enc) in JWE Header");if(y&&!y.has(S)||!y&&S.startsWith("PBES2"))throw new Vm('"alg" (Algorithm) Header Parameter value not allowed');if(R){if(void 0!==k)throw new Vy('JWE "enc" (Encryption Algorithm) Header Parameter must not be present for integrated encryption');if(l?.byteLength)throw new Vy("JWE Initialization Vector must be empty for integrated encryption");if(p?.byteLength)throw new Vy("JWE Authentication Tag must be empty for integrated encryption")}else{if(g&&!g.has(k))throw new Vm('"enc" (Encryption Algorithm) Header Parameter value not allowed');n=q_(k)}if(void 0!==$)try{a=VC($,"encrypted_key",Vy)}catch(e){if(!w||!qg(w))throw e;a=new Uint8Array}let P=!1;"function"==typeof r&&(r=await r(d,e),P=!0);let V=w??qy(S);qg(V)&&void 0===a&&(a=new Uint8Array);let q=await VF("direct-encryption"===V.mode?n:V,r,"decrypt");if("integrated-encryption"===V.mode)s=await V.decrypt(q,a,c,u,d,o);else{let e,t=n;try{e=await async function(e,t,r,i,o,n){let{alg:a}=e,s=e.mode;if("direct-encryption"===s)return qV(i),r;let d="direct-key-agreement"===s;switch(d?qV(i):function(e){if(void 0===e)throw new Vy("JWE Encrypted Key missing")}(i),e.subtle.name){case"ECDH":{let{epk:i}=o;if(!Vq(i)||["d","k","p","q","dp","dq","qi","oth","priv"].some(e=>Object.hasOwn(i,e)))throw new Vy('JOSE Header "epk" (Ephemeral Public Key) missing or invalid');qw(r);let n=await V6(e,i),s=qR(o,"apu"),c=qR(o,"apv");qP(s,c);let l=await qk(n,r,d?t.alg:a,d?t.cekBits:parseInt(a.slice(-5,-2),10),s,c);if(d)return l;r=l;break}case"RSA-OAEP":return VU(r),qb(a,r,"decrypt"),new Uint8Array(await crypto.subtle.decrypt("RSA-OAEP",r,i));case"PBKDF2":{if("number"!=typeof o.p2c)throw new Vy('JOSE Header "p2c" (PBES2 Count) missing or invalid');if(void 0!==n&&1/0!==n&&(!Number.isSafeInteger(n)||n<1))throw TypeError("maxPBES2Count must be a positive safe integer or Infinity");if(o.p2c>(n??1e4))throw new Vy('JOSE Header "p2c" (PBES2 Count) out is of acceptable bounds');if("string"!=typeof o.p2s)throw new Vy('JOSE Header "p2s" (PBES2 Salt) missing or invalid');let e=VC(o.p2s,"p2s",Vy);r=await q$(e,a,o.p2c,r);break}case"AES-GCM":{if("string"!=typeof o.iv)throw new Vy('JOSE Header "iv" (Initialization Vector) missing or invalid');if("string"!=typeof o.tag)throw new Vy('JOSE Header "tag" (Authentication Tag) missing or invalid');let e=VC(o.iv,"iv",Vy),t=VC(o.tag,"tag",Vy);if(12!==e.byteLength)throw new Vy("Invalid Initialization Vector length");if(16!==t.byteLength)throw new Vy("Invalid Authentication Tag length");return qr(q_(a.slice(0,-2)),r,i,e,t,new Uint8Array)}}return async function(e,t,r){let i=await V3(t,qy(e).subtle,"unwrapKey",!0),o=await crypto.subtle.unwrapKey("raw",r,i,"AES-KW",{hash:"SHA-256",name:"HMAC"},!0,["sign"]);return new Uint8Array(await crypto.subtle.exportKey("raw",o))}(a.slice(-6),r,i)}(V,t,q,a,o,v),qg(V)&&e instanceof Uint8Array&&e.byteLength<<3!==t.cekBits&&(e=V9(t))}catch(r){if(r instanceof TypeError||r instanceof Vy||r instanceof Vf)throw r;e=V9(t)}s=await qr(t,e,c,l,p,u)}if("DEF"===o.zip){let e=b??25e4;if(0===e)throw new Vf('JWE "zip" (Compression Algorithm) Header Parameter is not supported.');if(1/0!==e&&(!Number.isSafeInteger(e)||e<1))throw TypeError("maxDecompressedLength must be 0, a positive safe integer, or Infinity");s=await (async function(e,t){return qx("DecompressionStream"),qj(new DecompressionStream("deflate-raw"),e,t)})(s,e).catch(e=>{throw e instanceof Vy?e:new Vy("Failed to decompress plaintext",{cause:e})})}return{plaintext:s,...d&&{protectedHeader:d},...void 0!==h&&{additionalAuthenticatedData:VC(h,"aad",Vy)},...f&&{sharedUnprotectedHeader:f},...m&&{unprotectedHeader:m},...P&&{key:q}}}async function qW(e,t,r){if(e instanceof Uint8Array&&(e=P7.decode(e)),"string"!=typeof e)throw new Vy("Compact JWE must be a string or Uint8Array");let{0:i,1:o,2:n,3:a,4:s,length:d}=e.split(".");if(5!==d)throw new Vy("Invalid Compact JWE");return qM({ciphertext:a,iv:n||void 0,protected:i,tag:s||void 0,encrypted_key:o||void 0},t,r)}async function qN(e,t,r){return qW(e,qA(r),t)}async function qz(e,t,r){if(!Vq(e))throw new Vy("Flattened JWE must be an object");let i=qC(e),[o,,n]=qT(e);if(!o)throw n;let a={...i,...o};return qO(a),qM(a,qA(r),t)}async function qD(e,t,r){let i,o,n;if(!Vq(e))throw new Vy("General JWE must be an object");let a=e.recipients;if(!Array.isArray(a))throw new Vy("JWE Recipients missing or incorrect type");let s=Array.from(a);if(!s.every(Vq))throw new Vy("JWE Recipients missing or incorrect type");if(!s.length)throw new Vy("JWE Recipients has no members");try{i=qA(r),o=qC(e),n=qE(o)}catch{throw new Vh}let d=s.map(e=>qT(e));if(s.length>1)for(let[,e]of d){let t=n[0]?.alg??e??o.unprotected?.alg,r="string"==typeof t?qp[t]:void 0;if(r&&!qg(r))throw new Vy(`"${t}" alg may only have a single recipient`)}for(let[e]of d)if(e)try{let r={...o,...e};return qO(r),await qM(r,i,t,n)}catch{}throw new Vh}function qF(e,t,r){if(!Vx(e,t,r))throw new Vy("JWE Protected, JWE Shared Unprotected and JWE Per-Recipient Header Parameter names must be disjoint")}function qL(e,t,r=!1){if(!e[1]&&!e[2]&&!e[3])throw new Vy("either setProtectedHeader, setUnprotectedHeader, or sharedUnprotectedHeader must be called before #encrypt()");void 0!==t&&(e[8]=t?.crit);let[,i,o,n,a,s,d,c,l]=e;if(void 0!==a&&VV(a,"JWE Additional Authenticated Data"),void 0!==s&&VV(s,"JWE Content Encryption Key"),void 0!==d&&VV(d,"JWE Initialization Vector"),r||void 0===i||(i=VD(Vy,i)[0],e[1]=i),void 0!==o&&(o=VD(Vy,o)[0],e[2]=o),r||void 0===n||(n=VD(Vy,n)[0],e[3]=n),void 0!==c&&!Vq(c))throw TypeError("JWE Key Management Parameters must be an object");qF(i,o,n);let p={...i,...o,...n};VW(Vy,i),VN(Vy,VA,l,i,p),qI(p,i);let{alg:u,enc:m}=p;if("string"!=typeof u||!u)throw new Vy('JWE "alg" (Algorithm) Header Parameter missing or invalid');let f=qp[u];if(f?.mode==="integrated-encryption"){if(void 0!==m)throw new Vy('JWE "enc" (Encryption Algorithm) Header Parameter must not be present for integrated encryption');if(void 0!==s)throw TypeError(`setContentEncryptionKey cannot be called with JWE "alg" (Algorithm) Header ${u}`);if(void 0!==d)throw TypeError(`setInitializationVector cannot be called with JWE "alg" (Algorithm) Header ${u}`);return[p,void 0,f]}if("string"!=typeof m||!m)throw new Vy('JWE "enc" (Encryption Algorithm) Header Parameter missing or invalid');return[p,q_(m),f]}async function qU(e,t,r){let i,o,n,a,s,d,[c,l,p]=t,[u,m,f,h,y,g,_,v,,b]=e,$=m,S=f,k=p??qy(c.alg);"integrated-encryption"===k.mode?n=await VF(k,r,"encrypt"):[n,i,o]=await qq(k,l,r,c,g,v),o&&(b?S=S?{...S,...o}:o:$=$?{...$,...o}:o,qF($,S,h));let w=$?VP(JSON.stringify($)):"",R=y?.byteLength?VP(y):void 0,P=Va(R?`${w}.${R}`:w),V=u;"DEF"===c.zip&&(V=await (async function(e){return qx("CompressionStream"),qj(new CompressionStream("deflate-raw"),e)})(V).catch(e=>{throw new Vy("Failed to compress plaintext",{cause:e})})),"integrated-encryption"===k.mode?[i,a]=await k.encrypt(n,V,P,$,c,v):{ciphertext:a,tag:s,iv:d}=await qt(l,V,n,_,P);let q={ciphertext:VP(a)};return d&&(q.iv=VP(d)),s&&(q.tag=VP(s)),i?.byteLength&&(q.encrypted_key=VP(i)),R&&(q.aad=R),$&&(q.protected=w),h&&(q.unprotected=h),S&&(q.header=S),q}async function qH(e,t,r){return qU(e,qL(e,r),t)}function qG(e){return[e.protected,e.encrypted_key,e.iv,e.ciphertext,e.tag].join(".")}class qB{#n;state;constructor(e,t,r){this.#n=e,this.state=[void 0,void 0,t,r]}setUnprotectedHeader(e){return Vj(this.state[0],"setUnprotectedHeader"),this.state[0]=e,this}setKeyManagementParameters(e){return Vj(this.state[1],"setKeyManagementParameters"),this.state[1]=e,this}addRecipient(...e){return this.#n.addRecipient(...e)}encrypt(...e){return this.#n.encrypt(...e)}done(){return this.#n}}class qK{#a;#s=[];#d;#c;#l;constructor(e){this.#a=e}addRecipient(e,t){let r=new qB(this,e,t?.crit);return this.#s.push(r),r}setProtectedHeader(e){return Vj(this.#d,"setProtectedHeader"),this.#d=e,this}setSharedUnprotectedHeader(e){return Vj(this.#c,"setSharedUnprotectedHeader"),this.#c=e,this}setAdditionalAuthenticatedData(e){return this.#l=e,this}async encrypt(){if(!this.#s.length)throw new Vy("at least one recipient must be added");VV(this.#a,"plaintext");let e=this.#s.length>1,t,r=this.#d,i=this.#c,o=[];for(let n of this.#s){let[a,s,d,c]=n.state,l=[this.#a,r,a,i,this.#l,void 0,void 0,s,c,e],p=qL(l,void 0,o.length>0);o.length||(r=l[1],i=l[3]),o.push([l,p,d]);let[{alg:u,enc:m},,f]=p;if(e&&f&&!qg(f))throw new Vy(`"${u}" alg may only have a single recipient`);if(t){if(t!==m)throw new Vy('JWE "enc" (Encryption Algorithm) Header Parameter must be the same for all recipients')}else t=m}for(let[,e]of o)e[2]??=qy(e[0].alg);let[n,a,s]=o[0],d=e?V9(a[1]):void 0;n[5]=d;let{encrypted_key:c,header:l,...p}=await qU(n,a,s),u={...p,recipients:[{}]};c&&(u.recipients[0].encrypted_key=c),l&&(u.recipients[0].header=l);for(let e=1;e(function(e,t){try{let r=q4(e,[t]),i=q3(r.protected),{b64:o,crit:n}=i;return[r,i,Array.isArray(n)&&n.includes("b64")?"boolean"==typeof o?o?1:2:0:1]}catch{return}})(e,s)).filter(e=>void 0!==e),c=0;for(let[,,e]of d)if(3==(c|=e))throw new Vg("inconsistent use of JWS Unencoded Payload (RFC7797)");for(let e of d)try{let[r]=await q8(e[0],i,t,q9,e[1]);return r}catch{}throw new Vw}let Ii=e=>Math.floor(e.getTime()/1e3),Io={s:1,m:60,h:3600,d:86400,w:604800,y:0x1e187e0},In=/^(\+|\-)? ?(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)(?: (ago|from now))?$/i,Ia="check_failed";function Is(){throw TypeError("Invalid time period format")}function Id(e){"string"!=typeof e&&Is();let t=In.exec(e);(!t||t[4]&&t[1])&&Is();let r=Math.round(parseFloat(t[2])*Io[t[3][0].toLowerCase()]);return Number.isFinite(r)||Is(),"-"===t[1]||"ago"===t[4]?-r:r}function Ic(e,t){if(!Number.isFinite(t))throw TypeError(`Invalid ${e} input`);return t}function Il(e,t){if("string"!=typeof t)throw TypeError(`"${e}" claim must be a string`)}function Ip(e,t){return"number"==typeof e?Ic(t,e):e instanceof Date?Ic(t,Ii(e)):Ii(new Date)+Id(e)}let Iu=e=>{let t=e.toLowerCase();return e.includes("/")?t:`application/${t}`};function Im(e,t,r=!1){let i=e[t];if(!(void 0===i&&!r)){if("number"!=typeof i)throw new Vp(`"${t}" claim must be a number`,e,t,"invalid");return i}}function If(e,t){throw new Vp(`unexpected "${t}" claim value`,e,t,Ia)}function Ih(e,t,r={}){let i,o,n;try{i=JSON.parse(Ve.decode(t))}catch{}if(!Vq(i))throw new V_("JWT Claims Set must be a top-level JSON object");let{typ:a}=r;if(void 0!==a&&("string"!=typeof e.typ||Iu(e.typ)!==Iu(a)))throw new Vp('unexpected "typ" JWT header value',i,"typ",Ia);let{requiredClaims:s=[],issuer:d,subject:c,audience:l,maxTokenAge:p}=r,u=[...s];for(let e of(void 0!==p&&u.push("iat"),void 0!==l&&u.push("aud"),void 0!==c&&u.push("sub"),void 0!==d&&u.push("iss"),new Set(u.reverse())))if(!Object.hasOwn(i,e))throw new Vp(`missing required "${e}" claim`,i,e,"missing");void 0===d||(Array.isArray(d)?d:[d]).includes(i.iss)||If(i,"iss"),void 0!==c&&i.sub!==c&&If(i,"sub"),void 0===l||(o=i.aud,n="string"==typeof l?[l]:l,"string"==typeof o?n.includes(o):!!Array.isArray(o)&&n.some(e=>o.includes(e)))||If(i,"aud");let{clockTolerance:m}=r,f=0;if("string"==typeof m)f=Id(m);else if(void 0!==m){if("number"!=typeof m)throw TypeError("Invalid clockTolerance option type");f=m}Ic("clockTolerance option",f);let{currentDate:h}=r,y=Ic("currentDate option",Ii(void 0===h?new Date:h)),g=Im(i,"iat",void 0!==p),_=Im(i,"nbf");if(void 0!==_&&_>y+f)throw new Vp('"nbf" claim timestamp check failed',i,"nbf",Ia);let v=Im(i,"exp");if(void 0!==v&&v<=y-f)throw new Vu('"exp" claim timestamp check failed',i,"exp",Ia);if(void 0!==p){let e=y-g;if(e-f>Ic("maxTokenAge option","number"==typeof p?p:Id(p)))throw new Vu('"iat" claim timestamp check failed (too far in the past)',i,"iat",Ia);if(e<-f)throw new Vp('"iat" claim timestamp check failed (it should be in the past)',i,"iat",Ia)}return i}function Iy(e){return f.get(e)}function Ig(e){let t=Iy(e);for(let e of["iat","nbf","exp"]){let r=t[e];if("number"==typeof r&&!Number.isFinite(r))throw TypeError(`"${e}" claim must be a finite number`)}return P8.encode(JSON.stringify(t))}class I_{constructor(e={}){if(!Vq(e))throw TypeError("JWT Claims Set MUST be an object");(f||=new WeakMap).set(this,structuredClone(e))}setIssuer(e){return Il("iss",e),Iy(this).iss=e,this}setSubject(e){return Il("sub",e),Iy(this).sub=e,this}setAudience(e){return function(e){if("string"!=typeof e&&(!Array.isArray(e)||Array.from(e).some(e=>"string"!=typeof e)))throw TypeError('"aud" claim must be a string or an array of strings')}(e),Iy(this).aud=e,this}setJti(e){return Il("jti",e),Iy(this).jti=e,this}setNotBefore(e){return Iy(this).nbf=Ip(e,"setNotBefore"),this}setExpirationTime(e){return Iy(this).exp=Ip(e,"setExpirationTime"),this}setIssuedAt(e){let t=Iy(this);return void 0===e?t.iat=Ii(new Date):"string"==typeof e?t.iat=Ic("setIssuedAt",Ii(new Date)+Id(e)):t.iat=Ip(e,"setIssuedAt"),this}}async function Iv(e,t,r){let[i,o]=await q7(e,q6(r),t);if(!o)throw new V_("JWTs MUST NOT use unencoded payload");let n=Ih(i.protectedHeader,i.payload,r);return{...i,payload:n}}async function Ib(e,t,r){let{plaintext:i,...o}=await qW(e,qA(r),t),{protectedHeader:n}=o,a=Ih(n,i,r);for(let e of["iss","sub","aud"])if(void 0!==n[e]&&("aud"===e?JSON.stringify(n.aud)!==JSON.stringify(a.aud):n[e]!==a[e]))throw new Vp(`replicated "${e}" claim header parameter mismatch`,a,e,"mismatch");return{payload:a,...o}}class I${#p;constructor(e){VV(e,"plaintext"),this.#p=[e]}setContentEncryptionKey(e){return Vj(this.#p[5],"setContentEncryptionKey"),this.#p[5]=e,this}setInitializationVector(e){return Vj(this.#p[6],"setInitializationVector"),this.#p[6]=e,this}setProtectedHeader(e){return Vj(this.#p[1],"setProtectedHeader"),this.#p[1]=e,this}setKeyManagementParameters(e){return Vj(this.#p[7],"setKeyManagementParameters"),this.#p[7]=e,this}async encrypt(e,t){return qG(await qH([...this.#p],e,t))}}class IS{#p;constructor(e){VV(e,"plaintext"),this.#p=[e]}setKeyManagementParameters(e){return Vj(this.#p[7],"setKeyManagementParameters"),this.#p[7]=e,this}setProtectedHeader(e){return Vj(this.#p[1],"setProtectedHeader"),this.#p[1]=e,this}setSharedUnprotectedHeader(e){return Vj(this.#p[3],"setSharedUnprotectedHeader"),this.#p[3]=e,this}setUnprotectedHeader(e){return Vj(this.#p[2],"setUnprotectedHeader"),this.#p[2]=e,this}setAdditionalAuthenticatedData(e){return this.#p[4]=e,this}setContentEncryptionKey(e){return Vj(this.#p[5],"setContentEncryptionKey"),this.#p[5]=e,this}setInitializationVector(e){return Vj(this.#p[6],"setInitializationVector"),this.#p[6]=e,this}async encrypt(e,t){return qH([...this.#p],e,t)}}async function Ik(e,t,r){let[i,o,n,a]=e,s="";if(void 0!==o){let e=VD(Vg,o);o=e[0],s=VP(e[1])}if(void 0!==n&&(n=VD(Vg,n)[0]),!o&&!n)throw new Vg("either setProtectedHeader or setUnprotectedHeader must be called before #sign()");if(!Vx(o,n))throw new Vg("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");let d={...o,...n};VW(Vg,o);let c=Vz(o,VN(Vg,VE,a,o,d));c||r?.();let{alg:l}=d;if("string"!=typeof l||!l)throw new Vg('JWS "alg" (Algorithm) Header Parameter missing or invalid');let p=q2(l),u="",m=i,f;if(c){let t=e[4];t?(u=t[0]??=VP(i),m=t[1]??=Va(u)):(u=VP(i),f=P8.encode(`${s}.${u}`))}f??=Vt(Va(s),Va("."),m);let h=await V3(await VF(p,t,"sign"),p.subtle,"sign");p.minRsaBits&&VY(p.alg,h);let y={signature:VP(new Uint8Array(await crypto.subtle.sign(p.signing,h,f))),payload:u};return o&&(y.protected=s),n&&(y.header=n),[y,c]}async function Iw(e,t,r,i,o){let[n]=await Ik([e,t,void 0,r],i,o);return`${n.protected}.${n.payload}.${n.signature}`}class IR{#u;#d;constructor(e){VV(e,"payload"),this.#u=e}setProtectedHeader(e){return Vj(this.#d,"setProtectedHeader"),this.#d=e,this}async sign(e,t){return Iw(this.#u,this.#d,t?.crit,e,()=>{throw TypeError("use the flattened module for creating JWS with b64: false")})}}class IP{#p;constructor(e){VV(e,"payload"),this.#p=[e]}setProtectedHeader(e){return Vj(this.#p[1],"setProtectedHeader"),this.#p[1]=e,this}setUnprotectedHeader(e){return Vj(this.#p[2],"setUnprotectedHeader"),this.#p[2]=e,this}async sign(e,t){let r=[...this.#p];r[3]=t?.crit;let[i]=await Ik(r,e);return i}}class IV{#n;state;constructor(e,t,r){this.#n=e,this.state=[void 0,void 0,t,r?.crit]}setProtectedHeader(e){return Vj(this.state[0],"setProtectedHeader"),this.state[0]=e,this}setUnprotectedHeader(e){return Vj(this.state[1],"setUnprotectedHeader"),this.state[1]=e,this}addSignature(...e){return this.#n.addSignature(...e)}sign(...e){return this.#n.sign(...e)}done(){return this.#n}}class Iq{#u;#m=[];constructor(e){this.#u=e}addSignature(e,t){let r=new IV(this,e,t);return this.#m.push(r),r}async sign(){let e;if(!this.#m.length)throw new Vg("at least one signature must be added");VV(this.#u,"payload");let t={signatures:[],payload:""},r=[];for(let i of this.#m){let[o,n,a,s]=i.state,[{payload:d,...c},l]=await Ik([this.#u,o,n,s,r],a);if(void 0===e)e=l,t.payload=d;else if(e!==l)throw new Vg("inconsistent use of JWS Unencoded Payload (RFC7797)");t.signatures.push(c)}return t}}let II=I_;class Ix extends II{#d;setProtectedHeader(e){return Vj(this.#d,"setProtectedHeader"),this.#d=e,this}async sign(e,t){return Iw(Ig(this),this.#d,t?.crit,e,()=>{throw new V_("JWTs MUST NOT use unencoded payload")})}}let Ij=I_;class IC extends Ij{#p=[void 0];#f;#h;#y;setProtectedHeader(e){return Vj(this.#p[1],"setProtectedHeader"),this.#p[1]=e,this}setKeyManagementParameters(e){return Vj(this.#p[7],"setKeyManagementParameters"),this.#p[7]=e,this}setContentEncryptionKey(e){return Vj(this.#p[5],"setContentEncryptionKey"),this.#p[5]=e,this}setInitializationVector(e){return Vj(this.#p[6],"setInitializationVector"),this.#p[6]=e,this}replicateIssuerAsHeader(){return this.#f=!0,this}replicateSubjectAsHeader(){return this.#h=!0,this}replicateAudienceAsHeader(){return this.#y=!0,this}async encrypt(e,t){let r=Ig(this);this.#p[1]&&(this.#f||this.#h||this.#y)&&(this.#p[1]={...this.#p[1],iss:this.#f?Iy(this).iss:void 0,sub:this.#h?Iy(this).sub:void 0,aud:this.#y?Iy(this).aud:void 0});let i=[...this.#p];return i[0]=r,qG(await qH(i,e,t))}}let IT='"alg" (Algorithm)';function IO(e='JWK "alg" (Algorithm) Parameter'){throw new Vf(`Invalid or unsupported ${e} value`)}function IE(e,t){return("string"==typeof e?q0[e]??qp[e]:void 0)??IO(t)}let IA=async(e,t,r)=>{var i,o;let n;if(VG(r)){if(r.type!==e)throw TypeError(`key is not a ${e} key`);return r.export({format:"pem",type:t})}if(!VH(r))throw TypeError(VJ(r,"CryptoKey","KeyObject"));if(!r.extractable)throw TypeError("CryptoKey is not extractable");if(r.type!==e)throw TypeError(`key is not a ${e} key`);return i=Vs(new Uint8Array(await crypto.subtle.exportKey(t,r))),o=`${e.toUpperCase()} KEY`,n=(i.match(/.{1,64}/g)||[]).join(` +`,e.enqueue(t.encode(o)),!0}catch(e){return this.onerror?.(e),!1}}handleUnsupportedRequest(){return this.onerror?.(Error("Method not allowed.")),Response.json({jsonrpc:"2.0",error:{code:-32e3,message:"Method not allowed."},id:null},{status:405,headers:{Allow:"GET, POST, DELETE","Content-Type":"application/json"}})}async handlePostRequest(e,t){try{var r,i;let o,n,a,s,d,c=e.headers.get("accept");if(!c?.includes("application/json")||!c.includes("text/event-stream"))return this.onerror?.(Error("Not Acceptable: Client must accept both application/json and text/event-stream")),this.createJsonErrorResponse(406,-32e3,"Not Acceptable: Client must accept both application/json and text/event-stream");if(r=e.headers.get("content-type"),"application/json"!==r&&"application/json"!==function(e){if(e)try{return lH.parse(e).type}catch{let t=(e.split(";",1)[0]??"").trim().toLowerCase();if(""===t||e.slice(t.length).includes(","))return;return t}}(r))return this.onerror?.(Error("Unsupported Media Type: Content-Type must be application/json")),this.createJsonErrorResponse(415,-32e3,"Unsupported Media Type: Content-Type must be application/json");if(t?.parsedBody===void 0)try{let t=await async function(e,t=4194304){if(Number(e.headers.get("content-length"))>t)return{tooLarge:!0};if(null===e.body)return{tooLarge:!1,text:""};let r=e.body.getReader(),i=new TextDecoder,o=0,n="";try{for(;;){let{done:e,value:a}=await r.read();if(e)break;if((o+=a.byteLength)>t)return{tooLarge:!0};n+=i.decode(a,{stream:!0})}}finally{r.releaseLock()}return{tooLarge:!1,text:n+i.decode()}}(e,this._maxRequestBodySize);if(t.tooLarge){let e=(i=this._maxRequestBodySize,`Payload Too Large: Request body must not exceed ${i} bytes`);return this.onerror?.(Error(e)),this.createJsonErrorResponse(413,-32e3,e)}o=JSON.parse(t.text)}catch(e){return this.onerror?.(e),this.createJsonErrorResponse(400,-32700,"Parse error: Invalid JSON")}else o=t.parsedBody;if(Array.isArray(o)&&o.length>100)return this.onerror?.(Error("Invalid Request: Batch must not exceed 100 messages")),this.createJsonErrorResponse(400,-32600,"Invalid Request: Batch must not exceed 100 messages");try{n=Array.isArray(o)?o.map(e=>aW.parse(e)):[aW.parse(o)]}catch(e){return this.onerror?.(e),this.createJsonErrorResponse(400,-32700,"Parse error: Invalid JSON-RPC message")}if(this._closed)return this.createJsonErrorResponse(404,-32001,"Session not found");let l=n.some(e=>aX.safeParse(e).success);if(l){if(this._initialized&&void 0!==this.sessionId)return this.onerror?.(Error("Invalid Request: Server already initialized")),this.createJsonErrorResponse(400,-32600,"Invalid Request: Server already initialized");if(n.length>1)return this.onerror?.(Error("Invalid Request: Only one initialization request is allowed")),this.createJsonErrorResponse(400,-32600,"Invalid Request: Only one initialization request is allowed");this.sessionId=this.sessionIdGenerator?.(),this._initialized=!0,this.sessionId&&this._onsessioninitialized&&await Promise.resolve(this._onsessioninitialized(this.sessionId))}if(!l){let t=this.validateSession(e);if(t)return t;let r=this.validateProtocolVersion(e);if(r)return r}if(this._closed)return this.createJsonErrorResponse(404,-32001,"Session not found");try{a=await this._checkScopeChallenge(n,t?.authInfo)}catch(e){return this.onerror?.(e),this.createJsonErrorResponse(500,-32603,"Internal server error")}if(a)return a;if(!n.some(e=>ll(e))){for(let r of n)this.onmessage?.(r,{authInfo:t?.authInfo,request:e});return new Response(null,{status:202})}let p=crypto.randomUUID(),u=n.find(e=>aX.safeParse(e).success),m=u?u.params.protocolVersion:e.headers.get("mcp-protocol-version")??"2025-03-26";if(this._enableJsonResponse)return new Promise(r=>{for(let e of(this._streamMapping.set(p,{resolveJson:r,cleanup:()=>{this._streamMapping.delete(p)}}),n))ll(e)&&this._requestToStreamMapping.set(e.id,p);for(let r of n)this.onmessage?.(r,{authInfo:t?.authInfo,request:e})});let f=new TextEncoder,h=new ReadableStream({start:e=>{s=e},cancel:()=>{void 0!==d&&clearInterval(d),this._streamMapping.get(p)?.controller===s&&this._streamMapping.delete(p)}}),y={"Content-Type":"text/event-stream","Cache-Control":"no-cache, no-transform",Connection:"keep-alive","X-Accel-Buffering":"no"};for(let e of(void 0!==this.sessionId&&(y["mcp-session-id"]=this.sessionId),n))ll(e)&&(this._streamMapping.set(p,{controller:s,encoder:f,cleanup:()=>{void 0!==d&&clearInterval(d),this._streamMapping.delete(p);try{s.close()}catch{}}}),this._requestToStreamMapping.set(e.id,p));for(let r of(await this.writePrimingEvent(s,f,p,m),n)){let i,o;ll(r)&&this._eventStore&&this.supportsEmptySSEData(m)&&(i=()=>{this.closeSSEStream(r.id)},o=()=>{this.closeStandaloneSSEStream()}),this.onmessage?.(r,{authInfo:t?.authInfo,request:e,closeSSEStream:i,closeStandaloneSSEStream:o})}return this._streamMapping.get(p)?.controller===s&&(d=this.startKeepAlive(s,f)),new Response(h,{status:200,headers:y})}catch(e){return this.onerror?.(e),this.createJsonErrorResponse(400,-32700,"Parse error",{data:String(e)})}}async handleDeleteRequest(e){let t=this.validateSession(e);if(t)return t;let r=this.validateProtocolVersion(e);if(r)return r;try{return await Promise.resolve(this._onsessionclosed?.(this.sessionId)),new Response(null,{status:200})}finally{await this.close()}}validateSession(e){if(void 0===this.sessionIdGenerator)return;if(!this._initialized)return this.onerror?.(Error("Bad Request: Server not initialized")),this.createJsonErrorResponse(400,-32e3,"Bad Request: Server not initialized");let t=e.headers.get("mcp-session-id");return t?t!==this.sessionId?(this.onerror?.(Error("Session not found")),this.createJsonErrorResponse(404,-32001,"Session not found")):void 0:(this.onerror?.(Error("Bad Request: Mcp-Session-Id header is required")),this.createJsonErrorResponse(400,-32e3,"Bad Request: Mcp-Session-Id header is required"))}validateProtocolVersion(e){let t=e.headers.get("mcp-protocol-version");if(null!==t&&!this._supportedProtocolVersions.includes(t)){let e=`Bad Request: Unsupported protocol version: ${t} (supported versions: ${this._supportedProtocolVersions.join(", ")})`;return this.onerror?.(Error(e)),this.createJsonErrorResponse(400,-32e3,e)}}async close(){if(!this._closed){for(let{cleanup:e}of(this._closed=!0,this._streamMapping.values()))e();this._streamMapping.clear(),this._requestResponseMap.clear(),this.onclose?.()}}closeSSEStream(e){let t=this._requestToStreamMapping.get(e);if(!t)return;let r=this._streamMapping.get(t);r&&r.cleanup()}closeStandaloneSSEStream(){let e=this._streamMapping.get(this._standaloneSseStreamId);e&&e.cleanup()}async send(e,t){let r=t?.relatedRequestId;if((aE.safeParse(e).success||aA.safeParse(e).success)&&(r=e.id),void 0===r){let t;if(aE.safeParse(e).success||aA.safeParse(e).success)throw Error("Cannot send a response on a standalone SSE stream unless resuming a previous client request");this._eventStore&&(t=await this._eventStore.storeEvent(this._standaloneSseStreamId,e));let r=this._streamMapping.get(this._standaloneSseStreamId);if(void 0===r)return;r.controller&&r.encoder&&(void 0===t||!r.replayedEventIds?.has(t))&&this.writeSSEEvent(r.controller,r.encoder,e,t);return}let i=this._requestToStreamMapping.get(r);if(!i)throw Error(`No connection established for request ID: ${String(r)}`);let o=this._streamMapping.get(i);if(!this._enableJsonResponse){let t;this._eventStore&&(t=await this._eventStore.storeEvent(i,e),o=this._streamMapping.get(i)),o?.controller&&o?.encoder&&(void 0===t||!o.replayedEventIds?.has(t))&&this.writeSSEEvent(o.controller,o.encoder,e,t)}if(aE.safeParse(e).success||aA.safeParse(e).success){this._requestResponseMap.set(r,e);let t=[...this._requestToStreamMapping.entries()].filter(([e,t])=>t===i).map(([e])=>e);if(t.every(e=>this._requestResponseMap.has(e))){if(!o){if(this._enableJsonResponse)throw Error(`No connection established for request ID: ${String(r)}`);if(!this._eventStore){for(let e of(this.onerror?.(Error(`Response for request ID ${String(r)} is undeliverable: per-request stream is disconnected and no eventStore is configured`)),t))this._requestResponseMap.delete(e),this._requestToStreamMapping.delete(e);return}for(let e of t)this._requestResponseMap.delete(e),this._requestToStreamMapping.delete(e);return}if(this._enableJsonResponse&&o.resolveJson){let e={"Content-Type":"application/json"};void 0!==this.sessionId&&(e["mcp-session-id"]=this.sessionId);let r=t.map(e=>this._requestResponseMap.get(e));1===r.length?o.resolveJson(Response.json(r[0],{status:200,headers:e})):o.resolveJson(Response.json(r,{status:200,headers:e})),o.cleanup()}else o.cleanup();for(let e of t)this._requestResponseMap.delete(e),this._requestToStreamMapping.delete(e)}}}};let u1=Symbol("swallowsErrorsAfterClose");var u0=class{_readBuffer;_started=!1;_closed=!1;constructor(e=M.stdin,t=M.stdout,r){this._stdin=e,this._stdout=t,this._readBuffer=new lG({maxBufferSize:r?.maxBufferSize})}onclose;onerror;onmessage;_ondata=e=>{try{this._readBuffer.append(e),this.processReadBuffer()}catch(e){this.onerror?.(e),this.close().catch(()=>{})}};_onerror=e=>{this.onerror?.(e)};_onstdouterror=e=>{this._closed||(this.onerror?.(e),this.close().catch(()=>{}))};_onstdinclose=()=>{this.close().catch(()=>{})};async start(){if(this._started)throw Error("StdioServerTransport already started! If using Server class, note that connect() calls start() automatically.");for(let e of(this._started=!0,this._stdout.listeners("error")))e[u1]&&this._stdout.off("error",e);(this._stdin.readableEnded||this._stdin.destroyed)&&setImmediate(this._onstdinclose),this._stdin.on("data",this._ondata),this._stdin.on("error",this._onerror),this._stdin.on("end",this._onstdinclose),this._stdin.on("close",this._onstdinclose),this._stdout.on("error",this._onstdouterror)}processReadBuffer(){for(;;)try{let e=this._readBuffer.readMessage();if(null===e)break;this.onmessage?.(e)}catch(e){this.onerror?.(e)}}async close(){this._closed||(this._closed=!0,this._stdin.off("data",this._ondata),this._stdin.off("error",this._onerror),this._stdin.off("end",this._onstdinclose),this._stdin.off("close",this._onstdinclose),this._onstdouterror[u1]=!0,0===this._stdin.listenerCount("data")&&this._stdin.pause(),this._readBuffer.clear(),this.onclose?.())}send(e){return this._closed?Promise.reject(Error("StdioServerTransport is closed")):new Promise((t,r)=>{let i=JSON.stringify(e)+"\n",o=!1,n=e=>{o||(o=!0,this._stdout.off("error",n),this._stdout.off("drain",a),r(e))},a=()=>{o||(o=!0,this._stdout.off("error",n),this._stdout.off("drain",a),t())};if(this._stdout.once("error",n),this._stdout.write(i)){if(o)return;o=!0,this._stdout.off("error",n),t()}else o||this._stdout.once("drain",a)})}},u2=class extends Error{constructor(e,t){super(e,t),this.name="RequestError"}},u4=global.Request,u6=class extends u4{constructor(e,t){"object"==typeof e&&u9 in e&&(e=e[u9]()),void 0!==t?.body?.getReader&&(t.duplex??="half"),super(e,t)}},u3=Symbol("wrapBodyStream"),u9=Symbol("getRequestCache"),u5=Symbol("requestCache"),u8=Symbol("incomingKey"),u7=Symbol("urlKey"),me=Symbol("headersKey"),mt=Symbol("abortControllerKey"),mr=Symbol("getAbortController"),mi={get method(){return this[u8].method||"GET"},get url(){return this[u7]},get headers(){return this[me]||=(e=>{let t=[],r=e.rawHeaders;for(let e=0;e{let n={method:e,headers:r,signal:o.signal};if("TRACE"===e){n.method="GET";let e=new u6(t,n);return Object.defineProperty(e,"method",{get:()=>"TRACE"}),e}if("GET"!==e&&"HEAD"!==e)if("rawBody"in i&&i.rawBody instanceof Buffer)n.body=new ReadableStream({start(e){e.enqueue(i.rawBody),e.close()}});else if(i[u3]){let e;n.body=new ReadableStream({async pull(t){try{e||=D.toWeb(i).getReader();let{done:r,value:o}=await e.read();r?t.close():t.enqueue(o)}catch(e){t.error(e)}}})}else n.body=D.toWeb(i);return new u6(t,n)})(this.method,this[u7],this.headers,this[u8],this[mt])}};["body","bodyUsed","cache","credentials","destination","integrity","mode","redirect","referrer","referrerPolicy","signal","keepalive"].forEach(e=>{Object.defineProperty(mi,e,{get(){return this[u9]()[e]}})}),["arrayBuffer","blob","clone","formData","json","text"].forEach(e=>{Object.defineProperty(mi,e,{value:function(){return this[u9]()[e]()}})}),Object.defineProperty(mi,Symbol.for("nodejs.util.inspect.custom"),{value:function(e,t,r){let i={method:this.method,url:this.url,headers:this.headers,nativeRequest:this[u5]};return`Request (lightweight) ${r(i,{...t,depth:null==e?null:e-1})}`}}),Object.setPrototypeOf(mi,u6.prototype);var mo=Symbol("responseCache"),mn=Symbol("getResponseCache"),ma=Symbol("cache"),ms=global.Response,md=class e{#e;#t;[mn](){return delete this[ma],this[mo]||=new ms(this.#e,this.#t)}constructor(t,r){let i;if(this.#e=t,r instanceof e){let e=r[mo];if(e){this.#t=e,this[mn]();return}this.#t=r.#t,i=new Headers(r.#t.headers)}else this.#t=r;("string"==typeof t||void 0!==t?.getReader||t instanceof Blob||t instanceof Uint8Array)&&(this[ma]=[r?.status||200,t,i||r?.headers])}get headers(){let e=this[ma];return e?(e[2]instanceof Headers||(e[2]=new Headers(e[2]||{"content-type":"text/plain; charset=UTF-8"})),e[2]):this[mn]().headers}get status(){return this[ma]?.[0]??this[mn]().status}get ok(){let e=this.status;return e>=200&&e<300}};function mc(e,t,r){let i=t=>{e.cancel(t).catch(()=>{})};return t.on("close",i),t.on("error",i),(r??e.read()).then(a,o),e.closed.finally(()=>{t.off("close",i),t.off("error",i)});function o(e){e&&t.destroy(e)}function n(){e.read().then(a,o)}function a({done:r,value:i}){try{if(r)t.end();else{if(t.write(i))return e.read().then(a,o);t.once("drain",n)}}catch(e){o(e)}}}["body","bodyUsed","redirected","statusText","trailers","type","url"].forEach(e=>{Object.defineProperty(md.prototype,e,{get(){return this[mn]()[e]}})}),["arrayBuffer","blob","clone","formData","json","text"].forEach(e=>{Object.defineProperty(md.prototype,e,{value:function(){return this[mn]()[e]()}})}),Object.defineProperty(md.prototype,Symbol.for("nodejs.util.inspect.custom"),{value:function(e,t,r){let i={status:this.status,headers:this.headers,ok:this.ok,nativeResponse:this[mo]};return`Response (lightweight) ${r(i,{...t,depth:null==e?null:e-1})}`}}),Object.setPrototypeOf(md,ms),Object.setPrototypeOf(md.prototype,ms.prototype);var ml=e=>{let t={};e instanceof Headers||(e=new Headers(e??void 0));let r=[];for(let[i,o]of e)"set-cookie"===i?r.push(o):t[i]=o;return r.length>0&&(t["set-cookie"]=r),t["content-type"]??="text/plain; charset=UTF-8",t};void 0===global.crypto&&(global.crypto=F);var mp=Symbol("outgoingEnded"),mu=Symbol("incomingDraining"),mm=e=>{if(e.destroyed||e[mu])return;if(e[mu]=!0,e instanceof N){try{e.stream?.close?.(z.NGHTTP2_NO_ERROR)}catch{}return}let t=0,r=()=>{clearTimeout(o),e.off("data",n),e.off("end",r),e.off("error",r)},i=()=>{r();let t=e.socket;t&&!t.destroyed&&t.destroySoon()},o=setTimeout(i,500);o.unref?.();let n=e=>{(t+=e.length)>0x4000000&&i()};e.on("data",n),e.on("end",r),e.on("error",r),e.resume()},mf=e=>new Response(null,{status:e instanceof Error&&("TimeoutError"===e.name||"TimeoutError"===e.constructor.name)?504:500}),mh=(e,t)=>{let r=e instanceof Error?e:Error("unknown error",{cause:e});"ERR_STREAM_PREMATURE_CLOSE"===r.code?console.info("The user aborted a request."):(console.error(e),t.headersSent||t.writeHead(500,{"Content-Type":"text/plain"}),t.end(`Error: ${r.message}`),t.destroy(r))},my=e=>{"flushHeaders"in e&&e.writable&&e.flushHeaders()},mg=async(e,t)=>{let[r,i,o]=e[ma],n=!1;if(o){if(o instanceof Headers)n=o.has("content-length"),o=ml(o);else if(Array.isArray(o)){let e=new Headers(o);n=e.has("content-length"),o=ml(e)}else for(let e in o)if(14===e.length&&"content-length"===e.toLowerCase()){n=!0;break}}else o={"content-type":"text/plain; charset=UTF-8"};!n&&("string"==typeof i?o["Content-Length"]=Buffer.byteLength(i):i instanceof Uint8Array?o["Content-Length"]=i.byteLength:i instanceof Blob&&(o["Content-Length"]=i.size)),t.writeHead(r,o),"string"==typeof i||i instanceof Uint8Array?t.end(i):i instanceof Blob?t.end(new Uint8Array(await i.arrayBuffer())):(my(t),await (function(e,t){if(e.locked)throw TypeError("ReadableStream is locked.");if(!t.destroyed)return mc(e.getReader(),t)})(i,t)?.catch(e=>mh(e,t))),t[mp]?.()},m_=(e,t={})=>{let r=t.autoCleanupIncoming??!0;return!1!==t.overrideGlobalObjects&&global.Request!==u6&&(Object.defineProperty(global,"Request",{value:u6}),Object.defineProperty(global,"Response",{value:md})),async(i,o)=>{let n,a;try{a=((e,t)=>{let r,i=Object.create(mi);i[u8]=e;let o=e.url||"";if("/"!==o[0]&&(o.startsWith("http://")||o.startsWith("https://"))){if(e instanceof N)throw new u2("Absolute URL for :path is not allowed in HTTP/2");try{let e=new URL(o);i[u7]=e.href}catch(e){throw new u2("Invalid absolute URL",{cause:e})}return i}let n=(e instanceof N?e.authority:e.headers.host)||t;if(!n)throw new u2("Missing host header");if(e instanceof N){if("http"!==(r=e.scheme)&&"https"!==r)throw new u2("Unsupported scheme")}else r=e.socket&&e.socket.encrypted?"https":"http";let a=new URL(`${r}://${n}${o}`);if(a.hostname.length!==n.length&&a.hostname!==n.replace(/:\d+$/,""))throw new u2("Invalid host header");return i[u7]=a.href,i})(i,t.hostname);let s=!r||"GET"===i.method||"HEAD"===i.method;if(s||(i[u3]=!0,i.on("end",()=>{s=!0}),i instanceof N&&(o[mp]=()=>{s||setTimeout(()=>{s||setTimeout(()=>{mm(i)})})}),o.on("finish",()=>{s||mm(i)})),o.on("close",()=>{a[mt]&&(i.errored?a[mt].abort(i.errored.toString()):o.writableFinished||a[mt].abort("Client connection prematurely closed.")),s||setTimeout(()=>{s||setTimeout(()=>{mm(i)})})}),n=e(a,{incoming:i,outgoing:o}),ma in n)return mg(n,o)}catch(e){if(n)return mh(e,o);if(t.errorHandler){if(!(n=await t.errorHandler(a||e instanceof u2?e:new u2(e.message,{cause:e}))))return}else n=a?mf(e):new Response(null,{status:400})}try{return await (async(e,t,r={})=>{if("function"==typeof e.then)if(r.errorHandler)try{e=await e}catch(i){let t=await r.errorHandler(i);if(!t)return;e=t}else e=await e.catch(mf);if(ma in e)return mg(e,t);let i=ml(e.headers);if(e.body){let r,o=e.body.getReader(),n=[],a=!1;if("chunked"!==i["transfer-encoding"]){let e=2;for(let t=0;tPromise.resolve(void 0))])})(r).catch(e=>{console.error(e),a=!0});if(!i){if(1===t){await new Promise(e=>setTimeout(e)),e=3;continue}break}if(r=void 0,i.value&&n.push(i.value),i.done){a=!0;break}}!a||"content-length"in i||(i["content-length"]=n.reduce((e,t)=>e+t.length,0))}t.writeHead(e.status,i),n.forEach(e=>{t.write(e)}),a?t.end():(0===n.length&&my(t),await mc(o,t,r))}else i["x-hono-already-sent"]||(t.writeHead(e.status,i),t.end());t[mp]?.()})(n,o,t)}catch(e){return mh(e,o)}}},mv=class{_webStandardTransport;_requestListener;_requestContext=new WeakMap;constructor(e={}){this._webStandardTransport=new uY(e),this._requestListener=m_(async e=>{let t=this._requestContext.get(e);return this._webStandardTransport.handleRequest(e,{authInfo:t?.authInfo,parsedBody:t?.parsedBody})},{overrideGlobalObjects:!1})}get sessionId(){return this._webStandardTransport.sessionId}set onclose(e){this._webStandardTransport.onclose=e}get onclose(){return this._webStandardTransport.onclose}set onerror(e){this._webStandardTransport.onerror=e}get onerror(){return this._webStandardTransport.onerror}set onmessage(e){this._webStandardTransport.onmessage=e}get onmessage(){return this._webStandardTransport.onmessage}async start(){return this._webStandardTransport.start()}async close(){return this._webStandardTransport.close()}async send(e,t){return this._webStandardTransport.send(e,t)}setSupportedProtocolVersions(e){this._webStandardTransport.setSupportedProtocolVersions(e)}setScopeChallengeResolver(e){this._webStandardTransport.setScopeChallengeResolver(e)}async handleRequest(e,t,r){let i=e.auth;await m_(async e=>this._webStandardTransport.handleRequest(e,{authInfo:i,parsedBody:r}),{overrideGlobalObjects:!1})(e,t)}closeSSEStream(e){this._webStandardTransport.closeSSEStream(e)}closeStandaloneSSEStream(){this._webStandardTransport.closeStandaloneSSEStream()}};function mb(e=process.env){let t=e.TRACEDECAY_DATA_DIR;if(void 0!==t&&t.length>0)return O.resolve(t);let r="win32"===process.platform?e.USERPROFILE:e.HOME,i=void 0!==r&&r.length>0?r:L.homedir();return O.join(i,".tracedecay")}let m$=o7().min(1),mS=nz({pid:nV().int().nonnegative(),process_run_id:o7(),started_at_unix_secs:nV().int(),epoch:nV().int().nonnegative(),version:o7(),endpoint:nE(),http_application_endpoint:m$.nullable().optional(),auth_token:o7().min(1),profile_root:o7().min(1)});function mk(e){let t=e.http_application_endpoint;return null==t?null:`http://${t}`}function mw(e){let t=JSON.stringify(function e(t){return Array.isArray(t)?t.map(e):"object"==typeof t&&null!==t?Object.fromEntries(Object.entries(t).sort(([e],[t])=>et)).map(([t,r])=>[t,e(r)])):t}(e));if(void 0===t)throw TypeError("value is not canonical JSON");return t}function mV(e,t){if("object"!=typeof e||null===e||Array.isArray(e))throw TypeError(`malformed canonical schema: ${t} must be an object`);return e}function mP(e,t){switch(t){case"null":return null===e;case"boolean":return"boolean"==typeof e;case"integer":return"number"==typeof e&&Number.isSafeInteger(e);case"number":return"number"==typeof e&&Number.isFinite(e);case"string":return"string"==typeof e;case"array":return Array.isArray(e);case"object":return"object"==typeof e&&null!==e&&!Array.isArray(e);default:throw TypeError(`unsupported canonical schema type: ${t}`)}}function mR(e,t){if("object"!=typeof e||null===e||Array.isArray(e))throw TypeError(`malformed canonical envelope: ${t} must be an object`);return e}function mq(e,t){if("string"!=typeof e)throw TypeError(`malformed canonical envelope: ${t} must be a string`);return e}function mI(e,t){if("number"!=typeof e||!Number.isFinite(e))throw TypeError(`malformed canonical envelope: ${t} must be a finite number`);return e}function mx(e,t){if(!Array.isArray(e))throw TypeError(`malformed canonical envelope: ${t} must be an array`);return e}function mj(e,t){let r=mI(e,t);if(!Number.isSafeInteger(r))throw TypeError(`malformed canonical envelope: ${t} must be a safe integer`);return r}function mC(e,t){let r=mj(e,t);if(r<0)throw TypeError(`malformed canonical envelope: ${t} must be non-negative`);return r}let mT=new TextEncoder;function mO(e,t,r){let i=mq(e,t);if(0===i.length||i.trim()!==i||mT.encode(i).byteLength>r||/\p{Cc}/u.test(i))throw TypeError(`malformed canonical envelope: ${t} is not a bounded identifier`);return i}function mE(e,t,r,i,o,n,a,s,d){let c=mR(e,"success envelope");if(mq(c.binding_id,"binding_id")!==t)throw TypeError("malformed canonical envelope: binding mismatch");let l=mR(c.contract,"contract");if(mq(l.schema_id,"contract.schema_id")!==r||mI(l.schema_revision,"contract.schema_revision")!==i)throw TypeError("malformed canonical envelope: result contract mismatch");mq(c.request_id,"request_id"),mR(c.scope,"scope");let p=mR(c.outcome,"outcome"),u=mq(p.outcome,"outcome.outcome");return{...c,outcome:{...p,outcome:u,value:function(e,t,r,i,o,n,a){let s=mR(t,"outcome.value");if(!("payload"in s))throw TypeError("malformed canonical envelope: outcome.value.payload is required");if(("durable_effect"!==o||"required"!==n||"effect"!==e)&&("operation"!==o||"not_required"!==n||"evidence"!==e&&"preview"!==e))throw TypeError(`malformed canonical envelope: outcome ${e} is outside the operation receipt contract`);if(!function(e,t,r){let i=mR(e,"outcome.value.execution");if(mI(i.started_at,"execution.started_at"),mI(i.ended_at,"execution.ended_at"),!("effective_deadline"in i)||!("cancellation"in i))throw TypeError("malformed canonical envelope: receipt fields are required");let o=mR(i.budget,"execution.budget");mI(o.units_consumed,"budget.units_consumed"),mI(o.bytes_consumed,"budget.bytes_consumed"),mI(o.elapsed_micros,"budget.elapsed_micros");let n=mq(i.termination,"execution.termination");if(!t.includes(n))throw TypeError(`malformed canonical envelope: termination ${n} is not legal for this operation`);if(("cancelled"===n||"timed_out"===n)&&null===i.cancellation)throw TypeError("malformed canonical envelope: terminal cancellation observation is required");if(null!==i.cancellation){let e=mR(r,"operation.cancellation"),t=mq(e.mode,"operation.cancellation.mode"),o=mR(i.cancellation,"execution.cancellation"),a=mq(o.stage,"execution.cancellation.stage");if(mj(o.observed_at,"execution.cancellation.observed_at"),!["before_admission","before_read","during_read","before_effect","effect_in_flight","reconciling","after_commit"].includes(a))throw TypeError(`malformed canonical envelope: unknown cancellation stage ${a}`);if("not_cancellable"===t){if("timed_out"!==n)throw TypeError("malformed canonical envelope: non-cancellable operation returned cancellation evidence")}else if(!mx(e.points,"operation.cancellation.points").includes(a))throw TypeError(`malformed canonical envelope: cancellation stage ${a} is not legal for this operation`)}}(s.execution,r,i),"evidence"===e)mR(s.temporal,"temporal"),mR(s.authority,"authority"),mx(s.evidence_authorities,"evidence_authorities"),mR(s.coverage,"coverage"),mx(s.omissions,"omissions"),mx(s.scores,"scores"),mx(s.contributions,"contributions"),function(e){let t=mR(e,"outcome.value.page");if(mO(t.sort_contract_id,"page.sort_contract_id",192),1>mC(t.sort_revision,"page.sort_revision"))throw TypeError("malformed canonical envelope: page sort_revision must be positive");let r=null===t.total?null:mC(t.total,"page.total"),i=mC(t.returned,"page.returned");if(null!==r&&i>r)throw TypeError("malformed canonical envelope: page returned exceeds total");null!==t.cursor&&function(e){let t=mR(e,"page.cursor"),r=mq(t.kind,"page.cursor.kind");if("opaque"===r)mO(t.cursor,"page.cursor.cursor",4096);else throw TypeError(`malformed canonical envelope: unsupported page cursor kind ${r}`)}(t.cursor),null!==t.expires_at&&mj(t.expires_at,"page.expires_at")}(s.page);else if("preview"===e)mq(s.preview_id,"preview_id"),mq(s.preview_digest,"preview_digest"),mq(s.effect_class,"effect_class"),mR(s.authority,"authority"),mq(s.expected_state,"expected_state");else if("effect"===e)mq(s.effect_id,"effect_id"),mq(s.effect_class,"effect_class"),mq(s.idempotency_key,"idempotency_key"),mR(s.authority,"authority"),mq(s.expected_state,"expected_state"),mq(s.reconciliation,"reconciliation"),mR(s.receipt,"receipt");else throw TypeError(`malformed canonical envelope: unsupported outcome ${e}`);return{...s,payload:null===s.payload?null:a(s.payload)}}(u,p.value,o,n,a,s,d)}}}function mA(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}function mW(e){return"number"==typeof e&&Number.isSafeInteger(e)&&e>=0}function mM(e){return"number"==typeof e&&Number.isSafeInteger(e)}function mN(e,t){return"string"==typeof e&&e.length>0&&e.trim()===e&&mT.encode(e).byteLength<=t&&!/\p{Cc}/u.test(e)}async function mz(e){let t=await crypto.subtle.digest("SHA-256",mT.encode(mw(e)));return`sha256:${Array.from(new Uint8Array(t),e=>e.toString(16).padStart(2,"0")).join("")}`}function mD(e){return mA(e)&&"string"==typeof e.code&&"string"==typeof e.message}let mF={description:"Strongly typed algorithm-tagged integrity digest: `AccessPolicyDigest`.",type:"string"},mL={description:"Strongly typed canonical identity: `AccessRuleId`.",type:"string"},mU={description:"Strongly typed canonical identity: `ActorId`.",type:"string"},mH={description:"Strongly typed canonical identity: `AgentInstanceId`.",type:"string"},mG={enum:["memory_curator","session_reflector","skill_writer","combined_review","user_job"],type:"string"},mB={properties:{coverage:{$ref:"#/$defs/MetricCoverageV1"},current:{anyOf:[{$ref:"#/$defs/AnalyticsModeV1"},{type:"null"}]},transition_watermark:{type:["string","null"]},unavailable_reason:{type:["string","null"]}},required:["coverage"],type:"object"},mK={enum:["off","local_only","aggregate_share"],type:"string"},mJ={oneOf:[{const:"project",description:"Analytics events of the resolved project.",type:"string"},{const:"all",description:"Analytics events of every registered project.",type:"string"}]},mZ={description:"Strongly typed canonical identity: `AnalyzerEnvironmentVariable`.",type:"string"},mQ={description:"Strongly typed canonical identity: `AnalyzerExecutableId`.",type:"string"},mX={oneOf:[{properties:{executable_id:{$ref:"#/$defs/AnalyzerExecutableId"},kind:{const:"built_in",type:"string"}},required:["kind","executable_id"],type:"object"},{properties:{executable_digest:{$ref:"#/$defs/ManifestDigest"},kind:{const:"approved_external",type:"string"}},required:["kind","executable_digest"],type:"object"}]},mY={description:"Strongly typed canonical identity: `AnalyzerLanguageId`.",type:"string"},m1={additionalProperties:!1,description:"One language's analyzer selection. Host registration may project only the\nnon-sensitive `language_id`/`enabled` pair; all other fields remain in the\nconfiguration authority.",properties:{arguments:{items:{type:"string"},type:"array"},enabled:{type:"boolean"},environment_allowlist:{items:{$ref:"#/$defs/AnalyzerEnvironmentVariable"},type:"array",uniqueItems:!0},executable:{$ref:"#/$defs/AnalyzerExecutableReferenceV1"},initialization_options:{additionalProperties:{$ref:"#/$defs/AnalyzerStructuredValueV1"},type:"object"},language_id:{$ref:"#/$defs/AnalyzerLanguageId"},privacy_class:{$ref:"#/$defs/AnalyzerPrivacyClassV1"},resource_limits:{$ref:"#/$defs/AnalyzerResourceLimitsV1"},restart_policy:{$ref:"#/$defs/AnalyzerRestartPolicyV1"},settings:{additionalProperties:{$ref:"#/$defs/AnalyzerStructuredValueV1"},type:"object"}},required:["language_id","enabled","executable","arguments","initialization_options","settings","environment_allowlist","privacy_class","resource_limits","restart_policy"],type:"object"},m0={enum:["non_sensitive","sensitive","restricted"],type:"string"},m2={additionalProperties:!1,properties:{maximum_memory_mib:{format:"uint32",minimum:0,type:"integer"},request_timeout_millis:{format:"uint64",minimum:0,type:"integer"},startup_timeout_millis:{format:"uint64",minimum:0,type:"integer"}},required:["maximum_memory_mib","startup_timeout_millis","request_timeout_millis"],type:"object"},m4={enum:["restart_on_configuration_change","manual_restart_only"],type:"string"},m6={additionalProperties:!1,description:"Canonical analyzer settings. A changed selection produces a new\nconfiguration revision/digest; cache invalidation remains owned elsewhere.",properties:{schema_version:{format:"uint16",maximum:65535,minimum:0,type:"integer"},selections:{items:{$ref:"#/$defs/AnalyzerLanguageSelectionV1"},type:"array"}},required:["schema_version","selections"],type:"object"},m3={description:"A structured analyzer option value. This deliberately excludes raw\nenvironment values, commands, credential material, and transport blobs.",oneOf:[{properties:{kind:{const:"boolean",type:"string"},value:{type:"boolean"}},required:["kind","value"],type:"object"},{properties:{kind:{const:"integer",type:"string"},value:{format:"int64",type:"integer"}},required:["kind","value"],type:"object"},{properties:{kind:{const:"text",type:"string"},value:{type:"string"}},required:["kind","value"],type:"object"},{properties:{kind:{const:"text_list",type:"string"},value:{items:{type:"string"},type:"array"}},required:["kind","value"],type:"object"},{properties:{kind:{const:"object",type:"string"},value:{additionalProperties:{$ref:"#/$defs/AnalyzerStructuredValueV1"},type:"object"}},required:["kind","value"],type:"object"}]},m9={description:"The structured facts behind a problem. Adapters read these fields; the\nproblem's `message` is only their one human rendering.",oneOf:[{additionalProperties:!1,description:"The worktree's code index is parked until the operator applies\n`remedy`; repeating the request cannot change the answer.",properties:{cause:{type:"string"},kind:{const:"parked",type:"string"},remedy:{type:"string"},retries_on_wake:{type:"boolean"}},required:["kind","cause","remedy","retries_on_wake"],type:"object"},{additionalProperties:!1,description:"A session refresh asked to begin from a source frontier the\ncommitted projection has already passed.",properties:{active:{format:"uint64",minimum:0,type:"integer"},committed:{format:"uint64",minimum:0,type:"integer"},kind:{const:"stale_refresh_frontier",type:"string"},requested:{format:"uint64",minimum:0,type:"integer"}},required:["kind","requested","committed","active"],type:"object"},{additionalProperties:!1,description:"A compare-and-swap request named `requested` in `field`, but the\nauthority holds `current`. Resending with `current` is a new request.",properties:{current:{format:"uint64",minimum:0,type:"integer"},field:{type:"string"},kind:{const:"stale_precondition",type:"string"},requested:{format:"uint64",minimum:0,type:"integer"}},required:["kind","field","requested","current"],type:"object"},{additionalProperties:!1,description:"A workflow step effect named placement digest `found`, but the step's\ncurrent placement is `expected`: the effect was settled against a\nplacement the run has since replaced.",properties:{expected:{type:"string"},found:{type:"string"},kind:{const:"workflow_placement_digest_stale",type:"string"}},required:["kind","expected","found"],type:"object"},{additionalProperties:!1,description:"A writer lock stayed held by other writers past its admission\ndeadline.",properties:{deadline_ms:{format:"uint64",minimum:0,type:"integer"},kind:{const:"lock_deadline",type:"string"},resource:{type:"string"}},required:["kind","resource","deadline_ms"],type:"object"},{additionalProperties:!1,description:"A persisted store whose shape this binary does not open. It is served\nin this typed state until the operator runs `remedy`, which deletes\nthe old data; nothing is migrated or backed up.",properties:{authority:{type:"string"},found_version:{format:"int64",type:["integer","null"]},kind:{const:"reset_required",type:"string"},reason:{type:"string"},remedy:{type:"string"},required_version:{format:"int64",type:["integer","null"]}},required:["kind","authority","reason","remedy"],type:"object"},{additionalProperties:!1,description:"No compiler runs automatically for the diagnostics scope: no tsconfig\nowns `file`, or, for a workspace read (`file` null), none exists under\nthe project root. `searched` lists the owner search's candidates,\nnearest first; it is empty for a workspace read or a file outside the\nproject root.",properties:{file:{type:["string","null"]},kind:{const:"diagnostics_unsupported",type:"string"},searched:{items:{$ref:"#/$defs/DiagnosticsSearchedTsconfigV1"},type:"array"}},required:["kind","searched"],type:"object"},{additionalProperties:!1,description:"The TypeScript `producer` has not published diagnostics for the\ncurrent code generation yet. `generation` is the last generation it\npublished, null when it has published none.",properties:{generation:{type:["string","null"]},kind:{const:"diagnostics_pending",type:"string"},producer:{type:"string"}},required:["kind","producer"],type:"object"},{additionalProperties:!1,description:"The code graph's engine or catalog was released for memory and was\nstill warming again when the read's budget ran out;\n`retry_after_millis` is the measured warm-up it still needs.",properties:{kind:{const:"code_graph_rewarming",type:"string"},retry_after_millis:{format:"uint64",minimum:0,type:"integer"}},required:["kind","retry_after_millis"],type:"object"},{additionalProperties:!1,description:"No TraceDecay daemon accepts connections on `socket`. `named_by` is\nthe environment variable that chose the socket, when one did;\n`service_unit` is what this client observed of the managed service.",properties:{kind:{const:"daemon_unreachable",type:"string"},named_by:{type:["string","null"]},service_unit:{$ref:"#/$defs/DaemonServiceUnitObservationV1"},socket:{type:"string"}},required:["kind","socket","service_unit"],type:"object"}]},m5={description:"Strongly typed canonical identity: `AttemptId`.",type:"string"},m8={description:"Authoritative scope of a source binding. A mutable path, label, or host\nprofile cannot be represented as authority.",oneOf:[{properties:{id:{$ref:"#/$defs/ProjectId"},kind:{const:"project",type:"string"}},required:["kind","id"],type:"object"},{properties:{id:{$ref:"#/$defs/UserProfileId"},kind:{const:"projectless_hermes",type:"string"}},required:["kind","id"],type:"object"}]},m7={additionalProperties:!1,description:"One exact application scope paired with its registered physical locator.\n\nThe scope remains the identity authority. The locator is retained only so\na later read or restart can reopen the exact registered root without an\nactive-graph or CWD fallback.",properties:{locator:{anyOf:[{$ref:"#/$defs/RegisteredRootLocatorV1"},{type:"null"}]},scope:{$ref:"#/$defs/ResolvedScope"}},required:["scope"],type:"object"},fe={additionalProperties:!1,description:"Immutable canonical set of exact roots admitted by their existing request\ncontexts. A registered locator participates only as frozen reopening\nevidence; its paired [`ResolvedScope`](crate::context::ResolvedScope) remains\nthe root identity authority.",properties:{actor_id:{$ref:"#/$defs/ActorId"},digest:{$ref:"#/$defs/ManifestDigest"},revision:{$ref:"#/$defs/ScopeSetRevision"},roots:{items:{$ref:"#/$defs/AuthorizedRoot"},type:"array"},scope_set_id:{$ref:"#/$defs/ScopeSetId"}},required:["scope_set_id","revision","actor_id","roots","digest"],type:"object"},ft={description:"A terminal automatic-fact receipt state.",enum:["applied","quarantined"],type:"string"},fr={oneOf:[{properties:{kind:{const:"disabled",type:"string"}},required:["kind"],type:"object"},{properties:{kind:{const:"eligible_only",type:"string"},maximum_per_run:{format:"uint16",maximum:65535,minimum:1,type:"integer"},minimum_idle_seconds:{format:"uint64",minimum:1,type:"integer"}},required:["kind","minimum_idle_seconds","maximum_per_run"],type:"object"}]},fi={enum:["disabled","codex_app_server"],type:"string"},fo={enum:["standalone","delegated_host"],type:"string"},fn={description:"The settled status every successful read in this family reports.",enum:["ok"],type:"string"},fa={description:"Which owner's automation schedulers a reconcile covers.",oneOf:[{const:"project",description:"The served project's scheduler, answered by the project's owner.",type:"string"},{const:"profile",description:"Every cached project scheduler of the profile, answered by the\ndaemon's profile owner.",type:"string"}]},fs={properties:{created_at:{type:"string"},kind:{type:"string"},path:{type:"string"},schema_version:{format:"uint32",minimum:0,type:"integer"},sha256:{type:"string"},summary:{type:["string","null"]}},required:["schema_version","kind","path","sha256","created_at"],type:"object"},fd={description:"Automation run reads answer from the active project's ledger only.",enum:["active_project"],type:"string"},fc={enum:["queued","running","succeeded","failed","skipped"],type:"string"},fl={additionalProperties:!1,properties:{allow_job_commands:{type:"boolean"},backend:{$ref:"#/$defs/AutomationBackendV1"},combine_due_tasks:{type:"boolean"},enabled:{type:"boolean"},host_mode:{$ref:"#/$defs/AutomationHostModeV1"},model_id:{type:["string","null"]},scheduler_tick_secs:{format:"uint64",minimum:0,type:"integer"},schema_version:{format:"uint16",maximum:65535,minimum:0,type:"integer"},tasks:{$ref:"#/$defs/AutomationTaskSetV1"},timeout_secs:{format:"uint64",minimum:0,type:"integer"}},required:["schema_version","enabled","backend","host_mode","timeout_secs","scheduler_tick_secs","combine_due_tasks","allow_job_commands","tasks"],type:"object"},fp={additionalProperties:!1,properties:{memory_curator:{$ref:"#/$defs/AutomationTaskSettingsV1"},session_reflector:{$ref:"#/$defs/AutomationTaskSettingsV1"},skill_writer:{$ref:"#/$defs/AutomationTaskSettingsV1"}},required:["memory_curator","session_reflector","skill_writer"],type:"object"},fu={additionalProperties:!1,properties:{cooldown_secs:{format:"uint64",minimum:0,type:["integer","null"]},enabled:{type:"boolean"},interval_secs:{format:"uint64",minimum:0,type:["integer","null"]},min_idle_secs:{format:"uint64",minimum:0,type:["integer","null"]},schedule:{type:["string","null"]},session_evidence_budget_backoff_secs:{description:"Suppression window between session-evidence retrieval attempts while\nthe evidence budget stays exhausted. Unset uses the automation crate's\none-hour default. Distinct from `cooldown_secs`, which paces retries\nafter failed runs; budget exhaustion is a skip, not a failure.",format:"uint64",minimum:0,type:["integer","null"]},stale_lock_secs:{format:"uint64",minimum:0,type:["integer","null"]}},required:["enabled"],type:"object"},fm={enum:["manual_cli","manual_mcp","dashboard","application","scheduler","host_receipt"],type:"string"},ff={description:"Strongly typed canonical identity: `BrainId`.",type:"string"},fh={oneOf:[{properties:{kind:{const:"reject",type:"string"}},required:["kind"],type:"object"},{properties:{kind:{const:"append_monotonic_ordinal",type:"string"},maximum_attempts:{format:"uint16",maximum:65535,minimum:1,type:"integer"}},required:["kind","maximum_attempts"],type:"object"}]},fy={oneOf:[{properties:{bytes:{format:"uint8",maximum:255,minimum:1,type:"integer"},kind:{const:"task_id_digest_prefix",type:"string"}},required:["kind","bytes"],type:"object"},{properties:{kind:{const:"repository_slug",type:"string"}},required:["kind"],type:"object"},{properties:{kind:{const:"work_class",type:"string"}},required:["kind"],type:"object"},{properties:{kind:{const:"monotonic_collision_ordinal",type:"string"}},required:["kind"],type:"object"}]},fg={enum:["hyphen","underscore","slash"],type:"string"},f_={additionalProperties:!1,properties:{collision:{$ref:"#/$defs/BranchCollisionPolicyV1"},components:{items:{$ref:"#/$defs/BranchNameComponentV1"},type:"array"},maximum_bytes:{format:"uint16",maximum:65535,minimum:1,type:"integer"},prefix:{$ref:"#/$defs/CanonicalGitRefPrefix"},separator:{$ref:"#/$defs/BranchNameSeparatorV1"}},required:["prefix","components","separator","maximum_bytes","collision"],type:"object"},fv={additionalProperties:!1,description:"A declared dependency edge; propagation direction remains an application\ndecision and is never inferred from this edge.",properties:{dependency:{$ref:"#/$defs/StackNodeId"},dependent:{$ref:"#/$defs/StackNodeId"}},required:["dependency","dependent"],type:"object"},fb={description:"Strongly typed canonical identity: `BranchStackId`.",type:"string"},f$={additionalProperties:!1,description:"One visible branch/ref at one immutable tip.",properties:{node_id:{$ref:"#/$defs/StackNodeId"},project_id:{$ref:"#/$defs/ProjectId"},reference:{$ref:"#/$defs/RefId"},repository_id:{$ref:"#/$defs/RepositoryId"},tip:{$ref:"#/$defs/CommitId"},worktree_id:{anyOf:[{$ref:"#/$defs/WorktreeId"},{type:"null"}]}},required:["node_id","project_id","repository_id","reference","tip"],type:"object"},fS={description:"Strongly typed canonical identity: `BranchStackRevisionId`.",type:"string"},fk={additionalProperties:!1,description:"Immutable branch-stack projection at one exact inventory revision.",properties:{canonical_order:{items:{$ref:"#/$defs/StackNodeId"},type:"array"},digest:{$ref:"#/$defs/ManifestDigest"},edges:{items:{$ref:"#/$defs/BranchStackEdgeV1"},type:"array"},inventory_epoch:{$ref:"#/$defs/WorktreeInventoryEpoch"},inventory_snapshot_id:{$ref:"#/$defs/WorktreeInventorySnapshotId"},nodes:{items:{$ref:"#/$defs/BranchStackNodeV1"},type:"array"},revision_id:{$ref:"#/$defs/BranchStackRevisionId"},source:{$ref:"#/$defs/BranchStackSourceV1"},stack_id:{$ref:"#/$defs/BranchStackId"}},required:["stack_id","revision_id","inventory_snapshot_id","inventory_epoch","source","nodes","edges","canonical_order","digest"],type:"object"},fw={description:"Authoritative source that declared the exact stack topology.",enum:["explicit_declaration","accepted_task_branch_topology"],type:"string"},fV={enum:["no_branches","unbranched","independent_branches","local_stack"],type:"string"},fP={additionalProperties:!1,properties:{allowed:{items:{$ref:"#/$defs/BranchTopologyKindV1"},type:"array",uniqueItems:!0}},required:["allowed"],type:"object"},fR={description:"Strongly typed canonical identity: `CalibrationProfileId`.",type:"string"},fq={additionalProperties:!1,description:"Surface-owned query semantics. Page size remains an invocation control, but\ncontinuation is a request field so CLI, MCP, and HTTP callers all have the\nsame channel for spending a `next_cursor`.",properties:{cursor:{default:null,type:["string","null"]},order:{$ref:"#/$defs/RetrievalOrder"},projection:{$ref:"#/$defs/ResultProjection"}},required:["projection","order"],type:"object"},fI={additionalProperties:!1,properties:{observed_at:{$ref:"#/$defs/UtcMicros"},stage:{$ref:"#/$defs/CancellationStage"}},required:["stage","observed_at"],type:"object"},fx={description:"Exact stage at which cancellation or deadline state was observed.",enum:["before_admission","before_read","during_read","before_effect","effect_in_flight","reconciling","after_commit"],type:"string"},fj={additionalProperties:!1,description:"One retriever's scored contribution to a fused candidate. Every ranked\ncandidate retains every retriever's raw score domain, ordinal rank,\ncalibrated feature, weight, and weighted contribution.",properties:{calibrated_feature_micros:{format:"uint32",minimum:0,type:"integer"},calibration_profile_id:{$ref:"#/$defs/CalibrationProfileId"},ordinal_rank:{format:"uint32",minimum:0,type:"integer"},raw_score:{$ref:"#/$defs/FixedPointScore"},retriever:{$ref:"#/$defs/RetrieverKind"},retriever_revision:{$ref:"#/$defs/ComponentRevision"},score_domain:{$ref:"#/$defs/ScoreDomainId"},source_occurrence_id:{$ref:"#/$defs/SourceOccurrenceId"},weight_micros:{format:"uint32",minimum:0,type:"integer"},weighted_contribution_micros:{format:"uint64",minimum:0,type:"integer"}},required:["retriever","retriever_revision","source_occurrence_id","ordinal_rank","raw_score","score_domain","calibration_profile_id","calibrated_feature_micros","weight_micros","weighted_contribution_micros"],type:"object"},fC={description:"A validated full native Git ref name, such as `refs/heads/main`.",type:"string"},fT={description:"A validated ref/branch prefix. Branch naming accepts a short branch prefix\n(for example `tracedecay/`) while protected-ref selectors use full\n`refs/.../` prefixes.",type:"string"},fO={description:"Strongly typed canonical identity: `CapabilityId`.",type:"string"},fE={description:"Strongly typed canonical identity: `CatalogGenerationId`.",type:"string"},fA={description:"Strongly typed canonical identity: `ChangePlanId`.",type:"string"},fW={additionalProperties:!1,properties:{from_inclusive:{format:"int64",type:["integer","null"]},through_inclusive:{format:"int64",type:["integer","null"]}},type:"object"},fM={additionalProperties:!1,description:'Why co-change mining produced no answer, so an empty\n`missing_co_change_partners` does not read as "no partner is missing".',properties:{reason:{type:"string"},retryable:{type:"boolean"}},required:["reason","retryable"],type:"object"},fN={enum:["kind","language","path"],type:"string"},fz={description:"Strongly typed canonical identity: `CodeGenerationId`.",type:"string"},fD={description:"Freshness of the generation a verified graph read serves.",oneOf:[{properties:{state:{const:"current",type:"string"}},required:["state"],type:"object"},{properties:{rebuild_in_flight:{type:"boolean"},sealed_at:{$ref:"#/$defs/UtcMicros"},state:{const:"last_complete_stale",type:"string"}},required:["state","sealed_at","rebuild_in_flight"],type:"object"}]},fF={description:"A typed reason an otherwise active generation cannot make durable progress.",enum:["resident_memory","source_unavailable","artifact_store_unavailable","retry_backoff","publication_authority_corrupt"],type:"string"},fL={description:'A deterministic contract violation that parked background convergence.\n\nParked is not dead: the worker keeps re-observing the violation on its\nordinary wake cadence, so an operator fix (for example restoring an\nowner-private mode) is picked up on the next wake without a restart. The\nstate exists so `status`, doctor, and the dashboard report the violation\ntyped instead of an indefinite "warming".',properties:{blocked_reason:{anyOf:[{$ref:"#/$defs/CodeIndexBuildBlockedReasonV1"},{type:"null"}],description:"Stable class for callers that must decide whether new work is admissible."},observed_passes:{description:"Background passes that re-observed the violation since parking.",format:"uint64",minimum:0,type:"integer"},parked_at_micros:{description:"When the violation was first observed (microseconds since the Unix epoch).",format:"int64",type:"integer"},reason:{description:"Exact typed failure that parked convergence.",type:"string"},remediation:{description:"Operator action that clears the violation.",type:"string"},retries_on_wake:{description:"Whether the worker re-checks this violation on every ordinary wake.\nTrue for filesystem/contract violations an operator fix clears in\nplace; false for an abnormal task failure that only changed input (a\nnew sealed generation) retries.",type:"boolean"}},required:["reason","remediation","parked_at_micros","observed_passes","retries_on_wake"],type:"object"},fU={properties:{display_path:{description:"`git_path_bytes` decoded for display, invalid UTF-8 replaced.",type:"string"},git_path_bytes:{description:"The exact Git path bytes, which need not be UTF-8.",items:{format:"uint8",maximum:255,minimum:0,type:"integer"},type:"array"},reason:{$ref:"#/$defs/CodeIndexSourceOmissionReasonV1"}},required:["git_path_bytes","display_path","reason"],type:"object"},fH={description:"Sources a sealed snapshot captured but does not index.",properties:{count:{description:"Every omitted source in the snapshot.",format:"uint64",minimum:0,type:"integer"},sources:{description:"The first omitted sources in Git path order, at most\n[`CODE_INDEX_OMITTED_SOURCE_LIST_LIMIT`].",items:{$ref:"#/$defs/CodeIndexOmittedSourceV1"},type:"array"}},required:["count","sources"],type:"object"},fG={oneOf:[{description:"No logical path can carry the Git path: not UTF-8, a backslash, a\ncontrol character, or leading or trailing whitespace.",properties:{kind:{const:"unrepresentable_path",type:"string"}},required:["kind"],type:"object"},{description:"The privacy boundary withheld the file's bytes.",properties:{detail:{type:"string"},kind:{const:"privacy_withheld",type:"string"}},required:["kind","detail"],type:"object"}]},fB={description:"Closed staleness ladder for one mounted worktree.\n\nThe scheduler publishes one of these tokens. MCP, the dashboard, and the\nCLI must match the variant, not a hand-copied string, so a new ladder\nstate cannot appear at one caller and be missed at the others.",enum:["fresh","stale","indexing","refreshing","restoring","verifying","parked"],type:"string"},fK={description:"Profile-level worker-count intent for the process-wide code-index pool.\n`Automatic` delegates the concrete count to runtime resource admission;\n`Exact` persists an operator-requested positive worker count.",oneOf:[{additionalProperties:!1,properties:{mode:{const:"automatic",type:"string"}},required:["mode"],type:"object"},{additionalProperties:!1,properties:{mode:{const:"exact",type:"string"},workers:{format:"uint16",maximum:65535,minimum:0,type:"integer"}},required:["mode","workers"],type:"object"}]},fJ={additionalProperties:!1,properties:{chunk:{anyOf:[{$ref:"#/$defs/CodeSearchChunkId"},{type:"null"}]},file:{$ref:"#/$defs/FileOccurrenceId"},path:{type:"string"},span:{$ref:"#/$defs/SourceSpan"},symbol:{anyOf:[{$ref:"#/$defs/SymbolOccurrenceId"},{type:"null"}]}},required:["file","path","span"],type:"object"},fZ={additionalProperties:!1,description:"One immutable code-index generation inside the authorized single root.\nThe path prefix narrows a query but never establishes project identity.",properties:{generation:{$ref:"#/$defs/CodeGenerationId"},path_prefix:{type:["string","null"]}},required:["generation"],type:"object"},fQ={description:"Strongly typed canonical identity: `CodeSearchChunkId`.",type:"string"},fX={description:"Strongly typed canonical identity: `CommitId`.",type:"string"},fY={enum:["promote","reject","insufficient_evidence"],type:"string"},f1={description:"Whether the bounded complexity walk over a symbol's body ran to the end.\n\nThe extractor stops walking a body once its traversal budget is spent. The\ncounters accumulated by then are lower bounds over the visited prefix, not\nfacts about the whole body, so every surface that prints, ranks, or\naggregates complexity must render this state instead of treating those\ncounters as exact.",oneOf:[{enum:["complete"],type:"string"},{const:"traversal_budget_exhausted",description:"The walk stopped when the traversal budget ran out.",type:"string"}]},f0={description:"Strongly typed canonical identity: `ComponentRevision`.",type:"string"},f2={description:"Strongly typed canonical identity: `ComponentVersion`.",type:"string"},f4={enum:["config_summary"],type:"string"},f6={additionalProperties:!1,description:"One entry per changed config file instead of one per config key.",properties:{config_keys:{format:"uint",minimum:0,type:"integer"},file:{type:"string"},kind:{$ref:"#/$defs/ConfigSummaryKindV1"}},required:["file","kind","config_keys"],type:"object"},f3={description:"Strongly typed canonical identity: `ConfigurationIdempotencyKey`.",type:"string"},f9={description:"A typed configuration layer identity. The default layer intentionally has\nno caller-controlled identifier.",oneOf:[{properties:{kind:{const:"default",type:"string"}},required:["kind"],type:"object"},{properties:{kind:{const:"user_profile",type:"string"},profile_id:{$ref:"#/$defs/UserProfileId"}},required:["kind","profile_id"],type:"object"},{properties:{kind:{const:"project",type:"string"},project_id:{$ref:"#/$defs/ProjectId"}},required:["kind","project_id"],type:"object"},{properties:{collection_id:{$ref:"#/$defs/QueryCollectionId"},kind:{const:"collection",type:"string"}},required:["kind","collection_id"],type:"object"}]},f5={description:"Strongly typed canonical identity: `ConfigurationReceiptId`.",type:"string"},f8={description:"Strongly typed canonical identity: `ConfigurationRevisionId`.",type:"string"},f7={description:"Strongly typed canonical identity: `ConfigurationSnapshotId`.",type:"string"},he={description:"Values that the typed registry can accept.",oneOf:[{properties:{kind:{const:"boolean",type:"string"},value:{type:"boolean"}},required:["kind","value"],type:"object"},{properties:{kind:{const:"unsigned",type:"string"},value:{format:"uint64",minimum:0,type:"integer"}},required:["kind","value"],type:"object"},{properties:{kind:{const:"code_index_worker_selection",type:"string"},value:{$ref:"#/$defs/CodeIndexWorkerSelectionV1"}},required:["kind","value"],type:"object"},{properties:{kind:{const:"text",type:"string"},value:{type:"string"}},required:["kind","value"],type:"object"},{properties:{kind:{const:"string_list",type:"string"},value:{items:{type:"string"},type:"array"}},required:["kind","value"],type:"object"},{properties:{kind:{const:"source_bindings",type:"string"},value:{items:{$ref:"#/$defs/ScopeSourceBinding"},type:"array"}},required:["kind","value"],type:"object"},{properties:{kind:{const:"access_rules",type:"string"},value:{items:{$ref:"#/$defs/ScopeAccessRule"},type:"array"}},required:["kind","value"],type:"object"},{properties:{kind:{const:"analyzer_settings",type:"string"},value:{$ref:"#/$defs/AnalyzerSettingsV1"}},required:["kind","value"],type:"object"},{properties:{kind:{const:"work_topology_policy",type:"string"},value:{$ref:"#/$defs/WorkTopologyPolicyV1"}},required:["kind","value"],type:"object"},{properties:{kind:{const:"work_executable_bindings",type:"string"},value:{items:{$ref:"#/$defs/WorkExecutableBindingV1"},type:"array"}},required:["kind","value"],type:"object"},{properties:{kind:{const:"work_expertise_consent",type:"string"},value:{$ref:"#/$defs/WorkExpertiseConsentV1"}},required:["kind","value"],type:"object"},{properties:{kind:{const:"context_scout_settings",type:"string"},value:{$ref:"#/$defs/ContextScoutSettingsV1"}},required:["kind","value"],type:"object"},{properties:{kind:{const:"automation_settings",type:"string"},value:{$ref:"#/$defs/AutomationSettingsV1"}},required:["kind","value"],type:"object"},{properties:{kind:{const:"lcm_summarizer_executables",type:"string"},value:{$ref:"#/$defs/LcmSummarizerExecutablesV1"}},required:["kind","value"],type:"object"}]},ht={description:"Strongly typed algorithm-tagged integrity digest: `ContentDigest`.",type:"string"},hr={description:"What one caller `lexical_anchors` entry contributed to the response, in\ncaller order.",oneOf:[{additionalProperties:!1,description:"`matched` indexed rows carried the anchor; `admitted` result sites\ncarrying it are in this response, and `dropped` counts the sites the\nlexical lane admitted that a later stage removed, by reason.",properties:{admitted:{format:"uint64",minimum:0,type:"integer"},anchor:{type:"string"},dropped:{items:{$ref:"#/$defs/LexicalAnchorDropV1"},type:"array"},matched:{format:"uint64",minimum:0,type:"integer"},outcome:{const:"matched",type:"string"}},required:["outcome","anchor","matched","admitted"],type:"object"},{additionalProperties:!1,description:"No indexed row carries the anchor.",properties:{anchor:{type:"string"},outcome:{const:"unmatched",type:"string"}},required:["outcome","anchor"],type:"object"},{additionalProperties:!1,description:"The anchor's route did not serve; `coverage` names the lane state.",properties:{anchor:{type:"string"},outcome:{const:"not_served",type:"string"}},required:["outcome","anchor"],type:"object"}]},hi={enum:["explore","plan"],type:"string"},ho={additionalProperties:!1,description:"Exact opaque destination for one public Context Scout operation.\n\nThe daemon converts this transport-neutral address into its runtime value\nonly after catalog admission. Keeping the public wire here makes CLI, MCP,\nHTTP, and both SDKs share one generated schema authority.",properties:{agent_id:{items:{format:"uint8",maximum:255,minimum:0,type:"integer"},maxItems:16,minItems:16,type:"array"},logical_message_id:{items:{format:"uint8",maximum:255,minimum:0,type:"integer"},maxItems:16,minItems:16,type:"array"},profile_id:{items:{format:"uint8",maximum:255,minimum:0,type:"integer"},maxItems:16,minItems:16,type:"array"},project_id:{items:{format:"uint8",maximum:255,minimum:0,type:"integer"},maxItems:16,minItems:16,type:"array"},protected_session_id:{items:{format:"uint8",maximum:255,minimum:0,type:"integer"},maxItems:32,minItems:32,type:"array"},provider_id:{items:{format:"uint8",maximum:255,minimum:0,type:"integer"},maxItems:16,minItems:16,type:"array"},thread_id:{items:{format:"uint8",maximum:255,minimum:0,type:"integer"},maxItems:16,minItems:16,type:"array"},turn_id:{items:{format:"uint8",maximum:255,minimum:0,type:"integer"},maxItems:16,minItems:16,type:"array"}},required:["profile_id","provider_id","protected_session_id","thread_id","turn_id","agent_id","logical_message_id","project_id"],type:"object"},hn={enum:["retrieval","diagnostic","coordination","verification"],type:"string"},ha={additionalProperties:!1,description:"Public lease proof. It carries only opaque identities; the daemon resolves\nit back to the durable queue row before recording delivery.",properties:{envelope_id:{items:{format:"uint8",maximum:255,minimum:0,type:"integer"},maxItems:16,minItems:16,type:"array"},lease_expires_at:{$ref:"#/$defs/UtcMicros"},lease_id:{items:{format:"uint8",maximum:255,minimum:0,type:"integer"},maxItems:16,minItems:16,type:"array"},work:{$ref:"#/$defs/ContextScoutWorkV1"}},required:["work","envelope_id","lease_id","lease_expires_at"],type:"object"},hs={additionalProperties:!1,properties:{max_candidates:{format:"uint32",minimum:0,type:"integer"},max_evidence:{format:"uint32",minimum:0,type:"integer"},max_model_input_tokens:{format:"uint32",minimum:0,type:"integer"},max_model_output_tokens:{format:"uint32",minimum:0,type:"integer"},max_text_bytes:{format:"uint32",minimum:0,type:"integer"}},required:["max_candidates","max_evidence","max_text_bytes","max_model_input_tokens","max_model_output_tokens"],type:"object"},hd={enum:["deterministic","configured_model"],type:"string"},hc={enum:["active","paused","disabled"],type:"string"},hl={enum:["codex_app_server"],type:"string"},hp={enum:["attempted","delayed","displayed","expanded","explicitly_accepted","explicitly_rejected","dismissed","expired_unseen","corrected","unknown"],type:"string"},hu={additionalProperties:!1,properties:{delivered_at:{$ref:"#/$defs/UtcMicros"},envelope_id:{items:{format:"uint8",maximum:255,minimum:0,type:"integer"},maxItems:16,minItems:16,type:"array"},outcome:{$ref:"#/$defs/ContextScoutDeliveryOutcomeV1"},receipt_id:{items:{format:"uint8",maximum:255,minimum:0,type:"integer"},maxItems:16,minItems:16,type:"array"}},required:["receipt_id","envelope_id","delivered_at","outcome"],type:"object"},hm={enum:["immediate","next_boundary","idle_window","on_request","suppressed"],type:"string"},hf={enum:["complete","partial","stale","cancelled","unavailable"],type:"string"},hh={additionalProperties:!1,properties:{anchor_ids:{items:{$ref:"#/$defs/RetrievalAnchorId"},type:"array"},availability:{$ref:"#/$defs/ContextScoutEvidenceAvailabilityV1"},claim_digest:{$ref:"#/$defs/ManifestDigest"},content_generation:{$ref:"#/$defs/CodeGenerationId"},session_window:{anyOf:[{$ref:"#/$defs/ContextScoutSessionWindowV1"},{type:"null"}],description:"Session turns a session-evidence suggestion was judged from. Absent for\ncode evidence."}},required:["content_generation","availability","anchor_ids","claim_digest"],type:"object"},hy={enum:["explicitly_accepted","explicitly_rejected","dismissed","corrected"],type:"string"},hg={additionalProperties:!1,properties:{kind:{$ref:"#/$defs/ContextScoutFeedbackKindV1"},receipt_id:{items:{format:"uint8",maximum:255,minimum:0,type:"integer"},maxItems:16,minItems:16,type:"array"}},required:["receipt_id","kind"],type:"object"},h_={description:"One user intent the Scout can recognize. The serialized keys are the\nhistorical hook hint category keys, so persisted hint analytics, hint\nsettlement, and evals keep one vocabulary.",enum:["search","semantic_search","file_read","tool_descriptor_read","broad_read","call_graph","impact","symbol_lookup","file_lookup","project_context","session_recall","atomic_edit","type_orientation","explore_subagent","subagent_start_context","build_diagnostics","review_changes","memory_store","edit_redundancy","unexpected_changes"],type:"string"},hv={additionalProperties:!1,description:"Operator configuration for the Context Scout intent pass.",properties:{action_fact_score_permille:{description:"Score a deterministic action fact contributes for its intent.",format:"uint16",maximum:65535,minimum:0,type:"integer"},enabled:{type:"boolean"},engine:{$ref:"#/$defs/DecisionEngineSettingsV1"},min_delivery_gap_secs:{format:"uint32",minimum:0,type:"integer"},prompt_lookup_deadline_ms:{format:"uint32",minimum:0,type:"integer"},questions:{items:{$ref:"#/$defs/IntentQuestionSettingsV1"},type:"array"},ttl_secs:{format:"uint32",minimum:0,type:"integer"},window:{$ref:"#/$defs/IntentWindowSettingsV1"}},required:["enabled","engine","window","questions","action_fact_score_permille","ttl_secs","min_delivery_gap_secs","prompt_lookup_deadline_ms"],type:"object"},hb={additionalProperties:!1,properties:{max_candidates:{format:"uint",minimum:0,type:"integer"},max_evidence:{format:"uint",minimum:0,type:"integer"},max_model_input_tokens:{format:"uint",minimum:0,type:"integer"},max_model_output_tokens:{format:"uint",minimum:0,type:"integer"},max_text_bytes:{format:"uint",minimum:0,type:"integer"}},required:["max_candidates","max_evidence","max_text_bytes","max_model_input_tokens","max_model_output_tokens"],type:"object"},h$={enum:["disabled","codex_app_server","unsupported","decision_engine"],type:"string"},hS={oneOf:[{enum:["not_requested","succeeded","disabled","unavailable","denied","disconnected","cancelled","deadline_exceeded","token_budget_exceeded","invalid_output"],type:"string"},{const:"backpressured",description:"The engine's concurrency bound was full; the request was not sent.",type:"string"}]},hk={additionalProperties:!1,properties:{actual_model:{type:["string","null"]},actual_provider:{type:["string","null"]},estimated_cost_microusd:{format:"uint64",minimum:0,type:["integer","null"]},input_tokens:{format:"uint64",minimum:0,type:["integer","null"]},output_tokens:{format:"uint64",minimum:0,type:["integer","null"]},requested_backend:{$ref:"#/$defs/ContextScoutModelBackendV1"}},required:["requested_backend"],type:"object"},hw={additionalProperties:!1,properties:{feedback:{anyOf:[{$ref:"#/$defs/ContextScoutFeedbackV1"},{type:"null"}]},receipt:{$ref:"#/$defs/ContextScoutDeliveryReceiptV1"},suggestion:{$ref:"#/$defs/ContextScoutSuggestionProjectionV1"}},required:["suggestion","receipt"],type:"object"},hV={oneOf:[{enum:["deterministic","model_assisted","deterministic_fallback"],type:"string"},{const:"decision_engine",description:"Produced by the session intent pass: decision-engine answers combined\nwith deterministic action facts.",type:"string"}]},hP={enum:["deterministic","configured_model"],type:"string"},hR={enum:["active","paused","disabled"],type:"string"},hq={additionalProperties:!1,description:"Exact bounded span of one session's transcript an intent pass read. The\nwindow body is never retained; only its digest and store-id bounds are.",properties:{first_store_id:{format:"int64",type:"integer"},last_store_id:{format:"int64",type:"integer"},message_count:{format:"uint16",maximum:65535,minimum:0,type:"integer"},newest_timestamp:{format:"int64",type:["integer","null"]},window_digest:{$ref:"#/$defs/ManifestDigest"}},required:["first_store_id","last_store_id","message_count","window_digest"],type:"object"},hI={additionalProperties:!1,description:"Canonical Context Scout control-plane value. Disabled is the only stock\nstate; deterministic or configured-model execution requires an explicit\nconfiguration revision.",properties:{intent:{anyOf:[{$ref:"#/$defs/ContextScoutIntentSettingsV1"},{type:"null"}],description:"Session intent pass. Absent means the Scout runs no intent pass; the\nfield is omitted from the canonical encoding so settings written before\nit existed keep their behavior digest."},limits:{$ref:"#/$defs/ContextScoutConfigurationLimitsV1"},mode:{$ref:"#/$defs/ContextScoutConfigurationModeV1"},model_id:{type:["string","null"]},model_path:{anyOf:[{$ref:"#/$defs/ContextScoutConfiguredModelPathV1"},{type:"null"}]},model_timeout_secs:{format:"uint64",minimum:0,type:["integer","null"]},schema_version:{format:"uint16",maximum:65535,minimum:0,type:"integer"},state:{$ref:"#/$defs/ContextScoutConfigurationStateV1"}},required:["schema_version","state","mode","limits"],type:"object"},hx={enum:["stored","duplicate","superseded"],type:"string"},hj={additionalProperties:!1,properties:{category:{$ref:"#/$defs/ContextScoutCategoryV1"},configuration_revision:{items:{format:"uint8",maximum:255,minimum:0,type:"integer"},maxItems:32,minItems:32,type:"array"},dedupe_key:{items:{format:"uint8",maximum:255,minimum:0,type:"integer"},maxItems:32,minItems:32,type:"array"},delivery_window:{$ref:"#/$defs/ContextScoutDeliveryWindowV1"},envelope_id:{items:{format:"uint8",maximum:255,minimum:0,type:"integer"},maxItems:16,minItems:16,type:"array"},evidence:{$ref:"#/$defs/ContextScoutEvidenceProjectionV1"},expires_at:{$ref:"#/$defs/UtcMicros"},model_outcome:{$ref:"#/$defs/ContextScoutModelOutcomeV1"},model_receipt:{anyOf:[{$ref:"#/$defs/ContextScoutModelReceiptV1"},{type:"null"}]},relevance_score:{format:"uint16",maximum:65535,minimum:0,type:"integer"},route:{$ref:"#/$defs/ContextScoutRouteV1"},suggestion_text:{type:"string"},work:{$ref:"#/$defs/ContextScoutWorkV1"}},required:["work","envelope_id","configuration_revision","delivery_window","route","model_outcome","dedupe_key","category","relevance_score","suggestion_text","evidence","expires_at"],type:"object"},hC={oneOf:[{enum:["disabled","paused","dirty_overlay","quiet_or_unreceptive","no_eligible_candidate","expired","duplicate","cancelled","model_output_invalid","evidence_partial","evidence_stale","evidence_unavailable"],type:"string"},{const:"pending_sibling",description:"A suggestion for the same session is already pending delivery.",type:"string"}]},hT={additionalProperties:!1,properties:{address:{$ref:"#/$defs/ContextScoutAddressV1"},generation:{format:"uint64",minimum:0,type:"integer"},input_watermark:{items:{format:"uint8",maximum:255,minimum:0,type:"integer"},maxItems:32,minItems:32,type:"array"}},required:["address","generation","input_watermark"],type:"object"},hO={properties:{authorized_scope_ref:{type:"string"},current:{type:"boolean"},estimated_cost:{items:{$ref:"#/$defs/MetricValueV1"},type:"array"},horizon:{$ref:"#/$defs/ObservabilityHorizonV1"},latency:{description:"Provider-backed operation latency, projected from the same retained\nPlan 26 operation-resource events as Observatory. Each entry keeps\nprovider/model identity explicit; `None` is a real uncorrelated state,\nnever a client-side guess.",items:{$ref:"#/$defs/ProviderLatencyReadModelV1"},type:"array"},observed_at_micros:{format:"int64",type:"integer"},pricing_revision:{type:["string","null"]},usage:{items:{$ref:"#/$defs/MetricValueV1"},type:"array"},watermark:{type:"string"}},required:["authorized_scope_ref","horizon","watermark","observed_at_micros","current","usage","estimated_cost","latency"],type:"object"},hE={description:"Which side of a file dependency the coupling report counts.",enum:["fan_in","fan_out"],type:"string"},hA={description:"Completeness is explicit; unknown never renders as clean.",enum:["complete","partial","unknown"],type:"string"},hW={additionalProperties:!1,properties:{completeness:{$ref:"#/$defs/CoverageCompleteness"},domain:{$ref:"#/$defs/EvidenceDomain"}},required:["domain","completeness"],type:"object"},hM={enum:["known","partial","stale","unknown","sampled","capped"],type:"string"},hN={description:"Strongly typed canonical identity: `CredentialReferenceId`.",type:"string"},hz={enum:["disabled","manual_receipt_only","fast_forward_only","merge_commit","cherry_pick_exact_commits"],type:"string"},hD={additionalProperties:!1,properties:{allow_cross_repository:{type:"boolean"},allowed_modes:{items:{$ref:"#/$defs/CrossMergeModeV1"},type:"array",uniqueItems:!0},default_mode:{$ref:"#/$defs/CrossMergeModeV1"}},required:["allowed_modes","default_mode","allow_cross_repository"],type:"object"},hF={description:"The managed daemon service unit as a client observed it, from the unit\nfile alone.",oneOf:[{additionalProperties:!1,properties:{state:{const:"not_installed",type:"string"}},required:["state"],type:"object"},{additionalProperties:!1,description:"The unit file could not be read.",properties:{error:{type:"string"},state:{const:"unobservable",type:"string"}},required:["state","error"],type:"object"},{additionalProperties:!1,description:"The unit file at `path` serves the socket `serves`.",properties:{path:{type:"string"},serves:{type:"string"},state:{const:"installed",type:"string"}},required:["state","path","serves"],type:"object"}]},hL={additionalProperties:!1,description:"One immutable deadline supplied by the caller or upstream admission layer.",properties:{expires_at:{$ref:"#/$defs/UtcMicros"}},required:["expires_at"],type:"object"},hU={additionalProperties:!1,description:"The decision engine the intent pass asks. There is no default endpoint or\nmodel; both come only from explicit operator configuration.",properties:{base_url:{type:"string"},max_concurrent:{format:"uint8",maximum:255,minimum:0,type:"integer"},max_state_bytes:{format:"uint32",minimum:0,type:"integer"},model:{type:["string","null"]},timeout_ms:{format:"uint32",minimum:0,type:"integer"}},required:["base_url","timeout_ms","max_concurrent","max_state_bytes"],type:"object"},hH={description:"Diagnostic severity. Source severity is preserved exactly; TraceDecay\nnever raises severity because several producers agree.",enum:["error","warning","information","hint"],type:"string"},hG={additionalProperties:!1,description:"One tsconfig location the diagnostics owner search checked.",properties:{path:{description:"Relative to the project root, forward-slash separated.",type:"string"},present:{description:"The config exists, but neither it nor its references include the\nfile.",type:"boolean"}},required:["path","present"],type:"object"},hB={description:"Whether Doctor observed all of a family's evidence sources.",oneOf:[{const:"complete",description:"Every relevant evidence source for the family was observed.",type:"string"},{const:"partial",description:"Some evidence sources were observed; others were omitted.",type:"string"},{const:"unknown",description:"Whether coverage is complete could not be determined.",type:"string"}]},hK={description:"Shape of the design-structure-matrix report.",enum:["stats","clusters","matrix"],type:"string"},hJ={enum:["prevented","committed","unknown","not_applicable"],type:"string"},hZ={enum:["exact_duplicate","superseded_overlap","repeated_investigation","duplicate_effect","not_duplicate","censored","unknown"],type:"string"},hQ={description:"The stable effect classification of one application operation.\n\nGit index writes remain separate classes so policy cannot accidentally\nsubstitute one index mutation for another.",oneOf:[{enum:["read","preview","source_edit","git_index_stage","git_index_unstage","configuration_write","administrative"],type:"string"},{const:"spawns_process",description:"Runs a child process in the project (e.g. the project's test runner).",type:"string"},{const:"binds_server",description:"Binds a listening server in the daemon process.",type:"string"},{const:"schedules_work",description:"Queues work on a daemon-owned scheduler; the call answers with the\nscheduler's admission, not the finished work.",type:"string"},{const:"maintains_owner_state",description:"Maintains bookkeeping the daemon keeps for the project or profile it\nserves: resets a usage counter, records registry token accounting, or\nreconciles automation schedulers with the saved configuration. Each\nwrite settles within the call and answers its new state.",type:"string"},{const:"maintains_profile_state",description:"Reads and rewrites the daemon profile's own state: its project\nregistry, accounting ledgers, and session stores. Unlike bookkeeping,\nit includes long work, a registry collection or a transcript import,\nthat a cancelled call stops.",type:"string"},{const:"records_host_evidence",description:"Records a host's session evidence (transcripts, hook admissions,\nreceipts) in daemon-owned session stores.",type:"string"}]},hX={additionalProperties:!1,description:"Durable effect proof. It records identities and receipts, never credentials\nor arbitrary command text.",properties:{actor:{$ref:"#/$defs/ActorId"},catalog_digest:{$ref:"#/$defs/ManifestDigest"},committed_state:{anyOf:[{$ref:"#/$defs/ManifestDigest"},{type:"null"}]},configuration_digest:{$ref:"#/$defs/ManifestDigest"},effect_class:{$ref:"#/$defs/EffectClass"},expected_state:{$ref:"#/$defs/ManifestDigest"},external_proof:{anyOf:[{$ref:"#/$defs/RetrievalAnchorId"},{type:"null"}]},idempotency_key:{type:"string"},input_digest:{$ref:"#/$defs/ManifestDigest"},operation:{$ref:"#/$defs/UseCaseId"},outcome:{$ref:"#/$defs/EffectTermination"},policy_digest:{$ref:"#/$defs/ManifestDigest"},privacy_digest:{$ref:"#/$defs/ManifestDigest"},request_id:{type:"string"},scope:{$ref:"#/$defs/ResolvedScope"}},required:["operation","request_id","actor","scope","effect_class","idempotency_key","input_digest","expected_state","policy_digest","configuration_digest","catalog_digest","privacy_digest","outcome"],type:"object"},hY={description:"Durable effect receipt terminal state.",enum:["completed","cancelled","timed_out","failed","partial","effect_unknown"],type:"string"},h1={additionalProperties:!1,description:"Deterministic coverage fold input for an evidence packet.",properties:{completeness:{$ref:"#/$defs/CoverageCompleteness"},domains:{items:{$ref:"#/$defs/CoverageDomainState"},type:"array"},eligible:{format:"uint64",minimum:0,type:["integer","null"]},requested_domains:{items:{$ref:"#/$defs/EvidenceDomain"},type:"array"},returned:{format:"uint64",minimum:0,type:"integer"},visited:{format:"uint64",minimum:0,type:["integer","null"]}},required:["requested_domains","returned","completeness","domains"],type:"object"},h0={description:"Requested evidence domain for bounded coverage and omissions.",enum:["symbol","source","graph","test","temporal","anchor","operational","diagnostic"],type:"string"},h2={description:"Evidence role used by dedupe/diversity caps. Independent corroboration\nand contradictions are preserved.",enum:["primary","corroboration","contradiction","context"],type:"string"},h4={description:"The exact tiers, lexicographically ordered above all approximate\ncandidates. Fusion derives this only from a validated [`ExactAdmissionProof`].",enum:["exact_message","exact_literal_phrase","approximate"],type:"string"},h6={description:"The classification of one whole exact technical term. Whole exact terms\nand language-profiled subtokens are distinct fields.",enum:["whole_symbol","qualified_name","path","compiler_error_code","compiler_error_text","runtime_error_code","runtime_error_text","cli_flag","tool_name","configuration_key","commit_identifier"],type:"string"},h3={description:"Strongly typed canonical identity: `FactAssertionId`.",type:"string"},h9={enum:["general","user_pref","project","tool","decision","code_area"],type:"string"},h5={enum:["committed","idempotent_replay"],type:"string"},h8={oneOf:[{additionalProperties:!1,properties:{kind:{const:"profile",type:"string"}},required:["kind"],type:"object"},{additionalProperties:!1,properties:{kind:{const:"project",type:"string"},project_id:{$ref:"#/$defs/ProjectId"}},required:["kind","project_id"],type:"object"}]},h7={additionalProperties:!1,properties:{active_assertion_id:{anyOf:[{$ref:"#/$defs/FactAssertionId"},{type:"null"}]},committed_event_ids:{items:{$ref:"#/$defs/FactEventId"},type:"array"},disposition:{$ref:"#/$defs/FactCommitDispositionV1"},fact_id:{$ref:"#/$defs/FactId"},last_event_id:{$ref:"#/$defs/FactEventId"},owner:{$ref:"#/$defs/FactCommitOwnerV1"}},required:["disposition","fact_id","owner","committed_event_ids","last_event_id"],type:"object"},ye={description:"Strongly typed canonical identity: `FactEventId`.",type:"string"},yt={enum:["helpful","unhelpful"],type:"string"},yr={description:"Strongly typed canonical identity: `FactId`.",type:"string"},yi={oneOf:[{additionalProperties:!1,properties:{anchor_id:{$ref:"#/$defs/RetrievalAnchorId"},kind:{const:"evidence",type:"string"},stable_key:{$ref:"#/$defs/LocatorDigest"}},required:["kind","anchor_id","stable_key"],type:"object"},{additionalProperties:!1,properties:{kind:{const:"application",type:"string"},operation_id:{$ref:"#/$defs/ProvenanceId"}},required:["kind","operation_id"],type:"object"}]},yo={description:"Payload states that structurally cannot expose an available fact payload.",enum:["redacted","quarantined","retention_expired","deleted","unavailable","ambiguous"],type:"string"},yn={oneOf:[{additionalProperties:!1,properties:{fact:{$ref:"#/$defs/FactV1"},kind:{const:"available",type:"string"}},required:["kind","fact"],type:"object"},{additionalProperties:!1,properties:{fact:{$ref:"#/$defs/FactV1"},kind:{const:"superseded",type:"string"},superseded_by:{$ref:"#/$defs/FactId"}},required:["kind","fact","superseded_by"],type:"object"},{additionalProperties:!1,properties:{kind:{const:"unavailable",type:"string"},status:{$ref:"#/$defs/FactStatusV1"}},required:["kind","status"],type:"object"}]},ya={oneOf:[{additionalProperties:!1,properties:{kind:{const:"not_applicable",type:"string"}},required:["kind"],type:"object"},{additionalProperties:!1,properties:{kind:{const:"not_mounted",type:"string"}},required:["kind"],type:"object"},{additionalProperties:!1,properties:{expanded_fact_count:{format:"uint",minimum:0,type:"integer"},kind:{const:"complete",type:"string"},relation_count:{format:"uint",minimum:0,type:"integer"},root_count:{format:"uint",minimum:0,type:"integer"}},required:["kind","root_count","relation_count","expanded_fact_count"],type:"object"},{additionalProperties:!1,properties:{kind:{const:"degraded",type:"string"},reason:{$ref:"#/$defs/FactSearchGraphDegradationV1"}},required:["kind","reason"],type:"object"}]},ys={enum:["conflict","unavailable","budget_exhausted","deadline_exceeded"],type:"string"},yd={additionalProperties:!1,properties:{fact:{$ref:"#/$defs/FactV1"},scores:{$ref:"#/$defs/FactSearchScoresV1"},why:{type:["string","null"]}},required:["fact","scores"],type:"object"},yc={additionalProperties:!1,properties:{fts_score_millionths:{format:"uint32",minimum:0,type:"integer"},holographic_score_millionths:{format:"uint32",minimum:0,type:"integer"},jaccard_score_millionths:{format:"uint32",minimum:0,type:"integer"},score_millionths:{format:"uint32",minimum:0,type:"integer"},trust_score_millionths:{format:"uint32",minimum:0,type:"integer"}},required:["score_millionths","fts_score_millionths","jaccard_score_millionths","holographic_score_millionths","trust_score_millionths"],type:"object"},yl={additionalProperties:!1,properties:{fact_id:{$ref:"#/$defs/FactId"},owner:{$ref:"#/$defs/FactCommitOwnerV1"},payload_access:{$ref:"#/$defs/FactPayloadAccessV1"},projected_as_of:{$ref:"#/$defs/UtcMicros"}},required:["owner","fact_id","payload_access","projected_as_of"],type:"object"},yp={additionalProperties:!1,properties:{access_count:{format:"uint64",minimum:0,type:"integer"},created_at:{$ref:"#/$defs/UtcMicros"},helpful_count:{format:"uint64",minimum:0,type:"integer"},last_feedback_at:{anyOf:[{$ref:"#/$defs/UtcMicros"},{type:"null"}]},last_recalled_at:{anyOf:[{$ref:"#/$defs/UtcMicros"},{type:"null"}]},last_retrieved_at:{anyOf:[{$ref:"#/$defs/UtcMicros"},{type:"null"}]},retrieval_count:{format:"uint64",minimum:0,type:"integer"},unhelpful_count:{format:"uint64",minimum:0,type:"integer"},updated_at:{$ref:"#/$defs/UtcMicros"}},required:["retrieval_count","access_count","helpful_count","unhelpful_count","created_at","updated_at"],type:"object"},yu={additionalProperties:!1,description:"Available fact projection. Unavailable payload states use\n[`FactProjectionV1::Unavailable`] and cannot fabricate payload fields.",properties:{active_assertion_id:{$ref:"#/$defs/FactAssertionId"},category:{$ref:"#/$defs/FactCategoryV1"},content:{type:"string"},entities:{items:{type:"string"},type:"array"},fact_id:{$ref:"#/$defs/FactId"},last_event_id:{$ref:"#/$defs/FactEventId"},metadata:{additionalProperties:!0,type:"object"},owner:{$ref:"#/$defs/FactCommitOwnerV1"},projected_as_of:{$ref:"#/$defs/UtcMicros"},source:{$ref:"#/$defs/FactIdentitySourceResultV1"},source_label:{type:["string","null"]},tags:{items:{type:"string"},type:"array"},telemetry:{$ref:"#/$defs/FactTelemetryV1"},trust_score_millionths:{format:"uint32",minimum:0,type:"integer"}},required:["owner","fact_id","content","category","tags","entities","trust_score_millionths","source","active_assertion_id","last_event_id","projected_as_of","telemetry","metadata"],type:"object"},ym={additionalProperties:!1,description:"Exact source-owned state for one advisory producer in a composed feedback\ncycle. The producer tag is part of the durable cycle result so consumers\nnever infer provenance from the position of an aggregate provider state.",properties:{producer:{$ref:"#/$defs/FeedbackDiagnosticProducerV1"},state:{$ref:"#/$defs/ProviderEvaluationStateV1"}},required:["producer","state"],type:"object"},yf={description:"Availability of the canonical baseline used to classify a current\ndiagnostic. An unavailable or partial baseline never upgrades a finding\nto `New`; only an authoritative `NoPriorBaseline` state may do so without\na baseline record.",oneOf:[{enum:["complete","partial","stale","unavailable"],type:"string"},{const:"no_prior_baseline",description:"The authoritative runtime confirmed that there is no prior saved\ngeneration to compare. This is authoritative empty history, not an\ninvented horizon and not unavailable/partial coverage.",type:"string"}]},yh={description:"Content identity distinguishes durable saved content from an authorized\nephemeral document overlay. Overlay identity is deliberately local to its\nowning session and cannot be made durable by converting it to a digest.",oneOf:[{properties:{file_digest:{$ref:"#/$defs/ManifestDigest"},generation_digest:{$ref:"#/$defs/ManifestDigest"},kind:{const:"saved_content",type:"string"}},required:["kind","generation_digest","file_digest"],type:"object"},{properties:{agent_id:{anyOf:[{$ref:"#/$defs/AgentInstanceId"},{type:"null"}]},document_version:{format:"uint64",minimum:0,type:"integer"},kind:{const:"ephemeral_overlay",type:"string"},overlay_digest:{$ref:"#/$defs/ManifestDigest"},owner_client_id:{$ref:"#/$defs/HostInstanceId"},session_id:{$ref:"#/$defs/SessionId"}},required:["kind","session_id","owner_client_id","document_version","overlay_digest"],type:"object"}]},yy={description:"Strongly typed canonical identity: `FeedbackCycleId`.",type:"string"},yg={enum:["clean","duplicate_noop","blocked","incomplete_coverage","stale_replan_required","budget_exceeded","cancelled","user_stop","daemon_unavailable"],type:"string"},y_={enum:["new","pre_existing","unknown"],type:"string"},yv={description:"Closed producer vocabulary for standard diagnostic projection.",enum:["code_diagnostic","git_hub_review","ci_localization","proximity"],type:"string"},yb={additionalProperties:!1,description:"Bounded code location used only to project an anchored advisory finding\ninto an editor. The finding's `retrieval_anchor_id` remains the evidence\nexpansion authority; this value carries no source body or provider payload.",properties:{code:{type:"string"},code_description_uri:{type:["string","null"]},file:{$ref:"#/$defs/FileOccurrenceId"},producer:{$ref:"#/$defs/FeedbackDiagnosticProducerV1"},safe_bounded_message:{type:"string"},severity:{$ref:"#/$defs/DiagnosticSeverityV1"},span:{$ref:"#/$defs/SourceSpan"},symbol:{anyOf:[{$ref:"#/$defs/SymbolOccurrenceId"},{type:"null"}]}},required:["file","span","code","severity","safe_bounded_message","producer"],type:"object"},y$={enum:["durable","session_only"],type:"string"},yS={description:"Strongly typed canonical identity: `FeedbackFindingId`.",type:"string"},yk={enum:["active","superseded","resolved","cleared"],type:"string"},yw={additionalProperties:!1,properties:{cycle_id:{$ref:"#/$defs/FeedbackCycleId"},expand_handle:{description:"Server-minted request handle for `feedback_expand`, present only when\nthe canonical finding has a retained retrieval anchor.",type:["string","null"]},finding:{$ref:"#/$defs/FeedbackFindingV1"},get_handle:{description:"Server-minted request handle for `feedback_get`; durable identity remains\n`finding.finding_id`.\n\nCursor identity types are deliberately absent from the generated schema\nsurface; the public wire form is the bounded opaque string.",type:"string"},result_id:{$ref:"#/$defs/FeedbackResultId"},scope:{$ref:"#/$defs/FeedbackScopeV1"}},required:["result_id","cycle_id","scope","finding","get_handle"],type:"object"},yV={additionalProperties:!1,description:"Reference-only post-edit feedback finding. The safe preview is bounded display framing,\nnever a source-text copy or a second diagnostic store.",properties:{classification:{$ref:"#/$defs/FeedbackDiagnosticClassificationV1"},diagnostic_projection:{anyOf:[{$ref:"#/$defs/FeedbackDiagnosticProjectionV1"},{type:"null"}]},finding_id:{$ref:"#/$defs/FeedbackFindingId"},lifecycle:{$ref:"#/$defs/FeedbackFindingLifecycleV1"},provider_state:{$ref:"#/$defs/ProviderEvaluationStateV1"},retrieval_anchor_id:{anyOf:[{$ref:"#/$defs/RetrievalAnchorId"},{type:"null"}]},safe_bounded_preview:{type:["string","null"]}},required:["finding_id","classification","lifecycle","provider_state"],type:"object"},yP={description:"Coverage state for graph impact and affected-test evidence. An empty impact\nset is clean only when its state is complete.",enum:["complete","partial","stale","unavailable"],type:"string"},yR={additionalProperties:!1,description:"Reference-only graph and test impact for one feedback target. The owning\ngraph/query layer supplies these identities; this contract does not create\nanother graph, test map, or evidence store.",properties:{affected_callers:{items:{$ref:"#/$defs/SymbolOccurrenceId"},type:"array"},affected_files:{items:{$ref:"#/$defs/FileOccurrenceId"},type:"array"},affected_tests:{items:{$ref:"#/$defs/SymbolOccurrenceId"},type:"array"},affected_tests_state:{$ref:"#/$defs/FeedbackImpactStateV1"},evidence_anchors:{items:{$ref:"#/$defs/RetrievalAnchorId"},type:"array"},state:{$ref:"#/$defs/FeedbackImpactStateV1"},target:{$ref:"#/$defs/FeedbackTargetV1"}},required:["target","affected_files","affected_callers","affected_tests","evidence_anchors","state","affected_tests_state"],type:"object"},yq={description:"Strongly typed canonical identity: `FeedbackResultId`.",type:"string"},yI={additionalProperties:!1,description:"Exact repository scope used for a feedback evaluation. A path, current\nworking directory, repository display name, or mutable branch label is not\na substitute for this identity.",properties:{branch_ref:{type:"string"},head_commit_id:{$ref:"#/$defs/CommitId"},project_id:{$ref:"#/$defs/ProjectId"},repository_id:{$ref:"#/$defs/RepositoryId"},worktree_id:{$ref:"#/$defs/WorktreeId"}},required:["project_id","repository_id","worktree_id","branch_ref","head_commit_id"],type:"object"},yx={additionalProperties:!1,description:"Exact changed-code address for one single-root feedback evaluation. The\naddress carries canonical file/range/symbol identities, never a path or\nmutable line number.",properties:{file:{$ref:"#/$defs/FileOccurrenceId"},generation_id:{anyOf:[{$ref:"#/$defs/CodeGenerationId"},{type:"null"}]},span:{anyOf:[{$ref:"#/$defs/SourceSpan"},{type:"null"}]},symbol:{anyOf:[{$ref:"#/$defs/SymbolOccurrenceId"},{type:"null"}]}},required:["file"],type:"object"},yj={description:"Strongly typed canonical identity: `FileOccurrenceId`.",type:"string"},yC={description:"How `tracedecay_files` lays out its listing.",oneOf:[{const:"flat",description:"One file per line.",type:"string"},{const:"grouped",description:"Grouped by directory.",type:"string"}]},yT={description:"Deterministic fixed-point score in millionths. No floating point crosses\nthis boundary.",format:"uint64",minimum:0,type:"integer"},yO={description:"Compatibility state of one source/projection pair.",enum:["current","stale","incompatible","missing","unknown"],type:"string"},yE={additionalProperties:!1,description:"A candidate after contribution grouping and fixed-point fusion.",properties:{anchor_id:{$ref:"#/$defs/RetrievalAnchorId"},contributions:{items:{$ref:"#/$defs/CandidateContribution"},type:"array"},decisions:{items:{$ref:"#/$defs/RankingDecision"},type:"array"},exact_class:{$ref:"#/$defs/ExactClass"},freshness:{items:{$ref:"#/$defs/SourceFreshness"},type:"array"},logical_evidence_id:{$ref:"#/$defs/LogicalEvidenceId"},occurrences:{items:{$ref:"#/$defs/OccurrenceProvenance"},type:"array"},source_role:{$ref:"#/$defs/RetrievalSourceRoleV1",default:"production_other",description:"Strongest source role across the fused occurrences. Absent historical\ncandidates deserialize as a non-definition hit."},utility_micros:{format:"uint64",minimum:0,type:"integer"}},required:["anchor_id","logical_evidence_id","occurrences","exact_class","utility_micros","contributions","freshness","decisions"],type:"object"},yA={description:"Metric whose distribution the Gini report measures.",enum:["complexity","lines","fan_in","fan_out","members"],type:"string"},yW={description:"Unit the Gini report aggregates its metric over.",enum:["file","symbol"],type:"string"},yM={description:"Expected blob identity, or explicit absent-file state.",oneOf:[{enum:["absent_file"],type:"string"},{additionalProperties:!1,properties:{present:{$ref:"#/$defs/GitOidV1"}},required:["present"],type:"object"}]},yN={additionalProperties:!1,description:"A symbol the exact base/head branch-generation comparison reports.",properties:{content_digest:{type:"string"},file:{type:"string"},id:{type:"string"},kind:{type:"string"},name:{type:"string"},qualified_name:{type:"string"}},required:["id","name","qualified_name","kind","file","content_digest"],type:"object"},yz={additionalProperties:!1,description:"A verified-graph symbol a git-context read reports.",properties:{file:{type:"string"},id:{type:"string"},kind:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},name:{type:"string"}},required:["id","name","kind","file","line"],type:"object"},yD={additionalProperties:!1,description:"Typed coverage of a read-only Git result: the sorted, de-duplicated set\nof degradations observed while capturing it.",properties:{degradations:{items:{$ref:"#/$defs/GitDegradationV1"},type:"array"}},required:["degradations"],type:"object"},yF={description:"Typed coverage/degradation reasons for a read-only Git result. A result\ncarrying any degradation is truthful but not complete; callers must not\ntreat it as a clean full view.",oneOf:[{enum:["detached_head","unborn_branch","sparse_checkout","split_index","unreadable_state","unsupported_object_format","in_progress_operation","shallow_boundary","truncated_output"],type:"string"},{const:"ignored_collision",description:"Ignored content shares a directory with live tracked/untracked\nentries, so the untracked/ignored view may be collapsed by Git.",type:"string"},{const:"conflicted_state",description:"Unmerged index stages are present.",type:"string"},{const:"submodule_state",description:"Submodule entries exist; the adapter does not recurse into them.",type:"string"}]},yL={description:"A native Git file mode as stored in tree/index records (six octal digits,\ne.g. `100644`, `100755`, `120000` symlink, `160000` gitlink/submodule).",type:"string"},yU={description:"Native HEAD state. Missing, unborn, and detached states are explicit,\nnever guessed.",oneOf:[{properties:{branch:{type:"string"},commit:{$ref:"#/$defs/GitOidV1"},state:{const:"attached",type:"string"}},required:["state","branch","commit"],type:"object"},{properties:{commit:{$ref:"#/$defs/GitOidV1"},state:{const:"detached",type:"string"}},required:["state","commit"],type:"object"},{properties:{branch:{type:"string"},state:{const:"unborn",type:"string"}},required:["state","branch"],type:"object"}]},yH={enum:["disabled","probe_private_preview"],type:"string"},yG={additionalProperties:!1,description:"Expected index entry state for compare-and-swap: blob identity (or\nabsent), mode, and unmerged-stage state. `unmerged_stage` is `None` for a\nmerged (stage-0) entry.",properties:{blob:{$ref:"#/$defs/GitBlobExpectationV1"},mode:{anyOf:[{$ref:"#/$defs/GitFileModeV1"},{type:"null"}]},unmerged_stage:{format:"uint8",maximum:255,minimum:0,type:["integer","null"]}},required:["blob"],type:"object"},yB={description:"Strongly typed canonical identity: `GitIndexPreviewId`.",type:"string"},yK={description:"The only native Git mutations represented by the index-transaction runtime. Generic Git execution,\nref rewrites, commits, merge/rebase/cherry-pick, push, and worktree writes are\ndeliberately absent.",enum:["stage_hunks","unstage_hunks"],type:"string"},yJ={description:"A native Git object id (commit, tree, or blob), lowercase hex, SHA-1 or\nSHA-256 length. This is identity evidence only; it never authorizes\nobject reconstruction or traversal outside native Git.",type:"string"},yZ={description:"In-progress native Git operation state, read from repository metadata.",enum:["none","merge","rebase","cherry_pick","revert","bisect","sequencer","unknown"],type:"string"},yQ={description:"Whether a bounded page holds every answer or stopped at its limit.",enum:["complete","partial"],type:"string"},yX={enum:["complete"],type:"string"},yY={enum:["partial"],type:"string"},y1={enum:["unavailable"],type:"string"},y0={enum:["result_limit"],type:"string"},y2={additionalProperties:!1,properties:{branch:{type:["string","null"]},commit:{type:["string","null"]},worktree:{type:["string","null"]}},type:"object"},y4={description:"Flat public selector for an admitted Git diff scope.\n\nThis intentionally differs from [`tracedecay_domain::GitDiffScopeV1`]: MCP\nand CLI accept `scope`, `base`, and `head` as sibling fields, then\ntransport parsing builds the canonical domain scope after checking their\nlegal combinations.",enum:["working_tree","staged","commit_range"],type:"string"},y6={enum:["git"],type:"string"},y3={additionalProperties:!1,properties:{kind:{$ref:"#/$defs/GitToolErrorKindV1"},message:{type:"string"},operation:{$ref:"#/$defs/GitToolOperationV1"}},required:["kind","operation","message"],type:"object"},y9={additionalProperties:!1,description:"Git itself refused the refs, worktree status, or history the tool reads.",properties:{error:{$ref:"#/$defs/GitToolErrorV1"}},required:["error"],type:"object"},y5={description:"The git step that refused the read.",enum:["diff","status","log"],type:"string"},y8={additionalProperties:!1,properties:{binding_digest:{$ref:"#/$defs/ManifestDigest"},consumed_at:{$ref:"#/$defs/UtcMicros"},input_digest:{$ref:"#/$defs/ManifestDigest"},receipt_digest:{$ref:"#/$defs/ManifestDigest"},request_id:{type:"string"},token_digest:{$ref:"#/$defs/ManifestDigest"}},required:["binding_digest","token_digest","request_id","input_digest","consumed_at","receipt_digest"],type:"object"},y7={enum:["forbid_force_and_rebase"],type:"string"},ge={description:"Strongly typed canonical identity: `HostInstanceId`.",type:"string"},gt={description:"`HunkRef` operation direction: working tree to index, or index to\nHEAD/base. No other direction is encodable.",enum:["working_tree_to_index","index_to_head"],type:"string"},gr={additionalProperties:!1,description:"Immutable hunk identity for compare-and-swap. A hunk is identified by exact repository,\ndirection, path, expected base/index/worktree identity, normalized hunk\nheader, context and patch digests, and the preview that issued the\nreference, never by display ordinal or line number alone.\n\nquery mints these as read-only identity evidence only. Applying them is a\ndaemon Git mutation path and is not representable here.",properties:{attributes_digest:{anyOf:[{$ref:"#/$defs/ManifestDigest"},{type:"null"}],description:"Attributes/filter identity relevant to clean/smudge and EOL handling."},context_digest:{$ref:"#/$defs/ManifestDigest"},direction:{$ref:"#/$defs/HunkDirectionV1"},expected_base_blob:{$ref:"#/$defs/GitBlobExpectationV1"},expected_index_entry:{$ref:"#/$defs/GitIndexEntryExpectationV1"},expected_worktree_blob:{anyOf:[{$ref:"#/$defs/GitBlobExpectationV1"},{type:"null"}],description:"Expected working-tree identity when the operation reads the worktree:\na native content digest or explicit absent-file state. `None` means\nthe operation direction does not read the worktree."},expected_worktree_mode:{anyOf:[{$ref:"#/$defs/GitFileModeV1"},{type:"null"}]},hunk_header:{description:"Normalized `@@ -o,l +n,m @@` header text.",type:"string"},original_path:{description:"Old path for a rename or copy.",type:["string","null"]},patch_digest:{$ref:"#/$defs/ManifestDigest"},path:{type:"string"},preview_id:{type:"string"},repository:{$ref:"#/$defs/RepositoryId"},schema_version:{type:"string"},selected_line_bitmap:{description:"Selected hunk-line bitmap (little-endian word order, line 1 = bit 0\nof word 0). Full-hunk identity covers the larger old/new side so\ndeletion-only hunks remain representable.",items:{format:"uint64",minimum:0,type:"integer"},type:"array"},snapshot_digest:{$ref:"#/$defs/ManifestDigest"},worktree:{$ref:"#/$defs/WorktreeId"}},required:["repository","worktree","direction","path","expected_base_blob","expected_index_entry","hunk_header","context_digest","patch_digest","selected_line_bitmap","preview_id","schema_version","snapshot_digest"],type:"object"},gi={enum:["available","retained_but_unavailable","redacted","deleted","retention_expired","unauthorized","locked","unverifiable"],type:"string"},go={additionalProperties:!1,description:"One yes/no question asked of the decision engine for one intent. The\nintent is a candidate when the engine's probability reaches\n`threshold_permille` and, when set, exceeds the runner-up by\n`margin_permille`.",properties:{instructions:{type:"string"},intent:{$ref:"#/$defs/ContextScoutIntentKindV1"},margin_permille:{format:"uint16",maximum:65535,minimum:0,type:["integer","null"]},threshold_permille:{format:"uint16",maximum:65535,minimum:0,type:"integer"}},required:["intent","instructions","threshold_permille"],type:"object"},gn={additionalProperties:!1,description:"Bounds on the recent-session window one intent pass reads.",properties:{freshen_budget_ms:{description:"Time the pass may wait for the transcript store to ingest the newest\nturn before it reads the window as it stands.",format:"uint32",minimum:0,type:"integer"},max_age_secs:{format:"uint32",minimum:0,type:"integer"},max_bytes:{format:"uint32",minimum:0,type:"integer"},max_messages:{format:"uint8",maximum:255,minimum:0,type:"integer"},max_user_turns:{format:"uint8",maximum:255,minimum:0,type:"integer"}},required:["max_user_turns","max_messages","max_bytes","max_age_secs","freshen_budget_ms"],type:"object"},ga={description:"p50/p95/p99 for one provider operation latency stage.",properties:{p50:{$ref:"#/$defs/MetricValueV1"},p95:{$ref:"#/$defs/MetricValueV1"},p99:{$ref:"#/$defs/MetricValueV1"}},required:["p50","p95","p99"],type:"object"},gs={oneOf:[{properties:{state:{const:"ready",type:"string"}},required:["state"],type:"object"},{properties:{state:{const:"denied",type:"string"}},required:["state"],type:"object"},{properties:{state:{const:"cancelled",type:"string"}},required:["state"],type:"object"},{properties:{state:{const:"timed_out",type:"string"}},required:["state"],type:"object"},{properties:{reason:{type:"string"},state:{const:"unavailable",type:"string"}},required:["state","reason"],type:"object"},{properties:{diagnostic:{type:"string"},state:{const:"failed",type:"string"}},required:["state","diagnostic"],type:"object"}]},gd={additionalProperties:!1,properties:{limit:{format:"uint64",minimum:0,type:"integer"},offset:{format:"uint64",minimum:0,type:"integer"},returned_chars:{format:"uint64",minimum:0,type:"integer"},total_chars:{format:"uint64",minimum:0,type:"integer"},truncated:{type:"boolean"}},required:["offset","limit","returned_chars","total_chars","truncated"],type:"object"},gc={description:"Whether historical discovery, projection publication, and summary\nconvergence have all settled for everything the store's sources hold.",oneOf:[{const:"converging",description:"A stage still owes committed work.",type:"string"},{const:"converged",description:"The worker committed the last owed item and has nothing pending.",type:"string"},{const:"blocked",description:"Every runnable stage settled, but historical discovery is blocked.",type:"string"},{const:"unavailable",description:"No worker is serving the store.",type:"string"}]},gl={additionalProperties:!1,properties:{converged_at_unix_micros:{description:"When the latest convergence event was published.",format:"int64",type:["integer","null"]},epoch:{description:"Convergence events this worker has published; a larger value is a\nnewer event.",format:"uint64",minimum:0,type:"integer"},reason:{description:"The historical discovery blocker when `state` is `blocked`.",type:["string","null"]},state:{$ref:"#/$defs/LcmConvergenceStateV1"}},required:["state","epoch"],type:"object"},gp={description:"Whether the refresh worker that serves this store's temporal projection\nis current, still converging history, or not serving at all.",enum:["current","stale","unavailable"],type:"string"},gu={additionalProperties:!1,description:"The temporal projection's serving state at diagnosis time. A store whose\nschema is healthy can still have nothing to serve while history is being\nre-derived (for example on a fresh profile); this is where\nthat state is named instead of being read as absent data.",properties:{convergence:{$ref:"#/$defs/LcmConvergenceV1"},reason:{description:"Machine reason for a non-current state: `historical_convergence`,\n`historical_retry:`, `historical_blocked:`, or the worker\nunavailability (`worker_missing`, `worker_recovering`, `worker_stalled`,\n`worker_stopped`).",type:["string","null"]},state:{$ref:"#/$defs/LcmDoctorProjectionStateV1"},worker:{$ref:"#/$defs/RetrievalWorkerStatusV1"}},required:["state","worker","convergence"],type:"object"},gm={additionalProperties:!1,properties:{content:{type:"string"},content_hash:{type:"string"},message_id:{type:"string"},metadata_json:{type:["string","null"]},ordinal:{format:"int64",type:"integer"},payload_ref:{type:["string","null"]},provider:{type:"string"},role:{type:"string"},session_id:{type:"string"},storage_kind:{$ref:"#/$defs/LcmStorageKindV1"},store_id:{format:"int64",type:"integer"},timestamp:{format:"int64",type:["integer","null"]}},required:["provider","message_id","session_id","store_id","role","ordinal","content","content_hash","storage_kind"],type:"object"},gf={oneOf:[{properties:{freshness:{$ref:"#/$defs/TemporalFreshnessV1"},outcome:{const:"complete",type:"string"}},required:["outcome","freshness"],type:"object"},{properties:{freshness:{$ref:"#/$defs/TemporalFreshnessV1"},omitted:{format:"uint64",minimum:0,type:"integer"},outcome:{const:"partial",type:"string"}},required:["outcome","freshness","omitted"],type:"object"},{properties:{freshness:{$ref:"#/$defs/TemporalFreshnessV1"},outcome:{const:"stale",type:"string"}},required:["outcome","freshness"],type:"object"}]},gh={oneOf:[{properties:{kind:{const:"raw_message",type:"string"},store_id:{format:"int64",type:"integer"}},required:["kind","store_id"],type:"object"},{properties:{kind:{const:"summary_node",type:"string"},node_id:{type:"string"}},required:["kind","node_id"],type:"object"}]},gy={enum:["inline","external","canonical_occurrence"],type:"string"},gg={description:"One provider's summarizer executable: absent by default, or the exact\nabsolute path the operator configured with its optional tuning.",oneOf:[{properties:{state:{const:"unconfigured",type:"string"}},required:["state"],type:"object"},{properties:{canonical_path:{type:"string"},model:{description:"Model requested for summary turns; the provider default when absent.",type:["string","null"]},state:{const:"configured",type:"string"},timeout_secs:{description:"Wall-clock budget for one summary run, within\n[`LCM_SUMMARIZER_TIMEOUT_SECS_RANGE`]; the caller's default when absent.",format:"uint64",minimum:0,type:["integer","null"]}},required:["state","canonical_path"],type:"object"}]},g_={additionalProperties:!1,description:"The per-provider summarizer executables one configuration snapshot admits.",properties:{codex:{$ref:"#/$defs/LcmSummarizerExecutableV1",default:{state:"unconfigured"},description:"`codex`, driven over app-server JSON-RPC for Codex sessions."},cursor_agent:{$ref:"#/$defs/LcmSummarizerExecutableV1",default:{state:"unconfigured"},description:"`cursor-agent`, asked for a summary of Cursor sessions."}},type:"object"},gv={additionalProperties:!1,properties:{conversation_id:{type:"string"},created_at:{format:"int64",type:"integer"},depth:{format:"int64",type:"integer"},expand_hint:{type:["string","null"]},metadata_json:{type:["string","null"]},node_id:{type:"string"},provider:{type:"string"},session_id:{type:"string"},source_refs:{items:{$ref:"#/$defs/LcmSourceRefV1"},type:"array"},source_time_end:{format:"int64",type:["integer","null"]},source_time_start:{format:"int64",type:["integer","null"]},source_token_count:{format:"int64",type:"integer"},summary_hash:{type:"string"},summary_text:{type:"string"},summary_token_count:{format:"int64",type:"integer"}},required:["node_id","provider","conversation_id","session_id","depth","summary_text","summary_hash","source_refs","summary_token_count","source_token_count","created_at"],type:"object"},gb={additionalProperties:!1,properties:{anchors:{items:{type:"string"},type:"array"},authorized_root:{type:["string","null"]},coverage:{$ref:"#/$defs/TemporalCoverageV1"},explanations:{items:{$ref:"#/$defs/TemporalExplanationV1"},type:"array"},next_cursor:{type:["string","null"]},omissions:{items:{$ref:"#/$defs/TemporalOmissionV1"},type:"array"},source_coverage:{items:{$ref:"#/$defs/SessionSourceCoverageV1"},type:"array"},watermarks:{$ref:"#/$defs/TemporalWatermarksV1"}},required:["anchors","watermarks","coverage","explanations"],type:"object"},g$={description:"Why a site the lexical lane admitted for a caller anchor is absent from\nthe response.",oneOf:[{const:"diversity_cap",description:"Collapsed as a duplicate or held back by the per-file diversity cap.",type:"string"},{const:"outside_page",description:"Ranked, but outside the returned page: an earlier page, or behind\n`next_cursor`.",type:"string"},{const:"not_hydrated",description:"On the page, but late hydration returned no source for it.",type:"string"},{const:"out_of_scope",description:"Outside the caller's scope prefix.",type:"string"}]},gS={additionalProperties:!1,description:"Anchor sites one serving stage removed from the response.",properties:{reason:{$ref:"#/$defs/LexicalAnchorDropReasonV1"},sites:{format:"uint64",minimum:0,type:"integer"}},required:["reason","sites"],type:"object"},gk={description:"Strongly typed algorithm-tagged integrity digest: `LocatorDigest`.",type:"string"},gw={description:"Strongly typed canonical identity: `LogicalCopyClusterId`.",type:"string"},gV={description:"Strongly typed canonical identity: `LogicalEvidenceId`.",type:"string"},gP={enum:["global","project"],type:"string"},gR={properties:{absorbed_into:{type:["string","null"]},activated_at:{format:"int64",type:["integer","null"]},archived_reason:{type:["string","null"]},category:{type:"string"},checksum:{type:"string"},created_at:{format:"int64",type:"integer"},id:{type:"string"},materialization_scope:{$ref:"#/$defs/ManagedSkillMaterializationScope"},pinned:{type:"boolean"},provenance:{$ref:"#/$defs/ManagedSkillProvenance"},routing_description:{type:"string"},state:{$ref:"#/$defs/ManagedSkillState"},summary:{type:"string"},targets:{default:["cursor","codex","claude","agents","opencode","kimi","kiro","hermes"],items:{$ref:"#/$defs/SkillInstallTarget"},type:"array"},title:{type:"string"},updated_at:{format:"int64",type:"integer"}},required:["id","title","summary","routing_description","category","state","pinned","checksum","created_at","updated_at","provenance"],type:"object"},gq={properties:{actor:{type:"string"},run_id:{type:["string","null"]},source:{$ref:"#/$defs/ManagedSkillSource"}},required:["source","actor"],type:"object"},gI={enum:["automation_run","user","import"],type:"string"},gx={enum:["active","disabled","archived"],type:"string"},gj={description:"Strongly typed algorithm-tagged integrity digest: `ManifestDigest`.",type:"string"},gC={description:"The only Git histories this product operation can create.",enum:["fast_forward","two_parent_merge","cherry_pick_exact_commits"],type:"string"},gT={enum:["project","user"],type:"string"},gO={enum:["all","parents_only","subagents_only"],type:"string"},gE={enum:["all","direct_user","tool_result"],type:"string"},gA={properties:{calibration_revision:{type:"string"},cohort_revision:{type:"string"},drift_valid:{type:"boolean"},estimator_revision:{type:"string"},support:{format:"uint64",minimum:0,type:"integer"}},required:["estimator_revision","calibration_revision","cohort_revision","support","drift_valid"],type:"object"},gW={properties:{descriptor_revision:{type:"string"},eligible_population:{type:"string"}},required:["descriptor_revision","eligible_population"],type:"object"},gM={properties:{censored:{format:"uint64",minimum:0,type:"integer"},completed:{format:"uint64",minimum:0,type:"integer"},eligible:{description:"Exact denominator cardinality. `None` means the denominator is unknown.",format:"uint64",minimum:0,type:["integer","null"]},excluded:{format:"uint64",minimum:0,type:"integer"},observed:{format:"uint64",minimum:0,type:"integer"},state:{$ref:"#/$defs/CoverageStateV1"},unknown:{format:"uint64",minimum:0,type:"integer"}},required:["observed","completed","censored","unknown","excluded","state"],type:"object"},gN={enum:["measurement","association","calibrated_prediction"],type:"string"},gz={properties:{projector_revision:{type:"string"},source:{$ref:"#/$defs/MetricSourceV1"},source_revision:{type:"string"},watermark:{type:"string"}},required:["source","source_revision","projector_revision","watermark"],type:"object"},gD={enum:["observability_envelope","feedback_observations","provider_usage_observation","savings_ledger"],type:"string"},gF={properties:{baseline_watermark:{type:["string","null"]},delta:{format:"double",type:["number","null"]},horizon:{$ref:"#/$defs/ObservabilityHorizonV1"}},required:["horizon"],type:"object"},gL={properties:{lower:{format:"double",type:["number","null"]},reason:{type:["string","null"]},upper:{format:"double",type:["number","null"]}},type:"object"},gU={properties:{calibration:{anyOf:[{$ref:"#/$defs/MetricCalibrationV1"},{type:"null"}]},cohort:{$ref:"#/$defs/MetricCohortV1"},coverage:{$ref:"#/$defs/MetricCoverageV1"},denominator:{type:"string"},denominator_value:{format:"uint64",minimum:0,type:["integer","null"]},descriptor_revision:{type:"string"},evidence_class:{$ref:"#/$defs/MetricEvidenceClassV1"},metric:{type:"string"},provenance:{$ref:"#/$defs/MetricProvenanceV1"},temporal:{$ref:"#/$defs/MetricTemporalV1"},unavailable_reason:{type:["string","null"]},uncertainty:{$ref:"#/$defs/MetricUncertaintyV1"},unit:{type:"string"},value:{description:"Aggregate value. It is absent whenever its denominator or coverage is\ninsufficient; observed lower bounds remain available in `coverage`.",format:"double",type:["number","null"]}},required:["descriptor_revision","metric","unit","denominator","coverage","evidence_class","provenance","cohort","temporal","uncertainty"],type:"object"},gH={additionalProperties:!1,description:"A file that historically changes with `partner_of` but is missing from the\nchange set under review, e.g. a migration beside its schema.",properties:{co_changes:{description:"Commits that changed both `partner_of` and `file`.",format:"uint64",minimum:0,type:"integer"},file:{type:"string"},partner_of:{type:"string"},partner_of_changes:{description:"Commits that changed `partner_of`.",format:"uint64",minimum:0,type:"integer"}},required:["file","partner_of","co_changes","partner_of_changes"],type:"object"},gG={additionalProperties:!1,description:"Frozen continuation identity shared by all participating roots.",properties:{digest:{$ref:"#/$defs/ManifestDigest"},next_page:{format:"uint64",minimum:1,type:"integer"},order_digest:{$ref:"#/$defs/ManifestDigest"},query_digest:{$ref:"#/$defs/ManifestDigest"},root_cursors:{items:{$ref:"#/$defs/RootScopeOutcomeV1_for_Nullable_string"},type:"array"},root_generations:{items:{$ref:"#/$defs/RootScopeOutcomeV1_for_Nullable_RootGenerationV1"},type:"array"},scope_set_digest:{$ref:"#/$defs/ManifestDigest"}},required:["scope_set_digest","root_generations","root_cursors","query_digest","order_digest","next_page","digest"],type:"object"},gB={description:"Strongly typed canonical identity: `NativeIntegrationApprovalId`.",type:"string"},gK={description:"Explicit direction of one integration. Stack meaning is never inferred.",enum:["propagate_dependency_to_dependent","land_dependent_into_dependency","integrate_independent_branch"],type:"string"},gJ={description:"Truthful preview classification. Only `MechanicalIntegrationEligible`\ncarries apply-eligible evidence.",oneOf:[{properties:{detail:{$ref:"#/$defs/MechanicalIntegrationModeV1"},state:{const:"mechanical_integration_eligible",type:"string"}},required:["state","detail"],type:"object"},{properties:{state:{const:"already_integrated",type:"string"}},required:["state"],type:"object"},{properties:{detail:{properties:{conflict_digest:{$ref:"#/$defs/ManifestDigest"}},required:["conflict_digest"],type:"object"},state:{const:"native_conflict",type:"string"}},required:["state","detail"],type:"object"},{properties:{detail:{properties:{evidence_digest:{$ref:"#/$defs/ManifestDigest"}},required:["evidence_digest"],type:"object"},state:{const:"semantic_review_required",type:"string"}},required:["state","detail"],type:"object"},{properties:{detail:{properties:{reason:{$ref:"#/$defs/NativeIntegrationUnavailabilityV1"}},required:["reason"],type:"object"},state:{const:"partial",type:"string"}},required:["state","detail"],type:"object"},{properties:{detail:{properties:{reason:{$ref:"#/$defs/NativeIntegrationUnavailabilityV1"}},required:["reason"],type:"object"},state:{const:"unavailable",type:"string"}},required:["state","detail"],type:"object"}]},gZ={description:"Strongly typed canonical identity: `NativeIntegrationPreviewId`.",type:"string"},gQ={additionalProperties:!1,description:"Canonical stack-snapshot proof returned by `stack_snapshot` and consumed\nverbatim by preflight.",properties:{authorized_scope_set_digest:{$ref:"#/$defs/ManifestDigest"},authorized_scope_set_id:{$ref:"#/$defs/ScopeSetId"},authorized_scope_set_revision:{$ref:"#/$defs/ScopeSetRevision"},destination:{$ref:"#/$defs/ResolvedScope"},grant_digest:{$ref:"#/$defs/ManifestDigest"},inventory_epoch:{$ref:"#/$defs/WorktreeInventoryEpoch"},inventory_snapshot_id:{$ref:"#/$defs/WorktreeInventorySnapshotId"},policy_digest:{$ref:"#/$defs/ManifestDigest"},selection:{$ref:"#/$defs/NativeIntegrationSelectionBindingV1"},source:{$ref:"#/$defs/ResolvedScope"}},required:["source","destination","authorized_scope_set_id","authorized_scope_set_revision","authorized_scope_set_digest","inventory_snapshot_id","inventory_epoch","selection","grant_digest","policy_digest"],type:"object"},gX={description:"Canonically sealed selection passed to the topology authority.\n\n`stack_snapshot` requests carry declaration content; its boundary seals\nthat declaration into this proof, and preflight accepts the proof verbatim.\nThe topology authority never discovers roots or edges.",oneOf:[{properties:{binding:{properties:{declared_revision:{$ref:"#/$defs/BranchStackRevisionV1"},destination_node_id:{$ref:"#/$defs/StackNodeId"},direction:{$ref:"#/$defs/NativeIntegrationDirectionV1"},revision_digest:{$ref:"#/$defs/ManifestDigest"},revision_id:{$ref:"#/$defs/BranchStackRevisionId"},source_node_id:{$ref:"#/$defs/StackNodeId"},stack_id:{$ref:"#/$defs/BranchStackId"}},required:["stack_id","revision_id","revision_digest","declared_revision","source_node_id","destination_node_id","direction"],type:"object"},kind:{const:"declared_stack_edge",type:"string"}},required:["kind","binding"],type:"object"},{properties:{binding:{properties:{destination_ref:{$ref:"#/$defs/RefId"},proposal_digest:{$ref:"#/$defs/ManifestDigest"},source_ref:{$ref:"#/$defs/RefId"}},required:["proposal_digest","source_ref","destination_ref"],type:"object"},kind:{const:"independent_branch",type:"string"}},required:["kind","binding"],type:"object"}]},gY={description:"The only truthful terminal outcomes after recovery.",enum:["committed","aborted_no_change","rolled_back","needs_inspection"],type:"string"},g1={description:"Strongly typed canonical identity: `NativeIntegrationTransactionId`.",type:"string"},g0={description:"Why a preflight cannot authorize apply.",enum:["partial_evidence","stale_scope","denied","native_state_unavailable","reset_required","durability_uncertain","unsupported_hooks","signing_required","destination_occupied"],type:"string"},g2={description:"A target selected by exact registered identity. Repository inventory names\none repository; cleanup names one worktree within that repository.",oneOf:[{properties:{kind:{const:"repository",type:"string"},project_id:{$ref:"#/$defs/ProjectId"},repository_id:{$ref:"#/$defs/RepositoryId"}},required:["kind","project_id","repository_id"],type:"object"},{properties:{kind:{const:"worktree",type:"string"},project_id:{$ref:"#/$defs/ProjectId"},repository_id:{$ref:"#/$defs/RepositoryId"},worktree_id:{$ref:"#/$defs/WorktreeId"}},required:["kind","project_id","repository_id","worktree_id"],type:"object"}]},g4={additionalProperties:!1,properties:{body:{format:"uint64",minimum:0,type:"integer"},full_file:{format:"uint64",minimum:0,type:"integer"}},required:["body","full_file"],type:"object"},g6={properties:{since_micros:{format:"int64",type:"integer"},until_micros:{format:"int64",type:"integer"}},required:["since_micros","until_micros"],type:"object"},g3={additionalProperties:!1,description:"Stable logical identity of one provider observation source.\n\nThe session identity is provider-native evidence. The physical file identity\nis represented separately by [`ObservationSourceGenerationV1`].",properties:{provider:{$ref:"#/$defs/ProviderId"},session_id:{$ref:"#/$defs/SessionId"},source_key:{anyOf:[{$ref:"#/$defs/SessionId"},{type:"null"}]}},required:["provider","session_id"],type:"object"},g9={properties:{analytics_mode:{$ref:"#/$defs/AnalyticsModeReadModelV1"},authorized_scope_ref:{type:"string"},comparison:{$ref:"#/$defs/PerformanceComparisonReadModelV1"},current:{type:"boolean"},horizon:{$ref:"#/$defs/ObservabilityHorizonV1"},metrics:{items:{$ref:"#/$defs/MetricValueV1"},type:"array"},observed_at_micros:{format:"int64",type:"integer"},rejected_arguments:{$ref:"#/$defs/RejectedArgumentAnalyticsV1"},watermark:{type:"string"}},required:["authorized_scope_ref","horizon","watermark","observed_at_micros","current","metrics","analytics_mode","comparison","rejected_arguments"],type:"object"},g5={additionalProperties:!1,description:"Structured occurrence provenance retained through fusion. Fusion\npreserves each exact `(source_occurrence_id, retriever_evidence_anchor)`\npair; parallel unassociated provenance vectors are forbidden.",properties:{evidence_role:{$ref:"#/$defs/EvidenceRole"},file_occurrence_id:{anyOf:[{$ref:"#/$defs/FileOccurrenceId"},{type:"null"}]},freshness:{$ref:"#/$defs/SourceFreshness"},logical_copy_cluster_id:{anyOf:[{$ref:"#/$defs/LogicalCopyClusterId"},{type:"null"}]},logical_copy_evidence_anchor:{anyOf:[{$ref:"#/$defs/RetrievalAnchorId"},{type:"null"}]},repository_id:{anyOf:[{$ref:"#/$defs/RepositoryId"},{type:"null"}]},retriever_evidence_anchor:{$ref:"#/$defs/RetrievalAnchorId"},session_or_thread_id:{anyOf:[{$ref:"#/$defs/SessionOrThreadId"},{type:"null"}]},source_namespace:{$ref:"#/$defs/SourceNamespace"},source_occurrence_id:{$ref:"#/$defs/SourceOccurrenceId"}},required:["source_occurrence_id","retriever_evidence_anchor","source_namespace","evidence_role","freshness"],type:"object"},g8={additionalProperties:!1,description:"Bounded work accounting supplied by an owning port or transaction.",properties:{bytes_consumed:{format:"uint64",minimum:0,type:"integer"},elapsed_micros:{format:"uint64",minimum:0,type:"integer"},units_consumed:{format:"uint64",minimum:0,type:"integer"}},required:["units_consumed","bytes_consumed","elapsed_micros"],type:"object"},g7={additionalProperties:!1,description:"Canonical operation evidence. An admitted failure remains represented here\nrather than being replaced by a transport exception.",properties:{budget:{$ref:"#/$defs/OperationBudgetUsage"},cancellation:{anyOf:[{$ref:"#/$defs/CancellationObservation"},{type:"null"}]},effective_deadline:{$ref:"#/$defs/Deadline"},ended_at:{$ref:"#/$defs/UtcMicros"},started_at:{$ref:"#/$defs/UtcMicros"},termination:{$ref:"#/$defs/OperationTermination"}},required:["started_at","ended_at","effective_deadline","budget","termination"],type:"object"},_e={description:"Terminal state after an operation has been admitted.",enum:["completed","cancelled","timed_out","failed","unavailable","partial","effect_unknown"],type:"string"},_t={additionalProperties:!1,description:"Bounded opaque page request. Resume authorization occurs before an adapter\ndecodes or hydrates the cursor.",properties:{cursor:{description:"Opaque resume token. The identifier type is deliberately absent from the\ngenerated schema surface, so the public wire form is its bounded string.",type:["string","null"]},page_size:{format:"uint32",minimum:0,type:"integer"}},required:["page_size"],type:"object"},_r={properties:{baseline_build:{type:["string","null"]},candidate_build:{type:["string","null"]},configuration:{type:["string","null"]},corpus:{type:["string","null"]},coverage:{$ref:"#/$defs/MetricCoverageV1"},disposition:{$ref:"#/$defs/ComparisonDispositionV1"},eligible_outcomes:{format:"uint64",minimum:0,type:["integer","null"]},environment:{type:["string","null"]},oracle:{type:["string","null"]},paired_outcomes:{format:"uint64",minimum:0,type:["integer","null"]},platform:{type:["string","null"]},regression_observed:{type:["boolean","null"]},rollback_profile:{type:["string","null"]},unavailable_reason:{type:["string","null"]},workload:{type:["string","null"]}},required:["disposition","coverage"],type:"object"},_i={description:"Whether the served code generation is known current at serve time.",enum:["fresh","possibly_stale"],type:"string"},_o={additionalProperties:!1,description:"The indexing state behind a `possibly_stale` verdict: the served\ngeneration, the scheduler's latest sealed generation, its staleness-ladder\nstate, and the lanes that answered from an older generation. `summary` is\nthe one-line rendering agents read.",properties:{latest_generation:{type:["string","null"]},parked:{anyOf:[{$ref:"#/$defs/CodeIndexConvergenceParkedV1"},{type:"null"}],description:"The park holding convergence until the operator applies its remedy.\nNo wake retries it, so repeating the request cannot change the answer."},reason:{type:["string","null"]},rebuild_in_flight:{type:["boolean","null"]},served_generation:{type:["string","null"]},stale_lanes:{items:{type:"string"},type:"array"},staleness_state:{anyOf:[{$ref:"#/$defs/CodeIndexStalenessStateV1"},{type:"null"}]},summary:{type:"string"}},required:["summary"],type:"object"},_n={enum:["complete"],type:"string"},_a={additionalProperties:!1,properties:{freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},message:{type:"string"},node_id:{type:"string"},reason_code:{type:"string"},status:{type:"string"},suggestions:{description:"Nearest served symbols by edit distance to the requested id, by id,\nsimple name, or qualified name.",items:{$ref:"#/$defs/PrimitiveSymbolLocationV1"},type:"array"}},required:["status","reason_code","node_id","message"],type:"object"},_s={enum:["full","partial"],type:"string"},_d={additionalProperties:!1,description:"Freshness verdict carried by every search and context response. `indexing`\nis present exactly when the state is `possibly_stale`.",properties:{indexing:{anyOf:[{$ref:"#/$defs/PrimitiveIndexingStateV1"},{type:"null"}]},state:{$ref:"#/$defs/PrimitiveFreshnessStateV1"}},required:["state"],type:"object"},_c={additionalProperties:!1,properties:{language:{type:["string","null"]},provider:{type:["string","null"]},reason:{type:"string"}},required:["reason"],type:"object"},_l={additionalProperties:!1,properties:{end_line:{format:"uint32",minimum:0,type:"integer"},file:{type:"string"},kind:{type:"string"},name:{type:"string"},node_id:{type:"string"},qualified_name:{type:"string"},start_line:{format:"uint32",minimum:0,type:"integer"},unavailable_fields:{items:{type:"string"},type:"array"}},required:["node_id","name","qualified_name","kind","file","start_line","end_line","unavailable_fields"],type:"object"},_p={additionalProperties:!1,properties:{detail:{type:"string"},reason_code:{type:"string"},retryable:{type:"boolean"},status:{$ref:"#/$defs/PrimitiveUnavailableStatusV1"}},required:["status","reason_code","retryable","detail"],type:"object"},_u={enum:["unavailable"],type:"string"},_m={description:"Strongly typed canonical identity: `ProjectId`.",type:"string"},_f={properties:{alias_count:{format:"uint",minimum:0,type:"integer"},artifact_count:{format:"uint",minimum:0,type:"integer"},branches:{items:{type:"string"},type:"array"},canonical_root:{type:"string"},default_branch:{description:"Repository default branch recorded at registration.",type:["string","null"]},head_branch:{description:"Branch the checkout's HEAD names now; `None` when HEAD is detached or\nno checkout of this project could be read.",type:["string","null"]},is_active:{type:["boolean","null"]},kind:{type:"string"},label:{type:"string"},last_seen_at:{format:"int64",type:"integer"},project_id:{type:"string"},project_root:{type:"string"},store_count:{format:"uint",minimum:0,type:"integer"}},required:["project_id","label","project_root","canonical_root","kind","branches","store_count","artifact_count","alias_count","last_seen_at"],type:"object"},_h={properties:{project_count:{format:"uint",minimum:0,type:"integer"},repo_count:{format:"uint",minimum:0,type:"integer"},truncated:{type:"boolean"}},required:["project_count","repo_count","truncated"],type:"object"},_y={properties:{branches:{items:{type:"string"},type:"array"},git_common_dir:{type:["string","null"]},label:{type:"string"},project_count:{format:"uint",minimum:0,type:"integer"},projects:{items:{$ref:"#/$defs/ProjectRegistryEntry"},type:"array"}},required:["label","project_count","branches","projects"],type:"object"},_g={description:"Strongly typed canonical identity: `ProjectionGenerationId`.",type:"string"},__={description:"Strongly typed canonical identity: `ProposalId`.",type:"string"},_v={enum:["reject","require_human_approval_and_independent_review"],type:"string"},_b={additionalProperties:!1,properties:{disposition:{$ref:"#/$defs/ProtectedRefDispositionV1"},selector:{$ref:"#/$defs/ProtectedRefSelectorV1"}},required:["selector","disposition"],type:"object"},_$={oneOf:[{properties:{kind:{const:"native_default_branch",type:"string"}},required:["kind"],type:"object"},{properties:{kind:{const:"exact",type:"string"},value:{$ref:"#/$defs/CanonicalGitRefNameV1"}},required:["kind","value"],type:"object"},{properties:{kind:{const:"prefix",type:"string"},value:{$ref:"#/$defs/CanonicalGitRefPrefix"}},required:["kind","value"],type:"object"}]},_S={description:"Strongly typed canonical identity: `ProvenanceId`.",type:"string"},_k={description:"Complete provider states remain distinct. Empty findings are clean only\nwhen every requested provider completed with complete supported coverage.",enum:["supported_completed_complete","unsupported","absent","indexing","stale","cancelled","timed_out","failed","partial","unavailable"],type:"string"},_w={description:"Strongly typed canonical identity: `ProviderId`.",type:"string"},_V={description:"One provider/model cohort in the Costs latency read model.\n\nThe percentile cells are ordinary canonical metrics so every value carries\nits exact unit, horizon, denominator, coverage/censoring, and projector\nprovenance. Identity provenance is kept separately because latency is\nmeasured by `OperationResourceObservedV1`, while provider/model identity\nmay be joined from an exact `ProviderUsageObservationV1` request/session.",properties:{first_progress:{$ref:"#/$defs/LatencyDistributionReadModelV1"},identity_provenance:{$ref:"#/$defs/MetricProvenanceV1"},identity_unavailable_reason:{type:["string","null"]},model:{type:["string","null"]},provider:{type:["string","null"]},queue:{$ref:"#/$defs/LatencyDistributionReadModelV1"},service:{$ref:"#/$defs/LatencyDistributionReadModelV1"},start:{$ref:"#/$defs/LatencyDistributionReadModelV1"},terminal:{$ref:"#/$defs/LatencyDistributionReadModelV1"}},required:["identity_provenance","queue","start","first_progress","service","terminal"],type:"object"},_P={properties:{canonical_root:{type:"string"},created_at:{format:"int64",type:"integer"},default_branch:{description:"Repository default branch recorded at registration.",type:["string","null"]},display_root:{type:"string"},git_common_dir:{type:["string","null"]},head_branch:{description:"Branch the checkout's HEAD names now; `None` when HEAD is detached or\nno checkout of this project could be read.",type:["string","null"]},is_active:{type:["boolean","null"]},label:{type:"string"},last_seen_at:{format:"int64",type:"integer"},project_id:{type:"string"},project_root:{type:"string"}},required:["project_id","label","project_root","display_root","canonical_root","created_at","last_seen_at"],type:"object"},_R={enum:["owner_receipt","locally_measured","estimated","unknown"],type:"string"},_q={description:"Strongly typed canonical identity: `QueryCollectionId`.",type:"string"},_I={description:"Which endpoint of each counted edge the rank report ranks.",enum:["incoming","outgoing"],type:"string"},_x={description:"Relationship the rank report counts.",enum:["implements","extends","calls","uses","contains","annotates","type_of","returns","receives"],type:"string"},_j={additionalProperties:!1,description:"One recorded ranking decision. Explanations are rendered from this\nprovenance, never reconstructed from a final scalar score.",properties:{detail:{type:"string"},evidence_anchor:{anyOf:[{$ref:"#/$defs/RetrievalAnchorId"},{type:"null"}]},kind:{$ref:"#/$defs/RankingDecisionKind"},policy_anchor:{anyOf:[{$ref:"#/$defs/RetrievalAnchorId"},{type:"null"}]},retriever:{anyOf:[{$ref:"#/$defs/RetrieverKind"},{type:"null"}]}},required:["kind","detail"],type:"object"},_C={description:"The decision kinds the pipeline must record.",enum:["exact_tier_admission","same_source_duplicate_collapse","logical_copy_representative_selection","contradiction_preservation","diversity_cap","comparator_provenance","fallback"],type:"string"},_T={description:"Strongly typed canonical identity: `RefId`.",type:"string"},_O={additionalProperties:!1,description:"Exact registered root locator retained with an authorized scope.\n\n`canonical_root` is routing evidence for the already-resolved\n[`ResolvedScope`]. It cannot replace or manufacture that scope identity.",properties:{canonical_root:{type:"string"},profile:{$ref:"#/$defs/SharedProfileStoreLocatorV1"},project_id:{$ref:"#/$defs/ProjectId"}},required:["project_id","profile","canonical_root"],type:"object"},_E={description:"Frequency and rate projection for dispatcher rejected-argument observations.\n\nCounts may be known while `rejection_rate` stays absent: Plan 26 forbids\nfabricating a rate when the eligible-attempt denominator is unknown.",properties:{coverage:{$ref:"#/$defs/MetricCoverageV1"},eligible_attempts:{format:"uint64",minimum:0,type:["integer","null"]},groups:{items:{$ref:"#/$defs/RejectedArgumentGroupV1"},type:"array"},projector_revision:{type:"string"},redacted_name_count:{format:"uint64",minimum:0,type:"integer"},rejected_total:{format:"uint64",minimum:0,type:["integer","null"]},rejection_rate:{format:"double",type:["number","null"]},unavailable_reason:{type:["string","null"]},watermark:{type:"string"}},required:["coverage","projector_revision","watermark","redacted_name_count","groups"],type:"object"},_A={description:"Closed error class for a rejected surface argument.",enum:["missing","invalid_shape","out_of_bounds","unsupported","unauthorized","stale","unknown"],type:"string"},_W={description:"One surface \xd7 operation \xd7 argument \xd7 error-class cell in the rejected-argument view.",properties:{argument:{$ref:"#/$defs/RejectedArgumentNameV1"},count:{format:"uint64",minimum:0,type:"integer"},error_class:{$ref:"#/$defs/RejectedArgumentErrorClassV1"},operation:{type:"string"},rate:{description:"Eligible-attempt rate for this cell. Absent when the attempt\ndenominator or coverage is insufficient.",format:"double",type:["number","null"]},surface:{$ref:"#/$defs/RejectedArgumentSurfaceV1"}},required:["surface","operation","argument","error_class","count"],type:"object"},_M={description:"Normalized rejected-argument name. Raw flags, values, and tokens never\nenter this vocabulary.",enum:["request_body","pagination","request_handle","operation","lifecycle","unknown"],type:"string"},_N={description:"Transport that rejected a surface argument. Unknown preserves missing\nattribution instead of inventing cli/mcp/http.",enum:["cli","mcp","http","unknown"],type:"string"},_z={description:"Strongly typed canonical identity: `RepositoryId`.",type:"string"},_D={oneOf:[{properties:{kind:{const:"all_authorized",type:"string"}},required:["kind"],type:"object"},{properties:{kind:{const:"allowlist",type:"string"},repositories:{items:{$ref:"#/$defs/RepositoryId"},type:"array",uniqueItems:!0}},required:["kind","repositories"],type:"object"}]},_F={enum:["successful_terminal"],type:"string"},_L={additionalProperties:!1,properties:{capability_id:{$ref:"#/$defs/CapabilityId"},expectation:{$ref:"#/$defs/RequiredCheckExpectationV1"},maximum_age_seconds:{format:"uint32",minimum:1,type:"integer"}},required:["capability_id","expectation","maximum_age_seconds"],type:"object"},_U={additionalProperties:!1,description:"The resolved configuration scope is one exact project/repository/worktree root.\n\nPaths, CWDs, labels, and mutable branch spellings are deliberately absent.",properties:{project_id:{$ref:"#/$defs/ProjectId"},reference:{anyOf:[{$ref:"#/$defs/RefId"},{type:"null"}]},repository_id:{$ref:"#/$defs/RepositoryId"},scope_digest:{$ref:"#/$defs/ManifestDigest"},worktree_id:{$ref:"#/$defs/WorktreeId"}},required:["project_id","repository_id","worktree_id","scope_digest"],type:"object"},_H={description:"Bounded output projection chosen by a concrete use case.",enum:["summary","evidence","references_only"],type:"string"},_G={additionalProperties:!1,properties:{code:{type:"string"},kind:{type:["string","null"]},maximum:{format:"uint",minimum:0,type:["integer","null"]},message:{type:"string"},observed:{format:"uint",minimum:0,type:["integer","null"]},reason:{type:["string","null"]},retryable:{type:["boolean","null"]}},required:["code","message"],type:"object"},_B={enum:["aborted","budget_exhausted","busy","cancelled","complete","complete_zero","cursor_manifest_limit_exceeded","deadline_exceeded","deleted","denied","error","failed","joined","locked","not_found","ok","partial","recorded","redacted","running","stale","started","unavailable","unsupported_filter","wrong_scope"],type:"string"},_K={anyOf:[{format:"uint64",minimum:0,type:"integer"},{type:"string"}],description:"The temporal filter intentionally retains the established integer-or-text\nwire form (Unix timestamps, RFC3339, and relative expressions)."},_J={description:"Strongly typed canonical identity: `RetrievalAnchorId`.",type:"string"},_Z={description:"Stable semantic ordering; adapters may not replace it with transport order.",enum:["relevance","source_position","temporal_descending","stable_identity"],type:"string"},_Q={additionalProperties:!1,properties:{order:{$ref:"#/$defs/RetrievalOrder"},page:{$ref:"#/$defs/PageRequest"},projection:{$ref:"#/$defs/ResultProjection"},temporal:{$ref:"#/$defs/TemporalModeV1"}},required:["temporal","page","projection","order"],type:"object"},_X={description:"Source-role evidence used at lane admission and fusion.\n\nA production definition outranks a test-file hit for the same symbol even\nwhen the test has a higher measured score. Non-definition production hits\ncompete with test hits on measured scores so comments and references do\nnot crowd out relevant tests.",oneOf:[{const:"production_definition",description:"Non-test path whose name or signature matched the query.",type:"string"},{const:"production_other",description:"Non-test path that is not a name or signature definition match.",type:"string"},{const:"test_reference",description:"Hit under a test path.",type:"string"}]},_Y={additionalProperties:!1,properties:{backlog:{format:"uint",minimum:0,type:"integer"},blocker:{type:["string","null"]},last_progress_at_unix_micros:{format:"int64",type:["integer","null"]},retry_class:{type:["string","null"]}},required:["backlog"],type:"object"},_1={description:"Runtime-backed retrieval lanes. Each lane is independently testable,\ndisableable, budgeted, and attributable; one lane is never an alias over\nanother.",enum:["exact_literal","lexical","graph","temporal","task_session","diagnostic"],type:"string"},_0={oneOf:[{properties:{kind:{const:"none",type:"string"}},required:["kind"],type:"object"},{properties:{count:{format:"uint16",maximum:65535,minimum:1,type:"integer"},kind:{const:"independent_review_count",type:"string"}},required:["kind","count"],type:"object"},{properties:{kind:{const:"code_owner_and_independent_review",type:"string"}},required:["kind"],type:"object"}]},_2={enum:["no_review","independent_review","standard_pull_requests","git_hub_stacked_pull_requests"],type:"string"},_4={additionalProperties:!1,properties:{allowed:{items:{$ref:"#/$defs/ReviewTopologyKindV1"},type:"array",uniqueItems:!0},github_stacked_prs:{$ref:"#/$defs/GitHubStackedPullRequestPolicyV1"}},required:["allowed","github_stacked_prs"],type:"object"},_6={additionalProperties:!1,description:"Immutable collection and stack revisions for one exact resolved root.",properties:{collection_revision:{$ref:"#/$defs/ManifestDigest"},generation_digest:{$ref:"#/$defs/ManifestDigest"},scope_digest:{$ref:"#/$defs/ManifestDigest"},stack_revision:{$ref:"#/$defs/ManifestDigest"}},required:["scope_digest","collection_revision","stack_revision","generation_digest"],type:"object"},_3={additionalProperties:!1,description:"One typed outcome pinned to the digest of an exact resolved root.",properties:{outcome:{$ref:"#/$defs/ScopeOutcome_for_Nullable_RootGenerationV1"},scope_digest:{$ref:"#/$defs/ManifestDigest"}},required:["scope_digest","outcome"],type:"object"},_9={additionalProperties:!1,description:"One typed outcome pinned to the digest of an exact resolved root.",properties:{outcome:{$ref:"#/$defs/ScopeOutcome_for_Nullable_string"},scope_digest:{$ref:"#/$defs/ManifestDigest"}},required:["scope_digest","outcome"],type:"object"},_5={enum:["allow","deny"],type:"string"},_8={description:"Strongly typed canonical identity: `RunId`.",type:"string"},_7={additionalProperties:!1,properties:{degraded_row:{type:["string","null"]},progress:{anyOf:[{$ref:"#/$defs/SchemaConvergenceProgressV1"},{type:"null"}]},stage:{$ref:"#/$defs/SchemaConvergenceStageV1"},started_at_micros:{format:"int64",type:"integer"},state:{$ref:"#/$defs/SchemaConvergenceStateV1"},store:{type:"string"}},required:["store","stage","state","started_at_micros"],type:"object"},ve={oneOf:[{additionalProperties:!1,properties:{done:{format:"uint64",minimum:0,type:"integer"},remaining:{format:"uint64",minimum:0,type:"integer"},unit:{const:"rows",type:"string"}},required:["unit","done","remaining"],type:"object"},{additionalProperties:!1,properties:{done:{format:"uint64",minimum:0,type:"integer"},remaining:{format:"uint64",minimum:0,type:"integer"},unit:{const:"pages",type:"string"}},required:["unit","done","remaining"],type:"object"}]},vt={enum:["registered_schema"],type:"string"},vr={enum:["pending_schema_migration","released_shape_convergence_in_progress","degraded","completed"],type:"string"},vi={additionalProperties:!1,description:"Restrictive policy input. An allow never grants capabilities absent from\nthe independently authorized capability set passed to the resolver.",properties:{authority:{$ref:"#/$defs/AuthorityRef"},capabilities:{items:{$ref:"#/$defs/CapabilityId"},type:"array",uniqueItems:!0},effect:{$ref:"#/$defs/RuleEffect"},expires_at:{anyOf:[{$ref:"#/$defs/UtcMicros"},{type:"null"}]},rule_id:{$ref:"#/$defs/AccessRuleId"},subject:{$ref:"#/$defs/ScopeAccessSubjectV1"}},required:["rule_id","subject","authority","capabilities","effect"],type:"object"},vo={additionalProperties:!1,description:"Typed rule selectors. Unset dimensions match all values at that dimension,\nbut at least one dimension must be constrained. Free-form paths, labels,\ncollection names, and branch names are deliberately absent.",properties:{actor:{anyOf:[{$ref:"#/$defs/ActorId"},{type:"null"}]},operation:{anyOf:[{$ref:"#/$defs/ScopeControlOperationV1"},{type:"null"}]},source_kind:{anyOf:[{$ref:"#/$defs/SourceKindV1"},{type:"null"}]}},type:"object"},vn={enum:["read","source_bind","source_rebind","source_unbind","access_rule_upsert","access_rule_remove","replace_topology_policy","rollback"],type:"string"},va={description:"Truthful outcome for one authorized root or an aggregate over roots.\n\n`Denied` and `Unavailable` carry no value and therefore cannot be confused\nwith a successful empty result.",oneOf:[{properties:{outcome:{const:"exact",type:"string"},value:{anyOf:[{$ref:"#/$defs/RootGenerationV1"},{type:"null"}]}},required:["outcome","value"],type:"object"},{properties:{outcome:{const:"partial",type:"string"},value:{properties:{reason:{$ref:"#/$defs/ScopePartialReasonV1"},value:{anyOf:[{$ref:"#/$defs/RootGenerationV1"},{type:"null"}]}},required:["reason"],type:"object"}},required:["outcome","value"],type:"object"},{properties:{outcome:{const:"denied",type:"string"}},required:["outcome"],type:"object"},{properties:{outcome:{const:"unavailable",type:"string"},value:{properties:{reason:{$ref:"#/$defs/ScopeUnavailableReasonV1"}},required:["reason"],type:"object"}},required:["outcome","value"],type:"object"}]},vs={description:"Truthful outcome for one authorized root or an aggregate over roots.\n\n`Denied` and `Unavailable` carry no value and therefore cannot be confused\nwith a successful empty result.",oneOf:[{properties:{outcome:{const:"exact",type:"string"},value:{type:["string","null"]}},required:["outcome","value"],type:"object"},{properties:{outcome:{const:"partial",type:"string"},value:{properties:{reason:{$ref:"#/$defs/ScopePartialReasonV1"},value:{type:["string","null"]}},required:["reason"],type:"object"}},required:["outcome","value"],type:"object"},{properties:{outcome:{const:"denied",type:"string"}},required:["outcome"],type:"object"},{properties:{outcome:{const:"unavailable",type:"string"},value:{properties:{reason:{$ref:"#/$defs/ScopeUnavailableReasonV1"}},required:["reason"],type:"object"}},required:["outcome","value"],type:"object"}]},vd={description:"Typed explanation for a root that returned usable but incomplete data.",enum:["incomplete","stale","budget_exceeded","root_denied","root_unavailable"],type:"string"},vc={description:"Stable identity of one authorized scope-set record.",type:"string"},vl={description:"Monotonic optimistic-concurrency revision of one scope set.",format:"uint64",minimum:1,type:"integer"},vp={additionalProperties:!1,description:"A source-to-authority binding. It stores only the source kind, a redacted\nlocator digest, and the pre-resolved authority reference.",properties:{authority:{$ref:"#/$defs/AuthorityRef"},binding_id:{$ref:"#/$defs/SourceBindingId"},source_kind:{$ref:"#/$defs/SourceKindV1"},source_locator_digest:{$ref:"#/$defs/LocatorDigest"}},required:["binding_id","source_kind","source_locator_digest","authority"],type:"object"},vu={description:"Typed explanation for a root that could not return usable data.",enum:["authority_unavailable","root_missing","store_unavailable"],type:"string"},vm={description:"Strongly typed canonical identity: `ScoreDomainId`.",type:"string"},vf={additionalProperties:!1,description:"Reference-only filesystem locator. The raw path is sealed outside this\ncontract; only the privacy-bound locator digest and sealed-value digest are\nrepresentable here.",properties:{locator_digest:{$ref:"#/$defs/LocatorDigest"},sealed_value_digest:{$ref:"#/$defs/ManifestDigest"}},required:["locator_digest","sealed_value_digest"],type:"object"},vh={additionalProperties:!1,properties:{knowledge:{$ref:"#/$defs/ClosedUtcIntervalV1"},valid:{$ref:"#/$defs/ValidCoverageIntervalV1"}},required:["knowledge","valid"],type:"object"},vy={oneOf:[{properties:{kind:{const:"caught_up",type:"string"}},required:["kind"],type:"object"},{properties:{kind:{const:"projection_behind_source",type:"string"},lag:{format:"uint64",minimum:0,type:"integer"}},required:["kind","lag"],type:"object"},{properties:{kind:{const:"source_behind_target",type:"string"},lag:{format:"uint64",minimum:0,type:"integer"}},required:["kind","lag"],type:"object"},{properties:{kind:{const:"projection_and_source_behind",type:"string"},projection_lag:{format:"uint64",minimum:0,type:"integer"},source_lag:{format:"uint64",minimum:0,type:"integer"}},required:["kind","projection_lag","source_lag"],type:"object"},{properties:{kind:{const:"locked",type:"string"}},required:["kind"],type:"object"},{properties:{kind:{const:"redacted",type:"string"}},required:["kind"],type:"object"},{properties:{kind:{const:"retention_withheld",type:"string"}},required:["kind"],type:"object"},{properties:{kind:{const:"unavailable",type:"string"}},required:["kind"],type:"object"}]},vg={additionalProperties:!1,properties:{mode:{$ref:"#/$defs/TemporalModeV1"}},required:["mode"],type:"object"},v_={enum:["fresh","stale","partial","locked","redacted","retention_withheld","unavailable"],type:"string"},vv={description:"Strongly typed canonical identity: `SessionId`.",type:"string"},vb={description:"Strongly typed canonical identity: `SessionOrThreadId`.",type:"string"},v$={additionalProperties:!1,properties:{committed_through:{format:"uint64",minimum:0,type:"integer"},observed_through:{format:"uint64",minimum:0,type:"integer"}},required:["observed_through","committed_through"],type:"object"},vS={additionalProperties:!1,properties:{committed_batches:{format:"uint64",minimum:0,type:"integer"},committed_records:{format:"uint64",minimum:0,type:"integer"},coverage:{$ref:"#/$defs/TemporalCoverageV1"},frontier:{$ref:"#/$defs/SessionRefreshFrontierResultV1"},operation_id:{type:"string"},session_id:{type:"string"},source_coverage:{items:{$ref:"#/$defs/SessionSourceCoverageV1"},type:"array"},updated_at:{format:"int64",type:"integer"}},required:["operation_id","session_id","frontier","coverage","committed_batches","committed_records","updated_at"],type:"object"},vk={additionalProperties:!1,properties:{coverage:{$ref:"#/$defs/TemporalCoverageV1"},failure_code:{type:["string","null"]},frontier:{$ref:"#/$defs/SessionRefreshFrontierResultV1"},operation_id:{type:"string"},session_id:{type:"string"},source_coverage:{items:{$ref:"#/$defs/SessionSourceCoverageV1"},type:"array"},state:{$ref:"#/$defs/SessionRefreshTerminalStateResultV1"},terminal_at:{format:"int64",type:"integer"}},required:["operation_id","session_id","frontier","coverage","state","terminal_at"],type:"object"},vw={enum:["complete","failed","cancelled"],type:"string"},vV={description:"Structural budget boundary that rejected a session retrieval request.\nThese causes are non-retryable request corrections; concurrent permit or\nqueue pressure remains a separate capacity-saturation failure.",enum:["request_result_limit","request_hydration_limit","request_context_bytes","request_candidate_bytes","request_record_bytes","request_hydration_bytes","estimator_version_mismatch","execution_work_exhausted","candidate_read_exhausted","record_read_exhausted","kernel_result_limit","participant_manifest_participants","participant_manifest_canonical_bytes","cursor_manifest_limit","hydration_bytes","context_bytes","context_tokens"],type:"string"},vP={additionalProperties:!1,properties:{committed_frontier:{format:"uint64",minimum:0,type:"integer"},covered_intervals:{items:{$ref:"#/$defs/SessionCoverageIntervalV1"},type:"array"},missing_intervals:{items:{$ref:"#/$defs/SessionCoverageIntervalV1"},type:"array"},observed_frontier:{format:"uint64",minimum:0,type:"integer"},reason:{$ref:"#/$defs/SessionCoverageReasonV1"},request:{$ref:"#/$defs/SessionCoverageRequestV1"},source_id:{type:"string"},state:{$ref:"#/$defs/SessionCoverageStateV1"},target_watermark:{format:"uint64",minimum:0,type:"integer"}},required:["source_id","observed_frontier","committed_frontier","target_watermark","request","covered_intervals","missing_intervals","state","reason"],type:"object"},vR={description:"Typed configuration key. Keys are lowercase, dotted product identifiers;\nuntyped host/adapter keys are not representable.",type:"string"},vq={additionalProperties:!1,description:"Logical and verified physical identity of the shared Profile shard.\n\nBrain and profile IDs select the shard; the verified store locator binds its\nphysical store. Lease incarnations and authority epochs remain runtime fences.",properties:{brain_id:{$ref:"#/$defs/BrainId"},profile_id:{$ref:"#/$defs/UserProfileId"},store_id:{type:"string"}},required:["brain_id","profile_id","store_id"],type:"object"},vI={additionalProperties:!1,properties:{complete:{type:"boolean"},family_digest:{$ref:"#/$defs/ManifestDigest"},match_class:{$ref:"#/$defs/SimilarMatchClassV1"},member_count:{format:"uint",minimum:0,type:"integer"},members:{items:{$ref:"#/$defs/SimilarOccurrenceV1"},type:"array"},next_cursor:{type:["string","null"]},normalization_revision:{format:"uint16",maximum:65535,minimum:0,type:"integer"},representative_payload_digest:{$ref:"#/$defs/ManifestDigest"}},required:["match_class","normalization_revision","family_digest","representative_payload_digest","member_count","members","complete"],type:"object"},vx={enum:["conservative_exact","rename_normalized_exact"],type:"string"},vj={additionalProperties:!1,properties:{body_span:{$ref:"#/$defs/SourceSpan"},path:{type:"string"},project_id:{$ref:"#/$defs/ProjectId"},repository_id:{$ref:"#/$defs/RepositoryId"},snapshot_digest:{$ref:"#/$defs/ManifestDigest"},source_generation:{$ref:"#/$defs/CodeGenerationId"},symbol_occurrence_id:{$ref:"#/$defs/SymbolOccurrenceId"},worktree_id:{anyOf:[{$ref:"#/$defs/WorktreeId"},{type:"null"}]}},required:["project_id","repository_id","source_generation","snapshot_digest","symbol_occurrence_id","path","body_span"],type:"object"},vC={properties:{evidence:{default:[],items:{type:"string"},type:"array"},improvement:{type:"boolean"},priority:{type:"string"},reason:{type:"string"},recommendation:{type:"string"},skill_id:{type:"string"}},required:["skill_id","improvement","recommendation","reason","priority"],type:"object"},vT={enum:["cursor","codex","claude","agents","opencode","kimi","kiro","hermes"],type:"string"},vO={properties:{evidence:{default:[],items:{type:"string"},type:"array"},reason:{type:"string"},recommendation:{type:"string"},skill_id:{type:"string"},stale:{type:"boolean"}},required:["skill_id","stale","recommendation","reason"],type:"object"},vE={description:"One skill's durable usage counters. The ledger stores one per skill; a\nsummary is the same record merged with the skill's current metadata.",properties:{activated_at:{description:"When the skill last transitioned into the active state; mirrors the\nmanaged skill metadata so outcome scoring works from summaries alone.",format:"int64",type:["integer","null"]},category:{type:["string","null"]},created_by:{type:["string","null"]},first_seen_at:{format:"int64",type:"integer"},imported_analytics_events:{description:"Import keys that already counted toward this skill. They are not a\nstore-wide set: each key names this skill, so another skill must not\nshare the write.",items:{type:"string"},type:"array",uniqueItems:!0},last_activity_at:{format:"int64",type:"integer"},last_patched_at:{format:"int64",type:["integer","null"]},last_used_at:{format:"int64",type:["integer","null"]},last_viewed_at:{format:"int64",type:["integer","null"]},patch_count:{format:"uint64",minimum:0,type:"integer"},pinned:{type:"boolean"},provenance_source:{anyOf:[{$ref:"#/$defs/ManagedSkillSource"},{type:"null"}]},schema_version:{format:"uint32",minimum:0,type:"integer"},skill_id:{type:"string"},state:{anyOf:[{$ref:"#/$defs/ManagedSkillState"},{type:"null"}]},targets:{default:[],items:{type:"string"},type:"array"},title:{type:["string","null"]},use_count:{format:"uint64",minimum:0,type:"integer"},use_count_at_activation:{format:"uint64",minimum:0,type:["integer","null"]},view_count:{format:"uint64",minimum:0,type:"integer"},view_count_at_activation:{description:"View/use totals captured at activation time so activity since activation\nis an exact delta rather than a heuristic.",format:"uint64",minimum:0,type:["integer","null"]}},required:["schema_version","skill_id","pinned","view_count","use_count","patch_count","first_seen_at","last_activity_at"],type:"object"},vA={description:"Strongly typed canonical identity: `SourceBindingId`.",type:"string"},vW={additionalProperties:!1,description:"Source freshness is source- and retriever-specific: there is no global\nage-decay multiplier. Missing, stale, incompatible, and current are\ndistinct states.",properties:{compatibility:{$ref:"#/$defs/FreshnessCompatibilityV1"},generation_lag:{format:"uint64",minimum:0,type:["integer","null"]},observed_at:{$ref:"#/$defs/UtcMicros"},policy_revision:{$ref:"#/$defs/ComponentRevision"},projection_watermark:{format:"uint64",minimum:0,type:["integer","null"]},source_generation:{format:"uint64",minimum:0,type:["integer","null"]},source_instance:{$ref:"#/$defs/SourceInstanceKey"},source_namespace:{$ref:"#/$defs/SourceNamespace"},source_watermark:{format:"uint64",minimum:0,type:["integer","null"]}},required:["source_namespace","source_instance","observed_at","compatibility","policy_revision"],type:"object"},vM={description:"Strongly typed canonical identity: `SourceInstanceKey`.",type:"string"},vN={enum:["claude","codex","cursor","git_hub","hermes","kiro"],type:"string"},vz={description:"Strongly typed canonical identity: `SourceNamespace`.",type:"string"},vD={description:"Strongly typed canonical identity: `SourceOccurrenceId`.",type:"string"},vF={additionalProperties:!1,description:"Byte range inside one sanitized source file. Mutable line numbers are\nnever part of identity.",properties:{end_byte:{format:"uint64",minimum:0,type:"integer"},start_byte:{format:"uint64",minimum:0,type:"integer"}},required:["start_byte","end_byte"],type:"object"},vL={description:"Strongly typed canonical identity: `SourceStoreId`.",type:"string"},vU={description:"Strongly typed canonical identity: `StackDeliveryWatermarkId`.",type:"string"},vH={description:"Strongly typed canonical identity: `StackNodeId`.",type:"string"},vG={description:"Strongly typed canonical identity: `StackSignalId`.",type:"string"},vB={additionalProperties:!1,description:"Exact base/head symbol comparison was unavailable; the git evidence beside\nit is still the answer.",properties:{reason:{type:"string"},retryable:{type:"boolean"},status:{$ref:"#/$defs/GitReadUnavailableV1"}},required:["status","reason","retryable"],type:"object"},vK={additionalProperties:!1,description:"Optional narrowing inside the immutable project/repository/worktree scope\ncarried by [`RequestContext`]. A path prefix never establishes identity or\nauthorization.",properties:{path_prefix:{type:["string","null"]}},type:"object"},vJ={description:"Strongly typed canonical identity: `SymbolOccurrenceId`.",type:"string"},vZ={additionalProperties:!1,properties:{end_line:{format:"uint32",minimum:0,type:"integer"},file:{type:"string"},is_async:{type:"boolean"},kind:{type:"string"},line:{description:"One-based user-facing line.",format:"uint32",minimum:0,type:"integer"},name:{type:"string"},node_id:{type:"string"},qualified_name:{type:"string"},score:{format:"double",type:["number","null"]},signature:{type:["string","null"]}},required:["node_id","name","qualified_name","kind","file","line","end_line","is_async"],type:"object"},vQ={additionalProperties:!1,properties:{depth:{format:"uint32",minimum:0,type:["integer","null"]},dispatch_from:{type:["string","null"]},dispatch_via_trait:{type:"boolean"},edge_kind:{type:"string"},symbol:{$ref:"#/$defs/SymbolPrimitiveRecord"}},required:["symbol","edge_kind","dispatch_via_trait"],type:"object"},vX={additionalProperties:!1,properties:{anchor_id:{$ref:"#/$defs/RetrievalAnchorId"},evidence_digest:{$ref:"#/$defs/ManifestDigest"},link_id:{type:"string"},observed_at:{$ref:"#/$defs/UtcMicros"},revision:{format:"uint64",minimum:0,type:"integer"},task_id:{$ref:"#/$defs/TaskId"}},required:["link_id","revision","task_id","anchor_id","evidence_digest","observed_at"],type:"object"},vY={additionalProperties:!1,properties:{definition_id:{$ref:"#/$defs/WorkflowDefinitionId"},definition_version:{format:"uint64",minimum:1,type:"integer"},from_actor_id:{$ref:"#/$defs/ActorId"},project_id:{$ref:"#/$defs/ProjectId"},repository_id:{$ref:"#/$defs/RepositoryId"},run_id:{$ref:"#/$defs/RunId"},step_id:{$ref:"#/$defs/WorkflowStepId"},task_id:{$ref:"#/$defs/TaskId"},thread_id:{$ref:"#/$defs/ThreadId"},to_actor_id:{$ref:"#/$defs/ActorId"},worktree_id:{$ref:"#/$defs/WorktreeId"}},required:["project_id","repository_id","worktree_id","definition_id","definition_version","step_id","task_id","thread_id","run_id","from_actor_id","to_actor_id"],type:"object"},v1={description:"Strongly typed canonical identity: `TaskId`.",type:"string"},v0={additionalProperties:!1,properties:{hidden:{format:"uint64",minimum:0,type:"integer"},redacted:{format:"uint64",minimum:0,type:"integer"},unknown:{format:"uint64",minimum:0,type:"integer"},visible:{format:"uint64",minimum:0,type:"integer"}},required:["visible","hidden","unknown","redacted"],type:"object"},v2={additionalProperties:!1,properties:{anchor:{type:"string"},summary:{type:"string"}},required:["anchor","summary"],type:"object"},v4={oneOf:[{properties:{state:{const:"fresh",type:"string"}},required:["state"],type:"object"},{properties:{generation_lag:{format:"uint64",minimum:0,type:"integer"},state:{const:"stored",type:"string"}},required:["state","generation_lag"],type:"object"},{properties:{generation_lag:{format:"uint64",minimum:0,type:"integer"},state:{const:"partial",type:"string"}},required:["state","generation_lag"],type:"object"}]},v6={description:"Requested temporal interpretation.",oneOf:[{additionalProperties:!1,properties:{kind:{const:"current",type:"string"}},required:["kind"],type:"object"},{additionalProperties:!1,properties:{cutoff:{$ref:"#/$defs/UtcMicros"},kind:{const:"as_of",type:"string"}},required:["kind","cutoff"],type:"object"},{additionalProperties:!1,properties:{kind:{const:"evolution",type:"string"}},required:["kind"],type:"object"},{additionalProperties:!1,properties:{kind:{const:"forensic",type:"string"}},required:["kind"],type:"object"}]},v3={additionalProperties:!1,properties:{anchor:{type:"string"},rank:{format:"uint32",minimum:0,type:"integer"},reason:{$ref:"#/$defs/HydrationStateResultV1"}},required:["rank","anchor","reason"],type:"object"},v9={additionalProperties:!1,properties:{generation:{format:"uint64",minimum:0,type:"integer"},index:{format:"uint64",minimum:0,type:"integer"},projection:{format:"uint64",minimum:0,type:"integer"},source:{format:"uint64",minimum:0,type:"integer"},summary:{format:"uint64",minimum:0,type:"integer"}},required:["generation","source","projection","index","summary"],type:"object"},v5={description:"Strongly typed canonical identity: `ThreadId`.",type:"string"},v8={additionalProperties:!1,description:"What a token budget did to an answer. `est_tokens` is the kept rows.\n`over_ceiling` means a single row was larger than its section quota and\nwas kept anyway.",properties:{budget_tokens:{format:"uint32",minimum:0,type:"integer"},est_tokens:{format:"uint32",minimum:0,type:"integer"},over_ceiling:{type:"boolean"},sections:{items:{$ref:"#/$defs/TokenBudgetSectionV1"},type:"array"}},required:["budget_tokens","est_tokens","over_ceiling","sections"],type:"object"},v7={additionalProperties:!1,description:"One section a token budget kept or cut.",properties:{section:{type:"string"},shown:{format:"uint32",minimum:0,type:"integer"},total:{format:"uint32",minimum:0,type:"integer"}},required:["section","total","shown"],type:"object"},be={additionalProperties:!1,properties:{maximum_active_per_repository:{format:"uint16",maximum:65535,minimum:1,type:"integer"},maximum_global_active:{format:"uint16",maximum:65535,minimum:1,type:"integer"},maximum_parallel_per_task:{format:"uint16",maximum:65535,minimum:1,type:"integer"},maximum_stack_depth:{format:"uint16",maximum:65535,minimum:1,type:"integer"}},required:["maximum_active_per_repository","maximum_parallel_per_task","maximum_global_active","maximum_stack_depth"],type:"object"},bt={enum:["reject","require_explicit_human_approval","require_human_approval_and_independent_review"],type:"string"},br={additionalProperties:!1,properties:{cleanliness:{$ref:"#/$defs/WorktreeCleanlinessRequirementV1"},maximum_preflight_age_seconds:{format:"uint32",minimum:1,type:"integer"},require_fresh_preflight:{type:"boolean"},review:{$ref:"#/$defs/ReviewRequirementV1"},tests:{items:{$ref:"#/$defs/RequiredCheckV1"},type:"array"}},required:["cleanliness","tests","review","require_fresh_preflight","maximum_preflight_age_seconds"],type:"object"},bi={enum:["critical_only","lifecycle","verbose"],type:"string"},bo={description:"Risky construct the pattern scan looks for.",enum:["unwrap","expect","panic","todo","unimplemented","unsafe_block"],type:"string"},bn={description:"Stable, canonical catalog identity for `UseCaseId`.",type:"string"},ba={description:"Strongly typed canonical identity: `UserProfileId`.",type:"string"},bs={description:"UTC timestamp represented as microseconds from the Unix epoch.",format:"int64",type:"integer"},bd={oneOf:[{properties:{interval:{$ref:"#/$defs/ClosedUtcIntervalV1"},kind:{const:"known",type:"string"}},required:["kind","interval"],type:"object"},{properties:{kind:{const:"unknown",type:"string"}},required:["kind"],type:"object"}]},bc={additionalProperties:!1,description:"One exact verified graph snapshot identity.",properties:{event_sequence:{format:"uint64",minimum:0,type:"integer"},graph_version:{format:"uint64",minimum:0,type:"integer"},recovered_graph_digest:{$ref:"#/$defs/ManifestDigest"},source_watermark:{additionalProperties:{format:"uint64",minimum:0,type:"integer"},type:"object"}},required:["graph_version","event_sequence","source_watermark","recovered_graph_digest"],type:"object"},bl={additionalProperties:!1,properties:{criterion_id:{type:"string"},description:{type:"string"},evidence_required:{type:"boolean"}},required:["criterion_id","description","evidence_required"],type:"object"},bp={enum:["never","on_request"],type:"string"},bu={description:"Strongly typed canonical identity: `WorkArtifactId`.",type:"string"},bm={additionalProperties:!1,properties:{artifact_id:{$ref:"#/$defs/WorkArtifactId"},byte_length:{format:"uint64",minimum:0,type:"integer"},digest:{$ref:"#/$defs/ManifestDigest"}},required:["artifact_id","digest","byte_length"],type:"object"},bf={additionalProperties:!1,description:"Sealed terminal evidence for one provider attempt. The digest of this\nrecord is the evidence digest carried by [`WorkTerminalEvidenceV1`] and by\nthe `RuntimeEvidenceRef` attached to the Work projection, so the receipt\nin Work always names an inspectable record.",properties:{actual_route:{anyOf:[{$ref:"#/$defs/WorkProviderRouteV1"},{type:"null"}]},identity:{$ref:"#/$defs/WorkAttemptIdentityV1"},observed_at:{$ref:"#/$defs/UtcMicros"},outcome:{$ref:"#/$defs/WorkAttemptProviderOutcomeV1"},provider_fallback:{anyOf:[{$ref:"#/$defs/WorkProviderFallbackRecordV1"},{type:"null"}],description:"Present only when the pinned preferred backend was disqualified before\nstartup. `None` means the attempt ran on its first-choice backend."},provider_session:{anyOf:[{$ref:"#/$defs/ObservationSourceIdentityV1"},{type:"null"}],description:"Native provider-qualified session/thread identity, when the provider\nreported one. Admission cannot supply this value and no fallback is\nfabricated."},requested_route:{$ref:"#/$defs/WorkProviderRouteV1"},stderr:{anyOf:[{$ref:"#/$defs/WorkAttemptStreamSummaryV1"},{type:"null"}]},stdout:{anyOf:[{$ref:"#/$defs/WorkAttemptStreamSummaryV1"},{type:"null"}]}},required:["identity","requested_route","outcome","observed_at"],type:"object"},bh={additionalProperties:!1,properties:{attempt_id:{$ref:"#/$defs/AttemptId"},run_id:{$ref:"#/$defs/RunId"},task_id:{$ref:"#/$defs/TaskId"}},required:["task_id","run_id","attempt_id"],type:"object"},by={description:"How much of the authorized attempt set one page covers.",oneOf:[{additionalProperties:!1,description:"Every attempt after the page start was returned; zero returned is the\nexplicit empty authorized result, not a concealment.",properties:{coverage:{const:"complete",type:"string"},returned:{format:"uint32",minimum:0,type:"integer"}},required:["coverage","returned"],type:"object"},{additionalProperties:!1,description:"The page cap was reached; `resume` continues under the same verified\ntopology generation.",properties:{coverage:{const:"capped",type:"string"},remaining:{format:"uint32",minimum:0,type:"integer"},resume:{$ref:"#/$defs/WorkAttemptListCursorV1"},returned:{format:"uint32",minimum:0,type:"integer"}},required:["coverage","returned","remaining","resume"],type:"object"}]},bg={description:"Opaque resume point for the next page of one attempt-list-family read,\nbound to the operation and `page_size` that minted it and pinned to the\nverified topology generation the page was read under.",type:"string"},b_={additionalProperties:!1,properties:{completed:{format:"uint64",minimum:0,type:"integer"},total:{format:"uint64",minimum:0,type:"integer"}},required:["completed","total"],type:"object"},bv={additionalProperties:!1,properties:{accepted_proposal:{$ref:"#/$defs/ProposalId",description:"Exact accepted proposal the attempt was admitted against. A superseded\nor cleared proposal is a different binding, not a compatible refresh."},event_sequence:{description:"Exact immutable product event that verified this graph version.",format:"uint64",minimum:0,type:"integer"},graph_version:{format:"uint64",minimum:0,type:"integer"},recovered_graph_digest:{$ref:"#/$defs/ManifestDigest",description:"Digest of the graph recovered and verified at admission."},source_watermark:{additionalProperties:{format:"uint64",minimum:0,type:"integer"},description:"Source-frontier identity preserved from the verified product graph.",type:"object"}},required:["graph_version","event_sequence","source_watermark","recovered_graph_digest","accepted_proposal"],type:"object"},bb={description:"How one provider attempt ended, as observed by the daemon runtime.",oneOf:[{properties:{code:{format:"int32",type:"integer"},outcome:{const:"exited",type:"string"}},required:["outcome","code"],type:"object"},{properties:{outcome:{const:"signalled",type:"string"},signal:{format:"int32",type:"integer"}},required:["outcome","signal"],type:"object"},{properties:{outcome:{const:"timed_out",type:"string"}},required:["outcome"],type:"object"},{properties:{outcome:{const:"cancelled",type:"string"}},required:["outcome"],type:"object"},{properties:{outcome:{const:"provider_unavailable",type:"string"},state:{$ref:"#/$defs/WorkProviderAvailabilityV1"}},required:["outcome","state"],type:"object"},{properties:{channel:{$ref:"#/$defs/WorkAttemptStreamChannelV1"},outcome:{const:"stream_overflow",type:"string"}},required:["outcome","channel"],type:"object"},{properties:{outcome:{const:"launch_failed",type:"string"}},required:["outcome"],type:"object"},{description:"The provider started but its typed protocol session did not reach a\nterminal answer: a malformed, out-of-order, oversized, or lost frame.\nPlan 32 requires such a stream to seal failed evidence rather than a\ntext-scraped success.",properties:{outcome:{const:"protocol_failed",type:"string"}},required:["outcome"],type:"object"}]},b$={additionalProperties:!1,properties:{artifacts:{items:{$ref:"#/$defs/WorkArtifactRefV1"},type:"array"},evidence:{anyOf:[{$ref:"#/$defs/WorkAttemptEvidenceRecordV1"},{type:"null"}]},identity:{$ref:"#/$defs/WorkAttemptIdentityV1"}},required:["identity","artifacts"],type:"object"},bS={enum:["leased","running","cancellation_requested","cancellation_acknowledged","cancellation_escalated","recovery_required","succeeded","failed","timed_out","cancelled"],type:"string"},bk={enum:["stdout","stderr"],type:"string"},bw={additionalProperties:!1,description:"Bounded summary of one captured provider stream.",properties:{byte_length:{format:"uint64",minimum:0,type:"integer"},digest:{$ref:"#/$defs/ManifestDigest"},truncated:{type:"boolean"}},required:["byte_length","truncated","digest"],type:"object"},bV={additionalProperties:!1,description:"The verified Work topology snapshot one attempt-list page was read under.",properties:{generation:{description:"The verified graph generation the topology snapshot is published under.",type:"string"},task_count:{description:"The number of tasks in the verified topology.",format:"uint32",minimum:0,type:"integer"}},required:["generation","task_count"],type:"object"},bP={properties:{actual_route:{anyOf:[{$ref:"#/$defs/WorkProviderRouteV1"},{type:"null"}]},artifacts:{items:{$ref:"#/$defs/WorkArtifactRefV1"},type:"array"},cancellation:{$ref:"#/$defs/WorkCancellationStateV1"},execution:{$ref:"#/$defs/WorkExecutionEnvelopeV1"},identity:{$ref:"#/$defs/WorkAttemptIdentityV1"},lease:{$ref:"#/$defs/WorkLeaseFenceV1"},progress:{anyOf:[{$ref:"#/$defs/WorkAttemptProgressV1"},{type:"null"}]},projection_binding:{$ref:"#/$defs/WorkAttemptProjectionBindingV1"},recovery:{$ref:"#/$defs/WorkRecoveryStateV1"},requested_route:{$ref:"#/$defs/WorkProviderRouteV1"},state:{$ref:"#/$defs/WorkAttemptStateV1"},terminal:{anyOf:[{$ref:"#/$defs/WorkTerminalEvidenceV1"},{type:"null"}]}},required:["identity","projection_binding","execution","lease","state","artifacts","cancellation","recovery","requested_route"],type:"object"},bR={additionalProperties:!1,properties:{acknowledged_at:{$ref:"#/$defs/UtcMicros"},request:{$ref:"#/$defs/WorkCancellationRequestV1"}},required:["request","acknowledged_at"],type:"object"},bq={additionalProperties:!1,properties:{acknowledgement:{$ref:"#/$defs/WorkCancellationAcknowledgementV1"},escalated_at:{$ref:"#/$defs/UtcMicros"}},required:["acknowledgement","escalated_at"],type:"object"},bI={description:"Strongly typed canonical identity: `WorkCancellationRequestId`.",type:"string"},bx={additionalProperties:!1,properties:{request_id:{$ref:"#/$defs/WorkCancellationRequestId"},requested_at:{$ref:"#/$defs/UtcMicros"}},required:["request_id","requested_at"],type:"object"},bj={oneOf:[{properties:{state:{const:"none",type:"string"}},required:["state"],type:"object"},{properties:{state:{const:"requested",type:"string"},value:{$ref:"#/$defs/WorkCancellationRequestV1"}},required:["state","value"],type:"object"},{properties:{state:{const:"acknowledged",type:"string"},value:{$ref:"#/$defs/WorkCancellationAcknowledgementV1"}},required:["state","value"],type:"object"},{properties:{state:{const:"escalated",type:"string"},value:{$ref:"#/$defs/WorkCancellationEscalationV1"}},required:["state","value"],type:"object"}]},bC={description:"Strongly typed canonical identity: `WorkCommandId`.",type:"string"},bT={description:"Where a configured route places task content.",enum:["local","tenant","external"],type:"string"},bO={additionalProperties:!1,properties:{topology_generation:{$ref:"#/$defs/WorkTopologyGenerationRefV1"},work_generation:{$ref:"#/$defs/ProjectionGenerationId"}},required:["work_generation","topology_generation"],type:"object"},bE={additionalProperties:!1,properties:{cost_micros:{format:"uint64",minimum:0,type:["integer","null"]},coverage:{$ref:"#/$defs/CoverageStateV1"},effect_count:{format:"uint64",minimum:0,type:["integer","null"]},effect_outcome:{$ref:"#/$defs/DuplicateEffectOutcomeV1"},evidence:{$ref:"#/$defs/QuantityEvidenceClassV1"},test_count:{format:"uint64",minimum:0,type:["integer","null"]},token_count:{format:"uint64",minimum:0,type:["integer","null"]},wall_micros:{format:"uint64",minimum:0,type:["integer","null"]}},required:["evidence","effect_outcome","coverage"],type:"object"},bA={description:"Effect semantics admitted for one provider attempt.",enum:["observational","intercepted","compound_non_repeatable"],type:"string"},bW={description:"Declared effort class of a configured route.",enum:["minimal","standard","extended"],type:"string"},bM={enum:["deny","allowlisted"],type:"string"},bN={oneOf:[{additionalProperties:!1,properties:{cursor:{type:"string"},kind:{const:"anchor",type:"string"},link_id:{type:"string"}},required:["kind","link_id","cursor"],type:"object"},{additionalProperties:!1,properties:{continuation:{$ref:"#/$defs/WorkTaskSessionContinuationV1"},kind:{const:"task_session",type:"string"}},required:["kind","continuation"],type:"object"}]},bz={additionalProperties:!1,description:"One immutable evidence frontier. Local code/session evidence and live Git\nevidence each carry their own frontier; the evaluator never merges,\nsubstitutes, or advances one from the other.",properties:{digest:{$ref:"#/$defs/ManifestDigest"},watermark:{$ref:"#/$defs/UtcMicros"}},required:["watermark","digest"],type:"object"},bD={additionalProperties:!1,description:"Exact on-disk executable selected for one opaque executable identity.\n\nThe path is configuration data, never a lookup hint. Runtime admission\ncanonicalizes it again and verifies the file bytes against\n`executable.artifact_digest` before returning an executable binding.",properties:{canonical_path:{type:"string"},capabilities:{items:{$ref:"#/$defs/WorkExecutableCapabilityV1"},type:"array"},executable:{$ref:"#/$defs/WorkExecutableReference"},routes:{items:{$ref:"#/$defs/WorkRouteCandidateV1"},type:"array"}},required:["executable","canonical_path","capabilities","routes"],type:"object"},bF={description:"One executable capability admitted by a configured artifact binding.\n\nThe closed variants bind a provider backend to its exact wire protocol.\nCallers cannot claim an arbitrary backend/protocol combination.",enum:["claude_code_stream_json","codex_app_server_json_rpc","codex_cli_exec_json"],type:"string"},bL={additionalProperties:!1,properties:{artifact_digest:{$ref:"#/$defs/ManifestDigest"},executable_id:{type:"string"}},required:["executable_id","artifact_digest"],type:"object"},bU={additionalProperties:!1,description:"Exact immutable provider admission attached to the durable Work attempt.\n\nCallers name typed route and scope facts, never argv, environment entries,\nor executable paths. The daemon resolves the registered executable only\nafter this envelope has been persisted and admitted to the canonical queue.",properties:{attempt_identity:{$ref:"#/$defs/WorkAttemptIdentityV1"},cancellation_generation:{format:"uint64",minimum:0,type:"integer"},commit:{$ref:"#/$defs/CommitId"},effect_state:{$ref:"#/$defs/WorkEffectStateV1"},execution_snapshot:{$ref:"#/$defs/WorkExecutionSnapshot"},instructions:{description:"Exact provider instructions admitted with this attempt. The adapter\ndelivers these bytes verbatim on the provider's typed input channel;\nthey are never interpolated into argv or an ambient prompt source.",type:"string"},operation:{$ref:"#/$defs/WorkflowOperationRef"},project_id:{$ref:"#/$defs/ProjectId"},projection_binding:{$ref:"#/$defs/WorkAttemptProjectionBindingV1"},reference:{anyOf:[{$ref:"#/$defs/RefId"},{type:"null"}]},repository_id:{$ref:"#/$defs/RepositoryId"},worktree_id:{$ref:"#/$defs/WorktreeId"},worktree_root:{type:"string"}},required:["attempt_identity","projection_binding","operation","execution_snapshot","project_id","repository_id","worktree_id","worktree_root","commit","instructions","cancellation_generation","effect_state"],type:"object"},bH={additionalProperties:!1,properties:{max_concurrency:{format:"uint32",minimum:0,type:"integer"},max_input_tokens:{format:"uint64",minimum:0,type:"integer"},max_output_tokens:{format:"uint64",minimum:0,type:"integer"},max_protocol_bytes:{format:"uint64",minimum:0,type:"integer"},max_stderr_bytes:{format:"uint64",minimum:0,type:"integer"},max_stdout_bytes:{format:"uint64",minimum:0,type:"integer"}},required:["max_input_tokens","max_output_tokens","max_stdout_bytes","max_stderr_bytes","max_protocol_bytes","max_concurrency"],type:"object"},bG={additionalProperties:!1,description:"Immutable provider and topology authority pinned for exactly one Work\nexecution. Every constraint the execution is governed by is named here;\nnothing in this value is an opaque stand-in that a reader must resolve\nagainst a mutable store.",properties:{approval:{$ref:"#/$defs/WorkApprovalPolicy"},backend:{$ref:"#/$defs/WorkProviderBackendV1"},configuration_revision_id:{$ref:"#/$defs/ConfigurationRevisionId"},configuration_snapshot_id:{$ref:"#/$defs/ConfigurationSnapshotId"},credential_references:{items:{$ref:"#/$defs/CredentialReferenceId"},type:"array",uniqueItems:!0},deadline:{$ref:"#/$defs/UtcMicros"},effective_behavior_digest:{$ref:"#/$defs/ManifestDigest"},egress:{$ref:"#/$defs/WorkEgressPolicy"},environment_allowlist:{items:{type:"string"},type:"array",uniqueItems:!0},executable:{$ref:"#/$defs/WorkExecutableReference"},fallback:{$ref:"#/$defs/WorkFallbackTopology"},filesystem:{$ref:"#/$defs/WorkFilesystemPolicy"},limits:{$ref:"#/$defs/WorkExecutionLimits"},model:{type:"string"},protocol:{$ref:"#/$defs/WorkProviderProtocol"},resolution_provenance_digest:{$ref:"#/$defs/ManifestDigest"},route:{$ref:"#/$defs/WorkProviderRouteV1"},sandbox:{$ref:"#/$defs/WorkSandboxPolicy"},topology:{$ref:"#/$defs/WorkTopologyPolicyV1",description:"See [`WorkExecutionSnapshotInput::topology`]. Validated on construction,\nso an admitted snapshot can never pin a topology that weakens the\nprotected-ref floor or permits a native integration without its gates."}},required:["configuration_revision_id","configuration_snapshot_id","effective_behavior_digest","resolution_provenance_digest","route","backend","protocol","model","executable","sandbox","approval","filesystem","egress","environment_allowlist","credential_references","limits","deadline","fallback","topology"],type:"object"},bB={enum:["language","framework","architecture","testing","operations","security","domain"],type:"string"},bK={additionalProperties:!1,description:"Explicit, expiring consent for ephemeral expertise context.\n\nUser-profile and project authorization are separate registered settings;\nWork requires both and uses only their category intersection.",properties:{allowed_categories:{items:{$ref:"#/$defs/WorkExpertiseCategoryV1"},type:"array",uniqueItems:!0},enabled:{type:"boolean"},expires_at:{anyOf:[{$ref:"#/$defs/UtcMicros"},{type:"null"}]},granted_at:{anyOf:[{$ref:"#/$defs/UtcMicros"},{type:"null"}]},schema_version:{format:"uint16",maximum:65535,minimum:0,type:"integer"}},required:["schema_version","enabled","allowed_categories"],type:"object"},bJ={oneOf:[{additionalProperties:!1,properties:{kind:{const:"disabled",type:"string"}},required:["kind"],type:"object"},{additionalProperties:!1,properties:{executable:{$ref:"#/$defs/WorkExecutableReference"},kind:{const:"codex_cli",type:"string"},route:{$ref:"#/$defs/WorkProviderRouteV1"}},required:["kind","route","executable"],type:"object"}]},bZ={format:"uint64",minimum:0,title:"WorkFenceEpochV1",type:"integer"},bQ={enum:["read_only","workspace_write"],type:"string"},bX={oneOf:[{additionalProperties:!1,properties:{item:{$ref:"#/$defs/WorkItemV1"},kind:{const:"task_added",type:"string"}},required:["kind","item"],type:"object"},{additionalProperties:!1,properties:{initiative:{$ref:"#/$defs/WorkInitiativeV1"},item:{$ref:"#/$defs/WorkItemV1"},kind:{const:"task_created",type:"string"},milestone:{$ref:"#/$defs/WorkMilestoneV1"},plan:{$ref:"#/$defs/WorkPlanV1"}},required:["kind","initiative","plan","milestone","item"],type:"object"},{additionalProperties:!1,properties:{decided_at:{$ref:"#/$defs/UtcMicros"},disposition:{$ref:"#/$defs/WorkProposalDispositionV1"},kind:{const:"relation_replan_decided",type:"string"},proposal:{$ref:"#/$defs/WorkRelationReplanProposalV1"}},required:["kind","proposal","disposition","decided_at"],type:"object"},{additionalProperties:!1,properties:{applied_at:{$ref:"#/$defs/UtcMicros"},kind:{const:"task_relations_replanned",type:"string"},proposal_id:{$ref:"#/$defs/ProposalId"}},required:["kind","proposal_id","applied_at"],type:"object"},{additionalProperties:!1,properties:{evidence:{$ref:"#/$defs/TaskEvidenceLinkV1"},kind:{const:"evidence_linked",type:"string"},task_id:{$ref:"#/$defs/TaskId"}},required:["kind","task_id","evidence"],type:"object"},{additionalProperties:!1,properties:{decided_at:{$ref:"#/$defs/UtcMicros"},disposition:{$ref:"#/$defs/WorkProposalDispositionV1"},kind:{const:"proposal_decided",type:"string"},proposal:{$ref:"#/$defs/WorkProposalV1"}},required:["kind","proposal","disposition","decided_at"],type:"object"},{additionalProperties:!1,properties:{accepted_at:{$ref:"#/$defs/UtcMicros"},kind:{const:"proposal_accepted",type:"string"},proposal:{$ref:"#/$defs/WorkProposalV1"}},required:["kind","proposal","accepted_at"],type:"object"},{additionalProperties:!1,properties:{admitted_at:{$ref:"#/$defs/UtcMicros"},based_on_version:{format:"uint64",minimum:0,type:"integer"},kind:{const:"execution_admitted",type:"string"},task_id:{$ref:"#/$defs/TaskId"}},required:["kind","task_id","based_on_version","admitted_at"],type:"object"},{additionalProperties:!1,properties:{based_on_version:{format:"uint64",minimum:0,type:"integer"},identity:{$ref:"#/$defs/WorkAttemptIdentityV1"},kind:{const:"accepted_attempt_linked",type:"string"},linked_at:{$ref:"#/$defs/UtcMicros"},task_id:{$ref:"#/$defs/TaskId"}},required:["kind","task_id","based_on_version","identity","linked_at"],type:"object"},{additionalProperties:!1,properties:{accepted_at:{$ref:"#/$defs/UtcMicros"},evidence_by_criterion:{additionalProperties:{type:"string"},type:"object"},kind:{const:"task_accepted",type:"string"},task_id:{$ref:"#/$defs/TaskId"}},required:["kind","task_id","evidence_by_criterion","accepted_at"],type:"object"},{additionalProperties:!1,properties:{handoff:{$ref:"#/$defs/WorkHandoffV1"},kind:{const:"handoff_recorded",type:"string"}},required:["kind","handoff"],type:"object"}]},bY={additionalProperties:!1,description:"One attempt on the evidence frontier: exactly which attempt, in which\nstate, backed by which sealed evidence digest (when the attempt has\nreported one). No lease or fence is part of the frontier. Those are\nruntime authority, not checkpoint evidence.",properties:{evidence_digest:{anyOf:[{$ref:"#/$defs/ManifestDigest"},{type:"null"}],description:"The digest of the sealed terminal evidence record, when the attempt\nhas one. `None` is the typed not-yet-reported state."},identity:{$ref:"#/$defs/WorkAttemptIdentityV1"},state:{$ref:"#/$defs/WorkAttemptStateV1"}},required:["identity","state"],type:"object"},b1={additionalProperties:!1,description:"The exact work/evidence frontier one handoff records.",properties:{attempts:{description:"The evidence frontier: every attempt the issuer knows about, in\nstable identity order.",items:{$ref:"#/$defs/WorkHandoffAttemptFrontierV1"},type:"array"},blockers:{description:"What is blocking progress. Bounded, non-empty entries.",items:{type:"string"},type:"array"},legal_actions:{description:"The actions the issuer believes are legal next steps.",items:{type:"string"},type:"array"},lineage:{$ref:"#/$defs/WorkHandoffLineageV1"},task_id:{$ref:"#/$defs/TaskId"},unknowns:{description:"What the issuer does not know yet. Bounded, non-empty entries.",items:{type:"string"},type:"array"},work_version:{description:"The exact Work version the frontier was cut at.",format:"uint64",minimum:0,type:"integer"}},required:["task_id","work_version","attempts","unknowns","blockers","legal_actions","lineage"],type:"object"},b0={additionalProperties:!1,description:"Who issued this frontier and what it supersedes.",properties:{issued_at:{$ref:"#/$defs/UtcMicros"},issued_by:{$ref:"#/$defs/ActorId"},prior_frontier_digest:{anyOf:[{$ref:"#/$defs/ManifestDigest"},{type:"null"}],description:"The canonical digest of the frontier this one supersedes, when the\ntask has been handed off before. `None` states a first handoff."}},required:["issued_by","issued_at"],type:"object"},b2={additionalProperties:!1,properties:{evidence_frontier:{items:{type:"string"},type:"array",uniqueItems:!0},from_actor:{$ref:"#/$defs/ActorId"},handed_off_at:{$ref:"#/$defs/UtcMicros"},handoff_id:{type:"string"},task_id:{$ref:"#/$defs/TaskId"},to_actor:{$ref:"#/$defs/ActorId"},unknowns:{items:{type:"string"},type:"array",uniqueItems:!0}},required:["handoff_id","task_id","from_actor","to_actor","evidence_frontier","unknowns","handed_off_at"],type:"object"},b4={additionalProperties:!1,properties:{initiative_id:{type:"string"},milestone_id:{type:"string"},plan_id:{type:"string"}},required:["initiative_id","plan_id","milestone_id"],type:"object"},b6={additionalProperties:!1,properties:{created_at:{$ref:"#/$defs/UtcMicros"},id:{type:"string"},title:{type:"string"}},required:["id","title","created_at"],type:"object"},b3={additionalProperties:!1,properties:{acceptance_criteria:{items:{$ref:"#/$defs/WorkAcceptanceCriterionV1"},type:"array"},causal_candidates:{items:{$ref:"#/$defs/TaskId"},type:"array",uniqueItems:!0},created_at:{$ref:"#/$defs/UtcMicros"},deadline:{anyOf:[{$ref:"#/$defs/UtcMicros"},{type:"null"}]},dependencies:{items:{$ref:"#/$defs/TaskId"},type:"array",uniqueItems:!0},effort:{format:"uint32",minimum:0,type:"integer"},hierarchy:{$ref:"#/$defs/WorkHierarchyV1"},informational_relations:{items:{$ref:"#/$defs/TaskId"},type:"array",uniqueItems:!0},scheduled_at:{anyOf:[{$ref:"#/$defs/UtcMicros"},{type:"null"}]},task_id:{$ref:"#/$defs/TaskId"},title:{type:"string"},updated_at:{$ref:"#/$defs/UtcMicros"}},required:["task_id","hierarchy","title","dependencies","informational_relations","causal_candidates","acceptance_criteria","effort","created_at","updated_at"],type:"object"},b9={additionalProperties:!1,properties:{accepted_at:{anyOf:[{$ref:"#/$defs/UtcMicros"},{type:"null"}]},accepted_attempts:{items:{$ref:"#/$defs/WorkAttemptIdentityV1"},type:"array"},accepted_criteria:{additionalProperties:{type:"string"},type:"object"},accepted_proposal:{anyOf:[{$ref:"#/$defs/ProposalId"},{type:"null"}]},accepted_route:{anyOf:[{$ref:"#/$defs/WorkRouteDecisionV1"},{type:"null"}]},archived_at:{anyOf:[{$ref:"#/$defs/UtcMicros"},{type:"null"}]},evidence_links:{items:{type:"string"},type:"array",uniqueItems:!0},execution_admitted_at:{anyOf:[{$ref:"#/$defs/UtcMicros"},{type:"null"}]},handoffs:{items:{$ref:"#/$defs/WorkHandoffV1"},type:"array"},input:{$ref:"#/$defs/WorkItemInputV1"}},required:["input","evidence_links","accepted_criteria","accepted_attempts","handoffs"],type:"object"},b5={description:"A job task key: `[a-z0-9-]`, 1 to 48 bytes. Identities derive from it.",type:"string"},b8={additionalProperties:!1,properties:{epoch:{$ref:"#/$defs/WorkFenceEpochV1"},lease_id:{$ref:"#/$defs/WorkLeaseId"}},required:["lease_id","epoch"],type:"object"},b7={description:"Strongly typed canonical identity: `WorkLeaseId`.",type:"string"},$e={additionalProperties:!1,properties:{created_at:{$ref:"#/$defs/UtcMicros"},id:{type:"string"},plan_id:{type:"string"},title:{type:"string"}},required:["id","plan_id","title","created_at"],type:"object"},$t={description:"Ordinal band. Never a probability, never a scalar score.\n\nBands are ordered `Lowest` .. `Highest`. Comparison is the only operation\nconsumers perform over them, so no weighted sum can be reconstructed from\na recorded decision.",enum:["lowest","low","moderate","high","highest"],type:"string"},$r={description:"Closed set of conditions that block admission or removal.",oneOf:[{const:"dirty_tracked_files",description:"Tracked files differ from the index or HEAD.",type:"string"},{const:"untracked_data",description:"Untracked data is present in the target.",type:"string"},{const:"unique_commits",description:"The target holds commits reachable from nowhere else.",type:"string"},{const:"active_holder",description:"Another admitted placement holds this target.",type:"string"},{const:"unresolved_effect",description:"An effect against this placement is unresolved.",type:"string"},{const:"unacknowledged_receipt",description:"A receipt produced against this placement is unacknowledged.",type:"string"},{const:"uncertain_pull_request",description:"A pull request produced from this placement is in an uncertain state.",type:"string"},{const:"shared_ref",description:"A ref in this target is shared with another holder.",type:"string"},{const:"missing_anchor",description:"A retrieval or evidence anchor this placement referenced is missing.",type:"string"},{const:"stale_scope",description:"The authorized scope no longer matches the placement.",type:"string"},{const:"authorization_lost",description:"Authorization for this placement was lost.",type:"string"},{const:"target_unreadable",description:"The target could not be read, so its state is unknown.",type:"string"},{const:"network_required",description:"The placement declared itself network-free but the action needs network.",type:"string"}],title:"WorkPlacementBlockerV1"},$i={additionalProperties:!1,description:"Which run a placement belongs to. Placement never redefines TaskId.",properties:{run_id:{$ref:"#/$defs/RunId"},task_id:{$ref:"#/$defs/TaskId"}},required:["task_id","run_id"],title:"WorkPlacementIdentityV1",type:"object"},$o={description:"The supported placement choices, and only those.",oneOf:[{const:"no_managed_placement",description:"TraceDecay manages no checkout for this run. No-Git work is first class.",type:"string"},{const:"clean_in_place",description:"The caller's own strictly clean checkout, explicitly acknowledged.",type:"string"},{const:"linked_worktree",description:"A linked worktree of the same repository.",type:"string"},{const:"isolated_clone",description:"An isolated local clone.",type:"string"}],title:"WorkPlacementKindV1"},$n={description:"The durable state of one admitted placement.",oneOf:[{const:"admitted",description:"The placement holds its target.",type:"string"},{const:"released",description:"The placement gave its target up cleanly. Nothing was deleted by this\ntransition; removal is a separate cleanup preflight.",type:"string"},{const:"quarantined",description:"The placement was retained because removal is blocked.",type:"string"}],title:"WorkPlacementStateV1"},$a={additionalProperties:!1,description:"The exact placement a caller asked for.",properties:{in_place_acknowledged:{description:"Set only for `CleanInPlace`: the caller states it accepts running in\nits own checkout. Acknowledgement is explicit, never inferred.",type:"boolean"},kind:{$ref:"#/$defs/WorkPlacementKindV1"},network_free:{description:"The placement declares it needs no network. Declared, not detected.",type:"boolean"},root:{description:"Absolute root, present exactly when the kind manages one.",type:["string","null"]}},required:["kind","in_place_acknowledged","network_free"],title:"WorkPlacementTargetV1",type:"object"},$s={additionalProperties:!1,description:"One run's durable placement relation.",properties:{authority_version:{format:"uint64",minimum:0,type:"integer"},blockers:{items:{$ref:"#/$defs/WorkPlacementBlockerV1"},type:"array",uniqueItems:!0},identity:{$ref:"#/$defs/WorkPlacementIdentityV1"},retention_eligible_at:{anyOf:[{$ref:"#/$defs/UtcMicros"},{type:"null"}],description:"When retention makes this placement *eligible* for a fresh cleanup\npreflight. Eligibility is not delete authority."},state:{$ref:"#/$defs/WorkPlacementStateV1"},target:{$ref:"#/$defs/WorkPlacementTargetV1"},transitioned_at:{$ref:"#/$defs/UtcMicros"}},required:["identity","target","state","authority_version","transitioned_at","blockers"],title:"WorkPlacementV1",type:"object"},$d={additionalProperties:!1,properties:{created_at:{$ref:"#/$defs/UtcMicros"},id:{type:"string"},initiative_id:{type:"string"},title:{type:"string"}},required:["id","initiative_id","title","created_at"],type:"object"},$c={oneOf:[{additionalProperties:!1,properties:{kind:{const:"project",type:"string"},project_id:{$ref:"#/$defs/ProjectId"}},required:["kind","project_id"],type:"object"},{additionalProperties:!1,properties:{kind:{const:"repository",type:"string"},project_id:{$ref:"#/$defs/ProjectId"},repository_id:{$ref:"#/$defs/RepositoryId"}},required:["kind","project_id","repository_id"],type:"object"}]},$l={additionalProperties:!1,properties:{anchor_id:{$ref:"#/$defs/RetrievalAnchorId"},evidence_digest:{$ref:"#/$defs/ManifestDigest"},source_store_id:{$ref:"#/$defs/SourceStoreId"}},required:["source_store_id","anchor_id","evidence_digest"],type:"object"},$p={oneOf:[{additionalProperties:!1,properties:{graph:{$ref:"#/$defs/WorkProductGraphV1"},kind:{const:"created",type:"string"}},required:["kind","graph"],type:"object"},{additionalProperties:!1,properties:{change:{$ref:"#/$defs/WorkGraphChangeV1"},kind:{const:"changed",type:"string"}},required:["kind","change"],type:"object"}]},$u={additionalProperties:!1,properties:{actor_id:{$ref:"#/$defs/ActorId"},authorized_relation_scopes:{items:{$ref:"#/$defs/WorkProductAuthorizedRelationScopeV1"},type:"array"},canonical_input_digest:{$ref:"#/$defs/ManifestDigest"},catalog_generation_id:{$ref:"#/$defs/CatalogGenerationId"},causation_event_id:{type:["string","null"]},command_id:{$ref:"#/$defs/WorkCommandId"},configuration_revision_id:{$ref:"#/$defs/ConfigurationRevisionId"},event_id:{type:"string"},evidence:{items:{$ref:"#/$defs/WorkProductEventEvidenceV1"},type:"array"},expected_graph_version:{format:"uint64",minimum:0,type:["integer","null"]},occurred_at:{$ref:"#/$defs/UtcMicros"},owner_scope:{$ref:"#/$defs/WorkProductProfileScopeV1"},payload:{$ref:"#/$defs/WorkProductEventPayloadV1"},policy_revision_id:{type:"string"},result_graph_version:{format:"uint64",minimum:0,type:"integer"},sequence:{format:"uint64",minimum:0,type:"integer"},source_watermark:{additionalProperties:{format:"uint64",minimum:0,type:"integer"},type:"object"}},required:["event_id","sequence","actor_id","owner_scope","authorized_relation_scopes","result_graph_version","command_id","canonical_input_digest","evidence","source_watermark","occurred_at","policy_revision_id","configuration_revision_id","catalog_generation_id","payload"],type:"object"},$m={oneOf:[{additionalProperties:!1,properties:{authority:{const:"no_prior_graph",type:"string"}},required:["authority"],type:"object"},{additionalProperties:!1,properties:{authority:{const:"verified",type:"string"},verified_version:{$ref:"#/$defs/VerifiedWorkGraphVersionV1"}},required:["authority","verified_version"],type:"object"}]},$f={additionalProperties:!1,properties:{evidence:{items:{$ref:"#/$defs/TaskEvidenceLinkV1"},type:"array"},initiatives:{items:{$ref:"#/$defs/WorkInitiativeV1"},type:"array"},items:{items:{$ref:"#/$defs/WorkItemV1"},type:"array"},milestones:{items:{$ref:"#/$defs/WorkMilestoneV1"},type:"array"},plans:{items:{$ref:"#/$defs/WorkPlanV1"},type:"array"},proposal_decisions:{items:{$ref:"#/$defs/WorkProposalDecisionV1"},type:"array"},relation_replan_decisions:{items:{$ref:"#/$defs/WorkRelationReplanDecisionV1"},type:"array"},version:{format:"uint64",minimum:0,type:"integer"}},required:["version","initiatives","plans","milestones","items","proposal_decisions","relation_replan_decisions","evidence"],type:"object"},$h={additionalProperties:!1,properties:{causation_event_id:{type:["string","null"]},command_id:{$ref:"#/$defs/WorkCommandId"},evidence:{items:{$ref:"#/$defs/WorkProductEventEvidenceV1"},type:"array"},expected_authority:{$ref:"#/$defs/WorkProductExpectedAuthorityV1"},occurred_at:{$ref:"#/$defs/UtcMicros"},revisions:{$ref:"#/$defs/WorkProductRevisionPinsV1"}},required:["expected_authority","command_id","evidence","occurred_at","revisions"],type:"object"},$y={additionalProperties:!1,properties:{event:{$ref:"#/$defs/WorkProductEventV1"},replayed:{type:"boolean"},verified_graph_version:{$ref:"#/$defs/VerifiedWorkGraphVersionV1"}},required:["event","verified_graph_version","replayed"],type:"object"},$g={additionalProperties:!1,properties:{brain_id:{$ref:"#/$defs/BrainId"},profile_id:{$ref:"#/$defs/UserProfileId"}},required:["brain_id","profile_id"],type:"object"},$_={oneOf:[{properties:{initiative_id:{type:"string"},kind:{const:"initiative_contains_plan",type:"string"},plan_id:{type:"string"}},required:["kind","initiative_id","plan_id"],type:"object"},{properties:{kind:{const:"plan_contains_milestone",type:"string"},milestone_id:{type:"string"},plan_id:{type:"string"}},required:["kind","plan_id","milestone_id"],type:"object"},{properties:{kind:{const:"milestone_contains_task",type:"string"},milestone_id:{type:"string"},task_id:{$ref:"#/$defs/TaskId"}},required:["kind","milestone_id","task_id"],type:"object"},{properties:{dependency:{$ref:"#/$defs/TaskId"},dependent:{$ref:"#/$defs/TaskId"},kind:{const:"gates",type:"string"}},required:["kind","dependency","dependent"],type:"object"},{properties:{kind:{const:"informational",type:"string"},source:{$ref:"#/$defs/TaskId"},target:{$ref:"#/$defs/TaskId"}},required:["kind","source","target"],type:"object"},{properties:{cause:{$ref:"#/$defs/TaskId"},effect:{$ref:"#/$defs/TaskId"},kind:{const:"causal_candidate",type:"string"}},required:["kind","cause","effect"],type:"object"},{properties:{kind:{const:"evidence",type:"string"},link_id:{type:"string"},task_id:{$ref:"#/$defs/TaskId"}},required:["kind","task_id","link_id"],type:"object"},{properties:{identity:{$ref:"#/$defs/WorkAttemptIdentityV1"},kind:{const:"accepted_attempt",type:"string"},task_id:{$ref:"#/$defs/TaskId"}},required:["kind","task_id","identity"],type:"object"},{properties:{handoff_id:{type:"string"},kind:{const:"handoff",type:"string"},task_id:{$ref:"#/$defs/TaskId"}},required:["kind","task_id","handoff_id"],type:"object"},{properties:{kind:{const:"proposal_decision",type:"string"},proposal_id:{$ref:"#/$defs/ProposalId"},task_id:{$ref:"#/$defs/TaskId"}},required:["kind","task_id","proposal_id"],type:"object"}]},$v={additionalProperties:!1,properties:{catalog_generation_id:{$ref:"#/$defs/CatalogGenerationId"},configuration_revision_id:{$ref:"#/$defs/ConfigurationRevisionId"},policy_revision_id:{type:"string"}},required:["policy_revision_id","configuration_revision_id","catalog_generation_id"],type:"object"},$b={description:"The exact owner-relative relation set selected for a canonical Work graph.\n\nThis identity lives in the domain because attempt admission must retain\nit byte-for-byte through provider settlement. Reconstructing it from a\nproject context would conflate explicit no-Git work with a scoped\nrepository relation.",oneOf:[{properties:{selection:{const:"profile_owned_no_git",type:"string"}},required:["selection"],type:"object"},{properties:{relation_scopes:{items:{$ref:"#/$defs/WorkProductAuthorizedRelationScopeV1"},type:"array",uniqueItems:!0},selection:{const:"relations",type:"string"}},required:["selection","relation_scopes"],type:"object"}]},$$={additionalProperties:!1,properties:{decided_at:{$ref:"#/$defs/UtcMicros"},disposition:{$ref:"#/$defs/WorkProposalDispositionV1"},proposal:{$ref:"#/$defs/WorkProposalV1"}},required:["proposal","disposition","decided_at"],type:"object"},$S={enum:["accepted","rejected","superseded"],type:"string"},$k={additionalProperties:!1,properties:{based_on_version:{format:"uint64",minimum:0,type:"integer"},children:{items:{$ref:"#/$defs/WorkProposedChildV1"},type:"array"},configuration_digest:{$ref:"#/$defs/ManifestDigest"},evidence_digest:{$ref:"#/$defs/ManifestDigest"},explanation:{type:"string"},proposal_id:{$ref:"#/$defs/ProposalId"},route:{$ref:"#/$defs/WorkRouteDecisionV1"},shape:{$ref:"#/$defs/WorkShapeAssessmentV1"},sizing:{$ref:"#/$defs/WorkSizingV1"},task_id:{$ref:"#/$defs/TaskId"}},required:["proposal_id","task_id","based_on_version","shape","sizing","children","route","explanation","evidence_digest","configuration_digest"],type:"object"},$w={additionalProperties:!1,properties:{dependencies:{items:{$ref:"#/$defs/TaskId"},type:"array",uniqueItems:!0},effort:{format:"uint32",minimum:0,type:"integer"},task_id:{$ref:"#/$defs/TaskId"},title:{type:"string"}},required:["task_id","title","effort","dependencies"],type:"object"},$V={description:"Typed provider availability observed at negotiation. These are product\nstates, not transport errors: each one names why the configured native\nprovider could not run, without inventing a fallback.",oneOf:[{const:"absent",description:"No executable binding is configured for the pinned executable identity.",type:"string"},{const:"stale",description:"The configured binding no longer matches the pinned reference.",type:"string"},{const:"unsupported",description:"The configured binding does not admit the pinned backend/protocol.",type:"string"},{const:"digest_mismatch",description:"The on-disk executable bytes do not match the pinned digest.",type:"string"},{const:"unavailable",description:"The configured executable could not be read or is not executable.",type:"string"}]},$P={description:"Provider protocol selected by the pinned Work configuration snapshot.",enum:["claude_code_cli","codex_app_server","codex_cli"],type:"string"},$R={additionalProperties:!1,description:'Why an admitted attempt did not run on the backend its pinned execution\nsnapshot preferred.\n\nPlan 32 (`docs/plans/tracedecay-v2/32-dynamic-workflow-runtime-and-sdk.md`,\n"Native provider execution") admits the Codex CLI "only when app-server is\nunsupported or absent before session start and the pinned Plan 20 snapshot\nexplicitly allows that fallback", and the plan index requires that fallback\nto be "reported rather than hidden". This record is that report: it names\nthe preferred backend, the typed state that disqualified it, and the\nconfiguration-bounded fallback that was selected, so a fallback run can\nnever be read as a first choice.\n\nIt is also written when the fallback itself was refused, so a denial keeps\nboth failures instead of collapsing them into one state.',properties:{fallback_backend:{$ref:"#/$defs/WorkProviderBackendV1",description:"The backend named by the snapshot's configured fallback topology."},fallback_route:{$ref:"#/$defs/WorkProviderRouteV1",description:"The route that fallback runs on."},fallback_state:{anyOf:[{$ref:"#/$defs/WorkProviderAvailabilityV1"},{type:"null"}],description:"`None` when the fallback actually started; `Some(state)` when the\nfallback was itself refused."},preferred_backend:{$ref:"#/$defs/WorkProviderBackendV1",description:"The backend the pinned snapshot named first."},preferred_route:{$ref:"#/$defs/WorkProviderRouteV1",description:"The route that backend would have run on."},preferred_state:{$ref:"#/$defs/WorkProviderAvailabilityV1",description:"Why the preferred backend could not be used."}},required:["preferred_backend","preferred_route","preferred_state","fallback_backend","fallback_route"],type:"object"},$q={enum:["claude_stream_json","codex_app_server_json_rpc","codex_exec_json"],type:"string"},$I={description:"Strongly typed canonical identity: `WorkProviderRouteId`.",type:"string"},$x={additionalProperties:!1,properties:{provider_id:{$ref:"#/$defs/ProviderId"},route_id:{$ref:"#/$defs/WorkProviderRouteId"}},required:["provider_id","route_id"],type:"object"},$j={oneOf:[{properties:{state:{const:"fresh",type:"string"}},required:["state"],type:"object"},{properties:{checkpoint:{anyOf:[{$ref:"#/$defs/WorkArtifactRefV1"},{type:"null"}]},source_attempt_id:{$ref:"#/$defs/AttemptId"},state:{const:"resumed",type:"string"}},required:["state","source_attempt_id"],type:"object"},{properties:{reason:{$ref:"#/$defs/WorkRestartReasonV1"},source_attempt_id:{$ref:"#/$defs/AttemptId"},state:{const:"restarted",type:"string"}},required:["state","source_attempt_id","reason"],type:"object"},{description:"The attempt cannot continue and must be recovered. A first attempt\nlost before it ever resumed anything has no predecessor, so the source\nis absent rather than pointing at the attempt itself.",properties:{observed_at:{$ref:"#/$defs/UtcMicros"},reason:{$ref:"#/$defs/WorkRestartReasonV1"},source_attempt_id:{anyOf:[{$ref:"#/$defs/AttemptId"},{type:"null"}],default:null},state:{const:"recovery_required",type:"string"}},required:["state","reason","observed_at"],type:"object"}]},$C={additionalProperties:!1,properties:{decided_at:{$ref:"#/$defs/UtcMicros"},disposition:{$ref:"#/$defs/WorkProposalDispositionV1"},proposal:{$ref:"#/$defs/WorkRelationReplanProposalV1"}},required:["proposal","disposition","decided_at"],type:"object"},$T={additionalProperties:!1,properties:{based_on_version:{format:"uint64",minimum:0,type:"integer"},causal_candidates:{items:{$ref:"#/$defs/TaskId"},type:"array",uniqueItems:!0},dependencies:{items:{$ref:"#/$defs/TaskId"},type:"array",uniqueItems:!0},informational_relations:{items:{$ref:"#/$defs/TaskId"},type:"array",uniqueItems:!0},payload_digest:{$ref:"#/$defs/ManifestDigest"},proposal_id:{$ref:"#/$defs/ProposalId"},task_id:{$ref:"#/$defs/TaskId"}},required:["proposal_id","task_id","based_on_version","dependencies","informational_relations","causal_candidates","payload_digest"],type:"object"},$O={enum:["lease_lost","provider_unavailable","process_lost","failure_observed"],type:"string"},$E={enum:["runtime_failure","restart_recovery_required"],type:"string"},$A={additionalProperties:!1,description:"A selector into the owning runtime-terminal evidence authority.\n\n`evidence_ref` is an opaque local reference. The Work retry owner resolves\nit through [`WorkRetryEvidencePortV1`]; callers never submit the evidence\ndigest, outcome, or observation time that decides eligibility.",properties:{cause:{$ref:"#/$defs/WorkRetryCauseV1"},evidence_ref:{type:"string"},source:{$ref:"#/$defs/WorkRetrySourceV1"}},required:["source","cause","evidence_ref"],type:"object"},$W={enum:["runtime"],type:"string"},$M={additionalProperties:!1,description:"One eligible route supplied by the authorized configuration snapshot.\n\nThe application filters these candidates by the current request grant and\nverifies the exact pinned executable before policy evaluates them.",properties:{autonomy:{$ref:"#/$defs/WorkOrdinalBandV1"},content_location:{$ref:"#/$defs/WorkContentLocationClassV1"},correctness:{$ref:"#/$defs/WorkOrdinalBandV1"},cost:{$ref:"#/$defs/WorkOrdinalBandV1"},declared_budget_ceiling:{format:"uint64",minimum:0,type:"integer"},effort:{$ref:"#/$defs/WorkEffortClassV1"},evidence_quality:{$ref:"#/$defs/WorkOrdinalBandV1"},execution:{$ref:"#/$defs/WorkRouteExecutionProfileV1"},latency:{$ref:"#/$defs/WorkOrdinalBandV1"},model_id:{type:"string"},provider_capability_id:{type:"string"},route_id:{type:"string"},sensitive_data_fitness:{$ref:"#/$defs/WorkOrdinalBandV1"}},required:["route_id","provider_capability_id","model_id","effort","declared_budget_ceiling","content_location","correctness","sensitive_data_fitness","latency","cost","autonomy","evidence_quality","execution"],type:"object"},$N={oneOf:[{properties:{alternatives:{items:{$ref:"#/$defs/WorkProviderRouteV1"},type:"array"},decision:{const:"selected",type:"string"},exclusions:{items:{type:"string"},type:"array",uniqueItems:!0},fallback:{type:"string"},recommended:{$ref:"#/$defs/WorkProviderRouteV1"}},required:["decision","recommended","alternatives","exclusions","fallback"],type:"object"},{properties:{decision:{const:"abstained",type:"string"},reason:{type:"string"}},required:["decision","reason"],type:"object"}]},$z={additionalProperties:!1,description:"Complete execution constraints configured for one provider route.\n\nThe route candidate is the configuration authority for these values. Work\nadmission copies them into the immutable execution snapshot; provider\nadapters never supply defaults.",properties:{approval:{$ref:"#/$defs/WorkApprovalPolicy"},credential_references:{items:{$ref:"#/$defs/CredentialReferenceId"},type:"array",uniqueItems:!0},egress:{$ref:"#/$defs/WorkEgressPolicy"},environment_allowlist:{items:{type:"string"},type:"array",uniqueItems:!0},fallback:{$ref:"#/$defs/WorkFallbackTopology"},filesystem:{$ref:"#/$defs/WorkFilesystemPolicy"},limits:{$ref:"#/$defs/WorkExecutionLimits"},maximum_duration_micros:{description:"Maximum elapsed time from execution admission to provider completion.",format:"uint64",minimum:0,type:"integer"},sandbox:{$ref:"#/$defs/WorkSandboxPolicy"}},required:["sandbox","approval","filesystem","egress","environment_allowlist","credential_references","limits","maximum_duration_micros","fallback"],type:"object"},$D={description:"A monotonically versioned control authority.",format:"uint64",minimum:0,title:"WorkRunControlAuthorityV1",type:"integer"},$F={description:"Why a run was paused or resumed. A closed vocabulary keeps the reason out\nof free text so it can be read by a projection without being a prompt.",oneOf:[{const:"operator_request",description:"An authorized operator asked for the transition.",type:"string"},{const:"human_wait",description:"The run is waiting on a human approval or answer.",type:"string"},{const:"budget_exhausted",description:"The shared budget ledger is exhausted for now.",type:"string"},{const:"recovery",description:"Recovery or failover is reconciling the run.",type:"string"}],title:"WorkRunControlReasonV1"},$L={description:'The published control state of one run.\n\nThere is no `Cancelled` here: cancellation is an attempt-level authority\nowned through the lease fence, and duplicating it as a run state would\ncreate a second place a run could be "over".',oneOf:[{const:"running",description:"New reservations are admitted.",type:"string"},{const:"paused",description:"New reservations are fenced; committed evidence is preserved.",type:"string"}],title:"WorkRunControlStateV1"},$U={additionalProperties:!1,description:"The run's deadline as of the last control transition.\n\n`remaining_micros` is the authority; `deadline` is the absolute instant that\nremaining resolves to while the run is running. Both are recorded so a\nreader never has to recompute one from a clock it does not trust.",properties:{checkpoint_at:{$ref:"#/$defs/UtcMicros",description:"The instant the checkpoint was taken."},deadline:{$ref:"#/$defs/UtcMicros",description:"The absolute deadline the run is measured against right now."},remaining_micros:{description:"Micros left against that deadline at `checkpoint_at`. Never negative,\nand never larger than the value the previous checkpoint carried.",format:"int64",type:"integer"}},required:["deadline","remaining_micros","checkpoint_at"],title:"WorkRunDeadlineCheckpointV1",type:"object"},$H={enum:["required"],type:"string"},$G={enum:["ordinal","heuristic","calibrated_range"],type:"string"},$B={additionalProperties:!1,properties:{ambiguity:{format:"uint8",maximum:255,minimum:0,type:"integer"},blast_radius:{format:"uint8",maximum:255,minimum:0,type:"integer"},complexity:{format:"uint8",maximum:255,minimum:0,type:"integer"},integration_overhead:{format:"uint8",maximum:255,minimum:0,type:"integer"},score_kind:{$ref:"#/$defs/WorkScoreKindV1"}},required:["score_kind","complexity","ambiguity","blast_radius","integration_overhead"],type:"object"},$K={additionalProperties:!1,properties:{coverage:{type:"string"},high:{format:"uint32",minimum:0,type:"integer"},likely:{format:"uint32",minimum:0,type:"integer"},low:{format:"uint32",minimum:0,type:"integer"},score_kind:{$ref:"#/$defs/WorkScoreKindV1"}},required:["score_kind","low","likely","high","coverage"],type:"object"},$J={additionalProperties:!1,description:"Succeeded sources grouped by the exact artifact digest list they produced.\nGroups are ordered largest first; smaller groups are the minority\nevidence, and more than one group is the disagreement, preserved as\nstructure instead of being resolved by fiat.",properties:{artifacts:{description:"The artifact digest list every source in this group produced.",items:{$ref:"#/$defs/ManifestDigest"},type:"array"},sources:{description:"The concurring sources, in the caller's requested order.",items:{$ref:"#/$defs/WorkAttemptIdentityV1"},type:"array"}},required:["artifacts","sources"],type:"object"},$Z={description:"Why a synthesis request was answered with the unsynthesized set instead\nof an admitted attempt.",oneOf:[{const:"no_citable_sources",description:"No source contributed a citable artifact: every source failed, was\ncancelled, timed out, is still unknown, or succeeded without\ndeclaring artifacts. There is nothing a synthesis could truthfully\ncite.",type:"string"}]},$Q={additionalProperties:!1,description:"One immutable source envelope: which attempt, and what it truthfully\ncontributed at admission time.",properties:{outcome:{$ref:"#/$defs/WorkSynthesisSourceOutcomeV1"},source:{$ref:"#/$defs/WorkAttemptIdentityV1"}},required:["source","outcome"],type:"object"},$X={description:"One sibling attempt's terminal contribution, captured verbatim from the\nWork authority at admission time.",oneOf:[{description:"The source succeeded; its declared artifact digests, in declaration\norder, are the evidence a synthesis may cite.",properties:{artifacts:{items:{$ref:"#/$defs/ManifestDigest"},type:"array"},outcome:{const:"succeeded",type:"string"}},required:["outcome","artifacts"],type:"object"},{description:"The source failed; its sealed terminal evidence digest is preserved\nso the failure stays visible in the synthesis record.",properties:{evidence:{$ref:"#/$defs/ManifestDigest"},outcome:{const:"failed",type:"string"}},required:["outcome","evidence"],type:"object"},{description:"The source timed out; preserved like a failure.",properties:{evidence:{$ref:"#/$defs/ManifestDigest"},outcome:{const:"timed_out",type:"string"}},required:["outcome","evidence"],type:"object"},{description:"The source was cancelled; preserved like a failure.",properties:{evidence:{$ref:"#/$defs/ManifestDigest"},outcome:{const:"cancelled",type:"string"}},required:["outcome","evidence"],type:"object"},{description:"The source has not reached a terminal state. The unknown is preserved\nas an unknown; it contributes no citable evidence and is never\nguessed at.",properties:{outcome:{const:"unknown",type:"string"},state:{$ref:"#/$defs/WorkAttemptStateV1"}},required:["outcome","state"],type:"object"}]},$Y={additionalProperties:!1,description:"The ordered, digest-sealed source envelope set a synthesis admission\nconsumed. Reordering or mutating any envelope changes the digest, so a\nreplayed or tampered set is distinguishable from the admitted one.",properties:{set_digest:{$ref:"#/$defs/ManifestDigest",description:"Canonical digest over the ordered envelopes."},sources:{description:"The envelopes, exactly in the caller's requested order.",items:{$ref:"#/$defs/WorkSynthesisSourceEnvelopeV1"},type:"array"}},required:["sources","set_digest"],type:"object"},$1={additionalProperties:!1,properties:{attempt:{$ref:"#/$defs/WorkAttemptIdentityV1"},binding:{description:"Binds the continuation to the retrieve-evidence operation and the\nresult-shaping request fields the envelope does not echo.",type:"string"},participant_epoch:{$ref:"#/$defs/ManifestDigest"},ranking_cursor:{type:["string","null"]},source:{$ref:"#/$defs/ObservationSourceIdentityV1"},temporal_cursor:{type:["string","null"]},verified_version:{$ref:"#/$defs/VerifiedWorkGraphVersionV1"}},required:["verified_version","attempt","source","participant_epoch","binding"],type:"object"},$0={oneOf:[{properties:{evidence_digest:{$ref:"#/$defs/ManifestDigest"},observed_at:{$ref:"#/$defs/UtcMicros"},outcome:{const:"succeeded",type:"string"}},required:["outcome","evidence_digest","observed_at"],type:"object"},{properties:{evidence_digest:{$ref:"#/$defs/ManifestDigest"},observed_at:{$ref:"#/$defs/UtcMicros"},outcome:{const:"failed",type:"string"}},required:["outcome","evidence_digest","observed_at"],type:"object"},{properties:{evidence_digest:{$ref:"#/$defs/ManifestDigest"},observed_at:{$ref:"#/$defs/UtcMicros"},outcome:{const:"timed_out",type:"string"}},required:["outcome","evidence_digest","observed_at"],type:"object"},{properties:{evidence_digest:{$ref:"#/$defs/ManifestDigest"},observed_at:{$ref:"#/$defs/UtcMicros"},outcome:{const:"cancelled",type:"string"}},required:["outcome","evidence_digest","observed_at"],type:"object"}]},$2={description:"Strongly typed algorithm-tagged integrity digest: `WorkTopologyGenerationRefV1`.",type:"string"},$4={additionalProperties:!1,description:"Complete V1 policy. Partial values are intentionally impossible: callers\nmust provide the entire policy and validation rejects adapter-local defaults.",properties:{branch_naming:{$ref:"#/$defs/BranchNamingPolicyV1"},branch_topology:{$ref:"#/$defs/BranchTopologyPolicyV1"},concurrency:{$ref:"#/$defs/TopologyConcurrencyPolicyV1"},cross_merge:{$ref:"#/$defs/CrossMergePolicyV1"},escalation:{$ref:"#/$defs/TopologyEscalationPolicyV1"},gates:{$ref:"#/$defs/TopologyGatePolicyV1"},history_rewrite:{$ref:"#/$defs/HistoryRewritePolicyV1"},notifications:{$ref:"#/$defs/TopologyNotificationLevelV1"},placement:{$ref:"#/$defs/WorktreePlacementModeV1"},protected_refs:{items:{$ref:"#/$defs/ProtectedRefRuleV1"},type:"array"},retention:{$ref:"#/$defs/WorktreeRetentionPolicyV1"},review_topology:{$ref:"#/$defs/ReviewTopologyPolicyV1"},roots:{items:{$ref:"#/$defs/WorktreeRootPolicyV1"},type:"array"},schema_version:{format:"uint16",maximum:65535,minimum:0,type:"integer"}},required:["schema_version","placement","roots","branch_topology","review_topology","branch_naming","concurrency","cross_merge","gates","protected_refs","history_rewrite","escalation","retention","notifications"],type:"object"},$6={additionalProperties:!1,properties:{definition_id:{$ref:"#/$defs/WorkflowDefinitionId"},definition_version:{format:"uint64",minimum:0,type:"integer"},pinned_catalog_digest:{$ref:"#/$defs/ManifestDigest",description:"Must equal the live Work executable catalog digest. Validation and\nactivation report the current digest when this pin is stale."},pinned_configuration_digest:{$ref:"#/$defs/ManifestDigest"},pinned_policy_digest:{$ref:"#/$defs/ManifestDigest"},project_id:{$ref:"#/$defs/ProjectId"},steps:{items:{$ref:"#/$defs/WorkflowStep"},type:"array"}},required:["definition_id","definition_version","project_id","steps","pinned_policy_digest","pinned_configuration_digest","pinned_catalog_digest"],type:"object"},$3={description:"Strongly typed canonical identity: `WorkflowDefinitionId`.",type:"string"},$9={additionalProperties:!1,properties:{max_width:{format:"uint32",minimum:0,type:"integer"}},required:["max_width"],type:"object"},$5={description:"Strongly typed canonical identity: `WorkflowOperationRef`.",type:"string"},$8={description:"Strongly typed canonical identity: `WorkflowOutputName`.",type:"string"},$7={additionalProperties:!1,properties:{output_name:{$ref:"#/$defs/WorkflowOutputName"},producer_step_id:{$ref:"#/$defs/WorkflowStepId"}},required:["producer_step_id","output_name"],type:"object"},Se={additionalProperties:!1,properties:{fan_out:{anyOf:[{$ref:"#/$defs/WorkflowFanOut"},{type:"null"}]},inputs:{items:{$ref:"#/$defs/WorkflowOutputReference"},type:"array"},operation:{$ref:"#/$defs/WorkflowOperationRef"},outputs:{items:{$ref:"#/$defs/WorkflowOutputName"},type:"array"},predecessors:{items:{$ref:"#/$defs/WorkflowStepId"},type:"array",uniqueItems:!0},step_id:{$ref:"#/$defs/WorkflowStepId"}},required:["step_id","operation","predecessors","inputs","outputs"],type:"object"},St={description:"Strongly typed canonical identity: `WorkflowStepId`.",type:"string"},Sr={additionalProperties:!1,description:"A provider's claim that one artifact of a fan-out output synthesizes its\nsibling source artifacts.",properties:{cited_source_digests:{description:"Content digests of every source artifact the synthesis consumed.",items:{$ref:"#/$defs/ManifestDigest"},type:"array",uniqueItems:!0},output_name:{$ref:"#/$defs/WorkflowOutputName",description:"The fan-out output the synthesis belongs to."},synthesis_attempt:{$ref:"#/$defs/WorkAttemptIdentityV1",description:"The attempt that produced the synthesis artifact inside that output."}},required:["output_name","synthesis_attempt","cited_source_digests"],type:"object"},Si={enum:["require_clean","allow_untracked_only_for_preflight","read_only_preflight_only"],type:"string"},So={description:"Strongly typed canonical identity: `WorktreeId`.",type:"string"},Sn={description:"Monotonic epoch of the worktree inventory frozen into a stack revision.",format:"uint64",minimum:0,type:"integer"},Sa={description:"Strongly typed canonical identity: `WorktreeInventorySnapshotId`.",type:"string"},Ss={oneOf:[{properties:{kind:{const:"existing_worktree_only",type:"string"}},required:["kind"],type:"object"},{properties:{kind:{const:"sibling_of_primary_checkout",type:"string"}},required:["kind"],type:"object"},{properties:{kind:{const:"repository_local_root",type:"string"}},required:["kind"],type:"object"},{properties:{kind:{const:"configured_root",type:"string"},root_id:{type:"string"}},required:["kind","root_id"],type:"object"}]},Sd={additionalProperties:!1,properties:{abandoned_retention_seconds:{format:"uint64",minimum:1,type:["integer","null"]},automatic_gc:{$ref:"#/$defs/AutomaticWorktreeGcV1"},maximum_retained_per_repository:{format:"uint16",maximum:65535,minimum:1,type:["integer","null"]},terminal_retention_seconds:{format:"uint64",minimum:1,type:["integer","null"]}},required:["automatic_gc"],type:"object"},Sc={additionalProperties:!1,properties:{locator:{$ref:"#/$defs/SensitiveFilesystemLocatorV1"},maximum_active_worktrees:{format:"uint16",maximum:65535,minimum:1,type:"integer"},repository_scope:{$ref:"#/$defs/RepositoryPlacementScopeV1"},root_id:{type:"string"}},required:["root_id","locator","repository_scope","maximum_active_worktrees"],type:"object"},Sl=[{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,title:"ActiveProjectSurfaceRequestV1",type:"object"},{$defs:{ActiveProjectBranchV1:{additionalProperties:!1,properties:{branch_drifted:{type:"boolean"},branch_resolution:{type:"string"},current_branch:{type:["string","null"]},open_active_branch:{type:["string","null"]},serving_branch:{type:["string","null"]},tracked_branch_count:{format:"uint",minimum:0,type:"integer"},warnings:{items:{type:"string"},type:"array"}},required:["branch_resolution","branch_drifted","tracked_branch_count","warnings"],type:"object"},ActiveProjectResolutionSourceV1:{enum:["active_project"],type:"string"},ActiveProjectStorageV1:{additionalProperties:!1,properties:{class:{type:"string"},data_root:{type:"string"},graph_db_exists:{type:"boolean"},graph_db_path:{type:"string"},graph_db_size_bytes:{format:"uint64",minimum:0,type:"integer"},lcm_payload_root:{type:"string"},mode:{type:"string"},response_handle_root:{type:"string"},sessions_db_path:{type:"string"}},required:["class","mode","data_root","graph_db_path","graph_db_exists","graph_db_size_bytes","sessions_db_path","response_handle_root","lcm_payload_root"],type:"object"}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"The resolved active project of this MCP session.",properties:{branch:{$ref:"#/$defs/ActiveProjectBranchV1"},project_id:{type:["string","null"]},project_root:{type:"string"},repository_id:{type:"string"},resolution_source:{$ref:"#/$defs/ActiveProjectResolutionSourceV1"},scope_prefix:{type:["string","null"]},storage:{$ref:"#/$defs/ActiveProjectStorageV1"}},required:["repository_id","project_root","resolution_source","storage","branch"],title:"ActiveProjectResultV1",type:"object"},{$defs:{AdminCliScopeV1:{description:"What a cost or analytics action reads: the served project's ledgers and\nsessions, or the whole profile's.",enum:["project","profile"],type:"string"}},$schema:"https://json-schema.org/draft/2020-12/schema",oneOf:[{additionalProperties:!1,description:"Savings and provider-usage cost over `range` (`today`, `7d`, ...).",properties:{action:{const:"cost_summary",type:"string"},range:{type:"string"},scope:{$ref:"#/$defs/AdminCliScopeV1"}},required:["action","range","scope"],type:"object"},{additionalProperties:!1,description:"Import every host's transcripts into the project's session store.",properties:{action:{const:"sessions_import",type:"string"}},required:["action"],type:"object"},{additionalProperties:!1,description:"Converge project sessions with Git history.",properties:{action:{const:"sessions_git_sync",type:"string"},dry_run:{type:"boolean"},limit_sessions:{format:"uint",minimum:0,type:"integer"},since:{format:"int64",type:"integer"}},required:["action","since","limit_sessions","dry_run"],type:"object"},{additionalProperties:!1,properties:{action:{const:"sessions_sync_status",type:"string"},idempotency_key:{type:"string"}},required:["action","idempotency_key"],type:"object"},{additionalProperties:!1,properties:{action:{const:"sessions_sync_cancel",type:"string"},idempotency_key:{type:"string"}},required:["action","idempotency_key"],type:"object"},{additionalProperties:!1,properties:{action:{const:"sessions_unfinished",type:"string"},limit:{format:"uint",minimum:0,type:"integer"}},required:["action","limit"],type:"object"},{additionalProperties:!1,description:"Import hook analytics JSONL into the accounting ledger.",properties:{action:{const:"analytics_sync",type:"string"},scope:{$ref:"#/$defs/AdminCliScopeV1"}},required:["action","scope"],type:"object"},{additionalProperties:!1,properties:{action:{const:"analytics_diagnostics",type:"string"},all:{type:"boolean"},no_sync:{type:"boolean"},scope:{$ref:"#/$defs/AdminCliScopeV1"}},required:["action","scope","all","no_sync"],type:"object"},{additionalProperties:!1,description:"Record the served project's saved-token total.",properties:{action:{const:"registry_update",type:"string"},tokens:{format:"uint64",minimum:0,type:"integer"}},required:["action","tokens"],type:"object"},{additionalProperties:!1,properties:{action:{const:"registry_list",type:"string"},limit:{format:"uint",minimum:0,type:"integer"},project_arg:{description:"Checkout to mark active when the caller's connection names no\nproject.",type:["string","null"]},query:{type:["string","null"]}},required:["action","limit"],type:"object"},{additionalProperties:!1,properties:{action:{const:"registry_context",type:"string"},project_arg:{description:"Project path or alias; the caller's project when omitted.",type:["string","null"]}},required:["action"],type:"object"},{additionalProperties:!1,properties:{action:{const:"registry_empty",type:"string"}},required:["action"],type:"object"},{additionalProperties:!1,properties:{action:{const:"registry_project_tokens",type:"string"},project_args:{items:{type:"string"},type:"array"}},required:["action","project_args"],type:"object"},{additionalProperties:!1,description:"Plan, or with `apply` execute, collection of registry rows whose\ncheckout is gone.",properties:{action:{const:"registry_gc",type:"string"},apply:{type:"boolean"},prefix:{type:["string","null"]}},required:["action","apply"],type:"object"},{additionalProperties:!1,description:"One project's storage (`project_id` with `project_root`), or one page\nof the profile's.",properties:{action:{const:"storage_report",type:"string"},cursor:{default:null,type:["string","null"]},limit:{default:8,format:"uint",minimum:0,type:"integer"},project_id:{type:["string","null"]},project_root:{type:["string","null"]}},required:["action"],type:"object"},{additionalProperties:!1,properties:{action:{const:"gain_query",type:"string"},history:{type:"boolean"},project_arg:{type:["string","null"]},since:{format:"int64",type:"integer"}},required:["action","since","history"],type:"object"}],title:"AdminCliSurfaceRequestV1"},{$defs:{AdminCliAnalyticsImportV1:{additionalProperties:!1,properties:{imported:{format:"uint64",minimum:0,type:"integer"},sources:{description:"One row per hook JSONL source: `path`, `imported`, `skipped`, `error`.",items:!0,type:"array"}},required:["imported","sources"],type:"object"},AdminCliCostSummaryV1:{additionalProperties:!1,properties:{range:{type:"string"},summary:{$ref:"#/$defs/AdminCliCostTotalsV1"},today:{$ref:"#/$defs/AdminCliCostTodayV1"}},required:["range","summary","today"],type:"object"},AdminCliCostTodayV1:{additionalProperties:!1,properties:{provider_usage:!0},required:["provider_usage"],type:"object"},AdminCliCostTotalsV1:{additionalProperties:!1,properties:{efficiency_ratio:{description:"Saved over saved-plus-consumed; null when consumption is unmeasured.",format:"double",type:["number","null"]},provider_usage:{description:"The provider-usage cost summary as the session memory prices it."},tokens_saved:{format:"uint64",minimum:0,type:"integer"}},required:["provider_usage","tokens_saved"],type:"object"},AdminCliGainDayV1:{additionalProperties:!1,properties:{calls:{format:"uint64",minimum:0,type:"integer"},day:{description:"Start-of-day epoch seconds (UTC).",format:"int64",type:"integer"},saved_tokens:{format:"uint64",minimum:0,type:"integer"}},required:["day","saved_tokens","calls"],type:"object"},AdminCliGainHistoryV1:{additionalProperties:!1,properties:{history:{items:{$ref:"#/$defs/AdminCliGainDayV1"},type:"array"}},required:["history"],type:"object"},AdminCliGainTotalV1:{additionalProperties:!1,properties:{calls:{format:"uint64",minimum:0,type:"integer"},saved_tokens:{format:"uint64",minimum:0,type:"integer"}},required:["saved_tokens","calls"],type:"object"},AdminCliProjectTokenTotalV1:{additionalProperties:!1,description:"A project whose ledger could not be read reports a null total and the\nreason, never a measured zero.",properties:{error:{type:["string","null"]},project:{type:"string"},tokens:{format:"uint64",minimum:0,type:["integer","null"]}},required:["project"],type:"object"},AdminCliProjectTokensV1:{additionalProperties:!1,properties:{projects:{items:{$ref:"#/$defs/AdminCliProjectTokenTotalV1"},type:"array"}},required:["projects"],type:"object"},AdminCliRegistryContextV1:{oneOf:[{additionalProperties:!1,properties:{aliases:{description:"Alias rows exactly as the registry serializes them.",items:!0,type:"array"},profile_id:{type:"string"},project:{$ref:"#/$defs/PublicCodeProject"},status:{const:"ok",type:"string"},stores:{description:"Store rows exactly as the registry serializes them.",items:!0,type:"array"}},required:["status","profile_id","project","aliases","stores"],type:"object"},{additionalProperties:!1,description:"The call named no project and its connection has none.",properties:{project:{type:"null"},status:{const:"invalid",type:"string"}},required:["status","project"],type:"object"},{additionalProperties:!1,properties:{project:{type:"null"},status:{const:"not_found",type:"string"}},required:["status","project"],type:"object"}]},AdminCliRegistryEmptyV1:{additionalProperties:!1,properties:{empty:{type:"boolean"}},required:["empty"],type:"object"},AdminCliRegistryGcV1:{additionalProperties:!1,description:"The registry collection plan, with its deletion counters filled when it\nwas applied.",properties:{apply:{type:"boolean"},candidate_count:{format:"uint",minimum:0,type:"integer"},candidate_paths:{items:{type:"string"},type:"array"},candidates:{description:"Registry project rows exactly as the registry serializes them.",items:!0,type:"array"},code_project_candidate_count:{format:"uint",minimum:0,type:"integer"},deleted_code_project_count:{format:"uint",minimum:0,type:"integer"},deleted_count:{format:"uint",minimum:0,type:"integer"},deleted_storage_project_count:{format:"uint",minimum:0,type:"integer"},metadata_candidate_count:{format:"uint",minimum:0,type:"integer"},prefix:{type:["string","null"]},protected_code_project_count:{format:"uint",minimum:0,type:"integer"},protected_code_projects:{items:!0,type:"array"},storage_project_candidate_count:{format:"uint",minimum:0,type:"integer"},storage_project_candidates:{items:{type:"string"},type:"array"}},required:["apply","candidate_count","metadata_candidate_count","code_project_candidate_count","storage_project_candidate_count","protected_code_project_count","deleted_count","deleted_code_project_count","deleted_storage_project_count","candidate_paths","candidates","protected_code_projects","storage_project_candidates"],type:"object"},AdminCliRegistryListV1:{oneOf:[{additionalProperties:!1,properties:{limit:{format:"uint",minimum:0,type:"integer"},project_tree:{items:{$ref:"#/$defs/ProjectRepoGroup"},type:"array"},projects:{items:{$ref:"#/$defs/PublicCodeProject"},type:"array"},query:{type:["string","null"]},status:{const:"ok",type:"string"},summary:{$ref:"#/$defs/ProjectRegistrySummary"},truncated:{type:"boolean"}},required:["status","limit","truncated","summary","project_tree","projects"],type:"object"}]},AdminCliRegistryUpdateV1:{additionalProperties:!1,properties:{current:{format:"uint64",minimum:0,type:"integer"},previous:{description:"The total before this write; null when the ledger could not be read.",format:"uint64",minimum:0,type:["integer","null"]},previous_error:{type:["string","null"]}},required:["current"],type:"object"},AdminCliSessionSyncV1:{description:"The daemon session-sync owner's answer.",oneOf:[{additionalProperties:!1,properties:{accepted_at:{$ref:"#/$defs/UtcMicros"},idempotency_key:{type:"string"},operation_id:{type:"string"},status:{const:"accepted",type:"string"}},required:["status","operation_id","idempotency_key","accepted_at"],type:"object"},{additionalProperties:!1,description:"An identical sync was already running; this call joined it.",properties:{accepted_at:{$ref:"#/$defs/UtcMicros"},idempotency_key:{type:"string"},operation_id:{type:"string"},status:{const:"joined",type:"string"}},required:["status","operation_id","idempotency_key","accepted_at"],type:"object"},{additionalProperties:!1,properties:{coalesced_primary:{type:["string","null"]},completed_at:{$ref:"#/$defs/UtcMicros"},coverage:{items:{$ref:"#/$defs/SessionSyncSourceCoverageV1"},type:"array"},failure_codes:{items:{type:"string"},type:"array"},idempotency_key:{type:"string"},operation_id:{type:"string"},source:{$ref:"#/$defs/SessionSyncSourceV1"},source_frontiers:{items:{$ref:"#/$defs/SessionSyncSourceFrontierV1"},type:"array"},stats:{$ref:"#/$defs/SessionSyncStatsV1"},status:{const:"complete",type:"string"},termination:{$ref:"#/$defs/OperationTermination"}},required:["status","operation_id","idempotency_key","source","termination","stats","coverage","source_frontiers","failure_codes","completed_at"],type:"object"},{additionalProperties:!1,properties:{status:{const:"cancelled",type:"string"}},required:["status"],type:"object"},{additionalProperties:!1,properties:{status:{const:"deadline_exceeded",type:"string"}},required:["status"],type:"object"},{additionalProperties:!1,properties:{status:{const:"wrong_scope",type:"string"}},required:["status"],type:"object"},{additionalProperties:!1,properties:{reason_code:{type:"string"},status:{const:"unavailable",type:"string"}},required:["status","reason_code"],type:"object"}]},AdminCliStorageReportV1:{additionalProperties:!1,description:"One storage report page, or one project's report.",properties:{code_generation_retention:{items:!0,type:"array"},code_generation_retention_availability:{items:!0,type:"array"},coverage:!0,full_profile_size:!0,global_db_bytes:{format:"uint64",minimum:0,type:"integer"},profile_root:{type:"string"},stores:{description:"Report rows exactly as the retention report serializes them.",items:!0,type:"array"},unregistered_bytes:{format:"uint64",minimum:0,type:"integer"},unregistered_dir_count:{format:"uint",minimum:0,type:"integer"},user_sessions_db_bytes:{default:0,format:"uint64",minimum:0,type:"integer"}},required:["profile_root","stores","code_generation_retention","code_generation_retention_availability","unregistered_dir_count","unregistered_bytes","global_db_bytes","coverage"],type:"object"},AdminCliUnfinishedSessionsV1:{additionalProperties:!1,properties:{items:{description:"Workflow state rows exactly as the session store serializes them.",items:!0,type:"array"}},required:["items"],type:"object"},OperationTermination:_e,ProjectRegistryEntry:_f,ProjectRegistrySummary:_h,ProjectRepoGroup:_y,PublicCodeProject:_P,SessionSyncCoverageV1:{oneOf:[{properties:{outcome:{const:"complete",type:"string"}},required:["outcome"],type:"object"},{properties:{deferred_units:{format:"uint64",minimum:0,type:"integer"},outcome:{const:"partial",type:"string"}},required:["outcome","deferred_units"],type:"object"},{properties:{admitted_units:{format:"uint64",minimum:0,type:"integer"},outcome:{const:"backpressured",type:"string"},rejected_units:{format:"uint64",minimum:0,type:"integer"}},required:["outcome","admitted_units","rejected_units"],type:"object"}]},SessionSyncSourceCoverageV1:{properties:{coverage:{$ref:"#/$defs/SessionSyncCoverageV1"},store_scope:{type:"string"}},required:["store_scope","coverage"],type:"object"},SessionSyncSourceFrontierV1:{description:"Exact canonical observation cursor committed by one source/store authority.",properties:{committed_cursor_json:{type:"string"},scope_json:{type:"string"},source_json:{type:"string"},store_scope:{type:"string"}},required:["store_scope","source_json","scope_json","committed_cursor_json"],type:"object"},SessionSyncSourceV1:{description:"The command that started a session sync, without its options.",oneOf:[{const:"import_transcripts",description:"Hands its remaining historical catch-up to the background refresh\nworkers.",type:"string"},{const:"synchronize_git",description:"A bounded foreground pass; nothing resumes its unfinished coverage.",type:"string"}]},SessionSyncStatsV1:{properties:{commits_attributed:{format:"uint64",minimum:0,type:"integer"},messages_imported:{format:"uint64",minimum:0,type:"integer"},sessions_imported:{format:"uint64",minimum:0,type:"integer"},sessions_scanned:{format:"uint64",minimum:0,type:"integer"},skipped:{format:"uint64",minimum:0,type:"integer"},spans_written:{format:"uint64",minimum:0,type:"integer"}},required:["sessions_imported","messages_imported","sessions_scanned","spans_written","commits_attributed","skipped"],type:"object"},UtcMicros:bs},$schema:"https://json-schema.org/draft/2020-12/schema",anyOf:[{$ref:"#/$defs/AdminCliCostSummaryV1"},{$ref:"#/$defs/AdminCliSessionSyncV1"},{$ref:"#/$defs/AdminCliUnfinishedSessionsV1"},{$ref:"#/$defs/AdminCliAnalyticsImportV1"},{$ref:"#/$defs/AdminCliRegistryUpdateV1"},{$ref:"#/$defs/AdminCliRegistryListV1"},{$ref:"#/$defs/AdminCliRegistryContextV1"},{$ref:"#/$defs/AdminCliRegistryEmptyV1"},{$ref:"#/$defs/AdminCliProjectTokensV1"},{$ref:"#/$defs/AdminCliRegistryGcV1"},{$ref:"#/$defs/AdminCliStorageReportV1"},{$ref:"#/$defs/AdminCliGainHistoryV1"},{$ref:"#/$defs/AdminCliGainTotalV1"},{description:"The diagnostics report is the analytics bridge's open document; it\ndecodes last so it never claims another action's body."}],description:"One action's answer.",title:"AdminCliResultV1"},{$defs:{AutomaticFactReceiptStateV1:ft,AutomationReconcileScope:fa},$schema:"https://json-schema.org/draft/2020-12/schema",description:"Every action is a struct variant: an internally tagged unit variant would\nignore keys beside its tag instead of refusing them.",oneOf:[{additionalProperties:!1,description:"Read the project's local usage counter.",properties:{action:{const:"counter_get",type:"string"}},required:["action"],type:"object"},{additionalProperties:!1,description:"Reset the project's local usage counter to zero.",properties:{action:{const:"counter_reset",type:"string"}},required:["action"],type:"object"},{additionalProperties:!1,description:"Record the project's saved-token total in the profile registry and\nread it back beside the other projects' total.",properties:{action:{const:"status_accounting",type:"string"}},required:["action"],type:"object"},{additionalProperties:!1,description:"List terminal automatic-fact receipts.",properties:{action:{const:"automatic_fact_receipt_list",type:"string"},limit:{format:"uint",minimum:0,type:"integer"},state:{anyOf:[{$ref:"#/$defs/AutomaticFactReceiptStateV1"},{type:"null"}],description:"Only receipts in this state (default: every state)."}},required:["action","limit"],type:"object"},{additionalProperties:!1,description:"Read one automatic-fact receipt by its apply id.",properties:{action:{const:"automatic_fact_receipt_view",type:"string"},id:{type:"string"}},required:["action","id"],type:"object"},{additionalProperties:!1,description:"Reconcile automation schedulers with the saved configuration.",properties:{action:{const:"automation_reconcile",type:"string"},scope:{$ref:"#/$defs/AutomationReconcileScope"}},required:["action","scope"],type:"object"}],title:"AdminProjectSurfaceRequestV1"},{$defs:{AdminProjectCounterResetV1:{additionalProperties:!1,properties:{reset:{description:"Always true: a reset that did not settle is a refusal.",type:"boolean"}},required:["reset"],type:"object"},AdminProjectCounterV1:{additionalProperties:!1,properties:{counter:{format:"uint64",minimum:0,type:"integer"}},required:["counter"],type:"object"},AdminProjectStatusAccountingV1:{additionalProperties:!1,properties:{global_tokens_saved:{description:"Tokens the profile's other projects saved; null when they saved none.",format:"uint64",minimum:0,type:["integer","null"]},tokens_saved:{format:"uint64",minimum:0,type:"integer"}},required:["tokens_saved"],type:"object"},AutomaticFactAddRequestV1:{additionalProperties:!1,description:"The add-fact request an automatic apply recorded.",properties:{category:{$ref:"#/$defs/FactCategoryV1"},content:{type:"string"},entities:{items:{type:"string"},type:"array"},metadata:!0,source_label:{type:["string","null"]},tags:{items:{type:"string"},type:"array"},trust:{format:"double",type:"number"}},required:["content","category","tags","entities","trust","metadata"],type:"object"},AutomaticFactEvidenceV1:{additionalProperties:!1,description:"Automation evidence retained with the receipt.",properties:{evidence_hash:{type:["string","null"]},item:!0,validation:!0},type:"object"},AutomaticFactReceiptAvailabilityV1:{oneOf:[{additionalProperties:!1,properties:{state:{const:"available",type:"string"}},required:["state"],type:"object"}]},AutomaticFactReceiptListV1:{additionalProperties:!1,properties:{availability:{$ref:"#/$defs/AutomaticFactReceiptAvailabilityV1"},count:{format:"uint",minimum:0,type:"integer"},next_after_apply_id:{description:"Continue after this apply id; null on the last page.",type:["string","null"]},receipts:{items:{$ref:"#/$defs/AutomaticFactReceiptV1"},type:"array"}},required:["availability","count","receipts"],type:"object"},AutomaticFactReceiptStateV1:ft,AutomaticFactReceiptV1:{additionalProperties:!1,description:"One terminal automatic-fact apply receipt.",properties:{add_fact_request:{$ref:"#/$defs/AutomaticFactAddRequestV1"},applied_fact_id:{description:"Present when the fact was applied.",type:["string","null"]},apply_id:{type:"string"},evidence:{$ref:"#/$defs/AutomaticFactEvidenceV1"},operation_id:{type:"string"},quarantine_reason:{description:"Present when the fact was quarantined.",type:["string","null"]},recorded_at_micros:{format:"int64",type:"integer"},state:{$ref:"#/$defs/AutomaticFactReceiptStateV1"}},required:["apply_id","state","operation_id","add_fact_request","evidence","recorded_at_micros"],type:"object"},AutomaticFactReceiptViewV1:{additionalProperties:!1,properties:{receipt:{$ref:"#/$defs/AutomaticFactReceiptV1"}},required:["receipt"],type:"object"},AutomationReconcileScope:fa,AutomationSchedulerOwnerReconcileOutcome:{additionalProperties:!1,properties:{graph_db_path:{type:"string"},outcome:{$ref:"#/$defs/AutomationSchedulerReconcileOutcome"},project_id:{type:["string","null"]},scope_prefix:{type:["string","null"]},store_root:{type:"string"}},required:["store_root","graph_db_path","outcome"],type:"object"},AutomationSchedulerReconcileOutcome:{description:"What reconciling one automation scheduler did.",enum:["started","running_notified","exiting","finished","retiring","not_configured","lifecycle_inactive","owner_unavailable"],type:"string"},FactCategoryV1:h9,ProfileAutomationReconcileReport:{additionalProperties:!1,description:"Every cached project scheduler of the profile, reconciled.",properties:{cached_owners:{format:"uint",minimum:0,type:"integer"},outcomes:{items:{$ref:"#/$defs/AutomationSchedulerOwnerReconcileOutcome"},type:"array"},scope:{$ref:"#/$defs/AutomationReconcileScope",description:"Always `profile`."},uncached_projects:{$ref:"#/$defs/UncachedProjectReconcileOutcome"}},required:["scope","cached_owners","outcomes","uncached_projects"],type:"object"},ProjectAutomationReconcileReport:{additionalProperties:!1,description:"The served project's scheduler reconcile.",properties:{outcome:{$ref:"#/$defs/AutomationSchedulerReconcileOutcome"},scope:{$ref:"#/$defs/AutomationReconcileScope",description:"Always `project`."}},required:["scope","outcome"],type:"object"},UncachedProjectReconcileOutcome:{description:"A project whose scheduler is not cached reconciles when it next starts.",enum:["deferred_until_project_startup"],type:"string"}},$schema:"https://json-schema.org/draft/2020-12/schema",anyOf:[{$ref:"#/$defs/AdminProjectCounterV1"},{$ref:"#/$defs/AdminProjectCounterResetV1"},{$ref:"#/$defs/AdminProjectStatusAccountingV1"},{$ref:"#/$defs/AutomaticFactReceiptListV1"},{$ref:"#/$defs/AutomaticFactReceiptViewV1"},{$ref:"#/$defs/ProjectAutomationReconcileReport"},{$ref:"#/$defs/ProfileAutomationReconcileReport"}],description:"One action's result, in the shape the action has always answered.",title:"AdminProjectResultV1"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"`tracedecay_admin_sync` takes no arguments: it reconciles the served\nproject.",title:"AdminSyncSurfaceRequestV1",type:"object"},{$defs:{AdminSyncAdmissionV1:{description:"The code-index scheduler's admission of the reconcile.",oneOf:[{enum:["queued"],type:"string"},{const:"not_applicable",description:"Code indexing does not apply to this project.",type:"string"}]},AdminSyncReconcileScopeV1:{description:"What the reconcile covers.",enum:["authoritative_project"],type:"string"}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{project_root:{type:"string"},reconcile_scope:{$ref:"#/$defs/AdminSyncReconcileScopeV1"},status:{$ref:"#/$defs/AdminSyncAdmissionV1"}},required:["reconcile_scope","status","project_root"],title:"AdminSyncResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{depth:{description:"Maximum dependency traversal depth (default: 5, at most 10).",format:"uint32",minimum:0,type:["integer","null"]},files:{description:"List of changed file paths to analyze.",items:{type:"string"},type:"array"},filter:{description:"Custom glob pattern for test files (default: common test patterns).",type:["string","null"]}},required:["files"],title:"AffectedSurfaceRequestV1",type:"object"},{$defs:{AffectedRankingMetadataV1:{additionalProperties:!1,properties:{compatibility_field:{type:"string"},distance:{type:"string"},recommended_proximity:{items:{type:"string"},type:"array"},strategy:{type:"string"}},required:["strategy","distance","recommended_proximity","compatibility_field"],type:"object"},CodeIndexBuildBlockedReasonV1:fF,CodeIndexConvergenceParkedV1:fL,CodeIndexStalenessStateV1:fB,PrimitiveFreshnessStateV1:_i,PrimitiveIndexingStateV1:_o,PrimitiveSearchFreshnessV1:_d,RankedAffectedTestV1:{additionalProperties:!1,properties:{distance:{format:"uint",minimum:0,type:"integer"},path:{type:"string"},proximity:{type:"string"},rank:{format:"uint",minimum:0,type:"integer"}},required:["path","rank","distance","proximity"],type:"object"}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{affected_tests:{items:{type:"string"},type:"array"},changed_files:{items:{type:"string"},type:"array"},count:{format:"uint",minimum:0,type:"integer"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},ranked_tests:{items:{$ref:"#/$defs/RankedAffectedTestV1"},type:"array"},ranking_metadata:{$ref:"#/$defs/AffectedRankingMetadataV1"},recommended_tests:{description:"Tests within two dependency hops of a changed file.",items:{type:"string"},type:"array"}},required:["changed_files","affected_tests","count","ranked_tests","recommended_tests","ranking_metadata"],title:"AffectedResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Opaque daemon-minted handle accepted by the first feedback read invocation.",properties:{request_handle:{type:"string"}},required:["request_handle"],title:"FeedbackHandleRequestV1",type:"object"},{$defs:{AgentInstanceId:mH,CodeGenerationId:fz,CommitId:fX,FeedbackContentIdentityV1:yh,FeedbackCycleId:yy,FeedbackImpactStateV1:yP,FeedbackResultId:yq,FeedbackScopeV1:yI,FeedbackTargetV1:yx,FileOccurrenceId:yj,HostInstanceId:ge,ManifestDigest:gj,ProjectId:_m,RepositoryId:_z,RetrievalAnchorId:_J,SessionId:vv,SourceSpan:vF,SymbolOccurrenceId:vJ,WorktreeId:So},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Canonical affected-tests projection returned by `affected_tests`.",properties:{affected_tests:{items:{$ref:"#/$defs/SymbolOccurrenceId"},type:"array"},content_identity:{anyOf:[{$ref:"#/$defs/FeedbackContentIdentityV1"},{type:"null"}]},cycle_id:{$ref:"#/$defs/FeedbackCycleId"},evidence_anchors:{items:{$ref:"#/$defs/RetrievalAnchorId"},type:"array"},result_id:{$ref:"#/$defs/FeedbackResultId"},scope:{$ref:"#/$defs/FeedbackScopeV1"},state:{anyOf:[{$ref:"#/$defs/FeedbackImpactStateV1"},{type:"null"}]},target:{anyOf:[{$ref:"#/$defs/FeedbackTargetV1"},{type:"null"}]}},required:["result_id","cycle_id","scope","affected_tests","evidence_anchors"],title:"CanonicalAffectedTestsProjectionV1",type:"object"},{$defs:{AnalyticsScopeV1:mJ,AnalyticsSectionV1:{enum:["tools","hints","facts","automation"],type:"string"}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{scope:{anyOf:[{$ref:"#/$defs/AnalyticsScopeV1"},{type:"null"}],description:'"project" (default) scopes analytics_events to the resolved project;\n"all" reports across every registered project.'},section:{anyOf:[{$ref:"#/$defs/AnalyticsSectionV1"},{type:"null"}],description:"Optional filter to a single section. Omit to return all sections."},window_days:{description:"Lookback window in days for events and automation runs (default: 14,\n1-365).",format:"uint32",maximum:365,minimum:1,type:["integer","null"]}},title:"AnalyticsSurfaceRequestV1",type:"object"},{$defs:{AnalyticsAutomationJobOutcomesV1:{additionalProperties:!1,properties:{failed:{format:"int64",type:"integer"},job:{type:"string"},other:{format:"int64",type:"integer"},skipped:{format:"int64",type:"integer"},succeeded:{format:"int64",type:"integer"}},required:["job","succeeded","failed","skipped","other"],type:"object"},AnalyticsAutomationOutcomesV1:{additionalProperties:!1,description:"`available` is always `true`.",properties:{available:{type:"boolean"},by_job:{items:{$ref:"#/$defs/AnalyticsAutomationJobOutcomesV1"},type:"array"},dashboard_root:{type:"string"},records_considered:{format:"uint",minimum:0,type:"integer"},records_in_window:{format:"uint",minimum:0,type:"integer"},records_truncated:{type:"boolean"}},required:["available","dashboard_root","records_considered","records_in_window","records_truncated","by_job"],type:"object"},AnalyticsAutomationSectionV1:{anyOf:[{$ref:"#/$defs/AnalyticsAutomationOutcomesV1"},{$ref:"#/$defs/AnalyticsLedgerUnavailableV1"},{$ref:"#/$defs/AnalyticsSectionUnavailableV1"}],description:"The automation run outcomes of the resolved project's ledger, or why the\nledger is unavailable."},AnalyticsCanonicalCallNameV1:{additionalProperties:!1,description:"A recorded event name that resolved to a canonical tool under another\nspelling.",properties:{calls:{format:"int64",type:"integer"},canonical_tool_name:{type:"string"},errors:{format:"int64",type:"integer"},event_name:{type:"string"}},required:["event_name","canonical_tool_name","calls","errors"],type:"object"},AnalyticsEventCallNameV1:{additionalProperties:!1,description:"A recorded event name with no advertised canonical tool.",properties:{calls:{format:"int64",type:"integer"},errors:{format:"int64",type:"integer"},event_name:{type:"string"}},required:["event_name","calls","errors"],type:"object"},AnalyticsFactFunnelV1:{additionalProperties:!1,description:"`available` is always `true`.",properties:{available:{type:"boolean"},facts:{format:"uint64",minimum:0,type:"integer"},facts_rated:{format:"uint64",minimum:0,type:"integer"},facts_retrieved:{format:"uint64",minimum:0,type:"integer"},helpful_feedback:{format:"uint64",minimum:0,type:"integer"},project_root:{type:"string"},retrievals:{format:"uint64",minimum:0,type:"integer"},unhelpful_feedback:{format:"uint64",minimum:0,type:"integer"}},required:["available","project_root","facts","retrievals","facts_retrieved","helpful_feedback","unhelpful_feedback","facts_rated"],type:"object"},AnalyticsFactsSectionV1:{anyOf:[{$ref:"#/$defs/AnalyticsFactFunnelV1"},{$ref:"#/$defs/AnalyticsProjectSectionUnavailableV1"},{$ref:"#/$defs/AnalyticsSectionUnavailableV1"}],description:"The fact-store funnel of the resolved project, or why it is unavailable.\n\nThe variants are distinguished by their exact field sets, so each one\ndenies unknown fields and the most specific shape is tried first."},AnalyticsHintCategoryV1:{properties:{category:{type:"string"},emitted:{format:"int64",type:"integer"},followed:{format:"int64",type:"integer"},ignored:{format:"int64",type:"integer"},suppressed:{format:"int64",type:"integer"}},required:["category","emitted","followed","ignored","suppressed"],type:"object"},AnalyticsHintsPayloadV1:{properties:{available:{type:"boolean"},by_category:{items:{$ref:"#/$defs/AnalyticsHintCategoryV1"},type:"array"},error:{default:null,type:["string","null"]},source:{type:"string"}},required:["available","source","by_category"],type:"object"},AnalyticsLedgerUnavailableV1:{additionalProperties:!1,description:"The ledger exists but failed to read. `available` is always `false`.",properties:{available:{type:"boolean"},dashboard_root:{type:"string"},reason:{type:"string"}},required:["available","reason","dashboard_root"],type:"object"},AnalyticsModeReadModelV1:mB,AnalyticsModeV1:mK,AnalyticsProjectSectionUnavailableV1:{additionalProperties:!1,description:"A project-scoped section whose store failed to read. `available` is\nalways `false`.",properties:{available:{type:"boolean"},project_root:{type:"string"},reason:{type:"string"}},required:["available","reason","project_root"],type:"object"},AnalyticsReportStatusV1:{description:"The settled status of an analytics report.",enum:["ok"],type:"string"},AnalyticsScopeV1:mJ,AnalyticsSectionUnavailableV1:{additionalProperties:!1,description:"A section the report could not read. `available` is always `false`.",properties:{available:{type:"boolean"},reason:{type:"string"}},required:["available","reason"],type:"object"},AnalyticsTierCountsV1:{additionalProperties:!1,properties:{calls:{format:"int64",type:"integer"},errors:{format:"int64",type:"integer"},tier:{type:"string"}},required:["tier","calls","errors"],type:"object"},AnalyticsToolsSectionV1:{additionalProperties:!1,properties:{aliased_call_names:{items:{$ref:"#/$defs/AnalyticsCanonicalCallNameV1"},type:"array"},available:{type:"boolean"},available_defined_tool_count:{format:"uint",minimum:0,type:"integer"},bound_internal_call_names:{items:{$ref:"#/$defs/AnalyticsEventCallNameV1"},type:"array"},called_available_defined_tool_count:{format:"uint",minimum:0,type:"integer"},raw_distinct_event_name_count:{format:"uint",minimum:0,type:"integer"},tiers:{items:{$ref:"#/$defs/AnalyticsTierCountsV1"},type:"array"},top_tools:{items:{$ref:"#/$defs/AnalyticsTopToolV1"},type:"array"},unknown_or_retired_call_names:{items:{$ref:"#/$defs/AnalyticsEventCallNameV1"},type:"array"},zero_call_available_defined_tools:{$ref:"#/$defs/AnalyticsZeroCallToolsV1"}},required:["available","tiers","top_tools","raw_distinct_event_name_count","called_available_defined_tool_count","available_defined_tool_count","aliased_call_names","bound_internal_call_names","unknown_or_retired_call_names","zero_call_available_defined_tools"],type:"object"},AnalyticsTopToolV1:{additionalProperties:!1,properties:{calls:{format:"int64",type:"integer"},errors:{format:"int64",type:"integer"},tier:{type:"string"},tool_name:{type:"string"}},required:["tool_name","tier","calls","errors"],type:"object"},AnalyticsZeroCallToolsV1:{additionalProperties:!1,properties:{count:{format:"uint",minimum:0,type:"integer"},sample:{items:{type:"string"},type:"array"},sample_truncated:{type:"boolean"}},required:["count","sample","sample_truncated"],type:"object"},ComparisonDispositionV1:fY,CostsReadModelV1:hO,CoverageStateV1:hM,LatencyDistributionReadModelV1:ga,MetricCalibrationV1:gA,MetricCohortV1:gW,MetricCoverageV1:gM,MetricEvidenceClassV1:gN,MetricProvenanceV1:gz,MetricSourceV1:gD,MetricTemporalV1:gF,MetricUncertaintyV1:gL,MetricValueV1:gU,ObservabilityHorizonV1:g6,ObservatoryReadModelV1:g9,PerformanceComparisonReadModelV1:_r,ProviderLatencyReadModelV1:_V,RejectedArgumentAnalyticsV1:_E,RejectedArgumentErrorClassV1:_A,RejectedArgumentGroupV1:_W,RejectedArgumentNameV1:_M,RejectedArgumentSurfaceV1:_N},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{automation:{anyOf:[{$ref:"#/$defs/AnalyticsAutomationSectionV1"},{type:"null"}]},costs:{anyOf:[{$ref:"#/$defs/CostsReadModelV1"},{type:"null"}],description:"Present only when no section filter was requested."},event_count:{format:"int64",type:"integer"},event_count_truncated:{type:"boolean"},facts:{anyOf:[{$ref:"#/$defs/AnalyticsFactsSectionV1"},{type:"null"}]},hints:{anyOf:[{$ref:"#/$defs/AnalyticsHintsPayloadV1"},{type:"null"}]},observatory:{anyOf:[{$ref:"#/$defs/ObservatoryReadModelV1"},{type:"null"}],description:"Present only when no section filter was requested."},project_id:{description:'The canonical analytics project key; `None` for `scope: "all"`.',type:["string","null"]},project_root:{type:"string"},scope:{$ref:"#/$defs/AnalyticsScopeV1"},since:{format:"int64",type:"integer"},status:{$ref:"#/$defs/AnalyticsReportStatusV1"},tools:{anyOf:[{$ref:"#/$defs/AnalyticsToolsSectionV1"},{type:"null"}]},window_days:{format:"uint32",minimum:0,type:"integer"}},required:["status","scope","project_root","window_days","since","event_count","event_count_truncated"],title:"AnalyticsResultV1",type:"object"},{$defs:{ManifestDigest:gj,NativeIntegrationApprovalId:gB,NativeIntegrationPreviewId:gZ,NativeIntegrationTransactionId:g1},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Exact one-use apply request.\n\nApply accepts only an unexpired preview identity/digest plus a one-use\ncontent-bound approval. Arbitrary Git arguments, caller-supplied paths,\nSHAs, patches, commit lists, messages, environment, or config are\nunrepresentable.",properties:{approval_digest:{$ref:"#/$defs/ManifestDigest"},approval_id:{$ref:"#/$defs/NativeIntegrationApprovalId"},preview_digest:{$ref:"#/$defs/ManifestDigest"},preview_id:{$ref:"#/$defs/NativeIntegrationPreviewId"},transaction_id:{$ref:"#/$defs/NativeIntegrationTransactionId"}},required:["preview_id","preview_digest","approval_id","approval_digest","transaction_id"],title:"NativeIntegrationApplySurfaceRequest",type:"object"},{$defs:{ActorId:mU,BranchStackEdgeV1:fv,BranchStackId:fb,BranchStackNodeV1:f$,BranchStackRevisionId:fS,BranchStackRevisionV1:fk,BranchStackSourceV1:fw,CapabilityId:fO,CodeGenerationId:fz,CommitId:fX,ContentDigest:ht,GitOidV1:yJ,GitOperationStateV1:yZ,ManifestDigest:gj,MechanicalIntegrationModeV1:gC,NativeIntegrationAnalysisAnchorV1:{additionalProperties:!1,description:"Source-local anchor for a semantic conflict finding.",properties:{generation_id:{$ref:"#/$defs/CodeGenerationId"},logical_path:{type:"string"},source_span:{$ref:"#/$defs/SourceSpan"}},required:["generation_id","logical_path","source_span"],type:"object"},NativeIntegrationAnalysisCoverageV1:{description:"Completeness of one independently evaluated semantic evidence lane.",enum:["complete","partial","unsupported"],type:"string"},NativeIntegrationAnalysisGapV1:{description:"Why one semantic evidence lane cannot authorize integration.",enum:["parser_failure","unresolved_required_edge","withheld_source","stale_evidence","unsupported_language","dynamic_schema","unbound_migration_order","capacity_unavailable","authority_unavailable"],type:"string"},NativeIntegrationAnalysisLaneV1:{additionalProperties:!1,description:"Coverage and exact gaps for one independently evaluated analysis lane.",properties:{coverage:{$ref:"#/$defs/NativeIntegrationAnalysisCoverageV1"},gaps:{items:{$ref:"#/$defs/NativeIntegrationAnalysisGapV1"},type:"array"}},required:["coverage","gaps"],type:"object"},NativeIntegrationAnalysisReportV1:{additionalProperties:!1,description:"Daemon-produced semantic evidence for one exact native candidate tree.",properties:{analyzer_revision:{type:"string"},candidate:{$ref:"#/$defs/NativeIntegrationGenerationBindingV1"},conflicts:{items:{$ref:"#/$defs/NativeIntegrationSemanticConflictV1"},type:"array"},destination:{$ref:"#/$defs/NativeIntegrationGenerationBindingV1"},digest:{$ref:"#/$defs/ManifestDigest"},graph:{$ref:"#/$defs/NativeIntegrationAnalysisLaneV1"},merge_base:{$ref:"#/$defs/NativeIntegrationGenerationBindingV1"},migrations:{$ref:"#/$defs/NativeIntegrationAnalysisLaneV1"},schema:{$ref:"#/$defs/NativeIntegrationAnalysisLaneV1"},source:{$ref:"#/$defs/NativeIntegrationGenerationBindingV1"},tests:{$ref:"#/$defs/NativeIntegrationAnalysisLaneV1"}},required:["merge_base","source","destination","candidate","graph","tests","schema","migrations","conflicts","analyzer_revision","digest"],type:"object"},NativeIntegrationApprovalId:gB,NativeIntegrationDirectionV1:gK,NativeIntegrationGenerationBindingV1:{additionalProperties:!1,description:"One immutable code-generation binding used by native integration analysis.",properties:{content_identity:{$ref:"#/$defs/ContentDigest"},generation_id:{$ref:"#/$defs/CodeGenerationId"},project_id:{$ref:"#/$defs/ProjectId"},reference:{anyOf:[{$ref:"#/$defs/RefId"},{type:"null"}]},repository_id:{$ref:"#/$defs/RepositoryId"},seal_digest:{$ref:"#/$defs/ManifestDigest"},snapshot_digest:{$ref:"#/$defs/ManifestDigest"},source_revision:{anyOf:[{$ref:"#/$defs/GitOidV1"},{type:"null"}]},source_tree:{$ref:"#/$defs/GitOidV1"},worktree_id:{anyOf:[{$ref:"#/$defs/WorktreeId"},{type:"null"}]}},required:["generation_id","project_id","repository_id","snapshot_digest","content_identity","source_tree","seal_digest"],type:"object"},NativeIntegrationPhaseV1:{description:"Durable transaction phase. `RefCommitStarted` is the cancellation boundary.",enum:["prepared","candidate_verified","ref_commit_started","final_state_verification","terminal"],type:"string"},NativeIntegrationPreviewDispositionV1:gJ,NativeIntegrationPreviewId:gZ,NativeIntegrationSealedStackSnapshotV1:gQ,NativeIntegrationSelectionBindingV1:gX,NativeIntegrationSemanticConflictKindV1:{description:"Static conflict class produced from canonical generation evidence.",enum:["divergent_symbol","signature_dependent","test_write_interaction","divergent_schema","migration_order"],type:"string"},NativeIntegrationSemanticConflictV1:{additionalProperties:!1,description:"One deterministic conflict finding with source evidence from both branches.",properties:{destination:{$ref:"#/$defs/NativeIntegrationAnalysisAnchorV1"},evidence_digest:{$ref:"#/$defs/ManifestDigest"},kind:{$ref:"#/$defs/NativeIntegrationSemanticConflictKindV1"},source:{$ref:"#/$defs/NativeIntegrationAnalysisAnchorV1"}},required:["kind","source","destination","evidence_digest"],type:"object"},NativeIntegrationSnapshotProjectionV1:{additionalProperties:!1,description:"Bounded projection of one frozen selection.",properties:{destination_ref:{$ref:"#/$defs/RefId"},frozen_at:{$ref:"#/$defs/UtcMicros"},inventory_epoch:{$ref:"#/$defs/WorktreeInventoryEpoch"},project_id:{$ref:"#/$defs/ProjectId"},repository_id:{$ref:"#/$defs/RepositoryId"},selection_digest:{$ref:"#/$defs/ManifestDigest"},source_ref:{$ref:"#/$defs/RefId"}},required:["selection_digest","project_id","repository_id","source_ref","destination_ref","inventory_epoch","frozen_at"],type:"object"},NativeIntegrationStatusProjectionV1:{additionalProperties:!1,description:"Bounded projection of one durable transaction status.",properties:{cancellation_requested:{type:"boolean"},destination_ref:{$ref:"#/$defs/RefId"},phase:{$ref:"#/$defs/NativeIntegrationPhaseV1"},phase_revision:{format:"uint64",minimum:0,type:"integer"},preview_digest:{$ref:"#/$defs/ManifestDigest"},preview_id:{$ref:"#/$defs/NativeIntegrationPreviewId"},repository_id:{$ref:"#/$defs/RepositoryId"},terminal_outcome:{anyOf:[{$ref:"#/$defs/NativeIntegrationTerminalOutcomeV1"},{type:"null"}]},transaction_id:{$ref:"#/$defs/NativeIntegrationTransactionId"},updated_at:{$ref:"#/$defs/UtcMicros"}},required:["transaction_id","preview_id","preview_digest","repository_id","destination_ref","phase","phase_revision","cancellation_requested","updated_at"],type:"object"},NativeIntegrationSurfaceUnavailableV1:{description:"Why a native-integration operation produced no advancing state.\n\nEvery variant is read-only and truthful. None of them authorizes apply, and\na denied or absent target is reported indistinguishably from an unavailable\nauthority so no identity, path, count, or topology leaks.",oneOf:[{enum:["partial","stale","denied","reset_required","durability_uncertain","cancelled","approval_conflict","transaction_conflict","recovery_required","needs_inspection","unknown_transaction"],type:"string"},{const:"authority_unmounted",description:"No native-integration runtime authority is mounted for this daemon.",type:"string"}]},NativeIntegrationTerminalOutcomeV1:gY,NativeIntegrationTransactionId:g1,NativeIntegrationUnavailabilityV1:g0,NativeWorktreeSurfaceResultV1:{oneOf:[{oneOf:[{properties:{coverage:{$ref:"#/$defs/WorktreeCoverageV1"},digest:{$ref:"#/$defs/ManifestDigest"},entries:{items:{$ref:"#/$defs/WorktreeInventoryEntryV1"},type:"array"},epoch:{$ref:"#/$defs/WorktreeInventoryEpoch"},observed_at:{$ref:"#/$defs/UtcMicros"},scope_set_digest:{$ref:"#/$defs/ManifestDigest"},scope_set_id:{$ref:"#/$defs/ScopeSetId"},scope_set_revision:{$ref:"#/$defs/ScopeSetRevision"},snapshot_id:{$ref:"#/$defs/WorktreeInventorySnapshotId"},state:{const:"snapshot",type:"string"}},required:["state","scope_set_id","scope_set_revision","scope_set_digest","snapshot_id","epoch","entries","coverage","observed_at","digest"],type:"object"},{properties:{state:{const:"stale",type:"string"}},required:["state"],type:"object"},{properties:{state:{const:"denied",type:"string"}},required:["state"],type:"object"},{properties:{state:{const:"unavailable",type:"string"}},required:["state"],type:"object"}],properties:{operation:{const:"inventory",type:"string"}},required:["operation"],type:"object"},{oneOf:[{properties:{clean:{$ref:"#/$defs/WorktreeObservationV1",description:"Whether Git status contains no tracked or untracked changes."},head:{anyOf:[{$ref:"#/$defs/GitOidV1"},{type:"null"}]},holder:{$ref:"#/$defs/WorktreeObservationV1"},inspection_digest:{$ref:"#/$defs/ManifestDigest"},kind:{anyOf:[{$ref:"#/$defs/WorktreeKindV1"},{type:"null"}]},locked:{$ref:"#/$defs/WorktreeObservationV1"},observed_at:{$ref:"#/$defs/UtcMicros"},operation_state:{anyOf:[{$ref:"#/$defs/GitOperationStateV1"},{type:"null"}]},presence:{$ref:"#/$defs/WorktreePresenceV1"},reference:{anyOf:[{$ref:"#/$defs/RefId"},{type:"null"}]},state:{const:"inspection",type:"string"},target:{$ref:"#/$defs/NativeWorktreeTargetV1"},unique_data:{$ref:"#/$defs/WorktreeObservationV1"},worktree_id:{$ref:"#/$defs/WorktreeId"}},required:["state","target","presence","worktree_id","clean","locked","holder","unique_data","observed_at","inspection_digest"],type:"object"},{properties:{state:{const:"stale",type:"string"}},required:["state"],type:"object"},{properties:{state:{const:"foreign",type:"string"}},required:["state"],type:"object"},{properties:{state:{const:"denied",type:"string"}},required:["state"],type:"object"},{properties:{state:{const:"unavailable",type:"string"}},required:["state"],type:"object"}],properties:{operation:{const:"inspection",type:"string"}},required:["operation"],type:"object"},{oneOf:[{properties:{confirmation_digest:{$ref:"#/$defs/ManifestDigest"},confirmed_at:{$ref:"#/$defs/UtcMicros"},inspection_digest:{$ref:"#/$defs/ManifestDigest"},state:{const:"confirmed",type:"string"},target:{$ref:"#/$defs/NativeWorktreeTargetV1"}},required:["state","target","inspection_digest","confirmation_digest","confirmed_at"],type:"object"},{properties:{state:{const:"stale",type:"string"}},required:["state"],type:"object"},{properties:{state:{const:"denied",type:"string"}},required:["state"],type:"object"},{properties:{state:{const:"needs_inspection",type:"string"}},required:["state"],type:"object"},{properties:{state:{const:"unavailable",type:"string"}},required:["state"],type:"object"}],properties:{operation:{const:"confirmation",type:"string"}},required:["operation"],type:"object"},{$ref:"#/$defs/WorktreeCleanupRemovalV1",properties:{operation:{const:"removal",type:"string"}},required:["operation"],type:"object"},{$ref:"#/$defs/WorktreeCleanupReconciliationV1",properties:{operation:{const:"reconciliation",type:"string"}},required:["operation"],type:"object"}]},NativeWorktreeTargetV1:g2,ProjectId:_m,RefId:_T,RepositoryId:_z,ResolvedScope:_U,ScopeSetId:vc,ScopeSetRevision:vl,SourceSpan:vF,StackNodeId:vH,UtcMicros:bs,WorktreeCleanupReconciliationV1:{oneOf:[{properties:{confirmation_digest:{$ref:"#/$defs/ManifestDigest"},observed_at:{$ref:"#/$defs/UtcMicros"},state:{const:"removed",type:"string"}},required:["state","confirmation_digest","observed_at"],type:"object"},{properties:{state:{const:"still_present",type:"string"}},required:["state"],type:"object"},{properties:{state:{const:"durability_uncertain",type:"string"}},required:["state"],type:"object"},{properties:{state:{const:"stale",type:"string"}},required:["state"],type:"object"},{properties:{state:{const:"denied",type:"string"}},required:["state"],type:"object"},{properties:{state:{const:"unavailable",type:"string"}},required:["state"],type:"object"}]},WorktreeCleanupRemovalV1:{oneOf:[{properties:{confirmation_digest:{$ref:"#/$defs/ManifestDigest"},observed_at:{$ref:"#/$defs/UtcMicros"},state:{const:"removed",type:"string"}},required:["state","confirmation_digest","observed_at"],type:"object"},{properties:{confirmation_digest:{$ref:"#/$defs/ManifestDigest"},observed_at:{$ref:"#/$defs/UtcMicros"},state:{const:"already_removed",type:"string"}},required:["state","confirmation_digest","observed_at"],type:"object"},{properties:{state:{const:"denied",type:"string"}},required:["state"],type:"object"},{properties:{state:{const:"stale",type:"string"}},required:["state"],type:"object"},{properties:{state:{const:"durability_uncertain",type:"string"}},required:["state"],type:"object"},{properties:{state:{const:"unavailable",type:"string"}},required:["state"],type:"object"}]},WorktreeCoverageV1:{enum:["complete","partial"],type:"string"},WorktreeId:So,WorktreeInventoryEntryV1:{additionalProperties:!1,properties:{clean:{$ref:"#/$defs/WorktreeObservationV1",description:"Whether Git status contains no tracked or untracked changes."},evidence_digest:{$ref:"#/$defs/ManifestDigest"},head:{anyOf:[{$ref:"#/$defs/GitOidV1"},{type:"null"}]},holder:{$ref:"#/$defs/WorktreeObservationV1"},kind:{anyOf:[{$ref:"#/$defs/WorktreeKindV1"},{type:"null"}]},locked:{$ref:"#/$defs/WorktreeObservationV1"},observed_at:{$ref:"#/$defs/UtcMicros"},operation:{anyOf:[{$ref:"#/$defs/GitOperationStateV1"},{type:"null"}]},presence:{$ref:"#/$defs/WorktreePresenceV1"},reference:{anyOf:[{$ref:"#/$defs/RefId"},{type:"null"}]},target:{$ref:"#/$defs/NativeWorktreeTargetV1"},unique_data:{$ref:"#/$defs/WorktreeObservationV1"},worktree_id:{anyOf:[{$ref:"#/$defs/WorktreeId"},{type:"null"}]}},required:["target","presence","clean","locked","holder","unique_data","observed_at","evidence_digest"],type:"object"},WorktreeInventoryEpoch:Sn,WorktreeInventorySnapshotId:Sa,WorktreeKindV1:{description:"Native Git worktree kind visible to an authorized caller.",enum:["main","linked","bare"],type:"string"},WorktreeObservationV1:{enum:["yes","no","unknown"],type:"string"},WorktreePresenceV1:{description:"Presence is intentionally not a bool: stale, unavailable and foreign are\npolicy-safe states with different reconciliation consequences.",enum:["present","stale","unavailable","foreign"],type:"string"}},$schema:"https://json-schema.org/draft/2020-12/schema",description:"One typed result for every native-integration surface operation.",oneOf:[{additionalProperties:!1,description:"Frozen selection summary plus the exact sealed proof preflight accepts.",properties:{outcome:{const:"stack_snapshot",type:"string"},sealed_snapshot:{$ref:"#/$defs/NativeIntegrationSealedStackSnapshotV1"},selection:{$ref:"#/$defs/NativeIntegrationSnapshotProjectionV1"}},required:["outcome","selection","sealed_snapshot"],type:"object"},{additionalProperties:!1,description:"Bounded projection of one immutable preview.\n\nCandidate trees, conflict bodies, and ordered commit objects stay behind the\npreview digest: the surface reports identity, classification, and expiry so\na caller can approve exactly this preview and nothing else.",properties:{analysis:{anyOf:[{$ref:"#/$defs/NativeIntegrationAnalysisReportV1"},{type:"null"}]},created_at:{$ref:"#/$defs/UtcMicros"},disposition:{$ref:"#/$defs/NativeIntegrationPreviewDispositionV1"},expires_at:{$ref:"#/$defs/UtcMicros"},ordered_commit_count:{format:"uint32",minimum:0,type:"integer"},outcome:{const:"preview",type:"string"},preview_digest:{$ref:"#/$defs/ManifestDigest"},preview_id:{$ref:"#/$defs/NativeIntegrationPreviewId"},selection:{$ref:"#/$defs/NativeIntegrationSnapshotProjectionV1"}},required:["outcome","preview_id","preview_digest","selection","disposition","ordered_commit_count","created_at","expires_at"],type:"object"},{additionalProperties:!1,description:"Bounded projection of one issued one-use approval.\n\nThe approval digest is the caller's proof-of-issuance handle for apply;\nthe preview binding and expiry are audit metadata. No preview body,\ncandidate tree, or commit content crosses this boundary.",properties:{approval_digest:{$ref:"#/$defs/ManifestDigest"},approval_id:{$ref:"#/$defs/NativeIntegrationApprovalId"},capability:{$ref:"#/$defs/CapabilityId"},expires_at:{$ref:"#/$defs/UtcMicros"},issued_at:{$ref:"#/$defs/UtcMicros"},outcome:{const:"approval",type:"string"},preview_digest:{$ref:"#/$defs/ManifestDigest"},preview_id:{$ref:"#/$defs/NativeIntegrationPreviewId"},principal:{$ref:"#/$defs/ActorId"},transaction_id:{$ref:"#/$defs/NativeIntegrationTransactionId",description:"Daemon-minted identity consumed verbatim by apply, status, and cancel."}},required:["outcome","transaction_id","approval_id","preview_id","preview_digest","principal","capability","issued_at","expires_at","approval_digest"],type:"object"},{additionalProperties:!1,description:"Bounded projection of one durable terminal receipt.\n\nThe receipt digest and final ref/tree identity are audit metadata; no patch,\nworktree body, or source content crosses this boundary.",properties:{completed_at:{$ref:"#/$defs/UtcMicros"},final_ref_tip:{type:"string"},final_tree:{type:"string"},outcome:{const:"receipt",type:"string"},receipt_digest:{$ref:"#/$defs/ManifestDigest"},status:{$ref:"#/$defs/NativeIntegrationStatusProjectionV1"},terminal_outcome:{$ref:"#/$defs/NativeIntegrationTerminalOutcomeV1"}},required:["outcome","status","terminal_outcome","final_ref_tip","final_tree","completed_at","receipt_digest"],type:"object"},{additionalProperties:!1,description:"Bounded projection of one durable transaction status.",properties:{cancellation_requested:{type:"boolean"},destination_ref:{$ref:"#/$defs/RefId"},outcome:{const:"status",type:"string"},phase:{$ref:"#/$defs/NativeIntegrationPhaseV1"},phase_revision:{format:"uint64",minimum:0,type:"integer"},preview_digest:{$ref:"#/$defs/ManifestDigest"},preview_id:{$ref:"#/$defs/NativeIntegrationPreviewId"},repository_id:{$ref:"#/$defs/RepositoryId"},terminal_outcome:{anyOf:[{$ref:"#/$defs/NativeIntegrationTerminalOutcomeV1"},{type:"null"}]},transaction_id:{$ref:"#/$defs/NativeIntegrationTransactionId"},updated_at:{$ref:"#/$defs/UtcMicros"}},required:["outcome","transaction_id","preview_id","preview_digest","repository_id","destination_ref","phase","phase_revision","cancellation_requested","updated_at"],type:"object"},{description:"Cancellation disposition. After the native commit point the committed\nreceipt is returned instead of a cancellation claim.",oneOf:[{enum:["cancellation_requested","commit_point_passed"],type:"string"},{properties:{already_terminal:{$ref:"#/$defs/NativeIntegrationTerminalOutcomeV1"}},required:["already_terminal"],type:"object"}],properties:{outcome:{const:"cancellation",type:"string"}},required:["outcome"],type:"object"},{$ref:"#/$defs/NativeWorktreeSurfaceResultV1",properties:{outcome:{const:"worktree",type:"string"}},required:["outcome"],type:"object"},{properties:{outcome:{const:"unavailable",type:"string"},reason:{$ref:"#/$defs/NativeIntegrationSurfaceUnavailableV1"}},required:["outcome","reason"],type:"object"}],title:"NativeIntegrationSurfaceResultV1"},{$defs:{ManifestDigest:gj,NativeIntegrationPreviewId:gZ},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Exact approval-issuance request (the owner-decided sixth operation).\n\nThe caller names one unexpired preview by exact identity *and* digest;\napproving an identity without its content digest is unrepresentable. The\ndaemon mints the one-use approval bound to the requesting principal, the\napply capability, the current grant lineage, and a bounded expiry, none\nof which the caller can choose.",properties:{preview_digest:{$ref:"#/$defs/ManifestDigest"},preview_id:{$ref:"#/$defs/NativeIntegrationPreviewId"}},required:["preview_id","preview_digest"],title:"NativeIntegrationApproveSurfaceRequest",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Exact public input accepted by `tracedecay_ast_grep_rewrite`.",properties:{dry_run:{default:!1,type:"boolean"},expected_state:{description:"Exact `preview_digest`/`expected_state` returned by the dry run. Apply\nre-resolves the typed plan and rejects any candidate-state drift.",type:["string","null"]},idempotency_key:{type:["string","null"]},path:{type:"string"},pattern:{type:"string"},rewrite:{type:"string"},verify:{default:!1,type:"boolean"}},required:["path","pattern","rewrite"],title:"AstGrepRewriteSurfaceRequestV1",type:"object"},{$defs:{ActorId:mU,AstGrepResult:{description:"Result of an ast-grep rewrite operation.",properties:{diff:{description:"Bounded preview of the would-be change. Populated only on a successful\ndry run; `None` for real edits and for failures.",type:["string","null"]},dry_run:{description:"True when this was a dry run: the rewrite was resolved but nothing was\nwritten.",type:"boolean"},file_path:{type:"string"},message:{type:"string"},pattern:{type:"string"},rewrite:{type:"string"},success:{type:"boolean"}},required:["success","file_path","pattern","rewrite","message"],type:"object"},AuthorityReceipt:{additionalProperties:!1,description:"Proof that this request crossed the current authorization boundary.",properties:{authorized_scope_digest:{$ref:"#/$defs/ManifestDigest"},disclosure:{$ref:"#/$defs/DisclosureClass"},grant_digest:{$ref:"#/$defs/ManifestDigest"},grant_id:{type:"string"},grant_revision:{format:"uint64",minimum:0,type:"integer"},policy:{$ref:"#/$defs/PolicyDecisionRef"},revalidated_at:{$ref:"#/$defs/UtcMicros"}},required:["grant_id","grant_revision","grant_digest","authorized_scope_digest","disclosure","policy","revalidated_at"],type:"object"},CancellationObservation:fI,CancellationStage:fx,ComponentVersion:f2,Deadline:hL,DisclosureClass:{description:"Disclosure ceiling carried by an immutable grant and revalidated at sinks.",enum:["metadata","evidence","sensitive"],type:"string"},EditResult:{description:"Result of a single string replacement edit.",properties:{diff:{description:"Bounded preview diff of the would-be change. Populated only on a\nsuccessful dry run; `None` for real edits and for failures.",type:["string","null"]},dry_run:{description:"True when this was a dry run: validation, spans, and the resulting\ncontent were all computed, but nothing was written to disk.",type:"boolean"},file_path:{type:"string"},matched_str:{type:"string"},message:{type:"string"},new_str:{type:"string"},replaced_span:{description:"The exact source text that was replaced. For `replace_symbol` this is\nthe item's full span, including any leading doc-comment / attribute\nblock, so callers can recover its docs/attrs if the replacement\ndropped them; for `str_replace` it is the matched `old_str` text.\n`None` only on a failed edit, where nothing was resolved to replace.",type:["string","null"]},success:{type:"boolean"}},required:["success","file_path","matched_str","new_str","message"],type:"object"},EffectClass:hQ,EffectReceipt:hX,EffectResult:{additionalProperties:!1,description:"Result of an admitted effect. `EffectUnknown` remains a receipt state and\ncannot be remapped into a pre-admission problem.",properties:{authority:{$ref:"#/$defs/AuthorityReceipt"},effect_class:{$ref:"#/$defs/EffectClass"},effect_id:{type:"string"},execution:{$ref:"#/$defs/OperationReceipt"},expected_state:{$ref:"#/$defs/ManifestDigest"},idempotency_key:{type:"string"},payload:{anyOf:[{$ref:"#/$defs/SourceEditDurableEffectPayloadV1"},{type:"null"}]},receipt:{$ref:"#/$defs/EffectReceipt"},reconciliation:{$ref:"#/$defs/ReconciliationState"}},required:["effect_id","effect_class","idempotency_key","authority","expected_state","execution","reconciliation","receipt"],type:"object"},EffectTermination:hY,InsertResult:{description:"Result of an insert-at operation.",properties:{anchor_line:{format:"uint32",minimum:0,type:"integer"},before:{type:"boolean"},content:{type:"string"},diff:{description:"Bounded preview diff of the would-be change. Populated only on a\nsuccessful dry run; `None` for real edits and for failures.",type:["string","null"]},dry_run:{description:"True when this was a dry run: the insertion point was resolved and the\nresulting content computed, but nothing was written to disk.",type:"boolean"},file_path:{type:"string"},message:{type:"string"},success:{type:"boolean"}},required:["success","file_path","anchor_line","content","before","message"],type:"object"},ManifestDigest:gj,MoveHint:{description:"One evidence-based, actionable finding produced by the `move_symbol` impact\nengine. Each hint points at a concrete file/line and carries a suggestion\nthe caller (or a follow-up refactor) can act on. Hints are derived from graph\nedges (callers/callees) and parse-level facts (identifiers, `use` lines,\nmodule declarations), never speculative noise.",properties:{detail:{description:"Human-readable description of what the move breaks or affects.",type:"string"},file:{description:"File the finding concerns (the caller's file, the destination, or the\nsource), project-relative.",type:"string"},kind:{description:"Taxonomy tag: `caller_reference`, `dependency_broken`, `import_needed`,\n`visibility_required`, `collision`, `module_missing`, `cycle_risk`,\n`orphaned_import`, or `cfg_context`.",type:"string"},line:{description:"1-based line the finding concerns, when a specific site is known.",format:"uint32",minimum:0,type:["integer","null"]},suggestion:{description:"The exact change to make (e.g. a `use` line to add, a path to rewrite, a\nvisibility to escalate). `None` when no single mechanical fix applies.",type:["string","null"]}},required:["kind","file","detail"],type:"object"},MoveResult:{description:"Result of a `move_symbol` operation: the moved span, a dry-run diff of the\nsource + destination files, and the centerpiece, the impact report of\neverything the move breaks or that needs attention.",properties:{applied_imports:{description:"`use` lines auto-inserted at the destination because the moved body's\ndependency on them was unambiguous. Reported so the caller sees exactly\nwhat the move added.",items:{type:"string"},type:"array"},dest_file:{type:"string"},diff:{description:"Combined preview diff of the source (removal) and destination (insertion)\nfiles. Populated on a successful dry run; `None` for real moves.",type:["string","null"]},dry_run:{description:"True when this was a dry run: spans, the destination shape, and the\nimpact report were all computed, but nothing was written to disk.",type:"boolean"},impact:{description:"The impact report: every actionable finding. Empty on a truly clean\nmove.",items:{$ref:"#/$defs/MoveHint"},type:"array"},message:{type:"string"},moved_span:{description:"The exact source span that was moved, including its leading\ndoc-comment / attribute block. `None` on failure.",type:["string","null"]},source_file:{type:"string"},success:{type:"boolean"},symbol:{description:"The resolved symbol that was (or would be) moved, `name (kind)`.",type:"string"}},required:["success","symbol","source_file","dest_file","message"],type:"object"},MultiEditResult:{description:"Result of a multi-string replacement edit.",properties:{applied_count:{format:"uint",minimum:0,type:"integer"},diff:{description:"Bounded preview diff of the would-be change. Populated only on a\nsuccessful dry run; `None` for real edits and for failures.",type:["string","null"]},dry_run:{description:"True when this was a dry run: replacements were validated and the\nresulting content computed, but nothing was written to disk.",type:"boolean"},file_path:{type:"string"},message:{type:"string"},success:{type:"boolean"}},required:["success","file_path","applied_count","message"],type:"object"},OperationBudgetUsage:g8,OperationReceipt:g7,OperationTermination:_e,PolicyDecisionRef:{additionalProperties:!1,description:"A policy decision pinned into a receipt or provider identity.",properties:{decision_id:{type:"string"},digest:{$ref:"#/$defs/ManifestDigest"},evaluator_revision:{$ref:"#/$defs/ComponentVersion"},revision:{format:"uint64",minimum:0,type:"integer"}},required:["decision_id","revision","digest","evaluator_revision"],type:"object"},ProjectId:_m,ReconciliationState:{description:"Reconciliation state retained after an admitted effect.",enum:["pending","reconciled","failed"],type:"string"},RefId:_T,RenameDispositionCountsV1:{additionalProperties:!1,properties:{blocked:{format:"uint",minimum:0,type:"integer"},changed:{format:"uint",minimum:0,type:"integer"},skipped:{format:"uint",minimum:0,type:"integer"},unchanged:{format:"uint",minimum:0,type:"integer"}},required:["changed","unchanged","skipped","blocked"],type:"object"},RenameFileEditV1:{additionalProperties:!1,description:"One file a rename changed (or would change), with the exact bound-site count.",properties:{file:{type:"string"},replaced_count:{format:"uint",minimum:0,type:"integer"}},required:["file","replaced_count"],type:"object"},RenameHazardKindV1:{enum:["invalid_identifier","stale_evidence","ambiguous_symbol","namespace_collision","changed_resolution","shadowing","unsupported_syntax","macro_expansion","generated_source","overlapping_site"],type:"string"},RenameHazardV1:{additionalProperties:!1,properties:{blocking:{type:"boolean"},kind:{$ref:"#/$defs/RenameHazardKindV1"},message:{type:"string"},site_id:{type:["string","null"]}},required:["kind","blocking","message"],type:"object"},RenameImpactV1:{additionalProperties:!1,properties:{affected_files:{items:{type:"string"},type:"array"},affected_tests:{items:{type:"string"},type:"array"},callers:{items:{type:"string"},type:"array"},reexports:{items:{type:"string"},type:"array"}},required:["callers","reexports","affected_files","affected_tests"],type:"object"},RenameProtectedValueCategoryV1:{enum:["wire_value","serialized_name","sql_identifier","persisted_name","schema_epoch","hash_domain","protocol_name","contract_snapshot","string_literal","byte_literal"],type:"string"},RenameProtectedValueV1:{additionalProperties:!1,description:"A byte-exact stable value deliberately preserved by the rename.",properties:{category:{$ref:"#/$defs/RenameProtectedValueCategoryV1"},end_byte:{format:"uint64",minimum:0,type:"integer"},exact_bytes:{type:"string"},file:{type:"string"},site_id:{type:"string"},start_byte:{format:"uint64",minimum:0,type:"integer"}},required:["site_id","file","start_byte","end_byte","category","exact_bytes"],type:"object"},RenameResult:{description:"The same typed payload is serialized by application, CLI, and MCP paths.",properties:{diff:{type:["string","null"]},dispositions:{$ref:"#/$defs/RenameDispositionCountsV1"},dry_run:{type:"boolean"},files:{items:{$ref:"#/$defs/RenameFileEditV1"},type:"array"},graph_revision:{anyOf:[{$ref:"#/$defs/ManifestDigest"},{type:"null"}],description:"Digest of the admitted generation, exact target, same-name symbols,\nand graph edges used to classify bound and protected sites."},hazards:{items:{$ref:"#/$defs/RenameHazardV1"},type:"array"},impact:{$ref:"#/$defs/RenameImpactV1"},message:{type:"string"},new_name:{type:"string"},old_name:{type:"string"},plan_digest:{anyOf:[{$ref:"#/$defs/ManifestDigest"},{type:"null"}],description:"Digest of the complete typed site/hazard/protected-value manifest."},preview_digest:{anyOf:[{$ref:"#/$defs/ManifestDigest"},{type:"null"}],description:"Exact candidate-state digest that apply must echo as `expected_state`."},preview_id:{anyOf:[{$ref:"#/$defs/ManifestDigest"},{type:"null"}],description:"Digest-addressed identity of the bound symbol plus proposed name."},protected_values:{items:{$ref:"#/$defs/RenameProtectedValueV1"},type:"array"},reference_count:{format:"uint",minimum:0,type:"integer"},repository_revision:{default:null,description:"Current Git HEAD when the worktree has one; dirty bytes remain bound by\n`preview_digest` independently of this revision.",type:["string","null"]},sites:{items:{$ref:"#/$defs/RenameSiteV1"},type:"array"},success:{type:"boolean"},symbol:{description:"Qualified name of the renamed symbol at plan time.",type:"string"}},required:["success","symbol","old_name","new_name","reference_count","dispositions","impact","message"],type:"object"},RenameSiteDispositionV1:{enum:["changed","unchanged","skipped","blocked"],type:"string"},RenameSiteKindV1:{enum:["declaration","import","reexport","qualified_path","unqualified_path","annotation","generic_argument","constructor","pattern","trait_declaration","trait_implementation","resolved_call","inherent_method","enum_variant","test","example","documentation","protected_value","unresolved_text"],type:"string"},RenameSiteV1:{additionalProperties:!1,description:"One exact old-name occurrence and the rename planner's disposition.",properties:{disposition:{$ref:"#/$defs/RenameSiteDispositionV1"},end_byte:{format:"uint64",minimum:0,type:"integer"},expected_bytes:{type:"string"},file:{type:"string"},kind:{$ref:"#/$defs/RenameSiteKindV1"},line:{format:"uint32",minimum:0,type:"integer"},reason:{type:"string"},replacement_bytes:{type:"string"},site_id:{type:"string"},source_node_id:{description:"Canonical source `SymbolOccurrenceId` that attested this site.",type:["string","null"]},start_byte:{format:"uint64",minimum:0,type:"integer"}},required:["site_id","kind","disposition","file","line","start_byte","end_byte","expected_bytes","replacement_bytes","reason"],type:"object"},RepositoryId:_z,ResolvedScope:_U,RetrievalAnchorId:_J,SourceEditCancelledResultV1:{description:"Terminal payload when cancellation is observed before an edit commits.",properties:{cancelled:{type:"boolean"},message:{type:"string"},success:{type:"boolean"}},required:["success","cancelled","message"],type:"object"},SourceEditDiagnosticV1:{properties:{code:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},message:{type:"string"}},required:["line","code","message"],type:"object"},SourceEditDurableEffectPayloadV1:{additionalProperties:!1,description:"Body-free source-edit evidence retained inside durable effect receipts.\n\nThis payload intentionally contains no caller-supplied edit text, preview\ndiff, moved span, import, diagnostic, or impact detail. It is also the\nexact replay outcome, so replay never fabricates a live edit body.",properties:{before:{type:["boolean","null"]},cancelled:{type:"boolean"},change_count:{format:"uint",minimum:0,type:["integer","null"]},durable_metadata_only:{type:"boolean"},effect_unknown:{type:"boolean"},failed:{type:"boolean"},files:{items:{type:"string"},type:"array"},finding_count:{format:"uint",minimum:0,type:["integer","null"]},import_count:{format:"uint",minimum:0,type:["integer","null"]},line:{format:"uint32",minimum:0,type:["integer","null"]},message:{type:"string"},observed_state:{anyOf:[{$ref:"#/$defs/ManifestDigest"},{type:"null"}],description:"Exact candidate-file observation from an inspection attempt."},operation:{$ref:"#/$defs/UseCaseId"},reconciled:{type:"boolean"},success:{type:"boolean"},timed_out:{type:"boolean"}},required:["operation","success","files","failed","cancelled","timed_out","effect_unknown","reconciled","durable_metadata_only","message"],type:"object"},SourceEditEffectUnknownResultV1:{description:"Terminal payload when publication may have occurred and inspection is required.",properties:{effect_unknown:{type:"boolean"},message:{type:"string"},success:{type:"boolean"}},required:["success","effect_unknown","message"],type:"object"},SourceEditFailedResultV1:{description:"Terminal payload when an edit is refused before it can publish an effect.",properties:{failed:{type:"boolean"},message:{type:"string"},success:{type:"boolean"}},required:["success","failed","message"],type:"object"},SourceEditReconciledResultV1:{description:"Terminal payload returned by explicit reconciliation.",properties:{message:{type:"string"},reconciled:{type:"boolean"},success:{type:"boolean"}},required:["success","reconciled","message"],type:"object"},SourceEditTimedOutResultV1:{description:"Terminal payload when an edit deadline expires before commit.",properties:{message:{type:"string"},success:{type:"boolean"},timed_out:{type:"boolean"}},required:["success","timed_out","message"],type:"object"},SourceEditVerificationStateV1:{enum:["clean","errors","unavailable","failed","cancelled"],type:"string"},SourceEditVerificationV1:{properties:{error_count:{format:"uint",minimum:0,type:"integer"},first_errors:{items:{$ref:"#/$defs/SourceEditDiagnosticV1"},type:"array"},message:{type:["string","null"]},state:{$ref:"#/$defs/SourceEditVerificationStateV1"},verdict:{type:"string"},warning_count:{format:"uint",minimum:0,type:"integer"}},required:["state","verdict","error_count","warning_count","first_errors"],type:"object"},UseCaseId:bn,UtcMicros:bs,WorktreeId:So},$schema:"https://json-schema.org/draft/2020-12/schema",anyOf:[{$ref:"#/$defs/SourceEditDurableEffectPayloadV1"},{$ref:"#/$defs/EditResult"},{$ref:"#/$defs/MultiEditResult"},{$ref:"#/$defs/InsertResult"},{$ref:"#/$defs/AstGrepResult"},{$ref:"#/$defs/MoveResult"},{$ref:"#/$defs/RenameResult"},{$ref:"#/$defs/SourceEditFailedResultV1"},{$ref:"#/$defs/SourceEditCancelledResultV1"},{$ref:"#/$defs/SourceEditTimedOutResultV1"},{$ref:"#/$defs/SourceEditEffectUnknownResultV1"},{$ref:"#/$defs/SourceEditReconciledResultV1"}],description:"Canonical result returned directly by every source-edit use case.",properties:{effect:{anyOf:[{$ref:"#/$defs/EffectResult"},{type:"null"}]},expected_state:{$ref:"#/$defs/ManifestDigest"},predicted_state:{anyOf:[{$ref:"#/$defs/ManifestDigest"},{type:"null"}]},replayed:{type:"boolean"},verification:{anyOf:[{$ref:"#/$defs/SourceEditVerificationV1"},{type:"null"}]}},required:["expected_state","replayed"],title:"SourceEditSurfaceResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{lang:{description:"Optional language key to force (e.g. 'rust', 'typescript', 'python').\nOmit to auto-detect each file from its extension.",type:["string","null"]},max_results:{description:"Maximum number of matches to return (default: 50, max: 200).",format:"uint32",minimum:0,type:["integer","null"]},path_glob:{description:"Optional glob restricting which files are searched, matched against\nproject-relative paths (e.g. 'src/**/*.rs').",type:["string","null"]},pattern:{description:"ast-grep structural pattern (SGPattern syntax), e.g.\n'reserve_stock($$$)' or 'Result<$T, $E>'.",type:"string"}},required:["pattern"],title:"AstGrepSearchSurfaceRequestV1",type:"object"},{$defs:{AstGrepSearchMatchV1:{additionalProperties:!1,properties:{column:{format:"uint32",minimum:0,type:"integer"},file:{type:"string"},lang:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},line_text:{type:"string"},match:{type:"string"}},required:["file","line","column","lang","match","line_text"],type:"object"},CodeIndexBuildBlockedReasonV1:fF,CodeIndexConvergenceParkedV1:fL,CodeIndexStalenessStateV1:fB,PrimitiveFreshnessStateV1:_i,PrimitiveIndexingStateV1:_o,PrimitiveSearchFreshnessV1:_d},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{files_scanned:{format:"uint64",minimum:0,type:"integer"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},match_count:{format:"uint64",minimum:0,type:"integer"},results:{items:{$ref:"#/$defs/AstGrepSearchMatchV1"},type:"array"},truncated:{type:"boolean"}},required:["results","match_count","files_scanned","truncated"],title:"AstGrepSearchResultV1",type:"object"},{$defs:{AutomationRunArtifactKind:{enum:["traces","feedback","generated_evals","validation_gate","optimizer_diagnosis","codex_handoff"],type:"string"}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{kind:{$ref:"#/$defs/AutomationRunArtifactKind",description:"Artifact kind to read."},run_id:{description:"Automation run id to inspect.",type:"string"}},required:["run_id","kind"],title:"AutomationRunArtifactViewSurfaceRequestV1",type:"object"},{$defs:{AutomationReadStatusV1:fn,AutomationRunArtifact:fs},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{artifact:{$ref:"#/$defs/AutomationRunArtifact"},payload:{description:"The hash-verified artifact document, as the run wrote it."},run_id:{type:"string"},status:{$ref:"#/$defs/AutomationReadStatusV1"}},required:["status","run_id","artifact","payload"],title:"AutomationRunArtifactViewResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{limit:{description:"Maximum run records to return (default: 50, max: 200).",format:"uint32",maximum:200,minimum:1,type:["integer","null"]}},title:"AutomationRunListSurfaceRequestV1",type:"object"},{$defs:{AgentTaskKind:mG,AutomationReadStatusV1:fn,AutomationRunListEntryV1:{additionalProperties:!1,description:"One run as the list shows it: the ledger record's identity, outcome and\nartifact kinds, without the artifact payloads or operation bodies.",properties:{accepted_count:{format:"uint",minimum:0,type:"integer"},artifact_kinds:{items:{type:"string"},type:"array"},backend:{type:"string"},completed_at:{type:"string"},error:{type:["string","null"]},model:{type:["string","null"]},rejected_count:{format:"uint",minimum:0,type:"integer"},reviewed_count:{format:"uint",minimum:0,type:"integer"},run_id:{type:"string"},skipped_count:{format:"uint",minimum:0,type:"integer"},started_at:{type:"string"},status:{$ref:"#/$defs/AutomationRunStatus"},task:{$ref:"#/$defs/AgentTaskKind"},task_key:{type:["string","null"]},trigger:{$ref:"#/$defs/AutomationTrigger"}},required:["run_id","task","trigger","backend","status","reviewed_count","accepted_count","rejected_count","skipped_count","started_at","completed_at","artifact_kinds"],type:"object"},AutomationRunPageCompletenessV1:{description:"Whether a run page read every ledger row it examined.",oneOf:[{const:"known",description:"Every examined row decoded.",type:"string"},{const:"partial",description:"The page skipped malformed rows or more runs exist past it.",type:"string"}]},AutomationRunScopeV1:fd,AutomationRunStatus:fc,AutomationTrigger:fm},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{completeness:{$ref:"#/$defs/AutomationRunPageCompletenessV1"},count:{format:"uint",minimum:0,type:"integer"},has_more:{type:"boolean"},limit:{format:"uint32",minimum:0,type:"integer"},malformed_row_count:{format:"uint",minimum:0,type:"integer"},runs:{items:{$ref:"#/$defs/AutomationRunListEntryV1"},type:"array"},scope:{$ref:"#/$defs/AutomationRunScopeV1"},status:{$ref:"#/$defs/AutomationReadStatusV1"}},required:["status","scope","runs","count","limit","has_more","malformed_row_count","completeness"],title:"AutomationRunListResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{run_id:{description:"Exact automation run id to inspect.",minLength:1,type:"string"}},required:["run_id"],title:"AutomationRunViewSurfaceRequestV1",type:"object"},{$defs:{AgentTaskFailureClass:{oneOf:[{enum:["retryable","permanent","timeout","unavailable","denied","disconnected","malformed_output"],type:"string"},{const:"input_too_large",description:"The backend refused the request because it exceeds its input or\ncontext-window limit.",type:"string"}]},AgentTaskKind:mG,AgentTaskRetryAttempt:{properties:{attempt:{format:"uint32",minimum:0,type:"integer"},backoff_millis:{format:"uint64",minimum:0,type:"integer"},failure_classification:{anyOf:[{$ref:"#/$defs/AgentTaskFailureClass"},{type:"null"}]},succeeded:{type:"boolean"}},required:["attempt","succeeded","backoff_millis"],type:"object"},AutomationReadStatusV1:fn,AutomationRunArtifact:fs,AutomationRunLedgerRecord:{properties:{accepted_count:{format:"uint",minimum:0,type:"integer"},applied_ops:!0,artifacts:{items:{$ref:"#/$defs/AutomationRunArtifact"},type:"array"},backend:{type:"string"},backend_attempt_count:{default:0,format:"uint",minimum:0,type:"integer"},backend_attempts:{items:{$ref:"#/$defs/AgentTaskRetryAttempt"},type:"array"},backend_identity:{description:"The durable backend/configuration identity this run executed under.\n\nA settled deterministic failure stays suppressed only while this\nmatches the identity now configured, so the scheduler can re-admit the\ntask the moment the backend or configuration changes. Records written\nbefore this field existed carry `None` and never suppress: an\nunidentified failure cannot be shown to have failed under the current\nidentity.",type:["string","null"]},completed_at:{type:"string"},completed_at_micros:{format:"int64",type:["integer","null"]},error:{type:["string","null"]},error_classification:{anyOf:[{$ref:"#/$defs/AgentTaskFailureClass"},{type:"null"}]},error_retryable:{type:["boolean","null"]},evidence_hash:{type:["string","null"]},fallback_status:{type:["string","null"]},host_mode:{type:["string","null"]},input_hash:{type:["string","null"]},model:{type:["string","null"]},output_hash:{type:["string","null"]},prompt_version:{type:["string","null"]},proposed_ops:!0,rejected_count:{format:"uint",minimum:0,type:"integer"},rejected_ops:!0,report_ref:!0,response_schema:!0,reviewed_count:{default:0,format:"uint",minimum:0,type:"integer"},run_id:{type:"string"},schema_version:{format:"uint32",minimum:0,type:"integer"},session_evidence_budget_stage:{anyOf:[{$ref:"#/$defs/SessionRetrievalBudgetStageV1"},{type:"null"}],description:"Exhausted retrieval boundary of a `session_evidence_budget_exhausted`\nskip; present exactly on those skips."},skipped_count:{default:0,format:"uint",minimum:0,type:"integer"},started_at:{type:"string"},status:{$ref:"#/$defs/AutomationRunStatus"},strict_json:{type:["boolean","null"]},task:{$ref:"#/$defs/AgentTaskKind"},task_key:{type:["string","null"]},trigger:{$ref:"#/$defs/AutomationTrigger"},validation_report:!0},required:["schema_version","run_id","trigger","task","backend","status","accepted_count","rejected_count","started_at","completed_at"],type:"object"},AutomationRunScopeV1:fd,AutomationRunStatus:fc,AutomationTrigger:fm,SessionRetrievalBudgetStageV1:vV},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{run:{$ref:"#/$defs/AutomationRunLedgerRecord"},scope:{$ref:"#/$defs/AutomationRunScopeV1"},status:{$ref:"#/$defs/AutomationReadStatusV1"}},required:["status","scope","run"],title:"AutomationRunViewResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{base:{description:"Base local branch name (e.g. 'main').",type:"string"},cursor:{description:"Authenticated continuation cursor returned by the preceding exact\nbranch-diff page.",type:["string","null"]},file:{description:"Optional file path filter, only show diffs for symbols in this file.",type:["string","null"]},head:{description:"Head local branch name (e.g. 'feature/foo'). Defaults to the current\nbranch.",type:["string","null"]},kind:{description:"Optional kind filter, only show diffs for this symbol kind (e.g.\n'function', 'struct').",type:["string","null"]},limit:{description:"Maximum combined added, removed, and changed results (default: 100,\nat most 256).",format:"uint32",minimum:0,type:["integer","null"]}},required:["base"],title:"BranchDiffSurfaceRequestV1",type:"object"},{$defs:{BranchDiffCompleteV1:{additionalProperties:!1,properties:{base:{type:"string"},base_generation:{type:"string"},base_revision:{type:"string"},base_tree:{type:"string"},changes:{items:{$ref:"#/$defs/BranchSymbolChangeV1"},type:"array"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},head:{type:"string"},head_generation:{type:"string"},head_revision:{type:"string"},head_tree:{type:"string"},status:{$ref:"#/$defs/GitReadCompleteV1"},summary:{$ref:"#/$defs/BranchDiffSummaryV1"},total_changes:{format:"uint",minimum:0,type:"integer"}},required:["status","base","head","base_revision","base_tree","head_revision","head_tree","base_generation","head_generation","total_changes","summary","changes"],type:"object"},BranchDiffPartialV1:{additionalProperties:!1,properties:{base:{type:"string"},base_generation:{type:"string"},base_revision:{type:"string"},base_tree:{type:"string"},changes:{items:{$ref:"#/$defs/BranchSymbolChangeV1"},type:"array"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},head:{type:"string"},head_generation:{type:"string"},head_revision:{type:"string"},head_tree:{type:"string"},next_cursor:{type:"string"},reason:{$ref:"#/$defs/GitResultLimitV1"},status:{$ref:"#/$defs/GitReadPartialV1"},summary:{$ref:"#/$defs/BranchDiffSummaryV1"},total_changes:{format:"uint",minimum:0,type:"integer"}},required:["status","reason","base","head","base_revision","base_tree","head_revision","head_tree","base_generation","head_generation","total_changes","next_cursor","summary","changes"],type:"object"},BranchDiffReferenceUnavailableV1:{additionalProperties:!1,description:"Either branch of `base..head` does not resolve to a local commit.",properties:{base_or_head:{description:"The requested range, `base..head`.",type:"string"},reason:{type:"string"},retryable:{type:"boolean"},status:{$ref:"#/$defs/GitReadUnavailableV1"}},required:["status","base_or_head","reason","retryable"],type:"object"},BranchDiffSummaryV1:{additionalProperties:!1,properties:{added:{format:"uint",minimum:0,type:"integer"},changed:{format:"uint",minimum:0,type:"integer"},removed:{format:"uint",minimum:0,type:"integer"}},required:["added","removed","changed"],type:"object"},BranchDiffUnavailableV1:{additionalProperties:!1,description:"No sealed code-index generations compare the two branches' commits.",properties:{base:{type:"string"},base_generation:{type:["string","null"]},base_revision:{type:"string"},head:{type:"string"},head_generation:{type:["string","null"]},head_revision:{type:"string"},reason:{type:"string"},retryable:{type:"boolean"},status:{$ref:"#/$defs/GitReadUnavailableV1"}},required:["status","base","head","base_revision","head_revision","reason","retryable"],type:"object"},BranchSymbolChangeV1:{oneOf:[{additionalProperties:!1,properties:{change:{const:"added",type:"string"},symbol:{$ref:"#/$defs/BranchSymbolV1"}},required:["change","symbol"],type:"object"},{additionalProperties:!1,properties:{change:{const:"removed",type:"string"},symbol:{$ref:"#/$defs/BranchSymbolV1"}},required:["change","symbol"],type:"object"},{additionalProperties:!1,properties:{base:{$ref:"#/$defs/BranchSymbolV1"},change:{const:"changed",type:"string"},head:{$ref:"#/$defs/BranchSymbolV1"}},required:["change","base","head"],type:"object"}]},BranchSymbolV1:{additionalProperties:!1,description:"A symbol in one branch's sealed generation.",properties:{content_digest:{type:"string"},file:{type:"string"},file_identity:{type:"string"},file_occurrence_id:{type:"string"},kind:{type:"string"},name:{type:"string"},qualified_name:{type:"string"},symbol_identity:{type:"string"},symbol_occurrence_id:{type:"string"}},required:["symbol_identity","symbol_occurrence_id","file_identity","file_occurrence_id","name","qualified_name","kind","file","content_digest"],type:"object"},CodeIndexBuildBlockedReasonV1:fF,CodeIndexConvergenceParkedV1:fL,CodeIndexStalenessStateV1:fB,GitReadCompleteV1:yX,GitReadPartialV1:yY,GitReadUnavailableV1:y1,GitResultLimitV1:y0,PrimitiveFreshnessStateV1:_i,PrimitiveIndexingStateV1:_o,PrimitiveSearchFreshnessV1:_d},$schema:"https://json-schema.org/draft/2020-12/schema",anyOf:[{$ref:"#/$defs/BranchDiffCompleteV1"},{$ref:"#/$defs/BranchDiffPartialV1"},{$ref:"#/$defs/BranchDiffUnavailableV1"},{$ref:"#/$defs/BranchDiffReferenceUnavailableV1"}],title:"BranchDiffResultV1"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{cursor:{description:"Continuation cursor returned as `next_cursor` by the preceding page\nwith the same `limit`.",type:["string","null"]},limit:{description:"Maximum local refs to return (default: 100, at most 128).",format:"uint32",minimum:0,type:["integer","null"]}},title:"BranchListSurfaceRequestV1",type:"object"},{$defs:{BranchListPageV1:{additionalProperties:!1,properties:{examined:{format:"uint",minimum:0,type:"integer"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},limit:{format:"uint",minimum:0,type:"integer"},next_cursor:{type:["string","null"]},reason:{anyOf:[{$ref:"#/$defs/GitReferenceLimitV1"},{type:"null"}]},snapshot_count:{format:"uint",minimum:0,type:"integer"},snapshots:{items:{$ref:"#/$defs/BranchSnapshotEntryV1"},type:"array"},status:{$ref:"#/$defs/GitPageStatusV1"}},required:["status","snapshot_count","examined","limit","snapshots"],type:"object"},BranchReadUnavailableV1:{additionalProperties:!1,description:"A local branch read refused before any snapshot was taken.",properties:{reason:{type:"string"},retryable:{type:"boolean"},status:{$ref:"#/$defs/GitReadUnavailableV1"}},required:["status","reason","retryable"],type:"object"},BranchSnapshotEntryV1:{additionalProperties:!1,properties:{branch:{type:"string"},source_revision:{type:"string"},source_tree:{type:"string"}},required:["branch","source_revision","source_tree"],type:"object"},CodeIndexBuildBlockedReasonV1:fF,CodeIndexConvergenceParkedV1:fL,CodeIndexStalenessStateV1:fB,GitPageStatusV1:yQ,GitReadUnavailableV1:y1,GitReferenceLimitV1:{enum:["reference_limit"],type:"string"},PrimitiveFreshnessStateV1:_i,PrimitiveIndexingStateV1:_o,PrimitiveSearchFreshnessV1:_d},$schema:"https://json-schema.org/draft/2020-12/schema",anyOf:[{$ref:"#/$defs/BranchListPageV1"},{$ref:"#/$defs/BranchReadUnavailableV1"}],title:"BranchListResultV1"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{branch:{description:"Exact local branch name to search.",type:"string"},cursor:{description:"Authenticated continuation cursor returned by the preceding exact\nbranch-search page.",type:["string","null"]},limit:{description:"Maximum number of results to return (default: 10, at most 500).",format:"uint32",minimum:0,type:["integer","null"]},query:{description:"Search query string to match against symbol names.",type:"string"}},required:["branch","query"],title:"BranchSearchSurfaceRequestV1",type:"object"},{$defs:{BranchReferenceUnavailableV1:{additionalProperties:!1,description:"The named branch does not resolve to a local commit.",properties:{branch:{type:"string"},reason:{type:"string"},retryable:{type:"boolean"},status:{$ref:"#/$defs/GitReadUnavailableV1"}},required:["status","branch","reason","retryable"],type:"object"},BranchSearchHitV1:{additionalProperties:!1,properties:{branch:{type:"string"},candidate:{$ref:"#/$defs/RankedCandidate"},code_generation:{type:"string"},kind:{type:["string","null"]},name:{type:["string","null"]},path:{type:["string","null"]},qualified_name:{type:["string","null"]},source_reference:{type:"string"},source_revision:{type:"string"},source_tree:{type:"string"}},required:["candidate","branch","source_reference","source_revision","source_tree","code_generation"],type:"object"},BranchSearchPageV1:{additionalProperties:!1,properties:{branch:{type:"string"},code_generation:{type:"string"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},next_cursor:{type:["string","null"]},reason:{anyOf:[{$ref:"#/$defs/GitResultLimitV1"},{type:"null"}]},results:{items:{$ref:"#/$defs/BranchSearchHitV1"},type:"array"},source_reference:{type:"string"},source_revision:{type:"string"},source_tree:{type:"string"},status:{$ref:"#/$defs/GitPageStatusV1"}},required:["status","branch","source_reference","source_revision","source_tree","code_generation","results"],type:"object"},BranchSearchUnavailableV1:{additionalProperties:!1,description:"No sealed code-index generation answers for the branch's commit.",properties:{branch:{type:"string"},code_generation:{type:["string","null"]},reason:{type:"string"},retryable:{type:"boolean"},source_revision:{type:"string"},status:{$ref:"#/$defs/GitReadUnavailableV1"}},required:["status","branch","source_revision","reason","retryable"],type:"object"},CalibrationProfileId:fR,CandidateContribution:fj,CodeIndexBuildBlockedReasonV1:fF,CodeIndexConvergenceParkedV1:fL,CodeIndexStalenessStateV1:fB,ComponentRevision:f0,EvidenceRole:h2,ExactClass:h4,FileOccurrenceId:yj,FixedPointScore:yT,FreshnessCompatibilityV1:yO,FusedCandidate:yE,GitPageStatusV1:yQ,GitReadUnavailableV1:y1,GitResultLimitV1:y0,LogicalCopyClusterId:gw,LogicalEvidenceId:gV,OccurrenceProvenance:g5,PrimitiveFreshnessStateV1:_i,PrimitiveIndexingStateV1:_o,PrimitiveSearchFreshnessV1:_d,RankedCandidate:{additionalProperties:!1,description:"A fused candidate with its final deterministic ordinal.",properties:{candidate:{$ref:"#/$defs/FusedCandidate"},final_ordinal:{format:"uint32",minimum:0,type:"integer"}},required:["candidate","final_ordinal"],type:"object"},RankingDecision:_j,RankingDecisionKind:_C,RepositoryId:_z,RetrievalAnchorId:_J,RetrievalSourceRoleV1:_X,RetrieverKind:_1,ScoreDomainId:vm,SessionOrThreadId:vb,SourceFreshness:vW,SourceInstanceKey:vM,SourceNamespace:vz,SourceOccurrenceId:vD,UtcMicros:bs},$schema:"https://json-schema.org/draft/2020-12/schema",anyOf:[{$ref:"#/$defs/BranchSearchPageV1"},{$ref:"#/$defs/BranchSearchUnavailableV1"},{$ref:"#/$defs/BranchReferenceUnavailableV1"}],title:"BranchSearchResultV1"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{qualified_name:{description:"The exact qualified name to look up.",type:"string"}},required:["qualified_name"],title:"ByQualifiedNameSurfaceRequestV1",type:"object"},{$defs:{PrimitiveSymbolLocationV1:_l},$schema:"https://json-schema.org/draft/2020-12/schema",description:"Every indexed symbol sharing one qualified name (overloads, generics,\nseparate impl blocks).",items:{$ref:"#/$defs/PrimitiveSymbolLocationV1"},title:"ByQualifiedNameResultV1",type:"array"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{from_node_id:{type:"string"},maximum_depth:{default:8,format:"uint32",minimum:0,type:"integer"},to_node_id:{type:"string"}},required:["from_node_id","to_node_id"],title:"CallChainPrimitiveRequest",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{edge_kinds:{items:{type:"string"},type:"array"},node_ids:{items:{type:"string"},type:"array"}},required:["node_ids","edge_kinds"],title:"CallChainPrimitiveResult",type:"object"},{$defs:{NativeIntegrationTransactionId:g1},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{transaction_id:{$ref:"#/$defs/NativeIntegrationTransactionId"}},required:["transaction_id"],title:"NativeIntegrationCancelSurfaceRequest",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{from_ref:{description:"Starting git ref (commit, branch, tag).",type:"string"},to_ref:{description:"Ending git ref (commit, branch, tag).",type:"string"}},required:["from_ref","to_ref"],title:"ChangelogSurfaceRequestV1",type:"object"},{$defs:{ChangelogCompleteV1:{additionalProperties:!1,properties:{base_generation:{type:"string"},changed_file_count:{format:"uint",minimum:0,type:"integer"},changed_files:{items:{type:"string"},type:"array"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},from_ref:{type:"string"},head_generation:{type:"string"},status:{$ref:"#/$defs/GitReadCompleteV1"},symbol_changes_coverage:{$ref:"#/$defs/SymbolChangesCompleteV1"},symbols_added:{items:{$ref:"#/$defs/GitComparedSymbolV1"},type:"array"},symbols_modified:{items:{$ref:"#/$defs/GitComparedSymbolV1"},type:"array"},symbols_removed:{items:{$ref:"#/$defs/GitComparedSymbolV1"},type:"array"},to_ref:{type:"string"}},required:["status","from_ref","to_ref","changed_file_count","changed_files","base_generation","head_generation","symbols_added","symbols_removed","symbols_modified","symbol_changes_coverage"],type:"object"},ChangelogPartialV1:{additionalProperties:!1,description:"The tree diff without symbol changes: the refs are not both exact local\nbranches with sealed generations.",properties:{changed_file_count:{format:"uint",minimum:0,type:"integer"},changed_files:{items:{type:"string"},type:"array"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},from_ref:{type:"string"},status:{$ref:"#/$defs/GitReadPartialV1"},symbol_changes_coverage:{$ref:"#/$defs/SymbolChangesUnavailableV1"},symbols_added:{items:{$ref:"#/$defs/GitComparedSymbolV1"},type:"array"},symbols_modified:{items:{$ref:"#/$defs/GitComparedSymbolV1"},type:"array"},symbols_removed:{items:{$ref:"#/$defs/GitComparedSymbolV1"},type:"array"},to_ref:{type:"string"}},required:["status","from_ref","to_ref","changed_file_count","changed_files","symbols_added","symbols_removed","symbols_modified","symbol_changes_coverage"],type:"object"},CodeIndexBuildBlockedReasonV1:fF,CodeIndexConvergenceParkedV1:fL,CodeIndexStalenessStateV1:fB,GitComparedSymbolV1:yN,GitReadCompleteV1:yX,GitReadPartialV1:yY,GitReadUnavailableV1:y1,GitToolErrorKindV1:y6,GitToolErrorV1:y3,GitToolFailureV1:y9,GitToolOperationV1:y5,PrimitiveFreshnessStateV1:_i,PrimitiveIndexingStateV1:_o,PrimitiveSearchFreshnessV1:_d,SymbolChangesCompleteV1:{additionalProperties:!1,properties:{status:{$ref:"#/$defs/GitReadCompleteV1"}},required:["status"],type:"object"},SymbolChangesUnavailableV1:vB},$schema:"https://json-schema.org/draft/2020-12/schema",anyOf:[{$ref:"#/$defs/ChangelogCompleteV1"},{$ref:"#/$defs/ChangelogPartialV1"},{$ref:"#/$defs/GitToolFailureV1"}],title:"ChangelogResultV1"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{limit:{description:"Maximum number of cycles to report, largest first (default: 25, max:\n200). The response always states the total detected and how many were\nomitted.",format:"uint32",minimum:0,type:["integer","null"]},member_limit:{description:"Maximum member files listed per reported cycle (default: 12, max:\n200). Each entry states its true member_count and\nomitted_member_count.",format:"uint32",minimum:0,type:["integer","null"]}},title:"CircularSurfaceRequestV1",type:"object"},{$defs:{CircularCycleV1:{additionalProperties:!1,description:"One reported file cycle: the members that fit the member bound, plus the\ncomponent's true size so the omission is stated rather than hidden.",properties:{member_count:{format:"uint64",minimum:0,type:"integer"},members:{items:{type:"string"},type:"array"},omitted_member_count:{format:"uint64",minimum:0,type:"integer"}},required:["members","member_count","omitted_member_count"],type:"object"},CodeIndexBuildBlockedReasonV1:fF,CodeIndexConvergenceParkedV1:fL,CodeIndexStalenessStateV1:fB,PrimitiveFreshnessStateV1:_i,PrimitiveIndexingStateV1:_o,PrimitiveSearchFreshnessV1:_d},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{cycle_count:{format:"uint64",minimum:0,type:"integer"},cycles:{items:{$ref:"#/$defs/CircularCycleV1"},type:"array"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},limit:{format:"uint64",minimum:0,type:"integer"},member_limit:{format:"uint64",minimum:0,type:"integer"},omitted_cycle_count:{format:"uint64",minimum:0,type:"integer"},reported_cycle_count:{format:"uint64",minimum:0,type:"integer"}},required:["cycle_count","reported_cycle_count","omitted_cycle_count","limit","member_limit","cycles"],title:"CircularResultV1",type:"object"},{$defs:{CallableCodeSurfaceMeta:fq,CodeGenerationId:fz,CodeQueryScope:fZ,ResultProjection:_H,RetrievalOrder:_Z},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{maximum_depth:{default:3,format:"uint32",minimum:0,type:"integer"},meta:{$ref:"#/$defs/CallableCodeSurfaceMeta",default:{cursor:null,order:"source_position",projection:"evidence"}},node_id:{type:"string"},resolve_trait_dispatch:{default:!0,type:"boolean"},scope:{$ref:"#/$defs/CodeQueryScope",default:{generation:"code-generation:unpinned-latest.v1",path_prefix:null}}},required:["node_id"],title:"CodeCalleesSurfaceRequest",type:"object"},{$defs:{CodeGenerationId:fz,SymbolPrimitiveRecord:vZ,SymbolRelationRecord:vQ},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Generation-bound page returned by every callable code query. Coverage,\nomissions, scoring, and terminal state remain in the enclosing\n[`crate::result::RetrievalEvidence`].",properties:{generation:{$ref:"#/$defs/CodeGenerationId"},items:{items:{$ref:"#/$defs/SymbolRelationRecord"},type:"array"},next_cursor:{description:"Opaque resume token; its bounded string is the public wire form.",type:["string","null"]},query_fallback:{description:"Independently hashed exact/lexical/graph subpayload. Callers preserve it\nbyte-for-byte rather than interpreting it, so the public schema admits\nthe canonical JSON it carries without re-declaring its internals."},total:{format:"uint64",minimum:0,type:["integer","null"]}},required:["generation","items"],title:"CodeQueryPage",type:"object"},{$defs:{CallableCodeSurfaceMeta:fq,ResultProjection:_H,RetrievalOrder:_Z,SymbolGraphScope:vK},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{maximum_depth:{default:3,format:"uint32",minimum:0,type:"integer"},meta:{$ref:"#/$defs/CallableCodeSurfaceMeta",default:{cursor:null,order:"source_position",projection:"evidence"}},node_id:{type:"string"},scope:{$ref:"#/$defs/SymbolGraphScope",default:{path_prefix:null}}},required:["node_id"],title:"CodeCallersSurfaceRequest",type:"object"},{$defs:{CodeGenerationId:fz,CodeGraphReadFreshnessV1:fD,PrimitiveSupportGap:_c,SymbolPrimitiveRecord:vZ,SymbolRelationRecord:vQ,UtcMicros:bs},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Bounded semantic result shared by the compatibility surfaces. Rendering,\ntransport envelopes, and MCP content blocks remain outside this contract.",properties:{freshness:{$ref:"#/$defs/CodeGraphReadFreshnessV1"},generation:{$ref:"#/$defs/CodeGenerationId"},items:{items:{$ref:"#/$defs/SymbolRelationRecord"},type:"array"},next_cursor:{description:"Opaque resume token; its bounded string is the public wire form.",type:["string","null"]},related_edge_count:{format:"uint64",minimum:0,type:["integer","null"]},support_gaps:{items:{$ref:"#/$defs/PrimitiveSupportGap"},type:"array"},total:{format:"uint64",minimum:0,type:["integer","null"]},truncated:{type:"boolean"}},required:["generation","freshness","items","truncated","support_gaps"],title:"SymbolGraphPage",type:"object"},{$defs:{CallableCodeSurfaceMeta:fq,CodeGenerationId:fz,CodeQueryScope:fZ,ResultProjection:_H,RetrievalOrder:_Z},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{meta:{$ref:"#/$defs/CallableCodeSurfaceMeta"},node_id:{type:"string"},scope:{$ref:"#/$defs/CodeQueryScope"}},required:["node_id","scope","meta"],title:"CodeNavigationSurfaceRequest",type:"object"},{$defs:{CodeGenerationId:fz,SymbolPrimitiveRecord:vZ},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Generation-bound page returned by every callable code query. Coverage,\nomissions, scoring, and terminal state remain in the enclosing\n[`crate::result::RetrievalEvidence`].",properties:{generation:{$ref:"#/$defs/CodeGenerationId"},items:{items:{$ref:"#/$defs/SymbolPrimitiveRecord"},type:"array"},next_cursor:{description:"Opaque resume token; its bounded string is the public wire form.",type:["string","null"]},query_fallback:{description:"Independently hashed exact/lexical/graph subpayload. Callers preserve it\nbyte-for-byte rather than interpreting it, so the public schema admits\nthe canonical JSON it carries without re-declaring its internals."},total:{format:"uint64",minimum:0,type:["integer","null"]}},required:["generation","items"],title:"CodeQueryPage",type:"object"},{$defs:{CallableCodeSurfaceMeta:fq,CodeGenerationId:fz,CodeQueryScope:fZ,ExactTechnicalTermKindV1:h6,ResultProjection:_H,RetrievalOrder:_Z},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{kind:{anyOf:[{$ref:"#/$defs/ExactTechnicalTermKindV1"},{type:"null"}]},literal:{type:"string"},meta:{$ref:"#/$defs/CallableCodeSurfaceMeta"},scope:{$ref:"#/$defs/CodeQueryScope"}},required:["literal","scope","meta"],title:"CodeExactOccurrenceSurfaceRequest",type:"object"},{$defs:{CodeGenerationId:fz,CodeOccurrenceRecord:fJ,CodeSearchChunkId:fQ,ExactOccurrenceRecord:{additionalProperties:!1,properties:{matched_kind:{$ref:"#/$defs/ExactTechnicalTermKindV1"},matched_literal:{type:"string"},occurrence:{$ref:"#/$defs/CodeOccurrenceRecord"}},required:["occurrence","matched_kind","matched_literal"],type:"object"},ExactTechnicalTermKindV1:h6,FileOccurrenceId:yj,SourceSpan:vF,SymbolOccurrenceId:vJ},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Generation-bound page returned by every callable code query. Coverage,\nomissions, scoring, and terminal state remain in the enclosing\n[`crate::result::RetrievalEvidence`].",properties:{generation:{$ref:"#/$defs/CodeGenerationId"},items:{items:{$ref:"#/$defs/ExactOccurrenceRecord"},type:"array"},next_cursor:{description:"Opaque resume token; its bounded string is the public wire form.",type:["string","null"]},query_fallback:{description:"Independently hashed exact/lexical/graph subpayload. Callers preserve it\nbyte-for-byte rather than interpreting it, so the public schema admits\nthe canonical JSON it carries without re-declaring its internals."},total:{format:"uint64",minimum:0,type:["integer","null"]}},required:["generation","items"],title:"CodeQueryPage",type:"object"},{$defs:{CallableCodeSurfaceMeta:fq,CodeFacetDimension:fN,CodeGenerationId:fz,CodeQueryScope:fZ,ResultProjection:_H,RetrievalOrder:_Z},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{dimension:{$ref:"#/$defs/CodeFacetDimension"},meta:{$ref:"#/$defs/CallableCodeSurfaceMeta"},scope:{$ref:"#/$defs/CodeQueryScope"}},required:["dimension","scope","meta"],title:"CodeFacetSurfaceRequest",type:"object"},{$defs:{CodeFacetDimension:fN,CodeFacetRecord:{additionalProperties:!1,properties:{count:{format:"uint64",minimum:0,type:"integer"},dimension:{$ref:"#/$defs/CodeFacetDimension"},value:{type:"string"}},required:["dimension","value","count"],type:"object"},CodeGenerationId:fz},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Generation-bound page returned by every callable code query. Coverage,\nomissions, scoring, and terminal state remain in the enclosing\n[`crate::result::RetrievalEvidence`].",properties:{generation:{$ref:"#/$defs/CodeGenerationId"},items:{items:{$ref:"#/$defs/CodeFacetRecord"},type:"array"},next_cursor:{description:"Opaque resume token; its bounded string is the public wire form.",type:["string","null"]},query_fallback:{description:"Independently hashed exact/lexical/graph subpayload. Callers preserve it\nbyte-for-byte rather than interpreting it, so the public schema admits\nthe canonical JSON it carries without re-declaring its internals."},total:{format:"uint64",minimum:0,type:["integer","null"]}},required:["generation","items"],title:"CodeQueryPage",type:"object"},{$defs:{CallableCodeSurfaceMeta:fq,ImplementationSelector:{oneOf:[{properties:{name:{type:"string"},selector:{const:"trait",type:"string"}},required:["selector","name"],type:"object"},{properties:{name:{type:"string"},selector:{const:"method",type:"string"}},required:["selector","name"],type:"object"}]},ResultProjection:_H,RetrievalOrder:_Z,SymbolGraphScope:vK},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{meta:{$ref:"#/$defs/CallableCodeSurfaceMeta",default:{cursor:null,order:"source_position",projection:"evidence"}},scope:{$ref:"#/$defs/SymbolGraphScope",default:{path_prefix:null}},selector:{$ref:"#/$defs/ImplementationSelector"}},required:["selector"],title:"CodeImplementationsSurfaceRequest",type:"object"},{$defs:{CodeGenerationId:fz,CodeGraphReadFreshnessV1:fD,ImplementationRecord:{additionalProperties:!1,description:"One implementation match with its exact source: the implementing\nimpl/class block (methods included) for a trait selector, or the function\nbody for a method selector.",properties:{body:{type:"string"},dispatch_from:{description:"Trait or interface node a trait-selector match was reached through.",type:["string","null"]},edge_kind:{type:"string"},symbol:{$ref:"#/$defs/SymbolPrimitiveRecord"}},required:["symbol","edge_kind","body"],type:"object"},PrimitiveSupportGap:_c,SymbolPrimitiveRecord:vZ,UtcMicros:bs},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Bounded semantic result shared by the compatibility surfaces. Rendering,\ntransport envelopes, and MCP content blocks remain outside this contract.",properties:{freshness:{$ref:"#/$defs/CodeGraphReadFreshnessV1"},generation:{$ref:"#/$defs/CodeGenerationId"},items:{items:{$ref:"#/$defs/ImplementationRecord"},type:"array"},next_cursor:{description:"Opaque resume token; its bounded string is the public wire form.",type:["string","null"]},related_edge_count:{format:"uint64",minimum:0,type:["integer","null"]},support_gaps:{items:{$ref:"#/$defs/PrimitiveSupportGap"},type:"array"},total:{format:"uint64",minimum:0,type:["integer","null"]},truncated:{type:"boolean"}},required:["generation","freshness","items","truncated","support_gaps"],title:"SymbolGraphPage",type:"object"},{$defs:{CallableCodeSurfaceMeta:fq,CodeGenerationId:fz,CodeLexicalField:{description:"Typed code fields accepted by the generation-owned lexical authority.",enum:["symbol_name","qualified_name","path","signature","documentation","body_text","preamble_text","exact_term","subtoken"],type:"string"},CodeLexicalFieldFilter:{additionalProperties:!1,properties:{field:{$ref:"#/$defs/CodeLexicalField"},include:{type:"boolean"}},required:["field","include"],type:"object"},CodeQueryScope:fZ,ResultProjection:_H,RetrievalOrder:_Z},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Serializable adapter DTO for the request-local phrase query view.\n\nThe callable application request deliberately keeps its sanitized query\nnon-serializable. The owning runtime supplies the exact sanitizer\nrevisions when converting this transport DTO.",properties:{field_filters:{default:[],items:{$ref:"#/$defs/CodeLexicalFieldFilter"},type:"array"},fuzzy_budget:{default:0,format:"uint32",minimum:0,type:"integer"},meta:{$ref:"#/$defs/CallableCodeSurfaceMeta"},phrases:{items:{type:"string"},type:"array"},query:{type:"string"},scope:{$ref:"#/$defs/CodeQueryScope"}},required:["query","phrases","scope","meta"],title:"CodePhraseSearchSurfaceRequest",type:"object"},{$defs:{CodeGenerationId:fz,CodeOccurrenceRecord:fJ,CodeSearchChunkId:fQ,FileOccurrenceId:yj,LexicalOccurrenceRecord:{additionalProperties:!1,properties:{matched_phrases:{items:{type:"string"},type:"array"},matched_terms:{items:{type:"string"},type:"array"},occurrence:{$ref:"#/$defs/CodeOccurrenceRecord"},score_micros:{format:"uint64",minimum:0,type:"integer"}},required:["occurrence","score_micros","matched_phrases","matched_terms"],type:"object"},SourceSpan:vF,SymbolOccurrenceId:vJ},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Generation-bound page returned by every callable code query. Coverage,\nomissions, scoring, and terminal state remain in the enclosing\n[`crate::result::RetrievalEvidence`].",properties:{generation:{$ref:"#/$defs/CodeGenerationId"},items:{items:{$ref:"#/$defs/LexicalOccurrenceRecord"},type:"array"},next_cursor:{description:"Opaque resume token; its bounded string is the public wire form.",type:["string","null"]},query_fallback:{description:"Independently hashed exact/lexical/graph subpayload. Callers preserve it\nbyte-for-byte rather than interpreting it, so the public schema admits\nthe canonical JSON it carries without re-declaring its internals."},total:{format:"uint64",minimum:0,type:["integer","null"]}},required:["generation","items"],title:"CodeQueryPage",type:"object"},{$defs:{CallableCodeSurfaceMeta:fq,ResultProjection:_H,RetrievalOrder:_Z,SymbolGraphScope:vK},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{is_async:{type:["boolean","null"]},meta:{$ref:"#/$defs/CallableCodeSurfaceMeta",default:{cursor:null,order:"source_position",projection:"evidence"}},params:{default:[],items:{type:"string"},type:"array"},returns:{type:["string","null"]},scope:{$ref:"#/$defs/SymbolGraphScope",default:{path_prefix:null}}},title:"CodeSignatureSearchSurfaceRequest",type:"object"},{$defs:{CodeGenerationId:fz,CodeGraphReadFreshnessV1:fD,PrimitiveSupportGap:_c,SymbolPrimitiveRecord:vZ,UtcMicros:bs},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Bounded semantic result shared by the compatibility surfaces. Rendering,\ntransport envelopes, and MCP content blocks remain outside this contract.",properties:{freshness:{$ref:"#/$defs/CodeGraphReadFreshnessV1"},generation:{$ref:"#/$defs/CodeGenerationId"},items:{items:{$ref:"#/$defs/SymbolPrimitiveRecord"},type:"array"},next_cursor:{description:"Opaque resume token; its bounded string is the public wire form.",type:["string","null"]},related_edge_count:{format:"uint64",minimum:0,type:["integer","null"]},support_gaps:{items:{$ref:"#/$defs/PrimitiveSupportGap"},type:"array"},total:{format:"uint64",minimum:0,type:["integer","null"]},truncated:{type:"boolean"}},required:["generation","freshness","items","truncated","support_gaps"],title:"SymbolGraphPage",type:"object"},{$defs:{CallableCodeSurfaceMeta:fq,ResultProjection:_H,RetrievalOrder:_Z,SymbolGraphScope:vK},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{lazy_index_ignored_dependencies:{type:"boolean"},meta:{$ref:"#/$defs/CallableCodeSurfaceMeta"},query:{type:"string"},scope:{$ref:"#/$defs/SymbolGraphScope"}},required:["query","scope","lazy_index_ignored_dependencies","meta"],title:"CodeSymbolSearchSurfaceRequest",type:"object"},{$defs:{CallableCodeSurfaceMeta:fq,CodeGenerationId:fz,CodeQueryScope:fZ,ResultProjection:_H,RetrievalOrder:_Z},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{meta:{$ref:"#/$defs/CallableCodeSurfaceMeta"},scope:{$ref:"#/$defs/CodeQueryScope"}},required:["scope","meta"],title:"CodeTimelineSurfaceRequest",type:"object"},{$defs:{CodeGenerationId:fz,CodeTimelineRecord:{additionalProperties:!1,properties:{file_count:{format:"uint64",minimum:0,type:"integer"},generation:{$ref:"#/$defs/CodeGenerationId"},indexed_at:{$ref:"#/$defs/UtcMicros"},symbol_count:{format:"uint64",minimum:0,type:"integer"}},required:["generation","indexed_at","file_count","symbol_count"],type:"object"},UtcMicros:bs},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Generation-bound page returned by every callable code query. Coverage,\nomissions, scoring, and terminal state remain in the enclosing\n[`crate::result::RetrievalEvidence`].",properties:{generation:{$ref:"#/$defs/CodeGenerationId"},items:{items:{$ref:"#/$defs/CodeTimelineRecord"},type:"array"},next_cursor:{description:"Opaque resume token; its bounded string is the public wire form.",type:["string","null"]},query_fallback:{description:"Independently hashed exact/lexical/graph subpayload. Callers preserve it\nbyte-for-byte rather than interpreting it, so the public schema admits\nthe canonical JSON it carries without re-declaring its internals."},total:{format:"uint64",minimum:0,type:["integer","null"]}},required:["generation","items"],title:"CodeQueryPage",type:"object"},{$defs:{CallableCodeSurfaceMeta:fq,ResultProjection:_H,RetrievalOrder:_Z,SymbolGraphScope:vK},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{maximum_depth:{default:5,format:"uint32",minimum:0,type:"integer"},meta:{$ref:"#/$defs/CallableCodeSurfaceMeta",default:{cursor:null,order:"source_position",projection:"evidence"}},node_id:{type:"string"},scope:{$ref:"#/$defs/SymbolGraphScope",default:{path_prefix:null}}},required:["node_id"],title:"CodeTypeHierarchySurfaceRequest",type:"object"},{$defs:{CodeGenerationId:fz,CodeGraphReadFreshnessV1:fD,PrimitiveSupportGap:_c,SymbolPrimitiveRecord:vZ,TypeHierarchyRecord:{additionalProperties:!1,properties:{depth:{format:"uint32",minimum:0,type:"integer"},edge_kind:{type:"string"},parent_node_id:{type:"string"},symbol:{$ref:"#/$defs/SymbolPrimitiveRecord"}},required:["symbol","parent_node_id","edge_kind","depth"],type:"object"},UtcMicros:bs},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Bounded semantic result shared by the compatibility surfaces. Rendering,\ntransport envelopes, and MCP content blocks remain outside this contract.",properties:{freshness:{$ref:"#/$defs/CodeGraphReadFreshnessV1"},generation:{$ref:"#/$defs/CodeGenerationId"},items:{items:{$ref:"#/$defs/TypeHierarchyRecord"},type:"array"},next_cursor:{description:"Opaque resume token; its bounded string is the public wire form.",type:["string","null"]},related_edge_count:{format:"uint64",minimum:0,type:["integer","null"]},support_gaps:{items:{$ref:"#/$defs/PrimitiveSupportGap"},type:"array"},total:{format:"uint64",minimum:0,type:["integer","null"]},truncated:{type:"boolean"}},required:["generation","freshness","items","truncated","support_gaps"],title:"SymbolGraphPage",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{staged_only:{description:"If true, only analyze staged changes (default: false = all uncommitted\nchanges).",type:["boolean","null"]}},title:"CommitContextSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fF,CodeIndexConvergenceParkedV1:fL,CodeIndexStalenessStateV1:fB,CommitCategoryV1:{description:"The commit category the changed file roles suggest.",enum:["feature/fix (source + tests)","feature/fix/refactor","test","chore/docs/config"],type:"string"},CommitContextSummaryV1:{additionalProperties:!1,properties:{changed_files:{items:{$ref:"#/$defs/CommitFileRoleV1"},type:"array"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},recent_commits:{items:{type:"string"},type:"array"},suggested_category:{anyOf:[{$ref:"#/$defs/CommitCategoryV1"},{type:"null"}],description:"Absent when the worktree has no changes."},summary:{type:"string"},symbols_by_role:{additionalProperties:!1,properties:{config:{items:{$ref:"#/$defs/CommitSymbolEntryV1"},type:"array"},docs:{items:{$ref:"#/$defs/CommitSymbolEntryV1"},type:"array"},source:{items:{$ref:"#/$defs/CommitSymbolEntryV1"},type:"array"},test:{items:{$ref:"#/$defs/CommitSymbolEntryV1"},type:"array"}},type:"object"}},required:["changed_files","symbols_by_role","recent_commits","summary"],type:"object"},CommitFileRoleV1:{additionalProperties:!1,properties:{file:{type:"string"},role:{$ref:"#/$defs/GitFileRoleV1"},symbols:{format:"uint",minimum:0,type:"integer"}},required:["file","role","symbols"],type:"object"},CommitSymbolEntryV1:{anyOf:[{$ref:"#/$defs/CommitSymbolV1"},{$ref:"#/$defs/ConfigSummaryV1"}]},CommitSymbolV1:{additionalProperties:!1,properties:{file:{type:"string"},kind:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},name:{type:"string"}},required:["name","kind","file","line"],type:"object"},ConfigSummaryKindV1:f4,ConfigSummaryV1:f6,GitFileRoleV1:{description:"A changed file's semantic role.",enum:["config","docs","source","test"],type:"string"},GitToolErrorKindV1:y6,GitToolErrorV1:y3,GitToolFailureV1:y9,GitToolOperationV1:y5,PrimitiveFreshnessStateV1:_i,PrimitiveIndexingStateV1:_o,PrimitiveSearchFreshnessV1:_d},$schema:"https://json-schema.org/draft/2020-12/schema",anyOf:[{$ref:"#/$defs/CommitContextSummaryV1"},{$ref:"#/$defs/GitToolFailureV1"}],title:"CommitContextResultV1"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{limit:{description:"Maximum number of results to return (default: 10, at most 100).",format:"uint32",minimum:0,type:["integer","null"]},node_kind:{description:"Filter by node kind (default: every kind).",type:["string","null"]},path:{description:"Filter to files under this directory path (e.g. 'src/main/java').",type:["string","null"]}},title:"ComplexitySurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fF,CodeIndexConvergenceParkedV1:fL,CodeIndexStalenessStateV1:fB,ComplexityAnalysisV1:f1,ComplexityReportEntryV1:{additionalProperties:!1,properties:{branches:{format:"uint32",minimum:0,type:["integer","null"]},complexity_analysis:{$ref:"#/$defs/ComplexityAnalysisV1"},cyclomatic_complexity:{description:"The counters are `None` when `complexity_analysis` reports the bounded\nwalk did not cover the body.",format:"uint32",minimum:0,type:["integer","null"]},fan_in:{format:"uint64",minimum:0,type:"integer"},fan_out:{format:"uint64",minimum:0,type:"integer"},file:{type:"string"},id:{type:"string"},kind:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},lines:{format:"uint32",minimum:0,type:"integer"},loops:{format:"uint32",minimum:0,type:["integer","null"]},max_nesting:{format:"uint32",minimum:0,type:["integer","null"]},name:{type:"string"},score:{format:"uint64",minimum:0,type:"integer"}},required:["id","name","kind","file","line","lines","complexity_analysis","fan_out","fan_in","score"],type:"object"},PrimitiveFreshnessStateV1:_i,PrimitiveIndexingStateV1:_o,PrimitiveSearchFreshnessV1:_d},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{formula:{type:"string"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},note:{type:"string"},ranking:{items:{$ref:"#/$defs/ComplexityReportEntryV1"},type:"array"},result_count:{format:"uint64",minimum:0,type:"integer"}},required:["formula","note","result_count","ranking"],title:"ComplexityReportV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Exactly one of `path` or `glob` names the files to query.",properties:{glob:{description:"Glob pattern to match multiple config files (e.g. '**/Cargo.toml').\nMutually exclusive with 'path'.",type:["string","null"]},key:{description:"Dot-separated key path (e.g. 'package.version',\n'dependencies.tokio.version').",type:"string"},path:{description:"Project-relative path to a single config file (e.g. 'Cargo.toml').\nMutually exclusive with 'glob'.",type:["string","null"]}},required:["key"],title:"ConfigSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fF,CodeIndexConvergenceParkedV1:fL,CodeIndexStalenessStateV1:fB,ConfigKeyFoundV1:{additionalProperties:!1,properties:{file:{type:"string"},key:{type:"string"},line:{description:"The first line whose text starts with the key's leaf segment.",format:"uint32",minimum:0,type:["integer","null"]},value:!0},required:["file","key","value"],type:"object"},ConfigKeyMissingV1:{additionalProperties:!1,description:"`value` is always null and `found` always false; both stay on the wire\nso a missing key reads the same as it always has.",properties:{file:{type:"string"},found:{type:"boolean"},key:{type:"string"},value:{type:"null"}},required:["file","key","value","found"],type:"object"},ConfigMatchV1:{anyOf:[{$ref:"#/$defs/ConfigParseErrorV1"},{$ref:"#/$defs/ConfigKeyMissingV1"},{$ref:"#/$defs/ConfigKeyFoundV1"}],description:"One queried config file: the file's parse error, the key's absence, or the\nkey's value and defining line.\n\nThe variants are distinguished by their exact field sets, so each one\ndenies unknown fields and the most specific shapes are tried first."},ConfigParseErrorV1:{additionalProperties:!1,properties:{error:{type:"string"},file:{type:"string"}},required:["file","error"],type:"object"},PrimitiveFreshnessStateV1:_i,PrimitiveIndexingStateV1:_o,PrimitiveSearchFreshnessV1:_d},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},match_count:{description:"Files where the key was found or that failed to parse.",format:"uint",minimum:0,type:"integer"},matches:{items:{$ref:"#/$defs/ConfigMatchV1"},type:"array"}},required:["match_count","matches"],title:"ConfigResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{cursor:{default:null,description:"The previous page's `next_cursor`, valid only with the same `limit`.",type:["string","null"]},limit:{format:"uint",minimum:0,type:"integer"}},required:["limit"],title:"ConfigurationAuditRequestV1",type:"object"},{$defs:{ActorId:mU,ConfigurationAuditEvent:{additionalProperties:!1,description:"Append-only audit record. `target_commitment` is event-scoped and cannot be\njoined across audit events; a caller must be separately authorized before\nany canonical target is resolved by the store/application layer.",properties:{actor_id:{$ref:"#/$defs/ActorId"},base_revision_id:{$ref:"#/$defs/ConfigurationRevisionId"},event_id:{$ref:"#/$defs/ConfigurationAuditEventId"},event_kind:{$ref:"#/$defs/ConfigurationAuditEventKindV1"},idempotency_key:{anyOf:[{$ref:"#/$defs/ConfigurationIdempotencyKey"},{type:"null"}]},occurred_at:{$ref:"#/$defs/UtcMicros"},operation_digest:{$ref:"#/$defs/ManifestDigest"},receipt_id:{anyOf:[{$ref:"#/$defs/ConfigurationReceiptId"},{type:"null"}]},result_revision_id:{anyOf:[{$ref:"#/$defs/ConfigurationRevisionId"},{type:"null"}]},safe_reason_code:{type:["string","null"]},target_commitment:{$ref:"#/$defs/ManifestDigest"}},required:["event_id","event_kind","actor_id","base_revision_id","operation_digest","target_commitment","occurred_at"],type:"object"},ConfigurationAuditEventId:{description:"Strongly typed canonical identity: `ConfigurationAuditEventId`.",type:"string"},ConfigurationAuditEventKindV1:{enum:["dry_run_created","applied","rejected","expired","activation_failed","rollback_dry_run_created","rollback_applied","recovered"],type:"string"},ConfigurationIdempotencyKey:f3,ConfigurationReceiptId:f5,ConfigurationRevisionId:f8,ManifestDigest:gj,UtcMicros:bs},$schema:"https://json-schema.org/draft/2020-12/schema",properties:{events:{items:{$ref:"#/$defs/ConfigurationAuditEvent"},type:"array"},next_cursor:{description:"Opaque continuation, bound to this operation and request.",type:["string","null"]}},required:["events"],title:"ConfigurationAuditPage",type:"object"},{$defs:{AccessRuleId:mL,ActorId:mU,AnalyzerEnvironmentVariable:mZ,AnalyzerExecutableId:mQ,AnalyzerExecutableReferenceV1:mX,AnalyzerLanguageId:mY,AnalyzerLanguageSelectionV1:m1,AnalyzerPrivacyClassV1:m0,AnalyzerResourceLimitsV1:m2,AnalyzerRestartPolicyV1:m4,AnalyzerSettingsV1:m6,AnalyzerStructuredValueV1:m3,AuthorityRef:m8,AutomaticWorktreeGcV1:fr,AutomationBackendV1:fi,AutomationHostModeV1:fo,AutomationSettingsV1:fl,AutomationTaskSetV1:fp,AutomationTaskSettingsV1:fu,BranchCollisionPolicyV1:fh,BranchNameComponentV1:fy,BranchNameSeparatorV1:fg,BranchNamingPolicyV1:f_,BranchTopologyKindV1:fV,BranchTopologyPolicyV1:fP,CanonicalGitRefNameV1:fC,CanonicalGitRefPrefix:fT,CapabilityId:fO,CodeIndexWorkerSelectionV1:fK,ConfigurationDirectMutationRequestV1:{oneOf:[{properties:{key:{$ref:"#/$defs/SettingKey"},layer:{$ref:"#/$defs/ConfigurationLayerIdV1"},operation:{const:"set",type:"string"},value:{$ref:"#/$defs/ConfigurationValueV1"}},required:["operation","layer","key","value"],type:"object"},{properties:{key:{$ref:"#/$defs/SettingKey"},layer:{$ref:"#/$defs/ConfigurationLayerIdV1"},operation:{const:"unset",type:"string"}},required:["operation","layer","key"],type:"object"}]},ConfigurationIdempotencyKey:f3,ConfigurationLayerIdV1:f9,ConfigurationRevisionId:f8,ConfigurationValueV1:he,ContextScoutConfigurationLimitsV1:hs,ContextScoutConfigurationModeV1:hd,ContextScoutConfigurationStateV1:hc,ContextScoutConfiguredModelPathV1:hl,ContextScoutIntentKindV1:h_,ContextScoutIntentSettingsV1:hv,ContextScoutSettingsV1:hI,CredentialReferenceId:hN,CrossMergeModeV1:hz,CrossMergePolicyV1:hD,DecisionEngineSettingsV1:hU,GitHubStackedPullRequestPolicyV1:yH,HistoryRewritePolicyV1:y7,IntentQuestionSettingsV1:go,IntentWindowSettingsV1:gn,LcmSummarizerExecutableV1:gg,LcmSummarizerExecutablesV1:g_,LocatorDigest:gk,ManifestDigest:gj,ProjectId:_m,ProtectedRefDispositionV1:_v,ProtectedRefRuleV1:_b,ProtectedRefSelectorV1:_$,ProviderId:_w,QueryCollectionId:_q,RepositoryId:_z,RepositoryPlacementScopeV1:_D,RequiredCheckExpectationV1:_F,RequiredCheckV1:_L,ReviewRequirementV1:_0,ReviewTopologyKindV1:_2,ReviewTopologyPolicyV1:_4,RuleEffect:_5,ScopeAccessRule:vi,ScopeAccessSubjectV1:vo,ScopeControlOperationV1:vn,ScopeSourceBinding:vp,SensitiveFilesystemLocatorV1:vf,SettingKey:vR,SourceBindingId:vA,SourceKindV1:vN,TopologyConcurrencyPolicyV1:be,TopologyEscalationPolicyV1:bt,TopologyGatePolicyV1:br,TopologyNotificationLevelV1:bi,UserProfileId:ba,UtcMicros:bs,WorkApprovalPolicy:bp,WorkContentLocationClassV1:bT,WorkEffortClassV1:bW,WorkEgressPolicy:bM,WorkExecutableBindingV1:bD,WorkExecutableCapabilityV1:bF,WorkExecutableReference:bL,WorkExecutionLimits:bH,WorkExpertiseCategoryV1:bB,WorkExpertiseConsentV1:bK,WorkFallbackTopology:bJ,WorkFilesystemPolicy:bQ,WorkOrdinalBandV1:$t,WorkProviderRouteId:$I,WorkProviderRouteV1:$x,WorkRouteCandidateV1:$M,WorkRouteExecutionProfileV1:$z,WorkSandboxPolicy:$H,WorkTopologyPolicyV1:$4,WorktreeCleanlinessRequirementV1:Si,WorktreePlacementModeV1:Ss,WorktreeRetentionPolicyV1:Sd,WorktreeRootPolicyV1:Sc},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{expected_revision:{$ref:"#/$defs/ConfigurationRevisionId"},idempotency_key:{$ref:"#/$defs/ConfigurationIdempotencyKey"},mutations:{items:{$ref:"#/$defs/ConfigurationDirectMutationRequestV1"},type:"array"}},required:["mutations","expected_revision","idempotency_key"],title:"ConfigurationBatchRequestV1",type:"object"},{$defs:{AccessPolicyDigest:mF,ConfigurationReceiptId:f5,ConfigurationRevisionId:f8,ConfigurationSettlementAuthorityV1:{additionalProperties:!1,description:"Original authorization evidence pinned to a durable configuration effect.\nA retry reauthorizes access separately without replacing these fields.",properties:{policy_digest:{$ref:"#/$defs/AccessPolicyDigest"},policy_epoch:{format:"uint64",minimum:0,type:"integer"},revalidated_at:{$ref:"#/$defs/UtcMicros"}},required:["policy_epoch","policy_digest","revalidated_at"],type:"object"},ConfigurationSnapshotId:f7,ManifestDigest:gj,UtcMicros:bs},$schema:"https://json-schema.org/draft/2020-12/schema",properties:{base_revision_id:{$ref:"#/$defs/ConfigurationRevisionId"},created_at:{$ref:"#/$defs/UtcMicros"},effective_deadline_at:{$ref:"#/$defs/UtcMicros"},operation_digest:{$ref:"#/$defs/ManifestDigest"},receipt_id:{$ref:"#/$defs/ConfigurationReceiptId"},result_revision_id:{$ref:"#/$defs/ConfigurationRevisionId"},settlement_authority:{$ref:"#/$defs/ConfigurationSettlementAuthorityV1"},snapshot_id:{$ref:"#/$defs/ConfigurationSnapshotId"}},required:["receipt_id","base_revision_id","result_revision_id","snapshot_id","operation_digest","settlement_authority","created_at","effective_deadline_at"],title:"ConfigurationMutationReceipt",type:"object"},{$defs:{SettingKey:vR},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{key:{$ref:"#/$defs/SettingKey"}},required:["key"],title:"ConfigurationGetRequestV1",type:"object"},{$defs:{AccessRuleId:mL,ActorId:mU,AnalyzerEnvironmentVariable:mZ,AnalyzerExecutableId:mQ,AnalyzerExecutableReferenceV1:mX,AnalyzerLanguageId:mY,AnalyzerLanguageSelectionV1:m1,AnalyzerPrivacyClassV1:m0,AnalyzerResourceLimitsV1:m2,AnalyzerRestartPolicyV1:m4,AnalyzerSettingsV1:m6,AnalyzerStructuredValueV1:m3,AuthorityRef:m8,AutomaticWorktreeGcV1:fr,AutomationBackendV1:fi,AutomationHostModeV1:fo,AutomationSettingsV1:fl,AutomationTaskSetV1:fp,AutomationTaskSettingsV1:fu,BranchCollisionPolicyV1:fh,BranchNameComponentV1:fy,BranchNameSeparatorV1:fg,BranchNamingPolicyV1:f_,BranchTopologyKindV1:fV,BranchTopologyPolicyV1:fP,CandidateDispositionV1:{enum:["winning","overridden","rejected","defaulted"],type:"string"},CanonicalGitRefNameV1:fC,CanonicalGitRefPrefix:fT,CapabilityId:fO,CodeIndexWorkerSelectionV1:fK,ConfigurationCandidateV1:{additionalProperties:!1,description:"Resolution provenance is intentionally distinct from behavior. Moving the\nsame winner between layers can change this material without changing the\neffective behavior digest.",properties:{disposition:{$ref:"#/$defs/CandidateDispositionV1"},layer:{$ref:"#/$defs/ConfigurationLayerIdV1"},revision_id:{$ref:"#/$defs/ConfigurationRevisionId"},safe_reason:{type:["string","null"]}},required:["layer","revision_id","disposition"],type:"object"},ConfigurationLayerIdV1:f9,ConfigurationRevisionId:f8,ConfigurationSettingActionV1:{enum:["set","unset"],type:"string"},ConfigurationSettingFindingV1:{description:"A stored value the running release keeps but does not apply. The value\nstays readable so `legal_actions` on the same key can replace it.",oneOf:[{additionalProperties:!1,description:"An `index.exclude.v1` / `index.include.v1` pattern that does not\ncompile. An earlier release stored it unchecked; indexing runs\nwithout it.",properties:{kind:{const:"invalid_index_path_pattern",type:"string"},legal_actions:{items:{$ref:"#/$defs/ConfigurationSettingActionV1"},type:"array"},message:{type:"string"},pattern:{type:"string"}},required:["kind","pattern","message","legal_actions"],type:"object"}]},ConfigurationSnapshotId:f7,ConfigurationValueV1:he,ContextScoutConfigurationLimitsV1:hs,ContextScoutConfigurationModeV1:hd,ContextScoutConfigurationStateV1:hc,ContextScoutConfiguredModelPathV1:hl,ContextScoutIntentKindV1:h_,ContextScoutIntentSettingsV1:hv,ContextScoutSettingsV1:hI,CredentialReferenceId:hN,CrossMergeModeV1:hz,CrossMergePolicyV1:hD,DecisionEngineSettingsV1:hU,GitHubStackedPullRequestPolicyV1:yH,HistoryRewritePolicyV1:y7,IntentQuestionSettingsV1:go,IntentWindowSettingsV1:gn,LcmSummarizerExecutableV1:gg,LcmSummarizerExecutablesV1:g_,LocatorDigest:gk,ManifestDigest:gj,ProjectId:_m,ProtectedRefDispositionV1:_v,ProtectedRefRuleV1:_b,ProtectedRefSelectorV1:_$,ProviderId:_w,QueryCollectionId:_q,RepositoryId:_z,RepositoryPlacementScopeV1:_D,RequiredCheckExpectationV1:_F,RequiredCheckV1:_L,ReviewRequirementV1:_0,ReviewTopologyKindV1:_2,ReviewTopologyPolicyV1:_4,RuleEffect:_5,ScopeAccessRule:vi,ScopeAccessSubjectV1:vo,ScopeControlOperationV1:vn,ScopeSourceBinding:vp,SensitiveFilesystemLocatorV1:vf,SettingKey:vR,SourceBindingId:vA,SourceKindV1:vN,TopologyConcurrencyPolicyV1:be,TopologyEscalationPolicyV1:bt,TopologyGatePolicyV1:br,TopologyNotificationLevelV1:bi,UserProfileId:ba,UtcMicros:bs,WorkApprovalPolicy:bp,WorkContentLocationClassV1:bT,WorkEffortClassV1:bW,WorkEgressPolicy:bM,WorkExecutableBindingV1:bD,WorkExecutableCapabilityV1:bF,WorkExecutableReference:bL,WorkExecutionLimits:bH,WorkExpertiseCategoryV1:bB,WorkExpertiseConsentV1:bK,WorkFallbackTopology:bJ,WorkFilesystemPolicy:bQ,WorkOrdinalBandV1:$t,WorkProviderRouteId:$I,WorkProviderRouteV1:$x,WorkRouteCandidateV1:$M,WorkRouteExecutionProfileV1:$z,WorkSandboxPolicy:$H,WorkTopologyPolicyV1:$4,WorktreeCleanlinessRequirementV1:Si,WorktreePlacementModeV1:Ss,WorktreeRetentionPolicyV1:Sd,WorktreeRootPolicyV1:Sc},$schema:"https://json-schema.org/draft/2020-12/schema",properties:{candidates:{items:{$ref:"#/$defs/ConfigurationCandidateV1"},type:"array"},effective_behavior_digest:{$ref:"#/$defs/ManifestDigest"},effective_value:{$ref:"#/$defs/ConfigurationValueV1"},findings:{description:"Parts of the stored value this release does not apply. Empty when the\neffective value applies in full.",items:{$ref:"#/$defs/ConfigurationSettingFindingV1"},type:"array"},key:{$ref:"#/$defs/SettingKey"},resolution_provenance_digest:{$ref:"#/$defs/ManifestDigest"},revision_id:{$ref:"#/$defs/ConfigurationRevisionId",description:"Current configuration revision accepted by mutation `expected_revision` CAS."},snapshot_id:{$ref:"#/$defs/ConfigurationSnapshotId",description:"Content identity of the fully resolved configuration snapshot."}},required:["key","effective_value","revision_id","snapshot_id","effective_behavior_digest","resolution_provenance_digest","candidates","findings"],title:"ResolvedSetting",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Typed input for the configuration list read through the daemon\ninvocation boundary.",title:"ConfigurationListRequestV1",type:"object"},{$defs:{RestartRequirementV1:{enum:["none","analyzer_restart","daemon_restart"],type:"string"},SettingKey:vR,SettingSensitivityV1:{enum:["public","sensitive"],type:"string"},SettingSummary:{properties:{key:{$ref:"#/$defs/SettingKey"},restart_requirement:{$ref:"#/$defs/RestartRequirementV1"},sensitivity:{$ref:"#/$defs/SettingSensitivityV1"}},required:["key","sensitivity","restart_requirement"],type:"object"}},$schema:"https://json-schema.org/draft/2020-12/schema",items:{$ref:"#/$defs/SettingSummary"},title:"Array_of_SettingSummary",type:"array"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,title:"ConfigurationObservedStateRequestV1",type:"object"},{$defs:{ActivationDriftV1:{enum:["current","never_activated","pending_restart","activation_failed"],type:"string"},ComponentConfigurationState:{properties:{activation_error_code:{type:["string","null"]},component:{type:"string"},desired_revision_id:{$ref:"#/$defs/ConfigurationRevisionId"},drift:{$ref:"#/$defs/ActivationDriftV1"},last_working_revision_id:{anyOf:[{$ref:"#/$defs/ConfigurationRevisionId"},{type:"null"}]},observed_revision_id:{anyOf:[{$ref:"#/$defs/ConfigurationRevisionId"},{type:"null"}]},restart_required:{type:"boolean"}},required:["component","desired_revision_id","restart_required","drift"],type:"object"},ConfigurationRevisionId:f8},$schema:"https://json-schema.org/draft/2020-12/schema",items:{$ref:"#/$defs/ComponentConfigurationState"},title:"Array_of_ComponentConfigurationState",type:"array"},{$defs:{ChangePlanId:fA,ConfigurationIdempotencyKey:f3,ConfigurationRevisionId:f8,ManifestDigest:gj},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{expected_base_revision_id:{$ref:"#/$defs/ConfigurationRevisionId"},idempotency_key:{$ref:"#/$defs/ConfigurationIdempotencyKey"},operation_digest:{$ref:"#/$defs/ManifestDigest"},plan_id:{$ref:"#/$defs/ChangePlanId"}},required:["plan_id","expected_base_revision_id","operation_digest","idempotency_key"],title:"ConfigurationProtectedApplyRequestV1",type:"object"},{$defs:{AccessRuleId:mL,ActorId:mU,AuthorityRef:m8,AutomaticWorktreeGcV1:fr,BranchCollisionPolicyV1:fh,BranchNameComponentV1:fy,BranchNameSeparatorV1:fg,BranchNamingPolicyV1:f_,BranchTopologyKindV1:fV,BranchTopologyPolicyV1:fP,CanonicalGitRefNameV1:fC,CanonicalGitRefPrefix:fT,CapabilityId:fO,ConfigurationRevisionId:f8,CrossMergeModeV1:hz,CrossMergePolicyV1:hD,GitHubStackedPullRequestPolicyV1:yH,HistoryRewritePolicyV1:y7,LocatorDigest:gk,ManifestDigest:gj,ProjectId:_m,ProtectedChange:{description:"The protected configuration operation set. Ordinary scalar mutations are\nintentionally absent; they activate directly after validation.",oneOf:[{properties:{kind:{const:"bind_source",type:"string"},value:{$ref:"#/$defs/ScopeSourceBinding"}},required:["kind","value"],type:"object"},{properties:{kind:{const:"rebind_source",type:"string"},value:{$ref:"#/$defs/ScopeSourceBinding"}},required:["kind","value"],type:"object"},{properties:{kind:{const:"unbind_source",type:"string"},value:{properties:{binding_id:{$ref:"#/$defs/SourceBindingId"}},required:["binding_id"],type:"object"}},required:["kind","value"],type:"object"},{properties:{kind:{const:"upsert_access_rule",type:"string"},value:{$ref:"#/$defs/ScopeAccessRule"}},required:["kind","value"],type:"object"},{properties:{kind:{const:"remove_access_rule",type:"string"},value:{properties:{rule_id:{$ref:"#/$defs/AccessRuleId"}},required:["rule_id"],type:"object"}},required:["kind","value"],type:"object"},{properties:{kind:{const:"replace_work_topology_policy",type:"string"},value:{$ref:"#/$defs/WorkTopologyPolicyV1"}},required:["kind","value"],type:"object"}]},ProtectedRefDispositionV1:_v,ProtectedRefRuleV1:_b,ProtectedRefSelectorV1:_$,RepositoryId:_z,RepositoryPlacementScopeV1:_D,RequiredCheckExpectationV1:_F,RequiredCheckV1:_L,ReviewRequirementV1:_0,ReviewTopologyKindV1:_2,ReviewTopologyPolicyV1:_4,RuleEffect:_5,ScopeAccessRule:vi,ScopeAccessSubjectV1:vo,ScopeControlOperationV1:vn,ScopeSourceBinding:vp,SensitiveFilesystemLocatorV1:vf,SourceBindingId:vA,SourceKindV1:vN,TopologyConcurrencyPolicyV1:be,TopologyEscalationPolicyV1:bt,TopologyGatePolicyV1:br,TopologyNotificationLevelV1:bi,UserProfileId:ba,UtcMicros:bs,WorkTopologyPolicyV1:$4,WorktreeCleanlinessRequirementV1:Si,WorktreePlacementModeV1:Ss,WorktreeRetentionPolicyV1:Sd,WorktreeRootPolicyV1:Sc},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{change:{$ref:"#/$defs/ProtectedChange"},expected_revision:{$ref:"#/$defs/ConfigurationRevisionId"}},required:["change","expected_revision"],title:"ConfigurationProtectedPreviewRequestV1",type:"object"},{$defs:{AccessPolicyDigest:mF,ActorId:mU,ChangePlanId:fA,ConfigurationRevisionId:f8,ManifestDigest:gj,RedactedConfigurationChangeV1:{additionalProperties:!1,properties:{after_digest:{anyOf:[{$ref:"#/$defs/ManifestDigest"},{type:"null"}]},before_digest:{anyOf:[{$ref:"#/$defs/ManifestDigest"},{type:"null"}]},operation:{$ref:"#/$defs/ScopeControlOperationV1"},setting_key:{$ref:"#/$defs/SettingKey"}},required:["setting_key","operation"],type:"object"},ScopeControlOperationV1:vn,SettingKey:vR,UtcMicros:bs},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Immutable dry-run result. It contains no raw locator, secret, target\nidentity, or plaintext configuration value.",properties:{actor_id:{$ref:"#/$defs/ActorId"},authorization_policy_digest:{$ref:"#/$defs/AccessPolicyDigest"},base_revision_id:{$ref:"#/$defs/ConfigurationRevisionId"},created_at:{$ref:"#/$defs/UtcMicros"},expires_at:{$ref:"#/$defs/UtcMicros"},membership_digest:{anyOf:[{$ref:"#/$defs/ManifestDigest"},{type:"null"}]},operation_digest:{$ref:"#/$defs/ManifestDigest"},plan_id:{$ref:"#/$defs/ChangePlanId"},policy_epoch:{format:"uint64",minimum:0,type:"integer"},redacted_changes:{items:{$ref:"#/$defs/RedactedConfigurationChangeV1"},type:"array"},resolved_scope_digest:{$ref:"#/$defs/ManifestDigest"}},required:["plan_id","actor_id","base_revision_id","operation_digest","resolved_scope_digest","authorization_policy_digest","policy_epoch","expires_at","created_at","redacted_changes"],title:"ProtectedChangePlan",type:"object"},{$defs:{ConfigurationRevisionId:f8,RollbackModeV1:{enum:["all_or_nothing","partial"],type:"string"}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{mode:{$ref:"#/$defs/RollbackModeV1"},target_revision_id:{$ref:"#/$defs/ConfigurationRevisionId"}},required:["target_revision_id","mode"],title:"ConfigurationRollbackPreviewRequestV1",type:"object"},{$defs:{AccessRuleId:mL,ActorId:mU,AnalyzerEnvironmentVariable:mZ,AnalyzerExecutableId:mQ,AnalyzerExecutableReferenceV1:mX,AnalyzerLanguageId:mY,AnalyzerLanguageSelectionV1:m1,AnalyzerPrivacyClassV1:m0,AnalyzerResourceLimitsV1:m2,AnalyzerRestartPolicyV1:m4,AnalyzerSettingsV1:m6,AnalyzerStructuredValueV1:m3,AuthorityRef:m8,AutomaticWorktreeGcV1:fr,AutomationBackendV1:fi,AutomationHostModeV1:fo,AutomationSettingsV1:fl,AutomationTaskSetV1:fp,AutomationTaskSettingsV1:fu,BranchCollisionPolicyV1:fh,BranchNameComponentV1:fy,BranchNameSeparatorV1:fg,BranchNamingPolicyV1:f_,BranchTopologyKindV1:fV,BranchTopologyPolicyV1:fP,CanonicalGitRefNameV1:fC,CanonicalGitRefPrefix:fT,CapabilityId:fO,CodeIndexWorkerSelectionV1:fK,ConfigurationIdempotencyKey:f3,ConfigurationLayerIdV1:f9,ConfigurationRevisionId:f8,ConfigurationValueV1:he,ContextScoutConfigurationLimitsV1:hs,ContextScoutConfigurationModeV1:hd,ContextScoutConfigurationStateV1:hc,ContextScoutConfiguredModelPathV1:hl,ContextScoutIntentKindV1:h_,ContextScoutIntentSettingsV1:hv,ContextScoutSettingsV1:hI,CredentialReferenceId:hN,CrossMergeModeV1:hz,CrossMergePolicyV1:hD,DecisionEngineSettingsV1:hU,GitHubStackedPullRequestPolicyV1:yH,HistoryRewritePolicyV1:y7,IntentQuestionSettingsV1:go,IntentWindowSettingsV1:gn,LcmSummarizerExecutableV1:gg,LcmSummarizerExecutablesV1:g_,LocatorDigest:gk,ManifestDigest:gj,ProjectId:_m,ProtectedRefDispositionV1:_v,ProtectedRefRuleV1:_b,ProtectedRefSelectorV1:_$,ProviderId:_w,QueryCollectionId:_q,RepositoryId:_z,RepositoryPlacementScopeV1:_D,RequiredCheckExpectationV1:_F,RequiredCheckV1:_L,ReviewRequirementV1:_0,ReviewTopologyKindV1:_2,ReviewTopologyPolicyV1:_4,RuleEffect:_5,ScopeAccessRule:vi,ScopeAccessSubjectV1:vo,ScopeControlOperationV1:vn,ScopeSourceBinding:vp,SensitiveFilesystemLocatorV1:vf,SettingKey:vR,SourceBindingId:vA,SourceKindV1:vN,TopologyConcurrencyPolicyV1:be,TopologyEscalationPolicyV1:bt,TopologyGatePolicyV1:br,TopologyNotificationLevelV1:bi,UserProfileId:ba,UtcMicros:bs,WorkApprovalPolicy:bp,WorkContentLocationClassV1:bT,WorkEffortClassV1:bW,WorkEgressPolicy:bM,WorkExecutableBindingV1:bD,WorkExecutableCapabilityV1:bF,WorkExecutableReference:bL,WorkExecutionLimits:bH,WorkExpertiseCategoryV1:bB,WorkExpertiseConsentV1:bK,WorkFallbackTopology:bJ,WorkFilesystemPolicy:bQ,WorkOrdinalBandV1:$t,WorkProviderRouteId:$I,WorkProviderRouteV1:$x,WorkRouteCandidateV1:$M,WorkRouteExecutionProfileV1:$z,WorkSandboxPolicy:$H,WorkTopologyPolicyV1:$4,WorktreeCleanlinessRequirementV1:Si,WorktreePlacementModeV1:Ss,WorktreeRetentionPolicyV1:Sd,WorktreeRootPolicyV1:Sc},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Typed revision-CAS input for a configuration write through the daemon\ninvocation boundary.",properties:{expected_revision:{$ref:"#/$defs/ConfigurationRevisionId"},idempotency_key:{$ref:"#/$defs/ConfigurationIdempotencyKey"},key:{$ref:"#/$defs/SettingKey"},layer:{$ref:"#/$defs/ConfigurationLayerIdV1"},value:{$ref:"#/$defs/ConfigurationValueV1"}},required:["layer","key","value","expected_revision","idempotency_key"],title:"ConfigurationSetRequestV1",type:"object"},{$defs:{ConfigurationIdempotencyKey:f3,ConfigurationLayerIdV1:f9,ConfigurationRevisionId:f8,ProjectId:_m,QueryCollectionId:_q,SettingKey:vR,UserProfileId:ba},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{expected_revision:{$ref:"#/$defs/ConfigurationRevisionId"},idempotency_key:{$ref:"#/$defs/ConfigurationIdempotencyKey"},key:{$ref:"#/$defs/SettingKey"},layer:{$ref:"#/$defs/ConfigurationLayerIdV1"}},required:["layer","key","expected_revision","idempotency_key"],title:"ConfigurationUnsetRequestV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{limit:{description:"Maximum number of literal sites to return (default: 100, max: 1000).",format:"uint32",minimum:0,type:["integer","null"]},struct:{description:"Struct name to search literal sites of (e.g. 'GraphStats', 'Config').",type:"string"}},required:["struct"],title:"ConstructorsSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fF,CodeIndexConvergenceParkedV1:fL,CodeIndexStalenessStateV1:fB,ConstructorFieldCoverageV1:{description:"Whether a literal site's field lists are complete relative to the\nstruct's graph definition.",enum:["complete","unknown"],type:"string"},ConstructorResolutionReasonV1:{enum:["ambiguous_simple_name","syntax_only_simple_name"],type:"string"},ConstructorResolutionStatusV1:{description:"Syntax alone cannot link same-name types across modules, so every\nresolution is unverified.",enum:["unverified"],type:"string"},ConstructorSiteV1:{additionalProperties:!1,properties:{field_coverage:{$ref:"#/$defs/ConstructorFieldCoverageV1"},fields:{items:{type:"string"},type:"array"},file:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},missing_fields:{items:{type:"string"},type:"array"},update_fields:{items:{type:"string"},type:"array"}},required:["file","line","fields","update_fields","missing_fields","field_coverage"],type:"object"},ConstructorsNotFoundV1:{additionalProperties:!1,properties:{found:{description:"Always `false`: no struct, class, or case class has the name.",type:"boolean"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},match_count:{format:"uint64",minimum:0,type:"integer"},message:{type:"string"},sites:{items:{$ref:"#/$defs/ConstructorSiteV1"},type:"array"},struct:{type:"string"}},required:["found","struct","message","match_count","sites"],type:"object"},ConstructorsReportV1:{additionalProperties:!1,properties:{candidate_count:{format:"uint64",minimum:0,type:"integer"},expected_fields:{description:"`None` when the name resolves to more than one definition.",items:{type:"string"},type:["array","null"]},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},match_count:{format:"uint64",minimum:0,type:"integer"},resolution_reason:{$ref:"#/$defs/ConstructorResolutionReasonV1"},resolution_status:{$ref:"#/$defs/ConstructorResolutionStatusV1"},sites:{items:{$ref:"#/$defs/ConstructorSiteV1"},type:"array"},struct:{type:"string"}},required:["struct","candidate_count","resolution_status","resolution_reason","match_count","sites"],type:"object"},PrimitiveFreshnessStateV1:_i,PrimitiveIndexingStateV1:_o,PrimitiveSearchFreshnessV1:_d},$schema:"https://json-schema.org/draft/2020-12/schema",anyOf:[{$ref:"#/$defs/ConstructorsNotFoundV1"},{$ref:"#/$defs/ConstructorsReportV1"}],title:"ConstructorsResultV1"},{$defs:{ContextModeV1:hi},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{budget_tokens:{description:"Cap the ranked sections of the answer at about this many tokens.\nQuotas are fixed shares of the budget. The cut is reported on the result.",format:"uint32",minimum:0,type:["integer","null"]},include_code:{type:["boolean","null"]},include_memory:{type:["boolean","null"]},lexical_anchors:{description:"Exact identifiers or technical terms the answer must be about. Each\nruns as its own lexical route: hits carrying an anchor outrank hits\ncarrying none, exact hits included, every anchor with matches keeps at\nleast its best sites through the lane cap, and `lexical_anchors` in the\nresult reports each anchor's outcome: the sites this result returns\nand, by reason, the admitted sites it could not carry. Bounded and\nvalidated by the retrieval kernel; a\nviolation is a typed request rejection. Identifiers the task names\n(`snake_case`, `camelCase`, `a::b`) are anchored after these.",items:{type:"string"},type:["array","null"]},max_code_blocks:{format:"uint32",minimum:0,type:["integer","null"]},max_nodes:{format:"uint32",minimum:0,type:["integer","null"]},memory_limit:{format:"uint32",minimum:0,type:["integer","null"]},memory_min_trust:{format:"double",type:["number","null"]},mode:{anyOf:[{$ref:"#/$defs/ContextModeV1"},{type:"null"}]},prefer_symbol:{description:"Add a symbol-name lexical route for the identifier-shaped words of the\ntask text.",type:["boolean","null"]},task:{type:"string"}},required:["task"],title:"ContextSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fF,CodeIndexConvergenceParkedV1:fL,CodeIndexStalenessStateV1:fB,ContextCodeBlockV1:{additionalProperties:!1,properties:{code:{type:"string"},end_line:{format:"uint32",minimum:0,type:"integer"},file:{type:"string"},node_id:{type:"string"},start_line:{format:"uint32",minimum:0,type:"integer"}},required:["node_id","file","start_line","end_line","code"],type:"object"},ContextExtensionPointV1:{additionalProperties:!1,description:"A public trait or interface among the context's selected symbols.",properties:{file:{type:"string"},implementor_count:{format:"uint",minimum:0,type:"integer"},kind:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},name:{type:"string"}},required:["name","kind","file","line","implementor_count"],type:"object"},ContextLexicalAnchorV1:hr,ContextModeV1:hi,ContextPlanV1:{additionalProperties:!1,description:"Plan-mode enrichment: where the selected code can be extended and which\ntest files reach it.",properties:{extension_points:{items:{$ref:"#/$defs/ContextExtensionPointV1"},type:"array"},test_files:{description:"Test files calling the selected symbols within two hops; absent when\nno symbol was selected to trace from.",items:{type:"string"},type:["array","null"]}},required:["extension_points"],type:"object"},ContextRelatedOmissionV1:{additionalProperties:!1,description:"Related symbols `context` ranked but did not return.",properties:{omitted:{description:"Ranked related symbols the `max_nodes` cut dropped.",format:"uint",minimum:0,type:"integer"},total:{description:"Distinct related symbols the walk found and ranked.",format:"uint",minimum:0,type:"integer"},total_is_lower_bound:{description:"The neighbor walk stopped at its row limit, so `total` is a lower\nbound.",type:"boolean"}},required:["total","omitted","total_is_lower_bound"],type:"object"},ContextRetrievalPlanV1:{additionalProperties:!1,description:"The retrieval plan `context` executed: which stages ran, what each\nadmitted, and where a budget bounded the answer. Lane-level serving state\nstays in `coverage`.",properties:{code:{$ref:"#/$defs/ContextStageV1",description:"Source bodies for selected symbols, bounded by `max_code_blocks`."},graph:{$ref:"#/$defs/ContextStageV1",description:"Candidates resolved to verified graph symbols."},memory:{$ref:"#/$defs/ContextStageV1",description:"Project memory facts, bounded by `memory_limit`."},related:{$ref:"#/$defs/ContextStageV1",description:"Ranked neighbors of the selected symbols, bounded by `max_nodes`."},search:{$ref:"#/$defs/ContextStageV1",description:"Ranked code-index candidates, bounded by `max_nodes`."}},required:["search","graph","related","code","memory"],type:"object"},ContextRetrievalRouteV1:{description:"Which retrieval route `context` ran.\n\n`name` is the preferred-symbol route. `prose` is the ordinary task\nroute. A caller that omits `prefer_symbol` gets `name` only when the\ntask is one identifier or one `Type.method` / `path::name` token.",enum:["name","prose"],type:"string"},ContextSearchMatchV1:{additionalProperties:!1,properties:{anchor_id:{type:"string"},anchors:{description:"Lexical anchors, the caller's and then the task's identifiers, whose\nroute ranked this match; the anchor receipt counts it as returned.",items:{type:"string"},type:"array"},exact_class:{type:"string"},file:{type:"string"},kind:{type:"string"},name:{type:"string"},qualified_name:{type:"string"},rank:{format:"uint32",minimum:0,type:"integer"},utility_micros:{format:"uint64",minimum:0,type:"integer"}},required:["anchor_id","name","qualified_name","kind","file","exact_class","rank","utility_micros"],type:"object"},ContextStageV1:{description:"What one `context` stage ran with and kept.",oneOf:[{description:"The request did not ask for this stage.",properties:{state:{const:"not_requested",type:"string"}},required:["state"],type:"object"},{description:"A stage this one reads from produced nothing to work on.",properties:{state:{const:"skipped",type:"string"}},required:["state"],type:"object"},{description:"The stage's authority could not answer.",properties:{state:{const:"unavailable",type:"string"}},required:["state"],type:"object"},{description:"The stage admitted `admitted` entries under `budget`. `truncated` is\ntrue when it stopped at that budget, so more entries may exist.",properties:{admitted:{format:"uint32",minimum:0,type:"integer"},budget:{format:"uint32",minimum:0,type:"integer"},state:{const:"ran",type:"string"},truncated:{type:"boolean"}},required:["state","budget","admitted","truncated"],type:"object"}]},FactAssertionId:h3,FactCategoryV1:h9,FactCommitOwnerV1:h8,FactEventId:ye,FactId:yr,FactIdentitySourceResultV1:yi,FactSearchGraphCoverageV1:ya,FactSearchGraphDegradationV1:ys,FactSearchHitV1:yd,FactSearchScoresV1:yc,FactTelemetryV1:yp,FactV1:yu,LexicalAnchorDropReasonV1:g$,LexicalAnchorDropV1:gS,LocatorDigest:gk,PrimitiveFreshnessStateV1:_i,PrimitiveIndexingStateV1:_o,PrimitiveLaneCompleteV1:_n,PrimitiveLaneStateV1:{enum:["stale","partial","unavailable"],type:"string"},PrimitiveLaneStatusV1:{anyOf:[{$ref:"#/$defs/PrimitiveLaneCompleteV1"},{properties:{generation:{type:["string","null"]},reason:{type:["string","null"]},status:{$ref:"#/$defs/PrimitiveLaneStateV1"}},required:["status"],type:"object"}]},PrimitiveRecallV1:_s,PrimitiveSearchCoverageV1:{additionalProperties:!1,properties:{exact:{$ref:"#/$defs/PrimitiveLaneStatusV1"},graph:{$ref:"#/$defs/PrimitiveLaneStatusV1"},lexical:{$ref:"#/$defs/PrimitiveLaneStatusV1"},recall:{$ref:"#/$defs/PrimitiveRecallV1"}},required:["exact","lexical","graph","recall"],type:"object"},PrimitiveSearchFreshnessV1:_d,PrimitiveSymbolLocationV1:_l,PrimitiveUnavailableEvidenceV1:_p,PrimitiveUnavailableStatusV1:_u,ProjectId:_m,ProvenanceId:_S,RetrievalAnchorId:_J,TokenBudgetCutV1:v8,TokenBudgetSectionV1:v7,UtcMicros:bs},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{code:{items:{$ref:"#/$defs/ContextCodeBlockV1"},type:"array"},code_generation:{type:["string","null"]},coverage:{$ref:"#/$defs/PrimitiveSearchCoverageV1"},freshness:{$ref:"#/$defs/PrimitiveSearchFreshnessV1",description:"Freshness of the served code generation, derived from the typed lane\ncoverage and the daemon scheduler's worktree state."},lexical_anchors:{description:"Outcome of every caller `lexical_anchors` entry, then of each\nidentifier the task names; empty when there are neither.",items:{$ref:"#/$defs/ContextLexicalAnchorV1"},type:"array"},memory_graph_coverage:{anyOf:[{$ref:"#/$defs/FactSearchGraphCoverageV1"},{type:"null"}]},memory_matches:{items:{$ref:"#/$defs/FactSearchHitV1"},type:"array"},memory_matches_error:{type:["string","null"]},mode:{$ref:"#/$defs/ContextModeV1"},oversized_symbols:{description:"Matched symbols whose declaration is larger than one code block.\nTheir code is withheld rather than served as a partial window.",items:{$ref:"#/$defs/PrimitiveSymbolLocationV1"},type:"array"},plan:{anyOf:[{$ref:"#/$defs/ContextPlanV1"},{type:"null"}],description:"Present in plan mode when the verified graph answered."},related_omission:{anyOf:[{$ref:"#/$defs/ContextRelatedOmissionV1"},{type:"null"}],description:"Present when related symbols were left out: by the `max_nodes` cut,\nor because the neighbor walk stopped at its row limit."},related_symbols:{description:"Neighbors of `symbols`, ranked before the `max_nodes` cut: best edge\nkind to a selected symbol (calls, implements, extends, `type_of`,\nreturns, receives, uses, annotates, contains), then total degree\ndescending, then qualified name.",items:{$ref:"#/$defs/PrimitiveSymbolLocationV1"},type:"array"},retrieval:{$ref:"#/$defs/ContextRetrievalPlanV1"},route:{$ref:"#/$defs/ContextRetrievalRouteV1"},search_matches:{items:{$ref:"#/$defs/ContextSearchMatchV1"},type:"array"},symbols:{items:{$ref:"#/$defs/PrimitiveSymbolLocationV1"},type:"array"},task:{type:"string"},token_budget:{anyOf:[{$ref:"#/$defs/TokenBudgetCutV1"},{type:"null"}],description:"Budget accounting when the request supplies `budget_tokens`."},verified_graph_evidence:{anyOf:[{$ref:"#/$defs/PrimitiveUnavailableEvidenceV1"},{type:"null"}]}},required:["task","route","mode","freshness","symbols","related_symbols","code","coverage","memory_matches","retrieval"],title:"ContextResultV1",type:"object"},{$defs:{ContextScoutAddressV1:ho},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{address:{$ref:"#/$defs/ContextScoutAddressV1"}},required:["address"],title:"ContextScoutExactAddressRequestV1",type:"object"},{$defs:{ContextScoutLimitsV1:hb,ContextScoutModelOutcomeV1:hS},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{exhausted:{type:"boolean"},last_estimated_cost_microusd:{format:"uint64",minimum:0,type:["integer","null"]},last_input_tokens:{format:"uint64",minimum:0,type:["integer","null"]},last_model_outcome:{anyOf:[{$ref:"#/$defs/ContextScoutModelOutcomeV1"},{type:"null"}]},last_output_tokens:{format:"uint64",minimum:0,type:["integer","null"]},limits:{$ref:"#/$defs/ContextScoutLimitsV1"}},required:["limits","exhausted"],title:"ContextScoutBudgetResultV1",type:"object"},{$defs:{ContextScoutAddressV1:ho,ContextScoutWorkV1:hT},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{address:{$ref:"#/$defs/ContextScoutAddressV1"},idempotency_key:{type:"string"},work:{$ref:"#/$defs/ContextScoutWorkV1"}},required:["address","work","idempotency_key"],title:"ContextScoutCancelRequestV1",type:"object"},{$defs:{ContextScoutStoreOutcomeV1:hx},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{outcome:{$ref:"#/$defs/ContextScoutStoreOutcomeV1"}},required:["outcome"],title:"ContextScoutMutationResultV1",type:"object"},{$defs:{ContextScoutModelBackendV1:h$,ContextScoutModelOutcomeV1:hS,ContextScoutRuntimeModeV1:hP,ContextScoutServiceStateV1:hR},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{configured_model:{anyOf:[{$ref:"#/$defs/ContextScoutModelBackendV1"},{type:"null"}]},configured_model_available:{type:"boolean"},deterministic_available:{type:"boolean"},last_model_outcome:{anyOf:[{$ref:"#/$defs/ContextScoutModelOutcomeV1"},{type:"null"}]},mode:{$ref:"#/$defs/ContextScoutRuntimeModeV1"},state:{$ref:"#/$defs/ContextScoutServiceStateV1"}},required:["state","mode","deterministic_available","configured_model_available"],title:"ContextScoutCapabilityResultV1",type:"object"},{$defs:{ContextScoutAddressV1:ho,ContextScoutClaimWindowV1:{enum:["idle_window","on_request"],type:"string"}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{address:{$ref:"#/$defs/ContextScoutAddressV1"},idempotency_key:{type:"string"},window:{$ref:"#/$defs/ContextScoutClaimWindowV1"}},required:["address","window","idempotency_key"],title:"ContextScoutClaimRequestV1",type:"object"},{$defs:{CodeGenerationId:fz,ContextScoutAddressV1:ho,ContextScoutCategoryV1:hn,ContextScoutClaimHandleV1:ha,ContextScoutDeliveryWindowV1:hm,ContextScoutEvidenceAvailabilityV1:hf,ContextScoutEvidenceProjectionV1:hh,ContextScoutModelBackendV1:h$,ContextScoutModelOutcomeV1:hS,ContextScoutModelReceiptV1:hk,ContextScoutRouteV1:hV,ContextScoutSessionWindowV1:hq,ContextScoutSuggestionProjectionV1:hj,ContextScoutWorkV1:hT,ManifestDigest:gj,RetrievalAnchorId:_J,UtcMicros:bs},$schema:"https://json-schema.org/draft/2020-12/schema",oneOf:[{properties:{claim:{$ref:"#/$defs/ContextScoutClaimHandleV1"},outcome:{const:"claimed",type:"string"},suggestion:{$ref:"#/$defs/ContextScoutSuggestionProjectionV1"}},required:["outcome","claim","suggestion"],type:"object"},{properties:{outcome:{const:"empty",type:"string"}},required:["outcome"],type:"object"}],title:"ContextScoutClaimResultV1"},{$defs:{ContextScoutAddressV1:ho,ContextScoutClaimHandleV1:ha,ContextScoutDeliveryOutcomeV1:hp,ContextScoutWorkV1:hT,UtcMicros:bs},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{address:{$ref:"#/$defs/ContextScoutAddressV1"},claim:{$ref:"#/$defs/ContextScoutClaimHandleV1"},delivered_at:{$ref:"#/$defs/UtcMicros"},idempotency_key:{type:"string"},outcome:{$ref:"#/$defs/ContextScoutDeliveryOutcomeV1"}},required:["address","claim","delivered_at","outcome","idempotency_key"],title:"ContextScoutDeliveryRequestV1",type:"object"},{$defs:{ContextScoutDeliveryOutcomeV1:hp,ContextScoutDeliveryReceiptV1:hu,ContextScoutStoreOutcomeV1:hx,UtcMicros:bs},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{outcome:{$ref:"#/$defs/ContextScoutStoreOutcomeV1"},receipt:{$ref:"#/$defs/ContextScoutDeliveryReceiptV1"}},required:["outcome","receipt"],title:"ContextScoutDeliveryResultV1",type:"object"},{$defs:{ContextScoutAddressV1:ho},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{address:{$ref:"#/$defs/ContextScoutAddressV1"},limit:{default:8,format:"uint",minimum:0,type:"integer"}},required:["address"],title:"ContextScoutRecentRequestV1",type:"object"},{$defs:{CodeGenerationId:fz,ContextScoutAddressV1:ho,ContextScoutCategoryV1:hn,ContextScoutDeliveryOutcomeV1:hp,ContextScoutDeliveryReceiptV1:hu,ContextScoutDeliveryWindowV1:hm,ContextScoutEvidenceAvailabilityV1:hf,ContextScoutEvidenceProjectionV1:hh,ContextScoutFeedbackKindV1:hy,ContextScoutFeedbackV1:hg,ContextScoutLimitsV1:hb,ContextScoutModelBackendV1:h$,ContextScoutModelOutcomeV1:hS,ContextScoutModelReceiptV1:hk,ContextScoutRecentDeliveryV1:hw,ContextScoutRecentResultV1:{additionalProperties:!1,properties:{configuration_revision:{items:{format:"uint8",maximum:255,minimum:0,type:"integer"},maxItems:32,minItems:32,type:"array"},deliveries:{items:{$ref:"#/$defs/ContextScoutRecentDeliveryV1"},type:"array"},observed_at:{$ref:"#/$defs/UtcMicros"},omitted:{format:"uint",minimum:0,type:"integer"},pending:{items:{$ref:"#/$defs/ContextScoutSuggestionProjectionV1"},type:"array"}},required:["configuration_revision","observed_at","pending","deliveries","omitted"],type:"object"},ContextScoutRouteV1:hV,ContextScoutRuntimeModeV1:hP,ContextScoutServiceStateV1:hR,ContextScoutSessionWindowV1:hq,ContextScoutStatusResultV1:{additionalProperties:!1,properties:{active_suggestions:{format:"uint",minimum:0,type:"integer"},configuration_revision:{items:{format:"uint8",maximum:255,minimum:0,type:"integer"},maxItems:32,minItems:32,type:"array"},last_delivery_outcome:{anyOf:[{$ref:"#/$defs/ContextScoutDeliveryOutcomeV1"},{type:"null"}]},last_feedback:{anyOf:[{$ref:"#/$defs/ContextScoutFeedbackKindV1"},{type:"null"}]},last_model_outcome:{anyOf:[{$ref:"#/$defs/ContextScoutModelOutcomeV1"},{type:"null"}]},last_model_receipt:{anyOf:[{$ref:"#/$defs/ContextScoutModelReceiptV1"},{type:"null"}]},last_route:{anyOf:[{$ref:"#/$defs/ContextScoutRouteV1"},{type:"null"}]},last_suppression:{anyOf:[{$ref:"#/$defs/ContextScoutSuppressionV1"},{type:"null"}]},limits:{$ref:"#/$defs/ContextScoutLimitsV1"},mode:{$ref:"#/$defs/ContextScoutRuntimeModeV1"},model_path:{anyOf:[{$ref:"#/$defs/ContextScoutModelBackendV1"},{type:"null"}]},state:{$ref:"#/$defs/ContextScoutServiceStateV1"}},required:["configuration_revision","state","mode","limits","active_suggestions"],type:"object"},ContextScoutSuggestionProjectionV1:hj,ContextScoutSuppressionV1:hC,ContextScoutWorkV1:hT,ManifestDigest:gj,RetrievalAnchorId:_J,UtcMicros:bs},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{recent:{$ref:"#/$defs/ContextScoutRecentResultV1"},status:{$ref:"#/$defs/ContextScoutStatusResultV1"}},required:["status","recent"],title:"ContextScoutExplanationResultV1",type:"object"},{$defs:{ContextScoutAddressV1:ho,ContextScoutDeliveryOutcomeV1:hp,ContextScoutDeliveryReceiptV1:hu,ContextScoutFeedbackKindV1:hy,ContextScoutFeedbackV1:hg,UtcMicros:bs},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{address:{$ref:"#/$defs/ContextScoutAddressV1"},feedback:{$ref:"#/$defs/ContextScoutFeedbackV1"},idempotency_key:{type:"string"},receipt:{$ref:"#/$defs/ContextScoutDeliveryReceiptV1"}},required:["address","receipt","feedback","idempotency_key"],title:"ContextScoutFeedbackRequestV1",type:"object"},{$defs:{ConfigurationIdempotencyKey:f3,ConfigurationRevisionId:f8,ContextScoutAddressV1:ho},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{address:{$ref:"#/$defs/ContextScoutAddressV1"},expected_revision:{$ref:"#/$defs/ConfigurationRevisionId"},idempotency_key:{$ref:"#/$defs/ConfigurationIdempotencyKey"}},required:["address","expected_revision","idempotency_key"],title:"ContextScoutControlRequestV1",type:"object"},{$defs:{CodeGenerationId:fz,ContextScoutAddressV1:ho,ContextScoutCategoryV1:hn,ContextScoutDeliveryOutcomeV1:hp,ContextScoutDeliveryReceiptV1:hu,ContextScoutDeliveryWindowV1:hm,ContextScoutEvidenceAvailabilityV1:hf,ContextScoutEvidenceProjectionV1:hh,ContextScoutFeedbackKindV1:hy,ContextScoutFeedbackV1:hg,ContextScoutModelBackendV1:h$,ContextScoutModelOutcomeV1:hS,ContextScoutModelReceiptV1:hk,ContextScoutRecentDeliveryV1:hw,ContextScoutRouteV1:hV,ContextScoutSessionWindowV1:hq,ContextScoutSuggestionProjectionV1:hj,ContextScoutWorkV1:hT,ManifestDigest:gj,RetrievalAnchorId:_J,UtcMicros:bs},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{configuration_revision:{items:{format:"uint8",maximum:255,minimum:0,type:"integer"},maxItems:32,minItems:32,type:"array"},deliveries:{items:{$ref:"#/$defs/ContextScoutRecentDeliveryV1"},type:"array"},observed_at:{$ref:"#/$defs/UtcMicros"},omitted:{format:"uint",minimum:0,type:"integer"},pending:{items:{$ref:"#/$defs/ContextScoutSuggestionProjectionV1"},type:"array"}},required:["configuration_revision","observed_at","pending","deliveries","omitted"],title:"ContextScoutRecentResultV1",type:"object"},{$defs:{ContextScoutDeliveryOutcomeV1:hp,ContextScoutFeedbackKindV1:hy,ContextScoutLimitsV1:hb,ContextScoutModelBackendV1:h$,ContextScoutModelOutcomeV1:hS,ContextScoutModelReceiptV1:hk,ContextScoutRouteV1:hV,ContextScoutRuntimeModeV1:hP,ContextScoutServiceStateV1:hR,ContextScoutSuppressionV1:hC},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{active_suggestions:{format:"uint",minimum:0,type:"integer"},configuration_revision:{items:{format:"uint8",maximum:255,minimum:0,type:"integer"},maxItems:32,minItems:32,type:"array"},last_delivery_outcome:{anyOf:[{$ref:"#/$defs/ContextScoutDeliveryOutcomeV1"},{type:"null"}]},last_feedback:{anyOf:[{$ref:"#/$defs/ContextScoutFeedbackKindV1"},{type:"null"}]},last_model_outcome:{anyOf:[{$ref:"#/$defs/ContextScoutModelOutcomeV1"},{type:"null"}]},last_model_receipt:{anyOf:[{$ref:"#/$defs/ContextScoutModelReceiptV1"},{type:"null"}]},last_route:{anyOf:[{$ref:"#/$defs/ContextScoutRouteV1"},{type:"null"}]},last_suppression:{anyOf:[{$ref:"#/$defs/ContextScoutSuppressionV1"},{type:"null"}]},limits:{$ref:"#/$defs/ContextScoutLimitsV1"},mode:{$ref:"#/$defs/ContextScoutRuntimeModeV1"},model_path:{anyOf:[{$ref:"#/$defs/ContextScoutModelBackendV1"},{type:"null"}]},state:{$ref:"#/$defs/ContextScoutServiceStateV1"}},required:["configuration_revision","state","mode","limits","active_suggestions"],title:"ContextScoutStatusResultV1",type:"object"},{$defs:{CouplingDirectionV1:hE},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{direction:{anyOf:[{$ref:"#/$defs/CouplingDirectionV1"},{type:"null"}],description:"fan_in: files depended on by the most others. fan_out: files that\ndepend on the most others (default: fan_in)."},limit:{description:"Maximum number of results to return (default: 10, at most 100).",format:"uint32",minimum:0,type:["integer","null"]},path:{description:"Filter to files under this directory path (e.g. 'src/main/java').",type:["string","null"]}},title:"CouplingSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fF,CodeIndexConvergenceParkedV1:fL,CodeIndexStalenessStateV1:fB,CouplingDirectionV1:hE,CouplingEntryV1:{additionalProperties:!1,properties:{coupled_files:{format:"uint64",minimum:0,type:"integer"},file:{type:"string"}},required:["file","coupled_files"],type:"object"},PrimitiveFreshnessStateV1:_i,PrimitiveIndexingStateV1:_o,PrimitiveSearchFreshnessV1:_d},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{direction:{$ref:"#/$defs/CouplingDirectionV1"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},ranking:{items:{$ref:"#/$defs/CouplingEntryV1"},type:"array"},result_count:{format:"uint64",minimum:0,type:"integer"}},required:["direction","result_count","ranking"],title:"CouplingResultV1",type:"object"},{$defs:{DashboardActionV1:{description:"What `tracedecay_dashboard` does.",enum:["start","stop"],type:"string"}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{action:{anyOf:[{$ref:"#/$defs/DashboardActionV1"},{type:"null"}],description:'Action to perform (default: "start"). "stop" shuts down a previously\nstarted dashboard if any.'},host:{description:'Loopback host address to bind: 127.0.0.1, localhost, or ::1\n(default: "127.0.0.1"). Wildcard, LAN, public IPs, and other\nhostnames are rejected.',type:["string","null"]},port:{description:"Port to listen on; 0 picks an ephemeral port (default: 7341).",format:"uint16",maximum:65535,minimum:0,type:["integer","null"]}},title:"DashboardSurfaceRequestV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",oneOf:[{additionalProperties:!1,properties:{host:{type:"string"},port:{format:"uint16",maximum:65535,minimum:0,type:"integer"},status:{const:"started",type:"string"},url:{type:"string"}},required:["status","url","host","port"],type:"object"},{additionalProperties:!1,description:"A dashboard that was already bound when `start` was asked again.",properties:{host:{type:"string"},port:{format:"uint16",maximum:65535,minimum:0,type:"integer"},requested_host:{type:"string"},requested_port:{format:"uint16",maximum:65535,minimum:0,type:"integer"},requested_port_honored:{description:"Whether the bound port is the one asked for (always true for 0).",type:"boolean"},status:{const:"already_running",type:"string"},url:{type:"string"}},required:["status","url","host","port","requested_host","requested_port","requested_port_honored"],type:"object"},{additionalProperties:!1,description:"The bound server is shutting down.",properties:{host:{type:"string"},port:{format:"uint16",maximum:65535,minimum:0,type:"integer"},requested_host:{type:"string"},requested_port:{format:"uint16",maximum:65535,minimum:0,type:"integer"},requested_port_honored:{description:"Whether the bound port is the one asked for (always true for 0).",type:"boolean"},status:{const:"stopping",type:"string"},url:{type:"string"}},required:["status","url","host","port","requested_host","requested_port","requested_port_honored"],type:"object"},{additionalProperties:!1,properties:{previous_url:{type:"string"},status:{const:"stopped",type:"string"}},required:["status","previous_url"],type:"object"},{additionalProperties:!1,properties:{status:{const:"not_running",type:"string"}},required:["status"],type:"object"}],title:"DashboardResultV1"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{include_public:{description:"When true, do NOT exclude pub items. Default false.",type:["boolean","null"]},kinds:{description:'Node kinds to check (default: ["function", "method"]).',items:{type:"string"},type:["array","null"]},limit:{description:"Maximum symbols to return (default: 100, max: 1000).",format:"uint32",minimum:0,type:["integer","null"]},path:{description:"Filter reported symbols to files under this directory path (e.g.\n'crates/tracedecay-mcp'). Omit for the entire codebase.",type:["string","null"]}},title:"DeadCodeSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fF,CodeIndexConvergenceParkedV1:fL,CodeIndexStalenessStateV1:fB,DeadCodeSymbolV1:{additionalProperties:!1,properties:{file:{type:"string"},id:{type:"string"},kind:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},name:{type:"string"},signature:{type:["string","null"]}},required:["id","name","kind","file","line"],type:"object"},PrimitiveFreshnessStateV1:_i,PrimitiveIndexingStateV1:_o,PrimitiveSearchFreshnessV1:_d},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{dead_code_count:{format:"uint64",minimum:0,type:"integer"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},symbols:{items:{$ref:"#/$defs/DeadCodeSymbolV1"},type:"array"}},required:["dead_code_count","symbols"],title:"DeadCodeResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{limit:{description:"Maximum number of chains to return (default: 10, at most 100).",format:"uint32",minimum:0,type:["integer","null"]},path:{description:"Filter to files under this directory path.",type:["string","null"]}},title:"DependencyDepthSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fF,CodeIndexConvergenceParkedV1:fL,CodeIndexStalenessStateV1:fB,DependencyDepthChainV1:{additionalProperties:!1,properties:{chain:{items:{type:"string"},type:"array"},depth:{format:"uint64",minimum:0,type:"integer"},file:{type:"string"}},required:["file","depth","chain"],type:"object"},PrimitiveFreshnessStateV1:_i,PrimitiveIndexingStateV1:_o,PrimitiveSearchFreshnessV1:_d},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"`ideal_depth` is `ceil(log2(file_count))`.",properties:{chains:{items:{$ref:"#/$defs/DependencyDepthChainV1"},type:"array"},depth_score:{format:"double",type:"number"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},ideal_depth:{format:"uint64",minimum:0,type:"integer"},max_depth:{format:"uint64",minimum:0,type:"integer"}},required:["max_depth","ideal_depth","depth_score","chains"],title:"DependencyDepthResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Addresses indexed symbols by node id or by qualified name; the node id\nwins when both are present.",properties:{node_id:{description:"Look up a single node by its ID instead of qualified_name.",type:["string","null"]},qualified_name:{description:"The exact, case-sensitive qualified name to look up. A bare short name\ndoes not match; resolve it with find_exact_symbol first.",type:["string","null"]}},title:"SymbolSelectorSurfaceRequestV1",type:"object"},{$defs:{DeriveAnnotationV1:{additionalProperties:!1,properties:{evidence_class:{$ref:"#/$defs/DeriveEvidenceClassV1"},name:{type:"string"},unavailable_fields:{items:{type:"string"},type:"array"}},required:["name","evidence_class","unavailable_fields"],type:"object"},DeriveEvidenceClassV1:{description:"How a derive name is known: read from the declaration's attributes, not\nfrom macro expansion.",enum:["syntax_exact"],type:"string"},DerivesSymbolV1:{additionalProperties:!1,properties:{derives:{items:{$ref:"#/$defs/DeriveAnnotationV1"},type:"array"},file:{type:"string"},kind:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},name:{type:"string"},node_id:{type:"string"},qualified_name:{type:"string"}},required:["node_id","name","qualified_name","kind","file","line","derives"],type:"object"}},$schema:"https://json-schema.org/draft/2020-12/schema",description:"Derive annotations of every addressed symbol; empty when no symbol matched.",items:{$ref:"#/$defs/DerivesSymbolV1"},title:"DerivesResultV1",type:"array"},{$defs:{DiagnoseSeverityFilterV1:{description:"Compiler severity the diagnose report keeps.",enum:["error","warning","all"],type:"string"}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{cargo_output:{description:"Raw stderr text from `cargo check` / `cargo clippy` / `rustc`.",type:"string"},include_callers:{description:"Attach up to 5 callers per diagnostic (default: true).",type:["boolean","null"]},max_diagnostics:{description:"Cap on diagnostics in the response (default: 50, at most 500).",format:"uint32",minimum:0,type:["integer","null"]},severity:{anyOf:[{$ref:"#/$defs/DiagnoseSeverityFilterV1"},{type:"null"}],description:"Filter by severity (default: all)."}},required:["cargo_output"],title:"DiagnoseSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fF,CodeIndexConvergenceParkedV1:fL,CodeIndexStalenessStateV1:fB,DiagnoseItemV1:{additionalProperties:!1,properties:{callers:{description:"Absent when the request turned caller attachment off.",items:{$ref:"#/$defs/DiagnoseSymbolV1"},type:["array","null"]},code:{type:["string","null"]},column:{format:"uint32",minimum:0,type:"integer"},file:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},message:{type:"string"},node:{anyOf:[{$ref:"#/$defs/DiagnoseSymbolV1"},{type:"null"}]},severity:{$ref:"#/$defs/DiagnoseSeverityV1"}},required:["severity","message","file","line","column"],type:"object"},DiagnosePublicationV1:{description:"Outcome of publishing the parsed diagnostics into the managed store.",oneOf:[{additionalProperties:!1,properties:{reason:{type:"string"},status:{const:"skipped",type:"string"},unresolved:{items:{type:"string"},type:["array","null"]}},required:["status","reason"],type:"object"},{additionalProperties:!1,properties:{cleared:{format:"uint64",minimum:0,type:"integer"},generation:{type:"string"},inserted:{format:"uint64",minimum:0,type:"integer"},publication_revision:{format:"uint64",minimum:0,type:"integer"},rejected:{items:{type:"string"},type:"array"},status:{const:"published",type:"string"},unresolved:{items:{type:"string"},type:"array"}},required:["status","generation","publication_revision","inserted","cleared","unresolved","rejected"],type:"object"},{additionalProperties:!1,properties:{reason:{type:"string"},status:{const:"failed",type:"string"}},required:["status","reason"],type:"object"}]},DiagnoseSeverityV1:{description:"Severity of one parsed compiler diagnostic.",enum:["error","warning","note","help"],type:"string"},DiagnoseSymbolV1:{additionalProperties:!1,description:"The graph symbol a diagnostic line falls in, or one of its callers.",properties:{end_line:{format:"uint32",minimum:0,type:"integer"},file:{type:"string"},kind:{type:"string"},line:{description:"One-based display line.",format:"uint32",minimum:0,type:"integer"},name:{type:"string"},node_id:{type:"string"},qualified_name:{type:"string"},start_line:{format:"uint32",minimum:0,type:"integer"}},required:["node_id","name","kind","qualified_name","file","line","start_line","end_line"],type:"object"},PrimitiveFreshnessStateV1:_i,PrimitiveIndexingStateV1:_o,PrimitiveSearchFreshnessV1:_d},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{diagnostics:{items:{$ref:"#/$defs/DiagnoseItemV1"},type:"array"},diagnostics_parsed:{format:"uint64",minimum:0,type:"integer"},diagnostics_returned:{format:"uint64",minimum:0,type:"integer"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},mapped_to_node:{format:"uint64",minimum:0,type:"integer"},published:{$ref:"#/$defs/DiagnosePublicationV1"},truncated:{type:"boolean"},unmapped:{format:"uint64",minimum:0,type:"integer"}},required:["diagnostics_parsed","diagnostics_returned","mapped_to_node","unmapped","truncated","published","diagnostics"],title:"DiagnoseResultV1",type:"object"},{$defs:{DiagnosticsPrimitiveScope:{oneOf:[{enum:["workspace"],type:"string"},{additionalProperties:!1,properties:{package:{type:"string"}},required:["package"],type:"object"},{additionalProperties:!1,properties:{file:{type:"string"}},required:["file"],type:"object"}]}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{cursor:{default:null,type:["string","null"]},maximum_diagnostics:{format:"uint32",minimum:0,type:"integer"},scope:{$ref:"#/$defs/DiagnosticsPrimitiveScope"}},required:["scope","maximum_diagnostics"],title:"DiagnosticsPrimitiveRequest",type:"object"},{$defs:{CodeGenerationId:fz,CommitId:fX,ComponentVersion:f2,ContentDigest:ht,DiagnosticEvidenceClassV1:{description:"Evidence class for one diagnostic record. Evidence class is part of\ncanonical diagnostic identity.",oneOf:[{const:"observed_current",description:"Directly observed against the exact clean generation it names.",type:"string"},{const:"producer_reported",description:"Reported by the cataloged producer for the exact clean generation.",type:"string"},{const:"derived_structural",description:"Derived from TraceDecay structural/graph analysis of the generation.",type:"string"},{const:"unknown_unsupported",description:"The evidence class cannot be established; the record is retained for\naudit but must not be treated as current truth.",type:"string"}]},DiagnosticPrimitiveRecord:{additionalProperties:!1,properties:{diagnostic:{$ref:"#/$defs/GenerationDiagnosticV1"},logical_path:{type:"string"}},required:["logical_path","diagnostic"],type:"object"},DiagnosticProducerKindV1:{description:"The cataloged producer kinds that may publish durable diagnostics.\nRuntime, storage, migration,\nconfiguration, session, or daemon-health findings without a truthful\nsource range are Doctor or application findings and never become\n`GenerationDiagnosticV1` records.",enum:["upstream_compiler","language_server","tracedecay_structural","tracedecay_graph_integrity","tracedecay_policy","tracedecay_code_health","generation_consistency","authorized_external_analyzer"],type:"string"},DiagnosticProvenanceV1:{additionalProperties:!1,description:"Producer provenance for one diagnostic. Diagnostic identity includes\nproducer provenance: identical findings from the same logical producer and\nrevision collapse; findings from distinct producers remain distinct.",properties:{analyzer_revision:{$ref:"#/$defs/ComponentVersion"},configuration_revision:{$ref:"#/$defs/ComponentVersion"},producer:{$ref:"#/$defs/ProviderId"},producer_kind:{$ref:"#/$defs/DiagnosticProducerKindV1"},sanitization_receipt:{anyOf:[{$ref:"#/$defs/SanitizationReceiptId"},{type:"null"}]}},required:["producer_kind","producer","analyzer_revision","configuration_revision"],type:"object"},DiagnosticRecordStateV1:{description:"Current-vs-stale typing for a durable diagnostic record. Publication is\nversion-monotone: a newer clean generation clears the prior publication\ndeterministically, and stale findings cannot cross snapshots.\nStale and historical records remain queryable through\napplication APIs but are excluded from active publication.",oneOf:[{description:"Current for exactly the clean generation named by the record.",properties:{kind:{const:"current",type:"string"}},required:["kind"],type:"object"},{description:"A clean generation completed and deterministically removed this\nfinding (resolution, deletion, source-revision drift, or content or\ngeneration change).",properties:{cleared_in_generation:{$ref:"#/$defs/CodeGenerationId"},kind:{const:"cleared",type:"string"}},required:["kind","cleared_in_generation"],type:"object"}]},DiagnosticSeverityV1:hH,FileOccurrenceId:yj,GenerationDiagnosticV1:{additionalProperties:!1,description:"One durable, generation-bound diagnostic record. Its diagnostic payload,\nscope, and producer provenance form observation identity; the display\nmessage remains sanitized product data.",properties:{code:{description:"Stable producer diagnostic code (for example `E0308`).",type:"string"},collected_at:{$ref:"#/$defs/UtcMicros",description:"Time the server first accepted this evidence observation. Compiler\noutput does not carry a trustworthy producer capture time, and an exact\nsemantic replay retains the first accepted value."},content_digest:{$ref:"#/$defs/ContentDigest",description:"Content digest of the attached file inside the generation."},diagnostic_anchor:{$ref:"#/$defs/RetrievalAnchorId",description:"Retrieval anchor addressing this record. The code index's\n`GenerationDiagnosticAttachmentV1::diagnostic_anchor` points here."},evidence_class:{$ref:"#/$defs/DiagnosticEvidenceClassV1"},file_occurrence_id:{$ref:"#/$defs/FileOccurrenceId",description:"Canonical file identity the diagnostic attaches to."},generation_id:{$ref:"#/$defs/CodeGenerationId",description:"The immutable clean code-intelligence generation this record is bound\nto. Findings never cross generations."},message:{description:"Sanitized display message; bounded by [`MAX_DIAGNOSTIC_MESSAGE_BYTES`].",type:"string"},message_digest:{$ref:"#/$defs/ManifestDigest",description:"Integrity digest over the sanitized message."},provenance:{$ref:"#/$defs/DiagnosticProvenanceV1"},reference:{anyOf:[{$ref:"#/$defs/RefId"},{type:"null"}]},repository:{$ref:"#/$defs/RepositoryId"},severity:{$ref:"#/$defs/DiagnosticSeverityV1"},source_revision:{anyOf:[{$ref:"#/$defs/CommitId"},{type:"null"}]},span:{$ref:"#/$defs/SourceSpan",description:"Range encoding inside the sanitized file (byte range; mutable line\nnumbers are never identity)."},state:{$ref:"#/$defs/DiagnosticRecordStateV1",description:"Current-vs-stale typing; publication is version-monotone."},symbol_occurrence_id:{anyOf:[{$ref:"#/$defs/SymbolOccurrenceId"},{type:"null"}],description:"Enclosing symbol occurrence, when exact attachment is possible."},worktree:{anyOf:[{$ref:"#/$defs/WorktreeId"},{type:"null"}]}},required:["diagnostic_anchor","generation_id","repository","file_occurrence_id","content_digest","span","code","severity","message","message_digest","provenance","evidence_class","collected_at","state"],type:"object"},ManifestDigest:gj,ProviderId:_w,RefId:_T,RepositoryId:_z,RetrievalAnchorId:_J,SanitizationReceiptId:{description:"Strongly typed canonical identity: `SanitizationReceiptId`.",type:"string"},SourceSpan:vF,SymbolOccurrenceId:vJ,UtcMicros:bs,WorktreeId:So},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{clean_generation:{type:"boolean"},diagnostics:{items:{$ref:"#/$defs/DiagnosticPrimitiveRecord"},type:"array"},findings_cleared:{type:"boolean"},generation_id:{$ref:"#/$defs/CodeGenerationId"},next_cursor:{type:["string","null"]}},required:["generation_id","clean_generation","findings_cleared","diagnostics"],title:"DiagnosticsPrimitiveResult",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{budget_tokens:{description:"Cap the symbol, test, and co-change sections at about this many tokens.",format:"uint32",minimum:0,type:["integer","null"]},depth:{description:"Maximum impact traversal depth (default: 2, at most 10).",format:"uint32",minimum:0,type:["integer","null"]},files:{description:"List of changed file paths.",items:{type:"string"},type:"array"}},required:["files"],title:"DiffContextSurfaceRequestV1",type:"object"},{$defs:{CoChangeUnavailableV1:fM,CodeIndexBuildBlockedReasonV1:fF,CodeIndexConvergenceParkedV1:fL,CodeIndexStalenessStateV1:fB,GitContextSymbolV1:yz,IncompatibleCallSiteV1:{additionalProperties:!1,description:"A call site whose argument count cannot invoke the new parameter list.",properties:{arguments:{format:"uint32",minimum:0,type:"integer"},file:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},name:{type:"string"}},required:["name","file","line","arguments"],type:"object"},MissingCoChangePartnerV1:gH,PrimitiveFreshnessStateV1:_i,PrimitiveIndexingStateV1:_o,PrimitiveSearchFreshnessV1:_d,SignatureEditStatusV1:{description:"How a modified function's parameter list compares with HEAD.",enum:["contract_change"],type:"string"},SignatureEditV1:{additionalProperties:!1,description:"A Rust free function whose parameter count differs from HEAD.",properties:{file:{type:"string"},incompatible:{items:{$ref:"#/$defs/IncompatibleCallSiteV1"},type:"array"},new_parameters:{format:"uint32",minimum:0,type:["integer","null"]},old_parameters:{format:"uint32",minimum:0,type:["integer","null"]},status:{$ref:"#/$defs/SignatureEditStatusV1"},symbol:{type:"string"}},required:["symbol","file","status","incompatible"],type:"object"},TestGateV1:{additionalProperties:!1,description:"Whether tests reach the symbols in a diff's blast radius.\n\n`pass` and exit 0 when every counted symbol is reached. `fail` and exit 4\nname the ones that are not. `incomplete` and exit 0 mean the caller walk\nstopped before that absence is known.",properties:{exit_code:{format:"uint8",maximum:255,minimum:0,type:"integer"},untested:{items:{type:"string"},type:"array"},verdict:{type:"string"}},required:["verdict","exit_code","untested"],type:"object"},TokenBudgetCutV1:v8,TokenBudgetSectionV1:v7},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{affected_tests:{items:{type:"string"},type:"array"},changed_files:{items:{type:"string"},type:"array"},co_change_unavailable:{anyOf:[{$ref:"#/$defs/CoChangeUnavailableV1"},{type:"null"}],description:"Present when Git history could not be mined for co-change partners."},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},impact_complete:{description:"False when the impact walk stopped at its depth or budget with callers\nstill unexplored.",type:"boolean"},impacted_symbols:{items:{$ref:"#/$defs/GitContextSymbolV1"},type:"array"},impacted_symbols_count:{format:"uint",minimum:0,type:"integer"},missing_co_change_partners:{description:"Files that usually change with a changed file, per bounded Git\nhistory, but are absent from this change set.",items:{$ref:"#/$defs/MissingCoChangePartnerV1"},type:"array"},modified_symbols:{items:{$ref:"#/$defs/GitContextSymbolV1"},type:"array"},signature_edits:{description:"Rust free functions whose parameter count changed since HEAD, with the\ncall sites that list cannot accept. Omitted when nothing changed.",items:{$ref:"#/$defs/SignatureEditV1"},type:"array"},test_gate:{$ref:"#/$defs/TestGateV1",description:"Symbols in this diff that no test reaches, and the verdict a CLI exits on."},token_budget:{anyOf:[{$ref:"#/$defs/TokenBudgetCutV1"},{type:"null"}],description:"Budget accounting when the request supplies `budget_tokens`."}},required:["changed_files","modified_symbols","impacted_symbols_count","impacted_symbols","impact_complete","affected_tests","missing_co_change_partners","test_gate"],title:"DiffContextResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{limit:{description:"Maximum number of files in the per-file breakdown, highest node count\nfirst (default: 100, max: 1000). Ignored when summary is true; the\nresponse states total_file_count and omitted_file_count.",format:"uint32",minimum:0,type:["integer","null"]},path:{description:"Directory or file path prefix to filter (e.g.\n'src/main/java/com/example'). Omit for entire codebase.",type:["string","null"]},summary:{description:"If true, aggregate counts across all matching files instead of\nper-file breakdown (default: false).",type:["boolean","null"]}},title:"DistributionSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fF,CodeIndexConvergenceParkedV1:fL,CodeIndexStalenessStateV1:fB,DistributionFileV1:{additionalProperties:!1,properties:{file:{type:"string"},kinds:{items:{$ref:"#/$defs/DistributionKindCountV1"},type:"array"}},required:["file","kinds"],type:"object"},DistributionKindCountV1:{additionalProperties:!1,properties:{count:{format:"uint64",minimum:0,type:"integer"},kind:{type:"string"}},required:["kind","count"],type:"object"},PrimitiveFreshnessStateV1:_i,PrimitiveIndexingStateV1:_o,PrimitiveSearchFreshnessV1:_d},$schema:"https://json-schema.org/draft/2020-12/schema",description:"Flattening the tagged view keeps `path_filter` ahead of `mode` on the\nwire; serde cannot deny unknown fields through a flattened member.",oneOf:[{properties:{distribution:{items:{$ref:"#/$defs/DistributionKindCountV1"},type:"array"},mode:{const:"summary",type:"string"},total_kinds:{format:"uint64",minimum:0,type:"integer"}},required:["mode","total_kinds","distribution"],type:"object"},{properties:{file_count:{format:"uint64",minimum:0,type:"integer"},files:{items:{$ref:"#/$defs/DistributionFileV1"},type:"array"},mode:{const:"per_file",type:"string"},omitted_file_count:{format:"uint64",minimum:0,type:"integer"},total_file_count:{format:"uint64",minimum:0,type:"integer"}},required:["mode","file_count","total_file_count","omitted_file_count","files"],type:"object"}],properties:{freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},path_filter:{type:["string","null"]}},title:"DistributionResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{limit:{description:"Maximum number of results to return (default: 50, at most 500).",format:"uint32",minimum:0,type:["integer","null"]},path:{description:"Directory or file path prefix to filter (e.g. 'src/main'). Omit for\nentire codebase.",type:["string","null"]}},title:"DocCoverageSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fF,CodeIndexConvergenceParkedV1:fL,CodeIndexStalenessStateV1:fB,DocCoverageFileV1:{additionalProperties:!1,properties:{count:{format:"uint64",minimum:0,type:"integer"},file:{type:"string"},symbols:{items:{$ref:"#/$defs/DocCoverageSymbolV1"},type:"array"}},required:["file","count","symbols"],type:"object"},DocCoverageSymbolV1:{additionalProperties:!1,properties:{id:{type:"string"},kind:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},name:{type:"string"},signature:{type:["string","null"]}},required:["id","name","kind","line"],type:"object"},PrimitiveFreshnessStateV1:_i,PrimitiveIndexingStateV1:_o,PrimitiveSearchFreshnessV1:_d},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{complete:{type:"boolean"},file_count:{format:"uint64",minimum:0,type:"integer"},files:{items:{$ref:"#/$defs/DocCoverageFileV1"},type:"array"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},limit:{format:"uint64",minimum:0,type:"integer"},omitted_count:{format:"uint64",minimum:0,type:"integer"},path_filter:{type:["string","null"]},returned_count:{format:"uint64",minimum:0,type:"integer"},total_undocumented:{format:"uint64",minimum:0,type:"integer"}},required:["total_undocumented","returned_count","omitted_count","complete","limit","file_count","files"],title:"DocCoverageResultV1",type:"object"},{$defs:{DsmShapeV1:hK},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{max_files:{description:"Maximum files in matrix format (default: 30, at most 200).",format:"uint32",minimum:0,type:["integer","null"]},path:{description:"Filter to files under this directory path.",type:["string","null"]},shape:{anyOf:[{$ref:"#/$defs/DsmShapeV1"},{type:"null"}],description:"DSM data shape: stats, clusters, or matrix (default: stats)."}},title:"DsmSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fF,CodeIndexConvergenceParkedV1:fL,CodeIndexStalenessStateV1:fB,DsmClusterV1:{additionalProperties:!1,properties:{boundary_edges:{format:"uint64",minimum:0,type:"integer"},directory:{type:"string"},file_count:{format:"uint64",minimum:0,type:"integer"},incoming_edges:{format:"uint64",minimum:0,type:"integer"},internal_edges:{format:"uint64",minimum:0,type:"integer"},outgoing_edges:{format:"uint64",minimum:0,type:"integer"}},required:["directory","file_count","internal_edges","outgoing_edges","incoming_edges","boundary_edges"],type:"object"},DsmMatrixV1:{additionalProperties:!1,properties:{files:{items:{type:"string"},type:"array"},matrix:{items:{items:{format:"uint8",maximum:255,minimum:0,type:"integer"},type:"array"},type:"array"},note:{type:"string"}},required:["files","matrix","note"],type:"object"},DsmShapeV1:hK,DsmStatsV1:{additionalProperties:!1,properties:{clusters:{format:"uint64",minimum:0,type:"integer"},density:{format:"double",type:"number"},edges:{format:"uint64",minimum:0,type:"integer"},files:{format:"uint64",minimum:0,type:"integer"},largest_cluster:{format:"uint64",minimum:0,type:"integer"}},required:["files","edges","density","clusters","largest_cluster"],type:"object"},PrimitiveFreshnessStateV1:_i,PrimitiveIndexingStateV1:_o,PrimitiveSearchFreshnessV1:_d},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{clusters:{items:{$ref:"#/$defs/DsmClusterV1"},type:"array"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},matrix:{anyOf:[{$ref:"#/$defs/DsmMatrixV1"},{type:"null"}]},shape:{$ref:"#/$defs/DsmShapeV1"},stats:{$ref:"#/$defs/DsmStatsV1"}},required:["shape","stats","clusters"],title:"DsmResultV1",type:"object"},{$defs:{FactEventId:ye,FactFeedbackActionV1:yt,FactId:yr,MemoryScopeV1:gT,ProjectId:_m},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{action:{$ref:"#/$defs/FactFeedbackActionV1"},expected_last_event_id:{anyOf:[{$ref:"#/$defs/FactEventId"},{type:"null"}]},fact_id:{$ref:"#/$defs/FactId"},memory_scope:{anyOf:[{$ref:"#/$defs/MemoryScopeV1"},{type:"null"}]},project_selector:{additionalProperties:!1,description:'Exact registered-project selector. Reads and fact effects run against the\nselected project.\n\nInlined so every request schema advertises the closed selector contract\n(`required: ["project_id"]`, no additional properties) directly on its\n`project_selector` property instead of behind a `$defs` reference, matching\nthe selector shape the MCP dispatch policy promises for selector-accepting\ntools.',properties:{project_id:{$ref:"#/$defs/ProjectId"}},required:["project_id"],type:["object","null"]},reason:{type:["string","null"]},source_label:{type:["string","null"]}},required:["fact_id","action"],title:"FactFeedbackRequestV1",type:"object"},{$defs:{FactAssertionId:h3,FactCategoryV1:h9,FactCommitDispositionV1:h5,FactCommitOwnerV1:h8,FactCommitReceiptV1:h7,FactEventId:ye,FactFeedbackActionV1:yt,FactFeedbackV1:{additionalProperties:!1,properties:{action:{$ref:"#/$defs/FactFeedbackActionV1"},event_id:{$ref:"#/$defs/FactEventId"},fact_id:{$ref:"#/$defs/FactId"},helpful_count:{format:"uint64",minimum:0,type:"integer"},new_trust_millionths:{format:"uint32",minimum:0,type:"integer"},old_trust_millionths:{format:"uint32",minimum:0,type:"integer"},trust_delta_millionths:{format:"int32",type:"integer"},unhelpful_count:{format:"uint64",minimum:0,type:"integer"}},required:["event_id","fact_id","action","old_trust_millionths","new_trust_millionths","trust_delta_millionths","helpful_count","unhelpful_count"],type:"object"},FactId:yr,FactIdentitySourceResultV1:yi,FactPayloadAccessV1:yo,FactProjectionV1:yn,FactStatusV1:yl,FactTelemetryV1:yp,FactV1:yu,LocatorDigest:gk,ProjectId:_m,ProvenanceId:_S,RetrievalAnchorId:_J,UtcMicros:bs},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{commit:{$ref:"#/$defs/FactCommitReceiptV1"},fact:{$ref:"#/$defs/FactProjectionV1"},feedback:{$ref:"#/$defs/FactFeedbackV1"}},required:["fact","feedback","commit"],title:"FactFeedbackResultV1",type:"object"},{$defs:{FactCategoryV1:h9,MemoryScopeV1:gT,ProjectId:_m},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{category:{anyOf:[{$ref:"#/$defs/FactCategoryV1"},{type:"null"}]},content:{type:"string"},entities:{default:[],items:{type:"string"},type:"array"},memory_scope:{anyOf:[{$ref:"#/$defs/MemoryScopeV1"},{type:"null"}]},metadata:{additionalProperties:!0,type:["object","null"]},project_selector:{additionalProperties:!1,description:'Exact registered-project selector. Reads and fact effects run against the\nselected project.\n\nInlined so every request schema advertises the closed selector contract\n(`required: ["project_id"]`, no additional properties) directly on its\n`project_selector` property instead of behind a `$defs` reference, matching\nthe selector shape the MCP dispatch policy promises for selector-accepting\ntools.',properties:{project_id:{$ref:"#/$defs/ProjectId"}},required:["project_id"],type:["object","null"]},source_label:{type:["string","null"]},tags:{default:[],items:{type:"string"},type:"array"},trust:{format:"double",type:["number","null"]}},required:["content"],title:"FactStoreAddRequestV1",type:"object"},{$defs:{FactAssertionId:h3,FactCategoryV1:h9,FactCommitDispositionV1:h5,FactCommitOwnerV1:h8,FactCommitReceiptV1:h7,FactEventId:ye,FactId:yr,FactIdentitySourceResultV1:yi,FactPayloadAccessV1:yo,FactProjectionV1:yn,FactStatusV1:yl,FactStoreAddCommitV1:{oneOf:[{additionalProperties:!1,properties:{commit:{$ref:"#/$defs/FactCommitReceiptV1"},disposition:{const:"added",type:"string"},fact:{$ref:"#/$defs/FactProjectionV1"}},required:["disposition","fact","commit"],type:"object"},{additionalProperties:!1,properties:{closest_fact_id:{$ref:"#/$defs/FactId"},commit:{$ref:"#/$defs/FactCommitReceiptV1"},disposition:{const:"near_duplicate",type:"string"},fact:{$ref:"#/$defs/FactProjectionV1"},similarity_millionths:{format:"uint32",minimum:0,type:"integer"}},required:["disposition","fact","closest_fact_id","similarity_millionths","commit"],type:"object"},{additionalProperties:!1,properties:{closest_fact_id:{$ref:"#/$defs/FactId"},commit:{$ref:"#/$defs/FactCommitReceiptV1"},disposition:{const:"possible_conflict",type:"string"},fact:{$ref:"#/$defs/FactProjectionV1"},similarity_millionths:{format:"uint32",minimum:0,type:"integer"}},required:["disposition","fact","closest_fact_id","similarity_millionths","commit"],type:"object"}]},FactTelemetryV1:yp,FactV1:yu,LocatorDigest:gk,ProjectId:_m,ProvenanceId:_S,RetrievalAnchorId:_J,UtcMicros:bs},$schema:"https://json-schema.org/draft/2020-12/schema",oneOf:[{additionalProperties:!1,properties:{outcome:{const:"secret_rejected",type:"string"}},required:["outcome"],type:"object"},{additionalProperties:!1,properties:{closest_fact_id:{$ref:"#/$defs/FactId"},fact:{$ref:"#/$defs/FactProjectionV1"},outcome:{const:"normalized_duplicate",type:"string"}},required:["outcome","fact","closest_fact_id"],type:"object"},{additionalProperties:!1,properties:{outcome:{const:"committed",type:"string"},result:{$ref:"#/$defs/FactStoreAddCommitV1"}},required:["outcome","result"],type:"object"}],title:"FactStoreAddResultV1"},{$defs:{FactCategoryV1:h9,MemoryScopeV1:gT,ProjectId:_m},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{category:{anyOf:[{$ref:"#/$defs/FactCategoryV1"},{type:"null"}]},limit:{format:"uint64",minimum:0,type:["integer","null"]},memory_scope:{anyOf:[{$ref:"#/$defs/MemoryScopeV1"},{type:"null"}]},project_selector:{additionalProperties:!1,description:'Exact registered-project selector. Reads and fact effects run against the\nselected project.\n\nInlined so every request schema advertises the closed selector contract\n(`required: ["project_id"]`, no additional properties) directly on its\n`project_selector` property instead of behind a `$defs` reference, matching\nthe selector shape the MCP dispatch policy promises for selector-accepting\ntools.',properties:{project_id:{$ref:"#/$defs/ProjectId"}},required:["project_id"],type:["object","null"]},threshold_millionths:{format:"uint32",minimum:0,type:["integer","null"]}},title:"FactStoreContradictRequestV1",type:"object"},{$defs:{FactAssertionId:h3,FactCategoryV1:h9,FactCommitOwnerV1:h8,FactContradictionV1:{additionalProperties:!1,properties:{existing_fact:{$ref:"#/$defs/FactV1"},new_content:{type:"string"},score_millionths:{format:"uint32",minimum:0,type:"integer"},why:{type:["string","null"]}},required:["existing_fact","new_content","score_millionths"],type:"object"},FactEventId:ye,FactId:yr,FactIdentitySourceResultV1:yi,FactTelemetryV1:yp,FactV1:yu,LocatorDigest:gk,ProjectId:_m,ProvenanceId:_S,RetrievalAnchorId:_J,UtcMicros:bs},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{contradictions:{items:{$ref:"#/$defs/FactContradictionV1"},type:"array"},owner:{$ref:"#/$defs/FactCommitOwnerV1"}},required:["owner","contradictions"],title:"FactStoreContradictResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Closed public launcher for the automatic Memory Curator.\n\nRun identity, task selection, operations, proposals, approval, and apply\nauthority are deliberately absent and rejected by `deny_unknown_fields`.",properties:{fact_review_limit:{default:24,format:"uint32",maximum:1e3,minimum:1,type:"integer"},min_confidence_millionths:{default:72e4,format:"uint32",maximum:1e6,minimum:0,type:"integer"}},title:"FactStoreCurateRequestV1",type:"object"},{$defs:{AutomationTaskV1:{description:"Automation capability selected after one registered application admission.",enum:["memory_curator","session_reflector","skill_writer","combined_review","user_job"],type:"string"},FactStoreCurateStateV1:{description:"Lifecycle state a `fact_store_curate` receipt reports.",oneOf:[{const:"started",description:"The run was admitted and continues on the daemon.",type:"string"}]},ManifestDigest:gj,RunId:_8},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Receipt of one admitted automatic curation.\n\nThe curator runs on the daemon after this receipt is returned. Its terminal\nis the automation run ledger record for `run_id`, read with\n`automation_run_view`.",properties:{request_digest:{$ref:"#/$defs/ManifestDigest"},run_id:{$ref:"#/$defs/RunId"},state:{$ref:"#/$defs/FactStoreCurateStateV1"},task:{$ref:"#/$defs/AutomationTaskV1"}},required:["run_id","task","request_digest","state"],title:"FactStoreCurateResultV1",type:"object"},{$defs:{FactId:yr,MemoryScopeV1:gT,ProjectId:_m},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{fact_id:{$ref:"#/$defs/FactId"},memory_scope:{anyOf:[{$ref:"#/$defs/MemoryScopeV1"},{type:"null"}]},project_selector:{additionalProperties:!1,description:'Exact registered-project selector. Reads and fact effects run against the\nselected project.\n\nInlined so every request schema advertises the closed selector contract\n(`required: ["project_id"]`, no additional properties) directly on its\n`project_selector` property instead of behind a `$defs` reference, matching\nthe selector shape the MCP dispatch policy promises for selector-accepting\ntools.',properties:{project_id:{$ref:"#/$defs/ProjectId"}},required:["project_id"],type:["object","null"]}},required:["fact_id"],title:"FactStoreGetRequestV1",type:"object"},{$defs:{FactAssertionId:h3,FactCategoryV1:h9,FactCommitOwnerV1:h8,FactEventId:ye,FactFeedbackActionV1:yt,FactFeedbackDetailsAvailabilityV1:{enum:["available","redacted","unknown"],type:"string"},FactId:yr,FactIdentitySourceResultV1:yi,FactPayloadAccessV1:yo,FactProjectionV1:yn,FactStatusV1:yl,FactTelemetryV1:yp,FactV1:yu,LocatorDigest:gk,ProjectId:_m,ProvenanceId:_S,RetrievalAnchorId:_J,TrustHistoryEntryV1:{additionalProperties:!1,properties:{action:{$ref:"#/$defs/FactFeedbackActionV1"},details_availability:{$ref:"#/$defs/FactFeedbackDetailsAvailabilityV1"},event_id:{$ref:"#/$defs/FactEventId"},new_trust_millionths:{format:"uint32",minimum:0,type:"integer"},occurred_at:{$ref:"#/$defs/UtcMicros"},old_trust_millionths:{format:"uint32",minimum:0,type:"integer"},reason:{type:["string","null"]},source_label:{type:["string","null"]}},required:["event_id","occurred_at","action","old_trust_millionths","new_trust_millionths","details_availability"],type:"object"},UtcMicros:bs},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{fact:{$ref:"#/$defs/FactProjectionV1"},trust_history:{items:{$ref:"#/$defs/TrustHistoryEntryV1"},type:"array"}},required:["fact","trust_history"],title:"FactStoreGetResultV1",type:"object"},{$defs:{FactCategoryV1:h9,MemoryScopeV1:gT,ProjectId:_m},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{after:{description:"The previous page's `next_after`, valid only with the same parameters.",type:["string","null"]},category:{anyOf:[{$ref:"#/$defs/FactCategoryV1"},{type:"null"}]},limit:{format:"uint64",minimum:0,type:["integer","null"]},memory_scope:{anyOf:[{$ref:"#/$defs/MemoryScopeV1"},{type:"null"}]},min_trust:{format:"double",type:["number","null"]},project_selector:{additionalProperties:!1,description:'Exact registered-project selector. Reads and fact effects run against the\nselected project.\n\nInlined so every request schema advertises the closed selector contract\n(`required: ["project_id"]`, no additional properties) directly on its\n`project_selector` property instead of behind a `$defs` reference, matching\nthe selector shape the MCP dispatch policy promises for selector-accepting\ntools.',properties:{project_id:{$ref:"#/$defs/ProjectId"}},required:["project_id"],type:["object","null"]}},title:"FactStoreListRequestV1",type:"object"},{$defs:{FactAssertionId:h3,FactCategoryV1:h9,FactCommitOwnerV1:h8,FactEventId:ye,FactId:yr,FactIdentitySourceResultV1:yi,FactPayloadAccessV1:yo,FactProjectionV1:yn,FactStatusV1:yl,FactTelemetryV1:yp,FactV1:yu,LocatorDigest:gk,ProjectId:_m,ProvenanceId:_S,RetrievalAnchorId:_J,UtcMicros:bs},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{facts:{items:{$ref:"#/$defs/FactProjectionV1"},type:"array"},next_after:{description:"Opaque continuation, bound to this operation and request.",type:["string","null"]},owner:{$ref:"#/$defs/FactCommitOwnerV1"}},required:["owner","facts"],title:"FactStoreListResultV1",type:"object"},{$defs:{FactCategoryV1:h9,MemoryScopeV1:gT,ProjectId:_m},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{after:{description:"The previous page's `next_after`, valid only with the same parameters.",type:["string","null"]},category:{anyOf:[{$ref:"#/$defs/FactCategoryV1"},{type:"null"}]},entity:{type:"string"},limit:{format:"uint64",minimum:0,type:["integer","null"]},memory_scope:{anyOf:[{$ref:"#/$defs/MemoryScopeV1"},{type:"null"}]},min_trust:{format:"double",type:["number","null"]},project_selector:{additionalProperties:!1,description:'Exact registered-project selector. Reads and fact effects run against the\nselected project.\n\nInlined so every request schema advertises the closed selector contract\n(`required: ["project_id"]`, no additional properties) directly on its\n`project_selector` property instead of behind a `$defs` reference, matching\nthe selector shape the MCP dispatch policy promises for selector-accepting\ntools.',properties:{project_id:{$ref:"#/$defs/ProjectId"}},required:["project_id"],type:["object","null"]}},required:["entity"],title:"FactStoreProbeRequestV1",type:"object"},{$defs:{FactAssertionId:h3,FactCategoryV1:h9,FactCommitOwnerV1:h8,FactEventId:ye,FactId:yr,FactIdentitySourceResultV1:yi,FactSearchGraphCoverageV1:ya,FactSearchGraphDegradationV1:ys,FactSearchHitV1:yd,FactSearchScoresV1:yc,FactTelemetryV1:yp,FactV1:yu,LocatorDigest:gk,ProjectId:_m,ProvenanceId:_S,RetrievalAnchorId:_J,UtcMicros:bs},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{graph_coverage:{$ref:"#/$defs/FactSearchGraphCoverageV1"},hits:{items:{$ref:"#/$defs/FactSearchHitV1"},type:"array"},next_after:{description:"Opaque continuation, bound to this operation and request.",type:["string","null"]},owner:{$ref:"#/$defs/FactCommitOwnerV1"}},required:["owner","hits","graph_coverage"],title:"FactStoreProbeResultV1",type:"object"},{$defs:{FactCategoryV1:h9,MemoryScopeV1:gT,ProjectId:_m},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{after:{description:"The previous page's `next_after`, valid only with the same parameters.",type:["string","null"]},category:{anyOf:[{$ref:"#/$defs/FactCategoryV1"},{type:"null"}]},entities:{items:{type:"string"},minItems:1,type:"array"},limit:{format:"uint64",minimum:0,type:["integer","null"]},memory_scope:{anyOf:[{$ref:"#/$defs/MemoryScopeV1"},{type:"null"}]},min_trust:{format:"double",type:["number","null"]},project_selector:{additionalProperties:!1,description:'Exact registered-project selector. Reads and fact effects run against the\nselected project.\n\nInlined so every request schema advertises the closed selector contract\n(`required: ["project_id"]`, no additional properties) directly on its\n`project_selector` property instead of behind a `$defs` reference, matching\nthe selector shape the MCP dispatch policy promises for selector-accepting\ntools.',properties:{project_id:{$ref:"#/$defs/ProjectId"}},required:["project_id"],type:["object","null"]}},required:["entities"],title:"FactStoreReasonRequestV1",type:"object"},{$defs:{FactAssertionId:h3,FactCategoryV1:h9,FactCommitOwnerV1:h8,FactEventId:ye,FactId:yr,FactIdentitySourceResultV1:yi,FactSearchGraphCoverageV1:ya,FactSearchGraphDegradationV1:ys,FactSearchHitV1:yd,FactSearchScoresV1:yc,FactTelemetryV1:yp,FactV1:yu,LocatorDigest:gk,ProjectId:_m,ProvenanceId:_S,RetrievalAnchorId:_J,UtcMicros:bs},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{graph_coverage:{$ref:"#/$defs/FactSearchGraphCoverageV1"},hits:{items:{$ref:"#/$defs/FactSearchHitV1"},type:"array"},next_after:{description:"Opaque continuation, bound to this operation and request.",type:["string","null"]},owner:{$ref:"#/$defs/FactCommitOwnerV1"}},required:["owner","hits","graph_coverage"],title:"FactStoreReasonResultV1",type:"object"},{$defs:{FactCategoryV1:h9,MemoryScopeV1:gT,ProjectId:_m},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{after:{description:"The previous page's `next_after`, valid only with the same parameters.",type:["string","null"]},category:{anyOf:[{$ref:"#/$defs/FactCategoryV1"},{type:"null"}]},entity:{type:"string"},limit:{format:"uint64",minimum:0,type:["integer","null"]},memory_scope:{anyOf:[{$ref:"#/$defs/MemoryScopeV1"},{type:"null"}]},min_trust:{format:"double",type:["number","null"]},project_selector:{additionalProperties:!1,description:'Exact registered-project selector. Reads and fact effects run against the\nselected project.\n\nInlined so every request schema advertises the closed selector contract\n(`required: ["project_id"]`, no additional properties) directly on its\n`project_selector` property instead of behind a `$defs` reference, matching\nthe selector shape the MCP dispatch policy promises for selector-accepting\ntools.',properties:{project_id:{$ref:"#/$defs/ProjectId"}},required:["project_id"],type:["object","null"]}},required:["entity"],title:"FactStoreRelatedRequestV1",type:"object"},{$defs:{FactAssertionId:h3,FactCategoryV1:h9,FactCommitOwnerV1:h8,FactEventId:ye,FactId:yr,FactIdentitySourceResultV1:yi,FactSearchGraphCoverageV1:ya,FactSearchGraphDegradationV1:ys,FactSearchHitV1:yd,FactSearchScoresV1:yc,FactTelemetryV1:yp,FactV1:yu,LocatorDigest:gk,ProjectId:_m,ProvenanceId:_S,RetrievalAnchorId:_J,UtcMicros:bs},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{graph_coverage:{$ref:"#/$defs/FactSearchGraphCoverageV1"},hits:{items:{$ref:"#/$defs/FactSearchHitV1"},type:"array"},next_after:{description:"Opaque continuation, bound to this operation and request.",type:["string","null"]},owner:{$ref:"#/$defs/FactCommitOwnerV1"}},required:["owner","hits","graph_coverage"],title:"FactStoreRelatedResultV1",type:"object"},{$defs:{FactEventId:ye,FactId:yr,MemoryScopeV1:gT,ProjectId:_m},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{expected_last_event_id:{anyOf:[{$ref:"#/$defs/FactEventId"},{type:"null"}]},fact_id:{$ref:"#/$defs/FactId"},memory_scope:{anyOf:[{$ref:"#/$defs/MemoryScopeV1"},{type:"null"}]},project_selector:{additionalProperties:!1,description:'Exact registered-project selector. Reads and fact effects run against the\nselected project.\n\nInlined so every request schema advertises the closed selector contract\n(`required: ["project_id"]`, no additional properties) directly on its\n`project_selector` property instead of behind a `$defs` reference, matching\nthe selector shape the MCP dispatch policy promises for selector-accepting\ntools.',properties:{project_id:{$ref:"#/$defs/ProjectId"}},required:["project_id"],type:["object","null"]}},required:["fact_id"],title:"FactStoreRemoveRequestV1",type:"object"},{$defs:{FactAssertionId:h3,FactCategoryV1:h9,FactCommitDispositionV1:h5,FactCommitOwnerV1:h8,FactCommitReceiptV1:h7,FactEventId:ye,FactId:yr,FactIdentitySourceResultV1:yi,FactPayloadAccessV1:yo,FactProjectionV1:yn,FactStatusV1:yl,FactTelemetryV1:yp,FactV1:yu,LocatorDigest:gk,ProjectId:_m,ProvenanceId:_S,RetrievalAnchorId:_J,UtcMicros:bs},$schema:"https://json-schema.org/draft/2020-12/schema",oneOf:[{additionalProperties:!1,properties:{commit:{$ref:"#/$defs/FactCommitReceiptV1"},fact:{$ref:"#/$defs/FactProjectionV1"},outcome:{const:"removed",type:"string"},remaining_fact_count:{format:"uint64",minimum:0,type:"integer"}},required:["outcome","fact","remaining_fact_count","commit"],type:"object"},{additionalProperties:!1,properties:{fact:{$ref:"#/$defs/FactProjectionV1"},outcome:{const:"already_removed",type:"string"},remaining_fact_count:{format:"uint64",minimum:0,type:"integer"}},required:["outcome","fact","remaining_fact_count"],type:"object"}],title:"FactStoreRemoveResultV1"},{$defs:{FactCategoryV1:h9,MemoryScopeV1:gT,ProjectId:_m},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{after:{description:"The previous page's `next_after`, valid only with the same parameters.",type:["string","null"]},category:{anyOf:[{$ref:"#/$defs/FactCategoryV1"},{type:"null"}]},limit:{format:"uint64",minimum:0,type:["integer","null"]},memory_scope:{anyOf:[{$ref:"#/$defs/MemoryScopeV1"},{type:"null"}]},min_trust:{format:"double",type:["number","null"]},project_selector:{additionalProperties:!1,description:'Exact registered-project selector. Reads and fact effects run against the\nselected project.\n\nInlined so every request schema advertises the closed selector contract\n(`required: ["project_id"]`, no additional properties) directly on its\n`project_selector` property instead of behind a `$defs` reference, matching\nthe selector shape the MCP dispatch policy promises for selector-accepting\ntools.',properties:{project_id:{$ref:"#/$defs/ProjectId"}},required:["project_id"],type:["object","null"]},query:{type:"string"}},required:["query"],title:"FactStoreSearchRequestV1",type:"object"},{$defs:{FactAssertionId:h3,FactCategoryV1:h9,FactCommitOwnerV1:h8,FactEventId:ye,FactId:yr,FactIdentitySourceResultV1:yi,FactRetrievalTelemetryDegradationV1:{enum:["unavailable","saturated"],type:"string"},FactRetrievalTelemetryV1:{description:"Whether an explicit search recorded retrieval telemetry for its hits.\n\nThe telemetry write is recall bookkeeping, not part of the returned\nevidence: when only that lane is unavailable the search still delivers its\nresult and reports the degradation here instead of refusing the read.",oneOf:[{additionalProperties:!1,description:"The result had no hits, so there was nothing to record.",properties:{kind:{const:"not_applicable",type:"string"}},required:["kind"],type:"object"},{additionalProperties:!1,description:"The selected store is mounted read-only; recording is never attempted.",properties:{kind:{const:"read_only",type:"string"}},required:["kind"],type:"object"},{additionalProperties:!1,properties:{fact_count:{format:"uint",minimum:0,type:"integer"},kind:{const:"recorded",type:"string"}},required:["kind","fact_count"],type:"object"},{additionalProperties:!1,properties:{kind:{const:"degraded",type:"string"},reason:{$ref:"#/$defs/FactRetrievalTelemetryDegradationV1"}},required:["kind","reason"],type:"object"}]},FactSearchGraphCoverageV1:ya,FactSearchGraphDegradationV1:ys,FactSearchHitV1:yd,FactSearchScoresV1:yc,FactTelemetryV1:yp,FactV1:yu,LocatorDigest:gk,ProjectId:_m,ProvenanceId:_S,RetrievalAnchorId:_J,UtcMicros:bs},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Explicit search additionally records retrieval telemetry for its returned\nhits; `retrieval_telemetry` reports whether that recall bookkeeping\nhappened, so a served result can truthfully carry a degraded write lane.",properties:{graph_coverage:{$ref:"#/$defs/FactSearchGraphCoverageV1"},hits:{items:{$ref:"#/$defs/FactSearchHitV1"},type:"array"},next_after:{description:"Opaque continuation, bound to this operation and request.",type:["string","null"]},owner:{$ref:"#/$defs/FactCommitOwnerV1"},retrieval_telemetry:{$ref:"#/$defs/FactRetrievalTelemetryV1"}},required:["owner","hits","graph_coverage","retrieval_telemetry"],title:"FactStoreSearchResultV1",type:"object"},{$defs:{FactEventId:ye,FactId:yr,MemoryScopeV1:gT,ProjectId:_m},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Mark `fact_id` as superseded by `superseded_by`. The old fact leaves the\ndefault retrieval surfaces but stays readable by id through its history;\npayload and trust are never rewritten.",properties:{expected_last_event_id:{anyOf:[{$ref:"#/$defs/FactEventId"},{type:"null"}]},fact_id:{$ref:"#/$defs/FactId"},memory_scope:{anyOf:[{$ref:"#/$defs/MemoryScopeV1"},{type:"null"}]},project_selector:{additionalProperties:!1,description:'Exact registered-project selector. Reads and fact effects run against the\nselected project.\n\nInlined so every request schema advertises the closed selector contract\n(`required: ["project_id"]`, no additional properties) directly on its\n`project_selector` property instead of behind a `$defs` reference, matching\nthe selector shape the MCP dispatch policy promises for selector-accepting\ntools.',properties:{project_id:{$ref:"#/$defs/ProjectId"}},required:["project_id"],type:["object","null"]},superseded_by:{$ref:"#/$defs/FactId"}},required:["fact_id","superseded_by"],title:"FactStoreSupersedeRequestV1",type:"object"},{$defs:{FactAssertionId:h3,FactCommitDispositionV1:h5,FactCommitOwnerV1:h8,FactCommitReceiptV1:h7,FactEventId:ye,FactId:yr,ProjectId:_m},$schema:"https://json-schema.org/draft/2020-12/schema",description:"Outcome of an explicit supersession. `superseded` carries the durable\ncommit receipt of the `Curated { SupersededBy }` lineage event;\n`already_superseded` reports the successor already recorded for the fact.",oneOf:[{additionalProperties:!1,properties:{commit:{$ref:"#/$defs/FactCommitReceiptV1"},fact_id:{$ref:"#/$defs/FactId"},outcome:{const:"superseded",type:"string"},superseded_by:{$ref:"#/$defs/FactId"}},required:["outcome","fact_id","superseded_by","commit"],type:"object"},{additionalProperties:!1,properties:{fact_id:{$ref:"#/$defs/FactId"},outcome:{const:"already_superseded",type:"string"},superseded_by:{$ref:"#/$defs/FactId"}},required:["outcome","fact_id","superseded_by"],type:"object"}],title:"FactStoreSupersedeResultV1"},{$defs:{FactCategoryV1:h9,FactEventId:ye,FactId:yr,FactSourceLabelPatchV1:{oneOf:[{additionalProperties:!1,properties:{kind:{const:"set",type:"string"},value:{type:"string"}},required:["kind","value"],type:"object"},{additionalProperties:!1,properties:{kind:{const:"clear",type:"string"}},required:["kind"],type:"object"}]},MemoryScopeV1:gT,ProjectId:_m},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{category:{anyOf:[{$ref:"#/$defs/FactCategoryV1"},{type:"null"}]},content:{type:["string","null"]},entities:{items:{type:"string"},type:["array","null"]},expected_last_event_id:{anyOf:[{$ref:"#/$defs/FactEventId"},{type:"null"}]},fact_id:{$ref:"#/$defs/FactId"},memory_scope:{anyOf:[{$ref:"#/$defs/MemoryScopeV1"},{type:"null"}]},metadata:{additionalProperties:!0,type:["object","null"]},project_selector:{additionalProperties:!1,description:'Exact registered-project selector. Reads and fact effects run against the\nselected project.\n\nInlined so every request schema advertises the closed selector contract\n(`required: ["project_id"]`, no additional properties) directly on its\n`project_selector` property instead of behind a `$defs` reference, matching\nthe selector shape the MCP dispatch policy promises for selector-accepting\ntools.',properties:{project_id:{$ref:"#/$defs/ProjectId"}},required:["project_id"],type:["object","null"]},source_label:{anyOf:[{$ref:"#/$defs/FactSourceLabelPatchV1"},{type:"null"}]},tags:{items:{type:"string"},type:["array","null"]},trust:{format:"double",type:["number","null"]}},required:["fact_id"],title:"FactStoreUpdateRequestV1",type:"object"},{$defs:{FactAssertionId:h3,FactCategoryV1:h9,FactCommitDispositionV1:h5,FactCommitOwnerV1:h8,FactCommitReceiptV1:h7,FactEventId:ye,FactId:yr,FactIdentitySourceResultV1:yi,FactPayloadAccessV1:yo,FactProjectionV1:yn,FactStatusV1:yl,FactTelemetryV1:yp,FactV1:yu,LocatorDigest:gk,ProjectId:_m,ProvenanceId:_S,RetrievalAnchorId:_J,UtcMicros:bs},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{commit:{$ref:"#/$defs/FactCommitReceiptV1"},fact:{$ref:"#/$defs/FactProjectionV1"},trust_delta_millionths:{format:"int32",type:"integer"}},required:["fact","trust_delta_millionths","commit"],title:"FactStoreUpdateResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Explicit advisory-cycle trigger for one document in the admitted project.",properties:{document_uri:{type:"string"}},required:["document_uri"],title:"FeedbackAdvisoryCycleSurfaceRequestV1",type:"object"},{$defs:{AgentInstanceId:mH,CodeGenerationId:fz,CommitId:fX,DiagnosticSeverityV1:hH,FeedbackAdvisoryCycleWireV1:{additionalProperties:!1,description:"One canonical cycle result plus whether its durable publication committed.\n\n`published` intentionally remains adjacent to the cycle fields on the\nwire: publication is a property of this exact cycle, not of a page or a\nlater lookup.",properties:{advisory_only:{type:"boolean"},advisory_provider_states:{items:{$ref:"#/$defs/FeedbackAdvisoryProviderStateV1"},type:"array"},affected_tests_state:{anyOf:[{$ref:"#/$defs/FeedbackImpactStateV1"},{type:"null"}]},baseline_states:{items:{$ref:"#/$defs/FeedbackBaselineStateV1"},type:"array"},configuration_digest:{$ref:"#/$defs/ManifestDigest"},content_identity:{anyOf:[{$ref:"#/$defs/FeedbackContentIdentityV1"},{type:"null"}]},cycle_id:{$ref:"#/$defs/FeedbackCycleId"},durability:{$ref:"#/$defs/FeedbackDurabilityV1"},findings:{items:{$ref:"#/$defs/FeedbackFindingV1"},type:"array"},impact:{anyOf:[{$ref:"#/$defs/FeedbackImpactV1"},{type:"null"}]},impact_state:{anyOf:[{$ref:"#/$defs/FeedbackImpactStateV1"},{type:"null"}]},omitted_findings:{format:"uint64",minimum:0,type:"integer"},policy_digest:{$ref:"#/$defs/ManifestDigest"},provider_states:{items:{$ref:"#/$defs/ProviderEvaluationStateV1"},type:"array"},published:{type:"boolean"},result_id:{$ref:"#/$defs/FeedbackResultId"},returned_findings:{format:"uint64",minimum:0,type:"integer"},scope:{$ref:"#/$defs/FeedbackScopeV1"},termination:{$ref:"#/$defs/FeedbackCycleTerminationV1"},total_findings:{format:"uint64",minimum:0,type:"integer"}},required:["result_id","cycle_id","scope","durability","policy_digest","configuration_digest","termination","provider_states","baseline_states","findings","total_findings","returned_findings","omitted_findings","advisory_only","published"],type:"object"},FeedbackAdvisoryFindingHandleV1:{additionalProperties:!1,description:"One daemon-minted read-handle pair for a finding in the published cycle.",properties:{expansion_handle:{type:["string","null"]},finding_id:{$ref:"#/$defs/FeedbackFindingId"},get_handle:{type:"string"},retrieval_anchor_id:{anyOf:[{$ref:"#/$defs/RetrievalAnchorId"},{type:"null"}]}},required:["finding_id","get_handle"],type:"object"},FeedbackAdvisoryProviderStateV1:ym,FeedbackAdvisoryReadHandlesV1:{additionalProperties:!1,description:"Daemon-minted handles for reads over this exact publication.",properties:{affected_tests_handle:{type:"string"},diagnostics_handle:{type:"string"},impact_handle:{type:"string"},list_handle:{type:"string"}},required:["diagnostics_handle","impact_handle","affected_tests_handle","list_handle"],type:"object"},FeedbackBaselineStateV1:yf,FeedbackContentIdentityV1:yh,FeedbackCycleId:yy,FeedbackCycleTerminationV1:yg,FeedbackDiagnosticClassificationV1:y_,FeedbackDiagnosticProducerV1:yv,FeedbackDiagnosticProjectionV1:yb,FeedbackDurabilityV1:y$,FeedbackFindingId:yS,FeedbackFindingLifecycleV1:yk,FeedbackFindingV1:yV,FeedbackImpactStateV1:yP,FeedbackImpactV1:yR,FeedbackResultId:yq,FeedbackScopeV1:yI,FeedbackTargetV1:yx,FileOccurrenceId:yj,HostInstanceId:ge,ManifestDigest:gj,ProjectId:_m,ProviderEvaluationStateV1:_k,RepositoryId:_z,RetrievalAnchorId:_J,SessionId:vv,SourceSpan:vF,SymbolOccurrenceId:vJ,WorktreeId:So},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Exact advisory-cycle payload serialized by the mounted daemon route.",properties:{cycle:{$ref:"#/$defs/FeedbackAdvisoryCycleWireV1"},finding_handles:{items:{$ref:"#/$defs/FeedbackAdvisoryFindingHandleV1"},type:"array"},read_handles:{anyOf:[{$ref:"#/$defs/FeedbackAdvisoryReadHandlesV1"},{type:"null"}]}},required:["cycle","finding_handles"],title:"FeedbackAdvisoryCycleSurfaceResultV1",type:"object"},{$defs:{AgentInstanceId:mH,CodeGenerationId:fz,CommitId:fX,DiagnosticSeverityV1:hH,FeedbackAdvisoryProviderStateV1:ym,FeedbackBaselineStateV1:yf,FeedbackContentIdentityV1:yh,FeedbackCycleId:yy,FeedbackCycleResultV1:{additionalProperties:!1,description:"One deterministic result for one trigger. The result represents a\nterminal advisory evaluation and contains no next-action execution hook.",properties:{advisory_only:{type:"boolean"},advisory_provider_states:{items:{$ref:"#/$defs/FeedbackAdvisoryProviderStateV1"},type:"array"},affected_tests_state:{anyOf:[{$ref:"#/$defs/FeedbackImpactStateV1"},{type:"null"}]},baseline_states:{items:{$ref:"#/$defs/FeedbackBaselineStateV1"},type:"array"},configuration_digest:{$ref:"#/$defs/ManifestDigest"},content_identity:{anyOf:[{$ref:"#/$defs/FeedbackContentIdentityV1"},{type:"null"}]},cycle_id:{$ref:"#/$defs/FeedbackCycleId"},durability:{$ref:"#/$defs/FeedbackDurabilityV1"},findings:{items:{$ref:"#/$defs/FeedbackFindingV1"},type:"array"},impact:{anyOf:[{$ref:"#/$defs/FeedbackImpactV1"},{type:"null"}]},impact_state:{anyOf:[{$ref:"#/$defs/FeedbackImpactStateV1"},{type:"null"}]},omitted_findings:{format:"uint64",minimum:0,type:"integer"},policy_digest:{$ref:"#/$defs/ManifestDigest"},provider_states:{items:{$ref:"#/$defs/ProviderEvaluationStateV1"},type:"array"},result_id:{$ref:"#/$defs/FeedbackResultId"},returned_findings:{format:"uint64",minimum:0,type:"integer"},scope:{$ref:"#/$defs/FeedbackScopeV1"},termination:{$ref:"#/$defs/FeedbackCycleTerminationV1"},total_findings:{format:"uint64",minimum:0,type:"integer"}},required:["result_id","cycle_id","scope","durability","policy_digest","configuration_digest","termination","provider_states","baseline_states","findings","total_findings","returned_findings","omitted_findings","advisory_only"],type:"object"},FeedbackCycleTerminationV1:yg,FeedbackDiagnosticClassificationV1:y_,FeedbackDiagnosticProducerV1:yv,FeedbackDiagnosticProjectionV1:yb,FeedbackDurabilityV1:y$,FeedbackFindingId:yS,FeedbackFindingLifecycleV1:yk,FeedbackFindingV1:yV,FeedbackImpactStateV1:yP,FeedbackImpactV1:yR,FeedbackResultId:yq,FeedbackScopeV1:yI,FeedbackTargetV1:yx,FileOccurrenceId:yj,HostInstanceId:ge,ManifestDigest:gj,ProjectId:_m,ProviderEvaluationStateV1:_k,RepositoryId:_z,RetrievalAnchorId:_J,SessionId:vv,SourceSpan:vF,SymbolOccurrenceId:vJ,WorktreeId:So},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{cycle:{$ref:"#/$defs/FeedbackCycleResultV1"}},required:["cycle"],title:"FeedbackDiagnosticsReadResultV1",type:"object"},{$defs:{AnchorExpandResult:{additionalProperties:!1,properties:{anchors:{items:{$ref:"#/$defs/RetrievalAnchorId"},type:"array"}},required:["anchors"],type:"object"},CommitId:fX,DiagnosticSeverityV1:hH,FeedbackCycleId:yy,FeedbackDiagnosticClassificationV1:y_,FeedbackDiagnosticProducerV1:yv,FeedbackDiagnosticProjectionV1:yb,FeedbackFindingId:yS,FeedbackFindingLifecycleV1:yk,FeedbackFindingReadV1:yw,FeedbackFindingV1:yV,FeedbackResultId:yq,FeedbackScopeV1:yI,FileOccurrenceId:yj,ProjectId:_m,ProviderEvaluationStateV1:_k,RepositoryId:_z,RetrievalAnchorId:_J,SourceSpan:vF,SymbolOccurrenceId:vJ,WorktreeId:So},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{expansion:{$ref:"#/$defs/AnchorExpandResult"},finding:{$ref:"#/$defs/FeedbackFindingReadV1"}},required:["finding","expansion"],title:"FeedbackExpandResultV1",type:"object"},{$defs:{CommitId:fX,DiagnosticSeverityV1:hH,FeedbackCycleId:yy,FeedbackDiagnosticClassificationV1:y_,FeedbackDiagnosticProducerV1:yv,FeedbackDiagnosticProjectionV1:yb,FeedbackFindingId:yS,FeedbackFindingLifecycleV1:yk,FeedbackFindingReadV1:yw,FeedbackFindingV1:yV,FeedbackResultId:yq,FeedbackScopeV1:yI,FileOccurrenceId:yj,ProjectId:_m,ProviderEvaluationStateV1:_k,RepositoryId:_z,RetrievalAnchorId:_J,SourceSpan:vF,SymbolOccurrenceId:vJ,WorktreeId:So},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{finding:{$ref:"#/$defs/FeedbackFindingReadV1"}},required:["finding"],title:"FeedbackGetResultV1",type:"object"},{$defs:{AgentInstanceId:mH,CodeGenerationId:fz,CommitId:fX,FeedbackContentIdentityV1:yh,FeedbackCycleId:yy,FeedbackImpactStateV1:yP,FeedbackImpactV1:yR,FeedbackResultId:yq,FeedbackScopeV1:yI,FeedbackTargetV1:yx,FileOccurrenceId:yj,HostInstanceId:ge,ManifestDigest:gj,ProjectId:_m,RepositoryId:_z,RetrievalAnchorId:_J,SessionId:vv,SourceSpan:vF,SymbolOccurrenceId:vJ,WorktreeId:So},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Canonical impact projection returned by `feedback_impact`.\n\nThe daemon-side projection owner (usecases) re-exports this type; it lives\nhere so the catalog contribution can register its schema body as the single\nRust-owned wire authority. Results project from an authorized completed\ncycle, and the canonical response wire remains consumable by typed SDKs.",properties:{content_identity:{anyOf:[{$ref:"#/$defs/FeedbackContentIdentityV1"},{type:"null"}]},cycle_id:{$ref:"#/$defs/FeedbackCycleId"},impact:{anyOf:[{$ref:"#/$defs/FeedbackImpactV1"},{type:"null"}]},result_id:{$ref:"#/$defs/FeedbackResultId"},scope:{$ref:"#/$defs/FeedbackScopeV1"},state:{anyOf:[{$ref:"#/$defs/FeedbackImpactStateV1"},{type:"null"}]}},required:["result_id","cycle_id","scope"],title:"CanonicalFeedbackImpactProjectionV1",type:"object"},{$defs:{CommitId:fX,DiagnosticSeverityV1:hH,FeedbackCycleId:yy,FeedbackDiagnosticClassificationV1:y_,FeedbackDiagnosticProducerV1:yv,FeedbackDiagnosticProjectionV1:yb,FeedbackFindingId:yS,FeedbackFindingLifecycleV1:yk,FeedbackFindingReadV1:yw,FeedbackFindingV1:yV,FeedbackResultId:yq,FeedbackScopeV1:yI,FileOccurrenceId:yj,ProjectId:_m,ProviderEvaluationStateV1:_k,RepositoryId:_z,RetrievalAnchorId:_J,SourceSpan:vF,SymbolOccurrenceId:vJ,WorktreeId:So},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{findings:{items:{$ref:"#/$defs/FeedbackFindingReadV1"},type:"array"}},required:["findings"],title:"FeedbackListResultV1",type:"object"},{$defs:{UtcMicros:bs},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{observed_at:{$ref:"#/$defs/UtcMicros"}},required:["observed_at"],title:"FeedbackProximityReadRequestV1",type:"object"},{$defs:{AgentInstanceId:mH,CodeGenerationId:fz,CommitId:fX,FeedbackProximityAccessKindV1:{enum:["read","write"],type:"string"},FeedbackProximityCloneHandleV1:{additionalProperties:!1,properties:{retrieval_anchor_ids:{items:{$ref:"#/$defs/RetrievalAnchorId"},type:"array"},source_generation:{$ref:"#/$defs/CodeGenerationId"},source_symbol:{$ref:"#/$defs/SymbolOccurrenceId"}},required:["source_generation","source_symbol","retrieval_anchor_ids"],type:"object"},FeedbackProximityConflictDifferenceV1:{additionalProperties:!1,properties:{difference_digest:{$ref:"#/$defs/ManifestDigest"},file:{$ref:"#/$defs/FileOccurrenceId"},span:{$ref:"#/$defs/SourceSpan"}},required:["file","span","difference_digest"],type:"object"},FeedbackProximityConflictHandleV1:{additionalProperties:!1,properties:{common_base_revision:{$ref:"#/$defs/CommitId"},differences:{items:{$ref:"#/$defs/FeedbackProximityConflictDifferenceV1"},type:"array"},evidence_digest:{$ref:"#/$defs/ManifestDigest"},left_head_revision:{$ref:"#/$defs/CommitId"},right_head_revision:{$ref:"#/$defs/CommitId"}},required:["common_base_revision","left_head_revision","right_head_revision","evidence_digest","differences"],type:"object"},FeedbackProximityEncounterV1:{additionalProperties:!1,properties:{coverage:{$ref:"#/$defs/ProximityCoverageV1"},encounter_id:{$ref:"#/$defs/ManifestDigest"},expires_at:{$ref:"#/$defs/UtcMicros"},interval:{$ref:"#/$defs/FeedbackProximityIntervalV1"},observed_at:{$ref:"#/$defs/UtcMicros"},participants:{items:{$ref:"#/$defs/FeedbackProximityParticipantV1"},type:"array"},relation:{$ref:"#/$defs/FeedbackProximityRelationV1"},scope:{$ref:"#/$defs/FeedbackScopeV1"}},required:["encounter_id","scope","interval","participants","relation","observed_at","expires_at","coverage"],type:"object"},FeedbackProximityIntervalV1:{additionalProperties:!1,properties:{end:{$ref:"#/$defs/UtcMicros"},start:{$ref:"#/$defs/UtcMicros"}},required:["start","end"],type:"object"},FeedbackProximityOmissionV1:{enum:["active_session_limit","session_activity_limit","recent_observation_limit","edited_path_limit","encounter_limit","missing_participant_observation","missing_participant_worktree","missing_participant_revision","missing_code_address","clone_coverage_partial","conflict_evidence_unavailable","code_index_revision_mismatch"],type:"string"},FeedbackProximityParticipantV1:{additionalProperties:!1,properties:{access:{$ref:"#/$defs/FeedbackProximityAccessKindV1"},activity:{$ref:"#/$defs/FeedbackProximityIntervalV1"},address:{$ref:"#/$defs/ProximityAddressV1"},agent_id:{$ref:"#/$defs/AgentInstanceId"},branch_ref:{anyOf:[{$ref:"#/$defs/RefId"},{type:"null"}]},head_revision:{anyOf:[{$ref:"#/$defs/CommitId"},{type:"null"}]},source:{$ref:"#/$defs/ObservationSourceIdentityV1"},worktree_id:{anyOf:[{$ref:"#/$defs/WorktreeId"},{type:"null"}]},worktree_root:{type:"string"}},required:["source","agent_id","worktree_root","access","activity","address"],type:"object"},FeedbackProximityReadPageV1:{additionalProperties:!1,properties:{encounters:{items:{$ref:"#/$defs/FeedbackProximityEncounterV1"},type:"array"},expires_at:{$ref:"#/$defs/UtcMicros"},observed_at:{$ref:"#/$defs/UtcMicros"},scope:{$ref:"#/$defs/FeedbackScopeV1"},source_generation:{$ref:"#/$defs/CodeGenerationId"}},required:["scope","source_generation","observed_at","expires_at","encounters"],type:"object"},FeedbackProximityRelationV1:{oneOf:[{additionalProperties:!1,properties:{relation_kind:{const:"code_neighborhood_candidate",type:"string"},warning_class:{$ref:"#/$defs/ProximityWarningClassV1"}},required:["relation_kind","warning_class"],type:"object"},{additionalProperties:!1,properties:{clone_handle:{$ref:"#/$defs/FeedbackProximityCloneHandleV1"},relation_kind:{const:"shared_code_candidate",type:"string"},warning_class:{$ref:"#/$defs/ProximityWarningClassV1"}},required:["relation_kind","warning_class","clone_handle"],type:"object"},{additionalProperties:!1,properties:{relation_kind:{const:"overlapping_edit",type:"string"},warning_class:{$ref:"#/$defs/ProximityWarningClassV1"}},required:["relation_kind","warning_class"],type:"object"},{additionalProperties:!1,properties:{conflict_handle:{$ref:"#/$defs/FeedbackProximityConflictHandleV1"},relation_kind:{const:"confirmed_conflict",type:"string"}},required:["relation_kind","conflict_handle"],type:"object"}]},FeedbackScopeV1:yI,FileOccurrenceId:yj,ManifestDigest:gj,ObservationSourceIdentityV1:g3,ProjectId:_m,ProviderId:_w,ProximityAddressV1:{additionalProperties:!1,description:"A privacy-scoped code address. It identifies the coarse changed-code shape\nbut carries no other actor, session, or private-source content.",properties:{file:{$ref:"#/$defs/FileOccurrenceId"},scope:{$ref:"#/$defs/FeedbackScopeV1"},span:{anyOf:[{$ref:"#/$defs/SourceSpan"},{type:"null"}]},symbol:{anyOf:[{$ref:"#/$defs/SymbolOccurrenceId"},{type:"null"}]}},required:["scope","file"],type:"object"},ProximityCoverageV1:{enum:["complete","partial","stale","unavailable","denied","private"],type:"string"},ProximityWarningClassV1:{enum:["same_file","overlapping_range","same_symbol","same_package","same_crate","neighborhood","shared_caller","shared_dependency","shared_test","incompatible_branch_worktree"],type:"string"},RefId:_T,RepositoryId:_z,RetrievalAnchorId:_J,SessionId:vv,SourceSpan:vF,SymbolOccurrenceId:vJ,UtcMicros:bs,WorktreeId:So},$schema:"https://json-schema.org/draft/2020-12/schema",oneOf:[{additionalProperties:!1,properties:{page:{$ref:"#/$defs/FeedbackProximityReadPageV1"},state:{const:"complete",type:"string"}},required:["state","page"],type:"object"},{additionalProperties:!1,properties:{page:{$ref:"#/$defs/FeedbackProximityReadPageV1"},state:{const:"complete_zero",type:"string"}},required:["state","page"],type:"object"},{additionalProperties:!1,properties:{omissions:{items:{$ref:"#/$defs/FeedbackProximityOmissionV1"},type:"array"},page:{$ref:"#/$defs/FeedbackProximityReadPageV1"},state:{const:"partial",type:"string"}},required:["state","page","omissions"],type:"object"},{additionalProperties:!1,properties:{omissions:{items:{$ref:"#/$defs/FeedbackProximityOmissionV1"},type:"array"},page:{$ref:"#/$defs/FeedbackProximityReadPageV1"},state:{const:"stale",type:"string"}},required:["state","page","omissions"],type:"object"},{additionalProperties:!1,properties:{observed_at:{$ref:"#/$defs/UtcMicros"},state:{const:"denied",type:"string"}},required:["state","observed_at"],type:"object"},{additionalProperties:!1,properties:{observed_at:{$ref:"#/$defs/UtcMicros"},state:{const:"unavailable",type:"string"}},required:["state","observed_at"],type:"object"}],title:"FeedbackProximityReadResultV1"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{field:{description:"Field name. Bare name ('last_sync_at') matches across structs;\nqualified form ('GraphStats::last_sync_at') narrows to one struct's\nfield.",type:"string"},limit:{description:"Maximum sites per kind (default: 200, max: 2000).",format:"uint32",minimum:0,type:["integer","null"]},writes_only:{description:"When true, returns only write_sites and omits reads. Default false.",type:["boolean","null"]}},required:["field"],title:"FieldSitesSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fF,CodeIndexConvergenceParkedV1:fL,CodeIndexStalenessStateV1:fB,FieldSiteV1:{additionalProperties:!1,properties:{enclosing:{type:["string","null"]},file:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},snippet:{type:"string"}},required:["file","line","snippet"],type:"object"},PrimitiveFreshnessStateV1:_i,PrimitiveIndexingStateV1:_o,PrimitiveSearchFreshnessV1:_d},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"`read_count` and `read_sites` are absent when the request asked for\nwrites only.",properties:{field:{type:"string"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},qualifier:{type:["string","null"]},qualifier_applied:{type:"boolean"},read_count:{format:"uint64",minimum:0,type:["integer","null"]},read_sites:{items:{$ref:"#/$defs/FieldSiteV1"},type:["array","null"]},write_count:{format:"uint64",minimum:0,type:"integer"},write_sites:{items:{$ref:"#/$defs/FieldSiteV1"},type:"array"}},required:["field","qualifier_applied","write_count","write_sites"],title:"FieldSitesResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{file:{type:"string"}},required:["file"],title:"FileDependentsPrimitiveRequest",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{dependent_files:{items:{type:"string"},type:"array"},file:{type:"string"}},required:["file","dependent_files"],title:"FileDependentsPrimitiveResult",type:"object"},{$defs:{FilesLayoutV1:yC},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{layout:{anyOf:[{$ref:"#/$defs/FilesLayoutV1"},{type:"null"}],description:"File listing layout: flat (one per line) or grouped by directory\n(default: grouped)."},path:{description:"Filter to files under this directory path.",type:["string","null"]},pattern:{description:"Filter files matching this glob pattern (e.g. '**/*.rs').",type:["string","null"]}},title:"FilesSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fF,CodeIndexConvergenceParkedV1:fL,CodeIndexOmittedSourceV1:fU,CodeIndexOmittedSourcesV1:fH,CodeIndexSourceOmissionReasonV1:fG,CodeIndexStalenessStateV1:fB,FilesLayoutV1:yC,IndexedFileV1:{additionalProperties:!1,properties:{bytes:{format:"uint64",minimum:0,type:"integer"},path:{type:"string"},symbols:{format:"uint64",minimum:0,type:"integer"}},required:["path","symbols","bytes"],type:"object"},PrimitiveFreshnessStateV1:_i,PrimitiveIndexingStateV1:_o,PrimitiveSearchFreshnessV1:_d},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{count:{format:"uint",minimum:0,type:"integer"},files:{items:{$ref:"#/$defs/IndexedFileV1"},type:"array"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},layout:{$ref:"#/$defs/FilesLayoutV1"},worktree_omitted_sources:{anyOf:[{$ref:"#/$defs/CodeIndexOmittedSourcesV1"},{type:"null"}],description:"Sources the serving snapshot captured for the whole worktree but does\nnot index, unfiltered by `path` or `pattern`."}},required:["count","layout","files"],title:"FilesResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{lazy_index_ignored_dependencies:{description:"Opt in to bounded indexing of ignored dependency entry files when an\nimport hint matches (default: false).",type:["boolean","null"]},limit:{description:"Maximum matches to return (default: 20, max: 200).",format:"uint32",minimum:0,type:["integer","null"]},name:{description:"Exact bare symbol name (no `::`, no glob).",type:"string"}},required:["name"],title:"FindExactSymbolSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fF,CodeIndexConvergenceParkedV1:fL,CodeIndexStalenessStateV1:fB,FindExactSymbolMatchV1:{additionalProperties:!1,properties:{file:{type:"string"},id:{type:"string"},kind:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},name:{type:"string"},qualified_name:{type:"string"},signature:{type:["string","null"]}},required:["id","name","qualified_name","kind","file","line"],type:"object"},PrimitiveFreshnessStateV1:_i,PrimitiveIndexingStateV1:_o,PrimitiveSearchFreshnessV1:_d},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{count:{format:"uint64",minimum:0,type:"integer"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},matches:{items:{$ref:"#/$defs/FindExactSymbolMatchV1"},type:"array"},name:{type:"string"},suggestions:{description:"Nearest indexed bare names when `count` is 0. Empty when the query\nmatched, or when it is not itself a bare identifier.",items:{type:"string"},type:"array"}},required:["name","count","matches"],title:"FindExactSymbolResultV1",type:"object"},{$defs:{GiniMetricV1:yA,GiniScopeV1:yW},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{limit:{description:"Number of top outliers to return (default: 10, at most 100).",format:"uint32",minimum:0,type:["integer","null"]},metric:{anyOf:[{$ref:"#/$defs/GiniMetricV1"},{type:"null"}],description:"Metric to measure inequality for (default: complexity)."},path:{description:"Filter to files under this directory path.",type:["string","null"]},scope:{anyOf:[{$ref:"#/$defs/GiniScopeV1"},{type:"null"}],description:"Aggregate per file or per symbol (default: file)."}},title:"GiniSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fF,CodeIndexConvergenceParkedV1:fL,CodeIndexStalenessStateV1:fB,GiniMetricV1:yA,GiniOutlierV1:{additionalProperties:!1,properties:{name:{type:"string"},pct_of_max:{format:"double",type:"number"},value:{format:"double",type:"number"}},required:["name","value","pct_of_max"],type:"object"},GiniScopeV1:yW,PrimitiveFreshnessStateV1:_i,PrimitiveIndexingStateV1:_o,PrimitiveSearchFreshnessV1:_d},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},gini:{format:"double",type:"number"},incomplete_complexity_symbols:{description:"Symbols left out because their bounded complexity walk did not cover\nthe body; their counters are lower bounds and measure nothing here.",format:"uint64",minimum:0,type:"integer"},interpretation:{type:"string"},metric:{$ref:"#/$defs/GiniMetricV1"},outliers:{items:{$ref:"#/$defs/GiniOutlierV1"},type:"array"},scope:{$ref:"#/$defs/GiniScopeV1"},total_items:{format:"uint64",minimum:0,type:"integer"}},required:["gini","interpretation","total_items","metric","scope","incomplete_complexity_symbols","outliers"],title:"GiniResultV1",type:"object"},{$defs:{GitIndexPreviewId:yB,ManifestDigest:gj},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Public MCP/CLI request to apply one immutable Git index preview.",properties:{idempotency_key:{type:"string"},preview_digest:{$ref:"#/$defs/ManifestDigest"},preview_id:{$ref:"#/$defs/GitIndexPreviewId"}},required:["preview_id","preview_digest","idempotency_key"],title:"GitApplySurfaceRequest",type:"object"},{$defs:{GitIndexPreviewId:yB,GitIndexReceiptId:{description:"Strongly typed canonical identity: `GitIndexReceiptId`.",type:"string"},GitIndexReceiptOutcomeV1:{description:"Terminal outcome a recovery record can prove without re-running a native\nmutation.",enum:["committed","aborted_no_change","needs_inspection"],type:"string"},GitIndexTransactionId:{description:"Strongly typed canonical identity: `GitIndexTransactionId`.",type:"string"},GitIndexTransactionOperationV1:yK,GitOidV1:yJ,ManifestDigest:gj,UtcMicros:bs},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Durable, integrity-protected receipt for one Git index transaction.",properties:{committed_at:{$ref:"#/$defs/UtcMicros"},final_snapshot_captured:{description:"Whether `final_snapshot_digest`, `new_index_tree`, and `new_head` came\nfrom a post-outcome native observation. An unavailable observation is\nvalid only for a terminal outcome that does not claim a commit.",type:"boolean"},final_snapshot_digest:{$ref:"#/$defs/ManifestDigest",description:"Digest of a snapshot that was actually captured after the terminal\nobservation. When `final_snapshot_captured` is false this retains the\nexpected snapshot digest only as a stable schema placeholder; callers\nmust not treat it as an observation."},new_head:{anyOf:[{$ref:"#/$defs/GitOidV1"},{type:"null"}]},new_index_tree:{anyOf:[{$ref:"#/$defs/GitOidV1"},{type:"null"}]},old_head:{anyOf:[{$ref:"#/$defs/GitOidV1"},{type:"null"}]},old_index_tree:{anyOf:[{$ref:"#/$defs/GitOidV1"},{type:"null"}]},old_snapshot_digest:{$ref:"#/$defs/ManifestDigest"},operation:{$ref:"#/$defs/GitIndexTransactionOperationV1"},outcome:{$ref:"#/$defs/GitIndexReceiptOutcomeV1"},preview_id:{$ref:"#/$defs/GitIndexPreviewId"},receipt_digest:{$ref:"#/$defs/ManifestDigest"},receipt_id:{$ref:"#/$defs/GitIndexReceiptId"},selected_hunk_digests:{items:{$ref:"#/$defs/ManifestDigest"},type:"array"},transaction_id:{$ref:"#/$defs/GitIndexTransactionId"}},required:["receipt_id","transaction_id","preview_id","operation","old_snapshot_digest","final_snapshot_digest","final_snapshot_captured","selected_hunk_digests","outcome","committed_at","receipt_digest"],title:"GitIndexTransactionReceiptV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Request shape for the public `git_blame` surface.",properties:{follow_renames:{default:!1,type:"boolean"},max_bytes:{format:"uint64",minimum:0,type:["integer","null"]},max_entries:{format:"uint32",minimum:0,type:["integer","null"]},path:{type:"string"}},required:["path"],title:"GitBlameSurfaceRequest",type:"object"},{$defs:{GitBlameAvailabilityV1:{description:"Why blame/line provenance is unavailable for a path.",enum:["available","path_not_tracked","unborn_branch","binary_file"],type:"string"},GitBlameLineV1:{additionalProperties:!1,description:"Line provenance for one final (current) line.",properties:{author:{$ref:"#/$defs/GitCommitIdentityV1"},boundary:{description:"True when the origin commit is a history boundary (e.g. shallow root).",type:"boolean"},commit:{$ref:"#/$defs/GitOidV1"},final_line:{description:"1-based line number in the blamed revision.",format:"uint32",minimum:0,type:"integer"},origin_line:{description:"1-based line number in the origin commit.",format:"uint32",minimum:0,type:"integer"},previous:{anyOf:[{$ref:"#/$defs/GitBlamePreviousV1"},{type:"null"}]}},required:["final_line","origin_line","commit","author","boundary"],type:"object"},GitBlamePreviousV1:{additionalProperties:!1,description:"Rename-following evidence for one blamed line (`previous` record).",properties:{commit:{$ref:"#/$defs/GitOidV1"},path:{type:"string"}},required:["commit","path"],type:"object"},GitBlameV1:{additionalProperties:!1,description:"Typed blame result: per-line provenance plus boundary, rename-following,\nand unavailable states.",properties:{availability:{$ref:"#/$defs/GitBlameAvailabilityV1"},coverage:{$ref:"#/$defs/GitCoverageV1"},lines:{items:{$ref:"#/$defs/GitBlameLineV1"},type:"array"},path:{type:"string"},repository:{$ref:"#/$defs/RepositoryId"}},required:["repository","path","lines","availability","coverage"],type:"object"},GitBlobExpectationV1:yM,GitChangeKindV1:{description:"Native change kind for one side (index or worktree) of a status entry,\nor for a whole-file diff record.",enum:["unmodified","modified","added","deleted","renamed","copied","type_changed","unmerged"],type:"string"},GitCommitIdentityV1:{additionalProperties:!1,description:"Author/committer identity and timestamp evidence for one commit.",properties:{at:{$ref:"#/$defs/UtcMicros"},email:{type:"string"},name:{type:"string"}},required:["name","email","at"],type:"object"},GitCommitMetadataV1:{additionalProperties:!1,description:"Bounded commit metadata. The full message is not retained;\n`message_digest` is its canonical digest evidence.",properties:{author:{$ref:"#/$defs/GitCommitIdentityV1"},commit:{$ref:"#/$defs/GitOidV1"},committer:{$ref:"#/$defs/GitCommitIdentityV1"},message_digest:{$ref:"#/$defs/ManifestDigest"},parents:{items:{$ref:"#/$defs/GitOidV1"},type:"array"},subject:{description:"First line of the commit message, bounded at capture.",type:"string"},tree:{$ref:"#/$defs/GitOidV1"}},required:["commit","tree","parents","author","committer","subject","message_digest"],type:"object"},GitCoverageV1:yD,GitDegradationV1:yF,GitDiffScopeV1:{description:"Diff scope: unstaged worktree changes, staged index changes, or an exact\ncommit range. Range diffs are read-only evidence and carry no index\nrelationship, so they cannot mint an applicable `HunkRefV1`.",oneOf:[{properties:{scope:{const:"working_tree",type:"string"}},required:["scope"],type:"object"},{properties:{scope:{const:"staged",type:"string"}},required:["scope"],type:"object"},{properties:{base:{$ref:"#/$defs/GitOidV1"},head:{$ref:"#/$defs/GitOidV1"},scope:{const:"commit_range",type:"string"}},required:["scope","base","head"],type:"object"}]},GitDiffV1:{additionalProperties:!1,description:"Typed diff result for one scope with explicit coverage.",properties:{coverage:{$ref:"#/$defs/GitCoverageV1"},files:{items:{$ref:"#/$defs/GitFileDiffV1"},type:"array"},repository:{$ref:"#/$defs/RepositoryId"},scope:{$ref:"#/$defs/GitDiffScopeV1"}},required:["repository","scope","files","coverage"],type:"object"},GitFileDiffV1:{additionalProperties:!1,description:"One file's structured diff record: change kind, modes, blob identities,\nbinary/submodule classification, bounded line totals, and hunks.",properties:{binary:{type:"boolean"},change:{$ref:"#/$defs/GitChangeKindV1"},deletions:{format:"uint32",minimum:0,type:["integer","null"]},hunks:{items:{$ref:"#/$defs/GitHunkV1"},type:"array"},insertions:{description:"Inserted/deleted line totals; absent for binary and submodule records.",format:"uint32",minimum:0,type:["integer","null"]},new_blob:{anyOf:[{$ref:"#/$defs/GitOidV1"},{type:"null"}]},new_mode:{anyOf:[{$ref:"#/$defs/GitFileModeV1"},{type:"null"}]},old_blob:{anyOf:[{$ref:"#/$defs/GitOidV1"},{type:"null"}]},old_mode:{anyOf:[{$ref:"#/$defs/GitFileModeV1"},{type:"null"}]},original_path:{description:"Source path for a rename or copy.",type:["string","null"]},path:{type:"string"},submodule:{description:"True when the entry is a gitlink (submodule) change.",type:"boolean"}},required:["path","change","binary","submodule","hunks"],type:"object"},GitFileModeV1:yL,GitHeadStateV1:yU,GitHistoryV1:{additionalProperties:!1,description:"Bounded commit history in native traversal order. `truncated` is true\nwhen the capture bound cut the walk; shallow/partial-clone boundaries are\ncoverage degradations, never silently clean.",properties:{commits:{items:{$ref:"#/$defs/GitCommitMetadataV1"},type:"array"},coverage:{$ref:"#/$defs/GitCoverageV1"},repository:{$ref:"#/$defs/RepositoryId"},truncated:{type:"boolean"}},required:["repository","commits","truncated","coverage"],type:"object"},GitHunkPreviewEntryV1:{additionalProperties:!1,description:"One minted hunk selection: the canonical selection digest plus the\n`HunkRef` identity evidence it selects.",properties:{digest:{$ref:"#/$defs/ManifestDigest"},hunk:{$ref:"#/$defs/HunkRefV1"}},required:["digest","hunk"],type:"object"},GitHunkPreviewInputV1:{additionalProperties:!1,description:"Bounded, expiring preview input minted by `git_hunks` from one exact\ndaemon-captured repository snapshot.",properties:{expires_at:{$ref:"#/$defs/UtcMicros"},hunks:{items:{$ref:"#/$defs/GitHunkPreviewEntryV1"},type:"array"},preview_input_id:{$ref:"#/$defs/GitIndexPreviewId"},repository_snapshot_digest:{$ref:"#/$defs/ManifestDigest"}},required:["preview_input_id","repository_snapshot_digest","expires_at","hunks"],type:"object"},GitHunkV1:{additionalProperties:!1,description:"One structured diff hunk. The hunk body is not retained; `patch_digest`\nis the canonical digest of the normalized header plus body lines, which\nis the stable hunk identity evidence.",properties:{new_lines:{format:"uint32",minimum:0,type:"integer"},new_start:{format:"uint32",minimum:0,type:"integer"},old_lines:{format:"uint32",minimum:0,type:"integer"},old_start:{format:"uint32",minimum:0,type:"integer"},patch_digest:{$ref:"#/$defs/ManifestDigest"},section:{description:"Function/section heading from the hunk header when Git emitted one.",type:["string","null"]}},required:["old_start","old_lines","new_start","new_lines","patch_digest"],type:"object"},GitIndexEntryExpectationV1:yG,GitIndexPreviewId:yB,GitOidV1:yJ,GitOperationStateV1:yZ,GitQueryEnvelopeV1:{additionalProperties:!1,description:"One typed query result with its merged coverage. `coverage` is the\nadapter-reported coverage plus any query-level degradation (entry-bound\ntruncation); `truncated_by_bound` distinguishes query-level truncation\nfrom adapter-level capture bounds.",properties:{coverage:{$ref:"#/$defs/GitCoverageV1"},truncated_by_bound:{type:"boolean"},value:{$ref:"#/$defs/GitStatusSummaryV1"}},required:["value","coverage","truncated_by_bound"],type:"object"},GitQueryEnvelopeV12:{additionalProperties:!1,description:"One typed query result with its merged coverage. `coverage` is the\nadapter-reported coverage plus any query-level degradation (entry-bound\ntruncation); `truncated_by_bound` distinguishes query-level truncation\nfrom adapter-level capture bounds.",properties:{coverage:{$ref:"#/$defs/GitCoverageV1"},truncated_by_bound:{type:"boolean"},value:{$ref:"#/$defs/GitDiffV1"}},required:["value","coverage","truncated_by_bound"],type:"object"},GitQueryEnvelopeV13:{additionalProperties:!1,description:"One typed query result with its merged coverage. `coverage` is the\nadapter-reported coverage plus any query-level degradation (entry-bound\ntruncation); `truncated_by_bound` distinguishes query-level truncation\nfrom adapter-level capture bounds.",properties:{coverage:{$ref:"#/$defs/GitCoverageV1"},truncated_by_bound:{type:"boolean"},value:{$ref:"#/$defs/GitHistoryV1"}},required:["value","coverage","truncated_by_bound"],type:"object"},GitQueryEnvelopeV14:{additionalProperties:!1,description:"One typed query result with its merged coverage. `coverage` is the\nadapter-reported coverage plus any query-level degradation (entry-bound\ntruncation); `truncated_by_bound` distinguishes query-level truncation\nfrom adapter-level capture bounds.",properties:{coverage:{$ref:"#/$defs/GitCoverageV1"},truncated_by_bound:{type:"boolean"},value:{$ref:"#/$defs/GitBlameV1"}},required:["value","coverage","truncated_by_bound"],type:"object"},GitQueryEnvelopeV15:{additionalProperties:!1,description:"One typed query result with its merged coverage. `coverage` is the\nadapter-reported coverage plus any query-level degradation (entry-bound\ntruncation); `truncated_by_bound` distinguishes query-level truncation\nfrom adapter-level capture bounds.",properties:{coverage:{$ref:"#/$defs/GitCoverageV1"},truncated_by_bound:{type:"boolean"},value:{$ref:"#/$defs/GitHunkPreviewInputV1"}},required:["value","coverage","truncated_by_bound"],type:"object"},GitStatusSummaryV1:{additionalProperties:!1,description:"Bounded status summary derived from the typed\n[`tracedecay_domain::git::GitStatusV1`]: HEAD and operation state,\nper-class counts, and a bounded sorted sample of changed paths.",properties:{changed_paths:{description:"Sorted, de-duplicated changed paths, truncated at the query entry bound.",items:{type:"string"},type:"array"},conflicted:{format:"uint32",minimum:0,type:"integer"},head:{$ref:"#/$defs/GitHeadStateV1"},ignored:{format:"uint32",minimum:0,type:"integer"},operation:{$ref:"#/$defs/GitOperationStateV1"},repository:{$ref:"#/$defs/RepositoryId"},schema_version:{type:"string"},staged:{format:"uint32",minimum:0,type:"integer"},unstaged:{format:"uint32",minimum:0,type:"integer"},untracked:{format:"uint32",minimum:0,type:"integer"}},required:["repository","head","operation","staged","unstaged","conflicted","untracked","ignored","changed_paths","schema_version"],type:"object"},HunkDirectionV1:gt,HunkRefV1:gr,ManifestDigest:gj,RepositoryId:_z,UtcMicros:bs,WorktreeId:So},$schema:"https://json-schema.org/draft/2020-12/schema",description:"Actual payload emitted by each public Git read operation.",oneOf:[{properties:{query:{const:"status",type:"string"},result:{$ref:"#/$defs/GitQueryEnvelopeV1"}},required:["query","result"],type:"object"},{properties:{query:{const:"diff",type:"string"},result:{$ref:"#/$defs/GitQueryEnvelopeV12"}},required:["query","result"],type:"object"},{properties:{query:{const:"history",type:"string"},result:{$ref:"#/$defs/GitQueryEnvelopeV13"}},required:["query","result"],type:"object"},{properties:{query:{const:"blame",type:"string"},result:{$ref:"#/$defs/GitQueryEnvelopeV14"}},required:["query","result"],type:"object"},{properties:{query:{const:"hunks",type:"string"},result:{$ref:"#/$defs/GitQueryEnvelopeV15"}},required:["query","result"],type:"object"}],title:"GitReadResultV1"},{$defs:{GitOidV1:yJ,GitSurfaceDiffScopeV1:y4},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Request shape for the public `git_diff` surface.",properties:{base:{anyOf:[{$ref:"#/$defs/GitOidV1"},{type:"null"}]},head:{anyOf:[{$ref:"#/$defs/GitOidV1"},{type:"null"}]},max_bytes:{format:"uint64",minimum:0,type:["integer","null"]},max_entries:{format:"uint32",minimum:0,type:["integer","null"]},scope:{$ref:"#/$defs/GitSurfaceDiffScopeV1",default:"working_tree"}},title:"GitDiffSurfaceRequest",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Request shape for the public `git_history` surface.",properties:{count:{format:"uint32",minimum:0,type:["integer","null"]},first_parent:{default:!1,type:"boolean"},follow:{default:!1,type:"boolean"},max_bytes:{format:"uint64",minimum:0,type:["integer","null"]},max_entries:{format:"uint32",minimum:0,type:["integer","null"]},path:{type:["string","null"]}},title:"GitHistorySurfaceRequest",type:"object"},{$defs:{GitSurfaceDiffScopeV1:y4},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Request shape for the public `git_hunks` surface.\n\nThe daemon captures exact repository state itself and injects the private\npreview binding after capture, so the public wire carries only the diff\nscope (commit ranges cannot mint applicable hunks).",properties:{max_bytes:{format:"uint64",minimum:0,type:["integer","null"]},max_entries:{format:"uint32",minimum:0,type:["integer","null"]},scope:{$ref:"#/$defs/GitSurfaceDiffScopeV1",default:"working_tree"}},title:"GitHunksSurfaceRequest",type:"object"},{$defs:{GitIndexPreviewId:yB,GitIndexTransactionOperationV1:yK,ManifestDigest:gj},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Public MCP/CLI request for one daemon-owned Git index preview.",properties:{operation:{$ref:"#/$defs/GitIndexTransactionOperationV1"},preview_input_id:{anyOf:[{$ref:"#/$defs/GitIndexPreviewId"},{type:"null"}],default:null,description:"Hunk preview input minted by `git_hunks`; required for stage/unstage."},selected_hunk_digests:{default:[],description:"Selection digests drawn from the referenced preview input.",items:{$ref:"#/$defs/ManifestDigest"},type:"array"}},required:["operation"],title:"GitPreviewSurfaceRequest",type:"object"},{$defs:{GitBlobExpectationV1:yM,GitCoverageV1:yD,GitDegradationV1:yF,GitFileModeV1:yL,GitHeadStateV1:yU,GitIndexEntryExpectationV1:yG,GitIndexPreviewDispositionV1:{description:"Whether a captured preview may reach the daemon's native apply path.",oneOf:[{properties:{state:{const:"applicable",type:"string"}},required:["state"],type:"object"},{properties:{reason:{$ref:"#/$defs/GitIndexUnsupportedStateV1"},state:{const:"unsupported",type:"string"}},required:["state","reason"],type:"object"}]},GitIndexPreviewId:yB,GitIndexTransactionOperationV1:yK,GitIndexUnsupportedStateV1:{description:"Why a preview is intentionally read-only. A caller must re-preview after\nresolving the condition; no variant grants a relaxed or partial apply.",enum:["bare_repository","detached_head","unborn_branch","index_lock_present","external_git_driver","unmerged_index","intent_to_add","split_index","sparse_index","unreadable_index","conflicted_working_tree","unreadable_working_tree","in_progress_operation","unsupported_object_format","binary_hunk","submodule","symlink","file_mode_only","rename_or_copy","filters_or_end_of_line","partial_hunk_selection"],type:"string"},GitObjectFormatV1:{description:"Repository object format, derived from object-id length.",enum:["sha1","sha256"],type:"string"},GitOidV1:yJ,GitOperationStateV1:yZ,HunkDirectionV1:gt,HunkRefV1:gr,ManifestDigest:gj,ProjectId:_m,RepositoryId:_z,RepositoryIndexSnapshotV1:{additionalProperties:!1,properties:{checksum:{$ref:"#/$defs/ManifestDigest"},state:{$ref:"#/$defs/RepositoryIndexStateV1"},tree_id:{anyOf:[{$ref:"#/$defs/GitOidV1"},{type:"null"}]},unmerged_stage_digest:{anyOf:[{$ref:"#/$defs/ManifestDigest"},{type:"null"}]}},required:["checksum","state"],type:"object"},RepositoryIndexStateV1:{enum:["clean","staged","unmerged","intent_to_add","split","sparse","unreadable"],type:"string"},RepositoryStateSnapshotV1:{additionalProperties:!1,description:"Immutable content-addressed native repository state. Missing/partial\nevidence remains typed by fields and coverage instead of being upgraded to\na guessed clean snapshot.",properties:{adapter_revision:{description:"Revision of the fixed native adapter that interpreted this state.",type:["string","null"]},attributes_digest:{anyOf:[{$ref:"#/$defs/ManifestDigest"},{type:"null"}]},captured_at:{$ref:"#/$defs/UtcMicros"},configuration_digest:{anyOf:[{$ref:"#/$defs/ManifestDigest"},{type:"null"}]},coverage:{$ref:"#/$defs/GitCoverageV1"},filesystem_capabilities_digest:{anyOf:[{$ref:"#/$defs/ManifestDigest"},{type:"null"}]},git_version:{description:"Exact native Git implementation observed by the fixed adapter. A\nread-only partial snapshot may omit this, but omitted native evidence\nis never mutation eligible.",type:["string","null"]},head:{$ref:"#/$defs/GitHeadStateV1"},index:{$ref:"#/$defs/RepositoryIndexSnapshotV1"},object_format:{$ref:"#/$defs/GitObjectFormatV1"},observation_epoch:{format:"uint64",minimum:0,type:"integer"},operation_state:{$ref:"#/$defs/GitOperationStateV1"},project_id:{$ref:"#/$defs/ProjectId"},refs_digest:{anyOf:[{$ref:"#/$defs/ManifestDigest"},{type:"null"}],description:"Digest of the complete native ref namespace at capture time."},repository_id:{$ref:"#/$defs/RepositoryId"},snapshot_id:{type:"string"},sparse_digest:{anyOf:[{$ref:"#/$defs/ManifestDigest"},{type:"null"}]},submodule_digest:{anyOf:[{$ref:"#/$defs/ManifestDigest"},{type:"null"}]},working_tree:{$ref:"#/$defs/RepositoryWorkingTreeSnapshotV1"},worktree_id:{anyOf:[{$ref:"#/$defs/WorktreeId"},{type:"null"}]}},required:["snapshot_id","project_id","repository_id","observation_epoch","object_format","head","index","working_tree","operation_state","captured_at","coverage"],type:"object"},RepositoryWorkingTreeSnapshotV1:{additionalProperties:!1,properties:{ignored_collision_digest:{anyOf:[{$ref:"#/$defs/ManifestDigest"},{type:"null"}]},state:{$ref:"#/$defs/RepositoryWorkingTreeStateV1"},tracked_digest:{$ref:"#/$defs/ManifestDigest"},untracked_name_digest:{anyOf:[{$ref:"#/$defs/ManifestDigest"},{type:"null"}]}},required:["state","tracked_digest"],type:"object"},RepositoryWorkingTreeStateV1:{enum:["clean","tracked_dirty","untracked_only","mixed","conflicted","unreadable"],type:"string"},UtcMicros:bs,WorktreeId:So},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Immutable, content-bound preview for one daemon-serialized index\ntransaction. Applicability is only a precondition: the daemon must capture\nand compare the entire snapshot and every contained `HunkRefV1` again\nimmediately before a native mutation.",properties:{candidate_index_tree:{anyOf:[{$ref:"#/$defs/GitOidV1"},{type:"null"}]},created_at:{$ref:"#/$defs/UtcMicros"},disposition:{$ref:"#/$defs/GitIndexPreviewDispositionV1"},expires_at:{$ref:"#/$defs/UtcMicros"},operation:{$ref:"#/$defs/GitIndexTransactionOperationV1"},preview_digest:{$ref:"#/$defs/ManifestDigest"},preview_id:{$ref:"#/$defs/GitIndexPreviewId"},repository_snapshot:{$ref:"#/$defs/RepositoryStateSnapshotV1"},repository_snapshot_digest:{$ref:"#/$defs/ManifestDigest"},selected_hunks:{items:{$ref:"#/$defs/HunkRefV1"},type:"array"}},required:["preview_id","operation","repository_snapshot","repository_snapshot_digest","selected_hunks","disposition","created_at","expires_at","preview_digest"],title:"GitIndexPreviewV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Request shape for the public `git_status` surface.",properties:{max_bytes:{format:"uint64",minimum:0,type:["integer","null"]},max_entries:{format:"uint32",minimum:0,type:["integer","null"]}},title:"GitStatusSurfaceRequest",type:"object"},{$defs:{StackDeliveryWatermarkId:vU,StackSignalId:vG},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"The public, transport-neutral request for one durable stack signal.",properties:{expected_watermark_id:{anyOf:[{$ref:"#/$defs/StackDeliveryWatermarkId"},{type:"null"}]},signal_id:{anyOf:[{$ref:"#/$defs/StackSignalId"},{type:"null"}]}},title:"GitHubStackSignalExpandSurfaceRequest",type:"object"},{$defs:{BranchStackRevisionId:fS,GitHubStackSignalEvidenceRefV1:{additionalProperties:!1,description:"Bounded evidence for the exact signal the coordinator authorized.\n\nProvider payloads, paths, commit bodies, and delivery recipients remain\nbehind the durable signal evidence rather than copied to this result.",properties:{github_stack_digest:{anyOf:[{$ref:"#/$defs/ManifestDigest"},{type:"null"}]},kind:{$ref:"#/$defs/StackSignalKindV1"},native_source:{$ref:"#/$defs/GitHubStackSignalNativeSourceV1"},observed_at:{$ref:"#/$defs/UtcMicros"},signal_id:{$ref:"#/$defs/StackSignalId"},stack_revision_digest:{$ref:"#/$defs/ManifestDigest"},stack_revision_id:{$ref:"#/$defs/BranchStackRevisionId"},state_digest:{$ref:"#/$defs/ManifestDigest"},watermark_id:{$ref:"#/$defs/StackDeliveryWatermarkId"}},required:["signal_id","watermark_id","kind","stack_revision_id","stack_revision_digest","state_digest","observed_at","native_source"],type:"object"},GitHubStackSignalExpandUnavailableV1:{description:"Truthful non-success outcomes for signal expansion.\n\n`Concealed` intentionally combines absent and unauthorized signal handles;\nexposing that distinction would turn this operation into a signal probe.",enum:["concealed","stale","native_evidence_unavailable","authority_unmounted","cancelled"],type:"string"},GitHubStackSignalNativePreviewV1:{additionalProperties:!1,description:"Exact branch pair and native preflight that produced the selected signal.",properties:{destination_ref:{$ref:"#/$defs/RefId"},destination_tip:{$ref:"#/$defs/GitOidV1"},direction:{$ref:"#/$defs/NativeIntegrationDirectionV1"},disposition:{$ref:"#/$defs/NativeIntegrationPreviewDispositionV1"},preview_digest:{$ref:"#/$defs/ManifestDigest"},preview_id:{$ref:"#/$defs/NativeIntegrationPreviewId"},source_ref:{$ref:"#/$defs/RefId"},source_tip:{$ref:"#/$defs/GitOidV1"}},required:["preview_id","preview_digest","direction","source_ref","destination_ref","source_tip","destination_tip","disposition"],type:"object"},GitHubStackSignalNativeSourceV1:{oneOf:[{properties:{preview:{$ref:"#/$defs/GitHubStackSignalNativePreviewV1"},source:{const:"preflight",type:"string"}},required:["source","preview"],type:"object"},{properties:{preview:{$ref:"#/$defs/GitHubStackSignalNativePreviewV1"},source:{const:"terminal",type:"string"},terminal:{$ref:"#/$defs/GitHubStackSignalNativeTerminalV1"}},required:["source","preview","terminal"],type:"object"}]},GitHubStackSignalNativeTerminalV1:{additionalProperties:!1,properties:{completed_at:{$ref:"#/$defs/UtcMicros"},final_ref_tip:{$ref:"#/$defs/GitOidV1"},outcome:{$ref:"#/$defs/NativeIntegrationTerminalOutcomeV1"},receipt_digest:{$ref:"#/$defs/ManifestDigest"},transaction_id:{$ref:"#/$defs/NativeIntegrationTransactionId"}},required:["transaction_id","receipt_digest","outcome","final_ref_tip","completed_at"],type:"object"},GitOidV1:yJ,ManifestDigest:gj,MechanicalIntegrationModeV1:gC,NativeIntegrationDirectionV1:gK,NativeIntegrationPreviewDispositionV1:gJ,NativeIntegrationPreviewId:gZ,NativeIntegrationTerminalOutcomeV1:gY,NativeIntegrationTransactionId:g1,NativeIntegrationUnavailabilityV1:g0,RefId:_T,StackDeliveryWatermarkId:vU,StackSignalId:vG,StackSignalKindV1:{description:"Durable classification of one GitHub stack transition.",enum:["dependency_ready","actual_conflict","stack_tip_drift","pull_request_drift","ci_evaluated_commit_drift","integration_committed","integration_needs_inspection"],type:"string"},UtcMicros:bs},$schema:"https://json-schema.org/draft/2020-12/schema",oneOf:[{properties:{evidence:{$ref:"#/$defs/GitHubStackSignalEvidenceRefV1"},outcome:{const:"expanded",type:"string"}},required:["outcome","evidence"],type:"object"},{properties:{outcome:{const:"unavailable",type:"string"},reason:{$ref:"#/$defs/GitHubStackSignalExpandUnavailableV1"}},required:["outcome","reason"],type:"object"}],title:"GitHubStackSignalExpandSurfaceResultV1"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{limit:{description:"Maximum number of results to return (default: 10, at most 100).",format:"uint32",minimum:0,type:["integer","null"]},path:{description:"Filter to files under this directory path (e.g. 'src/main/java').",type:["string","null"]}},title:"GodClassSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fF,CodeIndexConvergenceParkedV1:fL,CodeIndexStalenessStateV1:fB,GodClassEntryV1:{additionalProperties:!1,properties:{fields:{format:"uint64",minimum:0,type:"integer"},file:{type:"string"},id:{type:"string"},kind:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},methods:{format:"uint64",minimum:0,type:"integer"},name:{type:"string"},total_members:{format:"uint64",minimum:0,type:"integer"}},required:["id","name","kind","file","line","methods","fields","total_members"],type:"object"},PrimitiveFreshnessStateV1:_i,PrimitiveIndexingStateV1:_o,PrimitiveSearchFreshnessV1:_d},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},ranking:{items:{$ref:"#/$defs/GodClassEntryV1"},type:"array"},result_count:{format:"uint64",minimum:0,type:"integer"}},required:["result_count","ranking"],title:"GodClassResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{case_sensitive:{description:"Match case-sensitively (default: false = case-insensitive).",type:["boolean","null"]},context_lines:{description:"Lines of surrounding context to include per hit (default: 0, max: 3).",format:"uint32",minimum:0,type:["integer","null"]},fixed_strings:{description:"Treat pattern as a literal string instead of a regex (default: false).",type:["boolean","null"]},max_results:{description:"Maximum number of matching lines to return (default: 50, max: 200).",format:"uint32",minimum:0,type:["integer","null"]},path_glob:{description:"Optional glob restricting which files are searched, matched against\nproject-relative paths (e.g. 'src/**/*.rs').",type:["string","null"]},pattern:{description:"Content to search for. Treated as a regular expression unless\nfixed_strings is true.",type:"string"}},required:["pattern"],title:"GrepSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fF,CodeIndexConvergenceParkedV1:fL,CodeIndexStalenessStateV1:fB,CoverageCompleteness:hA,CoverageDomainState:hW,EvidenceCoverage:h1,EvidenceDomain:h0,GrepGraphEnrichmentV1:{description:"Whether the verified graph resolved each hit's enclosing symbol. Hits are\nthe lexical answer either way.",oneOf:[{additionalProperties:!1,properties:{enriched:{format:"uint64",minimum:0,type:"integer"},returned:{format:"uint64",minimum:0,type:"integer"},status:{const:"complete",type:"string"}},required:["status","enriched","returned"],type:"object"},{additionalProperties:!1,properties:{detail:{type:"string"},reason_code:{type:"string"},retryable:{type:"boolean"},status:{const:"unavailable",type:"string"}},required:["status","reason_code","retryable","detail"],type:"object"}]},GrepMatchV1:{additionalProperties:!1,properties:{after:{items:{type:"string"},type:"array"},before:{items:{type:"string"},type:"array"},file:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},node_id:{type:["string","null"]},symbol:{description:"The smallest verified graph symbol enclosing the hit.",type:["string","null"]},text:{type:"string"}},required:["file","line","text"],type:"object"},GrepScanOmissionsV1:{additionalProperties:!1,description:"What the bounded scan skipped, by cause; absent when it skipped nothing.",properties:{oversized_files:{description:"Files larger than the interactive scan byte limit.",format:"uint64",minimum:0,type:"integer"},oversized_lines:{description:"Lines longer than the scan line byte limit.",format:"uint64",minimum:0,type:"integer"},unavailable_sources:{description:"Source candidates that could not be read during the scan.",format:"uint64",minimum:0,type:"integer"}},required:["oversized_files","oversized_lines","unavailable_sources"],type:"object"},Omission:{additionalProperties:!1,properties:{count:{format:"uint64",minimum:0,type:"integer"},domain:{$ref:"#/$defs/EvidenceDomain"},reason:{$ref:"#/$defs/OmissionReason"}},required:["domain","count","reason"],type:"object"},OmissionReason:{description:"Safe reason why authorized requested evidence was omitted.",oneOf:[{enum:["budget","redacted","unavailable","unsupported","stale","failed","cancelled","timed_out","conflict"],type:"string"},{const:"macro_body_unparsed",description:"Evidence came from a macro body that was not expanded, so what the\nexpansion defines or calls is not covered.",type:"string"},{const:"import_unmodeled",description:"A caller sits under a `use` whose binding the index could not model\n(a glob in a block or inline module), so whether it calls the target\nis not covered.",type:"string"},{const:"cursor_expired",description:"The continuation cursor can no longer be redeemed (its lifetime ended\nor the snapshot it pages is gone); restart the request without it.",type:"string"},{const:"cursor_foreign",description:"The continuation cursor was issued for another project, worktree, or\nref; redeem it where it was issued.",type:"string"}]},PrimitiveFreshnessStateV1:_i,PrimitiveIndexingStateV1:_o,PrimitiveSearchFreshnessV1:_d},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{coverage:{$ref:"#/$defs/EvidenceCoverage"},files_scanned:{format:"uint64",minimum:0,type:"integer"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},graph_enrichment:{$ref:"#/$defs/GrepGraphEnrichmentV1"},match_count:{format:"uint64",minimum:0,type:"integer"},omissions:{items:{$ref:"#/$defs/Omission"},type:"array"},results:{items:{$ref:"#/$defs/GrepMatchV1"},type:"array"},scan_omissions:{$ref:"#/$defs/GrepScanOmissionsV1"},truncated:{type:"boolean"}},required:["results","match_count","files_scanned","truncated","coverage","omissions","graph_enrichment"],title:"GrepSearchResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{details:{description:"If true, include full dimension breakdown (default: false).",type:["boolean","null"]},path:{description:"Filter to files under this directory path.",type:["string","null"]}},title:"HealthSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fF,CodeIndexConvergenceParkedV1:fL,CodeIndexStalenessStateV1:fB,HealthAcyclicityV1:{additionalProperties:!1,properties:{edges_in_cycles:{format:"uint64",minimum:0,type:"integer"},score:{format:"double",type:"number"},source:{type:"string"}},required:["score","edges_in_cycles","source"],type:"object"},HealthCoverageDisciplineV1:{additionalProperties:!1,properties:{score:{format:"double",type:"number"},skip_test_coverage_count:{format:"uint64",minimum:0,type:"integer"},source:{type:"string"},total_fns:{format:"uint64",minimum:0,type:"integer"}},required:["score","skip_test_coverage_count","total_fns","source"],type:"object"},HealthDepthV1:{additionalProperties:!1,properties:{ideal_chain:{format:"uint64",minimum:0,type:"integer"},max_chain:{format:"uint64",minimum:0,type:"integer"},score:{format:"double",type:"number"},source:{type:"string"}},required:["score","max_chain","ideal_chain","source"],type:"object"},HealthDimensionsV1:{additionalProperties:!1,properties:{acyclicity:{$ref:"#/$defs/HealthAcyclicityV1"},coverage_discipline:{$ref:"#/$defs/HealthCoverageDisciplineV1"},depth:{$ref:"#/$defs/HealthDepthV1"},equality:{$ref:"#/$defs/HealthEqualityV1"},modularity:{$ref:"#/$defs/HealthModularityV1"},redundancy:{$ref:"#/$defs/HealthRedundancyV1"}},required:["acyclicity","depth","equality","redundancy","modularity","coverage_discipline"],type:"object"},HealthEqualityV1:{additionalProperties:!1,properties:{gini:{format:"double",type:"number"},incomplete_complexity_symbols:{format:"uint64",minimum:0,type:"integer"},interpretation:{type:"string"},score:{format:"double",type:"number"},source:{type:"string"}},required:["score","gini","interpretation","incomplete_complexity_symbols","source"],type:"object"},HealthModularityV1:{additionalProperties:!1,properties:{components_after_hub_removal:{format:"uint64",minimum:0,type:"integer"},interpretation:{type:"string"},score:{format:"double",type:"number"},source:{type:"string"}},required:["score","interpretation","components_after_hub_removal","source"],type:"object"},HealthRedundancyV1:{additionalProperties:!1,properties:{dead_count:{format:"uint64",minimum:0,type:"integer"},score:{format:"double",type:"number"},source:{type:"string"},total_fns:{format:"uint64",minimum:0,type:"integer"}},required:["score","dead_count","total_fns","source"],type:"object"},HealthWeightsV1:{additionalProperties:!1,properties:{note:{type:"string"}},required:["note"],type:"object"},PrimitiveFreshnessStateV1:_i,PrimitiveIndexingStateV1:_o,PrimitiveSearchFreshnessV1:_d},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"`dimensions` and `weights` are present exactly when the request asked for\n`details`.",properties:{dimensions:{anyOf:[{$ref:"#/$defs/HealthDimensionsV1"},{type:"null"}]},files_analyzed:{format:"uint64",minimum:0,type:"integer"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},panel:{description:"Measured dimension names, worst score first, then\n`no evidence: name (reason), ...` for the dimensions the scope gave\nnothing to measure. An empty scope reads\n`no evidence: 0 files in scope`.",type:"string"},quality_signal:{description:"Geometric mean of the dimensions, scaled to 0-10000. A breakdown of\n`panel`, not a number to maximize. Dimensions that `panel` lists under\n`no evidence:` enter it at their formula value for an empty\nmeasurement, so it does not summarize such a scope: an empty scope\nreads 10000 and one file reads 0.",format:"uint32",minimum:0,type:"integer"},weights:{anyOf:[{$ref:"#/$defs/HealthWeightsV1"},{type:"null"}]}},required:["quality_signal","files_analyzed"],title:"HealthResultV1",type:"object"},{$defs:{PageRequest:_t,ResultProjection:_H,RetrievalOrder:_Z,RetrievalRequestMeta:_Q,TemporalModeV1:v6,UtcMicros:bs},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{before_cursor:{description:"A prior result's after_cursor. A cursor recorded under another health\ndefinition, or before definitions were recorded, is refused with\n`application.health-delta.definition-mismatch` or\n`application.health-delta.definition-unrecorded`; omit it to record a\nnew baseline.",type:["string","null"]},meta:{$ref:"#/$defs/RetrievalRequestMeta"},path_prefix:{type:["string","null"]}},required:["meta"],title:"HealthDeltaRequest",type:"object"},{$defs:{HealthDeltaCoverageV1:{additionalProperties:!1,properties:{completeness:{description:"`complete` when both points analyzed files, otherwise `unknown`.",type:"string"},denominator:{format:"uint64",minimum:0,type:["integer","null"]},eligible:{description:"Files the `after` point analyzed.",format:"uint64",minimum:0,type:["integer","null"]},visited:{format:"uint64",minimum:0,type:["integer","null"]}},required:["completeness"],type:"object"},HealthDeltaCurrentnessV1:{additionalProperties:!1,properties:{observed_at:{$ref:"#/$defs/UtcMicros"},state:{type:"string"}},required:["state","observed_at"],type:"object"},HealthDeltaPointV1:{additionalProperties:!1,properties:{dimensions:{additionalProperties:{$ref:"#/$defs/HealthDimensionPointV1"},type:"object"},files_analyzed:{format:"uint64",minimum:0,type:"integer"},function_denominator:{format:"uint64",minimum:0,type:"integer"},observed_at:{$ref:"#/$defs/UtcMicros"},quality_signal:{format:"uint32",minimum:0,type:"integer"},watermark:{$ref:"#/$defs/ManifestDigest"}},required:["watermark","observed_at","quality_signal","files_analyzed","function_denominator","dimensions"],type:"object"},HealthDeltaScopeV1:{additionalProperties:!1,properties:{path_prefix:{type:["string","null"]},project_id:{type:["string","null"]},scope_digest:{$ref:"#/$defs/ManifestDigest"}},required:["scope_digest"],type:"object"},HealthDimensionDeltaV1:{additionalProperties:!1,properties:{after_denominator:{format:"uint64",minimum:0,type:["integer","null"]},after_ppm:{format:"uint64",minimum:0,type:"integer"},before_denominator:{format:"uint64",minimum:0,type:["integer","null"]},before_ppm:{format:"uint64",minimum:0,type:"integer"},delta_ppm:{format:"int64",type:"integer"},status:{description:"`improved` or `degraded` when the score moved more than 1000 ppm,\notherwise `unchanged`. `no_evidence` when either point's scope gave\nthe dimension nothing to measure, so its scores are formula values.",type:"string"}},required:["before_ppm","after_ppm","delta_ppm","status"],type:"object"},HealthDimensionPointV1:{additionalProperties:!1,properties:{denominator:{format:"uint64",minimum:0,type:["integer","null"]},score_ppm:{format:"uint64",minimum:0,type:"integer"}},required:["score_ppm"],type:"object"},ManifestDigest:gj,UtcMicros:bs},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{after:{$ref:"#/$defs/HealthDeltaPointV1"},after_cursor:{type:"string"},before:{$ref:"#/$defs/HealthDeltaPointV1"},before_cursor:{type:"string"},coverage:{$ref:"#/$defs/HealthDeltaCoverageV1"},currentness:{$ref:"#/$defs/HealthDeltaCurrentnessV1"},delta:{format:"int64",type:"integer"},dimensions:{additionalProperties:{$ref:"#/$defs/HealthDimensionDeltaV1"},type:"object"},pass:{description:"True when both points analyzed files and quality_signal did not drop.",type:"boolean"},schema_version:{format:"uint32",minimum:0,type:"integer"},scope:{$ref:"#/$defs/HealthDeltaScopeV1"}},required:["schema_version","scope","before","after","before_cursor","after_cursor","pass","delta","dimensions","coverage","currentness"],title:"HealthDeltaResult",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"The health read takes no parameters: it reports one serving status, with no\npage, projection, or temporal selection to make. The page and deadline\ncontrols every surface supplies travel in the dispatch envelope, not here.",title:"HealthReadRequest",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{status:{type:"string"}},required:["status"],title:"HealthReadResult",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{include_pending_payloads:{default:!1,description:"Include staged Hermes skill-write payloads (default: false).",type:"boolean"},include_skill_bodies:{default:!1,description:"Include bounded SKILL.md contents (default: false).",type:"boolean"}},title:"HermesSkillBridgeSurfaceRequestV1",type:"object"},{$defs:{AutomationReadStatusV1:fn,HermesPendingSkillWrite:{properties:{action:{type:["string","null"]},created_at:!0,id:{type:"string"},name:{type:["string","null"]},origin:{type:["string","null"]},payload:!0,source_path:{type:"string"},summary:{type:["string","null"]}},required:["id","source_path"],type:"object"},HermesSkillBridgeContracts:{properties:{discovery_policy:{type:"string"},lifecycle_owner:{type:"string"},mutation_policy:{type:"string"}},required:["lifecycle_owner","mutation_policy","discovery_policy"],type:"object"},HermesSkillBridgeSnapshot:{properties:{agent_home:{type:"string"},archive_count:{format:"uint",minimum:0,type:"integer"},contracts:{$ref:"#/$defs/HermesSkillBridgeContracts"},pending_skill_corrupt_count:{format:"uint",minimum:0,type:"integer"},pending_skill_count:{format:"uint",minimum:0,type:"integer"},pending_skills:{items:{$ref:"#/$defs/HermesPendingSkillWrite"},type:"array"},skill_count:{format:"uint",minimum:0,type:"integer"},skills:{items:{$ref:"#/$defs/HermesSkillSummary"},type:"array"},skills_dir:{type:"string"},usage_record_count:{format:"uint",minimum:0,type:"integer"},usage_records:{additionalProperties:!0,description:"Hermes-owned usage telemetry keyed by skill name, as Hermes wrote it.",type:"object"}},required:["agent_home","skills_dir","skill_count","pending_skill_count","pending_skill_corrupt_count","usage_record_count","archive_count","skills","pending_skills","usage_records","contracts"],type:"object"},HermesSkillSummary:{properties:{body_markdown:{type:["string","null"]},category:{type:["string","null"]},description:{type:["string","null"]},name:{type:"string"},path:{type:"string"},pending_write_ids:{items:{type:"string"},type:"array"},usage:!0},required:["name","path","pending_write_ids"],type:"object"}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{bridge:{$ref:"#/$defs/HermesSkillBridgeSnapshot"},status:{$ref:"#/$defs/AutomationReadStatusV1"}},required:["status","bridge"],title:"HermesSkillBridgeResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",oneOf:[{additionalProperties:!1,description:"Reset the project's local token counter.",properties:{action:{const:"reset_counter",type:"string"}},required:["action"],type:"object"},{additionalProperties:!1,description:"Admit one Hook V2 envelope for the bound project.",properties:{action:{const:"hook_v2_admit",type:"string"},envelope:!0,native_lifecycle:!0,native_session_id:{description:"The host's native session id; it binds only when it hashes to the\nenvelope's protected session.",type:["string","null"]}},required:["action","envelope"],type:"object"},{additionalProperties:!1,description:"Commit a Context Scout delivery receipt for guidance the last\nadmission handed out.",properties:{action:{const:"hook_v2_delivery_receipt",type:"string"},receipt:!0},required:["action","receipt"],type:"object"},{additionalProperties:!1,description:"Acknowledge delivery of an advisory feedback notice.",properties:{action:{const:"hook_v2_feedback_notice_delivery",type:"string"},envelope:!0,feedback_notice:!0},required:["action","envelope","feedback_notice"],type:"object"},{additionalProperties:!1,description:"Land a host transcript in the owning session store.",properties:{action:{const:"ingest_transcript",type:"string"},event_json:{description:"The host's raw hook event, for providers that locate the transcript\nfrom it.",type:["string","null"]},max_new_bytes:{description:"Byte budget for this pass across every scanned source.",format:"uint64",minimum:0,type:["integer","null"]},messages:{description:"One turn the host inlined instead of a source to scan.",items:!0,type:["array","null"]},provider:{type:"string"},session_id:{type:["string","null"]},user_scope:{description:"Land the transcript in the profile's user store instead of the\nproject's.",type:"boolean"}},required:["action","provider","user_scope"],type:"object"},{additionalProperties:!1,description:"Codex `PostCompact` pressure evidence.",properties:{action:{const:"codex_compact",type:"string"},event_json:{type:"string"}},required:["action","event_json"],type:"object"},{additionalProperties:!1,description:"Claude `PostCompact` pressure evidence; `user_scope` routes it to the\nprofile.",properties:{action:{const:"claude_compact",type:"string"},event_json:{type:"string"},user_scope:{type:"boolean"}},required:["action","event_json","user_scope"],type:"object"},{additionalProperties:!1,description:"Cursor `preCompact` pressure evidence.",properties:{action:{const:"cursor_compact",type:"string"},event_json:{type:"string"}},required:["action","event_json"],type:"object"},{additionalProperties:!1,description:"Record a Hermes terminal receipt without a project route.",properties:{action:{const:"hermes_receipt",type:"string"},event:!0},required:["action","event"],type:"object"},{additionalProperties:!1,description:"Admit a native event without a project route into the profile's\nHook V2 ledger.",properties:{action:{const:"hook_v2_profile_admit",type:"string"},admission:!0},required:["action","admission"],type:"object"}],title:"HookRuntimeSurfaceRequestV1"},{$defs:{ContextScoutAddressV1:ho,ContextScoutStoreStatusV1:{enum:["stored","duplicate","superseded","unavailable"],type:"string"},HermesReceiptStatusV1:{oneOf:[{const:"recorded",description:"A terminal receipt was recorded.",type:"string"},{const:"ingested",description:"The turn was marked ingested and no receipt awaits review.",type:"string"},{const:"awaiting_transcript",description:"A receipt awaits a transcript that has not landed yet.",type:"string"}]},HookIngestAdmissionV1:{additionalProperties:!1,description:"The admission authority's verdict on one transcript ingest.",properties:{reason_code:{type:["string","null"]},retryable:{type:"boolean"},status:{description:"The session host-admission status, in its wire spelling.",type:"string"}},required:["status","retryable"],type:"object"},HookOrchestrationAdmissionV1:{description:"Outcome of admitting one hook envelope into the registered orchestrator.",enum:["enqueued","backpressured","unsupported_trigger","unavailable"],type:"string"},HookRuntimeDispositionV1:{description:"How the hook transport should treat a Hook V2 envelope.",oneOf:[{enum:["accepted"],type:"string"},{const:"catchup_required",description:"The published binding no longer authorizes the envelope; the host\nmust catch up before sending again.",type:"string"}]},HookV2RejectionReasonV1:{oneOf:[{const:"admission_identity_conflict",description:"The same event identity previously carried different bytes.",type:"string"}]}},$schema:"https://json-schema.org/draft/2020-12/schema",oneOf:[{additionalProperties:!1,properties:{action:{const:"reset_counter",type:"string"},reset:{type:"boolean"}},required:["action","reset"],type:"object"},{oneOf:[{properties:{context_scout_address:{anyOf:[{$ref:"#/$defs/ContextScoutAddressV1"},{type:"null"}]},disposition:{$ref:"#/$defs/HookRuntimeDispositionV1"},feedback_notice:{description:"The advisory `AdvisoryHookLookupNoticeV1` waiting for this\nworktree."},github_stack_signal_available:{type:"boolean"},orchestration:{$ref:"#/$defs/HookOrchestrationAdmissionV1"},ready_guidance:{description:"The hook's `HookReadyGuidanceV1`, when admission claimed one."},status:{const:"accepted",type:"string"}},required:["status","disposition","orchestration","github_stack_signal_available"],type:"object"},{description:"This exact envelope was already admitted; a retry may still receive\nguidance retained before a lost host response.",properties:{context_scout_address:{anyOf:[{$ref:"#/$defs/ContextScoutAddressV1"},{type:"null"}]},disposition:{$ref:"#/$defs/HookRuntimeDispositionV1"},ready_guidance:!0,status:{const:"exact_duplicate",type:"string"}},required:["status","disposition"],type:"object"},{properties:{disposition:{$ref:"#/$defs/HookRuntimeDispositionV1"},reason:{anyOf:[{$ref:"#/$defs/HookV2RejectionReasonV1"},{type:"null"}]},status:{const:"rejected",type:"string"}},required:["status","disposition"],type:"object"},{description:"Idempotency could not be recorded, so nothing was admitted.",properties:{status:{const:"backpressured",type:"string"}},required:["status"],type:"object"},{properties:{status:{const:"unavailable",type:"string"}},required:["status"],type:"object"}],properties:{action:{const:"hook_v2_admit",type:"string"}},required:["action"],type:"object"},{additionalProperties:!1,properties:{action:{const:"hook_v2_delivery_receipt",type:"string"},status:{$ref:"#/$defs/ContextScoutStoreStatusV1"}},required:["action","status"],type:"object"},{oneOf:[{properties:{status:{const:"stored",type:"string"}},required:["status"],type:"object"},{properties:{status:{const:"unavailable",type:"string"}},required:["status"],type:"object"},{properties:{disposition:{$ref:"#/$defs/HookRuntimeDispositionV1"},status:{const:"rejected",type:"string"}},required:["status","disposition"],type:"object"}],properties:{action:{const:"hook_v2_feedback_notice_delivery",type:"string"}},required:["action"],type:"object"},{additionalProperties:!1,properties:{action:{const:"ingest_transcript",type:"string"},admission:{$ref:"#/$defs/HookIngestAdmissionV1"},bytes_consumed:{format:"uint64",minimum:0,type:["integer","null"]},completed:{description:"False when the byte budget left work for a later pass.",type:"boolean"},cursor_advances:{format:"uint64",minimum:0,type:["integer","null"]},cursor_duplicates:{format:"uint64",minimum:0,type:["integer","null"]},deferred_by_byte_cap:{type:["boolean","null"]},deferred_sources:{format:"uint64",minimum:0,type:["integer","null"]},hint_outcomes:{description:"How emitted hook hints settled against the new project activity."},messages_upserted:{format:"uint64",minimum:0,type:"integer"},observation_duplicates:{format:"uint64",minimum:0,type:["integer","null"]},observations_committed:{format:"uint64",minimum:0,type:["integer","null"]},projection_duplicates:{format:"uint64",minimum:0,type:["integer","null"]},projections_completed:{format:"uint64",minimum:0,type:["integer","null"]},projections_skipped:{format:"uint64",minimum:0,type:["integer","null"]},provider:{type:"string"},records_quarantined:{format:"uint64",minimum:0,type:["integer","null"]},records_rejected:{format:"uint64",minimum:0,type:["integer","null"]},source_bytes_scanned:{format:"uint64",minimum:0,type:["integer","null"]},status:{type:"string"},user_scope:{type:"boolean"}},required:["action","provider","user_scope","completed","status","admission","messages_upserted"],type:"object"},{anyOf:[{description:"The LCM authority settled the compaction.",properties:{authority_outcome:!0,committed_state:!0,messages_upserted:{format:"uint64",minimum:0,type:"integer"},reason:{type:"string"},relation_projection_status:!0,retry_status:{type:["string","null"]},status:{type:"string"},summary_node_ids:{items:{type:"string"},type:"array"},summary_nodes_created:{format:"uint64",minimum:0,type:"integer"}},required:["status","reason","summary_nodes_created","summary_node_ids","relation_projection_status","authority_outcome","committed_state","messages_upserted"],type:"object"},{description:"The LCM authority answered without a compaction.",properties:{authority_outcome:!0,committed_state:!0,messages_upserted:{format:"uint64",minimum:0,type:"integer"},reason:{type:"string"},status:{type:"string"},summary_node_ids:{items:{type:"string"},type:"array"},summary_nodes_created:{format:"uint64",minimum:0,type:"integer"}},required:["status","reason","authority_outcome","committed_state","summary_nodes_created","summary_node_ids","messages_upserted"],type:"object"},{description:"No compaction ran: the authority is absent, the host supplied nothing\nto compact, or its summaries have no provenance.",properties:{reason:{type:"string"},relation_projection_status:!0,status:{type:"string"},summary_node_ids:{items:{type:"string"},type:"array"},summary_nodes_created:{format:"uint64",minimum:0,type:"integer"}},required:["status","reason","summary_nodes_created","summary_node_ids"],type:"object"},{description:"The host event named no session to compact.",properties:{messages_upserted:{format:"uint64",minimum:0,type:"integer"},reason:{type:"string"},status:{type:"string"}},required:["status","reason","messages_upserted"],type:"object"}],description:"A compaction hook's outcome. Variants are distinguished by the fields\nthey carry.",properties:{action:{const:"codex_compact",type:"string"}},required:["action"],type:"object"},{anyOf:[{description:"The LCM authority settled the compaction.",properties:{authority_outcome:!0,committed_state:!0,messages_upserted:{format:"uint64",minimum:0,type:"integer"},reason:{type:"string"},relation_projection_status:!0,retry_status:{type:["string","null"]},status:{type:"string"},summary_node_ids:{items:{type:"string"},type:"array"},summary_nodes_created:{format:"uint64",minimum:0,type:"integer"}},required:["status","reason","summary_nodes_created","summary_node_ids","relation_projection_status","authority_outcome","committed_state","messages_upserted"],type:"object"},{description:"The LCM authority answered without a compaction.",properties:{authority_outcome:!0,committed_state:!0,messages_upserted:{format:"uint64",minimum:0,type:"integer"},reason:{type:"string"},status:{type:"string"},summary_node_ids:{items:{type:"string"},type:"array"},summary_nodes_created:{format:"uint64",minimum:0,type:"integer"}},required:["status","reason","authority_outcome","committed_state","summary_nodes_created","summary_node_ids","messages_upserted"],type:"object"},{description:"No compaction ran: the authority is absent, the host supplied nothing\nto compact, or its summaries have no provenance.",properties:{reason:{type:"string"},relation_projection_status:!0,status:{type:"string"},summary_node_ids:{items:{type:"string"},type:"array"},summary_nodes_created:{format:"uint64",minimum:0,type:"integer"}},required:["status","reason","summary_nodes_created","summary_node_ids"],type:"object"},{description:"The host event named no session to compact.",properties:{messages_upserted:{format:"uint64",minimum:0,type:"integer"},reason:{type:"string"},status:{type:"string"}},required:["status","reason","messages_upserted"],type:"object"}],description:"A compaction hook's outcome. Variants are distinguished by the fields\nthey carry.",properties:{action:{const:"claude_compact",type:"string"}},required:["action"],type:"object"},{anyOf:[{description:"The LCM authority settled the compaction.",properties:{authority_outcome:!0,committed_state:!0,messages_upserted:{format:"uint64",minimum:0,type:"integer"},reason:{type:"string"},relation_projection_status:!0,retry_status:{type:["string","null"]},status:{type:"string"},summary_node_ids:{items:{type:"string"},type:"array"},summary_nodes_created:{format:"uint64",minimum:0,type:"integer"}},required:["status","reason","summary_nodes_created","summary_node_ids","relation_projection_status","authority_outcome","committed_state","messages_upserted"],type:"object"},{description:"The LCM authority answered without a compaction.",properties:{authority_outcome:!0,committed_state:!0,messages_upserted:{format:"uint64",minimum:0,type:"integer"},reason:{type:"string"},status:{type:"string"},summary_node_ids:{items:{type:"string"},type:"array"},summary_nodes_created:{format:"uint64",minimum:0,type:"integer"}},required:["status","reason","authority_outcome","committed_state","summary_nodes_created","summary_node_ids","messages_upserted"],type:"object"},{description:"No compaction ran: the authority is absent, the host supplied nothing\nto compact, or its summaries have no provenance.",properties:{reason:{type:"string"},relation_projection_status:!0,status:{type:"string"},summary_node_ids:{items:{type:"string"},type:"array"},summary_nodes_created:{format:"uint64",minimum:0,type:"integer"}},required:["status","reason","summary_nodes_created","summary_node_ids"],type:"object"},{description:"The host event named no session to compact.",properties:{messages_upserted:{format:"uint64",minimum:0,type:"integer"},reason:{type:"string"},status:{type:"string"}},required:["status","reason","messages_upserted"],type:"object"}],description:"A compaction hook's outcome. Variants are distinguished by the fields\nthey carry.",properties:{action:{const:"cursor_compact",type:"string"}},required:["action"],type:"object"},{additionalProperties:!1,properties:{action:{const:"hermes_receipt",type:"string"},status:{$ref:"#/$defs/HermesReceiptStatusV1"}},required:["action","status"],type:"object"},{oneOf:[{properties:{disposition:{$ref:"#/$defs/HookRuntimeDispositionV1"},status:{const:"accepted",type:"string"}},required:["status","disposition"],type:"object"},{properties:{disposition:{$ref:"#/$defs/HookRuntimeDispositionV1"},status:{const:"exact_duplicate",type:"string"}},required:["status","disposition"],type:"object"},{properties:{disposition:{$ref:"#/$defs/HookRuntimeDispositionV1"},status:{const:"rejected",type:"string"}},required:["status","disposition"],type:"object"},{properties:{status:{const:"unavailable",type:"string"}},required:["status"],type:"object"}],properties:{action:{const:"hook_v2_profile_admit",type:"string"}},required:["action"],type:"object"}],title:"HookRuntimeResultV1"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{limit:{description:"Maximum number of hotspots to return (default: 10, at most 100).",format:"uint32",minimum:0,type:["integer","null"]}},title:"HotspotsSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fF,CodeIndexConvergenceParkedV1:fL,CodeIndexStalenessStateV1:fB,HotspotV1:{additionalProperties:!1,properties:{churn:{description:"Commits touching `file` in the last 90 days. Absent when git history\ncould not be read; `0` means the file had no commits in that window.",format:"uint64",minimum:0,type:["integer","null"]},file:{type:"string"},id:{type:"string"},incoming:{format:"uint64",minimum:0,type:"integer"},kind:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},name:{type:"string"},outgoing:{format:"uint64",minimum:0,type:"integer"},total:{format:"uint64",minimum:0,type:"integer"}},required:["id","name","kind","file","line","incoming","outgoing","total"],type:"object"},PrimitiveFreshnessStateV1:_i,PrimitiveIndexingStateV1:_o,PrimitiveSearchFreshnessV1:_d},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},hotspot_count:{format:"uint64",minimum:0,type:"integer"},hotspots:{items:{$ref:"#/$defs/HotspotV1"},type:"array"},unavailable_fields:{description:"Names a measurement this result could not make. `churn` means the\nranking is connectivity alone.",items:{type:"string"},type:"array"}},required:["hotspot_count","hotspots"],title:"HotspotsResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{max_depth:{format:"uint32",minimum:0,type:["integer","null"]},node_id:{type:"string"}},required:["node_id"],title:"NodeDepthSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fF,CodeIndexConvergenceParkedV1:fL,CodeIndexStalenessStateV1:fB,ImpactNodeV1:{additionalProperties:!1,properties:{depth:{format:"uint32",minimum:0,type:"integer"},file:{type:"string"},id:{type:"string"},kind:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},name:{type:"string"}},required:["id","name","kind","file","line","depth"],type:"object"},ImpactRadiusV1:{additionalProperties:!1,properties:{complete:{type:"boolean"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},node_count:{format:"uint",minimum:0,type:"integer"},nodes:{items:{$ref:"#/$defs/ImpactNodeV1"},type:"array"},unavailable_fields:{items:{type:"string"},type:"array"}},required:["node_count","complete","unavailable_fields","nodes"],type:"object"},PrimitiveFreshnessStateV1:_i,PrimitiveIndexingStateV1:_o,PrimitiveNotFoundV1:_a,PrimitiveSearchFreshnessV1:_d,PrimitiveSymbolLocationV1:_l},$schema:"https://json-schema.org/draft/2020-12/schema",anyOf:[{$ref:"#/$defs/ImpactRadiusV1"},{$ref:"#/$defs/PrimitiveNotFoundV1"}],title:"ImpactResultV1"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{limit:{description:"Maximum number of results to return (default: 10, at most 100).",format:"uint32",minimum:0,type:["integer","null"]},path:{description:"Filter to files under this directory path (e.g. 'src/main/java').",type:["string","null"]}},title:"InheritanceDepthSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fF,CodeIndexConvergenceParkedV1:fL,CodeIndexStalenessStateV1:fB,InheritanceDepthEntryV1:{additionalProperties:!1,properties:{depth:{format:"uint64",minimum:0,type:"integer"},file:{type:"string"},id:{type:"string"},kind:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},name:{type:"string"}},required:["id","name","kind","file","line","depth"],type:"object"},PrimitiveFreshnessStateV1:_i,PrimitiveIndexingStateV1:_o,PrimitiveSearchFreshnessV1:_d},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},ranking:{items:{$ref:"#/$defs/InheritanceDepthEntryV1"},type:"array"},result_count:{format:"uint64",minimum:0,type:"integer"}},required:["result_count","ranking"],title:"InheritanceDepthResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Exact public input accepted by `tracedecay_insert_at`.",properties:{anchor:{type:"string"},before:{default:!1,type:"boolean"},content:{type:"string"},dry_run:{default:!1,type:"boolean"},expected_state:{description:"Exact `preview_digest`/`expected_state` returned by the dry run. Apply\nre-resolves the typed plan and rejects any candidate-state drift.",type:["string","null"]},idempotency_key:{type:["string","null"]},path:{type:"string"},verify:{default:!1,type:"boolean"}},required:["path","anchor","content"],title:"InsertAtSurfaceRequestV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Exact public input accepted by `tracedecay_insert_at_symbol`.",properties:{content:{type:"string"},dry_run:{default:!1,type:"boolean"},expected_state:{description:"Exact `preview_digest`/`expected_state` returned by the dry run. Apply\nre-resolves the typed plan and rejects any candidate-state drift.",type:["string","null"]},idempotency_key:{type:["string","null"]},position:{default:"after",type:"string"},symbol:{type:"string"},verify:{default:!1,type:"boolean"}},required:["symbol","content"],title:"InsertAtSymbolSurfaceRequestV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{limit:{description:"Maximum number of results to return (default: 10, at most 100).",format:"uint32",minimum:0,type:["integer","null"]},node_kind:{description:"Filter by node kind (e.g. 'class', 'method', 'function', 'interface',\n'enum', 'struct').",type:["string","null"]},path:{description:"Filter to files under this directory path (e.g. 'src/main/java').",type:["string","null"]}},title:"LargestSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fF,CodeIndexConvergenceParkedV1:fL,CodeIndexStalenessStateV1:fB,LargestEntryV1:{additionalProperties:!1,properties:{end_line:{format:"uint32",minimum:0,type:"integer"},file:{type:"string"},id:{type:"string"},kind:{type:"string"},lines:{format:"uint32",minimum:0,type:"integer"},name:{type:"string"},start_line:{format:"uint32",minimum:0,type:"integer"}},required:["id","name","kind","file","start_line","end_line","lines"],type:"object"},PrimitiveFreshnessStateV1:_i,PrimitiveIndexingStateV1:_o,PrimitiveSearchFreshnessV1:_d},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},node_kind_filter:{type:["string","null"]},ranking:{items:{$ref:"#/$defs/LargestEntryV1"},type:"array"},result_count:{format:"uint64",minimum:0,type:"integer"}},required:["result_count","ranking"],title:"LargestResultV1",type:"object"},{$defs:{LcmDescribeTargetV1:{oneOf:[{properties:{kind:{const:"session",type:"string"}},required:["kind"],type:"object"},{properties:{kind:{const:"summary_node",type:"string"},node_id:{type:"string"}},required:["kind","node_id"],type:"object"},{properties:{kind:{const:"external_payload",type:"string"},payload_ref:{type:"string"}},required:["kind","payload_ref"],type:"object"}]}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{provider:{type:"string"},session_id:{type:"string"},target:{anyOf:[{$ref:"#/$defs/LcmDescribeTargetV1"},{type:"null"}]}},required:["provider","session_id"],title:"LcmDescribeRequestV1",type:"object"},{$defs:{ClosedUtcIntervalV1:fW,CompactLineageEdgeV1:{additionalProperties:!1,properties:{authority:{type:"string"},authorized:{type:"boolean"},kind:{type:"string"},knowledge_at:{format:"int64",type:"integer"},object_anchor_id:{type:"string"},subject_anchor_id:{type:"string"},supporting_anchor_ids:{items:{type:"string"},type:"array"}},required:["kind","subject_anchor_id","object_anchor_id","knowledge_at","authority","authorized","supporting_anchor_ids"],type:"object"},HydrationStateResultV1:gi,LcmContentRangeV1:gd,LcmDescribeExternalPayloadV1:{additionalProperties:!1,properties:{byte_count:{format:"uint64",minimum:0,type:"integer"},char_count:{format:"uint64",minimum:0,type:"integer"},content_hash:{type:"string"},content_preview:{type:"string"},created_at:{format:"int64",type:"integer"},kind:{type:"string"},message_id:{type:"string"},metadata_json:{type:["string","null"]},payload_ref:{type:"string"},provider:{type:"string"},session_id:{type:"string"}},required:["payload_ref","provider","session_id","message_id","kind","content_hash","byte_count","char_count","created_at","content_preview"],type:"object"},LcmDescribeSourceOverviewV1:{additionalProperties:!1,properties:{expand_hint:{type:["string","null"]},node_id:{type:["string","null"]},role:{type:["string","null"]},source_kind:{type:"string"},source_ref:{$ref:"#/$defs/LcmSourceRefV1"},source_token_count:{format:"int64",type:["integer","null"]},storage_kind:{anyOf:[{$ref:"#/$defs/LcmStorageKindV1"},{type:"null"}]},store_id:{format:"int64",type:["integer","null"]},summary_token_count:{format:"int64",type:["integer","null"]}},required:["source_kind","source_ref"],type:"object"},LcmDescribeSummaryNodeV1:{additionalProperties:!1,properties:{children:{items:{$ref:"#/$defs/LcmDescribeSourceOverviewV1"},type:"array"},conversation_id:{type:"string"},created_at:{format:"int64",type:"integer"},depth:{format:"int64",type:"integer"},expand_hint:{type:["string","null"]},metadata_json:{type:["string","null"]},node_id:{type:"string"},source_count:{format:"uint",minimum:0,type:"integer"},source_time_end:{format:"int64",type:["integer","null"]},source_time_start:{format:"int64",type:["integer","null"]},source_token_count:{format:"int64",type:"integer"},summary_token_count:{format:"int64",type:"integer"}},required:["node_id","conversation_id","depth","summary_token_count","source_token_count","created_at","source_count","children"],type:"object"},LcmDescriptionV1:{additionalProperties:!1,properties:{external_payload:{anyOf:[{$ref:"#/$defs/LcmDescribeExternalPayloadV1"},{type:"null"}]},external_payload_count:{format:"int64",type:"integer"},first_store_id:{format:"int64",type:["integer","null"]},last_store_id:{format:"int64",type:["integer","null"]},provider:{type:"string"},raw_message_count:{format:"int64",type:"integer"},raw_messages:{items:{$ref:"#/$defs/LcmRawMessageOverviewV1"},type:"array"},session_id:{type:"string"},session_token_estimate:{format:"int64",type:["integer","null"]},summary_node:{anyOf:[{$ref:"#/$defs/LcmDescribeSummaryNodeV1"},{type:"null"}]},summary_node_count:{format:"int64",type:"integer"},summary_nodes:{items:{$ref:"#/$defs/LcmSummaryNodeOverviewV1"},type:"array"},target:{type:"string"},unpublished_message_count:{description:"Raw messages the session's active temporal generation has not\npublished; transcript reads cannot page them yet.",format:"int64",type:"integer"}},required:["target","provider","session_id","raw_message_count","unpublished_message_count","summary_node_count","external_payload_count","raw_messages","summary_nodes"],type:"object"},LcmRawMessageOverviewV1:{additionalProperties:!1,properties:{content_preview:{type:"string"},content_range:{$ref:"#/$defs/LcmContentRangeV1"},message_id:{type:"string"},payload_ref:{type:["string","null"]},role:{type:"string"},storage_kind:{$ref:"#/$defs/LcmStorageKindV1"},store_id:{format:"int64",type:"integer"}},required:["message_id","store_id","role","storage_kind","content_preview","content_range"],type:"object"},LcmRetrievalOutcomeV1:gf,LcmSourceRefV1:gh,LcmStorageKindV1:gy,LcmSummaryNodeOverviewV1:{additionalProperties:!1,properties:{conversation_id:{type:"string"},created_at:{format:"int64",type:"integer"},depth:{format:"int64",type:"integer"},node_id:{type:"string"},source_count:{format:"uint",minimum:0,type:"integer"},summary_preview:{type:"string"}},required:["node_id","conversation_id","depth","summary_preview","source_count","created_at"],type:"object"},LcmTemporalFieldsV1:gb,RetainedErrorV1:_G,RetainedOutcomeStatusV1:_B,RetrievalWorkerStatusV1:_Y,SessionCoverageIntervalV1:vh,SessionCoverageReasonV1:vy,SessionCoverageRequestV1:vg,SessionCoverageStateV1:v_,SessionSourceCoverageV1:vP,TemporalCoverageV1:v0,TemporalExplanationV1:v2,TemporalFreshnessV1:v4,TemporalModeV1:v6,TemporalOmissionV1:v3,TemporalWatermarksV1:v9,UtcMicros:bs,ValidCoverageIntervalV1:bd},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{capped_sessions:{additionalProperties:{format:"uint",minimum:0,type:"integer"},type:["object","null"]},description:{anyOf:[{$ref:"#/$defs/LcmDescriptionV1"},{type:"null"}]},error:{anyOf:[{$ref:"#/$defs/RetainedErrorV1"},{type:"null"}]},grain:{type:["string","null"]},lineage:{items:{$ref:"#/$defs/CompactLineageEdgeV1"},type:["array","null"]},omitted:{format:"uint64",minimum:0,type:["integer","null"]},provider:{type:["string","null"]},retrieval:{anyOf:[{$ref:"#/$defs/LcmRetrievalOutcomeV1"},{type:"null"}]},service_status:{anyOf:[{$ref:"#/$defs/RetrievalWorkerStatusV1"},{type:"null"}]},session_id:{type:["string","null"]},state:{anyOf:[{$ref:"#/$defs/HydrationStateResultV1"},{type:"null"}]},status:{$ref:"#/$defs/RetainedOutcomeStatusV1"},temporal:{anyOf:[{$ref:"#/$defs/LcmTemporalFieldsV1"},{type:"null"}]}},required:["status"],title:"LcmDescribeResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,title:"LcmDoctorRequestV1",type:"object"},{$defs:{LcmAuthorityOutcomeV1:gs,LcmConvergenceStateV1:gc,LcmConvergenceV1:gl,LcmDoctorFindingKindV1:{enum:["trigger_audit_drift","occurrence_fts_corruption","summary_fts_corruption","missing_anchor","missing_receipt","invalid_generation","multi_active_generation","cursor_chain_absent","cursor_key_absent","ownership_drift","stuck_refresh","stuck_binding","stuck_progress","stuck_receipt","migration_gap","compatibility_drift","relation_graph_unavailable","relation_graph_corruption","relation_graph_cycle","stale_summary_closure"],type:"string"},LcmDoctorFindingV1:{additionalProperties:!1,properties:{count:{format:"uint64",minimum:0,type:"integer"},kind:{$ref:"#/$defs/LcmDoctorFindingKindV1"}},required:["kind","count"],type:"object"},LcmDoctorHealthStatusV1:{enum:["complete","partial","unavailable","locked"],type:"string"},LcmDoctorHealthV1:{additionalProperties:!1,properties:{findings:{items:{$ref:"#/$defs/LcmDoctorFindingV1"},type:"array"},reason:{type:["string","null"]},status:{$ref:"#/$defs/LcmDoctorHealthStatusV1"}},required:["status","findings"],type:"object"},LcmDoctorProjectionStateV1:gp,LcmDoctorProjectionV1:gu,RetainedOutcomeStatusV1:_B,RetrievalWorkerStatusV1:_Y},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{authority_outcome:{$ref:"#/$defs/LcmAuthorityOutcomeV1"},health:{anyOf:[{$ref:"#/$defs/LcmDoctorHealthV1"},{type:"null"}]},projection:{anyOf:[{$ref:"#/$defs/LcmDoctorProjectionV1"},{type:"null"}],description:"Absent when the diagnosed store has no refresh worker (profile mounts)."},reason:{type:["string","null"]},status:{$ref:"#/$defs/RetainedOutcomeStatusV1"}},required:["status","authority_outcome"],title:"LcmDoctorResultV1",type:"object"},{$defs:{LcmExpandTargetV1:{oneOf:[{properties:{kind:{const:"canonical_occurrence",type:"string"},message_id:{type:"string"}},required:["kind","message_id"],type:"object"},{properties:{kind:{const:"raw_message",type:"string"},store_id:{format:"uint64",minimum:0,type:"integer"}},required:["kind","store_id"],type:"object"},{properties:{kind:{const:"summary_node",type:"string"},node_id:{type:"string"}},required:["kind","node_id"],type:"object"},{properties:{kind:{const:"external_payload",type:"string"},payload_ref:{type:"string"}},required:["kind","payload_ref"],type:"object"}]}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{content_limit:{format:"uint64",minimum:0,type:["integer","null"]},content_offset:{format:"uint64",minimum:0,type:["integer","null"]},cursor:{type:["string","null"]},provider:{type:"string"},session_id:{type:"string"},source_limit:{format:"uint64",minimum:0,type:["integer","null"]},target:{$ref:"#/$defs/LcmExpandTargetV1"}},required:["provider","session_id","target"],title:"LcmExpandRequestV1",type:"object"},{$defs:{ClosedUtcIntervalV1:fW,HydrationStateResultV1:gi,LcmContentRangeV1:gd,LcmExpandedSourceV1:{additionalProperties:!1,properties:{content:{type:"string"},content_range:{anyOf:[{$ref:"#/$defs/LcmContentRangeV1"},{type:"null"}]},content_truncated:{type:"boolean"},raw_message:{anyOf:[{$ref:"#/$defs/LcmRawMessageV1"},{type:"null"}]},raw_message_metadata:{anyOf:[{$ref:"#/$defs/LcmRawMessageMetadataV1"},{type:"null"}]},source_ref:{$ref:"#/$defs/LcmSourceRefV1"},state:{$ref:"#/$defs/HydrationStateResultV1"},summary_node:{anyOf:[{$ref:"#/$defs/LcmSummaryNodeV1"},{type:"null"}]}},required:["source_ref","state","content","content_truncated"],type:"object"},LcmExpansionV1:{additionalProperties:!1,properties:{content:{type:"string"},content_range:{$ref:"#/$defs/LcmContentRangeV1"},from_current_session:{type:["boolean","null"]},kind:{type:"string"},payload_ref:{type:["string","null"]},raw_message:{anyOf:[{$ref:"#/$defs/LcmRawMessageV1"},{type:"null"}]},raw_message_metadata:{anyOf:[{$ref:"#/$defs/LcmRawMessageMetadataV1"},{type:"null"}]},source_pagination:{anyOf:[{$ref:"#/$defs/LcmSourcePaginationV1"},{type:"null"}]},summary_node:{anyOf:[{$ref:"#/$defs/LcmSummaryNodeV1"},{type:"null"}]},summary_sources:{items:{$ref:"#/$defs/LcmExpandedSourceV1"},type:"array"}},required:["kind","content","content_range","summary_sources"],type:"object"},LcmRawMessageMetadataV1:{additionalProperties:!1,properties:{content_hash:{type:"string"},message_id:{type:"string"},metadata_json:{type:["string","null"]},ordinal:{format:"int64",type:"integer"},payload_ref:{type:["string","null"]},provider:{type:"string"},role:{type:"string"},session_id:{type:"string"},storage_kind:{$ref:"#/$defs/LcmStorageKindV1"},store_id:{format:"int64",type:"integer"},timestamp:{format:"int64",type:["integer","null"]}},required:["provider","message_id","session_id","store_id","role","ordinal","content_hash","storage_kind"],type:"object"},LcmRawMessageV1:gm,LcmRetrievalOutcomeV1:gf,LcmSourcePaginationV1:{additionalProperties:!1,properties:{has_more:{type:"boolean"},remaining_sources:{format:"uint",minimum:0,type:"integer"},returned_sources:{format:"uint",minimum:0,type:"integer"},source_limit:{format:"uint",minimum:0,type:"integer"},total_sources:{format:"uint",minimum:0,type:"integer"}},required:["source_limit","returned_sources","total_sources","has_more","remaining_sources"],type:"object"},LcmSourceRefV1:gh,LcmStorageKindV1:gy,LcmSummaryNodeV1:gv,LcmTemporalFieldsV1:gb,RetainedErrorV1:_G,RetainedOutcomeStatusV1:_B,RetrievalWorkerStatusV1:_Y,SessionCoverageIntervalV1:vh,SessionCoverageReasonV1:vy,SessionCoverageRequestV1:vg,SessionCoverageStateV1:v_,SessionSourceCoverageV1:vP,TemporalCoverageV1:v0,TemporalExplanationV1:v2,TemporalFreshnessV1:v4,TemporalModeV1:v6,TemporalOmissionV1:v3,TemporalWatermarksV1:v9,UtcMicros:bs,ValidCoverageIntervalV1:bd},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{capped_sessions:{additionalProperties:{format:"uint",minimum:0,type:"integer"},type:["object","null"]},error:{anyOf:[{$ref:"#/$defs/RetainedErrorV1"},{type:"null"}]},expansion:{anyOf:[{$ref:"#/$defs/LcmExpansionV1"},{type:"null"}]},grain:{type:["string","null"]},omitted:{format:"uint64",minimum:0,type:["integer","null"]},provider:{type:["string","null"]},retrieval:{anyOf:[{$ref:"#/$defs/LcmRetrievalOutcomeV1"},{type:"null"}]},service_status:{anyOf:[{$ref:"#/$defs/RetrievalWorkerStatusV1"},{type:"null"}]},session_id:{type:["string","null"]},state:{anyOf:[{$ref:"#/$defs/HydrationStateResultV1"},{type:"null"}]},status:{$ref:"#/$defs/RetainedOutcomeStatusV1"},temporal:{anyOf:[{$ref:"#/$defs/LcmTemporalFieldsV1"},{type:"null"}]}},required:["status"],title:"LcmExpandResultV1",type:"object"},{$defs:{LcmNodeIdV1:{anyOf:[{type:"string"},{format:"uint64",minimum:0,type:"integer"}]}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{context_max_tokens:{format:"uint64",minimum:0,type:["integer","null"]},cursor:{type:["string","null"]},max_results:{format:"uint64",minimum:0,type:["integer","null"]},max_tokens:{format:"uint64",minimum:0,type:["integer","null"]},node_ids:{items:{$ref:"#/$defs/LcmNodeIdV1"},type:["array","null"]},prompt:{type:"string"},provider:{type:"string"},query:{type:["string","null"]},session_id:{type:"string"}},required:["provider","session_id","prompt"],title:"LcmExpandQueryRequestV1",type:"object"},{$defs:{ClosedUtcIntervalV1:fW,HydrationStateResultV1:gi,LcmContentRangeV1:gd,LcmExpandQueryBudgetV1:{additionalProperties:!1,properties:{requested_max_chars:{format:"uint",minimum:0,type:"integer"},used_chars:{format:"uint",minimum:0,type:"integer"}},required:["requested_max_chars","used_chars"],type:"object"},LcmExpandQueryContextBlockV1:{additionalProperties:!1,properties:{content:{type:"string"},content_range:{$ref:"#/$defs/LcmContentRangeV1"},kind:{type:"string"},node_id:{type:["string","null"]},raw_message:{anyOf:[{$ref:"#/$defs/LcmRawMessageV1"},{type:"null"}]},source_ref:{anyOf:[{$ref:"#/$defs/LcmSourceRefV1"},{type:"null"}]},summary_node:{anyOf:[{$ref:"#/$defs/LcmSummaryNodeV1"},{type:"null"}]}},required:["kind","content","content_range"],type:"object"},LcmExpandQueryMatchV1:{additionalProperties:!1,properties:{kind:{type:"string"},node_id:{type:["string","null"]},snippet:{type:"string"},store_id:{format:"int64",type:["integer","null"]}},required:["kind","snippet"],type:"object"},LcmExpandQueryPaginationV1:{additionalProperties:!1,properties:{has_more:{type:"boolean"},kind:{type:"string"},next_content_offset:{format:"uint64",minimum:0,type:["integer","null"]},node_id:{type:["string","null"]},source_ref:{anyOf:[{$ref:"#/$defs/LcmSourceRefV1"},{type:"null"}]},state:{anyOf:[{$ref:"#/$defs/HydrationStateResultV1"},{type:"null"}]}},required:["kind","has_more"],type:"object"},LcmExpandQuerySynthesisPromptV1:{additionalProperties:!1,properties:{system:{type:"string"},user:{type:"string"},user_prompt_truncated_for_mcp:{type:["boolean","null"]}},required:["system","user"],type:"object"},LcmRawMessageV1:gm,LcmSourceRefV1:gh,LcmStorageKindV1:gy,LcmSummaryNodeV1:gv,LcmTemporalFieldsV1:gb,RetainedErrorV1:_G,RetainedOutcomeStatusV1:_B,RetrievalWorkerStatusV1:_Y,SessionCoverageIntervalV1:vh,SessionCoverageReasonV1:vy,SessionCoverageRequestV1:vg,SessionCoverageStateV1:v_,SessionSourceCoverageV1:vP,TemporalCoverageV1:v0,TemporalExplanationV1:v2,TemporalModeV1:v6,TemporalOmissionV1:v3,TemporalWatermarksV1:v9,UtcMicros:bs,ValidCoverageIntervalV1:bd},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{answer:{type:["string","null"]},capped_sessions:{additionalProperties:{format:"uint",minimum:0,type:"integer"},type:["object","null"]},context_blocks:{items:{$ref:"#/$defs/LcmExpandQueryContextBlockV1"},type:"array"},context_budget:{anyOf:[{$ref:"#/$defs/LcmExpandQueryBudgetV1"},{type:"null"}]},context_max_tokens:{format:"uint",minimum:0,type:["integer","null"]},context_pagination:{items:{$ref:"#/$defs/LcmExpandQueryPaginationV1"},type:["array","null"]},context_truncated:{type:["boolean","null"]},contract_truncated:{type:["boolean","null"]},error:{anyOf:[{$ref:"#/$defs/RetainedErrorV1"},{type:"null"}]},matches:{items:{$ref:"#/$defs/LcmExpandQueryMatchV1"},type:["array","null"]},max_tokens:{format:"uint",minimum:0,type:["integer","null"]},mcp_response_truncated:{type:["boolean","null"]},mcp_truncation_reason:{type:["string","null"]},needs_synthesis:{type:["boolean","null"]},node_ids:{items:{type:"string"},type:["array","null"]},omitted:{format:"uint64",minimum:0,type:["integer","null"]},prompt:{type:["string","null"]},prompt_truncated_for_mcp:{type:["boolean","null"]},provider:{type:["string","null"]},query:{type:["string","null"]},query_truncated_for_mcp:{type:["boolean","null"]},service_status:{anyOf:[{$ref:"#/$defs/RetrievalWorkerStatusV1"},{type:"null"}]},session_id:{type:["string","null"]},status:{$ref:"#/$defs/RetainedOutcomeStatusV1"},synthesis_prompt:{anyOf:[{$ref:"#/$defs/LcmExpandQuerySynthesisPromptV1"},{type:"null"}]},temporal:{anyOf:[{$ref:"#/$defs/LcmTemporalFieldsV1"},{type:"null"}]}},required:["status","context_blocks"],title:"LcmExpandQueryResultV1",type:"object"},{$defs:{LcmGrepSortV1:{enum:["recency","relevance","hybrid"],type:"string"},LcmRoleV1:{enum:["system","user","assistant","tool","unknown"],type:"string"},LcmSearchScopeV1:{enum:["current","session","all"],type:"string"},MessageRelationshipScopeV1:gO,MessageTypeFilterV1:gE,RetainedTimeFilterV1:_K,TemporalModeV1:v6,UtcMicros:bs},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{branch:{type:["string","null"]},commit:{type:["string","null"]},cursor:{type:["string","null"]},end_time:{anyOf:[{$ref:"#/$defs/RetainedTimeFilterV1"},{type:"null"}]},include_summaries:{type:["boolean","null"]},limit:{format:"uint64",minimum:0,type:["integer","null"]},message_type:{anyOf:[{$ref:"#/$defs/MessageTypeFilterV1"},{type:"null"}]},provider:{type:["string","null"]},query:{type:"string"},relationship_scope:{anyOf:[{$ref:"#/$defs/MessageRelationshipScopeV1"},{type:"null"}]},role:{anyOf:[{$ref:"#/$defs/LcmRoleV1"},{type:"null"}]},scope:{anyOf:[{$ref:"#/$defs/LcmSearchScopeV1"},{type:"null"}]},session_id:{type:["string","null"]},since:{anyOf:[{$ref:"#/$defs/RetainedTimeFilterV1"},{type:"null"}]},sort:{anyOf:[{$ref:"#/$defs/LcmGrepSortV1"},{type:"null"}]},source:{type:["string","null"]},start_time:{anyOf:[{$ref:"#/$defs/RetainedTimeFilterV1"},{type:"null"}]},temporal_mode:{anyOf:[{$ref:"#/$defs/TemporalModeV1"},{type:"null"}]},until:{anyOf:[{$ref:"#/$defs/RetainedTimeFilterV1"},{type:"null"}]},worktree:{type:["string","null"]}},required:["query"],title:"LcmGrepRequestV1",type:"object"},{$defs:{ClosedUtcIntervalV1:fW,HydrationStateResultV1:gi,LcmGrepHitV1:{additionalProperties:!1,properties:{kind:{type:"string"},message_id:{type:["string","null"]},node_id:{type:["string","null"]},provider:{type:"string"},role:{type:["string","null"]},score:{format:"double",type:"number"},session_id:{type:"string"},snippet:{type:"string"},store_id:{format:"int64",type:["integer","null"]}},required:["kind","provider","session_id","snippet","score"],type:"object"},LcmTemporalFieldsV1:gb,RetainedErrorV1:_G,RetainedOutcomeStatusV1:_B,RetrievalWorkerStatusV1:_Y,SessionCoverageIntervalV1:vh,SessionCoverageReasonV1:vy,SessionCoverageRequestV1:vg,SessionCoverageStateV1:v_,SessionSourceCoverageV1:vP,TemporalCoverageV1:v0,TemporalExplanationV1:v2,TemporalModeV1:v6,TemporalOmissionV1:v3,TemporalWatermarksV1:v9,UtcMicros:bs,ValidCoverageIntervalV1:bd},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{capped_sessions:{additionalProperties:{format:"uint",minimum:0,type:"integer"},type:["object","null"]},count:{format:"uint",minimum:0,type:["integer","null"]},error:{anyOf:[{$ref:"#/$defs/RetainedErrorV1"},{type:"null"}]},hits:{items:{$ref:"#/$defs/LcmGrepHitV1"},type:"array"},message_type:{type:["string","null"]},omitted:{format:"uint64",minimum:0,type:["integer","null"]},provider:{type:["string","null"]},query:{type:["string","null"]},relationship_scope:{type:["string","null"]},service_status:{anyOf:[{$ref:"#/$defs/RetrievalWorkerStatusV1"},{type:"null"}]},sort:{type:["string","null"]},status:{$ref:"#/$defs/RetainedOutcomeStatusV1"},temporal:{anyOf:[{$ref:"#/$defs/LcmTemporalFieldsV1"},{type:"null"}]}},required:["status","hits"],title:"LcmGrepResultV1",type:"object"},{$defs:{TemporalModeV1:v6,UtcMicros:bs},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{content_limit:{format:"uint64",minimum:0,type:["integer","null"]},content_offset:{format:"uint64",minimum:0,type:["integer","null"]},cursor:{type:["string","null"]},end_time:{format:"uint64",minimum:0,type:["integer","null"]},limit:{format:"uint64",minimum:0,type:["integer","null"]},provider:{type:["string","null"]},role:{type:["string","null"]},roles:{items:{type:"string"},type:["array","null"]},session_id:{type:"string"},start_time:{format:"uint64",minimum:0,type:["integer","null"]},temporal_mode:{anyOf:[{$ref:"#/$defs/TemporalModeV1"},{type:"null"}]}},required:["session_id"],title:"LcmLoadSessionRequestV1",type:"object"},{$defs:{ClosedUtcIntervalV1:fW,HydrationStateResultV1:gi,LcmContentRangeV1:gd,LcmMessageV1:{additionalProperties:!1,properties:{content:{type:"string"},content_hash:{type:["string","null"]},content_range:{$ref:"#/$defs/LcmContentRangeV1"},message_id:{type:"string"},metadata_json:{type:["string","null"]},ordinal:{format:"int64",type:"integer"},payload_ref:{type:["string","null"]},provider:{type:"string"},role:{type:"string"},session_id:{type:"string"},storage_kind:{$ref:"#/$defs/LcmStorageKindV1"},store_id:{format:"int64",type:["integer","null"]},timestamp:{format:"int64",type:["integer","null"]}},required:["provider","message_id","session_id","role","ordinal","content","content_range","storage_kind"],type:"object"},LcmStorageKindV1:gy,LcmTemporalFieldsV1:gb,RetainedErrorV1:_G,RetainedOutcomeStatusV1:_B,RetrievalWorkerStatusV1:_Y,SessionCoverageIntervalV1:vh,SessionCoverageReasonV1:vy,SessionCoverageRequestV1:vg,SessionCoverageStateV1:v_,SessionSourceCoverageV1:vP,TemporalCoverageV1:v0,TemporalExplanationV1:v2,TemporalModeV1:v6,TemporalOmissionV1:v3,TemporalWatermarksV1:v9,UtcMicros:bs,ValidCoverageIntervalV1:bd},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{capped_sessions:{additionalProperties:{format:"uint",minimum:0,type:"integer"},type:["object","null"]},content_limit:{format:"uint",minimum:0,type:["integer","null"]},content_limit_clamped_from:{format:"uint",minimum:0,type:["integer","null"]},error:{anyOf:[{$ref:"#/$defs/RetainedErrorV1"},{type:"null"}]},messages:{items:{$ref:"#/$defs/LcmMessageV1"},type:"array"},omitted:{format:"uint64",minimum:0,type:["integer","null"]},provider:{type:["string","null"]},service_status:{anyOf:[{$ref:"#/$defs/RetrievalWorkerStatusV1"},{type:"null"}]},session_id:{type:["string","null"]},status:{$ref:"#/$defs/RetainedOutcomeStatusV1"},temporal:{anyOf:[{$ref:"#/$defs/LcmTemporalFieldsV1"},{type:"null"}]}},required:["status","messages"],title:"LcmLoadSessionResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{deep:{type:["boolean","null"]},provider:{type:["string","null"]},session_id:{type:["string","null"]}},title:"LcmStatusRequestV1",type:"object"},{$defs:{LcmAuthorityOutcomeV1:gs,LcmConfigStatusV1:{additionalProperties:!1,properties:{compression_boundary_cooldown_seconds:{format:"int64",type:"integer"},fresh_tail_count:{format:"uint",minimum:0,type:"integer"},summary_fan_in:{format:"uint",minimum:0,type:"integer"}},required:["fresh_tail_count","summary_fan_in","compression_boundary_cooldown_seconds"],type:"object"},LcmConvergenceStateV1:gc,LcmConvergenceV1:gl,LcmDagDepthStatusV1:{additionalProperties:!1,properties:{count:{format:"int64",type:"integer"},source_tokens:{format:"int64",type:"integer"},tokens:{format:"int64",type:"integer"}},required:["count","tokens","source_tokens"],type:"object"},LcmDagStatusV1:{additionalProperties:!1,properties:{compression_ratio:{type:"string"},depths:{additionalProperties:{$ref:"#/$defs/LcmDagDepthStatusV1"},type:"object"},total_nodes:{format:"int64",type:"integer"},total_source_tokens:{format:"int64",type:"integer"},total_tokens:{format:"int64",type:"integer"}},required:["total_nodes","total_tokens","total_source_tokens","compression_ratio","depths"],type:"object"},LcmDoctorProjectionStateV1:gp,LcmDoctorProjectionV1:gu,LcmLifecycleStatusV1:{additionalProperties:!1,properties:{current_frontier_store_id:{format:"int64",type:["integer","null"]},current_session_id:{type:["string","null"]},frontier_count:{format:"int64",type:"integer"},last_finalized_frontier_store_id:{format:"int64",type:["integer","null"]},last_finalized_session_id:{type:["string","null"]},lifecycle_state_count:{format:"int64",type:"integer"},maintenance_debt_count:{format:"int64",type:"integer"}},required:["lifecycle_state_count","frontier_count","maintenance_debt_count"],type:"object"},LcmPayloadCoverageStateV1:{enum:["complete","partial"],type:"string"},LcmPayloadCoverageV1:{additionalProperties:!1,properties:{reason:{type:["string","null"]},scanned_files:{format:"int64",type:"integer"},scanned_metadata_refs:{format:"int64",type:"integer"},state:{$ref:"#/$defs/LcmPayloadCoverageStateV1"}},required:["state","scanned_metadata_refs","scanned_files"],type:"object"},LcmPayloadGcStatusV1:{additionalProperties:!1,properties:{grace_seconds:{format:"int64",type:"integer"},last_gc_at:{format:"int64",type:["integer","null"]},last_gc_duration_ms:{format:"uint64",minimum:0,type:["integer","null"]},last_gc_error:{type:["string","null"]},last_gc_status:{type:["string","null"]},last_reaped_bytes:{format:"uint64",minimum:0,type:["integer","null"]},last_reaped_refs:{format:"int64",type:["integer","null"]},next_run_eligible_at:{format:"int64",type:["integer","null"]},reap_missing_metadata_after_seconds:{format:"int64",type:"integer"}},required:["grace_seconds","reap_missing_metadata_after_seconds"],type:"object"},LcmPayloadStatusV1:{additionalProperties:!1,properties:{coverage:{$ref:"#/$defs/LcmPayloadCoverageV1"},externalized_count:{format:"int64",type:"integer"},gc_candidate_count:{format:"int64",type:"integer"},integrity_mismatch_count:{format:"int64",type:["integer","null"]},missing_count:{format:"int64",type:"integer"},missing_placeholder_file_count:{format:"int64",type:"integer"},missing_placeholder_metadata_count:{format:"int64",type:"integer"},orphan_file_bytes:{format:"uint64",minimum:0,type:"integer"},orphan_file_count:{format:"int64",type:"integer"},placeholder_ref_count:{format:"int64",type:"integer"},reclaimable_bytes:{format:"uint64",minimum:0,type:"integer"},reclaimable_bytes_after_grace:{format:"uint64",minimum:0,type:"integer"},referenced_bytes:{format:"uint64",minimum:0,type:"integer"},referenced_count:{format:"int64",type:"integer"},root_contained:{type:"boolean"},tombstoned_count:{format:"int64",type:"integer"},total_bytes:{format:"uint64",minimum:0,type:"integer"},unreferenced_count:{format:"int64",type:"integer"}},required:["coverage","externalized_count","missing_count","unreferenced_count","placeholder_ref_count","missing_placeholder_metadata_count","missing_placeholder_file_count","gc_candidate_count","root_contained","orphan_file_count","tombstoned_count","referenced_count","total_bytes","referenced_bytes","orphan_file_bytes","reclaimable_bytes","reclaimable_bytes_after_grace"],type:"object"},LcmRedactionStatusV1:{additionalProperties:!1,properties:{enabled:{type:"boolean"},lossy_records:{format:"int64",type:"integer"}},required:["enabled","lossy_records"],type:"object"},LcmStatusV1:{additionalProperties:!1,properties:{config:{$ref:"#/$defs/LcmConfigStatusV1"},dag:{$ref:"#/$defs/LcmDagStatusV1"},external_payload_count:{format:"int64",type:"integer"},lifecycle:{$ref:"#/$defs/LcmLifecycleStatusV1"},maintenance_debt_count:{format:"int64",type:"integer"},missing_payload_count:{format:"int64",type:"integer"},payload:{$ref:"#/$defs/LcmPayloadStatusV1"},payload_gc:{$ref:"#/$defs/LcmPayloadGcStatusV1"},raw_message_count:{format:"int64",type:"integer"},redaction:{$ref:"#/$defs/LcmRedactionStatusV1"},schema_version:{format:"int64",type:"integer"},store:{$ref:"#/$defs/LcmStoreStatusV1"},summary_convergence:{$ref:"#/$defs/LcmSummaryConvergenceStatusV1"},summary_node_count:{format:"int64",type:"integer"},unreferenced_payload_count:{format:"int64",type:"integer"}},required:["schema_version","raw_message_count","summary_node_count","external_payload_count","missing_payload_count","unreferenced_payload_count","maintenance_debt_count","store","dag","config","payload","payload_gc","lifecycle","summary_convergence","redaction"],type:"object"},LcmStoreStatusV1:{additionalProperties:!1,properties:{estimated_tokens:{format:"int64",type:"integer"},messages:{format:"int64",type:"integer"},token_estimate:{$ref:"#/$defs/LcmStoreTokenCoverageV1"}},required:["messages","estimated_tokens","token_estimate"],type:"object"},LcmStoreTokenCoverageV1:{additionalProperties:!1,properties:{complete:{type:"boolean"},next_after_store_id:{format:"int64",type:["integer","null"]},scanned_messages:{format:"int64",type:"integer"}},required:["complete","scanned_messages"],type:"object"},LcmSummaryConvergenceReasonV1:{additionalProperties:!1,properties:{reason:{type:"string"},session_count:{format:"int64",type:"integer"},state:{$ref:"#/$defs/LcmSummaryConvergenceStateV1"}},required:["state","reason","session_count"],type:"object"},LcmSummaryConvergenceStateV1:{enum:["pending","retryable","current","unavailable","permanent"],type:"string"},LcmSummaryConvergenceStatusV1:{additionalProperties:!1,description:"Retained-session summary convergence queue: disjoint per-state session\ncounts and the reasons parked or failed sessions record.",properties:{current_session_count:{format:"int64",type:"integer"},pending_session_count:{format:"int64",type:"integer"},permanent_session_count:{format:"int64",type:"integer"},reasons:{items:{$ref:"#/$defs/LcmSummaryConvergenceReasonV1"},type:"array"},retryable_session_count:{format:"int64",type:"integer"},unavailable_session_count:{format:"int64",type:"integer"}},required:["pending_session_count","retryable_session_count","current_session_count","unavailable_session_count","permanent_session_count","reasons"],type:"object"},RetainedOutcomeStatusV1:_B,RetrievalWorkerStatusV1:_Y},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{authority_outcome:{anyOf:[{$ref:"#/$defs/LcmAuthorityOutcomeV1"},{type:"null"}]},deep:{type:["boolean","null"]},lcm:{anyOf:[{$ref:"#/$defs/LcmStatusV1"},{type:"null"}]},message:{type:["string","null"]},projection:{anyOf:[{$ref:"#/$defs/LcmDoctorProjectionV1"},{type:"null"}],description:"The store's refresh-worker serving and convergence state. Absent when\nno refresh worker serves the store."},provider:{type:["string","null"]},reason:{type:["string","null"]},session_id:{type:["string","null"]},status:{$ref:"#/$defs/RetainedOutcomeStatusV1"}},required:["status"],title:"LcmStatusResultV1",type:"object"},{$defs:{MemoryScopeV1:gT,ProjectId:_m},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{memory_scope:{anyOf:[{$ref:"#/$defs/MemoryScopeV1"},{type:"null"}]},project_selector:{additionalProperties:!1,description:'Exact registered-project selector. Reads and fact effects run against the\nselected project.\n\nInlined so every request schema advertises the closed selector contract\n(`required: ["project_id"]`, no additional properties) directly on its\n`project_selector` property instead of behind a `$defs` reference, matching\nthe selector shape the MCP dispatch policy promises for selector-accepting\ntools.',properties:{project_id:{$ref:"#/$defs/ProjectId"}},required:["project_id"],type:["object","null"]}},title:"MemoryStatusRequestV1",type:"object"},{$defs:{FactCommitOwnerV1:h8,MemoryAlgebraV1:{additionalProperties:!1,properties:{estimated_capacity:{description:"Heuristic D / ln(D) count of bound items one vector can superpose\nbefore cosine similarity degrades. Each fact has its own vector, so\nthis is neither a limit on stored facts nor a recall guarantee.",format:"uint64",minimum:0,type:"integer"},hrr_dim:{description:"Width of each encoded vector.",format:"uint64",minimum:0,type:"integer"},name:{description:"Vector algebra the fact encodings use. Current daemons report `map_c`;\nearlier releases reported `amari_fhrr` for the same encoding.",type:"string"}},required:["name","hrr_dim","estimated_capacity"],type:"object"},MemoryFeedbackFunnelV1:{additionalProperties:!1,properties:{access_count_total:{format:"uint64",minimum:0,type:"integer"},feedback_total:{format:"uint64",minimum:0,type:"integer"},rated_fact_count:{format:"uint64",minimum:0,type:"integer"},retrieval_count_total:{format:"uint64",minimum:0,type:"integer"},retrieved_fact_count:{format:"uint64",minimum:0,type:"integer"},seen_to_feedback_ratio:{format:"uint64",minimum:0,type:["integer","null"]}},required:["retrieval_count_total","access_count_total","retrieved_fact_count","rated_fact_count","feedback_total"],type:"object"},MemoryStatusV1:{additionalProperties:!1,properties:{algebra:{$ref:"#/$defs/MemoryAlgebraV1"},below_default_recall_threshold_count:{format:"uint64",minimum:0,type:"integer"},entity_count:{format:"uint64",minimum:0,type:"integer"},fact_count:{format:"uint64",minimum:0,type:"integer"},feedback_funnel:{$ref:"#/$defs/MemoryFeedbackFunnelV1"},helpful_count:{format:"uint64",minimum:0,type:"integer"},owner:{$ref:"#/$defs/FactCommitOwnerV1"},trust_025_050_count:{format:"uint64",minimum:0,type:"integer"},trust_050_075_count:{format:"uint64",minimum:0,type:"integer"},trust_075_100_count:{format:"uint64",minimum:0,type:"integer"},trust_0_025_count:{format:"uint64",minimum:0,type:"integer"},unhelpful_count:{format:"uint64",minimum:0,type:"integer"}},required:["owner","fact_count","entity_count","algebra","trust_0_025_count","trust_025_050_count","trust_050_075_count","trust_075_100_count","below_default_recall_threshold_count","helpful_count","unhelpful_count","feedback_funnel"],type:"object"},ProjectId:_m},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{memory:{$ref:"#/$defs/MemoryStatusV1"}},required:["memory"],title:"MemoryStatusResultV1",type:"object"},{$defs:{MessageRelationshipScopeV1:gO,MessageTypeFilterV1:gE,ProjectId:_m,RetainedTimeFilterV1:_K},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Exact public input accepted by `tracedecay_message_search`.",properties:{branch:{type:["string","null"]},commit:{type:["string","null"]},cursor:{type:["string","null"]},goals:{default:!1,type:"boolean"},include_subagents:{type:["boolean","null"]},limit:{format:"uint64",minimum:0,type:["integer","null"]},message_type:{anyOf:[{$ref:"#/$defs/MessageTypeFilterV1"},{type:"null"}]},parent_session_id:{type:["string","null"]},project_key:{type:["string","null"]},project_selector:{additionalProperties:!1,description:'Exact registered-project selector. Reads and fact effects run against the\nselected project.\n\nInlined so every request schema advertises the closed selector contract\n(`required: ["project_id"]`, no additional properties) directly on its\n`project_selector` property instead of behind a `$defs` reference, matching\nthe selector shape the MCP dispatch policy promises for selector-accepting\ntools.',properties:{project_id:{$ref:"#/$defs/ProjectId"}},required:["project_id"],type:["object","null"]},provider:{type:["string","null"]},query:{type:["string","null"]},require_fresh:{description:"Freshness precondition: stale or partial coverage returns\n`refresh_required` instead of stored evidence. The read never refreshes.",type:["boolean","null"]},scope:{anyOf:[{$ref:"#/$defs/MessageRelationshipScopeV1"},{type:"null"}]},since:{anyOf:[{$ref:"#/$defs/RetainedTimeFilterV1"},{type:"null"}]},until:{anyOf:[{$ref:"#/$defs/RetainedTimeFilterV1"},{type:"null"}]},workflow_agent:{type:["string","null"]},workflow_run:{type:["string","null"]},worktree:{type:["string","null"]}},title:"MessageSearchRequestV1",type:"object"},{$defs:{ClosedUtcIntervalV1:fW,GitScopeV1:y2,HydrationStateResultV1:gi,MessageSearchHitV1:{additionalProperties:!1,properties:{message:{$ref:"#/$defs/SessionMessageV1"},project_id:{type:["string","null"]},root:{type:["string","null"]},score:{format:"double",type:"number"},session:{$ref:"#/$defs/SessionRecordV1"}},required:["session","message","score"],type:"object"},RetainedErrorV1:_G,RetainedNextActionV1:{additionalProperties:!1,properties:{action:{type:"string"},kind:{type:"string"},reason:{type:"string"},tool:{type:"string"}},required:["kind","tool","action","reason"],type:"object"},RetainedOutcomeStatusV1:_B,RetrievalWorkerStatusV1:_Y,SessionCoverageIntervalV1:vh,SessionCoverageReasonV1:vy,SessionCoverageRequestV1:vg,SessionCoverageStateV1:v_,SessionMessageV1:{additionalProperties:!1,properties:{kind:{type:["string","null"]},message_id:{type:"string"},metadata_json:{type:["string","null"]},model:{type:["string","null"]},ordinal:{format:"int64",type:"integer"},provider:{type:"string"},role:{type:"string"},session_id:{type:"string"},source_offset:{format:"int64",type:["integer","null"]},source_path:{type:["string","null"]},text:{type:"string"},timestamp:{format:"int64",type:["integer","null"]},tool_names:{type:["string","null"]}},required:["provider","message_id","session_id","role","ordinal","text"],type:"object"},SessionRecordV1:{additionalProperties:!1,properties:{agent_id:{type:["string","null"]},ended_at:{format:"int64",type:["integer","null"]},is_subagent:{type:"boolean"},metadata_json:{type:["string","null"]},parent_session_id:{type:["string","null"]},parent_tool_use_id:{type:["string","null"]},project_key:{type:"string"},project_path:{type:"string"},provider:{type:"string"},session_id:{type:"string"},started_at:{format:"int64",type:["integer","null"]},title:{type:["string","null"]},transcript_path:{type:["string","null"]}},required:["provider","session_id","project_key","project_path","is_subagent"],type:"object"},SessionSourceCoverageV1:vP,TemporalCoverageOmissionV1:{oneOf:[{properties:{detail:{type:"string"},kind:{const:"root_continuation_unavailable",type:"string"},strict_population:{$ref:"#/$defs/TemporalPopulationCountV1"}},required:["kind","strict_population","detail"],type:"object"}]},TemporalCoverageV1:v0,TemporalExplanationV1:v2,TemporalFreshnessV1:v4,TemporalMetadataV1:{additionalProperties:!1,properties:{anchors:{items:{type:"string"},type:"array"},coverage:{$ref:"#/$defs/TemporalCoverageV1"},coverage_omissions:{items:{$ref:"#/$defs/TemporalCoverageOmissionV1"},type:"array"},explanations:{items:{$ref:"#/$defs/TemporalExplanationV1"},type:"array"},freshness:{anyOf:[{$ref:"#/$defs/TemporalFreshnessV1"},{type:"null"}]},next_cursor:{type:["string","null"]},omissions:{items:{$ref:"#/$defs/TemporalOmissionV1"},type:"array"},source_coverage:{items:{$ref:"#/$defs/SessionSourceCoverageV1"},type:"array"},watermarks:{$ref:"#/$defs/TemporalWatermarksV1"}},required:["anchors","watermarks","coverage","explanations"],type:"object"},TemporalModeV1:v6,TemporalOmissionV1:v3,TemporalPopulationCountV1:{oneOf:[{properties:{count:{format:"uint64",minimum:0,type:"integer"},kind:{const:"exact",type:"string"}},required:["kind","count"],type:"object"},{properties:{count:{format:"uint64",minimum:0,type:"integer"},kind:{const:"at_least",type:"string"}},required:["kind","count"],type:"object"}]},TemporalWatermarksV1:v9,UtcMicros:bs,ValidCoverageIntervalV1:bd},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{count:{format:"uint",minimum:0,type:["integer","null"]},error:{anyOf:[{$ref:"#/$defs/RetainedErrorV1"},{type:"null"}]},git_filter:{anyOf:[{$ref:"#/$defs/GitScopeV1"},{type:"null"}]},git_filter_applied:{type:["boolean","null"]},goals:{type:"boolean"},include_subagents:{type:"boolean"},message:{type:["string","null"]},message_type:{type:"string"},next_action:{anyOf:[{$ref:"#/$defs/RetainedNextActionV1"},{type:"null"}]},omitted:{format:"uint64",minimum:0,type:["integer","null"]},outcome:{$ref:"#/$defs/RetainedOutcomeStatusV1"},parent_session_id:{type:["string","null"]},project_key:{type:["string","null"]},provider:{type:"string"},query:{type:["string","null"]},refresh_required:{type:"boolean"},requested_provider:{type:["string","null"]},require_fresh:{type:"boolean"},results:{items:{$ref:"#/$defs/MessageSearchHitV1"},type:["array","null"]},scope:{type:"string"},service_status:{anyOf:[{$ref:"#/$defs/RetrievalWorkerStatusV1"},{type:"null"}]},since:{format:"int64",type:["integer","null"]},status:{$ref:"#/$defs/RetainedOutcomeStatusV1"},store_scope:{type:["string","null"]},temporal:{anyOf:[{$ref:"#/$defs/TemporalMetadataV1"},{type:"null"}]},until:{format:"int64",type:["integer","null"]},workflow_agent:{type:["string","null"]},workflow_filter_applied:{type:["boolean","null"]},workflow_run:{type:["string","null"]},workflow_run_parent_session:{type:["string","null"]}},required:["require_fresh","goals","include_subagents","message_type","outcome","provider","refresh_required","scope","status"],title:"MessageSearchResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{path:{type:"string"}},required:["path"],title:"ModuleApiPrimitiveRequest",type:"object"},{$defs:{SymbolPrimitiveRecord:vZ},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{path:{type:"string"},symbols:{items:{$ref:"#/$defs/SymbolPrimitiveRecord"},type:"array"}},required:["path","symbols"],title:"ModuleApiPrimitiveResult",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Exact public input accepted by `tracedecay_move_symbol`.",properties:{dest_file:{type:"string"},dry_run:{default:!0,type:"boolean"},expected_state:{description:"Exact `preview_digest`/`expected_state` returned by the dry run. Apply\nre-resolves the typed plan and rejects any candidate-state drift.",type:["string","null"]},idempotency_key:{type:["string","null"]},symbol:{type:"string"}},required:["symbol","dest_file"],title:"MoveSymbolSurfaceRequestV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Exact public input accepted by `tracedecay_multi_str_replace`.",properties:{dry_run:{default:!1,type:"boolean"},expected_state:{description:"Exact `preview_digest`/`expected_state` returned by the dry run. Apply\nre-resolves the typed plan and rejects any candidate-state drift.",type:["string","null"]},idempotency_key:{type:["string","null"]},path:{type:"string"},replacements:{description:"Ordered `[old, new]` pairs, matching the existing MCP tool wire form.",items:{maxItems:2,minItems:2,prefixItems:[{type:"string"},{type:"string"}],type:"array"},type:"array"},verify:{default:!1,type:"boolean"}},required:["path","replacements"],title:"MultiStrReplaceSurfaceRequestV1",type:"object"},{$defs:{NativeIntegrationTransactionId:g1},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{transaction_id:{$ref:"#/$defs/NativeIntegrationTransactionId"}},required:["transaction_id"],title:"NativeIntegrationStatusSurfaceRequest",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{node_id:{type:"string"}},required:["node_id"],title:"NodeSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fF,CodeIndexConvergenceParkedV1:fL,CodeIndexStalenessStateV1:fB,ComplexityAnalysisV1:f1,NodeDetailsV1:{additionalProperties:!1,properties:{branches:{description:"Exact counters; `None`, and listed in `unavailable_fields`, when\n`complexity_analysis` reports the bounded walk did not cover the body.",format:"uint32",minimum:0,type:["integer","null"]},complexity_analysis:{$ref:"#/$defs/ComplexityAnalysisV1"},cost_to_expand:{$ref:"#/$defs/NodeExpansionCostV1"},cyclomatic_complexity:{format:"uint32",minimum:0,type:["integer","null"]},derives:{items:{type:"string"},type:"array"},docstring:{type:["string","null"]},end_line:{format:"uint32",minimum:0,type:"integer"},file:{type:"string"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},id:{type:"string"},is_async:{type:"boolean"},kind:{type:"string"},loops:{format:"uint32",minimum:0,type:["integer","null"]},max_nesting:{format:"uint32",minimum:0,type:["integer","null"]},name:{type:"string"},qualified_name:{type:"string"},signature:{type:["string","null"]},start_line:{format:"uint32",minimum:0,type:"integer"},unavailable_fields:{items:{type:"string"},type:"array"},visibility:{type:"string"}},required:["id","name","kind","qualified_name","file","start_line","end_line","is_async","derives","visibility","complexity_analysis","cost_to_expand","unavailable_fields"],type:"object"},NodeExpansionCostV1:g4,PrimitiveFreshnessStateV1:_i,PrimitiveIndexingStateV1:_o,PrimitiveNotFoundV1:_a,PrimitiveSearchFreshnessV1:_d,PrimitiveSymbolLocationV1:_l},$schema:"https://json-schema.org/draft/2020-12/schema",anyOf:[{$ref:"#/$defs/NodeDetailsV1"},{$ref:"#/$defs/PrimitiveNotFoundV1"}],title:"NodeResultV1"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"One project-scoped horizon for the canonical Observatory and Costs models.",properties:{window_days:{default:14,format:"uint16",maximum:365,minimum:1,type:"integer"}},title:"ObservatoryReadRequestV1",type:"object"},{$defs:{AnalyticsModeReadModelV1:mB,AnalyticsModeV1:mK,ComparisonDispositionV1:fY,CostsReadModelV1:hO,CoverageStateV1:hM,LatencyDistributionReadModelV1:ga,MetricCalibrationV1:gA,MetricCohortV1:gW,MetricCoverageV1:gM,MetricEvidenceClassV1:gN,MetricProvenanceV1:gz,MetricSourceV1:gD,MetricTemporalV1:gF,MetricUncertaintyV1:gL,MetricValueV1:gU,ObservabilityHorizonV1:g6,ObservatoryReadModelV1:g9,PerformanceComparisonReadModelV1:_r,ProviderLatencyReadModelV1:_V,RejectedArgumentAnalyticsV1:_E,RejectedArgumentErrorClassV1:_A,RejectedArgumentGroupV1:_W,RejectedArgumentNameV1:_M,RejectedArgumentSurfaceV1:_N},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Canonical project-scoped observability and costs read models.",properties:{costs:{$ref:"#/$defs/CostsReadModelV1"},observatory:{$ref:"#/$defs/ObservatoryReadModelV1"}},required:["observatory","costs"],title:"ObservatoryReadResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{kinds:{items:{type:"string"},type:["array","null"]},limit:{format:"uint32",minimum:0,type:["integer","null"]},source_dir:{type:"string"}},required:["source_dir"],title:"PortOrderSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fF,CodeIndexConvergenceParkedV1:fL,CodeIndexStalenessStateV1:fB,PortCycleAnchorV1:{additionalProperties:!1,properties:{file:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},name:{type:"string"},rationale:{type:["string","null"]}},required:["name","file","line"],type:"object"},PortCycleFileV1:{additionalProperties:!1,properties:{file:{type:"string"},members_in_cycle:{format:"uint",minimum:0,type:"integer"}},required:["file","members_in_cycle"],type:"object"},PortCycleSymbolV1:{additionalProperties:!1,properties:{file:{type:"string"},in_cycle_in_degree:{format:"uint",minimum:0,type:"integer"},in_cycle_out_degree:{format:"uint",minimum:0,type:"integer"},kind:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},name:{type:"string"}},required:["name","kind","file","line","in_cycle_out_degree","in_cycle_in_degree"],type:"object"},PortCycleV1:{additionalProperties:!1,properties:{break_point_candidate:{anyOf:[{$ref:"#/$defs/PortCycleAnchorV1"},{type:"null"}]},entry_point:{anyOf:[{$ref:"#/$defs/PortCycleAnchorV1"},{type:"null"}]},files:{items:{$ref:"#/$defs/PortCycleFileV1"},type:"array"},note:{type:"string"},size:{format:"uint",minimum:0,type:"integer"},symbols:{items:{$ref:"#/$defs/PortCycleSymbolV1"},type:"array"}},required:["size","files","symbols","note"],type:"object"},PortOrderLevelV1:{additionalProperties:!1,properties:{description:{type:"string"},level:{format:"uint",minimum:0,type:"integer"},symbols:{items:{$ref:"#/$defs/PortOrderSymbolV1"},type:"array"}},required:["level","description","symbols"],type:"object"},PortOrderSymbolV1:{additionalProperties:!1,properties:{depends_on:{items:{type:"string"},type:["array","null"]},file:{type:"string"},kind:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},name:{type:"string"}},required:["name","kind","file","line"],type:"object"},PrimitiveFreshnessStateV1:_i,PrimitiveIndexingStateV1:_o,PrimitiveSearchFreshnessV1:_d},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{cycles:{items:{$ref:"#/$defs/PortCycleV1"},type:"array"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},levels:{items:{$ref:"#/$defs/PortOrderLevelV1"},type:"array"},returned:{format:"uint",minimum:0,type:"integer"},source_dir:{type:"string"},total_symbols:{format:"uint",minimum:0,type:"integer"}},required:["source_dir","total_symbols","returned","levels","cycles"],title:"PortOrderResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{kinds:{items:{type:"string"},type:["array","null"]},source_dir:{type:"string"},target_dir:{type:"string"}},required:["source_dir","target_dir"],title:"PortStatusSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fF,CodeIndexConvergenceParkedV1:fL,CodeIndexStalenessStateV1:fB,PortMatchedSymbolV1:{additionalProperties:!1,properties:{name:{type:"string"},source_file:{type:"string"},source_kind:{type:"string"},target_file:{type:"string"},target_kind:{type:"string"}},required:["name","source_kind","target_kind","source_file","target_file"],type:"object"},PortTargetOnlySymbolV1:{additionalProperties:!1,properties:{file:{type:"string"},kind:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},name:{type:"string"}},required:["name","kind","file","line"],type:"object"},PortUnmatchedSymbolV1:{additionalProperties:!1,properties:{kind:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},name:{type:"string"}},required:["name","kind","line"],type:"object"},PrimitiveFreshnessStateV1:_i,PrimitiveIndexingStateV1:_o,PrimitiveSearchFreshnessV1:_d},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{coverage_percent:{format:"double",type:"number"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},matched:{format:"uint",minimum:0,type:"integer"},matched_symbols:{items:{$ref:"#/$defs/PortMatchedSymbolV1"},type:"array"},source_count:{format:"uint",minimum:0,type:"integer"},source_dir:{type:"string"},target_count:{format:"uint",minimum:0,type:"integer"},target_dir:{type:"string"},target_only:{format:"uint",minimum:0,type:"integer"},target_only_symbols:{items:{$ref:"#/$defs/PortTargetOnlySymbolV1"},type:"array"},unmatched:{format:"uint",minimum:0,type:"integer"},unmatched_by_file:{additionalProperties:{items:{$ref:"#/$defs/PortUnmatchedSymbolV1"},type:"array"},type:"object"}},required:["source_dir","target_dir","source_count","target_count","matched","unmatched","target_only","coverage_percent","unmatched_by_file","matched_symbols","target_only_symbols"],title:"PortStatusResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{base_ref:{description:"Base branch or ref to compare against (default: detected repository\ndefault branch). A short branch name selects the descendant of its\nlocal and origin tracking tips; use an explicit ref when they diverge.",type:["string","null"]},budget_tokens:{description:"Cap the symbol, test, and module sections at about this many tokens.",format:"uint32",minimum:0,type:["integer","null"]},cursor:{description:"Authenticated continuation cursor returned by a previous page.",type:["string","null"]},head_ref:{description:"Head branch or ref (default: 'HEAD'). Accepts local branches,\nremote-tracking refs such as origin/topic, full refs, and Git revision\nexpressions.",type:["string","null"]},maximum_symbols:{description:"Maximum symbols returned on this page (default: 200, clamped to 1-500).",format:"uint32",minimum:0,type:["integer","null"]}},title:"PrContextSurfaceRequestV1",type:"object"},{$defs:{CoChangeUnavailableV1:fM,CodeIndexBuildBlockedReasonV1:fF,CodeIndexConvergenceParkedV1:fL,CodeIndexStalenessStateV1:fB,ConfigSummaryKindV1:f4,ConfigSummaryV1:f6,GitCommitSubjectV1:{additionalProperties:!1,properties:{hash:{type:"string"},subject:{type:"string"}},required:["hash","subject"],type:"object"},GitComparedSymbolV1:yN,GitContextSymbolV1:yz,GitFileChangeStatusV1:{enum:["added","deleted","modified"],type:"string"},GitFileChangeV1:{additionalProperties:!1,properties:{path:{type:"string"},status:{$ref:"#/$defs/GitFileChangeStatusV1"}},required:["path","status"],type:"object"},GitReadCompleteV1:yX,GitReadPartialV1:yY,GitReadUnavailableV1:y1,GitToolErrorKindV1:y6,GitToolErrorV1:y3,GitToolFailureV1:y9,GitToolOperationV1:y5,MissingCoChangePartnerV1:gH,PrAnalysisCoverageV1:{additionalProperties:!1,properties:{complete:{type:"boolean"},direct_call_edges_admitted:{format:"uint",minimum:0,type:"integer"},impact_bytes_admitted:{format:"uint",minimum:0,type:"integer"},impact_nodes_admitted:{format:"uint",minimum:0,type:"integer"},impact_nodes_returned:{format:"uint",minimum:0,type:"integer"},impact_partial:{type:"boolean"},seed_symbols_analyzed:{format:"uint",minimum:0,type:"integer"},symbols_complete:{type:"boolean"},symbols_returned:{format:"uint",minimum:0,type:"integer"}},required:["seed_symbols_analyzed","symbols_returned","symbols_complete","impact_nodes_admitted","impact_nodes_returned","direct_call_edges_admitted","impact_bytes_admitted","impact_partial","complete"],type:"object"},PrContextCompleteV1:{additionalProperties:!1,properties:{added:{items:{$ref:"#/$defs/PrSymbolEntryV1"},type:"array"},affected_tests:{items:{type:"string"},type:"array"},affected_tests_coverage:{$ref:"#/$defs/PrSelectionCoverageV1"},analysis_coverage:{$ref:"#/$defs/PrAnalysisCoverageV1"},base:{type:"string"},base_oid:{type:"string"},changes:{items:{$ref:"#/$defs/GitFileChangeV1"},type:"array"},co_change_unavailable:{anyOf:[{$ref:"#/$defs/CoChangeUnavailableV1"},{type:"null"}],description:"Present when Git history could not be mined for co-change partners."},commits:{items:{$ref:"#/$defs/GitCommitSubjectV1"},type:"array"},files_changed:{format:"uint",minimum:0,type:"integer"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},graph_generation:{type:"string"},head:{type:"string"},head_oid:{type:"string"},impacted_modules:{items:{type:"string"},type:"array"},impacted_modules_coverage:{$ref:"#/$defs/PrSelectionCoverageV1"},merge_base:{type:"string"},missing_co_change_partners:{description:"Files that usually change with a changed file, per bounded Git\nhistory, but are absent from this change set.",items:{$ref:"#/$defs/MissingCoChangePartnerV1"},type:"array"},modified:{items:{$ref:"#/$defs/PrSymbolEntryV1"},type:"array"},next_cursor:{type:["string","null"]},removed:{items:{$ref:"#/$defs/GitComparedSymbolV1"},type:"array"},status:{$ref:"#/$defs/GitReadCompleteV1"},symbol_changes_coverage:{$ref:"#/$defs/PrSymbolChangesCompleteV1"},symbol_page:{$ref:"#/$defs/PrSymbolPageV1"},symbols_added:{format:"uint",minimum:0,type:"integer"},symbols_modified:{format:"uint",minimum:0,type:"integer"},symbols_removed:{format:"uint",minimum:0,type:"integer"},test_files_changed:{items:{type:"string"},type:"array"},token_budget:{anyOf:[{$ref:"#/$defs/TokenBudgetCutV1"},{type:"null"}],description:"Budget accounting when the request supplies `budget_tokens`."}},required:["status","base","head","base_oid","head_oid","merge_base","graph_generation","commits","files_changed","changes","missing_co_change_partners","symbols_added","symbols_removed","symbols_modified","added","removed","modified","symbol_changes_coverage","symbol_page","analysis_coverage","test_files_changed","affected_tests","affected_tests_coverage","impacted_modules","impacted_modules_coverage"],type:"object"},PrContextGraphPendingV1:{additionalProperties:!1,description:"The git comparison while the verified graph generation is still warming.",properties:{added:{items:{$ref:"#/$defs/PrSymbolEntryV1"},type:"array"},affected_tests:{items:{type:"string"},type:"array"},affected_tests_coverage:{$ref:"#/$defs/PrSelectionCoverageV1"},analysis_coverage:{$ref:"#/$defs/PrAnalysisCoverageV1"},base:{type:"string"},base_oid:{type:"string"},changes:{items:{$ref:"#/$defs/GitFileChangeV1"},type:"array"},co_change_unavailable:{anyOf:[{$ref:"#/$defs/CoChangeUnavailableV1"},{type:"null"}],description:"Present when Git history could not be mined for co-change partners."},commits:{items:{$ref:"#/$defs/GitCommitSubjectV1"},type:"array"},files_changed:{format:"uint",minimum:0,type:"integer"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},graph_generation:{description:"No verified generation was admitted.",type:["string","null"]},head:{type:"string"},head_oid:{type:"string"},impacted_modules:{items:{type:"string"},type:"array"},impacted_modules_coverage:{$ref:"#/$defs/PrSelectionCoverageV1"},merge_base:{type:"string"},message:{type:"string"},missing_co_change_partners:{description:"Files that usually change with a changed file, per bounded Git\nhistory, but are absent from this change set.",items:{$ref:"#/$defs/MissingCoChangePartnerV1"},type:"array"},modified:{items:{$ref:"#/$defs/PrSymbolEntryV1"},type:"array"},next_cursor:{type:["string","null"]},status:{$ref:"#/$defs/GitReadPartialV1"},symbol_page:{$ref:"#/$defs/PrSymbolPageV1"},symbols_added:{format:"uint",minimum:0,type:"integer"},symbols_modified:{format:"uint",minimum:0,type:"integer"},test_files_changed:{items:{type:"string"},type:"array"},token_budget:{anyOf:[{$ref:"#/$defs/TokenBudgetCutV1"},{type:"null"}],description:"Budget accounting when the request supplies `budget_tokens`."},verified_graph_evidence:{$ref:"#/$defs/PrimitiveUnavailableEvidenceV1"}},required:["status","message","base","head","base_oid","head_oid","merge_base","commits","files_changed","changes","missing_co_change_partners","symbols_added","symbols_modified","added","modified","symbol_page","analysis_coverage","test_files_changed","affected_tests","affected_tests_coverage","impacted_modules","impacted_modules_coverage","verified_graph_evidence"],type:"object"},PrContextSymbolsUnavailableV1:{additionalProperties:!1,description:"The git comparison while exact base/head symbol comparison is unavailable\nor does not describe the verified graph's head generation.",properties:{added:{items:{$ref:"#/$defs/PrSymbolEntryV1"},type:"array"},base:{type:"string"},base_oid:{type:"string"},changes:{items:{$ref:"#/$defs/GitFileChangeV1"},type:"array"},co_change_unavailable:{anyOf:[{$ref:"#/$defs/CoChangeUnavailableV1"},{type:"null"}],description:"Present when Git history could not be mined for co-change partners."},commits:{items:{$ref:"#/$defs/GitCommitSubjectV1"},type:"array"},files_changed:{format:"uint",minimum:0,type:"integer"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},graph_generation:{type:"string"},head:{type:"string"},head_oid:{type:"string"},merge_base:{type:"string"},message:{type:"string"},missing_co_change_partners:{description:"Files that usually change with a changed file, per bounded Git\nhistory, but are absent from this change set.",items:{$ref:"#/$defs/MissingCoChangePartnerV1"},type:"array"},modified:{items:{$ref:"#/$defs/PrSymbolEntryV1"},type:"array"},next_cursor:{type:["string","null"]},removed:{items:{$ref:"#/$defs/GitComparedSymbolV1"},type:"array"},status:{$ref:"#/$defs/GitReadPartialV1"},symbol_changes_coverage:{$ref:"#/$defs/SymbolChangesUnavailableV1"},symbols_added:{format:"uint",minimum:0,type:"integer"},symbols_modified:{format:"uint",minimum:0,type:"integer"},symbols_removed:{format:"uint",minimum:0,type:"integer"},token_budget:{anyOf:[{$ref:"#/$defs/TokenBudgetCutV1"},{type:"null"}],description:"Budget accounting when the request supplies `budget_tokens`."}},required:["status","message","base","head","base_oid","head_oid","merge_base","graph_generation","commits","files_changed","changes","missing_co_change_partners","symbols_added","symbols_removed","symbols_modified","added","removed","modified","symbol_changes_coverage"],type:"object"},PrCoverageSelectionV1:{enum:["unavailable","deterministic_bounded_prefix"],type:"string"},PrSelectionCoverageV1:{additionalProperties:!1,properties:{complete:{type:"boolean"},selection:{$ref:"#/$defs/PrCoverageSelectionV1"}},required:["complete","selection"],type:"object"},PrSymbolChangesCompleteV1:{additionalProperties:!1,properties:{base_generation:{type:"string"},head_generation:{type:"string"},status:{$ref:"#/$defs/GitReadCompleteV1"}},required:["status","base_generation","head_generation"],type:"object"},PrSymbolEntryV1:{anyOf:[{$ref:"#/$defs/GitContextSymbolV1"},{$ref:"#/$defs/ConfigSummaryV1"}]},PrSymbolPageV1:{additionalProperties:!1,properties:{complete:{type:"boolean"},continuation_available:{type:"boolean"},has_more:{type:"boolean"},limit:{format:"uint",minimum:0,type:"integer"},returned:{format:"uint",minimum:0,type:"integer"},selection:{$ref:"#/$defs/PrSymbolSelectionV1"}},required:["limit","returned","has_more","complete","selection","continuation_available"],type:"object"},PrSymbolSelectionV1:{enum:["unavailable","stable_prefix"],type:"string"},PrimitiveFreshnessStateV1:_i,PrimitiveIndexingStateV1:_o,PrimitiveSearchFreshnessV1:_d,PrimitiveUnavailableEvidenceV1:_p,PrimitiveUnavailableStatusV1:_u,SymbolChangesUnavailableV1:vB,TokenBudgetCutV1:v8,TokenBudgetSectionV1:v7},$schema:"https://json-schema.org/draft/2020-12/schema",anyOf:[{$ref:"#/$defs/PrContextCompleteV1"},{$ref:"#/$defs/PrContextSymbolsUnavailableV1"},{$ref:"#/$defs/PrContextGraphPendingV1"},{$ref:"#/$defs/GitToolFailureV1"}],title:"PrContextResultV1"},{$defs:{BranchStackEdgeV1:fv,BranchStackId:fb,BranchStackNodeV1:f$,BranchStackRevisionId:fS,BranchStackRevisionV1:fk,BranchStackSourceV1:fw,CommitId:fX,ManifestDigest:gj,MechanicalIntegrationModeV1:gC,NativeIntegrationDirectionV1:gK,NativeIntegrationSealedStackSnapshotV1:gQ,NativeIntegrationSelectionBindingV1:gX,ProjectId:_m,RefId:_T,RepositoryId:_z,ResolvedScope:_U,ScopeSetId:vc,ScopeSetRevision:vl,StackNodeId:vH,WorktreeId:So,WorktreeInventoryEpoch:Sn,WorktreeInventorySnapshotId:Sa},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Read-only preflight over one frozen snapshot identity.\n\n`preferred_mode` selects only one of the three fixed mechanical encodings.\nIt cannot change topology, commit order, or the commit set.",properties:{preferred_mode:{anyOf:[{$ref:"#/$defs/MechanicalIntegrationModeV1"},{type:"null"}],default:null},snapshot:{$ref:"#/$defs/NativeIntegrationSealedStackSnapshotV1"}},required:["snapshot"],title:"NativeIntegrationPreflightSurfaceRequest",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{path:{description:"Project path or registered alias to resolve.",type:["string","null"]},project_selector:{additionalProperties:!1,default:null,description:"Registered project id to inspect. Omit to use path or the active\nproject.",properties:{project_id:{description:"Registered project id to query.",type:"string"}},required:["project_id"],type:"object"}},title:"ProjectContextSurfaceRequestV1",type:"object"},{$defs:{PublicCodeProject:_P},$schema:"https://json-schema.org/draft/2020-12/schema",description:"One registered project's context, or the registry's typed miss.",oneOf:[{additionalProperties:!1,properties:{aliases:{description:"Alias rows exactly as the registry serializes them.",items:!0,type:"array"},is_active:{type:"boolean"},project:{$ref:"#/$defs/PublicCodeProject"},registry_path:{type:"string"},status:{const:"ok",type:"string"},stores:{description:"Store rows exactly as the registry serializes them.",items:!0,type:"array"}},required:["status","is_active","registry_path","project","aliases","stores"],type:"object"},{additionalProperties:!1,description:"The registry answered and no registered project matches the selector.",properties:{aliases:{items:!0,type:"array"},project:{type:"null"},registry_path:{type:"string"},status:{const:"not_found",type:"string"},stores:{items:!0,type:"array"}},required:["status","registry_path","project","aliases","stores"],type:"object"}],title:"ProjectContextResultV1"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{limit:{description:"Maximum projects to return (default: 25, max: 100).",format:"uint",minimum:0,type:["integer","null"]}},title:"ProjectListSurfaceRequestV1",type:"object"},{$defs:{ProjectRegistryEntry:_f,ProjectRegistrySummary:_h,ProjectRepoGroup:_y,PublicCodeProject:_P},$schema:"https://json-schema.org/draft/2020-12/schema",description:"A bounded page of the profile's registered projects.",oneOf:[{additionalProperties:!1,properties:{limit:{format:"uint",minimum:0,type:"integer"},project_tree:{items:{$ref:"#/$defs/ProjectRepoGroup"},type:"array"},projects:{items:{$ref:"#/$defs/PublicCodeProject"},type:"array"},query:{type:["string","null"]},registry_path:{type:"string"},status:{const:"ok",type:"string"},summary:{$ref:"#/$defs/ProjectRegistrySummary"},title:{type:"string"},truncated:{type:"boolean"}},required:["status","title","registry_path","limit","truncated","summary","project_tree","projects"],type:"object"}],title:"ProjectRegistryListingResultV1"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{limit:{description:"Maximum projects to return (default: 10, max: 50).",format:"uint",minimum:0,type:["integer","null"]},query:{description:"Case-insensitive substring query over registry project metadata.",type:"string"}},required:["query"],title:"ProjectSearchSurfaceRequestV1",type:"object"},{$defs:{PageRequest:_t},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{page:{$ref:"#/$defs/PageRequest"},qualified_name:{type:"string"}},required:["qualified_name","page"],title:"QualifiedNamePrimitiveRequest",type:"object"},{$defs:{SymbolPrimitiveRecord:vZ},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{next_cursor:{description:"Opaque resume token; its bounded string is the public wire form.",type:["string","null"]},symbols:{items:{$ref:"#/$defs/SymbolPrimitiveRecord"},type:"array"},total:{format:"uint64",minimum:0,type:["integer","null"]}},required:["symbols"],title:"QualifiedNamePrimitiveResult",type:"object"},{$defs:{RankDirectionV1:_I,RankEdgeKindV1:_x},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{direction:{anyOf:[{$ref:"#/$defs/RankDirectionV1"},{type:"null"}],description:"Edge direction: 'incoming' ranks targets (default, e.g.\nmost-implemented interface), 'outgoing' ranks sources (e.g. class that\nimplements the most interfaces)."},edge_kind:{$ref:"#/$defs/RankEdgeKindV1",description:"The relationship type to rank by (e.g. 'implements' to find\nmost-implemented interfaces)."},limit:{description:"Maximum number of results to return (default: 10, at most 100).",format:"uint32",minimum:0,type:["integer","null"]},node_kind:{description:"Optional filter for node kind (e.g. 'interface', 'class', 'trait',\n'function', 'method').",type:["string","null"]},path:{description:"Filter to files under this directory path (e.g. 'src/main/java').",type:["string","null"]}},required:["edge_kind"],title:"RankSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fF,CodeIndexConvergenceParkedV1:fL,CodeIndexStalenessStateV1:fB,PrimitiveFreshnessStateV1:_i,PrimitiveIndexingStateV1:_o,PrimitiveSearchFreshnessV1:_d,RankDirectionV1:_I,RankEdgeKindV1:_x,RankEntryV1:{additionalProperties:!1,properties:{count:{format:"uint64",minimum:0,type:"integer"},file:{type:"string"},id:{type:"string"},kind:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},name:{type:"string"}},required:["id","name","kind","file","line","count"],type:"object"}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{direction:{$ref:"#/$defs/RankDirectionV1"},edge_kind:{$ref:"#/$defs/RankEdgeKindV1"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},node_kind_filter:{type:["string","null"]},ranking:{items:{$ref:"#/$defs/RankEntryV1"},type:"array"},result_count:{format:"uint64",minimum:0,type:"integer"}},required:["edge_kind","direction","result_count","ranking"],title:"RankResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{limit:{description:"Maximum number of cycles to return (default: 10, at most 100).",format:"uint32",minimum:0,type:["integer","null"]},path:{description:"Filter to files under this directory path (e.g. 'src/main/java').",type:["string","null"]}},title:"RecursionSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fF,CodeIndexConvergenceParkedV1:fL,CodeIndexStalenessStateV1:fB,PrimitiveFreshnessStateV1:_i,PrimitiveIndexingStateV1:_o,PrimitiveSearchFreshnessV1:_d,RecursionCycleV1:{additionalProperties:!1,description:"One call cycle; `chain` repeats its first symbol at the end.",properties:{chain:{items:{$ref:"#/$defs/RecursionSymbolV1"},type:"array"},length:{format:"uint64",minimum:0,type:"integer"}},required:["length","chain"],type:"object"},RecursionSymbolV1:{additionalProperties:!1,properties:{file:{type:"string"},id:{type:"string"},kind:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},name:{type:"string"}},required:["id","name","kind","file","line"],type:"object"}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{cycle_count:{format:"uint64",minimum:0,type:"integer"},cycles:{items:{$ref:"#/$defs/RecursionCycleV1"},type:"array"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."}},required:["cycle_count","cycles"],title:"RecursionResultV1",type:"object"},{$defs:{CommitId:fX,ProjectId:_m,ProviderId:_w,RedundancyScopeV1:{oneOf:[{additionalProperties:!1,properties:{kind:{const:"repository",type:"string"}},required:["kind"],type:"object"},{additionalProperties:!1,properties:{kind:{const:"path",type:"string"},path:{type:"string"}},required:["kind","path"],type:"object"},{additionalProperties:!1,properties:{changed_paths:{items:{type:"string"},type:"array"},head_commit_id:{$ref:"#/$defs/CommitId"},kind:{const:"pull_request",type:"string"},provider:{$ref:"#/$defs/ProviderId"},pull_request_id:{type:"string"}},required:["kind","provider","pull_request_id","head_commit_id","changed_paths"],type:"object"}]},RepositoryId:_z,SimilarMatchClassV1:vx},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{cursor:{type:["string","null"]},family_limit:{description:"Preferred family page size, 1 through 100.",format:"uint32",maximum:100,minimum:1,type:"integer"},include_generated_paths:{type:"boolean"},match_classes:{items:{$ref:"#/$defs/SimilarMatchClassV1"},type:"array"},member_limit:{description:"Members listed per family, at least 2.",format:"uint32",minimum:2,type:"integer"},project_id:{$ref:"#/$defs/ProjectId"},repository_id:{$ref:"#/$defs/RepositoryId"},scope:{$ref:"#/$defs/RedundancyScopeV1"},work_limit:{description:"Clone-index work budget for this page, 3 through 10000. A page that\nexhausts it reports partial coverage.",format:"uint32",maximum:1e4,minimum:3,type:"integer"}},required:["project_id","repository_id","match_classes","scope","include_generated_paths","family_limit","member_limit","work_limit"],title:"RedundancySurfaceRequestV1",type:"object"},{$defs:{CodeGenerationId:fz,CodeIndexBuildBlockedReasonV1:fF,CodeIndexConvergenceParkedV1:fL,CodeIndexStalenessStateV1:fB,ManifestDigest:gj,PrimitiveFreshnessStateV1:_i,PrimitiveIndexingStateV1:_o,PrimitiveSearchFreshnessV1:_d,ProjectId:_m,RedundancyCoverageV1:{oneOf:[{additionalProperties:!1,properties:{examined_families:{format:"uint",minimum:0,type:"integer"},examined_members:{format:"uint",minimum:0,type:"integer"},status:{const:"complete",type:"string"}},required:["status","examined_families","examined_members"],type:"object"},{additionalProperties:!1,properties:{examined_families:{format:"uint",minimum:0,type:"integer"},examined_members:{format:"uint",minimum:0,type:"integer"},reason:{$ref:"#/$defs/RedundancyPartialReasonV1"},status:{const:"partial",type:"string"}},required:["status","reason","examined_families","examined_members"],type:"object"}]},RedundancyFamilyV1:{additionalProperties:!1,properties:{family:{$ref:"#/$defs/SimilarFamilyV1"},generated_members:{items:{$ref:"#/$defs/SymbolOccurrenceId"},type:"array"},reviewable_source_bytes:{format:"uint64",minimum:0,type:"integer"},total_member_count:{format:"uint",minimum:0,type:"integer"}},required:["family","total_member_count","reviewable_source_bytes","generated_members"],type:"object"},RedundancyPartialReasonV1:{enum:["family_limit","work_limit"],type:"string"},RedundancyRankingV1:{enum:["reviewable_source_bytes"],type:"string"},RepositoryId:_z,SimilarFamilyV1:vI,SimilarMatchClassV1:vx,SimilarOccurrenceV1:vj,SourceSpan:vF,SymbolOccurrenceId:vJ,WorktreeId:So},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{coverage:{$ref:"#/$defs/RedundancyCoverageV1"},families:{items:{$ref:"#/$defs/RedundancyFamilyV1"},type:"array"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},next_cursor:{type:["string","null"]},ranked_by:{$ref:"#/$defs/RedundancyRankingV1"},source_generation:{$ref:"#/$defs/CodeGenerationId"}},required:["source_generation","ranked_by","families","coverage"],title:"RedundancyResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,title:"RemoteStatusSurfaceRequestV1",type:"object"},{$defs:{AuthorityEpoch:{description:"Monotonic epoch of the writer authority for a shard.",format:"uint64",minimum:0,type:"integer"},BrainId:ff,BrainNodeId:{description:"Strongly typed canonical identity: `BrainNodeId`.",type:"string"},CurrentRemoteAuthorityStateV1:{description:"Truthful authority lookup state. Missing evidence is never represented as\nan available authority or a successful empty response.",oneOf:[{properties:{state:{const:"available",type:"string"},value:{$ref:"#/$defs/CurrentRemoteAuthorityV1"}},required:["state","value"],type:"object"},{properties:{state:{const:"partial",type:"string"},value:{properties:{known_fence:{anyOf:[{$ref:"#/$defs/RemoteWriterFenceV1"},{type:"null"}]},missing:{items:{$ref:"#/$defs/RemoteAuthorityUnavailableReasonV1"},type:"array",uniqueItems:!0},observed_at:{$ref:"#/$defs/UtcMicros"}},required:["missing","observed_at"],type:"object"}},required:["state","value"],type:"object"},{properties:{state:{const:"unavailable",type:"string"},value:{properties:{observed_at:{$ref:"#/$defs/UtcMicros"},reason:{$ref:"#/$defs/RemoteAuthorityUnavailableReasonV1"}},required:["reason","observed_at"],type:"object"}},required:["state","value"],type:"object"}]},CurrentRemoteAuthorityV1:{additionalProperties:!1,description:"Authenticated current authority for a mutable shard.",properties:{credential_revision:{description:"Revision of the authority node's current enrollment credential.",format:"uint64",minimum:0,type:"integer"},fence:{$ref:"#/$defs/RemoteWriterFenceV1"},observed_at:{$ref:"#/$defs/UtcMicros"}},required:["fence","credential_revision","observed_at"],type:"object"},DoctorCoverageCompletenessV1:hB,ProjectionGenerationId:_g,RemoteAuthorityUnavailableReasonV1:{oneOf:[{enum:["registry_unavailable","placement_unknown","authority_unreachable","authority_authentication_failed","caller_authentication_failed","enrollment_expired","enrollment_revoked","insufficient_capability","scope_mismatch","fence_unverified","protocol_incompatible"],type:"string"},{const:"writer_authority_unpublished",description:"The RemoteNode store has never had a writer authority published for\nthis Brain, so no capture, replay, query, or failover can bind to one.",type:"string"}]},RemoteListenerReadV1:{enum:["serving","disabled","degraded"],type:"string"},RemoteOperationalReadinessV1:{enum:["unconfigured","partial","ready","recovery_required"],type:"string"},RemoteOperationalStatusV1:{additionalProperties:!1,properties:{authority:{$ref:"#/$defs/CurrentRemoteAuthorityStateV1"},enrollment_configured:{type:"boolean"},failover_in_progress:{type:"boolean"},observed_at:{$ref:"#/$defs/UtcMicros"},readiness:{$ref:"#/$defs/RemoteOperationalReadinessV1"},recovery_required:{type:"boolean"},replay_coverage_complete:{type:"boolean"},spool:{$ref:"#/$defs/RemoteSpoolOperationalStatusV1"}},required:["readiness","enrollment_configured","authority","spool","replay_coverage_complete","failover_in_progress","recovery_required","observed_at"],type:"object"},RemoteSpoolOperationalStatusV1:{additionalProperties:!1,properties:{has_sequence_gap:{type:"boolean"},pending_count:{format:"uint64",minimum:0,type:"integer"},quarantined_count:{format:"uint64",minimum:0,type:"integer"}},required:["pending_count","quarantined_count","has_sequence_gap"],type:"object"},RemoteWriterFenceV1:{additionalProperties:!1,description:"The complete single-writer identity for one mutable shard.",properties:{authority_epoch:{$ref:"#/$defs/AuthorityEpoch"},authority_node_id:{$ref:"#/$defs/BrainNodeId"},brain_id:{$ref:"#/$defs/BrainId"},generation_id:{$ref:"#/$defs/ProjectionGenerationId"},placement_revision:{format:"uint64",minimum:0,type:"integer"},shard_id:{$ref:"#/$defs/ShardId"}},required:["brain_id","shard_id","generation_id","placement_revision","authority_epoch","authority_node_id"],type:"object"},ShardId:{description:"Strongly typed canonical identity: `ShardId`.",type:"string"},UtcMicros:bs},$schema:"https://json-schema.org/draft/2020-12/schema",description:"Typed read of the Remote Brain operational plane as observed from the\nmounted daemon authorities. Every operator surface (Doctor, CLI, MCP,\ndashboard) reads this one shape; `Unavailable` is reserved for a genuinely\nunmounted or unreadable authority, never a rendering shortcut.",oneOf:[{properties:{coverage:{$ref:"#/$defs/DoctorCoverageCompletenessV1"},kind:{const:"observed",type:"string"},listener:{$ref:"#/$defs/RemoteListenerReadV1"},status:{$ref:"#/$defs/RemoteOperationalStatusV1"}},required:["kind","listener","status","coverage"],type:"object"},{properties:{kind:{const:"unconfigured",type:"string"}},required:["kind"],type:"object"},{properties:{kind:{const:"unavailable",type:"string"}},required:["kind"],type:"object"}],title:"RemoteOperationalStatusReadV1"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{new_name:{type:["string","null"]},node_id:{type:"string"}},required:["node_id"],title:"RenamePreviewPrimitiveRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fF,CodeIndexConvergenceParkedV1:fL,CodeIndexStalenessStateV1:fB,PrimitiveFreshnessStateV1:_i,PrimitiveIndexingStateV1:_o,PrimitiveNotFoundV1:_a,PrimitiveSearchFreshnessV1:_d,PrimitiveSymbolLocationV1:_l,RenamePreviewNodeV1:{additionalProperties:!1,properties:{file:{type:"string"},id:{type:"string"},kind:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},name:{type:"string"},qualified_name:{type:"string"},snippet:{type:["string","null"]}},required:["id","name","qualified_name","kind","file","line"],type:"object"},RenamePreviewPrimitiveResultV1:{additionalProperties:!1,properties:{freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},new_name:{type:["string","null"]},node:{$ref:"#/$defs/RenamePreviewNodeV1"},note:{type:"string"},read_only:{type:"boolean"},reference_count:{format:"uint",minimum:0,type:"integer"},references:{items:{$ref:"#/$defs/RenamePreviewReferenceV1"},type:"array"},symbol:{type:"string"},text_only_matches:{items:{$ref:"#/$defs/RenamePreviewTextOnlyMatchV1"},type:"array"}},required:["read_only","note","symbol","node","reference_count","references","text_only_matches"],type:"object"},RenamePreviewReferenceV1:{additionalProperties:!1,properties:{edge_kind:{type:"string"},file:{type:"string"},from_kind:{type:"string"},from_name:{type:"string"},from_node_id:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},snippet:{type:["string","null"]}},required:["from_node_id","from_name","from_kind","edge_kind","file","line"],type:"object"},RenamePreviewTextOnlyMatchV1:{additionalProperties:!1,properties:{file:{type:"string"},note:{type:"string"},text_only_count:{format:"uint",minimum:0,type:"integer"}},required:["file","text_only_count","note"],type:"object"}},$schema:"https://json-schema.org/draft/2020-12/schema",anyOf:[{$ref:"#/$defs/RenamePreviewPrimitiveResultV1"},{$ref:"#/$defs/PrimitiveNotFoundV1"}],title:"RenamePreviewPrimitiveOutcomeV1"},{$defs:{ManifestDigest:gj,RenamePreviewAcceptanceV1:{additionalProperties:!1,description:"Exact preview material an apply must echo. Preview calls omit this value;\napply rejects any mismatch before publishing a file.",properties:{graph_revision:{$ref:"#/$defs/ManifestDigest"},plan_digest:{$ref:"#/$defs/ManifestDigest"},preview_digest:{$ref:"#/$defs/ManifestDigest"},preview_id:{$ref:"#/$defs/ManifestDigest"},repository_revision:{default:null,type:["string","null"]}},required:["preview_id","preview_digest","plan_digest","graph_revision"],type:"object"}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Exact public input accepted by `tracedecay_rename_symbol`.\n\nThe five identity fields consume the preview's exact symbol identity; the\nflattened control consumes its exact candidate-state digest.",properties:{accepted_preview:{anyOf:[{$ref:"#/$defs/RenamePreviewAcceptanceV1"},{type:"null"}],description:"Exact output identity from the accepted dry-run preview. Required when\n`dry_run=false` and omitted when computing a preview."},dry_run:{default:!0,type:"boolean"},expected_state:{description:"Exact `preview_digest`/`expected_state` returned by the dry run. Apply\nre-resolves the typed plan and rejects any candidate-state drift.",type:["string","null"]},file:{type:"string"},idempotency_key:{type:["string","null"]},kind:{type:"string"},new_name:{type:"string"},node_id:{description:"Canonical `SymbolOccurrenceId` returned by `tracedecay_rename_preview`.",type:"string"},old_name:{type:"string"},qualified_name:{type:"string"},verify:{default:!0,type:"boolean"}},required:["node_id","qualified_name","kind","file","old_name","new_name"],title:"RenameSymbolSurfaceRequestV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Exact public input accepted by `tracedecay_replace_symbol`.",properties:{dry_run:{default:!1,type:"boolean"},expected_state:{description:"Exact `preview_digest`/`expected_state` returned by the dry run. Apply\nre-resolves the typed plan and rejects any candidate-state drift.",type:["string","null"]},idempotency_key:{type:["string","null"]},new_source:{type:"string"},symbol:{type:"string"},verify:{default:!1,type:"boolean"}},required:["symbol","new_source"],title:"ReplaceSymbolSurfaceRequestV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{handle:{description:"The required `handle` argument copied exactly from a truncated MCP\nresponse envelope.",type:"string"},max_chars:{description:"Maximum characters requested for this page. Values above the safe\nresponse-frame budget are clamped.",format:"uint64",minimum:1,type:["integer","null"]},offset:{default:0,description:"Character offset into the immutable stored response (default: 0). Use\nthe prior page's next_offset.",format:"uint64",minimum:0,type:["integer","null"]}},required:["handle"],title:"RetrieveSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fF,CodeIndexConvergenceParkedV1:fL,CodeIndexStalenessStateV1:fB,PrimitiveFreshnessStateV1:_i,PrimitiveIndexingStateV1:_o,PrimitiveSearchFreshnessV1:_d,RetrieveHandleExpiredV1:{additionalProperties:!1,description:"The record expired and was removed.",properties:{content:{description:"Always null: the expired content was removed.",type:["string","null"]},created_at:{format:"int64",type:"integer"},expired:{description:"Always `true`.",type:"boolean"},expires_at:{format:"int64",type:"integer"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},handle:{type:"string"},message:{type:"string"},reason_code:{type:"string"},retry_instruction:{type:"string"},retryable:{type:"boolean"}},required:["handle","expired","reason_code","message","retryable","retry_instruction","created_at","expires_at"],type:"object"},RetrieveHandleMissingV1:{additionalProperties:!1,description:"No record exists under the handle in this project's store.",properties:{content:{description:"Always null: nothing is stored under the handle.",type:["string","null"]},expired:{description:"Always null: an absent record has no expiry to report.",type:["boolean","null"]},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},handle:{type:"string"},message:{type:"string"},reason_code:{type:"string"},retry_instruction:{type:"string"},retryable:{type:"boolean"}},required:["handle","reason_code","message","retryable","retry_instruction"],type:"object"},RetrievedPageV1:{additionalProperties:!1,description:"One page of the stored response, sized so its response frame fits the\nresponse budget.",properties:{content:{type:"string"},created_at:{format:"int64",type:"integer"},expired:{description:"Always `false`: a page is only served from a live record.",type:"boolean"},expires_at:{format:"int64",type:"integer"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},handle:{type:"string"},has_more:{type:"boolean"},next_offset:{description:"Where the next page starts; absent on the last page.",format:"uint64",minimum:0,type:["integer","null"]},offset:{format:"uint64",minimum:0,type:"integer"},original_chars:{format:"uint64",minimum:0,type:"integer"},total_chars:{format:"uint64",minimum:0,type:"integer"}},required:["handle","expired","original_chars","total_chars","offset","has_more","created_at","expires_at","content"],type:"object"}},$schema:"https://json-schema.org/draft/2020-12/schema",anyOf:[{$ref:"#/$defs/RetrievedPageV1"},{$ref:"#/$defs/RetrieveHandleMissingV1"},{$ref:"#/$defs/RetrieveHandleExpiredV1"}],description:"What a retrieve found under the handle.",title:"RetrieveResultV1"},{$defs:{TestProfileV1:{description:"The cargo profile an affected-test run builds with.",enum:["debug","release"],type:"string"}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{changed_paths:{description:"Explicit manifest of project-relative file paths used to compute\naffected tests.",items:{type:"string"},type:"array"},max_tests:{description:"Cap on tests dispatched in a single invocation, 1 through 500\n(default: 100).",format:"uint64",maximum:500,minimum:1,type:["integer","null"]},profile:{anyOf:[{$ref:"#/$defs/TestProfileV1"},{type:"null"}],description:"Cargo profile (default: debug)."},timeout_secs:{description:"Maximum wall time in seconds before the cargo subprocess is killed,\n1 through 300 (default: 300).",format:"uint64",maximum:300,minimum:1,type:["integer","null"]}},required:["changed_paths"],title:"RunAffectedTestsSurfaceRequestV1",type:"object"},{$defs:{AffectedTestErrorV1:{additionalProperties:!1,description:"Why a run failed or was refused.",properties:{kind:{type:"string"},message:{type:"string"},operation:{type:"string"}},required:["kind","operation","message"],type:"object"},AffectedTestOutcomeV1:{additionalProperties:!1,description:"One observed libtest outcome.",properties:{covers_source_ids:{description:"Graph symbols this test was selected to cover.",items:{type:"string"},type:"array"},passed:{type:"boolean"},test:{type:"string"}},required:["test","passed","covers_source_ids"],type:"object"},AffectedTestRunV1:{additionalProperties:!1,description:"A dispatched run, completed or failed, with what it observed.",properties:{dispatched_tests:{items:{type:"string"},type:"array"},error:{anyOf:[{$ref:"#/$defs/AffectedTestErrorV1"},{type:"null"}],description:"Present when the run did not complete."},exit_code:{format:"int32",type:["integer","null"]},failed:{format:"uint64",minimum:0,type:"integer"},ignored:{description:"Dispatched tests libtest reported as ignored.",format:"uint64",minimum:0,type:"integer"},passed:{format:"uint64",minimum:0,type:"integer"},results:{items:{$ref:"#/$defs/AffectedTestOutcomeV1"},type:"array"},stderr_tail:{type:"string"},stdout_tail:{type:"string"},terminal:{$ref:"#/$defs/ManagedTestTerminalV1"},total_observed:{format:"uint64",minimum:0,type:"integer"},truncated:{description:"More affected tests existed than `max_tests` admitted.",type:"boolean"}},required:["passed","failed","ignored","total_observed","dispatched_tests","truncated","results","stderr_tail","stdout_tail","terminal"],type:"object"},AffectedTestsNotRunV1:{additionalProperties:!1,description:"No test was dispatched: nothing covers the change, or the request was\nrefused before a run began.",properties:{error:{anyOf:[{$ref:"#/$defs/AffectedTestErrorV1"},{type:"null"}]},failed:{description:"Always 0.",format:"uint64",minimum:0,type:"integer"},note:{type:["string","null"]},passed:{description:"Always 0.",format:"uint64",minimum:0,type:"integer"},results:{description:"Always empty.",items:{$ref:"#/$defs/AffectedTestOutcomeV1"},type:"array"}},required:["passed","failed","results"],type:"object"},CancellationObservation:fI,CancellationStage:fx,Deadline:hL,ManagedTestTerminalV1:{additionalProperties:!1,description:"The managed test-run operation the run was recorded under.",properties:{operation_id:{type:"string"},receipt:{$ref:"#/$defs/OperationReceipt"},result_tool:{description:"The tool that reads the recorded results back.",type:"string"},session_id:{description:"The requesting session the run is recorded against; null when the\nrequest carried no session.",type:["string","null"]}},required:["operation_id","result_tool","receipt"],type:"object"},OperationBudgetUsage:g8,OperationReceipt:g7,OperationTermination:_e,UtcMicros:bs},$schema:"https://json-schema.org/draft/2020-12/schema",anyOf:[{$ref:"#/$defs/AffectedTestRunV1"},{$ref:"#/$defs/AffectedTestsNotRunV1"}],title:"RunAffectedTestsResultV1"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{authority_audit:{default:!1,description:"Run the exhaustive observation-authority audit and include\nauthority_audit_ok (true = audit ran and passed, false = audit ran and\nfailed, null = audit did not run or finish), authority_audit_reason\n(typed: authority_invariant_failed, authority_store_unavailable,\nauthority_store_missing, authority_audit_not_run,\nauthority_audit_budget_exceeded), and\nauthority_audit_error (observed detail) in database telemetry. Also\nincludes session-temporal health. Default false.",type:"boolean"},doctor_report:{default:!1,description:"Include the daemon-owned canonical Doctor report and typed per-table\ngrowth evidence. Default false.",type:"boolean"},session_ingest_health:{default:!1,description:"Include Cursor transcript-ingest health from the daemon-retained\nproject session authority. Default false.",type:"boolean"},session_temporal_health:{default:!1,description:"Include session-temporal health without the authority audit. Default\nfalse.",type:"boolean"},startup_health:{default:!1,description:"Ask a connection's first request for only the daemon-mounted database\nintegrity telemetry, for post-update startup validation; the daemon\ncore answers that probe before a project owner exists, and a project\nowner's snapshot already carries the same telemetry. Default false.",type:"boolean"}},title:"RuntimeSurfaceRequestV1",type:"object"},{$defs:{DoctorCoverageCompletenessV1:hB,DoctorCoverageStatementV1:{description:"A bounded, human-readable coverage statement plus its completeness.",properties:{completeness:{$ref:"#/$defs/DoctorCoverageCompletenessV1"},statement:{type:"string"}},required:["completeness","statement"],type:"object"},DoctorEvidenceRefV1:{description:"A typed reference to one piece of evidence Doctor composed into a finding.\n\nThe `family` records which audited input surface produced the evidence, so\na finding may cross-cite evidence from more than one family without losing\nprovenance.",properties:{family:{$ref:"#/$defs/DoctorFindingFamilyV1"},reference:{$ref:"#/$defs/DoctorEvidenceReferenceV1"}},required:["family","reference"],type:"object"},DoctorEvidenceReferenceV1:{description:"Durable, non-disclosing reference to one owning-authority evidence\nrecord (for example a `FeedbackFindingId`, configuration revision, or\nruntime read coverage anchor). Doctor stores the reference only; the\nowning authority remains the single source of the record.",type:"string"},DoctorEvidenceStateV1:{description:"Exact Doctor evidence states.\n\nMissing, partial, or unknown truth never becomes healthy or clean. Only\n[`DoctorEvidenceStateV1::HealthyCompleteCoverage`] asserts a healthy result,\nand only when its finding carries complete coverage (see\n[`DoctorFindingV1::new`]).",oneOf:[{const:"unsupported",description:"The owning authority does not support this evidence on this platform.",type:"string"},{const:"absent",description:"The evidence source is supported but produced nothing.",type:"string"},{const:"stale",description:"The evidence exists but is behind the current generation/watermark.",type:"string"},{const:"degraded",description:"The evidence proves a degraded but observed condition.",type:"string"},{const:"partial",description:"Only part of the evidence was observed.",type:"string"},{const:"unknown",description:"The evidence state could not be determined.",type:"string"},{const:"denied",description:"Authorization to read the evidence was denied.",type:"string"},{const:"healthy_complete_coverage",description:"The evidence proves a healthy condition with complete coverage.",type:"string"}]},DoctorFamilyConsultationV1:{description:"Whether a family was consulted from an observed source or is unavailable.",oneOf:[{description:"A source produced observed evidence for this family.",properties:{status:{const:"consulted",type:"string"}},required:["status"],type:"object"},{description:"Complete family coverage was unavailable. Storage may still carry\nfindings from resolved producers when an independent producer failed.",properties:{reason:{$ref:"#/$defs/DoctorFamilyUnavailableReasonV1"},status:{const:"unavailable",type:"string"}},required:["status","reason"],type:"object"}]},DoctorFamilyCoverageV1:{description:"The consultation status of one finding family within a report.",properties:{consultation:{$ref:"#/$defs/DoctorFamilyConsultationV1"},family:{$ref:"#/$defs/DoctorFindingFamilyV1"}},required:["family","consultation"],type:"object"},DoctorFamilyUnavailableReasonV1:{description:"Why complete coverage of a finding family was unavailable.",oneOf:[{const:"unwired",description:"No source port is wired for this family in this composition.",type:"string"},{const:"unsupported",description:"The source is unsupported on this build/platform.",type:"string"},{const:"absent",description:"The source is supported but produced nothing.",type:"string"},{const:"denied",description:"The source read was denied.",type:"string"},{const:"unknown",description:"The source state could not be determined.",type:"string"},{const:"unavailable",description:"The source could not be reached. Named separately from `Unknown`: the\nsource is identified and its unreachability is an observation, not an\nundetermined state.",type:"string"},{const:"reset_required",description:"The source must be rebuilt before it can be read again.",type:"string"},{const:"corrupt",description:"The source was read and found corrupt.",type:"string"}]},DoctorFindingFamilyV1:{description:"Stable Doctor finding families.\n\nThe initial list covers advisory findings from\nBrain, Explorer, Loom, Code, and Observatory, plus the legacy\n`core_doctor` checks (graph quick-check, temporal/migration health,\nconfiguration compatibility drift, code-index mount state, session ingest).\nEach family maps to one audited typed input surface. The set is kept small\nand honest; new families are added through a future versioned enum rather\nthan by widening the meaning of an existing variant.",oneOf:[{const:"advisory",description:"advisory/scout findings (GitHub review, CI localization,\nproximity, context scout): `crate::advisory` / domain feedback.",type:"string"},{const:"configuration",description:"Desired-versus-effective configuration and compatibility drift from\n`ProjectConfigurationRuntime` / `ConfigurationControlPlane`.",type:"string"},{const:"storage_runtime",description:"Store, graph, and temporal runtime health plus migration coverage\n(`RuntimeReadOperationV1` health family, `StoreRuntimeClientLease`).",type:"string"},{const:"storage",description:"Storage retention, size, and efficiency over canonical observability\nread models. Distinct from [`Self::StorageRuntime`] health: this\nfamily surfaces over-budget stores, identity-drift orphans, incident\ndebris, and retention backlog. The typed\nsubclass vocabulary is [`DoctorStorageFindingKindV1`].",type:"string"},{const:"language_server",description:"Language-server / analyzer engine status from the LSP gateway's\n`AnalyzerState`.",type:"string"},{const:"code_index",description:"Code index mount state (mounted, indexing, stale, unmounted,\nincompatible, parked).",type:"string"},{const:"observability",description:"Denominator-safe measurement and telemetry health from analytics,\naccounting read models, and session ingest.",type:"string"},{const:"memory",description:"Retained daemon memory as the resident-memory inventory reports it:\nRSS against the admission limit and pressure line, and each retained\nowner's bytes.",type:"string"}]},DoctorFindingV1:{description:"One canonical Doctor finding.\n\nA finding pins its diagnosis `family`, its evidence `state`, the typed\nevidence it composed, and a coverage statement. Construction enforces the\ninvariants that keep unknown/partial evidence from collapsing into a\nhealthy or clean result.",properties:{coverage:{$ref:"#/$defs/DoctorCoverageStatementV1"},evidence:{items:{$ref:"#/$defs/DoctorEvidenceRefV1"},type:"array"},family:{$ref:"#/$defs/DoctorFindingFamilyV1"},state:{$ref:"#/$defs/DoctorEvidenceStateV1"}},required:["family","state","evidence","coverage"],type:"object"},DoctorReportCoverageV1:{description:"The report-wide coverage statement: which families were consulted versus\nunavailable, plus an overall completeness and a bounded human statement.",properties:{completeness:{$ref:"#/$defs/DoctorCoverageCompletenessV1"},families:{items:{$ref:"#/$defs/DoctorFamilyCoverageV1"},type:"array"},statement:{$ref:"#/$defs/DoctorCoverageStatementV1"}},required:["families","completeness","statement"],type:"object"},DoctorReportEntryV1:{description:"One entry in a Doctor report: a canonical finding plus, for the storage\nfamily, its typed subclass. The subclass is present only for storage findings\n(a non-storage entry never carries one).",properties:{finding:{$ref:"#/$defs/DoctorFindingV1"},storage_kind:{anyOf:[{$ref:"#/$defs/DoctorStorageFindingKindV1"},{type:"null"}]}},required:["finding"],type:"object"},DoctorReportV1:{description:"One composed Doctor report.\n\nThe report carries one or more entries per family (findings are never merged\nby label) plus a coverage statement that enumerates every family consulted\nversus unavailable. Severity (the finding's evidence state) and evidence\nquality (coverage completeness) are kept as separate dimensions: a degraded\nfinding with complete coverage does not weaken report completeness, and only\ngenuinely complete coverage with every finding healthy makes the whole report\nassert health.",properties:{coverage:{$ref:"#/$defs/DoctorReportCoverageV1"},entries:{items:{$ref:"#/$defs/DoctorReportEntryV1"},type:"array"}},required:["entries","coverage"],type:"object"},DoctorStorageFindingKindV1:{description:"Typed subclasses of the [`DoctorFindingFamilyV1::Storage`] finding family.\n\nThe storage family never reports a silent overage: each subclass names one\nobservable retention/size condition Doctor surfaces over canonical size\nobservability read models. The set is closed and grows only through a future\nversioned enum, never by widening an existing subclass.",oneOf:[{const:"over_budget_store",description:"A store exceeds its owner-configured soft size budget.",type:"string"},{const:"orphan_store",description:"A store whose project identity no longer resolves to a live repository\nroot (identity-drift orphan), reported with age and size.",type:"string"},{const:"incident_debris_present",description:"Recovery/corruption artifacts are present beside a store and awaiting\ndeletion.",type:"string"},{const:"retention_backlog",description:"Retention-eligible rows or stores are past their window and awaiting\noffload/collection.",type:"string"},{const:"table_growth",description:"Per-table SQLite payload growth observed between two retained\nwatermarks, including baseline and unavailable measurement states.",type:"string"},{const:"pending_schema_migration",description:"A store whose historical schema convergence has not completed: the\nmigrations whose cost scales with store size are still pending, still\nrunning, or stopped on a failure. The daemon serves while they run, so\nthis is the surface that says which store is still migrating and why.",type:"string"},{const:"wal_checkpoint_pinned",description:"A store whose WAL checkpoint cannot restart the log because a reader\nstill holds a read slot past the checkpoint fence: a wedged reader of\nthis daemon or another process, named in the evidence. Writes run\nuntil the WAL reaches its ceiling, then wait.",type:"string"}]},LanguageServerAnalyzerStateV1:{description:"State of one analyzer as the daemon owner holds it.\n\n`Inactive` is the one state the aggregate never takes: the language has no\nfiles in the project, so Doctor does not grade it, but `lsp servers` still\nlists it from this same read so both surfaces share one authority.",enum:["ready","available","refreshing","disabled","unavailable","crashed","inactive"],type:"string"},LanguageServerAnalyzerV1:{description:"Live state of one analyzer the daemon resolved for the current project.\n\n`LanguageServerStateV1` is the aggregate the finding is graded on; this is\nthe per-analyzer evidence behind it, so an operator learns *which*\nexecutable is missing and how to install it, resolved by the daemon\nprocess (the only PATH that matters, since the daemon spawns analyzers)\nrather than by whichever shell ran the CLI.",properties:{command:{description:"The configured executable, after any operator command override.",type:"string"},detail:{description:"The owner's last recorded error for this analyzer, when one exists.",type:["string","null"]},executable_found:{description:"Whether the daemon process finds `command` on its own PATH. For an\nactive analyzer `state` is the finer verdict (a rustup proxy whose\ntoolchain lacks the component is found yet `Unavailable`); for an\ninactive one this is the only availability evidence.",type:"boolean"},install:{description:"The first install command the adapter advertises, when one exists.",type:["string","null"]},language:{description:"Adapter language (`typescript`, `rust`, …).",type:"string"},state:{$ref:"#/$defs/LanguageServerAnalyzerStateV1"}},required:["language","command","state","executable_found"],type:"object"},LanguageServerReadV1:{description:"One live read from the daemon language-server/analyzer owner.",oneOf:[{description:"The owner observed all project-active analyzer states.",properties:{analyzers:{default:[],description:"Every analyzer the owner resolved, active or not; the aggregate\n`state` covers the active ones only.",items:{$ref:"#/$defs/LanguageServerAnalyzerV1"},type:"array"},coverage:{$ref:"#/$defs/DoctorCoverageCompletenessV1"},kind:{const:"observed",type:"string"},state:{$ref:"#/$defs/LanguageServerStateV1"}},required:["kind","state","coverage"],type:"object"},{description:"Language-server inspection is unsupported on this build/platform.",properties:{kind:{const:"unsupported",type:"string"}},required:["kind"],type:"object"},{description:"No project-active analyzer is configured. The owner's inactive\nanalyzers are still carried so `lsp servers` can list them.",properties:{analyzers:{default:[],items:{$ref:"#/$defs/LanguageServerAnalyzerV1"},type:"array"},kind:{const:"absent",type:"string"}},required:["kind"],type:"object"},{description:"Authorization to inspect analyzer state was denied.",properties:{kind:{const:"denied",type:"string"}},required:["kind"],type:"object"},{description:"Analyzer state could not be determined.",properties:{kind:{const:"unknown",type:"string"}},required:["kind"],type:"object"}]},LanguageServerStateV1:{description:"Aggregate state of the project-active language-server analyzers.",oneOf:[{const:"ready",description:"Every active analyzer is ready.",type:"string"},{const:"available",description:"At least one analyzer is installed but has not produced a ready snapshot.",type:"string"},{const:"refreshing",description:"At least one analyzer is currently refreshing/indexing.",type:"string"},{const:"disabled",description:"At least one project analyzer is disabled.",type:"string"},{const:"unavailable",description:"At least one project analyzer executable is unavailable.",type:"string"},{const:"crashed",description:"At least one analyzer process crashed.",type:"string"}]},RuntimeDoctorReportV1:{description:"The daemon's canonical Doctor report as this route could read it.",oneOf:[{additionalProperties:!1,properties:{kind:{const:"observed",type:"string"},language_servers:{$ref:"#/$defs/LanguageServerReadV1"},report:{$ref:"#/$defs/DoctorReportV1"},schema_convergences:{items:{$ref:"#/$defs/SchemaConvergenceFindingV1"},type:"array"},table_growth_evidence:{items:{$ref:"#/$defs/TableGrowthDoctorEvidenceV1"},type:"array"}},required:["kind","report","table_growth_evidence","schema_convergences","language_servers"],type:"object"},{additionalProperties:!1,description:"The reader is mounted and the read failed.",properties:{kind:{const:"unknown",type:"string"},language_servers:{$ref:"#/$defs/LanguageServerReadV1"},schema_convergences:{items:{$ref:"#/$defs/SchemaConvergenceFindingV1"},type:"array"},table_growth_evidence:{items:{$ref:"#/$defs/TableGrowthDoctorEvidenceV1"},type:"array"}},required:["kind","table_growth_evidence","schema_convergences","language_servers"],type:"object"},{additionalProperties:!1,description:"No Doctor reader is mounted on this route.",properties:{kind:{const:"unsupported",type:"string"},language_servers:{$ref:"#/$defs/LanguageServerReadV1"},schema_convergences:{items:{$ref:"#/$defs/SchemaConvergenceFindingV1"},type:"array"},table_growth_evidence:{items:{$ref:"#/$defs/TableGrowthDoctorEvidenceV1"},type:"array"}},required:["kind","table_growth_evidence","schema_convergences","language_servers"],type:"object"}]},SchemaConvergenceFindingV1:_7,SchemaConvergenceProgressV1:ve,SchemaConvergenceStageV1:vt,SchemaConvergenceStateV1:vr,StorageByteSizeV1:{description:"A byte size measurement. A newtype keeps sizes from being confused with\ncounts, ratios, or timestamps in the read models and producers.",format:"uint64",minimum:0,type:"integer"},StoreKeyV1:{description:"Logical name of one owner-profile store (for example `sessions.db`,\n`graph.db`, or `projects/proj_x`). Never an absolute on-disk path.",type:"string"},TableGrowthDoctorEvidenceV1:{description:"Contract-independent evidence ready to wrap in a future `TableGrowth`\nStorage finding once that generated-contract variant is available.",oneOf:[{properties:{current_bytes:{$ref:"#/$defs/StorageByteSizeV1"},current_observed_at:{$ref:"#/$defs/UtcMicros"},growth_bytes:{$ref:"#/$defs/StorageByteSizeV1"},kind:{const:"significant_growth",type:"string"},previous_bytes:{$ref:"#/$defs/StorageByteSizeV1"},previous_observed_at:{$ref:"#/$defs/UtcMicros"},store:{$ref:"#/$defs/StoreKeyV1"},table:{$ref:"#/$defs/TableNameV1"}},required:["kind","store","table","previous_bytes","current_bytes","growth_bytes","previous_observed_at","current_observed_at"],type:"object"},{properties:{kind:{const:"baseline_established",type:"string"},observed_at:{$ref:"#/$defs/UtcMicros"},store:{$ref:"#/$defs/StoreKeyV1"},tables_observed:{format:"uint64",minimum:0,type:"integer"}},required:["kind","store","observed_at","tables_observed"],type:"object"},{properties:{current_bytes:{$ref:"#/$defs/StorageByteSizeV1"},kind:{const:"table_baseline_pending",type:"string"},observed_at:{$ref:"#/$defs/UtcMicros"},store:{$ref:"#/$defs/StoreKeyV1"},table:{$ref:"#/$defs/TableNameV1"}},required:["kind","store","table","current_bytes","observed_at"],type:"object"},{properties:{kind:{const:"unsupported",type:"string"},store:{$ref:"#/$defs/StoreKeyV1"}},required:["kind","store"],type:"object"},{properties:{kind:{const:"denied",type:"string"},store:{$ref:"#/$defs/StoreKeyV1"}},required:["kind","store"],type:"object"},{properties:{kind:{const:"unknown",type:"string"},reason:{$ref:"#/$defs/TableGrowthUnavailableReasonV1"},store:{$ref:"#/$defs/StoreKeyV1"}},required:["kind","store","reason"],type:"object"}]},TableGrowthUnavailableReasonV1:{description:"Why a per-table payload-growth measurement is unavailable.",oneOf:[{const:"not_yet_measured",description:"No maintenance pass has measured this store yet.",type:"string"},{const:"reader_unavailable",description:"No reader could be leased within the measurement's wait.",type:"string"},{const:"deadline_exceeded",description:"The `dbstat` walk was interrupted by its deadline.",type:"string"},{const:"cancelled",description:"The `dbstat` walk was cancelled.",type:"string"},{const:"storage_corrupt",description:"The store reported corruption.",type:"string"},{const:"storage_infrastructure",description:"The store failed with an infrastructure error.",type:"string"},{const:"storage_other",description:"The store failed for another reason.",type:"string"},{const:"invalid_table_name",description:"`dbstat` named a table that is not a valid table identifier.",type:"string"},{const:"clock_regressed",description:"The previous watermark is later than the current measurement.",type:"string"},{const:"exceeds_measurement_budget",description:"The store is larger than the `dbstat` walk can cover within its\ndeadline.",type:"string"}]},TableNameV1:{description:"A physical table name inside a store, used for per-table growth telemetry.",type:"string"},UtcMicros:bs},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Process, database, and session-observation telemetry for the running\ndaemon, with the sections the request opted into.",properties:{captured_at:{description:"Unix epoch seconds.",format:"uint64",minimum:0,type:"integer"},cursor_session_ingest:!0,cursor_session_placeholder_paths:{items:{type:"string"},type:["array","null"]},database:{description:"Store telemetry, with the authority-audit verdict when it ran."},doctor_report:{anyOf:[{$ref:"#/$defs/RuntimeDoctorReportV1"},{type:"null"}]},host_os:{type:"string"},process:{description:"Cached process sample."},session_temporal_health:!0,tracedecay_version:{type:"string"}},required:["captured_at","tracedecay_version","host_os","process","database"],title:"RuntimeResultV1",type:"object"},{$defs:{SearchLexicalAliasV1:{additionalProperties:!1,description:"One named query-time vocabulary alias.",properties:{alternative:{maxLength:128,type:"string"},strict_query:{maxLength:128,type:"string"}},required:["strict_query","alternative"],type:"object"},SearchLexicalFieldFilterV1:{additionalProperties:!1,properties:{field:{$ref:"#/$defs/SearchLexicalFieldV1"},include:{type:"boolean"}},required:["field","include"],type:"object"},SearchLexicalFieldV1:{description:"A lexical posting field a search may include or exclude.",enum:["symbol_name","qualified_name","path","signature","documentation","body_text","preamble_text","exact_term","subtoken"],type:"string"},SearchLexicalProximityV1:{additionalProperties:!1,description:"Ordered terms that must occur in one field within `maximum_gap`\nintervening tokens of each other.",properties:{maximum_gap:{format:"uint32",maximum:8,minimum:0,type:"integer"},terms:{items:{type:"string"},maxItems:8,minItems:2,type:"array"}},required:["terms","maximum_gap"],type:"object"}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{cursor:{description:"Authenticated opaque continuation returned as next_cursor. Repeat the same query and lexical options with it.",type:["string","null"]},lazy_index_ignored_dependencies:{description:"Opt in to bounded indexing of ignored dependency entry files when an import hint matches (default: false).",type:["boolean","null"]},lexical_aliases:{description:"Named query-time vocabulary aliases. The strict query always ranks first. Alias-only hits follow it with the strict query, alternative, and configured-vocabulary reason disclosed.",items:{$ref:"#/$defs/SearchLexicalAliasV1"},maxItems:8,type:["array","null"]},lexical_anchors:{description:"Exact identifiers or technical terms (e.g. 'reserve_stock', 'Foo::bar', 'E0308') that the answer must be about. Each is ranked through the lexical lane as its own route: a hit carrying an anchor outranks every hit that carries none, exact hits included, every anchor with matches keeps at least its best sites through the lane cap, and `lexical_anchors` in the response reports each anchor's outcome (`matched` rows, `admitted` sites this response returns, `dropped` admitted sites it could not carry with the reason, `unmatched`, or `not_served`). Ranked retrieval, not exhaustive grep (use tracedecay_grep for that). Each result names the routes that ranked it. At most 8 anchors, each one whitespace-free term of at most 128 bytes, no repeats.",items:{type:"string"},maxItems:8,type:["array","null"]},lexical_field_filters:{description:"Include or exclude lexical symbol_name, qualified_name, path, signature, documentation, body_text, preamble_text, exact_term, or subtoken fields.",items:{$ref:"#/$defs/SearchLexicalFieldFilterV1"},maxItems:9,type:["array","null"]},lexical_phrases:{description:"Exact lexical phrases to rank through n-gram candidate pruning.",items:{type:"string"},maxItems:4,type:["array","null"]},lexical_proximities:{description:"Ordered lexical terms that must occur within the bounded intervening-token gap.",items:{$ref:"#/$defs/SearchLexicalProximityV1"},maxItems:4,type:["array","null"]},limit:{description:"Maximum number of results to return (default: 10)",format:"uint64",minimum:0,type:["integer","null"]},prefer_symbol:{description:"Add a lexical route restricted to symbol-name matches for the identifier-shaped words of the query. Omitted, it runs when the query is name-shaped (at least half its content words are identifiers such as 'getUserById' or 'Foo::bar'); true forces it, false suppresses it. `query_route` in the response reports the decision and its margin. Query words such as class/struct/function/find/explain are ignored; 'Foo::bar' and 'Foo.bar' contribute 'bar'.",type:["boolean","null"]},query:{description:"Search query string to match against symbol names",type:"string"}},required:["query"],title:"SearchSurfaceRequestV1",type:"object"},{$defs:{ApplicationProblemDetailV1:m9,CalibrationProfileId:fR,CandidateContribution:fj,CodeIndexBuildBlockedReasonV1:fF,CodeIndexConvergenceParkedV1:fL,CodeIndexStalenessStateV1:fB,ComponentRevision:f0,ContextLexicalAnchorV1:hr,DaemonServiceUnitObservationV1:hF,DiagnosticsSearchedTsconfigV1:hG,EvidenceRole:h2,ExactClass:h4,FileOccurrenceId:yj,FixedPointScore:yT,FreshnessCompatibilityV1:yO,FusedCandidate:yE,LexicalAnchorDropReasonV1:g$,LexicalAnchorDropV1:gS,LogicalCopyClusterId:gw,LogicalEvidenceId:gV,OccurrenceProvenance:g5,PrimitiveFreshnessStateV1:_i,PrimitiveIndexingStateV1:_o,PrimitiveLaneCompleteV1:_n,PrimitiveRecallV1:_s,PrimitiveSearchFreshnessV1:_d,PrimitiveUnavailableEvidenceV1:_p,PrimitiveUnavailableStatusV1:_u,RankingDecision:_j,RankingDecisionKind:_C,RepositoryId:_z,RetrievalAnchorId:_J,RetrievalSourceRoleV1:_X,RetrieverKind:_1,ScoreDomainId:vm,SearchCompleteV1:{additionalProperties:!1,properties:{code_generation:{type:"string"},coverage:{$ref:"#/$defs/SearchCoverageV1"},external_import_hint:{anyOf:[{$ref:"#/$defs/SearchExternalImportHintV1"},{type:"null"}]},freshness:{$ref:"#/$defs/PrimitiveSearchFreshnessV1",description:"Freshness of the served code generation, derived from the typed lane\ncoverage and the daemon scheduler's worktree state."},lexical_anchors:{description:"Outcome of every caller `lexical_anchors` entry, beside the routes.",items:{$ref:"#/$defs/ContextLexicalAnchorV1"},type:["array","null"]},lexical_routes:{description:"Every lexical route fused into this page; present only when a route\nbeyond the strict query ran or ranked a result.",items:{$ref:"#/$defs/SearchLexicalRouteV1"},type:["array","null"]},next_cursor:{description:"Authenticated continuation for the next page; null on the last page.",type:["string","null"]},query_fallback_digest:{type:"string"},query_route:{anyOf:[{$ref:"#/$defs/SearchQueryRouteV1"},{type:"null"}],description:"Which lane the query's shape selected, and its margin."},results:{items:{$ref:"#/$defs/SearchResultRowV1"},type:"array"},scope_prefix:{description:"The session's scope prefix. Ranked candidates carry no file path, so\nthe scope is reported and not applied.",type:["string","null"]},scope_prefix_applied:{type:["boolean","null"]},verified_graph_evidence:{anyOf:[{$ref:"#/$defs/PrimitiveUnavailableEvidenceV1"},{type:"null"}]}},required:["freshness","code_generation","query_fallback_digest","coverage","results"],type:"object"},SearchCoverageV1:{additionalProperties:!1,description:"Per-lane recall of one search, so a full-recall answer is told apart from\none produced while a lane was down.",properties:{exact:{$ref:"#/$defs/SearchLaneStatusV1"},graph:{$ref:"#/$defs/SearchLaneStatusV1"},lexical:{$ref:"#/$defs/SearchLaneStatusV1"},recall:{$ref:"#/$defs/PrimitiveRecallV1"}},required:["exact","lexical","graph","recall"],type:"object"},SearchDisplayUnavailableV1:{description:"Why a ranked candidate's display metadata was not hydrated: the answering\ngeneration no longer matches the request (`stale`), its record is\nincompatible or does not bind the candidate (`incompatible`, `invalid`),\nthe read failed (`internal`), the hydration budget was spent\n(`budget_exceeded`), or the request was cancelled (`cancelled`).",enum:["stale","incompatible","invalid","internal","budget_exceeded","cancelled"],type:"string"},SearchExternalImportCandidatesV1:{additionalProperties:!1,properties:{candidates:{items:{$ref:"#/$defs/SearchExternalImportV1"},type:"array"},evidence:{type:"string"},message:{type:"string"},resolution_status:{type:"string"},suggested_action:{type:"string"}},required:["message","evidence","resolution_status","candidates","suggested_action"],type:"object"},SearchExternalImportHintV1:{anyOf:[{$ref:"#/$defs/SearchExternalImportCandidatesV1"},{$ref:"#/$defs/PrimitiveUnavailableEvidenceV1"}],description:"Advisory evidence that a sparse search matched external-module imports,\nor why that evidence could not be read."},SearchExternalImportV1:{additionalProperties:!1,properties:{import_file:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},module:{type:"string"},symbol:{description:"The imported name; null for a whole-module import.",type:["string","null"]}},required:["module","import_file","line"],type:"object"},SearchLaneStateV1:{description:"A lane that did not serve the current complete generation. A partial\nlane names its generation and reason when it has them, null otherwise.",oneOf:[{additionalProperties:!1,properties:{generation:{type:"string"},status:{const:"stale",type:"string"}},required:["status","generation"],type:"object"},{additionalProperties:!1,properties:{generation:{type:["string","null"]},reason:{type:["string","null"]},status:{const:"partial",type:"string"}},required:["status"],type:"object"},{additionalProperties:!1,properties:{reason:{type:"string"},status:{const:"unavailable",type:"string"}},required:["status","reason"],type:"object"}]},SearchLaneStatusV1:{anyOf:[{$ref:"#/$defs/PrimitiveLaneCompleteV1"},{$ref:"#/$defs/SearchLaneStateV1"}]},SearchLexicalAlternativeReasonV1:{description:"Why the lexical lane tried a configured alternative.",enum:["configured_vocabulary_alias"],type:"string"},SearchLexicalRouteV1:{description:"One lexical route fused into the page, with its display label.",oneOf:[{additionalProperties:!1,description:"The caller's strict lexical query.",properties:{label:{type:"string"},route:{const:"query",type:"string"}},required:["route","label"],type:"object"},{additionalProperties:!1,description:"One caller-supplied exact identifier or term.",properties:{anchor:{type:"string"},label:{type:"string"},route:{const:"anchor",type:"string"}},required:["route","anchor","label"],type:"object"},{additionalProperties:!1,description:"Identifier-shaped tokens of the query, restricted to symbol names.",properties:{label:{type:"string"},route:{const:"preferred_symbol",type:"string"},tokens:{items:{type:"string"},type:"array"}},required:["route","tokens","label"],type:"object"},{additionalProperties:!1,description:"Identifier and path components recovered from the strict query.",properties:{label:{type:"string"},route:{const:"identifier_split",type:"string"},strict_query:{type:"string"},terms:{items:{type:"string"},type:"array"}},required:["route","strict_query","terms","label"],type:"object"},{additionalProperties:!1,description:"A configured query-time vocabulary alternative.",properties:{alternative:{type:"string"},label:{type:"string"},reason:{$ref:"#/$defs/SearchLexicalAlternativeReasonV1"},route:{const:"alias",type:"string"},strict_query:{type:"string"}},required:["route","strict_query","alternative","reason","label"],type:"object"}]},SearchQueryRouteDeciderV1:{description:"Who chose the query route: the query-shape gate or the caller's\n`prefer_symbol`.",enum:["query_shape","caller"],type:"string"},SearchQueryRouteKindV1:{description:"Which lexical lane the query's shape selected.",oneOf:[{const:"name",description:"The symbol-name route ran beside the strict query.",type:"string"},{const:"prose",description:"The strict query ran without the symbol-name route.",type:"string"}]},SearchQueryRouteV1:{additionalProperties:!1,description:"The query-shape routing decision behind a page.",properties:{decided_by:{$ref:"#/$defs/SearchQueryRouteDeciderV1"},margin:{description:"Distance from the name gate in [-0.5, 0.5]: the share of the query's\ncontent words that are identifier-shaped, minus one half. The gate\nselects `name` at or above 0. Reported when the caller decided too.\nIt describes query shape only and is not an answerability signal.",format:"double",type:"number"},route:{$ref:"#/$defs/SearchQueryRouteKindV1"}},required:["route","margin","decided_by"],type:"object"},SearchResultDisplayV1:{additionalProperties:!1,properties:{kind:{type:"string"},name:{type:"string"},path:{type:"string"},qualified_name:{type:"string"}},required:["name","qualified_name","kind","path"],type:"object"},SearchResultRowV1:{additionalProperties:!1,description:"One ranked candidate with its generation-bound display metadata.",properties:{candidate:{$ref:"#/$defs/FusedCandidate"},display:{anyOf:[{$ref:"#/$defs/SearchResultDisplayV1"},{type:"null"}]},display_unavailable:{anyOf:[{$ref:"#/$defs/SearchDisplayUnavailableV1"},{type:"null"}],description:"Why `display` is absent from this ranked candidate."},final_ordinal:{format:"uint32",minimum:0,type:"integer"},lexical_routes:{description:"The lexical routes that ranked this candidate.",items:{$ref:"#/$defs/SearchRouteMatchV1"},type:["array","null"]},node_id:{description:"The graph symbol to read with `tracedecay_source_body`.",type:["string","null"]}},required:["candidate","final_ordinal"],type:"object"},SearchRouteMatchV1:{additionalProperties:!1,description:"One route that ranked a candidate, named by its route label.",properties:{matched_terms:{items:{type:"string"},type:"array"},route:{type:"string"},score_micros:{format:"uint64",minimum:0,type:"integer"},spelling_variants:{items:{$ref:"#/$defs/SearchSpellingVariantV1"},type:"array"}},required:["route","score_micros","matched_terms"],type:"object"},SearchSpellingVariantV1:{additionalProperties:!1,properties:{alternative:{type:"string"},query:{type:"string"}},required:["query","alternative"],type:"object"},SearchUnavailableV1:{additionalProperties:!1,properties:{code_generation:{type:["string","null"]},coverage:{$ref:"#/$defs/SearchCoverageV1"},detail:{anyOf:[{$ref:"#/$defs/ApplicationProblemDetailV1"},{type:"null"}],description:"Present when indexing is parked: its cause, remedy, and wake retry."},freshness:{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},query_fallback_digest:{description:"Always null: no fallback subpayload was produced.",type:["string","null"]},reason:{type:"string"},results:{description:"Always empty: no generation answered.",items:{$ref:"#/$defs/SearchResultRowV1"},type:"array"},status:{$ref:"#/$defs/PrimitiveUnavailableStatusV1"},verified_graph_evidence:{anyOf:[{$ref:"#/$defs/PrimitiveUnavailableEvidenceV1"},{type:"null"}]}},required:["freshness","results","status","reason","coverage"],type:"object"},SessionOrThreadId:vb,SourceFreshness:vW,SourceInstanceKey:vM,SourceNamespace:vz,SourceOccurrenceId:vD,UtcMicros:bs},$schema:"https://json-schema.org/draft/2020-12/schema",anyOf:[{$ref:"#/$defs/SearchCompleteV1"},{$ref:"#/$defs/SearchUnavailableV1"}],description:"What a search served: a ranked page, or the typed reason no generation\ncould answer.",title:"SearchResultV1"},{$defs:{PageRequest:_t,ResultProjection:_H,RetrievalOrder:_Z,RetrievalRequestMeta:_Q,SessionId:vv,TemporalModeV1:v6,UtcMicros:bs},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{meta:{$ref:"#/$defs/RetrievalRequestMeta"},session_id:{$ref:"#/$defs/SessionId"}},required:["session_id","meta"],title:"SessionLookupRequest",type:"object"},{$defs:{RetrievalAnchorId:_J},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{anchors:{items:{$ref:"#/$defs/RetrievalAnchorId"},type:"array"}},required:["anchors"],title:"SessionLookupResult",type:"object"},{$defs:{SessionRefreshFrontierV1:{additionalProperties:!1,properties:{committed_through:{format:"uint64",minimum:0,type:"integer"},observed_through:{format:"uint64",minimum:0,type:"integer"}},required:["observed_through","committed_through"],type:"object"},SessionRefreshGrainV1:{enum:["occurrence","logical_message","turn","session","thread","agent","summary"],type:"string"},SessionRefreshScopeV1:{description:"Session-store owner one refresh is bound to.\n\nThe caller selects the already-mounted project or profile authority. Exact\nprofile, project, repository, worktree, branch, store, and root identities\nstay daemon-owned and are resolved from that authority during admission.",oneOf:[{additionalProperties:!1,properties:{kind:{const:"project",type:"string"}},required:["kind"],type:"object"},{additionalProperties:!1,properties:{kind:{const:"profile",type:"string"}},required:["kind"],type:"object"}]},SessionRefreshSessionV1:{additionalProperties:!1,properties:{id:{type:"string"}},required:["id"],type:"object"},SessionRefreshSourceV1:{additionalProperties:!1,properties:{scope:{type:"string"}},required:["scope"],type:"object"},SessionRefreshTargetV1:{additionalProperties:!1,properties:{frontier:{$ref:"#/$defs/SessionRefreshFrontierV1"},grain:{$ref:"#/$defs/SessionRefreshGrainV1"},temporal_mode:{$ref:"#/$defs/TemporalModeV1"}},required:["temporal_mode","grain","frontier"],type:"object"},TemporalModeV1:v6,UtcMicros:bs},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Exact route-selected session-refresh request body.\n\nEach current route selects the action itself; `scope` selects the mounted\nsession-store owner. Project-scoped requests are served under project-open\nadmission, profile-scoped requests by the authenticated profile authority.",properties:{handle:{type:["string","null"]},scope:{$ref:"#/$defs/SessionRefreshScopeV1"},session:{$ref:"#/$defs/SessionRefreshSessionV1"},source:{$ref:"#/$defs/SessionRefreshSourceV1"},target:{$ref:"#/$defs/SessionRefreshTargetV1"}},required:["scope","session","source","target"],title:"SessionRefreshActionRequestV1",type:"object"},{$defs:{ClosedUtcIntervalV1:fW,RetainedErrorV1:_G,RetainedOutcomeStatusV1:_B,SessionCoverageIntervalV1:vh,SessionCoverageReasonV1:vy,SessionCoverageRequestV1:vg,SessionCoverageStateV1:v_,SessionRefreshFrontierResultV1:v$,SessionRefreshProgressV1:vS,SessionRefreshReceiptV1:vk,SessionRefreshTerminalStateResultV1:vw,SessionSourceCoverageV1:vP,TemporalCoverageV1:v0,TemporalModeV1:v6,UtcMicros:bs,ValidCoverageIntervalV1:bd},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{accepted_at:{format:"int64",type:["integer","null"]},error:{anyOf:[{$ref:"#/$defs/RetainedErrorV1"},{type:"null"}]},handle:{type:["string","null"]},operation_id:{type:["string","null"]},outcome:{$ref:"#/$defs/RetainedOutcomeStatusV1"},progress:{anyOf:[{$ref:"#/$defs/SessionRefreshProgressV1"},{type:"null"}]},receipt:{anyOf:[{$ref:"#/$defs/SessionRefreshReceiptV1"},{type:"null"}]},scope:{type:"string"},tool:{type:"string"}},required:["outcome","scope","tool"],title:"SessionRefreshBeginResultV1",type:"object"},{$defs:{ClosedUtcIntervalV1:fW,RetainedErrorV1:_G,RetainedOutcomeStatusV1:_B,SessionCoverageIntervalV1:vh,SessionCoverageReasonV1:vy,SessionCoverageRequestV1:vg,SessionCoverageStateV1:v_,SessionRefreshFrontierResultV1:v$,SessionRefreshProgressV1:vS,SessionRefreshReceiptV1:vk,SessionRefreshTerminalStateResultV1:vw,SessionSourceCoverageV1:vP,TemporalCoverageV1:v0,TemporalModeV1:v6,UtcMicros:bs,ValidCoverageIntervalV1:bd},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{accepted_at:{format:"int64",type:["integer","null"]},error:{anyOf:[{$ref:"#/$defs/RetainedErrorV1"},{type:"null"}]},handle:{type:["string","null"]},operation_id:{type:["string","null"]},outcome:{$ref:"#/$defs/RetainedOutcomeStatusV1"},progress:{anyOf:[{$ref:"#/$defs/SessionRefreshProgressV1"},{type:"null"}]},receipt:{anyOf:[{$ref:"#/$defs/SessionRefreshReceiptV1"},{type:"null"}]},scope:{type:"string"},tool:{type:"string"}},required:["outcome","scope","tool"],title:"SessionRefreshCancelResultV1",type:"object"},{$defs:{ClosedUtcIntervalV1:fW,RetainedErrorV1:_G,RetainedOutcomeStatusV1:_B,SessionCoverageIntervalV1:vh,SessionCoverageReasonV1:vy,SessionCoverageRequestV1:vg,SessionCoverageStateV1:v_,SessionRefreshFrontierResultV1:v$,SessionRefreshProgressV1:vS,SessionRefreshReceiptV1:vk,SessionRefreshTerminalStateResultV1:vw,SessionSourceCoverageV1:vP,TemporalCoverageV1:v0,TemporalModeV1:v6,UtcMicros:bs,ValidCoverageIntervalV1:bd},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{error:{anyOf:[{$ref:"#/$defs/RetainedErrorV1"},{type:"null"}]},outcome:{$ref:"#/$defs/RetainedOutcomeStatusV1"},progress:{anyOf:[{$ref:"#/$defs/SessionRefreshProgressV1"},{type:"null"}]},receipt:{anyOf:[{$ref:"#/$defs/SessionRefreshReceiptV1"},{type:"null"}]},scope:{type:"string"},tool:{type:"string"}},required:["outcome","scope","tool"],title:"SessionRefreshStatusResultV1",type:"object"},{$defs:{RetainedTimeFilterV1:_K,SessionGitRefV1:{enum:["branch","worktree","commit"],type:"string"},SessionGitRelationV1:{enum:["produced","observed","all"],type:"string"}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{git_ref:{$ref:"#/$defs/SessionGitRefV1"},limit:{format:"uint64",minimum:0,type:["integer","null"]},relation:{anyOf:[{$ref:"#/$defs/SessionGitRelationV1"},{type:"null"}]},since:{anyOf:[{$ref:"#/$defs/RetainedTimeFilterV1"},{type:"null"}]},until:{anyOf:[{$ref:"#/$defs/RetainedTimeFilterV1"},{type:"null"}]},value:{type:"string"}},required:["git_ref","value"],title:"SessionsForRequestV1",type:"object"},{$defs:{CorrelationIndexCountModeV1:{enum:["presence_only"],type:"string"},CorrelationIndexV1:{additionalProperties:!1,properties:{backfill_watermark:{format:"int64",type:["integer","null"]},commit_count:{format:"uint64",minimum:0,type:["integer","null"]},commits_present:{type:"boolean"},count_mode:{$ref:"#/$defs/CorrelationIndexCountModeV1"},generation:{type:["string","null"]},projection_available:{type:"boolean"},source_watermark:{type:["string","null"]},span_count:{format:"uint64",minimum:0,type:["integer","null"]},spans_present:{type:"boolean"}},required:["projection_available","spans_present","commits_present","count_mode"],type:"object"},RetainedOutcomeStatusV1:_B,SessionCorrelationHitV1:{additionalProperties:!1,properties:{branch:{type:["string","null"]},commit_sha:{type:["string","null"]},committed_at:{format:"int64",type:["integer","null"]},confidence:{format:"int64",type:["integer","null"]},event_count:{format:"int64",type:"integer"},evidence:{type:["string","null"]},evidence_message_id:{type:["string","null"]},first_ts:{format:"int64",type:["integer","null"]},last_ts:{format:"int64",type:["integer","null"]},provider:{type:"string"},relation:{type:["string","null"]},session_id:{type:"string"},sources:{items:{type:"string"},type:"array"},span_count:{format:"int64",type:"integer"},span_overlap_kind:{type:["string","null"]},worktree:{type:["string","null"]}},required:["provider","session_id","event_count","span_count","sources"],type:"object"}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{count:{format:"uint",minimum:0,type:"integer"},git_ref:{type:["string","null"]},index:{anyOf:[{$ref:"#/$defs/CorrelationIndexV1"},{type:"null"}]},index_empty:{type:["boolean","null"]},message:{type:["string","null"]},observed_count:{format:"uint",minimum:0,type:["integer","null"]},observed_sessions:{items:{$ref:"#/$defs/SessionCorrelationHitV1"},type:["array","null"]},problem_code:{type:["string","null"]},relation:{type:["string","null"]},results:{items:{$ref:"#/$defs/SessionCorrelationHitV1"},type:"array"},since:{format:"int64",type:["integer","null"]},status:{$ref:"#/$defs/RetainedOutcomeStatusV1"},until:{format:"int64",type:["integer","null"]},value:{type:["string","null"]}},required:["count","results","status"],title:"SessionsForResultV1",type:"object"},{$defs:{NodeExpansionCostV1:g4,SymbolSignatureV1:{additionalProperties:!1,properties:{cost_to_expand:{$ref:"#/$defs/NodeExpansionCostV1"},docstring:{type:["string","null"]},end_line:{format:"uint32",minimum:0,type:"integer"},file:{type:"string"},is_async:{type:"boolean"},kind:{type:"string"},name:{type:"string"},node_id:{type:"string"},qualified_name:{type:"string"},signature:{type:["string","null"]},start_line:{format:"uint32",minimum:0,type:"integer"},unavailable_fields:{items:{type:"string"},type:"array"},visibility:{type:"string"}},required:["node_id","name","qualified_name","kind","visibility","is_async","file","start_line","end_line","cost_to_expand","unavailable_fields"],type:"object"}},$schema:"https://json-schema.org/draft/2020-12/schema",items:{$ref:"#/$defs/SymbolSignatureV1"},title:"Array_of_SymbolSignatureV1",type:"array"},{$defs:{ProjectId:_m,RepositoryId:_z,SimilarMatchClassV1:vx,SimilarTargetV1:{oneOf:[{additionalProperties:!1,properties:{kind:{const:"symbol_occurrence",type:"string"},symbol_occurrence_id:{$ref:"#/$defs/SymbolOccurrenceId"}},required:["kind","symbol_occurrence_id"],type:"object"},{additionalProperties:!1,properties:{kind:{const:"source_range",type:"string"},path:{type:"string"},span:{$ref:"#/$defs/SourceSpan"}},required:["kind","path","span"],type:"object"}]},SourceSpan:vF,SymbolOccurrenceId:vJ},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{cursor:{type:["string","null"]},match_classes:{items:{$ref:"#/$defs/SimilarMatchClassV1"},type:"array"},project_id:{$ref:"#/$defs/ProjectId"},repository_id:{$ref:"#/$defs/RepositoryId"},result_limit:{description:"Preferred result page size.",format:"uint32",minimum:0,type:"integer"},target:{$ref:"#/$defs/SimilarTargetV1"},work_limit:{format:"uint32",minimum:0,type:"integer"}},required:["project_id","repository_id","target","match_classes","result_limit","work_limit"],title:"SimilarSurfaceRequestV1",type:"object"},{$defs:{CodeGenerationId:fz,CodeIndexBuildBlockedReasonV1:fF,CodeIndexConvergenceParkedV1:fL,CodeIndexStalenessStateV1:fB,ManifestDigest:gj,PrimitiveFreshnessStateV1:_i,PrimitiveIndexingStateV1:_o,PrimitiveSearchFreshnessV1:_d,ProjectId:_m,RepositoryId:_z,SimilarCoverageV1:{oneOf:[{additionalProperties:!1,properties:{status:{const:"complete",type:"string"}},required:["status"],type:"object"},{additionalProperties:!1,properties:{status:{const:"partial",type:"string"}},required:["status"],type:"object"},{additionalProperties:!1,properties:{minimum_tokens:{format:"uint32",minimum:0,type:"integer"},status:{const:"excluded_too_small",type:"string"}},required:["status","minimum_tokens"],type:"object"},{additionalProperties:!1,properties:{maximum_bytes:{format:"uint64",minimum:0,type:"integer"},maximum_tokens:{format:"uint32",minimum:0,type:"integer"},status:{const:"excluded_too_large",type:"string"}},required:["status","maximum_tokens","maximum_bytes"],type:"object"},{additionalProperties:!1,properties:{status:{const:"excluded_incomplete_tokenization",type:"string"}},required:["status"],type:"object"}]},SimilarFamilyV1:vI,SimilarMatchClassV1:vx,SimilarOccurrenceV1:vj,SourceSpan:vF,SymbolOccurrenceId:vJ,WorktreeId:So},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{coverage:{$ref:"#/$defs/SimilarCoverageV1"},families:{items:{$ref:"#/$defs/SimilarFamilyV1"},type:"array"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},source:{$ref:"#/$defs/SimilarOccurrenceV1"},source_generation:{$ref:"#/$defs/CodeGenerationId"}},required:["source","families","source_generation","coverage"],title:"SimilarResultV1",type:"object"},{$defs:{ManagedSkillState:gx},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{include_body:{default:!1,description:"If true, include each skill's body_markdown in the list response\n(default: false).",type:"boolean"},state:{anyOf:[{$ref:"#/$defs/ManagedSkillState"},{type:"null"}],description:"Optional managed-skill lifecycle state filter."}},title:"SkillListSurfaceRequestV1",type:"object"},{$defs:{AutomationReadStatusV1:fn,ManagedSkillMaterializationScope:gP,ManagedSkillMetadata:gR,ManagedSkillProvenance:gq,ManagedSkillSource:gI,ManagedSkillState:gx,SkillImprovementRecommendation:vC,SkillInstallTarget:vT,SkillListEntryV1:{additionalProperties:!1,properties:{body_markdown:{description:"Present only when the request asked for bodies.",type:["string","null"]},improvement_recommendation:{anyOf:[{$ref:"#/$defs/SkillImprovementRecommendation"},{type:"null"}]},metadata:{$ref:"#/$defs/ManagedSkillMetadata"},stale_recommendation:{anyOf:[{$ref:"#/$defs/SkillStaleRecommendation"},{type:"null"}]},support_file_count:{format:"uint",minimum:0,type:"integer"},support_file_paths:{items:{type:"string"},type:"array"},usage_summary:{$ref:"#/$defs/SkillUsageRecord"}},required:["metadata","support_file_count","support_file_paths","usage_summary"],type:"object"},SkillStaleRecommendation:vO,SkillUsageRecord:vE},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{count:{format:"uint",minimum:0,type:"integer"},profile_root:{type:"string"},skills:{items:{$ref:"#/$defs/SkillListEntryV1"},type:"array"},status:{$ref:"#/$defs/AutomationReadStatusV1"}},required:["status","profile_root","count","skills"],title:"SkillListResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{id:{description:"Managed skill id to read.",type:"string"},include_support_files:{default:!1,description:"Include support-file byte payloads. Default false; the response still\nlists each path and byte length.",type:"boolean"}},required:["id"],title:"SkillViewSurfaceRequestV1",type:"object"},{$defs:{AutomationReadStatusV1:fn,ManagedSkill:{properties:{body_markdown:{type:"string"},metadata:{$ref:"#/$defs/ManagedSkillMetadata"},support_files:{items:{$ref:"#/$defs/ManagedSupportFile"},type:"array"}},required:["metadata","body_markdown","support_files"],type:"object"},ManagedSkillMaterializationScope:gP,ManagedSkillMetadata:gR,ManagedSkillProvenance:gq,ManagedSkillSource:gI,ManagedSkillState:gx,ManagedSupportFile:{properties:{bytes:{items:{format:"uint8",maximum:255,minimum:0,type:"integer"},type:"array"},path:{type:"string"}},required:["path","bytes"],type:"object"},SkillImprovementRecommendation:vC,SkillInstallTarget:vT,SkillStaleRecommendation:vO,SkillSupportFileSummaryV1:{additionalProperties:!1,properties:{byte_len:{format:"uint",minimum:0,type:"integer"},path:{type:"string"}},required:["path","byte_len"],type:"object"},SkillUsageRecord:vE},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{improvement_recommendation:{anyOf:[{$ref:"#/$defs/SkillImprovementRecommendation"},{type:"null"}]},profile_root:{type:"string"},skill:{$ref:"#/$defs/ManagedSkill",description:"The skill package; `support_files` is empty unless the request\nincluded them."},stale_recommendation:{anyOf:[{$ref:"#/$defs/SkillStaleRecommendation"},{type:"null"}]},status:{$ref:"#/$defs/AutomationReadStatusV1"},support_file_summaries:{items:{$ref:"#/$defs/SkillSupportFileSummaryV1"},type:"array"},support_files_included:{type:"boolean"},usage_summary:{$ref:"#/$defs/SkillUsageRecord"}},required:["status","profile_root","skill","usage_summary","support_files_included","support_file_summaries"],title:"SkillViewResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{node_id:{type:"string"}},required:["node_id"],title:"SourceBodyPrimitiveRequest",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{body:{type:"string"},end_line:{format:"uint32",minimum:0,type:"integer"},file:{type:"string"},node_id:{type:"string"},start_line:{format:"uint32",minimum:0,type:"integer"}},required:["node_id","file","start_line","end_line","body"],title:"SourceBodyPrimitiveResult",type:"object"},{$defs:{ManifestDigest:gj,UseCaseId:bn},$schema:"https://json-schema.org/draft/2020-12/schema",description:"Exact public input accepted by `tracedecay_source_edit_reconcile`.",oneOf:[{additionalProperties:!1,description:"Exact public input accepted by `tracedecay_source_edit_reconcile`.",properties:{attempt_idempotency_key:{type:"string"},confirm:{default:!1,type:"boolean"},disposition:{const:"inspect",type:"string"},effect_id:{type:"string"},idempotency_key:{type:"string"},input_digest:{type:"string"},original_operation:{$ref:"#/$defs/UseCaseId"}},required:["original_operation","effect_id","idempotency_key","attempt_idempotency_key","input_digest","disposition"],type:"object"},{additionalProperties:!1,description:"Exact public input accepted by `tracedecay_source_edit_reconcile`.",properties:{attempt_idempotency_key:{type:"string"},committed_state:{$ref:"#/$defs/ManifestDigest"},confirm:{default:!1,type:"boolean"},disposition:{const:"confirm_committed",type:"string"},effect_id:{type:"string"},idempotency_key:{type:"string"},input_digest:{type:"string"},original_operation:{$ref:"#/$defs/UseCaseId"}},required:["original_operation","effect_id","idempotency_key","attempt_idempotency_key","input_digest","disposition","committed_state"],type:"object"},{additionalProperties:!1,description:"Exact public input accepted by `tracedecay_source_edit_reconcile`.",properties:{attempt_idempotency_key:{type:"string"},confirm:{default:!1,type:"boolean"},disposition:{const:"confirm_unchanged",type:"string"},effect_id:{type:"string"},idempotency_key:{type:"string"},input_digest:{type:"string"},original_operation:{$ref:"#/$defs/UseCaseId"}},required:["original_operation","effect_id","idempotency_key","attempt_idempotency_key","input_digest","disposition"],type:"object"},{additionalProperties:!1,description:"Exact public input accepted by `tracedecay_source_edit_reconcile`.",properties:{attempt_idempotency_key:{type:"string"},confirm:{default:!1,type:"boolean"},disposition:{const:"acknowledge_partial",type:"string"},effect_id:{type:"string"},idempotency_key:{type:"string"},input_digest:{type:"string"},observed_state:{$ref:"#/$defs/ManifestDigest"},original_operation:{$ref:"#/$defs/UseCaseId"}},required:["original_operation","effect_id","idempotency_key","attempt_idempotency_key","input_digest","disposition","observed_state"],type:"object"}],title:"SourceEditReconcileSurfaceRequestV1",type:"object"},{$defs:{FileOccurrenceId:yj,PageRequest:_t,ResultProjection:_H,RetrievalOrder:_Z,RetrievalRequestMeta:_Q,SourceSpan:vF,TemporalModeV1:v6,UtcMicros:bs},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{file:{$ref:"#/$defs/FileOccurrenceId",description:"Canonical file occurrence from `code_exact_occurrence` at\n`items[].occurrence.file`; a logical path is not a file occurrence identity."},meta:{$ref:"#/$defs/RetrievalRequestMeta"},span:{$ref:"#/$defs/SourceSpan"}},required:["file","span","meta"],title:"SourceLinesRequest",type:"object"},{$defs:{RetrievalAnchorId:_J,SourceReference:{additionalProperties:!1,properties:{anchor:{$ref:"#/$defs/RetrievalAnchorId"},span:{$ref:"#/$defs/SourceSpan"}},required:["anchor","span"],type:"object"},SourceSpan:vF},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{body:{type:["string","null"]},file:{type:["string","null"]},references:{items:{$ref:"#/$defs/SourceReference"},type:"array"}},required:["references"],title:"SourceLinesResult",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{file:{type:"string"}},required:["file"],title:"SourceOutlinePrimitiveRequest",type:"object"},{$defs:{SymbolPrimitiveRecord:vZ},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{file:{type:"string"},symbols:{items:{$ref:"#/$defs/SymbolPrimitiveRecord"},type:"array"}},required:["file","symbols"],title:"SourceOutlinePrimitiveResult",type:"object"},{$defs:{BranchStackEdgeV1:fv,BranchStackId:fb,BranchStackNodeV1:f$,BranchStackRevisionId:fS,CommitId:fX,ManifestDigest:gj,NativeIntegrationDirectionV1:gK,NativeIntegrationSelectionDeclarationV1:{description:"Explicit caller declaration for one native-integration selection.\n\nDeclared stacks contain the visible nodes and edges, while the daemon\nderives canonical order and the revision digest through the domain\nconstructor. Callers cannot submit either derived field.",oneOf:[{additionalProperties:!1,properties:{binding:{additionalProperties:!1,properties:{destination_node_id:{$ref:"#/$defs/StackNodeId"},direction:{$ref:"#/$defs/NativeIntegrationDirectionV1"},edges:{items:{$ref:"#/$defs/BranchStackEdgeV1"},type:"array"},nodes:{items:{$ref:"#/$defs/BranchStackNodeV1"},type:"array"},revision_id:{$ref:"#/$defs/BranchStackRevisionId"},source_node_id:{$ref:"#/$defs/StackNodeId"},stack_id:{$ref:"#/$defs/BranchStackId"}},required:["stack_id","revision_id","nodes","edges","source_node_id","destination_node_id","direction"],type:"object"},kind:{const:"declared_stack_edge",type:"string"}},required:["kind","binding"],type:"object"},{additionalProperties:!1,properties:{binding:{additionalProperties:!1,properties:{destination_ref:{$ref:"#/$defs/RefId"},proposal_digest:{$ref:"#/$defs/ManifestDigest"},source_ref:{$ref:"#/$defs/RefId"}},required:["proposal_digest","source_ref","destination_ref"],type:"object"},kind:{const:"independent_branch",type:"string"}},required:["kind","binding"],type:"object"}]},ProjectId:_m,RefId:_T,RepositoryId:_z,ResolvedScope:_U,ScopeSetId:vc,ScopeSetRevision:vl,StackNodeId:vH,WorktreeId:So,WorktreeInventoryEpoch:Sn,WorktreeInventorySnapshotId:Sa},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Exact caller-supplied identity frozen by `stack_snapshot`.\n\nThis proof binds the exact authorized `ProjectId`, `RepositoryId`, source\nand destination worktree/ref identity, frozen inventory, scope/grant/policy\nrevisions, and one declared-edge or independent-branch selection. Paths,\nfree-form SHA values, branch display names, and provider topology remain\nunrepresentable.",properties:{authorized_scope_set_digest:{$ref:"#/$defs/ManifestDigest"},authorized_scope_set_id:{$ref:"#/$defs/ScopeSetId"},authorized_scope_set_revision:{$ref:"#/$defs/ScopeSetRevision"},destination:{$ref:"#/$defs/ResolvedScope"},grant_digest:{$ref:"#/$defs/ManifestDigest"},inventory_epoch:{$ref:"#/$defs/WorktreeInventoryEpoch"},inventory_snapshot_id:{$ref:"#/$defs/WorktreeInventorySnapshotId"},policy_digest:{$ref:"#/$defs/ManifestDigest"},selection:{$ref:"#/$defs/NativeIntegrationSelectionDeclarationV1"},source:{$ref:"#/$defs/ResolvedScope"}},required:["source","destination","authorized_scope_set_id","authorized_scope_set_revision","authorized_scope_set_digest","inventory_snapshot_id","inventory_epoch","selection","grant_digest","policy_digest"],title:"NativeIntegrationStackSnapshotSurfaceRequest",type:"object"},{$defs:{CodeIndexReadinessTargetV1:{description:"The readiness a status caller can wait for.",oneOf:[{const:"fresh",description:"A sealed complete generation serves exact and lexical reads for the\ncurrent source: `code_index_freshness.status` is `current`.",type:"string"},{const:"ready",description:"`fresh`, and the generation's native code graph also serves.",type:"string"},{const:"graph_ready",description:"A published generation's native code graph serves and no convergence\npark is set, whatever the source freshness. Waiting for it never\nsweeps the source, so it cannot arm the reconcile it would observe.",type:"string"}]},CodeIndexReadinessWaitV1:{additionalProperties:!1,description:"`tracedecay_status` `wait_for`: hold the status read until the worktree\nreaches `state`, for at most the caller's `timeout_ms`.",properties:{state:{$ref:"#/$defs/CodeIndexReadinessTargetV1"},timeout_ms:{format:"uint64",minimum:0,type:"integer"}},required:["state","timeout_ms"],type:"object"}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{admission_only:{default:!1,description:"Report only that the project route is admitted, reading no graph,\nindex, or session state. Default false.",type:"boolean"},include_branch_diagnostics:{default:!1,description:"Full tracked-branch diagnostic list. Default false.",type:"boolean"},include_session_ingest:{default:!1,description:"Session-ingest health. Default false.",type:"boolean"},include_staleness:{default:!1,description:"Git staleness object. Default false.",type:"boolean"},include_storage_health:{default:!1,description:"Storage-health snapshot. Default false.",type:"boolean"},wait_for:{anyOf:[{$ref:"#/$defs/CodeIndexReadinessWaitV1"},{type:"null"}],description:"Hold the status read until the code index reaches `state` (`fresh`:\nstatus `current`; `ready`: also native graph serving; `graph_ready`: a\npublished generation's native graph serves, whatever the freshness),\nfor at most `timeout_ms`. The payload's `wait` reports `reached`,\n`timed_out` with `last_state`, or `unavailable` with `reason`."}},title:"StatusSurfaceRequestV1",type:"object"},{$defs:{CodeCloneIndexBudgetsV1:{description:"Fixed automatic clone-discovery limits.",properties:{minimum_body_tokens:{format:"uint64",minimum:0,type:"integer"}},required:["minimum_body_tokens"],type:"object"},CodeCloneIndexCoverageV1:{description:"Coverage retained by one clone-index artifact or in-progress successor.\n\nCounts are `None` until the clone artifact has observed the corresponding\ndenominator. A complete empty repository reports `Some(0)`, which keeps a\ndesigned zero distinct from unavailable coverage.",properties:{conservative_normalized_bodies:{description:"Eligible bodies with a conservative exact posting.",format:"uint64",minimum:0,type:["integer","null"]},eligible_source_bodies:{description:"Source bodies admitted for automatic clone discovery.",format:"uint64",minimum:0,type:["integer","null"]},exact_postings:{description:"Conservative and rename-normalized exact posting rows.",format:"uint64",minimum:0,type:["integer","null"]},excluded_incomplete_tokenization_bodies:{description:"Bodies excluded because conservative tokenization was incomplete.",format:"uint64",minimum:0,type:["integer","null"]},excluded_too_large_bodies:{description:"Bodies excluded because they exceed the automatic-discovery token maximum.",format:"uint64",minimum:0,type:["integer","null"]},excluded_too_small_bodies:{description:"Bodies excluded because they are below the automatic-discovery minimum.",format:"uint64",minimum:0,type:["integer","null"]},payloads_reused:{description:"Current payload occurrences reused from the preceding generation.",format:"uint64",minimum:0,type:["integer","null"]},rename_normalized_bodies:{description:"Eligible bodies with a complete rename-normalized exact posting.",format:"uint64",minimum:0,type:["integer","null"]},rename_partial_bodies:{description:"Eligible bodies whose rename normalization is partial.",format:"uint64",minimum:0,type:["integer","null"]},rename_unsupported_bodies:{description:"Eligible bodies whose language has no rename normalization.",format:"uint64",minimum:0,type:["integer","null"]},source_bodies:{description:"Clone body occurrences observed in the sealed lexical source.",format:"uint64",minimum:0,type:["integer","null"]},unique_payloads:{description:"Distinct content-addressed payloads retained by the artifact.",format:"uint64",minimum:0,type:["integer","null"]}},type:"object"},CodeCloneIndexObservationV1:{description:"Generation-pinned clone-index evidence shared by non-error readiness states.",properties:{artifact_format_revision:{format:"uint32",minimum:0,type:["integer","null"]},budgets:{$ref:"#/$defs/CodeCloneIndexBudgetsV1"},conservative_normalization_revision:{format:"uint16",maximum:65535,minimum:0,type:"integer"},coverage:{$ref:"#/$defs/CodeCloneIndexCoverageV1"},generation_id:{type:"string"},rename_normalization_revision:{format:"uint16",maximum:65535,minimum:0,type:"integer"},resources:{$ref:"#/$defs/CodeCloneIndexResourcesV1"},source_revision:{type:["string","null"]}},required:["generation_id","conservative_normalization_revision","rename_normalization_revision","coverage","budgets","resources"],type:"object"},CodeCloneIndexResourcesV1:{description:"Measured resources and update accounting for one clone-index generation.",properties:{bytes_on_disk:{description:"Durable artifact bytes.",format:"uint64",minimum:0,type:["integer","null"]},changed_symbol_update_micros:{description:"Latest observed source-edit arrival through clone-ready publication.",format:"uint64",minimum:0,type:["integer","null"]},peak_scratch_memory_bytes:{description:"Largest measured clone-row serialization scratch during the build.",format:"uint64",minimum:0,type:["integer","null"]},stale_invalidations:{description:"Prior clone payload bindings invalidated by the latest publication.",format:"uint64",minimum:0,type:["integer","null"]}},type:"object"},CodeCloneIndexStatusV1:{description:"Clone readiness, independent from lexical and graph serving.",oneOf:[{description:"The sealed lexical artifact or its clone rows cannot be read.",properties:{reason:{type:"string"},state:{const:"unavailable",type:"string"}},required:["state","reason"],type:"object"},{description:"Some clone evidence is readable, but required postings are missing.",properties:{observation:{$ref:"#/$defs/CodeCloneIndexObservationV1"},omission_reasons:{items:{type:"string"},type:"array"},state:{const:"partial",type:"string"}},required:["state","observation","omission_reasons"],type:"object"},{description:"Required exact postings cover every eligible body.",properties:{observation:{$ref:"#/$defs/CodeCloneIndexObservationV1"},state:{const:"ready",type:"string"}},required:["state","observation"],type:"object"},{description:"The artifact is readable but belongs to a superseded source generation.",properties:{observation:{$ref:"#/$defs/CodeCloneIndexObservationV1"},reason:{type:"string"},state:{const:"stale",type:"string"}},required:["state","observation","reason"],type:"object"}]},CodeGraphServingReadinessV1:{description:"Interactive graph-serving state for the latest sealed generation.\n\nA sealed generation can expose truthful census statistics before its graph\nprojection is ready to serve queries, so readiness is reported separately.",oneOf:[{description:"No graph-serving authority exists for this worktree or generation.",properties:{reason:{type:"string"},state:{const:"unavailable",type:"string"}},required:["state","reason"],type:"object"},{description:"The sealed generation exists, but graph activation has not completed.",properties:{state:{const:"pending",type:"string"}},required:["state"],type:"object"},{description:"Graph activation completed without a serving projection.",properties:{reason:{type:"string"},state:{const:"refused",type:"string"}},required:["state","reason"],type:"object"},{description:"The verified graph projection is installed, but the engine or catalog\nits reads need is not resident: it is still being built, or it was\nreleased for memory. Graph reads answer the retryable warming state\nand restore it.",properties:{reason:{type:"string"},state:{const:"warming",type:"string"}},required:["state","reason"],type:"object"},{description:"The verified graph projection is installed for interactive reads.",properties:{state:{const:"ready",type:"string"}},required:["state"],type:"object"}]},CodeIndexBuildBlockedReasonV1:fF,CodeIndexBuildPhaseV1:{description:"The durable build phase whose committed boundary the dashboard is reading.\n\nA phase is not inferred from scheduler state. The mounted registry publishes\nthe exact phase that owns the active generation.",oneOf:[{enum:["source_scan","relational_preparation","bulk_commit","index_build","verification","ready"],type:"string"},{const:"graph_publication",description:"Text serving is built and the pass that sealed the generation is\nstill publishing its native graph.",type:"string"}]},CodeIndexBuildProgressV1:{description:"The latest committed progress boundary for one active code-index generation.\n\nEvery count is scoped to `generation_id`. The snapshot never includes a\nstaged page: work is reported only after the batch that owns it commits.",properties:{blocked_reason:{anyOf:[{$ref:"#/$defs/CodeIndexBuildBlockedReasonV1"},{type:"null"}],description:"Reason the active generation cannot currently advance, when known."},committed_chunks:{description:"Search chunks committed to the artifact database.",format:"uint64",minimum:0,type:"integer"},committed_imports:{description:"Import evidence rows committed to the artifact database.",format:"uint64",minimum:0,type:"integer"},committed_pages:{description:"Source pages committed to the artifact database.",format:"uint64",minimum:0,type:"integer"},committed_payload_bytes:{description:"Payload bytes committed to the artifact database.",format:"uint64",minimum:0,type:"integer"},completed_files:{description:"Authenticated sealed-source file boundary completed by committed work.",format:"uint64",minimum:0,type:"integer"},completed_lexical_units:{description:"Authenticated lexical-span boundary completed by committed work, in the\nsealed source's own advance unit.\n\nThe unit is the source's, not this surface's: a sealed-layout source\nadvances over the files-array byte span, while a published or\npartitioned source advances over file ordinals because its file records\nare not a contiguous byte range at all. Both are monotone and share the\ndenominator below, so completion and the derived estimate are truthful;\nnaming them bytes was not, and a consumer that multiplied this by an\naverage file size was wrong by orders of magnitude (issue #1205).",format:"uint64",minimum:0,type:"integer"},current_batch_pages:{description:"Source pages in the batch currently being processed.",format:"uint64",minimum:0,type:"integer"},current_batch_payload_bytes:{description:"Sealed payload bytes in the batch currently being processed.",format:"uint64",minimum:0,type:"integer"},daemon_incarnation:{description:"Durable daemon-authority epoch that produced this snapshot.\n\nThis orders snapshots across daemon restarts without relying on wall\nclock time.",format:"uint64",minimum:0,type:"integer"},elapsed_micros:{description:"Monotonic elapsed time for this process's active generation build.",format:"uint64",minimum:0,type:"integer"},estimated_remaining_seconds:{description:"Estimated remaining build duration, absent without a truthful rate.",format:"uint64",minimum:0,type:["integer","null"]},files_per_second:{description:"Rolling committed-file throughput, absent until it is established.",format:"double",type:["number","null"]},generation_id:{description:"Exact generation receiving the committed build work.",type:"string"},last_commit_latency_micros:{description:"Duration of the last committed SQLite batch, when one exists.",format:"uint64",minimum:0,type:["integer","null"]},last_progress_micros:{description:"Unix-epoch timestamp of the last durable progress publication.",format:"int64",type:"integer"},lexical_units_per_second:{description:"Rolling committed lexical-span throughput in units per second, absent\nuntil it is established. Not a byte rate; see\n[`Self::completed_lexical_units`].",format:"double",type:["number","null"]},phase:{$ref:"#/$defs/CodeIndexBuildPhaseV1",description:"Durable pipeline phase that published this snapshot."},producer_incarnation:{description:"Registry-minted scheduler incarnation within one daemon.\n\nA worktree retirement/remount creates a new value. `progress_epoch` is\ncomparable only when both incarnation fields match.",format:"uint64",minimum:0,type:"integer"},progress_epoch:{description:"Monotonic publication epoch for replacing delayed progress reads.",format:"uint64",minimum:0,type:"integer"},sealed_source_digest:{description:"Identity of the sealed source whose authenticated bounds define progress.",type:"string"},total_files:{description:"Authenticated sealed-source file bound for this generation.",format:"uint64",minimum:0,type:"integer"},total_lexical_units:{description:"Authenticated lexical-span bound for this generation, in the same unit\nas [`Self::completed_lexical_units`].",format:"uint64",minimum:0,type:"integer"}},required:["generation_id","daemon_incarnation","producer_incarnation","progress_epoch","sealed_source_digest","phase","committed_pages","committed_chunks","committed_imports","committed_payload_bytes","completed_files","total_files","completed_lexical_units","total_lexical_units","current_batch_pages","current_batch_payload_bytes","elapsed_micros","last_progress_micros"],type:"object"},CodeIndexConvergenceParkedV1:fL,CodeIndexFreshnessCoverageV1:{description:"Coverage of one freshness read. Distinct from [`CodeIndexStalenessStateV1`]:\na generation can be fresh and still omit hook-hint counts, or unverified\nwhile the ladder would otherwise say ready.\n\n`Unobserved` is only the constructed default. A projected read never emits\nit, so an absent observation cannot be mistaken for `complete`.",oneOf:[{enum:["unobserved","complete","partial_refresh_in_progress","partial_artifact_restore","partial_source_verification","partial_unverified_restore","partial_hook_hint_overflow"],type:"string"},{const:"partial_omitted_sources",description:"The sealed generation is fresh for every source it can index, and\n[`CodeIndexWorktreeFreshnessV1::omitted_sources`] names the sources it\ncannot. Waiting cannot change it.",type:"string"}]},CodeIndexGenerationRecoveryServingV1:{description:"Serving disposition of an incompatible generation during recovery.",enum:["preserved","refused"],type:"string"},CodeIndexGenerationRecoveryV1:{description:"Recovery state for a durable generation sealed under a different production\nowner configuration.",properties:{incompatibilities:{description:"Stable owner-input reason codes reported by the code-index authority.",items:{type:"string"},type:"array"},incompatible_generation_id:{description:"Generation retired from incremental reuse.",type:"string"},serving:{$ref:"#/$defs/CodeIndexGenerationRecoveryServingV1",description:"Whether the prior generation may continue serving while its replacement\nbuilds under the current configuration."}},required:["incompatible_generation_id","incompatibilities","serving"],type:"object"},CodeIndexOmittedSourceV1:fU,CodeIndexOmittedSourcesV1:fH,CodeIndexReadinessWaitOutcomeV1:{description:"How a `wait_for` status read ended. The status payload beside it is read\nafter the wait ends.",oneOf:[{properties:{outcome:{const:"reached",type:"string"}},required:["outcome"],type:"object"},{description:"The caller's budget elapsed; `last_state` is the last observed\n`code_index_freshness.status`.",properties:{last_state:{type:"string"},outcome:{const:"timed_out",type:"string"}},required:["outcome","last_state"],type:"object"},{description:"Waiting cannot reach the target: no scheduler is mounted, graph\nserving was refused, convergence is parked, or the request ended.",properties:{outcome:{const:"unavailable",type:"string"},reason:{type:"string"}},required:["outcome","reason"],type:"object"}]},CodeIndexRestoreProgressV1:{description:"Bounded authentication work required to restore one immutable lexical\nartifact as a serving reader.\n\nThe unit is a fixed restore check, not bytes or build work. Completed\nchecks are published only after they pass. `authenticated_remaining` is\nalways `authenticated_total - authenticated_completed`, so a caller can\ndistinguish bounded cold restore from an unbounded rebuild.",properties:{artifact_digest:{description:"Whole-file content address from the durable artifact descriptor.",type:"string"},authenticated_completed:{description:"Successfully completed authentication checks.",format:"uint64",minimum:0,type:"integer"},authenticated_remaining:{description:"Checks that have not completed yet.",format:"uint64",minimum:0,type:"integer"},authenticated_total:{description:"Fixed number of authentication checks for this restore.",format:"uint64",minimum:0,type:"integer"},generation_id:{description:"Generation whose lexical serving seat is being restored.",type:"string"}},required:["generation_id","artifact_digest","authenticated_completed","authenticated_total","authenticated_remaining"],type:"object"},CodeIndexSourceOmissionReasonV1:fG,CodeIndexStalenessStateV1:fB,CodeIndexWorktreeFreshnessV1:{description:"Freshness/generation state for one mounted worktree.\n\n`Deserialize` is part of the wire contract: the CLI status command decodes\nexactly this type back out of the daemon's `tracedecay_status` response,\nkeeping one authority for the freshness shape.",properties:{clone_index:{anyOf:[{$ref:"#/$defs/CodeCloneIndexStatusV1"},{type:"null"}],description:"Clone readiness from the same sealed lexical artifact."},code_graph_serving:{anyOf:[{$ref:"#/$defs/CodeGraphServingReadinessV1"},{type:"null"}],description:"Whether that generation's verified graph projection can serve reads."},coverage:{$ref:"#/$defs/CodeIndexFreshnessCoverageV1",description:"Whether this read covers the complete mounted scheduler state."},generation_recovery:{anyOf:[{$ref:"#/$defs/CodeIndexGenerationRecoveryV1"},{type:"null"}],description:"One-shot owner-configuration recovery currently replacing an\nincompatible durable generation."},hook_hint_count:{description:"Pending hook-hint count, when cheaply available.",format:"uint64",minimum:0,type:["integer","null"]},last_reconcile_micros:{description:"Last reconcile observation time (microseconds since the Unix epoch).",format:"int64",type:["integer","null"]},latest_generation_id:{description:"Latest sealed generation identity, when a complete generation exists.",type:["string","null"]},omitted_sources:{anyOf:[{$ref:"#/$defs/CodeIndexOmittedSourcesV1"},{type:"null"}],description:"Sources the serving snapshot captured but does not index, when any."},parked:{anyOf:[{$ref:"#/$defs/CodeIndexConvergenceParkedV1"},{type:"null"}],description:"Deterministic contract violation currently parking background\nconvergence, when one is observed. `staleness_state` reads `parked`\nwhile this is set and no generation serves."},progress:{anyOf:[{$ref:"#/$defs/CodeIndexBuildProgressV1"},{type:"null"}],description:"Latest committed progress for the active generation, if one is mounted."},rebuild_in_flight:{default:!1,description:"Whether the exact scheduler route owns a reconcile pass or has a\npending wake. A stale seated generation with this false is stalled,\nnot in a routine rebuild window.",type:"boolean"},repository_id:{description:"Stable repository identity resolved by the scheduler.",type:["string","null"]},restore_progress:{anyOf:[{$ref:"#/$defs/CodeIndexRestoreProgressV1"},{type:"null"}],description:"Bounded immutable-artifact restore work currently in flight. This is\nseparate from build progress because restore commits no index data."},sealed_at_micros:{description:"Time the complete generation was durably sealed.",format:"int64",type:["integer","null"]},snapshot_content_identity:{description:"Content identity of the complete source snapshot.",type:["string","null"]},source_reference:{description:"Exact source reference captured by the sealed generation.",type:["string","null"]},source_revision:{description:"Exact source revision captured by the sealed generation.",type:["string","null"]},staleness_state:{anyOf:[{$ref:"#/$defs/CodeIndexStalenessStateV1"},{type:"null"}],description:"Staleness-ladder state from the last scheduler execution. `fresh` means\nthe scheduler most recently observed a fresh source; the status read\ndoes not probe the worktree to revalidate that observation."},worktree_id:{description:"Stable worktree identity resolved by the scheduler.",type:["string","null"]},worktree_root:{description:"Display path of the mounted worktree root.",type:"string"}},required:["worktree_root","coverage"],type:"object"},LcmConvergenceStateV1:gc,LcmConvergenceV1:gl,LcmDoctorProjectionStateV1:gp,LcmDoctorProjectionV1:gu,NativeHostIdentityV1:{enum:["claude_code","cursor_desktop","cursor_cloud","codex","hermes","kiro","cline","roo_code","kilo","kimi_code","open_code","pi","factory_droid"],type:"string"},ProjectStatusV1:{additionalProperties:!1,properties:{active_branch:{type:["string","null"]},branch_diagnostics:!0,branch_drifted:{type:["boolean","null"]},branch_mismatch:{anyOf:[{$ref:"#/$defs/StatusBranchMismatchV1"},{type:"null"}]},branch_resolution:{type:["string","null"]},branch_warnings:{items:{type:"string"},type:["array","null"]},code_index_freshness:{$ref:"#/$defs/StatusCodeIndexFreshnessV1"},code_index_freshness_warning:{type:["string","null"]},current_branch:{type:["string","null"]},git_staleness:{anyOf:[{$ref:"#/$defs/StatusGitStalenessV1"},{type:"null"}]},github_source:{description:"The checkout's GitHub source as its advisory owner observed it."},graph_statistics:{description:"The exact-scope sealed-generation census."},hook_replay:{$ref:"#/$defs/StatusHookReplayV1",description:"The daemon's drain of this project's hook spools, as its last sweep\nleft it."},live_branch:{type:["string","null"]},memory:{$ref:"#/$defs/StatusMemoryV1"},parent_branch:{type:["string","null"]},project_root:{type:"string"},reset_required_stores:{description:"Registered stores this binary serves only as a typed reset-required\nrefusal, each with the command that resets it.",items:{$ref:"#/$defs/StoreResetRequiredV1"},type:"array"},retrieval_serving:{anyOf:[{$ref:"#/$defs/StatusRetrievalServingV1"},{type:"null"}],description:"Whether exact-scope retrieval can serve, when the census authority is\nattached."},schema_convergence:{$ref:"#/$defs/StatusSchemaConvergenceV1"},scope_prefix:{type:["string","null"]},server:{description:"The serving MCP server's request counters."},serving_branch:{type:["string","null"]},session_git_evidence:{$ref:"#/$defs/StatusSessionGitEvidenceV1",description:"The session↔Git evidence `tracedecay_sessions_for` and the\nbranch/commit session filters read."},session_history_catch_up:!0,session_ingest:!0,session_projection:{$ref:"#/$defs/LcmDoctorProjectionV1",description:"The project session projection's serving state, the same reading\n`tracedecay_lcm_doctor` reports."},storage_health:!0,tracked_branch_count:{format:"uint",minimum:0,type:["integer","null"]},wait:{anyOf:[{$ref:"#/$defs/CodeIndexReadinessWaitOutcomeV1"},{type:"null"}]}},required:["project_root","graph_statistics","memory","schema_convergence","reset_required_stores","code_index_freshness","github_source","session_projection","session_git_evidence","hook_replay"],type:"object"},ResidentMemoryHolderReadV1:{description:"One worktree holding a retained owner's memory, and what it holds: a\ngeneration id, or an LSP session id.",properties:{holding:{type:"string"},worktree_id:{type:"string"}},required:["worktree_id","holding"],type:"object"},RetrievalWorkerStatusV1:_Y,SchemaConvergenceFindingV1:_7,SchemaConvergenceProgressV1:ve,SchemaConvergenceStageV1:vt,SchemaConvergenceStateV1:vr,StatusAdmissionV1:{additionalProperties:!1,properties:{project_admitted:{type:"boolean"},project_root:{type:"string"},scope_prefix:{type:["string","null"]},server:{description:"The serving MCP server's request counters."}},required:["project_admitted","project_root"],type:"object"},StatusBranchMismatchV1:{additionalProperties:!1,properties:{git_branch:{type:["string","null"]},indexed_branch:{type:["string","null"]},serving_branch:{type:["string","null"]}},type:"object"},StatusCodeIndexFreshnessV1:{description:"The code-index freshness of the served worktree, labeled the way readiness\nwaits report their last state.",oneOf:[{additionalProperties:!1,properties:{status:{const:"current",type:"string"},worktree:{$ref:"#/$defs/CodeIndexWorktreeFreshnessV1"}},required:["status","worktree"],type:"object"},{additionalProperties:!1,properties:{status:{const:"stale",type:"string"},worktree:{$ref:"#/$defs/CodeIndexWorktreeFreshnessV1"}},required:["status","worktree"],type:"object"},{additionalProperties:!1,properties:{status:{const:"restoring",type:"string"},worktree:{$ref:"#/$defs/CodeIndexWorktreeFreshnessV1"}},required:["status","worktree"],type:"object"},{additionalProperties:!1,properties:{status:{const:"warming",type:"string"},worktree:{$ref:"#/$defs/CodeIndexWorktreeFreshnessV1"}},required:["status","worktree"],type:"object"},{additionalProperties:!1,properties:{status:{const:"parked",type:"string"},worktree:{$ref:"#/$defs/CodeIndexWorktreeFreshnessV1"}},required:["status","worktree"],type:"object"},{additionalProperties:!1,description:"The last code-index mount failed; explicit reconciliation can retry it.",properties:{message:{type:"string"},remediation:{type:"string"},status:{const:"mount_failed",type:"string"}},required:["status","message","remediation"],type:"object"},{additionalProperties:!1,properties:{reason:{type:"string"},status:{const:"unavailable",type:"string"}},required:["status","reason"],type:"object"}]},StatusGitStalenessUnavailableV1:{oneOf:[{const:"no_sealed_generation",description:"No complete generation has sealed for the worktree yet.",type:"string"},{const:"sealed_generation_has_no_commit",description:"The sealed generation captured no commit, as in an unborn repository.",type:"string"},{const:"git_head_unreadable",description:"The worktree's checked-out commit could not be read.",type:"string"}]},StatusGitStalenessV1:{description:"The sealed generation's Git watermark, the commit its source snapshot was\ncaptured from, against the worktree's checked-out commit.",oneOf:[{additionalProperties:!1,description:"HEAD is the commit the sealed generation was built from.",properties:{status:{const:"current",type:"string"},watermark:{type:"string"}},required:["status","watermark"],type:"object"},{additionalProperties:!1,description:"HEAD has moved off the commit the sealed generation was built from.",properties:{head:{type:"string"},status:{const:"stale",type:"string"},watermark:{type:"string"}},required:["status","watermark","head"],type:"object"},{additionalProperties:!1,description:"No watermark or no HEAD to compare it with.",properties:{reason:{$ref:"#/$defs/StatusGitStalenessUnavailableV1"},status:{const:"unavailable",type:"string"}},required:["status","reason"],type:"object"}]},StatusHookReplayFailureV1:{additionalProperties:!1,description:"One hook spool the last replay sweep could not drain.",properties:{cause:{type:"string"},host:{$ref:"#/$defs/NativeHostIdentityV1"},spool:{$ref:"#/$defs/StatusHookReplaySpoolV1"}},required:["host","spool","cause"],type:"object"},StatusHookReplaySpoolV1:{oneOf:[{const:"records",description:"The host's spooled hook events.",type:"string"},{const:"delivery_receipts",description:"The host's hook delivery receipts.",type:"string"},{const:"pending_work",description:"The producer work the host's admission ledger still owes.",type:"string"}]},StatusHookReplayV1:{description:"The daemon's hook spool drain for one project.",oneOf:[{additionalProperties:!1,description:"No replay consumer drains this project's hook spools in this daemon.",properties:{status:{const:"unowned",type:"string"}},required:["status"],type:"object"},{additionalProperties:!1,description:"The replay consumer has not finished its first sweep.",properties:{status:{const:"starting",type:"string"}},required:["status"],type:"object"},{additionalProperties:!1,description:"The last sweep drained every hook spool it found.",properties:{status:{const:"drained",type:"string"}},required:["status"],type:"object"},{additionalProperties:!1,description:"The last sweep could not drain these spools. Their records stay\ndurable and the next sweep retries them.",properties:{failures:{items:{$ref:"#/$defs/StatusHookReplayFailureV1"},type:"array"},status:{const:"failed",type:"string"}},required:["status","failures"],type:"object"}]},StatusMemoryOwnerV1:{additionalProperties:!1,properties:{bytes:{format:"uint64",minimum:0,type:["integer","null"]},content_digest:{type:["string","null"]},holders:{items:{$ref:"#/$defs/ResidentMemoryHolderReadV1"},type:"array"},idle_seconds:{format:"uint64",minimum:0,type:"integer"},kind:{type:"string"},measured:{type:"boolean"},project_id:{type:"string"},protected:{type:"boolean"}},required:["project_id","kind","holders","measured","idle_seconds","protected"],type:"object"},StatusMemoryPressureV1:{enum:["unobserved","nominal","over_budget"],type:"string"},StatusMemoryReservationV1:{additionalProperties:!1,properties:{bytes:{format:"uint64",minimum:0,type:"integer"},component:{type:"string"}},required:["component","bytes"],type:"object"},StatusMemoryV1:{additionalProperties:!1,description:"The daemon's memory admission and resident accounting as one project sees it.",properties:{high_watermark_bytes:{format:"uint64",minimum:0,type:"integer"},idle_window_seconds:{format:"uint64",minimum:0,type:"integer"},limit_bytes:{format:"uint64",minimum:0,type:"integer"},low_watermark_bytes:{format:"uint64",minimum:0,type:"integer"},owners:{description:"This project's retained owners; other projects' belong to the\ndaemon-wide Doctor inventory.",items:{$ref:"#/$defs/StatusMemoryOwnerV1"},type:"array"},psi_some_avg10:{format:"double",type:["number","null"]},reservations:{description:"`reserved_bytes` per component, largest first.",items:{$ref:"#/$defs/StatusMemoryReservationV1"},type:"array"},reserved_bytes:{description:"Bytes admitted work has reserved daemon-wide: the admission model of\nin-flight builds and decodes, not a measurement.",format:"uint64",minimum:0,type:"integer"},resident_bytes:{description:"Observed admission occupancy: anonymous/shared process pages plus swap,\nconstrained by shared cgroup headroom. This is not raw process RSS.",format:"uint64",minimum:0,type:["integer","null"]},retained_bytes:{format:"uint64",minimum:0,type:"integer"},shed_order:{items:{type:"string"},type:"array"},status:{$ref:"#/$defs/StatusMemoryPressureV1"},unattributed_bytes:{description:"Raw process RSS from the last successful canonical sample minus the\ndaemon-wide measured `retained_bytes`, saturating at zero. Unlike\n`resident_bytes`, this excludes swap and shared cgroup pressure. Work in\nflight, runtime allocations, SQLite page caches, and allocator-held pages\ncan contribute. `None` until a resident sample has been published.",format:"uint64",minimum:0,type:["integer","null"]},unmeasured_owners:{format:"uint",minimum:0,type:"integer"}},required:["status","limit_bytes","high_watermark_bytes","low_watermark_bytes","idle_window_seconds","shed_order","retained_bytes","unmeasured_owners","reserved_bytes","reservations","owners"],type:"object"},StatusRetrievalServingV1:{oneOf:[{additionalProperties:!1,description:"A sealed complete generation serves the exact worktree. The ages tell a\nroutine rebuild window from a wedged route.",properties:{condition:{anyOf:[{$ref:"#/$defs/StatusServingConditionV1"},{type:"null"}]},freshness:{$ref:"#/$defs/StatusServingFreshnessV1"},last_reconcile_age_seconds:{format:"int64",type:["integer","null"]},seated_generation_age_seconds:{format:"int64",type:["integer","null"]},status:{const:"serving",type:"string"}},required:["status","freshness"],type:"object"},{additionalProperties:!1,description:"The census answered and nothing is servable yet.",properties:{reason:{type:"string"},status:{const:"unavailable",type:"string"}},required:["status","reason"],type:"object"}]},StatusSchemaConvergenceStateV1:{enum:["completed","in_progress","degraded"],type:"string"},StatusSchemaConvergenceV1:{additionalProperties:!1,properties:{findings:{items:{$ref:"#/$defs/SchemaConvergenceFindingV1"},type:"array"},status:{$ref:"#/$defs/StatusSchemaConvergenceStateV1"}},required:["status","findings"],type:"object"},StatusServingConditionV1:{enum:["artifact_restore","source_verification","rebuilding","stalled"],type:"string"},StatusServingFreshnessV1:{enum:["current","restoring","last_complete_stale","unknown"],type:"string"},StatusSessionGitEvidenceUnavailableV1:{oneOf:[{const:"session_store_denied",description:"This request holds no project session store.",type:"string"},{const:"read_failed",description:"The session store refused the evidence read.",type:"string"}]},StatusSessionGitEvidenceV1:{description:"The project's session↔Git evidence generation.",oneOf:[{additionalProperties:!1,description:"A convergence pass installed this generation.",properties:{backfill_watermark:{format:"int64",type:["integer","null"]},commit_count:{format:"uint64",minimum:0,type:"integer"},generation:{type:"string"},source_watermark:{type:"string"},span_count:{format:"uint64",minimum:0,type:"integer"},status:{const:"recorded",type:"string"}},required:["status","generation","source_watermark","span_count","commit_count"],type:"object"},{additionalProperties:!1,description:"No convergence pass has written evidence for this project yet.",properties:{backfill_watermark:{format:"int64",type:["integer","null"]},status:{const:"unrecorded",type:"string"}},required:["status"],type:"object"},{additionalProperties:!1,description:"The evidence could not be read.",properties:{message:{type:["string","null"]},reason:{$ref:"#/$defs/StatusSessionGitEvidenceUnavailableV1"},status:{const:"unavailable",type:"string"}},required:["status","reason"],type:"object"}]},StoreResetRequiredV1:{description:"A persisted store the daemon keeps mounted in a typed reset-required state\ninstead of refusing to serve: every read against it returns the typed\nrefusal, stores that admit keep serving, and `remedy` is the exact command\nthe operator runs to reset it.",properties:{authority:{type:"string"},found_version:{format:"int64",type:["integer","null"]},reason:{type:"string"},remedy:{type:"string"},required_version:{format:"int64",type:["integer","null"]},store:{type:"string"}},required:["store","authority","reason","remedy"],type:"object"}},$schema:"https://json-schema.org/draft/2020-12/schema",anyOf:[{$ref:"#/$defs/StatusAdmissionV1"},{$ref:"#/$defs/ProjectStatusV1"}],description:"`tracedecay_status` for an `admission_only` read, or the project's status.",title:"StatusResultV1"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{include_details:{default:!1,type:"boolean"}},title:"StorageStatusPrimitiveRequest",type:"object"},{$defs:{StorageStatusHistoryPointV1:{additionalProperties:!1,properties:{database_bytes:{format:"uint64",minimum:0,type:"integer"},observed_at:{format:"int64",type:"integer"}},required:["observed_at","database_bytes"],type:"object"}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{database_bytes:{format:"uint64",minimum:0,type:["integer","null"]},details:{items:{type:"string"},type:"array"},freelist_pages:{default:null,format:"uint64",minimum:0,type:["integer","null"]},history:{default:[],items:{$ref:"#/$defs/StorageStatusHistoryPointV1"},type:"array"},history_coverage:{default:null,type:["string","null"]},page_count:{default:null,format:"uint64",minimum:0,type:["integer","null"]},page_size_bytes:{default:null,format:"uint32",minimum:0,type:["integer","null"]},project_id:{default:null,type:["string","null"]},read_only:{type:"boolean"},status:{type:"string"},store_path:{default:null,type:["string","null"]}},required:["status","read_only","details"],title:"StorageStatusPrimitiveResult",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Exact public input accepted by `tracedecay_str_replace`.",properties:{dry_run:{default:!1,type:"boolean"},expected_state:{description:"Exact `preview_digest`/`expected_state` returned by the dry run. Apply\nre-resolves the typed plan and rejects any candidate-state drift.",type:["string","null"]},idempotency_key:{type:["string","null"]},new_str:{type:"string"},old_str:{type:"string"},path:{type:"string"},verify:{default:!1,type:"boolean"}},required:["path","old_str","new_str"],title:"StrReplaceSurfaceRequestV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{file:{description:"Source file path to find test coverage for.",type:["string","null"]},node_id:{description:"Specific node ID to find test coverage for (alternative to file).",type:["string","null"]}},title:"TestMapSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fF,CodeIndexConvergenceParkedV1:fL,CodeIndexStalenessStateV1:fB,PrimitiveFreshnessStateV1:_i,PrimitiveIndexingStateV1:_o,PrimitiveSearchFreshnessV1:_d,TestMapSourceCoverageV1:{additionalProperties:!1,properties:{source_file:{type:"string"},source_id:{type:"string"},source_line:{format:"uint32",minimum:0,type:"integer"},source_name:{type:"string"},tests:{items:{$ref:"#/$defs/TestMapTestV1"},type:"array"}},required:["source_name","source_id","source_file","source_line","tests"],type:"object"},TestMapTestV1:{additionalProperties:!1,properties:{attribution_depth:{format:"uint32",minimum:0,type:"integer"},test_file:{type:"string"},test_line:{format:"uint32",minimum:0,type:"integer"},test_name:{type:"string"}},required:["test_name","test_file","test_line","attribution_depth"],type:"object"},TestMapUncoveredV1:{additionalProperties:!1,properties:{file:{type:"string"},id:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},name:{type:"string"}},required:["id","name","file","line"],type:"object"}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{coverage:{items:{$ref:"#/$defs/TestMapSourceCoverageV1"},type:"array"},covered_symbols:{format:"uint64",minimum:0,type:"integer"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},test_files:{items:{type:"string"},type:"array"},uncovered:{items:{$ref:"#/$defs/TestMapUncoveredV1"},type:"array"},uncovered_symbols:{format:"uint64",minimum:0,type:"integer"}},required:["covered_symbols","uncovered_symbols","test_files","coverage","uncovered"],title:"TestMapResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"The admitted project selects the retained managed test run, so this exact\nrequest intentionally carries no caller-selectable scope or identity.",title:"TestResultsSurfaceRequestV1",type:"object"},{$defs:{CancellationObservation:fI,CancellationStage:fx,CodeGenerationId:fz,CommitId:fX,Deadline:hL,OperationBudgetUsage:g8,OperationReceipt:g7,OperationTermination:_e,TestResultProjectionV1:{additionalProperties:!1,description:"One result emitted by the daemon-managed test-run authority.",properties:{passed:{type:"boolean"},test:{type:"string"}},required:["test","passed"],type:"object"},UtcMicros:bs},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Exact retained managed-test-run projection returned by `test_results`.\n\nThe daemon resolves the admitted project, reads its newest durable managed\nrun, and verifies that the run's head and code generation are current\nbefore it serializes this payload. `result_offset` and `available_results`\nretain the authoritative page position. The outcome fields (`finished_at`,\n`exit_code`, the counts, `termination`, `receipt`) are present only after\nthe managed run terminates.",properties:{available_results:{format:"uint64",minimum:0,type:"integer"},code_generation_id:{anyOf:[{$ref:"#/$defs/CodeGenerationId"},{type:"null"}]},completed:{format:"uint64",minimum:0,type:"integer"},exit_code:{format:"int32",type:["integer","null"]},failed:{format:"uint64",minimum:0,type:["integer","null"]},finished_at:{anyOf:[{$ref:"#/$defs/UtcMicros"},{type:"null"}]},head_commit_id:{anyOf:[{$ref:"#/$defs/CommitId"},{type:"null"}]},ignored:{format:"uint64",minimum:0,type:["integer","null"]},operation_id:{type:"string"},passed:{format:"uint64",minimum:0,type:["integer","null"]},receipt:{anyOf:[{$ref:"#/$defs/OperationReceipt"},{type:"null"}]},result_offset:{format:"uint64",minimum:0,type:"integer"},results:{items:{$ref:"#/$defs/TestResultProjectionV1"},type:"array"},session_id:{description:"The session the run was requested by; null when the request named none.",type:["string","null"]},started_at:{$ref:"#/$defs/UtcMicros"},termination:{anyOf:[{$ref:"#/$defs/OperationTermination"},{type:"null"}]},total:{format:"uint64",minimum:0,type:["integer","null"]}},required:["operation_id","started_at","results","completed","result_offset","available_results"],title:"TestResultsResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{include_tested:{description:"Include already-tested functions in results (default: false).",type:["boolean","null"]},limit:{description:"Maximum number of results to return (default: 20, at most 200).",format:"uint32",minimum:0,type:["integer","null"]},path:{description:"Filter to files under this directory path.",type:["string","null"]}},title:"TestRiskSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fF,CodeIndexConvergenceParkedV1:fL,CodeIndexStalenessStateV1:fB,ComplexityAnalysisV1:f1,PrimitiveFreshnessStateV1:_i,PrimitiveIndexingStateV1:_o,PrimitiveSearchFreshnessV1:_d,TestAttributionMethodV1:{description:"How a source symbol's static test evidence was attributed.",enum:["none","direct_unit","closure"],type:"string"},TestRiskAttributionSummaryV1:{additionalProperties:!1,properties:{cli_entry_attributed:{format:"uint64",minimum:0,type:"integer"},closure_attributed:{format:"uint64",minimum:0,type:"integer"},depth:{format:"uint64",minimum:0,type:"integer"},direct_unit_attributed:{format:"uint64",minimum:0,type:"integer"},public_api_attributed:{format:"uint64",minimum:0,type:"integer"},total_attributed:{format:"uint64",minimum:0,type:"integer"},trait_resolved_attributed:{format:"uint64",minimum:0,type:"integer"}},required:["depth","direct_unit_attributed","closure_attributed","trait_resolved_attributed","public_api_attributed","cli_entry_attributed","total_attributed"],type:"object"},TestRiskBucketSummaryV1:{additionalProperties:!1,properties:{attributed:{format:"uint64",minimum:0,type:"integer"},excluded:{format:"uint64",minimum:0,type:"integer"},orphan_entry:{format:"uint64",minimum:0,type:"integer"},reachable_unattributed:{format:"uint64",minimum:0,type:"integer"}},required:["attributed","reachable_unattributed","orphan_entry","excluded"],type:"object"},TestRiskConfidenceV1:{description:"What the reported coverage percentage bounds.",enum:["static_lower_bound"],type:"string"},TestRiskEntryV1:{additionalProperties:!1,properties:{attribution_depth:{format:"uint64",minimum:0,type:["integer","null"]},attribution_method:{$ref:"#/$defs/TestAttributionMethodV1"},churn:{format:"uint64",minimum:0,type:"integer"},complexity:{description:"`None` when `complexity_analysis` reports the bounded walk did not\ncover the body; `risk` then weighs the lower-bound counters.",format:"uint32",minimum:0,type:["integer","null"]},complexity_analysis:{$ref:"#/$defs/ComplexityAnalysisV1"},fan_in:{format:"uint64",minimum:0,type:"integer"},file:{type:"string"},has_test:{type:"boolean"},id:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},name:{type:"string"},risk:{format:"double",type:"number"}},required:["id","name","file","line","complexity_analysis","fan_in","has_test","attribution_method","risk","churn"],type:"object"},TestRiskSummaryV1:{additionalProperties:!1,properties:{attribution:{$ref:"#/$defs/TestRiskAttributionSummaryV1"},buckets:{$ref:"#/$defs/TestRiskBucketSummaryV1"},confidence:{$ref:"#/$defs/TestRiskConfidenceV1"},confidence_note:{type:"string"},coverage_pct:{format:"double",type:"number"},skipped:{format:"uint64",minimum:0,type:"integer"},tested:{format:"uint64",minimum:0,type:"integer"},top_risk_unattributed:{type:"string"},top_risk_untested:{type:"string"},total_functions:{format:"uint64",minimum:0,type:"integer"}},required:["total_functions","tested","skipped","coverage_pct","top_risk_untested","top_risk_unattributed","attribution","buckets","confidence","confidence_note"],type:"object"}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},risks:{items:{$ref:"#/$defs/TestRiskEntryV1"},type:"array"},summary:{$ref:"#/$defs/TestRiskSummaryV1"}},required:["risks","summary"],title:"TestRiskResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{kinds:{items:{type:"string"},type:["array","null"]},limit:{format:"uint32",minimum:0,type:["integer","null"]},path:{type:["string","null"]}},title:"TodosSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fF,CodeIndexConvergenceParkedV1:fL,CodeIndexStalenessStateV1:fB,PrimitiveFreshnessStateV1:_i,PrimitiveIndexingStateV1:_o,PrimitiveSearchFreshnessV1:_d,TodoMarkerV1:{additionalProperties:!1,properties:{enclosing:{type:["string","null"]},file:{type:"string"},kind:{type:"string"},line:{format:"uint32",minimum:0,type:"integer"},text:{type:"string"}},required:["kind","file","line","text"],type:"object"}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{by_kind:{additionalProperties:{format:"uint64",minimum:0,type:"integer"},type:"object"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},markers:{items:{$ref:"#/$defs/TodoMarkerV1"},type:"array"},match_count:{format:"uint",minimum:0,type:"integer"}},required:["match_count","by_kind","markers"],title:"TodosResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{ecosystem:{description:"Filter findings to one ecosystem ('rust' or 'typescript'). Every\necosystem section is still reported, so the scope of the answer stays\nvisible.",type:["string","null"]},limit:{description:"Maximum unmounted files to return (default: 200, max: 2000). The\nresponse always states the true total and how many rows were omitted.",format:"uint32",minimum:0,type:["integer","null"]},path:{description:"Filter findings to files under this directory path (e.g. 'src/daemon').\nThe whole project is still walked, reachability is not a per-directory\nquestion.",type:["string","null"]}},title:"UnmountedFilesSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fF,CodeIndexConvergenceParkedV1:fL,CodeIndexStalenessStateV1:fB,PrimitiveFreshnessStateV1:_i,PrimitiveIndexingStateV1:_o,PrimitiveSearchFreshnessV1:_d,UnmountedEcosystemStatusV1:{description:"Whether an ecosystem was audited, absent, or recognised but unmodelled.",enum:["audited","partial","not_present","unsupported"],type:"string"},UnmountedEcosystemV1:{additionalProperties:!1,properties:{blind_spots:{items:{type:"string"},type:"array"},ecosystem:{type:"string"},entry_point_count:{format:"uint64",minimum:0,type:"integer"},excluded_path_globs:{items:{type:"string"},type:"array"},mounted_file_count:{format:"uint64",minimum:0,type:"integer"},note:{type:["string","null"]},package_count:{format:"uint64",minimum:0,type:"integer"},scanned_file_count:{format:"uint64",minimum:0,type:"integer"},status:{$ref:"#/$defs/UnmountedEcosystemStatusV1"},unclaimed_file_count:{format:"uint64",minimum:0,type:"integer"},unmounted_file_count:{format:"uint64",minimum:0,type:"integer"},verdict:{type:"string"}},required:["ecosystem","status","package_count","entry_point_count","scanned_file_count","mounted_file_count","unclaimed_file_count","unmounted_file_count","verdict","blind_spots","excluded_path_globs"],type:"object"},UnmountedFileV1:{additionalProperties:!1,properties:{ecosystem:{type:"string"},file:{type:"string"},manifest:{type:"string"},nearest_mounted_parent:{type:["string","null"]},package:{type:"string"},suggested_declaration:{type:["string","null"]}},required:["file","ecosystem","package","manifest"],type:"object"}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{complete:{type:"boolean"},ecosystem:{type:["string","null"]},ecosystems:{items:{$ref:"#/$defs/UnmountedEcosystemV1"},type:"array"},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},limit:{format:"uint64",minimum:0,type:"integer"},omitted_count:{format:"uint64",minimum:0,type:"integer"},path:{type:["string","null"]},returned_count:{format:"uint64",minimum:0,type:"integer"},unmounted:{items:{$ref:"#/$defs/UnmountedFileV1"},type:"array"},unmounted_file_count:{format:"uint64",minimum:0,type:"integer"}},required:["unmounted_file_count","returned_count","omitted_count","complete","ecosystems","limit","unmounted"],title:"UnmountedFilesResultV1",type:"object"},{$defs:{UnsafePatternKindV1:bo},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{exclude_tests:{description:"When true, skips files whose path looks like a test (default: false).",type:["boolean","null"]},kinds:{description:"Subset of patterns to search. Default (or an empty list): every kind.",items:{$ref:"#/$defs/UnsafePatternKindV1"},type:["array","null"]},limit:{description:"Maximum number of matches to return (default: 200, max: 2000).",format:"uint32",minimum:0,type:["integer","null"]},path:{description:"Filter to files under this directory (relative to project root).",type:["string","null"]}},title:"UnsafePatternsSurfaceRequestV1",type:"object"},{$defs:{CodeIndexBuildBlockedReasonV1:fF,CodeIndexConvergenceParkedV1:fL,CodeIndexStalenessStateV1:fB,CoverageCompleteness:hA,PrimitiveFreshnessStateV1:_i,PrimitiveIndexingStateV1:_o,PrimitiveSearchFreshnessV1:_d,UnsafePatternFileOmissionV1:{additionalProperties:!1,description:"One scanned file whose sites are not reported as verified matches.",properties:{cause:{$ref:"#/$defs/UnsafePatternOmissionCauseV1"},file:{type:"string"},reason:{$ref:"#/$defs/UnsafePatternOmissionReasonV1"},withheld_match_count:{description:"Sites of the requested kinds found in the file and withheld.",format:"uint64",minimum:0,type:"integer"}},required:["file","reason","cause","withheld_match_count"],type:"object"},UnsafePatternKindV1:bo,UnsafePatternMatchV1:{additionalProperties:!1,properties:{enclosing:{type:["string","null"]},file:{type:"string"},in_test:{type:"boolean"},kind:{$ref:"#/$defs/UnsafePatternKindV1"},line:{format:"uint32",minimum:0,type:"integer"},snippet:{type:"string"}},required:["kind","file","line","snippet","in_test"],type:"object"},UnsafePatternOmissionCauseV1:{description:"What prevented the file from being classified.",oneOf:[{const:"syntax_errors",description:"The Rust grammar parsed the file with error nodes. Valid Rust it only\npartly parses (heavy `macro_rules!`) lands here.",type:"string"}]},UnsafePatternOmissionReasonV1:{description:"Why a file's risky-pattern sites are withheld from the verified result.",oneOf:[{const:"test_scope_unclassified",description:"Whether a site is test-only cannot be decided for this file.",type:"string"}]}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{by_kind:{additionalProperties:{format:"uint64",minimum:0,type:"integer"},description:"Match count per pattern kind, keyed by its wire spelling.",type:"object"},coverage:{$ref:"#/$defs/CoverageCompleteness",description:"`partial` exactly when `omissions` names a file whose sites are withheld."},freshness:{anyOf:[{$ref:"#/$defs/PrimitiveSearchFreshnessV1"},{type:"null"}],description:"The worktree verdict a served graph read opens with."},match_count:{format:"uint64",minimum:0,type:"integer"},matches:{items:{$ref:"#/$defs/UnsafePatternMatchV1"},type:"array"},omissions:{items:{$ref:"#/$defs/UnsafePatternFileOmissionV1"},type:"array"}},required:["match_count","by_kind","matches","coverage","omissions"],title:"UnsafePatternsResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{agent_label:{type:["string","null"]},branch:{type:["string","null"]},commit:{type:["string","null"]},limit:{format:"uint64",minimum:0,type:["integer","null"]},run_id:{type:["string","null"]},session_id:{type:["string","null"]},worktree:{type:["string","null"]}},title:"WorkflowsRequestV1",type:"object"},{$defs:{GitScopeV1:y2,RetainedErrorV1:_G,RetainedOutcomeStatusV1:_B,WorkflowAgentV1:{additionalProperties:!1,properties:{agent_id:{type:"string"},agent_label:{type:"string"},agent_session_id:{type:["string","null"]},ended_ts:{format:"int64",type:["integer","null"]},model:{type:["string","null"]},phase:{type:["string","null"]},run_id:{type:"string"},started_ts:{format:"int64",type:["integer","null"]},status:{$ref:"#/$defs/WorkflowStatusV1"},tokens:{format:"int64",type:"integer"},transcript_path:{type:["string","null"]}},required:["run_id","agent_label","agent_id","status"],type:"object"},WorkflowCoverageV1:{enum:["complete","conclusive","bounded_prefix"],type:"string"},WorkflowQueryModeV1:{enum:["session","git_scope","run","agent"],type:"string"},WorkflowRunV1:{additionalProperties:!1,properties:{agent_count:{format:"int64",type:"integer"},description:{type:["string","null"]},ended_ts:{format:"int64",type:["integer","null"]},name:{type:["string","null"]},parent_session_id:{type:"string"},phase_json:{type:["string","null"]},result_summary:{type:["string","null"]},run_id:{type:"string"},started_ts:{format:"int64",type:["integer","null"]},status:{$ref:"#/$defs/WorkflowStatusV1"}},required:["run_id","parent_session_id","status"],type:"object"},WorkflowStatusV1:{enum:["running","completed","failed","unknown"],type:"string"}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{agent:{anyOf:[{$ref:"#/$defs/WorkflowAgentV1"},{type:"null"}]},agent_count:{format:"int64",type:["integer","null"]},agent_label:{type:["string","null"]},agents:{items:{$ref:"#/$defs/WorkflowAgentV1"},type:["array","null"]},agents_complete:{type:["boolean","null"]},agents_coverage:{anyOf:[{$ref:"#/$defs/WorkflowCoverageV1"},{type:"null"}]},agents_returned:{format:"uint",minimum:0,type:["integer","null"]},count:{format:"uint",minimum:0,type:["integer","null"]},error:{anyOf:[{$ref:"#/$defs/RetainedErrorV1"},{type:"null"}]},found:{type:["boolean","null"]},git_filter:{anyOf:[{$ref:"#/$defs/GitScopeV1"},{type:"null"}]},lookup_complete:{type:["boolean","null"]},lookup_coverage:{anyOf:[{$ref:"#/$defs/WorkflowCoverageV1"},{type:"null"}]},message:{type:["string","null"]},mode:{anyOf:[{$ref:"#/$defs/WorkflowQueryModeV1"},{type:"null"}]},run:{anyOf:[{$ref:"#/$defs/WorkflowRunV1"},{type:"null"}]},run_id:{type:["string","null"]},runs:{items:{$ref:"#/$defs/WorkflowRunV1"},type:["array","null"]},session_id:{type:["string","null"]},status:{$ref:"#/$defs/RetainedOutcomeStatusV1"}},required:["status"],title:"WorkflowsResultV1",type:"object"},{$defs:{ManifestDigest:gj,NativeWorktreeTargetV1:g2,ProjectId:_m,RepositoryId:_z,ScopeSetId:vc,ScopeSetRevision:vl,WorktreeId:So},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Confirmation names the exact inspection digest, not a worktree id alone.",properties:{inspection_digest:{$ref:"#/$defs/ManifestDigest"},scope_set_digest:{$ref:"#/$defs/ManifestDigest"},scope_set_id:{$ref:"#/$defs/ScopeSetId"},scope_set_revision:{$ref:"#/$defs/ScopeSetRevision"},target:{$ref:"#/$defs/NativeWorktreeTargetV1"}},required:["scope_set_id","scope_set_revision","scope_set_digest","target","inspection_digest"],title:"WorktreeCleanupConfirmRequestV1",type:"object"},{$defs:{ManifestDigest:gj,NativeWorktreeTargetV1:g2,ProjectId:_m,RepositoryId:_z,ScopeSetId:vc,ScopeSetRevision:vl,WorktreeId:So},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{scope_set_digest:{$ref:"#/$defs/ManifestDigest"},scope_set_id:{$ref:"#/$defs/ScopeSetId"},scope_set_revision:{$ref:"#/$defs/ScopeSetRevision"},target:{$ref:"#/$defs/NativeWorktreeTargetV1"}},required:["scope_set_id","scope_set_revision","scope_set_digest","target"],title:"WorktreeCleanupInspectRequestV1",type:"object"},{$defs:{ManifestDigest:gj,NativeWorktreeTargetV1:g2,ProjectId:_m,RepositoryId:_z,ScopeSetId:vc,ScopeSetRevision:vl,WorktreeId:So},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{confirmation_digest:{$ref:"#/$defs/ManifestDigest"},scope_set_digest:{$ref:"#/$defs/ManifestDigest"},scope_set_id:{$ref:"#/$defs/ScopeSetId"},scope_set_revision:{$ref:"#/$defs/ScopeSetRevision"},target:{$ref:"#/$defs/NativeWorktreeTargetV1"}},required:["scope_set_id","scope_set_revision","scope_set_digest","target","confirmation_digest"],title:"WorktreeCleanupReconcileRequestV1",type:"object"},{$defs:{ManifestDigest:gj,NativeWorktreeTargetV1:g2,ProjectId:_m,RepositoryId:_z,ScopeSetId:vc,ScopeSetRevision:vl,UtcMicros:bs,WorktreeId:So},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Removal carries both proofs so a stale confirmation cannot be replayed\nagainst another inspection of the same opaque worktree identity.",properties:{confirmation_digest:{$ref:"#/$defs/ManifestDigest"},confirmed_at:{$ref:"#/$defs/UtcMicros"},inspection_digest:{$ref:"#/$defs/ManifestDigest"},scope_set_digest:{$ref:"#/$defs/ManifestDigest"},scope_set_id:{$ref:"#/$defs/ScopeSetId"},scope_set_revision:{$ref:"#/$defs/ScopeSetRevision"},target:{$ref:"#/$defs/NativeWorktreeTargetV1"}},required:["scope_set_id","scope_set_revision","scope_set_digest","target","inspection_digest","confirmed_at","confirmation_digest"],title:"WorktreeCleanupRemoveRequestV1",type:"object"},{$defs:{ManifestDigest:gj,NativeWorktreeTargetV1:g2,ProjectId:_m,RepositoryId:_z,ScopeSetId:vc,ScopeSetRevision:vl,WorktreeId:So},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{scope_set_digest:{$ref:"#/$defs/ManifestDigest"},scope_set_id:{$ref:"#/$defs/ScopeSetId"},scope_set_revision:{$ref:"#/$defs/ScopeSetRevision"},target:{$ref:"#/$defs/NativeWorktreeTargetV1"}},required:["scope_set_id","scope_set_revision","scope_set_digest","target"],title:"WorktreeInventoryRequestV1",type:"object"},{$defs:{ActorId:mU,TaskId:v1},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Issues a short-lived, version-bound task-opening token.\n\nIdentity, scope, authority revisions, issuance time, and expiry are all\nsupplied by the admitted daemon request. The caller supplies only the\nbearer, destination session, exact task version, and enrolled recipient\nprincipal it intends to authorize.",properties:{recipient_actor_id:{$ref:"#/$defs/ActorId"},session_id:{type:"string"},task_id:{$ref:"#/$defs/TaskId"},token:{type:"string"},version:{format:"uint64",minimum:0,type:"integer"}},required:["token","session_id","task_id","version","recipient_actor_id"],title:"IssueTaskHandoffRequestV1",type:"object"},{$defs:{ManifestDigest:gj,TaskId:v1,UtcMicros:bs},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Flat public receipt for a committed task-handoff issue.\n\nThe complete binding remains inside the daemon authority. Publishing only\nthese exact identifiers avoids turning mutable grant and policy internals\ninto a second public wire authority.",properties:{expires_at:{$ref:"#/$defs/UtcMicros"},issued_at:{$ref:"#/$defs/UtcMicros"},issued_request_id:{type:"string"},session_id:{type:"string"},task_id:{$ref:"#/$defs/TaskId"},token_digest:{$ref:"#/$defs/ManifestDigest"},version:{format:"uint64",minimum:0,type:"integer"}},required:["token_digest","issued_request_id","session_id","task_id","version","issued_at","expires_at"],title:"IssueTaskHandoffResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:'Enumerates the handoff tokens this caller could redeem in one session.\n\nThe two `open_*` operations redeem a bearer the caller already holds; they\ncannot answer "what has been handed to me and not yet taken up". This one\ncan, and it does so without any bearer: the request carries no token, and\nthe result carries only digests.',properties:{session_id:{type:"string"}},required:["session_id"],title:"ListTaskHandoffsRequestV1",type:"object"},{$defs:{FeedbackFindingId:yS,HandoffOpenKindV1:{enum:["investigation","task"],type:"string"},HandoffOpenTargetV1:{oneOf:[{properties:{finding_id:{$ref:"#/$defs/FeedbackFindingId"},kind:{const:"investigation",type:"string"},owner_version_digest:{$ref:"#/$defs/ManifestDigest"}},required:["kind","finding_id","owner_version_digest"],type:"object"},{properties:{kind:{const:"task",type:"string"},owner_version_digest:{$ref:"#/$defs/ManifestDigest"},task_id:{$ref:"#/$defs/TaskId"},version:{format:"uint64",minimum:0,type:"integer"}},required:["kind","task_id","version","owner_version_digest"],type:"object"}]},ListedTaskHandoffV1:{additionalProperties:!1,description:"One handoff token, projected for public reading.\n\nMirrors [`IssueTaskHandoffResultV1`]'s doctrine: the complete binding stays\ninside the daemon authority, and only these identifiers cross the wire. No\nbearer secret exists to leak here. The authority never stored one, and the\nissuer's grant identity and policy digests stay concealed.",properties:{consumed_at:{anyOf:[{$ref:"#/$defs/UtcMicros"},{type:"null"}],description:"Set only when `state` is `consumed`."},expires_at:{$ref:"#/$defs/UtcMicros"},issued_at:{$ref:"#/$defs/UtcMicros"},issued_request_id:{type:"string"},kind:{$ref:"#/$defs/HandoffOpenKindV1"},session_id:{type:"string"},state:{$ref:"#/$defs/TaskHandoffTokenStateV1"},target:{$ref:"#/$defs/HandoffOpenTargetV1"},token_digest:{$ref:"#/$defs/ManifestDigest"}},required:["token_digest","issued_request_id","session_id","kind","target","issued_at","expires_at","state"],type:"object"},ManifestDigest:gj,TaskHandoffTokenStateV1:{description:"Where one enumerated token stands at the observed instant.",oneOf:[{const:"open",description:"Not yet redeemed, and not yet expired: the live frontier.",type:"string"},{const:"consumed",description:"Redeemed. Single-use, so it can never be redeemed again.",type:"string"},{const:"expired",description:"Its window closed with no redemption. A dropped handoff, which is\nexactly the fact a frontier exists to surface.",type:"string"}]},TaskId:v1,UtcMicros:bs},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"The handoff-token frontier for one session.",properties:{consumed_count:{format:"uint32",minimum:0,type:"integer"},expired_count:{format:"uint32",minimum:0,type:"integer"},handoffs:{items:{$ref:"#/$defs/ListedTaskHandoffV1"},type:"array"},observed_at:{$ref:"#/$defs/UtcMicros",description:"The instant the states below were decided at. Without it, `open` and\n`expired` are claims with no clock behind them."},open_count:{format:"uint32",minimum:0,type:"integer"},truncated:{description:"True when the enumeration ceiling was reached, so the counts describe a\nprefix of the frontier rather than all of it.",type:"boolean"}},required:["observed_at","handoffs","open_count","consumed_count","expired_count","truncated"],title:"ListTaskHandoffsResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{session_id:{type:"string"},token:{type:"string"}},required:["token","session_id"],title:"OpenInvestigationHandoffRequestV1",type:"object"},{$defs:{FeedbackFindingId:yS,HandoffOpenReceiptV1:y8,InvestigationHandoffSurfaceV1:{additionalProperties:!1,properties:{finding_id:{$ref:"#/$defs/FeedbackFindingId"},owner_version_digest:{$ref:"#/$defs/ManifestDigest"}},required:["finding_id","owner_version_digest"],type:"object"},ManifestDigest:gj,UtcMicros:bs},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{receipt:{$ref:"#/$defs/HandoffOpenReceiptV1"},surface:{$ref:"#/$defs/InvestigationHandoffSurfaceV1"}},required:["surface","receipt"],title:"OpenInvestigationHandoffResultV1",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{session_id:{type:"string"},token:{type:"string"}},required:["token","session_id"],title:"OpenTaskHandoffRequestV1",type:"object"},{$defs:{HandoffOpenReceiptV1:y8,ManifestDigest:gj,TaskHandoffSurfaceV1:{additionalProperties:!1,properties:{task_id:{$ref:"#/$defs/TaskId"},version:{format:"uint64",minimum:0,type:"integer"}},required:["task_id","version"],type:"object"},TaskId:v1,UtcMicros:bs},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{receipt:{$ref:"#/$defs/HandoffOpenReceiptV1"},surface:{$ref:"#/$defs/TaskHandoffSurfaceV1"}},required:["surface","receipt"],title:"OpenTaskHandoffResultV1",type:"object"},{$defs:{ManifestDigest:gj,MultiRootContinuationV1:gG,MultiRootOperationV1:{description:"Closed federated read families. The family is typed while its existing\noperation-specific request remains the canonical JSON payload owned by that\napplication surface.",oneOf:[{properties:{kind:{const:"work",type:"string"},request:!0},required:["kind","request"],type:"object"},{properties:{kind:{const:"git",type:"string"},request:!0},required:["kind","request"],type:"object"},{properties:{kind:{const:"feedback",type:"string"},request:!0},required:["kind","request"],type:"object"},{properties:{kind:{const:"impact",type:"string"},request:!0},required:["kind","request"],type:"object"},{properties:{kind:{const:"query",type:"string"},request:!0},required:["kind","request"],type:"object"}]},RootGenerationV1:_6,RootScopeOutcomeV1_for_Nullable_RootGenerationV1:_3,RootScopeOutcomeV1_for_Nullable_string:_9,ScopeOutcome_for_Nullable_RootGenerationV1:va,ScopeOutcome_for_Nullable_string:vs,ScopePartialReasonV1:vd,ScopeSetId:vc,ScopeSetRevision:vl,ScopeUnavailableReasonV1:vu},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"External federated request bound to one persisted scope-set revision and\ndigest. Query/order digests and root generations are server-derived.",properties:{continuation:{anyOf:[{$ref:"#/$defs/MultiRootContinuationV1"},{type:"null"}]},operation:{$ref:"#/$defs/MultiRootOperationV1"},page:{format:"uint64",minimum:0,type:"integer"},scope_set_digest:{$ref:"#/$defs/ManifestDigest"},scope_set_id:{$ref:"#/$defs/ScopeSetId"},scope_set_revision:{$ref:"#/$defs/ScopeSetRevision"}},required:["scope_set_id","scope_set_revision","scope_set_digest","operation","page"],title:"MultiRootExecuteRequestV1",type:"object"},{$defs:{ManifestDigest:gj,MultiRootContinuationV1:gG,RootGenerationV1:_6,RootScopeOutcomeV1_for_Array_of_AnyValue:{additionalProperties:!1,description:"One typed outcome pinned to the digest of an exact resolved root.",properties:{outcome:{$ref:"#/$defs/ScopeOutcome_for_Array_of_AnyValue"},scope_digest:{$ref:"#/$defs/ManifestDigest"}},required:["scope_digest","outcome"],type:"object"},RootScopeOutcomeV1_for_Nullable_RootGenerationV1:_3,RootScopeOutcomeV1_for_Nullable_string:_9,ScopeOutcome_for_Array_of_AnyValue:{description:"Truthful outcome for one authorized root or an aggregate over roots.\n\n`Denied` and `Unavailable` carry no value and therefore cannot be confused\nwith a successful empty result.",oneOf:[{properties:{outcome:{const:"exact",type:"string"},value:{items:!0,type:"array"}},required:["outcome","value"],type:"object"},{properties:{outcome:{const:"partial",type:"string"},value:{properties:{reason:{$ref:"#/$defs/ScopePartialReasonV1"},value:{items:!0,type:"array"}},required:["value","reason"],type:"object"}},required:["outcome","value"],type:"object"},{properties:{outcome:{const:"denied",type:"string"}},required:["outcome"],type:"object"},{properties:{outcome:{const:"unavailable",type:"string"},value:{properties:{reason:{$ref:"#/$defs/ScopeUnavailableReasonV1"}},required:["reason"],type:"object"}},required:["outcome","value"],type:"object"}]},ScopeOutcome_for_Nullable_RootGenerationV1:va,ScopeOutcome_for_Nullable_string:vs,ScopePartialReasonV1:vd,ScopeSetId:vc,ScopeSetRevision:vl,ScopeUnavailableReasonV1:vu},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Federated page preserving each root outcome and aggregate partial truth.",properties:{aggregate:{$ref:"#/$defs/ScopeOutcome_for_Array_of_AnyValue"},continuation:{anyOf:[{$ref:"#/$defs/MultiRootContinuationV1"},{type:"null"}]},roots:{items:{$ref:"#/$defs/RootScopeOutcomeV1_for_Array_of_AnyValue"},type:"array"},scope_set_digest:{$ref:"#/$defs/ManifestDigest"},scope_set_id:{$ref:"#/$defs/ScopeSetId"},scope_set_revision:{$ref:"#/$defs/ScopeSetRevision"}},required:["scope_set_id","scope_set_revision","scope_set_digest","roots","aggregate"],title:"MultiRootQueryPageV1_for_AnyValue",type:"object"},{$defs:{ProjectId:_m,RegisteredRootSelectorV1:{additionalProperties:!1,description:"Exact registered-root selector accepted by scope-set CAS.",properties:{project_id:{$ref:"#/$defs/ProjectId"},root:{type:"string"}},required:["project_id","root"],type:"object"},ScopeSetId:vc,ScopeSetRevision:vl},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Canonical external selector for creating or updating an authorized scope\nset. Every member names one exact registered root; project-only selection\ncannot silently widen to an active or first-mounted graph.",properties:{expected_revision:{anyOf:[{$ref:"#/$defs/ScopeSetRevision"},{type:"null"}]},roots:{items:{$ref:"#/$defs/RegisteredRootSelectorV1"},type:"array"},scope_set_id:{$ref:"#/$defs/ScopeSetId"}},required:["scope_set_id","roots"],title:"MultiRootScopeSetCasRequestV1",type:"object"},{$defs:{ActorId:mU,AuthorizedRoot:m7,AuthorizedScopeSet:fe,BrainId:ff,ManifestDigest:gj,MultiRootScopeSetCasStatusV1:{enum:["applied","conflict"],type:"string"},ProjectId:_m,RefId:_T,RegisteredRootLocatorV1:_O,RepositoryId:_z,ResolvedScope:_U,ScopeSetId:vc,ScopeSetRevision:vl,SharedProfileStoreLocatorV1:vq,UserProfileId:ba,WorktreeId:So},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{scope_set:{anyOf:[{$ref:"#/$defs/AuthorizedScopeSet"},{type:"null"}]},status:{$ref:"#/$defs/MultiRootScopeSetCasStatusV1"}},required:["status"],title:"MultiRootScopeSetCasResultV1",type:"object"},{$defs:{ScopeSetId:vc},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{scope_set_id:{$ref:"#/$defs/ScopeSetId"}},required:["scope_set_id"],title:"MultiRootScopeSetReadRequestV1",type:"object"},{$defs:{ActorId:mU,AuthorizedRoot:m7,AuthorizedScopeSet:fe,BrainId:ff,ManifestDigest:gj,ProjectId:_m,RefId:_T,RegisteredRootLocatorV1:_O,RepositoryId:_z,ResolvedScope:_U,ScopeSetId:vc,ScopeSetRevision:vl,SharedProfileStoreLocatorV1:vq,UserProfileId:ba,WorktreeId:So},$schema:"https://json-schema.org/draft/2020-12/schema",anyOf:[{$ref:"#/$defs/AuthorizedScopeSet"},{type:"null"}],title:"Nullable_AuthorizedScopeSet"},{$defs:{AcceptWorkProposalDispositionV1:{description:"The accept-proposal operation can commit acceptance only.",enum:["accepted"],type:"string"},CatalogGenerationId:fE,ConfigurationRevisionId:f8,ManifestDigest:gj,ProjectId:_m,ProposalId:__,ProviderId:_w,RepositoryId:_z,RetrievalAnchorId:_J,SourceStoreId:vL,TaskId:v1,UtcMicros:bs,VerifiedWorkGraphVersionV1:bc,WorkCommandId:bC,WorkProductAuthorizedRelationScopeV1:$c,WorkProductEventEvidenceV1:$l,WorkProductExpectedAuthorityV1:$m,WorkProductMutationIdentityV1:$h,WorkProductRevisionPinsV1:$v,WorkProductSelectionScopeV1:$b,WorkProposalV1:$k,WorkProposedChildV1:$w,WorkProviderRouteId:$I,WorkProviderRouteV1:$x,WorkRouteDecisionV1:$N,WorkScoreKindV1:$G,WorkShapeAssessmentV1:$B,WorkSizingV1:$K},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{disposition:{$ref:"#/$defs/AcceptWorkProposalDispositionV1"},mutation:{$ref:"#/$defs/WorkProductMutationIdentityV1"},proposal:{$ref:"#/$defs/WorkProposalV1"},selection:{$ref:"#/$defs/WorkProductSelectionScopeV1"}},required:["selection","proposal","disposition","mutation"],title:"AcceptWorkProposalRequestV1",type:"object"},{$defs:{ActorId:mU,AttemptId:m5,BrainId:ff,CatalogGenerationId:fE,ConfigurationRevisionId:f8,ManifestDigest:gj,ProjectId:_m,ProposalId:__,ProviderId:_w,RepositoryId:_z,RetrievalAnchorId:_J,RunId:_8,SourceStoreId:vL,TaskEvidenceLinkV1:vX,TaskId:v1,UserProfileId:ba,UtcMicros:bs,VerifiedWorkGraphVersionV1:bc,WorkAcceptanceCriterionV1:bl,WorkAttemptIdentityV1:bh,WorkCommandId:bC,WorkGraphChangeV1:bX,WorkHandoffV1:b2,WorkHierarchyV1:b4,WorkInitiativeV1:b6,WorkItemInputV1:b3,WorkItemV1:b9,WorkMilestoneV1:$e,WorkPlanV1:$d,WorkProductAuthorizedRelationScopeV1:$c,WorkProductEventEvidenceV1:$l,WorkProductEventPayloadV1:$p,WorkProductEventV1:$u,WorkProductGraphV1:$f,WorkProductProfileScopeV1:$g,WorkProposalDecisionV1:$$,WorkProposalDispositionV1:$S,WorkProposalV1:$k,WorkProposedChildV1:$w,WorkProviderRouteId:$I,WorkProviderRouteV1:$x,WorkRelationReplanDecisionV1:$C,WorkRelationReplanProposalV1:$T,WorkRouteDecisionV1:$N,WorkScoreKindV1:$G,WorkShapeAssessmentV1:$B,WorkSizingV1:$K},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{event:{$ref:"#/$defs/WorkProductEventV1"},replayed:{type:"boolean"},verified_graph_version:{$ref:"#/$defs/VerifiedWorkGraphVersionV1"}},required:["event","verified_graph_version","replayed"],title:"WorkProductMutationReceiptV1",type:"object"},{$defs:{AttemptId:m5,CoverageStateV1:hM,DuplicateEffectOutcomeV1:hJ,DuplicateEffortKindV1:hZ,ProjectionGenerationId:_g,QuantityEvidenceClassV1:_R,RunId:_8,TaskId:v1,UtcMicros:bs,WorkAttemptIdentityV1:bh,WorkCommandId:bC,WorkDuplicateAdjudicationEvidenceV1:bO,WorkDuplicateAdjudicationQuantitiesV1:bE,WorkTopologyGenerationRefV1:$2},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{command_id:{$ref:"#/$defs/WorkCommandId"},evidence:{$ref:"#/$defs/WorkDuplicateAdjudicationEvidenceV1"},expected_revision:{format:"uint64",minimum:0,type:["integer","null"]},first_attempt:{$ref:"#/$defs/WorkAttemptIdentityV1"},occurred_at:{$ref:"#/$defs/UtcMicros"},quantities:{$ref:"#/$defs/WorkDuplicateAdjudicationQuantitiesV1"},reason:{type:"string"},second_attempt:{$ref:"#/$defs/WorkAttemptIdentityV1"},verdict:{$ref:"#/$defs/DuplicateEffortKindV1"}},required:["first_attempt","second_attempt","evidence","verdict","quantities","reason","command_id","occurred_at"],title:"WorkDuplicateAdjudicationCommandV1",type:"object"},{$defs:{ActorId:mU,AttemptId:m5,CoverageStateV1:hM,DuplicateEffectOutcomeV1:hJ,DuplicateEffortKindV1:hZ,ManifestDigest:gj,ProjectionGenerationId:_g,QuantityEvidenceClassV1:_R,RunId:_8,TaskId:v1,UtcMicros:bs,WorkAttemptIdentityV1:bh,WorkCommandId:bC,WorkDuplicateAdjudicationCommandV1:{additionalProperties:!1,properties:{command_id:{$ref:"#/$defs/WorkCommandId"},evidence:{$ref:"#/$defs/WorkDuplicateAdjudicationEvidenceV1"},expected_revision:{format:"uint64",minimum:0,type:["integer","null"]},first_attempt:{$ref:"#/$defs/WorkAttemptIdentityV1"},occurred_at:{$ref:"#/$defs/UtcMicros"},quantities:{$ref:"#/$defs/WorkDuplicateAdjudicationQuantitiesV1"},reason:{type:"string"},second_attempt:{$ref:"#/$defs/WorkAttemptIdentityV1"},verdict:{$ref:"#/$defs/DuplicateEffortKindV1"}},required:["first_attempt","second_attempt","evidence","verdict","quantities","reason","command_id","occurred_at"],type:"object"},WorkDuplicateAdjudicationEvidenceV1:bO,WorkDuplicateAdjudicationQuantitiesV1:bE,WorkDuplicateAdjudicationReceiptV1:{additionalProperties:!1,properties:{actor_id:{$ref:"#/$defs/ActorId"},adjudication_ref:{$ref:"#/$defs/ManifestDigest"},canonical_input_digest:{$ref:"#/$defs/ManifestDigest"},command:{$ref:"#/$defs/WorkDuplicateAdjudicationCommandV1"},revision:{format:"uint64",minimum:0,type:"integer"}},required:["command","revision","actor_id","canonical_input_digest","adjudication_ref"],type:"object"},WorkTopologyGenerationRefV1:$2},$schema:"https://json-schema.org/draft/2020-12/schema",oneOf:[{properties:{outcome:{const:"appended",type:"string"},receipt:{$ref:"#/$defs/WorkDuplicateAdjudicationReceiptV1"}},required:["outcome","receipt"],type:"object"},{properties:{outcome:{const:"replayed",type:"string"},receipt:{$ref:"#/$defs/WorkDuplicateAdjudicationReceiptV1"}},required:["outcome","receipt"],type:"object"}],title:"WorkDuplicateAdjudicationAppendOutcomeV1"},{$defs:{AttemptId:m5,RunId:_8,TaskId:v1,WorkAttemptIdentityV1:bh,WorkCommandId:bC},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{adjudication_id:{type:"string"},attempt:{$ref:"#/$defs/WorkAttemptIdentityV1"},command_id:{$ref:"#/$defs/WorkCommandId"},detection_horizon_micros:{format:"uint64",minimum:0,type:"integer"},expected_revision:{format:"uint64",minimum:0,type:["integer","null"]}},required:["adjudication_id","attempt","detection_horizon_micros","command_id"],title:"AdjudicateWorkLeakCommandV1",type:"object"},{$defs:{AdjudicateWorkLeakCommandV1:{additionalProperties:!1,properties:{adjudication_id:{type:"string"},attempt:{$ref:"#/$defs/WorkAttemptIdentityV1"},command_id:{$ref:"#/$defs/WorkCommandId"},detection_horizon_micros:{format:"uint64",minimum:0,type:"integer"},expected_revision:{format:"uint64",minimum:0,type:["integer","null"]}},required:["adjudication_id","attempt","detection_horizon_micros","command_id"],title:"AdjudicateWorkLeakCommandV1",type:"object"},AttemptId:m5,CoverageStateV1:hM,LeakOwnerClassV1:{enum:["work","workflow","git","delivery","unknown"],type:"string"},ManifestDigest:gj,RunId:_8,TaskId:v1,UtcMicros:bs,VerifiedWorkLeakEvidenceV1:{additionalProperties:!1,description:"Exact result of one scan by the canonical lease/process/effect/placement/\ndelivery evidence owner. Evidence references are opaque local anchors;\ntheir owning records remain behind normal authorization.",properties:{attempt:{$ref:"#/$defs/WorkAttemptIdentityV1"},coverage:{$ref:"#/$defs/CoverageStateV1"},detection_horizon_micros:{format:"uint64",minimum:0,type:"integer"},evidence_refs:{items:{type:"string"},type:"array"},kind:{$ref:"#/$defs/WorkExecutionLeakKindV1"},owner_class:{$ref:"#/$defs/LeakOwnerClassV1"},recovery:{$ref:"#/$defs/WorkExecutionLeakRecoveryV1"},scan_completed_at:{$ref:"#/$defs/UtcMicros"},scan_started_at:{$ref:"#/$defs/UtcMicros"}},required:["attempt","kind","recovery","owner_class","coverage","detection_horizon_micros","scan_started_at","scan_completed_at","evidence_refs"],type:"object"},WorkAttemptIdentityV1:bh,WorkCommandId:bC,WorkExecutionLeakKindV1:{enum:["lease_after_terminal","attempt_without_live_owner","effect_unknown_past_deadline","missing_worktree_binding","unbounded_delivery","none","unknown"],type:"string"},WorkExecutionLeakRecoveryV1:{enum:["not_required","pending","recovered","failed","unknown"],type:"string"},WorkLeakAdjudicationReceiptV1:{additionalProperties:!1,properties:{canonical_input_digest:{$ref:"#/$defs/ManifestDigest"},command:{$ref:"#/$defs/AdjudicateWorkLeakCommandV1"},evidence:{$ref:"#/$defs/VerifiedWorkLeakEvidenceV1"},revision:{format:"uint64",minimum:0,type:"integer"},scan_deadline:{$ref:"#/$defs/UtcMicros",description:"Daemon/request-owned deadline that bounded the source scan."}},required:["command","revision","evidence","scan_deadline","canonical_input_digest"],type:"object"}},$schema:"https://json-schema.org/draft/2020-12/schema",oneOf:[{properties:{outcome:{const:"appended",type:"string"},receipt:{$ref:"#/$defs/WorkLeakAdjudicationReceiptV1"}},required:["outcome","receipt"],type:"object"},{properties:{outcome:{const:"replayed",type:"string"},receipt:{$ref:"#/$defs/WorkLeakAdjudicationReceiptV1"}},required:["outcome","receipt"],type:"object"}],title:"WorkLeakAdjudicationOutcomeV1"},{$defs:{CatalogGenerationId:fE,ConfigurationRevisionId:f8,ManifestDigest:gj,ProjectId:_m,RepositoryId:_z,RetrievalAnchorId:_J,SourceStoreId:vL,TaskId:v1,UtcMicros:bs,VerifiedWorkGraphVersionV1:bc,WorkCommandId:bC,WorkProductAuthorizedRelationScopeV1:$c,WorkProductEventEvidenceV1:$l,WorkProductExpectedAuthorityV1:$m,WorkProductMutationIdentityV1:$h,WorkProductRevisionPinsV1:$v,WorkProductSelectionScopeV1:$b},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{based_on_version:{format:"uint64",minimum:0,type:"integer"},mutation:{$ref:"#/$defs/WorkProductMutationIdentityV1"},selection:{$ref:"#/$defs/WorkProductSelectionScopeV1"},task_id:{$ref:"#/$defs/TaskId"}},required:["selection","task_id","based_on_version","mutation"],title:"AdmitWorkExecutionRequestV1",type:"object"},{$defs:{ActorId:mU,AttemptId:m5,AutomaticWorktreeGcV1:fr,BrainId:ff,BranchCollisionPolicyV1:fh,BranchNameComponentV1:fy,BranchNameSeparatorV1:fg,BranchNamingPolicyV1:f_,BranchTopologyKindV1:fV,BranchTopologyPolicyV1:fP,CanonicalGitRefNameV1:fC,CanonicalGitRefPrefix:fT,CapabilityId:fO,CatalogGenerationId:fE,ConfigurationRevisionId:f8,ConfigurationSnapshotId:f7,CredentialReferenceId:hN,CrossMergeModeV1:hz,CrossMergePolicyV1:hD,GitHubStackedPullRequestPolicyV1:yH,HistoryRewritePolicyV1:y7,LocatorDigest:gk,ManifestDigest:gj,ProjectId:_m,ProposalId:__,ProtectedRefDispositionV1:_v,ProtectedRefRuleV1:_b,ProtectedRefSelectorV1:_$,ProviderId:_w,RepositoryId:_z,RepositoryPlacementScopeV1:_D,RequiredCheckExpectationV1:_F,RequiredCheckV1:_L,RetrievalAnchorId:_J,ReviewRequirementV1:_0,ReviewTopologyKindV1:_2,ReviewTopologyPolicyV1:_4,RunId:_8,SensitiveFilesystemLocatorV1:vf,SourceStoreId:vL,TaskEvidenceLinkV1:vX,TaskId:v1,TopologyConcurrencyPolicyV1:be,TopologyEscalationPolicyV1:bt,TopologyGatePolicyV1:br,TopologyNotificationLevelV1:bi,UserProfileId:ba,UtcMicros:bs,VerifiedWorkGraphVersionV1:bc,WorkAcceptanceCriterionV1:bl,WorkApprovalPolicy:bp,WorkAttemptIdentityV1:bh,WorkCommandId:bC,WorkEgressPolicy:bM,WorkExecutableReference:bL,WorkExecutionLimits:bH,WorkExecutionSnapshot:bG,WorkFallbackTopology:bJ,WorkFilesystemPolicy:bQ,WorkGraphChangeV1:bX,WorkHandoffV1:b2,WorkHierarchyV1:b4,WorkInitiativeV1:b6,WorkItemInputV1:b3,WorkItemV1:b9,WorkMilestoneV1:$e,WorkPlanV1:$d,WorkProductAuthorizedRelationScopeV1:$c,WorkProductEventEvidenceV1:$l,WorkProductEventPayloadV1:$p,WorkProductEventV1:$u,WorkProductGraphV1:$f,WorkProductMutationReceiptV1:$y,WorkProductProfileScopeV1:$g,WorkProposalDecisionV1:$$,WorkProposalDispositionV1:$S,WorkProposalV1:$k,WorkProposedChildV1:$w,WorkProviderBackendV1:$P,WorkProviderProtocol:$q,WorkProviderRouteId:$I,WorkProviderRouteV1:$x,WorkRelationReplanDecisionV1:$C,WorkRelationReplanProposalV1:$T,WorkRouteDecisionV1:$N,WorkSandboxPolicy:$H,WorkScoreKindV1:$G,WorkShapeAssessmentV1:$B,WorkSizingV1:$K,WorkTopologyPolicyV1:$4,WorktreeCleanlinessRequirementV1:Si,WorktreePlacementModeV1:Ss,WorktreeRetentionPolicyV1:Sd,WorktreeRootPolicyV1:Sc},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Execution admission together with the immutable provider snapshot licensed\nby the accepted proposal and current configuration authority.",properties:{execution_snapshot:{$ref:"#/$defs/WorkExecutionSnapshot"},mutation:{$ref:"#/$defs/WorkProductMutationReceiptV1"}},required:["mutation","execution_snapshot"],title:"AdmittedWorkExecutionV1",type:"object"},{$defs:{RunId:_8,TaskId:v1,UtcMicros:bs,WorkPlacementKindV1:$o,WorkPlacementTargetV1:$a},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{occurred_at:{$ref:"#/$defs/UtcMicros"},retention_eligible_at:{anyOf:[{$ref:"#/$defs/UtcMicros"},{type:"null"}],default:null,description:"When retention makes this placement eligible for a fresh cleanup\npreflight. Eligibility is not delete authority."},run_id:{$ref:"#/$defs/RunId"},target:{$ref:"#/$defs/WorkPlacementTargetV1"},task_id:{$ref:"#/$defs/TaskId"}},required:["task_id","run_id","target","occurred_at"],title:"AdmitWorkPlacementCommand",type:"object"},{$defs:{RunId:_8,TaskId:v1,UtcMicros:bs,WorkPlacementBlockerV1:$r,WorkPlacementIdentityV1:$i,WorkPlacementKindV1:$o,WorkPlacementStateV1:$n,WorkPlacementTargetV1:$a},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"One run's durable placement relation.",properties:{authority_version:{format:"uint64",minimum:0,type:"integer"},blockers:{items:{$ref:"#/$defs/WorkPlacementBlockerV1"},type:"array",uniqueItems:!0},identity:{$ref:"#/$defs/WorkPlacementIdentityV1"},retention_eligible_at:{anyOf:[{$ref:"#/$defs/UtcMicros"},{type:"null"}],description:"When retention makes this placement *eligible* for a fresh cleanup\npreflight. Eligibility is not delete authority."},state:{$ref:"#/$defs/WorkPlacementStateV1"},target:{$ref:"#/$defs/WorkPlacementTargetV1"},transitioned_at:{$ref:"#/$defs/UtcMicros"}},required:["identity","target","state","authority_version","transitioned_at","blockers"],title:"WorkPlacementV1",type:"object"},{$defs:{CommitId:fX,RefId:_T,WorkEffectStateV1:bA,WorkJobBaseV1:{additionalProperties:!1,description:"The source revision every attempt in the job starts from.",properties:{commit:{$ref:"#/$defs/CommitId"},reference:{anyOf:[{$ref:"#/$defs/RefId"},{type:"null"}]}},required:["commit"],type:"object"},WorkJobKeyV1:b5,WorkJobNameV1:{description:"A job name: `[a-z0-9-]`, 1 to 48 bytes. Identities derive from it.",type:"string"},WorkJobSynthesisV1:{additionalProperties:!1,properties:{instructions:{type:"string"},output_name:{$ref:"#/$defs/WorkflowOutputName"},task:{$ref:"#/$defs/WorkJobKeyV1",description:"The synthesis attempt runs under this task's run and execution snapshot."}},required:["task","output_name","instructions"],type:"object"},WorkJobTaskV1:{additionalProperties:!1,properties:{instructions:{type:"string"},key:{$ref:"#/$defs/WorkJobKeyV1"},placement:{$ref:"#/$defs/WorkPlacementTargetV1"},title:{type:"string"}},required:["key","title","instructions","placement"],type:"object"},WorkPlacementKindV1:$o,WorkPlacementTargetV1:$a,WorkflowOutputName:$8},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"One guided job: the tasks to run in parallel, where each runs, and the\nsynthesis that reviews them.",properties:{base:{$ref:"#/$defs/WorkJobBaseV1"},effect_state:{$ref:"#/$defs/WorkEffectStateV1"},job:{$ref:"#/$defs/WorkJobNameV1"},synthesis:{$ref:"#/$defs/WorkJobSynthesisV1"},tasks:{items:{$ref:"#/$defs/WorkJobTaskV1"},type:"array"},title:{type:"string"}},required:["job","title","base","effect_state","tasks","synthesis"],title:"AdvanceWorkJobRequestV1",type:"object"},{$defs:{ActorId:mU,AdmittedWorkExecutionV1:{additionalProperties:!1,description:"Execution admission together with the immutable provider snapshot licensed\nby the accepted proposal and current configuration authority.",properties:{execution_snapshot:{$ref:"#/$defs/WorkExecutionSnapshot"},mutation:{$ref:"#/$defs/WorkProductMutationReceiptV1"}},required:["mutation","execution_snapshot"],type:"object"},ApplicationExecutionFailureClassV1:{description:"Stable non-retryable class for an admitted execution failure.",enum:["denied","malformed_output","permanent"],type:"string"},ApplicationProblemDetailV1:m9,ApplicationProblemKind:{description:"Stable problem-code taxonomy for request failures and admitted terminals.",enum:["invalid_request","not_found_or_not_authorized","conflict","partial_effect","stale","unsupported","unavailable","execution_failed","reset_required","saturated","cancelled","timed_out"],type:"string"},ApplicationProblemRecord:{additionalProperties:!1,description:"Stable application problem record shared verbatim by every adapter.",properties:{cancellation_stage:{$ref:"#/$defs/RequiredNullable3"},code:{type:"string"},committed_receipt:{$ref:"#/$defs/RequiredNullable2",description:"A committed effect is present only for an admitted partial effect.\nThe nullable field is always serialized: omitting it would create a\ncompatibility/default path that could hide a missing receipt."},coverage:{anyOf:[{$ref:"#/$defs/EvidenceCoverage"},{type:"null"}]},detail:{$ref:"#/$defs/RequiredNullable",description:"The structured facts `message` is rendered from, when the problem has\nany. Always serialized so a client never mistakes an omitted detail\nfor a problem without one."},details:{items:{$ref:"#/$defs/SafeDiagnostic"},type:"array"},diagnostic:{anyOf:[{$ref:"#/$defs/SafeDiagnostic"},{type:"null"}]},execution_failure_classification:{$ref:"#/$defs/RequiredNullable5"},kind:{$ref:"#/$defs/ApplicationProblemKind"},legal_actions:{items:{$ref:"#/$defs/LegalAction"},type:"array"},message:{type:"string"},owning_layer:{$ref:"#/$defs/ProblemOwningLayer"},request_id:{type:"string"},retry:{$ref:"#/$defs/RetryDirective"},retry_after_millis:{format:"uint64",minimum:0,type:["integer","null"]},retry_scope:{anyOf:[{$ref:"#/$defs/RetryScope"},{type:"null"}]},retryable:{type:"boolean"},revision:{format:"uint32",minimum:0,type:"integer"},terminality:{$ref:"#/$defs/ProblemTerminality"},trace_id:{type:"string"},unavailable_classification:{$ref:"#/$defs/RequiredNullable4"}},required:["revision","kind","code","message","detail","committed_receipt","owning_layer","terminality","retryable","retry","cancellation_stage","unavailable_classification","execution_failure_classification","request_id","trace_id","details","legal_actions"],type:"object"},ApplicationUnavailableClassV1:{description:"Stable reason an application authority is unavailable.",enum:["authority","backend_unavailable","backend_disconnected","backend_retryable"],type:"string"},AttemptId:m5,AutomaticWorktreeGcV1:fr,BrainId:ff,BranchCollisionPolicyV1:fh,BranchNameComponentV1:fy,BranchNameSeparatorV1:fg,BranchNamingPolicyV1:f_,BranchTopologyKindV1:fV,BranchTopologyPolicyV1:fP,CancellationStage:fx,CanonicalGitRefNameV1:fC,CanonicalGitRefPrefix:fT,CapabilityId:fO,CatalogGenerationId:fE,CommitId:fX,ConfigurationRevisionId:f8,ConfigurationSnapshotId:f7,CoverageCompleteness:hA,CoverageDomainState:hW,CredentialReferenceId:hN,CrossMergeModeV1:hz,CrossMergePolicyV1:hD,DaemonServiceUnitObservationV1:hF,DiagnosticsSearchedTsconfigV1:hG,EffectClass:hQ,EffectReceipt:hX,EffectTermination:hY,EvidenceCoverage:h1,EvidenceDomain:h0,GitHubStackedPullRequestPolicyV1:yH,HistoryRewritePolicyV1:y7,LegalAction:{description:"Bounded action an adapter may offer without inferring executable authority.",enum:["correct_request","reauthorize","refresh","retry","reconcile","reset","restart_without_cursor","contact_administrator"],type:"string"},LocatorDigest:gk,ManifestDigest:gj,ProblemOwningLayer:{description:"Layer that owns resolving the problem rather than merely presenting it.",enum:["adapter","application","runtime","port"],type:"string"},ProblemTerminality:{description:"Whether the problem occurred before admission or is an admitted terminal.",enum:["pre_admission","admitted_terminal"],type:"string"},ProjectId:_m,ProposalId:__,ProtectedRefDispositionV1:_v,ProtectedRefRuleV1:_b,ProtectedRefSelectorV1:_$,ProviderId:_w,RefId:_T,RepositoryId:_z,RepositoryPlacementScopeV1:_D,RequiredCheckExpectationV1:_F,RequiredCheckV1:_L,RequiredNullable:{anyOf:[{$ref:"#/$defs/ApplicationProblemDetailV1"},{type:"null"}],description:"Unlike `Option`, this wrapper distinguishes an explicit JSON `null`\nfrom an omitted field. New terminal-state fields must be present on every\nrecord so a missing committed receipt cannot be mistaken for `None`."},RequiredNullable2:{anyOf:[{$ref:"#/$defs/EffectReceipt"},{type:"null"}],description:"Unlike `Option`, this wrapper distinguishes an explicit JSON `null`\nfrom an omitted field. New terminal-state fields must be present on every\nrecord so a missing committed receipt cannot be mistaken for `None`."},RequiredNullable3:{anyOf:[{$ref:"#/$defs/CancellationStage"},{type:"null"}],description:"Unlike `Option`, this wrapper distinguishes an explicit JSON `null`\nfrom an omitted field. New terminal-state fields must be present on every\nrecord so a missing committed receipt cannot be mistaken for `None`."},RequiredNullable4:{anyOf:[{$ref:"#/$defs/ApplicationUnavailableClassV1"},{type:"null"}],description:"Unlike `Option`, this wrapper distinguishes an explicit JSON `null`\nfrom an omitted field. New terminal-state fields must be present on every\nrecord so a missing committed receipt cannot be mistaken for `None`."},RequiredNullable5:{anyOf:[{$ref:"#/$defs/ApplicationExecutionFailureClassV1"},{type:"null"}],description:"Unlike `Option`, this wrapper distinguishes an explicit JSON `null`\nfrom an omitted field. New terminal-state fields must be present on every\nrecord so a missing committed receipt cannot be mistaken for `None`."},ResolvedScope:_U,RetrievalAnchorId:_J,RetryDirective:{description:"Safe adapter-independent retry instruction. Adapters preserve it verbatim.",enum:["never","same_request","after_delay","after_revalidate","after_reconcile"],type:"string"},RetryScope:{description:"Request identity boundary within which a retry remains valid.",enum:["same_request","same_operation","fresh_request"],type:"string"},ReviewRequirementV1:_0,ReviewTopologyKindV1:_2,ReviewTopologyPolicyV1:_4,RunId:_8,SafeDiagnostic:{additionalProperties:!1,description:"Sanitized detail that may cross the application boundary.",properties:{code:{type:"string"},message:{type:"string"}},required:["code","message"],type:"object"},SensitiveFilesystemLocatorV1:vf,SourceStoreId:vL,TaskEvidenceLinkV1:vX,TaskId:v1,TopologyConcurrencyPolicyV1:be,TopologyEscalationPolicyV1:bt,TopologyGatePolicyV1:br,TopologyNotificationLevelV1:bi,UseCaseId:bn,UserProfileId:ba,UtcMicros:bs,VerifiedWorkGraphVersionV1:bc,WorkAcceptanceCriterionV1:bl,WorkApprovalPolicy:bp,WorkArtifactId:bu,WorkArtifactRefV1:bm,WorkAttemptIdentityV1:bh,WorkAttemptProgressV1:b_,WorkAttemptProjectionBindingV1:bv,WorkAttemptStateV1:bS,WorkAttemptV1:bP,WorkCancellationAcknowledgementV1:bR,WorkCancellationEscalationV1:bq,WorkCancellationRequestId:bI,WorkCancellationRequestV1:bx,WorkCancellationStateV1:bj,WorkCommandId:bC,WorkEffectStateV1:bA,WorkEgressPolicy:bM,WorkExecutableReference:bL,WorkExecutionEnvelopeV1:bU,WorkExecutionLimits:bH,WorkExecutionSnapshot:bG,WorkFallbackTopology:bJ,WorkFenceEpochV1:bZ,WorkFilesystemPolicy:bQ,WorkGraphChangeV1:bX,WorkHandoffV1:b2,WorkHierarchyV1:b4,WorkInitiativeV1:b6,WorkItemInputV1:b3,WorkItemV1:b9,WorkJobIdentitiesV1:{additionalProperties:!1,properties:{operation:{$ref:"#/$defs/WorkflowOperationRef"},synthesis:{$ref:"#/$defs/WorkAttemptIdentityV1"},tasks:{items:{$ref:"#/$defs/WorkJobTaskIdentitiesV1"},type:"array"}},required:["operation","tasks","synthesis"],type:"object"},WorkJobKeyV1:b5,WorkJobStateV1:{oneOf:[{additionalProperties:!1,description:"The call's deadline floor arrived with work left; call again now.",properties:{state:{const:"advancing",type:"string"}},required:["state"],type:"object"},{additionalProperties:!1,description:"Nothing can move until providers, routing, or capacity progress.",properties:{on:{items:{$ref:"#/$defs/WorkJobWaitV1"},type:"array"},state:{const:"waiting",type:"string"}},required:["state","on"],type:"object"},{additionalProperties:!1,description:"The chain stopped at `step`. `problem` is the record the step's own\noperation produced, or a guided refusal naming the job-level cause.",properties:{problem:{$ref:"#/$defs/ApplicationProblemRecord"},state:{const:"refused",type:"string"},step:{$ref:"#/$defs/WorkJobStepV1"}},required:["state","step","problem"],type:"object"},{additionalProperties:!1,properties:{sources:{items:{$ref:"#/$defs/WorkAttemptV1"},type:"array"},state:{const:"completed",type:"string"},synthesis:{$ref:"#/$defs/WorkAttemptV1"}},required:["state","sources","synthesis"],type:"object"}]},WorkJobStepRecordV1:{additionalProperties:!1,description:"A step this call executed, with its operation's own effect receipt.",properties:{receipt:{$ref:"#/$defs/EffectReceipt"},request_id:{type:"string"},result:{$ref:"#/$defs/WorkJobStepResultV1"},step:{$ref:"#/$defs/WorkJobStepV1"}},required:["step","request_id","receipt","result"],type:"object"},WorkJobStepResultV1:{description:"Every arm is an existing Work operation's own output.",oneOf:[{properties:{result:{const:"graph",type:"string"},value:{$ref:"#/$defs/WorkProductMutationReceiptV1"}},required:["result","value"],type:"object"},{properties:{result:{const:"execution",type:"string"},value:{$ref:"#/$defs/AdmittedWorkExecutionV1"}},required:["result","value"],type:"object"},{properties:{result:{const:"placement",type:"string"},value:{$ref:"#/$defs/WorkPlacementV1"}},required:["result","value"],type:"object"},{properties:{result:{const:"attempt",type:"string"},value:{$ref:"#/$defs/WorkAttemptV1"}},required:["result","value"],type:"object"},{properties:{result:{const:"synthesis",type:"string"},value:{$ref:"#/$defs/WorkSynthesisAttemptV1"}},required:["result","value"],type:"object"}]},WorkJobStepV1:{description:"One existing Work operation the guided job runs. There is deliberately no\narm that advances a job, so a step can never recurse into the guided path.",oneOf:[{additionalProperties:!1,properties:{step:{const:"create_task",type:"string"},task:{$ref:"#/$defs/WorkJobKeyV1"}},required:["step","task"],type:"object"},{additionalProperties:!1,properties:{step:{const:"accept_proposal",type:"string"},task:{$ref:"#/$defs/WorkJobKeyV1"}},required:["step","task"],type:"object"},{additionalProperties:!1,properties:{step:{const:"admit_execution",type:"string"},task:{$ref:"#/$defs/WorkJobKeyV1"}},required:["step","task"],type:"object"},{additionalProperties:!1,properties:{step:{const:"admit_placement",type:"string"},task:{$ref:"#/$defs/WorkJobKeyV1"}},required:["step","task"],type:"object"},{additionalProperties:!1,properties:{step:{const:"start_source",type:"string"},task:{$ref:"#/$defs/WorkJobKeyV1"}},required:["step","task"],type:"object"},{additionalProperties:!1,properties:{step:{const:"await_sources",type:"string"}},required:["step"],type:"object"},{additionalProperties:!1,properties:{step:{const:"synthesize",type:"string"}},required:["step"],type:"object"},{additionalProperties:!1,properties:{step:{const:"await_synthesis",type:"string"}},required:["step"],type:"object"},{additionalProperties:!1,properties:{step:{const:"release_placement",type:"string"},task:{$ref:"#/$defs/WorkJobKeyV1"}},required:["step","task"],type:"object"}]},WorkJobTaskIdentitiesV1:{additionalProperties:!1,properties:{key:{$ref:"#/$defs/WorkJobKeyV1"},proposal_id:{$ref:"#/$defs/ProposalId"},source:{$ref:"#/$defs/WorkAttemptIdentityV1"}},required:["key","proposal_id","source"],type:"object"},WorkJobWaitV1:{oneOf:[{additionalProperties:!1,description:"The proposal route abstained, as it does while routing warms.",properties:{reason:{type:"string"},task:{$ref:"#/$defs/WorkJobKeyV1"},wait:{const:"proposal_route",type:"string"}},required:["wait","task","reason"],type:"object"},{additionalProperties:!1,properties:{identity:{$ref:"#/$defs/WorkAttemptIdentityV1"},state:{$ref:"#/$defs/WorkAttemptStateV1"},wait:{const:"attempt",type:"string"}},required:["wait","identity","state"],type:"object"},{additionalProperties:!1,description:"The registered topology has no free attempt slot for this task.",properties:{problem:{$ref:"#/$defs/ApplicationProblemRecord"},task:{$ref:"#/$defs/WorkJobKeyV1"},wait:{const:"capacity",type:"string"}},required:["wait","task","problem"],type:"object"}]},WorkLeaseFenceV1:b8,WorkLeaseId:b7,WorkMilestoneV1:$e,WorkPlacementBlockerV1:$r,WorkPlacementIdentityV1:$i,WorkPlacementKindV1:$o,WorkPlacementStateV1:$n,WorkPlacementTargetV1:$a,WorkPlacementV1:$s,WorkPlanV1:$d,WorkProductAuthorizedRelationScopeV1:$c,WorkProductEventEvidenceV1:$l,WorkProductEventPayloadV1:$p,WorkProductEventV1:$u,WorkProductGraphV1:$f,WorkProductMutationReceiptV1:$y,WorkProductProfileScopeV1:$g,WorkProposalDecisionV1:$$,WorkProposalDispositionV1:$S,WorkProposalV1:$k,WorkProposedChildV1:$w,WorkProviderBackendV1:$P,WorkProviderProtocol:$q,WorkProviderRouteId:$I,WorkProviderRouteV1:$x,WorkRecoveryStateV1:$j,WorkRelationReplanDecisionV1:$C,WorkRelationReplanProposalV1:$T,WorkRestartReasonV1:$O,WorkRouteDecisionV1:$N,WorkSandboxPolicy:$H,WorkScoreKindV1:$G,WorkShapeAssessmentV1:$B,WorkSizingV1:$K,WorkSynthesisAttemptV1:{description:"The typed outcome of a synthesis request: an admitted attempt, or the\nsealed unsynthesized set when synthesis could not truthfully begin.",oneOf:[{additionalProperties:!1,description:"The admitted synthesis attempt and everything it is accountable to.",properties:{attempt:{$ref:"#/$defs/WorkAttemptV1",description:"The leased (or idempotently replayed) synthesis attempt."},draft:{$ref:"#/$defs/WorkflowSynthesisDraft",description:"The citation obligation, complete by construction: the draft cites\nevery citable source digest and is verified downstream by\n[`crate::workflow_synthesis::verify_workflow_synthesis_draft`]."},groups:{description:"Disagreement structure over the succeeded sources.",items:{$ref:"#/$defs/WorkSynthesisEvidenceGroupV1"},type:"array"},source_set:{$ref:"#/$defs/WorkSynthesisSourceSetV1",description:"The sealed source envelopes the attempt was admitted against."},synthesis:{const:"admitted",type:"string"},uncited:{description:"Sources preserved without citations: failures, unknowns, and\nartifact-less successes, in the caller's requested order.",items:{$ref:"#/$defs/WorkAttemptIdentityV1"},type:"array"}},required:["synthesis","attempt","source_set","groups","draft","uncited"],type:"object"},{properties:{refusal:{$ref:"#/$defs/WorkSynthesisRefusalV1"},sources:{$ref:"#/$defs/WorkSynthesisSourceSetV1"},synthesis:{const:"unsynthesized",type:"string"}},required:["synthesis","sources","refusal"],type:"object"}]},WorkSynthesisEvidenceGroupV1:$J,WorkSynthesisRefusalV1:$Z,WorkSynthesisSourceEnvelopeV1:$Q,WorkSynthesisSourceOutcomeV1:$X,WorkSynthesisSourceSetV1:$Y,WorkTerminalEvidenceV1:$0,WorkTopologyPolicyV1:$4,WorkflowOperationRef:$5,WorkflowOutputName:$8,WorkflowSynthesisDraft:Sr,WorktreeCleanlinessRequirementV1:Si,WorktreeId:So,WorktreePlacementModeV1:Ss,WorktreeRetentionPolicyV1:Sd,WorktreeRootPolicyV1:Sc},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"What one call did and where the job now stands.",properties:{job:{$ref:"#/$defs/WorkJobIdentitiesV1",description:"The derived identities, so the advanced operations can target them."},performed:{description:"Only the steps this call executed, in order.",items:{$ref:"#/$defs/WorkJobStepRecordV1"},type:"array"},state:{$ref:"#/$defs/WorkJobStateV1"}},required:["job","performed","state"],title:"AdvanceWorkJobResultV1",type:"object"},{$defs:{AttemptId:m5,RunId:_8,TaskId:v1},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{attempt_id:{$ref:"#/$defs/AttemptId"},run_id:{$ref:"#/$defs/RunId"},task_id:{$ref:"#/$defs/TaskId"}},required:["task_id","run_id","attempt_id"],title:"WorkAttemptStatusRequestV1",type:"object"},{$defs:{AttemptId:m5,AutomaticWorktreeGcV1:fr,BranchCollisionPolicyV1:fh,BranchNameComponentV1:fy,BranchNameSeparatorV1:fg,BranchNamingPolicyV1:f_,BranchTopologyKindV1:fV,BranchTopologyPolicyV1:fP,CanonicalGitRefNameV1:fC,CanonicalGitRefPrefix:fT,CapabilityId:fO,CommitId:fX,ConfigurationRevisionId:f8,ConfigurationSnapshotId:f7,CredentialReferenceId:hN,CrossMergeModeV1:hz,CrossMergePolicyV1:hD,GitHubStackedPullRequestPolicyV1:yH,HistoryRewritePolicyV1:y7,LocatorDigest:gk,ManifestDigest:gj,ProjectId:_m,ProposalId:__,ProtectedRefDispositionV1:_v,ProtectedRefRuleV1:_b,ProtectedRefSelectorV1:_$,ProviderId:_w,RefId:_T,RepositoryId:_z,RepositoryPlacementScopeV1:_D,RequiredCheckExpectationV1:_F,RequiredCheckV1:_L,ReviewRequirementV1:_0,ReviewTopologyKindV1:_2,ReviewTopologyPolicyV1:_4,RunId:_8,SensitiveFilesystemLocatorV1:vf,TaskId:v1,TopologyConcurrencyPolicyV1:be,TopologyEscalationPolicyV1:bt,TopologyGatePolicyV1:br,TopologyNotificationLevelV1:bi,UtcMicros:bs,WorkApprovalPolicy:bp,WorkArtifactId:bu,WorkArtifactRefV1:bm,WorkAttemptIdentityV1:bh,WorkAttemptProgressV1:b_,WorkAttemptProjectionBindingV1:bv,WorkAttemptStateV1:bS,WorkCancellationAcknowledgementV1:bR,WorkCancellationEscalationV1:bq,WorkCancellationRequestId:bI,WorkCancellationRequestV1:bx,WorkCancellationStateV1:bj,WorkEffectStateV1:bA,WorkEgressPolicy:bM,WorkExecutableReference:bL,WorkExecutionEnvelopeV1:bU,WorkExecutionLimits:bH,WorkExecutionSnapshot:bG,WorkFallbackTopology:bJ,WorkFenceEpochV1:bZ,WorkFilesystemPolicy:bQ,WorkLeaseFenceV1:b8,WorkLeaseId:b7,WorkProviderBackendV1:$P,WorkProviderProtocol:$q,WorkProviderRouteId:$I,WorkProviderRouteV1:$x,WorkRecoveryStateV1:$j,WorkRestartReasonV1:$O,WorkSandboxPolicy:$H,WorkTerminalEvidenceV1:$0,WorkTopologyPolicyV1:$4,WorkflowOperationRef:$5,WorktreeCleanlinessRequirementV1:Si,WorktreeId:So,WorktreePlacementModeV1:Ss,WorktreeRetentionPolicyV1:Sd,WorktreeRootPolicyV1:Sc},$schema:"https://json-schema.org/draft/2020-12/schema",properties:{actual_route:{anyOf:[{$ref:"#/$defs/WorkProviderRouteV1"},{type:"null"}]},artifacts:{items:{$ref:"#/$defs/WorkArtifactRefV1"},type:"array"},cancellation:{$ref:"#/$defs/WorkCancellationStateV1"},execution:{$ref:"#/$defs/WorkExecutionEnvelopeV1"},identity:{$ref:"#/$defs/WorkAttemptIdentityV1"},lease:{$ref:"#/$defs/WorkLeaseFenceV1"},progress:{anyOf:[{$ref:"#/$defs/WorkAttemptProgressV1"},{type:"null"}]},projection_binding:{$ref:"#/$defs/WorkAttemptProjectionBindingV1"},recovery:{$ref:"#/$defs/WorkRecoveryStateV1"},requested_route:{$ref:"#/$defs/WorkProviderRouteV1"},state:{$ref:"#/$defs/WorkAttemptStateV1"},terminal:{anyOf:[{$ref:"#/$defs/WorkTerminalEvidenceV1"},{type:"null"}]}},required:["identity","projection_binding","execution","lease","state","artifacts","cancellation","recovery","requested_route"],title:"WorkAttemptV1",type:"object"},{$defs:{AttemptId:m5,RunId:_8,TaskId:v1,UtcMicros:bs,WorkCancellationRequestId:bI},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{attempt_id:{$ref:"#/$defs/AttemptId"},occurred_at:{$ref:"#/$defs/UtcMicros"},request_id:{$ref:"#/$defs/WorkCancellationRequestId"},run_id:{$ref:"#/$defs/RunId"},task_id:{$ref:"#/$defs/TaskId"}},required:["task_id","run_id","attempt_id","request_id","occurred_at"],title:"CancelWorkAttemptCommand",type:"object"},{$defs:{ManifestDigest:gj,ProjectId:_m,RepositoryId:_z,TaskId:v1,UtcMicros:bs,VerifiedWorkGraphVersionV1:bc,WorkProductAuthorizedRelationScopeV1:$c,WorkProductSelectionScopeV1:$b},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{new_version:{$ref:"#/$defs/VerifiedWorkGraphVersionV1"},observed_at:{$ref:"#/$defs/UtcMicros"},old_version:{$ref:"#/$defs/VerifiedWorkGraphVersionV1"},selection:{$ref:"#/$defs/WorkProductSelectionScopeV1"},task_id:{$ref:"#/$defs/TaskId"}},required:["selection","task_id","old_version","new_version","observed_at"],title:"WorkProposalComparisonRequestV1",type:"object"},{$defs:{ActorId:mU,AttemptId:m5,ManifestDigest:gj,ProposalId:__,ProviderId:_w,RetrievalAnchorId:_J,RunId:_8,TaskEvidenceLinkV1:vX,TaskId:v1,UtcMicros:bs,VerifiedWorkEvidenceRootV1:{additionalProperties:!1,properties:{item:{$ref:"#/$defs/WorkItemV1"},links:{items:{$ref:"#/$defs/TaskEvidenceLinkV1"},type:"array"},proposal_decisions:{items:{$ref:"#/$defs/WorkProposalDecisionV1"},type:"array"},relation_replan_decisions:{items:{$ref:"#/$defs/WorkRelationReplanDecisionV1"},type:"array"},relations:{items:{$ref:"#/$defs/WorkProductRelationV1"},type:"array"},verified_version:{$ref:"#/$defs/VerifiedWorkGraphVersionV1"}},required:["verified_version","item","relations","proposal_decisions","relation_replan_decisions","links"],type:"object"},VerifiedWorkGraphVersionV1:bc,WorkAcceptanceCriterionV1:bl,WorkAttemptIdentityV1:bh,WorkHandoffV1:b2,WorkHierarchyV1:b4,WorkItemInputV1:b3,WorkItemV1:b9,WorkProductRelationV1:$_,WorkProposalComparisonEffectV1:{oneOf:[{const:"advisory_only",description:"Comparison is evidence only. There is no apply edge from this result.",type:"string"}]},WorkProposalDecisionV1:$$,WorkProposalDispositionV1:$S,WorkProposalV1:$k,WorkProposedChildV1:$w,WorkProviderRouteId:$I,WorkProviderRouteV1:$x,WorkRelationReplanDecisionV1:$C,WorkRelationReplanProposalV1:$T,WorkRouteDecisionV1:$N,WorkScoreKindV1:$G,WorkShapeAssessmentV1:$B,WorkSizingV1:$K},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{added_evidence:{items:{$ref:"#/$defs/TaskEvidenceLinkV1"},type:"array"},added_relations:{items:{$ref:"#/$defs/WorkProductRelationV1"},type:"array"},effect:{$ref:"#/$defs/WorkProposalComparisonEffectV1"},item_changed:{type:"boolean"},new:{$ref:"#/$defs/VerifiedWorkEvidenceRootV1"},old:{$ref:"#/$defs/VerifiedWorkEvidenceRootV1"},removed_evidence:{items:{$ref:"#/$defs/TaskEvidenceLinkV1"},type:"array"},removed_relations:{items:{$ref:"#/$defs/WorkProductRelationV1"},type:"array"},task_id:{$ref:"#/$defs/TaskId"}},required:["task_id","old","new","added_relations","removed_relations","added_evidence","removed_evidence","item_changed","effect"],title:"WorkProposalComparisonV1",type:"object"},{$defs:{ActorId:mU,AttemptId:m5,CatalogGenerationId:fE,ConfigurationRevisionId:f8,ManifestDigest:gj,ProjectId:_m,ProposalId:__,ProviderId:_w,RepositoryId:_z,RetrievalAnchorId:_J,RunId:_8,SourceStoreId:vL,TaskId:v1,UtcMicros:bs,VerifiedWorkGraphVersionV1:bc,WorkAcceptanceCriterionV1:bl,WorkAttemptIdentityV1:bh,WorkCommandId:bC,WorkHandoffV1:b2,WorkHierarchyV1:b4,WorkInitiativeV1:b6,WorkItemInputV1:b3,WorkItemV1:b9,WorkMilestoneV1:$e,WorkPlanV1:$d,WorkProductAuthorizedRelationScopeV1:$c,WorkProductEventEvidenceV1:$l,WorkProductExpectedAuthorityV1:$m,WorkProductMutationIdentityV1:$h,WorkProductRevisionPinsV1:$v,WorkProductSelectionScopeV1:$b,WorkProviderRouteId:$I,WorkProviderRouteV1:$x,WorkRouteDecisionV1:$N},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{initiative:{$ref:"#/$defs/WorkInitiativeV1"},item:{$ref:"#/$defs/WorkItemV1"},milestone:{$ref:"#/$defs/WorkMilestoneV1"},mutation:{$ref:"#/$defs/WorkProductMutationIdentityV1"},plan:{$ref:"#/$defs/WorkPlanV1"},selection:{$ref:"#/$defs/WorkProductSelectionScopeV1"}},required:["selection","initiative","plan","milestone","item","mutation"],title:"CreateWorkTaskRequestV1",type:"object"},{$defs:{WorkAttemptListCursorV1:bg},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{cursor:{anyOf:[{$ref:"#/$defs/WorkAttemptListCursorV1"},{type:"null"}],default:null},page_size:{format:"uint32",minimum:0,type:"integer"}},required:["page_size"],title:"WorkAttemptListRequestV1",type:"object"},{$defs:{AttemptId:m5,ManifestDigest:gj,RunId:_8,TaskId:v1,UtcMicros:bs,WorkAttemptIdentityV1:bh,WorkAttemptListCoverageV1:by,WorkAttemptListCursorV1:bg,WorkAttemptStateV1:bS,WorkEffectStateV1:bA,WorkExecutionSpanV1:{additionalProperties:!1,properties:{admitted_projection_sequence:{description:"Durable Work projection sequence under which execution was admitted.",format:"uint64",minimum:0,type:"integer"},effect_state:{$ref:"#/$defs/WorkEffectStateV1"},ended_at:{anyOf:[{$ref:"#/$defs/UtcMicros"},{type:"null"}]},identity:{$ref:"#/$defs/WorkAttemptIdentityV1"},started_at:{$ref:"#/$defs/UtcMicros"},state:{$ref:"#/$defs/WorkAttemptStateV1"},terminal_evidence_digest:{anyOf:[{$ref:"#/$defs/ManifestDigest"},{type:"null"}]},wall_micros:{description:"Present only when both owner instants form a valid non-negative span.",format:"uint64",minimum:0,type:["integer","null"]}},required:["identity","admitted_projection_sequence","state","effect_state","started_at"],type:"object"},WorkExecutionTimingCoverageV1:{oneOf:[{additionalProperties:!1,properties:{coverage:{const:"complete",type:"string"}},required:["coverage"],type:"object"},{additionalProperties:!1,properties:{coverage:{const:"partial",type:"string"},invalid_terminal_span:{items:{$ref:"#/$defs/WorkAttemptIdentityV1"},type:"array"},missing_dispatch:{items:{$ref:"#/$defs/WorkAttemptIdentityV1"},type:"array"}},required:["coverage","missing_dispatch","invalid_terminal_span"],type:"object"}]},WorkObservedExecutionOrderBasisV1:{enum:["terminal_observed_at_then_admitted_projection_sequence_then_attempt_identity"],type:"string"},WorkObservedExecutionV1:{additionalProperties:!1,properties:{admitted_projection_sequence:{format:"uint64",minimum:0,type:"integer"},evidence_digest:{$ref:"#/$defs/ManifestDigest"},identity:{$ref:"#/$defs/WorkAttemptIdentityV1"},observed_at:{$ref:"#/$defs/UtcMicros"},ordinal:{description:"One-based order assigned after sorting the durable terminal instants.",format:"uint32",minimum:0,type:"integer"},state:{$ref:"#/$defs/WorkAttemptStateV1"}},required:["ordinal","identity","admitted_projection_sequence","observed_at","state","evidence_digest"],type:"object"}},$schema:"https://json-schema.org/draft/2020-12/schema",oneOf:[{additionalProperties:!1,properties:{state:{const:"absent",type:"string"}},required:["state"],type:"object"},{additionalProperties:!1,properties:{attempt_coverage:{$ref:"#/$defs/WorkAttemptListCoverageV1"},observed_order:{items:{$ref:"#/$defs/WorkObservedExecutionV1"},type:"array"},order_basis:{$ref:"#/$defs/WorkObservedExecutionOrderBasisV1"},spans:{items:{$ref:"#/$defs/WorkExecutionSpanV1"},type:"array"},state:{const:"listed",type:"string"},timing_coverage:{$ref:"#/$defs/WorkExecutionTimingCoverageV1"}},required:["state","spans","observed_order","order_basis","attempt_coverage","timing_coverage"],type:"object"}],title:"WorkExecutionHistoryV1"},{$defs:{ManifestDigest:gj,ProjectId:_m,RepositoryId:_z,TaskId:v1,UtcMicros:bs,VerifiedWorkGraphVersionV1:bc,WorkExpertiseCategoryV1:bB,WorkProductAuthorizedRelationScopeV1:$c,WorkProductSelectionScopeV1:$b},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{evidence_not_before:{$ref:"#/$defs/UtcMicros",description:"Evidence before this owner-supplied horizon is excluded as stale."},expertise_categories:{description:"Categories for which the returned context will be used ephemerally.",items:{$ref:"#/$defs/WorkExpertiseCategoryV1"},type:"array",uniqueItems:!0},limit:{format:"uint32",minimum:0,type:"integer"},observed_at:{$ref:"#/$defs/UtcMicros"},selection:{$ref:"#/$defs/WorkProductSelectionScopeV1"},task_id:{$ref:"#/$defs/TaskId"},verified_version:{$ref:"#/$defs/VerifiedWorkGraphVersionV1"}},required:["selection","task_id","verified_version","evidence_not_before","expertise_categories","limit","observed_at"],title:"WorkExperienceRequestV1",type:"object"},{$defs:{ActorId:mU,AttemptId:m5,ConfigurationRevisionId:f8,ConfigurationSnapshotId:f7,ManifestDigest:gj,ObservationSourceIdentityV1:g3,ProposalId:__,ProviderId:_w,RetrievalAnchorId:_J,RunId:_8,SessionId:vv,TaskEvidenceLinkV1:vX,TaskId:v1,UtcMicros:bs,VerifiedWorkGraphVersionV1:bc,WorkAcceptanceCriterionV1:bl,WorkArtifactId:bu,WorkArtifactRefV1:bm,WorkAttemptEvidenceRecordV1:bf,WorkAttemptIdentityV1:bh,WorkAttemptProviderOutcomeV1:bb,WorkAttemptReceiptV1:b$,WorkAttemptStreamChannelV1:bk,WorkAttemptStreamSummaryV1:bw,WorkExperienceApplicabilityV1:{enum:["same_accepted_route","same_milestone"],type:"string"},WorkExperienceCandidateV1:{additionalProperties:!1,properties:{applicability:{description:"Separate declared applicability facts. This is intentionally not a\nscore and candidates remain in canonical TaskId order.",items:{$ref:"#/$defs/WorkExperienceApplicabilityV1"},type:"array",uniqueItems:!0},attempt_receipts:{description:"Exact receipts for accepted successful attempts whose sealed provider\nevidence and declared artifacts establish reusable observed work. The\nidentity is also the canonical `work_retrieve_evidence` drill target.",items:{$ref:"#/$defs/WorkAttemptReceiptV1"},type:"array"},evidence:{description:"Exact anchored evidence establishing that this is observed experience.",items:{$ref:"#/$defs/TaskEvidenceLinkV1"},type:"array"},item:{$ref:"#/$defs/WorkItemV1"}},required:["item","evidence","attempt_receipts","applicability"],type:"object"},WorkExperienceCoverageV1:{oneOf:[{additionalProperties:!1,properties:{coverage:{const:"unavailable",type:"string"}},required:["coverage"],type:"object"},{additionalProperties:!1,properties:{applicable:{format:"uint32",minimum:0,type:"integer"},coverage:{const:"complete",type:"string"},returned:{format:"uint32",minimum:0,type:"integer"},stale_excluded:{format:"uint32",minimum:0,type:"integer"}},required:["coverage","returned","applicable","stale_excluded"],type:"object"},{additionalProperties:!1,properties:{applicable:{format:"uint32",minimum:0,type:"integer"},coverage:{const:"partial",type:"string"},omitted_by_limit:{format:"uint32",minimum:0,type:"integer"},returned:{format:"uint32",minimum:0,type:"integer"},stale_excluded:{format:"uint32",minimum:0,type:"integer"}},required:["coverage","returned","applicable","stale_excluded","omitted_by_limit"],type:"object"}]},WorkExpertiseAuthorizationV1:{oneOf:[{additionalProperties:!1,properties:{availability:{const:"available",type:"string"},categories:{items:{$ref:"#/$defs/WorkExpertiseCategoryV1"},type:"array",uniqueItems:!0},durability:{$ref:"#/$defs/WorkExpertiseContextDurabilityV1"},expires_at:{$ref:"#/$defs/UtcMicros"},pin:{$ref:"#/$defs/WorkExpertiseConsentPinV1"}},required:["availability","categories","expires_at","pin","durability"],type:"object"},{additionalProperties:!1,properties:{availability:{const:"unavailable",type:"string"},legal_actions:{items:{$ref:"#/$defs/WorkExpertiseLegalActionV1"},type:"array",uniqueItems:!0},pin:{$ref:"#/$defs/WorkExpertiseConsentPinV1"},reasons:{items:{$ref:"#/$defs/WorkExpertiseUnavailableReasonV1"},type:"array",uniqueItems:!0}},required:["availability","reasons","legal_actions","pin"],type:"object"}]},WorkExpertiseCategoryV1:bB,WorkExpertiseConsentPinV1:{additionalProperties:!1,properties:{configuration_digest:{$ref:"#/$defs/ManifestDigest"},configuration_revision:{$ref:"#/$defs/ConfigurationRevisionId"},configuration_snapshot:{$ref:"#/$defs/ConfigurationSnapshotId"},provenance_digest:{$ref:"#/$defs/ManifestDigest"}},required:["configuration_revision","configuration_snapshot","configuration_digest","provenance_digest"],type:"object"},WorkExpertiseContextDurabilityV1:{oneOf:[{const:"ephemeral_only",description:"Context is returned for this read only and cannot establish evidence,\nrouting, proposal acceptance, execution admission, or completion.",type:"string"}]},WorkExpertiseLegalActionV1:{enum:["grant_user_consent","grant_project_consent","renew_user_consent","renew_project_consent","allow_requested_categories"],type:"string"},WorkExpertiseUnavailableReasonV1:{enum:["user_consent_disabled","project_consent_disabled","user_consent_not_yet_effective","project_consent_not_yet_effective","user_consent_expired","project_consent_expired","requested_category_not_allowed"],type:"string"},WorkHandoffV1:b2,WorkHierarchyV1:b4,WorkItemInputV1:b3,WorkItemV1:b9,WorkProviderAvailabilityV1:$V,WorkProviderBackendV1:$P,WorkProviderFallbackRecordV1:$R,WorkProviderRouteId:$I,WorkProviderRouteV1:$x,WorkRouteDecisionV1:$N},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{candidates:{items:{$ref:"#/$defs/WorkExperienceCandidateV1"},type:"array"},coverage:{$ref:"#/$defs/WorkExperienceCoverageV1"},evidence_not_before:{$ref:"#/$defs/UtcMicros"},expertise:{$ref:"#/$defs/WorkExpertiseAuthorizationV1"},observed_at:{$ref:"#/$defs/UtcMicros"},task_id:{$ref:"#/$defs/TaskId"},verified_version:{$ref:"#/$defs/VerifiedWorkGraphVersionV1"}},required:["task_id","verified_version","evidence_not_before","observed_at","expertise","candidates","coverage"],title:"WorkExperienceV1",type:"object"},{$defs:{ManifestDigest:gj,ProjectId:_m,ProposalId:__,RepositoryId:_z,TaskId:v1,UtcMicros:bs,WorkEvidenceFrontierV1:bz,WorkProductAuthorizedRelationScopeV1:$c,WorkProductSelectionScopeV1:$b},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Read-only proposal generation over one exact current product graph.",properties:{live_git_evidence:{anyOf:[{$ref:"#/$defs/WorkEvidenceFrontierV1"},{type:"null"}],default:null},occurred_at:{$ref:"#/$defs/UtcMicros"},proposal_id:{$ref:"#/$defs/ProposalId"},selection:{$ref:"#/$defs/WorkProductSelectionScopeV1"},task_id:{$ref:"#/$defs/TaskId"}},required:["selection","task_id","proposal_id","occurred_at"],title:"GenerateProposalRequest",type:"object"},{$defs:{ConfigurationRevisionId:f8,ManifestDigest:gj,PolicyIdentifierV1:{description:"A bounded, canonical identifier owned by the policy input schema.\n\nIt represents immutable references only; it is never a path, display\nlabel, provider account, branch name, or native object identifier.",type:"string"},ProposalId:__,ProviderId:_w,TaskId:v1,UtcMicros:bs,VerifiedWorkGraphVersionV1:bc,WorkCalibratedSizingV1:{additionalProperties:!1,description:"Calibrated sizing. Emitted ONLY when support >= floor. Every field is\nnamed separately (Plan 06); `support_floor` carries the governing floor\ninto the record.",properties:{band:{$ref:"#/$defs/WorkOrdinalBandV1",description:"The sizing band itself: the stronger of the route's declared effort and\nthe derived shape magnitude, widened when the cohort error is high."},cohort:{description:"Identity of the cohort the sizing was calibrated over: the top-ranked\nroute id. Sizing from one cohort is never reused for another.",type:"string"},drift_valid:{description:"False when the cohort contains incomparable or stale observations, so a\nconsumer can refuse a sizing that drifted rather than silently trust it.",type:"boolean"},error:{$ref:"#/$defs/WorkOrdinalBandV1",description:"Observed adverse-outcome band over the cohort. An ordinal band, never a\nrate and never a probability."},horizon:{$ref:"#/$defs/UtcMicros",description:"Latest comparable observation in the cohort. Nothing after\n`evaluated_at` contributes, so the horizon never runs ahead of the input."},support:{description:"Count of comparable in-cohort outcomes backing this sizing.",format:"uint32",minimum:0,type:"integer"},support_floor:{description:"The floor that governed this emission, carried so replay shows which\nfloor applied rather than assuming the current constant.",format:"uint32",minimum:0,type:"integer"}},required:["cohort","horizon","support","support_floor","error","drift_valid","band"],type:"object"},WorkCalibrationEvidenceV1:{additionalProperties:!1,description:"Raw calibration values and their exact decision provenance.\n\nNo rate, probability, or composite score is derived here. Consumers see\nthe authority-supplied outcome rows, categorical uncertainty, and exact\ndenominator counts that produced the proposal's existing calibrated sizing.",properties:{cohort_route:{type:["string","null"]},comparable_outcomes:{format:"uint32",minimum:0,type:"integer"},eligible_route_count:{format:"uint32",minimum:0,type:"integer"},incomparable_outcomes:{format:"uint32",minimum:0,type:"integer"},provenance:{$ref:"#/$defs/WorkCalibrationProvenanceV1"},raw_outcomes:{items:{$ref:"#/$defs/WorkPriorOutcomeV1"},type:"array"},routes_with_outcomes:{format:"uint32",minimum:0,type:"integer"},uncertainty:{$ref:"#/$defs/WorkCalibrationUncertaintyV1"}},required:["raw_outcomes","eligible_route_count","routes_with_outcomes","comparable_outcomes","incomparable_outcomes","uncertainty","provenance"],type:"object"},WorkCalibrationProvenanceV1:{additionalProperties:!1,properties:{configuration_digest:{$ref:"#/$defs/ManifestDigest"},configuration_revision:{anyOf:[{$ref:"#/$defs/ConfigurationRevisionId"},{type:"null"}]},evaluated_at:{$ref:"#/$defs/UtcMicros"},evaluator_id:{type:"string"},evaluator_revision:{format:"uint64",minimum:0,type:"integer"},input_digest:{$ref:"#/$defs/ManifestDigest"},local_evidence:{anyOf:[{$ref:"#/$defs/WorkEvidenceFrontierV1"},{type:"null"}]}},required:["evaluator_id","evaluator_revision","input_digest","configuration_digest","evaluated_at"],type:"object"},WorkCalibrationUncertaintyV1:{enum:["supported","sparse","stale","incomparable"],type:"string"},WorkDecompositionProposalV1:{additionalProperties:!1,description:"A one-level decomposition proposal. Never recursive: a deeper split is a\nseparate sequenced capability, not something this evaluator may invent.",properties:{candidates:{description:"The proposed sketches, ordinal ascending from 0.",items:{$ref:"#/$defs/WorkSubtaskSketchV1"},type:"array"},rationale:{description:"Why the proposal was emitted, in the same ordered reason vocabulary the\ndecision uses.",items:{$ref:"#/$defs/WorkProposalReasonV1"},type:"array"}},required:["candidates","rationale"],type:"object"},WorkEvidenceFrontierV1:bz,WorkFrontierComparisonV1:{description:"Recorded relation between the two supplied frontiers. `Incomparable` means\nat least one side was absent; it is not collapsed into agreement.",enum:["agree","disagree","incomparable"],type:"string"},WorkOrdinalBandV1:$t,WorkPriorOutcomeV1:{additionalProperties:!1,description:"Cohort denominator. APPLICATION-supplied, never worker-supplied.\n\nA worker cannot widen its own calibration cohort, so a route cannot earn\ncalibrated sizing by reporting its own successes.",properties:{accepted:{description:"Whether the produced work was accepted.",type:"boolean"},escaped_defect:{description:"Whether a defect escaped review.",type:"boolean"},observed_at:{$ref:"#/$defs/UtcMicros",description:"When the outcome was observed. Outcomes later than `evaluated_at` are\nINCOMPARABLE and are excluded from support rather than trusted."},rework:{description:"Whether the accepted work required rework.",type:"boolean"},route_id:{description:"The route this outcome belongs to. May name a retired route; only\noutcomes matching the top-ranked route form the sizing cohort.",type:"string"},terminal:{$ref:"#/$defs/WorkPriorTerminalV1",description:"How the attempt terminated."}},required:["route_id","accepted","rework","escaped_defect","terminal","observed_at"],type:"object"},WorkPriorTerminalV1:{description:"How a prior attempt on a route ended. Recorded, never inferred.",enum:["succeeded","failed","timed_out","cancelled"],type:"string"},WorkProposalActionV1:{description:"The explicit command the decision recommends next. A recommendation never\nexecutes; each action names a separate version-checked application command.",enum:["proceed_to_acceptance","hold_for_dependencies","admit_execution","replan"],type:"string"},WorkProposalDecisionV1:{additionalProperties:!1,description:"One explained, replayable work-loop decision.",properties:{based_on_version:{format:"uint64",minimum:0,type:"integer"},configuration_digest:{$ref:"#/$defs/ManifestDigest"},configuration_revision:{anyOf:[{$ref:"#/$defs/ConfigurationRevisionId"},{type:"null"}]},decomposition:{anyOf:[{$ref:"#/$defs/WorkDecompositionProposalV1"},{type:"null"}],description:"One-level decomposition sketch, present only when more than one\ndependency is unresolved."},deterministic_fallback:{description:"True when the recommendation is the declared deterministic baseline\nselected because the evidence cannot support a stronger claim.",type:"boolean"},disposition:{$ref:"#/$defs/WorkProposalDispositionV1"},evaluator_id:{$ref:"#/$defs/PolicyIdentifierV1"},evaluator_revision:{format:"uint64",minimum:0,type:"integer"},frontier_comparison:{$ref:"#/$defs/WorkFrontierComparisonV1"},input_digest:{$ref:"#/$defs/ManifestDigest"},live_git_evidence:{anyOf:[{$ref:"#/$defs/WorkEvidenceFrontierV1"},{type:"null"}],description:"The live Git frontier, returned exactly as supplied."},local_evidence:{anyOf:[{$ref:"#/$defs/WorkEvidenceFrontierV1"},{type:"null"}],description:"The local code/session frontier, returned exactly as supplied."},ordered_reason_codes:{items:{$ref:"#/$defs/WorkProposalReasonV1"},type:"array"},policy_digest:{$ref:"#/$defs/ManifestDigest"},policy_revision:{format:"uint64",minimum:0,type:"integer"},recommended_action:{anyOf:[{$ref:"#/$defs/WorkProposalActionV1"},{type:"null"}]},route_plan:{anyOf:[{$ref:"#/$defs/WorkRoutePlanV1"},{type:"null"}],description:"The explained route plan. Present on every evaluation that reached the\ngates, including the one that found no eligible route."},shape:{anyOf:[{$ref:"#/$defs/WorkTaskShapeV1"},{type:"null"}],description:"Derived task shape. Absent on the invalid, cancelled, and deadline\nshort-circuits, where no planner claim is licensed."},sizing:{anyOf:[{$ref:"#/$defs/WorkCalibratedSizingV1"},{type:"null"}],description:"Calibrated sizing, present only when in-cohort support reached the\ngoverning floor. Absence is a recorded fact, never a fabricated estimate."},task_id:{$ref:"#/$defs/TaskId"}},required:["evaluator_id","evaluator_revision","input_digest","task_id","based_on_version","policy_revision","policy_digest","configuration_digest","disposition","deterministic_fallback","ordered_reason_codes","frontier_comparison"],type:"object"},WorkProposalDispositionV1:{description:"Exactly one disposition per decision.",enum:["allow","deny","abstain","indeterminate"],type:"string"},WorkProposalReasonV1:{enum:["invalid_request","request_cancelled","deadline_exceeded","frontier_agreement","frontier_disagreement","frontier_incomparable","task_accepted","runtime_coverage_partial","runtime_coverage_unavailable","terminal_evidence_observed","execution_in_flight","proposal_accepted","dependencies_unresolved","ready","insufficient_calibration_support","route_budget_exceeded","route_content_location_refused","route_evidence_sparse","route_evidence_stale","human_override_applied","no_eligible_routes","deterministic_baseline_selected"],type:"string"},WorkProposalV1:$k,WorkProposedChildV1:$w,WorkProviderRouteId:$I,WorkProviderRouteV1:$x,WorkRankedRouteV1:{additionalProperties:!1,description:"Ranked route. Dimensions stay SEPARATE. No scalar score field is permitted here.",properties:{autonomy:{$ref:"#/$defs/WorkOrdinalBandV1",description:"Autonomy fitness, echoed unmerged."},correctness:{$ref:"#/$defs/WorkOrdinalBandV1",description:"Correctness fitness, echoed so the ranking can be audited without the input."},cost:{$ref:"#/$defs/WorkOrdinalBandV1",description:"Cost fitness, oriented so `Highest` is best-fitting."},evidence_quality:{$ref:"#/$defs/WorkOrdinalBandV1",description:"Evidence-quality fitness, echoed unmerged."},latency:{$ref:"#/$defs/WorkOrdinalBandV1",description:"Latency fitness, oriented so `Highest` is best-fitting."},rank:{description:"Position in the ranking, ascending from 1.",format:"uint32",minimum:0,type:"integer"},route_id:{description:"The ranked route's identity.",type:"string"},sensitive_data_fitness:{$ref:"#/$defs/WorkOrdinalBandV1",description:"Sensitive-data fitness, echoed unmerged."}},required:["rank","route_id","correctness","sensitive_data_fitness","latency","cost","autonomy","evidence_quality"],type:"object"},WorkRouteDecisionV1:$N,WorkRouteExclusionV1:{additionalProperties:!1,description:"One refused route and the single reason that refused it. Exclusion is\nrecorded rather than silent so a missing route is always explained.",properties:{reason:{$ref:"#/$defs/WorkProposalReasonV1",description:"The first limit the route failed, in the declared exclusion order."},route_id:{description:"The refused route's identity.",type:"string"}},required:["route_id","reason"],type:"object"},WorkRoutePlanV1:{additionalProperties:!1,description:"The explained route plan for one decision. Recommends; never dispatches.",properties:{coverage:{$ref:"#/$defs/WorkOrdinalBandV1",description:"Fraction-free ordinal coverage of the cohort evidence over the ranked set."},deterministic_baseline:{description:"The declared deterministic baseline, selected when evidence cannot support a\nstronger claim. Always names a route that survived exclusion, or None when none did.",type:["string","null"]},exclusions:{description:"Every refused route with its reason, in supplied order.",items:{$ref:"#/$defs/WorkRouteExclusionV1"},type:"array"},human_override_applied:{description:"True only when a recorded human override named a route that survived\nexclusion. An excluded or unknown override leaves ranking untouched.",type:"boolean"},ranked:{description:"Surviving routes in total, deterministic order, rank ascending from 1.",items:{$ref:"#/$defs/WorkRankedRouteV1"},type:"array"},uncertainty:{$ref:"#/$defs/WorkOrdinalBandV1",description:"Widens on sparse / stale / incomparable evidence."}},required:["ranked","exclusions","coverage","uncertainty","human_override_applied"],type:"object"},WorkScoreKindV1:$G,WorkShapeAssessmentV1:$B,WorkSizingV1:$K,WorkSubtaskSketchV1:{additionalProperties:!1,description:"One level only (Q3). Read-only sketch; accepting it stays a separate version-checked command.",properties:{ordinal:{description:"Position in the proposal, ascending from 0. Stable across replays of the\nsame input.",format:"uint32",minimum:0,type:"integer"},shape:{$ref:"#/$defs/WorkTaskShapeKindV1",description:"Kind the sketch would carry if it were accepted as its own task."},summary:{description:"What the sketch covers, phrased from the declared counts alone.",type:"string"}},required:["ordinal","summary","shape"],type:"object"},WorkTaskShapeKindV1:{description:"Kind of work the snapshot facts describe. Derived only from facts already in\nthe input; `Unclassified` when those facts do not distinguish a kind.",enum:["investigation","change","synthesis","unclassified"],type:"string"},WorkTaskShapeV1:{additionalProperties:!1,description:"The derived shape of the task: what kind of work it is and how large the\ndeclared dependency and evidence counts make it.",properties:{band:{$ref:"#/$defs/WorkOrdinalBandV1",description:"Magnitude band derived from the declared dependency and evidence counts."},kind:{$ref:"#/$defs/WorkTaskShapeKindV1",description:"Kind derived from the gate booleans and counts. No new discovery."}},required:["kind","band"],type:"object"}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"A canonical product proposal and the exact verified graph that licensed it.\n\n`proposal` can be moved directly into a `DecideWorkProposalRequestV1`;\ncallers use `verified_graph_version` to construct that mutation's CAS pin.",properties:{calibration:{$ref:"#/$defs/WorkCalibrationEvidenceV1"},decision:{$ref:"#/$defs/WorkProposalDecisionV1"},proposal:{$ref:"#/$defs/WorkProposalV1"},verified_graph_version:{$ref:"#/$defs/VerifiedWorkGraphVersionV1"}},required:["proposal","verified_graph_version","decision","calibration"],title:"GeneratedWorkProposal",type:"object"},{$defs:{WorkAttemptListCursorV1:bg},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"One authority-scoped artifact hydration request, paged like the attempt\nlist and pinned to the same verified topology generation.",properties:{cursor:{anyOf:[{$ref:"#/$defs/WorkAttemptListCursorV1"},{type:"null"}],default:null},page_size:{format:"uint32",minimum:0,type:"integer"}},required:["page_size"],title:"WorkArtifactHydrationRequestV1",type:"object"},{$defs:{AttemptId:m5,ManifestDigest:gj,ObservationSourceIdentityV1:g3,ProviderId:_w,RunId:_8,SessionId:vv,TaskId:v1,UtcMicros:bs,WorkArtifactId:bu,WorkArtifactRefV1:bm,WorkAttemptArtifactsV1:{additionalProperties:!1,description:"The artifacts and evidence one attempt declared.",properties:{artifacts:{description:"Every artifact reference the attempt declared, in its canonical\nstored order. References carry digest and byte length; bytes are\nnever part of this read.",items:{$ref:"#/$defs/WorkArtifactRefV1"},type:"array"},evidence:{$ref:"#/$defs/WorkAttemptEvidenceStateV1"},identity:{$ref:"#/$defs/WorkAttemptIdentityV1"}},required:["identity","artifacts","evidence"],type:"object"},WorkAttemptEvidenceRecordV1:bf,WorkAttemptEvidenceStateV1:{description:"Whether an attempt's terminal evidence has been sealed. An attempt that\nhas not reported an outcome yet is a typed state, not a missing record.",oneOf:[{additionalProperties:!1,description:"The attempt has not sealed terminal evidence yet.",properties:{state:{const:"pending",type:"string"}},required:["state"],type:"object"},{additionalProperties:!1,description:"The sealed terminal evidence record, exactly as it was written.",properties:{record:{$ref:"#/$defs/WorkAttemptEvidenceRecordV1"},state:{const:"sealed",type:"string"}},required:["state","record"],type:"object"}]},WorkAttemptIdentityV1:bh,WorkAttemptListCoverageV1:by,WorkAttemptListCursorV1:bg,WorkAttemptProviderOutcomeV1:bb,WorkAttemptStreamChannelV1:bk,WorkAttemptStreamSummaryV1:bw,WorkAttemptTopologyBindingV1:bV,WorkProviderAvailabilityV1:$V,WorkProviderBackendV1:$P,WorkProviderFallbackRecordV1:$R,WorkProviderRouteId:$I,WorkProviderRouteV1:$x},$schema:"https://json-schema.org/draft/2020-12/schema",description:"One authority-scoped artifact hydration read. Absence of any Work in\nscope is a typed state, distinct from an authorized-but-empty page.",oneOf:[{additionalProperties:!1,description:"No Work exists in this authority scope, so there is no attempt set to\nhydrate. Concealed scopes never reach this state: they are refused as\nnot-found-or-not-authorized before any read.",properties:{state:{const:"absent",type:"string"}},required:["state"],type:"object"},{additionalProperties:!1,description:"One page of attempt artifact sets under the verified topology\nsnapshot.",properties:{attempts:{items:{$ref:"#/$defs/WorkAttemptArtifactsV1"},type:"array"},coverage:{$ref:"#/$defs/WorkAttemptListCoverageV1"},state:{const:"hydrated",type:"string"},topology:{$ref:"#/$defs/WorkAttemptTopologyBindingV1"}},required:["state","topology","attempts","coverage"],type:"object"}],title:"WorkArtifactHydrationV1"},{$defs:{AttemptId:m5,AutomaticWorktreeGcV1:fr,BranchCollisionPolicyV1:fh,BranchNameComponentV1:fy,BranchNameSeparatorV1:fg,BranchNamingPolicyV1:f_,BranchTopologyKindV1:fV,BranchTopologyPolicyV1:fP,CanonicalGitRefNameV1:fC,CanonicalGitRefPrefix:fT,CapabilityId:fO,CommitId:fX,ConfigurationRevisionId:f8,ConfigurationSnapshotId:f7,CredentialReferenceId:hN,CrossMergeModeV1:hz,CrossMergePolicyV1:hD,GitHubStackedPullRequestPolicyV1:yH,HistoryRewritePolicyV1:y7,LocatorDigest:gk,ManifestDigest:gj,ProjectId:_m,ProposalId:__,ProtectedRefDispositionV1:_v,ProtectedRefRuleV1:_b,ProtectedRefSelectorV1:_$,ProviderId:_w,RefId:_T,RepositoryId:_z,RepositoryPlacementScopeV1:_D,RequiredCheckExpectationV1:_F,RequiredCheckV1:_L,ReviewRequirementV1:_0,ReviewTopologyKindV1:_2,ReviewTopologyPolicyV1:_4,RunId:_8,SensitiveFilesystemLocatorV1:vf,TaskId:v1,TopologyConcurrencyPolicyV1:be,TopologyEscalationPolicyV1:bt,TopologyGatePolicyV1:br,TopologyNotificationLevelV1:bi,UtcMicros:bs,WorkApprovalPolicy:bp,WorkArtifactId:bu,WorkArtifactRefV1:bm,WorkAttemptIdentityV1:bh,WorkAttemptListCoverageV1:by,WorkAttemptListCursorV1:bg,WorkAttemptProgressV1:b_,WorkAttemptProjectionBindingV1:bv,WorkAttemptStateV1:bS,WorkAttemptTopologyBindingV1:bV,WorkAttemptV1:bP,WorkCancellationAcknowledgementV1:bR,WorkCancellationEscalationV1:bq,WorkCancellationRequestId:bI,WorkCancellationRequestV1:bx,WorkCancellationStateV1:bj,WorkEffectStateV1:bA,WorkEgressPolicy:bM,WorkExecutableReference:bL,WorkExecutionEnvelopeV1:bU,WorkExecutionLimits:bH,WorkExecutionSnapshot:bG,WorkFallbackTopology:bJ,WorkFenceEpochV1:bZ,WorkFilesystemPolicy:bQ,WorkLeaseFenceV1:b8,WorkLeaseId:b7,WorkProviderBackendV1:$P,WorkProviderProtocol:$q,WorkProviderRouteId:$I,WorkProviderRouteV1:$x,WorkRecoveryStateV1:$j,WorkRestartReasonV1:$O,WorkSandboxPolicy:$H,WorkTerminalEvidenceV1:$0,WorkTopologyPolicyV1:$4,WorkflowOperationRef:$5,WorktreeCleanlinessRequirementV1:Si,WorktreeId:So,WorktreePlacementModeV1:Ss,WorktreeRetentionPolicyV1:Sd,WorktreeRootPolicyV1:Sc},$schema:"https://json-schema.org/draft/2020-12/schema",description:"One authority-scoped attempt-list read. Absence of any Work in scope is a\ntyped state, distinct from an authorized-but-empty page.",oneOf:[{additionalProperties:!1,description:"No Work exists in this authority scope, so there is no attempt set to\npage. Concealed scopes never reach this state: they are refused as\nnot-found-or-not-authorized before any read.",properties:{state:{const:"absent",type:"string"}},required:["state"],type:"object"},{additionalProperties:!1,description:"One page of durable attempts under the verified topology snapshot.",properties:{attempts:{items:{$ref:"#/$defs/WorkAttemptV1"},type:"array"},coverage:{$ref:"#/$defs/WorkAttemptListCoverageV1"},state:{const:"listed",type:"string"},topology:{$ref:"#/$defs/WorkAttemptTopologyBindingV1"}},required:["state","topology","attempts","coverage"],type:"object"}],title:"WorkAttemptListV1"},{$defs:{AcceptWorkTaskRequestV1:{additionalProperties:!1,properties:{evidence_by_criterion:{additionalProperties:{type:"string"},type:"object"},mutation:{$ref:"#/$defs/WorkProductMutationIdentityV1"},selection:{$ref:"#/$defs/WorkProductSelectionScopeV1"},task_id:{$ref:"#/$defs/TaskId"}},required:["selection","task_id","evidence_by_criterion","mutation"],type:"object"},ActorId:mU,AddWorkTaskRequestV1:{additionalProperties:!1,properties:{item:{$ref:"#/$defs/WorkItemV1"},mutation:{$ref:"#/$defs/WorkProductMutationIdentityV1"},selection:{$ref:"#/$defs/WorkProductSelectionScopeV1"}},required:["selection","item","mutation"],type:"object"},AdmitWorkExecutionRequestV1:{additionalProperties:!1,properties:{based_on_version:{format:"uint64",minimum:0,type:"integer"},mutation:{$ref:"#/$defs/WorkProductMutationIdentityV1"},selection:{$ref:"#/$defs/WorkProductSelectionScopeV1"},task_id:{$ref:"#/$defs/TaskId"}},required:["selection","task_id","based_on_version","mutation"],type:"object"},ApplyWorkRelationReplanRequestV1:{additionalProperties:!1,properties:{mutation:{$ref:"#/$defs/WorkProductMutationIdentityV1"},proposal_id:{$ref:"#/$defs/ProposalId"},selection:{$ref:"#/$defs/WorkProductSelectionScopeV1"}},required:["selection","proposal_id","mutation"],type:"object"},AttemptId:m5,CatalogGenerationId:fE,ConfigurationRevisionId:f8,CreateWorkProductRequestV1:{additionalProperties:!1,properties:{initial_graph:{$ref:"#/$defs/WorkProductGraphV1"},mutation:{$ref:"#/$defs/WorkProductMutationIdentityV1"},selection:{$ref:"#/$defs/WorkProductSelectionScopeV1"}},required:["selection","initial_graph","mutation"],type:"object"},CreateWorkTaskRequestV1:{additionalProperties:!1,properties:{initiative:{$ref:"#/$defs/WorkInitiativeV1"},item:{$ref:"#/$defs/WorkItemV1"},milestone:{$ref:"#/$defs/WorkMilestoneV1"},mutation:{$ref:"#/$defs/WorkProductMutationIdentityV1"},plan:{$ref:"#/$defs/WorkPlanV1"},selection:{$ref:"#/$defs/WorkProductSelectionScopeV1"}},required:["selection","initiative","plan","milestone","item","mutation"],type:"object"},DecideWorkProposalRequestV1:{additionalProperties:!1,properties:{disposition:{$ref:"#/$defs/WorkProposalDispositionV1"},mutation:{$ref:"#/$defs/WorkProductMutationIdentityV1"},proposal:{$ref:"#/$defs/WorkProposalV1"},selection:{$ref:"#/$defs/WorkProductSelectionScopeV1"}},required:["selection","proposal","disposition","mutation"],type:"object"},DecideWorkRelationReplanRequestV1:{additionalProperties:!1,properties:{disposition:{$ref:"#/$defs/WorkProposalDispositionV1"},mutation:{$ref:"#/$defs/WorkProductMutationIdentityV1"},proposal:{$ref:"#/$defs/WorkRelationReplanProposalV1"},selection:{$ref:"#/$defs/WorkProductSelectionScopeV1"}},required:["selection","proposal","disposition","mutation"],type:"object"},LinkAcceptedWorkAttemptRequestV1:{additionalProperties:!1,properties:{based_on_version:{format:"uint64",minimum:0,type:"integer"},identity:{$ref:"#/$defs/WorkAttemptIdentityV1"},mutation:{$ref:"#/$defs/WorkProductMutationIdentityV1"},selection:{$ref:"#/$defs/WorkProductSelectionScopeV1"},task_id:{$ref:"#/$defs/TaskId"}},required:["selection","task_id","based_on_version","identity","mutation"],type:"object"},ManifestDigest:gj,ProjectId:_m,ProposalId:__,ProviderId:_w,RecordWorkHandoffRequestV1:{additionalProperties:!1,properties:{handoff:{$ref:"#/$defs/WorkHandoffV1"},mutation:{$ref:"#/$defs/WorkProductMutationIdentityV1"},selection:{$ref:"#/$defs/WorkProductSelectionScopeV1"}},required:["selection","handoff","mutation"],type:"object"},RepositoryId:_z,RetrievalAnchorId:_J,RunId:_8,SourceStoreId:vL,TaskEvidenceLinkV1:vX,TaskId:v1,UtcMicros:bs,VerifiedWorkGraphVersionV1:bc,WorkAcceptanceCriterionV1:bl,WorkAttemptIdentityV1:bh,WorkCommandId:bC,WorkHandoffV1:b2,WorkHierarchyV1:b4,WorkInitiativeV1:b6,WorkItemInputV1:b3,WorkItemV1:b9,WorkMilestoneV1:$e,WorkPlanV1:$d,WorkProductAuthorizedRelationScopeV1:$c,WorkProductEventEvidenceV1:$l,WorkProductExpectedAuthorityV1:$m,WorkProductGraphV1:$f,WorkProductMutationIdentityV1:$h,WorkProductRevisionPinsV1:$v,WorkProductSelectionScopeV1:$b,WorkProposalDecisionV1:$$,WorkProposalDispositionV1:$S,WorkProposalV1:$k,WorkProposedChildV1:$w,WorkProviderRouteId:$I,WorkProviderRouteV1:$x,WorkRelationReplanDecisionV1:$C,WorkRelationReplanProposalV1:$T,WorkRouteDecisionV1:$N,WorkScoreKindV1:$G,WorkShapeAssessmentV1:$B,WorkSizingV1:$K},$schema:"https://json-schema.org/draft/2020-12/schema",description:"Closed public mutation surface for the Work-product graph authority.",oneOf:[{properties:{mutation:{const:"create",type:"string"},request:{$ref:"#/$defs/CreateWorkProductRequestV1"}},required:["mutation","request"],type:"object"},{properties:{mutation:{const:"add_task",type:"string"},request:{$ref:"#/$defs/AddWorkTaskRequestV1"}},required:["mutation","request"],type:"object"},{properties:{mutation:{const:"create_task",type:"string"},request:{$ref:"#/$defs/CreateWorkTaskRequestV1"}},required:["mutation","request"],type:"object"},{properties:{mutation:{const:"decide_proposal",type:"string"},request:{$ref:"#/$defs/DecideWorkProposalRequestV1"}},required:["mutation","request"],type:"object"},{properties:{mutation:{const:"decide_relation_replan",type:"string"},request:{$ref:"#/$defs/DecideWorkRelationReplanRequestV1"}},required:["mutation","request"],type:"object"},{properties:{mutation:{const:"apply_relation_replan",type:"string"},request:{$ref:"#/$defs/ApplyWorkRelationReplanRequestV1"}},required:["mutation","request"],type:"object"},{properties:{mutation:{const:"accept_task",type:"string"},request:{$ref:"#/$defs/AcceptWorkTaskRequestV1"}},required:["mutation","request"],type:"object"},{properties:{mutation:{const:"admit_execution",type:"string"},request:{$ref:"#/$defs/AdmitWorkExecutionRequestV1"}},required:["mutation","request"],type:"object"},{properties:{mutation:{const:"link_accepted_attempt",type:"string"},request:{$ref:"#/$defs/LinkAcceptedWorkAttemptRequestV1"}},required:["mutation","request"],type:"object"},{properties:{mutation:{const:"record_handoff",type:"string"},request:{$ref:"#/$defs/RecordWorkHandoffRequestV1"}},required:["mutation","request"],type:"object"}],title:"WorkProductMutationRequestV1",type:"object"},{$defs:{RunId:_8,TaskId:v1,UtcMicros:bs,WorkRunControlReasonV1:$F},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{expected_authority_version:{default:null,description:'The authority version the caller read. Absent means "no control row was\npublished yet"; a mismatch is a conflict, never an overwrite.',format:"uint64",minimum:0,type:["integer","null"]},occurred_at:{$ref:"#/$defs/UtcMicros"},reason:{$ref:"#/$defs/WorkRunControlReasonV1"},run_id:{$ref:"#/$defs/RunId"},task_id:{$ref:"#/$defs/TaskId"}},required:["task_id","run_id","reason","occurred_at"],title:"PauseWorkRunCommand",type:"object"},{$defs:{AttemptId:m5,RunId:_8,TaskId:v1,UtcMicros:bs,WorkRunControlAuthorityV1:$D,WorkRunControlReasonV1:$F,WorkRunControlStateV1:$L,WorkRunDeadlineCheckpointV1:$U},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"One run's durable control aggregate.",properties:{authority:{$ref:"#/$defs/WorkRunControlAuthorityV1"},deadline:{$ref:"#/$defs/WorkRunDeadlineCheckpointV1"},fenced_attempts:{description:'The exact attempts that were live when the current state published.\nEmpty means "none were live", never "we did not look".',items:{$ref:"#/$defs/AttemptId"},type:"array"},reason:{anyOf:[{$ref:"#/$defs/WorkRunControlReasonV1"},{type:"null"}]},run_id:{$ref:"#/$defs/RunId"},state:{$ref:"#/$defs/WorkRunControlStateV1"},task_id:{$ref:"#/$defs/TaskId"},transitioned_at:{$ref:"#/$defs/UtcMicros"}},required:["task_id","run_id","state","authority","deadline","transitioned_at","fenced_attempts"],title:"WorkRunControlV1",type:"object"},{$defs:{RunId:_8,TaskId:v1,UtcMicros:bs,WorkPlacementKindV1:$o,WorkPlacementTargetV1:$a},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{occurred_at:{$ref:"#/$defs/UtcMicros"},run_id:{$ref:"#/$defs/RunId"},target:{$ref:"#/$defs/WorkPlacementTargetV1"},task_id:{$ref:"#/$defs/TaskId"}},required:["task_id","run_id","target","occurred_at"],title:"WorkPlacementPreflightRequestV1",type:"object"},{$defs:{RunId:_8,TaskId:v1,UtcMicros:bs,WorkPlacementBlockerV1:$r,WorkPlacementIdentityV1:$i,WorkPlacementKindV1:$o,WorkPlacementObservationV1:{additionalProperties:!1,description:'What was actually observed at the target, in counts rather than prose.\n\nCounts are measurements: a zero is "we looked and found none", and\n`readable: false` is the separate state for "we could not look". Collapsing\nthem would let an unreadable target read as a clean one.',properties:{active_holder:{description:"Whether another admitted placement already holds this target.",type:"boolean"},dirty_tracked_paths:{description:"Tracked paths that differ from the index or HEAD.",format:"uint32",minimum:0,type:"integer"},network_required:{description:"Whether the declared network-free placement would require network.",type:"boolean"},observed_at:{$ref:"#/$defs/UtcMicros"},readable:{description:"Whether the target could be read at all.",type:"boolean"},unique_commits:{description:'Commits in the target reachable from nowhere else.\n\n`None` means reachability was not measured, and it blocks removal\nexactly as a positive count does: an unmeasured target is "unknown"\nand is retained rather than assumed worthless. Only removal consults\nthis; admission does not.',format:"uint32",minimum:0,type:["integer","null"]},untracked_paths:{description:"Untracked paths present in the target.",format:"uint32",minimum:0,type:"integer"}},required:["dirty_tracked_paths","untracked_paths","readable","active_holder","network_required","observed_at"],title:"WorkPlacementObservationV1",type:"object"},WorkPlacementTargetV1:$a},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"One placement preflight reading: what was asked for, what was seen, and\nexactly what blocks it.",properties:{blockers:{items:{$ref:"#/$defs/WorkPlacementBlockerV1"},type:"array",uniqueItems:!0},identity:{$ref:"#/$defs/WorkPlacementIdentityV1"},observation:{$ref:"#/$defs/WorkPlacementObservationV1"},target:{$ref:"#/$defs/WorkPlacementTargetV1"}},required:["identity","target","observation","blockers"],title:"WorkPlacementPreflightV1",type:"object"},{$defs:{RunId:_8,TaskId:v1},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{run_id:{$ref:"#/$defs/RunId"},task_id:{$ref:"#/$defs/TaskId"}},required:["task_id","run_id"],title:"WorkPlacementStatusRequestV1",type:"object"},{$defs:{RunId:_8,TaskId:v1,UtcMicros:bs,WorkPlacementBlockerV1:$r,WorkPlacementIdentityV1:$i,WorkPlacementKindV1:$o,WorkPlacementStateV1:$n,WorkPlacementTargetV1:$a,WorkPlacementV1:$s},$schema:"https://json-schema.org/draft/2020-12/schema",description:"One placement reading. Absence is a state, not an empty placement.",oneOf:[{additionalProperties:!1,description:"No placement was ever admitted for this run.",properties:{state:{const:"absent",type:"string"}},required:["state"],type:"object"},{additionalProperties:!1,description:"The durable placement relation.",properties:{placement:{$ref:"#/$defs/WorkPlacementV1"},state:{const:"placed",type:"string"}},required:["state","placement"],type:"object"}],title:"WorkPlacementReadingV1"},{$defs:{AttemptId:m5,CoverageStateV1:hM,DuplicateEffectOutcomeV1:hJ,DuplicateEffortKindV1:hZ,QuantityEvidenceClassV1:_R,RunId:_8,TaskId:v1,WorkAttemptIdentityV1:bh,WorkDuplicateAdjudicationQuantitiesV1:bE},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Operator judgment before the owning Work authority binds exact current\ngenerations, relation revision, command identity, and observation time.",properties:{first_attempt:{$ref:"#/$defs/WorkAttemptIdentityV1"},quantities:{$ref:"#/$defs/WorkDuplicateAdjudicationQuantitiesV1"},reason:{type:"string"},second_attempt:{$ref:"#/$defs/WorkAttemptIdentityV1"},verdict:{$ref:"#/$defs/DuplicateEffortKindV1"}},required:["first_attempt","second_attempt","verdict","quantities","reason"],title:"PrepareWorkDuplicateAdjudicationRequestV1",type:"object"},{$defs:{ActorId:mU,AttemptId:m5,ManifestDigest:gj,ProjectId:_m,ProposalId:__,ProviderId:_w,RepositoryId:_z,RetrievalAnchorId:_J,RunId:_8,SourceStoreId:vL,TaskId:v1,UtcMicros:bs,WorkAcceptanceCriterionV1:bl,WorkAttemptIdentityV1:bh,WorkHandoffV1:b2,WorkHierarchyV1:b4,WorkInitiativeV1:b6,WorkItemInputV1:b3,WorkItemV1:b9,WorkMilestoneV1:$e,WorkPlanV1:$d,WorkProductAuthorizedRelationScopeV1:$c,WorkProductChangeDraftV1:{description:"Operator-selected graph change before the owning Work authority binds the\ncurrent verified head and revision authorities.",oneOf:[{properties:{change:{const:"add_task",type:"string"},item:{$ref:"#/$defs/WorkItemV1"}},required:["change","item"],type:"object"},{properties:{change:{const:"create_task",type:"string"},initiative:{$ref:"#/$defs/WorkInitiativeV1"},item:{$ref:"#/$defs/WorkItemV1"},milestone:{$ref:"#/$defs/WorkMilestoneV1"},plan:{$ref:"#/$defs/WorkPlanV1"}},required:["change","initiative","plan","milestone","item"],type:"object"},{properties:{change:{const:"decide_proposal",type:"string"},disposition:{$ref:"#/$defs/WorkProposalDispositionV1"},proposal:{$ref:"#/$defs/WorkProposalV1"}},required:["change","proposal","disposition"],type:"object"},{properties:{change:{const:"decide_relation_replan",type:"string"},disposition:{$ref:"#/$defs/WorkProposalDispositionV1"},proposal:{$ref:"#/$defs/WorkRelationReplanProposalV1"}},required:["change","proposal","disposition"],type:"object"},{properties:{change:{const:"apply_relation_replan",type:"string"},proposal_id:{$ref:"#/$defs/ProposalId"}},required:["change","proposal_id"],type:"object"},{properties:{change:{const:"accept_task",type:"string"},evidence_by_criterion:{additionalProperties:{type:"string"},type:"object"},task_id:{$ref:"#/$defs/TaskId"}},required:["change","task_id","evidence_by_criterion"],type:"object"},{properties:{change:{const:"admit_execution",type:"string"},task_id:{$ref:"#/$defs/TaskId"}},required:["change","task_id"],type:"object"},{properties:{change:{const:"link_accepted_attempt",type:"string"},identity:{$ref:"#/$defs/WorkAttemptIdentityV1"},task_id:{$ref:"#/$defs/TaskId"}},required:["change","task_id","identity"],type:"object"},{properties:{change:{const:"record_handoff",type:"string"},handoff:{$ref:"#/$defs/WorkHandoffV1"}},required:["change","handoff"],type:"object"}]},WorkProductEventEvidenceV1:$l,WorkProductSelectionScopeV1:$b,WorkProposalDispositionV1:$S,WorkProposalV1:$k,WorkProposedChildV1:$w,WorkProviderRouteId:$I,WorkProviderRouteV1:$x,WorkRelationReplanProposalV1:$T,WorkRouteDecisionV1:$N,WorkScoreKindV1:$G,WorkShapeAssessmentV1:$B,WorkSizingV1:$K},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Read-only preparation input. Authority identities, clocks, and revision\npins are deliberately absent because the backend owns them.",properties:{causation_event_id:{type:["string","null"]},change:{$ref:"#/$defs/WorkProductChangeDraftV1"},evidence:{items:{$ref:"#/$defs/WorkProductEventEvidenceV1"},type:"array"},selection:{$ref:"#/$defs/WorkProductSelectionScopeV1"}},required:["selection","change","evidence"],title:"PrepareWorkProductMutationRequestV1",type:"object"},{$defs:{RunId:_8,TaskId:v1,UtcMicros:bs},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{expected_authority_version:{format:"uint64",minimum:0,type:"integer"},occurred_at:{$ref:"#/$defs/UtcMicros"},run_id:{$ref:"#/$defs/RunId"},task_id:{$ref:"#/$defs/TaskId"}},required:["task_id","run_id","expected_authority_version","occurred_at"],title:"ReleaseWorkPlacementCommand",type:"object"},{$defs:{UtcMicros:bs},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{occurred_at:{$ref:"#/$defs/UtcMicros"}},required:["occurred_at"],title:"ResumeWorkAttemptsCommand",type:"object"},{$defs:{AttemptId:m5,AutomaticWorktreeGcV1:fr,BranchCollisionPolicyV1:fh,BranchNameComponentV1:fy,BranchNameSeparatorV1:fg,BranchNamingPolicyV1:f_,BranchTopologyKindV1:fV,BranchTopologyPolicyV1:fP,CanonicalGitRefNameV1:fC,CanonicalGitRefPrefix:fT,CapabilityId:fO,CommitId:fX,ConfigurationRevisionId:f8,ConfigurationSnapshotId:f7,CredentialReferenceId:hN,CrossMergeModeV1:hz,CrossMergePolicyV1:hD,GitHubStackedPullRequestPolicyV1:yH,HistoryRewritePolicyV1:y7,LocatorDigest:gk,ManifestDigest:gj,ProjectId:_m,ProposalId:__,ProtectedRefDispositionV1:_v,ProtectedRefRuleV1:_b,ProtectedRefSelectorV1:_$,ProviderId:_w,RefId:_T,RepositoryId:_z,RepositoryPlacementScopeV1:_D,RequiredCheckExpectationV1:_F,RequiredCheckV1:_L,ReviewRequirementV1:_0,ReviewTopologyKindV1:_2,ReviewTopologyPolicyV1:_4,RunId:_8,SensitiveFilesystemLocatorV1:vf,TaskId:v1,TopologyConcurrencyPolicyV1:be,TopologyEscalationPolicyV1:bt,TopologyGatePolicyV1:br,TopologyNotificationLevelV1:bi,UtcMicros:bs,WorkApprovalPolicy:bp,WorkArtifactId:bu,WorkArtifactRefV1:bm,WorkAttemptIdentityV1:bh,WorkAttemptProgressV1:b_,WorkAttemptProjectionBindingV1:bv,WorkAttemptStateV1:bS,WorkAttemptV1:bP,WorkCancellationAcknowledgementV1:bR,WorkCancellationEscalationV1:bq,WorkCancellationRequestId:bI,WorkCancellationRequestV1:bx,WorkCancellationStateV1:bj,WorkEffectStateV1:bA,WorkEgressPolicy:bM,WorkExecutableReference:bL,WorkExecutionEnvelopeV1:bU,WorkExecutionLimits:bH,WorkExecutionSnapshot:bG,WorkFallbackTopology:bJ,WorkFenceEpochV1:bZ,WorkFilesystemPolicy:bQ,WorkLeaseFenceV1:b8,WorkLeaseId:b7,WorkProviderBackendV1:$P,WorkProviderProtocol:$q,WorkProviderRouteId:$I,WorkProviderRouteV1:$x,WorkRecoveryStateV1:$j,WorkRestartReasonV1:$O,WorkSandboxPolicy:$H,WorkTerminalEvidenceV1:$0,WorkTopologyPolicyV1:$4,WorkflowOperationRef:$5,WorktreeCleanlinessRequirementV1:Si,WorktreeId:So,WorktreePlacementModeV1:Ss,WorktreeRetentionPolicyV1:Sd,WorktreeRootPolicyV1:Sc},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"What restart recovery did to each open attempt.\n\nThis report never claims that a provider resumed. An attempt in\n`recovery_required` remains fenced under its original identity. This report\ndoes not authorize another launch; an explicit `retry_attempt` must verify\nthe exact recovery fence and effect safety before it can atomically admit a\nnew identity.",properties:{cancelled:{description:"Attempts whose in-flight cancellation was completed during recovery.",items:{$ref:"#/$defs/WorkAttemptV1"},type:"array"},recovery_required:{description:"Attempts fenced onto a new epoch and awaiting an explicit recovery\ndecision.",items:{$ref:"#/$defs/WorkAttemptV1"},type:"array"}},required:["recovery_required","cancelled"],title:"WorkAttemptRecoveryReportV1",type:"object"},{$defs:{RunId:_8,TaskId:v1,UtcMicros:bs,WorkRunControlReasonV1:$F},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{expected_authority_version:{format:"uint64",minimum:0,type:"integer"},occurred_at:{$ref:"#/$defs/UtcMicros"},reason:{$ref:"#/$defs/WorkRunControlReasonV1"},run_id:{$ref:"#/$defs/RunId"},task_id:{$ref:"#/$defs/TaskId"}},required:["task_id","run_id","reason","expected_authority_version","occurred_at"],title:"ResumeWorkRunCommand",type:"object"},{$defs:{AttemptId:m5,ManifestDigest:gj,ObservationSourceIdentityV1:g3,ProjectId:_m,ProviderId:_w,RepositoryId:_z,RunId:_8,SessionId:vv,TaskId:v1,TemporalModeV1:v6,UtcMicros:bs,VerifiedWorkGraphVersionV1:bc,WorkAttemptIdentityV1:bh,WorkEvidenceContinuationV1:bN,WorkEvidenceExpansionSelectorV1:{oneOf:[{additionalProperties:!1,properties:{kind:{const:"anchor",type:"string"},link_id:{type:"string"}},required:["kind","link_id"],type:"object"},{additionalProperties:!1,properties:{attempt:{$ref:"#/$defs/WorkAttemptIdentityV1"},kind:{const:"task_session",type:"string"}},required:["kind","attempt"],type:"object"}]},WorkProductAuthorizedRelationScopeV1:$c,WorkProductSelectionScopeV1:$b,WorkTaskSessionContinuationV1:$1},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"One TaskId-rooted read. The exact Work graph identity remains mandatory on\ncontinuation and expansion requests, so neither an anchor nor a cursor is\nauthority by possession.",properties:{continuation:{anyOf:[{$ref:"#/$defs/WorkEvidenceContinuationV1"},{type:"null"}],default:null},expansion:{anyOf:[{$ref:"#/$defs/WorkEvidenceExpansionSelectorV1"},{type:"null"}],default:null},observed_at:{$ref:"#/$defs/UtcMicros"},page_size:{format:"uint32",minimum:0,type:"integer"},selection:{$ref:"#/$defs/WorkProductSelectionScopeV1"},task_id:{$ref:"#/$defs/TaskId"},temporal:{$ref:"#/$defs/TemporalModeV1"},verified_version:{$ref:"#/$defs/VerifiedWorkGraphVersionV1"}},required:["selection","task_id","verified_version","temporal","page_size","observed_at"],title:"WorkEvidenceRetrieveRequestV1",type:"object"},{$defs:{ActorId:mU,AttemptId:m5,ManifestDigest:gj,ObservationSourceIdentityV1:g3,ProposalId:__,ProviderId:_w,RetrievalAnchorId:_J,RunId:_8,SessionId:vv,SessionRetrievalBudgetAccountingV1:{additionalProperties:!1,description:"The ceiling and count behind a budget refusal.\n\n`stage` names which budget refused; this is what tells an oversized request\napart from a read whose cost was mis-sized for it. The ceiling value also\ndistinguishes the resources inside one stage: a record read that stopped at\n1024 hit the item count, one that stopped at 16 MiB hit the byte total, so\nthe kernel's resource spelling stays in the kernel instead of becoming a\nsecond wire vocabulary to keep in step.",properties:{limit:{format:"uint64",minimum:0,type:"integer"},observed:{$ref:"#/$defs/SessionRetrievalBudgetObservationV1"}},required:["limit","observed"],type:"object"},SessionRetrievalBudgetObservationV1:{description:"What a refusing budget boundary had counted.\n\nBoth variants are exact. A bounded read never counts the rows it declined to\nread, so an exhausted read reports what it consumed and that storage held\nmore, never a total it would have to run the refused scan to learn.",oneOf:[{additionalProperties:!1,description:"The request asked for more units than the admitted maximum.",properties:{observation:{const:"requested",type:"string"},units:{format:"uint64",minimum:0,type:"integer"}},required:["observation","units"],type:"object"},{additionalProperties:!1,description:"The read consumed its whole budget and storage still held more.",properties:{observation:{const:"consumed_with_more_available",type:"string"},units:{format:"uint64",minimum:0,type:"integer"}},required:["observation","units"],type:"object"}]},SessionRetrievalBudgetStageV1:vV,SessionRetrievalStructuralRefusalV1:{oneOf:[{additionalProperties:!1,properties:{kind:{type:"string"},maximum:{format:"uint",minimum:0,type:"integer"},observed:{format:"uint",minimum:0,type:"integer"},refusal:{const:"cursor_manifest_limit_exceeded",type:"string"}},required:["refusal","kind","observed","maximum"],type:"object"},{additionalProperties:!1,properties:{accounting:{anyOf:[{$ref:"#/$defs/SessionRetrievalBudgetAccountingV1"},{type:"null"}],description:"Present when the refusing boundary keeps a counter. A request-shape\ncheck has none and reports `None` rather than inventing numbers."},refusal:{const:"budget_exhausted",type:"string"},stage:{$ref:"#/$defs/SessionRetrievalBudgetStageV1"}},required:["refusal","stage"],type:"object"}]},TaskEvidenceLinkV1:vX,TaskId:v1,UtcMicros:bs,VerifiedWorkGraphVersionV1:bc,WorkAcceptanceCriterionV1:bl,WorkAnchorHydrationV1:{additionalProperties:!1,properties:{anchor_id:{$ref:"#/$defs/RetrievalAnchorId"},content:{items:{type:"string"},type:"array"},continuation:{type:["string","null"]},coverage:{$ref:"#/$defs/WorkEvidenceCoverageStateV1"},exact_anchors:{items:{$ref:"#/$defs/RetrievalAnchorId"},type:"array"},freshness:{$ref:"#/$defs/WorkEvidenceFreshnessV1"},redacted:{type:"boolean"}},required:["anchor_id","exact_anchors","content","coverage","freshness","redacted"],type:"object"},WorkArtifactId:bu,WorkArtifactRefV1:bm,WorkAttemptEvidenceRecordV1:bf,WorkAttemptIdentityV1:bh,WorkAttemptProviderOutcomeV1:bb,WorkAttemptReceiptV1:b$,WorkAttemptStreamChannelV1:bk,WorkAttemptStreamSummaryV1:bw,WorkEvidenceContinuationV1:bN,WorkEvidenceCoverageStateV1:{enum:["complete","partial","unknown"],type:"string"},WorkEvidenceCoverageV1:{additionalProperties:!1,properties:{hydrated:{format:"uint32",minimum:0,type:"integer"},omitted:{format:"uint32",minimum:0,type:"integer"},selected:{format:"uint32",minimum:0,type:"integer"},state:{$ref:"#/$defs/WorkEvidenceCoverageStateV1"}},required:["state","selected","hydrated","omitted"],type:"object"},WorkEvidenceFreshnessV1:{enum:["current","stale","unknown"],type:"string"},WorkEvidenceOmissionReasonV1:{oneOf:[{enum:["limit_reached","pending","not_found_or_not_authorized","unavailable","reset_required","stale","cancelled","timed_out","redacted"],type:"string"},{additionalProperties:!1,properties:{structural_refusal:{$ref:"#/$defs/SessionRetrievalStructuralRefusalV1"}},required:["structural_refusal"],type:"object"}]},WorkEvidenceOmissionV1:{additionalProperties:!1,properties:{reason:{$ref:"#/$defs/WorkEvidenceOmissionReasonV1"},relation:{type:"string"}},required:["relation","reason"],type:"object"},WorkEvidenceSourceV1:{oneOf:[{additionalProperties:!1,properties:{kind:{const:"attempt_receipt",type:"string"},receipt:{$ref:"#/$defs/WorkAttemptReceiptV1"}},required:["kind","receipt"],type:"object"},{additionalProperties:!1,properties:{attempt:{$ref:"#/$defs/WorkAttemptIdentityV1"},evidence:{$ref:"#/$defs/WorkTaskSessionEvidenceV1"},kind:{const:"task_session",type:"string"}},required:["kind","attempt","evidence"],type:"object"},{additionalProperties:!1,properties:{hydration:{$ref:"#/$defs/WorkAnchorHydrationV1"},kind:{const:"anchor",type:"string"},link:{$ref:"#/$defs/TaskEvidenceLinkV1"}},required:["kind","link","hydration"],type:"object"}]},WorkHandoffV1:b2,WorkHierarchyV1:b4,WorkItemInputV1:b3,WorkItemV1:b9,WorkProductRelationV1:$_,WorkProposalDecisionV1:$$,WorkProposalDispositionV1:$S,WorkProposalV1:$k,WorkProposedChildV1:$w,WorkProviderAvailabilityV1:$V,WorkProviderBackendV1:$P,WorkProviderFallbackRecordV1:$R,WorkProviderRouteId:$I,WorkProviderRouteV1:$x,WorkRelationReplanDecisionV1:$C,WorkRelationReplanProposalV1:$T,WorkRouteDecisionV1:$N,WorkScoreKindV1:$G,WorkShapeAssessmentV1:$B,WorkSizingV1:$K,WorkTaskSessionContinuationV1:$1,WorkTaskSessionCoverageV1:{additionalProperties:!1,properties:{hidden:{format:"uint64",minimum:0,type:"integer"},redacted:{format:"uint64",minimum:0,type:"integer"},unknown:{format:"uint64",minimum:0,type:"integer"},visible:{format:"uint64",minimum:0,type:"integer"}},required:["visible","hidden","unknown","redacted"],type:"object"},WorkTaskSessionEvidenceV1:{additionalProperties:!1,properties:{attempt:{$ref:"#/$defs/WorkAttemptIdentityV1"},continuation:{anyOf:[{$ref:"#/$defs/WorkTaskSessionContinuationV1"},{type:"null"}]},coverage:{$ref:"#/$defs/WorkEvidenceCoverageStateV1"},coverage_counts:{$ref:"#/$defs/WorkTaskSessionCoverageV1"},freshness:{$ref:"#/$defs/WorkEvidenceFreshnessV1"},hydrated:{items:{$ref:"#/$defs/WorkTaskSessionHydrationV1"},type:"array"},participant_epoch:{$ref:"#/$defs/ManifestDigest"},ranked_anchors:{items:{$ref:"#/$defs/WorkTaskSessionRankedAnchorV1"},type:"array"},redacted:{type:"boolean"},source:{$ref:"#/$defs/ObservationSourceIdentityV1"},task_id:{$ref:"#/$defs/TaskId"},verified_version:{$ref:"#/$defs/VerifiedWorkGraphVersionV1"}},required:["task_id","verified_version","attempt","source","participant_epoch","ranked_anchors","hydrated","coverage","coverage_counts","freshness","redacted"],type:"object"},WorkTaskSessionHydrationStateV1:{enum:["available","retained_but_unavailable","redacted","deleted","retention_expired","unauthorized","locked","unverifiable"],type:"string"},WorkTaskSessionHydrationV1:{additionalProperties:!1,properties:{anchor_id:{$ref:"#/$defs/RetrievalAnchorId"},content:{items:{format:"uint8",maximum:255,minimum:0,type:"integer"},type:["array","null"]},rank:{format:"uint32",minimum:0,type:"integer"},state:{$ref:"#/$defs/WorkTaskSessionHydrationStateV1"}},required:["rank","anchor_id","state"],type:"object"},WorkTaskSessionRankContributionV1:{additionalProperties:!1,properties:{calibrated_feature_micros:{format:"uint32",minimum:0,type:"integer"},calibration_profile:{type:"string"},ordinal_rank:{format:"uint32",minimum:0,type:"integer"},raw_score_micros:{format:"int64",type:"integer"},retriever:{type:"string"},retriever_revision:{type:"string"},score_domain:{type:"string"},source_occurrence:{type:"string"},weight_micros:{format:"uint32",minimum:0,type:"integer"},weighted_contribution_micros:{format:"uint64",minimum:0,type:"integer"}},required:["retriever","retriever_revision","source_occurrence","ordinal_rank","raw_score_micros","score_domain","calibration_profile","calibrated_feature_micros","weight_micros","weighted_contribution_micros"],type:"object"},WorkTaskSessionRankedAnchorV1:{additionalProperties:!1,properties:{anchor_id:{$ref:"#/$defs/RetrievalAnchorId"},contributions:{items:{$ref:"#/$defs/WorkTaskSessionRankContributionV1"},type:"array"},final_ordinal:{format:"uint32",minimum:0,type:"integer"},utility_micros:{format:"uint64",minimum:0,type:"integer"}},required:["anchor_id","final_ordinal","utility_micros","contributions"],type:"object"}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{continuations:{items:{$ref:"#/$defs/WorkEvidenceContinuationV1"},type:"array"},coverage:{$ref:"#/$defs/WorkEvidenceCoverageV1"},freshness:{$ref:"#/$defs/WorkEvidenceFreshnessV1"},item:{$ref:"#/$defs/WorkItemV1"},omissions:{items:{$ref:"#/$defs/WorkEvidenceOmissionV1"},type:"array"},proposal_decisions:{items:{$ref:"#/$defs/WorkProposalDecisionV1"},type:"array"},redacted:{type:"boolean"},relation_replan_decisions:{items:{$ref:"#/$defs/WorkRelationReplanDecisionV1"},type:"array"},relations:{items:{$ref:"#/$defs/WorkProductRelationV1"},type:"array"},sources:{items:{$ref:"#/$defs/WorkEvidenceSourceV1"},type:"array"},task_id:{$ref:"#/$defs/TaskId"},verified_version:{$ref:"#/$defs/VerifiedWorkGraphVersionV1"}},required:["task_id","verified_version","item","relations","proposal_decisions","relation_replan_decisions","sources","coverage","omissions","freshness","redacted","continuations"],title:"WorkEvidenceRetrievalV1",type:"object"},{$defs:{AttemptId:m5,RunId:_8,TaskId:v1,WorkAttemptIdentityV1:bh,WorkCommandId:bC,WorkRetryCauseV1:$E,WorkRetryFailureSelectorV1:$A,WorkRetrySourceV1:$W},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{command_id:{$ref:"#/$defs/WorkCommandId"},failure:{$ref:"#/$defs/WorkRetryFailureSelectorV1"},new_attempt_id:{$ref:"#/$defs/AttemptId"},original_attempt:{$ref:"#/$defs/WorkAttemptIdentityV1"}},required:["original_attempt","new_attempt_id","failure","command_id"],title:"RetryWorkAttemptCommandV1",type:"object"},{$defs:{AttemptId:m5,AutomaticWorktreeGcV1:fr,BranchCollisionPolicyV1:fh,BranchNameComponentV1:fy,BranchNameSeparatorV1:fg,BranchNamingPolicyV1:f_,BranchTopologyKindV1:fV,BranchTopologyPolicyV1:fP,CanonicalGitRefNameV1:fC,CanonicalGitRefPrefix:fT,CapabilityId:fO,CommitId:fX,ConfigurationRevisionId:f8,ConfigurationSnapshotId:f7,CredentialReferenceId:hN,CrossMergeModeV1:hz,CrossMergePolicyV1:hD,GitHubStackedPullRequestPolicyV1:yH,HistoryRewritePolicyV1:y7,LocatorDigest:gk,ManifestDigest:gj,ProjectId:_m,ProposalId:__,ProtectedRefDispositionV1:_v,ProtectedRefRuleV1:_b,ProtectedRefSelectorV1:_$,ProviderId:_w,RefId:_T,RepositoryId:_z,RepositoryPlacementScopeV1:_D,RequiredCheckExpectationV1:_F,RequiredCheckV1:_L,RetryWorkAttemptCommandV1:{additionalProperties:!1,properties:{command_id:{$ref:"#/$defs/WorkCommandId"},failure:{$ref:"#/$defs/WorkRetryFailureSelectorV1"},new_attempt_id:{$ref:"#/$defs/AttemptId"},original_attempt:{$ref:"#/$defs/WorkAttemptIdentityV1"}},required:["original_attempt","new_attempt_id","failure","command_id"],title:"RetryWorkAttemptCommandV1",type:"object"},ReviewRequirementV1:_0,ReviewTopologyKindV1:_2,ReviewTopologyPolicyV1:_4,RunId:_8,SensitiveFilesystemLocatorV1:vf,TaskId:v1,TopologyConcurrencyPolicyV1:be,TopologyEscalationPolicyV1:bt,TopologyGatePolicyV1:br,TopologyNotificationLevelV1:bi,UtcMicros:bs,VerifiedWorkRetryFailureV1:{additionalProperties:!1,description:"Failure fact returned by a canonical evidence authority.",properties:{evidence_digest:{$ref:"#/$defs/ManifestDigest"},observed_at:{$ref:"#/$defs/UtcMicros"},selector:{$ref:"#/$defs/WorkRetryFailureSelectorV1"}},required:["selector","evidence_digest","observed_at"],type:"object"},WorkApprovalPolicy:bp,WorkArtifactId:bu,WorkArtifactRefV1:bm,WorkAttemptIdentityV1:bh,WorkAttemptProgressV1:b_,WorkAttemptProjectionBindingV1:bv,WorkAttemptStateV1:bS,WorkAttemptV1:bP,WorkCancellationAcknowledgementV1:bR,WorkCancellationEscalationV1:bq,WorkCancellationRequestId:bI,WorkCancellationRequestV1:bx,WorkCancellationStateV1:bj,WorkCommandId:bC,WorkEffectStateV1:bA,WorkEgressPolicy:bM,WorkExecutableReference:bL,WorkExecutionEnvelopeV1:bU,WorkExecutionLimits:bH,WorkExecutionSnapshot:bG,WorkFallbackTopology:bJ,WorkFenceEpochV1:bZ,WorkFilesystemPolicy:bQ,WorkLeaseFenceV1:b8,WorkLeaseId:b7,WorkProviderBackendV1:$P,WorkProviderProtocol:$q,WorkProviderRouteId:$I,WorkProviderRouteV1:$x,WorkRecoveryStateV1:$j,WorkRestartReasonV1:$O,WorkRetryCauseV1:$E,WorkRetryFailureSelectorV1:$A,WorkRetryReceiptV1:{additionalProperties:!1,properties:{canonical_input_digest:{$ref:"#/$defs/ManifestDigest"},command:{$ref:"#/$defs/RetryWorkAttemptCommandV1"},failure:{$ref:"#/$defs/VerifiedWorkRetryFailureV1"},new_attempt:{$ref:"#/$defs/WorkAttemptIdentityV1"},owner_receipt_digest:{$ref:"#/$defs/ManifestDigest"},restarted_at:{$ref:"#/$defs/UtcMicros",description:"Daemon-owned admission time at which the new attempt was created."},retry_required_at:{$ref:"#/$defs/UtcMicros",description:"Exact source-owned time at which the failure made a retry necessary."}},required:["command","failure","new_attempt","retry_required_at","restarted_at","canonical_input_digest","owner_receipt_digest"],type:"object"},WorkRetrySourceV1:$W,WorkSandboxPolicy:$H,WorkTerminalEvidenceV1:$0,WorkTopologyPolicyV1:$4,WorkflowOperationRef:$5,WorktreeCleanlinessRequirementV1:Si,WorktreeId:So,WorktreePlacementModeV1:Ss,WorktreeRetentionPolicyV1:Sd,WorktreeRootPolicyV1:Sc},$schema:"https://json-schema.org/draft/2020-12/schema",oneOf:[{additionalProperties:!1,properties:{attempt:{$ref:"#/$defs/WorkAttemptV1"},outcome:{const:"created",type:"string"},receipt:{$ref:"#/$defs/WorkRetryReceiptV1"}},required:["outcome","receipt","attempt"],type:"object"},{additionalProperties:!1,properties:{attempt:{$ref:"#/$defs/WorkAttemptV1"},outcome:{const:"replayed",type:"string"},receipt:{$ref:"#/$defs/WorkRetryReceiptV1"}},required:["outcome","receipt","attempt"],type:"object"}],title:"WorkRetryAttemptOutcomeV1"},{$defs:{CatalogGenerationId:fE,ConfigurationRevisionId:f8,ManifestDigest:gj,ProjectId:_m,ProposalId:__,ProviderId:_w,RepositoryId:_z,RetrievalAnchorId:_J,ReviewWorkProposalDispositionV1:{description:"The only non-accepting dispositions the proposal-review operation can\ncommit. The broader decision request remains available to the graph\nmutation operation, which owns all decision forms.",enum:["rejected","superseded"],type:"string"},SourceStoreId:vL,TaskId:v1,UtcMicros:bs,VerifiedWorkGraphVersionV1:bc,WorkCommandId:bC,WorkProductAuthorizedRelationScopeV1:$c,WorkProductEventEvidenceV1:$l,WorkProductExpectedAuthorityV1:$m,WorkProductMutationIdentityV1:$h,WorkProductRevisionPinsV1:$v,WorkProductSelectionScopeV1:$b,WorkProposalV1:$k,WorkProposedChildV1:$w,WorkProviderRouteId:$I,WorkProviderRouteV1:$x,WorkRouteDecisionV1:$N,WorkScoreKindV1:$G,WorkShapeAssessmentV1:$B,WorkSizingV1:$K},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{disposition:{$ref:"#/$defs/ReviewWorkProposalDispositionV1"},mutation:{$ref:"#/$defs/WorkProductMutationIdentityV1"},proposal:{$ref:"#/$defs/WorkProposalV1"},selection:{$ref:"#/$defs/WorkProductSelectionScopeV1"}},required:["selection","proposal","disposition","mutation"],title:"ReviewWorkProposalRequestV1",type:"object"},{$defs:{RunId:_8,TaskId:v1},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{run_id:{$ref:"#/$defs/RunId"},task_id:{$ref:"#/$defs/TaskId"}},required:["task_id","run_id"],title:"WorkRunControlRequestV1",type:"object"},{$defs:{AttemptId:m5,RunId:_8,TaskId:v1,UtcMicros:bs,WorkRunControlAuthorityV1:$D,WorkRunControlReasonV1:$F,WorkRunControlStateV1:$L,WorkRunControlV1:{additionalProperties:!1,description:"One run's durable control aggregate.",properties:{authority:{$ref:"#/$defs/WorkRunControlAuthorityV1"},deadline:{$ref:"#/$defs/WorkRunDeadlineCheckpointV1"},fenced_attempts:{description:'The exact attempts that were live when the current state published.\nEmpty means "none were live", never "we did not look".',items:{$ref:"#/$defs/AttemptId"},type:"array"},reason:{anyOf:[{$ref:"#/$defs/WorkRunControlReasonV1"},{type:"null"}]},run_id:{$ref:"#/$defs/RunId"},state:{$ref:"#/$defs/WorkRunControlStateV1"},task_id:{$ref:"#/$defs/TaskId"},transitioned_at:{$ref:"#/$defs/UtcMicros"}},required:["task_id","run_id","state","authority","deadline","transitioned_at","fenced_attempts"],title:"WorkRunControlV1",type:"object"},WorkRunDeadlineCheckpointV1:$U},$schema:"https://json-schema.org/draft/2020-12/schema",description:"One run's control reading.\n\n`Uncontrolled` is a distinct answer from `Controlled`: it says the run is\nadmitted and running under its admitted deadline with no control transition\never published, which is not the same as a control row that happens to say\n`Running`.",oneOf:[{additionalProperties:!1,description:"The run holds durable attempts but no control transition has ever been\npublished for it.",properties:{deadline:{$ref:"#/$defs/UtcMicros",description:"The admitted deadline the run is running against."},live_attempts:{description:"Attempts that have not reached a terminal state.",items:{$ref:"#/$defs/AttemptId"},type:"array"},state:{const:"uncontrolled",type:"string"},total_attempts:{format:"uint32",minimum:0,type:"integer"}},required:["state","deadline","live_attempts","total_attempts"],type:"object"},{additionalProperties:!1,description:"The published control aggregate, plus the live frontier as of this\nread (which may differ from the frontier the transition fenced).",properties:{control:{$ref:"#/$defs/WorkRunControlV1"},live_attempts:{items:{$ref:"#/$defs/AttemptId"},type:"array"},state:{const:"controlled",type:"string"},total_attempts:{format:"uint32",minimum:0,type:"integer"}},required:["state","control","live_attempts","total_attempts"],type:"object"}],title:"WorkRunControlReadingV1"},{$defs:{AttemptId:m5,AutomaticWorktreeGcV1:fr,BranchCollisionPolicyV1:fh,BranchNameComponentV1:fy,BranchNameSeparatorV1:fg,BranchNamingPolicyV1:f_,BranchTopologyKindV1:fV,BranchTopologyPolicyV1:fP,CanonicalGitRefNameV1:fC,CanonicalGitRefPrefix:fT,CapabilityId:fO,CommitId:fX,ConfigurationRevisionId:f8,ConfigurationSnapshotId:f7,CredentialReferenceId:hN,CrossMergeModeV1:hz,CrossMergePolicyV1:hD,GitHubStackedPullRequestPolicyV1:yH,HistoryRewritePolicyV1:y7,LocatorDigest:gk,ManifestDigest:gj,ProtectedRefDispositionV1:_v,ProtectedRefRuleV1:_b,ProtectedRefSelectorV1:_$,ProviderId:_w,RefId:_T,RepositoryId:_z,RepositoryPlacementScopeV1:_D,RequiredCheckExpectationV1:_F,RequiredCheckV1:_L,ReviewRequirementV1:_0,ReviewTopologyKindV1:_2,ReviewTopologyPolicyV1:_4,RunId:_8,SensitiveFilesystemLocatorV1:vf,TaskId:v1,TopologyConcurrencyPolicyV1:be,TopologyEscalationPolicyV1:bt,TopologyGatePolicyV1:br,TopologyNotificationLevelV1:bi,UtcMicros:bs,WorkApprovalPolicy:bp,WorkEffectStateV1:bA,WorkEgressPolicy:bM,WorkExecutableReference:bL,WorkExecutionLimits:bH,WorkExecutionSnapshot:bG,WorkFallbackTopology:bJ,WorkFilesystemPolicy:bQ,WorkProviderBackendV1:$P,WorkProviderProtocol:$q,WorkProviderRouteId:$I,WorkProviderRouteV1:$x,WorkSandboxPolicy:$H,WorkTopologyPolicyV1:$4,WorkflowOperationRef:$5,WorktreeCleanlinessRequirementV1:Si,WorktreePlacementModeV1:Ss,WorktreeRetentionPolicyV1:Sd,WorktreeRootPolicyV1:Sc},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Starts one admitted provider attempt. Every field is a typed fact; there\nis no argv, environment entry, executable path, or shell string here. The\nprojection binding and admission facts are re-read from the canonical Work\nauthority, never trusted from the caller.",properties:{attempt_id:{$ref:"#/$defs/AttemptId"},commit:{$ref:"#/$defs/CommitId"},effect_state:{$ref:"#/$defs/WorkEffectStateV1"},execution_snapshot:{$ref:"#/$defs/WorkExecutionSnapshot"},instructions:{type:"string"},occurred_at:{$ref:"#/$defs/UtcMicros"},operation:{$ref:"#/$defs/WorkflowOperationRef"},reference:{anyOf:[{$ref:"#/$defs/RefId"},{type:"null"}]},run_id:{$ref:"#/$defs/RunId"},task_id:{$ref:"#/$defs/TaskId"},worktree_root:{type:"string"}},required:["task_id","run_id","attempt_id","operation","execution_snapshot","worktree_root","commit","instructions","effect_state","occurred_at"],title:"StartWorkAttemptCommand",type:"object"},{$defs:{AttemptId:m5,AutomaticWorktreeGcV1:fr,BranchCollisionPolicyV1:fh,BranchNameComponentV1:fy,BranchNameSeparatorV1:fg,BranchNamingPolicyV1:f_,BranchTopologyKindV1:fV,BranchTopologyPolicyV1:fP,CanonicalGitRefNameV1:fC,CanonicalGitRefPrefix:fT,CapabilityId:fO,CommitId:fX,ConfigurationRevisionId:f8,ConfigurationSnapshotId:f7,CredentialReferenceId:hN,CrossMergeModeV1:hz,CrossMergePolicyV1:hD,GitHubStackedPullRequestPolicyV1:yH,HistoryRewritePolicyV1:y7,LocatorDigest:gk,ManifestDigest:gj,ProtectedRefDispositionV1:_v,ProtectedRefRuleV1:_b,ProtectedRefSelectorV1:_$,ProviderId:_w,RefId:_T,RepositoryId:_z,RepositoryPlacementScopeV1:_D,RequiredCheckExpectationV1:_F,RequiredCheckV1:_L,ReviewRequirementV1:_0,ReviewTopologyKindV1:_2,ReviewTopologyPolicyV1:_4,RunId:_8,SensitiveFilesystemLocatorV1:vf,StartWorkAttemptCommand:{additionalProperties:!1,description:"Starts one admitted provider attempt. Every field is a typed fact; there\nis no argv, environment entry, executable path, or shell string here. The\nprojection binding and admission facts are re-read from the canonical Work\nauthority, never trusted from the caller.",properties:{attempt_id:{$ref:"#/$defs/AttemptId"},commit:{$ref:"#/$defs/CommitId"},effect_state:{$ref:"#/$defs/WorkEffectStateV1"},execution_snapshot:{$ref:"#/$defs/WorkExecutionSnapshot"},instructions:{type:"string"},occurred_at:{$ref:"#/$defs/UtcMicros"},operation:{$ref:"#/$defs/WorkflowOperationRef"},reference:{anyOf:[{$ref:"#/$defs/RefId"},{type:"null"}]},run_id:{$ref:"#/$defs/RunId"},task_id:{$ref:"#/$defs/TaskId"},worktree_root:{type:"string"}},required:["task_id","run_id","attempt_id","operation","execution_snapshot","worktree_root","commit","instructions","effect_state","occurred_at"],type:"object"},TaskId:v1,TopologyConcurrencyPolicyV1:be,TopologyEscalationPolicyV1:bt,TopologyGatePolicyV1:br,TopologyNotificationLevelV1:bi,UtcMicros:bs,WorkApprovalPolicy:bp,WorkAttemptIdentityV1:bh,WorkEffectStateV1:bA,WorkEgressPolicy:bM,WorkExecutableReference:bL,WorkExecutionLimits:bH,WorkExecutionSnapshot:bG,WorkFallbackTopology:bJ,WorkFilesystemPolicy:bQ,WorkProviderBackendV1:$P,WorkProviderProtocol:$q,WorkProviderRouteId:$I,WorkProviderRouteV1:$x,WorkSandboxPolicy:$H,WorkTopologyPolicyV1:$4,WorkflowOperationRef:$5,WorkflowOutputName:$8,WorktreeCleanlinessRequirementV1:Si,WorktreePlacementModeV1:Ss,WorktreeRetentionPolicyV1:Sd,WorktreeRootPolicyV1:Sc},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Admits one synthesis attempt over an ordered set of sibling sources.",properties:{output_name:{$ref:"#/$defs/WorkflowOutputName",description:"The fan-out output the synthesis belongs to, carried into the draft\nthe workflow completion path verifies."},sources:{description:"The ordered sibling sources the synthesis consumes.",items:{$ref:"#/$defs/WorkAttemptIdentityV1"},type:"array"},start:{$ref:"#/$defs/StartWorkAttemptCommand",description:"The synthesis attempt's own admission facts; it is started through\nthe same admission machinery as any other attempt."}},required:["start","output_name","sources"],title:"AdmitWorkSynthesisCommand",type:"object"},{$defs:{AttemptId:m5,AutomaticWorktreeGcV1:fr,BranchCollisionPolicyV1:fh,BranchNameComponentV1:fy,BranchNameSeparatorV1:fg,BranchNamingPolicyV1:f_,BranchTopologyKindV1:fV,BranchTopologyPolicyV1:fP,CanonicalGitRefNameV1:fC,CanonicalGitRefPrefix:fT,CapabilityId:fO,CommitId:fX,ConfigurationRevisionId:f8,ConfigurationSnapshotId:f7,CredentialReferenceId:hN,CrossMergeModeV1:hz,CrossMergePolicyV1:hD,GitHubStackedPullRequestPolicyV1:yH,HistoryRewritePolicyV1:y7,LocatorDigest:gk,ManifestDigest:gj,ProjectId:_m,ProposalId:__,ProtectedRefDispositionV1:_v,ProtectedRefRuleV1:_b,ProtectedRefSelectorV1:_$,ProviderId:_w,RefId:_T,RepositoryId:_z,RepositoryPlacementScopeV1:_D,RequiredCheckExpectationV1:_F,RequiredCheckV1:_L,ReviewRequirementV1:_0,ReviewTopologyKindV1:_2,ReviewTopologyPolicyV1:_4,RunId:_8,SensitiveFilesystemLocatorV1:vf,TaskId:v1,TopologyConcurrencyPolicyV1:be,TopologyEscalationPolicyV1:bt,TopologyGatePolicyV1:br,TopologyNotificationLevelV1:bi,UtcMicros:bs,WorkApprovalPolicy:bp,WorkArtifactId:bu,WorkArtifactRefV1:bm,WorkAttemptIdentityV1:bh,WorkAttemptProgressV1:b_,WorkAttemptProjectionBindingV1:bv,WorkAttemptStateV1:bS,WorkAttemptV1:bP,WorkCancellationAcknowledgementV1:bR,WorkCancellationEscalationV1:bq,WorkCancellationRequestId:bI,WorkCancellationRequestV1:bx,WorkCancellationStateV1:bj,WorkEffectStateV1:bA,WorkEgressPolicy:bM,WorkExecutableReference:bL,WorkExecutionEnvelopeV1:bU,WorkExecutionLimits:bH,WorkExecutionSnapshot:bG,WorkFallbackTopology:bJ,WorkFenceEpochV1:bZ,WorkFilesystemPolicy:bQ,WorkLeaseFenceV1:b8,WorkLeaseId:b7,WorkProviderBackendV1:$P,WorkProviderProtocol:$q,WorkProviderRouteId:$I,WorkProviderRouteV1:$x,WorkRecoveryStateV1:$j,WorkRestartReasonV1:$O,WorkSandboxPolicy:$H,WorkSynthesisEvidenceGroupV1:$J,WorkSynthesisRefusalV1:$Z,WorkSynthesisSourceEnvelopeV1:$Q,WorkSynthesisSourceOutcomeV1:$X,WorkSynthesisSourceSetV1:$Y,WorkTerminalEvidenceV1:$0,WorkTopologyPolicyV1:$4,WorkflowOperationRef:$5,WorkflowOutputName:$8,WorkflowSynthesisDraft:Sr,WorktreeCleanlinessRequirementV1:Si,WorktreeId:So,WorktreePlacementModeV1:Ss,WorktreeRetentionPolicyV1:Sd,WorktreeRootPolicyV1:Sc},$schema:"https://json-schema.org/draft/2020-12/schema",description:"The typed outcome of a synthesis request: an admitted attempt, or the\nsealed unsynthesized set when synthesis could not truthfully begin.",oneOf:[{additionalProperties:!1,description:"The admitted synthesis attempt and everything it is accountable to.",properties:{attempt:{$ref:"#/$defs/WorkAttemptV1",description:"The leased (or idempotently replayed) synthesis attempt."},draft:{$ref:"#/$defs/WorkflowSynthesisDraft",description:"The citation obligation, complete by construction: the draft cites\nevery citable source digest and is verified downstream by\n[`crate::workflow_synthesis::verify_workflow_synthesis_draft`]."},groups:{description:"Disagreement structure over the succeeded sources.",items:{$ref:"#/$defs/WorkSynthesisEvidenceGroupV1"},type:"array"},source_set:{$ref:"#/$defs/WorkSynthesisSourceSetV1",description:"The sealed source envelopes the attempt was admitted against."},synthesis:{const:"admitted",type:"string"},uncited:{description:"Sources preserved without citations: failures, unknowns, and\nartifact-less successes, in the caller's requested order.",items:{$ref:"#/$defs/WorkAttemptIdentityV1"},type:"array"}},required:["synthesis","attempt","source_set","groups","draft","uncited"],type:"object"},{properties:{refusal:{$ref:"#/$defs/WorkSynthesisRefusalV1"},sources:{$ref:"#/$defs/WorkSynthesisSourceSetV1"},synthesis:{const:"unsynthesized",type:"string"}},required:["synthesis","sources","refusal"],type:"object"}],title:"WorkSynthesisAttemptV1"},{$defs:{WorkAttemptListCursorV1:bg},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"One page-bounded topology view read. The cursor vocabulary is the attempt\nlist's: a cursor minted under a superseded topology generation is a typed\nstaleness refusal, never a silently different page.",properties:{cursor:{anyOf:[{$ref:"#/$defs/WorkAttemptListCursorV1"},{type:"null"}],default:null},page_size:{format:"uint32",minimum:0,type:"integer"}},required:["page_size"],title:"WorkTopologyViewRequestV1",type:"object"},{$defs:{BranchTopologyKindV1:fV,BranchTopologyPolicyV1:fP,CanonicalGitRefNameV1:fC,CanonicalGitRefPrefix:fT,CapabilityId:fO,CrossMergeModeV1:hz,CrossMergePolicyV1:hD,GitHubStackedPullRequestPolicyV1:yH,ProtectedRefDispositionV1:_v,ProtectedRefRuleV1:_b,ProtectedRefSelectorV1:_$,RequiredCheckExpectationV1:_F,RequiredCheckV1:_L,ReviewRequirementV1:_0,ReviewTopologyKindV1:_2,ReviewTopologyPolicyV1:_4,RunId:_8,TaskId:v1,TopologyGatePolicyV1:br,UtcMicros:bs,WorkAttemptListCoverageV1:by,WorkAttemptListCursorV1:bg,WorkAttemptTopologyBindingV1:bV,WorkPlacementBlockerV1:$r,WorkPlacementIdentityV1:$i,WorkPlacementKindV1:$o,WorkPlacementReadingV1:{description:"One placement reading. Absence is a state, not an empty placement.",oneOf:[{additionalProperties:!1,description:"No placement was ever admitted for this run.",properties:{state:{const:"absent",type:"string"}},required:["state"],type:"object"},{additionalProperties:!1,description:"The durable placement relation.",properties:{placement:{$ref:"#/$defs/WorkPlacementV1"},state:{const:"placed",type:"string"}},required:["state","placement"],type:"object"}],title:"WorkPlacementReadingV1"},WorkPlacementStateV1:$n,WorkPlacementTargetV1:$a,WorkPlacementV1:$s,WorkTopologyExecutionPlacementV1:{additionalProperties:!1,description:"The execution-placement dimension: the policy's placement mode plus one\nlane per distinct `(task, run)` pair in page order.",properties:{lanes:{items:{$ref:"#/$defs/WorkTopologyPlacementLaneV1"},type:"array"},mode:{$ref:"#/$defs/WorktreePlacementModeV1"}},required:["mode","lanes"],title:"WorkTopologyExecutionPlacementV1",type:"object"},WorkTopologyIntegrationStrategyV1:{additionalProperties:!1,description:"The integration-strategy dimension, read verbatim from the resolved work\ntopology policy the runs in scope are admitted against.",properties:{cross_merge:{$ref:"#/$defs/CrossMergePolicyV1"},gates:{$ref:"#/$defs/TopologyGatePolicyV1"},protected_refs:{items:{$ref:"#/$defs/ProtectedRefRuleV1"},type:"array"}},required:["cross_merge","gates","protected_refs"],title:"WorkTopologyIntegrationStrategyV1",type:"object"},WorkTopologyPlacementLaneV1:{additionalProperties:!1,description:"One execution-placement lane: a distinct `(task, run)` pair from the\nattempt page joined to its durable placement reading. Placement absence is\na state on the lane, not a dropped lane.",properties:{attempt_count:{description:"Attempts this lane carried within the requested page.",format:"uint32",minimum:0,type:"integer"},placement:{$ref:"#/$defs/WorkPlacementReadingV1"},run_id:{$ref:"#/$defs/RunId"},task_id:{$ref:"#/$defs/TaskId"}},required:["task_id","run_id","attempt_count","placement"],title:"WorkTopologyPlacementLaneV1",type:"object"},WorktreeCleanlinessRequirementV1:Si,WorktreePlacementModeV1:Ss},$schema:"https://json-schema.org/draft/2020-12/schema",description:"The application-owned execution-topology view. Absence of any Work in\nscope is a typed state, distinct from an authorized-but-empty page.",oneOf:[{additionalProperties:!1,description:"No Work exists in this authority scope, so there is no topology to\ndraw. Concealed scopes are refused before any read.",properties:{state:{const:"absent",type:"string"}},required:["state"],type:"object"},{additionalProperties:!1,description:"The four dimensions, pinned to one verified topology generation.",properties:{branch_topology:{$ref:"#/$defs/BranchTopologyPolicyV1"},coverage:{$ref:"#/$defs/WorkAttemptListCoverageV1"},execution_placement:{$ref:"#/$defs/WorkTopologyExecutionPlacementV1"},integration_strategy:{$ref:"#/$defs/WorkTopologyIntegrationStrategyV1"},review_topology:{$ref:"#/$defs/ReviewTopologyPolicyV1"},state:{const:"view",type:"string"},topology:{$ref:"#/$defs/WorkAttemptTopologyBindingV1"}},required:["state","topology","coverage","execution_placement","branch_topology","review_topology","integration_strategy"],type:"object"}],title:"ExecutionTopologyViewV1"},{$defs:{ObservabilityHorizonV1:g6},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"One horizon-bounded execution-topology metrics read. The authorized scope\nis taken from the request context, not from the request, so a caller can\nnever widen the population it reads.",properties:{horizon:{$ref:"#/$defs/ObservabilityHorizonV1"},max_events:{description:"Event budget for this read, at most\n[`MAX_EXECUTION_TOPOLOGY_EVENTS_V1`].",format:"uint32",minimum:0,type:"integer"}},required:["horizon","max_events"],title:"ExecutionTopologyMetricsRequestV1",type:"object"},{$defs:{CoverageStateV1:hM,ExecutionBlockedCauseV1:{description:"Cause a work item was blocked for.",enum:["dependency","needs_input","capability","policy","scope","conflict","lease","backpressure","test","ci","review","effect_unknown","other","unknown"],type:"string"},ExecutionConcurrencyPhaseV1:{description:"Concurrency-width phase. `Useful` counts only distinct admitted\nattempts that advanced a committed progress frontier; heartbeats,\nqueued work, child processes, and transport fanout never reach it.",enum:["requested","accepted","admitted","active","useful"],type:"string"},ExecutionConflictKindV1:{description:"Conflict prediction kind. Mechanical and semantic keep separate\ndenominators because their adjudicators are not interchangeable.",enum:["mechanical","semantic","combined"],type:"string"},ExecutionConflictOutcomeV1:{description:"Independently observed conflict outcome. `Censored` and `Unknown`\nnever enter a confusion-matrix denominator.",enum:["conflict","no_conflict","censored","unknown"],type:"string"},ExecutionDeliveryOutcomeV1:{description:"Per-surface delivery outcome. A multi-surface delivery is never a\nduplicate of product work; only `Deduplicated` is.",enum:["delivered","deduplicated","dropped","unknown"],type:"string"},ExecutionDuplicateKindV1:{description:"Adjudicated duplicate-work relation. Similarity, proximity, shared\npaths, and concurrency never produce one of these.",enum:["exact_duplicate","superseded_overlap","repeated_investigation","duplicate_effect","not_duplicate","censored","unknown"],type:"string"},ExecutionDuplicateOutcomeV1:{description:"Whether a duplicate effect was prevented or actually committed. The\ntwo never collapse into one count.",enum:["prevented","committed","unknown","not_applicable"],type:"string"},ExecutionDurationBucketV1:{description:"Fixed duration buckets shared by stale stack age, blocked time, and\nrerun latency. Raw timestamps and exact durations stay authorized\nlocal detail.",enum:["under1m","from1m_to5m","from5m_to15m","from15m_to1h","from1h_to4h","from4h_to24h","from1d_to7d","over7d"],type:"string"},ExecutionFanoutPhaseV1:{description:"Fan-out width phase. `PeakActive` is the sampled active width; the\nfan-out distribution is unweighted so serialized and blocked samples,\nwhich carry no interval, are preserved rather than dropped.",enum:["requested","accepted","admitted","peak_active","useful"],type:"string"},ExecutionGitHubStackCapabilityReadingV1:{additionalProperties:!1,description:"Latest trustworthy GitHub stacked-PR capability observation in the\nhorizon. It is a typed operational state, not a metric or success claim.",properties:{capability:{anyOf:[{$ref:"#/$defs/ExecutionGitHubStackCapabilityV1"},{type:"null"}]},coverage:{$ref:"#/$defs/MetricCoverageV1"},other_forge_fallback_available:{type:["boolean","null"]},standard_git_fallback_available:{type:["boolean","null"]},unavailable:{anyOf:[{$ref:"#/$defs/ExecutionMetricUnavailableV1"},{type:"null"}]}},required:["coverage"],title:"ExecutionGitHubStackCapabilityReadingV1",type:"object"},ExecutionGitHubStackCapabilityV1:{description:"Last bounded GitHub stacked-PR capability state observed in the\nhorizon. This remains orthogonal to GitHub ingress and item lifecycle.",enum:["unavailable","private_preview_disabled","enabled","degraded"],type:"string"},ExecutionIntegrationKindV1:{description:"Integration operation kind. Rebase remains external observation only.",enum:["fast_forward","merge_commit","rebase","cherry_pick","stack_retarget","graph_only","external_observed","unknown"],type:"string"},ExecutionIntegrationOutcomeV1:{description:"Terminal result of an observed native integration.",enum:["succeeded","conflicted","rejected","denied","stale","locked","cancelled","timed_out","failed","partial","effect_unknown","unsupported","unknown"],type:"string"},ExecutionIntervalStateV1:{description:"Whether the owning drift interval is still open or exactly closed.",enum:["open","closed"],type:"string"},ExecutionLeakKindV1:{description:"Independently proved execution-leak class.",enum:["lease_after_terminal","attempt_without_live_owner","effect_unknown_past_deadline","missing_worktree_binding","unbounded_delivery","none","unknown"],type:"string"},ExecutionLeakOutcomeV1:{description:"Recovery state a proved leak reached.",enum:["not_required","pending","recovered","failed","unknown"],type:"string"},ExecutionMetricUnavailableV1:{description:"Why a measurement carries no value. Absence is always one of these typed\nreasons; it is never an empty string, a zero, or a silently dropped row.",oneOf:[{const:"store_unavailable",description:"The observation store could not be read at all for this horizon.",type:"string"},{const:"event_budget_exceeded",description:"The horizon holds more events than one read may draw, so every\ndenominator here would be a partial count presented as a total.",type:"string"},{const:"cell_budget_exceeded",description:"The bounded projection would exceed the Plan 26 result-cell ceiling.\nThe whole read refuses rather than returning a misleading subset.",type:"string"},{const:"no_eligible_evidence",description:"No recorded event in the family supplies this metric's numerator or\ndenominator.",type:"string"},{const:"support_floor_unmet",description:"Eligible cases exist but fall below the metric's support floor.",type:"string"},{const:"coverage_floor_unmet",description:"Observed cases cover less of the eligible population than the metric's\ncoverage floor allows.",type:"string"},{const:"censoring_ceiling_exceeded",description:"More of the eligible population is censored than the metric admits.",type:"string"},{const:"unbounded_interval",description:"The interval this metric integrates over has no proved upper bound, so\nits duration cannot be measured without inventing a terminal.",type:"string"}]},ExecutionQuantityUnitV1:{description:"Quantity unit for duplicate-effort accounting. Each unit is reported\nseparately: wall time, tokens, cost, tests, and effects are never\nsummed into one number.",enum:["wall_micros","tokens","cost_micros","tests","effects"],type:"string"},ExecutionRerunCauseV1:{description:"Typed rerun cause. Repeated logs and transport redelivery are not\nreruns and never carry one of these.",enum:["runtime_retry","runtime_fallback","test_rerun","ci_rerun","recovery","human_requested","unknown"],type:"string"},ExecutionRerunSourceV1:{description:"Which independent system observed the rerun.",enum:["runtime","test","ci"],type:"string"},ExecutionStackDriftKindV1:{description:"Exact reason a stack became stale. The enum is bounded and never\ncarries a branch, ref, worktree, repository, or provider identity.",enum:["head_advanced","base_advanced","merge_base_changed","retargeted","superseded"],type:"string"},ExecutionSurfaceFamilyV1:{description:"Delivery surface family. Addresses, payloads, principals, and\nrecipients are never observed, so the family is the whole label.",enum:["hook","mcp","lsp","dashboard","cli","other"],type:"string"},ExecutionTopologyDimensionV1:{description:"One allowed local grouping dimension. The set is closed by construction:\nevery value is produced by an exhaustive match over a bounded domain class,\nso no person, agent, task, project, repository, worktree, branch, ref,\ncommit, model version, or route can ever appear as a label.",oneOf:[{properties:{dimension:{const:"concurrency_phase",type:"string"},value:{$ref:"#/$defs/ExecutionConcurrencyPhaseV1"}},required:["dimension","value"],type:"object"},{properties:{dimension:{const:"fanout_phase",type:"string"},value:{$ref:"#/$defs/ExecutionFanoutPhaseV1"}},required:["dimension","value"],type:"object"},{properties:{dimension:{const:"width_bucket",type:"string"},value:{$ref:"#/$defs/ExecutionWidthBucketV1"}},required:["dimension","value"],type:"object"},{properties:{dimension:{const:"duration_bucket",type:"string"},value:{$ref:"#/$defs/ExecutionDurationBucketV1"}},required:["dimension","value"],type:"object"},{properties:{dimension:{const:"duplicate_kind",type:"string"},value:{$ref:"#/$defs/ExecutionDuplicateKindV1"}},required:["dimension","value"],type:"object"},{properties:{dimension:{const:"unit",type:"string"},value:{$ref:"#/$defs/ExecutionQuantityUnitV1"}},required:["dimension","value"],type:"object"},{properties:{dimension:{const:"duplicate_outcome",type:"string"},value:{$ref:"#/$defs/ExecutionDuplicateOutcomeV1"}},required:["dimension","value"],type:"object"},{properties:{dimension:{const:"conflict_kind",type:"string"},value:{$ref:"#/$defs/ExecutionConflictKindV1"}},required:["dimension","value"],type:"object"},{properties:{dimension:{const:"conflict_outcome",type:"string"},value:{$ref:"#/$defs/ExecutionConflictOutcomeV1"}},required:["dimension","value"],type:"object"},{properties:{dimension:{const:"integration_kind",type:"string"},value:{$ref:"#/$defs/ExecutionIntegrationKindV1"}},required:["dimension","value"],type:"object"},{properties:{dimension:{const:"integration_outcome",type:"string"},value:{$ref:"#/$defs/ExecutionIntegrationOutcomeV1"}},required:["dimension","value"],type:"object"},{properties:{dimension:{const:"stack_drift_kind",type:"string"},value:{$ref:"#/$defs/ExecutionStackDriftKindV1"}},required:["dimension","value"],type:"object"},{properties:{dimension:{const:"interval_state",type:"string"},value:{$ref:"#/$defs/ExecutionIntervalStateV1"}},required:["dimension","value"],type:"object"},{properties:{dimension:{const:"blocked_cause",type:"string"},value:{$ref:"#/$defs/ExecutionBlockedCauseV1"}},required:["dimension","value"],type:"object"},{properties:{dimension:{const:"rerun_source",type:"string"},value:{$ref:"#/$defs/ExecutionRerunSourceV1"}},required:["dimension","value"],type:"object"},{properties:{dimension:{const:"rerun_cause",type:"string"},value:{$ref:"#/$defs/ExecutionRerunCauseV1"}},required:["dimension","value"],type:"object"},{properties:{dimension:{const:"leak_kind",type:"string"},value:{$ref:"#/$defs/ExecutionLeakKindV1"}},required:["dimension","value"],type:"object"},{properties:{dimension:{const:"leak_outcome",type:"string"},value:{$ref:"#/$defs/ExecutionLeakOutcomeV1"}},required:["dimension","value"],type:"object"},{properties:{dimension:{const:"surface",type:"string"},value:{$ref:"#/$defs/ExecutionSurfaceFamilyV1"}},required:["dimension","value"],type:"object"},{properties:{dimension:{const:"delivery_outcome",type:"string"},value:{$ref:"#/$defs/ExecutionDeliveryOutcomeV1"}},required:["dimension","value"],type:"object"}]},ExecutionTopologyDrillAnchorV1:{additionalProperties:!1,description:"An opaque cursor minted by the registered observation authority. It can be\nresolved only through that same authorized local query boundary and is not\na metric dimension or exportable identity.",properties:{cursor:{type:"string"}},required:["cursor"],title:"ExecutionTopologyDrillAnchorV1",type:"object"},ExecutionTopologyEmissionCoverageV1:{additionalProperties:!1,description:"Envelope-level delivery evidence for this read. `None` means the store did\nnot answer, so no zero may be inferred. `dropped` is the proved lower bound\nfrom the bound producer scope, deduplicated across explicit loss receipts\nand their next-envelope carriers; it is not attributed to a topology\nfamily. Sampling stays a count of sampled topology envelopes and is never\nexpanded into a fabricated population estimate.",properties:{delayed:{format:"uint64",minimum:0,type:["integer","null"]},dropped:{format:"uint64",minimum:0,type:["integer","null"]},emitted:{format:"uint64",minimum:0,type:["integer","null"]},sampled_events:{format:"uint64",minimum:0,type:["integer","null"]}},title:"ExecutionTopologyEmissionCoverageV1",type:"object"},ExecutionTopologyMeasurementV1:{additionalProperties:!1,description:"One descriptor cell: the Plan 26 descriptor name, its grouping dimensions,\nand the landed metric envelope carrying value, denominator, coverage, and\nprovenance.",properties:{dimensions:{description:"Allowed local grouping dimensions, at most\n[`MAX_METRIC_DIMENSIONS_V1`], in a fixed order per descriptor.",items:{$ref:"#/$defs/ExecutionTopologyDimensionV1"},type:"array"},unavailable:{anyOf:[{$ref:"#/$defs/ExecutionMetricUnavailableV1"},{type:"null"}],description:"Typed absence reason. It is `Some` exactly when `value.value` is\n`None`, so a reader can never mistake a refused metric for a zero."},value:{$ref:"#/$defs/MetricValueV1"}},required:["dimensions","value"],title:"ExecutionTopologyMeasurementV1",type:"object"},ExecutionWidthBucketV1:{description:"Fixed width buckets. Raw widths stay authorized local detail; only\nbucket counts leave the projection.",enum:["zero","one","two","from3_to4","from5_to8","from9_to16","from17_to32","from33_to64","over64"],type:"string"},MetricCalibrationV1:gA,MetricCohortV1:gW,MetricCoverageV1:gM,MetricEvidenceClassV1:gN,MetricProvenanceV1:gz,MetricSourceV1:gD,MetricTemporalV1:gF,MetricUncertaintyV1:gL,MetricValueV1:gU,ObservabilityHorizonV1:g6},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"The canonical execution-topology read model. Observatory and Costs render\nthis without local formulas; CLI, MCP, and HTTP return the same bytes.",properties:{authorized_scope_ref:{description:"Local authorization anchor the read was admitted under. It is derived\nfrom the resolved scope, never from a caller-supplied string.",type:"string"},coverage:{$ref:"#/$defs/MetricCoverageV1",description:"Family-level coverage over the event population, independent of any\nsingle descriptor's denominator."},current:{description:"True only when the whole family was read with `Known` coverage. A\nfalse value means at least one descriptor below is a typed absence.",type:"boolean"},drill_anchors:{description:"Bounded registered source cursors for authorized local drill-down.\nPayload anchors, traces, and scope identifiers never enter this list.",items:{$ref:"#/$defs/ExecutionTopologyDrillAnchorV1"},type:"array"},emission_coverage:{$ref:"#/$defs/ExecutionTopologyEmissionCoverageV1"},github_stack_capability:{$ref:"#/$defs/ExecutionGitHubStackCapabilityReadingV1"},horizon:{$ref:"#/$defs/ObservabilityHorizonV1"},measurements:{items:{$ref:"#/$defs/ExecutionTopologyMeasurementV1"},type:"array"},observed_at_micros:{format:"int64",type:"integer"},watermark:{description:"Watermark of the last event this projection consumed. A rebuild at the\nsame watermark yields the same values.",type:"string"}},required:["authorized_scope_ref","horizon","watermark","observed_at_micros","current","coverage","emission_coverage","github_stack_capability","drill_anchors","measurements"],title:"ExecutionTopologyMetricsV1",type:"object"},{$defs:{ProjectId:_m,RepositoryId:_z,UtcMicros:bs,WorkGraphReadModeV1:{oneOf:[{properties:{mode:{const:"current",type:"string"}},required:["mode"],type:"object"},{properties:{mode:{const:"as_of",type:"string"},valid_at:{$ref:"#/$defs/UtcMicros"}},required:["mode","valid_at"],type:"object"},{properties:{from_valid_at:{$ref:"#/$defs/UtcMicros"},mode:{const:"evolution",type:"string"},through_valid_at:{$ref:"#/$defs/UtcMicros"}},required:["mode","from_valid_at","through_valid_at"],type:"object"},{properties:{from_observed_at:{$ref:"#/$defs/UtcMicros"},mode:{const:"forensic",type:"string"},through_observed_at:{$ref:"#/$defs/UtcMicros"}},required:["mode","from_observed_at","through_observed_at"],type:"object"}]},WorkProductAuthorizedRelationScopeV1:$c,WorkProductSelectionScopeV1:$b},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{continuation:{type:["string","null"]},mode:{$ref:"#/$defs/WorkGraphReadModeV1"},observed_at:{$ref:"#/$defs/UtcMicros"},selection:{$ref:"#/$defs/WorkProductSelectionScopeV1"}},required:["selection","mode","observed_at"],title:"WorkGraphReadRequestV1",type:"object"},{$defs:{ActorId:mU,AttemptId:m5,AuthorizedWorkProductScopeV1:{additionalProperties:!1,description:"Owner identity resolved by the registered profile authority. It is never\naccepted from a Work request.",properties:{owner_brain_id:{$ref:"#/$defs/BrainId"},owner_profile_id:{$ref:"#/$defs/UserProfileId"},selection:{$ref:"#/$defs/WorkProductSelectionScopeV1"}},required:["owner_brain_id","owner_profile_id","selection"],type:"object"},BrainId:ff,ManifestDigest:gj,ProjectId:_m,ProjectionGenerationId:_g,ProposalId:__,ProviderId:_w,RepositoryId:_z,RetrievalAnchorId:_J,RunId:_8,TaskEvidenceLinkV1:vX,TaskId:v1,UserProfileId:ba,UtcMicros:bs,VerifiedWorkGraphVersionV1:bc,WorkAcceptanceCriterionV1:bl,WorkAttemptIdentityV1:bh,WorkAttemptStateV1:bS,WorkCausalProjectionV1:{additionalProperties:!1,properties:{candidate_edges:{items:{$ref:"#/$defs/WorkDagEdgeV1"},type:"array"},graph_version:{format:"uint64",minimum:0,type:"integer"}},required:["graph_version","candidate_edges"],type:"object"},WorkCriticalPathProjectionV1:{additionalProperties:!1,properties:{graph_version:{format:"uint64",minimum:0,type:"integer"},task_ids:{items:{$ref:"#/$defs/TaskId"},type:"array"},total_effort:{format:"uint32",minimum:0,type:"integer"}},required:["graph_version","task_ids","total_effort"],type:"object"},WorkDagEdgeV1:{additionalProperties:!1,properties:{dependency:{$ref:"#/$defs/TaskId"},dependent:{$ref:"#/$defs/TaskId"}},required:["dependency","dependent"],type:"object"},WorkDagProjectionV1:{additionalProperties:!1,properties:{gating_edges:{items:{$ref:"#/$defs/WorkDagEdgeV1"},type:"array"},graph_version:{format:"uint64",minimum:0,type:"integer"},task_ids:{items:{$ref:"#/$defs/TaskId"},type:"array"}},required:["graph_version","task_ids","gating_edges"],type:"object"},WorkGraphSelectionCoverageV1:{description:"How much of the owner's journal the read's selection actually covers.\n\nA selection names a slice of the owner's work, not the whole journal: an\nevent records the relation scopes it was admitted under, and a selection\nthat does not name them puts that event *outside* the slice. The events\noutside a selection do not poison the ones inside it, but they must never be\nconcealed either, a caller who is shown the covered slice with no way to\nlearn that more exists is reading a silently incomplete graph.\n\nSo the read answers over the covered slice and says so, in the same\n`Complete`/`Partial` vocabulary [`WorkGraphTimelineCoverageV1`] and\n[`WorkHistoryCoverageV1`](crate::WorkHistoryCoverageV1) already use.\n\nThe covered slice is always a *prefix* of the journal, and that is a\nproperty of folding rather than a simplification. A graph version is folded\nfrom every event up to its own sequence, so the first event a selection does\nnot cover ends the readable slice: every later version, whatever scopes its\nown event named, would have to be folded across that event to exist at all.\n`excluded_events` therefore counts every event from the first uncovered one\nonward.",oneOf:[{description:"The selection covers the owner's whole journal. Nothing was withheld.",properties:{coverage:{const:"complete",type:"string"},covered_events:{format:"uint32",minimum:0,type:"integer"}},required:["coverage","covered_events"],type:"object"},{description:"The selection covers `covered_events` events and `excluded_events`\nevents lie outside it, starting at `first_excluded_sequence`. Every\nentry this read returned was folded from covered events alone.",properties:{coverage:{const:"partial",type:"string"},covered_events:{format:"uint32",minimum:0,type:"integer"},excluded_events:{format:"uint32",minimum:0,type:"integer"},first_excluded_sequence:{format:"uint64",minimum:0,type:"integer"}},required:["coverage","covered_events","excluded_events","first_excluded_sequence"],type:"object"}]},WorkGraphTimelineCoverageV1:{oneOf:[{properties:{coverage:{const:"complete",type:"string"},returned:{format:"uint32",minimum:0,type:"integer"}},required:["coverage","returned"],type:"object"},{properties:{continuation:{type:"string"},coverage:{const:"partial",type:"string"},returned:{format:"uint32",minimum:0,type:"integer"}},required:["coverage","returned","continuation"],type:"object"}]},WorkGraphTimelineV1:{additionalProperties:!1,properties:{coverage:{$ref:"#/$defs/WorkGraphTimelineCoverageV1"},entries:{items:{$ref:"#/$defs/WorkGraphVersionEntryV1"},type:"array"}},required:["entries","coverage"],type:"object"},WorkGraphVersionEntryV1:{additionalProperties:!1,description:"One immutable graph version and every Work projection derived from that\nsame version at the caller's explicit observation time.",properties:{graph:{$ref:"#/$defs/WorkProductGraphV1"},observed_at:{$ref:"#/$defs/UtcMicros"},projected_at:{$ref:"#/$defs/UtcMicros"},projections:{$ref:"#/$defs/WorkProductProjectionBundleV1"},runtime:{$ref:"#/$defs/WorkRuntimeProjectionV1"},valid_at:{$ref:"#/$defs/UtcMicros"},verified_version:{$ref:"#/$defs/VerifiedWorkGraphVersionV1"}},required:["valid_at","observed_at","projected_at","verified_version","graph","runtime","projections"],type:"object"},WorkHandoffV1:b2,WorkHierarchyV1:b4,WorkInitiativeV1:b6,WorkItemInputV1:b3,WorkItemV1:b9,WorkKanbanCardV1:{additionalProperties:!1,properties:{effort:{format:"uint32",minimum:0,type:"integer"},lane:{$ref:"#/$defs/WorkTimelineLaneV1"},legal_actions:{items:{$ref:"#/$defs/WorkLegalActionV1"},type:"array",uniqueItems:!0},task_id:{$ref:"#/$defs/TaskId"}},required:["task_id","lane","effort","legal_actions"],type:"object"},WorkKanbanProjectionV1:{additionalProperties:!1,properties:{cards:{items:{$ref:"#/$defs/WorkKanbanCardV1"},type:"array"},graph_version:{format:"uint64",minimum:0,type:"integer"}},required:["graph_version","cards"],type:"object"},WorkLegalActionV1:{enum:["view_evidence","generate_proposal","accept_proposal","link_accepted_attempt","accept_task","handoff","archive"],type:"string"},WorkMilestoneV1:$e,WorkPlanV1:$d,WorkProductAuthorizedRelationScopeV1:$c,WorkProductGraphV1:$f,WorkProductProjectionBundleV1:{additionalProperties:!1,properties:{causal:{$ref:"#/$defs/WorkCausalProjectionV1"},critical_path:{$ref:"#/$defs/WorkCriticalPathProjectionV1"},dag:{$ref:"#/$defs/WorkDagProjectionV1"},graph_version:{format:"uint64",minimum:0,type:"integer"},kanban:{$ref:"#/$defs/WorkKanbanProjectionV1"},runtime:{$ref:"#/$defs/WorkRuntimeProjectionV1"},timeline:{$ref:"#/$defs/WorkTimelineProjectionV1"},workload:{$ref:"#/$defs/WorkWorkloadProjectionV1"}},required:["graph_version","runtime","kanban","dag","timeline","causal","critical_path","workload"],type:"object"},WorkProductSelectionScopeV1:$b,WorkProjectionSequenceV1:{format:"uint64",minimum:0,title:"WorkProjectionSequenceV1",type:"integer"},WorkProposalDecisionV1:$$,WorkProposalDispositionV1:$S,WorkProposalV1:$k,WorkProposedChildV1:$w,WorkProviderRouteId:$I,WorkProviderRouteV1:$x,WorkRelationReplanDecisionV1:$C,WorkRelationReplanProposalV1:$T,WorkRouteDecisionV1:$N,WorkRuntimeAttemptProjectionV1:{additionalProperties:!1,properties:{identity:{$ref:"#/$defs/WorkAttemptIdentityV1"},state:{$ref:"#/$defs/WorkAttemptStateV1"}},required:["identity","state"],type:"object"},WorkRuntimeProjectionCoverageV1:{oneOf:[{additionalProperties:!1,properties:{coverage:{const:"complete",type:"string"}},required:["coverage"],type:"object"},{additionalProperties:!1,properties:{coverage:{const:"partial",type:"string"},unavailable_attempts:{items:{$ref:"#/$defs/WorkAttemptIdentityV1"},type:"array",uniqueItems:!0}},required:["coverage","unavailable_attempts"],type:"object"},{additionalProperties:!1,properties:{coverage:{const:"unavailable",type:"string"}},required:["coverage"],type:"object"}]},WorkRuntimeProjectionV1:{additionalProperties:!1,properties:{attempts:{items:{$ref:"#/$defs/WorkRuntimeAttemptProjectionV1"},type:"array"},coverage:{$ref:"#/$defs/WorkRuntimeProjectionCoverageV1"},generation_id:{$ref:"#/$defs/ProjectionGenerationId"},graph_version:{format:"uint64",minimum:0,type:"integer"},observed_at:{$ref:"#/$defs/UtcMicros"},sequence:{$ref:"#/$defs/WorkProjectionSequenceV1"}},required:["graph_version","generation_id","sequence","observed_at","attempts","coverage"],type:"object"},WorkScoreKindV1:$G,WorkShapeAssessmentV1:$B,WorkSizingV1:$K,WorkTimelineEntryV1:{additionalProperties:!1,properties:{created_at:{$ref:"#/$defs/UtcMicros"},deadline:{anyOf:[{$ref:"#/$defs/UtcMicros"},{type:"null"}]},scheduled_at:{anyOf:[{$ref:"#/$defs/UtcMicros"},{type:"null"}]},task_id:{$ref:"#/$defs/TaskId"},updated_at:{$ref:"#/$defs/UtcMicros"}},required:["task_id","created_at","updated_at"],type:"object"},WorkTimelineLaneV1:{enum:["triage","todo","scheduled","ready","running","blocked","review","done","archived","cancelled","unavailable"],type:"string"},WorkTimelineProjectionV1:{additionalProperties:!1,properties:{entries:{items:{$ref:"#/$defs/WorkTimelineEntryV1"},type:"array"},graph_version:{format:"uint64",minimum:0,type:"integer"}},required:["graph_version","entries"],type:"object"},WorkWorkloadProjectionV1:{additionalProperties:!1,properties:{actual_concurrency:{format:"uint32",minimum:0,type:["integer","null"]},blocked_effort:{format:"uint32",minimum:0,type:["integer","null"]},graph_version:{format:"uint64",minimum:0,type:"integer"},ready_effort:{format:"uint32",minimum:0,type:["integer","null"]},requested_concurrency:{format:"uint32",minimum:0,type:["integer","null"]},running_effort:{format:"uint32",minimum:0,type:["integer","null"]},total_effort:{format:"uint32",minimum:0,type:"integer"}},required:["graph_version","total_effort"],type:"object"}},$schema:"https://json-schema.org/draft/2020-12/schema",oneOf:[{properties:{authorized_scope:{$ref:"#/$defs/AuthorizedWorkProductScopeV1"},mode:{const:"current",type:"string"},selection_coverage:{$ref:"#/$defs/WorkGraphSelectionCoverageV1"},snapshot:{$ref:"#/$defs/WorkGraphVersionEntryV1"}},required:["mode","authorized_scope","selection_coverage","snapshot"],type:"object"},{properties:{authorized_scope:{$ref:"#/$defs/AuthorizedWorkProductScopeV1"},mode:{const:"as_of",type:"string"},selection_coverage:{$ref:"#/$defs/WorkGraphSelectionCoverageV1"},snapshot:{$ref:"#/$defs/WorkGraphVersionEntryV1"}},required:["mode","authorized_scope","selection_coverage","snapshot"],type:"object"},{properties:{authorized_scope:{$ref:"#/$defs/AuthorizedWorkProductScopeV1"},mode:{const:"evolution",type:"string"},selection_coverage:{$ref:"#/$defs/WorkGraphSelectionCoverageV1"},timeline:{$ref:"#/$defs/WorkGraphTimelineV1"}},required:["mode","authorized_scope","selection_coverage","timeline"],type:"object"},{properties:{authorized_scope:{$ref:"#/$defs/AuthorizedWorkProductScopeV1"},mode:{const:"forensic",type:"string"},selection_coverage:{$ref:"#/$defs/WorkGraphSelectionCoverageV1"},timeline:{$ref:"#/$defs/WorkGraphTimelineV1"}},required:["mode","authorized_scope","selection_coverage","timeline"],type:"object"},{description:"A `Current` or `AsOf` point read under an authorized selection that has\nno published graph version at that point: no task has been created yet.\nThe caller was authorized; the legal next action is creating a task.",properties:{authorized_scope:{$ref:"#/$defs/AuthorizedWorkProductScopeV1"},mode:{const:"absent",type:"string"},selection_coverage:{$ref:"#/$defs/WorkGraphSelectionCoverageV1"}},required:["mode","authorized_scope","selection_coverage"],type:"object"}],title:"WorkGraphReadV1"},{$defs:{WorkflowDefinitionId:$3},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Wire request for [`WorkflowDefinitionService::activate`].",properties:{definition_id:{$ref:"#/$defs/WorkflowDefinitionId"},definition_version:{format:"uint64",minimum:1,type:"integer"},expected_revision:{description:"Current candidate disposition revision. A newly registered candidate\nstarts at revision 1; activation reports expected and observed values\nwhen this compare-and-swap precondition is stale.",format:"uint64",minimum:1,type:"integer"}},required:["definition_id","definition_version","expected_revision"],title:"WorkflowDefinitionActivateRequest",type:"object"},{$defs:{UtcMicros:bs,WorkflowDefinitionId:$3,WorkflowDefinitionLifecycleState:{description:'Durable lifecycle disposition of one immutable workflow definition version.\n\nPlan 32 ("Typed workflow definitions"): "Lifecycle retains candidate,\nvalidate, activate, retire, reject, list, get, diff, and history operations\nthrough the same application surfaces." The definition payload itself stays\nimmutable, "Editing creates a new version; admitted runs remain pinned",\nso the disposition is a separate revisioned aggregate keyed by the same\ndefinition identity.',enum:["candidate","validated","active","retired","rejected"],type:"string"}},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Revisioned lifecycle disposition of one definition version.",properties:{definition_id:{$ref:"#/$defs/WorkflowDefinitionId"},definition_version:{format:"uint64",minimum:1,type:"integer"},revision:{format:"uint64",minimum:1,type:"integer"},state:{$ref:"#/$defs/WorkflowDefinitionLifecycleState"},transitioned_at:{$ref:"#/$defs/UtcMicros"}},required:["definition_id","definition_version","state","revision","transitioned_at"],title:"WorkflowDefinitionDisposition",type:"object"},{$defs:{RunId:_8,WorkCommandId:bC},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Requests cooperative cancellation as a durable typed transition; the run\nsettles to `Cancelled` when the runtime reconciles in-flight steps.",properties:{command_id:{$ref:"#/$defs/WorkCommandId"},expected_sequence:{format:"uint64",minimum:0,type:"integer"},run_id:{$ref:"#/$defs/RunId"}},required:["run_id","expected_sequence","command_id"],title:"WorkflowRunCancelRequest",type:"object"},{$defs:{ActorId:mU,AttemptId:m5,AutomaticWorktreeGcV1:fr,BranchCollisionPolicyV1:fh,BranchNameComponentV1:fy,BranchNameSeparatorV1:fg,BranchNamingPolicyV1:f_,BranchTopologyKindV1:fV,BranchTopologyPolicyV1:fP,CanonicalGitRefNameV1:fC,CanonicalGitRefPrefix:fT,CapabilityId:fO,CommitId:fX,ConfigurationRevisionId:f8,ConfigurationSnapshotId:f7,CredentialReferenceId:hN,CrossMergeModeV1:hz,CrossMergePolicyV1:hD,GitHubStackedPullRequestPolicyV1:yH,HistoryRewritePolicyV1:y7,LocatorDigest:gk,ManifestDigest:gj,ProjectId:_m,ProposalId:__,ProtectedRefDispositionV1:_v,ProtectedRefRuleV1:_b,ProtectedRefSelectorV1:_$,ProviderId:_w,RefId:_T,RepositoryId:_z,RepositoryPlacementScopeV1:_D,RequiredCheckExpectationV1:_F,RequiredCheckV1:_L,ReviewRequirementV1:_0,ReviewTopologyKindV1:_2,ReviewTopologyPolicyV1:_4,RunId:_8,SensitiveFilesystemLocatorV1:vf,TaskId:v1,TopologyConcurrencyPolicyV1:be,TopologyEscalationPolicyV1:bt,TopologyGatePolicyV1:br,TopologyNotificationLevelV1:bi,UtcMicros:bs,WorkAcceptanceCriterionV1:bl,WorkApprovalPolicy:bp,WorkArtifactId:bu,WorkArtifactRefV1:bm,WorkAttemptIdentityV1:bh,WorkAuthority:{additionalProperties:!1,properties:{actor_id:{$ref:"#/$defs/ActorId"},policy_digest:{$ref:"#/$defs/ManifestDigest"},project_id:{$ref:"#/$defs/ProjectId"},repository_id:{$ref:"#/$defs/RepositoryId"},worktree_id:{$ref:"#/$defs/WorktreeId"}},required:["project_id","repository_id","worktree_id","actor_id","policy_digest"],type:"object"},WorkCommandId:bC,WorkEffectStateV1:bA,WorkEgressPolicy:bM,WorkExecutableReference:bL,WorkExecutionLimits:bH,WorkExecutionSnapshot:bG,WorkFallbackTopology:bJ,WorkFilesystemPolicy:bQ,WorkHandoffV1:b2,WorkHierarchyV1:b4,WorkInitiativeV1:b6,WorkItemInputV1:b3,WorkItemV1:b9,WorkMilestoneV1:$e,WorkPlanV1:$d,WorkProposalV1:$k,WorkProposedChildV1:$w,WorkProviderBackendV1:$P,WorkProviderProtocol:$q,WorkProviderRouteId:$I,WorkProviderRouteV1:$x,WorkRouteDecisionV1:$N,WorkSandboxPolicy:$H,WorkScoreKindV1:$G,WorkShapeAssessmentV1:$B,WorkSizingV1:$K,WorkTopologyPolicyV1:$4,WorkflowDefinition:$6,WorkflowDefinitionId:$3,WorkflowFanOut:$9,WorkflowFanOutChildPlanV1:{additionalProperties:!1,properties:{admit_command_id:{$ref:"#/$defs/WorkCommandId"},attempt_identity:{$ref:"#/$defs/WorkAttemptIdentityV1"},create_command_id:{$ref:"#/$defs/WorkCommandId"},initiative:{$ref:"#/$defs/WorkInitiativeV1"},instructions:{type:"string"},item:{$ref:"#/$defs/WorkItemV1"},milestone:{$ref:"#/$defs/WorkMilestoneV1"},plan:{$ref:"#/$defs/WorkPlanV1"},proposal:{$ref:"#/$defs/WorkProposalV1"},proposal_command_id:{$ref:"#/$defs/WorkCommandId"},task_id:{$ref:"#/$defs/TaskId"}},required:["task_id","attempt_identity","create_command_id","proposal_command_id","admit_command_id","initiative","plan","milestone","item","proposal","instructions"],type:"object"},WorkflowFanOutFailurePolicyV1:{oneOf:[{properties:{policy:{const:"fail_fast",type:"string"}},required:["policy"],type:"object"},{properties:{policy:{const:"collect",type:"string"}},required:["policy"],type:"object"},{properties:{policy:{const:"require_at_least",type:"string"},successes:{format:"uint16",maximum:65535,minimum:1,type:"integer"}},required:["policy","successes"],type:"object"}]},WorkflowFanOutPlanV1:{additionalProperties:!1,properties:{admitted_at:{$ref:"#/$defs/UtcMicros"},authority:{$ref:"#/$defs/WorkAuthority",description:"Exact Work authority that admitted this plan. Recovery may execute the\nplan only from a runtime with this byte-identical authority."},children:{items:{$ref:"#/$defs/WorkflowFanOutChildPlanV1"},type:"array"},commit:{$ref:"#/$defs/CommitId"},effect_state:{$ref:"#/$defs/WorkEffectStateV1"},execution_snapshot:{$ref:"#/$defs/WorkExecutionSnapshot"},failure_policy:{$ref:"#/$defs/WorkflowFanOutFailurePolicyV1"},maximum_parallel:{format:"uint16",maximum:65535,minimum:1,type:"integer"},operation:{$ref:"#/$defs/WorkflowOperationRef"},plan_digest:{$ref:"#/$defs/ManifestDigest"},reference:{anyOf:[{$ref:"#/$defs/RefId"},{type:"null"}]},step_id:{$ref:"#/$defs/WorkflowStepId"}},required:["authority","step_id","operation","plan_digest","admitted_at","maximum_parallel","failure_policy","execution_snapshot","commit","effect_state","children"],type:"object"},WorkflowOperationRef:$5,WorkflowOutputArtifact:{additionalProperties:!1,properties:{artifact:{$ref:"#/$defs/WorkArtifactRefV1"},attempt_identity:{$ref:"#/$defs/WorkAttemptIdentityV1"}},required:["attempt_identity","artifact"],type:"object"},WorkflowOutputName:$8,WorkflowOutputReference:$7,WorkflowPlacementReceipt:{additionalProperties:!1,properties:{backend:{$ref:"#/$defs/WorkProviderBackendV1"},configuration_digest:{$ref:"#/$defs/ManifestDigest"},model:{type:"string"},placement_digest:{$ref:"#/$defs/ManifestDigest"},provider_registry_digest:{$ref:"#/$defs/ManifestDigest"},route:{$ref:"#/$defs/WorkProviderRouteV1"},run_id:{$ref:"#/$defs/RunId"},step_id:{$ref:"#/$defs/WorkflowStepId"},topology_digest:{$ref:"#/$defs/ManifestDigest"},worktree_placement:{$ref:"#/$defs/WorktreePlacementModeV1"}},required:["run_id","step_id","route","backend","model","configuration_digest","topology_digest","provider_registry_digest","worktree_placement","placement_digest"],type:"object"},WorkflowRunEvent:{additionalProperties:!1,properties:{command_id:{$ref:"#/$defs/WorkCommandId"},event:{$ref:"#/$defs/WorkflowRunEventKind"},input_digest:{$ref:"#/$defs/ManifestDigest"},occurred_at:{$ref:"#/$defs/UtcMicros"},run_id:{$ref:"#/$defs/RunId"},sequence:{format:"uint64",minimum:0,type:"integer"}},required:["run_id","sequence","command_id","input_digest","occurred_at","event"],type:"object"},WorkflowRunEventKind:{oneOf:[{properties:{definition:{$ref:"#/$defs/WorkflowDefinition"},fan_out_plans:{default:[],items:{$ref:"#/$defs/WorkflowFanOutPlanV1"},type:"array"},pinned_provider_registry_digest:{$ref:"#/$defs/ManifestDigest"},pinned_topology_digest:{$ref:"#/$defs/ManifestDigest"},type:{const:"admitted",type:"string"}},required:["type","definition","pinned_topology_digest","pinned_provider_registry_digest"],type:"object"},{properties:{attempts:{items:{$ref:"#/$defs/WorkAttemptIdentityV1"},type:"array"},step_id:{$ref:"#/$defs/WorkflowStepId"},type:{const:"fan_out_children_released",type:"string"}},required:["type","step_id","attempts"],type:"object"},{properties:{attempts:{items:{$ref:"#/$defs/WorkAttemptIdentityV1"},type:"array"},step_id:{$ref:"#/$defs/WorkflowStepId"},type:{const:"fan_out_children_settled",type:"string"}},required:["type","step_id","attempts"],type:"object"},{properties:{planned_attempt:{$ref:"#/$defs/WorkAttemptIdentityV1"},prior_attempt:{$ref:"#/$defs/WorkAttemptIdentityV1"},replacement_attempt:{$ref:"#/$defs/WorkAttemptIdentityV1"},retry_receipt_digest:{$ref:"#/$defs/ManifestDigest"},step_id:{$ref:"#/$defs/WorkflowStepId"},type:{const:"fan_out_child_retry_rebound",type:"string"}},required:["type","step_id","planned_attempt","prior_attempt","replacement_attempt","retry_receipt_digest"],type:"object"},{properties:{placement:{$ref:"#/$defs/WorkflowPlacementReceipt"},step_id:{$ref:"#/$defs/WorkflowStepId"},type:{const:"step_started",type:"string"}},required:["type","step_id","placement"],type:"object"},{properties:{effect_receipt:{$ref:"#/$defs/WorkflowStepEffectReceipt"},outputs:{items:{$ref:"#/$defs/WorkflowStepOutput"},type:"array"},step_id:{$ref:"#/$defs/WorkflowStepId"},type:{const:"step_completed",type:"string"}},required:["type","step_id","outputs","effect_receipt"],type:"object"},{properties:{effect_receipt:{$ref:"#/$defs/WorkflowStepEffectReceipt"},outputs:{items:{$ref:"#/$defs/WorkflowStepOutput"},type:"array"},step_id:{$ref:"#/$defs/WorkflowStepId"},type:{const:"step_failed",type:"string"}},required:["type","step_id","outputs","effect_receipt"],type:"object"},{properties:{type:{const:"paused",type:"string"}},required:["type"],type:"object"},{properties:{type:{const:"resumed",type:"string"}},required:["type"],type:"object"},{properties:{type:{const:"cancellation_requested",type:"string"}},required:["type"],type:"object"},{properties:{type:{const:"cancelled",type:"string"}},required:["type"],type:"object"}]},WorkflowRunStatus:{enum:["running","paused","cancelling","completed","failed","cancelled"],type:"string"},WorkflowStep:Se,WorkflowStepEffectOutcome:{enum:["completed","failed","cancelled","timed_out","unknown"],type:"string"},WorkflowStepEffectReceipt:{additionalProperties:!1,properties:{effect_digest:{$ref:"#/$defs/ManifestDigest"},outcome:{$ref:"#/$defs/WorkflowStepEffectOutcome"},output_set_digest:{$ref:"#/$defs/ManifestDigest"},placement_digest:{$ref:"#/$defs/ManifestDigest"},receipt_digest:{$ref:"#/$defs/ManifestDigest"},run_id:{$ref:"#/$defs/RunId"},step_id:{$ref:"#/$defs/WorkflowStepId"}},required:["run_id","step_id","placement_digest","outcome","effect_digest","output_set_digest","receipt_digest"],type:"object"},WorkflowStepId:St,WorkflowStepOutput:{additionalProperties:!1,properties:{artifacts:{items:{$ref:"#/$defs/WorkflowOutputArtifact"},type:"array"},output_name:{$ref:"#/$defs/WorkflowOutputName"}},required:["output_name","artifacts"],type:"object"},WorkflowStepRunProjection:{additionalProperties:!1,properties:{effect_receipt:{anyOf:[{$ref:"#/$defs/WorkflowStepEffectReceipt"},{type:"null"}]},outputs:{additionalProperties:{$ref:"#/$defs/WorkflowStepOutput"},type:"object"},placement_receipt:{anyOf:[{$ref:"#/$defs/WorkflowPlacementReceipt"},{type:"null"}]},status:{$ref:"#/$defs/WorkflowStepStatus"}},required:["status","outputs"],type:"object"},WorkflowStepStatus:{enum:["blocked","ready","running","succeeded","failed","cancelled"],type:"string"},WorktreeCleanlinessRequirementV1:Si,WorktreeId:So,WorktreePlacementModeV1:Ss,WorktreeRetentionPolicyV1:Sd,WorktreeRootPolicyV1:Sc},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{definition:{$ref:"#/$defs/WorkflowDefinition"},fan_out_plans:{additionalProperties:{$ref:"#/$defs/WorkflowFanOutPlanV1"},type:"object"},history:{items:{$ref:"#/$defs/WorkflowRunEvent"},type:"array"},pinned_provider_registry_digest:{$ref:"#/$defs/ManifestDigest"},pinned_topology_digest:{$ref:"#/$defs/ManifestDigest"},released_fan_out_attempts:{items:{$ref:"#/$defs/WorkAttemptIdentityV1"},type:"array",uniqueItems:!0},run_id:{$ref:"#/$defs/RunId"},sequence:{format:"uint64",minimum:0,type:"integer"},settled_fan_out_attempts:{items:{$ref:"#/$defs/WorkAttemptIdentityV1"},type:"array",uniqueItems:!0},status:{$ref:"#/$defs/WorkflowRunStatus"},steps:{additionalProperties:{$ref:"#/$defs/WorkflowStepRunProjection"},type:"object"}},required:["run_id","definition","pinned_topology_digest","pinned_provider_registry_digest","status","sequence","steps","fan_out_plans","released_fan_out_attempts","settled_fan_out_attempts","history"],title:"WorkflowRunProjection",type:"object"},{$defs:{WorkflowDefinitionId:$3},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Wire request for [`WorkflowDefinitionService::history`].",properties:{definition_id:{$ref:"#/$defs/WorkflowDefinitionId"}},required:["definition_id"],title:"WorkflowDefinitionHistoryRequest",type:"object"},{$defs:{ManifestDigest:gj,ProjectId:_m,WorkflowDefinition:$6,WorkflowDefinitionId:$3,WorkflowFanOut:$9,WorkflowOperationRef:$5,WorkflowOutputName:$8,WorkflowOutputReference:$7,WorkflowStep:Se,WorkflowStepId:St},$schema:"https://json-schema.org/draft/2020-12/schema",items:{$ref:"#/$defs/WorkflowDefinition"},title:"Array_of_WorkflowDefinition",type:"array"},{$defs:{WorkflowDefinitionId:$3},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Wire request for [`WorkflowDefinitionService::diff`].",properties:{definition_id:{$ref:"#/$defs/WorkflowDefinitionId"},from_version:{format:"uint64",minimum:1,type:"integer"},to_version:{format:"uint64",minimum:1,type:"integer"}},required:["definition_id","from_version","to_version"],title:"WorkflowDefinitionDiffRequest",type:"object"},{$defs:{WorkflowDefinitionId:$3,WorkflowStepId:St},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{catalog_changed:{type:"boolean"},changed_steps:{items:{$ref:"#/$defs/WorkflowStepId"},type:"array",uniqueItems:!0},configuration_changed:{type:"boolean"},definition_id:{$ref:"#/$defs/WorkflowDefinitionId"},from_version:{format:"uint64",minimum:0,type:"integer"},policy_changed:{type:"boolean"},to_version:{format:"uint64",minimum:0,type:"integer"}},required:["definition_id","from_version","to_version","changed_steps","policy_changed","configuration_changed","catalog_changed"],title:"WorkflowDefinitionDiff",type:"object"},{$defs:{WorkflowDefinitionId:$3},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Wire request for [`WorkflowDefinitionService::get`].",properties:{definition_id:{$ref:"#/$defs/WorkflowDefinitionId"},definition_version:{format:"uint64",minimum:1,type:"integer"}},required:["definition_id","definition_version"],title:"WorkflowDefinitionGetRequest",type:"object"},{$defs:{ManifestDigest:gj,ProjectId:_m,WorkflowDefinitionId:$3,WorkflowFanOut:$9,WorkflowOperationRef:$5,WorkflowOutputName:$8,WorkflowOutputReference:$7,WorkflowStep:Se,WorkflowStepId:St},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{definition_id:{$ref:"#/$defs/WorkflowDefinitionId"},definition_version:{format:"uint64",minimum:0,type:"integer"},pinned_catalog_digest:{$ref:"#/$defs/ManifestDigest",description:"Must equal the live Work executable catalog digest. Validation and\nactivation report the current digest when this pin is stale."},pinned_configuration_digest:{$ref:"#/$defs/ManifestDigest"},pinned_policy_digest:{$ref:"#/$defs/ManifestDigest"},project_id:{$ref:"#/$defs/ProjectId"},steps:{items:{$ref:"#/$defs/WorkflowStep"},type:"array"}},required:["definition_id","definition_version","project_id","steps","pinned_policy_digest","pinned_configuration_digest","pinned_catalog_digest"],title:"WorkflowDefinition",type:"object"},{$defs:{RunId:_8},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{run_id:{$ref:"#/$defs/RunId"}},required:["run_id"],title:"WorkflowRunGetRequest",type:"object"},{$defs:{ActorId:mU,AttemptId:m5,ManifestDigest:gj,ProjectId:_m,RepositoryId:_z,RunId:_8,TaskHandoffScope:vY,TaskId:v1,ThreadId:v5,UtcMicros:bs,WorkAttemptIdentityV1:bh,WorkAttemptStateV1:bS,WorkHandoffAttemptFrontierV1:bY,WorkHandoffFrontierV1:b1,WorkHandoffLineageV1:b0,WorkflowDefinitionId:$3,WorkflowStepId:St,WorktreeId:So},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Wire request for [`TaskHandoffService::issue`].\n\n`secret` is the caller-supplied bearer token; the authority persists only\nits digest, never the secret itself. The scope must name a step the\nActive definition version declares and a run admitted from that version;\nany other scope is refused as not found and journals no grant.",properties:{frontier:{$ref:"#/$defs/WorkHandoffFrontierV1",description:"The exact work/evidence frontier this handoff records (Plan 24)."},scope:{$ref:"#/$defs/TaskHandoffScope"},secret:{type:"string"}},required:["scope","secret","frontier"],title:"TaskHandoffIssueRequest",type:"object"},{$defs:{ActorId:mU,AttemptId:m5,ManifestDigest:gj,ProjectId:_m,RepositoryId:_z,RunId:_8,TaskHandoffScope:vY,TaskId:v1,ThreadId:v5,UtcMicros:bs,WorkAttemptIdentityV1:bh,WorkAttemptStateV1:bS,WorkHandoffAttemptFrontierV1:bY,WorkHandoffFrontierV1:b1,WorkHandoffLineageV1:b0,WorkflowDefinitionId:$3,WorkflowStepId:St,WorktreeId:So},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{expires_at:{$ref:"#/$defs/UtcMicros"},frontier:{$ref:"#/$defs/WorkHandoffFrontierV1",description:"The exact work/evidence frontier this handoff records (Plan 24)."},frontier_digest:{$ref:"#/$defs/ManifestDigest",description:"The canonical digest of `frontier`; lineage chains hold this value."},issued_at:{$ref:"#/$defs/UtcMicros"},scope:{$ref:"#/$defs/TaskHandoffScope"},token_digest:{$ref:"#/$defs/ManifestDigest"}},required:["scope","token_digest","issued_at","expires_at","frontier","frontier_digest"],title:"TaskHandoffGrant",type:"object"},{$defs:{ActorId:mU,ProjectId:_m,RepositoryId:_z,RunId:_8,TaskHandoffScope:vY,TaskId:v1,ThreadId:v5,WorkflowDefinitionId:$3,WorkflowStepId:St,WorktreeId:So},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Wire request for [`TaskHandoffService::redeem`].",properties:{expected_scope:{$ref:"#/$defs/TaskHandoffScope"},secret:{type:"string"}},required:["secret","expected_scope"],title:"TaskHandoffRedeemRequest",type:"object"},{$defs:{ActorId:mU,AttemptId:m5,ManifestDigest:gj,ProjectId:_m,RepositoryId:_z,RunId:_8,TaskHandoffScope:vY,TaskId:v1,ThreadId:v5,UtcMicros:bs,WorkAttemptIdentityV1:bh,WorkAttemptStateV1:bS,WorkHandoffAttemptFrontierV1:bY,WorkHandoffFrontierV1:b1,WorkHandoffLineageV1:b0,WorkflowDefinitionId:$3,WorkflowStepId:St,WorktreeId:So},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Wire response for [`TaskHandoffService::redeem`]: the redemption receipt,\nonce and only once, for the caller that actually consumed the grant.\n\nThe receipt is checkpoint evidence only. It deliberately carries no\nlease, fence, or acceptance authority: redeeming a handoff cannot renew\na lease, establish task acceptance, or mutate graph or runtime state\n(Plan 24). The redeemer must earn runtime authority through the normal\nadmission and lease paths.",properties:{frontier:{$ref:"#/$defs/WorkHandoffFrontierV1",description:"The frontier exactly as the issuer recorded it."},frontier_digest:{$ref:"#/$defs/ManifestDigest",description:"The canonical digest of `frontier`, for lineage chaining."},redeemed_at:{$ref:"#/$defs/UtcMicros"},scope:{$ref:"#/$defs/TaskHandoffScope"}},required:["scope","frontier","frontier_digest","redeemed_at"],title:"TaskHandoffRedeemed",type:"object"},{$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Wire request for [`WorkflowDefinitionService::list`].",title:"WorkflowDefinitionListRequest",type:"object"},{$defs:{RunId:_8,WorkCommandId:bC},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{command_id:{$ref:"#/$defs/WorkCommandId"},expected_sequence:{format:"uint64",minimum:0,type:"integer"},run_id:{$ref:"#/$defs/RunId"}},required:["run_id","expected_sequence","command_id"],title:"WorkflowRunPauseRequest",type:"object"},{$defs:{ManifestDigest:gj,ProjectId:_m,WorkflowDefinition:$6,WorkflowDefinitionId:$3,WorkflowFanOut:$9,WorkflowOperationRef:$5,WorkflowOutputName:$8,WorkflowOutputReference:$7,WorkflowStep:Se,WorkflowStepId:St},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Wire request for [`WorkflowDefinitionService::register`].",properties:{definition:{$ref:"#/$defs/WorkflowDefinition"}},required:["definition"],title:"WorkflowDefinitionRegisterRequest",type:"object"},{$defs:{WorkflowDefinitionId:$3},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Wire request for [`WorkflowDefinitionService::reject`].",properties:{definition_id:{$ref:"#/$defs/WorkflowDefinitionId"},definition_version:{format:"uint64",minimum:1,type:"integer"},expected_revision:{format:"uint64",minimum:1,type:"integer"}},required:["definition_id","definition_version","expected_revision"],title:"WorkflowDefinitionRejectRequest",type:"object"},{$defs:{RunId:_8,WorkCommandId:bC},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{command_id:{$ref:"#/$defs/WorkCommandId"},expected_sequence:{format:"uint64",minimum:0,type:"integer"},run_id:{$ref:"#/$defs/RunId"}},required:["run_id","expected_sequence","command_id"],title:"WorkflowRunResumeRequest",type:"object"},{$defs:{WorkflowDefinitionId:$3},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Wire request for [`WorkflowDefinitionService::retire`].",properties:{definition_id:{$ref:"#/$defs/WorkflowDefinitionId"},definition_version:{format:"uint64",minimum:1,type:"integer"},expected_revision:{format:"uint64",minimum:1,type:"integer"}},required:["definition_id","definition_version","expected_revision"],title:"WorkflowDefinitionRetireRequest",type:"object"},{$defs:{ActorId:mU,AttemptId:m5,AutomaticWorktreeGcV1:fr,BranchCollisionPolicyV1:fh,BranchNameComponentV1:fy,BranchNameSeparatorV1:fg,BranchNamingPolicyV1:f_,BranchTopologyKindV1:fV,BranchTopologyPolicyV1:fP,CanonicalGitRefNameV1:fC,CanonicalGitRefPrefix:fT,CapabilityId:fO,CommitId:fX,ConfigurationRevisionId:f8,ConfigurationSnapshotId:f7,CredentialReferenceId:hN,CrossMergeModeV1:hz,CrossMergePolicyV1:hD,GitHubStackedPullRequestPolicyV1:yH,HistoryRewritePolicyV1:y7,LocatorDigest:gk,ManifestDigest:gj,ProposalId:__,ProtectedRefDispositionV1:_v,ProtectedRefRuleV1:_b,ProtectedRefSelectorV1:_$,ProviderId:_w,RefId:_T,RepositoryId:_z,RepositoryPlacementScopeV1:_D,RequiredCheckExpectationV1:_F,RequiredCheckV1:_L,ReviewRequirementV1:_0,ReviewTopologyKindV1:_2,ReviewTopologyPolicyV1:_4,RunId:_8,SensitiveFilesystemLocatorV1:vf,TaskId:v1,TopologyConcurrencyPolicyV1:be,TopologyEscalationPolicyV1:bt,TopologyGatePolicyV1:br,TopologyNotificationLevelV1:bi,UtcMicros:bs,WorkAcceptanceCriterionV1:bl,WorkApprovalPolicy:bp,WorkAttemptIdentityV1:bh,WorkCommandId:bC,WorkEffectStateV1:bA,WorkEgressPolicy:bM,WorkExecutableReference:bL,WorkExecutionLimits:bH,WorkExecutionSnapshot:bG,WorkFallbackTopology:bJ,WorkFenceEpochV1:bZ,WorkFilesystemPolicy:bQ,WorkHandoffV1:b2,WorkHierarchyV1:b4,WorkInitiativeV1:b6,WorkItemInputV1:b3,WorkItemV1:b9,WorkLeaseFenceV1:b8,WorkLeaseId:b7,WorkMilestoneV1:$e,WorkPlanV1:$d,WorkProposalV1:$k,WorkProposedChildV1:$w,WorkProviderBackendV1:$P,WorkProviderProtocol:$q,WorkProviderRouteId:$I,WorkProviderRouteV1:$x,WorkRouteDecisionV1:$N,WorkSandboxPolicy:$H,WorkScoreKindV1:$G,WorkShapeAssessmentV1:$B,WorkSizingV1:$K,WorkTopologyPolicyV1:$4,WorkflowDefinitionId:$3,WorkflowExecutionFence:{additionalProperties:!1,properties:{attempt_id:{$ref:"#/$defs/AttemptId"},lease:{$ref:"#/$defs/WorkLeaseFenceV1"}},required:["attempt_id","lease"],type:"object"},WorkflowFailurePolicy:{oneOf:[{properties:{policy:{const:"fail_fast",type:"string"}},required:["policy"],type:"object"},{properties:{policy:{const:"collect",type:"string"}},required:["policy"],type:"object"},{properties:{policy:{const:"require_at_least",type:"string"},successes:{format:"uint32",minimum:1,type:"integer"}},required:["policy","successes"],type:"object"}]},WorkflowFanOutInput:{additionalProperties:!1,properties:{initiative:{$ref:"#/$defs/WorkInitiativeV1"},input_digest:{$ref:"#/$defs/ManifestDigest"},instructions:{type:"string"},item:{$ref:"#/$defs/WorkItemV1"},milestone:{$ref:"#/$defs/WorkMilestoneV1"},plan:{$ref:"#/$defs/WorkPlanV1"},proposal:{$ref:"#/$defs/WorkProposalV1"}},required:["instructions","input_digest","initiative","plan","milestone","item","proposal"],type:"object"},WorkflowFanOutStartV1:{additionalProperties:!1,description:"Caller input required to durably plan the entry fan-out of a workflow run.\nDaemon-owned registration and topology digests are resolved at admission.",properties:{commit:{$ref:"#/$defs/CommitId"},effect_state:{$ref:"#/$defs/WorkEffectStateV1"},execution_snapshot:{$ref:"#/$defs/WorkExecutionSnapshot"},failure_policy:{$ref:"#/$defs/WorkflowFailurePolicy"},fence:{$ref:"#/$defs/WorkflowExecutionFence"},inputs:{items:{$ref:"#/$defs/WorkflowFanOutInput"},type:"array"},max_parallel:{format:"uint32",minimum:1,type:"integer"},reference:{anyOf:[{$ref:"#/$defs/RefId"},{type:"null"}]}},required:["fence","max_parallel","failure_policy","execution_snapshot","commit","effect_state","inputs"],type:"object"},WorkflowProviderRegistration:{additionalProperties:!1,properties:{backend:{$ref:"#/$defs/WorkProviderBackendV1"},model:{type:"string"},priority:{format:"uint32",minimum:0,type:"integer"},route:{$ref:"#/$defs/WorkProviderRouteV1"}},required:["route","backend","model","priority"],type:"object"},WorktreeCleanlinessRequirementV1:Si,WorktreePlacementModeV1:Ss,WorktreeRetentionPolicyV1:Sd,WorktreeRootPolicyV1:Sc},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Starts (admits) a journaled workflow run from an active definition.\n\nThe daemon derives every admission digest itself: the definition's own\npinned policy/configuration/catalog digests are checked against the live\nenvironment, the topology digest comes from the evaluated topology policy,\nand the provider registry digest is computed from this registration. The\ncaller never supplies a digest the runtime must trust.",properties:{command_id:{$ref:"#/$defs/WorkCommandId"},definition_id:{$ref:"#/$defs/WorkflowDefinitionId"},definition_version:{format:"uint64",minimum:1,type:"integer"},fan_out:{anyOf:[{$ref:"#/$defs/WorkflowFanOutStartV1"},{type:"null"}]},provider:{$ref:"#/$defs/WorkflowProviderRegistration"},run_id:{$ref:"#/$defs/RunId"}},required:["run_id","definition_id","definition_version","provider","command_id"],title:"WorkflowRunStartRequest",type:"object"},{$defs:{ManifestDigest:gj,ProjectId:_m,WorkflowDefinition:$6,WorkflowDefinitionId:$3,WorkflowFanOut:$9,WorkflowOperationRef:$5,WorkflowOutputName:$8,WorkflowOutputReference:$7,WorkflowStep:Se,WorkflowStepId:St},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,description:"Wire request for [`WorkflowDefinitionService::validate`].",properties:{definition:{$ref:"#/$defs/WorkflowDefinition"}},required:["definition"],title:"WorkflowDefinitionValidateRequest",type:"object"},{$defs:{ManifestDigest:gj,ProjectId:_m,WorkflowDefinition:$6,WorkflowDefinitionId:$3,WorkflowFanOut:$9,WorkflowOperationRef:$5,WorkflowOutputName:$8,WorkflowOutputReference:$7,WorkflowStep:Se,WorkflowStepId:St},$schema:"https://json-schema.org/draft/2020-12/schema",additionalProperties:!1,properties:{definition:{$ref:"#/$defs/WorkflowDefinition"}},required:["definition"],title:"WorkflowDefinitionValidation",type:"object"}].map(e=>t=>(!function e(t,r,i,o,n){var a;if("boolean"==typeof r){if(!r)throw TypeError(`${o} is rejected by the canonical schema`);return}let s=mV(r,o);if("string"==typeof s.$ref){if(n.has(s.$ref))throw TypeError(`cyclic canonical schema reference: ${s.$ref}`);n.add(s.$ref),e(t,function(e,t){if(!t.startsWith("#/"))throw TypeError(`unsupported canonical schema reference: ${t}`);let r=e;for(let e of t.slice(2).split("/")){let i=e.replaceAll("~1","/").replaceAll("~0","~");r=mV(r,t)[i]}return mV(r,t)}(i,s.$ref),i,o,n),n.delete(s.$ref);return}if("const"in s&&(a=s.const,mw(t)!==mw(a)))throw TypeError(`${o} does not match the canonical constant`);if(Array.isArray(s.enum)&&!s.enum.some(e=>mw(t)===mw(e)))throw TypeError(`${o} is not a canonical enum value`);if(Array.isArray(s.allOf))for(let r of s.allOf)e(t,r,i,o,new Set(n));if(Array.isArray(s.anyOf)&&!s.anyOf.some(r=>{try{return e(t,r,i,o,new Set(n)),!0}catch{return!1}}))throw TypeError(`${o} does not match any canonical variant`);if(Array.isArray(s.oneOf)&&1!==s.oneOf.filter(r=>{try{return e(t,r,i,o,new Set(n)),!0}catch{return!1}}).length)throw TypeError(`${o} must match exactly one canonical variant`);let d=s.type;if("string"==typeof d&&!mP(t,d))throw TypeError(`${o} must be ${d}`);if(Array.isArray(d)&&!d.some(e=>"string"==typeof e&&mP(t,e)))throw TypeError(`${o} has no canonical type`);if("string"==typeof t){if("number"==typeof s.minLength&&t.lengths.maxLength)throw TypeError(`${o} exceeds maxLength`);if("string"==typeof s.pattern&&!RegExp(s.pattern,"u").test(t))throw TypeError(`${o} does not match the canonical pattern`)}if("number"==typeof t){if("integer"===s.type){if("uint32"===s.format&&(t<0||t>0xffffffff))throw TypeError(`${o} is outside uint32`);if("uint64"===s.format&&(t<0||t>Number.MAX_SAFE_INTEGER))throw TypeError(`${o} is outside safely representable uint64`);if("int64"===s.format&&(tNumber.MAX_SAFE_INTEGER))throw TypeError(`${o} is outside safely representable int64`)}if("number"==typeof s.minimum&&ts.maximum)throw TypeError(`${o} exceeds maximum`)}if(Array.isArray(t)){if("number"==typeof s.minItems&&t.lengths.maxItems)throw TypeError(`${o} has too many items`);if(!0===s.uniqueItems){let e=new Set;for(let r of t){let t=mw(r);if(e.has(t))throw TypeError(`${o} contains duplicate items`);e.add(t)}}Array.isArray(s.prefixItems)&&s.prefixItems.forEach((r,n)=>{ne(t,s.items,i,`${o}[${r}]`,new Set))}if("object"==typeof t&&null!==t&&!Array.isArray(t)){let r=void 0===s.properties?{}:mV(s.properties,`${o}.properties`);if(Array.isArray(s.required)){for(let e of s.required)if("string"==typeof e&&!(e in t))throw TypeError(`${o}.${e} is required`)}for(let[n,a]of Object.entries(t))if(n in r)e(a,r[n],i,`${o}.${n}`,new Set);else if(!1===s.additionalProperties)throw TypeError(`${o}.${n} is not allowed`);else"object"==typeof s.additionalProperties&&e(a,s.additionalProperties,i,`${o}.${n}`,new Set)}}(t,e,e,"value",new Set),t));function Sp(e){let t=Sl[e];if(void 0===t)throw TypeError(`generated canonical schema ${e} is missing`);return t}let Su=[{operation:"active_project",operationId:"operation.application.active_project",transport:{kind:"mcp_tool",toolName:"tracedecay_active_project"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.active_project.v1",requestSchema:{schemaId:"schema.application.primitive.active-project.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.active-project.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(0),decodeResult:Sp(1)},{operation:"admin_cli",operationId:"operation.application.admin_cli",transport:{kind:"mcp_tool",toolName:"tracedecay_admin_cli"},effect:"maintains_profile_state",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.admin_cli.v1",requestSchema:{schemaId:"schema.application.primitive.admin-cli.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.admin-cli.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","effect_in_flight"]},deadline:{behavior:"return_operation_receipt",maximum_millis:6e5},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(2),decodeResult:Sp(3)},{operation:"admin_project",operationId:"operation.application.admin_project",transport:{kind:"mcp_tool",toolName:"tracedecay_admin_project"},effect:"maintains_owner_state",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.admin_project.v1",requestSchema:{schemaId:"schema.application.primitive.admin-project.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.admin-project.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_operation_receipt",maximum_millis:6e5},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","timed_out","failed","unavailable","partial"],decodeRequest:Sp(4),decodeResult:Sp(5)},{operation:"admin_sync",operationId:"operation.application.admin_sync",transport:{kind:"mcp_tool",toolName:"tracedecay_admin_sync"},effect:"schedules_work",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.admin_sync.v1",requestSchema:{schemaId:"schema.application.primitive.admin-sync.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.admin-sync.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_operation_receipt",maximum_millis:6e5},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","timed_out","failed","unavailable","partial"],decodeRequest:Sp(6),decodeResult:Sp(7)},{operation:"affected",operationId:"operation.application.affected",transport:{kind:"mcp_tool",toolName:"tracedecay_affected"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.affected.v1",requestSchema:{schemaId:"schema.application.primitive.affected.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.affected.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(8),decodeResult:Sp(9)},{operation:"application_affected_tests",operationId:"operation.application.affected_tests",transport:{kind:"http",route:"/application/tests/affected",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.affected_tests.v1",requestSchema:{schemaId:"schema.application.feedback.affected-tests.request",revision:1},resultSchema:{schemaId:"schema.application.feedback.affected-tests.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:15e3},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(10),decodeResult:Sp(11),decodeSuccess:e=>mE(e,"binding.http.affected_tests.v1","schema.application.feedback.affected-tests.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(11))},{operation:"analytics",operationId:"operation.application.analytics",transport:{kind:"mcp_tool",toolName:"tracedecay_analytics"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.analytics.v1",requestSchema:{schemaId:"schema.application.primitive.analytics.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.analytics.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(12),decodeResult:Sp(13)},{operation:"apply_native_integration",operationId:"operation.application.apply_native_integration",transport:{kind:"mcp_tool",toolName:"tracedecay_apply_native_integration"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.apply_native_integration.v1",requestSchema:{schemaId:"schema.application.native-integration.apply.request",revision:1},resultSchema:{schemaId:"schema.application.native-integration.apply.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:Sp(14),decodeResult:Sp(15)},{operation:"approve_native_integration",operationId:"operation.application.approve_native_integration",transport:{kind:"mcp_tool",toolName:"tracedecay_approve_native_integration"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.approve_native_integration.v1",requestSchema:{schemaId:"schema.application.native-integration.approve.request",revision:1},resultSchema:{schemaId:"schema.application.native-integration.approve.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:Sp(16),decodeResult:Sp(15)},{operation:"ast_grep_rewrite",operationId:"operation.application.ast_grep_rewrite",transport:{kind:"mcp_tool",toolName:"tracedecay_ast_grep_rewrite"},effect:"source_edit",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.ast_grep_rewrite.v1",requestSchema:{schemaId:"schema.application.source-edit.ast-grep-rewrite.request",revision:1},resultSchema:{schemaId:"schema.application.source-edit.ast-grep-rewrite.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:Sp(17),decodeResult:Sp(18)},{operation:"ast_grep_search",operationId:"operation.application.ast_grep_search",transport:{kind:"mcp_tool",toolName:"tracedecay_ast_grep_search"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.ast_grep_search.v1",requestSchema:{schemaId:"schema.application.primitive.ast-grep-search.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.ast-grep-search.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(19),decodeResult:Sp(20)},{operation:"automation_run_artifact_view",operationId:"operation.application.automation_run_artifact_view",transport:{kind:"mcp_tool",toolName:"tracedecay_automation_run_artifact_view"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.automation_run_artifact_view.v1",requestSchema:{schemaId:"schema.application.primitive.automation-run-artifact-view.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.automation-run-artifact-view.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(21),decodeResult:Sp(22)},{operation:"automation_run_list",operationId:"operation.application.automation_run_list",transport:{kind:"mcp_tool",toolName:"tracedecay_automation_run_list"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.automation_run_list.v1",requestSchema:{schemaId:"schema.application.primitive.automation-run-list.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.automation-run-list.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(23),decodeResult:Sp(24)},{operation:"automation_run_view",operationId:"operation.application.automation_run_view",transport:{kind:"mcp_tool",toolName:"tracedecay_automation_run_view"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.automation_run_view.v1",requestSchema:{schemaId:"schema.application.primitive.automation-run-view.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.automation-run-view.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(25),decodeResult:Sp(26)},{operation:"branch_diff",operationId:"operation.application.branch_diff",transport:{kind:"mcp_tool",toolName:"tracedecay_branch_diff"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.branch_diff.v1",requestSchema:{schemaId:"schema.application.primitive.branch-diff.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.branch-diff.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(27),decodeResult:Sp(28)},{operation:"branch_list",operationId:"operation.application.branch_list",transport:{kind:"mcp_tool",toolName:"tracedecay_branch_list"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.branch_list.v1",requestSchema:{schemaId:"schema.application.primitive.branch-list.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.branch-list.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(29),decodeResult:Sp(30)},{operation:"branch_search",operationId:"operation.application.branch_search",transport:{kind:"mcp_tool",toolName:"tracedecay_branch_search"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.branch_search.v1",requestSchema:{schemaId:"schema.application.primitive.branch-search.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.branch-search.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(31),decodeResult:Sp(32)},{operation:"by_qualified_name",operationId:"operation.application.by_qualified_name",transport:{kind:"mcp_tool",toolName:"tracedecay_by_qualified_name"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.by_qualified_name.v1",requestSchema:{schemaId:"schema.application.primitive.by-qualified-name.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.by-qualified-name.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(33),decodeResult:Sp(34)},{operation:"application_call_chain",operationId:"operation.application.call_chain",transport:{kind:"http",route:"/application/primitives/call_chain",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.call_chain.v1",requestSchema:{schemaId:"schema.application.primitive.call-chain.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.call-chain.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(35),decodeResult:Sp(36),decodeSuccess:e=>mE(e,"binding.http.call_chain.v1","schema.application.primitive.call-chain.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(36))},{operation:"cancel_native_integration",operationId:"operation.application.cancel_native_integration",transport:{kind:"mcp_tool",toolName:"tracedecay_cancel_native_integration"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.cancel_native_integration.v1",requestSchema:{schemaId:"schema.application.native-integration.cancel.request",revision:1},resultSchema:{schemaId:"schema.application.native-integration.cancel.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:Sp(37),decodeResult:Sp(15)},{operation:"changelog",operationId:"operation.application.changelog",transport:{kind:"mcp_tool",toolName:"tracedecay_changelog"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.changelog.v1",requestSchema:{schemaId:"schema.application.primitive.changelog.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.changelog.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(38),decodeResult:Sp(39)},{operation:"circular",operationId:"operation.application.circular",transport:{kind:"mcp_tool",toolName:"tracedecay_circular"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.circular.v1",requestSchema:{schemaId:"schema.application.primitive.circular.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.circular.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(40),decodeResult:Sp(41)},{operation:"code_callees",operationId:"operation.application.code_callees",transport:{kind:"http",route:"/application/code/code_callees",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.code_callees.v1",requestSchema:{schemaId:"schema.application.code-query.callees.request",revision:1},resultSchema:{schemaId:"schema.application.code-query.callees.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(42),decodeResult:Sp(43),decodeSuccess:e=>mE(e,"binding.http.code_callees.v1","schema.application.code-query.callees.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(43))},{operation:"code_callers",operationId:"operation.application.code_callers",transport:{kind:"http",route:"/application/code/code_callers",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.code_callers.v1",requestSchema:{schemaId:"schema.application.primitive.code-callers.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.code-callers.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(44),decodeResult:Sp(45),decodeSuccess:e=>mE(e,"binding.http.code_callers.v1","schema.application.primitive.code-callers.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(45))},{operation:"code_declaration",operationId:"operation.application.code_declaration",transport:{kind:"http",route:"/application/code/code_declaration",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.code_declaration.v1",requestSchema:{schemaId:"schema.application.code-query.declaration.request",revision:1},resultSchema:{schemaId:"schema.application.code-query.declaration.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(46),decodeResult:Sp(47),decodeSuccess:e=>mE(e,"binding.http.code_declaration.v1","schema.application.code-query.declaration.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(47))},{operation:"code_exact_occurrence",operationId:"operation.application.code_exact_occurrence",transport:{kind:"http",route:"/application/code/code_exact_occurrence",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.code_exact_occurrence.v1",requestSchema:{schemaId:"schema.application.code-query.exact-occurrence.request",revision:1},resultSchema:{schemaId:"schema.application.code-query.exact-occurrence.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(48),decodeResult:Sp(49),decodeSuccess:e=>mE(e,"binding.http.code_exact_occurrence.v1","schema.application.code-query.exact-occurrence.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(49))},{operation:"code_facets",operationId:"operation.application.code_facets",transport:{kind:"http",route:"/application/code/code_facets",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.code_facets.v1",requestSchema:{schemaId:"schema.application.code-query.facets.request",revision:1},resultSchema:{schemaId:"schema.application.code-query.facets.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(50),decodeResult:Sp(51),decodeSuccess:e=>mE(e,"binding.http.code_facets.v1","schema.application.code-query.facets.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(51))},{operation:"code_implementations",operationId:"operation.application.code_implementations",transport:{kind:"http",route:"/application/code/code_implementations",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.code_implementations.v1",requestSchema:{schemaId:"schema.application.primitive.code-implementations.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.code-implementations.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(52),decodeResult:Sp(53),decodeSuccess:e=>mE(e,"binding.http.code_implementations.v1","schema.application.primitive.code-implementations.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(53))},{operation:"code_phrase_search",operationId:"operation.application.code_phrase_search",transport:{kind:"http",route:"/application/code/code_phrase_search",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.code_phrase_search.v1",requestSchema:{schemaId:"schema.application.code-query.phrase-search.request",revision:1},resultSchema:{schemaId:"schema.application.code-query.phrase-search.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(54),decodeResult:Sp(55),decodeSuccess:e=>mE(e,"binding.http.code_phrase_search.v1","schema.application.code-query.phrase-search.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(55))},{operation:"code_references",operationId:"operation.application.code_references",transport:{kind:"http",route:"/application/code/code_references",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.code_references.v1",requestSchema:{schemaId:"schema.application.code-query.references.request",revision:1},resultSchema:{schemaId:"schema.application.code-query.references.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(46),decodeResult:Sp(43),decodeSuccess:e=>mE(e,"binding.http.code_references.v1","schema.application.code-query.references.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(43))},{operation:"code_signature_search",operationId:"operation.application.code_signature_search",transport:{kind:"http",route:"/application/code/code_signature_search",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.code_signature_search.v1",requestSchema:{schemaId:"schema.application.primitive.code-signature-search.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.code-signature-search.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(56),decodeResult:Sp(57),decodeSuccess:e=>mE(e,"binding.http.code_signature_search.v1","schema.application.primitive.code-signature-search.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(57))},{operation:"code_symbol_search",operationId:"operation.application.code_symbol_search",transport:{kind:"http",route:"/application/code/code_symbol_search",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.code_symbol_search.v1",requestSchema:{schemaId:"schema.application.symbol-search.request",revision:1},resultSchema:{schemaId:"schema.application.symbol-search.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(58),decodeResult:Sp(57),decodeSuccess:e=>mE(e,"binding.http.code_symbol_search.v1","schema.application.symbol-search.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(57))},{operation:"code_timeline",operationId:"operation.application.code_timeline",transport:{kind:"http",route:"/application/code/code_timeline",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.code_timeline.v1",requestSchema:{schemaId:"schema.application.code-query.timeline.request",revision:1},resultSchema:{schemaId:"schema.application.code-query.timeline.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(59),decodeResult:Sp(60),decodeSuccess:e=>mE(e,"binding.http.code_timeline.v1","schema.application.code-query.timeline.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(60))},{operation:"code_type_definition",operationId:"operation.application.code_type_definition",transport:{kind:"http",route:"/application/code/code_type_definition",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.code_type_definition.v1",requestSchema:{schemaId:"schema.application.code-query.type-definition.request",revision:1},resultSchema:{schemaId:"schema.application.code-query.type-definition.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(46),decodeResult:Sp(47),decodeSuccess:e=>mE(e,"binding.http.code_type_definition.v1","schema.application.code-query.type-definition.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(47))},{operation:"code_type_hierarchy",operationId:"operation.application.code_type_hierarchy",transport:{kind:"http",route:"/application/code/code_type_hierarchy",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.code_type_hierarchy.v1",requestSchema:{schemaId:"schema.application.primitive.code-type-hierarchy.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.code-type-hierarchy.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(61),decodeResult:Sp(62),decodeSuccess:e=>mE(e,"binding.http.code_type_hierarchy.v1","schema.application.primitive.code-type-hierarchy.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(62))},{operation:"commit_context",operationId:"operation.application.commit_context",transport:{kind:"mcp_tool",toolName:"tracedecay_commit_context"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.commit_context.v1",requestSchema:{schemaId:"schema.application.primitive.commit-context.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.commit-context.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(63),decodeResult:Sp(64)},{operation:"complexity",operationId:"operation.application.complexity",transport:{kind:"mcp_tool",toolName:"tracedecay_complexity"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.complexity.v1",requestSchema:{schemaId:"schema.application.primitive.complexity.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.complexity.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(65),decodeResult:Sp(66)},{operation:"config",operationId:"operation.application.config",transport:{kind:"mcp_tool",toolName:"tracedecay_config"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.config.v1",requestSchema:{schemaId:"schema.application.primitive.config.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.config.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(67),decodeResult:Sp(68)},{operation:"application_configuration_audit",operationId:"operation.application.configuration_audit",transport:{kind:"http",route:"/application/configuration/configuration_audit",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.configuration_audit.v1",requestSchema:{schemaId:"schema.application.configuration.configuration_audit.request",revision:1},resultSchema:{schemaId:"schema.application.configuration.configuration_audit.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:15e3},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:Sp(69),decodeResult:Sp(70),decodeSuccess:e=>mE(e,"binding.http.configuration_audit.v1","schema.application.configuration.configuration_audit.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(70))},{operation:"application_configuration_batch",operationId:"operation.application.configuration_batch",transport:{kind:"http",route:"/application/configuration/configuration_batch",method:"POST"},effect:"configuration_write",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.configuration_batch.v1",requestSchema:{schemaId:"schema.application.configuration.configuration_batch.request",revision:1},resultSchema:{schemaId:"schema.application.configuration.configuration_batch.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_effect_receipt",maximum_millis:15e3},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","timed_out","failed","effect_unknown","partial"],decodeRequest:Sp(71),decodeResult:Sp(72),decodeSuccess:e=>mE(e,"binding.http.configuration_batch.v1","schema.application.configuration.configuration_batch.result",1,["completed","timed_out","failed","effect_unknown","partial"],{mode:"not_cancellable"},"durable_effect","required",Sp(72))},{operation:"application_configuration_get",operationId:"operation.application.configuration_get",transport:{kind:"http",route:"/application/configuration/configuration_get",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.configuration_get.v1",requestSchema:{schemaId:"schema.application.configuration.configuration_get.request",revision:1},resultSchema:{schemaId:"schema.application.configuration.configuration_get.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:15e3},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:Sp(73),decodeResult:Sp(74),decodeSuccess:e=>mE(e,"binding.http.configuration_get.v1","schema.application.configuration.configuration_get.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(74))},{operation:"application_configuration_list",operationId:"operation.application.configuration_list",transport:{kind:"http",route:"/application/configuration/configuration_list",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.configuration_list.v1",requestSchema:{schemaId:"schema.application.configuration.configuration_list.request",revision:1},resultSchema:{schemaId:"schema.application.configuration.configuration_list.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:15e3},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:Sp(75),decodeResult:Sp(76),decodeSuccess:e=>mE(e,"binding.http.configuration_list.v1","schema.application.configuration.configuration_list.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(76))},{operation:"application_configuration_observed_state",operationId:"operation.application.configuration_observed_state",transport:{kind:"http",route:"/application/configuration/configuration_observed_state",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.configuration_observed_state.v1",requestSchema:{schemaId:"schema.application.configuration.configuration_observed_state.request",revision:1},resultSchema:{schemaId:"schema.application.configuration.configuration_observed_state.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:15e3},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:Sp(77),decodeResult:Sp(78),decodeSuccess:e=>mE(e,"binding.http.configuration_observed_state.v1","schema.application.configuration.configuration_observed_state.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(78))},{operation:"application_configuration_protected_apply",operationId:"operation.application.configuration_protected_apply",transport:{kind:"http",route:"/application/configuration/configuration_protected_apply",method:"POST"},effect:"configuration_write",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.configuration_protected_apply.v1",requestSchema:{schemaId:"schema.application.configuration.configuration_protected_apply.request",revision:1},resultSchema:{schemaId:"schema.application.configuration.configuration_protected_apply.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_effect_receipt",maximum_millis:15e3},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","timed_out","failed","effect_unknown","partial"],decodeRequest:Sp(79),decodeResult:Sp(72),decodeSuccess:e=>mE(e,"binding.http.configuration_protected_apply.v1","schema.application.configuration.configuration_protected_apply.result",1,["completed","timed_out","failed","effect_unknown","partial"],{mode:"not_cancellable"},"durable_effect","required",Sp(72))},{operation:"application_configuration_protected_preview",operationId:"operation.application.configuration_protected_preview",transport:{kind:"http",route:"/application/configuration/configuration_protected_preview",method:"POST"},effect:"preview",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.configuration_protected_preview.v1",requestSchema:{schemaId:"schema.application.configuration.configuration_protected_preview.request",revision:1},resultSchema:{schemaId:"schema.application.configuration.configuration_protected_preview.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:15e3},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:Sp(80),decodeResult:Sp(81),decodeSuccess:e=>mE(e,"binding.http.configuration_protected_preview.v1","schema.application.configuration.configuration_protected_preview.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(81))},{operation:"application_configuration_rollback_apply",operationId:"operation.application.configuration_rollback_apply",transport:{kind:"http",route:"/application/configuration/configuration_rollback_apply",method:"POST"},effect:"configuration_write",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.configuration_rollback_apply.v1",requestSchema:{schemaId:"schema.application.configuration.configuration_rollback_apply.request",revision:1},resultSchema:{schemaId:"schema.application.configuration.configuration_rollback_apply.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_effect_receipt",maximum_millis:15e3},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","timed_out","failed","effect_unknown","partial"],decodeRequest:Sp(79),decodeResult:Sp(72),decodeSuccess:e=>mE(e,"binding.http.configuration_rollback_apply.v1","schema.application.configuration.configuration_rollback_apply.result",1,["completed","timed_out","failed","effect_unknown","partial"],{mode:"not_cancellable"},"durable_effect","required",Sp(72))},{operation:"application_configuration_rollback_preview",operationId:"operation.application.configuration_rollback_preview",transport:{kind:"http",route:"/application/configuration/configuration_rollback_preview",method:"POST"},effect:"preview",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.configuration_rollback_preview.v1",requestSchema:{schemaId:"schema.application.configuration.configuration_rollback_preview.request",revision:1},resultSchema:{schemaId:"schema.application.configuration.configuration_rollback_preview.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:15e3},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:Sp(82),decodeResult:Sp(81),decodeSuccess:e=>mE(e,"binding.http.configuration_rollback_preview.v1","schema.application.configuration.configuration_rollback_preview.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(81))},{operation:"application_configuration_set",operationId:"operation.application.configuration_set",transport:{kind:"http",route:"/application/configuration/configuration_set",method:"POST"},effect:"configuration_write",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.configuration_set.v1",requestSchema:{schemaId:"schema.application.configuration.configuration_set.request",revision:1},resultSchema:{schemaId:"schema.application.configuration.configuration_set.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_effect_receipt",maximum_millis:15e3},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","timed_out","failed","effect_unknown","partial"],decodeRequest:Sp(83),decodeResult:Sp(72),decodeSuccess:e=>mE(e,"binding.http.configuration_set.v1","schema.application.configuration.configuration_set.result",1,["completed","timed_out","failed","effect_unknown","partial"],{mode:"not_cancellable"},"durable_effect","required",Sp(72))},{operation:"application_configuration_unset",operationId:"operation.application.configuration_unset",transport:{kind:"http",route:"/application/configuration/configuration_unset",method:"POST"},effect:"configuration_write",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.configuration_unset.v1",requestSchema:{schemaId:"schema.application.configuration.configuration_unset.request",revision:1},resultSchema:{schemaId:"schema.application.configuration.configuration_unset.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_effect_receipt",maximum_millis:15e3},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","timed_out","failed","effect_unknown","partial"],decodeRequest:Sp(84),decodeResult:Sp(72),decodeSuccess:e=>mE(e,"binding.http.configuration_unset.v1","schema.application.configuration.configuration_unset.result",1,["completed","timed_out","failed","effect_unknown","partial"],{mode:"not_cancellable"},"durable_effect","required",Sp(72))},{operation:"constructors",operationId:"operation.application.constructors",transport:{kind:"mcp_tool",toolName:"tracedecay_constructors"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.constructors.v1",requestSchema:{schemaId:"schema.application.primitive.constructors.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.constructors.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(85),decodeResult:Sp(86)},{operation:"context",operationId:"operation.application.context",transport:{kind:"mcp_tool",toolName:"tracedecay_context"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.context.v1",requestSchema:{schemaId:"schema.application.primitive.context.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.context.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(87),decodeResult:Sp(88)},{operation:"application_context_scout_budget",operationId:"operation.application.context_scout_budget",transport:{kind:"http",route:"/application/context-scout/context_scout_budget",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.context_scout_budget.v1",requestSchema:{schemaId:"schema.application.context-scout-budget.request",revision:1},resultSchema:{schemaId:"schema.application.context-scout-budget.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:15e3},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:Sp(89),decodeResult:Sp(90),decodeSuccess:e=>mE(e,"binding.http.context_scout_budget.v1","schema.application.context-scout-budget.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(90))},{operation:"application_context_scout_cancel",operationId:"operation.application.context_scout_cancel",transport:{kind:"http",route:"/application/context-scout/context_scout_cancel",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.context_scout_cancel.v1",requestSchema:{schemaId:"schema.application.context-scout-cancel.request",revision:1},resultSchema:{schemaId:"schema.application.context-scout-cancel.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_effect_receipt",maximum_millis:15e3},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","timed_out","failed","effect_unknown","partial"],decodeRequest:Sp(91),decodeResult:Sp(92),decodeSuccess:e=>mE(e,"binding.http.context_scout_cancel.v1","schema.application.context-scout-cancel.result",1,["completed","timed_out","failed","effect_unknown","partial"],{mode:"not_cancellable"},"durable_effect","required",Sp(92))},{operation:"application_context_scout_capability",operationId:"operation.application.context_scout_capability",transport:{kind:"http",route:"/application/context-scout/context_scout_capability",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.context_scout_capability.v1",requestSchema:{schemaId:"schema.application.context-scout-capability.request",revision:1},resultSchema:{schemaId:"schema.application.context-scout-capability.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:15e3},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:Sp(89),decodeResult:Sp(93),decodeSuccess:e=>mE(e,"binding.http.context_scout_capability.v1","schema.application.context-scout-capability.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(93))},{operation:"application_context_scout_claim",operationId:"operation.application.context_scout_claim",transport:{kind:"http",route:"/application/context-scout/context_scout_claim",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.context_scout_claim.v1",requestSchema:{schemaId:"schema.application.context-scout-claim.request",revision:1},resultSchema:{schemaId:"schema.application.context-scout-claim.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_effect_receipt",maximum_millis:15e3},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","timed_out","failed","effect_unknown","partial"],decodeRequest:Sp(94),decodeResult:Sp(95),decodeSuccess:e=>mE(e,"binding.http.context_scout_claim.v1","schema.application.context-scout-claim.result",1,["completed","timed_out","failed","effect_unknown","partial"],{mode:"not_cancellable"},"durable_effect","required",Sp(95))},{operation:"application_context_scout_delivery",operationId:"operation.application.context_scout_delivery",transport:{kind:"http",route:"/application/context-scout/context_scout_delivery",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.context_scout_delivery.v1",requestSchema:{schemaId:"schema.application.context-scout-delivery.request",revision:1},resultSchema:{schemaId:"schema.application.context-scout-delivery.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_effect_receipt",maximum_millis:15e3},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","timed_out","failed","effect_unknown","partial"],decodeRequest:Sp(96),decodeResult:Sp(97),decodeSuccess:e=>mE(e,"binding.http.context_scout_delivery.v1","schema.application.context-scout-delivery.result",1,["completed","timed_out","failed","effect_unknown","partial"],{mode:"not_cancellable"},"durable_effect","required",Sp(97))},{operation:"application_context_scout_explain",operationId:"operation.application.context_scout_explain",transport:{kind:"http",route:"/application/context-scout/context_scout_explain",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.context_scout_explain.v1",requestSchema:{schemaId:"schema.application.context-scout-explain.request",revision:1},resultSchema:{schemaId:"schema.application.context-scout-explain.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:15e3},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:Sp(98),decodeResult:Sp(99),decodeSuccess:e=>mE(e,"binding.http.context_scout_explain.v1","schema.application.context-scout-explain.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(99))},{operation:"application_context_scout_feedback",operationId:"operation.application.context_scout_feedback",transport:{kind:"http",route:"/application/context-scout/context_scout_feedback",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.context_scout_feedback.v1",requestSchema:{schemaId:"schema.application.context-scout-feedback.request",revision:1},resultSchema:{schemaId:"schema.application.context-scout-feedback.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_effect_receipt",maximum_millis:15e3},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","timed_out","failed","effect_unknown","partial"],decodeRequest:Sp(100),decodeResult:Sp(92),decodeSuccess:e=>mE(e,"binding.http.context_scout_feedback.v1","schema.application.context-scout-feedback.result",1,["completed","timed_out","failed","effect_unknown","partial"],{mode:"not_cancellable"},"durable_effect","required",Sp(92))},{operation:"application_context_scout_pause",operationId:"operation.application.context_scout_pause",transport:{kind:"http",route:"/application/context-scout/context_scout_pause",method:"POST"},effect:"configuration_write",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.context_scout_pause.v1",requestSchema:{schemaId:"schema.application.context-scout-pause.request",revision:1},resultSchema:{schemaId:"schema.application.context-scout-pause.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_effect_receipt",maximum_millis:15e3},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","timed_out","failed","effect_unknown","partial"],decodeRequest:Sp(101),decodeResult:Sp(72),decodeSuccess:e=>mE(e,"binding.http.context_scout_pause.v1","schema.application.context-scout-pause.result",1,["completed","timed_out","failed","effect_unknown","partial"],{mode:"not_cancellable"},"durable_effect","required",Sp(72))},{operation:"application_context_scout_recent",operationId:"operation.application.context_scout_recent",transport:{kind:"http",route:"/application/context-scout/context_scout_recent",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.context_scout_recent.v1",requestSchema:{schemaId:"schema.application.context-scout-recent.request",revision:1},resultSchema:{schemaId:"schema.application.context-scout-recent.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:15e3},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:Sp(98),decodeResult:Sp(102),decodeSuccess:e=>mE(e,"binding.http.context_scout_recent.v1","schema.application.context-scout-recent.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(102))},{operation:"application_context_scout_resume",operationId:"operation.application.context_scout_resume",transport:{kind:"http",route:"/application/context-scout/context_scout_resume",method:"POST"},effect:"configuration_write",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.context_scout_resume.v1",requestSchema:{schemaId:"schema.application.context-scout-resume.request",revision:1},resultSchema:{schemaId:"schema.application.context-scout-resume.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_effect_receipt",maximum_millis:15e3},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","timed_out","failed","effect_unknown","partial"],decodeRequest:Sp(101),decodeResult:Sp(72),decodeSuccess:e=>mE(e,"binding.http.context_scout_resume.v1","schema.application.context-scout-resume.result",1,["completed","timed_out","failed","effect_unknown","partial"],{mode:"not_cancellable"},"durable_effect","required",Sp(72))},{operation:"application_context_scout_status",operationId:"operation.application.context_scout_status",transport:{kind:"http",route:"/application/context-scout/context_scout_status",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.context_scout_status.v1",requestSchema:{schemaId:"schema.application.context-scout-status.request",revision:1},resultSchema:{schemaId:"schema.application.context-scout-status.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:15e3},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:Sp(89),decodeResult:Sp(103),decodeSuccess:e=>mE(e,"binding.http.context_scout_status.v1","schema.application.context-scout-status.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(103))},{operation:"coupling",operationId:"operation.application.coupling",transport:{kind:"mcp_tool",toolName:"tracedecay_coupling"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.coupling.v1",requestSchema:{schemaId:"schema.application.primitive.coupling.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.coupling.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(104),decodeResult:Sp(105)},{operation:"dashboard",operationId:"operation.application.dashboard",transport:{kind:"mcp_tool",toolName:"tracedecay_dashboard"},effect:"binds_server",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.dashboard.v1",requestSchema:{schemaId:"schema.application.primitive.dashboard.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.dashboard.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","timed_out","failed","unavailable","partial"],decodeRequest:Sp(106),decodeResult:Sp(107)},{operation:"dead_code",operationId:"operation.application.dead_code",transport:{kind:"mcp_tool",toolName:"tracedecay_dead_code"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.dead_code.v1",requestSchema:{schemaId:"schema.application.primitive.dead-code.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.dead-code.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(108),decodeResult:Sp(109)},{operation:"dependency_depth",operationId:"operation.application.dependency_depth",transport:{kind:"mcp_tool",toolName:"tracedecay_dependency_depth"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.dependency_depth.v1",requestSchema:{schemaId:"schema.application.primitive.dependency-depth.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.dependency-depth.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(110),decodeResult:Sp(111)},{operation:"derives",operationId:"operation.application.derives",transport:{kind:"mcp_tool",toolName:"tracedecay_derives"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.derives.v1",requestSchema:{schemaId:"schema.application.primitive.derives.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.derives.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(112),decodeResult:Sp(113)},{operation:"diagnose",operationId:"operation.application.diagnose",transport:{kind:"mcp_tool",toolName:"tracedecay_diagnose"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.diagnose.v1",requestSchema:{schemaId:"schema.application.primitive.diagnose.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.diagnose.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(114),decodeResult:Sp(115)},{operation:"application_diagnostics_read",operationId:"operation.application.diagnostics_read",transport:{kind:"http",route:"/application/primitives/diagnostics_read",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.diagnostics_read.v1",requestSchema:{schemaId:"schema.application.primitive.diagnostics-read.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.diagnostics-read.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(116),decodeResult:Sp(117),decodeSuccess:e=>mE(e,"binding.http.diagnostics_read.v1","schema.application.primitive.diagnostics-read.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(117))},{operation:"diff_context",operationId:"operation.application.diff_context",transport:{kind:"mcp_tool",toolName:"tracedecay_diff_context"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.diff_context.v1",requestSchema:{schemaId:"schema.application.primitive.diff-context.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.diff-context.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(118),decodeResult:Sp(119)},{operation:"distribution",operationId:"operation.application.distribution",transport:{kind:"mcp_tool",toolName:"tracedecay_distribution"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.distribution.v1",requestSchema:{schemaId:"schema.application.primitive.distribution.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.distribution.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(120),decodeResult:Sp(121)},{operation:"doc_coverage",operationId:"operation.application.doc_coverage",transport:{kind:"mcp_tool",toolName:"tracedecay_doc_coverage"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.doc_coverage.v1",requestSchema:{schemaId:"schema.application.primitive.doc-coverage.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.doc-coverage.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(122),decodeResult:Sp(123)},{operation:"dsm",operationId:"operation.application.dsm",transport:{kind:"mcp_tool",toolName:"tracedecay_dsm"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.dsm.v1",requestSchema:{schemaId:"schema.application.primitive.dsm.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.dsm.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(124),decodeResult:Sp(125)},{operation:"application_fact_feedback",operationId:"operation.application.fact_feedback",transport:{kind:"http",route:"/application/retained/fact_feedback",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.fact_feedback.v1",requestSchema:{schemaId:"schema.application.retained.fact-feedback.request",revision:1},resultSchema:{schemaId:"schema.application.retained.fact-feedback.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","reconciling","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","unavailable","effect_unknown","partial"],decodeRequest:Sp(126),decodeResult:Sp(127),decodeSuccess:e=>mE(e,"binding.http.fact_feedback.v1","schema.application.retained.fact-feedback.result",1,["completed","cancelled","timed_out","failed","unavailable","effect_unknown","partial"],{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","reconciling","after_commit"]},"durable_effect","required",Sp(127))},{operation:"application_fact_store_add",operationId:"operation.application.fact_store_add",transport:{kind:"http",route:"/application/retained/fact_store_add",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.fact_store_add.v1",requestSchema:{schemaId:"schema.application.retained.fact-store-add.request",revision:1},resultSchema:{schemaId:"schema.application.retained.fact-store-add.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","reconciling","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","unavailable","effect_unknown","partial"],decodeRequest:Sp(128),decodeResult:Sp(129),decodeSuccess:e=>mE(e,"binding.http.fact_store_add.v1","schema.application.retained.fact-store-add.result",1,["completed","cancelled","timed_out","failed","unavailable","effect_unknown","partial"],{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","reconciling","after_commit"]},"durable_effect","required",Sp(129))},{operation:"application_fact_store_contradict",operationId:"operation.application.fact_store_contradict",transport:{kind:"http",route:"/application/retained/fact_store_contradict",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.fact_store_contradict.v1",requestSchema:{schemaId:"schema.application.retained.fact-store-contradict.request",revision:1},resultSchema:{schemaId:"schema.application.retained.fact-store-contradict.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(130),decodeResult:Sp(131),decodeSuccess:e=>mE(e,"binding.http.fact_store_contradict.v1","schema.application.retained.fact-store-contradict.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(131))},{operation:"application_fact_store_curate",operationId:"operation.application.fact_store_curate",transport:{kind:"http",route:"/application/retained/fact_store_curate",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"required",resultSemantics:"fact_store_curate_receipt",bindingId:"binding.http.fact_store_curate.v1",requestSchema:{schemaId:"schema.application.retained.fact-store-curate.request",revision:1},resultSchema:{schemaId:"schema.application.retained.fact-store-curate.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","reconciling","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:9e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","unavailable","effect_unknown","partial"],decodeRequest:Sp(132),decodeResult:Sp(133),decodeSuccess:e=>mE(e,"binding.http.fact_store_curate.v1","schema.application.retained.fact-store-curate.result",1,["completed","cancelled","timed_out","failed","unavailable","effect_unknown","partial"],{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","reconciling","after_commit"]},"durable_effect","required",Sp(133))},{operation:"application_fact_store_get",operationId:"operation.application.fact_store_get",transport:{kind:"http",route:"/application/retained/fact_store_get",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.fact_store_get.v1",requestSchema:{schemaId:"schema.application.retained.fact-store-get.request",revision:1},resultSchema:{schemaId:"schema.application.retained.fact-store-get.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(134),decodeResult:Sp(135),decodeSuccess:e=>mE(e,"binding.http.fact_store_get.v1","schema.application.retained.fact-store-get.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(135))},{operation:"application_fact_store_list",operationId:"operation.application.fact_store_list",transport:{kind:"http",route:"/application/retained/fact_store_list",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.fact_store_list.v1",requestSchema:{schemaId:"schema.application.retained.fact-store-list.request",revision:1},resultSchema:{schemaId:"schema.application.retained.fact-store-list.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(136),decodeResult:Sp(137),decodeSuccess:e=>mE(e,"binding.http.fact_store_list.v1","schema.application.retained.fact-store-list.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(137))},{operation:"application_fact_store_probe",operationId:"operation.application.fact_store_probe",transport:{kind:"http",route:"/application/retained/fact_store_probe",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.fact_store_probe.v1",requestSchema:{schemaId:"schema.application.retained.fact-store-probe.request",revision:1},resultSchema:{schemaId:"schema.application.retained.fact-store-probe.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(138),decodeResult:Sp(139),decodeSuccess:e=>mE(e,"binding.http.fact_store_probe.v1","schema.application.retained.fact-store-probe.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(139))},{operation:"application_fact_store_reason",operationId:"operation.application.fact_store_reason",transport:{kind:"http",route:"/application/retained/fact_store_reason",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.fact_store_reason.v1",requestSchema:{schemaId:"schema.application.retained.fact-store-reason.request",revision:1},resultSchema:{schemaId:"schema.application.retained.fact-store-reason.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(140),decodeResult:Sp(141),decodeSuccess:e=>mE(e,"binding.http.fact_store_reason.v1","schema.application.retained.fact-store-reason.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(141))},{operation:"application_fact_store_related",operationId:"operation.application.fact_store_related",transport:{kind:"http",route:"/application/retained/fact_store_related",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.fact_store_related.v1",requestSchema:{schemaId:"schema.application.retained.fact-store-related.request",revision:1},resultSchema:{schemaId:"schema.application.retained.fact-store-related.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(142),decodeResult:Sp(143),decodeSuccess:e=>mE(e,"binding.http.fact_store_related.v1","schema.application.retained.fact-store-related.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(143))},{operation:"application_fact_store_remove",operationId:"operation.application.fact_store_remove",transport:{kind:"http",route:"/application/retained/fact_store_remove",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.fact_store_remove.v1",requestSchema:{schemaId:"schema.application.retained.fact-store-remove.request",revision:1},resultSchema:{schemaId:"schema.application.retained.fact-store-remove.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","reconciling","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","unavailable","effect_unknown","partial"],decodeRequest:Sp(144),decodeResult:Sp(145),decodeSuccess:e=>mE(e,"binding.http.fact_store_remove.v1","schema.application.retained.fact-store-remove.result",1,["completed","cancelled","timed_out","failed","unavailable","effect_unknown","partial"],{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","reconciling","after_commit"]},"durable_effect","required",Sp(145))},{operation:"application_fact_store_search",operationId:"operation.application.fact_store_search",transport:{kind:"http",route:"/application/retained/fact_store_search",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.fact_store_search.v1",requestSchema:{schemaId:"schema.application.retained.fact-store-search.request",revision:1},resultSchema:{schemaId:"schema.application.retained.fact-store-search.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(146),decodeResult:Sp(147),decodeSuccess:e=>mE(e,"binding.http.fact_store_search.v1","schema.application.retained.fact-store-search.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(147))},{operation:"application_fact_store_supersede",operationId:"operation.application.fact_store_supersede",transport:{kind:"http",route:"/application/retained/fact_store_supersede",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.fact_store_supersede.v1",requestSchema:{schemaId:"schema.application.retained.fact-store-supersede.request",revision:1},resultSchema:{schemaId:"schema.application.retained.fact-store-supersede.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","reconciling","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","unavailable","effect_unknown","partial"],decodeRequest:Sp(148),decodeResult:Sp(149),decodeSuccess:e=>mE(e,"binding.http.fact_store_supersede.v1","schema.application.retained.fact-store-supersede.result",1,["completed","cancelled","timed_out","failed","unavailable","effect_unknown","partial"],{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","reconciling","after_commit"]},"durable_effect","required",Sp(149))},{operation:"application_fact_store_update",operationId:"operation.application.fact_store_update",transport:{kind:"http",route:"/application/retained/fact_store_update",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.fact_store_update.v1",requestSchema:{schemaId:"schema.application.retained.fact-store-update.request",revision:1},resultSchema:{schemaId:"schema.application.retained.fact-store-update.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","reconciling","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","unavailable","effect_unknown","partial"],decodeRequest:Sp(150),decodeResult:Sp(151),decodeSuccess:e=>mE(e,"binding.http.fact_store_update.v1","schema.application.retained.fact-store-update.result",1,["completed","cancelled","timed_out","failed","unavailable","effect_unknown","partial"],{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","reconciling","after_commit"]},"durable_effect","required",Sp(151))},{operation:"application_feedback_advisory_cycle",operationId:"operation.application.feedback_advisory_cycle",transport:{kind:"http",route:"/application/feedback/advisory_cycle",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.feedback_advisory_cycle.v1",requestSchema:{schemaId:"schema.application.feedback.advisory-cycle.request",revision:1},resultSchema:{schemaId:"schema.application.feedback.advisory-cycle.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:15e3},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(152),decodeResult:Sp(153),decodeSuccess:e=>mE(e,"binding.http.feedback_advisory_cycle.v1","schema.application.feedback.advisory-cycle.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(153))},{operation:"application_feedback_diagnostics",operationId:"operation.application.feedback_diagnostics",transport:{kind:"http",route:"/application/feedback/diagnostics",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.feedback_diagnostics.v1",requestSchema:{schemaId:"schema.application.feedback.diagnostics.request",revision:1},resultSchema:{schemaId:"schema.application.feedback.diagnostics.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:15e3},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(10),decodeResult:Sp(154),decodeSuccess:e=>mE(e,"binding.http.feedback_diagnostics.v1","schema.application.feedback.diagnostics.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(154))},{operation:"application_feedback_expand",operationId:"operation.application.feedback_expand",transport:{kind:"http",route:"/application/feedback/expand",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.feedback_expand.v1",requestSchema:{schemaId:"schema.application.feedback.expand.request",revision:1},resultSchema:{schemaId:"schema.application.feedback.expand.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:15e3},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(10),decodeResult:Sp(155),decodeSuccess:e=>mE(e,"binding.http.feedback_expand.v1","schema.application.feedback.expand.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(155))},{operation:"application_feedback_get",operationId:"operation.application.feedback_get",transport:{kind:"http",route:"/application/feedback/get",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.feedback_get.v1",requestSchema:{schemaId:"schema.application.feedback.get.request",revision:1},resultSchema:{schemaId:"schema.application.feedback.get.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:15e3},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(10),decodeResult:Sp(156),decodeSuccess:e=>mE(e,"binding.http.feedback_get.v1","schema.application.feedback.get.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(156))},{operation:"application_feedback_impact",operationId:"operation.application.feedback_impact",transport:{kind:"http",route:"/application/feedback/impact",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.feedback_impact.v1",requestSchema:{schemaId:"schema.application.feedback.impact.request",revision:1},resultSchema:{schemaId:"schema.application.feedback.impact.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:15e3},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(10),decodeResult:Sp(157),decodeSuccess:e=>mE(e,"binding.http.feedback_impact.v1","schema.application.feedback.impact.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(157))},{operation:"application_feedback_list",operationId:"operation.application.feedback_list",transport:{kind:"http",route:"/application/feedback/list",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.feedback_list.v1",requestSchema:{schemaId:"schema.application.feedback.list.request",revision:1},resultSchema:{schemaId:"schema.application.feedback.list.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:15e3},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(10),decodeResult:Sp(158),decodeSuccess:e=>mE(e,"binding.http.feedback_list.v1","schema.application.feedback.list.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(158))},{operation:"application_feedback_proximity",operationId:"operation.application.feedback_proximity",transport:{kind:"http",route:"/application/feedback/proximity",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.feedback_proximity.v1",requestSchema:{schemaId:"schema.application.feedback.proximity.request",revision:1},resultSchema:{schemaId:"schema.application.feedback.proximity.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:15e3},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(159),decodeResult:Sp(160),decodeSuccess:e=>mE(e,"binding.http.feedback_proximity.v1","schema.application.feedback.proximity.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(160))},{operation:"field_sites",operationId:"operation.application.field_sites",transport:{kind:"mcp_tool",toolName:"tracedecay_field_sites"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.field_sites.v1",requestSchema:{schemaId:"schema.application.primitive.field-sites.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.field-sites.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(161),decodeResult:Sp(162)},{operation:"application_file_dependents",operationId:"operation.application.file_dependents",transport:{kind:"http",route:"/application/primitives/file_dependents",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.file_dependents.v1",requestSchema:{schemaId:"schema.application.primitive.file-dependents.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.file-dependents.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(163),decodeResult:Sp(164),decodeSuccess:e=>mE(e,"binding.http.file_dependents.v1","schema.application.primitive.file-dependents.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(164))},{operation:"files",operationId:"operation.application.files",transport:{kind:"mcp_tool",toolName:"tracedecay_files"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.files.v1",requestSchema:{schemaId:"schema.application.primitive.files.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.files.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(165),decodeResult:Sp(166)},{operation:"find_exact_symbol",operationId:"operation.application.find_exact_symbol",transport:{kind:"mcp_tool",toolName:"tracedecay_find_exact_symbol"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.find_exact_symbol.v1",requestSchema:{schemaId:"schema.application.primitive.find-exact-symbol.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.find-exact-symbol.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(167),decodeResult:Sp(168)},{operation:"gini",operationId:"operation.application.gini",transport:{kind:"mcp_tool",toolName:"tracedecay_gini"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.gini.v1",requestSchema:{schemaId:"schema.application.primitive.gini.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.gini.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(169),decodeResult:Sp(170)},{operation:"git_apply",operationId:"operation.application.git_apply",transport:{kind:"mcp_tool",toolName:"tracedecay_git_apply"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.git_apply.v1",requestSchema:{schemaId:"schema.application.git.apply.request",revision:1},resultSchema:{schemaId:"schema.application.git.apply.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:Sp(171),decodeResult:Sp(172)},{operation:"application_git_blame",operationId:"operation.application.git_blame",transport:{kind:"http",route:"/application/git/blame",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.git_blame.v1",requestSchema:{schemaId:"schema.application.git.blame.request",revision:1},resultSchema:{schemaId:"schema.application.git.blame.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:Sp(173),decodeResult:Sp(174),decodeSuccess:e=>mE(e,"binding.http.git_blame.v1","schema.application.git.blame.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(174))},{operation:"application_git_diff",operationId:"operation.application.git_diff",transport:{kind:"http",route:"/application/git/diff",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.git_diff.v1",requestSchema:{schemaId:"schema.application.git.diff.request",revision:1},resultSchema:{schemaId:"schema.application.git.diff.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:Sp(175),decodeResult:Sp(174),decodeSuccess:e=>mE(e,"binding.http.git_diff.v1","schema.application.git.diff.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(174))},{operation:"application_git_history",operationId:"operation.application.git_history",transport:{kind:"http",route:"/application/git/history",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.git_history.v1",requestSchema:{schemaId:"schema.application.git.history.request",revision:1},resultSchema:{schemaId:"schema.application.git.history.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:Sp(176),decodeResult:Sp(174),decodeSuccess:e=>mE(e,"binding.http.git_history.v1","schema.application.git.history.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(174))},{operation:"application_git_hunks",operationId:"operation.application.git_hunks",transport:{kind:"http",route:"/application/git/hunks",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.git_hunks.v1",requestSchema:{schemaId:"schema.application.git.hunks.request",revision:1},resultSchema:{schemaId:"schema.application.git.hunks.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:Sp(177),decodeResult:Sp(174),decodeSuccess:e=>mE(e,"binding.http.git_hunks.v1","schema.application.git.hunks.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(174))},{operation:"git_preview",operationId:"operation.application.git_preview",transport:{kind:"mcp_tool",toolName:"tracedecay_git_preview"},effect:"preview",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.git_preview.v1",requestSchema:{schemaId:"schema.application.git.preview.request",revision:1},resultSchema:{schemaId:"schema.application.git.preview.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:Sp(178),decodeResult:Sp(179)},{operation:"application_git_status",operationId:"operation.application.git_status",transport:{kind:"http",route:"/application/git/status",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.git_status.v1",requestSchema:{schemaId:"schema.application.git.status.request",revision:1},resultSchema:{schemaId:"schema.application.git.status.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:Sp(180),decodeResult:Sp(174),decodeSuccess:e=>mE(e,"binding.http.git_status.v1","schema.application.git.status.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(174))},{operation:"application_github_stack_signal_expand",operationId:"operation.application.github_stack_signal_expand",transport:{kind:"http",route:"/application/github-stack/signal-expand",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.github_stack_signal_expand.v1",requestSchema:{schemaId:"schema.application.github-stack.signal-expand.request",revision:1},resultSchema:{schemaId:"schema.application.github-stack.signal-expand.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:Sp(181),decodeResult:Sp(182),decodeSuccess:e=>mE(e,"binding.http.github_stack_signal_expand.v1","schema.application.github-stack.signal-expand.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(182))},{operation:"god_class",operationId:"operation.application.god_class",transport:{kind:"mcp_tool",toolName:"tracedecay_god_class"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.god_class.v1",requestSchema:{schemaId:"schema.application.primitive.god-class.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.god-class.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(183),decodeResult:Sp(184)},{operation:"grep",operationId:"operation.application.grep",transport:{kind:"mcp_tool",toolName:"tracedecay_grep"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.grep.v1",requestSchema:{schemaId:"schema.application.primitive.grep.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.grep.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(185),decodeResult:Sp(186)},{operation:"health",operationId:"operation.application.health",transport:{kind:"mcp_tool",toolName:"tracedecay_health"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.health.v1",requestSchema:{schemaId:"schema.application.primitive.health.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.health.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(187),decodeResult:Sp(188)},{operation:"application_health_delta",operationId:"operation.application.health_delta",transport:{kind:"http",route:"/application/primitives/health_delta",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.health_delta.v1",requestSchema:{schemaId:"schema.application.primitive.health-delta.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.health-delta.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(189),decodeResult:Sp(190),decodeSuccess:e=>mE(e,"binding.http.health_delta.v1","schema.application.primitive.health-delta.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(190))},{operation:"application_health_read",operationId:"operation.application.health_read",transport:{kind:"http",route:"/application/primitives/health_read",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.health_read.v1",requestSchema:{schemaId:"schema.application.primitive.health-read.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.health-read.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(191),decodeResult:Sp(192),decodeSuccess:e=>mE(e,"binding.http.health_read.v1","schema.application.primitive.health-read.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(192))},{operation:"hermes_skill_bridge",operationId:"operation.application.hermes_skill_bridge",transport:{kind:"mcp_tool",toolName:"tracedecay_hermes_skill_bridge"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.hermes_skill_bridge.v1",requestSchema:{schemaId:"schema.application.primitive.hermes-skill-bridge.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.hermes-skill-bridge.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(193),decodeResult:Sp(194)},{operation:"hook_runtime",operationId:"operation.application.hook_runtime",transport:{kind:"mcp_tool",toolName:"tracedecay_hook_runtime"},effect:"records_host_evidence",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.hook_runtime.v1",requestSchema:{schemaId:"schema.application.primitive.hook-runtime.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.hook-runtime.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","timed_out","failed","unavailable","partial"],decodeRequest:Sp(195),decodeResult:Sp(196)},{operation:"hotspots",operationId:"operation.application.hotspots",transport:{kind:"mcp_tool",toolName:"tracedecay_hotspots"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.hotspots.v1",requestSchema:{schemaId:"schema.application.primitive.hotspots.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.hotspots.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(197),decodeResult:Sp(198)},{operation:"impact",operationId:"operation.application.impact",transport:{kind:"mcp_tool",toolName:"tracedecay_impact"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.impact.v1",requestSchema:{schemaId:"schema.application.primitive.impact.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.impact.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(199),decodeResult:Sp(200)},{operation:"inheritance_depth",operationId:"operation.application.inheritance_depth",transport:{kind:"mcp_tool",toolName:"tracedecay_inheritance_depth"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.inheritance_depth.v1",requestSchema:{schemaId:"schema.application.primitive.inheritance-depth.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.inheritance-depth.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(201),decodeResult:Sp(202)},{operation:"insert_at",operationId:"operation.application.insert_at",transport:{kind:"mcp_tool",toolName:"tracedecay_insert_at"},effect:"source_edit",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.insert_at.v1",requestSchema:{schemaId:"schema.application.source-edit.insert-at.request",revision:1},resultSchema:{schemaId:"schema.application.source-edit.insert-at.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:Sp(203),decodeResult:Sp(18)},{operation:"insert_at_symbol",operationId:"operation.application.insert_at_symbol",transport:{kind:"mcp_tool",toolName:"tracedecay_insert_at_symbol"},effect:"source_edit",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.insert_at_symbol.v1",requestSchema:{schemaId:"schema.application.source-edit.insert-at-symbol.request",revision:1},resultSchema:{schemaId:"schema.application.source-edit.insert-at-symbol.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:Sp(204),decodeResult:Sp(18)},{operation:"largest",operationId:"operation.application.largest",transport:{kind:"mcp_tool",toolName:"tracedecay_largest"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.largest.v1",requestSchema:{schemaId:"schema.application.primitive.largest.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.largest.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(205),decodeResult:Sp(206)},{operation:"application_lcm_describe",operationId:"operation.application.lcm_describe",transport:{kind:"http",route:"/application/retained/lcm_describe",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.lcm_describe.v1",requestSchema:{schemaId:"schema.application.retained.lcm-describe.request",revision:1},resultSchema:{schemaId:"schema.application.retained.lcm-describe.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(207),decodeResult:Sp(208),decodeSuccess:e=>mE(e,"binding.http.lcm_describe.v1","schema.application.retained.lcm-describe.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(208))},{operation:"application_lcm_doctor",operationId:"operation.application.lcm_doctor",transport:{kind:"http",route:"/application/retained/lcm_doctor",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.lcm_doctor.v1",requestSchema:{schemaId:"schema.application.retained.lcm-doctor.request",revision:1},resultSchema:{schemaId:"schema.application.retained.lcm-doctor.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(209),decodeResult:Sp(210),decodeSuccess:e=>mE(e,"binding.http.lcm_doctor.v1","schema.application.retained.lcm-doctor.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(210))},{operation:"application_lcm_expand",operationId:"operation.application.lcm_expand",transport:{kind:"http",route:"/application/retained/lcm_expand",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.lcm_expand.v1",requestSchema:{schemaId:"schema.application.retained.lcm-expand.request",revision:1},resultSchema:{schemaId:"schema.application.retained.lcm-expand.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(211),decodeResult:Sp(212),decodeSuccess:e=>mE(e,"binding.http.lcm_expand.v1","schema.application.retained.lcm-expand.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(212))},{operation:"application_lcm_expand_query",operationId:"operation.application.lcm_expand_query",transport:{kind:"http",route:"/application/retained/lcm_expand_query",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.lcm_expand_query.v1",requestSchema:{schemaId:"schema.application.retained.lcm-expand-query.request",revision:1},resultSchema:{schemaId:"schema.application.retained.lcm-expand-query.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(213),decodeResult:Sp(214),decodeSuccess:e=>mE(e,"binding.http.lcm_expand_query.v1","schema.application.retained.lcm-expand-query.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(214))},{operation:"application_lcm_grep",operationId:"operation.application.lcm_grep",transport:{kind:"http",route:"/application/retained/lcm_grep",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.lcm_grep.v1",requestSchema:{schemaId:"schema.application.retained.lcm-grep.request",revision:1},resultSchema:{schemaId:"schema.application.retained.lcm-grep.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(215),decodeResult:Sp(216),decodeSuccess:e=>mE(e,"binding.http.lcm_grep.v1","schema.application.retained.lcm-grep.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(216))},{operation:"application_lcm_load_session",operationId:"operation.application.lcm_load_session",transport:{kind:"http",route:"/application/retained/lcm_load_session",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.lcm_load_session.v1",requestSchema:{schemaId:"schema.application.retained.lcm-load-session.request",revision:1},resultSchema:{schemaId:"schema.application.retained.lcm-load-session.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(217),decodeResult:Sp(218),decodeSuccess:e=>mE(e,"binding.http.lcm_load_session.v1","schema.application.retained.lcm-load-session.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(218))},{operation:"application_lcm_status",operationId:"operation.application.lcm_status",transport:{kind:"http",route:"/application/retained/lcm_status",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.lcm_status.v1",requestSchema:{schemaId:"schema.application.retained.lcm-status.request",revision:1},resultSchema:{schemaId:"schema.application.retained.lcm-status.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(219),decodeResult:Sp(220),decodeSuccess:e=>mE(e,"binding.http.lcm_status.v1","schema.application.retained.lcm-status.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(220))},{operation:"application_memory_status",operationId:"operation.application.memory_status",transport:{kind:"http",route:"/application/retained/memory_status",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.memory_status.v1",requestSchema:{schemaId:"schema.application.retained.memory-status.request",revision:1},resultSchema:{schemaId:"schema.application.retained.memory-status.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(221),decodeResult:Sp(222),decodeSuccess:e=>mE(e,"binding.http.memory_status.v1","schema.application.retained.memory-status.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(222))},{operation:"application_message_search",operationId:"operation.application.message_search",transport:{kind:"http",route:"/application/retained/message_search",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.message_search.v1",requestSchema:{schemaId:"schema.application.retained.message-search.request",revision:1},resultSchema:{schemaId:"schema.application.retained.message-search.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(223),decodeResult:Sp(224),decodeSuccess:e=>mE(e,"binding.http.message_search.v1","schema.application.retained.message-search.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(224))},{operation:"application_module_api",operationId:"operation.application.module_api",transport:{kind:"http",route:"/application/primitives/module_api",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.module_api.v1",requestSchema:{schemaId:"schema.application.primitive.module-api.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.module-api.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(225),decodeResult:Sp(226),decodeSuccess:e=>mE(e,"binding.http.module_api.v1","schema.application.primitive.module-api.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(226))},{operation:"move_symbol",operationId:"operation.application.move_symbol",transport:{kind:"mcp_tool",toolName:"tracedecay_move_symbol"},effect:"source_edit",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.move_symbol.v1",requestSchema:{schemaId:"schema.application.source-edit.move-symbol.request",revision:1},resultSchema:{schemaId:"schema.application.source-edit.move-symbol.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:Sp(227),decodeResult:Sp(18)},{operation:"multi_str_replace",operationId:"operation.application.multi_str_replace",transport:{kind:"mcp_tool",toolName:"tracedecay_multi_str_replace"},effect:"source_edit",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.multi_str_replace.v1",requestSchema:{schemaId:"schema.application.source-edit.multi-str-replace.request",revision:1},resultSchema:{schemaId:"schema.application.source-edit.multi-str-replace.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:Sp(228),decodeResult:Sp(18)},{operation:"native_integration_status",operationId:"operation.application.native_integration_status",transport:{kind:"mcp_tool",toolName:"tracedecay_native_integration_status"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.native_integration_status.v1",requestSchema:{schemaId:"schema.application.native-integration.status.request",revision:1},resultSchema:{schemaId:"schema.application.native-integration.status.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:Sp(229),decodeResult:Sp(15)},{operation:"node",operationId:"operation.application.node",transport:{kind:"mcp_tool",toolName:"tracedecay_node"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.node.v1",requestSchema:{schemaId:"schema.application.primitive.node.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.node.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(230),decodeResult:Sp(231)},{operation:"observatory_read",operationId:"operation.application.observatory_read",transport:{kind:"mcp_tool",toolName:"tracedecay_observatory_read"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.observatory_read.v1",requestSchema:{schemaId:"schema.application.observatory-read.request",revision:1},resultSchema:{schemaId:"schema.application.observatory-read.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:15e3},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(232),decodeResult:Sp(233)},{operation:"port_order",operationId:"operation.application.port_order",transport:{kind:"mcp_tool",toolName:"tracedecay_port_order"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.port_order.v1",requestSchema:{schemaId:"schema.application.primitive.port-order.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.port-order.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(234),decodeResult:Sp(235)},{operation:"port_status",operationId:"operation.application.port_status",transport:{kind:"mcp_tool",toolName:"tracedecay_port_status"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.port_status.v1",requestSchema:{schemaId:"schema.application.primitive.port-status.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.port-status.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(236),decodeResult:Sp(237)},{operation:"pr_context",operationId:"operation.application.pr_context",transport:{kind:"mcp_tool",toolName:"tracedecay_pr_context"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.pr_context.v1",requestSchema:{schemaId:"schema.application.primitive.pr-context.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.pr-context.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(238),decodeResult:Sp(239)},{operation:"preflight_native_integration",operationId:"operation.application.preflight_native_integration",transport:{kind:"mcp_tool",toolName:"tracedecay_preflight_native_integration"},effect:"preview",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.preflight_native_integration.v1",requestSchema:{schemaId:"schema.application.native-integration.preflight.request",revision:1},resultSchema:{schemaId:"schema.application.native-integration.preflight.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:Sp(240),decodeResult:Sp(15)},{operation:"project_context",operationId:"operation.application.project_context",transport:{kind:"mcp_tool",toolName:"tracedecay_project_context"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.project_context.v1",requestSchema:{schemaId:"schema.application.primitive.project-context.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.project-context.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(241),decodeResult:Sp(242)},{operation:"project_list",operationId:"operation.application.project_list",transport:{kind:"mcp_tool",toolName:"tracedecay_project_list"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.project_list.v1",requestSchema:{schemaId:"schema.application.primitive.project-list.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.project-list.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(243),decodeResult:Sp(244)},{operation:"project_search",operationId:"operation.application.project_search",transport:{kind:"mcp_tool",toolName:"tracedecay_project_search"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.project_search.v1",requestSchema:{schemaId:"schema.application.primitive.project-search.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.project-search.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(245),decodeResult:Sp(244)},{operation:"application_qualified_name",operationId:"operation.application.qualified_name",transport:{kind:"http",route:"/application/primitives/qualified_name",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.qualified_name.v1",requestSchema:{schemaId:"schema.application.primitive.qualified-name.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.qualified-name.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(246),decodeResult:Sp(247),decodeSuccess:e=>mE(e,"binding.http.qualified_name.v1","schema.application.primitive.qualified-name.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(247))},{operation:"rank",operationId:"operation.application.rank",transport:{kind:"mcp_tool",toolName:"tracedecay_rank"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.rank.v1",requestSchema:{schemaId:"schema.application.primitive.rank.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.rank.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(248),decodeResult:Sp(249)},{operation:"recursion",operationId:"operation.application.recursion",transport:{kind:"mcp_tool",toolName:"tracedecay_recursion"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.recursion.v1",requestSchema:{schemaId:"schema.application.primitive.recursion.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.recursion.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(250),decodeResult:Sp(251)},{operation:"redundancy",operationId:"operation.application.redundancy",transport:{kind:"mcp_tool",toolName:"tracedecay_redundancy"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.redundancy.v1",requestSchema:{schemaId:"schema.application.primitive.redundancy.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.redundancy.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(252),decodeResult:Sp(253)},{operation:"remote_status",operationId:"operation.application.remote_status",transport:{kind:"mcp_tool",toolName:"tracedecay_remote_status"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.remote_status.v1",requestSchema:{schemaId:"schema.application.primitive.remote-status.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.remote-status.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(254),decodeResult:Sp(255)},{operation:"rename_preview",operationId:"operation.application.rename_preview",transport:{kind:"mcp_tool",toolName:"tracedecay_rename_preview"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.rename_preview.v1",requestSchema:{schemaId:"schema.application.primitive.rename-preview.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.rename-preview.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(256),decodeResult:Sp(257)},{operation:"rename_symbol",operationId:"operation.application.rename_symbol",transport:{kind:"mcp_tool",toolName:"tracedecay_rename_symbol"},effect:"source_edit",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.rename_symbol.v1",requestSchema:{schemaId:"schema.application.source-edit.rename-symbol.request",revision:1},resultSchema:{schemaId:"schema.application.source-edit.rename-symbol.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:Sp(258),decodeResult:Sp(18)},{operation:"replace_symbol",operationId:"operation.application.replace_symbol",transport:{kind:"mcp_tool",toolName:"tracedecay_replace_symbol"},effect:"source_edit",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.replace_symbol.v1",requestSchema:{schemaId:"schema.application.source-edit.replace-symbol.request",revision:1},resultSchema:{schemaId:"schema.application.source-edit.replace-symbol.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:Sp(259),decodeResult:Sp(18)},{operation:"retrieve",operationId:"operation.application.retrieve",transport:{kind:"mcp_tool",toolName:"tracedecay_retrieve"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.retrieve.v1",requestSchema:{schemaId:"schema.application.primitive.retrieve.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.retrieve.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(260),decodeResult:Sp(261)},{operation:"run_affected_tests",operationId:"operation.application.run_affected_tests",transport:{kind:"mcp_tool",toolName:"tracedecay_run_affected_tests"},effect:"spawns_process",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.run_affected_tests.v1",requestSchema:{schemaId:"schema.application.primitive.run-affected-tests.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.run-affected-tests.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","effect_in_flight"]},deadline:{behavior:"return_operation_receipt",maximum_millis:6e5},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(262),decodeResult:Sp(263)},{operation:"runtime",operationId:"operation.application.runtime",transport:{kind:"mcp_tool",toolName:"tracedecay_runtime"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.runtime.v1",requestSchema:{schemaId:"schema.application.primitive.runtime.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.runtime.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(264),decodeResult:Sp(265)},{operation:"search",operationId:"operation.application.search",transport:{kind:"mcp_tool",toolName:"tracedecay_search"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.search.v1",requestSchema:{schemaId:"schema.application.primitive.search.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.search.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(266),decodeResult:Sp(267)},{operation:"session_lookup",operationId:"operation.application.session_lookup",transport:{kind:"mcp_tool",toolName:"tracedecay_session_lookup"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.session_lookup.v1",requestSchema:{schemaId:"schema.application.primitive.session-lookup.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.session-lookup.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(268),decodeResult:Sp(269)},{operation:"application_session_refresh_begin",operationId:"operation.application.session_refresh_begin",transport:{kind:"http",route:"/application/retained/session_refresh_begin",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.session_refresh_begin.v1",requestSchema:{schemaId:"schema.application.retained.session-refresh-begin.request",revision:1},resultSchema:{schemaId:"schema.application.retained.session-refresh-begin.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","reconciling","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","unavailable","effect_unknown","partial"],decodeRequest:Sp(270),decodeResult:Sp(271),decodeSuccess:e=>mE(e,"binding.http.session_refresh_begin.v1","schema.application.retained.session-refresh-begin.result",1,["completed","cancelled","timed_out","failed","unavailable","effect_unknown","partial"],{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","reconciling","after_commit"]},"durable_effect","required",Sp(271))},{operation:"application_session_refresh_cancel",operationId:"operation.application.session_refresh_cancel",transport:{kind:"http",route:"/application/retained/session_refresh_cancel",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.session_refresh_cancel.v1",requestSchema:{schemaId:"schema.application.retained.session-refresh-cancel.request",revision:1},resultSchema:{schemaId:"schema.application.retained.session-refresh-cancel.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","reconciling","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","unavailable","effect_unknown","partial"],decodeRequest:Sp(270),decodeResult:Sp(272),decodeSuccess:e=>mE(e,"binding.http.session_refresh_cancel.v1","schema.application.retained.session-refresh-cancel.result",1,["completed","cancelled","timed_out","failed","unavailable","effect_unknown","partial"],{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","reconciling","after_commit"]},"durable_effect","required",Sp(272))},{operation:"application_session_refresh_status",operationId:"operation.application.session_refresh_status",transport:{kind:"http",route:"/application/retained/session_refresh_status",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.session_refresh_status.v1",requestSchema:{schemaId:"schema.application.retained.session-refresh-status.request",revision:1},resultSchema:{schemaId:"schema.application.retained.session-refresh-status.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(270),decodeResult:Sp(273),decodeSuccess:e=>mE(e,"binding.http.session_refresh_status.v1","schema.application.retained.session-refresh-status.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(273))},{operation:"application_sessions_for",operationId:"operation.application.sessions_for",transport:{kind:"http",route:"/application/retained/sessions_for",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.sessions_for.v1",requestSchema:{schemaId:"schema.application.retained.sessions-for.request",revision:1},resultSchema:{schemaId:"schema.application.retained.sessions-for.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(274),decodeResult:Sp(275),decodeSuccess:e=>mE(e,"binding.http.sessions_for.v1","schema.application.retained.sessions-for.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(275))},{operation:"signature",operationId:"operation.application.signature",transport:{kind:"mcp_tool",toolName:"tracedecay_signature"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.signature.v1",requestSchema:{schemaId:"schema.application.primitive.signature.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.signature.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(112),decodeResult:Sp(276)},{operation:"similar",operationId:"operation.application.similar",transport:{kind:"mcp_tool",toolName:"tracedecay_similar"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.similar.v1",requestSchema:{schemaId:"schema.application.primitive.similar.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.similar.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(277),decodeResult:Sp(278)},{operation:"skill_list",operationId:"operation.application.skill_list",transport:{kind:"mcp_tool",toolName:"tracedecay_skill_list"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.skill_list.v1",requestSchema:{schemaId:"schema.application.primitive.skill-list.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.skill-list.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(279),decodeResult:Sp(280)},{operation:"skill_view",operationId:"operation.application.skill_view",transport:{kind:"mcp_tool",toolName:"tracedecay_skill_view"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.skill_view.v1",requestSchema:{schemaId:"schema.application.primitive.skill-view.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.skill-view.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(281),decodeResult:Sp(282)},{operation:"application_source_body",operationId:"operation.application.source_body",transport:{kind:"http",route:"/application/primitives/source_body",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.source_body.v1",requestSchema:{schemaId:"schema.application.primitive.source-body.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.source-body.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(283),decodeResult:Sp(284),decodeSuccess:e=>mE(e,"binding.http.source_body.v1","schema.application.primitive.source-body.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(284))},{operation:"source_edit_reconcile",operationId:"operation.application.source_edit_reconcile",transport:{kind:"mcp_tool",toolName:"tracedecay_source_edit_reconcile"},effect:"source_edit",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.source_edit_reconcile.v1",requestSchema:{schemaId:"schema.application.source-edit.reconcile.request",revision:1},resultSchema:{schemaId:"schema.application.source-edit.reconcile.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:Sp(285),decodeResult:Sp(18)},{operation:"application_source_lines",operationId:"operation.application.source_lines",transport:{kind:"http",route:"/application/primitives/source_lines",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.source_lines.v1",requestSchema:{schemaId:"schema.application.primitive.source-lines.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.source-lines.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(286),decodeResult:Sp(287),decodeSuccess:e=>mE(e,"binding.http.source_lines.v1","schema.application.primitive.source-lines.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(287))},{operation:"application_source_outline",operationId:"operation.application.source_outline",transport:{kind:"http",route:"/application/primitives/source_outline",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.source_outline.v1",requestSchema:{schemaId:"schema.application.primitive.source-outline.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.source-outline.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(288),decodeResult:Sp(289),decodeSuccess:e=>mE(e,"binding.http.source_outline.v1","schema.application.primitive.source-outline.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(289))},{operation:"stack_snapshot",operationId:"operation.application.stack_snapshot",transport:{kind:"mcp_tool",toolName:"tracedecay_stack_snapshot"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.stack_snapshot.v1",requestSchema:{schemaId:"schema.application.native-integration.stack-snapshot.request",revision:1},resultSchema:{schemaId:"schema.application.native-integration.stack-snapshot.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:Sp(290),decodeResult:Sp(15)},{operation:"status",operationId:"operation.application.status",transport:{kind:"mcp_tool",toolName:"tracedecay_status"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.status.v1",requestSchema:{schemaId:"schema.application.primitive.status.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.status.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(291),decodeResult:Sp(292)},{operation:"application_storage_status",operationId:"operation.application.storage_status",transport:{kind:"http",route:"/application/primitives/storage_status",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.storage_status.v1",requestSchema:{schemaId:"schema.application.primitive.storage-status.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.storage-status.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(293),decodeResult:Sp(294),decodeSuccess:e=>mE(e,"binding.http.storage_status.v1","schema.application.primitive.storage-status.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(294))},{operation:"str_replace",operationId:"operation.application.str_replace",transport:{kind:"mcp_tool",toolName:"tracedecay_str_replace"},effect:"source_edit",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.str_replace.v1",requestSchema:{schemaId:"schema.application.source-edit.str-replace.request",revision:1},resultSchema:{schemaId:"schema.application.source-edit.str-replace.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:Sp(295),decodeResult:Sp(18)},{operation:"test_map",operationId:"operation.application.test_map",transport:{kind:"mcp_tool",toolName:"tracedecay_test_map"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.test_map.v1",requestSchema:{schemaId:"schema.application.primitive.test-map.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.test-map.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(296),decodeResult:Sp(297)},{operation:"application_test_results",operationId:"operation.application.test_results",transport:{kind:"http",route:"/application/tests/results",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.test_results.v1",requestSchema:{schemaId:"schema.application.feedback.test-results.request",revision:1},resultSchema:{schemaId:"schema.application.feedback.test-results.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:15e3},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(298),decodeResult:Sp(299),decodeSuccess:e=>mE(e,"binding.http.test_results.v1","schema.application.feedback.test-results.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(299))},{operation:"test_risk",operationId:"operation.application.test_risk",transport:{kind:"mcp_tool",toolName:"tracedecay_test_risk"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.test_risk.v1",requestSchema:{schemaId:"schema.application.primitive.test-risk.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.test-risk.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(300),decodeResult:Sp(301)},{operation:"todos",operationId:"operation.application.todos",transport:{kind:"mcp_tool",toolName:"tracedecay_todos"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.todos.v1",requestSchema:{schemaId:"schema.application.primitive.todos.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.todos.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:1e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(302),decodeResult:Sp(303)},{operation:"unmounted_files",operationId:"operation.application.unmounted_files",transport:{kind:"mcp_tool",toolName:"tracedecay_unmounted_files"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.unmounted_files.v1",requestSchema:{schemaId:"schema.application.primitive.unmounted-files.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.unmounted-files.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(304),decodeResult:Sp(305)},{operation:"unsafe_patterns",operationId:"operation.application.unsafe_patterns",transport:{kind:"mcp_tool",toolName:"tracedecay_unsafe_patterns"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.mcp.unsafe_patterns.v1",requestSchema:{schemaId:"schema.application.primitive.unsafe-patterns.request",revision:1},resultSchema:{schemaId:"schema.application.primitive.unsafe-patterns.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:12e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(306),decodeResult:Sp(307)},{operation:"application_workflows",operationId:"operation.application.workflows",transport:{kind:"http",route:"/application/retained/workflows",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.workflows.v1",requestSchema:{schemaId:"schema.application.retained.workflows.request",revision:1},resultSchema:{schemaId:"schema.application.retained.workflows.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","unavailable","partial"],decodeRequest:Sp(308),decodeResult:Sp(309),decodeSuccess:e=>mE(e,"binding.http.workflows.v1","schema.application.retained.workflows.result",1,["completed","cancelled","timed_out","failed","unavailable","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(309))},{operation:"application_worktree_cleanup_confirm",operationId:"operation.application.worktree_cleanup_confirm",transport:{kind:"http",route:"/application/native-integration/worktree_cleanup_confirm",method:"POST"},effect:"preview",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.worktree_cleanup_confirm.v1",requestSchema:{schemaId:"schema.application.native-integration.worktree-cleanup-confirm.request",revision:1},resultSchema:{schemaId:"schema.application.native-integration.worktree-cleanup-confirm.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:Sp(310),decodeResult:Sp(15),decodeSuccess:e=>mE(e,"binding.http.worktree_cleanup_confirm.v1","schema.application.native-integration.worktree-cleanup-confirm.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(15))},{operation:"application_worktree_cleanup_inspect",operationId:"operation.application.worktree_cleanup_inspect",transport:{kind:"http",route:"/application/native-integration/worktree_cleanup_inspect",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.worktree_cleanup_inspect.v1",requestSchema:{schemaId:"schema.application.native-integration.worktree-cleanup-inspect.request",revision:1},resultSchema:{schemaId:"schema.application.native-integration.worktree-cleanup-inspect.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:Sp(311),decodeResult:Sp(15),decodeSuccess:e=>mE(e,"binding.http.worktree_cleanup_inspect.v1","schema.application.native-integration.worktree-cleanup-inspect.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(15))},{operation:"application_worktree_cleanup_reconcile",operationId:"operation.application.worktree_cleanup_reconcile",transport:{kind:"http",route:"/application/native-integration/worktree_cleanup_reconcile",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.worktree_cleanup_reconcile.v1",requestSchema:{schemaId:"schema.application.native-integration.worktree-cleanup-reconcile.request",revision:1},resultSchema:{schemaId:"schema.application.native-integration.worktree-cleanup-reconcile.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:Sp(312),decodeResult:Sp(15),decodeSuccess:e=>mE(e,"binding.http.worktree_cleanup_reconcile.v1","schema.application.native-integration.worktree-cleanup-reconcile.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(15))},{operation:"application_worktree_cleanup_remove",operationId:"operation.application.worktree_cleanup_remove",transport:{kind:"http",route:"/application/native-integration/worktree_cleanup_remove",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.worktree_cleanup_remove.v1",requestSchema:{schemaId:"schema.application.native-integration.worktree-cleanup-remove.request",revision:1},resultSchema:{schemaId:"schema.application.native-integration.worktree-cleanup-remove.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:Sp(313),decodeResult:Sp(15),decodeSuccess:e=>mE(e,"binding.http.worktree_cleanup_remove.v1","schema.application.native-integration.worktree-cleanup-remove.result",1,["completed","cancelled","timed_out","failed","effect_unknown","partial"],{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},"durable_effect","required",Sp(15))},{operation:"application_worktree_inventory",operationId:"operation.application.worktree_inventory",transport:{kind:"http",route:"/application/native-integration/worktree_inventory",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.worktree_inventory.v1",requestSchema:{schemaId:"schema.application.native-integration.worktree-inventory.request",revision:1},resultSchema:{schemaId:"schema.application.native-integration.worktree-inventory.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:Sp(314),decodeResult:Sp(15),decodeSuccess:e=>mE(e,"binding.http.worktree_inventory.v1","schema.application.native-integration.worktree-inventory.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(15))},{operation:"handoff_issue_task_handoff",operationId:"operation.handoff.issue_task_handoff",transport:{kind:"http",route:"/application/handoff/issue-task",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.handoff.issue_task_handoff",requestSchema:{schemaId:"schema.handoff.issue_task_handoff.request",revision:1},resultSchema:{schemaId:"schema.handoff.issue_task_handoff.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","timed_out","failed","effect_unknown","partial"],decodeRequest:Sp(315),decodeResult:Sp(316),decodeSuccess:e=>mE(e,"binding.http.handoff.issue_task_handoff","schema.handoff.issue_task_handoff.result",1,["completed","timed_out","failed","effect_unknown","partial"],{mode:"not_cancellable"},"durable_effect","required",Sp(316))},{operation:"handoff_list_task_handoffs",operationId:"operation.handoff.list_task_handoffs",transport:{kind:"http",route:"/application/handoff/list-task",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.handoff.list_task_handoffs",requestSchema:{schemaId:"schema.handoff.list_task_handoffs.request",revision:1},resultSchema:{schemaId:"schema.handoff.list_task_handoffs.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","timed_out","failed","partial"],decodeRequest:Sp(317),decodeResult:Sp(318),decodeSuccess:e=>mE(e,"binding.http.handoff.list_task_handoffs","schema.handoff.list_task_handoffs.result",1,["completed","timed_out","failed","partial"],{mode:"not_cancellable"},"operation","not_required",Sp(318))},{operation:"handoff_open_investigation_handoff",operationId:"operation.handoff.open_investigation_handoff",transport:{kind:"http",route:"/application/handoff/open-investigation",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.handoff.open_investigation_handoff",requestSchema:{schemaId:"schema.handoff.open_investigation_handoff.request",revision:1},resultSchema:{schemaId:"schema.handoff.open_investigation_handoff.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","timed_out","failed","effect_unknown","partial"],decodeRequest:Sp(319),decodeResult:Sp(320),decodeSuccess:e=>mE(e,"binding.http.handoff.open_investigation_handoff","schema.handoff.open_investigation_handoff.result",1,["completed","timed_out","failed","effect_unknown","partial"],{mode:"not_cancellable"},"durable_effect","required",Sp(320))},{operation:"handoff_open_task_handoff",operationId:"operation.handoff.open_task_handoff",transport:{kind:"http",route:"/application/handoff/open-task",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.handoff.open_task_handoff",requestSchema:{schemaId:"schema.handoff.open_task_handoff.request",revision:1},resultSchema:{schemaId:"schema.handoff.open_task_handoff.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","timed_out","failed","effect_unknown","partial"],decodeRequest:Sp(321),decodeResult:Sp(322),decodeSuccess:e=>mE(e,"binding.http.handoff.open_task_handoff","schema.handoff.open_task_handoff.result",1,["completed","timed_out","failed","effect_unknown","partial"],{mode:"not_cancellable"},"durable_effect","required",Sp(322))},{operation:"multi_root_execute",operationId:"operation.multi_root.execute",transport:{kind:"http",route:"/application/multi-root/execute",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.multi_root.execute.v1",requestSchema:{schemaId:"schema.tracedecay.multi-root.execute-request.v1",revision:1},resultSchema:{schemaId:"schema.tracedecay.multi-root.execute-result.v1",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:Sp(323),decodeResult:Sp(324),decodeSuccess:e=>mE(e,"binding.http.multi_root.execute.v1","schema.tracedecay.multi-root.execute-result.v1",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(324))},{operation:"multi_root_scope_set_compare_and_swap",operationId:"operation.multi_root.scope_set_compare_and_swap",transport:{kind:"http",route:"/application/multi-root/scope-set/compare-and-swap",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.multi_root.scope_set_compare_and_swap.v1",requestSchema:{schemaId:"schema.tracedecay.multi-root.scope-set-compare-and-swap-request.v1",revision:1},resultSchema:{schemaId:"schema.tracedecay.multi-root.scope-set-compare-and-swap-result.v1",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:Sp(325),decodeResult:Sp(326),decodeSuccess:e=>mE(e,"binding.http.multi_root.scope_set_compare_and_swap.v1","schema.tracedecay.multi-root.scope-set-compare-and-swap-result.v1",1,["completed","cancelled","timed_out","failed","effect_unknown","partial"],{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},"durable_effect","required",Sp(326))},{operation:"multi_root_scope_set_read",operationId:"operation.multi_root.scope_set_read",transport:{kind:"http",route:"/application/multi-root/scope-set/read",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.multi_root.scope_set_read.v1",requestSchema:{schemaId:"schema.tracedecay.multi-root.scope-set-read-request.v1",revision:1},resultSchema:{schemaId:"schema.tracedecay.multi-root.scope-set-read-result.v1",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:Sp(327),decodeResult:Sp(328),decodeSuccess:e=>mE(e,"binding.http.multi_root.scope_set_read.v1","schema.tracedecay.multi-root.scope-set-read-result.v1",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(328))},{operation:"work_accept_proposal",operationId:"operation.work.accept_proposal",transport:{kind:"http",route:"/application/work/accept-proposal",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.accept_proposal",requestSchema:{schemaId:"schema.work.accept_proposal.request",revision:1},resultSchema:{schemaId:"schema.work.accept_proposal.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:Sp(329),decodeResult:Sp(330),decodeSuccess:e=>mE(e,"binding.http.work.accept_proposal","schema.work.accept_proposal.result",1,["completed","cancelled","timed_out","failed","effect_unknown","partial"],{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},"durable_effect","required",Sp(330))},{operation:"work_adjudicate_duplicate",operationId:"operation.work.adjudicate_duplicate",transport:{kind:"http",route:"/application/work/adjudicate-duplicate",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.adjudicate_duplicate",requestSchema:{schemaId:"schema.work.adjudicate_duplicate.request",revision:1},resultSchema:{schemaId:"schema.work.adjudicate_duplicate.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:Sp(331),decodeResult:Sp(332),decodeSuccess:e=>mE(e,"binding.http.work.adjudicate_duplicate","schema.work.adjudicate_duplicate.result",1,["completed","cancelled","timed_out","failed","effect_unknown","partial"],{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},"durable_effect","required",Sp(332))},{operation:"work_adjudicate_leak",operationId:"operation.work.adjudicate_leak",transport:{kind:"http",route:"/application/work/adjudicate-leak",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.adjudicate_leak",requestSchema:{schemaId:"schema.work.adjudicate_leak.request",revision:1},resultSchema:{schemaId:"schema.work.adjudicate_leak.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:Sp(333),decodeResult:Sp(334),decodeSuccess:e=>mE(e,"binding.http.work.adjudicate_leak","schema.work.adjudicate_leak.result",1,["completed","cancelled","timed_out","failed","effect_unknown","partial"],{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},"durable_effect","required",Sp(334))},{operation:"work_admit_execution",operationId:"operation.work.admit_execution",transport:{kind:"http",route:"/application/work/admit-execution",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.admit_execution",requestSchema:{schemaId:"schema.work.admit_execution.request",revision:1},resultSchema:{schemaId:"schema.work.admit_execution.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:Sp(335),decodeResult:Sp(336),decodeSuccess:e=>mE(e,"binding.http.work.admit_execution","schema.work.admit_execution.result",1,["completed","cancelled","timed_out","failed","effect_unknown","partial"],{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},"durable_effect","required",Sp(336))},{operation:"work_admit_placement",operationId:"operation.work.admit_placement",transport:{kind:"http",route:"/application/work/admit-placement",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.admit_placement",requestSchema:{schemaId:"schema.work.admit_placement.request",revision:1},resultSchema:{schemaId:"schema.work.admit_placement.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:Sp(337),decodeResult:Sp(338),decodeSuccess:e=>mE(e,"binding.http.work.admit_placement","schema.work.admit_placement.result",1,["completed","cancelled","timed_out","failed","effect_unknown","partial"],{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},"durable_effect","required",Sp(338))},{operation:"work_advance_job",operationId:"operation.work.advance_job",transport:{kind:"http",route:"/application/work/advance-job",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.advance_job",requestSchema:{schemaId:"schema.work.advance_job.request",revision:1},resultSchema:{schemaId:"schema.work.advance_job.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:Sp(339),decodeResult:Sp(340),decodeSuccess:e=>mE(e,"binding.http.work.advance_job","schema.work.advance_job.result",1,["completed","cancelled","timed_out","failed","effect_unknown","partial"],{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},"durable_effect","required",Sp(340))},{operation:"work_attempt_status",operationId:"operation.work.attempt_status",transport:{kind:"http",route:"/application/work/attempt-status",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.attempt_status",requestSchema:{schemaId:"schema.work.attempt_status.request",revision:1},resultSchema:{schemaId:"schema.work.attempt_status.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:Sp(341),decodeResult:Sp(342),decodeSuccess:e=>mE(e,"binding.http.work.attempt_status","schema.work.attempt_status.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(342))},{operation:"work_cancel_attempt",operationId:"operation.work.cancel_attempt",transport:{kind:"http",route:"/application/work/cancel-attempt",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.cancel_attempt",requestSchema:{schemaId:"schema.work.cancel_attempt.request",revision:1},resultSchema:{schemaId:"schema.work.cancel_attempt.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:Sp(343),decodeResult:Sp(342),decodeSuccess:e=>mE(e,"binding.http.work.cancel_attempt","schema.work.cancel_attempt.result",1,["completed","cancelled","timed_out","failed","effect_unknown","partial"],{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},"durable_effect","required",Sp(342))},{operation:"work_compare_proposal",operationId:"operation.work.compare_proposal",transport:{kind:"http",route:"/application/work/compare-proposal",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.compare_proposal",requestSchema:{schemaId:"schema.work.compare_proposal.request",revision:1},resultSchema:{schemaId:"schema.work.compare_proposal.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:Sp(344),decodeResult:Sp(345),decodeSuccess:e=>mE(e,"binding.http.work.compare_proposal","schema.work.compare_proposal.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(345))},{operation:"work_create",operationId:"operation.work.create",transport:{kind:"http",route:"/application/work/create",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.create",requestSchema:{schemaId:"schema.work.create.request",revision:1},resultSchema:{schemaId:"schema.work.create.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:Sp(346),decodeResult:Sp(330),decodeSuccess:e=>mE(e,"binding.http.work.create","schema.work.create.result",1,["completed","cancelled","timed_out","failed","effect_unknown","partial"],{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},"durable_effect","required",Sp(330))},{operation:"work_execution_history",operationId:"operation.work.execution_history",transport:{kind:"http",route:"/application/work/execution-history",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.execution_history",requestSchema:{schemaId:"schema.work.execution_history.request",revision:1},resultSchema:{schemaId:"schema.work.execution_history.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:Sp(347),decodeResult:Sp(348),decodeSuccess:e=>mE(e,"binding.http.work.execution_history","schema.work.execution_history.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(348))},{operation:"work_experience",operationId:"operation.work.experience",transport:{kind:"http",route:"/application/work/experience",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.experience",requestSchema:{schemaId:"schema.work.experience.request",revision:1},resultSchema:{schemaId:"schema.work.experience.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:Sp(349),decodeResult:Sp(350),decodeSuccess:e=>mE(e,"binding.http.work.experience","schema.work.experience.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(350))},{operation:"work_generate_proposal",operationId:"operation.work.generate_proposal",transport:{kind:"http",route:"/application/work/generate-proposal",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.generate_proposal",requestSchema:{schemaId:"schema.work.generate_proposal.request",revision:1},resultSchema:{schemaId:"schema.work.generate_proposal.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:Sp(351),decodeResult:Sp(352),decodeSuccess:e=>mE(e,"binding.http.work.generate_proposal","schema.work.generate_proposal.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(352))},{operation:"work_hydrate_artifacts",operationId:"operation.work.hydrate_artifacts",transport:{kind:"http",route:"/application/work/hydrate-artifacts",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.hydrate_artifacts",requestSchema:{schemaId:"schema.work.hydrate_artifacts.request",revision:1},resultSchema:{schemaId:"schema.work.hydrate_artifacts.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:Sp(353),decodeResult:Sp(354),decodeSuccess:e=>mE(e,"binding.http.work.hydrate_artifacts","schema.work.hydrate_artifacts.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(354))},{operation:"work_list_attempts",operationId:"operation.work.list_attempts",transport:{kind:"http",route:"/application/work/list-attempts",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.list_attempts",requestSchema:{schemaId:"schema.work.list_attempts.request",revision:1},resultSchema:{schemaId:"schema.work.list_attempts.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:Sp(347),decodeResult:Sp(355),decodeSuccess:e=>mE(e,"binding.http.work.list_attempts","schema.work.list_attempts.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(355))},{operation:"work_mutate_graph",operationId:"operation.work.mutate_graph",transport:{kind:"http",route:"/application/work/mutate-graph",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.mutate_graph",requestSchema:{schemaId:"schema.work.mutate_graph.request",revision:1},resultSchema:{schemaId:"schema.work.mutate_graph.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:Sp(356),decodeResult:Sp(330),decodeSuccess:e=>mE(e,"binding.http.work.mutate_graph","schema.work.mutate_graph.result",1,["completed","cancelled","timed_out","failed","effect_unknown","partial"],{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},"durable_effect","required",Sp(330))},{operation:"work_pause_run",operationId:"operation.work.pause_run",transport:{kind:"http",route:"/application/work/pause-run",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.pause_run",requestSchema:{schemaId:"schema.work.pause_run.request",revision:1},resultSchema:{schemaId:"schema.work.pause_run.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:Sp(357),decodeResult:Sp(358),decodeSuccess:e=>mE(e,"binding.http.work.pause_run","schema.work.pause_run.result",1,["completed","cancelled","timed_out","failed","effect_unknown","partial"],{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},"durable_effect","required",Sp(358))},{operation:"work_placement_preflight",operationId:"operation.work.placement_preflight",transport:{kind:"http",route:"/application/work/placement-preflight",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.placement_preflight",requestSchema:{schemaId:"schema.work.placement_preflight.request",revision:1},resultSchema:{schemaId:"schema.work.placement_preflight.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:Sp(359),decodeResult:Sp(360),decodeSuccess:e=>mE(e,"binding.http.work.placement_preflight","schema.work.placement_preflight.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(360))},{operation:"work_placement_status",operationId:"operation.work.placement_status",transport:{kind:"http",route:"/application/work/placement-status",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.placement_status",requestSchema:{schemaId:"schema.work.placement_status.request",revision:1},resultSchema:{schemaId:"schema.work.placement_status.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:Sp(361),decodeResult:Sp(362),decodeSuccess:e=>mE(e,"binding.http.work.placement_status","schema.work.placement_status.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(362))},{operation:"work_prepare_duplicate_adjudication",operationId:"operation.work.prepare_duplicate_adjudication",transport:{kind:"http",route:"/application/work/prepare-duplicate-adjudication",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.prepare_duplicate_adjudication",requestSchema:{schemaId:"schema.work.prepare_duplicate_adjudication.request",revision:1},resultSchema:{schemaId:"schema.work.prepare_duplicate_adjudication.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:Sp(363),decodeResult:Sp(331),decodeSuccess:e=>mE(e,"binding.http.work.prepare_duplicate_adjudication","schema.work.prepare_duplicate_adjudication.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(331))},{operation:"work_prepare_graph_mutation",operationId:"operation.work.prepare_graph_mutation",transport:{kind:"http",route:"/application/work/prepare-graph-mutation",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.prepare_graph_mutation",requestSchema:{schemaId:"schema.work.prepare_graph_mutation.request",revision:1},resultSchema:{schemaId:"schema.work.prepare_graph_mutation.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:Sp(364),decodeResult:Sp(356),decodeSuccess:e=>mE(e,"binding.http.work.prepare_graph_mutation","schema.work.prepare_graph_mutation.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(356))},{operation:"work_release_placement",operationId:"operation.work.release_placement",transport:{kind:"http",route:"/application/work/release-placement",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.release_placement",requestSchema:{schemaId:"schema.work.release_placement.request",revision:1},resultSchema:{schemaId:"schema.work.release_placement.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:Sp(365),decodeResult:Sp(338),decodeSuccess:e=>mE(e,"binding.http.work.release_placement","schema.work.release_placement.result",1,["completed","cancelled","timed_out","failed","effect_unknown","partial"],{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},"durable_effect","required",Sp(338))},{operation:"work_resume_attempts",operationId:"operation.work.resume_attempts",transport:{kind:"http",route:"/application/work/resume-attempts",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.resume_attempts",requestSchema:{schemaId:"schema.work.resume_attempts.request",revision:1},resultSchema:{schemaId:"schema.work.resume_attempts.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:Sp(366),decodeResult:Sp(367),decodeSuccess:e=>mE(e,"binding.http.work.resume_attempts","schema.work.resume_attempts.result",1,["completed","cancelled","timed_out","failed","effect_unknown","partial"],{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},"durable_effect","required",Sp(367))},{operation:"work_resume_run",operationId:"operation.work.resume_run",transport:{kind:"http",route:"/application/work/resume-run",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.resume_run",requestSchema:{schemaId:"schema.work.resume_run.request",revision:1},resultSchema:{schemaId:"schema.work.resume_run.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:Sp(368),decodeResult:Sp(358),decodeSuccess:e=>mE(e,"binding.http.work.resume_run","schema.work.resume_run.result",1,["completed","cancelled","timed_out","failed","effect_unknown","partial"],{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},"durable_effect","required",Sp(358))},{operation:"work_retrieve_evidence",operationId:"operation.work.retrieve_evidence",transport:{kind:"http",route:"/application/work/retrieve-evidence",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.retrieve_evidence",requestSchema:{schemaId:"schema.work.retrieve_evidence.request",revision:1},resultSchema:{schemaId:"schema.work.retrieve_evidence.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:Sp(369),decodeResult:Sp(370),decodeSuccess:e=>mE(e,"binding.http.work.retrieve_evidence","schema.work.retrieve_evidence.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(370))},{operation:"work_retry_attempt",operationId:"operation.work.retry_attempt",transport:{kind:"http",route:"/application/work/retry-attempt",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.retry_attempt",requestSchema:{schemaId:"schema.work.retry_attempt.request",revision:1},resultSchema:{schemaId:"schema.work.retry_attempt.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:Sp(371),decodeResult:Sp(372),decodeSuccess:e=>mE(e,"binding.http.work.retry_attempt","schema.work.retry_attempt.result",1,["completed","cancelled","timed_out","failed","effect_unknown","partial"],{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},"durable_effect","required",Sp(372))},{operation:"work_review_proposal",operationId:"operation.work.review_proposal",transport:{kind:"http",route:"/application/work/review-proposal",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.review_proposal",requestSchema:{schemaId:"schema.work.review_proposal.request",revision:1},resultSchema:{schemaId:"schema.work.review_proposal.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:Sp(373),decodeResult:Sp(330),decodeSuccess:e=>mE(e,"binding.http.work.review_proposal","schema.work.review_proposal.result",1,["completed","cancelled","timed_out","failed","effect_unknown","partial"],{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},"durable_effect","required",Sp(330))},{operation:"work_run_control",operationId:"operation.work.run_control",transport:{kind:"http",route:"/application/work/run-control",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.run_control",requestSchema:{schemaId:"schema.work.run_control.request",revision:1},resultSchema:{schemaId:"schema.work.run_control.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:Sp(374),decodeResult:Sp(375),decodeSuccess:e=>mE(e,"binding.http.work.run_control","schema.work.run_control.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(375))},{operation:"work_start_attempt",operationId:"operation.work.start_attempt",transport:{kind:"http",route:"/application/work/start-attempt",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.start_attempt",requestSchema:{schemaId:"schema.work.start_attempt.request",revision:1},resultSchema:{schemaId:"schema.work.start_attempt.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:Sp(376),decodeResult:Sp(342),decodeSuccess:e=>mE(e,"binding.http.work.start_attempt","schema.work.start_attempt.result",1,["completed","cancelled","timed_out","failed","effect_unknown","partial"],{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},"durable_effect","required",Sp(342))},{operation:"work_synthesize",operationId:"operation.work.synthesize",transport:{kind:"http",route:"/application/work/synthesize",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.synthesize",requestSchema:{schemaId:"schema.work.synthesize.request",revision:1},resultSchema:{schemaId:"schema.work.synthesize.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","cancelled","timed_out","failed","effect_unknown","partial"],decodeRequest:Sp(377),decodeResult:Sp(378),decodeSuccess:e=>mE(e,"binding.http.work.synthesize","schema.work.synthesize.result",1,["completed","cancelled","timed_out","failed","effect_unknown","partial"],{mode:"cooperative",points:["before_admission","before_effect","effect_in_flight","after_commit"]},"durable_effect","required",Sp(378))},{operation:"work_topology",operationId:"operation.work.topology",transport:{kind:"http",route:"/application/work/topology",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.topology",requestSchema:{schemaId:"schema.work.topology.request",revision:1},resultSchema:{schemaId:"schema.work.topology.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:Sp(379),decodeResult:Sp(380),decodeSuccess:e=>mE(e,"binding.http.work.topology","schema.work.topology.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(380))},{operation:"work_topology_metrics",operationId:"operation.work.topology_metrics",transport:{kind:"http",route:"/application/work/topology-metrics",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.topology_metrics",requestSchema:{schemaId:"schema.work.topology_metrics.request",revision:1},resultSchema:{schemaId:"schema.work.topology_metrics.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:Sp(381),decodeResult:Sp(382),decodeSuccess:e=>mE(e,"binding.http.work.topology_metrics","schema.work.topology_metrics.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(382))},{operation:"work_views",operationId:"operation.work.views",transport:{kind:"http",route:"/application/work/views",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.work.views",requestSchema:{schemaId:"schema.work.views.request",revision:1},resultSchema:{schemaId:"schema.work.views.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:Sp(383),decodeResult:Sp(384),decodeSuccess:e=>mE(e,"binding.http.work.views","schema.work.views.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(384))},{operation:"workflow_activate_definition",operationId:"operation.workflow.activate_definition",transport:{kind:"http",route:"/application/workflow/activate-definition",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.workflow.activate_definition",requestSchema:{schemaId:"schema.workflow.activate_definition.request",revision:1},resultSchema:{schemaId:"schema.workflow.activate_definition.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","timed_out","failed","effect_unknown","partial"],decodeRequest:Sp(385),decodeResult:Sp(386),decodeSuccess:e=>mE(e,"binding.http.workflow.activate_definition","schema.workflow.activate_definition.result",1,["completed","timed_out","failed","effect_unknown","partial"],{mode:"not_cancellable"},"durable_effect","required",Sp(386))},{operation:"workflow_cancel_run",operationId:"operation.workflow.cancel_run",transport:{kind:"http",route:"/application/workflow/cancel-run",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.workflow.cancel_run",requestSchema:{schemaId:"schema.workflow.cancel_run.request",revision:1},resultSchema:{schemaId:"schema.workflow.cancel_run.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","timed_out","failed","effect_unknown","partial"],decodeRequest:Sp(387),decodeResult:Sp(388),decodeSuccess:e=>mE(e,"binding.http.workflow.cancel_run","schema.workflow.cancel_run.result",1,["completed","timed_out","failed","effect_unknown","partial"],{mode:"not_cancellable"},"durable_effect","required",Sp(388))},{operation:"workflow_definition_history",operationId:"operation.workflow.definition_history",transport:{kind:"http",route:"/application/workflow/definition-history",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.workflow.definition_history",requestSchema:{schemaId:"schema.workflow.definition_history.request",revision:1},resultSchema:{schemaId:"schema.workflow.definition_history.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:Sp(389),decodeResult:Sp(390),decodeSuccess:e=>mE(e,"binding.http.workflow.definition_history","schema.workflow.definition_history.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(390))},{operation:"workflow_diff_definition",operationId:"operation.workflow.diff_definition",transport:{kind:"http",route:"/application/workflow/diff-definition",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.workflow.diff_definition",requestSchema:{schemaId:"schema.workflow.diff_definition.request",revision:1},resultSchema:{schemaId:"schema.workflow.diff_definition.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:Sp(391),decodeResult:Sp(392),decodeSuccess:e=>mE(e,"binding.http.workflow.diff_definition","schema.workflow.diff_definition.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(392))},{operation:"workflow_get_definition",operationId:"operation.workflow.get_definition",transport:{kind:"http",route:"/application/workflow/get-definition",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.workflow.get_definition",requestSchema:{schemaId:"schema.workflow.get_definition.request",revision:1},resultSchema:{schemaId:"schema.workflow.get_definition.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:Sp(393),decodeResult:Sp(394),decodeSuccess:e=>mE(e,"binding.http.workflow.get_definition","schema.workflow.get_definition.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(394))},{operation:"workflow_get_run",operationId:"operation.workflow.get_run",transport:{kind:"http",route:"/application/workflow/get-run",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.workflow.get_run",requestSchema:{schemaId:"schema.workflow.get_run.request",revision:1},resultSchema:{schemaId:"schema.workflow.get_run.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:Sp(395),decodeResult:Sp(388),decodeSuccess:e=>mE(e,"binding.http.workflow.get_run","schema.workflow.get_run.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(388))},{operation:"workflow_handoff_issue",operationId:"operation.workflow.handoff_issue",transport:{kind:"http",route:"/application/workflow/handoff-issue",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.workflow.handoff_issue",requestSchema:{schemaId:"schema.workflow.handoff_issue.request",revision:1},resultSchema:{schemaId:"schema.workflow.handoff_issue.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","timed_out","failed","effect_unknown","partial"],decodeRequest:Sp(396),decodeResult:Sp(397),decodeSuccess:e=>mE(e,"binding.http.workflow.handoff_issue","schema.workflow.handoff_issue.result",1,["completed","timed_out","failed","effect_unknown","partial"],{mode:"not_cancellable"},"durable_effect","required",Sp(397))},{operation:"workflow_handoff_redeem",operationId:"operation.workflow.handoff_redeem",transport:{kind:"http",route:"/application/workflow/handoff-redeem",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.workflow.handoff_redeem",requestSchema:{schemaId:"schema.workflow.handoff_redeem.request",revision:1},resultSchema:{schemaId:"schema.workflow.handoff_redeem.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","timed_out","failed","effect_unknown","partial"],decodeRequest:Sp(398),decodeResult:Sp(399),decodeSuccess:e=>mE(e,"binding.http.workflow.handoff_redeem","schema.workflow.handoff_redeem.result",1,["completed","timed_out","failed","effect_unknown","partial"],{mode:"not_cancellable"},"durable_effect","required",Sp(399))},{operation:"workflow_list_definitions",operationId:"operation.workflow.list_definitions",transport:{kind:"http",route:"/application/workflow/list-definitions",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.workflow.list_definitions",requestSchema:{schemaId:"schema.workflow.list_definitions.request",revision:1},resultSchema:{schemaId:"schema.workflow.list_definitions.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:Sp(400),decodeResult:Sp(390),decodeSuccess:e=>mE(e,"binding.http.workflow.list_definitions","schema.workflow.list_definitions.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(390))},{operation:"workflow_pause_run",operationId:"operation.workflow.pause_run",transport:{kind:"http",route:"/application/workflow/pause-run",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.workflow.pause_run",requestSchema:{schemaId:"schema.workflow.pause_run.request",revision:1},resultSchema:{schemaId:"schema.workflow.pause_run.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","timed_out","failed","effect_unknown","partial"],decodeRequest:Sp(401),decodeResult:Sp(388),decodeSuccess:e=>mE(e,"binding.http.workflow.pause_run","schema.workflow.pause_run.result",1,["completed","timed_out","failed","effect_unknown","partial"],{mode:"not_cancellable"},"durable_effect","required",Sp(388))},{operation:"workflow_register_definition",operationId:"operation.workflow.register_definition",transport:{kind:"http",route:"/application/workflow/register-definition",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.workflow.register_definition",requestSchema:{schemaId:"schema.workflow.register_definition.request",revision:1},resultSchema:{schemaId:"schema.workflow.register_definition.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","timed_out","failed","effect_unknown","partial"],decodeRequest:Sp(402),decodeResult:Sp(394),decodeSuccess:e=>mE(e,"binding.http.workflow.register_definition","schema.workflow.register_definition.result",1,["completed","timed_out","failed","effect_unknown","partial"],{mode:"not_cancellable"},"durable_effect","required",Sp(394))},{operation:"workflow_reject_definition",operationId:"operation.workflow.reject_definition",transport:{kind:"http",route:"/application/workflow/reject-definition",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.workflow.reject_definition",requestSchema:{schemaId:"schema.workflow.reject_definition.request",revision:1},resultSchema:{schemaId:"schema.workflow.reject_definition.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","timed_out","failed","effect_unknown","partial"],decodeRequest:Sp(403),decodeResult:Sp(386),decodeSuccess:e=>mE(e,"binding.http.workflow.reject_definition","schema.workflow.reject_definition.result",1,["completed","timed_out","failed","effect_unknown","partial"],{mode:"not_cancellable"},"durable_effect","required",Sp(386))},{operation:"workflow_resume_run",operationId:"operation.workflow.resume_run",transport:{kind:"http",route:"/application/workflow/resume-run",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.workflow.resume_run",requestSchema:{schemaId:"schema.workflow.resume_run.request",revision:1},resultSchema:{schemaId:"schema.workflow.resume_run.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","timed_out","failed","effect_unknown","partial"],decodeRequest:Sp(404),decodeResult:Sp(388),decodeSuccess:e=>mE(e,"binding.http.workflow.resume_run","schema.workflow.resume_run.result",1,["completed","timed_out","failed","effect_unknown","partial"],{mode:"not_cancellable"},"durable_effect","required",Sp(388))},{operation:"workflow_retire_definition",operationId:"operation.workflow.retire_definition",transport:{kind:"http",route:"/application/workflow/retire-definition",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.workflow.retire_definition",requestSchema:{schemaId:"schema.workflow.retire_definition.request",revision:1},resultSchema:{schemaId:"schema.workflow.retire_definition.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","timed_out","failed","effect_unknown","partial"],decodeRequest:Sp(405),decodeResult:Sp(386),decodeSuccess:e=>mE(e,"binding.http.workflow.retire_definition","schema.workflow.retire_definition.result",1,["completed","timed_out","failed","effect_unknown","partial"],{mode:"not_cancellable"},"durable_effect","required",Sp(386))},{operation:"workflow_start_run",operationId:"operation.workflow.start_run",transport:{kind:"http",route:"/application/workflow/start-run",method:"POST"},effect:"administrative",idempotency:"required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.workflow.start_run",requestSchema:{schemaId:"schema.workflow.start_run.request",revision:1},resultSchema:{schemaId:"schema.workflow.start_run.result",revision:1},cancellation:{mode:"not_cancellable"},deadline:{behavior:"return_effect_receipt",maximum_millis:3e4},reconciliation:"required",receipt:"durable_effect",terminalStates:["completed","timed_out","failed","effect_unknown","partial"],decodeRequest:Sp(406),decodeResult:Sp(388),decodeSuccess:e=>mE(e,"binding.http.workflow.start_run","schema.workflow.start_run.result",1,["completed","timed_out","failed","effect_unknown","partial"],{mode:"not_cancellable"},"durable_effect","required",Sp(388))},{operation:"workflow_validate_definition",operationId:"operation.workflow.validate_definition",transport:{kind:"http",route:"/application/workflow/validate-definition",method:"POST"},effect:"read",idempotency:"not_required",requestIdControl:"server_minted",resultSemantics:"schema_only",bindingId:"binding.http.workflow.validate_definition",requestSchema:{schemaId:"schema.workflow.validate_definition.request",revision:1},resultSchema:{schemaId:"schema.workflow.validate_definition.result",revision:1},cancellation:{mode:"cooperative",points:["before_admission","before_read","during_read"]},deadline:{behavior:"return_operation_receipt",maximum_millis:3e4},reconciliation:"not_required",receipt:"operation",terminalStates:["completed","cancelled","timed_out","failed","partial"],decodeRequest:Sp(407),decodeResult:Sp(408),decodeSuccess:e=>mE(e,"binding.http.workflow.validate_definition","schema.workflow.validate_definition.result",1,["completed","cancelled","timed_out","failed","partial"],{mode:"cooperative",points:["before_admission","before_read","during_read"]},"operation","not_required",Sp(408))}],Sm=new TextEncoder;class Sf extends Error{cause;constructor(e,t){super(e),this.name=new.target.name,this.cause=t}}class Sh extends Sf{constructor(e){super("the caller aborted the request",e)}}class Sy extends Sf{}class Sg extends Sf{status;constructor(e){super(401===e?"the daemon rejected HTTP authentication":"the daemon rejected the HTTP origin"),this.status=e}}class S_ extends Error{status;payload;constructor(e,t={}){super(e),this.name=new.target.name,this.status=t.status,this.payload=t.payload}}class Sv extends S_{}class Sb extends Error{status;envelope;problem;constructor(e,t){super(`${t.problem.kind}/${t.problem.code}: ${t.problem.message}`),this.name=new.target.name,this.status=e,this.envelope=t,this.problem=t.problem}}class S$ extends Sb{}class SS extends Sb{}class Sk extends Sb{}class Sw extends Sb{}class SV extends Sb{}class SP extends Sb{}class SR extends Sb{}class Sq extends Sb{}class SI extends Sb{}class Sx extends Sb{}class Sj extends Sb{}let SC=new Set(["completed","cancelled","timed_out","failed","unavailable","effect_unknown","partial"]),ST=new TextEncoder;function SO(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}function SE(e){return"number"==typeof e&&Number.isSafeInteger(e)&&e>=0}function SA(e){return"number"==typeof e&&Number.isSafeInteger(e)}function SW(e,t){return"string"==typeof e&&e.length>0&&e.trim()===e&&ST.encode(e).byteLength<=t&&!/\p{Cc}/u.test(e)}function SM(e,t){let r=e.headers.get("content-type");return null!==r&&r.split(";",1)[0]?.trim().toLowerCase()===t}function SN(e){return!!SO(e)&&!!SA(e.started_at)&&!!SA(e.ended_at)&&!(e.ended_at{let o=setTimeout(()=>{t?.removeEventListener("abort",n),r()},e),n=()=>{clearTimeout(o),i(new Sh(t?.reason))};t?.addEventListener("abort",n,{once:!0})})}async function*SL(e,t){let r,i=e.getReader(),o=new TextDecoder("utf-8",{fatal:!0}),n=new Uint8Array(65536),a=0,s=0,d=!1,c="",l=0,p=t??"",u=ST.encode(p).byteLength,m=[],f=0,h=!1,y=()=>new Sv("the daemon returned an SSE line or frame exceeding 65536 bytes",{payload:{limitBytes:65536}}),g=(e,t)=>{try{return o.decode(e,{stream:t})}catch(e){throw new Sv("the daemon returned malformed UTF-8 event-stream data",{payload:e})}},_=e=>{if(""===e){if(h=!1,l=0,0===m.length)return c="",null;let e={event:""===c?"message":c,id:""===p?null:p,data:m.join("\n"),...void 0===r?{}:{retryDelayMs:r}};return c="",m=[],f=0,e}if(e.startsWith(":"))return null;h=!0;let t=e.indexOf(":"),i=t<0?e:e.slice(0,t),o=t<0?"":e.slice(t+1);o.startsWith(" ")&&(o=o.slice(1));let n=ST.encode(o).byteLength;if(("event"===i||"id"===i||"data"===i)&&l+u+f+n+1>65536)throw y();switch(i){case"event":c=o,l=n;break;case"id":o.includes("\0")||(p=o,u=n);break;case"data":f+=n+ +(0!==m.length),m.push(o);break;case"retry":if(/^[0-9]+$/.test(o)){let e=BigInt(o);r=e>2147483647n?0x7fffffff:Number(e)}}return null};try{for(;;){let e=await i.read();if(e.done){g(n.subarray(0,a),!1);break}for(let t=0;t0||h||m.length>0)throw new Sy("operation stream ended with an incomplete SSE event")}catch(e){if(e instanceof S_||e instanceof Sf)throw e;throw new Sy("operation stream transport was interrupted",e)}finally{i.releaseLock()}}class SU{operations;projectRoot;applicationRoot;token;origin;doFetch;mcp;constructor(e){let t=new URL(e.baseUrl);if("http:"!==t.protocol&&"https:"!==t.protocol||""!==t.username||""!==t.password||""!==t.search||""!==t.hash)throw new S_("baseUrl must be an absolute HTTP URL without credentials, query, or fragment");let r=t.toString().replace(/\/+$/u,"");this.projectRoot=`${r}/projects/${encodeURIComponent(e.projectId)}`,this.applicationRoot=`${this.projectRoot}/application`,this.token=e.token,this.origin=e.origin??t.origin,this.doFetch=e.fetch??globalThis.fetch.bind(globalThis),this.mcp=e.mcp;let i={};for(let e of Su)i[e.operation]=(t,r)=>this.#r(e,t,r);this.operations=Object.freeze(i)}headers(e){return new Headers({accept:e,authorization:`Bearer ${this.token}`,origin:this.origin})}operationUrl(e,t){if(t?.size!==void 0&&(!Number.isSafeInteger(t.size)||t.size<1||t.size>1e3))throw new S_("page size must be an integer between 1 and 1000");if(t?.cursor!==void 0&&!SW(t.cursor,4096))throw new S_("page cursor is not a canonical opaque cursor");let r=new URL(`${this.projectRoot}${e}`);return t?.size!==void 0&&r.searchParams.set("page_size",String(t.size)),t?.cursor!==void 0&&r.searchParams.set("cursor",t.cursor),r}lifecycleUrl(e,t){if(!SW(e,512))throw new S_("operationId is not a canonical request handle");return new URL(`${this.applicationRoot}/operations/${encodeURIComponent(e)}/${t}`)}async fetchResponse(e,t,r){try{return await this.doFetch(e,t)}catch(t){if(r?.aborted)throw new Sh(r.reason);throw new Sy(`transport failure requesting ${e.pathname}`,t)}}async readJson(e,t,r,i){let o,n,a=!1,s=()=>n??=o?.cancel(i?.reason)??e.body?.cancel(i?.reason)??Promise.resolve(),d=()=>{s().catch(()=>void 0)};try{if(i?.aborted)throw new Sh(i.reason);if(401===e.status||403===e.status)throw new Sg(e.status);if(!SM(e,"application/json"))throw new Sv("the daemon returned JSON with an invalid media type",{status:e.status});let n="";try{if(o=e.body?.getReader(),i?.addEventListener("abort",d,{once:!0}),i?.aborted)throw new Sh(i.reason);if(void 0!==o){let e=new TextDecoder;for(;;){let{done:t,value:r}=await o.read();if(i?.aborted)throw new Sh(i.reason);if(t)break;n+=e.decode(r,{stream:!0})}n+=e.decode()}a=!0}catch(e){if(i?.aborted)throw new Sh(i.reason);throw new Sy("transport failure reading the daemon response body",e)}let s=Sz(n,e.status);if(SO(s)&&"problem"===s.kind){var c;let i=s.value;if(!function(e){var t,r,i;if(!mA(e)||void 0!==e.binding_id&&"string"!=typeof e.binding_id||!(mA(t=e.contract)&&mN(t.schema_id,512)&&mW(t.schema_revision)&&t.schema_revision>0)||!mN(e.request_id,512)||!mA(e.problem))return!1;let o=e.problem,n=Array.isArray(o.legal_actions)?o.legal_actions:null,a="never"===o.retry?null:"same_request"===o.retry||"after_delay"===o.retry?"same_request":"after_revalidate"===o.retry?"fresh_request":"after_reconcile"===o.retry?"same_operation":void 0;if(!(1===o.revision&&"string"==typeof o.kind&&["invalid_request","not_found_or_not_authorized","conflict","partial_effect","stale","unsupported","unavailable","execution_failed","reset_required","saturated","cancelled","timed_out"].includes(o.kind)&&"string"==typeof o.code&&"string"==typeof o.message&&(null===o.diagnostic||mD(o.diagnostic))&&"detail"in o&&(null===o.detail||function(e){if(!mA(e))return!1;switch(e.kind){case"parked":return"string"==typeof e.cause&&"string"==typeof e.remedy&&"boolean"==typeof e.retries_on_wake;case"stale_refresh_frontier":return mW(e.requested)&&mW(e.committed)&&mW(e.active);case"stale_precondition":return"string"==typeof e.field&&mW(e.requested)&&mW(e.current);case"lock_deadline":return"string"==typeof e.resource&&mW(e.deadline_ms);case"diagnostics_unsupported":return(null===e.file||"string"==typeof e.file)&&Array.isArray(e.searched)&&e.searched.every(e=>mA(e)&&"string"==typeof e.path&&"boolean"==typeof e.present);case"diagnostics_pending":return"string"==typeof e.producer&&(null===e.generation||"string"==typeof e.generation);case"code_graph_rewarming":return mW(e.retry_after_millis);case"reset_required":return"string"==typeof e.authority&&(null===e.found_version||mM(e.found_version))&&(null===e.required_version||mM(e.required_version))&&"string"==typeof e.reason&&"string"==typeof e.remedy;default:return!1}}(o.detail))&&"committed_receipt"in o&&"string"==typeof o.owning_layer&&"string"==typeof o.terminality&&"boolean"==typeof o.retryable&&"string"==typeof o.retry&&(null===o.retry_scope||"string"==typeof o.retry_scope)&&(null===o.retry_after_millis||mW(o.retry_after_millis))&&"cancellation_stage"in o&&(null===o.cancellation_stage||"string"==typeof o.cancellation_stage&&["before_admission","before_read","during_read","before_effect","effect_in_flight"].includes(o.cancellation_stage))&&"unavailable_classification"in o&&(null===o.unavailable_classification||"string"==typeof o.unavailable_classification&&["authority","backend_unavailable","backend_disconnected","backend_retryable"].includes(o.unavailable_classification))&&"execution_failure_classification"in o&&(null===o.execution_failure_classification||"string"==typeof o.execution_failure_classification&&["denied","malformed_output","permanent"].includes(o.execution_failure_classification))&&o.request_id===e.request_id&&mN(o.trace_id,512)&&Array.isArray(o.details)&&o.details.every(mD)&&null!==n&&n.every(e=>"string"==typeof e)&&"coverage"in o)||null===n)return!1;let s=null!==o.cancellation_stage&&"before_admission"!==o.cancellation_stage,d=null!==o.unavailable_classification&&"authority"!==o.unavailable_classification,c="partial_effect"===o.kind||"reset_required"===o.kind||"execution_failed"===o.kind||s||d;return o.terminality===(c?"admitted_terminal":"pre_admission")&&"unavailable"===o.kind==(null!==o.unavailable_classification)&&"execution_failed"===o.kind==(null!==o.execution_failure_classification)&&("cancelled"===o.kind||"timed_out"===o.kind)==(null!==o.cancellation_stage)&&null!==o.diagnostic===("string"==typeof o.kind&&["invalid_request","conflict","partial_effect","stale","unsupported","unavailable","execution_failed","reset_required","saturated"].includes(o.kind))&&(null===o.detail||!!("string"==typeof o.kind&&["stale","unsupported","unavailable","reset_required","saturated"].includes(o.kind)))&&o.retryable===("never"!==o.retry)&&void 0!==a&&o.retry_scope===a&&"after_delay"===o.retry==(null!==o.retry_after_millis)&&("partial_effect"===o.kind?"admitted_terminal"===o.terminality&&!1===o.retryable&&"never"===o.retry&&(r=o.committed_receipt,i=e.request_id,mA(r)&&r.request_id===i&&"partial"===r.outcome&&"string"==typeof r.operation&&"string"==typeof r.effect_class&&"string"==typeof r.idempotency_key&&"string"==typeof r.input_digest&&("string"==typeof r.committed_state||"string"==typeof r.external_proof))&&1===n.length&&"reconcile"===n[0]:"reset_required"===o.kind?"admitted_terminal"===o.terminality&&!1===o.retryable&&"never"===o.retry&&null===o.committed_receipt&&1===n.length&&"reset"===n[0]:"unavailable"===o.kind&&"authority"!==o.unavailable_classification?"admitted_terminal"===o.terminality&&!0===o.retryable&&"after_revalidate"===o.retry&&null===o.committed_receipt&&1===n.length&&"retry"===n[0]:"execution_failed"===o.kind?"admitted_terminal"===o.terminality&&!1===o.retryable&&"never"===o.retry&&null===o.committed_receipt&&1===n.length&&"contact_administrator"===n[0]:null===o.committed_receipt)}(i))throw new Sv("the daemon returned a malformed problem envelope",{status:e.status,payload:i});let o=void 0===t||(c=[t],"not_found_or_not_authorized"===i.problem.kind?void 0===i.binding_id:c.some(e=>e===i.binding_id));if(e.ok||!o||void 0!==r&&i.request_id!==r||!function(e,t){switch(t){case"invalid_request":return 400===e;case"not_found_or_not_authorized":return 404===e;case"conflict":case"partial_effect":case"stale":return 409===e;case"unsupported":return 422===e;case"unavailable":case"reset_required":return 503===e;case"execution_failed":return 500===e;case"saturated":return 429===e;case"cancelled":return 408===e;case"timed_out":return 504===e;default:return!1}}(e.status,i.problem.kind))throw new Sv("the daemon returned a malformed problem envelope",{status:e.status,payload:i});throw function(e,t){switch(t.problem.kind){case"not_found_or_not_authorized":return new S$(e,t);case"unavailable":return new SS(e,t);case"unsupported":return new Sk(e,t);case"stale":return new Sw(e,t);case"conflict":return new SV(e,t);case"partial_effect":return new SP(e,t);case"reset_required":return new SR(e,t);case"saturated":return new Sq(e,t);case"cancelled":return new SI(e,t);case"timed_out":return new Sx(e,t);case"invalid_request":return new Sj(e,t);default:return new Sb(e,t)}}(e.status,i)}return s}finally{i?.removeEventListener("abort",d);try{a||await s()}catch{}finally{o?.releaseLock()}}}async #r(e,t,r={}){var i,o,n,a;let s=e.decodeRequest(t);if("http"!==e.transport.kind){let t;if(void 0!==r.page||void 0!==r.deadlineMicros||void 0!==r.requestId)throw new S_(`${e.operation} does not accept HTTP transport options`);if(void 0===this.mcp)throw new Sf(`${e.operation} requires an MCP tool adapter`);try{t=await this.mcp.callTool(e.transport.toolName,s,{signal:r.signal})}catch(t){if(r.signal?.aborted)throw new Sh(r.signal.reason??t);throw new Sf(`MCP tool ${e.transport.toolName} failed`,t)}try{return e.decodeResult(t)}catch(r){throw new Sv(`MCP tool ${e.transport.toolName} returned an invalid ${e.operation} result`,{payload:{response:t,cause:r}})}}let d=this.operationUrl(e.transport.route,r.page),c=JSON.stringify(s);if(void 0===c)throw new S_(`${e.operation} request decoder returned a non-JSON value`);let l=this.headers("application/json");l.set("content-type","application/json");let p=(i=l,o=e,void 0!==(n=r).deadlineMicros&&(!Number.isSafeInteger(n.deadlineMicros)||n.deadlineMicros<=0)?"deadlineMicros must be a positive safe integer":"required"===o.requestIdControl&&void 0===n.requestId?`${o.operation} requires a stable requestId replay handle`:"server_minted"===o.requestIdControl&&void 0!==n.requestId?`${o.operation} uses a server-minted request ID`:void 0===n.requestId||(a=n.requestId).length>0&&a.trim()===a&&Sm.encode(a).byteLength<=512&&!/\p{Cc}/u.test(a)?void(void 0!==n.deadlineMicros&&i.set("x-tracedecay-deadline-micros",String(n.deadlineMicros)),void 0!==n.requestId&&i.set("x-tracedecay-request-id",n.requestId)):"requestId is not a canonical request identity");if(void 0!==p)throw new S_(p);let u=await this.fetchResponse(d,{method:e.transport.method,headers:l,body:c,signal:r.signal},r.signal),m=await this.readJson(u,e.bindingId,r.requestId,r.signal);if(!SO(m)||"success"!==m.kind)throw new Sv("the daemon returned an unknown HTTP envelope",{status:u.status,payload:m});if(!u.ok)throw new Sv("the daemon returned success with a failing HTTP status",{status:u.status,payload:m});try{let t=e.decodeSuccess(m.value);if(!(SO(t)&&SO(t.outcome)&&SO(t.outcome.value)&&"payload"in t.outcome.value&&SN(t.outcome.value.execution))||("evidence"===t.outcome.outcome?"completed"===t.outcome.value.execution.termination&&null===t.outcome.value.payload:"preview"!==t.outcome.outcome&&"effect"!==t.outcome.outcome))throw TypeError("decoded application success invariants are invalid");if(void 0!==r.requestId&&t.request_id!==r.requestId)throw TypeError("daemon returned a different application request ID");if("fact_store_curate_receipt"===e.resultSemantics&&!await async function(e,t){if(!mA(e)||!mA(t)||!mA(t.outcome))return!1;let r=t.outcome,i=mA(r.value)?r.value.payload:void 0;if("effect"!==r.outcome||!mA(i)||!mN(t.request_id,512)||"request_digest,run_id,state,task"!==Object.keys(i).sort().join(",")||i.run_id!==t.request_id||"memory_curator"!==i.task||"started"!==i.state)return!1;let o=e.fact_review_limit??24,n=e.min_confidence_millionths??72e4;return!!mW(o)&&!(o<1)&&!(o>1e3)&&!!mW(n)&&!(n>1e6)&&!!await async function(e){return!!mA(e)&&"project_id,reference,repository_id,scope_digest,worktree_id"===Object.keys(e).sort().join(",")&&!!mN(e.project_id,512)&&!!mN(e.repository_id,512)&&!!mN(e.worktree_id,512)&&(null===e.reference||!!mN(e.reference,512))&&e.scope_digest===await mz(["tracedecay.application.scope.v1",e.project_id,e.repository_id,e.worktree_id,e.reference])}(t.scope)&&i.request_digest===await mz(["tracedecay.automation-run.request-identity.v1",{kind:"memory_curator",options:{fact_review_limit:o,min_confidence_millionths:n}}])}(s,t))throw TypeError("automatic curation receipt invariants are invalid");return t}catch(t){throw new Sv(`the daemon returned an invalid ${e.operation} success envelope`,{status:u.status,payload:{envelope:m.value,cause:t}})}}async *streamOperation(e,t={}){let r=t.resume?.resumeToken,i=t.resume?.nextSequence===void 0?void 0:function(e,t){let r;if("number"==typeof e){if(!SE(e))throw new S_(`${t} must be an unsigned safe integer`);r=BigInt(e)}else if("bigint"==typeof e)r=e;else if(/^[0-9]+$/.test(e))r=BigInt(e);else throw new S_(`${t} must be unsigned decimal`);if(r<0n||r>0xffffffffffffffffn)throw new S_(`${t} exceeds the canonical u64 range`);return r.toString()}(t.resume.nextSequence,"resume nextSequence");if(void 0!==r&&!SW(r,4096))throw new S_("resumeToken is not a canonical stream resume token");let o=t.maxReconnects??0;if(!Number.isSafeInteger(o)||o<0)throw new S_("maxReconnects must be a non-negative integer");let n=0,a=void 0===i||"0"===i?void 0:(BigInt(i)-1n).toString(),s=0;for(;;){let d;if(t.signal?.aborted)throw new Sh(t.signal.reason);let c=this.lifecycleUrl(e,"events");void 0!==i&&c.searchParams.set("next_sequence",i),void 0!==r&&c.searchParams.set("resume_token",r);try{d=await this.fetchResponse(c,{method:"GET",headers:this.headers("text/event-stream"),signal:t.signal},t.signal)}catch(e){if(0===n||n>=o||!(e instanceof Sy))throw e;n+=1,await SF(s,t.signal);continue}let l=!1;try{if(!d.ok||null===d.body)throw await this.readJson(d,void 0,void 0,t.signal),new Sv("the daemon did not open an SSE stream",{status:d.status});if(!SM(d,"text/event-stream"))throw new Sv("the daemon opened an operation stream with an invalid media type",{status:d.status});try{for await(let t of SL(d.body)){void 0!==t.retryDelayMs&&(s=t.retryDelayMs);let o=function(e,t,r){let i=Sz(e.data,t);if(!SO(i)||"string"!=typeof i.event||i.event!==e.event||!SO(i.data))throw new Sv("the daemon returned a malformed SSE event",{status:t,payload:i});let o=i.event,n=i.data;if("open"===o){let e=n.frontier;if(n.correlation_id!==r||!SO(e)||!SE(e.next_sequence)||!SE(e.retained_from_sequence)||null!==e.resume_token&&"string"!=typeof e.resume_token)throw new Sv("the daemon returned a malformed SSE open frontier",{status:t,payload:i});return{event:{...i,event:o,data:n},frontier:{nextSequence:String(e.next_sequence),..."string"==typeof e.resume_token?{resumeToken:e.resume_token}:{}}}}if(!SE(n.sequence)||null===e.id)throw new Sv("the daemon returned an SSE event without a valid sequence",{status:t,payload:i});let a=String(n.sequence);if(e.id!==a)throw new Sv("the SSE event ID does not match its canonical sequence",{status:t,payload:i});if("item"===o&&!("item"in n))throw new Sv("the SSE item payload is missing",{status:t,payload:i});if("progress"===o&&(!SE(n.completed)||null!==n.total&&!SE(n.total)))throw new Sv("the SSE progress payload is malformed",{status:t,payload:i});if("resume_gap"===o){let e=n.gap;if(!SO(e)||!SE(e.first_missing_sequence)||!SE(e.last_missing_sequence)||e.first_missing_sequence!==n.sequence||e.first_missing_sequence>e.last_missing_sequence||!SO(e.frontier)||!SE(e.frontier.next_sequence)||!SE(e.frontier.retained_from_sequence)||null!==e.frontier.resume_token&&"string"!=typeof e.frontier.resume_token)throw new Sv("the SSE resume gap is malformed",{status:t,payload:i})}if(SC.has(o)){let e=n.terminal;if(!SO(e)||!SN(e.receipt))throw new Sv("the SSE terminal event is malformed",{status:t,payload:i});if(e.termination!==o||e.receipt.termination!==o)throw new Sv("the SSE terminal event is inconsistent",{status:t,payload:i})}let s={...i,event:o,data:n};if("resume_gap"===o){let e=n.gap,t=e.frontier;return{event:s,sequence:a,lastSequence:String(e.last_missing_sequence),frontier:{nextSequence:(BigInt(e.last_missing_sequence)+1n).toString(),..."string"==typeof t.resume_token?{resumeToken:t.resume_token}:{}}}}return{event:s,sequence:a}}(t,d.status,e);if(void 0!==o.frontier&&(i=o.frontier.nextSequence,r=o.frontier.resumeToken),void 0!==o.sequence){if(void 0!==a&&BigInt(o.sequence)<=BigInt(a))continue;let e=void 0===a?void 0:SD(a);if(void 0!==e&&o.sequence!==e)throw new Sv("the daemon returned a non-contiguous SSE sequence",{status:d.status,payload:o.event});a=o.lastSequence??o.sequence,i=SD(a)}if(yield{event:t.event,id:o.sequence??null,data:o.event},SC.has(t.event))return}}catch(e){if(l=!0,e instanceof S_)throw e;if(t.signal?.aborted)throw new Sh(t.signal.reason??e);if(n>=o){if(e instanceof Sy)throw e;throw new Sy(`operation stream disconnected after ${n} reconnects`,e)}}}catch(e){throw l=!0,e}finally{try{await d.body?.cancel()}catch(e){if(!l)throw new Sy("failed to close operation stream transport",e)}}if(n>=o)throw new Sy(`operation stream ended before a terminal event after ${n} reconnects`);if(void 0===i||void 0===r)throw new Sy("operation stream ended before exposing a resumable frontier");n+=1,await SF(s,t.signal)}}async cancelOperation(e,t={}){let r=await this.fetchResponse(this.lifecycleUrl(e,"cancel"),{method:"POST",headers:this.headers("application/json"),signal:t.signal},t.signal),i=await this.readJson(r,void 0,void 0,t.signal);if(!SO(i))throw new Sv("the daemon returned a malformed cancellation response",{status:r.status,payload:i});let o=i.status,n="requested"===o&&202===r.status||("already_requested"===o||"already_terminal"===o)&&200===r.status;if(!r.ok||"requested"!==o&&"already_requested"!==o&&"already_terminal"!==o||!n)throw new Sv("the daemon returned a malformed cancellation response",{status:r.status,payload:i});return{...i,status:o}}}function SH(e){let t=Su.find(t=>t.operation===e);if(void 0===t||"mcp_tool"!==t.transport.kind)throw TypeError(`${e} is not an MCP-backed operation in the canonical catalog`);return t}let SG=SH("project_list"),SB=SH("project_context");class SK{#i;constructor(e){this.#i=e}projectList(e,t){return this.#o(SG,e,t)}projectContext(e,t){return this.#o(SB,e,t)}async #o(e,t,r){let i,o=e.transport.toolName,n=e.decodeRequest(t);try{i=await this.#i(o,n,r)}catch(e){if(r?.aborted)throw new Sh(r.reason??e);throw new Sf(`MCP tool ${o} failed`,e)}try{return e.decodeResult(i)}catch(t){throw new Sv(`MCP tool ${o} returned an invalid ${e.operation} result`,{payload:{response:i,cause:t}})}}}var SJ=Object.create,SZ=Object.defineProperty,SQ=Object.getOwnPropertyDescriptor,SX=Object.getOwnPropertyNames,SY=Object.getPrototypeOf,S1=Object.prototype.hasOwnProperty,S0=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);let S2=new Set(["https://json-schema.org/draft/2020-12/schema","http://json-schema.org/draft/2020-12/schema"]),S4=new Set(["https://json-schema.org/draft/2019-09/schema","http://json-schema.org/draft/2019-09/schema"]),S6=new Set(["https://json-schema.org/draft-07/schema","http://json-schema.org/draft-07/schema"]),S3=new Set(["https://json-schema.org/draft-06/schema","http://json-schema.org/draft-06/schema"]),S9=["2025-11-25","2025-06-18","2025-03-26","2024-11-05","2024-10-07"],S5="io.modelcontextprotocol/protocolVersion",S8="io.modelcontextprotocol/clientInfo",S7="io.modelcontextprotocol/serverInfo",ke="io.modelcontextprotocol/clientCapabilities",kt="io.modelcontextprotocol/subscriptionId",kr="io.modelcontextprotocol/logLevel",ki=aa(()=>nL([o7(),nV(),nI(),nj(),nJ(o7(),ki),nM(ki)])),ko=nJ(o7(),ki),kn=nM(ki),ka=nL([o7(),nV().int()]),ks=o7(),kd=nz({ttl:nV().optional()}),kc=nz({taskId:o7()}),kl=nD({progressToken:ka.optional(),"io.modelcontextprotocol/related-task":kc.optional()}),kp=nz({_meta:kl.optional()}),ku=kp.extend({task:kd.optional()}),km=nz({method:o7(),params:kp.loose().optional()}),kf=nz({_meta:kl.optional()}),kh=nz({method:o7(),params:kf.loose().optional()}),ky=nD({get[S7](){return kj.optional().catch(void 0)}}),kg=nD({_meta:ky.optional()}),k_=nL([o7(),nV().int()]),kv=nz({jsonrpc:nY("2.0"),id:k_,...km.shape}).strict(),kb=nz({jsonrpc:nY("2.0"),...kh.shape}).strict(),k$=nz({jsonrpc:nY("2.0"),id:k_,result:kg}).strict(),kS=nz({jsonrpc:nY("2.0"),id:k_.optional(),error:nz({code:nV().int(),message:o7(),data:nE().optional()})}).strict(),kk=nL([kv,kb,k$,kS]),kw=nL([k$,kS]),kV=kg.strict(),kP=kf.extend({requestId:k_.optional(),reason:o7().optional()}),kR=kh.extend({method:nY("notifications/cancelled"),params:kP}),kq=nz({src:o7(),mimeType:o7().optional(),sizes:nM(o7()).optional(),theme:nQ(["light","dark"]).optional()}),kI=nz({icons:nM(kq).optional()}),kx=nz({name:o7(),title:o7().optional()}),kj=kx.extend({...kx.shape,...kI.shape,version:o7(),websiteUrl:o7().optional(),description:o7().optional()}),kC=nB(nz({applyDefaults:nI().optional()}),ko),kT=ad(e=>e&&"object"==typeof e&&!Array.isArray(e)&&0===Object.keys(e).length?{form:{}}:e,nB(nz({form:kC.optional(),url:ko.optional()}),ko.optional())),kO=nD({list:ko.optional(),cancel:ko.optional(),requests:nD({sampling:nD({createMessage:ko.optional()}).optional(),elicitation:nD({create:ko.optional()}).optional()}).optional()}),kE=nD({list:ko.optional(),cancel:ko.optional(),requests:nD({tools:nD({call:ko.optional()}).optional()}).optional()}),kA=nz({experimental:nJ(o7(),ko).optional(),sampling:nz({context:ko.optional(),tools:ko.optional()}).optional(),elicitation:kT.optional(),roots:nz({listChanged:nI().optional()}).optional(),tasks:kO.optional(),extensions:nJ(o7(),ko).optional()}),kW=kp.extend({protocolVersion:o7(),capabilities:kA,clientInfo:kj}),kM=km.extend({method:nY("initialize"),params:kW}),kN=nz({experimental:nJ(o7(),ko).optional(),logging:ko.optional(),completions:ko.optional(),prompts:nz({listChanged:nI().optional()}).optional(),resources:nz({subscribe:nI().optional(),listChanged:nI().optional()}).optional(),tools:nz({listChanged:nI().optional()}).optional(),tasks:kE.optional(),extensions:nJ(o7(),ko).optional()}),kz=kg.extend({protocolVersion:o7(),capabilities:kN,serverInfo:kj,instructions:o7().optional()}),kD=kh.extend({method:nY("notifications/initialized"),params:kf.optional()}),kF=km.extend({method:nY("server/discover"),params:kp.optional()}),kL=kg.extend({supportedVersions:nM(o7()),capabilities:kN,instructions:o7().optional()}),kU=km.extend({method:nY("ping"),params:kp.optional()}),kH=nz({progress:nV(),total:n4(nV()),message:n4(o7())}),kG=nz({...kf.shape,...kH.shape,progressToken:ka}),kB=kh.extend({method:nY("notifications/progress"),params:kG}),kK=kp.extend({cursor:ks.optional()}),kJ=km.extend({params:kK.optional()}),kZ=kg.extend({nextCursor:ks.optional()}),kQ=nz({uri:o7(),mimeType:n4(o7()),_meta:nJ(o7(),nE()).optional()}),kX=kQ.extend({text:o7()}),kY=o7().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:"Invalid Base64 string"}),k1=kQ.extend({blob:kY}),k0=nQ(["user","assistant"]),k2=nz({audience:nM(k0).optional(),priority:nV().min(0).max(1).optional(),lastModified:ac({offset:!0}).optional()}),k4=nz({...kx.shape,...kI.shape,uri:o7(),description:n4(o7()),mimeType:n4(o7()),size:n4(nV()),annotations:k2.optional(),_meta:n4(nD({}))}),k6=nz({...kx.shape,...kI.shape,uriTemplate:o7(),description:n4(o7()),mimeType:n4(o7()),annotations:k2.optional(),_meta:n4(nD({}))}),k3=kJ.extend({method:nY("resources/list")}),k9=kZ.extend({resources:nM(k4)}),k5=kJ.extend({method:nY("resources/templates/list")}),k8=kZ.extend({resourceTemplates:nM(k6)}),k7=kp.extend({uri:o7()}),we=km.extend({method:nY("resources/read"),params:k7}),wt=kg.extend({contents:nM(nL([kX,k1]))}),wr=kh.extend({method:nY("notifications/resources/list_changed"),params:kf.optional()}),wi=km.extend({method:nY("resources/subscribe"),params:k7}),wo=km.extend({method:nY("resources/unsubscribe"),params:k7}),wn=nz({toolsListChanged:nI().optional(),promptsListChanged:nI().optional(),resourcesListChanged:nI().optional(),resourceSubscriptions:nM(o7()).optional()}),wa=kp.extend({notifications:wn}),ws=km.extend({method:nY("subscriptions/listen"),params:wa}),wd=kf.extend({notifications:wn}),wc=kh.extend({method:nY("notifications/subscriptions/acknowledged"),params:wd}),wl=ky.extend({[kt]:k_}),wp=kg.extend({_meta:wl}),wu=kf.extend({uri:o7()}),wm=kh.extend({method:nY("notifications/resources/updated"),params:wu}),wf=nz({name:o7(),description:n4(o7()),required:n4(nI())}),wh=nz({...kx.shape,...kI.shape,description:n4(o7()),arguments:n4(nM(wf)),_meta:n4(nD({}))}),wy=kJ.extend({method:nY("prompts/list")}),wg=kZ.extend({prompts:nM(wh)}),w_=kp.extend({name:o7(),arguments:nJ(o7(),o7()).optional()}),wv=km.extend({method:nY("prompts/get"),params:w_}),wb=nz({type:nY("text"),text:o7(),annotations:k2.optional(),_meta:nJ(o7(),nE()).optional()}),w$=nz({type:nY("image"),data:kY,mimeType:o7(),annotations:k2.optional(),_meta:nJ(o7(),nE()).optional()}),wS=nz({type:nY("audio"),data:kY,mimeType:o7(),annotations:k2.optional(),_meta:nJ(o7(),nE()).optional()}),wk=nz({type:nY("tool_use"),name:o7(),id:o7(),input:nJ(o7(),nE()),_meta:nJ(o7(),nE()).optional()}),ww=nz({type:nY("resource"),resource:nL([kX,k1]),annotations:k2.optional(),_meta:nJ(o7(),nE()).optional()}),wV=k4.extend({type:nY("resource_link")}),wP=nL([wb,w$,wS,wV,ww]),wR=nz({role:k0,content:wP}),wq=kg.extend({description:o7().optional(),messages:nM(wR)}),wI=kh.extend({method:nY("notifications/prompts/list_changed"),params:kf.optional()}),wx=nz({title:o7().optional(),readOnlyHint:nI().optional(),destructiveHint:nI().optional(),idempotentHint:nI().optional(),openWorldHint:nI().optional()}),wj=nz({taskSupport:nQ(["required","optional","forbidden"]).optional()}),wC=nz({...kx.shape,...kI.shape,description:o7().optional(),inputSchema:nz({type:nY("object"),properties:nJ(o7(),ki).optional(),required:nM(o7()).optional()}).catchall(nE()),outputSchema:nD({$schema:o7().optional()}).optional(),annotations:wx.optional(),execution:wj.optional(),_meta:nJ(o7(),nE()).optional()}),wT=kJ.extend({method:nY("tools/list")}),wO=kZ.extend({tools:nM(wC)}),wE=kg.extend({content:nM(wP).default([]),structuredContent:nE().optional(),isError:nI().optional()}),wA=wE.or(kg.extend({toolResult:nE()})),wW=ku.extend({name:o7(),arguments:nJ(o7(),nE()).optional()}),wM=km.extend({method:nY("tools/call"),params:wW}),wN=kh.extend({method:nY("notifications/tools/list_changed"),params:kf.optional()}),wz=nz({autoRefresh:nI().default(!0),debounceMs:nV().int().nonnegative().default(300)}),wD=nQ(["debug","info","notice","warning","error","critical","alert","emergency"]),wF=kp.extend({level:wD}),wL=km.extend({method:nY("logging/setLevel"),params:wF}),wU=kf.extend({level:wD,logger:o7().optional(),data:nE()}),wH=kh.extend({method:nY("notifications/message"),params:wU}),wG=nz({name:o7().optional()}),wB=nz({hints:nM(wG).optional(),costPriority:nV().min(0).max(1).optional(),speedPriority:nV().min(0).max(1).optional(),intelligencePriority:nV().min(0).max(1).optional()}),wK=nz({mode:nQ(["auto","required","none"]).optional()}),wJ=nz({type:nY("tool_result"),toolUseId:o7().describe("The unique identifier for the corresponding tool call."),content:nM(wP),structuredContent:nE().optional(),isError:nI().optional(),_meta:nJ(o7(),nE()).optional()}),wZ=nH("type",[wb,w$,wS]),wQ=nH("type",[wb,w$,wS,wk,wJ]),wX=nz({role:k0,content:nL([wQ,nM(wQ)]),_meta:nJ(o7(),nE()).optional()}),wY=ku.extend({messages:nM(wX),modelPreferences:wB.optional(),systemPrompt:o7().optional(),includeContext:nQ(["none","thisServer","allServers"]).optional(),temperature:nV().optional(),maxTokens:nV().int(),stopSequences:nM(o7()).optional(),metadata:ko.optional(),tools:nM(wC).optional(),toolChoice:wK.optional()}),w1=km.extend({method:nY("sampling/createMessage"),params:wY}),w0=kg.extend({model:o7(),stopReason:n4(nQ(["endTurn","stopSequence","maxTokens"]).or(o7())),role:k0,content:wZ}),w2=kg.extend({model:o7(),stopReason:n4(nQ(["endTurn","stopSequence","maxTokens","toolUse"]).or(o7())),role:k0,content:nL([wQ,nM(wQ)])}),w4=nz({type:nY("boolean"),title:o7().optional(),description:o7().optional(),default:nI().optional()}),w6=nz({type:nY("string"),title:o7().optional(),description:o7().optional(),minLength:nV().optional(),maxLength:nV().optional(),format:nQ(["email","uri","date","date-time"]).optional(),default:o7().optional()}),w3=nz({type:nQ(["number","integer"]),title:o7().optional(),description:o7().optional(),minimum:nV().optional(),maximum:nV().optional(),default:nV().optional()}),w9=nz({type:nY("string"),title:o7().optional(),description:o7().optional(),enum:nM(o7()),default:o7().optional()}),w5=nz({type:nY("string"),title:o7().optional(),description:o7().optional(),oneOf:nM(nz({const:o7(),title:o7()})),default:o7().optional()}),w8=nz({type:nY("string"),title:o7().optional(),description:o7().optional(),enum:nM(o7()),enumNames:nM(o7()).optional(),default:o7().optional()}),w7=nL([w9,w5]),Ve=nz({type:nY("array"),title:o7().optional(),description:o7().optional(),minItems:nV().optional(),maxItems:nV().optional(),items:nz({type:nY("string"),enum:nM(o7())}),default:nM(o7()).optional()}),Vt=nz({type:nY("array"),title:o7().optional(),description:o7().optional(),minItems:nV().optional(),maxItems:nV().optional(),items:nz({anyOf:nM(nz({const:o7(),title:o7()}))}),default:nM(o7()).optional()}),Vr=nL([Ve,Vt]),Vi=nL([w8,w7,Vr]),Vo=nL([Vi,w4,w6,w3]),Vn=ku.extend({mode:nY("form").optional(),message:o7(),requestedSchema:nz({type:nY("object"),properties:nJ(o7(),Vo),required:nM(o7()).optional()}).catchall(nE())}),Va=ku.extend({mode:nY("url"),message:o7(),elicitationId:o7(),url:o7().url()}),Vs=nL([Vn,Va]),Vd=km.extend({method:nY("elicitation/create"),params:Vs}),Vc=kf.extend({elicitationId:o7()}),Vl=kh.extend({method:nY("notifications/elicitation/complete"),params:Vc}),Vp=kg.extend({action:nQ(["accept","decline","cancel"]),content:ad(e=>null===e?void 0:e,nJ(o7(),nL([o7(),nV(),nI(),nM(o7())])).optional())}),Vu=nz({type:nY("ref/resource"),uri:o7()}),Vm=nz({type:nY("ref/prompt"),name:o7()}),Vf=kp.extend({ref:nL([Vm,Vu]),argument:nz({name:o7(),value:o7()}),context:nz({arguments:nJ(o7(),o7()).optional()}).optional()}),Vh=km.extend({method:nY("completion/complete"),params:Vf}),Vy=kg.extend({completion:nD({values:nM(o7()).max(100),total:n4(nV().int()),hasMore:n4(nI())})}),Vg=nz({uri:o7().startsWith("file://"),name:o7().optional(),_meta:nJ(o7(),nE()).optional()}),V_=km.extend({method:nY("roots/list"),params:kp.optional()}),Vv=kg.extend({roots:nM(Vg)}),Vb=kh.extend({method:nY("notifications/roots/list_changed"),params:kf.optional()}),V$=nD({ttl:nV().optional(),pollInterval:nV().optional()}),VS=nQ(["working","input_required","completed","failed","cancelled"]),Vk=nz({taskId:o7(),status:VS,ttl:nL([nV(),nj()]),createdAt:o7(),lastUpdatedAt:o7(),pollInterval:n4(nV()),statusMessage:n4(o7())}),Vw=kg.extend({task:Vk}),VV=kf.merge(Vk),VP=kh.extend({method:nY("notifications/tasks/status"),params:VV}),VR=km.extend({method:nY("tasks/get"),params:kp.extend({taskId:o7()})}),Vq=kg.merge(Vk),VI=km.extend({method:nY("tasks/result"),params:kp.extend({taskId:o7()})}),Vx=kg.loose(),Vj=kJ.extend({method:nY("tasks/list")}),VC=kZ.extend({tasks:nM(Vk)}),VT=km.extend({method:nY("tasks/cancel"),params:kp.extend({taskId:o7()})}),VO=kg.merge(Vk),VE=nL([kU,kM,kF,Vh,wL,wv,wy,k3,k5,we,wi,wo,ws,wM,wT]),VA=nL([kR,kB,kD,Vb]),VW=nL([kV,w0,w2,Vp,Vv]),VM=nL([kU,w1,Vd,V_]),VN=nL([kR,kB,wH,wm,wr,wN,wI,wc,Vl]),Vz=nL([kV,kz,kL,Vy,wq,wg,k9,k8,wt,wE,wO,wp]),VD=iV(nd,void 0).superRefine((e,t)=>{if(!URL.canParse(e))return t.addIssue({code:d2,message:"URL must be parseable",fatal:!0}),ta}).refine(e=>{let t=new URL(e);return"javascript:"!==t.protocol&&"data:"!==t.protocol&&"vbscript:"!==t.protocol},{message:"URL cannot use javascript:, data:, or vbscript: scheme"}),VF=nD({resource:o7().url(),authorization_servers:nM(VD).optional(),jwks_uri:o7().url().optional(),scopes_supported:nM(o7()).optional(),bearer_methods_supported:nM(o7()).optional(),resource_signing_alg_values_supported:nM(o7()).optional(),resource_name:o7().optional(),resource_documentation:o7().optional(),resource_policy_uri:o7().url().optional(),resource_tos_uri:o7().url().optional(),tls_client_certificate_bound_access_tokens:nI().optional(),authorization_details_types_supported:nM(o7()).optional(),dpop_signing_alg_values_supported:nM(o7()).optional(),dpop_bound_access_tokens_required:nI().optional()}),VL=nD({issuer:o7(),authorization_endpoint:VD,token_endpoint:VD,registration_endpoint:VD.optional(),scopes_supported:nM(o7()).optional(),response_types_supported:nM(o7()),response_modes_supported:nM(o7()).optional(),grant_types_supported:nM(o7()).optional(),token_endpoint_auth_methods_supported:nM(o7()).optional(),token_endpoint_auth_signing_alg_values_supported:nM(o7()).optional(),service_documentation:VD.optional(),revocation_endpoint:VD.optional(),revocation_endpoint_auth_methods_supported:nM(o7()).optional(),revocation_endpoint_auth_signing_alg_values_supported:nM(o7()).optional(),introspection_endpoint:o7().optional(),introspection_endpoint_auth_methods_supported:nM(o7()).optional(),introspection_endpoint_auth_signing_alg_values_supported:nM(o7()).optional(),code_challenge_methods_supported:nM(o7()).optional(),client_id_metadata_document_supported:nI().optional(),authorization_response_iss_parameter_supported:nI().optional().catch(void 0),dpop_signing_alg_values_supported:nM(o7()).optional()}),VU=nD({issuer:o7(),authorization_endpoint:VD,token_endpoint:VD,userinfo_endpoint:VD.optional(),jwks_uri:VD,registration_endpoint:VD.optional(),scopes_supported:nM(o7()).optional(),response_types_supported:nM(o7()),response_modes_supported:nM(o7()).optional(),grant_types_supported:nM(o7()).optional(),acr_values_supported:nM(o7()).optional(),subject_types_supported:nM(o7()),id_token_signing_alg_values_supported:nM(o7()),id_token_encryption_alg_values_supported:nM(o7()).optional(),id_token_encryption_enc_values_supported:nM(o7()).optional(),userinfo_signing_alg_values_supported:nM(o7()).optional(),userinfo_encryption_alg_values_supported:nM(o7()).optional(),userinfo_encryption_enc_values_supported:nM(o7()).optional(),request_object_signing_alg_values_supported:nM(o7()).optional(),request_object_encryption_alg_values_supported:nM(o7()).optional(),request_object_encryption_enc_values_supported:nM(o7()).optional(),token_endpoint_auth_methods_supported:nM(o7()).optional(),token_endpoint_auth_signing_alg_values_supported:nM(o7()).optional(),display_values_supported:nM(o7()).optional(),claim_types_supported:nM(o7()).optional(),claims_supported:nM(o7()).optional(),service_documentation:o7().optional(),claims_locales_supported:nM(o7()).optional(),ui_locales_supported:nM(o7()).optional(),claims_parameter_supported:nI().optional(),request_parameter_supported:nI().optional(),request_uri_parameter_supported:nI().optional(),require_request_uri_registration:nI().optional(),op_policy_uri:VD.optional(),op_tos_uri:VD.optional(),client_id_metadata_document_supported:nI().optional(),authorization_response_iss_parameter_supported:nI().optional().catch(void 0)}),VH=nz({...VU.shape,...VL.pick({code_challenge_methods_supported:!0}).shape}),VG=nz({access_token:o7(),id_token:o7().optional(),token_type:o7(),expires_in:d4().optional(),scope:o7().optional(),refresh_token:o7().optional(),issuer:o7().optional().catch(void 0)}).strip(),VB=nz({issued_token_type:nY("urn:ietf:params:oauth:token-type:id-jag"),access_token:o7(),token_type:o7().optional(),expires_in:nV().optional(),scope:o7().optional()}).strip(),VK=nz({error:o7(),error_description:o7().optional(),error_uri:o7().optional()}),VJ=VD.optional().or(nY("").transform(()=>void 0)),VZ=nz({redirect_uris:nM(VD),token_endpoint_auth_method:o7().optional(),grant_types:nM(o7()).optional(),response_types:nM(o7()).optional(),application_type:o7().optional(),client_name:o7().optional(),client_uri:VD.optional(),logo_uri:VJ,scope:o7().optional(),contacts:nM(o7()).optional(),tos_uri:VJ,policy_uri:o7().optional(),jwks_uri:VD.optional(),jwks:nT().optional(),software_id:o7().optional(),software_version:o7().optional(),software_statement:o7().optional()}).strip(),VQ=nz({client_id:o7(),client_secret:o7().optional(),client_id_issued_at:nV().optional(),client_secret_expires_at:nV().optional(),issuer:o7().optional().catch(void 0)}).strip(),VX=VZ.merge(VQ),VY=nz({error:o7(),error_description:o7().optional()}).strip(),V1=nz({token:o7(),token_type_hint:o7().optional()}).strip(),V0=Symbol.for("mcp.sdk.errorBrands");function V2(e,t){let r=new Set,i=t;for(;"function"==typeof i;){let e=i.mcpBrand;Object.prototype.hasOwnProperty.call(i,"mcpBrand")&&"string"==typeof e&&r.add(e),i=Object.getPrototypeOf(i)}0!==r.size&&Object.defineProperty(e,V0,{value:r,enumerable:!1,configurable:!0})}function V4(e,t){try{if("object"==typeof t&&null!==t&&Object.prototype.hasOwnProperty.call(e,"mcpBrand")&&"string"==typeof e.mcpBrand&&Object.prototype.hasOwnProperty.call(t,V0)){let r=t[V0];if(r&&"function"==typeof r.has&&r.has(e.mcpBrand))return!0}}catch{}return Function.prototype[Symbol.hasInstance].call(e,t)}(class e extends Error{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.OAuthError"})}static[Symbol.hasInstance](e){return V4(this,e)}static isInstance(e){if("function"!=typeof this)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return V4(this,e)}constructor(e,t,r){super(t),this.code=e,this.errorUri=r,this.name="OAuthError",V2(this,new.target)}toResponseObject(){let e={error:this.code,error_description:this.message};return this.errorUri&&(e.error_uri=this.errorUri),e}static fromResponse(t){return new e(t.error,t.error_description??t.error,t.error_uri)}});let V6=((X={}).NotConnected="NOT_CONNECTED",X.AlreadyConnected="ALREADY_CONNECTED",X.NotInitialized="NOT_INITIALIZED",X.CapabilityNotSupported="CAPABILITY_NOT_SUPPORTED",X.RequestTimeout="REQUEST_TIMEOUT",X.ConnectionClosed="CONNECTION_CLOSED",X.SendFailed="SEND_FAILED",X.InvalidResult="INVALID_RESULT",X.UnsupportedResultType="UNSUPPORTED_RESULT_TYPE",X.InputRequiredRoundsExceeded="INPUT_REQUIRED_ROUNDS_EXCEEDED",X.ListPaginationExceeded="LIST_PAGINATION_EXCEEDED",X.MethodNotSupportedByProtocolVersion="METHOD_NOT_SUPPORTED_BY_PROTOCOL_VERSION",X.EraNegotiationFailed="ERA_NEGOTIATION_FAILED",X.ClientHttpNotImplemented="CLIENT_HTTP_NOT_IMPLEMENTED",X.ClientHttpAuthentication="CLIENT_HTTP_AUTHENTICATION",X.ClientHttpForbidden="CLIENT_HTTP_FORBIDDEN",X.ClientHttpUnexpectedContent="CLIENT_HTTP_UNEXPECTED_CONTENT",X.ClientHttpFailedToOpenStream="CLIENT_HTTP_FAILED_TO_OPEN_STREAM",X.ClientHttpFailedToTerminateSession="CLIENT_HTTP_FAILED_TO_TERMINATE_SESSION",X);var V3=class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.SdkError"})}static[Symbol.hasInstance](e){return V4(this,e)}static isInstance(e){if("function"!=typeof this)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return V4(this,e)}constructor(e,t,r,i){super(t,i),this.code=e,this.data=r,this.name="SdkError",V2(this,new.target)}},V9=class extends V3{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.SdkHttpError"})}constructor(e,t,r,i){super(e,t,r,i),this.name="SdkHttpError"}get status(){return this.data.status}get statusText(){return this.data.statusText}};let V5="2026-07-28",V8=[V5];function V7(e){return e.filter(e=>!(e>=V5))}function Pe(e){return e.filter(e=>e>=V5)}function Pt(e){let t=e.structuredContent;return void 0===t||!("object"!=typeof t||null===t||Array.isArray(t))||e.content?.some(e=>"text"===e.type)?e:{...e,content:[...e.content??[],{type:"text",text:JSON.stringify(t)}]}}let Pr=["task","inputRequests","requestState"];function Pi(e){return null===e||"object"!=typeof e||Array.isArray(e)||void 0!==e.content||Pr.some(t=>t in e)?e:{...e,content:[]}}function Po(){let e,t,r,i,o,n,a,s,c,l,p,u,m,f,h,y,g,_,v,b,$,S,k,w,V,P,R,q,I,x,j,C,T,O,E,A,W,M,N,z,D,F,L,U,H,G,B,K,J,Z,Q,X,Y,ee,et,er,ei,eo,en,ea,es,ed,ec,el,ep,eu,em,ef,eh,ey,eg,e_,ev,eb,e$,eS,ek,ew,eV,eP,eR,eq,eI,ex,ej,eC,eT,eO,eE,eA,eW,eM,eN,ez,eD,eF,eL,eU,eH,eG,eB,eK,eJ,eZ,eQ,eX,eY,e1,e0,e2,e4,e6,e3,e9,e5,e8,e7,te,tt,tr,ti,to,tn,ta,ts,td,tc,tl,tp,tu,tm,tf,th,ty,tg,t_,tv,tb,t$,tS;return d??=(e=aa(()=>nL([o7(),nV(),nI(),nj(),nJ(o7(),e),nM(e)])),t=nJ(o7(),e),r=nL([o7(),nV().int()]),i=o7(),o=nz({ttl:nV().optional()}),n=nz({taskId:o7()}),c=(s=nz({_meta:(a=nD({progressToken:r.optional(),"io.modelcontextprotocol/related-task":n.optional()})).optional()})).extend({task:o.optional()}),l=nz({method:o7(),params:s.loose().optional()}),p=nz({_meta:a.optional()}),u=nz({method:o7(),params:p.loose().optional()}),m=nD({_meta:a.optional()}),f=nL([o7(),nV().int()]),h=m.strict(),y=p.extend({requestId:f.optional(),reason:o7().optional()}),g=u.extend({method:nY("notifications/cancelled"),params:y}),_=nz({src:o7(),mimeType:o7().optional(),sizes:nM(o7()).optional(),theme:nQ(["light","dark"]).optional()}),v=nz({icons:nM(_).optional()}),$=(b=nz({name:o7(),title:o7().optional()})).extend({...b.shape,...v.shape,version:o7(),websiteUrl:o7().optional(),description:o7().optional()}),S=nB(nz({applyDefaults:nI().optional()}),t),k=ad(e=>e&&"object"==typeof e&&!Array.isArray(e)&&0===Object.keys(e).length?{form:{}}:e,nB(nz({form:S.optional(),url:t.optional()}),t.optional())),w=nD({list:t.optional(),cancel:t.optional(),requests:nD({sampling:nD({createMessage:t.optional()}).optional(),elicitation:nD({create:t.optional()}).optional()}).optional()}),V=nD({list:t.optional(),cancel:t.optional(),requests:nD({tools:nD({call:t.optional()}).optional()}).optional()}),P=nz({experimental:nJ(o7(),t).optional(),sampling:nz({context:t.optional(),tools:t.optional()}).optional(),elicitation:k.optional(),roots:nz({listChanged:nI().optional()}).optional(),tasks:w.optional(),extensions:nJ(o7(),t).optional()}),R=s.extend({protocolVersion:o7(),capabilities:P,clientInfo:$}),q=l.extend({method:nY("initialize"),params:R}),I=nz({experimental:nJ(o7(),t).optional(),logging:t.optional(),completions:t.optional(),prompts:nz({listChanged:nI().optional()}).optional(),resources:nz({subscribe:nI().optional(),listChanged:nI().optional()}).optional(),tools:nz({listChanged:nI().optional()}).optional(),tasks:V.optional(),extensions:nJ(o7(),t).optional()}),x=m.extend({protocolVersion:o7(),capabilities:I,serverInfo:$,instructions:o7().optional()}),j=u.extend({method:nY("notifications/initialized"),params:p.optional()}),C=l.extend({method:nY("ping"),params:s.optional()}),T=nz({progress:nV(),total:n4(nV()),message:n4(o7())}),O=nz({...p.shape,...T.shape,progressToken:r}),E=u.extend({method:nY("notifications/progress"),params:O}),A=s.extend({cursor:i.optional()}),W=l.extend({params:A.optional()}),M=m.extend({nextCursor:i.optional()}),z=(N=nz({uri:o7(),mimeType:n4(o7()),_meta:nJ(o7(),nE()).optional()})).extend({text:o7()}),D=o7().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:"Invalid Base64 string"}),F=N.extend({blob:D}),U=nz({audience:nM(L=nQ(["user","assistant"])).optional(),priority:nV().min(0).max(1).optional(),lastModified:ac({offset:!0}).optional()}),H=nz({...b.shape,...v.shape,uri:o7(),description:n4(o7()),mimeType:n4(o7()),size:n4(nV()),annotations:U.optional(),_meta:n4(nD({}))}),G=nz({...b.shape,...v.shape,uriTemplate:o7(),description:n4(o7()),mimeType:n4(o7()),annotations:U.optional(),_meta:n4(nD({}))}),B=W.extend({method:nY("resources/list")}),K=M.extend({resources:nM(H)}),J=W.extend({method:nY("resources/templates/list")}),Z=M.extend({resourceTemplates:nM(G)}),Q=s.extend({uri:o7()}),X=l.extend({method:nY("resources/read"),params:Q}),Y=m.extend({contents:nM(nL([z,F]))}),ee=u.extend({method:nY("notifications/resources/list_changed"),params:p.optional()}),et=l.extend({method:nY("resources/subscribe"),params:Q}),er=l.extend({method:nY("resources/unsubscribe"),params:Q}),ei=p.extend({uri:o7()}),eo=u.extend({method:nY("notifications/resources/updated"),params:ei}),en=nz({name:o7(),description:n4(o7()),required:n4(nI())}),ea=nz({...b.shape,...v.shape,description:n4(o7()),arguments:n4(nM(en)),_meta:n4(nD({}))}),es=W.extend({method:nY("prompts/list")}),ed=M.extend({prompts:nM(ea)}),ec=s.extend({name:o7(),arguments:nJ(o7(),o7()).optional()}),el=l.extend({method:nY("prompts/get"),params:ec}),ep=nz({type:nY("text"),text:o7(),annotations:U.optional(),_meta:nJ(o7(),nE()).optional()}),eu=nz({type:nY("image"),data:D,mimeType:o7(),annotations:U.optional(),_meta:nJ(o7(),nE()).optional()}),em=nz({type:nY("audio"),data:D,mimeType:o7(),annotations:U.optional(),_meta:nJ(o7(),nE()).optional()}),ef=nz({type:nY("tool_use"),name:o7(),id:o7(),input:nJ(o7(),nE()),_meta:nJ(o7(),nE()).optional()}),eh=nz({type:nY("resource"),resource:nL([z,F]),annotations:U.optional(),_meta:nJ(o7(),nE()).optional()}),e_=nz({role:L,content:eg=nL([ep,eu,em,ey=H.extend({type:nY("resource_link")}),eh])}),ev=m.extend({description:o7().optional(),messages:nM(e_)}),eb=u.extend({method:nY("notifications/prompts/list_changed"),params:p.optional()}),e$=nz({title:o7().optional(),readOnlyHint:nI().optional(),destructiveHint:nI().optional(),idempotentHint:nI().optional(),openWorldHint:nI().optional()}),eS=nz({taskSupport:nQ(["required","optional","forbidden"]).optional()}),ek=nz({...b.shape,...v.shape,description:o7().optional(),inputSchema:nz({type:nY("object"),properties:nJ(o7(),e).optional(),required:nM(o7()).optional()}).catchall(nE()),outputSchema:nz({type:nY("object"),properties:nJ(o7(),e).optional(),required:nM(o7()).optional()}).catchall(nE()).optional(),annotations:e$.optional(),execution:eS.optional(),_meta:nJ(o7(),nE()).optional()}),ew=W.extend({method:nY("tools/list")}),eV=M.extend({tools:nM(ek)}),eP=m.extend({content:nM(eg),structuredContent:nJ(o7(),nE()).optional(),isError:nI().optional()}),eR=c.extend({name:o7(),arguments:nJ(o7(),nE()).optional()}),eq=l.extend({method:nY("tools/call"),params:eR}),eI=u.extend({method:nY("notifications/tools/list_changed"),params:p.optional()}),ex=nQ(["debug","info","notice","warning","error","critical","alert","emergency"]),ej=s.extend({level:ex}),eC=l.extend({method:nY("logging/setLevel"),params:ej}),eT=p.extend({level:ex,logger:o7().optional(),data:nE()}),eO=u.extend({method:nY("notifications/message"),params:eT}),eE=nz({name:o7().optional()}),eA=nz({hints:nM(eE).optional(),costPriority:nV().min(0).max(1).optional(),speedPriority:nV().min(0).max(1).optional(),intelligencePriority:nV().min(0).max(1).optional()}),eW=nz({mode:nQ(["auto","required","none"]).optional()}),eM=nz({type:nY("tool_result"),toolUseId:o7().describe("The unique identifier for the corresponding tool call."),content:nM(eg),structuredContent:nz({}).loose().optional(),isError:nI().optional(),_meta:nJ(o7(),nE()).optional()}),eN=nH("type",[ep,eu,em]),eD=nz({role:L,content:nL([ez=nH("type",[ep,eu,em,ef,eM]),nM(ez)]),_meta:nJ(o7(),nE()).optional()}),eF=c.extend({messages:nM(eD),modelPreferences:eA.optional(),systemPrompt:o7().optional(),includeContext:nQ(["none","thisServer","allServers"]).optional(),temperature:nV().optional(),maxTokens:nV().int(),stopSequences:nM(o7()).optional(),metadata:t.optional(),tools:nM(ek).optional(),toolChoice:eW.optional()}),eL=l.extend({method:nY("sampling/createMessage"),params:eF}),eU=m.extend({model:o7(),stopReason:n4(nQ(["endTurn","stopSequence","maxTokens"]).or(o7())),role:L,content:eN}),eH=m.extend({model:o7(),stopReason:n4(nQ(["endTurn","stopSequence","maxTokens","toolUse"]).or(o7())),role:L,content:nL([ez,nM(ez)])}),eG=nz({type:nY("boolean"),title:o7().optional(),description:o7().optional(),default:nI().optional()}),eB=nz({type:nY("string"),title:o7().optional(),description:o7().optional(),minLength:nV().optional(),maxLength:nV().optional(),format:nQ(["email","uri","date","date-time"]).optional(),default:o7().optional()}),eK=nz({type:nQ(["number","integer"]),title:o7().optional(),description:o7().optional(),minimum:nV().optional(),maximum:nV().optional(),default:nV().optional()}),eJ=nz({type:nY("string"),title:o7().optional(),description:o7().optional(),enum:nM(o7()),default:o7().optional()}),eZ=nz({type:nY("string"),title:o7().optional(),description:o7().optional(),oneOf:nM(nz({const:o7(),title:o7()})),default:o7().optional()}),eQ=nz({type:nY("string"),title:o7().optional(),description:o7().optional(),enum:nM(o7()),enumNames:nM(o7()).optional(),default:o7().optional()}),eX=nL([eJ,eZ]),eY=nz({type:nY("array"),title:o7().optional(),description:o7().optional(),minItems:nV().optional(),maxItems:nV().optional(),items:nz({type:nY("string"),enum:nM(o7())}),default:nM(o7()).optional()}),e0=nL([eY,e1=nz({type:nY("array"),title:o7().optional(),description:o7().optional(),minItems:nV().optional(),maxItems:nV().optional(),items:nz({anyOf:nM(nz({const:o7(),title:o7()}))}),default:nM(o7()).optional()})]),e2=nL([eQ,eX,e0]),e4=nL([e2,eG,eB,eK]),e6=c.extend({mode:nY("form").optional(),message:o7(),requestedSchema:nz({type:nY("object"),properties:nJ(o7(),e4),required:nM(o7()).optional()}).catchall(nE())}),e9=nL([e6,e3=c.extend({mode:nY("url"),message:o7(),elicitationId:o7(),url:o7().url()})]),e5=l.extend({method:nY("elicitation/create"),params:e9}),e8=p.extend({elicitationId:o7()}),e7=u.extend({method:nY("notifications/elicitation/complete"),params:e8}),te=m.extend({action:nQ(["accept","decline","cancel"]),content:ad(e=>null===e?void 0:e,nJ(o7(),nL([o7(),nV(),nI(),nM(o7())])).optional())}),tt=nz({type:nY("ref/resource"),uri:o7()}),tr=nz({type:nY("ref/prompt"),name:o7()}),ti=s.extend({ref:nL([tr,tt]),argument:nz({name:o7(),value:o7()}),context:nz({arguments:nJ(o7(),o7()).optional()}).optional()}),to=l.extend({method:nY("completion/complete"),params:ti}),tn=m.extend({completion:nD({values:nM(o7()).max(100),total:n4(nV().int()),hasMore:n4(nI())})}),ta=nz({uri:o7().startsWith("file://"),name:o7().optional(),_meta:nJ(o7(),nE()).optional()}),ts=l.extend({method:nY("roots/list"),params:s.optional()}),td=m.extend({roots:nM(ta)}),tc=u.extend({method:nY("notifications/roots/list_changed"),params:p.optional()}),tl=nD({ttl:nV().optional(),pollInterval:nV().optional()}),tp=nQ(["working","input_required","completed","failed","cancelled"]),tu=nz({taskId:o7(),status:tp,ttl:nL([nV(),nj()]),createdAt:o7(),lastUpdatedAt:o7(),pollInterval:n4(nV()),statusMessage:n4(o7())}),tm=m.extend({task:tu}),tf=p.merge(tu),th=u.extend({method:nY("notifications/tasks/status"),params:tf}),ty=l.extend({method:nY("tasks/get"),params:s.extend({taskId:o7()})}),tg=m.merge(tu),t_=l.extend({method:nY("tasks/result"),params:s.extend({taskId:o7()})}),tv=m.loose(),tb=W.extend({method:nY("tasks/list")}),t$=M.extend({tasks:nM(tu)}),tS=l.extend({method:nY("tasks/cancel"),params:s.extend({taskId:o7()})}),{JSONValueSchema:e,JSONObjectSchema:t,ProgressTokenSchema:r,CursorSchema:i,TaskMetadataSchema:o,RelatedTaskMetadataSchema:n,RequestMetaSchema:a,BaseRequestParamsSchema:s,TaskAugmentedRequestParamsSchema:c,RequestSchema:l,NotificationsParamsSchema:p,NotificationSchema:u,ResultSchema:m,RequestIdSchema:f,EmptyResultSchema:h,CancelledNotificationParamsSchema:y,CancelledNotificationSchema:g,IconSchema:_,IconsSchema:v,BaseMetadataSchema:b,ImplementationSchema:$,ClientTasksCapabilitySchema:w,ServerTasksCapabilitySchema:V,ClientCapabilitiesSchema:P,InitializeRequestParamsSchema:R,InitializeRequestSchema:q,ServerCapabilitiesSchema:I,InitializeResultSchema:x,InitializedNotificationSchema:j,PingRequestSchema:C,ProgressSchema:T,ProgressNotificationParamsSchema:O,ProgressNotificationSchema:E,PaginatedRequestParamsSchema:A,PaginatedRequestSchema:W,PaginatedResultSchema:M,ResourceContentsSchema:N,TextResourceContentsSchema:z,BlobResourceContentsSchema:F,RoleSchema:L,AnnotationsSchema:U,ResourceSchema:H,ResourceTemplateSchema:G,ListResourcesRequestSchema:B,ListResourcesResultSchema:K,ListResourceTemplatesRequestSchema:J,ListResourceTemplatesResultSchema:Z,ResourceRequestParamsSchema:Q,ReadResourceRequestParamsSchema:Q,ReadResourceRequestSchema:X,ReadResourceResultSchema:Y,ResourceListChangedNotificationSchema:ee,SubscribeRequestParamsSchema:Q,SubscribeRequestSchema:et,UnsubscribeRequestParamsSchema:Q,UnsubscribeRequestSchema:er,ResourceUpdatedNotificationParamsSchema:ei,ResourceUpdatedNotificationSchema:eo,PromptArgumentSchema:en,PromptSchema:ea,ListPromptsRequestSchema:es,ListPromptsResultSchema:ed,GetPromptRequestParamsSchema:ec,GetPromptRequestSchema:el,TextContentSchema:ep,ImageContentSchema:eu,AudioContentSchema:em,ToolUseContentSchema:ef,EmbeddedResourceSchema:eh,ResourceLinkSchema:ey,ContentBlockSchema:eg,PromptMessageSchema:e_,GetPromptResultSchema:ev,PromptListChangedNotificationSchema:eb,ToolAnnotationsSchema:e$,ToolExecutionSchema:eS,ToolSchema:ek,ListToolsRequestSchema:ew,ListToolsResultSchema:eV,CallToolResultSchema:eP,CallToolRequestParamsSchema:eR,CallToolRequestSchema:eq,ToolListChangedNotificationSchema:eI,LoggingLevelSchema:ex,SetLevelRequestParamsSchema:ej,SetLevelRequestSchema:eC,LoggingMessageNotificationParamsSchema:eT,LoggingMessageNotificationSchema:eO,ModelHintSchema:eE,ModelPreferencesSchema:eA,ToolChoiceSchema:eW,ToolResultContentSchema:eM,SamplingContentSchema:eN,SamplingMessageContentBlockSchema:ez,SamplingMessageSchema:eD,CreateMessageRequestParamsSchema:eF,CreateMessageRequestSchema:eL,CreateMessageResultSchema:eU,CreateMessageResultWithToolsSchema:eH,BooleanSchemaSchema:eG,StringSchemaSchema:eB,NumberSchemaSchema:eK,UntitledSingleSelectEnumSchemaSchema:eJ,TitledSingleSelectEnumSchemaSchema:eZ,LegacyTitledEnumSchemaSchema:eQ,SingleSelectEnumSchemaSchema:eX,UntitledMultiSelectEnumSchemaSchema:eY,TitledMultiSelectEnumSchemaSchema:e1,MultiSelectEnumSchemaSchema:e0,EnumSchemaSchema:e2,PrimitiveSchemaDefinitionSchema:e4,ElicitRequestFormParamsSchema:e6,ElicitRequestURLParamsSchema:e3,ElicitRequestParamsSchema:e9,ElicitRequestSchema:e5,ElicitationCompleteNotificationParamsSchema:e8,ElicitationCompleteNotificationSchema:e7,ElicitResultSchema:te,ResourceTemplateReferenceSchema:tt,PromptReferenceSchema:tr,CompleteRequestParamsSchema:ti,CompleteRequestSchema:to,CompleteResultSchema:tn,RootSchema:ta,ListRootsRequestSchema:ts,ListRootsResultSchema:td,RootsListChangedNotificationSchema:tc,TaskCreationParamsSchema:tl,TaskStatusSchema:tp,TaskSchema:tu,CreateTaskResultSchema:tm,TaskStatusNotificationParamsSchema:tf,TaskStatusNotificationSchema:th,GetTaskRequestSchema:ty,GetTaskResultSchema:tg,GetTaskPayloadRequestSchema:t_,GetTaskPayloadResultSchema:tv,ListTasksRequestSchema:tb,ListTasksResultSchema:t$,CancelTaskRequestSchema:tS,CancelTaskResultSchema:m.merge(tu),ClientRequestSchema:nL([C,q,to,eC,el,es,B,J,X,et,er,eq,ew,ty,t_,tb,tS]),ClientNotificationSchema:nL([g,E,j,tc,th]),ClientResultSchema:nL([h,eU,eH,te,td,tg,t$,tm]),ServerRequestSchema:nL([C,eL,e5,ts,ty,t_,tb,tS]),ServerNotificationSchema:nL([g,E,eO,eo,ee,eI,eb,th,e7]),ServerResultSchema:nL([h,x,tn,ev,ed,K,Z,Y,eP,eV,tg,t$,tm]),CallToolResultWireSchema:nE().superRefine((e,t)=>{if(!("object"!=typeof e||null===e||Array.isArray(e))&&void 0===e.content){for(let r of Pr)if(r in e)return void t.addIssue({code:"custom",message:`content is required when the body carries '${r}' — another result family cannot default into an empty tools/call success`})}}).transform(Pi).pipe(eP)})}function Pn(e){return"object"!==e.type}let Pa=new Set(["const","enum","default","examples"]),Ps=new Set(["properties","patternProperties","$defs","definitions","dependentSchemas","dependencies"]);function Pd(e){return void 0!==e&&!("string"==typeof e&&e.startsWith("#"))}let Pc={ping:null,initialize:null,"completion/complete":null,"logging/setLevel":null,"prompts/get":null,"prompts/list":null,"resources/list":null,"resources/templates/list":null,"resources/read":null,"resources/subscribe":null,"resources/unsubscribe":null,"tools/call":null,"tools/list":null,"tasks/get":null,"tasks/result":null,"tasks/list":null,"tasks/cancel":null,"sampling/createMessage":null,"elicitation/create":null,"roots/list":null},Pl={"notifications/cancelled":null,"notifications/progress":null,"notifications/initialized":null,"notifications/roots/list_changed":null,"notifications/tasks/status":null,"notifications/message":null,"notifications/resources/updated":null,"notifications/resources/list_changed":null,"notifications/tools/list_changed":null,"notifications/prompts/list_changed":null,"notifications/elicitation/complete":null},Pp={ping:null,initialize:null,"completion/complete":null,"logging/setLevel":null,"prompts/get":null,"prompts/list":null,"resources/list":null,"resources/templates/list":null,"resources/read":null,"resources/subscribe":null,"resources/unsubscribe":null,"tools/call":null,"tools/list":null,"sampling/createMessage":null,"elicitation/create":null,"roots/list":null};function Pu(){if(c)return c;let e=Po();return c={requestSchemas:{ping:e.PingRequestSchema,initialize:e.InitializeRequestSchema,"completion/complete":e.CompleteRequestSchema,"logging/setLevel":e.SetLevelRequestSchema,"prompts/get":e.GetPromptRequestSchema,"prompts/list":e.ListPromptsRequestSchema,"resources/list":e.ListResourcesRequestSchema,"resources/templates/list":e.ListResourceTemplatesRequestSchema,"resources/read":e.ReadResourceRequestSchema,"resources/subscribe":e.SubscribeRequestSchema,"resources/unsubscribe":e.UnsubscribeRequestSchema,"tools/call":e.CallToolRequestSchema,"tools/list":e.ListToolsRequestSchema,"tasks/get":e.GetTaskRequestSchema,"tasks/result":e.GetTaskPayloadRequestSchema,"tasks/list":e.ListTasksRequestSchema,"tasks/cancel":e.CancelTaskRequestSchema,"sampling/createMessage":e.CreateMessageRequestSchema,"elicitation/create":e.ElicitRequestSchema,"roots/list":e.ListRootsRequestSchema},notificationSchemas:{"notifications/cancelled":e.CancelledNotificationSchema,"notifications/progress":e.ProgressNotificationSchema,"notifications/initialized":e.InitializedNotificationSchema,"notifications/roots/list_changed":e.RootsListChangedNotificationSchema,"notifications/tasks/status":e.TaskStatusNotificationSchema,"notifications/message":e.LoggingMessageNotificationSchema,"notifications/resources/updated":e.ResourceUpdatedNotificationSchema,"notifications/resources/list_changed":e.ResourceListChangedNotificationSchema,"notifications/tools/list_changed":e.ToolListChangedNotificationSchema,"notifications/prompts/list_changed":e.PromptListChangedNotificationSchema,"notifications/elicitation/complete":e.ElicitationCompleteNotificationSchema},resultSchemas:{ping:e.EmptyResultSchema,initialize:e.InitializeResultSchema,"completion/complete":e.CompleteResultSchema,"logging/setLevel":e.EmptyResultSchema,"prompts/get":e.GetPromptResultSchema,"prompts/list":e.ListPromptsResultSchema,"resources/list":e.ListResourcesResultSchema,"resources/templates/list":e.ListResourceTemplatesResultSchema,"resources/read":e.ReadResourceResultSchema,"resources/subscribe":e.EmptyResultSchema,"resources/unsubscribe":e.EmptyResultSchema,"tools/call":e.CallToolResultWireSchema,"tools/list":e.ListToolsResultSchema,"sampling/createMessage":e.CreateMessageResultWithToolsSchema,"elicitation/create":e.ElicitResultSchema,"roots/list":e.ListRootsResultSchema}}}function Pm(e){return Object.prototype.hasOwnProperty.call(Pc,e)}function Pf(e){return Object.prototype.hasOwnProperty.call(Pl,e)}function Ph(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)}function Py(e,t){if(void 0===e)return{ok:!1,reason:"not-in-era"};let r=e.safeParse(t);return r.success?{ok:!0,value:r.data}:{ok:!1,reason:"invalid",message:String(r.error)}}Object.keys(Pc),Object.keys(Pl);let Pg={ok:!1,reason:"not-in-era"};function P_(e){return Ph(e)&&Ph(e.outputSchema)&&Pn(e.outputSchema)}let Pv={era:"2025-11-25",hasRequestMethod:Pm,hasNotificationMethod:Pf,validateRequest:(e,t)=>Py(Pm(e)?Pu().requestSchemas[e]:void 0,t),validateResult:(e,t)=>Py(Object.prototype.hasOwnProperty.call(Pp,e)?Pu().resultSchemas[e]:void 0,t),validateNotification:(e,t)=>Py(Pf(e)?Pu().notificationSchemas[e]:void 0,t),hasInputRequestMethod:()=>!1,validateInputRequest:()=>Pg,validateInputResponse:()=>Pg,samplingResultVariant:(e,t)=>{let r=Po();return Py(e?r.CreateMessageResultWithToolsSchema:r.CreateMessageResultSchema,t)},outboundEnvelope:e=>void 0,validateEnvelopeMeta:e=>[],projectCallToolResult(e,t){let r=Pt(e),i=r.structuredContent;if(void 0===i)return r;let o="object"!=typeof i||null===i||Array.isArray(i),n=void 0!==t&&Pn(t);return o||n?{...r,structuredContent:{result:i}}:r},decodeResult(e,t){if(Ph(t)&&"resultType"in t){let e={...t};return delete e.resultType,{kind:"complete",result:e}}return{kind:"complete",result:t}},encodeResult(e,t){if("tools/list"!==e)return t;let r=t.tools;return Array.isArray(r)&&r.some(e=>P_(e))?{...t,tools:r.map(e=>P_(e)?{...e,outputSchema:function(e){var t;let r="string"==typeof e.$schema?e.$schema:void 0;if(Pd(e.$id))return{...void 0!==r&&{$schema:r},type:"object",properties:{result:e},required:["result"]};let i="string"==typeof(t=e.$schema)&&S4.has(t.replace(/#$/,""))&&!0!==e.$recursiveAnchor,o=(e,t)=>{if(Array.isArray(e))return e.map(e=>o(e,!1));if(null===e||"object"!=typeof e||!t&&Pd(e.$id))return e;let r={},n=!1;for(let[a,s]of Object.entries(e))t?r[a]=o(s,!1):("$ref"===a||"$dynamicRef"===a)&&"string"==typeof s?r[a]="#"===s?"#/properties/result":s.startsWith("#/")?`#/properties/result${s.slice(1)}`:s:"$recursiveRef"===a&&"#"===s&&i?n=!0:Pa.has(a)?r[a]=s:Ps.has(a)?r[a]=o(s,!0):r[a]=o(s,!1);return n&&("$ref"in r?r.allOf=[...Array.isArray(r.allOf)?r.allOf:[],{$ref:"#/properties/result"}]:r.$ref="#/properties/result"),r};return{...void 0!==r&&{$schema:r},type:"object",properties:{result:o(e,!1)},required:["result"]}}(e.outputSchema)}:e)}:t},encodeErrorCode:e=>-32002===e?-32602:e,checkInboundEnvelope:e=>void 0};function Pb(){return l??=function(){let e=aa(()=>nL([o7(),nV(),nI(),nj(),nJ(o7(),e),nM(e)])),t=nJ(o7(),e),r=nL([o7(),nV().int()]),i=o7(),o=nL([o7(),nV().int()]),n=nQ(["user","assistant"]),a=nQ(["debug","info","notice","warning","error","critical","alert","emergency"]),s=o7().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:"Invalid Base64 string"}),d=nz({ttl:nV().optional()}),c=nz({taskId:o7()}),l=nD({progressToken:r.optional(),"io.modelcontextprotocol/related-task":c.optional()}),p=nz({_meta:l.optional()}),u=p.extend({task:d.optional()}),m=nz({_meta:l.optional()}),f=nz({method:o7(),params:m.loose().optional()}),h=nz({src:o7(),mimeType:o7().optional(),sizes:nM(o7()).optional(),theme:nQ(["light","dark"]).optional()}),y=nz({icons:nM(h).optional()}),g=nz({name:o7(),title:o7().optional()}),_=g.extend({...g.shape,...y.shape,version:o7(),websiteUrl:o7().optional(),description:o7().optional()}),v=nB(nz({applyDefaults:nI().optional()}),t),b=ad(e=>e&&"object"==typeof e&&!Array.isArray(e)&&0===Object.keys(e).length?{form:{}}:e,nB(nz({form:v.optional(),url:t.optional()}),t.optional())),$=nD({list:t.optional(),cancel:t.optional(),requests:nD({sampling:nD({createMessage:t.optional()}).optional(),elicitation:nD({create:t.optional()}).optional()}).optional()}),S=nD({list:t.optional(),cancel:t.optional(),requests:nD({tools:nD({call:t.optional()}).optional()}).optional()}),k=nz({experimental:nJ(o7(),t).optional(),sampling:nz({context:t.optional(),tools:t.optional()}).optional(),elicitation:b.optional(),roots:nz({listChanged:nI().optional()}).optional(),tasks:$.optional(),extensions:nJ(o7(),t).optional()}),w=nz({experimental:nJ(o7(),t).optional(),logging:t.optional(),completions:t.optional(),prompts:nz({listChanged:nI().optional()}).optional(),resources:nz({subscribe:nI().optional(),listChanged:nI().optional()}).optional(),tools:nz({listChanged:nI().optional()}).optional(),tasks:S.optional(),extensions:nJ(o7(),t).optional()}),V=nz({progress:nV(),total:n4(nV()),message:n4(o7())}),P=nz({...m.shape,...V.shape,progressToken:r}),R=f.extend({method:nY("notifications/progress"),params:P}),q=m.extend({level:a,logger:o7().optional(),data:nE()}),I=f.extend({method:nY("notifications/message"),params:q}),x=nz({uri:o7(),mimeType:n4(o7()),_meta:nJ(o7(),nE()).optional()}),j=x.extend({text:o7()}),C=x.extend({blob:s}),T=nz({audience:nM(n).optional(),priority:nV().min(0).max(1).optional(),lastModified:ac({offset:!0}).optional()}),O=nz({...g.shape,...y.shape,uri:o7(),description:n4(o7()),mimeType:n4(o7()),size:n4(nV()),annotations:T.optional(),_meta:n4(nD({}))}),E=nz({...g.shape,...y.shape,uriTemplate:o7(),description:n4(o7()),mimeType:n4(o7()),annotations:T.optional(),_meta:n4(nD({}))}),A=f.extend({method:nY("notifications/resources/list_changed"),params:m.optional()}),W=m.extend({uri:o7()}),M=f.extend({method:nY("notifications/resources/updated"),params:W}),N=nz({name:o7(),description:n4(o7()),required:n4(nI())}),z=nz({...g.shape,...y.shape,description:n4(o7()),arguments:n4(nM(N)),_meta:n4(nD({}))}),D=f.extend({method:nY("notifications/prompts/list_changed"),params:m.optional()}),F=nz({type:nY("text"),text:o7(),annotations:T.optional(),_meta:nJ(o7(),nE()).optional()}),L=nz({type:nY("image"),data:s,mimeType:o7(),annotations:T.optional(),_meta:nJ(o7(),nE()).optional()}),U=nz({type:nY("audio"),data:s,mimeType:o7(),annotations:T.optional(),_meta:nJ(o7(),nE()).optional()}),H=nz({type:nY("tool_use"),name:o7(),id:o7(),input:nJ(o7(),nE()),_meta:nJ(o7(),nE()).optional()}),G=nz({type:nY("resource"),resource:nL([j,C]),annotations:T.optional(),_meta:nJ(o7(),nE()).optional()}),B=O.extend({type:nY("resource_link")}),K=nL([F,L,U,B,G]),J=nz({role:n,content:K}),Z=nz({title:o7().optional(),readOnlyHint:nI().optional(),destructiveHint:nI().optional(),idempotentHint:nI().optional(),openWorldHint:nI().optional()}),Q=f.extend({method:nY("notifications/tools/list_changed"),params:m.optional()}),X=nz({name:o7().optional()}),Y=nz({hints:nM(X).optional(),costPriority:nV().min(0).max(1).optional(),speedPriority:nV().min(0).max(1).optional(),intelligencePriority:nV().min(0).max(1).optional()}),ee=nz({mode:nQ(["auto","required","none"]).optional()}),et=nz({type:nY("boolean"),title:o7().optional(),description:o7().optional(),default:nI().optional()}),er=nz({type:nY("string"),title:o7().optional(),description:o7().optional(),minLength:nV().optional(),maxLength:nV().optional(),format:nQ(["email","uri","date","date-time"]).optional(),default:o7().optional()}),ei=nz({type:nQ(["number","integer"]),title:o7().optional(),description:o7().optional(),minimum:nV().optional(),maximum:nV().optional(),default:nV().optional()}),eo=nz({type:nY("string"),title:o7().optional(),description:o7().optional(),enum:nM(o7()),default:o7().optional()}),en=nz({type:nY("string"),title:o7().optional(),description:o7().optional(),oneOf:nM(nz({const:o7(),title:o7()})),default:o7().optional()}),ea=nz({type:nY("string"),title:o7().optional(),description:o7().optional(),enum:nM(o7()),enumNames:nM(o7()).optional(),default:o7().optional()}),es=nL([eo,en]),ed=nz({type:nY("array"),title:o7().optional(),description:o7().optional(),minItems:nV().optional(),maxItems:nV().optional(),items:nz({type:nY("string"),enum:nM(o7())}),default:nM(o7()).optional()}),ec=nz({type:nY("array"),title:o7().optional(),description:o7().optional(),minItems:nV().optional(),maxItems:nV().optional(),items:nz({anyOf:nM(nz({const:o7(),title:o7()}))}),default:nM(o7()).optional()}),el=nL([ed,ec]),ep=nL([ea,es,el]),eu=nL([ep,et,er,ei]),em=u.extend({mode:nY("form").optional(),message:o7(),requestedSchema:nz({type:nY("object"),properties:nJ(o7(),eu),required:nM(o7()).optional()}).catchall(nE())}),ef=nz({type:nY("ref/resource"),uri:o7()}),eh=nz({type:nY("ref/prompt"),name:o7()}),ey=nz({uri:o7().startsWith("file://"),name:o7().optional(),_meta:nJ(o7(),nE()).optional()}),eg=k.shape,e_=nz({experimental:eg.experimental,sampling:eg.sampling,elicitation:eg.elicitation,roots:eg.roots,extensions:eg.extensions}),ev=w.shape,eb=nz({experimental:ev.experimental,logging:ev.logging,completions:ev.completions,prompts:ev.prompts,resources:ev.resources,tools:ev.tools,extensions:ev.extensions}),e$=nD({progressToken:r.optional(),[S5]:o7(),[S8]:_.optional(),[ke]:e_,[kr]:a.optional()}),eS=nz({...g.shape,...y.shape,description:o7().optional(),inputSchema:nD({$schema:o7().optional(),type:nY("object")}),outputSchema:nD({$schema:o7().optional()}).optional(),annotations:Z.optional(),_meta:nJ(o7(),nE()).optional()}),ek=nz({type:nY("tool_result"),toolUseId:o7(),content:nM(K),structuredContent:nE().optional(),isError:nI().optional(),_meta:nJ(o7(),nE()).optional()}),ew=nL([F,L,U,H,ek]),eV=nz({role:n,content:nL([ew,nM(ew)]),_meta:nJ(o7(),nE()).optional()}),eP=o7(),eR=nD({[S7]:_.optional().catch(void 0)}),eq=eR.optional();function eI(e){return nD({_meta:eq,resultType:eP.default("complete"),...e})}let ex=eI({}),ej=eI({nextCursor:i.optional()}),eC=eI({content:nM(K),structuredContent:nE().optional(),isError:nI().optional()}),eT=eI({ttlMs:nV().int().min(0),cacheScope:nQ(["public","private"]),tools:nM(eS),nextCursor:i.optional()}),eO=eI({ttlMs:nV().int().min(0),cacheScope:nQ(["public","private"]),prompts:nM(z),nextCursor:i.optional()}),eE=eI({description:o7().optional(),messages:nM(J)}),eA=eI({ttlMs:nV().int().min(0),cacheScope:nQ(["public","private"]),resources:nM(O),nextCursor:i.optional()}),eW=eI({ttlMs:nV().int().min(0),cacheScope:nQ(["public","private"]),resourceTemplates:nM(E),nextCursor:i.optional()}),eM=eI({ttlMs:nV().int().min(0),cacheScope:nQ(["public","private"]),contents:nM(nL([j,C]))}),eN=eI({completion:nz({values:nM(o7()).max(100),total:nV().int().optional(),hasMore:nI().optional()}).loose()}),ez=eI({ttlMs:nV().int().min(0),cacheScope:nQ(["public","private"])}),eD=eI({ttlMs:nV().int().min(0).catch(0),cacheScope:nQ(["public","private"]).catch("private"),supportedVersions:nM(o7()),capabilities:eb,instructions:o7().optional()}),eF=nz({messages:nM(eV),modelPreferences:Y.optional(),systemPrompt:o7().optional(),includeContext:nQ(["none","thisServer","allServers"]).optional(),temperature:nV().optional(),maxTokens:nV().int(),stopSequences:nM(o7()).optional(),metadata:t.optional(),tools:nM(eS).optional(),toolChoice:ee.optional()}),eL=nz({method:nY("sampling/createMessage"),params:eF}),eU=nz({method:nY("roots/list"),params:nz({_meta:nJ(o7(),nE()).optional()}).optional()}),eH=nz({...eV.shape,model:o7(),stopReason:o7().optional()}),eG=nz({roots:nM(ey)}),eB=nz({action:nQ(["accept","decline","cancel"]),content:nJ(o7(),nL([o7(),nV(),nI(),nM(o7())])).optional()}),eK=nz({mode:nY("url"),message:o7(),url:o7().url()}),eJ=nL([em,eK]),eZ=nz({method:nY("elicitation/create"),params:eJ}),eQ=nL([eL,eU,eZ]),eX=nL([eH,eG,eB]),eY=nJ(o7(),eQ),e1=nJ(o7(),eX),e0=eI({inputRequests:eY.optional(),requestState:o7().optional()}),e2={inputResponses:e1.optional(),requestState:o7().optional()},e4=nz({_meta:e$,...e2}),e6=nD({progressToken:r.optional()});function e3(e,t){return nz({method:nY(e),params:nz({_meta:e$,...t})})}function e9(e,t){return nz({method:nY(e),params:nz({_meta:e6.optional(),...t}).optional()})}let e5={name:o7(),arguments:nJ(o7(),nE()).optional(),...e2},e8={cursor:i.optional()},e7=e3("tools/call",e5),te=e3("tools/list",e8),tt=e3("prompts/list",e8),tr=e3("prompts/get",{name:o7(),arguments:nJ(o7(),o7()).optional(),...e2}),ti=e3("resources/list",e8),to=e3("resources/templates/list",e8),tn=e3("resources/read",{uri:o7(),...e2}),ta={ref:nL([eh,ef]),argument:nz({name:o7(),value:o7()}),context:nz({arguments:nJ(o7(),o7()).optional()}).optional()},ts=e3("completion/complete",ta),td=e3("server/discover",{}),tc=nz({toolsListChanged:nI().optional(),promptsListChanged:nI().optional(),resourcesListChanged:nI().optional(),resourceSubscriptions:nM(o7()).optional()}),tl={notifications:tc},tp=e3("subscriptions/listen",tl),tu=eR.extend({"io.modelcontextprotocol/subscriptionId":o}),tm=nD({_meta:tu,resultType:eP.default("complete")}),tf={"tools/call":e9("tools/call",e5),"tools/list":e9("tools/list",e8),"prompts/get":e9("prompts/get",{name:o7(),arguments:nJ(o7(),o7()).optional()}),"prompts/list":e9("prompts/list",e8),"resources/list":e9("resources/list",e8),"resources/templates/list":e9("resources/templates/list",e8),"resources/read":e9("resources/read",{uri:o7()}),"completion/complete":e9("completion/complete",ta),"server/discover":e9("server/discover",{}),"subscriptions/listen":e9("subscriptions/listen",tl)};function th(e){return nD({_meta:eq,...e})}let ty={"tools/call":th({content:nM(K),structuredContent:nE().optional(),isError:nI().optional()}),"tools/list":th({ttlMs:nV().int().min(0),cacheScope:nQ(["public","private"]),tools:nM(eS),nextCursor:i.optional()}),"prompts/get":th({description:o7().optional(),messages:nM(J)}),"prompts/list":th({ttlMs:nV().int().min(0),cacheScope:nQ(["public","private"]),prompts:nM(z),nextCursor:i.optional()}),"resources/list":th({ttlMs:nV().int().min(0),cacheScope:nQ(["public","private"]),resources:nM(O),nextCursor:i.optional()}),"resources/templates/list":th({ttlMs:nV().int().min(0),cacheScope:nQ(["public","private"]),resourceTemplates:nM(E),nextCursor:i.optional()}),"resources/read":th({ttlMs:nV().int().min(0),cacheScope:nQ(["public","private"]),contents:nM(nL([j,C]))}),"completion/complete":th({completion:nz({values:nM(o7()).max(100),total:nV().int().optional(),hasMore:nI().optional()}).loose()}),"server/discover":th({ttlMs:nV().int().min(0).catch(0),cacheScope:nQ(["public","private"]).catch("private"),supportedVersions:nM(o7()),capabilities:eb,instructions:o7().optional()}),"subscriptions/listen":th({})},tg=nD({"io.modelcontextprotocol/subscriptionId":o.optional()}),t_=nz({method:nY("notifications/subscriptions/acknowledged"),params:nz({_meta:tg.optional(),notifications:tc})}),tv=nz({_meta:tg.optional(),requestId:o,reason:o7().optional()}),tb=nz({method:nY("notifications/cancelled"),params:tv}),t$=e=>nz({jsonrpc:nY("2.0"),id:nL([o7(),nV().int()]),result:e}).strict();return{JSONValueSchema:e,JSONObjectSchema:t,ProgressTokenSchema:r,CursorSchema:i,RequestIdSchema:o,RoleSchema:n,LoggingLevelSchema:a,TaskMetadataSchema:d,RelatedTaskMetadataSchema:c,RequestMetaSchema:l,BaseRequestParamsSchema:p,TaskAugmentedRequestParamsSchema:u,NotificationsParamsSchema:m,NotificationSchema:f,IconSchema:h,IconsSchema:y,BaseMetadataSchema:g,ImplementationSchema:_,ClientTasksCapabilitySchema:$,ServerTasksCapabilitySchema:S,ClientCapabilitiesSchema:k,ServerCapabilitiesSchema:w,ProgressSchema:V,ProgressNotificationParamsSchema:P,ProgressNotificationSchema:R,LoggingMessageNotificationParamsSchema:q,LoggingMessageNotificationSchema:I,ResourceContentsSchema:x,TextResourceContentsSchema:j,BlobResourceContentsSchema:C,AnnotationsSchema:T,ResourceSchema:O,ResourceTemplateSchema:E,ResourceListChangedNotificationSchema:A,ResourceUpdatedNotificationParamsSchema:W,ResourceUpdatedNotificationSchema:M,PromptArgumentSchema:N,PromptSchema:z,PromptListChangedNotificationSchema:D,TextContentSchema:F,ImageContentSchema:L,AudioContentSchema:U,ToolUseContentSchema:H,EmbeddedResourceSchema:G,ResourceLinkSchema:B,ContentBlockSchema:K,PromptMessageSchema:J,ToolAnnotationsSchema:Z,ToolListChangedNotificationSchema:Q,ModelHintSchema:X,ModelPreferencesSchema:Y,ToolChoiceSchema:ee,BooleanSchemaSchema:et,StringSchemaSchema:er,NumberSchemaSchema:ei,UntitledSingleSelectEnumSchemaSchema:eo,TitledSingleSelectEnumSchemaSchema:en,LegacyTitledEnumSchemaSchema:ea,SingleSelectEnumSchemaSchema:es,UntitledMultiSelectEnumSchemaSchema:ed,TitledMultiSelectEnumSchemaSchema:ec,MultiSelectEnumSchemaSchema:el,EnumSchemaSchema:ep,PrimitiveSchemaDefinitionSchema:eu,ElicitRequestFormParamsSchema:em,ResourceTemplateReferenceSchema:ef,PromptReferenceSchema:eh,RootSchema:ey,ClientCapabilities2026Schema:e_,ServerCapabilities2026Schema:eb,RequestMetaEnvelopeSchema:e$,ToolSchema:eS,ToolResultContentSchema:ek,SamplingMessageContentBlockSchema:ew,SamplingMessageSchema:eV,ResultTypeSchema:eP,ResultMetaSchema:eR,ResultSchema:ex,PaginatedResultSchema:ej,CallToolResultSchema:eC,ListToolsResultSchema:eT,ListPromptsResultSchema:eO,GetPromptResultSchema:eE,ListResourcesResultSchema:eA,ListResourceTemplatesResultSchema:eW,ReadResourceResultSchema:eM,CompleteResultSchema:eN,CacheableResultSchema:ez,DiscoverResultSchema:eD,CreateMessageRequestParamsSchema:eF,CreateMessageRequestSchema:eL,ListRootsRequestSchema:eU,CreateMessageResultSchema:eH,ListRootsResultSchema:eG,ElicitResultSchema:eB,ElicitRequestURLParamsSchema:eK,ElicitRequestParamsSchema:eJ,ElicitRequestSchema:eZ,InputRequestSchema:eQ,InputResponseSchema:eX,InputRequestsSchema:eY,InputResponsesSchema:e1,InputRequiredResultSchema:e0,InputResponseRequestParamsSchema:e4,CallToolRequestSchema:e7,ListToolsRequestSchema:te,ListPromptsRequestSchema:tt,GetPromptRequestSchema:tr,ListResourcesRequestSchema:ti,ListResourceTemplatesRequestSchema:to,ReadResourceRequestSchema:tn,CompleteRequestSchema:ts,DiscoverRequestSchema:td,SubscriptionFilterSchema:tc,SubscriptionsListenRequestSchema:tp,SubscriptionsListenResultMetaSchema:tu,SubscriptionsListenResultSchema:tm,dispatchRequestSchemas:tf,dispatchResultSchemas:ty,NotificationMetaSchema:tg,SubscriptionsAcknowledgedNotificationSchema:t_,CancelledNotificationParamsSchema:tv,CancelledNotificationSchema:tb,notificationSchemas2026:{"notifications/cancelled":tb,"notifications/progress":R,"notifications/message":I,"notifications/resources/updated":M,"notifications/resources/list_changed":A,"notifications/tools/list_changed":Q,"notifications/prompts/list_changed":D,"notifications/subscriptions/acknowledged":t_},JSONRPCResultResponseSchema:t$(ex),CallToolResultResponseSchema:t$(nL([eC,e0])),ListToolsResultResponseSchema:t$(eT),ListPromptsResultResponseSchema:t$(eO),GetPromptResultResponseSchema:t$(nL([eE,e0])),ListResourcesResultResponseSchema:t$(eA),ListResourceTemplatesResultResponseSchema:t$(eW),ReadResourceResultResponseSchema:t$(nL([eM,e0])),CompleteResultResponseSchema:t$(eN),DiscoverResultResponseSchema:t$(eD),SubscriptionsListenResultResponseSchema:t$(tm)}}()}let P$=["tools/list","prompts/list","resources/list","resources/templates/list","resources/read","server/discover"],PS=Symbol("modelcontextprotocol.resultCacheHintFallback");function Pk(e){return"number"==typeof e&&Number.isSafeInteger(e)&&e>=0}function Pw(e){return"public"===e||"private"===e}let PV=((Y={})[Y.ParseError=-32700]="ParseError",Y[Y.InvalidRequest=-32600]="InvalidRequest",Y[Y.MethodNotFound=-32601]="MethodNotFound",Y[Y.InvalidParams=-32602]="InvalidParams",Y[Y.InternalError=-32603]="InternalError",Y[Y.ResourceNotFound=-32002]="ResourceNotFound",Y[Y.MissingRequiredClientCapability=-32021]="MissingRequiredClientCapability",Y[Y.UnsupportedProtocolVersion=-32022]="UnsupportedProtocolVersion",Y[Y.UrlElicitationRequired=-32042]="UrlElicitationRequired",Y);var PP=class e extends Error{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.ProtocolError"})}static[Symbol.hasInstance](e){return V4(this,e)}static isInstance(e){if("function"!=typeof this)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return V4(this,e)}constructor(e,t,r){super(t),this.code=e,this.data=r,this.name="ProtocolError",V2(this,new.target)}static fromError(t,r,i){return t===PV.UrlElicitationRequired&&i&&i.elicitations?new Pq(i.elicitations,r):t===PV.UnsupportedProtocolVersion&&i&&Array.isArray(i.supported)&&"string"==typeof i.requested?new PI({supported:i.supported,requested:i.requested},r):(t===PV.InvalidParams||t===PV.ResourceNotFound)&&"string"==typeof i?.uri&&(t===PV.ResourceNotFound||1===Object.keys(i).length)?new PR(i.uri,r):t===PV.MissingRequiredClientCapability&&i&&null!==i.requiredCapabilities&&"object"==typeof i.requiredCapabilities&&!Array.isArray(i.requiredCapabilities)?new Px({requiredCapabilities:i.requiredCapabilities},r):new e(t,r,i)}},PR=class extends PP{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.ResourceNotFoundError"})}constructor(e,t=`Resource not found: ${e}`){super(PV.InvalidParams,t,{uri:e})}get uri(){return this.data.uri}},Pq=class extends PP{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.UrlElicitationRequiredError"})}constructor(e,t=`URL elicitation${e.length>1?"s":""} required`){super(PV.UrlElicitationRequired,t,{elicitations:e})}get elicitations(){return this.data?.elicitations??[]}},PI=class extends PP{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.UnsupportedProtocolVersionError"})}constructor(e,t=`Unsupported protocol version: ${e.requested}`){super(PV.UnsupportedProtocolVersion,t,e)}get supported(){return this.data.supported}get requested(){return this.data.requested}},Px=class extends PP{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.MissingRequiredClientCapabilityError"})}constructor(e,t=`Missing required client capabilities: ${Object.keys(e.requiredCapabilities).join(", ")}`){super(PV.MissingRequiredClientCapability,t,e)}get requiredCapabilities(){return this.data.requiredCapabilities}};let Pj=["tools/call","prompts/get","resources/read"],PC=["elicitation/create","sampling/createMessage","roots/list"];function PT(){if(p)return p;let e=Pb();return p={request:{"elicitation/create":nz({method:nY("elicitation/create"),params:e.ElicitRequestParamsSchema}),"sampling/createMessage":nz({method:nY("sampling/createMessage"),params:e.CreateMessageRequestParamsSchema}),"roots/list":nz({method:nY("roots/list"),params:nD({}).optional()})},response:{"elicitation/create":e.ElicitResultSchema,"sampling/createMessage":e.CreateMessageResultSchema,"roots/list":e.ListRootsResultSchema}}}function PO(e){return PC.includes(e)}function PE(e){return PO(e)?PT().request[e]:void 0}let PA={"tools/call":null,"tools/list":null,"prompts/get":null,"prompts/list":null,"resources/list":null,"resources/templates/list":null,"resources/read":null,"completion/complete":null,"server/discover":null,"subscriptions/listen":null},PW={"notifications/cancelled":null,"notifications/progress":null,"notifications/message":null,"notifications/resources/updated":null,"notifications/resources/list_changed":null,"notifications/tools/list_changed":null,"notifications/prompts/list_changed":null,"notifications/subscriptions/acknowledged":null};function PM(e){return Object.prototype.hasOwnProperty.call(PA,e)}function PN(e){return Object.prototype.hasOwnProperty.call(PW,e)}function Pz(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)}function PD(e,t){if(void 0===e)return{ok:!1,reason:"not-in-era"};let r=e.safeParse(t);return r.success?{ok:!0,value:r.data}:{ok:!1,reason:"invalid",message:String(r.error)}}Object.keys(PA),Object.keys(PW);let PF={ok:!1,reason:"not-in-era"},PL=[S5,ke],PU={era:"2026-07-28",hasRequestMethod:PM,hasNotificationMethod:PN,hasInputRequestMethod:e=>void 0!==PE(e),validateRequest:(e,t)=>PD(PM(e)?Pb().dispatchRequestSchemas[e]:void 0,t),validateResult:(e,t)=>PD(Object.prototype.hasOwnProperty.call(PA,e)?Pb().dispatchResultSchemas[e]:void 0,t),validateNotification:(e,t)=>PD(PN(e)?Pb().notificationSchemas2026[e]:void 0,t),validateInputRequest:(e,t)=>PD(PE(e),t),validateInputResponse:(e,t)=>PD(PO(e)?PT().response[e]:void 0,t),samplingResultVariant:()=>PF,outboundEnvelope:e=>({[S5]:e.protocolVersion,[S8]:e.clientInfo,[ke]:e.clientCapabilities,...void 0!==e.logLevel&&{[kr]:e.logLevel}}),validateEnvelopeMeta(e){let t=[];for(let r of PL)r in e||t.push({key:r,problem:"missing"});let r=Pb().RequestMetaEnvelopeSchema.safeParse(e);if(!r.success)for(let e of r.error.issues){let r=e.path.map(String),i=r.length>0?r.join("."):"_meta";1===r.length&&t.some(e=>e.key===i&&"missing"===e.problem)||t.push({key:i,problem:e.message})}return t},projectCallToolResult:e=>Pt(e),inputRequestSchema:PE,decodeResult(e,t){if(!Pz(t))return{kind:"invalid",error:new V3(V6.InvalidResult,`Invalid result for ${e}: not an object`,{method:e})};let r=t.resultType;if(void 0===r)return{kind:"invalid",error:new V3(V6.InvalidResult,`Invalid result for ${e}: missing required resultType — servers implementing protocol revision 2026-07-28 MUST include it (the absent-means-complete bridge applies only to earlier-revision servers)`,{method:e,violation:"missing-resultType"})};if("string"!=typeof r)return{kind:"invalid",error:new V3(V6.InvalidResult,`Invalid result for ${e}: non-string resultType`,{method:e,resultType:r})};if("input_required"===r){let r=t.inputRequests,i=Pz(r)?r:{},o=t.requestState,n=void 0===t._meta?void 0:Pb().ResultMetaSchema.safeParse(t._meta),a=n?.success?n.data:void 0;return 0===Object.keys(i).length&&"string"!=typeof o?{kind:"invalid",error:new V3(V6.InvalidResult,`Invalid result for ${e}: input_required carries neither inputRequests nor requestState (every input_required result must include at least one of the two)`,{method:e,violation:"input-required-missing-both"})}:{kind:"input_required",inputRequests:i,..."string"==typeof o&&{requestState:o},...void 0!==a&&{_meta:a}}}if("complete"!==r)return{kind:"invalid",error:new V3(V6.UnsupportedResultType,`Unsupported result type '${r}' for ${e}`,{resultType:r,method:e})};let i=function(){if(u)return u;let e=Pb();return u={"tools/call":e.CallToolResultSchema,"tools/list":e.ListToolsResultSchema,"prompts/get":e.GetPromptResultSchema,"prompts/list":e.ListPromptsResultSchema,"resources/list":e.ListResourcesResultSchema,"resources/templates/list":e.ListResourceTemplatesResultSchema,"resources/read":e.ReadResourceResultSchema,"completion/complete":e.CompleteResultSchema,"server/discover":e.DiscoverResultSchema}}(),o=Object.hasOwn(i,e)?i[e]:void 0;if(void 0!==o){let r=o.safeParse(t);if(!r.success)return{kind:"invalid",error:new V3(V6.InvalidResult,`Invalid result for ${e}: ${r.error}`,{method:e})}}let n={...t};return delete n.resultType,{kind:"complete",result:n}},encodeResult:(e,t,r)=>(function(e,t){if(void 0===t)return e;let r=e._meta;return void 0===r?{...e,_meta:{[S7]:t}}:null===r||"object"!=typeof r||Array.isArray(r)||void 0!==r[S7]?e:{...e,_meta:{...r,[S7]:t}}})(function(e,t){var r,i;let o=t[PS];if("complete"!==t.resultType||!P$.includes(e)){let e;return void 0===o?t:(e={...t},delete e[PS],e)}let n=Pk(t.ttlMs)?t.ttlMs:void 0!==(r=o)&&Pk(r.ttlMs)?r.ttlMs:0,a=Pw(t.cacheScope)?t.cacheScope:void 0!==(i=o)&&Pw(i.cacheScope)?i.cacheScope:"private",s={...t,ttlMs:n,cacheScope:a};return delete s[PS],s}(e,function(e,t){let r=t.resultType;if(void 0===r)return{...t,resultType:"complete"};if("complete"===r||Pj.includes(e))return t;throw new PP(PV.InternalError,`Handler for ${e} returned resultType '${String(r)}', but results of ${e} only support 'complete' on protocol revision 2026-07-28`)}(e,function(e,t){let r=t,i=!1,o=()=>(i||(r={...r},i=!0),r),n=t.tools;"tools/list"===e&&Array.isArray(n)&&n.some(e=>Pz(e)&&"execution"in e)&&(o().tools=n.map(e=>{if(!Pz(e)||!("execution"in e))return e;let t={...e};return delete t.execution,t}));let a=t.capabilities;if(Pz(a)&&"tasks"in a){let e={...a};delete e.tasks,o().capabilities=e}return r}(e,t))),r),encodeErrorCode:e=>-32002===e?-32602:e,checkInboundEnvelope(e){if(void 0===e.envelope)return"Request is missing the required _meta envelope for protocol revision 2026-07-28 (io.modelcontextprotocol/protocolVersion, io.modelcontextprotocol/clientCapabilities)";let t=Pb().RequestMetaEnvelopeSchema.safeParse(e.envelope);if(!t.success)return`Invalid _meta envelope for protocol revision 2026-07-28: ${t.error.issues.map(e=>e.message).join("; ")}`}},PH="2026-07-28";function PG(e){return void 0!==e&&e>=V5?PU:Pv}function PB(e){return void 0!==e.revision?PG(e.revision).era:"modern"===e.era?PU.era:Pv.era}function PK(e){return PQ.some(t=>t.hasRequestMethod(e))}function PJ(e){return PQ.some(t=>t.hasNotificationMethod(e))}function PZ(e){return"tasks/get"===e||"tasks/cancel"===e}let PQ=[Pv,PU];var PX=(e=>{let t={};for(var r in e)SZ(t,r,{get:e[r],enumerable:!0});return t})({AnnotationsSchema:()=>k2,AudioContentSchema:()=>wS,BaseMetadataSchema:()=>kx,BaseRequestParamsSchema:()=>kp,BlobResourceContentsSchema:()=>k1,BooleanSchemaSchema:()=>w4,CallToolRequestParamsSchema:()=>wW,CallToolRequestSchema:()=>wM,CallToolResultSchema:()=>wE,CancelTaskRequestSchema:()=>VT,CancelTaskResultSchema:()=>VO,CancelledNotificationParamsSchema:()=>kP,CancelledNotificationSchema:()=>kR,ClientCapabilitiesSchema:()=>kA,ClientNotificationSchema:()=>VA,ClientRequestSchema:()=>VE,ClientResultSchema:()=>VW,ClientTasksCapabilitySchema:()=>kO,CompatibilityCallToolResultSchema:()=>wA,CompleteRequestParamsSchema:()=>Vf,CompleteRequestSchema:()=>Vh,CompleteResultSchema:()=>Vy,ContentBlockSchema:()=>wP,CreateMessageRequestParamsSchema:()=>wY,CreateMessageRequestSchema:()=>w1,CreateMessageResultSchema:()=>w0,CreateMessageResultWithToolsSchema:()=>w2,CreateTaskResultSchema:()=>Vw,CursorSchema:()=>ks,DiscoverRequestSchema:()=>kF,DiscoverResultSchema:()=>kL,ElicitRequestFormParamsSchema:()=>Vn,ElicitRequestParamsSchema:()=>Vs,ElicitRequestSchema:()=>Vd,ElicitRequestURLParamsSchema:()=>Va,ElicitResultSchema:()=>Vp,ElicitationCompleteNotificationParamsSchema:()=>Vc,ElicitationCompleteNotificationSchema:()=>Vl,EmbeddedResourceSchema:()=>ww,EmptyResultSchema:()=>kV,EnumSchemaSchema:()=>Vi,GetPromptRequestParamsSchema:()=>w_,GetPromptRequestSchema:()=>wv,GetPromptResultSchema:()=>wq,GetTaskPayloadRequestSchema:()=>VI,GetTaskPayloadResultSchema:()=>Vx,GetTaskRequestSchema:()=>VR,GetTaskResultSchema:()=>Vq,IconSchema:()=>kq,IconsSchema:()=>kI,ImageContentSchema:()=>w$,ImplementationSchema:()=>kj,InitializeRequestParamsSchema:()=>kW,InitializeRequestSchema:()=>kM,InitializeResultSchema:()=>kz,InitializedNotificationSchema:()=>kD,JSONArraySchema:()=>kn,JSONObjectSchema:()=>ko,JSONRPCErrorResponseSchema:()=>kS,JSONRPCMessageSchema:()=>kk,JSONRPCNotificationSchema:()=>kb,JSONRPCRequestSchema:()=>kv,JSONRPCResponseSchema:()=>kw,JSONRPCResultResponseSchema:()=>k$,JSONValueSchema:()=>ki,LegacyTitledEnumSchemaSchema:()=>w8,ListChangedOptionsBaseSchema:()=>wz,ListPromptsRequestSchema:()=>wy,ListPromptsResultSchema:()=>wg,ListResourceTemplatesRequestSchema:()=>k5,ListResourceTemplatesResultSchema:()=>k8,ListResourcesRequestSchema:()=>k3,ListResourcesResultSchema:()=>k9,ListRootsRequestSchema:()=>V_,ListRootsResultSchema:()=>Vv,ListTasksRequestSchema:()=>Vj,ListTasksResultSchema:()=>VC,ListToolsRequestSchema:()=>wT,ListToolsResultSchema:()=>wO,LoggingLevelSchema:()=>wD,LoggingMessageNotificationParamsSchema:()=>wU,LoggingMessageNotificationSchema:()=>wH,ModelHintSchema:()=>wG,ModelPreferencesSchema:()=>wB,MultiSelectEnumSchemaSchema:()=>Vr,NotificationSchema:()=>kh,NotificationsParamsSchema:()=>kf,NumberSchemaSchema:()=>w3,PaginatedRequestParamsSchema:()=>kK,PaginatedRequestSchema:()=>kJ,PaginatedResultSchema:()=>kZ,PingRequestSchema:()=>kU,PrimitiveSchemaDefinitionSchema:()=>Vo,ProgressNotificationParamsSchema:()=>kG,ProgressNotificationSchema:()=>kB,ProgressSchema:()=>kH,ProgressTokenSchema:()=>ka,PromptArgumentSchema:()=>wf,PromptListChangedNotificationSchema:()=>wI,PromptMessageSchema:()=>wR,PromptReferenceSchema:()=>Vm,PromptSchema:()=>wh,ReadResourceRequestParamsSchema:()=>k7,ReadResourceRequestSchema:()=>we,ReadResourceResultSchema:()=>wt,RelatedTaskMetadataSchema:()=>kc,RequestIdSchema:()=>k_,RequestMetaSchema:()=>kl,RequestSchema:()=>km,ResourceContentsSchema:()=>kQ,ResourceLinkSchema:()=>wV,ResourceListChangedNotificationSchema:()=>wr,ResourceRequestParamsSchema:()=>k7,ResourceSchema:()=>k4,ResourceTemplateReferenceSchema:()=>Vu,ResourceTemplateSchema:()=>k6,ResourceUpdatedNotificationParamsSchema:()=>wu,ResourceUpdatedNotificationSchema:()=>wm,ResultMetaObjectSchema:()=>ky,ResultSchema:()=>kg,RoleSchema:()=>k0,RootSchema:()=>Vg,RootsListChangedNotificationSchema:()=>Vb,SamplingContentSchema:()=>wZ,SamplingMessageContentBlockSchema:()=>wQ,SamplingMessageSchema:()=>wX,ServerCapabilitiesSchema:()=>kN,ServerNotificationSchema:()=>VN,ServerRequestSchema:()=>VM,ServerResultSchema:()=>Vz,ServerTasksCapabilitySchema:()=>kE,SetLevelRequestParamsSchema:()=>wF,SetLevelRequestSchema:()=>wL,SingleSelectEnumSchemaSchema:()=>w7,StringSchemaSchema:()=>w6,SubscribeRequestParamsSchema:()=>k7,SubscribeRequestSchema:()=>wi,SubscriptionFilterSchema:()=>wn,SubscriptionsAcknowledgedNotificationParamsSchema:()=>wd,SubscriptionsAcknowledgedNotificationSchema:()=>wc,SubscriptionsListenRequestParamsSchema:()=>wa,SubscriptionsListenRequestSchema:()=>ws,SubscriptionsListenResultMetaSchema:()=>wl,SubscriptionsListenResultSchema:()=>wp,TaskAugmentedRequestParamsSchema:()=>ku,TaskCreationParamsSchema:()=>V$,TaskMetadataSchema:()=>kd,TaskSchema:()=>Vk,TaskStatusNotificationParamsSchema:()=>VV,TaskStatusNotificationSchema:()=>VP,TaskStatusSchema:()=>VS,TextContentSchema:()=>wb,TextResourceContentsSchema:()=>kX,TitledMultiSelectEnumSchemaSchema:()=>Vt,TitledSingleSelectEnumSchemaSchema:()=>w5,ToolAnnotationsSchema:()=>wx,ToolChoiceSchema:()=>wK,ToolExecutionSchema:()=>wj,ToolListChangedNotificationSchema:()=>wN,ToolResultContentSchema:()=>wJ,ToolSchema:()=>wC,ToolUseContentSchema:()=>wk,UnsubscribeRequestParamsSchema:()=>k7,UnsubscribeRequestSchema:()=>wo,UntitledMultiSelectEnumSchemaSchema:()=>Ve,UntitledSingleSelectEnumSchemaSchema:()=>w9});let PY=e=>"object"==typeof e&&null!==e&&!Array.isArray(e)&&"input_required"===e.resultType,P1="x-mcp-header",P0=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/,P2=new Set(["string","integer","boolean","number"]);function P4(e){let t=[],r=new Map,i=(e,o,n)=>{if(null===e||"object"!=typeof e)return;if(P1 in e){if(!n||0===o.length)return`${P9(o)}: x-mcp-header is only permitted on properties statically reachable via a chain of 'properties' keys (not under items, additionalProperties, oneOf/anyOf/allOf/not, if/then/else, or $ref)`;let i=e[P1];if("string"!=typeof i||0===i.length)return`${P9(o)}: x-mcp-header MUST be a non-empty string`;if(!P0.test(i))return`${P9(o)}: x-mcp-header '${i}' is not a valid RFC 9110 token (no spaces, control characters or HTTP delimiters)`;let a="string"==typeof e.type?e.type:void 0;if(void 0===a||!P2.has(a))return`${P9(o)}: x-mcp-header is only permitted on primitive-typed properties (string, integer, boolean); got ${a??""}`;let s=i.toLowerCase(),d=r.get(s);if(void 0!==d)return`x-mcp-header '${i}' is not case-insensitively unique (also declared as '${d}')`;r.set(s,i),t.push({path:o,headerName:i,type:a})}let a=e.properties;if(null!==a&&"object"==typeof a)for(let[e,t]of Object.entries(a)){let r=i(t,[...o,e],n);if(void 0!==r)return r}for(let t of P6){let r=e[t];if(void 0!==r)for(let e of Array.isArray(r)?r:null!==r&&"object"==typeof r&&P3.has(t)?Object.values(r):[r]){let r=i(e,[...o,`<${t}>`],!1);if(void 0!==r)return r}}},o=i(e,[],!0);return void 0===o?{valid:!0,declarations:t}:{valid:!1,reason:o}}let P6=["items","prefixItems","contains","additionalProperties","unevaluatedProperties","unevaluatedItems","propertyNames","patternProperties","dependentSchemas","oneOf","anyOf","allOf","not","if","then","else","$defs","definitions"],P3=new Set(["patternProperties","dependentSchemas","$defs","definitions"]);function P9(e){return 0===e.length?"":e.join(".")}let P5="=?base64?";function P8(e){return new Set(e.flatMap(e=>Object.keys(e.shape)))}function P7(e){if(null==e)return!1;let t=typeof e;return("object"===t||"function"===t)&&"~standard"in e&&"function"==typeof e["~standard"]?.validate}PV.InvalidRequest,PV.UnsupportedProtocolVersion,PV.InvalidParams,PV.MethodNotFound,PV.InvalidParams,PV.MissingRequiredClientCapability,PV.ParseError,PV.InvalidRequest,PV.MethodNotFound,PV.UnsupportedProtocolVersion,PV.MissingRequiredClientCapability;let Re=!1,Rt="draft-2020-12";async function Rr(e,t){let r=await e["~standard"].validate(t);return r.issues&&r.issues.length>0?{success:!1,error:r.issues.map(e=>e.path?.length?`${e.path.map(e=>String("object"==typeof e?e.key:e)).join(".")}: ${e.message}`:e.message).join(", ")}:{success:!0,data:r.value}}let Ri=/\\\.\\d\{(\d+)\}/;function Ro(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}let Rn=new Set(["$comment","deprecated","description","examples","readOnly","title","writeOnly"]);function Ra(e){return Rn.has(e)||e.startsWith("x-")}let Rs=new Set(["$schema",...Object.keys(Vn.shape.requestedSchema.shape)]),Rd={string:P8([w6,w9,w5,w8]),number:P8([w3]),integer:P8([w3]),boolean:P8([w4]),array:P8([Ve,Vt])},Rc=new Set(w6.shape.format.unwrap().options);Object.assign(function(e){let t=void 0!==e.inputRequests&&Object.keys(e.inputRequests).length>0,r="string"==typeof e.requestState;if(!t&&!r)throw TypeError("inputRequired() requires at least one of inputRequests (with at least one entry) or requestState (spec: every InputRequiredResult MUST include at least one of the two)");return{resultType:"input_required",...void 0!==e.inputRequests&&{inputRequests:e.inputRequests},...void 0!==e.requestState&&{requestState:e.requestState}}},{elicit(e){try{return{method:"elicitation/create",params:function(e){var t;if(!P7(e.requestedSchema))return{...e,mode:"form",requestedSchema:e.requestedSchema};let r=e.requestedSchema["~standard"].vendor,i=function(e,t){let r={},i=[];for(let[o,n]of Object.entries(e))"properties"===o&&Ro(n)?r[o]=Object.fromEntries(Object.entries(n).map(([e,r])=>[e,function(e,t,r,i){if(!Ro(e))return e;let o="string"==typeof e.type&&Object.hasOwn(Rd,e.type)?Rd[e.type]:void 0;if(void 0===o)return e;let n={};for(let[s,d]of Object.entries(e))if(o.has(s)||Ra(s))n[s]=d;else if("pattern"===s&&"string"===e.type&&"string"==typeof e.format)if(Rc.has(e.format)){var a;"string"==typeof d&&(a=e.format,"zod"!==r||(function(e,t){let r;switch(e){case"email":r=[iw(nn,void 0)];break;case"uri":r=[iV(nd,void 0)];break;case"date":r=[iR(nr,void 0)];break;case"date-time":let i,o;i=Ri.exec(t),o=[void 0,-1,0],i&&o.push(Number(i[1])),r=[!1,!0].flatMap(e=>[!1,!0].flatMap(t=>o.map(r=>ac({local:e,offset:t,precision:r}))))}return new Set(r.map(e=>{let t;return t=ox(e,{target:Rt,io:"input"}),"string"==typeof t.pattern?t.pattern:void 0}).filter(e=>void 0!==e))})(a,d).has(d))||i.push(`${t}.${s}`)}else n[s]=d;else i.push(`${t}.${s}`);return n}(r,`properties.${e}`,t,i)])):Rs.has(o)?r[o]=n:Ra(o)||i.push(o);if(i.length>0)throw new PP(PV.InvalidParams,`Elicitation requestedSchema contains unsupported JSON Schema constraint(s) after Standard Schema conversion: ${i.join(", ")}`);return r}(function(e){try{return function(e,t="input"){let r,i=e["~standard"];if(i.jsonSchema)r=i.jsonSchema[t]({target:Rt});else if("zod"===i.vendor){if(!("_zod"in e))throw Error("Schema appears to be from zod 3, which the SDK cannot convert to JSON Schema. Upgrade to zod >=4.2.0, or wrap your JSON Schema with fromJsonSchema().");Re||(Re=!0,console.warn("[mcp-sdk] Your zod version does not implement `~standard.jsonSchema` (added in zod 4.2.0). Falling back to z.toJSONSchema(). Upgrade to zod >=4.2.0 to silence this warning.")),r=ox(e,{target:Rt,io:t})}else throw Error(`Schema library "${i.vendor}" does not implement StandardJSONSchemaV1 (\`~standard.jsonSchema\`). Upgrade to a version that does, or wrap your JSON Schema with fromJsonSchema().`);if("output"===t)return void 0!==r.type||!function e(t){if("properties"in t||"patternProperties"in t||"additionalProperties"in t||"required"in t)return!0;for(let r of["oneOf","anyOf","allOf"]){let i=t[r];if(Array.isArray(i)&&i.length>0)return i.every(t=>null!==t&&"object"==typeof t&&("object"===t.type||e(t)))}return!1}(r)?r:{type:"object",...r};if(void 0!==r.type&&"object"!==r.type)throw Error(`MCP tool and prompt schemas must describe objects (got type: ${JSON.stringify(r.type)}). Wrap your schema in z.object({...}) or equivalent.`);return{type:"object",...r}}(e,"input")}catch(t){let e=t instanceof Error?t.message:String(t);throw new PP(PV.InvalidParams,`Elicitation requestedSchema must describe an object with flat primitive properties: ${e}`)}}(e.requestedSchema),r),o=(t=Vn.shape.requestedSchema,oJ(t,i));if(!o.success)throw new PP(PV.InvalidParams,`Elicitation requestedSchema only supports flat primitive properties (string, number, integer, boolean, and string enums): ${function(e,t){if(!Ro(e.properties))return t;let r=Object.entries(e.properties).filter(([,e])=>!oJ(Vo,e).success).map(([e])=>`properties.${e}`);return r.length>0?r.join(", "):t}(i,o.error.message)}`);let n=function e(t,r,i=""){return Array.isArray(t)&&Array.isArray(r)?t.flatMap((t,o)=>e(t,r[o],`${i}[${o}]`)):Ro(t)&&Ro(r)?Object.entries(t).flatMap(([t,o])=>{let n=i?`${i}.${t}`:t;return Object.prototype.hasOwnProperty.call(r,t)?e(o,r[t],n):Ra(t)?[]:[n]}):[]}(i,o.data);if(n.length>0)throw new PP(PV.InvalidParams,`Elicitation requestedSchema contains unsupported JSON Schema constraint(s) after Standard Schema conversion: ${n.join(", ")}`);let a=(o.data.required??[]).filter(e=>!Object.prototype.hasOwnProperty.call(o.data.properties,e));if(a.length>0)throw new PP(PV.InvalidParams,`Elicitation requestedSchema lists required properties that are not defined in properties: ${a.join(", ")}`);return{...e,mode:"form",requestedSchema:o.data}}(e)}}catch(e){throw e instanceof PP?TypeError(e.message,{cause:e}):e}},elicitUrl:e=>({method:"elicitation/create",params:{...e,mode:"url"}}),createMessage:e=>({method:"sampling/createMessage",params:e}),listRoots:()=>({method:"roots/list"})});let Rl={},Rp={};function Ru(e,t){let r=e.slice(0,-6);Rl[r]=t,Rp[r]=e=>t.safeParse(e).success}for(let e of["AnnotationsSchema","AudioContentSchema","BaseMetadataSchema","BlobResourceContentsSchema","BooleanSchemaSchema","CallToolRequestSchema","CallToolRequestParamsSchema","CallToolResultSchema","CancelledNotificationSchema","CancelledNotificationParamsSchema","CancelTaskRequestSchema","CancelTaskResultSchema","ClientCapabilitiesSchema","ClientNotificationSchema","ClientRequestSchema","ClientResultSchema","CompatibilityCallToolResultSchema","CompleteRequestSchema","CompleteRequestParamsSchema","CompleteResultSchema","ContentBlockSchema","CreateMessageRequestSchema","CreateMessageRequestParamsSchema","CreateMessageResultSchema","CreateMessageResultWithToolsSchema","CreateTaskResultSchema","CursorSchema","DiscoverRequestSchema","DiscoverResultSchema","ElicitationCompleteNotificationSchema","ElicitationCompleteNotificationParamsSchema","ElicitRequestSchema","ElicitRequestFormParamsSchema","ElicitRequestParamsSchema","ElicitRequestURLParamsSchema","ElicitResultSchema","EmbeddedResourceSchema","EmptyResultSchema","EnumSchemaSchema","GetPromptRequestSchema","GetPromptRequestParamsSchema","GetPromptResultSchema","GetTaskPayloadRequestSchema","GetTaskPayloadResultSchema","GetTaskRequestSchema","GetTaskResultSchema","IconSchema","IconsSchema","ImageContentSchema","ImplementationSchema","InitializedNotificationSchema","InitializeRequestSchema","InitializeRequestParamsSchema","InitializeResultSchema","JSONArraySchema","JSONObjectSchema","JSONRPCErrorResponseSchema","JSONRPCMessageSchema","JSONRPCNotificationSchema","JSONRPCRequestSchema","JSONRPCResponseSchema","JSONRPCResultResponseSchema","JSONValueSchema","LegacyTitledEnumSchemaSchema","ListPromptsRequestSchema","ListPromptsResultSchema","ListResourcesRequestSchema","ListResourcesResultSchema","ListResourceTemplatesRequestSchema","ListResourceTemplatesResultSchema","ListRootsRequestSchema","ListRootsResultSchema","ListTasksRequestSchema","ListTasksResultSchema","ListToolsRequestSchema","ListToolsResultSchema","LoggingLevelSchema","LoggingMessageNotificationSchema","LoggingMessageNotificationParamsSchema","ModelHintSchema","ModelPreferencesSchema","MultiSelectEnumSchemaSchema","NotificationSchema","NumberSchemaSchema","PaginatedRequestSchema","PaginatedRequestParamsSchema","PaginatedResultSchema","PingRequestSchema","PrimitiveSchemaDefinitionSchema","ProgressSchema","ProgressNotificationSchema","ProgressNotificationParamsSchema","ProgressTokenSchema","PromptSchema","PromptArgumentSchema","PromptListChangedNotificationSchema","PromptMessageSchema","PromptReferenceSchema","ReadResourceRequestSchema","ReadResourceRequestParamsSchema","ReadResourceResultSchema","RelatedTaskMetadataSchema","RequestSchema","RequestIdSchema","RequestMetaSchema","ResourceSchema","ResourceContentsSchema","ResourceLinkSchema","ResourceListChangedNotificationSchema","ResourceRequestParamsSchema","ResourceTemplateSchema","ResourceTemplateReferenceSchema","ResourceUpdatedNotificationSchema","ResourceUpdatedNotificationParamsSchema","ResultMetaObjectSchema","ResultSchema","RoleSchema","RootSchema","RootsListChangedNotificationSchema","SamplingContentSchema","SamplingMessageSchema","SamplingMessageContentBlockSchema","ServerCapabilitiesSchema","ServerNotificationSchema","ServerRequestSchema","ServerResultSchema","SetLevelRequestSchema","SetLevelRequestParamsSchema","SingleSelectEnumSchemaSchema","StringSchemaSchema","SubscribeRequestSchema","SubscribeRequestParamsSchema","SubscriptionFilterSchema","SubscriptionsAcknowledgedNotificationSchema","SubscriptionsAcknowledgedNotificationParamsSchema","SubscriptionsListenRequestSchema","SubscriptionsListenRequestParamsSchema","SubscriptionsListenResultSchema","SubscriptionsListenResultMetaSchema","TaskAugmentedRequestParamsSchema","TaskCreationParamsSchema","TaskMetadataSchema","TaskSchema","TaskStatusSchema","TaskStatusNotificationSchema","TaskStatusNotificationParamsSchema","TextContentSchema","TextResourceContentsSchema","TitledMultiSelectEnumSchemaSchema","TitledSingleSelectEnumSchemaSchema","ToolSchema","ToolAnnotationsSchema","ToolChoiceSchema","ToolExecutionSchema","ToolListChangedNotificationSchema","ToolResultContentSchema","ToolUseContentSchema","UnsubscribeRequestSchema","UnsubscribeRequestParamsSchema","UntitledMultiSelectEnumSchemaSchema","UntitledSingleSelectEnumSchemaSchema"])Ru(e,PX[e]);for(let[e,t]of Object.entries({IdJagTokenExchangeResponseSchema:VB,OAuthClientInformationFullSchema:VX,OAuthClientInformationSchema:VQ,OAuthClientMetadataSchema:VZ,OAuthClientRegistrationErrorSchema:VY,OAuthErrorResponseSchema:VK,OAuthMetadataSchema:VL,OAuthProtectedResourceMetadataSchema:VF,OAuthTokenRevocationRequestSchema:V1,OAuthTokensSchema:VG,OpenIdProviderDiscoveryMetadataSchema:VH,OpenIdProviderMetadataSchema:VU}))Ru(e,t);Object.freeze(Rl);let Rm=Object.freeze(Rp),Rf=[S5,S8,ke,kr],Rh=["inputResponses","requestState"];function Ry(e,t){let r=e.params;if(!Rb(r))return{message:e,lifted:{}};let i=r._meta,o=Rb(i)?Rf.filter(e=>e in i):[],n="request"===t?Rh.filter(e=>e in r):[];if(0===o.length&&0===n.length)return{message:e,lifted:{}};let a={},s={...r};if(o.length>0&&Rb(i)){let e={},t={...i};for(let r of o)e[r]=i[r],delete t[r];a.envelope=e,Object.keys(t).length>0?s._meta=t:delete s._meta}for(let e of n)"inputResponses"===e&&(a.inputResponses=s[e]),"requestState"===e&&(a.requestState=s[e]),delete s[e];return{message:{...e,params:s},lifted:a}}function Rg(e,t){let r=e.validateResult(t,void 0);if(r.ok||"not-in-era"!==r.reason)return{"~standard":{version:1,vendor:"mcp-wire-codec",validate(r){let i=e.validateResult(t,r);return i.ok?{value:i.value}:{issues:[{message:"invalid"===i.reason?i.message:`not-in-era: ${t}`}]}}}}}let R_=(ee=void 0,()=>ee);var Rv=class{_transport;_requestMessageId=0;_requestHandlers=new Map;_customSchemaRequestMethods=new Set;_requestHandlerAbortControllers=new Map;_notificationHandlers=new Map;_responseHandlers=new Map;_progressHandlers=new Map;_timeoutInfo=new Map;_pendingDebouncedNotifications=new Set;_negotiatedProtocolVersion;_supportedProtocolVersions;onclose;onerror;fallbackRequestHandler;fallbackNotificationHandler;constructor(e){this._options=e,this._supportedProtocolVersions=e?.supportedProtocolVersions??S9,this.setNotificationHandler("notifications/cancelled",e=>{this._oncancel(e)}),this.setNotificationHandler("notifications/progress",e=>{this._onprogress(e)}),this.setRequestHandler("ping",e=>({}))}_shouldDropInbound(e){}_outboundMetaEnvelope(){}_envelopeOutbound(e){let t=this._outboundMetaEnvelope();if(void 0===t)return e;let r=e.params??{};return{...e,params:{...r,_meta:{...t,...r._meta}}}}_resolveNonCompleteResult(e,t){return Promise.reject(new V3(V6.UnsupportedResultType,`Unsupported result type '${e.kind}' for ${t.request.method}`,{resultType:e.kind,method:t.request.method}))}_getRequestHandler(e){return this._requestHandlers.get(e)}async _oncancel(e){void 0!==e.params.requestId&&this._requestHandlerAbortControllers.get(e.params.requestId)?.abort(e.params.reason)}_setupTimeout(e,t,r,i,o=!1){this._timeoutInfo.set(e,{timeoutId:setTimeout(i,t),startTime:Date.now(),timeout:t,maxTotalTimeout:r,resetTimeoutOnProgress:o,onTimeout:i})}_resetTimeout(e){let t=this._timeoutInfo.get(e);if(!t)return!1;let r=Date.now()-t.startTime;if(t.maxTotalTimeout&&r>=t.maxTotalTimeout)throw this._timeoutInfo.delete(e),new V3(V6.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:t.maxTotalTimeout,totalElapsed:r});return clearTimeout(t.timeoutId),t.timeoutId=setTimeout(t.onTimeout,t.timeout),!0}_cleanupTimeout(e){let t=this._timeoutInfo.get(e);t&&(clearTimeout(t.timeoutId),this._timeoutInfo.delete(e))}async connect(e){this._transport=e;let t=this.transport?.onclose;this._transport.onclose=()=>{try{t?.()}finally{this._onclose()}};let r=this.transport?.onerror;this._transport.onerror=e=>{r?.(e),this._onerror(e)};let i=this._transport?.onmessage;this._transport.onmessage=(e,t)=>{if(i?.(e,t),k$.safeParse(e).success||kS.safeParse(e).success)this._onresponse(e);else if(kv.safeParse(e).success)this._onrequest(e,t);else kb.safeParse(e).success?this._onnotification(e,t):this._onerror(Error(`Unknown message type: ${JSON.stringify(e)}`))},e.setSupportedProtocolVersions?.(this._supportedProtocolVersions),await this._transport.start()}_onclose(){let e=this._responseHandlers;for(let e of(this._responseHandlers=new Map,this._progressHandlers.clear(),this._pendingDebouncedNotifications.clear(),this._timeoutInfo.values()))clearTimeout(e.timeoutId);this._timeoutInfo.clear();let t=this._requestHandlerAbortControllers;this._requestHandlerAbortControllers=new Map;let r=new V3(V6.ConnectionClosed,"Connection closed");this._transport=void 0;try{this.onclose?.()}finally{for(let t of e.values())t(r);for(let e of t.values())e.abort(r)}}_onerror(e){this.onerror?.(e)}_onnotification(e,t){let{message:r}=Ry(e,"notification"),i=this._negotiatedWireCodec();if(t?.classification===void 0&&"drop"===this._shouldDropInbound(e))return;if(t?.classification!==void 0){let e=PB(t.classification);if(e!==i.era)return void this._onerror(Error(`Era mismatch on inbound notification '${r.method}': classified as ${e} but this instance serves ${i.era}`))}if(PJ(r.method)&&!i.hasNotificationMethod(r.method))return;let o=this._notificationHandlers.get(r.method),n=this.fallbackNotificationHandler;(void 0!==o||void 0!==n)&&Promise.resolve().then(()=>void 0===o?n(r):o(r,i)).catch(e=>this._onerror(Error(`Uncaught error in notification handler: ${e}`)))}_onrequest(e,t){var r;let{message:i,lifted:o}=Ry(e,"request"),n=this._negotiatedWireCodec();if(t?.classification===void 0&&"drop"===this._shouldDropInbound(e))return void this._onerror(Error(`Dropped inbound request '${e.method}': not servable on this connection's protocol era`));let a=this._transport,s=(e,t,r)=>{let o={jsonrpc:"2.0",id:i.id,error:{code:e,message:t,...void 0!==r&&{data:r}}};a?.send(o).catch(e=>this._onerror(Error(`Failed to send an error response: ${e}`)))};if(t?.classification!==void 0){let e=PB(t.classification);if(e!==n.era){this._onerror(Error(`Era mismatch on inbound request '${i.method}': classified as ${e} but this instance serves ${n.era}`));let r=t.classification.revision??e;s(PV.UnsupportedProtocolVersion,`Unsupported protocol version: ${r}`,{supported:this._supportedProtocolVersions,requested:r});return}}if(PK(i.method)&&!n.hasRequestMethod(i.method)&&!(PZ(i.method)&&this._customSchemaRequestMethods.has(i.method)))return void s(PV.MethodNotFound,"Method not found");let d=this._requestHandlers.get(i.method)??this.fallbackRequestHandler;if(void 0===d)return void s(PV.MethodNotFound,"Method not found");let c=n.checkInboundEnvelope(o);if(void 0!==c)return void s(PV.InvalidParams,c);let l=(e,t)=>this._notificationViaCodec(this._resolveOutboundCodec(e.method),e,{...t,relatedRequestId:i.id}),p=(e,t,r)=>this._requestWithSchemaViaCodec(this._resolveOutboundCodec(e.method),e,t,{...r,relatedRequestId:i.id}),u=new AbortController;this._requestHandlerAbortControllers.set(i.id,u);let m=void 0===o.inputResponses?void 0:function(e){let t={},r=[];if(!R$(e))return{accepted:t,droppedKeys:r};for(let[i,o]of Object.entries(e)){if(!R$(o)||"method"in o||"result"in o){r.push(i);continue}t[i]=o}return{accepted:t,droppedKeys:r}}(o.inputResponses),f={sessionId:a?.sessionId,mcpReq:{id:i.id,method:i.method,_meta:i.params?._meta,...void 0!==o.envelope&&{envelope:o.envelope},...void 0!==m&&{inputResponses:m.accepted},...void 0!==m&&m.droppedKeys.length>0&&{droppedInputResponseKeys:m.droppedKeys},requestState:void 0===o.requestState?R_:(r=o.requestState,()=>r),signal:u.signal,send:(e,t,r)=>{let i=this._resolveOutboundCodec(e.method);if(this._assertOutboundRequestInEra(i,e.method),P7(t))return p(e,t,r);let o=Rg(i,e.method);if(void 0===o)throw TypeError(`'${e.method}' is not a spec method; pass a result schema as the second argument to ctx.mcpReq.send().`);return p(e,o,t)},notify:l},http:t?.authInfo?{authInfo:t.authInfo}:void 0},h=this.buildContext(f,t);Promise.resolve().then(()=>d(i,h)).then(async e=>{let t;if(u.signal.aborted)return;try{t=n.encodeResult(i.method,e,this._outboundServerInfo())}catch(e){this._onerror(Error(`Failed to encode result for ${i.method}: ${e}`)),s(PV.InternalError,"Internal error");return}let r={result:t,jsonrpc:"2.0",id:i.id};await a?.send(r)},async e=>{if(u.signal.aborted)return;let t=Number.isSafeInteger(e.code)?e.code:PV.InternalError,r={jsonrpc:"2.0",id:i.id,error:{code:n.encodeErrorCode(t),message:e.message??"Internal error",...void 0!==e.data&&{data:e.data}}};await a?.send(r)}).catch(e=>this._onerror(Error(`Failed to send response: ${e}`))).finally(()=>{this._requestHandlerAbortControllers.get(i.id)===u&&this._requestHandlerAbortControllers.delete(i.id)})}_onprogress(e){let{progressToken:t,...r}=e.params,i=Number(t),o=this._progressHandlers.get(i);if(!o)return void this._onerror(Error(`Received a progress notification for an unknown token: ${JSON.stringify(e)}`));let n=this._responseHandlers.get(i),a=this._timeoutInfo.get(i);if(a&&n&&a.resetTimeoutOnProgress)try{this._resetTimeout(i)}catch(e){this._responseHandlers.delete(i),this._progressHandlers.delete(i),this._cleanupTimeout(i),n(e);return}o(r)}_onresponse(e){let t=Number(e.id),r=this._responseHandlers.get(t);void 0===r?this._onerror(Error(`Received a response for an unknown message ID: ${JSON.stringify(e)}`)):(this._responseHandlers.delete(t),this._cleanupTimeout(t),this._progressHandlers.delete(t),r(k$.safeParse(e).success?e:PP.fromError(e.error.code,e.error.message,e.error.data)))}get transport(){return this._transport}async close(){await this._transport?.close()}request(e,t,r){let i=this._resolveOutboundCodec(e.method);if(P7(t))return PZ(e.method)||this._assertOutboundRequestInEra(i,e.method),this._requestWithSchemaViaCodec(i,e,t,r);this._assertOutboundRequestInEra(i,e.method);let o=Rg(i,e.method);if(void 0===o)throw TypeError(`'${e.method}' is not a spec method; pass a result schema as the second argument to request().`);return this._requestWithSchemaViaCodec(i,e,o,t)}_negotiatedWireCodec(){return PG(this._negotiatedProtocolVersion)}_wireCodec(){return this._negotiatedWireCodec()}_resolveOutboundCodec(e){if(void 0===this._negotiatedProtocolVersion){let t=function(e){switch(e){case"initialize":case"notifications/initialized":return PG(void 0);case"server/discover":return PG(PH);default:return}}(e);if(t)return t}return this._negotiatedWireCodec()}_assertOutboundRequestInEra(e,t){if(PK(t)&&!e.hasRequestMethod(t))throw new V3(V6.MethodNotSupportedByProtocolVersion,`Method '${t}' is not supported by the negotiated protocol version (wire era ${e.era})`,{method:t,era:e.era})}_requestWithSchema(e,t,r){let i=this._resolveOutboundCodec(e.method);return this._assertOutboundRequestInEra(i,e.method),this._requestWithSchemaViaCodec(i,e,t,r)}_requestWithSchemaViaCodec(e,t,r,i){let o,n,{relatedRequestId:a,resumptionToken:s,onresumptiontoken:d,headers:c}=i??{},l=Date.now();return new Promise((p,u)=>{let m=e=>{u(e)};if(!this._transport)return void m(Error("Not connected"));if(this._options?.enforceStrictCapabilities===!0)try{this.assertCapabilityForMethod(t.method)}catch(e){m(e);return}if(i?.signal?.aborted){let e=i.signal.reason;throw e instanceof V3?e:new V3(V6.RequestTimeout,String(e))}let f=e.era===PH&&!0===this._transport.hasPerRequestStream?new AbortController:void 0,h=this._requestMessageId++;n=h;let y={...t,jsonrpc:"2.0",id:h};i?.onprogress&&(this._progressHandlers.set(h,i.onprogress),y.params={...t.params,_meta:{...t.params?._meta,progressToken:h}});let g=this._envelopeOutbound(y),_=!1,v=e=>{_||(this._progressHandlers.delete(h),void 0===f?"initialize"!==t.method&&this._transport?.send(this._envelopeOutbound({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:h,reason:String(e)}}),{relatedRequestId:a,resumptionToken:s,onresumptiontoken:d}).catch(e=>this._onerror(Error(`Failed to send cancellation: ${e}`))):f.abort(),u(e instanceof V3?e:new V3(V6.RequestTimeout,String(e))))};this._responseHandlers.set(h,o=>{let n;if(!i?.signal?.aborted){if(_=!0,o instanceof Error)return u(o);try{n=e.decodeResult(t.method,o.result)}catch(e){return u(e instanceof Error?e:Error(String(e)))}if("invalid"===n.kind)return u(n.error);if("input_required"===n.kind){var a;return i?.allowInputRequired===!0?p({resultType:"input_required",inputRequests:(a=n).inputRequests,...void 0!==a.requestState&&{requestState:a.requestState},...void 0!==a._meta&&{_meta:a._meta}}):p(this._resolveNonCompleteResult(n,{codec:e,request:t,resultSchema:r,options:i,flowStartedAt:l,retry:(i,o)=>this._requestWithSchemaViaCodec(e,void 0===i?{method:t.method}:{method:t.method,params:i},r,o)}))}Rr(r,n.result).then(e=>{e.success?p(e.data):u(new V3(V6.InvalidResult,`Invalid result for ${t.method}: ${e.error}`))},u)}}),o=()=>v(i?.signal?.reason),i?.signal?.addEventListener("abort",o,{once:!0});let b=i?.timeout??6e4;this._setupTimeout(h,b,i?.maxTotalTimeout,()=>v(new V3(V6.RequestTimeout,"Request timed out",{timeout:b})),i?.resetTimeoutOnProgress??!1),this._transport.send(g,{relatedRequestId:a,resumptionToken:s,onresumptiontoken:d,headers:c,requestSignal:f?.signal}).catch(e=>{this._progressHandlers.delete(h),u(e)})}).finally(()=>{o&&i?.signal?.removeEventListener("abort",o),void 0!==n&&(this._responseHandlers.delete(n),this._cleanupTimeout(n))})}async notification(e,t){return await this._notificationViaCodec(this._resolveOutboundCodec(e.method),e,t)}async _notificationViaCodec(e,t,r){if(!this._transport)throw new V3(V6.NotConnected,"Not connected");if(PJ(t.method)&&!e.hasNotificationMethod(t.method))throw new V3(V6.MethodNotSupportedByProtocolVersion,`Notification '${t.method}' is not supported by the negotiated protocol version (wire era ${e.era})`,{method:t.method,era:e.era});this.assertNotificationCapability(t.method);let i=this._envelopeOutbound({jsonrpc:"2.0",...t});if((this._options?.debouncedNotificationMethods??[]).includes(t.method)&&!t.params&&r?.relatedRequestId===void 0){if(this._pendingDebouncedNotifications.has(t.method))return;this._pendingDebouncedNotifications.add(t.method),Promise.resolve().then(()=>{this._pendingDebouncedNotifications.delete(t.method),this._transport&&this._transport?.send(i,r).catch(e=>this._onerror(e))});return}await this._transport.send(i,r)}setRequestHandler(e,t,r){let i;if(this.assertRequestHandlerCapability(e),"function"==typeof t){if(!PK(e))throw TypeError(`'${e}' is not a spec request method; pass schemas as the second argument to setRequestHandler().`);i=(r,i)=>{let o=this._negotiatedWireCodec(),n=o.validateRequest(e,r);if(n.ok||"not-in-era"!==n.reason||(n=o.validateInputRequest(e,r)),!n.ok){if("not-in-era"===n.reason)throw new PP(PV.InternalError,`No wire schema for ${e} in the resolved era`);throw Error(n.message)}return Promise.resolve(t(n.value,i))}}else if(r)i=async(i,o)=>{let n=await Rr(t.params,{...i.params});if(!n.success)throw new PP(PV.InvalidParams,`Invalid params for ${e}: ${n.error}`);return r(n.data,o)};else throw TypeError("setRequestHandler: handler is required");"function"==typeof t?this._customSchemaRequestMethods.delete(e):this._customSchemaRequestMethods.add(e),this._requestHandlers.set(e,this._wrapHandler(e,i))}_wrapHandler(e,t){return t}_outboundServerInfo(){}removeRequestHandler(e){this._requestHandlers.delete(e),this._customSchemaRequestMethods.delete(e)}assertCanSetRequestHandler(e){if(this._requestHandlers.has(e))throw Error(`A request handler for ${e} already exists, which would be overridden`)}setNotificationHandler(e,t,r){if("function"==typeof t){if(!PJ(e))throw TypeError(`'${e}' is not a spec notification method; pass schemas as the second argument to setNotificationHandler().`);this._notificationHandlers.set(e,(r,i)=>{let o=i.validateNotification(e,r);if(!o.ok){if("not-in-era"===o.reason)throw new PP(PV.InternalError,`No wire schema for ${e} in the resolved era`);throw Error(o.message)}return Promise.resolve(t(o.value))});return}if(!r)throw TypeError("setNotificationHandler: handler is required");this._notificationHandlers.set(e,async i=>{let o=await Rr(t.params,{...i.params});if(!o.success)throw new PP(PV.InvalidParams,`Invalid params for notification ${e}: ${o.error}`);await r(o.data,i)})}removeNotificationHandler(e){this._notificationHandlers.delete(e)}};function Rb(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)}function R$(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}function RS(e){throw new V3(V6.SendFailed,`ctx.mcpReq.${e} is not available while fulfilling an embedded input request: the request is fulfilled locally and has no related peer request`)}(S0(e=>{var t=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,r=/\\([\u000b\u0020-\u00ff])/g,i=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;function o(e){this.parameters=Object.create(null),this.type=e}e.parse=function(e){if(!e)throw TypeError("argument string is required");var n,a,s,d="object"==typeof e?function(e){var t;if("function"==typeof e.getHeader?t=e.getHeader("content-type"):"object"==typeof e.headers&&(t=e.headers&&e.headers["content-type"]),"string"!=typeof t)throw TypeError("content-type header is missing from object");return t}(e):e;if("string"!=typeof d)throw TypeError("argument string is required to be a string");var c=d.indexOf(";"),l=-1!==c?d.slice(0,c).trim():d.trim();if(!i.test(l))throw TypeError("invalid media type");var p=new o(l.toLowerCase());if(-1!==c){for(t.lastIndex=c;a=t.exec(d);){if(a.index!==c)throw TypeError("invalid parameter format");c+=a[0].length,n=a[1].toLowerCase(),34===(s=a[2]).charCodeAt(0)&&-1!==(s=s.slice(1,-1)).indexOf("\\")&&(s=s.replace(r,"$1")),p.parameters[n]=s}if(c!==d.length)throw TypeError("invalid parameter format")}return p}}))();var Rk=class{_buffer;_maxBufferSize;constructor(e){this._maxBufferSize=e?.maxBufferSize??0xa00000}append(e){if((this._buffer?.length??0)+e.length>this._maxBufferSize)throw this.clear(),Error(`ReadBuffer exceeded maximum size of ${this._maxBufferSize} bytes`);this._buffer=this._buffer?Buffer.concat([this._buffer,e]):e}readMessage(){for(;this._buffer;){let t=this._buffer.indexOf("\n");if(-1===t)break;let r=this._buffer.toString("utf8",0,t).replace(/\r$/,"");this._buffer=this._buffer.subarray(t+1);try{var e;return e=r,kk.parse(JSON.parse(e))}catch(e){if(e instanceof SyntaxError)continue;throw e}}return null}clear(){this._buffer=void 0}};let Rw=el("../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/index.js"),RV="win32"===M.platform?["APPDATA","COMSPEC","HOMEDRIVE","HOMEPATH","LOCALAPPDATA","PATH","PATHEXT","PROCESSOR_ARCHITECTURE","PROGRAMDATA","PROGRAMFILES","PROGRAMFILES(X86)","PROGRAMW6432","SYSTEMDRIVE","SYSTEMROOT","TEMP","USERNAME","USERPROFILE","WINDIR"]:["HOME","LOGNAME","PATH","SHELL","TERM","USER"];var RP=class{_process;_readBuffer;_serverParams;_stderrStream=null;onclose;onerror;onmessage;constructor(e){this._serverParams=e,this._readBuffer=new Rk({maxBufferSize:e.maxBufferSize}),("pipe"===e.stderr||"overlapped"===e.stderr)&&(this._stderrStream=new H)}async start(){if(this._process)throw Error("StdioClientTransport already started! If using Client class, note that connect() calls start() automatically.");return new Promise((e,t)=>{this._process=Rw(this._serverParams.command,this._serverParams.args??[],{env:{...function(){let e={};for(let t of RV){let r=M.env[t];void 0!==r&&(r.startsWith("()")||(e[t]=r))}return e}(),...this._serverParams.env},stdio:["pipe","pipe",this._serverParams.stderr??"inherit"],shell:!1,windowsHide:"win32"===M.platform,cwd:this._serverParams.cwd}),this._process.on("error",e=>{t(e),this.onerror?.(e)}),this._process.on("spawn",()=>{e()}),this._process.on("close",e=>{this._process=void 0,this.onclose?.()}),this._process.stdin?.on("error",e=>{this.onerror?.(e)}),this._process.stdout?.on("data",e=>{try{this._readBuffer.append(e),this.processReadBuffer()}catch(e){this.onerror?.(e),this.close().catch(()=>{})}}),this._process.stdout?.on("error",e=>{this.onerror?.(e)}),this._stderrStream&&this._process.stderr&&this._process.stderr.pipe(this._stderrStream)})}get stderr(){return this._stderrStream?this._stderrStream:this._process?.stderr??null}get pid(){return this._process?.pid??null}processReadBuffer(){for(;;)try{let e=this._readBuffer.readMessage();if(null===e)break;this.onmessage?.(e)}catch(e){this.onerror?.(e)}}async _dispose(){let e=this._process;if(this._process=void 0,e&&null===e.exitCode&&null===e.signalCode){let t=new Promise(t=>e.once("exit",()=>t()));try{e.stdin?.end()}catch{}try{e.kill("SIGTERM")}catch{}if(await Promise.race([t,new Promise(e=>setTimeout(e,1e3).unref())]),null===e.exitCode&&null===e.signalCode)try{e.kill("SIGKILL")}catch{}await t}try{e?.stdout?.destroy()}catch{}try{e?.stdin?.destroy()}catch{}try{e?.stderr?.destroy()}catch{}this._readBuffer.clear()}async close(){if(this._process){let e=this._process;this._process=void 0;let t=new Promise(t=>{e.once("close",()=>{t()})});try{e.stdin?.end()}catch{}if(await Promise.race([t,new Promise(e=>setTimeout(e,2e3).unref())]),null===e.exitCode){try{e.kill("SIGTERM")}catch{}await Promise.race([t,new Promise(e=>setTimeout(e,2e3).unref())])}if(null===e.exitCode)try{e.kill("SIGKILL")}catch{}}this._readBuffer.clear()}send(e){return new Promise(t=>{if(!this._process?.stdin)throw new V3(V6.NotConnected,"Not connected");let r=JSON.stringify(e)+"\n";this._process.stdin.write(r)?t():this._process.stdin.once("drain",t)})}};let RR=new TextEncoder,Rq=new TextDecoder,RI=new TextDecoder("utf-8",{fatal:!0});function Rx(...e){let t=new Uint8Array(e.reduce((e,{length:t})=>e+t,0)),r=0;for(let i of e)t.set(i,r),r+=i.length;return t}function Rj(e,t,r){if(t<0||t>=0x100000000)throw RangeError(`value must be >= 0 and <= 4294967295. Received ${t}`);e.set([t>>>24,t>>>16,t>>>8,255&t],r)}function RC(e){let t=Math.floor(e/0x100000000),r=new Uint8Array(8);return Rj(r,t,0),Rj(r,e%0x100000000,4),r}function RT(e){let t=new Uint8Array(4);return Rj(t,e),t}let RO=/[^\x00-\x7f]/;function RE(e){if("string"==typeof e&&e.length>=128){if(RO.test(e))throw TypeError("non-ASCII string encountered in encode()");return RR.encode(e)}let t=new Uint8Array(e.length);for(let r=0;r127)throw TypeError("non-ASCII string encountered in encode()");t[r]=i}return t}function RA(e,t=!1){if(Uint8Array.prototype.toBase64)return e.toBase64({alphabet:t?"base64url":"base64",omitPadding:t});let r=[];for(let t=0;t"string"!=typeof e)))throw TypeError(`"${e}" option must be an array of strings`);return void 0===t?void 0:new Set(t)}function qi(e,t){let{crit:r}=t??{};if(Array.isArray(r)&&new Set(r).size!==r.length)throw new e('"crit" (Critical) Header Parameter MUST NOT contain duplicate values')}function qo(e,t,r,i,o){if(void 0!==o.crit&&i?.crit===void 0)throw new e('"crit" (Critical) Header Parameter MUST be integrity protected');if(!i||void 0===i.crit)return[];if(!Array.isArray(i.crit)||0===i.crit.length||i.crit.some(e=>"string"!=typeof e||0===e.length))throw new e('"crit" (Critical) Header Parameter MUST be an array of non-empty strings when present');let n=void 0===r?t:{__proto__:null,...r,...t};for(let t of i.crit){if(!(t in n))throw new RL(`Extension Header Parameter "${t}" is not recognized`);if(!Object.hasOwn(o,t)||void 0===o[t])throw new e(`Extension Header Parameter "${t}" is missing`);if(n[t]&&(!Object.hasOwn(i,t)||void 0===i[t]))throw new e(`Extension Header Parameter "${t}" MUST be integrity protected`)}return i.crit}function qn(e,t){if(t.includes("b64")){let t=e.b64;if("boolean"!=typeof t)throw new RG('The "b64" (base64url-encode payload) Header Parameter must be a boolean');return t}return!0}function qa(e,t){let r,i;try{r=JSON.stringify(t),i=JSON.parse(r)}catch(t){throw new e("JOSE Header is not valid JSON",{cause:t})}if(!R4(i))throw new e("JOSE Header is not a JSON object");return[i,r]}async function qs(e,t,r){let i,o,{alg:n,secret:a}=e,s="decrypt"===r||"sign"===r;if(a&&t instanceof Uint8Array)return t;if(R4(t)){if("string"!=typeof(i=q$(t)).kty)throw qh(n,t,a);if(!(a?"oct"===i.kty&&"string"==typeof i.k:"oct"!==i.kty&&(s?"AKP"===i.kty&&"string"==typeof i.priv||"string"==typeof i.d:void 0===i.d&&void 0===i.priv)))throw TypeError(a?'JSON Web Key for symmetric algorithms must have JWK "kty" (Key Type) equal to "oct" and the JWK "k" (Key Value) present':`JSON Web Key for this operation must be a ${s?"private":"public"} JWK`);if(((e,t,r)=>{let{alg:i}=e;if(void 0!==t.use){let e="sign"===r||"verify"===r?"sig":"enc";if(t.use!==e)throw TypeError(`Invalid key for this operation, its "use" must be "${e}" when present`)}if(void 0!==t.alg&&t.alg!==i)throw TypeError(`Invalid key for this operation, its "alg" must be "${i}" when present`);if(Array.isArray(t.key_ops)){let i="encrypt"===r||"decrypt"===r?e.ops?.[+("encrypt"!==r)]:r;if(i&&!t.key_ops.includes(i))throw TypeError(`Invalid key for this operation, its "key_ops" must include "${i}" when present`)}})(e,i,r),"oct"===i.kty)return R1(i.k);if(!Object.isFrozen(t)){let{key_ops:e}=t;Array.isArray(e)&&Object.freeze(e),Object.freeze(t)}}else{if(!qu(t))throw qh(n,t,a);let e=a?"secret":s?"private":"public";if(t.type!==e&&(a||["secret","public","private"].includes(t.type)))throw TypeError(`${t[Symbol.toStringTag]} instances must be of type "${e}" for the ${n} algorithm`);if(ql(t))return t;if("secret"===(o=t).type)return o.export()}let d=(m||=new WeakMap).get(t);if(d?.[n])return d[n];if(d||m.set(t,d={}),o&&"function"==typeof o.toCryptoKey){let t="public"===o.type,r=qd[o.asymmetricKeyDetails?.namedCurve],i=e.resolve?.({crv:r,asymmetricKeyType:o.asymmetricKeyType})??e.subtle;return d[n]=o.toCryptoKey(i,t,e.usages[+!t])}return(i??=o.export({format:"jwk"})).alg=n,d[n]=await qk(e,i)}let qd={__proto__:null,prime256v1:"P-256",secp384r1:"P-384",secp521r1:"P-521"};function qc(e){if(!ql(e))throw Error("CryptoKey instance expected")}let ql=e=>{if(e?.[Symbol.toStringTag]==="CryptoKey")return!0;try{return e instanceof CryptoKey}catch{return!1}},qp=e=>e?.[Symbol.toStringTag]==="KeyObject",qu=e=>ql(e)||qp(e);function qm(e,t,...r){if(r.length>2){let t=r.pop();e+=`one of type ${r.join(", ")}, or ${t}.`}else 2===r.length?e+=`one of type ${r[0]} or ${r[1]}.`:e+=`of type ${r[0]}.`;return null==t?e+=` Received ${t}`:"function"==typeof t&&t.name?e+=` Received function ${t.name}`:"object"==typeof t&&null!=t&&t.constructor?.name&&(e+=` Received an instance of ${t.constructor.name}`),e}let qf=(e,...t)=>qm("Key must be ",e,...t);function qh(e,t,r){let i=["CryptoKey","KeyObject","JSON Web Key"];return r&&i.push("Uint8Array"),TypeError(qm(`Key for the ${e} algorithm must be `,t,...i))}let qy=(e,t="algorithm.name")=>TypeError(`CryptoKey does not support this operation, its ${t} must be ${e}`);function qg(e,t){if(t&&!e.usages.includes(t))throw TypeError(`CryptoKey does not support this operation, its usages must include ${t}.`)}function q_(e,t){let{modulusLength:r}=t.algorithm;if("number"!=typeof r||r<2048)throw TypeError(`${e} requires key modulusLength to be 2048 bits or larger`)}function qv(e,t,r){let i=e.algorithm;if(i.name!==t.name)throw qy(t.name);if(t.hash&&i.hash?.name!==t.hash)throw qy(t.hash,"algorithm.hash");if(t.namedCurve&&i.namedCurve!==t.namedCurve)throw qy(t.namedCurve,"algorithm.namedCurve");if(void 0!==t.length&&i.length!==t.length)throw qy(t.length,"algorithm.length");qg(e,r)}function qb(e){return{__proto__:null,...e}}function q$(e){let t=qb(e);if(void 0!==t.ext&&"boolean"!=typeof t.ext)throw TypeError('"ext" (Extractable) Parameter must be a boolean');if(void 0!==t.key_ops){let e=t.key_ops,r=Array.isArray(e)?[...e]:void 0;if(!r||r.some(e=>"string"!=typeof e)||new Set(r).size!==r.length)throw TypeError('"key_ops" (Key Operations) Parameter must be an array of unique strings');t.key_ops=r}return t}function qS(e){if(void 0!==e&&"boolean"!=typeof e)throw TypeError('"extractable" option must be a boolean');return e}async function qk(e,t,r){if(!e.kty.includes(t.kty))throw new RL('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');let i=e.resolve?.({kty:t.kty,crv:t.crv})??e.subtle,o=!!(t.d||t.priv),n={...t,ext:r??t.ext};return"AKP"!==n.kty&&delete n.alg,delete n.use,crypto.subtle.importKey("jwk",n,i,n.ext??!o,t.key_ops??e.usages[+!!o])}async function qw(e,t,r,i=!1){return e instanceof Uint8Array&&(e=await crypto.subtle.importKey("raw",e,t,i,[r])),qv(e,t,r),e}let qV=e=>crypto.getRandomValues(new Uint8Array(e.cekBits>>3));function qP(e,t){let r=e.byteLength<<3;if(r!==t)throw new RH(`Invalid Content Encryption Key length. Expected ${t} bits, got ${r} bits`)}function qR(e,t){if(t.length<<3!==e.ivBits)throw new RH("Invalid Initialization Vector length")}async function qq(e,t,r){if(!(t instanceof Uint8Array))throw TypeError(qf(t,"Uint8Array"));let i=e.cekBits>>1;return[await crypto.subtle.importKey("raw",t.subarray(i>>3),"AES-CBC",!1,[r]),await crypto.subtle.importKey("raw",t.subarray(0,i>>3),{hash:`SHA-${i<<1}`,name:"HMAC"},!1,["sign"]),i]}async function qI(e,t,r){return new Uint8Array((await crypto.subtle.sign("HMAC",e,t)).slice(0,r>>3))}async function qx(e,t,r,i,o){if(!ql(r)&&!(r instanceof Uint8Array))throw TypeError(qf(r,"CryptoKey","KeyObject","Uint8Array","JSON Web Key"));if(i?qR(e,i):i=crypto.getRandomValues(new Uint8Array(e.ivBits>>3)),r instanceof Uint8Array&&qP(r,e.cekBits),e.cbc)return async function(e,t,r,i,o){let[n,a,s]=await qq(e,r,"encrypt"),d=new Uint8Array(await crypto.subtle.encrypt({iv:i,name:"AES-CBC"},n,t)),c=Rx(o,i,d,RC(8*o.length));return{ciphertext:d,tag:await qI(a,c,s),iv:i}}(e,t,r,i,o);let n=await qw(r,e.subtle,"encrypt"),a=new Uint8Array(await crypto.subtle.encrypt({additionalData:o,iv:i,name:"AES-GCM",tagLength:128},n,t));return{ciphertext:a.subarray(0,-16),tag:a.subarray(-16),iv:i}}async function qj(e,t,r,i,o,n){if(!ql(t)&&!(t instanceof Uint8Array))throw TypeError(qf(t,"CryptoKey","KeyObject","Uint8Array","JSON Web Key"));if(!i)throw new RH("JWE Initialization Vector missing");if(!o)throw new RH("JWE Authentication Tag missing");if(!e.cbc&&16!==o.length)throw new RH("Invalid Authentication Tag length");if(qR(e,i),t instanceof Uint8Array&&qP(t,e.cekBits),e.cbc)return async function(e,t,r,i,o,n){let[a,s,d]=await qq(e,t,"decrypt"),c=Rx(n,i,r,RC(8*n.length)),l=await qI(s,c,d);try{if(await async function(e,t){let r={name:"HMAC",hash:"SHA-256"},i=await crypto.subtle.generateKey(r,!1,["sign","verify"]),o=await crypto.subtle.sign(r,i,e);return crypto.subtle.verify(r,i,o,t)}(o,l))return new Uint8Array(await crypto.subtle.decrypt({iv:i,name:"AES-CBC"},a,r))}catch{}throw new RU}(e,t,r,i,o,n);let a=await qw(t,e.subtle,"decrypt");try{return new Uint8Array(await crypto.subtle.decrypt({additionalData:n,iv:i,name:"AES-GCM",tagLength:128},a,Rx(r,o)))}catch{throw new RU}}function qC(e){let t={__proto__:null};for(let r in e)t[r]={...e[r],alg:r};return t}let qT=[["encrypt","wrapKey"],["decrypt","unwrapKey"]],qO=[[],["deriveBits"]],qE=[[],[]];function qA(e){return{kty:["RSA"],mode:"key-encryption",subtle:{name:"RSA-OAEP",hash:`SHA-${e}`},usages:qT,ops:["wrapKey","unwrapKey"]}}function qW(e){return{kty:["EC","OKP"],mode:e,subtle:{name:"ECDH"},resolve:({kty:e,crv:t,asymmetricKeyType:r})=>{if("X25519"===t||"x25519"===r)return{name:"X25519"};if("OKP"===e)throw new RL('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');return{name:"ECDH",namedCurve:t}},usages:qO,ops:[void 0,"deriveBits"]}}function qM(e,t=!1){return{kty:["oct"],mode:"key-wrapping",secret:!0,subtle:{name:t?"AES-GCM":"AES-KW",length:e},usages:qE,ops:t?["encrypt","decrypt"]:["wrapKey","unwrapKey"]}}function qN(){return{kty:["oct"],mode:"key-wrapping",secret:!0,subtle:{name:"PBKDF2"},usages:qE,ops:["deriveBits","deriveBits"]}}let qz=qC({dir:{kty:["oct"],mode:"direct-encryption",secret:!0,subtle:{name:"AES-GCM"},usages:qE,ops:["encrypt","decrypt"]},"RSA-OAEP":qA(1),"RSA-OAEP-256":qA(256),"RSA-OAEP-384":qA(384),"RSA-OAEP-512":qA(512),"ECDH-ES":qW("direct-key-agreement"),"ECDH-ES+A128KW":qW("key-agreement-with-key-wrapping"),"ECDH-ES+A192KW":qW("key-agreement-with-key-wrapping"),"ECDH-ES+A256KW":qW("key-agreement-with-key-wrapping"),A128KW:qM(128),A192KW:qM(192),A256KW:qM(256),A128GCMKW:qM(128,!0),A192GCMKW:qM(192,!0),A256GCMKW:qM(256,!0),"PBES2-HS256+A128KW":qN(),"PBES2-HS384+A192KW":qN(),"PBES2-HS512+A256KW":qN()}),qD=["encrypt","decrypt"];function qF(e,t=!1){return{kty:["oct"],secret:!0,subtle:{name:t?"AES-CBC":"AES-GCM",length:e},usages:qE,ops:qD,cekBits:e,ivBits:t?128:96,cbc:t}}let qL=qC({A128GCM:qF(128),A192GCM:qF(192),A256GCM:qF(256),"A128CBC-HS256":qF(256,!0),"A192CBC-HS384":qF(384,!0),"A256CBC-HS512":qF(512,!0)});function qU(e,t){throw new RL(`Invalid or unsupported "${e}" (JWE ${t}) header value`)}function qH(e){return("string"==typeof e?qz[e]:void 0)??qU("alg","Algorithm")}function qG(e){return"key-wrapping"===e.mode||"key-encryption"===e.mode||"key-agreement-with-key-wrapping"===e.mode}function qB(e){return("string"==typeof e?qL[e]:void 0)??qU("enc","Encryption Algorithm")}function qK(e,t){if("ECDH"!==e.algorithm.name&&"X25519"!==e.algorithm.name)throw TypeError("CryptoKey does not support this operation, its algorithm.name must be ECDH or X25519");qg(e,t)}function qJ(e,t,r){qv(t,qH(e).subtle,r),q_(e,t)}async function qZ(e,t,r,i){if(!(e instanceof Uint8Array)||e.length<8)throw new RH("PBES2 Salt Input must be 8 or more octets");if(!Number.isSafeInteger(r)||1!==Math.sign(r))throw new RH("PBES2 Count Input must be a positive integer");let o=Rx(RE(t),Uint8Array.of(0),e),n=parseInt(t.slice(13,16),10),a={hash:`SHA-${t.slice(8,11)}`,iterations:r,name:"PBKDF2",salt:o},s=await qw(i,qH(t).subtle,"deriveBits");return new Uint8Array(await crypto.subtle.deriveBits(a,s,n))}function qQ(e){return Rx(RT(e.length),e)}async function qX(e,t,r,i,o=new Uint8Array,n=new Uint8Array){qK(e),qK(t,"deriveBits");let a=Rx(qQ(RE(r)),qQ(o),qQ(n),RT(i));return async function(e,t,r){let i=t>>3,o=Math.ceil(i/32),n=new Uint8Array(32*o);for(let t=1;t<=o;t++){let i=await RM("sha256",Rx(RT(t),e,r));n.set(i,(t-1)*32)}return n.slice(0,i)}(new Uint8Array(await crypto.subtle.deriveBits({name:e.algorithm.name,public:e},t,"X25519"===e.algorithm.name?256:Math.ceil(parseInt(e.algorithm.namedCurve.slice(-3),10)/8)<<3)),i,a)}function qY(e){qc(e);let t=e.algorithm.namedCurve;if("P-256"!==t&&"P-384"!==t&&"P-521"!==t&&"X25519"!==e.algorithm.name)throw new RL("ECDH with the provided key is not allowed or not supported by your javascript runtime")}function q1(e,t){let r=e[t];if(void 0!==r){if("string"!=typeof r)throw new RH(`JOSE Header "${t}" (Agreement Party${"apu"===t?"U":"V"}Info) invalid`);return R5(r,t,RH)}}function q0(e,t){if(void 0!==e&&void 0!==t&&e.byteLength===t.byteLength){for(let r=0;r"u")throw new RL(`JWE "zip" (Compression Algorithm) Header Parameter requires the ${e} API.`)}async function q9(e,t,r=1/0){let i=e.writable.getWriter();i.write(t).catch(()=>{}),i.close().catch(()=>{});let o=[],n=0,a=e.readable.getReader();for(;;){let{value:e,done:t}=await a.read();if(t)break;if(o.push(e),n+=e.byteLength,1/0!==r&&n>r)throw new RH("Decompressed plaintext exceeded the configured limit")}return Rx(...o)}function q5(e){let{aad:t,ciphertext:r,iv:i,protected:o,tag:n,unprotected:a}=e;if(void 0!==i&&("string"!=typeof i||!i))throw new RH("JWE Initialization Vector incorrect type");if("string"!=typeof r)throw new RH("JWE Ciphertext missing or incorrect type");if(void 0!==n&&("string"!=typeof n||!n))throw new RH("JWE Authentication Tag incorrect type");if(void 0!==o&&"string"!=typeof o)throw new RH("JWE Protected Header incorrect type");if(void 0!==t&&("string"!=typeof t||!t))throw new RH("JWE AAD incorrect type");if(void 0!==a&&!R4(a))throw new RH("JWE Shared Unprotected Header incorrect type");return{aad:t,ciphertext:r,iv:i,protected:o,tag:n,unprotected:void 0===a?void 0:{...a}}}function q8(e){let t,r;try{let{header:i}=e;if(R4(i)){r=i.alg;let e=Object.keys(i);e.includes("alg")||(r=void 0),t=Object.fromEntries(e.map(e=>[e,"alg"===e?r:i[e]]))}else t=i;let{encrypted_key:o}=e;return[{encrypted_key:o,header:t},r]}catch(e){return[void 0,r,e]}}function q7(e){let{encrypted_key:t,header:r}=e;if(void 0!==t&&"string"!=typeof t)throw new RH("JWE Encrypted Key incorrect type");if(void 0!==r&&!R4(r))throw new RH("JWE Per-Recipient Unprotected Header incorrect type");if(void 0===e.protected&&void 0===r&&void 0===e.unprotected)throw new RH("JOSE Header missing")}function Ie(e){let t,{protected:r,ciphertext:i,iv:o,tag:n,aad:a}=e;return void 0!==r&&(t=R7(r,RH,"JWE Protected Header is invalid")),[t,R5(i,"ciphertext",RH),void 0!==o?R5(o,"iv",RH):void 0,void 0!==n?R5(n,"tag",RH):void 0,R8((r??"")+(void 0!==a?`.${a}`:""),"aad",RH)]}function It(e){return[e&&qr("keyManagementAlgorithms",e.keyManagementAlgorithms),e&&qr("contentEncryptionAlgorithms",e.contentEncryptionAlgorithms),e?.crit,e?.maxPBES2Count,e?.maxDecompressedLength]}async function Ir(e,t,r,i=Ie(e)){let o,n,a,s,[d,c,l,p,u]=i,{header:m,unprotected:f,aad:h}=e;if(void 0!==m||void 0!==f){if(!R3(d,m,f))throw new RH("JWE Protected, JWE Unprotected Header, and JWE Per-Recipient Unprotected Header Parameter names must be disjoint");o={...d,...m,...f}}else o=d??{};let[y,g,_,v,b]=t,{encrypted_key:$}=e;qo(RH,qt,_,d,o),q6(o,d);let{alg:S,enc:k}=o;if("string"!=typeof S||!S)throw new RH("missing JWE Algorithm (alg) in JWE Header");let w=qz[S];if(""===$&&(!w||!qG(w)))throw new RH("JWE Encrypted Key incorrect type");let V=w?.mode==="integrated-encryption";if(!V&&("string"!=typeof k||!k))throw new RH("missing JWE Encryption Algorithm (enc) in JWE Header");if(y&&!y.has(S)||!y&&S.startsWith("PBES2"))throw new RF('"alg" (Algorithm) Header Parameter value not allowed');if(V){if(void 0!==k)throw new RH('JWE "enc" (Encryption Algorithm) Header Parameter must not be present for integrated encryption');if(l?.byteLength)throw new RH("JWE Initialization Vector must be empty for integrated encryption");if(p?.byteLength)throw new RH("JWE Authentication Tag must be empty for integrated encryption")}else{if(g&&!g.has(k))throw new RF('"enc" (Encryption Algorithm) Header Parameter value not allowed');n=qB(k)}if(void 0!==$)try{a=R5($,"encrypted_key",RH)}catch(e){if(!w||!qG(w))throw e;a=new Uint8Array}let P=!1;"function"==typeof r&&(r=await r(d,e),P=!0);let R=w??qH(S);qG(R)&&void 0===a&&(a=new Uint8Array);let q=await qs("direct-encryption"===R.mode?n:R,r,"decrypt");if("integrated-encryption"===R.mode)s=await R.decrypt(q,a,c,u,d,o);else{let e,t=n;try{e=await async function(e,t,r,i,o,n){let{alg:a}=e,s=e.mode;if("direct-encryption"===s)return q2(i),r;let d="direct-key-agreement"===s;switch(d?q2(i):function(e){if(void 0===e)throw new RH("JWE Encrypted Key missing")}(i),e.subtle.name){case"ECDH":{let{epk:i}=o;if(!R4(i)||["d","k","p","q","dp","dq","qi","oth","priv"].some(e=>Object.hasOwn(i,e)))throw new RH('JOSE Header "epk" (Ephemeral Public Key) missing or invalid');qY(r);let n=await qk(e,i),s=q1(o,"apu"),c=q1(o,"apv");q0(s,c);let l=await qX(n,r,d?t.alg:a,d?t.cekBits:parseInt(a.slice(-5,-2),10),s,c);if(d)return l;r=l;break}case"RSA-OAEP":return qc(r),qJ(a,r,"decrypt"),new Uint8Array(await crypto.subtle.decrypt("RSA-OAEP",r,i));case"PBKDF2":{if("number"!=typeof o.p2c)throw new RH('JOSE Header "p2c" (PBES2 Count) missing or invalid');if(void 0!==n&&1/0!==n&&(!Number.isSafeInteger(n)||n<1))throw TypeError("maxPBES2Count must be a positive safe integer or Infinity");if(o.p2c>(n??1e4))throw new RH('JOSE Header "p2c" (PBES2 Count) out is of acceptable bounds');if("string"!=typeof o.p2s)throw new RH('JOSE Header "p2s" (PBES2 Salt) missing or invalid');let e=R5(o.p2s,"p2s",RH);r=await qZ(e,a,o.p2c,r);break}case"AES-GCM":{if("string"!=typeof o.iv)throw new RH('JOSE Header "iv" (Initialization Vector) missing or invalid');if("string"!=typeof o.tag)throw new RH('JOSE Header "tag" (Authentication Tag) missing or invalid');let e=R5(o.iv,"iv",RH),t=R5(o.tag,"tag",RH);if(12!==e.byteLength)throw new RH("Invalid Initialization Vector length");if(16!==t.byteLength)throw new RH("Invalid Authentication Tag length");return qj(qB(a.slice(0,-2)),r,i,e,t,new Uint8Array)}}return async function(e,t,r){let i=await qw(t,qH(e).subtle,"unwrapKey",!0),o=await crypto.subtle.unwrapKey("raw",r,i,"AES-KW",{hash:"SHA-256",name:"HMAC"},!0,["sign"]);return new Uint8Array(await crypto.subtle.exportKey("raw",o))}(a.slice(-6),r,i)}(R,t,q,a,o,v),qG(R)&&e instanceof Uint8Array&&e.byteLength<<3!==t.cekBits&&(e=qV(t))}catch(r){if(r instanceof TypeError||r instanceof RH||r instanceof RL)throw r;e=qV(t)}s=await qj(t,e,c,l,p,u)}if("DEF"===o.zip){let e=b??25e4;if(0===e)throw new RL('JWE "zip" (Compression Algorithm) Header Parameter is not supported.');if(1/0!==e&&(!Number.isSafeInteger(e)||e<1))throw TypeError("maxDecompressedLength must be 0, a positive safe integer, or Infinity");s=await (async function(e,t){return q3("DecompressionStream"),q9(new DecompressionStream("deflate-raw"),e,t)})(s,e).catch(e=>{throw e instanceof RH?e:new RH("Failed to decompress plaintext",{cause:e})})}return{plaintext:s,...d&&{protectedHeader:d},...void 0!==h&&{additionalAuthenticatedData:R5(h,"aad",RH)},...f&&{sharedUnprotectedHeader:f},...m&&{unprotectedHeader:m},...P&&{key:q}}}async function Ii(e,t,r){if(e instanceof Uint8Array&&(e=Rq.decode(e)),"string"!=typeof e)throw new RH("Compact JWE must be a string or Uint8Array");let{0:i,1:o,2:n,3:a,4:s,length:d}=e.split(".");if(5!==d)throw new RH("Invalid Compact JWE");return Ir({ciphertext:a,iv:n||void 0,protected:i,tag:s||void 0,encrypted_key:o||void 0},t,r)}async function Io(e,t,r){return Ii(e,It(r),t)}async function In(e,t,r){if(!R4(e))throw new RH("Flattened JWE must be an object");let i=q5(e),[o,,n]=q8(e);if(!o)throw n;let a={...i,...o};return q7(a),Ir(a,It(r),t)}async function Ia(e,t,r){let i,o,n;if(!R4(e))throw new RH("General JWE must be an object");let a=e.recipients;if(!Array.isArray(a))throw new RH("JWE Recipients missing or incorrect type");let s=Array.from(a);if(!s.every(R4))throw new RH("JWE Recipients missing or incorrect type");if(!s.length)throw new RH("JWE Recipients has no members");try{i=It(r),o=q5(e),n=Ie(o)}catch{throw new RU}let d=s.map(e=>q8(e));if(s.length>1)for(let[,e]of d){let t=n[0]?.alg??e??o.unprotected?.alg,r="string"==typeof t?qz[t]:void 0;if(r&&!qG(r))throw new RH(`"${t}" alg may only have a single recipient`)}for(let[e]of d)if(e)try{let r={...o,...e};return q7(r),await Ir(r,i,t,n)}catch{}throw new RU}function Is(e,t,r){if(!R3(e,t,r))throw new RH("JWE Protected, JWE Shared Unprotected and JWE Per-Recipient Header Parameter names must be disjoint")}function Id(e,t,r=!1){if(!e[1]&&!e[2]&&!e[3])throw new RH("either setProtectedHeader, setUnprotectedHeader, or sharedUnprotectedHeader must be called before #encrypt()");void 0!==t&&(e[8]=t?.crit);let[,i,o,n,a,s,d,c,l]=e;if(void 0!==a&&R2(a,"JWE Additional Authenticated Data"),void 0!==s&&R2(s,"JWE Content Encryption Key"),void 0!==d&&R2(d,"JWE Initialization Vector"),r||void 0===i||(i=qa(RH,i)[0],e[1]=i),void 0!==o&&(o=qa(RH,o)[0],e[2]=o),r||void 0===n||(n=qa(RH,n)[0],e[3]=n),void 0!==c&&!R4(c))throw TypeError("JWE Key Management Parameters must be an object");Is(i,o,n);let p={...i,...o,...n};qi(RH,i),qo(RH,qt,l,i,p),q6(p,i);let{alg:u,enc:m}=p;if("string"!=typeof u||!u)throw new RH('JWE "alg" (Algorithm) Header Parameter missing or invalid');let f=qz[u];if(f?.mode==="integrated-encryption"){if(void 0!==m)throw new RH('JWE "enc" (Encryption Algorithm) Header Parameter must not be present for integrated encryption');if(void 0!==s)throw TypeError(`setContentEncryptionKey cannot be called with JWE "alg" (Algorithm) Header ${u}`);if(void 0!==d)throw TypeError(`setInitializationVector cannot be called with JWE "alg" (Algorithm) Header ${u}`);return[p,void 0,f]}if("string"!=typeof m||!m)throw new RH('JWE "enc" (Encryption Algorithm) Header Parameter missing or invalid');return[p,qB(m),f]}async function Ic(e,t,r){let i,o,n,a,s,d,[c,l,p]=t,[u,m,f,h,y,g,_,v,,b]=e,$=m,S=f,k=p??qH(c.alg);"integrated-encryption"===k.mode?n=await qs(k,r,"encrypt"):[n,i,o]=await q4(k,l,r,c,g,v),o&&(b?S=S?{...S,...o}:o:$=$?{...$,...o}:o,Is($,S,h));let w=$?R0(JSON.stringify($)):"",V=y?.byteLength?R0(y):void 0,P=RE(V?`${w}.${V}`:w),R=u;"DEF"===c.zip&&(R=await (async function(e){return q3("CompressionStream"),q9(new CompressionStream("deflate-raw"),e)})(R).catch(e=>{throw new RH("Failed to compress plaintext",{cause:e})})),"integrated-encryption"===k.mode?[i,a]=await k.encrypt(n,R,P,$,c,v):{ciphertext:a,tag:s,iv:d}=await qx(l,R,n,_,P);let q={ciphertext:R0(a)};return d&&(q.iv=R0(d)),s&&(q.tag=R0(s)),i?.byteLength&&(q.encrypted_key=R0(i)),V&&(q.aad=V),$&&(q.protected=w),h&&(q.unprotected=h),S&&(q.header=S),q}async function Il(e,t,r){return Ic(e,Id(e,r),t)}function Ip(e){return[e.protected,e.encrypted_key,e.iv,e.ciphertext,e.tag].join(".")}class Iu{#n;state;constructor(e,t,r){this.#n=e,this.state=[void 0,void 0,t,r]}setUnprotectedHeader(e){return R9(this.state[0],"setUnprotectedHeader"),this.state[0]=e,this}setKeyManagementParameters(e){return R9(this.state[1],"setKeyManagementParameters"),this.state[1]=e,this}addRecipient(...e){return this.#n.addRecipient(...e)}encrypt(...e){return this.#n.encrypt(...e)}done(){return this.#n}}class Im{#a;#s=[];#d;#c;#l;constructor(e){this.#a=e}addRecipient(e,t){let r=new Iu(this,e,t?.crit);return this.#s.push(r),r}setProtectedHeader(e){return R9(this.#d,"setProtectedHeader"),this.#d=e,this}setSharedUnprotectedHeader(e){return R9(this.#c,"setSharedUnprotectedHeader"),this.#c=e,this}setAdditionalAuthenticatedData(e){return this.#l=e,this}async encrypt(){if(!this.#s.length)throw new RH("at least one recipient must be added");R2(this.#a,"plaintext");let e=this.#s.length>1,t,r=this.#d,i=this.#c,o=[];for(let n of this.#s){let[a,s,d,c]=n.state,l=[this.#a,r,a,i,this.#l,void 0,void 0,s,c,e],p=Id(l,void 0,o.length>0);o.length||(r=l[1],i=l[3]),o.push([l,p,d]);let[{alg:u,enc:m},,f]=p;if(e&&f&&!qG(f))throw new RH(`"${u}" alg may only have a single recipient`);if(t){if(t!==m)throw new RH('JWE "enc" (Encryption Algorithm) Header Parameter must be the same for all recipients')}else t=m}for(let[,e]of o)e[2]??=qH(e[0].alg);let[n,a,s]=o[0],d=e?qV(a[1]):void 0;n[5]=d;let{encrypted_key:c,header:l,...p}=await Ic(n,a,s),u={...p,recipients:[{}]};c&&(u.recipients[0].encrypted_key=c),l&&(u.recipients[0].header=l);for(let e=1;e(function(e,t){try{let r=IS(e,[t]),i=Iw(r.protected),{b64:o,crit:n}=i;return[r,i,Array.isArray(n)&&n.includes("b64")?"boolean"==typeof o?o?1:2:0:1]}catch{return}})(e,s)).filter(e=>void 0!==e),c=0;for(let[,,e]of d)if(3==(c|=e))throw new RG("inconsistent use of JWS Unencoded Payload (RFC7797)");for(let e of d)try{let[r]=await IR(e[0],i,t,IV,e[1]);return r}catch{}throw new RY}let IC=e=>Math.floor(e.getTime()/1e3),IT={s:1,m:60,h:3600,d:86400,w:604800,y:0x1e187e0},IO=/^(\+|\-)? ?(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)(?: (ago|from now))?$/i,IE="check_failed";function IA(){throw TypeError("Invalid time period format")}function IW(e){"string"!=typeof e&&IA();let t=IO.exec(e);(!t||t[4]&&t[1])&&IA();let r=Math.round(parseFloat(t[2])*IT[t[3][0].toLowerCase()]);return Number.isFinite(r)||IA(),"-"===t[1]||"ago"===t[4]?-r:r}function IM(e,t){if(!Number.isFinite(t))throw TypeError(`Invalid ${e} input`);return t}function IN(e,t){if("string"!=typeof t)throw TypeError(`"${e}" claim must be a string`)}function Iz(e,t){return"number"==typeof e?IM(t,e):e instanceof Date?IM(t,IC(e)):IC(new Date)+IW(e)}let ID=e=>{let t=e.toLowerCase();return e.includes("/")?t:`application/${t}`};function IF(e,t,r=!1){let i=e[t];if(!(void 0===i&&!r)){if("number"!=typeof i)throw new Rz(`"${t}" claim must be a number`,e,t,"invalid");return i}}function IL(e,t){throw new Rz(`unexpected "${t}" claim value`,e,t,IE)}function IU(e,t,r={}){let i,o,n;try{i=JSON.parse(RI.decode(t))}catch{}if(!R4(i))throw new RB("JWT Claims Set must be a top-level JSON object");let{typ:a}=r;if(void 0!==a&&("string"!=typeof e.typ||ID(e.typ)!==ID(a)))throw new Rz('unexpected "typ" JWT header value',i,"typ",IE);let{requiredClaims:s=[],issuer:d,subject:c,audience:l,maxTokenAge:p}=r,u=[...s];for(let e of(void 0!==p&&u.push("iat"),void 0!==l&&u.push("aud"),void 0!==c&&u.push("sub"),void 0!==d&&u.push("iss"),new Set(u.reverse())))if(!Object.hasOwn(i,e))throw new Rz(`missing required "${e}" claim`,i,e,"missing");void 0===d||(Array.isArray(d)?d:[d]).includes(i.iss)||IL(i,"iss"),void 0!==c&&i.sub!==c&&IL(i,"sub"),void 0===l||(o=i.aud,n="string"==typeof l?[l]:l,"string"==typeof o?n.includes(o):!!Array.isArray(o)&&n.some(e=>o.includes(e)))||IL(i,"aud");let{clockTolerance:m}=r,f=0;if("string"==typeof m)f=IW(m);else if(void 0!==m){if("number"!=typeof m)throw TypeError("Invalid clockTolerance option type");f=m}IM("clockTolerance option",f);let{currentDate:h}=r,y=IM("currentDate option",IC(void 0===h?new Date:h)),g=IF(i,"iat",void 0!==p),_=IF(i,"nbf");if(void 0!==_&&_>y+f)throw new Rz('"nbf" claim timestamp check failed',i,"nbf",IE);let v=IF(i,"exp");if(void 0!==v&&v<=y-f)throw new RD('"exp" claim timestamp check failed',i,"exp",IE);if(void 0!==p){let e=y-g;if(e-f>IM("maxTokenAge option","number"==typeof p?p:IW(p)))throw new RD('"iat" claim timestamp check failed (too far in the past)',i,"iat",IE);if(e<-f)throw new Rz('"iat" claim timestamp check failed (it should be in the past)',i,"iat",IE)}return i}function IH(e){return f.get(e)}function IG(e){let t=IH(e);for(let e of["iat","nbf","exp"]){let r=t[e];if("number"==typeof r&&!Number.isFinite(r))throw TypeError(`"${e}" claim must be a finite number`)}return RR.encode(JSON.stringify(t))}class IB{constructor(e={}){if(!R4(e))throw TypeError("JWT Claims Set MUST be an object");(f||=new WeakMap).set(this,structuredClone(e))}setIssuer(e){return IN("iss",e),IH(this).iss=e,this}setSubject(e){return IN("sub",e),IH(this).sub=e,this}setAudience(e){return function(e){if("string"!=typeof e&&(!Array.isArray(e)||Array.from(e).some(e=>"string"!=typeof e)))throw TypeError('"aud" claim must be a string or an array of strings')}(e),IH(this).aud=e,this}setJti(e){return IN("jti",e),IH(this).jti=e,this}setNotBefore(e){return IH(this).nbf=Iz(e,"setNotBefore"),this}setExpirationTime(e){return IH(this).exp=Iz(e,"setExpirationTime"),this}setIssuedAt(e){let t=IH(this);return void 0===e?t.iat=IC(new Date):"string"==typeof e?t.iat=IM("setIssuedAt",IC(new Date)+IW(e)):t.iat=Iz(e,"setIssuedAt"),this}}async function IK(e,t,r){let[i,o]=await Iq(e,Ik(r),t);if(!o)throw new RB("JWTs MUST NOT use unencoded payload");let n=IU(i.protectedHeader,i.payload,r);return{...i,payload:n}}async function IJ(e,t,r){let{plaintext:i,...o}=await Ii(e,It(r),t),{protectedHeader:n}=o,a=IU(n,i,r);for(let e of["iss","sub","aud"])if(void 0!==n[e]&&("aud"===e?JSON.stringify(n.aud)!==JSON.stringify(a.aud):n[e]!==a[e]))throw new Rz(`replicated "${e}" claim header parameter mismatch`,a,e,"mismatch");return{payload:a,...o}}class IZ{#p;constructor(e){R2(e,"plaintext"),this.#p=[e]}setContentEncryptionKey(e){return R9(this.#p[5],"setContentEncryptionKey"),this.#p[5]=e,this}setInitializationVector(e){return R9(this.#p[6],"setInitializationVector"),this.#p[6]=e,this}setProtectedHeader(e){return R9(this.#p[1],"setProtectedHeader"),this.#p[1]=e,this}setKeyManagementParameters(e){return R9(this.#p[7],"setKeyManagementParameters"),this.#p[7]=e,this}async encrypt(e,t){return Ip(await Il([...this.#p],e,t))}}class IQ{#p;constructor(e){R2(e,"plaintext"),this.#p=[e]}setKeyManagementParameters(e){return R9(this.#p[7],"setKeyManagementParameters"),this.#p[7]=e,this}setProtectedHeader(e){return R9(this.#p[1],"setProtectedHeader"),this.#p[1]=e,this}setSharedUnprotectedHeader(e){return R9(this.#p[3],"setSharedUnprotectedHeader"),this.#p[3]=e,this}setUnprotectedHeader(e){return R9(this.#p[2],"setUnprotectedHeader"),this.#p[2]=e,this}setAdditionalAuthenticatedData(e){return this.#p[4]=e,this}setContentEncryptionKey(e){return R9(this.#p[5],"setContentEncryptionKey"),this.#p[5]=e,this}setInitializationVector(e){return R9(this.#p[6],"setInitializationVector"),this.#p[6]=e,this}async encrypt(e,t){return Il([...this.#p],e,t)}}async function IX(e,t,r){let[i,o,n,a]=e,s="";if(void 0!==o){let e=qa(RG,o);o=e[0],s=R0(e[1])}if(void 0!==n&&(n=qa(RG,n)[0]),!o&&!n)throw new RG("either setProtectedHeader or setUnprotectedHeader must be called before #sign()");if(!R3(o,n))throw new RG("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");let d={...o,...n};qi(RG,o);let c=qn(o,qo(RG,qe,a,o,d));c||r?.();let{alg:l}=d;if("string"!=typeof l||!l)throw new RG('JWS "alg" (Algorithm) Header Parameter missing or invalid');let p=I$(l),u="",m=i,f;if(c){let t=e[4];t?(u=t[0]??=R0(i),m=t[1]??=RE(u)):(u=R0(i),f=RR.encode(`${s}.${u}`))}f??=Rx(RE(s),RE("."),m);let h=await qw(await qs(p,t,"sign"),p.subtle,"sign");p.minRsaBits&&q_(p.alg,h);let y={signature:R0(new Uint8Array(await crypto.subtle.sign(p.signing,h,f))),payload:u};return o&&(y.protected=s),n&&(y.header=n),[y,c]}async function IY(e,t,r,i,o){let[n]=await IX([e,t,void 0,r],i,o);return`${n.protected}.${n.payload}.${n.signature}`}class I1{#u;#d;constructor(e){R2(e,"payload"),this.#u=e}setProtectedHeader(e){return R9(this.#d,"setProtectedHeader"),this.#d=e,this}async sign(e,t){return IY(this.#u,this.#d,t?.crit,e,()=>{throw TypeError("use the flattened module for creating JWS with b64: false")})}}class I0{#p;constructor(e){R2(e,"payload"),this.#p=[e]}setProtectedHeader(e){return R9(this.#p[1],"setProtectedHeader"),this.#p[1]=e,this}setUnprotectedHeader(e){return R9(this.#p[2],"setUnprotectedHeader"),this.#p[2]=e,this}async sign(e,t){let r=[...this.#p];r[3]=t?.crit;let[i]=await IX(r,e);return i}}class I2{#n;state;constructor(e,t,r){this.#n=e,this.state=[void 0,void 0,t,r?.crit]}setProtectedHeader(e){return R9(this.state[0],"setProtectedHeader"),this.state[0]=e,this}setUnprotectedHeader(e){return R9(this.state[1],"setUnprotectedHeader"),this.state[1]=e,this}addSignature(...e){return this.#n.addSignature(...e)}sign(...e){return this.#n.sign(...e)}done(){return this.#n}}class I4{#u;#m=[];constructor(e){this.#u=e}addSignature(e,t){let r=new I2(this,e,t);return this.#m.push(r),r}async sign(){let e;if(!this.#m.length)throw new RG("at least one signature must be added");R2(this.#u,"payload");let t={signatures:[],payload:""},r=[];for(let i of this.#m){let[o,n,a,s]=i.state,[{payload:d,...c},l]=await IX([this.#u,o,n,s,r],a);if(void 0===e)e=l,t.payload=d;else if(e!==l)throw new RG("inconsistent use of JWS Unencoded Payload (RFC7797)");t.signatures.push(c)}return t}}let I6=IB;class I3 extends I6{#d;setProtectedHeader(e){return R9(this.#d,"setProtectedHeader"),this.#d=e,this}async sign(e,t){return IY(IG(this),this.#d,t?.crit,e,()=>{throw new RB("JWTs MUST NOT use unencoded payload")})}}let I9=IB;class I5 extends I9{#p=[void 0];#f;#h;#y;setProtectedHeader(e){return R9(this.#p[1],"setProtectedHeader"),this.#p[1]=e,this}setKeyManagementParameters(e){return R9(this.#p[7],"setKeyManagementParameters"),this.#p[7]=e,this}setContentEncryptionKey(e){return R9(this.#p[5],"setContentEncryptionKey"),this.#p[5]=e,this}setInitializationVector(e){return R9(this.#p[6],"setInitializationVector"),this.#p[6]=e,this}replicateIssuerAsHeader(){return this.#f=!0,this}replicateSubjectAsHeader(){return this.#h=!0,this}replicateAudienceAsHeader(){return this.#y=!0,this}async encrypt(e,t){let r=IG(this);this.#p[1]&&(this.#f||this.#h||this.#y)&&(this.#p[1]={...this.#p[1],iss:this.#f?IH(this).iss:void 0,sub:this.#h?IH(this).sub:void 0,aud:this.#y?IH(this).aud:void 0});let i=[...this.#p];return i[0]=r,Ip(await Il(i,e,t))}}let I8='"alg" (Algorithm)';function I7(e='JWK "alg" (Algorithm) Parameter'){throw new RL(`Invalid or unsupported ${e} value`)}function xe(e,t){return("string"==typeof e?Ib[e]??qz[e]:void 0)??I7(t)}let xt=async(e,t,r)=>{var i,o;let n;if(qp(r)){if(r.type!==e)throw TypeError(`key is not a ${e} key`);return r.export({format:"pem",type:t})}if(!ql(r))throw TypeError(qf(r,"CryptoKey","KeyObject"));if(!r.extractable)throw TypeError("CryptoKey is not extractable");if(r.type!==e)throw TypeError(`key is not a ${e} key`);return i=RA(new Uint8Array(await crypto.subtle.exportKey(t,r))),o=`${e.toUpperCase()} KEY`,n=(i.match(/.{1,64}/g)||[]).join(` `),`-----BEGIN ${o}----- ${n} ------END ${o}-----`},IM=(e,t)=>{if(e.byteLength!==t.length)return!1;for(let r=0;r({data:e,pos:0}),IN=e=>{let t=e.data[e.pos++];if(void 0===t)throw Error("Unexpected end of ASN.1 input");return t},Iz=e=>{let t=IN(e);if(128&t){let r=127&t,i=0;for(let t=0;t{for(;t-- >0;){e.pos++;let t=Iz(e);e.pos+=t}},IF=(e,t,r)=>{if(IN(e)!==t)throw Error(r)},IL=(e,t)=>{if(t<0||e.pos+t>e.data.length)throw Error("Unexpected end of ASN.1 input");let r=e.data.subarray(e.pos,e.pos+t);return e.pos+=t,r},IU=async(e,t,r,i)=>{let o,n=V4(i?.extractable),a=IE(r,IT);a.secret&&IO(IT);let s="spki"===e;if(a.resolve)try{let r=IW(t);(function(e,t){if(IF(e,48,`Invalid ${"spki"===t?"SPKI":"PKCS#8"} structure`),Iz(e),"pkcs8"===t){IF(e,2,"Expected version field");let t=Iz(e);e.pos+=t}IF(e,48,"Expected algorithm identifier"),Iz(e)})(r,e),o=a.resolve({crv:(e=>{let t,r=(IF(e,6,"Expected algorithm OID"),t=Iz(e),IL(e,t));if(IM(r,[43,101,110]))return"X25519";if(!IM(r,[42,134,72,206,61,2,1]))throw Error("Unsupported key algorithm");IF(e,6,"Expected curve OID");let i=Iz(e),o=IL(e,i);if(IM(o,[42,134,72,206,61,3,1,7]))return"P-256";if(IM(o,[43,129,4,0,34]))return"P-384";if(IM(o,[43,129,4,0,35]))return"P-521";throw Error("Unsupported named curve")})(r)})}catch{throw new Vf("Invalid or unsupported key format")}else o=a.subtle;return crypto.subtle.importKey(e,t,o,n??s,a.usages[+!s])},IH=(e,t)=>Vd(e.replace(t,""));function IG(e){return IA("public","spki",e)}function IB(e){return IA("private","pkcs8",e)}async function IK(e){if(VG(e))if("secret"!==e.type)return e.export({format:"jwk"});else e=e.export();if(e instanceof Uint8Array)return{kty:"oct",k:VP(e)};if(!VH(e))throw TypeError(VJ(e,"CryptoKey","KeyObject","Uint8Array"));if(!e.extractable)throw TypeError("non-extractable CryptoKey cannot be exported as a JWK");let t=await crypto.subtle.exportKey("jwk",e);for(let e of(delete t.ext,delete t.key_ops,delete t.use,"AKP"!==t.kty&&delete t.alg,Object.keys(t)))void 0===t[e]&&delete t[e];return t}let IJ=(e,t)=>{if("string"!=typeof e||!e)throw new Vv(`${t} missing or invalid`)};async function IZ(e,t){let r,i;if(Vq(e)){if("string"!=typeof(r=V0(e)).kty)throw TypeError(VJ(e,"CryptoKey","KeyObject","JSON Web Key"))}else if(VB(e))r=V0(await IK(e));else throw TypeError(VJ(e,"CryptoKey","KeyObject","JSON Web Key"));if("sha256"!==(t??="sha256")&&"sha384"!==t&&"sha512"!==t)throw TypeError('digestAlgorithm must one of "sha256", "sha384", or "sha512"');switch(r.kty){case"AKP":IJ(r.alg,'"alg" (Algorithm) Parameter'),IJ(r.pub,'"pub" (Public key) Parameter'),i={alg:r.alg,kty:r.kty,pub:r.pub};break;case"EC":IJ(r.crv,'"crv" (Curve) Parameter'),IJ(r.x,'"x" (X Coordinate) Parameter'),IJ(r.y,'"y" (Y Coordinate) Parameter'),i={crv:r.crv,kty:r.kty,x:r.x,y:r.y};break;case"OKP":IJ(r.crv,'"crv" (Subtype of Key Pair) Parameter'),IJ(r.x,'"x" (Public Key) Parameter'),i={crv:r.crv,kty:r.kty,x:r.x};break;case"RSA":IJ(r.e,'"e" (Exponent) Parameter'),IJ(r.n,'"n" (Modulus) Parameter'),i={e:r.e,kty:r.kty,n:r.n};break;case"oct":if("string"!=typeof r.k)throw new Vv('"k" (Key Value) Parameter missing or invalid');i={k:r.k,kty:r.kty};break;default:throw new Vf('"kty" (Key Type) Parameter missing or unsupported')}let o=Va(JSON.stringify(i));return VP(await Vc(t,o))}async function IQ(e,t){t??="sha256";let r=await IZ(e,t);return`urn:ietf:params:oauth:jwk-thumbprint:sha-${t.slice(-3)}:${r}`}async function IX(e,t){let r,i={...e,...t?.header};if(!Vq(i.jwk))throw new Vg('"jwk" (JSON Web Key) Header Parameter must be a JSON object');try{r=V2(i.jwk)}catch(e){throw new Vg("Invalid Embedded JWK",{cause:e})}let o=q2(i.alg);if(void 0!==r.use&&"sig"!==r.use)throw new Vg('Invalid Embedded JWK, its "use" must be "sig" when present');if(void 0!==r.alg&&r.alg!==o.alg)throw new Vg(`Invalid Embedded JWK, its "alg" must be "${o.alg}" when present`);let n=await V6(o,r,!0);if("public"!==n.type)throw new Vg('"jwk" (JSON Web Key) Header Parameter must be a public key');return n}async function IY(e,t,r){let i=e.get(t)||e.set(t,{}).get(t),{alg:o}=r;if(void 0===i[o]){let e=V6(r,t,!0).then(e=>{if("public"!==e.type)throw new Vb("JSON Web Key Set members must be public keys");return i[o]=e,e}).catch(t=>{throw i[o]===e&&delete i[o],t});i[o]=e}return i[o]}function I1(e){let t;try{t=structuredClone(e)}catch{}if(!VI(t))throw new Vb("JSON Web Key Set malformed");let r=t.keys.map(e=>{let t=V0(e);return Array.isArray(t.key_ops)&&(t.key_ops=[...t.key_ops]),t}),i=new WeakMap;return Object.defineProperty(async(e,o)=>{let{alg:n,kid:a}={...e,...o?.header},s="string"==typeof n?q0[n]:void 0;if(!s||s.secret)throw new Vf('Unsupported "alg" value for a JSON Web Key Set');let d=t.keys.filter((e,t)=>(function(e,t,r,i){let{kty:o,key_ops:n,ext:a,kid:s,alg:d,use:c,crv:l}=e;return(void 0===a||"boolean"==typeof a)&&(void 0===n||Array.isArray(n)&&n.every((e,t)=>"string"==typeof e&&n.indexOf(e)===t)&&n.includes("verify"))&&t.kty.includes(o)&&(void 0===i||"string"==typeof i&&i===s)&&(void 0===d?"AKP"!==o:r===d)&&(void 0===c||"sig"===c)&&(!t.crv||l===t.crv)})(r[t],s,n,a)),{0:c,length:l}=d;if(!l)throw new V$;if(1!==l){let e=new VS;throw e[Symbol.asyncIterator]=async function*(){for(let e of d)try{yield await IY(i,e,s)}catch{}},e}return IY(i,c,s)},"jwks",{value:()=>structuredClone(t)})}(typeof navigator>"u"||!navigator.userAgent?.startsWith?.("Mozilla/5.0 "))&&(h="jose/v6.2.12");let I0=Symbol(),I2=Symbol();function I4(e,t){return Number.isFinite(e)&&Date.now(){if(u&&("u">typeof WebSocketPair||"u">typeof navigator&&"Cloudflare-Workers"===navigator.userAgent||"u">typeof EdgeRuntime&&"vercel"===EdgeRuntime)&&(u=void 0),!u){let e=++m,t=u=(async function(e,t,r,i=fetch){let o=await i(e,{method:"GET",signal:r,redirect:"manual",headers:t}).catch(e=>{throw"TimeoutError"===e.name?new Vk:e});if(200!==o.status)throw new Vl("Expected 200 OK from the JSON Web Key Set HTTP response");try{return await o.json()}catch{throw new Vl("Failed to parse the JSON Web Key Set HTTP response as JSON")}})(r,d,AbortSignal.timeout(n),c).then(t=>{let r=I1(t);if(e<=f)return;y=r;let i=Date.now();l&&(l.uat=i,l.jwks=t),p=i,f=e}).finally(()=>{u===t&&(u=void 0)})}await u};return Object.defineProperties(async(e,t)=>{y&&I4(p,s)||await g();try{return await y(e,t)}catch(r){if(r instanceof V$&&!I4(p,a))return await g(),y(e,t);throw r}},{coolingDown:{get:()=>I4(p,a),enumerable:!0},fresh:{get:()=>I4(p,s),enumerable:!0},reload:{value:g,enumerable:!0},reloading:{get:()=>!!u,enumerable:!0},jwks:{value:()=>y?.jwks(),enumerable:!0}})}let I9=I_;class I5 extends I9{encode(){let e=VP(JSON.stringify({alg:"none"})),t=VP(Ig(this));return`${e}.${t}.`}static decode(e,t){let r,i;if("string"!=typeof e)throw new V_("Unsecured JWT must be a string");let{0:o,1:n,2:a,length:s}=e.split(".");if(3!==s||""!==a)throw new V_("Invalid Unsecured JWT");try{r=VO(o,Vg,"JWS Protected Header is invalid");let e=VN(Vg,VE,void 0,r,r);i=Vz(r,e)}catch(e){throw e instanceof Vg?new V_("Invalid Unsecured JWT",{cause:e}):e}if("none"!==r.alg)throw new V_("Invalid Unsecured JWT");if(!i)throw new V_("JWTs MUST NOT use unencoded payload");return{payload:Ih(r,VC(n,"payload",V_),t),header:r}}}async function I8(e,t,r){if("string"!=typeof e||0!==e.indexOf("-----BEGIN PUBLIC KEY-----"))throw TypeError('"spki" must be SPKI formatted string');return IU("spki",IH(e,/(?:-----(?:BEGIN|END) PUBLIC KEY-----|\s)/g),t,r)}async function I7(e,t,r){let i;if("string"!=typeof e||0!==e.indexOf("-----BEGIN CERTIFICATE-----"))throw TypeError('"x509" must be X.509 formatted string');try{let t=IH(e,/(?:-----(?:BEGIN|END) CERTIFICATE-----|\s)/g);i=function(e){let t=IW(e);IF(t,48,"Invalid certificate structure");let r=Iz(t);if(r<0||t.pos+r>t.data.length)throw Error("Unexpected end of ASN.1 input");IF(t,48,"Invalid tbsCertificate structure"),Iz(t),160===e[t.pos]?ID(t,6):ID(t,5);let i=t.pos;IF(t,48,"Invalid SPKI structure");let o=Iz(t);return e.subarray(i,i+o+(t.pos-i))}(t)}catch(e){throw TypeError("Failed to parse the X.509 certificate",{cause:e})}return IU("spki",i,t,r)}async function xe(e,t,r){if("string"!=typeof e||0!==e.indexOf("-----BEGIN PRIVATE KEY-----"))throw TypeError('"pkcs8" must be PKCS#8 formatted string');return IU("pkcs8",IH(e,/(?:-----(?:BEGIN|END) PRIVATE KEY-----|\s)/g),t,r)}async function xt(e,t,r){if(!Vq(e))throw TypeError("JWK must be an object");let i=V2(e),o=V4(r?.extractable),{alg:n}=i;if(t??=n,"oct"!==i.kty&&!t)throw TypeError('"alg" argument is required when "jwk.alg" is not present');switch(i.kty){case"oct":if("string"!=typeof i.k)throw TypeError('missing "k" (Key Value) Parameter value');return VR(i.k);case"AKP":if("string"!=typeof n||!n)throw TypeError('missing "alg" (Algorithm) Parameter value');if(t!==n)throw TypeError("JWK alg and alg option value mismatch");return V6(IE(t),i,o);case"RSA":case"EC":case"OKP":return V6(IE(t),i,o);default:throw new Vf('Unsupported "kty" (Key Type) Parameter value')}}function xr(e){let t;if("string"==typeof e){let r=e.split(".");(3===r.length||5===r.length)&&([t]=r)}else if("object"==typeof e&&e)if("protected"in e)t=e.protected;else throw TypeError("Token does not contain a Protected Header");let r="Invalid Token or Protected Header formatting";if("string"!=typeof t||!t)throw TypeError(r);return VO(t,TypeError,r)}function xi(e){let t,r;if("string"!=typeof e)throw new V_("JWTs must use Compact JWS serialization, JWT must be a string");let{1:i,length:o}=e.split(".");if(5===o)throw new V_("Only JWTs using Compact JWS serialization can be decoded");if(3!==o)throw new V_("Invalid JWT");if(!i)throw new V_("JWTs must contain a payload");try{t=VR(i)}catch{throw new V_("Failed to base64url decode the payload")}try{r=JSON.parse(Ve.decode(t))}catch{throw new V_("Failed to parse the decoded payload as JSON")}if(!Vq(r))throw new V_("Invalid JWT Claims Set");return r}async function xo(e,t){let r,i=V4(t?.extractable),o=IE(e,IT);if(o.secret&&IO(IT),o.resolve){let e=t?.crv??"P-256";if(!["P-256","P-384","P-521","X25519"].includes(e))throw new Vf("Invalid or unsupported crv option provided, supported values are P-256, P-384, P-521, and X25519");r=o.resolve({crv:e})}else{if(void 0!==o.crv&&t?.crv!==void 0&&t.crv!==o.crv)throw new Vf(`Invalid or unsupported crv option provided, the only supported value for ${e} is ${o.crv}`);r="RSA"===o.kty[0]?{...o.subtle,publicExponent:Uint8Array.of(1,0,1),modulusLength:function(e){let t=e?.modulusLength??2048;if("number"!=typeof t||!Number.isInteger(t)||t<2048)throw new Vf("Invalid or unsupported modulusLength option provided, 2048 bits or larger keys must be used");return t}(t)}:o.subtle}return crypto.subtle.generateKey(r,i??!1,[...o.usages[1],...o.usages[0]])}async function xn(e,t){let r,i,o,n=V4(t?.extractable);switch(e){case"HS256":case"HS384":case"HS512":r=+e.slice(-3),i={name:"HMAC",hash:`SHA-${r}`,length:r},o=["sign","verify"];break;case"A128CBC-HS256":case"A192CBC-HS384":case"A256CBC-HS512":return crypto.getRandomValues(new Uint8Array(e.slice(-3)>>3));case"A128KW":case"A192KW":case"A256KW":i={name:"AES-KW",length:r=+e.slice(1,4)},o=["wrapKey","unwrapKey"];break;case"A128GCMKW":case"A192GCMKW":case"A256GCMKW":case"A128GCM":case"A192GCM":case"A256GCM":i={name:"AES-GCM",length:r=+e.slice(1,4)},o=["encrypt","decrypt"];break;default:IO(IT)}return crypto.subtle.generateKey(i,n??!1,o)}let xa="WebCryptoAPI";var xs=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;var t=class{};e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var r=class extends t{constructor(t){if(super(),!e.IDENTIFIER.test(t))throw Error("CodeGen: name must be a valid identifier");this.str=t}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};e.Name=r;var i=class extends t{constructor(e){super(),this._items="string"==typeof e?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return""===e||'""'===e}get str(){var e;return null!=(e=this._str)?e:this._str=this._items.reduce((e,t)=>`${e}${t}`,"")}get names(){var e;return null!=(e=this._names)?e:this._names=this._items.reduce((e,t)=>(t instanceof r&&(e[t.str]=(e[t.str]||0)+1),e),{})}};function o(e,...t){let r=[e[0]],n=0;for(;n{Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;let t=xs();var r,i,o=class extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}};(r=i||(e.UsedValueState=i={}))[r.Started=0]="Started",r[r.Completed=1]="Completed",e.varKinds={const:new t.Name("const"),let:new t.Name("let"),var:new t.Name("var")};var n=class{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof t.Name?e:this.name(e)}name(e){return new t.Name(this._newName(e))}_newName(e){let t=this._names[e]||this._nameGroup(e);return`${e}${t.index++}`}_nameGroup(e){var t,r;if((null==(r=null==(t=this._parent)?void 0:t._prefixes)?void 0:r.has(e))||this._prefixes&&!this._prefixes.has(e))throw Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}};e.Scope=n;var a=class extends t.Name{constructor(e,t){super(t),this.prefix=e}setValue(e,{property:r,itemIndex:i}){this.value=e,this.scopePath=(0,t._)`.${new t.Name(r)}[${i}]`}};e.ValueScopeName=a;let s=(0,t._)`\n`;var d=class extends n{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?s:t.nil}}get(){return this._scope}name(e){return new a(e,this._newName(e))}value(e,t){var r;if(void 0===t.ref)throw Error("CodeGen: ref must be passed in value");let i=this.toName(e),{prefix:o}=i,n=null!=(r=t.key)?r:t.ref,a=this._values[o];if(a){let e=a.get(n);if(e)return e}else a=this._values[o]=new Map;a.set(n,i);let s=this._scope[o]||(this._scope[o]=[]),d=s.length;return s[d]=t.ref,i.setValue(t,{property:o,itemIndex:d}),i}getValue(e,t){let r=this._values[e];if(r)return r.get(t)}scopeRefs(e,r=this._values){return this._reduceValues(r,r=>{if(void 0===r.scopePath)throw Error(`CodeGen: name "${r}" has no value`);return(0,t._)`${e}${r.scopePath}`})}scopeCode(e=this._values,t,r){return this._reduceValues(e,e=>{if(void 0===e.value)throw Error(`CodeGen: name "${e}" has no value`);return e.value.code},t,r)}_reduceValues(r,n,a={},s){let d=t.nil;for(let c in r){let l=r[c];if(!l)continue;let p=a[c]=a[c]||new Map;l.forEach(r=>{if(p.has(r))return;p.set(r,i.Started);let a=n(r);if(a){let i=this.opts.es5?e.varKinds.var:e.varKinds.const;d=(0,t._)`${d}${i} ${r} = ${a};${this.opts._n}`}else if(a=null==s?void 0:s(r))d=(0,t._)`${d}${a}${this.opts._n}`;else throw new o(r);p.set(r,i.Completed)})}return d}};e.ValueScope=d}),xc=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;let t=xs(),r=xd();var i=xs();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return i._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return i.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return i.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return i.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return i.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return i.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return i.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return i.Name}});var o=xd();Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return o.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return o.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return o.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return o.varKinds}}),e.operators={GT:new t._Code(">"),GTE:new t._Code(">="),LT:new t._Code("<"),LTE:new t._Code("<="),EQ:new t._Code("==="),NEQ:new t._Code("!=="),NOT:new t._Code("!"),OR:new t._Code("||"),AND:new t._Code("&&"),ADD:new t._Code("+")};var n=class{optimizeNodes(){return this}optimizeNames(e,t){return this}},a=class extends n{constructor(e,t,r){super(),this.varKind=e,this.name=t,this.rhs=r}render({es5:e,_n:t}){let i=e?r.varKinds.var:this.varKind,o=void 0===this.rhs?"":` = ${this.rhs}`;return`${i} ${this.name}${o};`+t}optimizeNames(e,t){if(e[this.name.str])return this.rhs&&(this.rhs=x(this.rhs,e,t)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}},s=class extends n{constructor(e,t,r){super(),this.lhs=e,this.rhs=t,this.sideEffects=r}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,r){if(!(this.lhs instanceof t.Name)||e[this.lhs.str]||this.sideEffects)return this.rhs=x(this.rhs,e,r),this}get names(){return I(this.lhs instanceof t.Name?{}:{...this.lhs.names},this.rhs)}},d=class extends s{constructor(e,t,r,i){super(e,r,i),this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}},c=class extends n{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}},l=class extends n{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}},p=class extends n{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}},u=class extends n{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=x(this.code,e,t),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}},m=class extends n{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce((t,r)=>t+r.render(e),"")}optimizeNodes(){let{nodes:e}=this,t=e.length;for(;t--;){let r=e[t].optimizeNodes();Array.isArray(r)?e.splice(t,1,...r):r?e[t]=r:e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){let{nodes:r}=this,i=r.length;for(;i--;){let o=r[i];o.optimizeNames(e,t)||(function(e,t){for(let r in t)e[r]=(e[r]||0)-(t[r]||0)}(e,o.names),r.splice(i,1))}return r.length>0?this:void 0}get names(){return this.nodes.reduce((e,t)=>q(e,t.names),{})}},f=class extends m{render(e){return"{"+e._n+super.render(e)+"}"+e._n}},h=class extends m{},y=class extends f{};y.kind="else";var g=class e extends f{constructor(e,t){super(t),this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);return this.else&&(t+="else "+this.else.render(e)),t}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(!0===t)return this.nodes;let r=this.else;if(r){let e=r.optimizeNodes();r=this.else=Array.isArray(e)?new y(e):e}return r?!1===t?r instanceof e?r:r.nodes:this.nodes.length?this:new e(j(t),r instanceof e?[r]:r.nodes):!1!==t&&this.nodes.length?this:void 0}optimizeNames(e,t){var r;if(this.else=null==(r=this.else)?void 0:r.optimizeNames(e,t),super.optimizeNames(e,t)||this.else)return this.condition=x(this.condition,e,t),this}get names(){let e=super.names;return I(e,this.condition),this.else&&q(e,this.else.names),e}};g.kind="if";var _=class extends f{};_.kind="for";var v=class extends _{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iteration=x(this.iteration,e,t),this}get names(){return q(super.names,this.iteration.names)}},b=class extends _{constructor(e,t,r,i){super(),this.varKind=e,this.name=t,this.from=r,this.to=i}render(e){let t=e.es5?r.varKinds.var:this.varKind,{name:i,from:o,to:n}=this;return`for(${t} ${i}=${o}; ${i}<${n}; ${i}++)`+super.render(e)}get names(){return I(I(super.names,this.from),this.to)}},$=class extends _{constructor(e,t,r,i){super(),this.loop=e,this.varKind=t,this.name=r,this.iterable=i}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iterable=x(this.iterable,e,t),this}get names(){return q(super.names,this.iterable.names)}},S=class extends f{constructor(e,t,r){super(),this.name=e,this.args=t,this.async=r}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}};S.kind="func";var k=class extends m{render(e){return"return "+super.render(e)}};k.kind="return";var w=class extends f{render(e){let t="try"+super.render(e);return this.catch&&(t+=this.catch.render(e)),this.finally&&(t+=this.finally.render(e)),t}optimizeNodes(){var e,t;return super.optimizeNodes(),null==(e=this.catch)||e.optimizeNodes(),null==(t=this.finally)||t.optimizeNodes(),this}optimizeNames(e,t){var r,i;return super.optimizeNames(e,t),null==(r=this.catch)||r.optimizeNames(e,t),null==(i=this.finally)||i.optimizeNames(e,t),this}get names(){let e=super.names;return this.catch&&q(e,this.catch.names),this.finally&&q(e,this.finally.names),e}},R=class extends f{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}};R.kind="catch";var P=class extends f{render(e){return"finally"+super.render(e)}};P.kind="finally";var V=class{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?"\n":""},this._extScope=e,this._scope=new r.Scope({parent:e}),this._nodes=[new h]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){let r=this._extScope.value(e,t);return(this._values[r.prefix]||(this._values[r.prefix]=new Set)).add(r),r}getScopeValue(e,t){return this._extScope.getValue(e,t)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,t,r,i){let o=this._scope.toName(t);return void 0!==r&&i&&(this._constants[o.str]=r),this._leafNode(new a(e,o,r)),o}const(e,t,i){return this._def(r.varKinds.const,e,t,i)}let(e,t,i){return this._def(r.varKinds.let,e,t,i)}var(e,t,i){return this._def(r.varKinds.var,e,t,i)}assign(e,t,r){return this._leafNode(new s(e,t,r))}add(t,r){return this._leafNode(new d(t,e.operators.ADD,r))}code(e){return"function"==typeof e?e():e!==t.nil&&this._leafNode(new u(e)),this}object(...e){let r=["{"];for(let[i,o]of e)r.length>1&&r.push(","),r.push(i),(i!==o||this.opts.es5)&&(r.push(":"),(0,t.addCodeArg)(r,o));return r.push("}"),new t._Code(r)}if(e,t,r){if(this._blockNode(new g(e)),t&&r)this.code(t).else().code(r).endIf();else if(t)this.code(t).endIf();else if(r)throw Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new g(e))}else(){return this._elseNode(new y)}endIf(){return this._endBlockNode(g,y)}_for(e,t){return this._blockNode(e),t&&this.code(t).endFor(),this}for(e,t){return this._for(new v(e),t)}forRange(e,t,i,o,n=this.opts.es5?r.varKinds.var:r.varKinds.let){let a=this._scope.toName(e);return this._for(new b(n,a,t,i),()=>o(a))}forOf(e,i,o,n=r.varKinds.const){let a=this._scope.toName(e);if(this.opts.es5){let e=i instanceof t.Name?i:this.var("_arr",i);return this.forRange("_i",0,(0,t._)`${e}.length`,r=>{this.var(a,(0,t._)`${e}[${r}]`),o(a)})}return this._for(new $("of",n,a,i),()=>o(a))}forIn(e,i,o,n=this.opts.es5?r.varKinds.var:r.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,t._)`Object.keys(${i})`,o);let a=this._scope.toName(e);return this._for(new $("in",n,a,i),()=>o(a))}endFor(){return this._endBlockNode(_)}label(e){return this._leafNode(new c(e))}break(e){return this._leafNode(new l(e))}return(e){let t=new k;if(this._blockNode(t),this.code(e),1!==t.nodes.length)throw Error('CodeGen: "return" should have one node');return this._endBlockNode(k)}try(e,t,r){if(!t&&!r)throw Error('CodeGen: "try" without "catch" and "finally"');let i=new w;if(this._blockNode(i),this.code(e),t){let e=this.name("e");this._currNode=i.catch=new R(e),t(e)}return r&&(this._currNode=i.finally=new P,this.code(r)),this._endBlockNode(R,P)}throw(e){return this._leafNode(new p(e))}block(e,t){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(t),this}endBlock(e){let t=this._blockStarts.pop();if(void 0===t)throw Error("CodeGen: not in self-balancing block");let r=this._nodes.length-t;if(r<0||void 0!==e&&r!==e)throw Error(`CodeGen: wrong number of nodes: ${r} vs ${e} expected`);return this._nodes.length=t,this}func(e,r=t.nil,i,o){return this._blockNode(new S(e,r,i)),o&&this.code(o).endFunc(),this}endFunc(){return this._endBlockNode(S)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,t){let r=this._currNode;if(r instanceof e||t&&r instanceof t)return this._nodes.pop(),this;throw Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){let t=this._currNode;if(!(t instanceof g))throw Error('CodeGen: "else" without "if"');return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let t=this._nodes;t[t.length-1]=e}};function q(e,t){for(let r in t)e[r]=(e[r]||0)+(t[r]||0);return e}function I(e,r){return r instanceof t._CodeOrName?q(e,r.names):e}function x(e,r,i){var o;if(e instanceof t.Name)return n(e);if(!((o=e)instanceof t._Code&&o._items.some(e=>e instanceof t.Name&&1===r[e.str]&&void 0!==i[e.str])))return e;return new t._Code(e._items.reduce((e,r)=>(r instanceof t.Name&&(r=n(r)),r instanceof t._Code?e.push(...r._items):e.push(r),e),[]));function n(e){let t=i[e.str];return void 0===t||1!==r[e.str]?e:(delete r[e.str],t)}}function j(e){return"boolean"==typeof e||"number"==typeof e||null===e?!e:(0,t._)`!${E(e)}`}e.CodeGen=V,e.not=j;let C=O(e.operators.AND);e.and=function(...e){return e.reduce(C)};let T=O(e.operators.OR);function O(e){return(r,i)=>r===t.nil?i:i===t.nil?r:(0,t._)`${E(r)} ${e} ${E(i)}`}function E(e){return e instanceof t.Name?e:(0,t._)`(${e})`}e.or=function(...e){return e.reduce(T)}}),xl=SP(e=>{var t,r;Object.defineProperty(e,"__esModule",{value:!0}),e.checkStrictMode=e.getErrorPath=e.Type=e.useFunc=e.setEvaluated=e.evaluatedPropsToName=e.mergeEvaluated=e.eachItem=e.unescapeJsonPointer=e.escapeJsonPointer=e.escapeFragment=e.unescapeFragment=e.schemaRefOrVal=e.schemaHasRulesButRef=e.schemaHasRules=e.checkUnknownRules=e.alwaysValidSchema=e.toHash=void 0;let i=xc(),o=xs();function n(e,t=e.schema){let{opts:r,self:i}=e;if(!r.strictSchema||"boolean"==typeof t)return;let o=i.RULES.keywords;for(let r in t)o[r]||m(e,`unknown keyword: "${r}"`)}function a(e,t){if("boolean"==typeof e)return!e;for(let r in e)if(t[r])return!0;return!1}function s(e){return"number"==typeof e?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}function d(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function c({mergeNames:e,mergeToName:t,mergeValues:r,resultToName:o}){return(n,a,s,d)=>{let c=void 0===s?a:s instanceof i.Name?(a instanceof i.Name?e(n,a,s):t(n,a,s),s):a instanceof i.Name?(t(n,s,a),a):r(a,s);return d!==i.Name||c instanceof i.Name?c:o(n,c)}}function l(e,t){if(!0===t)return e.var("props",!0);let r=e.var("props",(0,i._)`{}`);return void 0!==t&&p(e,r,t),r}function p(e,t,r){Object.keys(r).forEach(r=>e.assign((0,i._)`${t}${(0,i.getProperty)(r)}`,!0))}e.toHash=function(e){let t={};for(let r of e)t[r]=!0;return t},e.alwaysValidSchema=function(e,t){return"boolean"==typeof t?t:0===Object.keys(t).length||(n(e,t),!a(t,e.self.RULES.all))},e.checkUnknownRules=n,e.schemaHasRules=a,e.schemaHasRulesButRef=function(e,t){if("boolean"==typeof e)return!e;for(let r in e)if("$ref"!==r&&t.all[r])return!0;return!1},e.schemaRefOrVal=function({topSchemaRef:e,schemaPath:t},r,o,n){if(!n){if("number"==typeof r||"boolean"==typeof r)return r;if("string"==typeof r)return(0,i._)`${r}`}return(0,i._)`${e}${t}${(0,i.getProperty)(o)}`},e.unescapeFragment=function(e){return d(decodeURIComponent(e))},e.escapeFragment=function(e){return encodeURIComponent(s(e))},e.escapeJsonPointer=s,e.unescapeJsonPointer=d,e.eachItem=function(e,t){if(Array.isArray(e))for(let r of e)t(r);else t(e)},e.mergeEvaluated={props:c({mergeNames:(e,t,r)=>e.if((0,i._)`${r} !== true && ${t} !== undefined`,()=>{e.if((0,i._)`${t} === true`,()=>e.assign(r,!0),()=>e.assign(r,(0,i._)`${r} || {}`).code((0,i._)`Object.assign(${r}, ${t})`))}),mergeToName:(e,t,r)=>e.if((0,i._)`${r} !== true`,()=>{!0===t?e.assign(r,!0):(e.assign(r,(0,i._)`${r} || {}`),p(e,r,t))}),mergeValues:(e,t)=>!0===e||{...e,...t},resultToName:l}),items:c({mergeNames:(e,t,r)=>e.if((0,i._)`${r} !== true && ${t} !== undefined`,()=>e.assign(r,(0,i._)`${t} === true ? true : ${r} > ${t} ? ${r} : ${t}`)),mergeToName:(e,t,r)=>e.if((0,i._)`${r} !== true`,()=>e.assign(r,!0===t||(0,i._)`${r} > ${t} ? ${r} : ${t}`)),mergeValues:(e,t)=>!0===e||Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})},e.evaluatedPropsToName=l,e.setEvaluated=p;let u={};function m(e,t,r=e.opts.strictSchema){if(r){if(t=`strict mode: ${t}`,!0===r)throw Error(t);e.self.logger.warn(t)}}e.useFunc=function(e,t){return e.scopeValue("func",{ref:t,code:u[t.code]||(u[t.code]=new o._Code(t.code))})},(r=t||(e.Type=t={}))[r.Num=0]="Num",r[r.Str=1]="Str",e.getErrorPath=function(e,r,o){if(e instanceof i.Name){let n=r===t.Num;return o?n?(0,i._)`"[" + ${e} + "]"`:(0,i._)`"['" + ${e} + "']"`:n?(0,i._)`"/" + ${e}`:(0,i._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return o?(0,i.getProperty)(e).toString():"/"+s(e)},e.checkStrictMode=m}),xp=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xc();e.default={data:new t.Name("data"),valCxt:new t.Name("valCxt"),instancePath:new t.Name("instancePath"),parentData:new t.Name("parentData"),parentDataProperty:new t.Name("parentDataProperty"),rootData:new t.Name("rootData"),dynamicAnchors:new t.Name("dynamicAnchors"),vErrors:new t.Name("vErrors"),errors:new t.Name("errors"),this:new t.Name("this"),self:new t.Name("self"),scope:new t.Name("scope"),json:new t.Name("json"),jsonPos:new t.Name("jsonPos"),jsonLen:new t.Name("jsonLen"),jsonPart:new t.Name("jsonPart")}}),xu=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;let t=xc(),r=xl(),i=xp();function o(e,r){let o=e.const("err",r);e.if((0,t._)`${i.default.vErrors} === null`,()=>e.assign(i.default.vErrors,(0,t._)`[${o}]`),(0,t._)`${i.default.vErrors}.push(${o})`),e.code((0,t._)`${i.default.errors}++`)}function n(e,r){let{gen:i,validateName:o,schemaEnv:n}=e;n.$async?i.throw((0,t._)`new ${e.ValidationError}(${r})`):(i.assign((0,t._)`${o}.errors`,r),i.return(!1))}e.keywordError={message:({keyword:e})=>(0,t.str)`must pass "${e}" keyword validation`},e.keyword$DataError={message:({keyword:e,schemaType:r})=>r?(0,t.str)`"${e}" keyword must be ${r} ($data)`:(0,t.str)`"${e}" keyword is invalid ($data)`},e.reportError=function(r,i=e.keywordError,a,d){let{it:c}=r,{gen:l,compositeRule:p,allErrors:u}=c,m=s(r,i,a);(null!=d?d:p||u)?o(l,m):n(c,(0,t._)`[${m}]`)},e.reportExtraError=function(t,r=e.keywordError,a){let{it:d}=t,{gen:c,compositeRule:l,allErrors:p}=d;o(c,s(t,r,a)),l||p||n(d,i.default.vErrors)},e.resetErrorsCount=function(e,r){e.assign(i.default.errors,r),e.if((0,t._)`${i.default.vErrors} !== null`,()=>e.if(r,()=>e.assign((0,t._)`${i.default.vErrors}.length`,r),()=>e.assign(i.default.vErrors,null)))},e.extendErrors=function({gen:e,keyword:r,schemaValue:o,data:n,errsCount:a,it:s}){if(void 0===a)throw Error("ajv implementation error");let d=e.name("err");e.forRange("i",a,i.default.errors,a=>{e.const(d,(0,t._)`${i.default.vErrors}[${a}]`),e.if((0,t._)`${d}.instancePath === undefined`,()=>e.assign((0,t._)`${d}.instancePath`,(0,t.strConcat)(i.default.instancePath,s.errorPath))),e.assign((0,t._)`${d}.schemaPath`,(0,t.str)`${s.errSchemaPath}/${r}`),s.opts.verbose&&(e.assign((0,t._)`${d}.schema`,o),e.assign((0,t._)`${d}.data`,n))})};let a={keyword:new t.Name("keyword"),schemaPath:new t.Name("schemaPath"),params:new t.Name("params"),propertyName:new t.Name("propertyName"),message:new t.Name("message"),schema:new t.Name("schema"),parentSchema:new t.Name("parentSchema")};function s(e,o,n){let{createErrors:s}=e.it;return!1===s?(0,t._)`{}`:function(e,o,n={}){let{gen:s,it:d}=e,c=[function({errorPath:e},{instancePath:o}){let n=o?(0,t.str)`${e}${(0,r.getErrorPath)(o,r.Type.Str)}`:e;return[i.default.instancePath,(0,t.strConcat)(i.default.instancePath,n)]}(d,n),function({keyword:e,it:{errSchemaPath:i}},{schemaPath:o,parentSchema:n}){let s=n?i:(0,t.str)`${i}/${e}`;return o&&(s=(0,t.str)`${s}${(0,r.getErrorPath)(o,r.Type.Str)}`),[a.schemaPath,s]}(e,n)];return function(e,{params:r,message:o},n){let{keyword:s,data:d,schemaValue:c,it:l}=e,{opts:p,propertyName:u,topSchemaRef:m,schemaPath:f}=l;n.push([a.keyword,s],[a.params,"function"==typeof r?r(e):r||(0,t._)`{}`]),p.messages&&n.push([a.message,"function"==typeof o?o(e):o]),p.verbose&&n.push([a.schema,c],[a.parentSchema,(0,t._)`${m}${f}`],[i.default.data,d]),u&&n.push([a.propertyName,u])}(e,o,c),s.object(...c)}(e,o,n)}}),xm=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.boolOrEmptySchema=e.topBoolOrEmptySchema=void 0;let t=xu(),r=xc(),i=xp(),o={message:"boolean schema is false"};function n(e,r){let{gen:i,data:n}=e;(0,t.reportError)({gen:i,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e},o,void 0,r)}e.topBoolOrEmptySchema=function(e){let{gen:t,schema:o,validateName:a}=e;!1===o?n(e,!1):"object"==typeof o&&!0===o.$async?t.return(i.default.data):(t.assign((0,r._)`${a}.errors`,null),t.return(!0))},e.boolOrEmptySchema=function(e,t){let{gen:r,schema:i}=e;!1===i?(r.var(t,!1),n(e)):r.var(t,!0)}}),xf=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getRules=e.isJSONType=void 0;let t=new Set(["string","number","integer","boolean","null","object","array"]);e.isJSONType=function(e){return"string"==typeof e&&t.has(e)},e.getRules=function(){let e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}}),xh=SP(e=>{function t(e,t){return t.rules.some(t=>r(e,t))}function r(e,t){var r;return void 0!==e[t.keyword]||(null==(r=t.definition.implements)?void 0:r.some(t=>void 0!==e[t]))}Object.defineProperty(e,"__esModule",{value:!0}),e.shouldUseRule=e.shouldUseGroup=e.schemaHasRulesForType=void 0,e.schemaHasRulesForType=function({schema:e,self:r},i){let o=r.RULES.types[i];return o&&!0!==o&&t(e,o)},e.shouldUseGroup=t,e.shouldUseRule=r}),xy=SP(e=>{var t,r;Object.defineProperty(e,"__esModule",{value:!0}),e.reportTypeError=e.checkDataTypes=e.checkDataType=e.coerceAndCheckDataType=e.getJSONTypes=e.getSchemaTypes=e.DataType=void 0;let i=xf(),o=xh(),n=xu(),a=xc(),s=xl();function d(e){let t=Array.isArray(e)?e:e?[e]:[];if(t.every(i.isJSONType))return t;throw Error("type must be JSONType or JSONType[]: "+t.join(","))}(r=t||(e.DataType=t={}))[r.Correct=0]="Correct",r[r.Wrong=1]="Wrong",e.getSchemaTypes=function(e){let t=d(e.type);if(t.includes("null")){if(!1===e.nullable)throw Error("type: null contradicts nullable: false")}else{if(!t.length&&void 0!==e.nullable)throw Error('"nullable" cannot be used without "type"');!0===e.nullable&&t.push("null")}return t},e.getJSONTypes=d,e.coerceAndCheckDataType=function(e,r){var i,n;let{gen:s,data:d,opts:l}=e,u=(i=r,(n=l.coerceTypes)?i.filter(e=>c.has(e)||"array"===n&&"array"===e):[]),f=r.length>0&&!(0===u.length&&1===r.length&&(0,o.schemaHasRulesForType)(e,r[0]));if(f){let i=p(r,d,l.strictNumbers,t.Wrong);s.if(i,()=>{u.length?function(e,t,r){let{gen:i,data:o,opts:n}=e,s=i.let("dataType",(0,a._)`typeof ${o}`),d=i.let("coerced",(0,a._)`undefined`);for(let e of("array"===n.coerceTypes&&i.if((0,a._)`${s} == 'object' && Array.isArray(${o}) && ${o}.length == 1`,()=>i.assign(o,(0,a._)`${o}[0]`).assign(s,(0,a._)`typeof ${o}`).if(p(t,o,n.strictNumbers),()=>i.assign(d,o))),i.if((0,a._)`${d} !== undefined`),r))(c.has(e)||"array"===e&&"array"===n.coerceTypes)&&function(e){switch(e){case"string":i.elseIf((0,a._)`${s} == "number" || ${s} == "boolean"`).assign(d,(0,a._)`"" + ${o}`).elseIf((0,a._)`${o} === null`).assign(d,(0,a._)`""`);return;case"number":i.elseIf((0,a._)`${s} == "boolean" || ${o} === null +-----END ${o}-----`},xr=(e,t)=>{if(e.byteLength!==t.length)return!1;for(let r=0;r({data:e,pos:0}),xo=e=>{let t=e.data[e.pos++];if(void 0===t)throw Error("Unexpected end of ASN.1 input");return t},xn=e=>{let t=xo(e);if(128&t){let r=127&t,i=0;for(let t=0;t{for(;t-- >0;){e.pos++;let t=xn(e);e.pos+=t}},xs=(e,t,r)=>{if(xo(e)!==t)throw Error(r)},xd=(e,t)=>{if(t<0||e.pos+t>e.data.length)throw Error("Unexpected end of ASN.1 input");let r=e.data.subarray(e.pos,e.pos+t);return e.pos+=t,r},xc=async(e,t,r,i)=>{let o,n=qS(i?.extractable),a=xe(r,I8);a.secret&&I7(I8);let s="spki"===e;if(a.resolve)try{let r=xi(t);(function(e,t){if(xs(e,48,`Invalid ${"spki"===t?"SPKI":"PKCS#8"} structure`),xn(e),"pkcs8"===t){xs(e,2,"Expected version field");let t=xn(e);e.pos+=t}xs(e,48,"Expected algorithm identifier"),xn(e)})(r,e),o=a.resolve({crv:(e=>{let t,r=(xs(e,6,"Expected algorithm OID"),t=xn(e),xd(e,t));if(xr(r,[43,101,110]))return"X25519";if(!xr(r,[42,134,72,206,61,2,1]))throw Error("Unsupported key algorithm");xs(e,6,"Expected curve OID");let i=xn(e),o=xd(e,i);if(xr(o,[42,134,72,206,61,3,1,7]))return"P-256";if(xr(o,[43,129,4,0,34]))return"P-384";if(xr(o,[43,129,4,0,35]))return"P-521";throw Error("Unsupported named curve")})(r)})}catch{throw new RL("Invalid or unsupported key format")}else o=a.subtle;return crypto.subtle.importKey(e,t,o,n??s,a.usages[+!s])},xl=(e,t)=>RW(e.replace(t,""));function xp(e){return xt("public","spki",e)}function xu(e){return xt("private","pkcs8",e)}async function xm(e){if(qp(e))if("secret"!==e.type)return e.export({format:"jwk"});else e=e.export();if(e instanceof Uint8Array)return{kty:"oct",k:R0(e)};if(!ql(e))throw TypeError(qf(e,"CryptoKey","KeyObject","Uint8Array"));if(!e.extractable)throw TypeError("non-extractable CryptoKey cannot be exported as a JWK");let t=await crypto.subtle.exportKey("jwk",e);for(let e of(delete t.ext,delete t.key_ops,delete t.use,"AKP"!==t.kty&&delete t.alg,Object.keys(t)))void 0===t[e]&&delete t[e];return t}let xf=(e,t)=>{if("string"!=typeof e||!e)throw new RK(`${t} missing or invalid`)};async function xh(e,t){let r,i;if(R4(e)){if("string"!=typeof(r=qb(e)).kty)throw TypeError(qf(e,"CryptoKey","KeyObject","JSON Web Key"))}else if(qu(e))r=qb(await xm(e));else throw TypeError(qf(e,"CryptoKey","KeyObject","JSON Web Key"));if("sha256"!==(t??="sha256")&&"sha384"!==t&&"sha512"!==t)throw TypeError('digestAlgorithm must one of "sha256", "sha384", or "sha512"');switch(r.kty){case"AKP":xf(r.alg,'"alg" (Algorithm) Parameter'),xf(r.pub,'"pub" (Public key) Parameter'),i={alg:r.alg,kty:r.kty,pub:r.pub};break;case"EC":xf(r.crv,'"crv" (Curve) Parameter'),xf(r.x,'"x" (X Coordinate) Parameter'),xf(r.y,'"y" (Y Coordinate) Parameter'),i={crv:r.crv,kty:r.kty,x:r.x,y:r.y};break;case"OKP":xf(r.crv,'"crv" (Subtype of Key Pair) Parameter'),xf(r.x,'"x" (Public Key) Parameter'),i={crv:r.crv,kty:r.kty,x:r.x};break;case"RSA":xf(r.e,'"e" (Exponent) Parameter'),xf(r.n,'"n" (Modulus) Parameter'),i={e:r.e,kty:r.kty,n:r.n};break;case"oct":if("string"!=typeof r.k)throw new RK('"k" (Key Value) Parameter missing or invalid');i={k:r.k,kty:r.kty};break;default:throw new RL('"kty" (Key Type) Parameter missing or unsupported')}let o=RE(JSON.stringify(i));return R0(await RM(t,o))}async function xy(e,t){t??="sha256";let r=await xh(e,t);return`urn:ietf:params:oauth:jwk-thumbprint:sha-${t.slice(-3)}:${r}`}async function xg(e,t){let r,i={...e,...t?.header};if(!R4(i.jwk))throw new RG('"jwk" (JSON Web Key) Header Parameter must be a JSON object');try{r=q$(i.jwk)}catch(e){throw new RG("Invalid Embedded JWK",{cause:e})}let o=I$(i.alg);if(void 0!==r.use&&"sig"!==r.use)throw new RG('Invalid Embedded JWK, its "use" must be "sig" when present');if(void 0!==r.alg&&r.alg!==o.alg)throw new RG(`Invalid Embedded JWK, its "alg" must be "${o.alg}" when present`);let n=await qk(o,r,!0);if("public"!==n.type)throw new RG('"jwk" (JSON Web Key) Header Parameter must be a public key');return n}async function x_(e,t,r){let i=e.get(t)||e.set(t,{}).get(t),{alg:o}=r;if(void 0===i[o]){let e=qk(r,t,!0).then(e=>{if("public"!==e.type)throw new RJ("JSON Web Key Set members must be public keys");return i[o]=e,e}).catch(t=>{throw i[o]===e&&delete i[o],t});i[o]=e}return i[o]}function xv(e){let t;try{t=structuredClone(e)}catch{}if(!R6(t))throw new RJ("JSON Web Key Set malformed");let r=t.keys.map(e=>{let t=qb(e);return Array.isArray(t.key_ops)&&(t.key_ops=[...t.key_ops]),t}),i=new WeakMap;return Object.defineProperty(async(e,o)=>{let{alg:n,kid:a}={...e,...o?.header},s="string"==typeof n?Ib[n]:void 0;if(!s||s.secret)throw new RL('Unsupported "alg" value for a JSON Web Key Set');let d=t.keys.filter((e,t)=>(function(e,t,r,i){let{kty:o,key_ops:n,ext:a,kid:s,alg:d,use:c,crv:l}=e;return(void 0===a||"boolean"==typeof a)&&(void 0===n||Array.isArray(n)&&n.every((e,t)=>"string"==typeof e&&n.indexOf(e)===t)&&n.includes("verify"))&&t.kty.includes(o)&&(void 0===i||"string"==typeof i&&i===s)&&(void 0===d?"AKP"!==o:r===d)&&(void 0===c||"sig"===c)&&(!t.crv||l===t.crv)})(r[t],s,n,a)),{0:c,length:l}=d;if(!l)throw new RZ;if(1!==l){let e=new RQ;throw e[Symbol.asyncIterator]=async function*(){for(let e of d)try{yield await x_(i,e,s)}catch{}},e}return x_(i,c,s)},"jwks",{value:()=>structuredClone(t)})}(typeof navigator>"u"||!navigator.userAgent?.startsWith?.("Mozilla/5.0 "))&&(h="jose/v6.2.12");let xb=Symbol(),x$=Symbol();function xS(e,t){return Number.isFinite(e)&&Date.now(){if(u&&("u">typeof WebSocketPair||"u">typeof navigator&&"Cloudflare-Workers"===navigator.userAgent||"u">typeof EdgeRuntime&&"vercel"===EdgeRuntime)&&(u=void 0),!u){let e=++m,t=u=(async function(e,t,r,i=fetch){let o=await i(e,{method:"GET",signal:r,redirect:"manual",headers:t}).catch(e=>{throw"TimeoutError"===e.name?new RX:e});if(200!==o.status)throw new RN("Expected 200 OK from the JSON Web Key Set HTTP response");try{return await o.json()}catch{throw new RN("Failed to parse the JSON Web Key Set HTTP response as JSON")}})(r,d,AbortSignal.timeout(n),c).then(t=>{let r=xv(t);if(e<=f)return;y=r;let i=Date.now();l&&(l.uat=i,l.jwks=t),p=i,f=e}).finally(()=>{u===t&&(u=void 0)})}await u};return Object.defineProperties(async(e,t)=>{y&&xS(p,s)||await g();try{return await y(e,t)}catch(r){if(r instanceof RZ&&!xS(p,a))return await g(),y(e,t);throw r}},{coolingDown:{get:()=>xS(p,a),enumerable:!0},fresh:{get:()=>xS(p,s),enumerable:!0},reload:{value:g,enumerable:!0},reloading:{get:()=>!!u,enumerable:!0},jwks:{value:()=>y?.jwks(),enumerable:!0}})}let xV=IB;class xP extends xV{encode(){let e=R0(JSON.stringify({alg:"none"})),t=R0(IG(this));return`${e}.${t}.`}static decode(e,t){let r,i;if("string"!=typeof e)throw new RB("Unsecured JWT must be a string");let{0:o,1:n,2:a,length:s}=e.split(".");if(3!==s||""!==a)throw new RB("Invalid Unsecured JWT");try{r=R7(o,RG,"JWS Protected Header is invalid");let e=qo(RG,qe,void 0,r,r);i=qn(r,e)}catch(e){throw e instanceof RG?new RB("Invalid Unsecured JWT",{cause:e}):e}if("none"!==r.alg)throw new RB("Invalid Unsecured JWT");if(!i)throw new RB("JWTs MUST NOT use unencoded payload");return{payload:IU(r,R5(n,"payload",RB),t),header:r}}}async function xR(e,t,r){if("string"!=typeof e||0!==e.indexOf("-----BEGIN PUBLIC KEY-----"))throw TypeError('"spki" must be SPKI formatted string');return xc("spki",xl(e,/(?:-----(?:BEGIN|END) PUBLIC KEY-----|\s)/g),t,r)}async function xq(e,t,r){let i;if("string"!=typeof e||0!==e.indexOf("-----BEGIN CERTIFICATE-----"))throw TypeError('"x509" must be X.509 formatted string');try{let t=xl(e,/(?:-----(?:BEGIN|END) CERTIFICATE-----|\s)/g);i=function(e){let t=xi(e);xs(t,48,"Invalid certificate structure");let r=xn(t);if(r<0||t.pos+r>t.data.length)throw Error("Unexpected end of ASN.1 input");xs(t,48,"Invalid tbsCertificate structure"),xn(t),160===e[t.pos]?xa(t,6):xa(t,5);let i=t.pos;xs(t,48,"Invalid SPKI structure");let o=xn(t);return e.subarray(i,i+o+(t.pos-i))}(t)}catch(e){throw TypeError("Failed to parse the X.509 certificate",{cause:e})}return xc("spki",i,t,r)}async function xI(e,t,r){if("string"!=typeof e||0!==e.indexOf("-----BEGIN PRIVATE KEY-----"))throw TypeError('"pkcs8" must be PKCS#8 formatted string');return xc("pkcs8",xl(e,/(?:-----(?:BEGIN|END) PRIVATE KEY-----|\s)/g),t,r)}async function xx(e,t,r){if(!R4(e))throw TypeError("JWK must be an object");let i=q$(e),o=qS(r?.extractable),{alg:n}=i;if(t??=n,"oct"!==i.kty&&!t)throw TypeError('"alg" argument is required when "jwk.alg" is not present');switch(i.kty){case"oct":if("string"!=typeof i.k)throw TypeError('missing "k" (Key Value) Parameter value');return R1(i.k);case"AKP":if("string"!=typeof n||!n)throw TypeError('missing "alg" (Algorithm) Parameter value');if(t!==n)throw TypeError("JWK alg and alg option value mismatch");return qk(xe(t),i,o);case"RSA":case"EC":case"OKP":return qk(xe(t),i,o);default:throw new RL('Unsupported "kty" (Key Type) Parameter value')}}function xj(e){let t;if("string"==typeof e){let r=e.split(".");(3===r.length||5===r.length)&&([t]=r)}else if("object"==typeof e&&e)if("protected"in e)t=e.protected;else throw TypeError("Token does not contain a Protected Header");let r="Invalid Token or Protected Header formatting";if("string"!=typeof t||!t)throw TypeError(r);return R7(t,TypeError,r)}function xC(e){let t,r;if("string"!=typeof e)throw new RB("JWTs must use Compact JWS serialization, JWT must be a string");let{1:i,length:o}=e.split(".");if(5===o)throw new RB("Only JWTs using Compact JWS serialization can be decoded");if(3!==o)throw new RB("Invalid JWT");if(!i)throw new RB("JWTs must contain a payload");try{t=R1(i)}catch{throw new RB("Failed to base64url decode the payload")}try{r=JSON.parse(RI.decode(t))}catch{throw new RB("Failed to parse the decoded payload as JSON")}if(!R4(r))throw new RB("Invalid JWT Claims Set");return r}async function xT(e,t){let r,i=qS(t?.extractable),o=xe(e,I8);if(o.secret&&I7(I8),o.resolve){let e=t?.crv??"P-256";if(!["P-256","P-384","P-521","X25519"].includes(e))throw new RL("Invalid or unsupported crv option provided, supported values are P-256, P-384, P-521, and X25519");r=o.resolve({crv:e})}else{if(void 0!==o.crv&&t?.crv!==void 0&&t.crv!==o.crv)throw new RL(`Invalid or unsupported crv option provided, the only supported value for ${e} is ${o.crv}`);r="RSA"===o.kty[0]?{...o.subtle,publicExponent:Uint8Array.of(1,0,1),modulusLength:function(e){let t=e?.modulusLength??2048;if("number"!=typeof t||!Number.isInteger(t)||t<2048)throw new RL("Invalid or unsupported modulusLength option provided, 2048 bits or larger keys must be used");return t}(t)}:o.subtle}return crypto.subtle.generateKey(r,i??!1,[...o.usages[1],...o.usages[0]])}async function xO(e,t){let r,i,o,n=qS(t?.extractable);switch(e){case"HS256":case"HS384":case"HS512":r=+e.slice(-3),i={name:"HMAC",hash:`SHA-${r}`,length:r},o=["sign","verify"];break;case"A128CBC-HS256":case"A192CBC-HS384":case"A256CBC-HS512":return crypto.getRandomValues(new Uint8Array(e.slice(-3)>>3));case"A128KW":case"A192KW":case"A256KW":i={name:"AES-KW",length:r=+e.slice(1,4)},o=["wrapKey","unwrapKey"];break;case"A128GCMKW":case"A192GCMKW":case"A256GCMKW":case"A128GCM":case"A192GCM":case"A256GCM":i={name:"AES-GCM",length:r=+e.slice(1,4)},o=["encrypt","decrypt"];break;default:I7(I8)}return crypto.subtle.generateKey(i,n??!1,o)}let xE="WebCryptoAPI";var xA=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;var t=class{};e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var r=class extends t{constructor(t){if(super(),!e.IDENTIFIER.test(t))throw Error("CodeGen: name must be a valid identifier");this.str=t}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};e.Name=r;var i=class extends t{constructor(e){super(),this._items="string"==typeof e?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return""===e||'""'===e}get str(){var e;return null!=(e=this._str)?e:this._str=this._items.reduce((e,t)=>`${e}${t}`,"")}get names(){var e;return null!=(e=this._names)?e:this._names=this._items.reduce((e,t)=>(t instanceof r&&(e[t.str]=(e[t.str]||0)+1),e),{})}};function o(e,...t){let r=[e[0]],n=0;for(;n{Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;let t=xA();var r,i,o=class extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}};(r=i||(e.UsedValueState=i={}))[r.Started=0]="Started",r[r.Completed=1]="Completed",e.varKinds={const:new t.Name("const"),let:new t.Name("let"),var:new t.Name("var")};var n=class{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof t.Name?e:this.name(e)}name(e){return new t.Name(this._newName(e))}_newName(e){let t=this._names[e]||this._nameGroup(e);return`${e}${t.index++}`}_nameGroup(e){var t,r;if((null==(r=null==(t=this._parent)?void 0:t._prefixes)?void 0:r.has(e))||this._prefixes&&!this._prefixes.has(e))throw Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}};e.Scope=n;var a=class extends t.Name{constructor(e,t){super(t),this.prefix=e}setValue(e,{property:r,itemIndex:i}){this.value=e,this.scopePath=(0,t._)`.${new t.Name(r)}[${i}]`}};e.ValueScopeName=a;let s=(0,t._)`\n`;var d=class extends n{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?s:t.nil}}get(){return this._scope}name(e){return new a(e,this._newName(e))}value(e,t){var r;if(void 0===t.ref)throw Error("CodeGen: ref must be passed in value");let i=this.toName(e),{prefix:o}=i,n=null!=(r=t.key)?r:t.ref,a=this._values[o];if(a){let e=a.get(n);if(e)return e}else a=this._values[o]=new Map;a.set(n,i);let s=this._scope[o]||(this._scope[o]=[]),d=s.length;return s[d]=t.ref,i.setValue(t,{property:o,itemIndex:d}),i}getValue(e,t){let r=this._values[e];if(r)return r.get(t)}scopeRefs(e,r=this._values){return this._reduceValues(r,r=>{if(void 0===r.scopePath)throw Error(`CodeGen: name "${r}" has no value`);return(0,t._)`${e}${r.scopePath}`})}scopeCode(e=this._values,t,r){return this._reduceValues(e,e=>{if(void 0===e.value)throw Error(`CodeGen: name "${e}" has no value`);return e.value.code},t,r)}_reduceValues(r,n,a={},s){let d=t.nil;for(let c in r){let l=r[c];if(!l)continue;let p=a[c]=a[c]||new Map;l.forEach(r=>{if(p.has(r))return;p.set(r,i.Started);let a=n(r);if(a){let i=this.opts.es5?e.varKinds.var:e.varKinds.const;d=(0,t._)`${d}${i} ${r} = ${a};${this.opts._n}`}else if(a=null==s?void 0:s(r))d=(0,t._)`${d}${a}${this.opts._n}`;else throw new o(r);p.set(r,i.Completed)})}return d}};e.ValueScope=d}),xM=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;let t=xA(),r=xW();var i=xA();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return i._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return i.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return i.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return i.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return i.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return i.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return i.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return i.Name}});var o=xW();Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return o.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return o.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return o.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return o.varKinds}}),e.operators={GT:new t._Code(">"),GTE:new t._Code(">="),LT:new t._Code("<"),LTE:new t._Code("<="),EQ:new t._Code("==="),NEQ:new t._Code("!=="),NOT:new t._Code("!"),OR:new t._Code("||"),AND:new t._Code("&&"),ADD:new t._Code("+")};var n=class{optimizeNodes(){return this}optimizeNames(e,t){return this}},a=class extends n{constructor(e,t,r){super(),this.varKind=e,this.name=t,this.rhs=r}render({es5:e,_n:t}){let i=e?r.varKinds.var:this.varKind,o=void 0===this.rhs?"":` = ${this.rhs}`;return`${i} ${this.name}${o};`+t}optimizeNames(e,t){if(e[this.name.str])return this.rhs&&(this.rhs=x(this.rhs,e,t)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}},s=class extends n{constructor(e,t,r){super(),this.lhs=e,this.rhs=t,this.sideEffects=r}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,r){if(!(this.lhs instanceof t.Name)||e[this.lhs.str]||this.sideEffects)return this.rhs=x(this.rhs,e,r),this}get names(){return I(this.lhs instanceof t.Name?{}:{...this.lhs.names},this.rhs)}},d=class extends s{constructor(e,t,r,i){super(e,r,i),this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}},c=class extends n{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}},l=class extends n{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}},p=class extends n{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}},u=class extends n{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=x(this.code,e,t),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}},m=class extends n{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce((t,r)=>t+r.render(e),"")}optimizeNodes(){let{nodes:e}=this,t=e.length;for(;t--;){let r=e[t].optimizeNodes();Array.isArray(r)?e.splice(t,1,...r):r?e[t]=r:e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){let{nodes:r}=this,i=r.length;for(;i--;){let o=r[i];o.optimizeNames(e,t)||(function(e,t){for(let r in t)e[r]=(e[r]||0)-(t[r]||0)}(e,o.names),r.splice(i,1))}return r.length>0?this:void 0}get names(){return this.nodes.reduce((e,t)=>q(e,t.names),{})}},f=class extends m{render(e){return"{"+e._n+super.render(e)+"}"+e._n}},h=class extends m{},y=class extends f{};y.kind="else";var g=class e extends f{constructor(e,t){super(t),this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);return this.else&&(t+="else "+this.else.render(e)),t}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(!0===t)return this.nodes;let r=this.else;if(r){let e=r.optimizeNodes();r=this.else=Array.isArray(e)?new y(e):e}return r?!1===t?r instanceof e?r:r.nodes:this.nodes.length?this:new e(j(t),r instanceof e?[r]:r.nodes):!1!==t&&this.nodes.length?this:void 0}optimizeNames(e,t){var r;if(this.else=null==(r=this.else)?void 0:r.optimizeNames(e,t),super.optimizeNames(e,t)||this.else)return this.condition=x(this.condition,e,t),this}get names(){let e=super.names;return I(e,this.condition),this.else&&q(e,this.else.names),e}};g.kind="if";var _=class extends f{};_.kind="for";var v=class extends _{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iteration=x(this.iteration,e,t),this}get names(){return q(super.names,this.iteration.names)}},b=class extends _{constructor(e,t,r,i){super(),this.varKind=e,this.name=t,this.from=r,this.to=i}render(e){let t=e.es5?r.varKinds.var:this.varKind,{name:i,from:o,to:n}=this;return`for(${t} ${i}=${o}; ${i}<${n}; ${i}++)`+super.render(e)}get names(){return I(I(super.names,this.from),this.to)}},$=class extends _{constructor(e,t,r,i){super(),this.loop=e,this.varKind=t,this.name=r,this.iterable=i}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iterable=x(this.iterable,e,t),this}get names(){return q(super.names,this.iterable.names)}},S=class extends f{constructor(e,t,r){super(),this.name=e,this.args=t,this.async=r}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}};S.kind="func";var k=class extends m{render(e){return"return "+super.render(e)}};k.kind="return";var w=class extends f{render(e){let t="try"+super.render(e);return this.catch&&(t+=this.catch.render(e)),this.finally&&(t+=this.finally.render(e)),t}optimizeNodes(){var e,t;return super.optimizeNodes(),null==(e=this.catch)||e.optimizeNodes(),null==(t=this.finally)||t.optimizeNodes(),this}optimizeNames(e,t){var r,i;return super.optimizeNames(e,t),null==(r=this.catch)||r.optimizeNames(e,t),null==(i=this.finally)||i.optimizeNames(e,t),this}get names(){let e=super.names;return this.catch&&q(e,this.catch.names),this.finally&&q(e,this.finally.names),e}},V=class extends f{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}};V.kind="catch";var P=class extends f{render(e){return"finally"+super.render(e)}};P.kind="finally";var R=class{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?"\n":""},this._extScope=e,this._scope=new r.Scope({parent:e}),this._nodes=[new h]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){let r=this._extScope.value(e,t);return(this._values[r.prefix]||(this._values[r.prefix]=new Set)).add(r),r}getScopeValue(e,t){return this._extScope.getValue(e,t)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,t,r,i){let o=this._scope.toName(t);return void 0!==r&&i&&(this._constants[o.str]=r),this._leafNode(new a(e,o,r)),o}const(e,t,i){return this._def(r.varKinds.const,e,t,i)}let(e,t,i){return this._def(r.varKinds.let,e,t,i)}var(e,t,i){return this._def(r.varKinds.var,e,t,i)}assign(e,t,r){return this._leafNode(new s(e,t,r))}add(t,r){return this._leafNode(new d(t,e.operators.ADD,r))}code(e){return"function"==typeof e?e():e!==t.nil&&this._leafNode(new u(e)),this}object(...e){let r=["{"];for(let[i,o]of e)r.length>1&&r.push(","),r.push(i),(i!==o||this.opts.es5)&&(r.push(":"),(0,t.addCodeArg)(r,o));return r.push("}"),new t._Code(r)}if(e,t,r){if(this._blockNode(new g(e)),t&&r)this.code(t).else().code(r).endIf();else if(t)this.code(t).endIf();else if(r)throw Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new g(e))}else(){return this._elseNode(new y)}endIf(){return this._endBlockNode(g,y)}_for(e,t){return this._blockNode(e),t&&this.code(t).endFor(),this}for(e,t){return this._for(new v(e),t)}forRange(e,t,i,o,n=this.opts.es5?r.varKinds.var:r.varKinds.let){let a=this._scope.toName(e);return this._for(new b(n,a,t,i),()=>o(a))}forOf(e,i,o,n=r.varKinds.const){let a=this._scope.toName(e);if(this.opts.es5){let e=i instanceof t.Name?i:this.var("_arr",i);return this.forRange("_i",0,(0,t._)`${e}.length`,r=>{this.var(a,(0,t._)`${e}[${r}]`),o(a)})}return this._for(new $("of",n,a,i),()=>o(a))}forIn(e,i,o,n=this.opts.es5?r.varKinds.var:r.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,t._)`Object.keys(${i})`,o);let a=this._scope.toName(e);return this._for(new $("in",n,a,i),()=>o(a))}endFor(){return this._endBlockNode(_)}label(e){return this._leafNode(new c(e))}break(e){return this._leafNode(new l(e))}return(e){let t=new k;if(this._blockNode(t),this.code(e),1!==t.nodes.length)throw Error('CodeGen: "return" should have one node');return this._endBlockNode(k)}try(e,t,r){if(!t&&!r)throw Error('CodeGen: "try" without "catch" and "finally"');let i=new w;if(this._blockNode(i),this.code(e),t){let e=this.name("e");this._currNode=i.catch=new V(e),t(e)}return r&&(this._currNode=i.finally=new P,this.code(r)),this._endBlockNode(V,P)}throw(e){return this._leafNode(new p(e))}block(e,t){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(t),this}endBlock(e){let t=this._blockStarts.pop();if(void 0===t)throw Error("CodeGen: not in self-balancing block");let r=this._nodes.length-t;if(r<0||void 0!==e&&r!==e)throw Error(`CodeGen: wrong number of nodes: ${r} vs ${e} expected`);return this._nodes.length=t,this}func(e,r=t.nil,i,o){return this._blockNode(new S(e,r,i)),o&&this.code(o).endFunc(),this}endFunc(){return this._endBlockNode(S)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,t){let r=this._currNode;if(r instanceof e||t&&r instanceof t)return this._nodes.pop(),this;throw Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){let t=this._currNode;if(!(t instanceof g))throw Error('CodeGen: "else" without "if"');return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let t=this._nodes;t[t.length-1]=e}};function q(e,t){for(let r in t)e[r]=(e[r]||0)+(t[r]||0);return e}function I(e,r){return r instanceof t._CodeOrName?q(e,r.names):e}function x(e,r,i){var o;if(e instanceof t.Name)return n(e);if(!((o=e)instanceof t._Code&&o._items.some(e=>e instanceof t.Name&&1===r[e.str]&&void 0!==i[e.str])))return e;return new t._Code(e._items.reduce((e,r)=>(r instanceof t.Name&&(r=n(r)),r instanceof t._Code?e.push(...r._items):e.push(r),e),[]));function n(e){let t=i[e.str];return void 0===t||1!==r[e.str]?e:(delete r[e.str],t)}}function j(e){return"boolean"==typeof e||"number"==typeof e||null===e?!e:(0,t._)`!${E(e)}`}e.CodeGen=R,e.not=j;let C=O(e.operators.AND);e.and=function(...e){return e.reduce(C)};let T=O(e.operators.OR);function O(e){return(r,i)=>r===t.nil?i:i===t.nil?r:(0,t._)`${E(r)} ${e} ${E(i)}`}function E(e){return e instanceof t.Name?e:(0,t._)`(${e})`}e.or=function(...e){return e.reduce(T)}}),xN=S0(e=>{var t,r;Object.defineProperty(e,"__esModule",{value:!0}),e.checkStrictMode=e.getErrorPath=e.Type=e.useFunc=e.setEvaluated=e.evaluatedPropsToName=e.mergeEvaluated=e.eachItem=e.unescapeJsonPointer=e.escapeJsonPointer=e.escapeFragment=e.unescapeFragment=e.schemaRefOrVal=e.schemaHasRulesButRef=e.schemaHasRules=e.checkUnknownRules=e.alwaysValidSchema=e.toHash=void 0;let i=xM(),o=xA();function n(e,t=e.schema){let{opts:r,self:i}=e;if(!r.strictSchema||"boolean"==typeof t)return;let o=i.RULES.keywords;for(let r in t)o[r]||m(e,`unknown keyword: "${r}"`)}function a(e,t){if("boolean"==typeof e)return!e;for(let r in e)if(t[r])return!0;return!1}function s(e){return"number"==typeof e?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}function d(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function c({mergeNames:e,mergeToName:t,mergeValues:r,resultToName:o}){return(n,a,s,d)=>{let c=void 0===s?a:s instanceof i.Name?(a instanceof i.Name?e(n,a,s):t(n,a,s),s):a instanceof i.Name?(t(n,s,a),a):r(a,s);return d!==i.Name||c instanceof i.Name?c:o(n,c)}}function l(e,t){if(!0===t)return e.var("props",!0);let r=e.var("props",(0,i._)`{}`);return void 0!==t&&p(e,r,t),r}function p(e,t,r){Object.keys(r).forEach(r=>e.assign((0,i._)`${t}${(0,i.getProperty)(r)}`,!0))}e.toHash=function(e){let t={};for(let r of e)t[r]=!0;return t},e.alwaysValidSchema=function(e,t){return"boolean"==typeof t?t:0===Object.keys(t).length||(n(e,t),!a(t,e.self.RULES.all))},e.checkUnknownRules=n,e.schemaHasRules=a,e.schemaHasRulesButRef=function(e,t){if("boolean"==typeof e)return!e;for(let r in e)if("$ref"!==r&&t.all[r])return!0;return!1},e.schemaRefOrVal=function({topSchemaRef:e,schemaPath:t},r,o,n){if(!n){if("number"==typeof r||"boolean"==typeof r)return r;if("string"==typeof r)return(0,i._)`${r}`}return(0,i._)`${e}${t}${(0,i.getProperty)(o)}`},e.unescapeFragment=function(e){return d(decodeURIComponent(e))},e.escapeFragment=function(e){return encodeURIComponent(s(e))},e.escapeJsonPointer=s,e.unescapeJsonPointer=d,e.eachItem=function(e,t){if(Array.isArray(e))for(let r of e)t(r);else t(e)},e.mergeEvaluated={props:c({mergeNames:(e,t,r)=>e.if((0,i._)`${r} !== true && ${t} !== undefined`,()=>{e.if((0,i._)`${t} === true`,()=>e.assign(r,!0),()=>e.assign(r,(0,i._)`${r} || {}`).code((0,i._)`Object.assign(${r}, ${t})`))}),mergeToName:(e,t,r)=>e.if((0,i._)`${r} !== true`,()=>{!0===t?e.assign(r,!0):(e.assign(r,(0,i._)`${r} || {}`),p(e,r,t))}),mergeValues:(e,t)=>!0===e||{...e,...t},resultToName:l}),items:c({mergeNames:(e,t,r)=>e.if((0,i._)`${r} !== true && ${t} !== undefined`,()=>e.assign(r,(0,i._)`${t} === true ? true : ${r} > ${t} ? ${r} : ${t}`)),mergeToName:(e,t,r)=>e.if((0,i._)`${r} !== true`,()=>e.assign(r,!0===t||(0,i._)`${r} > ${t} ? ${r} : ${t}`)),mergeValues:(e,t)=>!0===e||Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})},e.evaluatedPropsToName=l,e.setEvaluated=p;let u={};function m(e,t,r=e.opts.strictSchema){if(r){if(t=`strict mode: ${t}`,!0===r)throw Error(t);e.self.logger.warn(t)}}e.useFunc=function(e,t){return e.scopeValue("func",{ref:t,code:u[t.code]||(u[t.code]=new o._Code(t.code))})},(r=t||(e.Type=t={}))[r.Num=0]="Num",r[r.Str=1]="Str",e.getErrorPath=function(e,r,o){if(e instanceof i.Name){let n=r===t.Num;return o?n?(0,i._)`"[" + ${e} + "]"`:(0,i._)`"['" + ${e} + "']"`:n?(0,i._)`"/" + ${e}`:(0,i._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return o?(0,i.getProperty)(e).toString():"/"+s(e)},e.checkStrictMode=m}),xz=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xM();e.default={data:new t.Name("data"),valCxt:new t.Name("valCxt"),instancePath:new t.Name("instancePath"),parentData:new t.Name("parentData"),parentDataProperty:new t.Name("parentDataProperty"),rootData:new t.Name("rootData"),dynamicAnchors:new t.Name("dynamicAnchors"),vErrors:new t.Name("vErrors"),errors:new t.Name("errors"),this:new t.Name("this"),self:new t.Name("self"),scope:new t.Name("scope"),json:new t.Name("json"),jsonPos:new t.Name("jsonPos"),jsonLen:new t.Name("jsonLen"),jsonPart:new t.Name("jsonPart")}}),xD=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;let t=xM(),r=xN(),i=xz();function o(e,r){let o=e.const("err",r);e.if((0,t._)`${i.default.vErrors} === null`,()=>e.assign(i.default.vErrors,(0,t._)`[${o}]`),(0,t._)`${i.default.vErrors}.push(${o})`),e.code((0,t._)`${i.default.errors}++`)}function n(e,r){let{gen:i,validateName:o,schemaEnv:n}=e;n.$async?i.throw((0,t._)`new ${e.ValidationError}(${r})`):(i.assign((0,t._)`${o}.errors`,r),i.return(!1))}e.keywordError={message:({keyword:e})=>(0,t.str)`must pass "${e}" keyword validation`},e.keyword$DataError={message:({keyword:e,schemaType:r})=>r?(0,t.str)`"${e}" keyword must be ${r} ($data)`:(0,t.str)`"${e}" keyword is invalid ($data)`},e.reportError=function(r,i=e.keywordError,a,d){let{it:c}=r,{gen:l,compositeRule:p,allErrors:u}=c,m=s(r,i,a);(null!=d?d:p||u)?o(l,m):n(c,(0,t._)`[${m}]`)},e.reportExtraError=function(t,r=e.keywordError,a){let{it:d}=t,{gen:c,compositeRule:l,allErrors:p}=d;o(c,s(t,r,a)),l||p||n(d,i.default.vErrors)},e.resetErrorsCount=function(e,r){e.assign(i.default.errors,r),e.if((0,t._)`${i.default.vErrors} !== null`,()=>e.if(r,()=>e.assign((0,t._)`${i.default.vErrors}.length`,r),()=>e.assign(i.default.vErrors,null)))},e.extendErrors=function({gen:e,keyword:r,schemaValue:o,data:n,errsCount:a,it:s}){if(void 0===a)throw Error("ajv implementation error");let d=e.name("err");e.forRange("i",a,i.default.errors,a=>{e.const(d,(0,t._)`${i.default.vErrors}[${a}]`),e.if((0,t._)`${d}.instancePath === undefined`,()=>e.assign((0,t._)`${d}.instancePath`,(0,t.strConcat)(i.default.instancePath,s.errorPath))),e.assign((0,t._)`${d}.schemaPath`,(0,t.str)`${s.errSchemaPath}/${r}`),s.opts.verbose&&(e.assign((0,t._)`${d}.schema`,o),e.assign((0,t._)`${d}.data`,n))})};let a={keyword:new t.Name("keyword"),schemaPath:new t.Name("schemaPath"),params:new t.Name("params"),propertyName:new t.Name("propertyName"),message:new t.Name("message"),schema:new t.Name("schema"),parentSchema:new t.Name("parentSchema")};function s(e,o,n){let{createErrors:s}=e.it;return!1===s?(0,t._)`{}`:function(e,o,n={}){let{gen:s,it:d}=e,c=[function({errorPath:e},{instancePath:o}){let n=o?(0,t.str)`${e}${(0,r.getErrorPath)(o,r.Type.Str)}`:e;return[i.default.instancePath,(0,t.strConcat)(i.default.instancePath,n)]}(d,n),function({keyword:e,it:{errSchemaPath:i}},{schemaPath:o,parentSchema:n}){let s=n?i:(0,t.str)`${i}/${e}`;return o&&(s=(0,t.str)`${s}${(0,r.getErrorPath)(o,r.Type.Str)}`),[a.schemaPath,s]}(e,n)];return function(e,{params:r,message:o},n){let{keyword:s,data:d,schemaValue:c,it:l}=e,{opts:p,propertyName:u,topSchemaRef:m,schemaPath:f}=l;n.push([a.keyword,s],[a.params,"function"==typeof r?r(e):r||(0,t._)`{}`]),p.messages&&n.push([a.message,"function"==typeof o?o(e):o]),p.verbose&&n.push([a.schema,c],[a.parentSchema,(0,t._)`${m}${f}`],[i.default.data,d]),u&&n.push([a.propertyName,u])}(e,o,c),s.object(...c)}(e,o,n)}}),xF=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.boolOrEmptySchema=e.topBoolOrEmptySchema=void 0;let t=xD(),r=xM(),i=xz(),o={message:"boolean schema is false"};function n(e,r){let{gen:i,data:n}=e;(0,t.reportError)({gen:i,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e},o,void 0,r)}e.topBoolOrEmptySchema=function(e){let{gen:t,schema:o,validateName:a}=e;!1===o?n(e,!1):"object"==typeof o&&!0===o.$async?t.return(i.default.data):(t.assign((0,r._)`${a}.errors`,null),t.return(!0))},e.boolOrEmptySchema=function(e,t){let{gen:r,schema:i}=e;!1===i?(r.var(t,!1),n(e)):r.var(t,!0)}}),xL=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getRules=e.isJSONType=void 0;let t=new Set(["string","number","integer","boolean","null","object","array"]);e.isJSONType=function(e){return"string"==typeof e&&t.has(e)},e.getRules=function(){let e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}}),xU=S0(e=>{function t(e,t){return t.rules.some(t=>r(e,t))}function r(e,t){var r;return void 0!==e[t.keyword]||(null==(r=t.definition.implements)?void 0:r.some(t=>void 0!==e[t]))}Object.defineProperty(e,"__esModule",{value:!0}),e.shouldUseRule=e.shouldUseGroup=e.schemaHasRulesForType=void 0,e.schemaHasRulesForType=function({schema:e,self:r},i){let o=r.RULES.types[i];return o&&!0!==o&&t(e,o)},e.shouldUseGroup=t,e.shouldUseRule=r}),xH=S0(e=>{var t,r;Object.defineProperty(e,"__esModule",{value:!0}),e.reportTypeError=e.checkDataTypes=e.checkDataType=e.coerceAndCheckDataType=e.getJSONTypes=e.getSchemaTypes=e.DataType=void 0;let i=xL(),o=xU(),n=xD(),a=xM(),s=xN();function d(e){let t=Array.isArray(e)?e:e?[e]:[];if(t.every(i.isJSONType))return t;throw Error("type must be JSONType or JSONType[]: "+t.join(","))}(r=t||(e.DataType=t={}))[r.Correct=0]="Correct",r[r.Wrong=1]="Wrong",e.getSchemaTypes=function(e){let t=d(e.type);if(t.includes("null")){if(!1===e.nullable)throw Error("type: null contradicts nullable: false")}else{if(!t.length&&void 0!==e.nullable)throw Error('"nullable" cannot be used without "type"');!0===e.nullable&&t.push("null")}return t},e.getJSONTypes=d,e.coerceAndCheckDataType=function(e,r){var i,n;let{gen:s,data:d,opts:l}=e,u=(i=r,(n=l.coerceTypes)?i.filter(e=>c.has(e)||"array"===n&&"array"===e):[]),f=r.length>0&&!(0===u.length&&1===r.length&&(0,o.schemaHasRulesForType)(e,r[0]));if(f){let i=p(r,d,l.strictNumbers,t.Wrong);s.if(i,()=>{u.length?function(e,t,r){let{gen:i,data:o,opts:n}=e,s=i.let("dataType",(0,a._)`typeof ${o}`),d=i.let("coerced",(0,a._)`undefined`);for(let e of("array"===n.coerceTypes&&i.if((0,a._)`${s} == 'object' && Array.isArray(${o}) && ${o}.length == 1`,()=>i.assign(o,(0,a._)`${o}[0]`).assign(s,(0,a._)`typeof ${o}`).if(p(t,o,n.strictNumbers),()=>i.assign(d,o))),i.if((0,a._)`${d} !== undefined`),r))(c.has(e)||"array"===e&&"array"===n.coerceTypes)&&function(e){switch(e){case"string":i.elseIf((0,a._)`${s} == "number" || ${s} == "boolean"`).assign(d,(0,a._)`"" + ${o}`).elseIf((0,a._)`${o} === null`).assign(d,(0,a._)`""`);return;case"number":i.elseIf((0,a._)`${s} == "boolean" || ${o} === null || (${s} == "string" && ${o} && ${o} == +${o})`).assign(d,(0,a._)`+${o}`);return;case"integer":i.elseIf((0,a._)`${s} === "boolean" || ${o} === null || (${s} === "string" && ${o} && ${o} == +${o} && !(${o} % 1))`).assign(d,(0,a._)`+${o}`);return;case"boolean":i.elseIf((0,a._)`${o} === "false" || ${o} === 0 || ${o} === null`).assign(d,!1).elseIf((0,a._)`${o} === "true" || ${o} === 1`).assign(d,!0);return;case"null":i.elseIf((0,a._)`${o} === "" || ${o} === 0 || ${o} === false`),i.assign(d,null);return;case"array":i.elseIf((0,a._)`${s} === "string" || ${s} === "number" - || ${s} === "boolean" || ${o} === null`).assign(d,(0,a._)`[${o}]`)}}(e);i.else(),m(e),i.endIf(),i.if((0,a._)`${d} !== undefined`,()=>{i.assign(o,d),function({gen:e,parentData:t,parentDataProperty:r},i){e.if((0,a._)`${t} !== undefined`,()=>e.assign((0,a._)`${t}[${r}]`,i))}(e,d)})}(e,r,u):m(e)})}return f};let c=new Set(["string","number","integer","boolean","null"]);function l(e,r,i,o=t.Correct){let n,s=o===t.Correct?a.operators.EQ:a.operators.NEQ;switch(e){case"null":return(0,a._)`${r} ${s} null`;case"array":n=(0,a._)`Array.isArray(${r})`;break;case"object":n=(0,a._)`${r} && typeof ${r} == "object" && !Array.isArray(${r})`;break;case"integer":n=d((0,a._)`!(${r} % 1) && !isNaN(${r})`);break;case"number":n=d();break;default:return(0,a._)`typeof ${r} ${s} ${e}`}return o===t.Correct?n:(0,a.not)(n);function d(e=a.nil){return(0,a.and)((0,a._)`typeof ${r} == "number"`,e,i?(0,a._)`isFinite(${r})`:a.nil)}}function p(e,t,r,i){let o;if(1===e.length)return l(e[0],t,r,i);let n=(0,s.toHash)(e);if(n.array&&n.object){let e=(0,a._)`typeof ${t} != "object"`;o=n.null?e:(0,a._)`!${t} || ${e}`,delete n.null,delete n.array,delete n.object}else o=a.nil;for(let e in n.number&&delete n.integer,n)o=(0,a.and)(o,l(e,t,r,i));return o}e.checkDataType=l,e.checkDataTypes=p;let u={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>"string"==typeof e?(0,a._)`{type: ${e}}`:(0,a._)`{type: ${t}}`};function m(e){let t=function(e){let{gen:t,data:r,schema:i}=e,o=(0,s.schemaRefOrVal)(e,i,"type");return{gen:t,keyword:"type",data:r,schema:i.type,schemaCode:o,schemaValue:o,parentSchema:i,params:{},it:e}}(e);(0,n.reportError)(t,u)}e.reportTypeError=m}),xg=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.assignDefaults=void 0;let t=xc(),r=xl();function i(e,i,o){let{gen:n,compositeRule:a,data:s,opts:d}=e;if(void 0===o)return;let c=(0,t._)`${s}${(0,t.getProperty)(i)}`;if(a)return void(0,r.checkStrictMode)(e,`default is ignored for: ${c}`);let l=(0,t._)`${c} === undefined`;"empty"===d.useDefaults&&(l=(0,t._)`${l} || ${c} === null || ${c} === ""`),n.if(l,(0,t._)`${c} = ${(0,t.stringify)(o)}`)}e.assignDefaults=function(e,t){let{properties:r,items:o}=e.schema;if("object"===t&&r)for(let t in r)i(e,t,r[t].default);else"array"===t&&Array.isArray(o)&&o.forEach((t,r)=>i(e,r,t.default))}}),x_=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateUnion=e.validateArray=e.usePattern=e.callValidateCode=e.schemaProperties=e.allSchemaProperties=e.noPropertyInData=e.propertyInData=e.isOwnProperty=e.hasPropFunc=e.reportMissingProp=e.checkMissingProp=e.checkReportMissingProp=void 0;let t=xc(),r=xl(),i=xp(),o=xl();function n(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,t._)`Object.prototype.hasOwnProperty`})}function a(e,r,i){return(0,t._)`${n(e)}.call(${r}, ${i})`}function s(e,r,i,o){let n=(0,t._)`${r}${(0,t.getProperty)(i)} === undefined`;return o?(0,t.or)(n,(0,t.not)(a(e,r,i))):n}function d(e){return e?Object.keys(e).filter(e=>"__proto__"!==e):[]}e.checkReportMissingProp=function(e,r){let{gen:i,data:o,it:n}=e;i.if(s(i,o,r,n.opts.ownProperties),()=>{e.setParams({missingProperty:(0,t._)`${r}`},!0),e.error()})},e.checkMissingProp=function({gen:e,data:r,it:{opts:i}},o,n){return(0,t.or)(...o.map(o=>(0,t.and)(s(e,r,o,i.ownProperties),(0,t._)`${n} = ${o}`)))},e.reportMissingProp=function(e,t){e.setParams({missingProperty:t},!0),e.error()},e.hasPropFunc=n,e.isOwnProperty=a,e.propertyInData=function(e,r,i,o){let n=(0,t._)`${r}${(0,t.getProperty)(i)} !== undefined`;return o?(0,t._)`${n} && ${a(e,r,i)}`:n},e.noPropertyInData=s,e.allSchemaProperties=d,e.schemaProperties=function(e,t){return d(t).filter(i=>!(0,r.alwaysValidSchema)(e,t[i]))},e.callValidateCode=function({schemaCode:e,data:r,it:{gen:o,topSchemaRef:n,schemaPath:a,errorPath:s},it:d},c,l,p){let u=p?(0,t._)`${e}, ${r}, ${n}${a}`:r,m=[[i.default.instancePath,(0,t.strConcat)(i.default.instancePath,s)],[i.default.parentData,d.parentData],[i.default.parentDataProperty,d.parentDataProperty],[i.default.rootData,i.default.rootData]];d.opts.dynamicRef&&m.push([i.default.dynamicAnchors,i.default.dynamicAnchors]);let f=(0,t._)`${u}, ${o.object(...m)}`;return l!==t.nil?(0,t._)`${c}.call(${l}, ${f})`:(0,t._)`${c}(${f})`};let c=(0,t._)`new RegExp`;e.usePattern=function({gen:e,it:{opts:r}},i){let n=r.unicodeRegExp?"u":"",{regExp:a}=r.code,s=a(i,n);return e.scopeValue("pattern",{key:s.toString(),ref:s,code:(0,t._)`${"new RegExp"===a.code?c:(0,o.useFunc)(e,a)}(${i}, ${n})`})},e.validateArray=function(e){let{gen:i,data:o,keyword:n,it:a}=e,s=i.name("valid");if(a.allErrors){let e=i.let("valid",!0);return d(()=>i.assign(e,!1)),e}return i.var(s,!0),d(()=>i.break()),s;function d(a){let d=i.const("len",(0,t._)`${o}.length`);i.forRange("i",0,d,o=>{e.subschema({keyword:n,dataProp:o,dataPropType:r.Type.Num},s),i.if((0,t.not)(s),a)})}},e.validateUnion=function(e){let{gen:i,schema:o,keyword:n,it:a}=e;if(!Array.isArray(o))throw Error("ajv implementation error");if(o.some(e=>(0,r.alwaysValidSchema)(a,e))&&!a.opts.unevaluated)return;let s=i.let("valid",!1),d=i.name("_valid");i.block(()=>o.forEach((r,o)=>{let a=e.subschema({keyword:n,schemaProp:o,compositeRule:!0},d);i.assign(s,(0,t._)`${s} || ${d}`),e.mergeValidEvaluated(a,d)||i.if((0,t.not)(s))})),e.result(s,()=>e.reset(),()=>e.error(!0))}}),xv=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateKeywordUsage=e.validSchemaType=e.funcKeywordCode=e.macroKeywordCode=void 0;let t=xc(),r=xp(),i=x_(),o=xu();function n(e){let{gen:r,data:i,it:o}=e;r.if(o.parentData,()=>r.assign(i,(0,t._)`${o.parentData}[${o.parentDataProperty}]`))}function a(e,r,i){if(void 0===i)throw Error(`keyword "${r}" failed to compile`);return e.scopeValue("keyword","function"==typeof i?{ref:i}:{ref:i,code:(0,t.stringify)(i)})}e.macroKeywordCode=function(e,r){let{gen:i,keyword:o,schema:n,parentSchema:s,it:d}=e,c=r.macro.call(d.self,n,s,d),l=a(i,o,c);!1!==d.opts.validateSchema&&d.self.validateSchema(c,!0);let p=i.name("valid");e.subschema({schema:c,schemaPath:t.nil,errSchemaPath:`${d.errSchemaPath}/${o}`,topSchemaRef:l,compositeRule:!0},p),e.pass(p,()=>e.error(!0))},e.funcKeywordCode=function(e,s){var d;let{gen:c,keyword:l,schema:p,parentSchema:u,$data:m,it:f}=e;!function({schemaEnv:e},t){if(t.async&&!e.$async)throw Error("async keyword in sync schema")}(f,s);let h=a(c,l,!m&&s.compile?s.compile.call(f.self,p,u,f):s.validate),y=c.let("valid");function g(o=s.async?(0,t._)`await `:t.nil){let n=f.opts.passContext?r.default.this:r.default.self,a=!("compile"in s&&!m||!1===s.schema);c.assign(y,(0,t._)`${o}${(0,i.callValidateCode)(e,h,n,a)}`,s.modifying)}function _(e){var r;c.if((0,t.not)(null!=(r=s.valid)?r:y),e)}e.block$data(y,function(){if(!1===s.errors)g(),s.modifying&&n(e),_(()=>e.error());else{let i,a,d=s.async?(i=c.let("ruleErrs",null),c.try(()=>g((0,t._)`await `),e=>c.assign(y,!1).if((0,t._)`${e} instanceof ${f.ValidationError}`,()=>c.assign(i,(0,t._)`${e}.errors`),()=>c.throw(e))),i):(a=(0,t._)`${h}.errors`,c.assign(a,null),g(t.nil),a);s.modifying&&n(e),_(()=>(function(e,i){let{gen:n}=e;n.if((0,t._)`Array.isArray(${i})`,()=>{n.assign(r.default.vErrors,(0,t._)`${r.default.vErrors} === null ? ${i} : ${r.default.vErrors}.concat(${i})`).assign(r.default.errors,(0,t._)`${r.default.vErrors}.length`),(0,o.extendErrors)(e)},()=>e.error())})(e,d))}}),e.ok(null!=(d=s.valid)?d:y)},e.validSchemaType=function(e,t,r=!1){return!t.length||t.some(t=>"array"===t?Array.isArray(e):"object"===t?e&&"object"==typeof e&&!Array.isArray(e):typeof e==t||r&&void 0===e)},e.validateKeywordUsage=function({schema:e,opts:t,self:r,errSchemaPath:i},o,n){if(Array.isArray(o.keyword)?!o.keyword.includes(n):o.keyword!==n)throw Error("ajv implementation error");let a=o.dependencies;if(null==a?void 0:a.some(t=>!Object.prototype.hasOwnProperty.call(e,t)))throw Error(`parent schema must have dependencies of ${n}: ${a.join(",")}`);if(o.validateSchema&&!o.validateSchema(e[n])){let e=`keyword "${n}" value is invalid at path "${i}": `+r.errorsText(o.validateSchema.errors);if("log"===t.validateSchema)r.logger.error(e);else throw Error(e)}}}),xb=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.extendSubschemaMode=e.extendSubschemaData=e.getSubschema=void 0;let t=xc(),r=xl();e.getSubschema=function(e,{keyword:i,schemaProp:o,schema:n,schemaPath:a,errSchemaPath:s,topSchemaRef:d}){if(void 0!==i&&void 0!==n)throw Error('both "keyword" and "schema" passed, only one allowed');if(void 0!==i){let n=e.schema[i];return void 0===o?{schema:n,schemaPath:(0,t._)`${e.schemaPath}${(0,t.getProperty)(i)}`,errSchemaPath:`${e.errSchemaPath}/${i}`}:{schema:n[o],schemaPath:(0,t._)`${e.schemaPath}${(0,t.getProperty)(i)}${(0,t.getProperty)(o)}`,errSchemaPath:`${e.errSchemaPath}/${i}/${(0,r.escapeFragment)(o)}`}}if(void 0!==n){if(void 0===a||void 0===s||void 0===d)throw Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:n,schemaPath:a,topSchemaRef:d,errSchemaPath:s}}throw Error('either "keyword" or "schema" must be passed')},e.extendSubschemaData=function(e,i,{dataProp:o,dataPropType:n,data:a,dataTypes:s,propertyName:d}){if(void 0!==a&&void 0!==o)throw Error('both "data" and "dataProp" passed, only one allowed');let{gen:c}=i;if(void 0!==o){let{errorPath:a,dataPathArr:s,opts:d}=i;l(c.let("data",(0,t._)`${i.data}${(0,t.getProperty)(o)}`,!0)),e.errorPath=(0,t.str)`${a}${(0,r.getErrorPath)(o,n,d.jsPropertySyntax)}`,e.parentDataProperty=(0,t._)`${o}`,e.dataPathArr=[...s,e.parentDataProperty]}function l(t){e.data=t,e.dataLevel=i.dataLevel+1,e.dataTypes=[],i.definedProperties=new Set,e.parentData=i.data,e.dataNames=[...i.dataNames,t]}void 0!==a&&(l(a instanceof t.Name?a:c.let("data",a,!0)),void 0!==d&&(e.propertyName=d)),s&&(e.dataTypes=s)},e.extendSubschemaMode=function(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:i,createErrors:o,allErrors:n}){void 0!==i&&(e.compositeRule=i),void 0!==o&&(e.createErrors=o),void 0!==n&&(e.allErrors=n),e.jtdDiscriminator=t,e.jtdMetadata=r}}),x$=SP((e,t)=>{t.exports=function e(t,r){if(t===r)return!0;if(t&&r&&"object"==typeof t&&"object"==typeof r){if(t.constructor!==r.constructor)return!1;if(Array.isArray(t)){if((i=t.length)!=r.length)return!1;for(o=i;0!=o--;)if(!e(t[o],r[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if((i=(n=Object.keys(t)).length)!==Object.keys(r).length)return!1;for(o=i;0!=o--;)if(!Object.prototype.hasOwnProperty.call(r,n[o]))return!1;for(o=i;0!=o--;){var i,o,n,a=n[o];if(!e(t[a],r[a]))return!1}return!0}return t!=t&&r!=r}}),xS=SP((e,t)=>{var r=t.exports=function(e,t,i){"function"==typeof t&&(i=t,t={});var o="function"==typeof(i=t.cb||i)?i:i.pre||function(){};!function e(t,i,o,n,a,s,d,c,l,p){if(n&&"object"==typeof n&&!Array.isArray(n)){for(var u in i(n,a,s,d,c,l,p),n){var m=n[u];if(Array.isArray(m)){if(u in r.arrayKeywords)for(var f=0;f{Object.defineProperty(e,"__esModule",{value:!0}),e.getSchemaRefs=e.resolveUrl=e.normalizeId=e._getFullPath=e.getFullPath=e.inlineRef=void 0;let t=xl(),r=x$(),i=xS(),o=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);e.inlineRef=function(e,r=!0){return"boolean"==typeof e||(!0===r?!function e(t){for(let r in t){if(n.has(r))return!0;let i=t[r];if(Array.isArray(i)&&i.some(e)||"object"==typeof i&&e(i))return!0}return!1}(e):!!r&&function e(r){let i=0;for(let n in r)if("$ref"===n||(i++,!o.has(n)&&("object"==typeof r[n]&&(0,t.eachItem)(r[n],t=>i+=e(t)),1/0===i)))return 1/0;return i}(e)<=r)};let n=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function a(e,t="",r){return!1!==r&&(t=c(t)),s(e,e.parse(t))}function s(e,t){return e.serialize(t).split("#")[0]+"#"}e.getFullPath=a,e._getFullPath=s;let d=/#\/?$/;function c(e){return e?e.replace(d,""):""}e.normalizeId=c,e.resolveUrl=function(e,t,r){return r=c(r),e.resolve(t,r)};let l=/^[a-z_][-a-z0-9._]*$/i;e.getSchemaRefs=function(e,t){if("boolean"==typeof e)return{};let{schemaId:o,uriResolver:n}=this.opts,s=c(e[o]||t),d={"":s},p=a(n,s,!1),u={},m=new Set;return i(e,{allKeys:!0},(e,t,r,i)=>{if(void 0===i)return;let n=p+t,a=d[i];function s(t){let r=this.opts.uriResolver.resolve;if(t=c(a?r(a,t):t),m.has(t))throw h(t);m.add(t);let i=this.refs[t];return"string"==typeof i&&(i=this.refs[i]),"object"==typeof i?f(e,i.schema,t):t!==c(n)&&("#"===t[0]?(f(e,u[t],t),u[t]=e):this.refs[t]=n),t}function y(e){if("string"==typeof e){if(!l.test(e))throw Error(`invalid anchor "${e}"`);s.call(this,`#${e}`)}}"string"==typeof e[o]&&(a=s.call(this,e[o])),y.call(this,e.$anchor),y.call(this,e.$dynamicAnchor),d[t]=a}),u;function f(e,t,i){if(void 0!==t&&!r(e,t))throw h(i)}function h(e){return Error(`reference "${e}" resolves to more than one schema`)}}}),xw=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getData=e.KeywordCxt=e.validateFunctionCode=void 0;let t=xm(),r=xy(),i=xh(),o=xy(),n=xg(),a=xv(),s=xb(),d=xc(),c=xp(),l=xk(),p=xl(),u=xu();function m({gen:e,validateName:t,schema:r,schemaEnv:i,opts:o},n){var a;o.code.es5?e.func(t,(0,d._)`${c.default.data}, ${c.default.valCxt}`,i.$async,()=>{var t,i;e.code((0,d._)`"use strict"; ${f(r,o)}`),t=e,i=o,t.if(c.default.valCxt,()=>{t.var(c.default.instancePath,(0,d._)`${c.default.valCxt}.${c.default.instancePath}`),t.var(c.default.parentData,(0,d._)`${c.default.valCxt}.${c.default.parentData}`),t.var(c.default.parentDataProperty,(0,d._)`${c.default.valCxt}.${c.default.parentDataProperty}`),t.var(c.default.rootData,(0,d._)`${c.default.valCxt}.${c.default.rootData}`),i.dynamicRef&&t.var(c.default.dynamicAnchors,(0,d._)`${c.default.valCxt}.${c.default.dynamicAnchors}`)},()=>{t.var(c.default.instancePath,(0,d._)`""`),t.var(c.default.parentData,(0,d._)`undefined`),t.var(c.default.parentDataProperty,(0,d._)`undefined`),t.var(c.default.rootData,c.default.data),i.dynamicRef&&t.var(c.default.dynamicAnchors,(0,d._)`{}`)}),e.code(n)}):e.func(t,(0,d._)`${c.default.data}, ${(a=o,(0,d._)`{${c.default.instancePath}="", ${c.default.parentData}, ${c.default.parentDataProperty}, ${c.default.rootData}=${c.default.data}${a.dynamicRef?(0,d._)`, ${c.default.dynamicAnchors}={}`:d.nil}}={}`)}`,i.$async,()=>e.code(f(r,o)).code(n))}function f(e,t){let r="object"==typeof e&&e[t.schemaId];return r&&(t.code.source||t.code.process)?(0,d._)`/*# sourceURL=${r} */`:d.nil}function h({schema:e,self:t}){if("boolean"==typeof e)return!e;for(let r in e)if(t.RULES.all[r])return!0;return!1}function y(e){return"boolean"!=typeof e.schema}function g(e){(0,p.checkUnknownRules)(e),function(e){let{schema:t,errSchemaPath:r,opts:i,self:o}=e;t.$ref&&i.ignoreKeywordsWithRef&&(0,p.schemaHasRulesButRef)(t,o.RULES)&&o.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}(e)}function _(e,t){if(e.opts.jtd)return b(e,[],!1,t);let i=(0,r.getSchemaTypes)(e.schema);b(e,i,!(0,r.coerceAndCheckDataType)(e,i),t)}function v({gen:e,schemaEnv:t,schema:r,errSchemaPath:i,opts:o}){let n=r.$comment;if(!0===o.$comment)e.code((0,d._)`${c.default.self}.logger.log(${n})`);else if("function"==typeof o.$comment){let r=(0,d.str)`${i}/$comment`,o=e.scopeValue("root",{ref:t.root});e.code((0,d._)`${c.default.self}.opts.$comment(${n}, ${r}, ${o}.schema)`)}}function b(e,t,r,n){var a,s,l,u;let{gen:m,schema:f,data:h,allErrors:y,opts:g,self:_}=e,{RULES:v}=_;if(f.$ref&&(g.ignoreKeywordsWithRef||!(0,p.schemaHasRulesButRef)(f,v)))return void m.block(()=>R(e,"$ref",v.all.$ref.definition));function b(a){(0,i.shouldUseGroup)(f,a)&&(a.type?(m.if((0,o.checkDataType)(a.type,h,g.strictNumbers)),$(e,a),1===t.length&&t[0]===a.type&&r&&(m.else(),(0,o.reportTypeError)(e)),m.endIf()):$(e,a),y||m.if((0,d._)`${c.default.errors} === ${n||0}`))}g.jtd||(a=e,s=t,!a.schemaEnv.meta&&a.opts.strictTypes&&(function(e,t){if(t.length){if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach(t=>{S(e.dataTypes,t)||k(e,`type "${t}" not allowed by context "${e.dataTypes.join(",")}"`)}),function(e,t){let r=[];for(let i of e.dataTypes)S(t,i)?r.push(i):t.includes("integer")&&"number"===i&&r.push("integer");e.dataTypes=r}(e,t)}}(a,s),a.opts.allowUnionTypes||(l=a,(u=s).length>1&&!(2===u.length&&u.includes("null"))&&k(l,"use allowUnionTypes to allow union type keyword")),function(e,t){let r=e.self.RULES.all;for(let o in r){let n=r[o];if("object"==typeof n&&(0,i.shouldUseRule)(e.schema,n)){let{type:r}=n.definition;r.length&&!r.some(e=>{var r,i;return r=t,i=e,r.includes(i)||"number"===i&&r.includes("integer")})&&k(e,`missing type "${r.join(",")}" for keyword "${o}"`)}}}(a,a.dataTypes))),m.block(()=>{for(let e of v.rules)b(e);b(v.post)})}function $(e,t){let{gen:r,schema:o,opts:{useDefaults:a}}=e;a&&(0,n.assignDefaults)(e,t.type),r.block(()=>{for(let r of t.rules)(0,i.shouldUseRule)(o,r)&&R(e,r.keyword,r.definition,t.type)})}function S(e,t){return e.includes(t)||"integer"===t&&e.includes("number")}function k(e,t){let r=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${r}" (strictTypes)`,(0,p.checkStrictMode)(e,t,e.opts.strictTypes)}e.validateFunctionCode=function(e){y(e)&&(g(e),h(e))?function(e){let{schema:t,opts:r,gen:i}=e;m(e,()=>{r.$comment&&t.$comment&&v(e),function(e){let{schema:t,opts:r}=e;void 0!==t.default&&r.useDefaults&&r.strictSchema&&(0,p.checkStrictMode)(e,"default is ignored in the schema root")}(e),i.let(c.default.vErrors,null),i.let(c.default.errors,0),r.unevaluated&&function(e){let{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",(0,d._)`${r}.evaluated`),t.if((0,d._)`${e.evaluated}.dynamicProps`,()=>t.assign((0,d._)`${e.evaluated}.props`,(0,d._)`undefined`)),t.if((0,d._)`${e.evaluated}.dynamicItems`,()=>t.assign((0,d._)`${e.evaluated}.items`,(0,d._)`undefined`))}(e),_(e),function(e){let{gen:t,schemaEnv:r,validateName:i,ValidationError:o,opts:n}=e;r.$async?t.if((0,d._)`${c.default.errors} === 0`,()=>t.return(c.default.data),()=>t.throw((0,d._)`new ${o}(${c.default.vErrors})`)):(t.assign((0,d._)`${i}.errors`,c.default.vErrors),n.unevaluated&&function({gen:e,evaluated:t,props:r,items:i}){r instanceof d.Name&&e.assign((0,d._)`${t}.props`,r),i instanceof d.Name&&e.assign((0,d._)`${t}.items`,i)}(e),t.return((0,d._)`${c.default.errors} === 0`))}(e)})}(e):m(e,()=>(0,t.topBoolOrEmptySchema)(e))};var w=class{constructor(e,t,r){if((0,a.validateKeywordUsage)(e,t,r),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=r,this.data=e.data,this.schema=e.schema[r],this.$data=t.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,p.schemaRefOrVal)(e,this.schema,r,this.$data),this.schemaType=t.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=t,this.$data)this.schemaCode=e.gen.const("vSchema",q(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,a.validSchemaType)(this.schema,t.schemaType,t.allowUndefined))throw Error(`${r} value must be ${JSON.stringify(t.schemaType)}`);("code"in t?t.trackErrors:!1!==t.errors)&&(this.errsCount=e.gen.const("_errs",c.default.errors))}result(e,t,r){this.failResult((0,d.not)(e),t,r)}failResult(e,t,r){this.gen.if(e),r?r():this.error(),t?(this.gen.else(),t(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,t){this.failResult((0,d.not)(e),void 0,t)}fail(e){if(void 0===e){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);let{schemaCode:t}=this;this.fail((0,d._)`${t} !== undefined && (${(0,d.or)(this.invalid$data(),e)})`)}error(e,t,r){if(t){this.setParams(t),this._error(e,r),this.setParams({});return}this._error(e,r)}_error(e,t){(e?u.reportExtraError:u.reportError)(this,this.def.error,t)}$dataError(){(0,u.reportError)(this,this.def.$dataError||u.keyword$DataError)}reset(){if(void 0===this.errsCount)throw Error('add "trackErrors" to keyword definition');(0,u.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,t){t?Object.assign(this.params,e):this.params=e}block$data(e,t,r=d.nil){this.gen.block(()=>{this.check$data(e,r),t()})}check$data(e=d.nil,t=d.nil){if(!this.$data)return;let{gen:r,schemaCode:i,schemaType:o,def:n}=this;r.if((0,d.or)((0,d._)`${i} === undefined`,t)),e!==d.nil&&r.assign(e,!0),(o.length||n.validateSchema)&&(r.elseIf(this.invalid$data()),this.$dataError(),e!==d.nil&&r.assign(e,!1)),r.else()}invalid$data(){let{gen:e,schemaCode:t,schemaType:r,def:i,it:n}=this;return(0,d.or)(function(){if(r.length){if(!(t instanceof d.Name))throw Error("ajv implementation error");let e=Array.isArray(r)?r:[r];return(0,d._)`${(0,o.checkDataTypes)(e,t,n.opts.strictNumbers,o.DataType.Wrong)}`}return d.nil}(),function(){if(i.validateSchema){let r=e.scopeValue("validate$data",{ref:i.validateSchema});return(0,d._)`!${r}(${t})`}return d.nil}())}subschema(e,r){let i=(0,s.getSubschema)(this.it,e);(0,s.extendSubschemaData)(i,this.it,e),(0,s.extendSubschemaMode)(i,e);let o={...this.it,...i,items:void 0,props:void 0};return!function(e,r){if(y(e)&&(g(e),h(e)))return function(e,t){var r;let i,{schema:o,gen:n,opts:a}=e;a.$comment&&o.$comment&&v(e),(i=(r=e).schema[r.opts.schemaId])&&(r.baseId=(0,l.resolveUrl)(r.opts.uriResolver,r.baseId,i)),function(e){if(e.schema.$async&&!e.schemaEnv.$async)throw Error("async schema in sync schema")}(e);let s=n.const("_errs",c.default.errors);_(e,s),n.var(t,(0,d._)`${s} === ${c.default.errors}`)}(e,r);(0,t.boolOrEmptySchema)(e,r)}(o,r),o}mergeEvaluated(e,t){let{it:r,gen:i}=this;r.opts.unevaluated&&(!0!==r.props&&void 0!==e.props&&(r.props=p.mergeEvaluated.props(i,e.props,r.props,t)),!0!==r.items&&void 0!==e.items&&(r.items=p.mergeEvaluated.items(i,e.items,r.items,t)))}mergeValidEvaluated(e,t){let{it:r,gen:i}=this;if(r.opts.unevaluated&&(!0!==r.props||!0!==r.items))return i.if(t,()=>this.mergeEvaluated(e,d.Name)),!0}};function R(e,t,r,i){let o=new w(e,r,t);"code"in r?r.code(o,i):o.$data&&r.validate?(0,a.funcKeywordCode)(o,r):"macro"in r?(0,a.macroKeywordCode)(o,r):(r.compile||r.validate)&&(0,a.funcKeywordCode)(o,r)}e.KeywordCxt=w;let P=/^\/(?:[^~]|~0|~1)*$/,V=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function q(e,{dataLevel:t,dataNames:r,dataPathArr:i}){let o,n;if(""===e)return c.default.rootData;if("/"===e[0]){if(!P.test(e))throw Error(`Invalid JSON-pointer: ${e}`);o=e,n=c.default.rootData}else{let a=V.exec(e);if(!a)throw Error(`Invalid JSON-pointer: ${e}`);let d=+a[1];if("#"===(o=a[2])){if(d>=t)throw Error(s("property/index",d));return i[t-d]}if(d>t)throw Error(s("data",d));if(n=r[t-d],!o)return n}let a=n;for(let e of o.split("/"))e&&(n=(0,d._)`${n}${(0,d.getProperty)((0,p.unescapeJsonPointer)(e))}`,a=(0,d._)`${a} && ${n}`);return a;function s(e,r){return`Cannot access ${e} ${r} levels up, current level is ${t}`}}e.getData=q}),xR=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=class extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}}}),xP=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xk();e.default=class extends Error{constructor(e,r,i,o){super(o||`can't resolve reference ${i} from id ${r}`),this.missingRef=(0,t.resolveUrl)(e,r,i),this.missingSchema=(0,t.normalizeId)((0,t.getFullPath)(e,this.missingRef))}}}),xV=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.resolveSchema=e.getCompilingSchema=e.resolveRef=e.compileSchema=e.SchemaEnv=void 0;let t=xc(),r=xR(),i=xp(),o=xk(),n=xl(),a=xw();var s=class{constructor(e){var t;let r;this.refs={},this.dynamicAnchors={},"object"==typeof e.schema&&(r=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=null!=(t=e.baseId)?t:(0,o.normalizeId)(null==r?void 0:r[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=null==r?void 0:r.$async,this.refs={}}};function d(e){let n,s,d=l.call(this,e);if(d)return d;let c=(0,o.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:p,lines:u}=this.opts.code,{ownProperties:m}=this.opts,f=new t.CodeGen(this.scope,{es5:p,lines:u,ownProperties:m});e.$async&&(n=f.scopeValue("Error",{ref:r.default,code:(0,t._)`require("ajv/dist/runtime/validation_error").default`}));let h=f.scopeName("validate");e.validateName=h;let y={gen:f,allErrors:this.opts.allErrors,data:i.default.data,parentData:i.default.parentData,parentDataProperty:i.default.parentDataProperty,dataNames:[i.default.data],dataPathArr:[t.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:f.scopeValue("schema",!0===this.opts.code.source?{ref:e.schema,code:(0,t.stringify)(e.schema)}:{ref:e.schema}),validateName:h,ValidationError:n,schema:e.schema,schemaEnv:e,rootId:c,baseId:e.baseId||c,schemaPath:t.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,t._)`""`,opts:this.opts,self:this};try{this._compilations.add(e),(0,a.validateFunctionCode)(y),f.optimize(this.opts.code.optimize);let r=f.toString();s=`${f.scopeRefs(i.default.scope)}return ${r}`,this.opts.code.process&&(s=this.opts.code.process(s,e));let o=Function(`${i.default.self}`,`${i.default.scope}`,s)(this,this.scope.get());if(this.scope.value(h,{ref:o}),o.errors=null,o.schema=e.schema,o.schemaEnv=e,e.$async&&(o.$async=!0),!0===this.opts.code.source&&(o.source={validateName:h,validateCode:r,scopeValues:f._values}),this.opts.unevaluated){let{props:e,items:r}=y;o.evaluated={props:e instanceof t.Name?void 0:e,items:r instanceof t.Name?void 0:r,dynamicProps:e instanceof t.Name,dynamicItems:r instanceof t.Name},o.source&&(o.source.evaluated=(0,t.stringify)(o.evaluated))}return e.validate=o,e}catch(t){throw delete e.validate,delete e.validateName,s&&this.logger.error("Error compiling schema, function code:",s),t}finally{this._compilations.delete(e)}}function c(e){return(0,o.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:d.call(this,e)}function l(e){for(let i of this._compilations){var t,r;if(t=i,r=e,t.schema===r.schema&&t.root===r.root&&t.baseId===r.baseId)return i}}function p(e,t){let r;for(;"string"==typeof(r=this.refs[t]);)t=r;return r||this.schemas[t]||u.call(this,e,t)}function u(e,t){let r=this.opts.uriResolver.parse(t),i=(0,o._getFullPath)(this.opts.uriResolver,r),n=(0,o.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&i===n)return f.call(this,r,e);let a=(0,o.normalizeId)(i),c=this.refs[a]||this.schemas[a];if("string"==typeof c){let t=u.call(this,e,c);if("object"!=typeof(null==t?void 0:t.schema))return;return f.call(this,r,t)}if("object"==typeof(null==c?void 0:c.schema)){if(c.validate||d.call(this,c),a===(0,o.normalizeId)(t)){let{schema:t}=c,{schemaId:r}=this.opts,i=t[r];return i&&(n=(0,o.resolveUrl)(this.opts.uriResolver,n,i)),new s({schema:t,schemaId:r,root:e,baseId:n})}return f.call(this,r,c)}}e.SchemaEnv=s,e.compileSchema=d,e.resolveRef=function(e,t,r){var i;r=(0,o.resolveUrl)(this.opts.uriResolver,t,r);let n=e.refs[r];if(n)return n;let a=p.call(this,e,r);if(void 0===a){let o=null==(i=e.localRefs)?void 0:i[r],{schemaId:n}=this.opts;o&&(a=new s({schema:o,schemaId:n,root:e,baseId:t}))}if(void 0!==a)return e.refs[r]=c.call(this,a)},e.getCompilingSchema=l,e.resolveSchema=u;let m=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function f(e,{baseId:t,schema:r,root:i}){var a;let d;if((null==(a=e.fragment)?void 0:a[0])!=="/")return;for(let i of e.fragment.slice(1).split("/")){if("boolean"==typeof r)return;let e=r[(0,n.unescapeFragment)(i)];if(void 0===e)return;let a="object"==typeof(r=e)&&r[this.opts.schemaId];!m.has(i)&&a&&(t=(0,o.resolveUrl)(this.opts.uriResolver,t,a))}if("boolean"!=typeof r&&r.$ref&&!(0,n.schemaHasRulesButRef)(r,this.RULES)){let e=(0,o.resolveUrl)(this.opts.uriResolver,t,r.$ref);d=u.call(this,i,e)}let{schemaId:c}=this.opts;if((d=d||new s({schema:r,schemaId:c,root:i,baseId:t})).schema!==d.root.schema)return d}}),xq=SP((e,t)=>{t.exports={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}}),xI=SP((e,t)=>{let r=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),i=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);function o(e){let t="",r=0,i=0;for(i=0;i=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";t+=e[i];break}for(i+=1;i=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";t+=e[i]}return t}function n(e){return e.length=0,!0}function a(e,t,r){if(e.length){let i=o(e);if(""===i)return r.error=!0,!1;t.push(i),e.length=0}return!0}function s(e){if(2>function(e){let t=0;for(let r=0;r7){r.error=!0;break}o>0&&":"===e[o-1]&&(d=!0),i.push(":");continue}else if("%"===a){if(!l(s,i,r))break;l=n}else{s.push(a);continue}}return s.length&&(l===n?r.zone=s.join(""):c?i.push(s.join("")):i.push(o(s))),r.address=i.join(""),r}(e);if(t.error)return{host:e,isIPV6:!1};{let e=t.address,r=t.address;return t.zone&&(e+="%"+t.zone,r+="%25"+t.zone),{host:e,isIPV6:!0,escapedHost:r}}}t.exports={nonSimpleDomain:RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u),recomposeAuthority:function(e){let t=[];if(void 0!==e.userinfo&&(t.push(e.userinfo),t.push("@")),void 0!==e.host){let r=unescape(e.host);if(!i(r)){let t=s(r);r=!0===t.isIPV6?`[${t.escapedHost}]`:e.host}t.push(r)}return("number"==typeof e.port||"string"==typeof e.port)&&(t.push(":"),t.push(String(e.port))),t.length?t.join(""):void 0},normalizeComponentEncoding:function(e,t){let r=!0!==t?escape:unescape;return void 0!==e.scheme&&(e.scheme=r(e.scheme)),void 0!==e.userinfo&&(e.userinfo=r(e.userinfo)),void 0!==e.host&&(e.host=r(e.host)),void 0!==e.path&&(e.path=r(e.path)),void 0!==e.query&&(e.query=r(e.query)),void 0!==e.fragment&&(e.fragment=r(e.fragment)),e},removeDotSegments:function(e){let t=e,r=[],i=-1,o=0;for(;o=t.length;){if(1===o)if("."===t)break;else if("/"===t){r.push("/");break}else{r.push(t);break}if(2===o){if("."===t[0]){if("."===t[1])break;else if("/"===t[1]){t=t.slice(2);continue}}else if("/"===t[0]&&("."===t[1]||"/"===t[1])){r.push("/");break}}else if(3===o&&"/.."===t){0!==r.length&&r.pop(),r.push("/");break}if("."===t[0]){if("."===t[1]){if("/"===t[2]){t=t.slice(3);continue}}else if("/"===t[1]){t=t.slice(2);continue}}else if("/"===t[0]&&"."===t[1]){if("/"===t[2]){t=t.slice(2);continue}else if("."===t[2]&&"/"===t[3]){t=t.slice(3),0!==r.length&&r.pop();continue}}if(-1===(i=t.indexOf("/",1))){r.push(t);break}r.push(t.slice(0,i)),t=t.slice(i)}return r.join("")},isIPv4:i,isUUID:r,normalizeIPv6:s,stringArrayToHexStripped:o}}),xx=SP((e,t)=>{let{isUUID:r}=xI(),i=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,o=["http","https","ws","wss","urn","urn:uuid"];function n(e){return!0===e.secure||!1!==e.secure&&!!e.scheme&&3===e.scheme.length&&("w"===e.scheme[0]||"W"===e.scheme[0])&&("s"===e.scheme[1]||"S"===e.scheme[1])&&("s"===e.scheme[2]||"S"===e.scheme[2])}function a(e){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e}function s(e){let t="https"===String(e.scheme).toLowerCase();return(e.port===(t?443:80)||""===e.port)&&(e.port=void 0),e.path||(e.path="/"),e}let d={scheme:"http",domainHost:!0,parse:a,serialize:s},c={scheme:"https",domainHost:d.domainHost,parse:a,serialize:s},l={scheme:"ws",domainHost:!0,parse:function(e){return e.secure=n(e),e.resourceName=(e.path||"/")+(e.query?"?"+e.query:""),e.path=void 0,e.query=void 0,e},serialize:function(e){if((e.port===(n(e)?443:80)||""===e.port)&&(e.port=void 0),"boolean"==typeof e.secure&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){let[t,r]=e.resourceName.split("?");e.path=t&&"/"!==t?t:void 0,e.query=r,e.resourceName=void 0}return e.fragment=void 0,e}},p={scheme:"wss",domainHost:l.domainHost,parse:l.parse,serialize:l.serialize},u={http:d,https:c,ws:l,wss:p,urn:{scheme:"urn",parse:function(e,t){if(!e.path)return e.error="URN can not be parsed",e;let r=e.path.match(i);if(r){let i=t.scheme||e.scheme||"urn";e.nid=r[1].toLowerCase(),e.nss=r[2];let o=m(`${i}:${t.nid||e.nid}`);e.path=void 0,o&&(e=o.parse(e,t))}else e.error=e.error||"URN can not be parsed.";return e},serialize:function(e,t){if(void 0===e.nid)throw Error("URN without nid cannot be serialized");let r=t.scheme||e.scheme||"urn",i=e.nid.toLowerCase(),o=m(`${r}:${t.nid||i}`);o&&(e=o.serialize(e,t));let n=e,a=e.nss;return n.path=`${i||t.nid}:${a}`,t.skipEscape=!0,n},skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:function(e,t){return e.uuid=e.nss,e.nss=void 0,t.tolerant||e.uuid&&r(e.uuid)||(e.error=e.error||"UUID is not valid."),e},serialize:function(e){return e.nss=(e.uuid||"").toLowerCase(),e},skipNormalize:!0}};function m(e){return e&&(u[e]||u[e.toLowerCase()])||void 0}Object.setPrototypeOf(u,null),t.exports={wsIsSecure:n,SCHEMES:u,isValidSchemeName:function(e){return -1!==o.indexOf(e)},getSchemeHandler:m}}),xj=SP((e,t)=>{let{normalizeIPv6:r,removeDotSegments:i,recomposeAuthority:o,normalizeComponentEncoding:n,isIPv4:a,nonSimpleDomain:s}=xI(),{SCHEMES:d,getSchemeHandler:c}=xx();function l(e,t,r,o){let n={};return o||(e=m(p(e,r),r),t=m(p(t,r),r)),!(r=r||{}).tolerant&&t.scheme?(n.scheme=t.scheme,n.userinfo=t.userinfo,n.host=t.host,n.port=t.port,n.path=i(t.path||""),n.query=t.query):(void 0!==t.userinfo||void 0!==t.host||void 0!==t.port?(n.userinfo=t.userinfo,n.host=t.host,n.port=t.port,n.path=i(t.path||""),n.query=t.query):(t.path?("/"===t.path[0]?n.path=i(t.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?n.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:n.path=t.path:n.path="/"+t.path,n.path=i(n.path)),n.query=t.query):(n.path=e.path,void 0!==t.query?n.query=t.query:n.query=e.query),n.userinfo=e.userinfo,n.host=e.host,n.port=e.port),n.scheme=e.scheme),n.fragment=t.fragment,n}function p(e,t){let r={host:e.host,scheme:e.scheme,userinfo:e.userinfo,port:e.port,path:e.path,query:e.query,nid:e.nid,nss:e.nss,uuid:e.uuid,fragment:e.fragment,reference:e.reference,resourceName:e.resourceName,secure:e.secure,error:""},n=Object.assign({},t),a=[],s=c(n.scheme||r.scheme);s&&s.serialize&&s.serialize(r,n),void 0!==r.path&&(n.skipEscape?r.path=unescape(r.path):(r.path=escape(r.path),void 0!==r.scheme&&(r.path=r.path.split("%3A").join(":")))),"suffix"!==n.reference&&r.scheme&&a.push(r.scheme,":");let d=o(r);if(void 0!==d&&("suffix"!==n.reference&&a.push("//"),a.push(d),r.path&&"/"!==r.path[0]&&a.push("/")),void 0!==r.path){let e=r.path;n.absolutePath||s&&s.absolutePath||(e=i(e)),void 0===d&&"/"===e[0]&&"/"===e[1]&&(e="/%2F"+e.slice(2)),a.push(e)}return void 0!==r.query&&a.push("?",r.query),void 0!==r.fragment&&a.push("#",r.fragment),a.join("")}let u=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function m(e,t){let i=Object.assign({},t),o={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},n=!1;"suffix"===i.reference&&(e=i.scheme?i.scheme+":"+e:"//"+e);let d=e.match(u);if(d){if(o.scheme=d[1],o.userinfo=d[3],o.host=d[4],o.port=parseInt(d[5],10),o.path=d[6]||"",o.query=d[7],o.fragment=d[8],isNaN(o.port)&&(o.port=d[5]),o.host)if(!1===a(o.host)){let e=r(o.host);o.host=e.host.toLowerCase(),n=e.isIPV6}else n=!0;void 0!==o.scheme||void 0!==o.userinfo||void 0!==o.host||void 0!==o.port||void 0!==o.query||o.path?void 0===o.scheme?o.reference="relative":void 0===o.fragment?o.reference="absolute":o.reference="uri":o.reference="same-document",i.reference&&"suffix"!==i.reference&&i.reference!==o.reference&&(o.error=o.error||"URI is not a "+i.reference+" reference.");let t=c(i.scheme||o.scheme);if(!i.unicodeSupport&&(!t||!t.unicodeSupport)&&o.host&&(i.domainHost||t&&t.domainHost)&&!1===n&&s(o.host))try{o.host=URL.domainToASCII(o.host.toLowerCase())}catch(e){o.error=o.error||"Host's domain name can not be converted to ASCII: "+e}(!t||t&&!t.skipNormalize)&&(-1!==e.indexOf("%")&&(void 0!==o.scheme&&(o.scheme=unescape(o.scheme)),void 0!==o.host&&(o.host=unescape(o.host))),o.path&&(o.path=escape(unescape(o.path))),o.fragment&&(o.fragment=encodeURI(decodeURIComponent(o.fragment)))),t&&t.parse&&t.parse(o,i)}else o.error=o.error||"URI can not be parsed.";return o}let f={SCHEMES:d,normalize:function(e,t){return"string"==typeof e?e=p(m(e,t),t):"object"==typeof e&&(e=m(p(e,t),t)),e},resolve:function(e,t,r){let i=r?Object.assign({scheme:"null"},r):{scheme:"null"},o=l(m(e,i),m(t,i),i,!0);return i.skipEscape=!0,p(o,i)},resolveComponent:l,equal:function(e,t,r){return"string"==typeof e?e=p(n(m(e=unescape(e),r),!0),{...r,skipEscape:!0}):"object"==typeof e&&(e=p(n(e,!0),{...r,skipEscape:!0})),"string"==typeof t?t=p(n(m(t=unescape(t),r),!0),{...r,skipEscape:!0}):"object"==typeof t&&(t=p(n(t,!0),{...r,skipEscape:!0})),e.toLowerCase()===t.toLowerCase()},serialize:p,parse:m};t.exports=f,t.exports.default=f,t.exports.fastUri=f}),xC=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xj();t.code='require("ajv/dist/runtime/uri").default',e.default=t}),xT=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var t=xw();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var r=xc();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return r.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return r.CodeGen}});let i=xR(),o=xP(),n=xf(),a=xV(),s=xc(),d=xk(),c=xy(),l=xl(),p=xq(),u=xC(),m=(e,t)=>new RegExp(e,t);m.code="new RegExp";let f=["removeAdditional","useDefaults","coerceTypes"],h=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),y={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},g={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'};var _=class{constructor(e={}){var t,r,i,o,a,d,c,l,p,f,_,b,P,V,q,I,x,j,C,T,O,E,A,M,W,N;let z,D,F,L,U;this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...(z=(t=e).strict,F=!0===(D=null==(r=t.code)?void 0:r.optimize)||void 0===D?1:D||0,L=null!=(o=null==(i=t.code)?void 0:i.regExp)?o:m,U=null!=(a=t.uriResolver)?a:u.default,{strictSchema:null==(c=null!=(d=t.strictSchema)?d:z)||c,strictNumbers:null==(p=null!=(l=t.strictNumbers)?l:z)||p,strictTypes:null!=(_=null!=(f=t.strictTypes)?f:z)?_:"log",strictTuples:null!=(P=null!=(b=t.strictTuples)?b:z)?P:"log",strictRequired:null!=(q=null!=(V=t.strictRequired)?V:z)&&q,code:t.code?{...t.code,optimize:F,regExp:L}:{optimize:F,regExp:L},loopRequired:null!=(I=t.loopRequired)?I:200,loopEnum:null!=(x=t.loopEnum)?x:200,meta:null==(j=t.meta)||j,messages:null==(C=t.messages)||C,inlineRefs:null==(T=t.inlineRefs)||T,schemaId:null!=(O=t.schemaId)?O:"$id",addUsedSchema:null==(E=t.addUsedSchema)||E,validateSchema:null==(A=t.validateSchema)||A,validateFormats:null==(M=t.validateFormats)||M,unicodeRegExp:null==(W=t.unicodeRegExp)||W,int32range:null==(N=t.int32range)||N,uriResolver:U})};let{es5:H,lines:G}=this.opts.code;this.scope=new s.ValueScope({scope:{},prefixes:h,es5:H,lines:G}),this.logger=function(e){if(!1===e)return R;if(void 0===e)return console;if(e.log&&e.warn&&e.error)return e;throw Error("logger must implement log, warn and error methods")}(e.logger);let B=e.validateFormats;e.validateFormats=!1,this.RULES=(0,n.getRules)(),v.call(this,y,e,"NOT SUPPORTED"),v.call(this,g,e,"DEPRECATED","warn"),this._metaOpts=w.call(this),e.formats&&S.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&k.call(this,e.keywords),"object"==typeof e.meta&&this.addMetaSchema(e.meta),$.call(this),e.validateFormats=B}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:e,meta:t,schemaId:r}=this.opts,i=p;"id"===r&&((i={...p}).id=i.$id,delete i.$id),t&&e&&this.addMetaSchema(i,i[r],!1)}defaultMeta(){let{meta:e,schemaId:t}=this.opts;return this.opts.defaultMeta="object"==typeof e?e[t]||e:void 0}validate(e,t){let r;if("string"==typeof e){if(!(r=this.getSchema(e)))throw Error(`no schema with key or ref "${e}"`)}else r=this.compile(e);let i=r(t);return"$async"in r||(this.errors=r.errors),i}compile(e,t){let r=this._addSchema(e,t);return r.validate||this._compileSchemaEnv(r)}compileAsync(e,t){if("function"!=typeof this.opts.loadSchema)throw Error("options.loadSchema should be a function");let{loadSchema:r}=this.opts;return i.call(this,e,t);async function i(e,t){await n.call(this,e.$schema);let r=this._addSchema(e,t);return r.validate||a.call(this,r)}async function n(e){e&&!this.getSchema(e)&&await i.call(this,{$ref:e},!0)}async function a(e){try{return this._compileSchemaEnv(e)}catch(t){if(!(t instanceof o.default))throw t;return s.call(this,t),await d.call(this,t.missingSchema),a.call(this,e)}}function s({missingSchema:e,missingRef:t}){if(this.refs[e])throw Error(`AnySchema ${e} is loaded but ${t} cannot be resolved`)}async function d(e){let r=await c.call(this,e);this.refs[e]||await n.call(this,r.$schema),this.refs[e]||this.addSchema(r,e,t)}async function c(e){let t=this._loading[e];if(t)return t;try{return await (this._loading[e]=r(e))}finally{delete this._loading[e]}}}addSchema(e,t,r,i=this.opts.validateSchema){let o;if(Array.isArray(e)){for(let t of e)this.addSchema(t,void 0,r,i);return this}if("object"==typeof e){let{schemaId:t}=this.opts;if(void 0!==(o=e[t])&&"string"!=typeof o)throw Error(`schema ${t} must be string`)}return t=(0,d.normalizeId)(t||o),this._checkUnique(t),this.schemas[t]=this._addSchema(e,r,t,i,!0),this}addMetaSchema(e,t,r=this.opts.validateSchema){return this.addSchema(e,t,!0,r),this}validateSchema(e,t){let r;if("boolean"==typeof e)return!0;if(void 0!==(r=e.$schema)&&"string"!=typeof r)throw Error("$schema must be a string");if(!(r=r||this.opts.defaultMeta||this.defaultMeta()))return this.logger.warn("meta-schema not available"),this.errors=null,!0;let i=this.validate(r,e);if(!i&&t){let e="schema is invalid: "+this.errorsText();if("log"===this.opts.validateSchema)this.logger.error(e);else throw Error(e)}return i}getSchema(e){let t;for(;"string"==typeof(t=b.call(this,e));)e=t;if(void 0===t){let{schemaId:r}=this.opts,i=new a.SchemaEnv({schema:{},schemaId:r});if(!(t=a.resolveSchema.call(this,i,e)))return;this.refs[e]=t}return t.validate||this._compileSchemaEnv(t)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let t=b.call(this,e);return"object"==typeof t&&this._cache.delete(t.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{this._cache.delete(e);let t=e[this.opts.schemaId];return t&&(t=(0,d.normalizeId)(t),delete this.schemas[t],delete this.refs[t]),this}default:throw Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(let t of e)this.addKeyword(t);return this}addKeyword(e,t){let r;if("string"==typeof e)r=e,"object"==typeof t&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),t.keyword=r);else if("object"==typeof e&&void 0===t){if(Array.isArray(r=(t=e).keyword)&&!r.length)throw Error("addKeywords: keyword must be string or non-empty array")}else throw Error("invalid addKeywords parameters");if(V.call(this,r,t),!t)return(0,l.eachItem)(r,e=>q.call(this,e)),this;x.call(this,t);let i={...t,type:(0,c.getJSONTypes)(t.type),schemaType:(0,c.getJSONTypes)(t.schemaType)};return(0,l.eachItem)(r,0===i.type.length?e=>q.call(this,e,i):e=>i.type.forEach(t=>q.call(this,e,i,t))),this}getKeyword(e){let t=this.RULES.all[e];return"object"==typeof t?t.definition:!!t}removeKeyword(e){let{RULES:t}=this;for(let r of(delete t.keywords[e],delete t.all[e],t.rules)){let t=r.rules.findIndex(t=>t.keyword===e);t>=0&&r.rules.splice(t,1)}return this}addFormat(e,t){return"string"==typeof t&&(t=new RegExp(t)),this.formats[e]=t,this}errorsText(e=this.errors,{separator:t=", ",dataVar:r="data"}={}){return e&&0!==e.length?e.map(e=>`${r}${e.instancePath} ${e.message}`).reduce((e,r)=>e+t+r):"No errors"}$dataMetaSchema(e,t){let r=this.RULES.all;for(let i of(e=JSON.parse(JSON.stringify(e)),t)){let t=i.split("/").slice(1),o=e;for(let e of t)o=o[e];for(let e in r){let t=r[e];if("object"!=typeof t)continue;let{$data:i}=t.definition,n=o[e];i&&n&&(o[e]=C(n))}}return e}_removeAllSchemas(e,t){for(let r in e){let i=e[r];(!t||t.test(r))&&("string"==typeof i?delete e[r]:i&&!i.meta&&(this._cache.delete(i.schema),delete e[r]))}}_addSchema(e,t,r,i=this.opts.validateSchema,o=this.opts.addUsedSchema){let n,{schemaId:s}=this.opts;if("object"==typeof e)n=e[s];else if(this.opts.jtd)throw Error("schema must be object");else if("boolean"!=typeof e)throw Error("schema must be object or boolean");let c=this._cache.get(e);if(void 0!==c)return c;r=(0,d.normalizeId)(n||r);let l=d.getSchemaRefs.call(this,e,r);return c=new a.SchemaEnv({schema:e,schemaId:s,meta:t,baseId:r,localRefs:l}),this._cache.set(c.schema,c),o&&!r.startsWith("#")&&(r&&this._checkUnique(r),this.refs[r]=c),i&&this.validateSchema(e,!0),c}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):a.compileSchema.call(this,e),!e.validate)throw Error("ajv implementation error");return e.validate}_compileMetaSchema(e){let t=this.opts;this.opts=this._metaOpts;try{a.compileSchema.call(this,e)}finally{this.opts=t}}};function v(e,t,r,i="error"){for(let o in e)o in t&&this.logger[i](`${r}: option ${o}. ${e[o]}`)}function b(e){return e=(0,d.normalizeId)(e),this.schemas[e]||this.refs[e]}function $(){let e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(let t in e)this.addSchema(e[t],t)}function S(){for(let e in this.opts.formats){let t=this.opts.formats[e];t&&this.addFormat(e,t)}}function k(e){if(Array.isArray(e))return void this.addVocabulary(e);for(let t in this.logger.warn("keywords option as map is deprecated, pass array"),e){let r=e[t];r.keyword||(r.keyword=t),this.addKeyword(r)}}function w(){let e={...this.opts};for(let t of f)delete e[t];return e}_.ValidationError=i.default,_.MissingRefError=o.default,e.default=_;let R={log(){},warn(){},error(){}},P=/^[a-z_$][a-z0-9_$:-]*$/i;function V(e,t){let{RULES:r}=this;if((0,l.eachItem)(e,e=>{if(r.keywords[e])throw Error(`Keyword ${e} is already defined`);if(!P.test(e))throw Error(`Keyword ${e} has invalid name`)}),t&&t.$data&&!("code"in t||"validate"in t))throw Error('$data keyword must have "code" or "validate" function')}function q(e,t,r){var i;let o=null==t?void 0:t.post;if(r&&o)throw Error('keyword with "post" flag cannot have "type"');let{RULES:n}=this,a=o?n.post:n.rules.find(({type:e})=>e===r);if(a||(a={type:r,rules:[]},n.rules.push(a)),n.keywords[e]=!0,!t)return;let s={keyword:e,definition:{...t,type:(0,c.getJSONTypes)(t.type),schemaType:(0,c.getJSONTypes)(t.schemaType)}};t.before?I.call(this,a,s,t.before):a.rules.push(s),n.all[e]=s,null==(i=t.implements)||i.forEach(e=>this.addKeyword(e))}function I(e,t,r){let i=e.rules.findIndex(e=>e.keyword===r);i>=0?e.rules.splice(i,0,t):(e.rules.push(t),this.logger.warn(`rule ${r} is not defined`))}function x(e){let{metaSchema:t}=e;void 0!==t&&(e.$data&&this.opts.$data&&(t=C(t)),e.validateSchema=this.compile(t,!0))}let j={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function C(e){return{anyOf:[e,j]}}}),xO=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={keyword:"id",code(){throw Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}}}),xE=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.callRef=e.getValidate=void 0;let t=xP(),r=x_(),i=xc(),o=xp(),n=xV(),a=xl();function s(e,t){let{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):(0,i._)`${r.scopeValue("wrapper",{ref:t})}.validate`}function d(e,t,n,s){let{gen:d,it:c}=e,{allErrors:l,schemaEnv:p,opts:u}=c,m=u.passContext?o.default.this:i.nil;function f(e){let t=(0,i._)`${e}.errors`;d.assign(o.default.vErrors,(0,i._)`${o.default.vErrors} === null ? ${t} : ${o.default.vErrors}.concat(${t})`),d.assign(o.default.errors,(0,i._)`${o.default.vErrors}.length`)}function h(e){var t;if(!c.opts.unevaluated)return;let r=null==(t=null==n?void 0:n.validate)?void 0:t.evaluated;if(!0!==c.props)if(r&&!r.dynamicProps)void 0!==r.props&&(c.props=a.mergeEvaluated.props(d,r.props,c.props));else{let t=d.var("props",(0,i._)`${e}.evaluated.props`);c.props=a.mergeEvaluated.props(d,t,c.props,i.Name)}if(!0!==c.items)if(r&&!r.dynamicItems)void 0!==r.items&&(c.items=a.mergeEvaluated.items(d,r.items,c.items));else{let t=d.var("items",(0,i._)`${e}.evaluated.items`);c.items=a.mergeEvaluated.items(d,t,c.items,i.Name)}}s?function(){if(!p.$async)throw Error("async schema referenced by sync schema");let o=d.let("valid");d.try(()=>{d.code((0,i._)`await ${(0,r.callValidateCode)(e,t,m)}`),h(t),l||d.assign(o,!0)},e=>{d.if((0,i._)`!(${e} instanceof ${c.ValidationError})`,()=>d.throw(e)),f(e),l||d.assign(o,!1)}),e.ok(o)}():e.result((0,r.callValidateCode)(e,t,m),()=>h(t),()=>f(t))}e.getValidate=s,e.callRef=d,e.default={keyword:"$ref",schemaType:"string",code(e){var r,o;let a,c,l,{gen:p,schema:u,it:m}=e,{baseId:f,schemaEnv:h,validateName:y,opts:g,self:_}=m,{root:v}=h;if(("#"===u||"#/"===u)&&f===v.baseId){if(h===v)return d(e,y,h,h.$async);let t=p.scopeValue("root",{ref:v});return d(e,(0,i._)`${t}.validate`,v,v.$async)}let b=n.resolveRef.call(_,v,f,u);if(void 0===b)throw new t.default(m.opts.uriResolver,f,u);return b instanceof n.SchemaEnv?void d(e,s(e,r=b),r,r.$async):(o=b,a=p.scopeValue("schema",!0===g.code.source?{ref:o,code:(0,i.stringify)(o)}:{ref:o}),c=p.name("valid"),l=e.subschema({schema:o,dataTypes:[],schemaPath:i.nil,topSchemaRef:a,errSchemaPath:u},c),void(e.mergeEvaluated(l),e.ok(c)))}}}),xA=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xO(),r=xE();e.default=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",t.default,r.default]}),xM=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xc(),r=t.operators,i={maximum:{okStr:"<=",ok:r.LTE,fail:r.GT},minimum:{okStr:">=",ok:r.GTE,fail:r.LT},exclusiveMaximum:{okStr:"<",ok:r.LT,fail:r.GTE},exclusiveMinimum:{okStr:">",ok:r.GT,fail:r.LTE}};e.default={keyword:Object.keys(i),type:"number",schemaType:"number",$data:!0,error:{message:({keyword:e,schemaCode:r})=>(0,t.str)`must be ${i[e].okStr} ${r}`,params:({keyword:e,schemaCode:r})=>(0,t._)`{comparison: ${i[e].okStr}, limit: ${r}}`},code(e){let{keyword:r,data:o,schemaCode:n}=e;e.fail$data((0,t._)`${o} ${i[r].fail} ${n} || isNaN(${o})`)}}}),xW=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xc();e.default={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:e})=>(0,t.str)`must be multiple of ${e}`,params:({schemaCode:e})=>(0,t._)`{multipleOf: ${e}}`},code(e){let{gen:r,data:i,schemaCode:o,it:n}=e,a=n.opts.multipleOfPrecision,s=r.let("res"),d=a?(0,t._)`Math.abs(Math.round(${s}) - ${s}) > 1e-${a}`:(0,t._)`${s} !== parseInt(${s})`;e.fail$data((0,t._)`(${o} === 0 || (${s} = ${i}/${o}, ${d}))`)}}}),xN=SP(e=>{function t(e){let t,r=e.length,i=0,o=0;for(;o=55296&&t<=56319&&o{Object.defineProperty(e,"__esModule",{value:!0});let t=xc(),r=xl(),i=xN();e.default={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message:({keyword:e,schemaCode:r})=>(0,t.str)`must NOT have ${"maxLength"===e?"more":"fewer"} than ${r} characters`,params:({schemaCode:e})=>(0,t._)`{limit: ${e}}`},code(e){let{keyword:o,data:n,schemaCode:a,it:s}=e,d="maxLength"===o?t.operators.GT:t.operators.LT,c=!1===s.opts.unicode?(0,t._)`${n}.length`:(0,t._)`${(0,r.useFunc)(e.gen,i.default)}(${n})`;e.fail$data((0,t._)`${c} ${d} ${a}`)}}}),xD=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=x_(),r=xl(),i=xc();e.default={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>(0,i.str)`must match pattern "${e}"`,params:({schemaCode:e})=>(0,i._)`{pattern: ${e}}`},code(e){let{gen:o,data:n,$data:a,schema:s,schemaCode:d,it:c}=e,l=c.opts.unicodeRegExp?"u":"";if(a){let{regExp:t}=c.opts.code,a="new RegExp"===t.code?(0,i._)`new RegExp`:(0,r.useFunc)(o,t),s=o.let("valid");o.try(()=>o.assign(s,(0,i._)`${a}(${d}, ${l}).test(${n})`),()=>o.assign(s,!1)),e.fail$data((0,i._)`!${s}`)}else{let r=(0,t.usePattern)(e,s);e.fail$data((0,i._)`!${r}.test(${n})`)}}}}),xF=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xc();e.default={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message:({keyword:e,schemaCode:r})=>(0,t.str)`must NOT have ${"maxProperties"===e?"more":"fewer"} than ${r} properties`,params:({schemaCode:e})=>(0,t._)`{limit: ${e}}`},code(e){let{keyword:r,data:i,schemaCode:o}=e,n="maxProperties"===r?t.operators.GT:t.operators.LT;e.fail$data((0,t._)`Object.keys(${i}).length ${n} ${o}`)}}}),xL=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=x_(),r=xc(),i=xl();e.default={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:e}})=>(0,r.str)`must have required property '${e}'`,params:({params:{missingProperty:e}})=>(0,r._)`{missingProperty: ${e}}`},code(e){let{gen:o,schema:n,schemaCode:a,data:s,$data:d,it:c}=e,{opts:l}=c;if(!d&&0===n.length)return;let p=n.length>=l.loopRequired;if(c.allErrors?function(){if(p||d)e.block$data(r.nil,u);else for(let r of n)(0,t.checkReportMissingProp)(e,r)}():function(){let i=o.let("missing");if(p||d){let n=o.let("valid",!0);e.block$data(n,()=>{var d,c;return d=i,c=n,void(e.setParams({missingProperty:d}),o.forOf(d,a,()=>{o.assign(c,(0,t.propertyInData)(o,s,d,l.ownProperties)),o.if((0,r.not)(c),()=>{e.error(),o.break()})},r.nil))}),e.ok(n)}else o.if((0,t.checkMissingProp)(e,n,i)),(0,t.reportMissingProp)(e,i),o.else()}(),l.strictRequired){let t=e.parentSchema.properties,{definedProperties:r}=e.it;for(let e of n)if((null==t?void 0:t[e])===void 0&&!r.has(e)){let t=`required property "${e}" is not defined at "${c.schemaEnv.baseId+c.errSchemaPath}" (strictRequired)`;(0,i.checkStrictMode)(c,t,c.opts.strictRequired)}}function u(){o.forOf("prop",a,r=>{e.setParams({missingProperty:r}),o.if((0,t.noPropertyInData)(o,s,r,l.ownProperties),()=>e.error())})}}}}),xU=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xc();e.default={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message:({keyword:e,schemaCode:r})=>(0,t.str)`must NOT have ${"maxItems"===e?"more":"fewer"} than ${r} items`,params:({schemaCode:e})=>(0,t._)`{limit: ${e}}`},code(e){let{keyword:r,data:i,schemaCode:o}=e,n="maxItems"===r?t.operators.GT:t.operators.LT;e.fail$data((0,t._)`${i}.length ${n} ${o}`)}}}),xH=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=x$();t.code='require("ajv/dist/runtime/equal").default',e.default=t}),xG=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xy(),r=xc(),i=xl(),o=xH();e.default={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:e,j:t}})=>(0,r.str)`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>(0,r._)`{i: ${e}, j: ${t}}`},code(e){let{gen:n,data:a,$data:s,schema:d,parentSchema:c,schemaCode:l,it:p}=e;if(!s&&!d)return;let u=n.let("valid"),m=c.items?(0,t.getSchemaTypes)(c.items):[];e.block$data(u,function(){let s=n.let("i",(0,r._)`${a}.length`),d=n.let("j");e.setParams({i:s,j:d}),n.assign(u,!0),n.if((0,r._)`${s} > 1`,()=>(m.length>0&&!m.some(e=>"object"===e||"array"===e)?function(i,o){let s=n.name("item"),d=(0,t.checkDataTypes)(m,s,p.opts.strictNumbers,t.DataType.Wrong),c=n.const("indices",(0,r._)`{}`);n.for((0,r._)`;${i}--;`,()=>{n.let(s,(0,r._)`${a}[${i}]`),n.if(d,(0,r._)`continue`),m.length>1&&n.if((0,r._)`typeof ${s} == "string"`,(0,r._)`${s} += "_"`),n.if((0,r._)`typeof ${c}[${s}] == "number"`,()=>{n.assign(o,(0,r._)`${c}[${s}]`),e.error(),n.assign(u,!1).break()}).code((0,r._)`${c}[${s}] = ${i}`)})}:function(t,s){let d=(0,i.useFunc)(n,o.default),c=n.name("outer");n.label(c).for((0,r._)`;${t}--;`,()=>n.for((0,r._)`${s} = ${t}; ${s}--;`,()=>n.if((0,r._)`${d}(${a}[${t}], ${a}[${s}])`,()=>{e.error(),n.assign(u,!1).break(c)})))})(s,d))},(0,r._)`${l} === false`),e.ok(u)}}}),xB=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xc(),r=xl(),i=xH();e.default={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:e})=>(0,t._)`{allowedValue: ${e}}`},code(e){let{gen:o,data:n,$data:a,schemaCode:s,schema:d}=e;a||d&&"object"==typeof d?e.fail$data((0,t._)`!${(0,r.useFunc)(o,i.default)}(${n}, ${s})`):e.fail((0,t._)`${d} !== ${n}`)}}}),xK=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xc(),r=xl(),i=xH();e.default={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:e})=>(0,t._)`{allowedValues: ${e}}`},code(e){let o,n,{gen:a,data:s,$data:d,schema:c,schemaCode:l,it:p}=e;if(!d&&0===c.length)throw Error("enum must have non-empty array");let u=c.length>=p.opts.loopEnum,m=()=>null!=o?o:o=(0,r.useFunc)(a,i.default);if(u||d)n=a.let("valid"),e.block$data(n,function(){a.assign(n,!1),a.forOf("v",l,e=>a.if((0,t._)`${m()}(${s}, ${e})`,()=>a.assign(n,!0).break()))});else{if(!Array.isArray(c))throw Error("ajv implementation error");let e=a.const("vSchema",l);n=(0,t.or)(...c.map((r,i)=>{var o,n;let a;return o=e,"object"==typeof(a=c[n=i])&&null!==a?(0,t._)`${m()}(${s}, ${o}[${n}])`:(0,t._)`${s} === ${a}`}))}e.pass(n)}}}),xJ=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xM(),r=xW(),i=xz(),o=xD(),n=xF(),a=xL(),s=xU(),d=xG(),c=xB(),l=xK();e.default=[t.default,r.default,i.default,o.default,n.default,a.default,s.default,d.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},c.default,l.default]}),xZ=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateAdditionalItems=void 0;let t=xc(),r=xl();function i(e,i){let{gen:o,schema:n,data:a,keyword:s,it:d}=e;d.items=!0;let c=o.const("len",(0,t._)`${a}.length`);if(!1===n)e.setParams({len:i.length}),e.pass((0,t._)`${c} <= ${i.length}`);else if("object"==typeof n&&!(0,r.alwaysValidSchema)(d,n)){let n=o.var("valid",(0,t._)`${c} <= ${i.length}`);o.if((0,t.not)(n),()=>{var a;return a=n,void o.forRange("i",i.length,c,i=>{e.subschema({keyword:s,dataProp:i,dataPropType:r.Type.Num},a),d.allErrors||o.if((0,t.not)(a),()=>o.break())})}),e.ok(n)}}e.validateAdditionalItems=i,e.default={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:e}})=>(0,t.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,t._)`{limit: ${e}}`},code(e){let{parentSchema:t,it:o}=e,{items:n}=t;Array.isArray(n)?i(e,n):(0,r.checkStrictMode)(o,'"additionalItems" is ignored when "items" is not an array of schemas')}}}),xQ=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateTuple=void 0;let t=xc(),r=xl(),i=x_();function o(e,i,n=e.schema){let{gen:a,parentSchema:s,data:d,keyword:c,it:l}=e;(function(e){let{opts:t,errSchemaPath:o}=l,a=n.length,s=a===e.minItems&&(a===e.maxItems||!1===e[i]);if(t.strictTuples&&!s){let e=`"${c}" is ${a}-tuple, but minItems or maxItems/${i} are not specified or different at path "${o}"`;(0,r.checkStrictMode)(l,e,t.strictTuples)}})(s),l.opts.unevaluated&&n.length&&!0!==l.items&&(l.items=r.mergeEvaluated.items(a,n.length,l.items));let p=a.name("valid"),u=a.const("len",(0,t._)`${d}.length`);n.forEach((i,o)=>{(0,r.alwaysValidSchema)(l,i)||(a.if((0,t._)`${u} > ${o}`,()=>e.subschema({keyword:c,schemaProp:o,dataProp:o},p)),e.ok(p))})}e.validateTuple=o,e.default={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){let{schema:t,it:n}=e;if(Array.isArray(t))return o(e,"additionalItems",t);n.items=!0,(0,r.alwaysValidSchema)(n,t)||e.ok((0,i.validateArray)(e))}}}),xX=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xQ();e.default={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,t.validateTuple)(e,"items")}}),xY=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xc(),r=xl(),i=x_(),o=xZ();e.default={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:e}})=>(0,t.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,t._)`{limit: ${e}}`},code(e){let{schema:t,parentSchema:n,it:a}=e,{prefixItems:s}=n;a.items=!0,(0,r.alwaysValidSchema)(a,t)||(s?(0,o.validateAdditionalItems)(e,s):e.ok((0,i.validateArray)(e)))}}}),x1=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xc(),r=xl();e.default={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:e,max:r}})=>void 0===r?(0,t.str)`must contain at least ${e} valid item(s)`:(0,t.str)`must contain at least ${e} and no more than ${r} valid item(s)`,params:({params:{min:e,max:r}})=>void 0===r?(0,t._)`{minContains: ${e}}`:(0,t._)`{minContains: ${e}, maxContains: ${r}}`},code(e){let i,o,{gen:n,schema:a,parentSchema:s,data:d,it:c}=e,{minContains:l,maxContains:p}=s;c.opts.next?(i=void 0===l?1:l,o=p):i=1;let u=n.const("len",(0,t._)`${d}.length`);if(e.setParams({min:i,max:o}),void 0===o&&0===i)return void(0,r.checkStrictMode)(c,'"minContains" == 0 without "maxContains": "contains" keyword ignored');if(void 0!==o&&i>o){(0,r.checkStrictMode)(c,'"minContains" > "maxContains" is always invalid'),e.fail();return}if((0,r.alwaysValidSchema)(c,a)){let r=(0,t._)`${u} >= ${i}`;void 0!==o&&(r=(0,t._)`${r} && ${u} <= ${o}`),e.pass(r);return}c.items=!0;let m=n.name("valid");function f(){let e=n.name("_valid"),r=n.let("count",0);h(e,()=>n.if(e,()=>{var e;return e=r,void(n.code((0,t._)`${e}++`),void 0===o?n.if((0,t._)`${e} >= ${i}`,()=>n.assign(m,!0).break()):(n.if((0,t._)`${e} > ${o}`,()=>n.assign(m,!1).break()),1===i?n.assign(m,!0):n.if((0,t._)`${e} >= ${i}`,()=>n.assign(m,!0))))}))}function h(t,i){n.forRange("i",0,u,o=>{e.subschema({keyword:"contains",dataProp:o,dataPropType:r.Type.Num,compositeRule:!0},t),i()})}void 0===o&&1===i?h(m,()=>n.if(m,()=>n.break())):0===i?(n.let(m,!0),void 0!==o&&n.if((0,t._)`${d}.length > 0`,f)):(n.let(m,!1),f()),e.result(m,()=>e.reset())}}}),x0=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;let t=xc(),r=xl(),i=x_();e.error={message:({params:{property:e,depsCount:r,deps:i}})=>(0,t.str)`must have ${1===r?"property":"properties"} ${i} when property ${e} is present`,params:({params:{property:e,depsCount:r,deps:i,missingProperty:o}})=>(0,t._)`{property: ${e}, + || ${s} === "boolean" || ${o} === null`).assign(d,(0,a._)`[${o}]`)}}(e);i.else(),m(e),i.endIf(),i.if((0,a._)`${d} !== undefined`,()=>{i.assign(o,d),function({gen:e,parentData:t,parentDataProperty:r},i){e.if((0,a._)`${t} !== undefined`,()=>e.assign((0,a._)`${t}[${r}]`,i))}(e,d)})}(e,r,u):m(e)})}return f};let c=new Set(["string","number","integer","boolean","null"]);function l(e,r,i,o=t.Correct){let n,s=o===t.Correct?a.operators.EQ:a.operators.NEQ;switch(e){case"null":return(0,a._)`${r} ${s} null`;case"array":n=(0,a._)`Array.isArray(${r})`;break;case"object":n=(0,a._)`${r} && typeof ${r} == "object" && !Array.isArray(${r})`;break;case"integer":n=d((0,a._)`!(${r} % 1) && !isNaN(${r})`);break;case"number":n=d();break;default:return(0,a._)`typeof ${r} ${s} ${e}`}return o===t.Correct?n:(0,a.not)(n);function d(e=a.nil){return(0,a.and)((0,a._)`typeof ${r} == "number"`,e,i?(0,a._)`isFinite(${r})`:a.nil)}}function p(e,t,r,i){let o;if(1===e.length)return l(e[0],t,r,i);let n=(0,s.toHash)(e);if(n.array&&n.object){let e=(0,a._)`typeof ${t} != "object"`;o=n.null?e:(0,a._)`!${t} || ${e}`,delete n.null,delete n.array,delete n.object}else o=a.nil;for(let e in n.number&&delete n.integer,n)o=(0,a.and)(o,l(e,t,r,i));return o}e.checkDataType=l,e.checkDataTypes=p;let u={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>"string"==typeof e?(0,a._)`{type: ${e}}`:(0,a._)`{type: ${t}}`};function m(e){let t=function(e){let{gen:t,data:r,schema:i}=e,o=(0,s.schemaRefOrVal)(e,i,"type");return{gen:t,keyword:"type",data:r,schema:i.type,schemaCode:o,schemaValue:o,parentSchema:i,params:{},it:e}}(e);(0,n.reportError)(t,u)}e.reportTypeError=m}),xG=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.assignDefaults=void 0;let t=xM(),r=xN();function i(e,i,o){let{gen:n,compositeRule:a,data:s,opts:d}=e;if(void 0===o)return;let c=(0,t._)`${s}${(0,t.getProperty)(i)}`;if(a)return void(0,r.checkStrictMode)(e,`default is ignored for: ${c}`);let l=(0,t._)`${c} === undefined`;"empty"===d.useDefaults&&(l=(0,t._)`${l} || ${c} === null || ${c} === ""`),n.if(l,(0,t._)`${c} = ${(0,t.stringify)(o)}`)}e.assignDefaults=function(e,t){let{properties:r,items:o}=e.schema;if("object"===t&&r)for(let t in r)i(e,t,r[t].default);else"array"===t&&Array.isArray(o)&&o.forEach((t,r)=>i(e,r,t.default))}}),xB=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateUnion=e.validateArray=e.usePattern=e.callValidateCode=e.schemaProperties=e.allSchemaProperties=e.noPropertyInData=e.propertyInData=e.isOwnProperty=e.hasPropFunc=e.reportMissingProp=e.checkMissingProp=e.checkReportMissingProp=void 0;let t=xM(),r=xN(),i=xz(),o=xN();function n(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,t._)`Object.prototype.hasOwnProperty`})}function a(e,r,i){return(0,t._)`${n(e)}.call(${r}, ${i})`}function s(e,r,i,o){let n=(0,t._)`${r}${(0,t.getProperty)(i)} === undefined`;return o?(0,t.or)(n,(0,t.not)(a(e,r,i))):n}function d(e){return e?Object.keys(e).filter(e=>"__proto__"!==e):[]}e.checkReportMissingProp=function(e,r){let{gen:i,data:o,it:n}=e;i.if(s(i,o,r,n.opts.ownProperties),()=>{e.setParams({missingProperty:(0,t._)`${r}`},!0),e.error()})},e.checkMissingProp=function({gen:e,data:r,it:{opts:i}},o,n){return(0,t.or)(...o.map(o=>(0,t.and)(s(e,r,o,i.ownProperties),(0,t._)`${n} = ${o}`)))},e.reportMissingProp=function(e,t){e.setParams({missingProperty:t},!0),e.error()},e.hasPropFunc=n,e.isOwnProperty=a,e.propertyInData=function(e,r,i,o){let n=(0,t._)`${r}${(0,t.getProperty)(i)} !== undefined`;return o?(0,t._)`${n} && ${a(e,r,i)}`:n},e.noPropertyInData=s,e.allSchemaProperties=d,e.schemaProperties=function(e,t){return d(t).filter(i=>!(0,r.alwaysValidSchema)(e,t[i]))},e.callValidateCode=function({schemaCode:e,data:r,it:{gen:o,topSchemaRef:n,schemaPath:a,errorPath:s},it:d},c,l,p){let u=p?(0,t._)`${e}, ${r}, ${n}${a}`:r,m=[[i.default.instancePath,(0,t.strConcat)(i.default.instancePath,s)],[i.default.parentData,d.parentData],[i.default.parentDataProperty,d.parentDataProperty],[i.default.rootData,i.default.rootData]];d.opts.dynamicRef&&m.push([i.default.dynamicAnchors,i.default.dynamicAnchors]);let f=(0,t._)`${u}, ${o.object(...m)}`;return l!==t.nil?(0,t._)`${c}.call(${l}, ${f})`:(0,t._)`${c}(${f})`};let c=(0,t._)`new RegExp`;e.usePattern=function({gen:e,it:{opts:r}},i){let n=r.unicodeRegExp?"u":"",{regExp:a}=r.code,s=a(i,n);return e.scopeValue("pattern",{key:s.toString(),ref:s,code:(0,t._)`${"new RegExp"===a.code?c:(0,o.useFunc)(e,a)}(${i}, ${n})`})},e.validateArray=function(e){let{gen:i,data:o,keyword:n,it:a}=e,s=i.name("valid");if(a.allErrors){let e=i.let("valid",!0);return d(()=>i.assign(e,!1)),e}return i.var(s,!0),d(()=>i.break()),s;function d(a){let d=i.const("len",(0,t._)`${o}.length`);i.forRange("i",0,d,o=>{e.subschema({keyword:n,dataProp:o,dataPropType:r.Type.Num},s),i.if((0,t.not)(s),a)})}},e.validateUnion=function(e){let{gen:i,schema:o,keyword:n,it:a}=e;if(!Array.isArray(o))throw Error("ajv implementation error");if(o.some(e=>(0,r.alwaysValidSchema)(a,e))&&!a.opts.unevaluated)return;let s=i.let("valid",!1),d=i.name("_valid");i.block(()=>o.forEach((r,o)=>{let a=e.subschema({keyword:n,schemaProp:o,compositeRule:!0},d);i.assign(s,(0,t._)`${s} || ${d}`),e.mergeValidEvaluated(a,d)||i.if((0,t.not)(s))})),e.result(s,()=>e.reset(),()=>e.error(!0))}}),xK=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateKeywordUsage=e.validSchemaType=e.funcKeywordCode=e.macroKeywordCode=void 0;let t=xM(),r=xz(),i=xB(),o=xD();function n(e){let{gen:r,data:i,it:o}=e;r.if(o.parentData,()=>r.assign(i,(0,t._)`${o.parentData}[${o.parentDataProperty}]`))}function a(e,r,i){if(void 0===i)throw Error(`keyword "${r}" failed to compile`);return e.scopeValue("keyword","function"==typeof i?{ref:i}:{ref:i,code:(0,t.stringify)(i)})}e.macroKeywordCode=function(e,r){let{gen:i,keyword:o,schema:n,parentSchema:s,it:d}=e,c=r.macro.call(d.self,n,s,d),l=a(i,o,c);!1!==d.opts.validateSchema&&d.self.validateSchema(c,!0);let p=i.name("valid");e.subschema({schema:c,schemaPath:t.nil,errSchemaPath:`${d.errSchemaPath}/${o}`,topSchemaRef:l,compositeRule:!0},p),e.pass(p,()=>e.error(!0))},e.funcKeywordCode=function(e,s){var d;let{gen:c,keyword:l,schema:p,parentSchema:u,$data:m,it:f}=e;!function({schemaEnv:e},t){if(t.async&&!e.$async)throw Error("async keyword in sync schema")}(f,s);let h=a(c,l,!m&&s.compile?s.compile.call(f.self,p,u,f):s.validate),y=c.let("valid");function g(o=s.async?(0,t._)`await `:t.nil){let n=f.opts.passContext?r.default.this:r.default.self,a=!("compile"in s&&!m||!1===s.schema);c.assign(y,(0,t._)`${o}${(0,i.callValidateCode)(e,h,n,a)}`,s.modifying)}function _(e){var r;c.if((0,t.not)(null!=(r=s.valid)?r:y),e)}e.block$data(y,function(){if(!1===s.errors)g(),s.modifying&&n(e),_(()=>e.error());else{let i,a,d=s.async?(i=c.let("ruleErrs",null),c.try(()=>g((0,t._)`await `),e=>c.assign(y,!1).if((0,t._)`${e} instanceof ${f.ValidationError}`,()=>c.assign(i,(0,t._)`${e}.errors`),()=>c.throw(e))),i):(a=(0,t._)`${h}.errors`,c.assign(a,null),g(t.nil),a);s.modifying&&n(e),_(()=>(function(e,i){let{gen:n}=e;n.if((0,t._)`Array.isArray(${i})`,()=>{n.assign(r.default.vErrors,(0,t._)`${r.default.vErrors} === null ? ${i} : ${r.default.vErrors}.concat(${i})`).assign(r.default.errors,(0,t._)`${r.default.vErrors}.length`),(0,o.extendErrors)(e)},()=>e.error())})(e,d))}}),e.ok(null!=(d=s.valid)?d:y)},e.validSchemaType=function(e,t,r=!1){return!t.length||t.some(t=>"array"===t?Array.isArray(e):"object"===t?e&&"object"==typeof e&&!Array.isArray(e):typeof e==t||r&&void 0===e)},e.validateKeywordUsage=function({schema:e,opts:t,self:r,errSchemaPath:i},o,n){if(Array.isArray(o.keyword)?!o.keyword.includes(n):o.keyword!==n)throw Error("ajv implementation error");let a=o.dependencies;if(null==a?void 0:a.some(t=>!Object.prototype.hasOwnProperty.call(e,t)))throw Error(`parent schema must have dependencies of ${n}: ${a.join(",")}`);if(o.validateSchema&&!o.validateSchema(e[n])){let e=`keyword "${n}" value is invalid at path "${i}": `+r.errorsText(o.validateSchema.errors);if("log"===t.validateSchema)r.logger.error(e);else throw Error(e)}}}),xJ=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.extendSubschemaMode=e.extendSubschemaData=e.getSubschema=void 0;let t=xM(),r=xN();e.getSubschema=function(e,{keyword:i,schemaProp:o,schema:n,schemaPath:a,errSchemaPath:s,topSchemaRef:d}){if(void 0!==i&&void 0!==n)throw Error('both "keyword" and "schema" passed, only one allowed');if(void 0!==i){let n=e.schema[i];return void 0===o?{schema:n,schemaPath:(0,t._)`${e.schemaPath}${(0,t.getProperty)(i)}`,errSchemaPath:`${e.errSchemaPath}/${i}`}:{schema:n[o],schemaPath:(0,t._)`${e.schemaPath}${(0,t.getProperty)(i)}${(0,t.getProperty)(o)}`,errSchemaPath:`${e.errSchemaPath}/${i}/${(0,r.escapeFragment)(o)}`}}if(void 0!==n){if(void 0===a||void 0===s||void 0===d)throw Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:n,schemaPath:a,topSchemaRef:d,errSchemaPath:s}}throw Error('either "keyword" or "schema" must be passed')},e.extendSubschemaData=function(e,i,{dataProp:o,dataPropType:n,data:a,dataTypes:s,propertyName:d}){if(void 0!==a&&void 0!==o)throw Error('both "data" and "dataProp" passed, only one allowed');let{gen:c}=i;if(void 0!==o){let{errorPath:a,dataPathArr:s,opts:d}=i;l(c.let("data",(0,t._)`${i.data}${(0,t.getProperty)(o)}`,!0)),e.errorPath=(0,t.str)`${a}${(0,r.getErrorPath)(o,n,d.jsPropertySyntax)}`,e.parentDataProperty=(0,t._)`${o}`,e.dataPathArr=[...s,e.parentDataProperty]}function l(t){e.data=t,e.dataLevel=i.dataLevel+1,e.dataTypes=[],i.definedProperties=new Set,e.parentData=i.data,e.dataNames=[...i.dataNames,t]}void 0!==a&&(l(a instanceof t.Name?a:c.let("data",a,!0)),void 0!==d&&(e.propertyName=d)),s&&(e.dataTypes=s)},e.extendSubschemaMode=function(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:i,createErrors:o,allErrors:n}){void 0!==i&&(e.compositeRule=i),void 0!==o&&(e.createErrors=o),void 0!==n&&(e.allErrors=n),e.jtdDiscriminator=t,e.jtdMetadata=r}}),xZ=S0((e,t)=>{t.exports=function e(t,r){if(t===r)return!0;if(t&&r&&"object"==typeof t&&"object"==typeof r){if(t.constructor!==r.constructor)return!1;if(Array.isArray(t)){if((i=t.length)!=r.length)return!1;for(o=i;0!=o--;)if(!e(t[o],r[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if((i=(n=Object.keys(t)).length)!==Object.keys(r).length)return!1;for(o=i;0!=o--;)if(!Object.prototype.hasOwnProperty.call(r,n[o]))return!1;for(o=i;0!=o--;){var i,o,n,a=n[o];if(!e(t[a],r[a]))return!1}return!0}return t!=t&&r!=r}}),xQ=S0((e,t)=>{var r=t.exports=function(e,t,i){"function"==typeof t&&(i=t,t={});var o="function"==typeof(i=t.cb||i)?i:i.pre||function(){};!function e(t,i,o,n,a,s,d,c,l,p){if(n&&"object"==typeof n&&!Array.isArray(n)){for(var u in i(n,a,s,d,c,l,p),n){var m=n[u];if(Array.isArray(m)){if(u in r.arrayKeywords)for(var f=0;f{Object.defineProperty(e,"__esModule",{value:!0}),e.getSchemaRefs=e.resolveUrl=e.normalizeId=e._getFullPath=e.getFullPath=e.inlineRef=void 0;let t=xN(),r=xZ(),i=xQ(),o=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);e.inlineRef=function(e,r=!0){return"boolean"==typeof e||(!0===r?!function e(t){for(let r in t){if(n.has(r))return!0;let i=t[r];if(Array.isArray(i)&&i.some(e)||"object"==typeof i&&e(i))return!0}return!1}(e):!!r&&function e(r){let i=0;for(let n in r)if("$ref"===n||(i++,!o.has(n)&&("object"==typeof r[n]&&(0,t.eachItem)(r[n],t=>i+=e(t)),1/0===i)))return 1/0;return i}(e)<=r)};let n=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function a(e,t="",r){return!1!==r&&(t=c(t)),s(e,e.parse(t))}function s(e,t){return e.serialize(t).split("#")[0]+"#"}e.getFullPath=a,e._getFullPath=s;let d=/#\/?$/;function c(e){return e?e.replace(d,""):""}e.normalizeId=c,e.resolveUrl=function(e,t,r){return r=c(r),e.resolve(t,r)};let l=/^[a-z_][-a-z0-9._]*$/i;e.getSchemaRefs=function(e,t){if("boolean"==typeof e)return{};let{schemaId:o,uriResolver:n}=this.opts,s=c(e[o]||t),d={"":s},p=a(n,s,!1),u={},m=new Set;return i(e,{allKeys:!0},(e,t,r,i)=>{if(void 0===i)return;let n=p+t,a=d[i];function s(t){let r=this.opts.uriResolver.resolve;if(t=c(a?r(a,t):t),m.has(t))throw h(t);m.add(t);let i=this.refs[t];return"string"==typeof i&&(i=this.refs[i]),"object"==typeof i?f(e,i.schema,t):t!==c(n)&&("#"===t[0]?(f(e,u[t],t),u[t]=e):this.refs[t]=n),t}function y(e){if("string"==typeof e){if(!l.test(e))throw Error(`invalid anchor "${e}"`);s.call(this,`#${e}`)}}"string"==typeof e[o]&&(a=s.call(this,e[o])),y.call(this,e.$anchor),y.call(this,e.$dynamicAnchor),d[t]=a}),u;function f(e,t,i){if(void 0!==t&&!r(e,t))throw h(i)}function h(e){return Error(`reference "${e}" resolves to more than one schema`)}}}),xY=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getData=e.KeywordCxt=e.validateFunctionCode=void 0;let t=xF(),r=xH(),i=xU(),o=xH(),n=xG(),a=xK(),s=xJ(),d=xM(),c=xz(),l=xX(),p=xN(),u=xD();function m({gen:e,validateName:t,schema:r,schemaEnv:i,opts:o},n){var a;o.code.es5?e.func(t,(0,d._)`${c.default.data}, ${c.default.valCxt}`,i.$async,()=>{var t,i;e.code((0,d._)`"use strict"; ${f(r,o)}`),t=e,i=o,t.if(c.default.valCxt,()=>{t.var(c.default.instancePath,(0,d._)`${c.default.valCxt}.${c.default.instancePath}`),t.var(c.default.parentData,(0,d._)`${c.default.valCxt}.${c.default.parentData}`),t.var(c.default.parentDataProperty,(0,d._)`${c.default.valCxt}.${c.default.parentDataProperty}`),t.var(c.default.rootData,(0,d._)`${c.default.valCxt}.${c.default.rootData}`),i.dynamicRef&&t.var(c.default.dynamicAnchors,(0,d._)`${c.default.valCxt}.${c.default.dynamicAnchors}`)},()=>{t.var(c.default.instancePath,(0,d._)`""`),t.var(c.default.parentData,(0,d._)`undefined`),t.var(c.default.parentDataProperty,(0,d._)`undefined`),t.var(c.default.rootData,c.default.data),i.dynamicRef&&t.var(c.default.dynamicAnchors,(0,d._)`{}`)}),e.code(n)}):e.func(t,(0,d._)`${c.default.data}, ${(a=o,(0,d._)`{${c.default.instancePath}="", ${c.default.parentData}, ${c.default.parentDataProperty}, ${c.default.rootData}=${c.default.data}${a.dynamicRef?(0,d._)`, ${c.default.dynamicAnchors}={}`:d.nil}}={}`)}`,i.$async,()=>e.code(f(r,o)).code(n))}function f(e,t){let r="object"==typeof e&&e[t.schemaId];return r&&(t.code.source||t.code.process)?(0,d._)`/*# sourceURL=${r} */`:d.nil}function h({schema:e,self:t}){if("boolean"==typeof e)return!e;for(let r in e)if(t.RULES.all[r])return!0;return!1}function y(e){return"boolean"!=typeof e.schema}function g(e){(0,p.checkUnknownRules)(e),function(e){let{schema:t,errSchemaPath:r,opts:i,self:o}=e;t.$ref&&i.ignoreKeywordsWithRef&&(0,p.schemaHasRulesButRef)(t,o.RULES)&&o.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}(e)}function _(e,t){if(e.opts.jtd)return b(e,[],!1,t);let i=(0,r.getSchemaTypes)(e.schema);b(e,i,!(0,r.coerceAndCheckDataType)(e,i),t)}function v({gen:e,schemaEnv:t,schema:r,errSchemaPath:i,opts:o}){let n=r.$comment;if(!0===o.$comment)e.code((0,d._)`${c.default.self}.logger.log(${n})`);else if("function"==typeof o.$comment){let r=(0,d.str)`${i}/$comment`,o=e.scopeValue("root",{ref:t.root});e.code((0,d._)`${c.default.self}.opts.$comment(${n}, ${r}, ${o}.schema)`)}}function b(e,t,r,n){var a,s,l,u;let{gen:m,schema:f,data:h,allErrors:y,opts:g,self:_}=e,{RULES:v}=_;if(f.$ref&&(g.ignoreKeywordsWithRef||!(0,p.schemaHasRulesButRef)(f,v)))return void m.block(()=>V(e,"$ref",v.all.$ref.definition));function b(a){(0,i.shouldUseGroup)(f,a)&&(a.type?(m.if((0,o.checkDataType)(a.type,h,g.strictNumbers)),$(e,a),1===t.length&&t[0]===a.type&&r&&(m.else(),(0,o.reportTypeError)(e)),m.endIf()):$(e,a),y||m.if((0,d._)`${c.default.errors} === ${n||0}`))}g.jtd||(a=e,s=t,!a.schemaEnv.meta&&a.opts.strictTypes&&(function(e,t){if(t.length){if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach(t=>{S(e.dataTypes,t)||k(e,`type "${t}" not allowed by context "${e.dataTypes.join(",")}"`)}),function(e,t){let r=[];for(let i of e.dataTypes)S(t,i)?r.push(i):t.includes("integer")&&"number"===i&&r.push("integer");e.dataTypes=r}(e,t)}}(a,s),a.opts.allowUnionTypes||(l=a,(u=s).length>1&&!(2===u.length&&u.includes("null"))&&k(l,"use allowUnionTypes to allow union type keyword")),function(e,t){let r=e.self.RULES.all;for(let o in r){let n=r[o];if("object"==typeof n&&(0,i.shouldUseRule)(e.schema,n)){let{type:r}=n.definition;r.length&&!r.some(e=>{var r,i;return r=t,i=e,r.includes(i)||"number"===i&&r.includes("integer")})&&k(e,`missing type "${r.join(",")}" for keyword "${o}"`)}}}(a,a.dataTypes))),m.block(()=>{for(let e of v.rules)b(e);b(v.post)})}function $(e,t){let{gen:r,schema:o,opts:{useDefaults:a}}=e;a&&(0,n.assignDefaults)(e,t.type),r.block(()=>{for(let r of t.rules)(0,i.shouldUseRule)(o,r)&&V(e,r.keyword,r.definition,t.type)})}function S(e,t){return e.includes(t)||"integer"===t&&e.includes("number")}function k(e,t){let r=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${r}" (strictTypes)`,(0,p.checkStrictMode)(e,t,e.opts.strictTypes)}e.validateFunctionCode=function(e){y(e)&&(g(e),h(e))?function(e){let{schema:t,opts:r,gen:i}=e;m(e,()=>{r.$comment&&t.$comment&&v(e),function(e){let{schema:t,opts:r}=e;void 0!==t.default&&r.useDefaults&&r.strictSchema&&(0,p.checkStrictMode)(e,"default is ignored in the schema root")}(e),i.let(c.default.vErrors,null),i.let(c.default.errors,0),r.unevaluated&&function(e){let{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",(0,d._)`${r}.evaluated`),t.if((0,d._)`${e.evaluated}.dynamicProps`,()=>t.assign((0,d._)`${e.evaluated}.props`,(0,d._)`undefined`)),t.if((0,d._)`${e.evaluated}.dynamicItems`,()=>t.assign((0,d._)`${e.evaluated}.items`,(0,d._)`undefined`))}(e),_(e),function(e){let{gen:t,schemaEnv:r,validateName:i,ValidationError:o,opts:n}=e;r.$async?t.if((0,d._)`${c.default.errors} === 0`,()=>t.return(c.default.data),()=>t.throw((0,d._)`new ${o}(${c.default.vErrors})`)):(t.assign((0,d._)`${i}.errors`,c.default.vErrors),n.unevaluated&&function({gen:e,evaluated:t,props:r,items:i}){r instanceof d.Name&&e.assign((0,d._)`${t}.props`,r),i instanceof d.Name&&e.assign((0,d._)`${t}.items`,i)}(e),t.return((0,d._)`${c.default.errors} === 0`))}(e)})}(e):m(e,()=>(0,t.topBoolOrEmptySchema)(e))};var w=class{constructor(e,t,r){if((0,a.validateKeywordUsage)(e,t,r),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=r,this.data=e.data,this.schema=e.schema[r],this.$data=t.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,p.schemaRefOrVal)(e,this.schema,r,this.$data),this.schemaType=t.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=t,this.$data)this.schemaCode=e.gen.const("vSchema",q(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,a.validSchemaType)(this.schema,t.schemaType,t.allowUndefined))throw Error(`${r} value must be ${JSON.stringify(t.schemaType)}`);("code"in t?t.trackErrors:!1!==t.errors)&&(this.errsCount=e.gen.const("_errs",c.default.errors))}result(e,t,r){this.failResult((0,d.not)(e),t,r)}failResult(e,t,r){this.gen.if(e),r?r():this.error(),t?(this.gen.else(),t(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,t){this.failResult((0,d.not)(e),void 0,t)}fail(e){if(void 0===e){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);let{schemaCode:t}=this;this.fail((0,d._)`${t} !== undefined && (${(0,d.or)(this.invalid$data(),e)})`)}error(e,t,r){if(t){this.setParams(t),this._error(e,r),this.setParams({});return}this._error(e,r)}_error(e,t){(e?u.reportExtraError:u.reportError)(this,this.def.error,t)}$dataError(){(0,u.reportError)(this,this.def.$dataError||u.keyword$DataError)}reset(){if(void 0===this.errsCount)throw Error('add "trackErrors" to keyword definition');(0,u.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,t){t?Object.assign(this.params,e):this.params=e}block$data(e,t,r=d.nil){this.gen.block(()=>{this.check$data(e,r),t()})}check$data(e=d.nil,t=d.nil){if(!this.$data)return;let{gen:r,schemaCode:i,schemaType:o,def:n}=this;r.if((0,d.or)((0,d._)`${i} === undefined`,t)),e!==d.nil&&r.assign(e,!0),(o.length||n.validateSchema)&&(r.elseIf(this.invalid$data()),this.$dataError(),e!==d.nil&&r.assign(e,!1)),r.else()}invalid$data(){let{gen:e,schemaCode:t,schemaType:r,def:i,it:n}=this;return(0,d.or)(function(){if(r.length){if(!(t instanceof d.Name))throw Error("ajv implementation error");let e=Array.isArray(r)?r:[r];return(0,d._)`${(0,o.checkDataTypes)(e,t,n.opts.strictNumbers,o.DataType.Wrong)}`}return d.nil}(),function(){if(i.validateSchema){let r=e.scopeValue("validate$data",{ref:i.validateSchema});return(0,d._)`!${r}(${t})`}return d.nil}())}subschema(e,r){let i=(0,s.getSubschema)(this.it,e);(0,s.extendSubschemaData)(i,this.it,e),(0,s.extendSubschemaMode)(i,e);let o={...this.it,...i,items:void 0,props:void 0};return!function(e,r){if(y(e)&&(g(e),h(e)))return function(e,t){var r;let i,{schema:o,gen:n,opts:a}=e;a.$comment&&o.$comment&&v(e),(i=(r=e).schema[r.opts.schemaId])&&(r.baseId=(0,l.resolveUrl)(r.opts.uriResolver,r.baseId,i)),function(e){if(e.schema.$async&&!e.schemaEnv.$async)throw Error("async schema in sync schema")}(e);let s=n.const("_errs",c.default.errors);_(e,s),n.var(t,(0,d._)`${s} === ${c.default.errors}`)}(e,r);(0,t.boolOrEmptySchema)(e,r)}(o,r),o}mergeEvaluated(e,t){let{it:r,gen:i}=this;r.opts.unevaluated&&(!0!==r.props&&void 0!==e.props&&(r.props=p.mergeEvaluated.props(i,e.props,r.props,t)),!0!==r.items&&void 0!==e.items&&(r.items=p.mergeEvaluated.items(i,e.items,r.items,t)))}mergeValidEvaluated(e,t){let{it:r,gen:i}=this;if(r.opts.unevaluated&&(!0!==r.props||!0!==r.items))return i.if(t,()=>this.mergeEvaluated(e,d.Name)),!0}};function V(e,t,r,i){let o=new w(e,r,t);"code"in r?r.code(o,i):o.$data&&r.validate?(0,a.funcKeywordCode)(o,r):"macro"in r?(0,a.macroKeywordCode)(o,r):(r.compile||r.validate)&&(0,a.funcKeywordCode)(o,r)}e.KeywordCxt=w;let P=/^\/(?:[^~]|~0|~1)*$/,R=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function q(e,{dataLevel:t,dataNames:r,dataPathArr:i}){let o,n;if(""===e)return c.default.rootData;if("/"===e[0]){if(!P.test(e))throw Error(`Invalid JSON-pointer: ${e}`);o=e,n=c.default.rootData}else{let a=R.exec(e);if(!a)throw Error(`Invalid JSON-pointer: ${e}`);let d=+a[1];if("#"===(o=a[2])){if(d>=t)throw Error(s("property/index",d));return i[t-d]}if(d>t)throw Error(s("data",d));if(n=r[t-d],!o)return n}let a=n;for(let e of o.split("/"))e&&(n=(0,d._)`${n}${(0,d.getProperty)((0,p.unescapeJsonPointer)(e))}`,a=(0,d._)`${a} && ${n}`);return a;function s(e,r){return`Cannot access ${e} ${r} levels up, current level is ${t}`}}e.getData=q}),x1=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=class extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}}}),x0=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xX();e.default=class extends Error{constructor(e,r,i,o){super(o||`can't resolve reference ${i} from id ${r}`),this.missingRef=(0,t.resolveUrl)(e,r,i),this.missingSchema=(0,t.normalizeId)((0,t.getFullPath)(e,this.missingRef))}}}),x2=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.resolveSchema=e.getCompilingSchema=e.resolveRef=e.compileSchema=e.SchemaEnv=void 0;let t=xM(),r=x1(),i=xz(),o=xX(),n=xN(),a=xY();var s=class{constructor(e){var t;let r;this.refs={},this.dynamicAnchors={},"object"==typeof e.schema&&(r=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=null!=(t=e.baseId)?t:(0,o.normalizeId)(null==r?void 0:r[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=null==r?void 0:r.$async,this.refs={}}};function d(e){let n,s,d=l.call(this,e);if(d)return d;let c=(0,o.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:p,lines:u}=this.opts.code,{ownProperties:m}=this.opts,f=new t.CodeGen(this.scope,{es5:p,lines:u,ownProperties:m});e.$async&&(n=f.scopeValue("Error",{ref:r.default,code:(0,t._)`require("ajv/dist/runtime/validation_error").default`}));let h=f.scopeName("validate");e.validateName=h;let y={gen:f,allErrors:this.opts.allErrors,data:i.default.data,parentData:i.default.parentData,parentDataProperty:i.default.parentDataProperty,dataNames:[i.default.data],dataPathArr:[t.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:f.scopeValue("schema",!0===this.opts.code.source?{ref:e.schema,code:(0,t.stringify)(e.schema)}:{ref:e.schema}),validateName:h,ValidationError:n,schema:e.schema,schemaEnv:e,rootId:c,baseId:e.baseId||c,schemaPath:t.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,t._)`""`,opts:this.opts,self:this};try{this._compilations.add(e),(0,a.validateFunctionCode)(y),f.optimize(this.opts.code.optimize);let r=f.toString();s=`${f.scopeRefs(i.default.scope)}return ${r}`,this.opts.code.process&&(s=this.opts.code.process(s,e));let o=Function(`${i.default.self}`,`${i.default.scope}`,s)(this,this.scope.get());if(this.scope.value(h,{ref:o}),o.errors=null,o.schema=e.schema,o.schemaEnv=e,e.$async&&(o.$async=!0),!0===this.opts.code.source&&(o.source={validateName:h,validateCode:r,scopeValues:f._values}),this.opts.unevaluated){let{props:e,items:r}=y;o.evaluated={props:e instanceof t.Name?void 0:e,items:r instanceof t.Name?void 0:r,dynamicProps:e instanceof t.Name,dynamicItems:r instanceof t.Name},o.source&&(o.source.evaluated=(0,t.stringify)(o.evaluated))}return e.validate=o,e}catch(t){throw delete e.validate,delete e.validateName,s&&this.logger.error("Error compiling schema, function code:",s),t}finally{this._compilations.delete(e)}}function c(e){return(0,o.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:d.call(this,e)}function l(e){for(let i of this._compilations){var t,r;if(t=i,r=e,t.schema===r.schema&&t.root===r.root&&t.baseId===r.baseId)return i}}function p(e,t){let r;for(;"string"==typeof(r=this.refs[t]);)t=r;return r||this.schemas[t]||u.call(this,e,t)}function u(e,t){let r=this.opts.uriResolver.parse(t),i=(0,o._getFullPath)(this.opts.uriResolver,r),n=(0,o.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&i===n)return f.call(this,r,e);let a=(0,o.normalizeId)(i),c=this.refs[a]||this.schemas[a];if("string"==typeof c){let t=u.call(this,e,c);if("object"!=typeof(null==t?void 0:t.schema))return;return f.call(this,r,t)}if("object"==typeof(null==c?void 0:c.schema)){if(c.validate||d.call(this,c),a===(0,o.normalizeId)(t)){let{schema:t}=c,{schemaId:r}=this.opts,i=t[r];return i&&(n=(0,o.resolveUrl)(this.opts.uriResolver,n,i)),new s({schema:t,schemaId:r,root:e,baseId:n})}return f.call(this,r,c)}}e.SchemaEnv=s,e.compileSchema=d,e.resolveRef=function(e,t,r){var i;r=(0,o.resolveUrl)(this.opts.uriResolver,t,r);let n=e.refs[r];if(n)return n;let a=p.call(this,e,r);if(void 0===a){let o=null==(i=e.localRefs)?void 0:i[r],{schemaId:n}=this.opts;o&&(a=new s({schema:o,schemaId:n,root:e,baseId:t}))}if(void 0!==a)return e.refs[r]=c.call(this,a)},e.getCompilingSchema=l,e.resolveSchema=u;let m=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function f(e,{baseId:t,schema:r,root:i}){var a;let d;if((null==(a=e.fragment)?void 0:a[0])!=="/")return;for(let i of e.fragment.slice(1).split("/")){if("boolean"==typeof r)return;let e=r[(0,n.unescapeFragment)(i)];if(void 0===e)return;let a="object"==typeof(r=e)&&r[this.opts.schemaId];!m.has(i)&&a&&(t=(0,o.resolveUrl)(this.opts.uriResolver,t,a))}if("boolean"!=typeof r&&r.$ref&&!(0,n.schemaHasRulesButRef)(r,this.RULES)){let e=(0,o.resolveUrl)(this.opts.uriResolver,t,r.$ref);d=u.call(this,i,e)}let{schemaId:c}=this.opts;if((d=d||new s({schema:r,schemaId:c,root:i,baseId:t})).schema!==d.root.schema)return d}}),x4=S0((e,t)=>{t.exports={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}}),x6=S0((e,t)=>{let r=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),i=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);function o(e){let t="",r=0,i=0;for(i=0;i=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";t+=e[i];break}for(i+=1;i=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";t+=e[i]}return t}function n(e){return e.length=0,!0}function a(e,t,r){if(e.length){let i=o(e);if(""===i)return r.error=!0,!1;t.push(i),e.length=0}return!0}function s(e){if(2>function(e){let t=0;for(let r=0;r7){r.error=!0;break}o>0&&":"===e[o-1]&&(d=!0),i.push(":");continue}else if("%"===a){if(!l(s,i,r))break;l=n}else{s.push(a);continue}}return s.length&&(l===n?r.zone=s.join(""):c?i.push(s.join("")):i.push(o(s))),r.address=i.join(""),r}(e);if(t.error)return{host:e,isIPV6:!1};{let e=t.address,r=t.address;return t.zone&&(e+="%"+t.zone,r+="%25"+t.zone),{host:e,isIPV6:!0,escapedHost:r}}}t.exports={nonSimpleDomain:RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u),recomposeAuthority:function(e){let t=[];if(void 0!==e.userinfo&&(t.push(e.userinfo),t.push("@")),void 0!==e.host){let r=unescape(e.host);if(!i(r)){let t=s(r);r=!0===t.isIPV6?`[${t.escapedHost}]`:e.host}t.push(r)}return("number"==typeof e.port||"string"==typeof e.port)&&(t.push(":"),t.push(String(e.port))),t.length?t.join(""):void 0},normalizeComponentEncoding:function(e,t){let r=!0!==t?escape:unescape;return void 0!==e.scheme&&(e.scheme=r(e.scheme)),void 0!==e.userinfo&&(e.userinfo=r(e.userinfo)),void 0!==e.host&&(e.host=r(e.host)),void 0!==e.path&&(e.path=r(e.path)),void 0!==e.query&&(e.query=r(e.query)),void 0!==e.fragment&&(e.fragment=r(e.fragment)),e},removeDotSegments:function(e){let t=e,r=[],i=-1,o=0;for(;o=t.length;){if(1===o)if("."===t)break;else if("/"===t){r.push("/");break}else{r.push(t);break}if(2===o){if("."===t[0]){if("."===t[1])break;else if("/"===t[1]){t=t.slice(2);continue}}else if("/"===t[0]&&("."===t[1]||"/"===t[1])){r.push("/");break}}else if(3===o&&"/.."===t){0!==r.length&&r.pop(),r.push("/");break}if("."===t[0]){if("."===t[1]){if("/"===t[2]){t=t.slice(3);continue}}else if("/"===t[1]){t=t.slice(2);continue}}else if("/"===t[0]&&"."===t[1]){if("/"===t[2]){t=t.slice(2);continue}else if("."===t[2]&&"/"===t[3]){t=t.slice(3),0!==r.length&&r.pop();continue}}if(-1===(i=t.indexOf("/",1))){r.push(t);break}r.push(t.slice(0,i)),t=t.slice(i)}return r.join("")},isIPv4:i,isUUID:r,normalizeIPv6:s,stringArrayToHexStripped:o}}),x3=S0((e,t)=>{let{isUUID:r}=x6(),i=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,o=["http","https","ws","wss","urn","urn:uuid"];function n(e){return!0===e.secure||!1!==e.secure&&!!e.scheme&&3===e.scheme.length&&("w"===e.scheme[0]||"W"===e.scheme[0])&&("s"===e.scheme[1]||"S"===e.scheme[1])&&("s"===e.scheme[2]||"S"===e.scheme[2])}function a(e){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e}function s(e){let t="https"===String(e.scheme).toLowerCase();return(e.port===(t?443:80)||""===e.port)&&(e.port=void 0),e.path||(e.path="/"),e}let d={scheme:"http",domainHost:!0,parse:a,serialize:s},c={scheme:"https",domainHost:d.domainHost,parse:a,serialize:s},l={scheme:"ws",domainHost:!0,parse:function(e){return e.secure=n(e),e.resourceName=(e.path||"/")+(e.query?"?"+e.query:""),e.path=void 0,e.query=void 0,e},serialize:function(e){if((e.port===(n(e)?443:80)||""===e.port)&&(e.port=void 0),"boolean"==typeof e.secure&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){let[t,r]=e.resourceName.split("?");e.path=t&&"/"!==t?t:void 0,e.query=r,e.resourceName=void 0}return e.fragment=void 0,e}},p={scheme:"wss",domainHost:l.domainHost,parse:l.parse,serialize:l.serialize},u={http:d,https:c,ws:l,wss:p,urn:{scheme:"urn",parse:function(e,t){if(!e.path)return e.error="URN can not be parsed",e;let r=e.path.match(i);if(r){let i=t.scheme||e.scheme||"urn";e.nid=r[1].toLowerCase(),e.nss=r[2];let o=m(`${i}:${t.nid||e.nid}`);e.path=void 0,o&&(e=o.parse(e,t))}else e.error=e.error||"URN can not be parsed.";return e},serialize:function(e,t){if(void 0===e.nid)throw Error("URN without nid cannot be serialized");let r=t.scheme||e.scheme||"urn",i=e.nid.toLowerCase(),o=m(`${r}:${t.nid||i}`);o&&(e=o.serialize(e,t));let n=e,a=e.nss;return n.path=`${i||t.nid}:${a}`,t.skipEscape=!0,n},skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:function(e,t){return e.uuid=e.nss,e.nss=void 0,t.tolerant||e.uuid&&r(e.uuid)||(e.error=e.error||"UUID is not valid."),e},serialize:function(e){return e.nss=(e.uuid||"").toLowerCase(),e},skipNormalize:!0}};function m(e){return e&&(u[e]||u[e.toLowerCase()])||void 0}Object.setPrototypeOf(u,null),t.exports={wsIsSecure:n,SCHEMES:u,isValidSchemeName:function(e){return -1!==o.indexOf(e)},getSchemeHandler:m}}),x9=S0((e,t)=>{let{normalizeIPv6:r,removeDotSegments:i,recomposeAuthority:o,normalizeComponentEncoding:n,isIPv4:a,nonSimpleDomain:s}=x6(),{SCHEMES:d,getSchemeHandler:c}=x3();function l(e,t,r,o){let n={};return o||(e=m(p(e,r),r),t=m(p(t,r),r)),!(r=r||{}).tolerant&&t.scheme?(n.scheme=t.scheme,n.userinfo=t.userinfo,n.host=t.host,n.port=t.port,n.path=i(t.path||""),n.query=t.query):(void 0!==t.userinfo||void 0!==t.host||void 0!==t.port?(n.userinfo=t.userinfo,n.host=t.host,n.port=t.port,n.path=i(t.path||""),n.query=t.query):(t.path?("/"===t.path[0]?n.path=i(t.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?n.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:n.path=t.path:n.path="/"+t.path,n.path=i(n.path)),n.query=t.query):(n.path=e.path,void 0!==t.query?n.query=t.query:n.query=e.query),n.userinfo=e.userinfo,n.host=e.host,n.port=e.port),n.scheme=e.scheme),n.fragment=t.fragment,n}function p(e,t){let r={host:e.host,scheme:e.scheme,userinfo:e.userinfo,port:e.port,path:e.path,query:e.query,nid:e.nid,nss:e.nss,uuid:e.uuid,fragment:e.fragment,reference:e.reference,resourceName:e.resourceName,secure:e.secure,error:""},n=Object.assign({},t),a=[],s=c(n.scheme||r.scheme);s&&s.serialize&&s.serialize(r,n),void 0!==r.path&&(n.skipEscape?r.path=unescape(r.path):(r.path=escape(r.path),void 0!==r.scheme&&(r.path=r.path.split("%3A").join(":")))),"suffix"!==n.reference&&r.scheme&&a.push(r.scheme,":");let d=o(r);if(void 0!==d&&("suffix"!==n.reference&&a.push("//"),a.push(d),r.path&&"/"!==r.path[0]&&a.push("/")),void 0!==r.path){let e=r.path;n.absolutePath||s&&s.absolutePath||(e=i(e)),void 0===d&&"/"===e[0]&&"/"===e[1]&&(e="/%2F"+e.slice(2)),a.push(e)}return void 0!==r.query&&a.push("?",r.query),void 0!==r.fragment&&a.push("#",r.fragment),a.join("")}let u=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function m(e,t){let i=Object.assign({},t),o={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},n=!1;"suffix"===i.reference&&(e=i.scheme?i.scheme+":"+e:"//"+e);let d=e.match(u);if(d){if(o.scheme=d[1],o.userinfo=d[3],o.host=d[4],o.port=parseInt(d[5],10),o.path=d[6]||"",o.query=d[7],o.fragment=d[8],isNaN(o.port)&&(o.port=d[5]),o.host)if(!1===a(o.host)){let e=r(o.host);o.host=e.host.toLowerCase(),n=e.isIPV6}else n=!0;void 0!==o.scheme||void 0!==o.userinfo||void 0!==o.host||void 0!==o.port||void 0!==o.query||o.path?void 0===o.scheme?o.reference="relative":void 0===o.fragment?o.reference="absolute":o.reference="uri":o.reference="same-document",i.reference&&"suffix"!==i.reference&&i.reference!==o.reference&&(o.error=o.error||"URI is not a "+i.reference+" reference.");let t=c(i.scheme||o.scheme);if(!i.unicodeSupport&&(!t||!t.unicodeSupport)&&o.host&&(i.domainHost||t&&t.domainHost)&&!1===n&&s(o.host))try{o.host=URL.domainToASCII(o.host.toLowerCase())}catch(e){o.error=o.error||"Host's domain name can not be converted to ASCII: "+e}(!t||t&&!t.skipNormalize)&&(-1!==e.indexOf("%")&&(void 0!==o.scheme&&(o.scheme=unescape(o.scheme)),void 0!==o.host&&(o.host=unescape(o.host))),o.path&&(o.path=escape(unescape(o.path))),o.fragment&&(o.fragment=encodeURI(decodeURIComponent(o.fragment)))),t&&t.parse&&t.parse(o,i)}else o.error=o.error||"URI can not be parsed.";return o}let f={SCHEMES:d,normalize:function(e,t){return"string"==typeof e?e=p(m(e,t),t):"object"==typeof e&&(e=m(p(e,t),t)),e},resolve:function(e,t,r){let i=r?Object.assign({scheme:"null"},r):{scheme:"null"},o=l(m(e,i),m(t,i),i,!0);return i.skipEscape=!0,p(o,i)},resolveComponent:l,equal:function(e,t,r){return"string"==typeof e?e=p(n(m(e=unescape(e),r),!0),{...r,skipEscape:!0}):"object"==typeof e&&(e=p(n(e,!0),{...r,skipEscape:!0})),"string"==typeof t?t=p(n(m(t=unescape(t),r),!0),{...r,skipEscape:!0}):"object"==typeof t&&(t=p(n(t,!0),{...r,skipEscape:!0})),e.toLowerCase()===t.toLowerCase()},serialize:p,parse:m};t.exports=f,t.exports.default=f,t.exports.fastUri=f}),x5=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=x9();t.code='require("ajv/dist/runtime/uri").default',e.default=t}),x8=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var t=xY();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var r=xM();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return r.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return r.CodeGen}});let i=x1(),o=x0(),n=xL(),a=x2(),s=xM(),d=xX(),c=xH(),l=xN(),p=x4(),u=x5(),m=(e,t)=>new RegExp(e,t);m.code="new RegExp";let f=["removeAdditional","useDefaults","coerceTypes"],h=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),y={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},g={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'};var _=class{constructor(e={}){var t,r,i,o,a,d,c,l,p,f,_,b,P,R,q,I,x,j,C,T,O,E,A,W,M,N;let z,D,F,L,U;this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...(z=(t=e).strict,F=!0===(D=null==(r=t.code)?void 0:r.optimize)||void 0===D?1:D||0,L=null!=(o=null==(i=t.code)?void 0:i.regExp)?o:m,U=null!=(a=t.uriResolver)?a:u.default,{strictSchema:null==(c=null!=(d=t.strictSchema)?d:z)||c,strictNumbers:null==(p=null!=(l=t.strictNumbers)?l:z)||p,strictTypes:null!=(_=null!=(f=t.strictTypes)?f:z)?_:"log",strictTuples:null!=(P=null!=(b=t.strictTuples)?b:z)?P:"log",strictRequired:null!=(q=null!=(R=t.strictRequired)?R:z)&&q,code:t.code?{...t.code,optimize:F,regExp:L}:{optimize:F,regExp:L},loopRequired:null!=(I=t.loopRequired)?I:200,loopEnum:null!=(x=t.loopEnum)?x:200,meta:null==(j=t.meta)||j,messages:null==(C=t.messages)||C,inlineRefs:null==(T=t.inlineRefs)||T,schemaId:null!=(O=t.schemaId)?O:"$id",addUsedSchema:null==(E=t.addUsedSchema)||E,validateSchema:null==(A=t.validateSchema)||A,validateFormats:null==(W=t.validateFormats)||W,unicodeRegExp:null==(M=t.unicodeRegExp)||M,int32range:null==(N=t.int32range)||N,uriResolver:U})};let{es5:H,lines:G}=this.opts.code;this.scope=new s.ValueScope({scope:{},prefixes:h,es5:H,lines:G}),this.logger=function(e){if(!1===e)return V;if(void 0===e)return console;if(e.log&&e.warn&&e.error)return e;throw Error("logger must implement log, warn and error methods")}(e.logger);let B=e.validateFormats;e.validateFormats=!1,this.RULES=(0,n.getRules)(),v.call(this,y,e,"NOT SUPPORTED"),v.call(this,g,e,"DEPRECATED","warn"),this._metaOpts=w.call(this),e.formats&&S.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&k.call(this,e.keywords),"object"==typeof e.meta&&this.addMetaSchema(e.meta),$.call(this),e.validateFormats=B}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:e,meta:t,schemaId:r}=this.opts,i=p;"id"===r&&((i={...p}).id=i.$id,delete i.$id),t&&e&&this.addMetaSchema(i,i[r],!1)}defaultMeta(){let{meta:e,schemaId:t}=this.opts;return this.opts.defaultMeta="object"==typeof e?e[t]||e:void 0}validate(e,t){let r;if("string"==typeof e){if(!(r=this.getSchema(e)))throw Error(`no schema with key or ref "${e}"`)}else r=this.compile(e);let i=r(t);return"$async"in r||(this.errors=r.errors),i}compile(e,t){let r=this._addSchema(e,t);return r.validate||this._compileSchemaEnv(r)}compileAsync(e,t){if("function"!=typeof this.opts.loadSchema)throw Error("options.loadSchema should be a function");let{loadSchema:r}=this.opts;return i.call(this,e,t);async function i(e,t){await n.call(this,e.$schema);let r=this._addSchema(e,t);return r.validate||a.call(this,r)}async function n(e){e&&!this.getSchema(e)&&await i.call(this,{$ref:e},!0)}async function a(e){try{return this._compileSchemaEnv(e)}catch(t){if(!(t instanceof o.default))throw t;return s.call(this,t),await d.call(this,t.missingSchema),a.call(this,e)}}function s({missingSchema:e,missingRef:t}){if(this.refs[e])throw Error(`AnySchema ${e} is loaded but ${t} cannot be resolved`)}async function d(e){let r=await c.call(this,e);this.refs[e]||await n.call(this,r.$schema),this.refs[e]||this.addSchema(r,e,t)}async function c(e){let t=this._loading[e];if(t)return t;try{return await (this._loading[e]=r(e))}finally{delete this._loading[e]}}}addSchema(e,t,r,i=this.opts.validateSchema){let o;if(Array.isArray(e)){for(let t of e)this.addSchema(t,void 0,r,i);return this}if("object"==typeof e){let{schemaId:t}=this.opts;if(void 0!==(o=e[t])&&"string"!=typeof o)throw Error(`schema ${t} must be string`)}return t=(0,d.normalizeId)(t||o),this._checkUnique(t),this.schemas[t]=this._addSchema(e,r,t,i,!0),this}addMetaSchema(e,t,r=this.opts.validateSchema){return this.addSchema(e,t,!0,r),this}validateSchema(e,t){let r;if("boolean"==typeof e)return!0;if(void 0!==(r=e.$schema)&&"string"!=typeof r)throw Error("$schema must be a string");if(!(r=r||this.opts.defaultMeta||this.defaultMeta()))return this.logger.warn("meta-schema not available"),this.errors=null,!0;let i=this.validate(r,e);if(!i&&t){let e="schema is invalid: "+this.errorsText();if("log"===this.opts.validateSchema)this.logger.error(e);else throw Error(e)}return i}getSchema(e){let t;for(;"string"==typeof(t=b.call(this,e));)e=t;if(void 0===t){let{schemaId:r}=this.opts,i=new a.SchemaEnv({schema:{},schemaId:r});if(!(t=a.resolveSchema.call(this,i,e)))return;this.refs[e]=t}return t.validate||this._compileSchemaEnv(t)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let t=b.call(this,e);return"object"==typeof t&&this._cache.delete(t.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{this._cache.delete(e);let t=e[this.opts.schemaId];return t&&(t=(0,d.normalizeId)(t),delete this.schemas[t],delete this.refs[t]),this}default:throw Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(let t of e)this.addKeyword(t);return this}addKeyword(e,t){let r;if("string"==typeof e)r=e,"object"==typeof t&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),t.keyword=r);else if("object"==typeof e&&void 0===t){if(Array.isArray(r=(t=e).keyword)&&!r.length)throw Error("addKeywords: keyword must be string or non-empty array")}else throw Error("invalid addKeywords parameters");if(R.call(this,r,t),!t)return(0,l.eachItem)(r,e=>q.call(this,e)),this;x.call(this,t);let i={...t,type:(0,c.getJSONTypes)(t.type),schemaType:(0,c.getJSONTypes)(t.schemaType)};return(0,l.eachItem)(r,0===i.type.length?e=>q.call(this,e,i):e=>i.type.forEach(t=>q.call(this,e,i,t))),this}getKeyword(e){let t=this.RULES.all[e];return"object"==typeof t?t.definition:!!t}removeKeyword(e){let{RULES:t}=this;for(let r of(delete t.keywords[e],delete t.all[e],t.rules)){let t=r.rules.findIndex(t=>t.keyword===e);t>=0&&r.rules.splice(t,1)}return this}addFormat(e,t){return"string"==typeof t&&(t=new RegExp(t)),this.formats[e]=t,this}errorsText(e=this.errors,{separator:t=", ",dataVar:r="data"}={}){return e&&0!==e.length?e.map(e=>`${r}${e.instancePath} ${e.message}`).reduce((e,r)=>e+t+r):"No errors"}$dataMetaSchema(e,t){let r=this.RULES.all;for(let i of(e=JSON.parse(JSON.stringify(e)),t)){let t=i.split("/").slice(1),o=e;for(let e of t)o=o[e];for(let e in r){let t=r[e];if("object"!=typeof t)continue;let{$data:i}=t.definition,n=o[e];i&&n&&(o[e]=C(n))}}return e}_removeAllSchemas(e,t){for(let r in e){let i=e[r];(!t||t.test(r))&&("string"==typeof i?delete e[r]:i&&!i.meta&&(this._cache.delete(i.schema),delete e[r]))}}_addSchema(e,t,r,i=this.opts.validateSchema,o=this.opts.addUsedSchema){let n,{schemaId:s}=this.opts;if("object"==typeof e)n=e[s];else if(this.opts.jtd)throw Error("schema must be object");else if("boolean"!=typeof e)throw Error("schema must be object or boolean");let c=this._cache.get(e);if(void 0!==c)return c;r=(0,d.normalizeId)(n||r);let l=d.getSchemaRefs.call(this,e,r);return c=new a.SchemaEnv({schema:e,schemaId:s,meta:t,baseId:r,localRefs:l}),this._cache.set(c.schema,c),o&&!r.startsWith("#")&&(r&&this._checkUnique(r),this.refs[r]=c),i&&this.validateSchema(e,!0),c}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):a.compileSchema.call(this,e),!e.validate)throw Error("ajv implementation error");return e.validate}_compileMetaSchema(e){let t=this.opts;this.opts=this._metaOpts;try{a.compileSchema.call(this,e)}finally{this.opts=t}}};function v(e,t,r,i="error"){for(let o in e)o in t&&this.logger[i](`${r}: option ${o}. ${e[o]}`)}function b(e){return e=(0,d.normalizeId)(e),this.schemas[e]||this.refs[e]}function $(){let e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(let t in e)this.addSchema(e[t],t)}function S(){for(let e in this.opts.formats){let t=this.opts.formats[e];t&&this.addFormat(e,t)}}function k(e){if(Array.isArray(e))return void this.addVocabulary(e);for(let t in this.logger.warn("keywords option as map is deprecated, pass array"),e){let r=e[t];r.keyword||(r.keyword=t),this.addKeyword(r)}}function w(){let e={...this.opts};for(let t of f)delete e[t];return e}_.ValidationError=i.default,_.MissingRefError=o.default,e.default=_;let V={log(){},warn(){},error(){}},P=/^[a-z_$][a-z0-9_$:-]*$/i;function R(e,t){let{RULES:r}=this;if((0,l.eachItem)(e,e=>{if(r.keywords[e])throw Error(`Keyword ${e} is already defined`);if(!P.test(e))throw Error(`Keyword ${e} has invalid name`)}),t&&t.$data&&!("code"in t||"validate"in t))throw Error('$data keyword must have "code" or "validate" function')}function q(e,t,r){var i;let o=null==t?void 0:t.post;if(r&&o)throw Error('keyword with "post" flag cannot have "type"');let{RULES:n}=this,a=o?n.post:n.rules.find(({type:e})=>e===r);if(a||(a={type:r,rules:[]},n.rules.push(a)),n.keywords[e]=!0,!t)return;let s={keyword:e,definition:{...t,type:(0,c.getJSONTypes)(t.type),schemaType:(0,c.getJSONTypes)(t.schemaType)}};t.before?I.call(this,a,s,t.before):a.rules.push(s),n.all[e]=s,null==(i=t.implements)||i.forEach(e=>this.addKeyword(e))}function I(e,t,r){let i=e.rules.findIndex(e=>e.keyword===r);i>=0?e.rules.splice(i,0,t):(e.rules.push(t),this.logger.warn(`rule ${r} is not defined`))}function x(e){let{metaSchema:t}=e;void 0!==t&&(e.$data&&this.opts.$data&&(t=C(t)),e.validateSchema=this.compile(t,!0))}let j={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function C(e){return{anyOf:[e,j]}}}),x7=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={keyword:"id",code(){throw Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}}}),je=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.callRef=e.getValidate=void 0;let t=x0(),r=xB(),i=xM(),o=xz(),n=x2(),a=xN();function s(e,t){let{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):(0,i._)`${r.scopeValue("wrapper",{ref:t})}.validate`}function d(e,t,n,s){let{gen:d,it:c}=e,{allErrors:l,schemaEnv:p,opts:u}=c,m=u.passContext?o.default.this:i.nil;function f(e){let t=(0,i._)`${e}.errors`;d.assign(o.default.vErrors,(0,i._)`${o.default.vErrors} === null ? ${t} : ${o.default.vErrors}.concat(${t})`),d.assign(o.default.errors,(0,i._)`${o.default.vErrors}.length`)}function h(e){var t;if(!c.opts.unevaluated)return;let r=null==(t=null==n?void 0:n.validate)?void 0:t.evaluated;if(!0!==c.props)if(r&&!r.dynamicProps)void 0!==r.props&&(c.props=a.mergeEvaluated.props(d,r.props,c.props));else{let t=d.var("props",(0,i._)`${e}.evaluated.props`);c.props=a.mergeEvaluated.props(d,t,c.props,i.Name)}if(!0!==c.items)if(r&&!r.dynamicItems)void 0!==r.items&&(c.items=a.mergeEvaluated.items(d,r.items,c.items));else{let t=d.var("items",(0,i._)`${e}.evaluated.items`);c.items=a.mergeEvaluated.items(d,t,c.items,i.Name)}}s?function(){if(!p.$async)throw Error("async schema referenced by sync schema");let o=d.let("valid");d.try(()=>{d.code((0,i._)`await ${(0,r.callValidateCode)(e,t,m)}`),h(t),l||d.assign(o,!0)},e=>{d.if((0,i._)`!(${e} instanceof ${c.ValidationError})`,()=>d.throw(e)),f(e),l||d.assign(o,!1)}),e.ok(o)}():e.result((0,r.callValidateCode)(e,t,m),()=>h(t),()=>f(t))}e.getValidate=s,e.callRef=d,e.default={keyword:"$ref",schemaType:"string",code(e){var r,o;let a,c,l,{gen:p,schema:u,it:m}=e,{baseId:f,schemaEnv:h,validateName:y,opts:g,self:_}=m,{root:v}=h;if(("#"===u||"#/"===u)&&f===v.baseId){if(h===v)return d(e,y,h,h.$async);let t=p.scopeValue("root",{ref:v});return d(e,(0,i._)`${t}.validate`,v,v.$async)}let b=n.resolveRef.call(_,v,f,u);if(void 0===b)throw new t.default(m.opts.uriResolver,f,u);return b instanceof n.SchemaEnv?void d(e,s(e,r=b),r,r.$async):(o=b,a=p.scopeValue("schema",!0===g.code.source?{ref:o,code:(0,i.stringify)(o)}:{ref:o}),c=p.name("valid"),l=e.subschema({schema:o,dataTypes:[],schemaPath:i.nil,topSchemaRef:a,errSchemaPath:u},c),void(e.mergeEvaluated(l),e.ok(c)))}}}),jt=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=x7(),r=je();e.default=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",t.default,r.default]}),jr=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xM(),r=t.operators,i={maximum:{okStr:"<=",ok:r.LTE,fail:r.GT},minimum:{okStr:">=",ok:r.GTE,fail:r.LT},exclusiveMaximum:{okStr:"<",ok:r.LT,fail:r.GTE},exclusiveMinimum:{okStr:">",ok:r.GT,fail:r.LTE}};e.default={keyword:Object.keys(i),type:"number",schemaType:"number",$data:!0,error:{message:({keyword:e,schemaCode:r})=>(0,t.str)`must be ${i[e].okStr} ${r}`,params:({keyword:e,schemaCode:r})=>(0,t._)`{comparison: ${i[e].okStr}, limit: ${r}}`},code(e){let{keyword:r,data:o,schemaCode:n}=e;e.fail$data((0,t._)`${o} ${i[r].fail} ${n} || isNaN(${o})`)}}}),ji=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xM();e.default={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:e})=>(0,t.str)`must be multiple of ${e}`,params:({schemaCode:e})=>(0,t._)`{multipleOf: ${e}}`},code(e){let{gen:r,data:i,schemaCode:o,it:n}=e,a=n.opts.multipleOfPrecision,s=r.let("res"),d=a?(0,t._)`Math.abs(Math.round(${s}) - ${s}) > 1e-${a}`:(0,t._)`${s} !== parseInt(${s})`;e.fail$data((0,t._)`(${o} === 0 || (${s} = ${i}/${o}, ${d}))`)}}}),jo=S0(e=>{function t(e){let t,r=e.length,i=0,o=0;for(;o=55296&&t<=56319&&o{Object.defineProperty(e,"__esModule",{value:!0});let t=xM(),r=xN(),i=jo();e.default={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message:({keyword:e,schemaCode:r})=>(0,t.str)`must NOT have ${"maxLength"===e?"more":"fewer"} than ${r} characters`,params:({schemaCode:e})=>(0,t._)`{limit: ${e}}`},code(e){let{keyword:o,data:n,schemaCode:a,it:s}=e,d="maxLength"===o?t.operators.GT:t.operators.LT,c=!1===s.opts.unicode?(0,t._)`${n}.length`:(0,t._)`${(0,r.useFunc)(e.gen,i.default)}(${n})`;e.fail$data((0,t._)`${c} ${d} ${a}`)}}}),ja=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xB(),r=xN(),i=xM();e.default={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>(0,i.str)`must match pattern "${e}"`,params:({schemaCode:e})=>(0,i._)`{pattern: ${e}}`},code(e){let{gen:o,data:n,$data:a,schema:s,schemaCode:d,it:c}=e,l=c.opts.unicodeRegExp?"u":"";if(a){let{regExp:t}=c.opts.code,a="new RegExp"===t.code?(0,i._)`new RegExp`:(0,r.useFunc)(o,t),s=o.let("valid");o.try(()=>o.assign(s,(0,i._)`${a}(${d}, ${l}).test(${n})`),()=>o.assign(s,!1)),e.fail$data((0,i._)`!${s}`)}else{let r=(0,t.usePattern)(e,s);e.fail$data((0,i._)`!${r}.test(${n})`)}}}}),js=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xM();e.default={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message:({keyword:e,schemaCode:r})=>(0,t.str)`must NOT have ${"maxProperties"===e?"more":"fewer"} than ${r} properties`,params:({schemaCode:e})=>(0,t._)`{limit: ${e}}`},code(e){let{keyword:r,data:i,schemaCode:o}=e,n="maxProperties"===r?t.operators.GT:t.operators.LT;e.fail$data((0,t._)`Object.keys(${i}).length ${n} ${o}`)}}}),jd=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xB(),r=xM(),i=xN();e.default={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:e}})=>(0,r.str)`must have required property '${e}'`,params:({params:{missingProperty:e}})=>(0,r._)`{missingProperty: ${e}}`},code(e){let{gen:o,schema:n,schemaCode:a,data:s,$data:d,it:c}=e,{opts:l}=c;if(!d&&0===n.length)return;let p=n.length>=l.loopRequired;if(c.allErrors?function(){if(p||d)e.block$data(r.nil,u);else for(let r of n)(0,t.checkReportMissingProp)(e,r)}():function(){let i=o.let("missing");if(p||d){let n=o.let("valid",!0);e.block$data(n,()=>{var d,c;return d=i,c=n,void(e.setParams({missingProperty:d}),o.forOf(d,a,()=>{o.assign(c,(0,t.propertyInData)(o,s,d,l.ownProperties)),o.if((0,r.not)(c),()=>{e.error(),o.break()})},r.nil))}),e.ok(n)}else o.if((0,t.checkMissingProp)(e,n,i)),(0,t.reportMissingProp)(e,i),o.else()}(),l.strictRequired){let t=e.parentSchema.properties,{definedProperties:r}=e.it;for(let e of n)if((null==t?void 0:t[e])===void 0&&!r.has(e)){let t=`required property "${e}" is not defined at "${c.schemaEnv.baseId+c.errSchemaPath}" (strictRequired)`;(0,i.checkStrictMode)(c,t,c.opts.strictRequired)}}function u(){o.forOf("prop",a,r=>{e.setParams({missingProperty:r}),o.if((0,t.noPropertyInData)(o,s,r,l.ownProperties),()=>e.error())})}}}}),jc=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xM();e.default={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message:({keyword:e,schemaCode:r})=>(0,t.str)`must NOT have ${"maxItems"===e?"more":"fewer"} than ${r} items`,params:({schemaCode:e})=>(0,t._)`{limit: ${e}}`},code(e){let{keyword:r,data:i,schemaCode:o}=e,n="maxItems"===r?t.operators.GT:t.operators.LT;e.fail$data((0,t._)`${i}.length ${n} ${o}`)}}}),jl=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xZ();t.code='require("ajv/dist/runtime/equal").default',e.default=t}),jp=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xH(),r=xM(),i=xN(),o=jl();e.default={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:e,j:t}})=>(0,r.str)`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>(0,r._)`{i: ${e}, j: ${t}}`},code(e){let{gen:n,data:a,$data:s,schema:d,parentSchema:c,schemaCode:l,it:p}=e;if(!s&&!d)return;let u=n.let("valid"),m=c.items?(0,t.getSchemaTypes)(c.items):[];e.block$data(u,function(){let s=n.let("i",(0,r._)`${a}.length`),d=n.let("j");e.setParams({i:s,j:d}),n.assign(u,!0),n.if((0,r._)`${s} > 1`,()=>(m.length>0&&!m.some(e=>"object"===e||"array"===e)?function(i,o){let s=n.name("item"),d=(0,t.checkDataTypes)(m,s,p.opts.strictNumbers,t.DataType.Wrong),c=n.const("indices",(0,r._)`{}`);n.for((0,r._)`;${i}--;`,()=>{n.let(s,(0,r._)`${a}[${i}]`),n.if(d,(0,r._)`continue`),m.length>1&&n.if((0,r._)`typeof ${s} == "string"`,(0,r._)`${s} += "_"`),n.if((0,r._)`typeof ${c}[${s}] == "number"`,()=>{n.assign(o,(0,r._)`${c}[${s}]`),e.error(),n.assign(u,!1).break()}).code((0,r._)`${c}[${s}] = ${i}`)})}:function(t,s){let d=(0,i.useFunc)(n,o.default),c=n.name("outer");n.label(c).for((0,r._)`;${t}--;`,()=>n.for((0,r._)`${s} = ${t}; ${s}--;`,()=>n.if((0,r._)`${d}(${a}[${t}], ${a}[${s}])`,()=>{e.error(),n.assign(u,!1).break(c)})))})(s,d))},(0,r._)`${l} === false`),e.ok(u)}}}),ju=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xM(),r=xN(),i=jl();e.default={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:e})=>(0,t._)`{allowedValue: ${e}}`},code(e){let{gen:o,data:n,$data:a,schemaCode:s,schema:d}=e;a||d&&"object"==typeof d?e.fail$data((0,t._)`!${(0,r.useFunc)(o,i.default)}(${n}, ${s})`):e.fail((0,t._)`${d} !== ${n}`)}}}),jm=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xM(),r=xN(),i=jl();e.default={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:e})=>(0,t._)`{allowedValues: ${e}}`},code(e){let o,n,{gen:a,data:s,$data:d,schema:c,schemaCode:l,it:p}=e;if(!d&&0===c.length)throw Error("enum must have non-empty array");let u=c.length>=p.opts.loopEnum,m=()=>null!=o?o:o=(0,r.useFunc)(a,i.default);if(u||d)n=a.let("valid"),e.block$data(n,function(){a.assign(n,!1),a.forOf("v",l,e=>a.if((0,t._)`${m()}(${s}, ${e})`,()=>a.assign(n,!0).break()))});else{if(!Array.isArray(c))throw Error("ajv implementation error");let e=a.const("vSchema",l);n=(0,t.or)(...c.map((r,i)=>{var o,n;let a;return o=e,"object"==typeof(a=c[n=i])&&null!==a?(0,t._)`${m()}(${s}, ${o}[${n}])`:(0,t._)`${s} === ${a}`}))}e.pass(n)}}}),jf=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=jr(),r=ji(),i=jn(),o=ja(),n=js(),a=jd(),s=jc(),d=jp(),c=ju(),l=jm();e.default=[t.default,r.default,i.default,o.default,n.default,a.default,s.default,d.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},c.default,l.default]}),jh=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateAdditionalItems=void 0;let t=xM(),r=xN();function i(e,i){let{gen:o,schema:n,data:a,keyword:s,it:d}=e;d.items=!0;let c=o.const("len",(0,t._)`${a}.length`);if(!1===n)e.setParams({len:i.length}),e.pass((0,t._)`${c} <= ${i.length}`);else if("object"==typeof n&&!(0,r.alwaysValidSchema)(d,n)){let n=o.var("valid",(0,t._)`${c} <= ${i.length}`);o.if((0,t.not)(n),()=>{var a;return a=n,void o.forRange("i",i.length,c,i=>{e.subschema({keyword:s,dataProp:i,dataPropType:r.Type.Num},a),d.allErrors||o.if((0,t.not)(a),()=>o.break())})}),e.ok(n)}}e.validateAdditionalItems=i,e.default={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:e}})=>(0,t.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,t._)`{limit: ${e}}`},code(e){let{parentSchema:t,it:o}=e,{items:n}=t;Array.isArray(n)?i(e,n):(0,r.checkStrictMode)(o,'"additionalItems" is ignored when "items" is not an array of schemas')}}}),jy=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateTuple=void 0;let t=xM(),r=xN(),i=xB();function o(e,i,n=e.schema){let{gen:a,parentSchema:s,data:d,keyword:c,it:l}=e;(function(e){let{opts:t,errSchemaPath:o}=l,a=n.length,s=a===e.minItems&&(a===e.maxItems||!1===e[i]);if(t.strictTuples&&!s){let e=`"${c}" is ${a}-tuple, but minItems or maxItems/${i} are not specified or different at path "${o}"`;(0,r.checkStrictMode)(l,e,t.strictTuples)}})(s),l.opts.unevaluated&&n.length&&!0!==l.items&&(l.items=r.mergeEvaluated.items(a,n.length,l.items));let p=a.name("valid"),u=a.const("len",(0,t._)`${d}.length`);n.forEach((i,o)=>{(0,r.alwaysValidSchema)(l,i)||(a.if((0,t._)`${u} > ${o}`,()=>e.subschema({keyword:c,schemaProp:o,dataProp:o},p)),e.ok(p))})}e.validateTuple=o,e.default={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){let{schema:t,it:n}=e;if(Array.isArray(t))return o(e,"additionalItems",t);n.items=!0,(0,r.alwaysValidSchema)(n,t)||e.ok((0,i.validateArray)(e))}}}),jg=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=jy();e.default={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,t.validateTuple)(e,"items")}}),j_=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xM(),r=xN(),i=xB(),o=jh();e.default={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:e}})=>(0,t.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,t._)`{limit: ${e}}`},code(e){let{schema:t,parentSchema:n,it:a}=e,{prefixItems:s}=n;a.items=!0,(0,r.alwaysValidSchema)(a,t)||(s?(0,o.validateAdditionalItems)(e,s):e.ok((0,i.validateArray)(e)))}}}),jv=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xM(),r=xN();e.default={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:e,max:r}})=>void 0===r?(0,t.str)`must contain at least ${e} valid item(s)`:(0,t.str)`must contain at least ${e} and no more than ${r} valid item(s)`,params:({params:{min:e,max:r}})=>void 0===r?(0,t._)`{minContains: ${e}}`:(0,t._)`{minContains: ${e}, maxContains: ${r}}`},code(e){let i,o,{gen:n,schema:a,parentSchema:s,data:d,it:c}=e,{minContains:l,maxContains:p}=s;c.opts.next?(i=void 0===l?1:l,o=p):i=1;let u=n.const("len",(0,t._)`${d}.length`);if(e.setParams({min:i,max:o}),void 0===o&&0===i)return void(0,r.checkStrictMode)(c,'"minContains" == 0 without "maxContains": "contains" keyword ignored');if(void 0!==o&&i>o){(0,r.checkStrictMode)(c,'"minContains" > "maxContains" is always invalid'),e.fail();return}if((0,r.alwaysValidSchema)(c,a)){let r=(0,t._)`${u} >= ${i}`;void 0!==o&&(r=(0,t._)`${r} && ${u} <= ${o}`),e.pass(r);return}c.items=!0;let m=n.name("valid");function f(){let e=n.name("_valid"),r=n.let("count",0);h(e,()=>n.if(e,()=>{var e;return e=r,void(n.code((0,t._)`${e}++`),void 0===o?n.if((0,t._)`${e} >= ${i}`,()=>n.assign(m,!0).break()):(n.if((0,t._)`${e} > ${o}`,()=>n.assign(m,!1).break()),1===i?n.assign(m,!0):n.if((0,t._)`${e} >= ${i}`,()=>n.assign(m,!0))))}))}function h(t,i){n.forRange("i",0,u,o=>{e.subschema({keyword:"contains",dataProp:o,dataPropType:r.Type.Num,compositeRule:!0},t),i()})}void 0===o&&1===i?h(m,()=>n.if(m,()=>n.break())):0===i?(n.let(m,!0),void 0!==o&&n.if((0,t._)`${d}.length > 0`,f)):(n.let(m,!1),f()),e.result(m,()=>e.reset())}}}),jb=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;let t=xM(),r=xN(),i=xB();e.error={message:({params:{property:e,depsCount:r,deps:i}})=>(0,t.str)`must have ${1===r?"property":"properties"} ${i} when property ${e} is present`,params:({params:{property:e,depsCount:r,deps:i,missingProperty:o}})=>(0,t._)`{property: ${e}, missingProperty: ${o}, depsCount: ${r}, - deps: ${i}}`};let o={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(e){let[t,r]=function({schema:e}){let t={},r={};for(let i in e)"__proto__"!==i&&((Array.isArray(e[i])?t:r)[i]=e[i]);return[t,r]}(e);n(e,t),a(e,r)}};function n(e,r=e.schema){let{gen:o,data:a,it:s}=e;if(0===Object.keys(r).length)return;let d=o.let("missing");for(let n in r){let c=r[n];if(0===c.length)continue;let l=(0,i.propertyInData)(o,a,n,s.opts.ownProperties);e.setParams({property:n,depsCount:c.length,deps:c.join(", ")}),s.allErrors?o.if(l,()=>{for(let t of c)(0,i.checkReportMissingProp)(e,t)}):(o.if((0,t._)`${l} && (${(0,i.checkMissingProp)(e,c,d)})`),(0,i.reportMissingProp)(e,d),o.else())}}function a(e,t=e.schema){let{gen:o,data:n,keyword:s,it:d}=e,c=o.name("valid");for(let a in t)(0,r.alwaysValidSchema)(d,t[a])||(o.if((0,i.propertyInData)(o,n,a,d.opts.ownProperties),()=>{let t=e.subschema({keyword:s,schemaProp:a},c);e.mergeValidEvaluated(t,c)},()=>o.var(c,!0)),e.ok(c))}e.validatePropertyDeps=n,e.validateSchemaDeps=a,e.default=o}),x2=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xc(),r=xl();e.default={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:e})=>(0,t._)`{propertyName: ${e.propertyName}}`},code(e){let{gen:i,schema:o,data:n,it:a}=e;if((0,r.alwaysValidSchema)(a,o))return;let s=i.name("valid");i.forIn("key",n,r=>{e.setParams({propertyName:r}),e.subschema({keyword:"propertyNames",data:r,dataTypes:["string"],propertyName:r,compositeRule:!0},s),i.if((0,t.not)(s),()=>{e.error(!0),a.allErrors||i.break()})}),e.ok(s)}}}),x4=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=x_(),r=xc(),i=xp(),o=xl();e.default={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:e})=>(0,r._)`{additionalProperty: ${e.additionalProperty}}`},code(e){let{gen:n,schema:a,parentSchema:s,data:d,errsCount:c,it:l}=e;if(!c)throw Error("ajv implementation error");let{allErrors:p,opts:u}=l;if(l.props=!0,"all"!==u.removeAdditional&&(0,o.alwaysValidSchema)(l,a))return;let m=(0,t.allSchemaProperties)(s.properties),f=(0,t.allSchemaProperties)(s.patternProperties);function h(e){n.code((0,r._)`delete ${d}[${e}]`)}function y(t){if("all"===u.removeAdditional||u.removeAdditional&&!1===a)return void h(t);if(!1===a){e.setParams({additionalProperty:t}),e.error(),p||n.break();return}if("object"==typeof a&&!(0,o.alwaysValidSchema)(l,a)){let i=n.name("valid");"failing"===u.removeAdditional?(g(t,i,!1),n.if((0,r.not)(i),()=>{e.reset(),h(t)})):(g(t,i),p||n.if((0,r.not)(i),()=>n.break()))}}function g(t,r,i){let n={keyword:"additionalProperties",dataProp:t,dataPropType:o.Type.Str};!1===i&&Object.assign(n,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(n,r)}n.forIn("key",d,i=>{m.length||f.length?n.if(function(i){let a;if(m.length>8){let e=(0,o.schemaRefOrVal)(l,s.properties,"properties");a=(0,t.isOwnProperty)(n,e,i)}else a=m.length?(0,r.or)(...m.map(e=>(0,r._)`${i} === ${e}`)):r.nil;return f.length&&(a=(0,r.or)(a,...f.map(o=>(0,r._)`${(0,t.usePattern)(e,o)}.test(${i})`))),(0,r.not)(a)}(i),()=>y(i)):y(i)}),e.ok((0,r._)`${c} === ${i.default.errors}`)}}}),x6=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xw(),r=x_(),i=xl(),o=x4();e.default={keyword:"properties",type:"object",schemaType:"object",code(e){let{gen:n,schema:a,parentSchema:s,data:d,it:c}=e;"all"===c.opts.removeAdditional&&void 0===s.additionalProperties&&o.default.code(new t.KeywordCxt(c,o.default,"additionalProperties"));let l=(0,r.allSchemaProperties)(a);for(let e of l)c.definedProperties.add(e);c.opts.unevaluated&&l.length&&!0!==c.props&&(c.props=i.mergeEvaluated.props(n,(0,i.toHash)(l),c.props));let p=l.filter(e=>!(0,i.alwaysValidSchema)(c,a[e]));if(0===p.length)return;let u=n.name("valid");for(let t of p){var m;(m=t,c.opts.useDefaults&&!c.compositeRule&&void 0!==a[m].default)?f(t):(n.if((0,r.propertyInData)(n,d,t,c.opts.ownProperties)),f(t),c.allErrors||n.else().var(u,!0),n.endIf()),e.it.definedProperties.add(t),e.ok(u)}function f(t){e.subschema({keyword:"properties",schemaProp:t,dataProp:t},u)}}}}),x3=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=x_(),r=xc(),i=xl(),o=xl();e.default={keyword:"patternProperties",type:"object",schemaType:"object",code(e){let{gen:n,schema:a,data:s,parentSchema:d,it:c}=e,{opts:l}=c,p=(0,t.allSchemaProperties)(a),u=p.filter(e=>(0,i.alwaysValidSchema)(c,a[e]));if(0===p.length||u.length===p.length&&(!c.opts.unevaluated||!0===c.props))return;let m=l.strictSchema&&!l.allowMatchingProperties&&d.properties,f=n.name("valid");!0===c.props||c.props instanceof r.Name||(c.props=(0,o.evaluatedPropsToName)(n,c.props));let{props:h}=c;for(let e of p)m&&function(e){for(let t in m)new RegExp(e).test(t)&&(0,i.checkStrictMode)(c,`property ${t} matches pattern ${e} (use allowMatchingProperties)`)}(e),c.allErrors?y(e):(n.var(f,!0),y(e),n.if(f));function y(i){n.forIn("key",s,a=>{n.if((0,r._)`${(0,t.usePattern)(e,i)}.test(${a})`,()=>{let t=u.includes(i);t||e.subschema({keyword:"patternProperties",schemaProp:i,dataProp:a,dataPropType:o.Type.Str},f),c.opts.unevaluated&&!0!==h?n.assign((0,r._)`${h}[${a}]`,!0):t||c.allErrors||n.if((0,r.not)(f),()=>n.break())})})}}}}),x9=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xl();e.default={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){let{gen:r,schema:i,it:o}=e;if((0,t.alwaysValidSchema)(o,i))return void e.fail();let n=r.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},n),e.failResult(n,()=>e.reset(),()=>e.error())},error:{message:"must NOT be valid"}}}),x5=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:x_().validateUnion,error:{message:"must match a schema in anyOf"}}}),x8=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xc(),r=xl();e.default={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:e})=>(0,t._)`{passingSchemas: ${e.passing}}`},code(e){let{gen:i,schema:o,parentSchema:n,it:a}=e;if(!Array.isArray(o))throw Error("ajv implementation error");if(a.opts.discriminator&&n.discriminator)return;let s=i.let("valid",!1),d=i.let("passing",null),c=i.name("_valid");e.setParams({passing:d}),i.block(function(){o.forEach((o,n)=>{let l;(0,r.alwaysValidSchema)(a,o)?i.var(c,!0):l=e.subschema({keyword:"oneOf",schemaProp:n,compositeRule:!0},c),n>0&&i.if((0,t._)`${c} && ${s}`).assign(s,!1).assign(d,(0,t._)`[${d}, ${n}]`).else(),i.if(c,()=>{i.assign(s,!0),i.assign(d,n),l&&e.mergeEvaluated(l,t.Name)})})}),e.result(s,()=>e.reset(),()=>e.error(!0))}}}),x7=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xl();e.default={keyword:"allOf",schemaType:"array",code(e){let{gen:r,schema:i,it:o}=e;if(!Array.isArray(i))throw Error("ajv implementation error");let n=r.name("valid");i.forEach((r,i)=>{if((0,t.alwaysValidSchema)(o,r))return;let a=e.subschema({keyword:"allOf",schemaProp:i},n);e.ok(n),e.mergeEvaluated(a)})}}}),je=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xc(),r=xl();function i(e,t){let i=e.schema[t];return void 0!==i&&!(0,r.alwaysValidSchema)(e,i)}e.default={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:e})=>(0,t.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,t._)`{failingKeyword: ${e.ifClause}}`},code(e){let o,{gen:n,parentSchema:a,it:s}=e;void 0===a.then&&void 0===a.else&&(0,r.checkStrictMode)(s,'"if" without "then" and "else" is ignored');let d=i(s,"then"),c=i(s,"else");if(!d&&!c)return;let l=n.let("valid",!0),p=n.name("_valid");if(o=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},p),e.mergeEvaluated(o),e.reset(),d&&c){let t=n.let("ifClause");e.setParams({ifClause:t}),n.if(p,u("then",t),u("else",t))}else d?n.if(p,u("then")):n.if((0,t.not)(p),u("else"));function u(r,i){return()=>{let o=e.subschema({keyword:r},p);n.assign(l,p),e.mergeValidEvaluated(o,l),i?n.assign(i,(0,t._)`${r}`):e.setParams({ifClause:r})}}e.pass(l,()=>e.error(!0))}}}),jt=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xl();e.default={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:r,it:i}){void 0===r.if&&(0,t.checkStrictMode)(i,`"${e}" without "if" is ignored`)}}}),jr=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xZ(),r=xX(),i=xQ(),o=xY(),n=x1(),a=x0(),s=x2(),d=x4(),c=x6(),l=x3(),p=x9(),u=x5(),m=x8(),f=x7(),h=je(),y=jt();e.default=function(e=!1){let g=[p.default,u.default,m.default,f.default,h.default,y.default,s.default,d.default,a.default,c.default,l.default];return e?g.push(r.default,o.default):g.push(t.default,i.default),g.push(n.default),g}}),ji=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xc();e.default={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>(0,t.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,t._)`{format: ${e}}`},code(e,r){let i,o,n,a,s,d,{gen:c,data:l,$data:p,schema:u,schemaCode:m,it:f}=e,{opts:h,errSchemaPath:y,schemaEnv:g,self:_}=f;h.validateFormats&&(p?(i=c.scopeValue("formats",{ref:_.formats,code:h.code.formats}),o=c.const("fDef",(0,t._)`${i}[${m}]`),n=c.let("fType"),a=c.let("format"),c.if((0,t._)`typeof ${o} == "object" && !(${o} instanceof RegExp)`,()=>c.assign(n,(0,t._)`${o}.type || "string"`).assign(a,(0,t._)`${o}.validate`),()=>c.assign(n,(0,t._)`"string"`).assign(a,o)),e.fail$data((0,t.or)(!1===h.strictSchema?t.nil:(0,t._)`${m} && !${a}`,(s=g.$async?(0,t._)`(${o}.async ? await ${a}(${l}) : ${a}(${l}))`:(0,t._)`${a}(${l})`,d=(0,t._)`(typeof ${a} == "function" ? ${s} : ${a}.test(${l}))`,(0,t._)`${a} && ${a} !== true && ${n} === ${r} && !${d}`)))):function(){var i;let o,n,a=_.formats[u];if(!a){if(!1===h.strictSchema)return _.logger.warn(s());throw Error(s());function s(){return`unknown format "${u}" ignored in schema at path "${y}"`}}if(!0===a)return;let[d,p,m]=(o=(i=a)instanceof RegExp?(0,t.regexpCode)(i):h.code.formats?(0,t._)`${h.code.formats}${(0,t.getProperty)(u)}`:void 0,n=c.scopeValue("formats",{key:u,ref:i,code:o}),"object"!=typeof i||i instanceof RegExp?["string",i,n]:[i.type||"string",i.validate,(0,t._)`${n}.validate`]);d===r&&e.pass(function(){if("object"==typeof a&&!(a instanceof RegExp)&&a.async){if(!g.$async)throw Error("async format in sync schema");return(0,t._)`await ${m}(${l})`}return"function"==typeof p?(0,t._)`${m}(${l})`:(0,t._)`${m}.test(${l})`}())}())}}}),jo=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=[ji().default]}),jn=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.contentVocabulary=e.metadataVocabulary=void 0,e.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],e.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]}),ja=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xA(),r=xJ(),i=jr(),o=jo(),n=jn();e.default=[t.default,r.default,(0,i.default)(),o.default,n.metadataVocabulary,n.contentVocabulary]}),js=SP(e=>{var t,r;Object.defineProperty(e,"__esModule",{value:!0}),e.DiscrError=void 0,(r=t||(e.DiscrError=t={})).Tag="tag",r.Mapping="mapping"}),jd=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xc(),r=js(),i=xV(),o=xP(),n=xl();e.default={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:e,tagName:t}})=>e===r.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:r,tagName:i}})=>(0,t._)`{error: ${e}, tag: ${i}, tagValue: ${r}}`},code(e){let{gen:a,data:s,schema:d,parentSchema:c,it:l}=e,{oneOf:p}=c;if(!l.opts.discriminator)throw Error("discriminator: requires discriminator option");let u=d.propertyName;if("string"!=typeof u)throw Error("discriminator: requires propertyName");if(d.mapping)throw Error("discriminator: mapping is not supported");if(!p)throw Error("discriminator: requires oneOf keyword");let m=a.let("valid",!1),f=a.const("tag",(0,t._)`${s}${(0,t.getProperty)(u)}`);a.if((0,t._)`typeof ${f} == "string"`,()=>(function(){let s=function(){var e;let t={},r=s(c),a=!0;for(let t=0;te.error(!1,{discrError:r.DiscrError.Tag,tag:f,tagName:u})),e.ok(m)}}}),jc=SP((e,t)=>{t.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}}),jl=SP((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.MissingRefError=e.ValidationError=e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=e.Ajv=void 0;let r=xT(),i=ja(),o=jd(),n=jc(),a=["/properties"],s="http://json-schema.org/draft-07/schema";var d=class extends r.default{_addVocabularies(){super._addVocabularies(),i.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(o.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let e=this.opts.$data?this.$dataMetaSchema(n,a):n;this.addMetaSchema(e,s,!1),this.refs["http://json-schema.org/schema"]=s}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(s)?s:void 0)}};e.Ajv=d,t.exports=e=d,t.exports.Ajv=d,Object.defineProperty(e,"__esModule",{value:!0}),e.default=d;var c=xw();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return c.KeywordCxt}});var l=xc();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return l._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return l.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return l.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return l.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return l.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return l.CodeGen}});var p=xR();Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return p.default}});var u=xP();Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return u.default}})}),jp=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.dynamicAnchor=void 0;let t=xc(),r=xp(),i=xV(),o=xE();function n(e,n){let{gen:a,it:s}=e;s.schemaEnv.root.dynamicAnchors[n]=!0;let d=(0,t._)`${r.default.dynamicAnchors}${(0,t.getProperty)(n)}`,c="#"===s.errSchemaPath?s.validateName:function(e){let{schemaEnv:t,schema:r,self:n}=e.it,{root:a,baseId:s,localRefs:d,meta:c}=t.root,{schemaId:l}=n.opts,p=new i.SchemaEnv({schema:r,schemaId:l,root:a,baseId:s,localRefs:d,meta:c});return i.compileSchema.call(n,p),(0,o.getValidate)(e,p)}(e);a.if((0,t._)`!${d}`,()=>a.assign(d,c))}e.dynamicAnchor=n,e.default={keyword:"$dynamicAnchor",schemaType:"string",code:e=>n(e,e.schema)}}),ju=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.dynamicRef=void 0;let t=xc(),r=xp(),i=xE();function o(e,o){let{gen:n,keyword:a,it:s}=e;if("#"!==o[0])throw Error(`"${a}" only supports hash fragment reference`);let d=o.slice(1);if(s.allErrors)c();else{let t=n.let("valid",!1);c(t),e.ok(t)}function c(e){if(s.schemaEnv.root.dynamicAnchors[d]){let i=n.let("_v",(0,t._)`${r.default.dynamicAnchors}${(0,t.getProperty)(d)}`);n.if(i,l(i,e),l(s.validateName,e))}else l(s.validateName,e)()}function l(t,r){return r?()=>n.block(()=>{(0,i.callRef)(e,t),n.let(r,!0)}):()=>(0,i.callRef)(e,t)}}e.dynamicRef=o,e.default={keyword:"$dynamicRef",schemaType:"string",code:e=>o(e,e.schema)}}),jm=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=jp(),r=xl();e.default={keyword:"$recursiveAnchor",schemaType:"boolean",code(e){e.schema?(0,t.dynamicAnchor)(e,""):(0,r.checkStrictMode)(e.it,"$recursiveAnchor: false is ignored")}}}),jf=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=ju();e.default={keyword:"$recursiveRef",schemaType:"string",code:e=>(0,t.dynamicRef)(e,e.schema)}}),jh=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=jp(),r=ju(),i=jm(),o=jf();e.default=[t.default,r.default,i.default,o.default]}),jy=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=x0();e.default={keyword:"dependentRequired",type:"object",schemaType:"object",error:t.error,code:e=>(0,t.validatePropertyDeps)(e)}}),jg=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=x0();e.default={keyword:"dependentSchemas",type:"object",schemaType:"object",code:e=>(0,t.validateSchemaDeps)(e)}}),j_=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xl();e.default={keyword:["maxContains","minContains"],type:"array",schemaType:"number",code({keyword:e,parentSchema:r,it:i}){void 0===r.contains&&(0,t.checkStrictMode)(i,`"${e}" without "contains" is ignored`)}}}),jv=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=jy(),r=jg(),i=j_();e.default=[t.default,r.default,i.default]}),jb=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xc(),r=xl(),i=xp();e.default={keyword:"unevaluatedProperties",type:"object",schemaType:["boolean","object"],trackErrors:!0,error:{message:"must NOT have unevaluated properties",params:({params:e})=>(0,t._)`{unevaluatedProperty: ${e.unevaluatedProperty}}`},code(e){let{gen:o,schema:n,data:a,errsCount:s,it:d}=e;if(!s)throw Error("ajv implementation error");let{allErrors:c,props:l}=d;function p(i){if(!1===n){e.setParams({unevaluatedProperty:i}),e.error(),c||o.break();return}if(!(0,r.alwaysValidSchema)(d,n)){let n=o.name("valid");e.subschema({keyword:"unevaluatedProperties",dataProp:i,dataPropType:r.Type.Str},n),c||o.if((0,t.not)(n),()=>o.break())}}l instanceof t.Name?o.if((0,t._)`${l} !== true`,()=>o.forIn("key",a,e=>{var r,i;return o.if((r=l,i=e,(0,t._)`!${r} || !${r}[${i}]`),()=>p(e))})):!0!==l&&o.forIn("key",a,e=>void 0===l?p(e):o.if(function(e,r){let i=[];for(let o in e)!0===e[o]&&i.push((0,t._)`${r} !== ${o}`);return(0,t.and)(...i)}(l,e),()=>p(e))),d.props=!0,e.ok((0,t._)`${s} === ${i.default.errors}`)}}}),j$=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xc(),r=xl();e.default={keyword:"unevaluatedItems",type:"array",schemaType:["boolean","object"],error:{message:({params:{len:e}})=>(0,t.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,t._)`{limit: ${e}}`},code(e){let{gen:i,schema:o,data:n,it:a}=e,s=a.items||0;if(!0===s)return;let d=i.const("len",(0,t._)`${n}.length`);if(!1===o)e.setParams({len:s}),e.fail((0,t._)`${d} > ${s}`);else if("object"==typeof o&&!(0,r.alwaysValidSchema)(a,o)){let o=i.var("valid",(0,t._)`${d} <= ${s}`);i.if((0,t.not)(o),()=>{var n,c;return n=o,c=s,void i.forRange("i",c,d,o=>{e.subschema({keyword:"unevaluatedItems",dataProp:o,dataPropType:r.Type.Num},n),a.allErrors||i.if((0,t.not)(n),()=>i.break())})}),e.ok(o)}a.items=!0}}}),jS=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=jb(),r=j$();e.default=[t.default,r.default]}),jk=SP((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/schema",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/core":!0,"https://json-schema.org/draft/2019-09/vocab/applicator":!0,"https://json-schema.org/draft/2019-09/vocab/validation":!0,"https://json-schema.org/draft/2019-09/vocab/meta-data":!0,"https://json-schema.org/draft/2019-09/vocab/format":!1,"https://json-schema.org/draft/2019-09/vocab/content":!0},$recursiveAnchor:!0,title:"Core and Validation specifications meta-schema",allOf:[{$ref:"meta/core"},{$ref:"meta/applicator"},{$ref:"meta/validation"},{$ref:"meta/meta-data"},{$ref:"meta/format"},{$ref:"meta/content"}],type:["object","boolean"],properties:{definitions:{$comment:"While no longer an official keyword as it is replaced by $defs, this keyword is retained in the meta-schema to prevent incompatible extensions as it remains in common use.",type:"object",additionalProperties:{$recursiveRef:"#"},default:{}},dependencies:{$comment:'"dependencies" is no longer a keyword, but schema authors should avoid redefining it to facilitate a smooth transition to "dependentSchemas" and "dependentRequired"',type:"object",additionalProperties:{anyOf:[{$recursiveRef:"#"},{$ref:"meta/validation#/$defs/stringArray"}]}}}}}),jw=SP((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/meta/applicator",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/applicator":!0},$recursiveAnchor:!0,title:"Applicator vocabulary meta-schema",type:["object","boolean"],properties:{additionalItems:{$recursiveRef:"#"},unevaluatedItems:{$recursiveRef:"#"},items:{anyOf:[{$recursiveRef:"#"},{$ref:"#/$defs/schemaArray"}]},contains:{$recursiveRef:"#"},additionalProperties:{$recursiveRef:"#"},unevaluatedProperties:{$recursiveRef:"#"},properties:{type:"object",additionalProperties:{$recursiveRef:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$recursiveRef:"#"},propertyNames:{format:"regex"},default:{}},dependentSchemas:{type:"object",additionalProperties:{$recursiveRef:"#"}},propertyNames:{$recursiveRef:"#"},if:{$recursiveRef:"#"},then:{$recursiveRef:"#"},else:{$recursiveRef:"#"},allOf:{$ref:"#/$defs/schemaArray"},anyOf:{$ref:"#/$defs/schemaArray"},oneOf:{$ref:"#/$defs/schemaArray"},not:{$recursiveRef:"#"}},$defs:{schemaArray:{type:"array",minItems:1,items:{$recursiveRef:"#"}}}}}),jR=SP((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/meta/content",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/content":!0},$recursiveAnchor:!0,title:"Content vocabulary meta-schema",type:["object","boolean"],properties:{contentMediaType:{type:"string"},contentEncoding:{type:"string"},contentSchema:{$recursiveRef:"#"}}}}),jP=SP((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/meta/core",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/core":!0},$recursiveAnchor:!0,title:"Core vocabulary meta-schema",type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference",$comment:"Non-empty fragments not allowed.",pattern:"^[^#]*#?$"},$schema:{type:"string",format:"uri"},$anchor:{type:"string",pattern:"^[A-Za-z][-A-Za-z0-9.:_]*$"},$ref:{type:"string",format:"uri-reference"},$recursiveRef:{type:"string",format:"uri-reference"},$recursiveAnchor:{type:"boolean",default:!1},$vocabulary:{type:"object",propertyNames:{type:"string",format:"uri"},additionalProperties:{type:"boolean"}},$comment:{type:"string"},$defs:{type:"object",additionalProperties:{$recursiveRef:"#"},default:{}}}}}),jV=SP((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/meta/format",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/format":!0},$recursiveAnchor:!0,title:"Format vocabulary meta-schema",type:["object","boolean"],properties:{format:{type:"string"}}}}),jq=SP((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/meta/meta-data",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/meta-data":!0},$recursiveAnchor:!0,title:"Meta-data vocabulary meta-schema",type:["object","boolean"],properties:{title:{type:"string"},description:{type:"string"},default:!0,deprecated:{type:"boolean",default:!1},readOnly:{type:"boolean",default:!1},writeOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0}}}}),jI=SP((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/meta/validation",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/validation":!0},$recursiveAnchor:!0,title:"Validation vocabulary meta-schema",type:["object","boolean"],properties:{multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/$defs/nonNegativeInteger"},minLength:{$ref:"#/$defs/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},maxItems:{$ref:"#/$defs/nonNegativeInteger"},minItems:{$ref:"#/$defs/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxContains:{$ref:"#/$defs/nonNegativeInteger"},minContains:{$ref:"#/$defs/nonNegativeInteger",default:1},maxProperties:{$ref:"#/$defs/nonNegativeInteger"},minProperties:{$ref:"#/$defs/nonNegativeIntegerDefault0"},required:{$ref:"#/$defs/stringArray"},dependentRequired:{type:"object",additionalProperties:{$ref:"#/$defs/stringArray"}},const:!0,enum:{type:"array",items:!0},type:{anyOf:[{$ref:"#/$defs/simpleTypes"},{type:"array",items:{$ref:"#/$defs/simpleTypes"},minItems:1,uniqueItems:!0}]}},$defs:{nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{$ref:"#/$defs/nonNegativeInteger",default:0},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}}}}),jx=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=jk(),r=jw(),i=jR(),o=jP(),n=jV(),a=jq(),s=jI(),d=["/properties"];e.default=function(e){return[t,r,i,o,c(this,n),a,c(this,s)].forEach(e=>this.addMetaSchema(e,void 0,!1)),this;function c(t,r){return e?t.$dataMetaSchema(r,d):r}}}),jj=SP((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.MissingRefError=e.ValidationError=e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=e.Ajv2019=void 0;let r=xT(),i=ja(),o=jh(),n=jv(),a=jS(),s=jd(),d=jx(),c="https://json-schema.org/draft/2019-09/schema";var l=class extends r.default{constructor(e={}){super({...e,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),this.addVocabulary(o.default),i.default.forEach(e=>this.addVocabulary(e)),this.addVocabulary(n.default),this.addVocabulary(a.default),this.opts.discriminator&&this.addKeyword(s.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();let{$data:e,meta:t}=this.opts;t&&(d.default.call(this,e),this.refs["http://json-schema.org/schema"]=c)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(c)?c:void 0)}};e.Ajv2019=l,t.exports=e=l,t.exports.Ajv2019=l,Object.defineProperty(e,"__esModule",{value:!0}),e.default=l;var p=xw();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return p.KeywordCxt}});var u=xc();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return u._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return u.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return u.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return u.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return u.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return u.CodeGen}});var m=xR();Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return m.default}});var f=xP();Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return f.default}})}),jC=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xA(),r=xJ(),i=jr(),o=jh(),n=jv(),a=jS(),s=jo(),d=jn();e.default=[o.default,t.default,r.default,(0,i.default)(!0),s.default,d.metadataVocabulary,d.contentVocabulary,n.default,a.default]}),jT=SP((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/schema",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/core":!0,"https://json-schema.org/draft/2020-12/vocab/applicator":!0,"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0,"https://json-schema.org/draft/2020-12/vocab/validation":!0,"https://json-schema.org/draft/2020-12/vocab/meta-data":!0,"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0,"https://json-schema.org/draft/2020-12/vocab/content":!0},$dynamicAnchor:"meta",title:"Core and Validation specifications meta-schema",allOf:[{$ref:"meta/core"},{$ref:"meta/applicator"},{$ref:"meta/unevaluated"},{$ref:"meta/validation"},{$ref:"meta/meta-data"},{$ref:"meta/format-annotation"},{$ref:"meta/content"}],type:["object","boolean"],$comment:"This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.",properties:{definitions:{$comment:'"definitions" has been replaced by "$defs".',type:"object",additionalProperties:{$dynamicRef:"#meta"},deprecated:!0,default:{}},dependencies:{$comment:'"dependencies" has been split and replaced by "dependentSchemas" and "dependentRequired" in order to serve their differing semantics.',type:"object",additionalProperties:{anyOf:[{$dynamicRef:"#meta"},{$ref:"meta/validation#/$defs/stringArray"}]},deprecated:!0,default:{}},$recursiveAnchor:{$comment:'"$recursiveAnchor" has been replaced by "$dynamicAnchor".',$ref:"meta/core#/$defs/anchorString",deprecated:!0},$recursiveRef:{$comment:'"$recursiveRef" has been replaced by "$dynamicRef".',$ref:"meta/core#/$defs/uriReferenceString",deprecated:!0}}}}),jO=SP((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/applicator",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/applicator":!0},$dynamicAnchor:"meta",title:"Applicator vocabulary meta-schema",type:["object","boolean"],properties:{prefixItems:{$ref:"#/$defs/schemaArray"},items:{$dynamicRef:"#meta"},contains:{$dynamicRef:"#meta"},additionalProperties:{$dynamicRef:"#meta"},properties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},patternProperties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},propertyNames:{format:"regex"},default:{}},dependentSchemas:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},propertyNames:{$dynamicRef:"#meta"},if:{$dynamicRef:"#meta"},then:{$dynamicRef:"#meta"},else:{$dynamicRef:"#meta"},allOf:{$ref:"#/$defs/schemaArray"},anyOf:{$ref:"#/$defs/schemaArray"},oneOf:{$ref:"#/$defs/schemaArray"},not:{$dynamicRef:"#meta"}},$defs:{schemaArray:{type:"array",minItems:1,items:{$dynamicRef:"#meta"}}}}}),jE=SP((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/unevaluated",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0},$dynamicAnchor:"meta",title:"Unevaluated applicator vocabulary meta-schema",type:["object","boolean"],properties:{unevaluatedItems:{$dynamicRef:"#meta"},unevaluatedProperties:{$dynamicRef:"#meta"}}}}),jA=SP((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/content",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/content":!0},$dynamicAnchor:"meta",title:"Content vocabulary meta-schema",type:["object","boolean"],properties:{contentEncoding:{type:"string"},contentMediaType:{type:"string"},contentSchema:{$dynamicRef:"#meta"}}}}),jM=SP((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/core",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/core":!0},$dynamicAnchor:"meta",title:"Core vocabulary meta-schema",type:["object","boolean"],properties:{$id:{$ref:"#/$defs/uriReferenceString",$comment:"Non-empty fragments not allowed.",pattern:"^[^#]*#?$"},$schema:{$ref:"#/$defs/uriString"},$ref:{$ref:"#/$defs/uriReferenceString"},$anchor:{$ref:"#/$defs/anchorString"},$dynamicRef:{$ref:"#/$defs/uriReferenceString"},$dynamicAnchor:{$ref:"#/$defs/anchorString"},$vocabulary:{type:"object",propertyNames:{$ref:"#/$defs/uriString"},additionalProperties:{type:"boolean"}},$comment:{type:"string"},$defs:{type:"object",additionalProperties:{$dynamicRef:"#meta"}}},$defs:{anchorString:{type:"string",pattern:"^[A-Za-z_][-A-Za-z0-9._]*$"},uriString:{type:"string",format:"uri"},uriReferenceString:{type:"string",format:"uri-reference"}}}}),jW=SP((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/format-annotation",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0},$dynamicAnchor:"meta",title:"Format vocabulary meta-schema for annotation results",type:["object","boolean"],properties:{format:{type:"string"}}}}),jN=SP((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/meta-data",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/meta-data":!0},$dynamicAnchor:"meta",title:"Meta-data vocabulary meta-schema",type:["object","boolean"],properties:{title:{type:"string"},description:{type:"string"},default:!0,deprecated:{type:"boolean",default:!1},readOnly:{type:"boolean",default:!1},writeOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0}}}}),jz=SP((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/validation",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/validation":!0},$dynamicAnchor:"meta",title:"Validation vocabulary meta-schema",type:["object","boolean"],properties:{type:{anyOf:[{$ref:"#/$defs/simpleTypes"},{type:"array",items:{$ref:"#/$defs/simpleTypes"},minItems:1,uniqueItems:!0}]},const:!0,enum:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/$defs/nonNegativeInteger"},minLength:{$ref:"#/$defs/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},maxItems:{$ref:"#/$defs/nonNegativeInteger"},minItems:{$ref:"#/$defs/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxContains:{$ref:"#/$defs/nonNegativeInteger"},minContains:{$ref:"#/$defs/nonNegativeInteger",default:1},maxProperties:{$ref:"#/$defs/nonNegativeInteger"},minProperties:{$ref:"#/$defs/nonNegativeIntegerDefault0"},required:{$ref:"#/$defs/stringArray"},dependentRequired:{type:"object",additionalProperties:{$ref:"#/$defs/stringArray"}}},$defs:{nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{$ref:"#/$defs/nonNegativeInteger",default:0},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}}}}),jD=SP(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=jT(),r=jO(),i=jE(),o=jA(),n=jM(),a=jW(),s=jN(),d=jz(),c=["/properties"];e.default=function(e){return[t,r,i,o,n,l(this,a),s,l(this,d)].forEach(e=>this.addMetaSchema(e,void 0,!1)),this;function l(t,r){return e?t.$dataMetaSchema(r,c):r}}}),jF=SP((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.MissingRefError=e.ValidationError=e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=e.Ajv2020=void 0;let r=xT(),i=jC(),o=jd(),n=jD(),a="https://json-schema.org/draft/2020-12/schema";var s=class extends r.default{constructor(e={}){super({...e,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),i.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(o.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();let{$data:e,meta:t}=this.opts;t&&(n.default.call(this,e),this.refs["http://json-schema.org/schema"]=a)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(a)?a:void 0)}};e.Ajv2020=s,t.exports=e=s,t.exports.Ajv2020=s,Object.defineProperty(e,"__esModule",{value:!0}),e.default=s;var d=xw();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return d.KeywordCxt}});var c=xc();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return c._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return c.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return c.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return c.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return c.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return c.CodeGen}});var l=xR();Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return l.default}});var p=xP();Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return p.default}})}),jL=SP(e=>{function t(e,t){return{validate:e,compare:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.formatNames=e.fastFormats=e.fullFormats=void 0,e.fullFormats={date:t(o,n),time:t(s(!0),d),"date-time":t(p(!0),u),"iso-time":t(s(),c),"iso-date-time":t(p(),m),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:function(e){return f.test(e)&&h.test(e)},"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:function(e){if(b.test(e))return!1;try{return new RegExp(e),!0}catch(e){return!1}},uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:function(e){return y.lastIndex=0,y.test(e)},int32:{type:"number",validate:function(e){return Number.isInteger(e)&&e<=_&&e>=g}},int64:{type:"number",validate:function(e){return Number.isInteger(e)}},float:{type:"number",validate:v},double:{type:"number",validate:v},password:!0,binary:!0},e.fastFormats={...e.fullFormats,date:t(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,n),time:t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,d),"date-time":t(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,u),"iso-time":t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,c),"iso-date-time":t(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,m),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},e.formatNames=Object.keys(e.fullFormats);let r=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,i=[0,31,28,31,30,31,30,31,31,30,31,30,31];function o(e){var t;let o=r.exec(e);if(!o)return!1;let n=+o[1],a=+o[2],s=+o[3];return a>=1&&a<=12&&s>=1&&s<=(2===a&&(t=n)%4==0&&(t%100!=0||t%400==0)?29:i[a])}function n(e,t){if(e&&t)return e>t?1:e23||l>59||e&&!s)return!1;if(i<=23&&o<=59&&n<60)return!0;let p=o-l*d,u=i-c*d-(p<0);return(23===u||-1===u)&&(59===p||-1===p)&&n<61}}function d(e,t){if(!(e&&t))return;let r=(new Date("2020-01-01T"+e)).valueOf(),i=(new Date("2020-01-01T"+t)).valueOf();if(r&&i)return r-i}function c(e,t){if(!(e&&t))return;let r=a.exec(e),i=a.exec(t);if(r&&i)return(e=r[1]+r[2]+r[3])>(t=i[1]+i[2]+i[3])?1:e{Object.defineProperty(e,"__esModule",{value:!0}),e.formatLimitDefinition=void 0;let t=jl(),r=xc(),i=r.operators,o={formatMaximum:{okStr:"<=",ok:i.LTE,fail:i.GT},formatMinimum:{okStr:">=",ok:i.GTE,fail:i.LT},formatExclusiveMaximum:{okStr:"<",ok:i.LT,fail:i.GTE},formatExclusiveMinimum:{okStr:">",ok:i.GT,fail:i.LTE}};e.formatLimitDefinition={keyword:Object.keys(o),type:"string",schemaType:"string",$data:!0,error:{message:({keyword:e,schemaCode:t})=>(0,r.str)`should be ${o[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,r._)`{comparison: ${o[e].okStr}, limit: ${t}}`},code(e){let i,n,{gen:a,data:s,schemaCode:d,keyword:c,it:l}=e,{opts:p,self:u}=l;if(!p.validateFormats)return;let m=new t.KeywordCxt(l,u.RULES.all.format.definition,"format");function f(e){return(0,r._)`${e}.compare(${s}, ${d}) ${o[c].fail} 0`}m.$data?(i=a.scopeValue("formats",{ref:u.formats,code:p.code.formats}),n=a.const("fmt",(0,r._)`${i}[${m.schemaCode}]`),e.fail$data((0,r.or)((0,r._)`typeof ${n} != "object"`,(0,r._)`${n} instanceof RegExp`,(0,r._)`typeof ${n}.compare != "function"`,f(n)))):function(){let t=m.schema,i=u.formats[t];if(!i||!0===i)return;if("object"!=typeof i||i instanceof RegExp||"function"!=typeof i.compare)throw Error(`"${c}": format "${t}" does not define "compare" function`);let o=a.scopeValue("formats",{key:t,ref:i,code:p.code.formats?(0,r._)`${p.code.formats}${(0,r.getProperty)(t)}`:void 0});e.fail$data(f(o))}()},dependencies:["format"]},e.default=t=>(t.addKeyword(e.formatLimitDefinition),t)}),jH=SP((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0});let r=jL(),i=jU(),o=xc(),n=new o.Name("fullFormats"),a=new o.Name("fastFormats"),s=(e,t={keywords:!0})=>{if(Array.isArray(t))return d(e,t,r.fullFormats,n),e;let[o,s]="fast"===t.mode?[r.fastFormats,a]:[r.fullFormats,n];return d(e,t.formats||r.formatNames,o,s),t.keywords&&(0,i.default)(e),e};function d(e,t,r,i){var n;for(let a of(null!=(n=e.opts.code).formats||(n.formats=(0,o._)`require("ajv-formats/dist/formats").${i}`),t))e.addFormat(a,r[a])}s.get=(e,t="full")=>{let i=("fast"===t?r.fastFormats:r.fullFormats)[e];if(!i)throw Error(`Unknown format "${e}"`);return i},t.exports=e=s,Object.defineProperty(e,"__esModule",{value:!0}),e.default=s}),jG=jl(),jB=jj(),jK=jF();let jJ=((e,t,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(var i,o=Sk(t),n=0,a=o.length;nt[e]).bind(null,i),enumerable:!(r=SS(t,i))||r.enumerable});return e})(S$(null!=(w=jH())?Sb(Sw(w)):{},"default",{value:w,enumerable:!0}),w).default;function jZ(e){let t=new e({strict:!1,validateFormats:!0,validateSchema:!1,allErrors:!0});return jJ(t),t}var jQ=class{_ajv;_ajvDraft7;_ajv2019;_userAjv;constructor(e){this._userAjv=void 0!==e,this._ajv=e}get ajv(){return this._ajv??=jZ(jK.Ajv2020)}_engineFor(e){if(this._userAjv)return this.ajv;let t=function(e,t){if(!("$schema"in e)||"string"!=typeof e.$schema)return"2020-12";let r=e.$schema.replace(/#$/,"");if(SV.has(r))return"2020-12";if(Sq.has(r))return"2019-09";if(SI.has(r)||Sx.has(r))return"draft-7";throw Error(`JSON Schema declares an unsupported dialect ("$schema": "${e.$schema.slice(0,200)}"). The default validator supports JSON Schema 2020-12, 2019-09, draft-07, and draft-06; ${t}`)}(e,"pass a pre-configured Ajv instance to AjvJsonSchemaValidator(ajv) to validate other dialects.");return"2020-12"===t?this.ajv:"2019-09"===t?this._ajv2019??=jZ(jB.Ajv2019):this._ajvDraft7??=jZ(jG.Ajv)}getValidator(e){let t=this._engineFor(e),r="$id"in e&&"string"==typeof e.$id?t.getSchema(e.$id)??t.compile(e):t.compile(e);return e=>r(e)?{valid:!0,data:e,errorMessage:void 0}:{valid:!1,data:void 0,errorMessage:t.errorsText(r.errors)}}};jG.Ajv,globalThis.crypto?.webcrypto??globalThis.crypto??import("node:crypto").then(e=>e.webcrypto);var jX=class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.OAuthClientFlowError"})}static[Symbol.hasInstance](e){return Rq(this,e)}static isInstance(e){if("function"!=typeof this)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return Rq(this,e)}constructor(e){super(e),this.name=new.target.name,RV(this,new.target)}};(class extends jX{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.IssuerMismatchError"})}kind;expected;received;constructor(e,t,r){super(`Issuer mismatch in ${"metadata"===e?"authorization server metadata (RFC 8414 \xa73.3)":"authorization response (RFC 9207)"}: expected ${JSON.stringify(t)}, received ${JSON.stringify(r)}`),this.kind=e,this.expected=t,this.received=r}}),(class extends jX{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.RegistrationRejectedError"})}status;body;submittedMetadata;constructor(e){super(`Dynamic Client Registration rejected (HTTP ${e.status}): ${e.body}`),this.status=e.status,this.body=e.body,this.submittedMetadata=e.submittedMetadata}}),(class extends jX{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.InsecureTokenEndpointError"})}tokenEndpoint;constructor(e){super(`Refusing to send credentials to non-https token endpoint '${e}'. OAuth token requests MUST use TLS (localhost / *.localhost / 127.0.0.1 / ::1 are exempt).`),this.tokenEndpoint=e}}),(class extends jX{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.AuthorizationServerMismatchError"})}constructor(e,t){super(`Authorization server mismatch: credentials are bound to ${JSON.stringify(e)} but this call resolved ${JSON.stringify(t)}; refusing to present them to a different authorization server`),this.recordedIssuer=e,this.currentIssuer=t}}),class extends jX{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.InsufficientScopeError"})}requiredScope;resourceMetadataUrl;errorDescription;constructor(e){super(`Insufficient scope${e.requiredScope?`: required "${e.requiredScope}"`:""}`),this.requiredScope=e.requiredScope,this.resourceMetadataUrl=e.resourceMetadataUrl,this.errorDescription=e.errorDescription}};var jY=class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.UnauthorizedError"})}static[Symbol.hasInstance](e){return Rq(this,e)}static isInstance(e){if("function"!=typeof this)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return Rq(this,e)}constructor(e){super(e??"Unauthorized"),this.name="UnauthorizedError",RV(this,new.target)}};let j1=new Set(["tools/list","prompts/list","resources/list","resources/templates/list","server/discover"]);var j0=class{_entries=new Map;_maxEntries;_stamp=0;_cappedSize=0;constructor(e){this._maxEntries=e?.maxEntries??512}get size(){return this._entries.size}get(e){return this._entries.get(j2(e))}set(e,t){let r=j2(e),i=j1.has(e.method),o=!this._entries.has(r);if(!i&&o&&this._maxEntries>0&&this._cappedSize>=this._maxEntries){for(let e of this._entries.keys())if(!j1.has(e.slice(0,e.indexOf("\0")))){this._entries.delete(e),this._cappedSize--;break}}let n=++this._stamp;return this._entries.set(r,{...t,stamp:n}),o&&!i&&this._cappedSize++,n}delete(e){this._entries.delete(j2(e))&&!j1.has(e.method)&&this._cappedSize--}evict(e){let t=`${e}\0`,r=j1.has(e);for(let e of this._entries.keys())e.startsWith(t)&&(this._entries.delete(e),!r&&this._cappedSize--)}clear(){this._entries.clear(),this._cappedSize=0}};function j2(e){return`${e.method}\0${JSON.stringify([e.partition??"",e.params??""])}`}function j4(e,t){return void 0===t?e:`${e}\0${t}`}var j6=class{_evictionGeneration=new Map;_toolIndex;_toolOutputValidatorIndex;_serverIdentity="";constructor(e,t,r=()=>{},i="",o=Date.now){this._store=e,this._isUserSupplied=t,this._reportError=r,this._cachePartition=i,this._now=o}now(){return this._now()}setServerIdentity(e){this._serverIdentity=e}_partitionFor(e){return JSON.stringify([this._serverIdentity,"public"===e?"":this._cachePartition])}async _probe(e,t){let r={method:e,params:t??""},i=this._partitionFor("private"),o=await this._store.get({...r,partition:i});if(void 0!==o)return o;let n=this._partitionFor("public");if(n===i)return;let a=await this._store.get({...r,partition:n});return a?.scope==="public"?a:void 0}async evict(e){this._evictionGeneration.set(e,(this._evictionGeneration.get(e)??0)+1),await this._deleteBoth(e,"")}async _deleteBoth(e,t){let r=this._partitionFor("private"),i=this._partitionFor("public");try{await this._store.delete({method:e,params:t,partition:r})}catch(e){this._reportError(e)}if(i!==r)try{await this._store.delete({method:e,params:t,partition:i})}catch(e){this._reportError(e)}}async evictKey(e,t){let r=j4(e,t),i=this._evictionGeneration.get(r);void 0!==i&&this._evictionGeneration.set(r,i+1),await this._deleteBoth(e,t)}captureGeneration(e,t){let r=j4(e,t),i=this._evictionGeneration.get(r)??0;return this._evictionGeneration.set(r,i),i}async write(e,t,r,i){if((this._evictionGeneration.get(j4(e,i?.params))??0)!==r)return;let o=i?.params??"",n=this._partitionFor("private"),a=this._partitionFor("public"),s=(i?.scope??"private")==="public"?a:n;try{await this._store.set({method:e,params:o,partition:s},{value:function(e){let t;try{t=JSON.stringify(e)}catch(e){throw TypeError(`cache value is not JSON-serializable: ${e instanceof Error?e.message:String(e)}`)}if("string"!=typeof t)throw TypeError("cache value is not JSON-serializable: it has no JSON representation");return t}(t),expiresAt:i?.expiresAt,scope:i?.scope})}catch(e){this._reportError(e)}if(a!==n)try{await this._store.delete({method:e,params:o,partition:s===n?a:n})}catch(e){this._reportError(e)}}async read(e,t){let r=await this._probe(e,t);if(r?.expiresAt!==void 0&&r.expiresAt>this.now())try{let e=JSON.parse(r.value);if("object"!=typeof e||null===e||Array.isArray(e))throw TypeError("cached document is not an object");return{value:e}}catch(r){this._reportError(r),await this._deleteBoth(e,t??"");return}}resetForReconnect(){this._isUserSupplied||this._store.clear(),this._evictionGeneration.clear(),this._toolIndex=void 0,this._toolOutputValidatorIndex=void 0,this._serverIdentity=""}async toolDefinition(e){let t=await this._probe("tools/list");if(void 0===t){this._toolIndex=void 0;return}if(this._toolIndex?.stamp!==t.stamp){let e=this._decodeListTools(t),r=new Map;if(void 0!==e)for(let t of e.tools)r.set(t.name,t);this._toolIndex={stamp:t.stamp,byName:r}}return this._toolIndex.byName.get(e)}async outputValidator(e,t){let r=await this._probe("tools/list");if(void 0===r){this._toolOutputValidatorIndex=void 0;return}if(this._toolOutputValidatorIndex?.stamp!==r.stamp){let e=this._decodeListTools(r)??{tools:[]},i=new Map;for(let r of e.tools){let e=t(r);void 0!==e&&i.set(r.name,e)}this._toolOutputValidatorIndex={stamp:r.stamp,byName:i}}return this._toolOutputValidatorIndex.byName.get(e)}_decodeListTools(e){try{let t=JSON.parse(e.value);if(!Array.isArray(t?.tools)||!t.tools.every(e=>null!==e&&"object"==typeof e))throw TypeError("cached tools/list document has a malformed tools array");return t}catch(e){this._reportError(e);return}}};let j3=Symbol.for("mcp.authSeamEscape"),j9=new Set([-32001,-32020,-32021]);function j5(e,t){let{code:r,message:i,data:o}=e;if(-32022===r){let e=function(e){if("object"!=typeof e||null===e)return;let t=e.supported;if(Array.isArray(t)&&0!==t.length&&t.every(e=>"string"==typeof e))return t}(o);if(void 0===e)return{kind:"legacy"};let r=new Pe({supported:e,requested:function(e){if("object"!=typeof e||null===e)return;let t=e.requested;return"string"==typeof t?t:void 0}(o)??t.requestedVersion},i),n=RE(e),a=t.clientModernVersions.find(e=>n.includes(e));return void 0!==a?{kind:"corrective",version:a,error:r}:n.length>0?{kind:"error",error:r}:t.fallbackAvailable?{kind:"legacy"}:{kind:"error",error:r}}return j9.has(r),{kind:"legacy"}}function j8(e,t){var r;return"browser"===t.environment&&((r=e)instanceof TypeError||r instanceof Error&&"TypeError"===r.name)?{kind:"legacy"}:{kind:"error",error:new Rx(RI.EraNegotiationFailed,`Version negotiation probe failed: ${j7(e)}`,{cause:e},{cause:e})}}function j7(e){return e instanceof Error?e.message:String(e)}function Ce(){let e=globalThis;return void 0!==e.window&&void 0!==e.document?"browser":"node"}function Ct(e){return"stderr"in e&&"pid"in e?"stdio":"http"}var Cr=class e{_pending;_probeCounter=0;_savedOnMessage;_savedOnError;_savedOnClose;_closeDelivered=!1;constructor(e){this._transport=e,this._savedOnMessage=e.onmessage,this._savedOnError=e.onerror,this._savedOnClose=e.onclose}static async open(t){let r=new e(t);t.onmessage=e=>{let t=r._pending;if(void 0!==t&&(S2.safeParse(e).success||S4.safeParse(e).success)&&e.id===t.id){r._pending=void 0,S2.safeParse(e).success?t.resolve({kind:"response",result:e.result}):t.resolve({kind:"response",error:e.error});return}},t.onerror=e=>{r._savedOnError?.(e)},t.onclose=()=>{let e=r._pending;void 0!==e&&(r._pending=void 0,e.resolve({kind:"closed"})),r._closeDelivered=!0,r._savedOnClose?.()};try{await t.start()}catch(e){throw r.detach(),e}return r}async exchange(e,t){let r=`server-discover-probe-${++this._probeCounter}`;return new Promise(i=>{let o=!1,n=e=>{o||(o=!0,clearTimeout(a),this._pending?.id===r&&(this._pending=void 0),i(e))},a=setTimeout(()=>n({kind:"timeout"}),t);this._pending={id:r,resolve:n},this._transport.send(e(r)).catch(e=>n({kind:"send-error",error:e}))})}detach(){if(this._pending=void 0,this._transport.onmessage=this._savedOnMessage,this._transport.onerror=this._savedOnError,this._closeDelivered&&void 0!==this._savedOnClose){let e=this._savedOnClose,t=this._transport,r=!1,i=()=>{if(!r){r=!0;return}e()};t.onclose=i,Ci.set(t,()=>{t.onclose===i&&(t.onclose=e)})}else this._transport.onclose=this._savedOnClose}release(){this.detach();let e=this._transport,t=e.start,r=!0;e.start=async function(){if(r){r=!1,e.start=t;return}return t.call(e)}}};let Ci=new WeakMap;function Co(e){let t=Ci.get(e);Ci.delete(e),t?.()}async function Cn(e,t){let r,i=e.probe.timeoutMs??t.defaultTimeoutMs,o=Math.max(0,e.probe.maxRetries??0),n="pin"===e.kind?[e.version]:e.modernVersions,a="auto"===e.kind&&e.fallbackAvailable,s=await Cr.open(t.transport);try{r=await (async()=>{let r=n[0],d=!1,c=o;for(;;){let o=await s.exchange(e=>{var i,o,n;return i=r,o=t.clientInfo,n=t.capabilities,{jsonrpc:"2.0",id:e,method:"server/discover",params:{_meta:Pg(i).outboundEnvelope({protocolVersion:i,clientInfo:o,clientCapabilities:n})}}},i);if("timeout"===o.kind&&c>0){c--;continue}let l=function(e,t){switch(e.kind){case"response":return void 0===e.error?{kind:"result",result:e.result}:{kind:"rpc-error",...e.error};case"send-error":{let t=e.error;if(("object"==typeof t&&null!==t||"function"==typeof t)&&!0===t[j3]||t instanceof jY||t instanceof Error&&"UnauthorizedError"===t.name)return{kind:"auth-required",error:t};if(t instanceof Rj){let e=t.data?.text;return{kind:"http-error",status:t.data.status,body:"string"==typeof e?e:void 0,statusText:t.data.statusText}}if(t instanceof Rx&&t.code===RI.ClientHttpUnexpectedContent||t instanceof Error&&"SyntaxError"===t.name)return{kind:"unusable-reply",error:t};return{kind:"network-error",error:t}}case"closed":return{kind:"closed"};case"timeout":return{kind:"timeout",timeoutMs:t}}}(o,i),p=function(e,t){switch(e.kind){case"result":return function(e,t){let r=Pg(Py).validateResult("server/discover",e);if(!r.ok)return{kind:"legacy"};let i=r.value.supportedVersions,o=t.clientModernVersions.find(e=>i.includes(e));return void 0!==o?{kind:"modern",version:o,discover:r.value}:t.fallbackAvailable?{kind:"legacy"}:{kind:"error",error:new Pe({supported:[...i],requested:t.requestedVersion})}}(e.result,t);case"rpc-error":return j5(e,t);case"http-error":return function(e,t){if(401===e.status||403===e.status){let t=403===e.status;return{kind:"error",error:new Rj(t?RI.ClientHttpForbidden:RI.ClientHttpAuthentication,`Version negotiation failed: ${t?"the server denied access (HTTP 403)":"the server requires authorization (HTTP 401)"}`,{status:e.status,statusText:e.statusText,text:e.body})}}if(e.status>=500)return{kind:"error",error:new Rj(RI.EraNegotiationFailed,`Version negotiation failed: the server answered the probe with HTTP ${e.status}`,{status:e.status,statusText:e.statusText,text:e.body})};let r=function(e){let t;if(void 0===e||""===e)return;try{t=JSON.parse(e)}catch{return}if("object"!=typeof t||null===t)return;let r=t.error;if("object"!=typeof r||null===r)return;let{code:i,message:o,data:n}=r;if("number"==typeof i)return{code:i,message:"string"==typeof o?o:"",data:n}}(e.body);return void 0!==r?j5(r,t):{kind:"legacy"}}(e,t);case"network-error":return j8(e.error,t);case"unusable-reply":return{kind:"error",error:new Rx(RI.EraNegotiationFailed,`Version negotiation probe failed: the server answered with an unusable reply (${j7(e.error)})`,{cause:e.error},{cause:e.error})};case"auth-required":return{kind:"error",error:e.error};case"closed":if("stdio"===t.transportKind)return{kind:"legacy"};return j8(Error("Connection closed during the version negotiation probe"),t);case"timeout":if("stdio"===t.transportKind)return{kind:"legacy"};return{kind:"error",error:new Rx(RI.RequestTimeout,`Version negotiation probe timed out after ${e.timeoutMs}ms`,{timeout:e.timeoutMs})}}}(l,{clientModernVersions:n,requestedVersion:r,fallbackAvailable:a,environment:t.environment,transportKind:t.transportKind});switch(p.kind){case"modern":return{era:"modern",version:p.version,discover:p.discover};case"corrective":if(d)throw p.error;d=!0,r=p.version;continue;case"legacy":{let r="closed"===l.kind?"the connection closed during the server/discover probe":void 0;if("pin"===e.kind)throw new Rx(RI.EraNegotiationFailed,void 0===r?`Version negotiation failed: the server did not offer pinned protocol version ${e.version} via server/discover (no fallback in pin mode)`:`Version negotiation failed: ${r} before the server offered pinned protocol version ${e.version} (no fallback in pin mode)`);if(!e.fallbackAvailable)throw new Rx(RI.EraNegotiationFailed,void 0===r?"Version negotiation failed: the server gave no modern evidence and this client supports no pre-2026-07-28 protocol version to fall back to":`Version negotiation failed: ${r} and this client supports no pre-2026-07-28 protocol version to fall back to`);if(void 0!==r&&!0!==t.disposableProbe)throw new Rx(RI.EraNegotiationFailed,`Version negotiation failed: ${r} (this transport probed in place — the disposable sibling probe requires the SDK's base StdioClientTransport)`);return{era:"legacy"}}case"error":throw p.error}}})()}catch(e){throw s.detach(),e}return s.release(),r}function Ca(){return new Rx(RI.EraNegotiationFailed,"Version negotiation failed: the transport was closed during the server/discover probe")}function Cs(e){let t=e._meta?.[SO];return PK.Implementation(t)?t:void 0}let Cd={"notifications/tools/list_changed":["tools/list"],"notifications/prompts/list_changed":["prompts/list"],"notifications/resources/list_changed":["resources/list","resources/templates/list"]};var Cc=class extends P1{_serverCapabilities;_serverVersion;_capabilities;_instructions;_jsonSchemaValidator;_cache;_defaultCacheTtlMs;_listMaxPages;_listChangedDebounceTimers=new Map;_listChangedConfig;_enforceStrictCapabilities;_versionNegotiation;_supportedProtocolVersionsOption;_inputRequiredDriverConfig;_listenState=new Map;_nextListenId=0;_autoOpenedSubscription;_discoverResult;_resetConnectionState(){if(this._negotiatedProtocolVersion=void 0,this._serverCapabilities=void 0,this._serverVersion=void 0,this._instructions=void 0,this._discoverResult=void 0,this._autoOpenedSubscription=void 0,this._listenState.size>0){let e=new Rx(RI.ConnectionClosed,"subscriptions/listen: client reconnected or closed; subscription state from the previous connection was reset");for(let t of this._listenState.values())t.settle({cause:"remote",error:e})}for(let e of(this._listenState.clear(),this._listChangedDebounceTimers.values()))clearTimeout(e);this._listChangedDebounceTimers.clear(),this._cache.resetForReconnect()}async close(){try{await super.close()}finally{this._resetConnectionState()}}constructor(e,t){var r;super(t),this._clientInfo=e,this._capabilities=t?.capabilities?{...t.capabilities}:{},this._jsonSchemaValidator=t?.jsonSchemaValidator??new jQ,this._enforceStrictCapabilities=t?.enforceStrictCapabilities??!1,this._versionNegotiation=t?.versionNegotiation,this._supportedProtocolVersionsOption=t?.supportedProtocolVersions,this._inputRequiredDriverConfig=(r=t?.inputRequired,{autoFulfill:r?.autoFulfill??!0,maxRounds:r?.maxRounds??10}),this._cache=new j6(t?.responseCacheStore??new j0,t?.responseCacheStore!==void 0,e=>this._reportStoreError(e),t?.cachePartition??""),this._defaultCacheTtlMs=t?.defaultCacheTtlMs??0,this._listMaxPages=t?.listMaxPages??64,t?.listChanged&&(this._listChangedConfig=t.listChanged)}buildContext(e,t){return e}_shouldDropInbound(e){if(void 0!==this._negotiatedProtocolVersion&&this._negotiatedProtocolVersion>=RC&&S1.safeParse(e).success)return"drop"}_outboundMetaEnvelope(){let e=this._negotiatedProtocolVersion;if(void 0!==e)return this._wireCodec().outboundEnvelope({protocolVersion:e,clientInfo:this._clientInfo,clientCapabilities:this._capabilities})}_resolveNonCompleteResult(e,t){return this._inputRequiredDriverConfig.autoFulfill?function(e,t,r,i){let{codec:o,request:n,options:a,flowStartedAt:s}=i,d={inputRequests:r.inputRequests,...void 0!==r.requestState&&{requestState:r.requestState}};return async function(e){let{config:t,method:r,originalParams:i,requestOptions:o,hooks:n,signal:a}=e,s=e.flowStartedAt??Date.now(),d=e.firstPayload,c=0;for(;;){let e;if((c+=1)>t.maxRounds){var l;throw new Rx(RI.InputRequiredRoundsExceeded,(l=t.maxRounds,`Multi-round-trip request '${r}' still required input after ${l} rounds (inputRequired.maxRounds)`),{rounds:t.maxRounds,lastResult:{inputRequests:d.inputRequests,...void 0!==d.requestState&&{requestState:d.requestState}}})}o.onprogress?.({progress:c,message:`Fulfilling input required by '${r}' (round ${c})`});let p=Object.entries(d.inputRequests??{});if(p.length>0){let t=function(e){let t=new AbortController,r=()=>t.abort(e?.reason);return e?.addEventListener("abort",r,{once:!0}),e?.aborted&&t.abort(e.reason),{signal:t.signal,abort:e=>t.abort(e),dispose:()=>e?.removeEventListener("abort",r)}}(a);try{let r=await Promise.all(p.map(async([e,r])=>{try{return[e,await n.dispatchInputRequest(e,r,t.signal)]}catch(e){throw t.abort(e),e}}));e=Object.fromEntries(r)}finally{t.dispose()}}else await function(e){return new Promise((t,r)=>{if(e?.aborted)return void r(e.reason instanceof Rx?e.reason:new Rx(RI.RequestTimeout,String(e.reason)));let i=setTimeout(()=>{e?.removeEventListener("abort",o),t()},250),o=()=>{clearTimeout(i),r(e?.reason instanceof Rx?e.reason:new Rx(RI.RequestTimeout,String(e?.reason)))};e?.addEventListener("abort",o,{once:!0})})}(a);let u={...void 0!==o.timeout&&{timeout:o.timeout}};if(void 0!==o.maxTotalTimeout){let e=Date.now()-s,t=o.maxTotalTimeout-e;if(t<=0)throw new Rx(RI.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:o.maxTotalTimeout,totalElapsed:e});u.maxTotalTimeout=t}let m=await n.retry(function(e,t,r){let i=void 0!==t&&Object.keys(t).length>0;return i||void 0!==r?{...e,...i&&{inputResponses:t},...void 0!==r&&{requestState:r}}:e}(i,e,d.requestState),u);if(Pw(m)){d={inputRequests:m.inputRequests??{},...void 0!==m.requestState&&{requestState:m.requestState}};continue}return m}}({config:t,method:n.method,originalParams:n.params,firstPayload:d,flowStartedAt:s,signal:a?.signal,requestOptions:{...a?.timeout!==void 0&&{timeout:a.timeout},...a?.maxTotalTimeout!==void 0&&{maxTotalTimeout:a.maxTotalTimeout},...a?.onprogress!==void 0&&{onprogress:a.onprogress}},hooks:{dispatchInputRequest:(t,r,i)=>(async function(e,t,r,i,o){var n;if(!P2(i)||"string"!=typeof i.method)throw new Rx(RI.InvalidResult,`Invalid input request '${r}': each inputRequests entry must be an embedded request object with a method`,{key:r});let a=i.method;if(!t.hasInputRequestMethod(a))throw new Rx(RI.InvalidResult,`Invalid input request '${r}': '${a}' is not an embedded request the ${t.era} revision defines (expected elicitation/create, sampling/createMessage, or roots/list)`,{key:r,method:a});let s=e.getRequestHandler(a);if(void 0===s)throw new Rx(RI.CapabilityNotSupported,`Cannot fulfil input request '${r}': no handler is registered for '${a}' on this client. Declare the corresponding capability and register a handler, or handle input_required results manually.`,{key:r,method:a});let d=P2(i.params)?i.params:void 0;return await s({jsonrpc:"2.0",id:r,method:a,...void 0!==d&&{params:d}},e.buildContext({sessionId:e.sessionId,mcpReq:{id:r,method:a,_meta:d?._meta,requestState:(n=void 0,()=>n),signal:o,send:()=>P4("send"),notify:()=>P4("notify")}}))})(e,o,t,r,i),retry:(e,t)=>i.retry(e,{...a?.signal!==void 0&&{signal:a.signal},...a?.onprogress!==void 0&&{onprogress:a.onprogress},...a?.resetTimeoutOnProgress!==void 0&&{resetTimeoutOnProgress:a.resetTimeoutOnProgress},...a?.headers!==void 0&&{headers:a.headers},...void 0!==t.timeout&&{timeout:t.timeout},...void 0!==t.maxTotalTimeout&&{maxTotalTimeout:t.maxTotalTimeout},allowInputRequired:!0})}})}({getRequestHandler:e=>this._getRequestHandler(e),buildContext:e=>this.buildContext(e,void 0),sessionId:this.transport?.sessionId},this._inputRequiredDriverConfig,e,t):Promise.reject(new Rx(RI.UnsupportedResultType,`Unsupported result type 'input_required' for ${t.request.method}: multi-round-trip auto-fulfilment is not enabled on this instance — pass allowInputRequired: true to handle it manually, or enable inputRequired.autoFulfill`,{resultType:"input_required",method:t.request.method}))}_setupListChangedHandlers(e){e.tools&&this._serverCapabilities?.tools?.listChanged&&this._setupListChangedHandler("tools","notifications/tools/list_changed",e.tools,async()=>(await this.listTools(void 0,{cacheMode:"refresh"})).tools),e.prompts&&this._serverCapabilities?.prompts?.listChanged&&this._setupListChangedHandler("prompts","notifications/prompts/list_changed",e.prompts,async()=>(await this.listPrompts(void 0,{cacheMode:"refresh"})).prompts),e.resources&&this._serverCapabilities?.resources?.listChanged&&this._setupListChangedHandler("resources","notifications/resources/list_changed",e.resources,async()=>(await this.listResources(void 0,{cacheMode:"refresh"})).resources)}registerCapabilities(e){if(this.transport)throw Error("Cannot register capabilities after connecting to transport");this._capabilities=function(e,t){let r={...e};for(let e in t){let i=t[e];if(void 0===i)continue;let o=r[e];r[e]=P0(o)&&P0(i)?{...o,...i}:i}return r}(this._capabilities,e)}setVersionNegotiation(e){if(this.transport)throw Error("Cannot configure version negotiation after connecting to transport");this._versionNegotiation=e}_wrapHandler(e,t){return"elicitation/create"===e?async(e,r)=>{let i=Pg(this._negotiatedProtocolVersion),o=i.validateRequest("elicitation/create",e);if(o.ok||"not-in-era"!==o.reason||(o=i.validateInputRequest("elicitation/create",e)),!o.ok)throw new R5("not-in-era"===o.reason?R9.InternalError:R9.InvalidParams,"not-in-era"===o.reason?"No wire schema for elicitation/create in the resolved era":`Invalid elicitation request: ${o.message}`);let{params:n}=o.value;n.mode=n.mode??"form";let{supportsFormMode:a,supportsUrlMode:s}=function(e){if(!e)return{supportsFormMode:!1,supportsUrlMode:!1};let t=void 0!==e.form,r=void 0!==e.url;return{supportsFormMode:t||!t&&!r,supportsUrlMode:r}}(this._capabilities.elicitation);if("form"===n.mode&&!a)throw new R5(R9.InvalidParams,"Client does not support form-mode elicitation requests");if("url"===n.mode&&!s)throw new R5(R9.InvalidParams,"Client does not support URL-mode elicitation requests");let d=await t(e,r),c=i.validateResult("elicitation/create",d);if(c.ok||"not-in-era"!==c.reason||(c=i.validateInputResponse("elicitation/create",d)),!c.ok)throw new R5("not-in-era"===c.reason?R9.InternalError:R9.InvalidParams,"not-in-era"===c.reason?"No wire schema for elicitation/create in the resolved era":`Invalid elicitation result: ${c.message}`);let l=c.value,p="form"===n.mode?n.requestedSchema:void 0;if("form"===n.mode&&"accept"===l.action&&l.content&&p&&this._capabilities.elicitation?.form?.applyDefaults)try{!function e(t,r){if(t&&null!==r&&"object"==typeof r){if("object"===t.type&&t.properties&&"object"==typeof t.properties){let i=t.properties;for(let t of Object.keys(i)){let o=i[t];void 0===r[t]&&Object.prototype.hasOwnProperty.call(o,"default")&&(r[t]=o.default),void 0!==r[t]&&e(o,r[t])}}if(Array.isArray(t.anyOf))for(let i of t.anyOf)"boolean"!=typeof i&&e(i,r);if(Array.isArray(t.oneOf))for(let i of t.oneOf)"boolean"!=typeof i&&e(i,r)}}(p,l.content)}catch{}return l}:"sampling/createMessage"===e?async(e,r)=>{let i=Pg(this._negotiatedProtocolVersion),o=i.validateRequest("sampling/createMessage",e);if(o.ok||"not-in-era"!==o.reason||(o=i.validateInputRequest("sampling/createMessage",e)),!o.ok)throw new R5("not-in-era"===o.reason?R9.InternalError:R9.InvalidParams,"not-in-era"===o.reason?"No wire schema for sampling/createMessage in the resolved era":`Invalid sampling request: ${o.message}`);let{params:n}=o.value,a=await t(e,r),s=!!(n.tools||n.toolChoice),d=i.samplingResultVariant(s,a);if(d.ok||"not-in-era"!==d.reason||(d=i.validateInputResponse("sampling/createMessage",a)),!d.ok)throw new R5("not-in-era"===d.reason?R9.InternalError:R9.InvalidParams,"not-in-era"===d.reason?"No result schema for sampling/createMessage in the resolved era":`Invalid sampling result: ${d.message}`);return d.value}:t}assertCapability(e,t){if(!this._serverCapabilities?.[e])throw new Rx(RI.CapabilityNotSupported,`Server does not support ${e} (required for ${t})`)}async connect(e,t){if(t?.prior!=null)return this._connectFromPrior(e,function(e){if("object"==typeof e&&null!==e&&("legacy"===e.kind&&!("supportedVersions"in e)&&!("discover"in e)||"modern"===e.kind&&kf.safeParse(e.discover).success))return e;throw new Rx(RI.EraNegotiationFailed,"connect({ prior }): unrecognized prior — expected { kind: 'modern', discover } or { kind: 'legacy' }")}(t.prior),t);let r=function(e,t){let r=e?.mode??"legacy";if("legacy"===r)return{kind:"legacy"};let i=e?.probe??{};if("object"==typeof r){if(!(r.pin>=RC))throw TypeError(`versionNegotiation: { pin: '${r.pin}' } is not a modern protocol revision — pinning is for 2026-07-28 and later; omit versionNegotiation (or use mode: 'legacy') for 2025-era servers.`);return{kind:"pin",version:r.pin,probe:i}}let o=t?RE(t):[];return{kind:"auto",modernVersions:o.length>0?o:[...RT],fallbackAvailable:!t||RO(t).length>0,probe:i}}(this._versionNegotiation,this._supportedProtocolVersionsOption);return"legacy"!==r.kind?this._connectNegotiated(e,r,t):this._connectPlainLegacy(e,t)}async _connectPlainLegacy(e,t){if(await super.connect(e),void 0!==e.sessionId){let t=this._negotiatedProtocolVersion;void 0!==t&&e.setProtocolVersion?.(t);return}this._resetConnectionState(),await this._legacyHandshake(e,t)}async _legacyHandshake(e,t){let r=RO(this._supportedProtocolVersions);try{let i=r[0];if(void 0===i)throw new Rx(RI.EraNegotiationFailed,"Cannot run the initialize handshake: supportedProtocolVersions contains no pre-2026-07-28 protocol version");let o=await this.request({method:"initialize",params:{protocolVersion:i,capabilities:this._capabilities,clientInfo:this._clientInfo}},t);if(void 0===o)throw Error(`Server sent invalid initialize result: ${o}`);if(!r.includes(o.protocolVersion))throw Error(`Server's protocol version is not supported: ${o.protocolVersion}`);this._serverCapabilities=o.capabilities,this._serverVersion=o.serverInfo,this._cache.setServerIdentity(this._deriveServerIdentity(e)),e.setProtocolVersion&&e.setProtocolVersion(o.protocolVersion),this._instructions=o.instructions,await this.notification({method:"notifications/initialized"}),this._negotiatedProtocolVersion=o.protocolVersion,this._listChangedConfig&&this._setupListChangedHandlers(this._listChangedConfig)}catch(e){throw this.close(),e}}async _connectNegotiated(e,t,r){let i;if(void 0!==e.sessionId){await super.connect(e);let t=this._negotiatedProtocolVersion;void 0!==t&&e.setProtocolVersion&&e.setProtocolVersion(t);return}this._resetConnectionState();try{let o=Ct(e),n={clientInfo:this._clientInfo,capabilities:this._capabilities,environment:Ce(),defaultTimeoutMs:r?.timeout??6e4},a="stdio"===o?function(e){let t=Object.getPrototypeOf(e);if(null===t||!Object.prototype.hasOwnProperty.call(t,"_dispose"))return;let r=e._serverParams;return"object"==typeof r&&null!==r&&"string"==typeof r.command?r:void 0}(e):void 0;i=void 0===a?await Cn(t,{...n,transport:e,transportKind:o}):await async function(e,t,r,i){let o,n,a=new t.constructor({...r,stderr:"ignore"}),s=t.close,d=!1,c=new Promise((e,t)=>{o=()=>t(Ca())});t.close=async function(){return d=!0,o?.(),s.call(t)};try{let t=Cn(e,{...i,transport:a,transportKind:"stdio",disposableProbe:!0});t.catch(()=>{}),n=await Promise.race([t,c])}finally{await async function(e){try{let t=e._dispose;await ("function"==typeof t?t.call(e):e.close())}catch{}}(a),t.close=s}if(d)throw Ca();return n}(t,e,a,n)}catch(t){throw await e.close().catch(()=>{}),Co(e),t}if(Co(e),await super.connect(e),"legacy"===i.era)return void await this._legacyHandshake(e,r);if(this._serverCapabilities=i.discover.capabilities,this._serverVersion=Cs(i.discover),this._cache.setServerIdentity(this._deriveServerIdentity(e)),this._instructions=i.discover.instructions,this._discoverResult=i.discover,this._negotiatedProtocolVersion=i.version,e.setProtocolVersion&&e.setProtocolVersion(i.version),this._listChangedConfig){let e=this._listChangedConfig,t=this._serverCapabilities,i={...e.tools&&t?.tools?.listChanged&&{tools:e.tools},...e.prompts&&t?.prompts?.listChanged&&{prompts:e.prompts},...e.resources&&t?.resources?.listChanged&&{resources:e.resources}},o=!0;try{this._setupListChangedHandlers(i)}catch(e){o=!1,this.onerror?.(e instanceof Error?e:Error(String(e)))}let n=o?{...i.tools&&{toolsListChanged:!0},...i.prompts&&{promptsListChanged:!0},...i.resources&&{resourcesListChanged:!0}}:{};if(Object.keys(n).length>0){let e=new AbortController,t=()=>e.abort(r?.signal?.reason);r?.signal?.aborted&&t(),r?.signal?.addEventListener("abort",t);try{this._autoOpenedSubscription=await this.listen(n,{timeout:r?.timeout,signal:e.signal})}catch(e){if(r?.signal?.aborted)throw await this.close().catch(()=>{}),e;this.onerror?.(e instanceof Error?e:Error(String(e)))}finally{r?.signal?.removeEventListener("abort",t)}}}}async _connectFromPrior(e,t,r){if("legacy"===t.kind)return this._connectPlainLegacy(e,r);let i=t.discover;this._resetConnectionState();let o=this._supportedProtocolVersionsOption,n=(o&&RE(o).length>0?RE(o):RT).find(e=>i.supportedVersions.includes(e));if(void 0===n)throw new Rx(RI.EraNegotiationFailed,"connect({ prior }) with a modern verdict requires a 2026-07-28+ mutual protocol version; the supplied DiscoverResult and this client's supportedProtocolVersions have no modern overlap. For a server known to be legacy, pass prior: { kind: 'legacy' } to skip the probe and initialize directly, or use versionNegotiation: { mode: 'auto' } to re-probe with legacy fallback.");if(await super.connect(e),this._discoverResult=i,this._serverCapabilities=i.capabilities,this._serverVersion=Cs(i),this._cache.setServerIdentity(this._deriveServerIdentity(e)),this._instructions=i.instructions,this._negotiatedProtocolVersion=n,e.setProtocolVersion?.(n),this._listChangedConfig)try{this._setupListChangedHandlers(this._listChangedConfig)}catch(e){this.onerror?.(e instanceof Error?e:Error(String(e)))}}getServerCapabilities(){return this._serverCapabilities}getServerVersion(){return this._serverVersion}_deriveServerIdentity(e){let t=this._serverVersion;return void 0!==t?`${t.name}@${t.version}`:e.sessionId??`anonymous:${Date.now()}-${Math.random().toString(36).slice(2)}`}getNegotiatedProtocolVersion(){return this._negotiatedProtocolVersion}getProtocolEra(){let e=this._negotiatedProtocolVersion;if(void 0!==e)return e>=RC?"modern":"legacy"}getInstructions(){return this._instructions}getDiscoverResult(){return this._discoverResult}assertCapabilityForMethod(e){switch(e){case"logging/setLevel":if(!this._serverCapabilities?.logging)throw new Rx(RI.CapabilityNotSupported,`Server does not support logging (required for ${e})`);break;case"prompts/get":case"prompts/list":if(!this._serverCapabilities?.prompts)throw new Rx(RI.CapabilityNotSupported,`Server does not support prompts (required for ${e})`);break;case"resources/list":case"resources/templates/list":case"resources/read":case"resources/subscribe":case"resources/unsubscribe":if(!this._serverCapabilities?.resources)throw new Rx(RI.CapabilityNotSupported,`Server does not support resources (required for ${e})`);if("resources/subscribe"===e&&!this._serverCapabilities.resources.subscribe)throw new Rx(RI.CapabilityNotSupported,`Server does not support resource subscriptions (required for ${e})`);break;case"tools/call":case"tools/list":if(!this._serverCapabilities?.tools)throw new Rx(RI.CapabilityNotSupported,`Server does not support tools (required for ${e})`);break;case"completion/complete":if(!this._serverCapabilities?.completions)throw new Rx(RI.CapabilityNotSupported,`Server does not support completions (required for ${e})`)}}assertNotificationCapability(e){if("notifications/roots/list_changed"===e&&!this._capabilities.roots?.listChanged)throw new Rx(RI.CapabilityNotSupported,`Client does not support roots list changed notifications (required for ${e})`)}assertRequestHandlerCapability(e){switch(e){case"sampling/createMessage":if(!this._capabilities.sampling)throw new Rx(RI.CapabilityNotSupported,`Client does not support sampling capability (required for ${e})`);break;case"elicitation/create":if(!this._capabilities.elicitation)throw new Rx(RI.CapabilityNotSupported,`Client does not support elicitation capability (required for ${e})`);break;case"roots/list":if(!this._capabilities.roots)throw new Rx(RI.CapabilityNotSupported,`Client does not support roots capability (required for ${e})`)}}async ping(e){return this.request({method:"ping"},e)}async discover(e){let t=await this._requestWithSchema({method:"server/discover"},kf,e);return this._discoverResult=t,t}async complete(e,t){return this.request({method:"completion/complete",params:e},t)}async setLoggingLevel(e,t){return this.request({method:"logging/setLevel",params:{level:e}},t)}async getPrompt(e,t){return this.request({method:"prompts/get",params:e},t)}async listPrompts(e,t){if(!this._serverCapabilities?.prompts&&!this._enforceStrictCapabilities)return console.debug("Client.listPrompts() called but server does not advertise prompts capability - returning empty list"),{prompts:[]};if(e?.cursor!==void 0)return this.request({method:"prompts/list",params:e},t);let r=await this._serveFromCache("prompts/list",void 0,t);return void 0!==r?r:this._listAllPages("prompts/list",e,t,e=>e.prompts)}async listResources(e,t){if(!this._serverCapabilities?.resources&&!this._enforceStrictCapabilities)return console.debug("Client.listResources() called but server does not advertise resources capability - returning empty list"),{resources:[]};if(e?.cursor!==void 0)return this.request({method:"resources/list",params:e},t);let r=await this._serveFromCache("resources/list",void 0,t);return void 0!==r?r:this._listAllPages("resources/list",e,t,e=>e.resources)}async listResourceTemplates(e,t){if(!this._serverCapabilities?.resources&&!this._enforceStrictCapabilities)return console.debug("Client.listResourceTemplates() called but server does not advertise resources capability - returning empty list"),{resourceTemplates:[]};if(e?.cursor!==void 0)return this.request({method:"resources/templates/list",params:e},t);let r=await this._serveFromCache("resources/templates/list",void 0,t);return void 0!==r?r:this._listAllPages("resources/templates/list",e,t,e=>e.resourceTemplates)}async _listAllPages(e,t,r,i,o){let n=r?.cacheMode==="bypass",a=this._cache.captureGeneration(e),s=await this.request({method:e,...t&&{params:{...t}}},r),d=s.nextCursor,c=s,l=1;for(;void 0!==d;){if(0!==this._listMaxPages&&l>=this._listMaxPages)throw new Rx(RI.ListPaginationExceeded,`${e}: exceeded listMaxPages (${this._listMaxPages}); server pagination did not terminate`,{method:e,listMaxPages:this._listMaxPages});let o=await this.request({method:e,params:{...t,cursor:d}},r);if(o.nextCursor===d&&JSON.stringify(i(o))===JSON.stringify(i(c)))break;i(s).push(...i(o)),c=o,d=o.nextCursor,l++}return delete s.nextCursor,o?.(s),n||await this._cache.write(e,s,a,this._freshness(s)),s}_freshness(e,t){let r="number"==typeof e.ttlMs?e.ttlMs:this._defaultCacheTtlMs,i="public"===e.cacheScope?"public":"private";return{expiresAt:this._cache.now()+Math.min(Math.max(0,r),864e5),scope:i,params:t}}async _serveFromCache(e,t,r){if(r?.cacheMode==="bypass"||r?.cacheMode==="refresh")return;let i=await this._cache.read(e,t).catch(e=>void this._reportStoreError(e));if(void 0!==i){if(r?.signal?.aborted){let e=r.signal.reason;throw e instanceof Rx?e:new Rx(RI.RequestTimeout,String(e))}return i.value}}_reportStoreError(e){this.onerror?.(e instanceof Error?e:Error(String(e)))}_compileOutputValidator(e){if(e.outputSchema)try{return{ok:!0,validator:this._jsonSchemaValidator.getValidator(e.outputSchema)}}catch(e){return{ok:!1,compileError:e}}}async _resolveXMcpHeaderScan(e,t){let r=t??await this._cache.toolDefinition(e);return void 0===r?void 0:Pq(r.inputSchema)}async readResource(e,t){let r=await this._serveFromCache("resources/read",e.uri,t);if(void 0!==r)return r;let i=this._cache.captureGeneration("resources/read",e.uri),o=await this.request({method:"resources/read",params:e},t);if(t?.cacheMode!=="bypass"){let r=this._freshness(o,e.uri);r.expiresAt>this._cache.now()?await this._cache.write("resources/read",o,i,r):t?.cacheMode==="refresh"&&await this._cache.evictKey("resources/read",e.uri)}return o}async subscribeResource(e,t){return this.request({method:"resources/subscribe",params:e},t)}async unsubscribeResource(e,t){return this.request({method:"resources/unsubscribe",params:e},t)}async listen(e,t){let r,i,o,n,a;if(void 0===this.transport)throw new Rx(RI.NotConnected,"Not connected");let s=this._negotiatedProtocolVersion;if(void 0===s||!(s>=RC))throw new Rx(RI.MethodNotSupportedByProtocolVersion,`subscriptions/listen requires a 2026-07-28-era connection (negotiated: ${s??"none"}). On a 2025-era connection, change notifications are delivered unsolicited: use ClientOptions.listChanged and resources/subscribe instead.`,{method:"subscriptions/listen",protocolVersion:s});if(t?.signal?.aborted){let e=t.signal.reason;throw e instanceof Rx?e:new Rx(RI.RequestTimeout,String(e))}let d=new AbortController,c=`listen:${this._nextListenId++}`,l="opening",p=new Promise((e,t)=>{o=e,n=t}),u=new Promise(e=>{a=e}),m=e=>{if("closed"===l)return;let s="opening"===l;if(void 0!==r&&(clearTimeout(r),r=void 0),"ack"in e){l="open",o(e.ack);return}l="closed",void 0!==i&&t?.signal?.removeEventListener("abort",i),this._listenState.delete(c),d.abort(),a(e.cause),s&&n(e.error??new Rx(RI.ConnectionClosed,"subscriptions/listen closed before the server acknowledged"))},f=async()=>{d.abort(),await this.notification({method:"notifications/cancelled",params:{requestId:c}}).catch(()=>{})};this._listenState.set(c,{settle:m});let h=t?.timeout??6e4;if(r=setTimeout(()=>{m({cause:"remote",error:new Rx(RI.RequestTimeout,"subscriptions/listen ack timed out",{timeout:h})}),f().catch(()=>{})},h),t?.signal){let e=t.signal;i=()=>{if("closed"===l)return;let t=e.reason;m({cause:"local",error:t instanceof Error?t:Error(String(t??"Aborted"))}),f().catch(()=>{})},e.addEventListener("abort",i,{once:!0})}let y={jsonrpc:"2.0",id:c,method:"subscriptions/listen",params:{_meta:{...this._outboundMetaEnvelope()},notifications:e}},g=e=>{m({cause:"remote",error:e instanceof Error?e:Error(String(e))})};try{this.transport.send(y,{requestSignal:d.signal,onRequestStreamEnd:()=>m({cause:"remote",error:Error("subscriptions/listen: stream ended")})}).catch(g)}catch(e){g(e)}return{honoredFilter:await p,close:async()=>{"closed"!==l&&(m({cause:"local"}),await f())},closed:u}}get autoOpenedSubscription(){return this._autoOpenedSubscription}_onnotification(e,t){let r=Object.hasOwn(Cd,e.method)?Cd[e.method]:void 0;if("notifications/resources/updated"===e.method){let t=e.params?.uri;"string"==typeof t&&this._cache.evictKey("resources/read",t)}else if(void 0!==r)for(let e of r)this._cache.evict(e);if("notifications/subscriptions/acknowledged"===e.method){let t=e.params?._meta?.[SA],r="string"==typeof t?this._listenState.get(t):void 0;if(void 0!==r){let t=this._wireCodec().validateNotification("notifications/subscriptions/acknowledged",e);r.settle({ack:t.ok?t.value.params.notifications:{}});return}}if("notifications/cancelled"===e.method){let t=e.params?.requestId,r="string"==typeof t?this._listenState.get(t):void 0;if(void 0!==r)return void r.settle({cause:"remote",error:Error("subscriptions/listen: server cancelled the subscription")})}super._onnotification(e,t)}_onresponse(e){let t=e.id,r="string"==typeof t?this._listenState.get(t):void 0;if(void 0!==r)return void(S4.safeParse(e).success?r.settle({cause:"remote",error:R5.fromError(e.error.code,e.error.message,e.error.data)}):r.settle({cause:"graceful",error:new Rx(RI.ConnectionClosed,"subscriptions/listen: server closed the subscription gracefully before acknowledging")}));super._onresponse(e)}_onclose(){if(this._listenState.size>0){let e=new Rx(RI.ConnectionClosed,"Connection closed");for(let t of this._listenState.values())t.settle({cause:"remote",error:e});this._listenState.clear()}super._onclose()}async callTool(e,t){let r,i="modern"===this.getProtocolEra()&&"browser"!==Ce(),o=async()=>{let r;if(!i)return t;try{r=await this._resolveXMcpHeaderScan(e.name,t?.toolDefinition)}catch(e){this._reportStoreError(e)}if(!r?.valid||0===r.declarations.length)return t;let o=function(e,t){let r={};for(let i of e){let e=function(e,t){let r=e;for(let e of t){if(null===r||"object"!=typeof r)return;r=r[e]}return r}(t,i.path);if(null==e)continue;let o=function(e){if("string"==typeof e)return e;if("boolean"==typeof e)return e?"true":"false";if("number"==typeof e){if(!Number.isFinite(e)||Number.isInteger(e)&&!Number.isSafeInteger(e))return;return String(e)}}(e);void 0!==o&&(r[`Mcp-Param-${i.headerName}`]=!function(e){if(0===e.length||e.startsWith(PC)&&e.endsWith("?=")||e!==e.trim())return!0;for(let t=0;t=32)||!(r<=126)))return!0}return!1}(o)?o:`${PC}${function(e){let t=new TextEncoder().encode(e),r="";for(let e of t)r+=String.fromCodePoint(e);return btoa(r)}(o)}?=`)}return r}(r.declarations,e.arguments);return 0===Object.keys(o).length?t:{...t,headers:{...t?.headers,...o}}},n=t?.toolDefinition===void 0?await this._cache.outputValidator(e.name,e=>this._compileOutputValidator(e)).catch(e=>void this._reportStoreError(e)):this._compileOutputValidator(t.toolDefinition),a=()=>{if(void 0===n||n.ok)return;let t=n.compileError,r=(t instanceof Error?t.message:String(t)).slice(0,200);throw new R5(R9.InvalidParams,`Tool '${e.name}' has an invalid outputSchema: ${r}`)};a();try{r=await this.request({method:"tools/call",params:e},await o())}catch(c){let s=c instanceof R5&&-32020===c.code;if(!i||!s||t?.toolDefinition!==void 0)throw c;let d={signal:t?.signal,timeout:t?.timeout,cacheMode:"refresh"};await this._cache.evict("tools/list"),await this.listTools(void 0,d).catch(e=>this._reportStoreError(e)),n=await this._cache.outputValidator(e.name,e=>this._compileOutputValidator(e)).catch(e=>void this._reportStoreError(e)),a(),r=await this.request({method:"tools/call",params:e},await o())}let s=void 0!==n&&n.ok?n.validator:void 0;if(s){if(void 0===r.structuredContent&&!r.isError)throw new R5(R9.InvalidRequest,`Tool ${e.name} has an output schema but did not return structured content`);if(void 0!==r.structuredContent&&!r.isError)try{let e=s(r.structuredContent);if(!e.valid)throw new R5(R9.InvalidParams,`Structured content does not match the tool's output schema: ${e.errorMessage}`)}catch(e){if(e instanceof R5)throw e;throw new R5(R9.InvalidParams,`Failed to validate structured content: ${e instanceof Error?e.message:String(e)}`)}}return r}async listTools(e,t){if(!this._serverCapabilities?.tools&&!this._enforceStrictCapabilities)return console.debug("Client.listTools() called but server does not advertise tools capability - returning empty list"),{tools:[]};if(e?.cursor!==void 0){let r=await this.request({method:"tools/list",params:e},t);return this._excludeInvalidXMcpHeaderTools(r),r}let r=await this._serveFromCache("tools/list",void 0,t);return void 0!==r?r:this._listAllPages("tools/list",e,t,e=>e.tools,e=>this._excludeInvalidXMcpHeaderTools(e))}_excludeInvalidXMcpHeaderTools(e){if("modern"!==this.getProtocolEra()||!this.transport||"stdio"===Ct(this.transport))return;let t=e.tools.filter(e=>{let t=Pq(e.inputSchema);return!!t.valid||(console.warn(`[mcp-sdk] excluding tool '${e.name}' from tools/list: invalid x-mcp-header declaration — ${t.reason}`),!1)});t.length!==e.tools.length&&(e.tools=t)}_setupListChangedHandler(e,t,r,i){let o=oJ(wp,r);if(!o.success)throw Error(`Invalid ${e} listChanged options: ${o.error.message}`);if("function"!=typeof r.onChanged)throw TypeError(`Invalid ${e} listChanged options: onChanged must be a function`);let{autoRefresh:n,debounceMs:a}=o.data,{onChanged:s}=r,d=async()=>{if(!n)return void s(null,null);try{s(null,await i())}catch(e){s(e instanceof Error?e:Error(String(e)),null)}},c=()=>{if(a){let t=this._listChangedDebounceTimers.get(e);t&&clearTimeout(t);let r=setTimeout(d,a);this._listChangedDebounceTimers.set(e,r)}else d()};this.setNotificationHandler(t,c)}async sendRootsListChanged(){return this.notification({method:"notifications/roots/list_changed"})}};(class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.SseError"})}static[Symbol.hasInstance](e){return Rq(this,e)}static isInstance(e){if("function"!=typeof this)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return Rq(this,e)}constructor(e,t,r){super(`SSE error: ${t}`),this.code=e,this.event=r,RV(this,new.target)}});let Cl=nV().nonnegative(),Cp=new U;class Cu extends Error{failure;constructor(e,t){super(e.message,t),this.name="DaemonFailure",this.failure=e}}function Cm(e){let t=0;for(let r=0;r=55296&&i<=56319){let t=e.charCodeAt(r+1);if(t<56320||t>57343||Number.isNaN(t))return null;r+=1}else if(i>=56320&&i<=57343)return null;t+=1}return t}function Cf(e,t){return new Cu({kind:"protocol",code:e,message:t})}function Ch(e,t){return new Cu({kind:"unavailable",code:e,message:t})}function Cy(e){if(e instanceof Cu)return e.failure;if(e instanceof R5){let t=e.data,r="object"==typeof t&&null!==t&&"code"in t&&"string"==typeof t.code?t.code:`jsonrpc_${e.code}`;return{kind:Cg(r),code:r,message:e.message}}if(e instanceof Rx){let t=`sdk_${e.code.toLowerCase()}`;return{kind:Cg(t),code:t,message:e.message}}return e instanceof Error?{kind:"protocol",code:e.name,message:e.message}:{kind:"protocol",code:"unknown",message:String(e)}}function Cg(e){return e.includes("not_authorized")||"denied"===e||e.startsWith("authorization")?"denied":e.includes("not_found")||"project_required"===e?"not_found":e.includes("stale")?"stale":e.includes("unavailable")||e.includes("warming")||e.includes("saturated")?"unavailable":e.includes("invalid")||e.includes("malformed")?"invalid_request":e.includes("disconnected")||e.includes("socket")?"disconnected":"protocol"}let C_=nz({handle:o7().min(1),original_chars:Cl,preview:o7(),preview_chars:Cl,truncated:nY(!0)}),Cv=nz({handle:o7().min(1),expired:nY(!1),original_chars:Cl,total_chars:Cl,content:o7(),offset:Cl,next_offset:Cl.nullable().optional(),has_more:nI()}),Cb=nz({handle:o7().min(1),expired:nI().nullable().optional(),content:nj().optional(),reason_code:o7()}),C$=new Set(["PATH","HOME","USERPROFILE","HOMEDRIVE","HOMEPATH","XDG_CONFIG_HOME","XDG_DATA_HOME","LANG","LC_ALL","LC_CTYPE","TMPDIR","TEMP","TMP","SystemRoot","SystemDrive","APPDATA","LOCALAPPDATA","RUST_LOG","RUST_BACKTRACE","RUST_LIB_BACKTRACE","HTTP_PROXY","HTTPS_PROXY","ALL_PROXY","NO_PROXY","http_proxy","https_proxy","all_proxy","no_proxy"]);class CS{options;#g;#_;#v;#b=null;#$=null;#S=!1;#k=!1;constructor(e){this.options=e;let t=["serve"];null!==e.projectRoot&&t.push("--path",e.projectRoot),this.#_=new P5({command:e.binary,args:t,env:function(e){let t={};for(let[r,i]of Object.entries(e))void 0!==i&&(C$.has(r)||r.startsWith("TRACEDECAY_"))&&(t[r]=i);return t}(e.env),cwd:e.cwd,stderr:"inherit"}),this.#g=new Cc({name:"tracedecay-chatgpt-extension",version:"0.0.0"}),this.#v=new Promise(e=>{this.#_.onclose=()=>{this.#k=!0,e()}})}get closed(){return this.#k}async connect(){this.#w(),null===this.#b&&(this.#b=this.#g.connect(this.#_).catch(e=>{throw this.#k=!0,new Cu({kind:"disconnected",code:"serve_spawn_failed",message:`Cannot start ${this.options.binary} serve: ${e instanceof Error?e.message:String(e)}`},{cause:e})}),this.#S=null!==this.#_.pid),await this.#b,this.#w()}serverInfo(){let e=this.#g.getServerVersion();return void 0===e?null:{name:e.name,version:e.version}}async listToolNames(){return await this.connect(),this.#w(),(await this.#g.listTools()).tools.map(e=>e.name)}async callJson(e,t,r){var i;await this.connect(),this.#w();let o=await this.#R({name:e,arguments:{...t,format:"json"}},r);for(let e of o.content)"text"===e.type&&e.text.startsWith("tracedecay_repeated_query:")&&Cp.getStore()?.push(e.text);let n=Cw(o,e);if("object"==typeof(i=n)&&null!==i&&!Array.isArray(i)&&"handle"in i&&"truncated"in i&&!0===i.truncated){let t=C_.safeParse(n);if(!t.success)throw Cf("response_handle_malformed","truncated response metadata is malformed");if(Cm(t.data.preview)!==t.data.preview_chars)throw Cf("response_handle_malformed","truncated response preview length is inconsistent");if(t.data.original_chars>1048576)throw Ch("response_handle_too_large","response handle exceeds the 1048576-byte reassembly budget");n=CR(await this.#P(t.data,r),e)}return n}async #P(e,t){let r=0,i=0,o=[];for(;;){if(1024===o.length)throw Ch("response_handle_page_limit","response handle exceeds the 1024-page reassembly limit");let n=Cw(await this.#R({name:"tracedecay_retrieve",arguments:{handle:e.handle,offset:r,format:"json"}},t),"tracedecay_retrieve"),a=Cv.safeParse(n);if(!a.success){let t=Cb.safeParse(n);if(t.success&&t.data.handle===e.handle)throw new Cu({kind:"unavailable",code:t.data.reason_code,message:`response handle ${e.handle} is no longer available (${t.data.reason_code})`});throw new Cu({kind:"protocol",code:"retrieve_page_malformed",message:`tracedecay_retrieve returned an unexpected page shape for ${e.handle}`})}let s=a.data,d=Cm(s.content),c=null===d?null:r+d;if(s.handle!==e.handle||s.original_chars!==e.original_chars||s.total_chars!==e.original_chars||s.offset!==r||null===c||!Number.isSafeInteger(c)||c>e.original_chars)throw Cf("retrieve_page_malformed",`tracedecay_retrieve returned inconsistent page metadata for ${e.handle}`);let l=Buffer.byteLength(s.content,"utf8");if(l>1048576-i)throw Ch("response_handle_too_large","response handle exceeds the 1048576-byte reassembly budget");if(i+=l,o.push(s.content),s.has_more){if(null===s.next_offset||void 0===s.next_offset||s.next_offset<=r||s.next_offset!==c||c>=e.original_chars)throw Cf("retrieve_page_malformed",`tracedecay_retrieve returned an invalid continuation for ${e.handle}`);r=s.next_offset;continue}if(null!==s.next_offset&&void 0!==s.next_offset||c!==e.original_chars)throw Cf("retrieve_page_malformed",`tracedecay_retrieve returned an incomplete terminal page for ${e.handle}`);return o.join("")}}async #R(e,t){if(this.#w(),t?.aborted)throw t.reason??new DOMException("The operation was aborted","AbortError");try{let r=await this.#g.callTool(e,{...void 0===t?{}:{signal:t}});if(t?.aborted)throw t.reason??new DOMException("The operation was aborted","AbortError");return r}catch(e){if(t?.aborted)throw t.reason??e;throw e}}#w(){if(this.#k)throw new Cu({kind:"disconnected",code:"serve_closed",message:"tracedecay serve exited"})}close(){return this.#k=!0,this.#$??=this.#V(),this.#$}async #V(){let e=this.#S||null!==this.#_.pid?this.#v:null,[t]=await Promise.allSettled([(async()=>{await this.#_.close(),await e})(),this.#b]),r=this.#S||null!==this.#_.pid?this.#v:null,[i]=await Promise.allSettled([(async()=>{await this.#g.close(),await r})()]),o=[t,i].flatMap(e=>"rejected"===e.status?[e.reason]:[]);if(1===o.length)throw o[0];if(o.length>1)throw AggregateError(o,"Failed to close tracedecay serve session")}}let Ck=nz({problem:nz({kind:o7(),code:o7(),message:o7()})});function Cw(e,t){let r=!0===e.isError?Ck.safeParse(e.structuredContent):null;if(r?.success){let{kind:e,code:t,message:i}=r.data.problem,o=`${e}/${t}`;throw new Cu({kind:Cg(o),code:o,message:i})}return CR(function(e){for(let t of e.content)if("text"===t.type)return t.text;return""}(e),t)}function CR(e,t){try{return JSON.parse(e)}catch(r){throw new Cu({kind:"protocol",code:"non_json_tool_result",message:`${t} did not return JSON: ${e.slice(0,200)}`},{cause:r})}}class CP{#q;#I=null;#x=new Map;#j=new Map;#$=!1;#C=null;constructor(e){this.#q=e}async authority(){this.#w();let e=await async function(e){let t,r,i=O.join(e,"daemon-authority.json");try{t=await x(i,"utf8")}catch(t){let e="object"==typeof t&&null!==t&&"code"in t?String(t.code):"io_error";return{kind:"absent",failure:{kind:"disconnected",code:"ENOENT"===e?"daemon_authority_absent":e,message:"ENOENT"===e?`No TraceDecay daemon authority record at ${i}; start the daemon (tracedecay daemon run) first.`:`Cannot read ${i}: ${String(t)}`}}}try{r=JSON.parse(t)}catch(e){return{kind:"invalid",failure:{kind:"protocol",code:"daemon_authority_malformed",message:`${i} is not JSON: ${String(e)}`}}}let o=mS.safeParse(r);return o.success?{kind:"available",record:o.data}:{kind:"invalid",failure:{kind:"protocol",code:"daemon_authority_malformed",message:`${i} does not match the daemon authority record: ${o.error.message}`}}}(this.#q.profileRoot);return this.#w(),e}async daemonState(){this.#w();let e=await this.authority();if(this.#w(),"available"!==e.kind)return{state:"disconnected",failure:e.failure};let t=await async function(e,t=fetch){let r=mk(e);if(null===r)return!function(e){if(e<=0)return!1;try{return process.kill(e,0),!0}catch(e){return"object"==typeof e&&null!==e&&"code"in e&&"EPERM"===e.code}}(e.pid)?{kind:"disconnected",code:"daemon_exited",message:`Daemon pid ${e.pid} recorded in ${e.profile_root} is no longer running; start it with \`tracedecay daemon run\`.`}:{kind:"unavailable",code:"http_application_endpoint_absent",message:`Daemon pid ${e.pid} has not published its HTTP application endpoint yet.`};try{return await t(`${r}/`,{method:"GET",signal:AbortSignal.timeout(2e3),redirect:"manual"}),null}catch(t){return{kind:"disconnected",code:"daemon_unreachable",message:`Daemon pid ${e.pid} published ${r} but is not answering: ${t instanceof Error?t.cause instanceof Error?t.cause.message:t.message:String(t)}`}}}(e.record);return(this.#w(),null!==t)?{state:"disconnected",failure:t}:{state:"connected",profile_root:e.record.profile_root,version:e.record.version,pid:e.record.pid}}async #T(){this.#w();let e=await this.authority();if(this.#w(),"available"!==e.kind)throw new Cu(e.failure);return e.record}async #O(){for(;;){this.#w();let e=this.#I;if(null===e)return this.#I=new CS({binary:this.#q.binary,projectRoot:null,env:this.#q.env,cwd:this.#q.cwd}),this.#I;if(!e.closed)return e;await e.close(),this.#w(),this.#I===e&&(this.#I=null)}}#E(){return new Sv(async(e,t,r)=>{let i=await this.#O();return this.#w(),i.callJson(e,t,r)})}async listProjects(e){await this.#T();let t=this.#E();return(await this.#A(()=>t.projectList({limit:10},e))).projects.map(CI)}async resolveProject(e,t){await this.#T();let r=this.#E(),i=await this.#A(()=>r.projectContext({project_selector:{project_id:e}},t));if("not_found"===i.status){let t=this.#x.get(e);throw await t?.session.close(),this.#x.get(e)===t&&this.#x.delete(e),new Cu({kind:"denied",code:"project_not_registered",message:`Project ${e} is not registered in this TraceDecay profile; only registered projects can be explored.`})}return CI(i.project)}async #M(e,t){this.#w();let r=await this.resolveProject(e,t);this.#w();let i=this.#j.get(e);if(void 0===i){let t=this.#W(r).finally(()=>{this.#j.get(e)===t&&this.#j.delete(e)});t.catch(()=>void 0),this.#j.set(e,t),i=t}return await async function(e,t){if(void 0===t)return await e;let r=()=>t.reason instanceof Error?t.reason:new DOMException("This operation was aborted","AbortError");if(t.aborted)throw r();return await new Promise((i,o)=>{let n=()=>o(r());t.addEventListener("abort",n,{once:!0}),e.then(i,o).finally(()=>t.removeEventListener("abort",n))})}(i,t)}async #W(e){let t=e.project_id,r=await this.#T();this.#w();let i=this.#x.get(t);if(void 0!==i){if(!i.session.closed&&i.authority.process_run_id===r.process_run_id&&i.project.project_root===e.project_root)return i;await i.session.close(),this.#x.get(t)===i&&this.#x.delete(t),this.#w()}let o=mk(r);if(null===o)throw new Cu({kind:"unavailable",code:"http_application_endpoint_absent",message:"The daemon has not published its HTTP application endpoint yet."});let n=new CS({binary:this.#q.binary,projectRoot:e.project_root,env:this.#q.env,cwd:e.project_root}),a=new Sh({baseUrl:o,projectId:e.project_id,token:r.auth_token,mcp:{callTool:(e,t,r)=>n.callJson(e,function(e){if("object"==typeof e&&null!==e&&!Array.isArray(e))return e;throw new Cu({kind:"invalid_request",code:"non_object_request",message:"MCP tool requests must be objects"})}(t),r.signal)}}),s={project:e,session:n,client:a,authority:r};return this.#x.set(t,s),s}async status(e,t){let{client:r,authority:i}=await this.#M(e,t);return{status:await this.#A(()=>r.operations.status({},CV(t))),authority:i}}async search(e,t,r,i){let{client:o}=await this.#M(e,i);return this.#A(()=>o.operations.search({query:t,limit:r,prefer_symbol:!0},CV(i)))}async node(e,t,r){let{client:i}=await this.#M(e,r);return this.#A(()=>i.operations.node({node_id:t},CV(r)))}async impact(e,t,r,i){let{client:o}=await this.#M(e,i);return this.#A(()=>o.operations.impact({node_id:t,max_depth:r},CV(i)))}async callers(e,t,r,i){let{client:o}=await this.#M(e,i);return this.#A(()=>o.operations.code_callers({node_id:t,maximum_depth:r,meta:{order:"stable_identity",projection:"summary"}},CV(i))).then(Cq)}async callees(e,t,r,i,o){let{client:n}=await this.#M(e,o);return this.#A(()=>n.operations.code_callees({node_id:t,maximum_depth:i,scope:{generation:r},meta:{order:"stable_identity",projection:"summary"}},CV(o))).then(Cq)}async symbolSearch(e,t,r){let{client:i}=await this.#M(e,r);return this.#A(()=>i.operations.code_symbol_search({query:t,lazy_index_ignored_dependencies:!1,scope:{},meta:{order:"relevance",projection:"summary"}},CV(r))).then(Cq)}#w(){if(this.#$)throw new Cu({kind:"unavailable",code:"bridge_closed",message:"the extension bridge is shutting down"})}async #A(e){this.#w();try{let t=await e();return this.#w(),t}catch(e){throw new Cu(function(e){if(e instanceof Cu)return e.failure;if(e instanceof $0){var t,r;let i=e.problem.kind,o=`${i}/${e.problem.code}`;return{kind:(t=i,r=e.status,"not_found_or_not_authorized"===t||403===r?"denied":404===r?"not_found":Cg(t)),code:o,message:e.problem.message}}return e instanceof $X?{kind:"protocol",code:"daemon_authentication",message:e.message}:e instanceof $Q?{kind:"disconnected",code:"daemon_disconnected",message:e.message}:e instanceof $J?void 0!==e.cause?Cy(e.cause):{kind:"disconnected",code:"transport",message:e.message}:e instanceof $Y?{kind:"protocol",code:e.name,message:e.message}:Cy(e)}(e),{cause:e})}}close(){return null!==this.#C||(this.#$=!0,this.#C=this.#N()),this.#C}async #N(){await Promise.allSettled([...this.#j.values()]);let e=[...this.#x.values()].map(e=>e.session);null!==this.#I&&e.push(this.#I),this.#x.clear(),this.#I=null;let t=(await Promise.allSettled(e.map(async e=>e.close()))).flatMap(e=>"rejected"===e.status?[e.reason]:[]);if(1===t.length)throw t[0];if(t.length>1)throw AggregateError(t,"extension bridge session cleanup failed")}}function CV(e){return void 0===e?{}:{signal:e}}function Cq(e){let t=e.outcome.value.payload;if(null===t)throw new Cu({kind:"unavailable",code:"empty_payload",message:`the daemon returned a ${e.outcome.outcome} outcome without a payload`});return t}function CI(e){return{project_id:e.project_id,label:e.label,project_root:e.project_root,head_branch:e.head_branch??null,default_branch:e.default_branch??null}}var Cx="ui/resourceUri";function Cj(e,t,r,i){let o=r._meta,n=o.ui,a=o[Cx],s=o;return n?.resourceUri&&!a?s={...o,[Cx]:n.resourceUri}:a&&!n?.resourceUri&&(s={...o,ui:{...n,resourceUri:a}}),e.registerTool(t,{...r,_meta:s},i)}function CC(e,t,r){function i(r,i){if(r._zod||Object.defineProperty(r,"_zod",{value:{def:i,constr:a,traits:new Set},enumerable:!1}),r._zod.traits.has(e))return;r._zod.traits.add(e),t(r,i);let o=a.prototype,n=Object.keys(o);for(let e=0;e!!r?.Parent&&t instanceof r.Parent||t?._zod?.traits?.has(e)}),Object.defineProperty(a,"name",{value:e}),a}Symbol("zod_brand");class CT extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class CO extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}}(en=globalThis).__zod_globalConfig??(en.__zod_globalConfig={});let CE=globalThis.__zod_globalConfig;function CA(e){return e&&Object.assign(CE,e),CE}let CM=/^[cC][0-9a-z]{6,}$/,CW=/^[0-9a-z]+$/,CN=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Cz=/^[0-9a-vA-V]{20}$/,CD=/^[A-Za-z0-9]{27}$/,CF=/^[a-zA-Z0-9_-]{21}$/,CL=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,CU=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,CH=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([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)$/,CG=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,CB=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,CK=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,CJ=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,CZ=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,CQ=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,CX=/^[A-Za-z0-9_-]*$/,CY=/^https?$/,C1=/^\+[1-9]\d{6,14}$/,C0="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",C2=RegExp(`^${C0}$`);function C4(e){let t="(?:[01]\\d|2[0-3]):[0-5]\\d";return"number"==typeof e.precision?-1===e.precision?`${t}`:0===e.precision?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}let C6=/^-?\d+$/,C3=/^-?\d+(?:\.\d+)?$/,C9=/^(?:true|false)$/i,C5=/^[^A-Z]*$/,C8=/^[^a-z]*$/;function C7(e){let t=Object.values(e).filter(e=>"number"==typeof e);return Object.entries(e).filter(([e,r])=>-1===t.indexOf(+e)).map(([e,t])=>t)}function Te(e,t){return"bigint"==typeof t?t.toString():t}function Tt(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function Tr(e){let t=+!!e.startsWith("^"),r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}let Ti=Symbol("evaluating");function To(e,t,r){let i;Object.defineProperty(e,t,{get(){if(i!==Ti)return void 0===i&&(i=Ti,i=r()),i},set(r){Object.defineProperty(e,t,{value:r})},configurable:!0})}function Tn(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function Ta(...e){let t={};for(let r of e)Object.assign(t,Object.getOwnPropertyDescriptors(r));return Object.defineProperties({},t)}function Ts(e){return JSON.stringify(e)}let Td="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Tc(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}let Tl=Tt(()=>{if(CE.jitless||"u">typeof navigator&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return Function(""),!0}catch(e){return!1}});function Tp(e){if(!1===Tc(e))return!1;let t=e.constructor;if(void 0===t||"function"!=typeof t)return!0;let r=t.prototype;return!1!==Tc(r)&&!1!==Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")}function Tu(e){return Tp(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}let Tm=new Set(["string","number","symbol"]);function Tf(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Th(e,t,r){let i=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(i._zod.parent=e),i}function Ty(e){if(!e)return{};if("string"==typeof e)return{error:()=>e};if(e?.message!==void 0){if(e?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");e.error=e.message}return(delete e.message,"string"==typeof e.error)?{...e,error:()=>e.error}:e}let Tg={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-0x80000000,0x7fffffff],uint32:[0,0xffffffff],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function T_(e,t=0){if(!0===e.aborted)return!0;for(let r=t;r(t.path??(t.path=[]),t.path.unshift(e),t))}function Tb(e){return"string"==typeof e?e:e?.message}function T$(e,t,r){let i=e.message?e.message:Tb(e.inst?._zod.def?.error?.(e))??Tb(t?.error?.(e))??Tb(r.customError?.(e))??Tb(r.localeError?.(e))??"Invalid input",{inst:o,continue:n,input:a,...s}=e;return s.path??(s.path=[]),s.message=i,t?.reportInput&&(s.input=a),s}function TS(e){return Array.isArray(e)?"array":"string"==typeof e?"string":"unknown"}function Tk(...e){let[t,r,i]=e;return"string"==typeof t?{message:t,code:"custom",input:r,inst:i}:{...t}}let Tw=CC("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),TR={number:"number",bigint:"bigint",object:"date"},TP=CC("$ZodCheckLessThan",(e,t)=>{Tw.init(e,t);let r=TR[typeof t.value];e._zod.onattach.push(e=>{let r=e._zod.bag,i=(t.inclusive?r.maximum:r.exclusiveMaximum)??1/0;t.value{(t.inclusive?i.value<=t.value:i.value{Tw.init(e,t);let r=TR[typeof t.value];e._zod.onattach.push(e=>{let r=e._zod.bag,i=(t.inclusive?r.minimum:r.exclusiveMinimum)??-1/0;t.value>i&&(t.inclusive?r.minimum=t.value:r.exclusiveMinimum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value>=t.value:i.value>t.value)||i.issues.push({origin:r,code:"too_small",minimum:"object"==typeof t.value?t.value.getTime():t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Tq=CC("$ZodCheckMultipleOf",(e,t)=>{Tw.init(e,t),e._zod.onattach.push(e=>{var r;(r=e._zod.bag).multipleOf??(r.multipleOf=t.value)}),e._zod.check=r=>{let i,o,n;if(typeof r.value!=typeof t.value)throw Error("Cannot mix number and bigint in multiple_of check.");("bigint"==typeof r.value?r.value%t.value===BigInt(0):0==(o=Math.round(i=r.value/t.value),n=Number.EPSILON*Math.max(Math.abs(i),1),Math.abs(i-o){Tw.init(e,t),t.format=t.format||"float64";let r=t.format?.includes("int"),i=r?"int":"number",[o,n]=Tg[t.format];e._zod.onattach.push(e=>{let i=e._zod.bag;i.format=t.format,i.minimum=o,i.maximum=n,r&&(i.pattern=C6)}),e._zod.check=a=>{let s=a.value;if(r){if(!Number.isInteger(s))return void a.issues.push({expected:i,format:t.format,code:"invalid_type",continue:!1,input:s,inst:e});if(!Number.isSafeInteger(s))return void(s>0?a.issues.push({input:s,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!t.abort}):a.issues.push({input:s,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!t.abort}))}sn&&a.issues.push({origin:"number",input:s,code:"too_big",maximum:n,inclusive:!0,inst:e,continue:!t.abort})}}),Tx=CC("$ZodCheckMaxLength",(e,t)=>{var r;Tw.init(e,t),(r=e._zod.def).when??(r.when=e=>{let t=e.value;return null!=t&&void 0!==t.length}),e._zod.onattach.push(e=>{let r=e._zod.bag.maximum??1/0;t.maximum{let i=r.value;if(i.length<=t.maximum)return;let o=TS(i);r.issues.push({origin:o,code:"too_big",maximum:t.maximum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),Tj=CC("$ZodCheckMinLength",(e,t)=>{var r;Tw.init(e,t),(r=e._zod.def).when??(r.when=e=>{let t=e.value;return null!=t&&void 0!==t.length}),e._zod.onattach.push(e=>{let r=e._zod.bag.minimum??-1/0;t.minimum>r&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{let i=r.value;if(i.length>=t.minimum)return;let o=TS(i);r.issues.push({origin:o,code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),TC=CC("$ZodCheckLengthEquals",(e,t)=>{var r;Tw.init(e,t),(r=e._zod.def).when??(r.when=e=>{let t=e.value;return null!=t&&void 0!==t.length}),e._zod.onattach.push(e=>{let r=e._zod.bag;r.minimum=t.length,r.maximum=t.length,r.length=t.length}),e._zod.check=r=>{let i=r.value,o=i.length;if(o===t.length)return;let n=TS(i),a=o>t.length;r.issues.push({origin:n,...a?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),TT=CC("$ZodCheckStringFormat",(e,t)=>{var r,i;Tw.init(e,t),e._zod.onattach.push(e=>{let r=e._zod.bag;r.format=t.format,t.pattern&&(r.patterns??(r.patterns=new Set),r.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=r=>{t.pattern.lastIndex=0,t.pattern.test(r.value)||r.issues.push({origin:"string",code:"invalid_format",format:t.format,input:r.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(i=e._zod).check??(i.check=()=>{})}),TO=CC("$ZodCheckRegex",(e,t)=>{TT.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,t.pattern.test(r.value)||r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),TE=CC("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=C5),TT.init(e,t)}),TA=CC("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=C8),TT.init(e,t)}),TM=CC("$ZodCheckIncludes",(e,t)=>{Tw.init(e,t);let r=Tf(t.includes),i=new RegExp("number"==typeof t.position?`^.{${t.position}}${r}`:r);t.pattern=i,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(i)}),e._zod.check=r=>{r.value.includes(t.includes,t.position)||r.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:r.value,inst:e,continue:!t.abort})}}),TW=CC("$ZodCheckStartsWith",(e,t)=>{Tw.init(e,t);let r=RegExp(`^${Tf(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(r)}),e._zod.check=r=>{r.value.startsWith(t.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:r.value,inst:e,continue:!t.abort})}}),TN=CC("$ZodCheckEndsWith",(e,t)=>{Tw.init(e,t);let r=RegExp(`.*${Tf(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(r)}),e._zod.check=r=>{r.value.endsWith(t.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:r.value,inst:e,continue:!t.abort})}}),Tz=CC("$ZodCheckOverwrite",(e,t)=>{Tw.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}});class TD{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if("function"==typeof e){e(this,{execution:"sync"}),e(this,{execution:"async"});return}let t=e.split("\n").filter(e=>e),r=Math.min(...t.map(e=>e.length-e.trimStart().length));for(let e of t.map(e=>e.slice(r)).map(e=>" ".repeat(2*this.indent)+e))this.content.push(e)}compile(){let e=Function,t=this?.args,r=[...(this?.content??[""]).map(e=>` ${e}`)];return new e(...t,r.join("\n"))}}let TF=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,Te,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},TL=CC("$ZodError",TF),TU=CC("$ZodError",TF,{Parent:Error}),TH=e=>(t,r,i,o)=>{let n=i?{...i,async:!1}:{async:!1},a=t._zod.run({value:r,issues:[]},n);if(a instanceof Promise)throw new CT;if(a.issues.length){let t=new(o?.Err??e)(a.issues.map(e=>T$(e,n,CA())));throw Td(t,o?.callee),t}return a.value},TG=e=>async(t,r,i,o)=>{let n=i?{...i,async:!0}:{async:!0},a=t._zod.run({value:r,issues:[]},n);if(a instanceof Promise&&(a=await a),a.issues.length){let t=new(o?.Err??e)(a.issues.map(e=>T$(e,n,CA())));throw Td(t,o?.callee),t}return a.value},TB=e=>(t,r,i)=>{let o=i?{...i,async:!1}:{async:!1},n=t._zod.run({value:r,issues:[]},o);if(n instanceof Promise)throw new CT;return n.issues.length?{success:!1,error:new(e??TL)(n.issues.map(e=>T$(e,o,CA())))}:{success:!0,data:n.value}},TK=TB(TU),TJ=e=>async(t,r,i)=>{let o=i?{...i,async:!0}:{async:!0},n=t._zod.run({value:r,issues:[]},o);return n instanceof Promise&&(n=await n),n.issues.length?{success:!1,error:new e(n.issues.map(e=>T$(e,o,CA())))}:{success:!0,data:n.value}},TZ=TJ(TU),TQ={major:4,minor:4,patch:3},TX=CC("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=TQ;let i=[...e._zod.def.checks??[]];for(let t of(e._zod.traits.has("$ZodCheck")&&i.unshift(e),i))for(let r of t._zod.onattach)r(e);if(0===i.length)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(e,t,r)=>{let i,o=T_(e);for(let n of t){if(n._zod.def.when){if(function(e,t=0){if(!0===e.aborted)return!0;for(let r=t;r{await a,e.issues.length!==t&&(o||(o=T_(e,t)))});else{if(e.issues.length===t)continue;o||(o=T_(e,t))}}return i?i.then(()=>e):e},r=(r,o,n)=>{if(T_(r))return r.aborted=!0,r;let a=t(o,i,n);if(a instanceof Promise){if(!1===n.async)throw new CT;return a.then(t=>e._zod.parse(t,n))}return e._zod.parse(a,n)};e._zod.run=(o,n)=>{if(n.skipChecks)return e._zod.parse(o,n);if("backward"===n.direction){let t=e._zod.parse({value:o.value,issues:[]},{...n,skipChecks:!0});return t instanceof Promise?t.then(e=>r(e,o,n)):r(t,o,n)}let a=e._zod.parse(o,n);if(a instanceof Promise){if(!1===n.async)throw new CT;return a.then(e=>t(e,i,n))}return t(a,i,n)}}To(e,"~standard",()=>({validate:t=>{try{let r=TK(e,t);return r.success?{value:r.data}:{issues:r.error?.issues}}catch(r){return TZ(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:"zod",version:1}))}),TY=CC("$ZodString",(e,t)=>{var r;let i;TX.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??(i=(r=e._zod.bag)?`[\\s\\S]{${r?.minimum??0},${r?.maximum??""}}`:"[\\s\\S]*",RegExp(`^${i}$`)),e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=String(r.value)}catch(e){}return"string"==typeof r.value||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),T1=CC("$ZodStringFormat",(e,t)=>{TT.init(e,t),TY.init(e,t)}),T0=CC("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=CU),T1.init(e,t)}),T2=CC("$ZodUUID",(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(void 0===e)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=CH(e))}else t.pattern??(t.pattern=CH());T1.init(e,t)}),T4=CC("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=CG),T1.init(e,t)}),T6=CC("$ZodURL",(e,t)=>{T1.init(e,t),e._zod.check=r=>{try{let i=r.value.trim();if(!t.normalize&&t.protocol?.source===CY.source&&!/^https?:\/\//i.test(i))return void r.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:r.value,inst:e,continue:!t.abort});let o=new URL(i);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(o.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(o.protocol.endsWith(":")?o.protocol.slice(0,-1):o.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),t.normalize?r.value=o.href:r.value=i;return}catch(i){r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),T3=CC("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),T1.init(e,t)}),T9=CC("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=CF),T1.init(e,t)}),T5=CC("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=CM),T1.init(e,t)}),T8=CC("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=CW),T1.init(e,t)}),T7=CC("$ZodULID",(e,t)=>{t.pattern??(t.pattern=CN),T1.init(e,t)}),Oe=CC("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Cz),T1.init(e,t)}),Ot=CC("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=CD),T1.init(e,t)}),Or=CC("$ZodISODateTime",(e,t)=>{let r,i,o;t.pattern??(r=C4({precision:t.precision}),i=["Z"],t.local&&i.push(""),t.offset&&i.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)"),o=`${r}(?:${i.join("|")})`,t.pattern=RegExp(`^${C0}T(?:${o})$`)),T1.init(e,t)}),Oi=CC("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=C2),T1.init(e,t)}),Oo=CC("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=RegExp(`^${C4(t)}$`)),T1.init(e,t)}),On=CC("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=CL),T1.init(e,t)}),Oa=CC("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=CB),T1.init(e,t),e._zod.bag.format="ipv4"}),Os=CC("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=CK),T1.init(e,t),e._zod.bag.format="ipv6",e._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}}),Od=CC("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=CJ),T1.init(e,t)}),Oc=CC("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=CZ),T1.init(e,t),e._zod.check=r=>{let i=r.value.split("/");try{if(2!==i.length)throw Error();let[e,t]=i;if(!t)throw Error();let r=Number(t);if(`${r}`!==t||r<0||r>128)throw Error();new URL(`http://[${e}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}}});function Ol(e){if(""===e)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}let Op=CC("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=CQ),T1.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=r=>{Ol(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}}),Ou=CC("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=CX),T1.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=r=>{!function(e){if(!CX.test(e))return!1;let t=e.replace(/[-_]/g,e=>"-"===e?"+":"/");return Ol(t.padEnd(4*Math.ceil(t.length/4),"="))}(r.value)&&r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),Om=CC("$ZodE164",(e,t)=>{t.pattern??(t.pattern=C1),T1.init(e,t)}),Of=CC("$ZodJWT",(e,t)=>{T1.init(e,t),e._zod.check=r=>{!function(e,t=null){try{let r=e.split(".");if(3!==r.length)return!1;let[i]=r;if(!i)return!1;let o=JSON.parse(atob(i));if("typ"in o&&o?.typ!=="JWT"||!o.alg||t&&(!("alg"in o)||o.alg!==t))return!1;return!0}catch{return!1}}(r.value,t.alg)&&r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),Oh=CC("$ZodNumber",(e,t)=>{TX.init(e,t),e._zod.pattern=e._zod.bag.pattern??C3,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=Number(r.value)}catch(e){}let o=r.value;if("number"==typeof o&&!Number.isNaN(o)&&Number.isFinite(o))return r;let n="number"==typeof o?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:o,inst:e,...n?{received:n}:{}}),r}}),Oy=CC("$ZodNumberFormat",(e,t)=>{TI.init(e,t),Oh.init(e,t)}),Og=CC("$ZodBoolean",(e,t)=>{TX.init(e,t),e._zod.pattern=C9,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=!!r.value}catch(e){}let o=r.value;return"boolean"==typeof o||r.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:e}),r}}),O_=CC("$ZodUnknown",(e,t)=>{TX.init(e,t),e._zod.parse=e=>e}),Ov=CC("$ZodNever",(e,t)=>{TX.init(e,t),e._zod.parse=(t,r)=>(t.issues.push({expected:"never",code:"invalid_type",input:t.value,inst:e}),t)});function Ob(e,t,r){e.issues.length&&t.issues.push(...Tv(r,e.issues)),t.value[r]=e.value}let O$=CC("$ZodArray",(e,t)=>{TX.init(e,t),e._zod.parse=(r,i)=>{let o=r.value;if(!Array.isArray(o))return r.issues.push({expected:"array",code:"invalid_type",input:o,inst:e}),r;r.value=Array(o.length);let n=[];for(let e=0;eOb(t,r,e))):Ob(s,r,e)}return n.length?Promise.all(n).then(()=>r):r}});function OS(e,t,r,i,o,n){let a=r in i;if(e.issues.length){if(o&&n&&!a)return;t.issues.push(...Tv(r,e.issues))}if(!a&&!o){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[r]});return}void 0===e.value?a&&(t.value[r]=void 0):t.value[r]=e.value}function Ok(e){var t;let r=Object.keys(e.shape);for(let t of r)if(!e.shape?.[t]?._zod?.traits?.has("$ZodType"))throw Error(`Invalid element at key "${t}": expected a Zod schema`);let i=Object.keys(t=e.shape).filter(e=>"optional"===t[e]._zod.optin&&"optional"===t[e]._zod.optout);return{...e,keys:r,keySet:new Set(r),numKeys:r.length,optionalKeys:new Set(i)}}function Ow(e,t,r,i,o,n){let a=[],s=o.keySet,d=o.catchall._zod,c=d.def.type,l="optional"===d.optin,p="optional"===d.optout;for(let o in t){if("__proto__"===o||s.has(o))continue;if("never"===c){a.push(o);continue}let n=d.run({value:t[o],issues:[]},i);n instanceof Promise?e.push(n.then(e=>OS(e,r,o,t,l,p))):OS(n,r,o,t,l,p)}return(a.length&&r.issues.push({code:"unrecognized_keys",keys:a,input:t,inst:n}),e.length)?Promise.all(e).then(()=>r):r}let OR=CC("$ZodObject",(e,t)=>{let r;TX.init(e,t);let i=Object.getOwnPropertyDescriptor(t,"shape");if(!i?.get){let e=t.shape;Object.defineProperty(t,"shape",{get:()=>{let r={...e};return Object.defineProperty(t,"shape",{value:r}),r}})}let o=Tt(()=>Ok(t));To(e._zod,"propValues",()=>{let e=t.shape,r={};for(let t in e){let i=e[t]._zod;if(i.values)for(let e of(r[t]??(r[t]=new Set),i.values))r[t].add(e)}return r});let n=t.catchall;e._zod.parse=(t,i)=>{r??(r=o.value);let a=t.value;if(!Tc(a))return t.issues.push({expected:"object",code:"invalid_type",input:a,inst:e}),t;t.value={};let s=[],d=r.shape;for(let e of r.keys){let r=d[e],o="optional"===r._zod.optin,n="optional"===r._zod.optout,c=r._zod.run({value:a[e],issues:[]},i);c instanceof Promise?s.push(c.then(r=>OS(r,t,e,a,o,n))):OS(c,t,e,a,o,n)}return n?Ow(s,a,t,i,o.value,e):s.length?Promise.all(s).then(()=>t):t}}),OP=CC("$ZodObjectJIT",(e,t)=>{let r,i;OR.init(e,t);let o=e._zod.parse,n=Tt(()=>Ok(t)),a=!CE.jitless,s=a&&Tl.value,d=t.catchall;e._zod.parse=(c,l)=>{i??(i=n.value);let p=c.value;return Tc(p)?a&&s&&l?.async===!1&&!0!==l.jitless?(r||(r=(e=>{let t=new TD(["shape","payload","ctx"]),r=n.value,i=e=>{let t=Ts(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write("const input = payload.value;");let o=Object.create(null),a=0;for(let e of r.keys)o[e]=`key_${a++}`;for(let n of(t.write("const newResult = {};"),r.keys)){let r=o[n],a=Ts(n),s=e[n],d=s?._zod?.optin==="optional",c=s?._zod?.optout==="optional";t.write(`const ${r} = ${i(n)};`),d&&c?t.write(` + deps: ${i}}`};let o={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(e){let[t,r]=function({schema:e}){let t={},r={};for(let i in e)"__proto__"!==i&&((Array.isArray(e[i])?t:r)[i]=e[i]);return[t,r]}(e);n(e,t),a(e,r)}};function n(e,r=e.schema){let{gen:o,data:a,it:s}=e;if(0===Object.keys(r).length)return;let d=o.let("missing");for(let n in r){let c=r[n];if(0===c.length)continue;let l=(0,i.propertyInData)(o,a,n,s.opts.ownProperties);e.setParams({property:n,depsCount:c.length,deps:c.join(", ")}),s.allErrors?o.if(l,()=>{for(let t of c)(0,i.checkReportMissingProp)(e,t)}):(o.if((0,t._)`${l} && (${(0,i.checkMissingProp)(e,c,d)})`),(0,i.reportMissingProp)(e,d),o.else())}}function a(e,t=e.schema){let{gen:o,data:n,keyword:s,it:d}=e,c=o.name("valid");for(let a in t)(0,r.alwaysValidSchema)(d,t[a])||(o.if((0,i.propertyInData)(o,n,a,d.opts.ownProperties),()=>{let t=e.subschema({keyword:s,schemaProp:a},c);e.mergeValidEvaluated(t,c)},()=>o.var(c,!0)),e.ok(c))}e.validatePropertyDeps=n,e.validateSchemaDeps=a,e.default=o}),j$=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xM(),r=xN();e.default={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:e})=>(0,t._)`{propertyName: ${e.propertyName}}`},code(e){let{gen:i,schema:o,data:n,it:a}=e;if((0,r.alwaysValidSchema)(a,o))return;let s=i.name("valid");i.forIn("key",n,r=>{e.setParams({propertyName:r}),e.subschema({keyword:"propertyNames",data:r,dataTypes:["string"],propertyName:r,compositeRule:!0},s),i.if((0,t.not)(s),()=>{e.error(!0),a.allErrors||i.break()})}),e.ok(s)}}}),jS=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xB(),r=xM(),i=xz(),o=xN();e.default={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:e})=>(0,r._)`{additionalProperty: ${e.additionalProperty}}`},code(e){let{gen:n,schema:a,parentSchema:s,data:d,errsCount:c,it:l}=e;if(!c)throw Error("ajv implementation error");let{allErrors:p,opts:u}=l;if(l.props=!0,"all"!==u.removeAdditional&&(0,o.alwaysValidSchema)(l,a))return;let m=(0,t.allSchemaProperties)(s.properties),f=(0,t.allSchemaProperties)(s.patternProperties);function h(e){n.code((0,r._)`delete ${d}[${e}]`)}function y(t){if("all"===u.removeAdditional||u.removeAdditional&&!1===a)return void h(t);if(!1===a){e.setParams({additionalProperty:t}),e.error(),p||n.break();return}if("object"==typeof a&&!(0,o.alwaysValidSchema)(l,a)){let i=n.name("valid");"failing"===u.removeAdditional?(g(t,i,!1),n.if((0,r.not)(i),()=>{e.reset(),h(t)})):(g(t,i),p||n.if((0,r.not)(i),()=>n.break()))}}function g(t,r,i){let n={keyword:"additionalProperties",dataProp:t,dataPropType:o.Type.Str};!1===i&&Object.assign(n,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(n,r)}n.forIn("key",d,i=>{m.length||f.length?n.if(function(i){let a;if(m.length>8){let e=(0,o.schemaRefOrVal)(l,s.properties,"properties");a=(0,t.isOwnProperty)(n,e,i)}else a=m.length?(0,r.or)(...m.map(e=>(0,r._)`${i} === ${e}`)):r.nil;return f.length&&(a=(0,r.or)(a,...f.map(o=>(0,r._)`${(0,t.usePattern)(e,o)}.test(${i})`))),(0,r.not)(a)}(i),()=>y(i)):y(i)}),e.ok((0,r._)`${c} === ${i.default.errors}`)}}}),jk=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xY(),r=xB(),i=xN(),o=jS();e.default={keyword:"properties",type:"object",schemaType:"object",code(e){let{gen:n,schema:a,parentSchema:s,data:d,it:c}=e;"all"===c.opts.removeAdditional&&void 0===s.additionalProperties&&o.default.code(new t.KeywordCxt(c,o.default,"additionalProperties"));let l=(0,r.allSchemaProperties)(a);for(let e of l)c.definedProperties.add(e);c.opts.unevaluated&&l.length&&!0!==c.props&&(c.props=i.mergeEvaluated.props(n,(0,i.toHash)(l),c.props));let p=l.filter(e=>!(0,i.alwaysValidSchema)(c,a[e]));if(0===p.length)return;let u=n.name("valid");for(let t of p){var m;(m=t,c.opts.useDefaults&&!c.compositeRule&&void 0!==a[m].default)?f(t):(n.if((0,r.propertyInData)(n,d,t,c.opts.ownProperties)),f(t),c.allErrors||n.else().var(u,!0),n.endIf()),e.it.definedProperties.add(t),e.ok(u)}function f(t){e.subschema({keyword:"properties",schemaProp:t,dataProp:t},u)}}}}),jw=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xB(),r=xM(),i=xN(),o=xN();e.default={keyword:"patternProperties",type:"object",schemaType:"object",code(e){let{gen:n,schema:a,data:s,parentSchema:d,it:c}=e,{opts:l}=c,p=(0,t.allSchemaProperties)(a),u=p.filter(e=>(0,i.alwaysValidSchema)(c,a[e]));if(0===p.length||u.length===p.length&&(!c.opts.unevaluated||!0===c.props))return;let m=l.strictSchema&&!l.allowMatchingProperties&&d.properties,f=n.name("valid");!0===c.props||c.props instanceof r.Name||(c.props=(0,o.evaluatedPropsToName)(n,c.props));let{props:h}=c;for(let e of p)m&&function(e){for(let t in m)new RegExp(e).test(t)&&(0,i.checkStrictMode)(c,`property ${t} matches pattern ${e} (use allowMatchingProperties)`)}(e),c.allErrors?y(e):(n.var(f,!0),y(e),n.if(f));function y(i){n.forIn("key",s,a=>{n.if((0,r._)`${(0,t.usePattern)(e,i)}.test(${a})`,()=>{let t=u.includes(i);t||e.subschema({keyword:"patternProperties",schemaProp:i,dataProp:a,dataPropType:o.Type.Str},f),c.opts.unevaluated&&!0!==h?n.assign((0,r._)`${h}[${a}]`,!0):t||c.allErrors||n.if((0,r.not)(f),()=>n.break())})})}}}}),jV=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xN();e.default={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){let{gen:r,schema:i,it:o}=e;if((0,t.alwaysValidSchema)(o,i))return void e.fail();let n=r.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},n),e.failResult(n,()=>e.reset(),()=>e.error())},error:{message:"must NOT be valid"}}}),jP=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:xB().validateUnion,error:{message:"must match a schema in anyOf"}}}),jR=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xM(),r=xN();e.default={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:e})=>(0,t._)`{passingSchemas: ${e.passing}}`},code(e){let{gen:i,schema:o,parentSchema:n,it:a}=e;if(!Array.isArray(o))throw Error("ajv implementation error");if(a.opts.discriminator&&n.discriminator)return;let s=i.let("valid",!1),d=i.let("passing",null),c=i.name("_valid");e.setParams({passing:d}),i.block(function(){o.forEach((o,n)=>{let l;(0,r.alwaysValidSchema)(a,o)?i.var(c,!0):l=e.subschema({keyword:"oneOf",schemaProp:n,compositeRule:!0},c),n>0&&i.if((0,t._)`${c} && ${s}`).assign(s,!1).assign(d,(0,t._)`[${d}, ${n}]`).else(),i.if(c,()=>{i.assign(s,!0),i.assign(d,n),l&&e.mergeEvaluated(l,t.Name)})})}),e.result(s,()=>e.reset(),()=>e.error(!0))}}}),jq=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xN();e.default={keyword:"allOf",schemaType:"array",code(e){let{gen:r,schema:i,it:o}=e;if(!Array.isArray(i))throw Error("ajv implementation error");let n=r.name("valid");i.forEach((r,i)=>{if((0,t.alwaysValidSchema)(o,r))return;let a=e.subschema({keyword:"allOf",schemaProp:i},n);e.ok(n),e.mergeEvaluated(a)})}}}),jI=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xM(),r=xN();function i(e,t){let i=e.schema[t];return void 0!==i&&!(0,r.alwaysValidSchema)(e,i)}e.default={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:e})=>(0,t.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,t._)`{failingKeyword: ${e.ifClause}}`},code(e){let o,{gen:n,parentSchema:a,it:s}=e;void 0===a.then&&void 0===a.else&&(0,r.checkStrictMode)(s,'"if" without "then" and "else" is ignored');let d=i(s,"then"),c=i(s,"else");if(!d&&!c)return;let l=n.let("valid",!0),p=n.name("_valid");if(o=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},p),e.mergeEvaluated(o),e.reset(),d&&c){let t=n.let("ifClause");e.setParams({ifClause:t}),n.if(p,u("then",t),u("else",t))}else d?n.if(p,u("then")):n.if((0,t.not)(p),u("else"));function u(r,i){return()=>{let o=e.subschema({keyword:r},p);n.assign(l,p),e.mergeValidEvaluated(o,l),i?n.assign(i,(0,t._)`${r}`):e.setParams({ifClause:r})}}e.pass(l,()=>e.error(!0))}}}),jx=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xN();e.default={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:r,it:i}){void 0===r.if&&(0,t.checkStrictMode)(i,`"${e}" without "if" is ignored`)}}}),jj=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=jh(),r=jg(),i=jy(),o=j_(),n=jv(),a=jb(),s=j$(),d=jS(),c=jk(),l=jw(),p=jV(),u=jP(),m=jR(),f=jq(),h=jI(),y=jx();e.default=function(e=!1){let g=[p.default,u.default,m.default,f.default,h.default,y.default,s.default,d.default,a.default,c.default,l.default];return e?g.push(r.default,o.default):g.push(t.default,i.default),g.push(n.default),g}}),jC=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xM();e.default={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>(0,t.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,t._)`{format: ${e}}`},code(e,r){let i,o,n,a,s,d,{gen:c,data:l,$data:p,schema:u,schemaCode:m,it:f}=e,{opts:h,errSchemaPath:y,schemaEnv:g,self:_}=f;h.validateFormats&&(p?(i=c.scopeValue("formats",{ref:_.formats,code:h.code.formats}),o=c.const("fDef",(0,t._)`${i}[${m}]`),n=c.let("fType"),a=c.let("format"),c.if((0,t._)`typeof ${o} == "object" && !(${o} instanceof RegExp)`,()=>c.assign(n,(0,t._)`${o}.type || "string"`).assign(a,(0,t._)`${o}.validate`),()=>c.assign(n,(0,t._)`"string"`).assign(a,o)),e.fail$data((0,t.or)(!1===h.strictSchema?t.nil:(0,t._)`${m} && !${a}`,(s=g.$async?(0,t._)`(${o}.async ? await ${a}(${l}) : ${a}(${l}))`:(0,t._)`${a}(${l})`,d=(0,t._)`(typeof ${a} == "function" ? ${s} : ${a}.test(${l}))`,(0,t._)`${a} && ${a} !== true && ${n} === ${r} && !${d}`)))):function(){var i;let o,n,a=_.formats[u];if(!a){if(!1===h.strictSchema)return _.logger.warn(s());throw Error(s());function s(){return`unknown format "${u}" ignored in schema at path "${y}"`}}if(!0===a)return;let[d,p,m]=(o=(i=a)instanceof RegExp?(0,t.regexpCode)(i):h.code.formats?(0,t._)`${h.code.formats}${(0,t.getProperty)(u)}`:void 0,n=c.scopeValue("formats",{key:u,ref:i,code:o}),"object"!=typeof i||i instanceof RegExp?["string",i,n]:[i.type||"string",i.validate,(0,t._)`${n}.validate`]);d===r&&e.pass(function(){if("object"==typeof a&&!(a instanceof RegExp)&&a.async){if(!g.$async)throw Error("async format in sync schema");return(0,t._)`await ${m}(${l})`}return"function"==typeof p?(0,t._)`${m}(${l})`:(0,t._)`${m}.test(${l})`}())}())}}}),jT=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=[jC().default]}),jO=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.contentVocabulary=e.metadataVocabulary=void 0,e.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],e.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]}),jE=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=jt(),r=jf(),i=jj(),o=jT(),n=jO();e.default=[t.default,r.default,(0,i.default)(),o.default,n.metadataVocabulary,n.contentVocabulary]}),jA=S0(e=>{var t,r;Object.defineProperty(e,"__esModule",{value:!0}),e.DiscrError=void 0,(r=t||(e.DiscrError=t={})).Tag="tag",r.Mapping="mapping"}),jW=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xM(),r=jA(),i=x2(),o=x0(),n=xN();e.default={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:e,tagName:t}})=>e===r.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:r,tagName:i}})=>(0,t._)`{error: ${e}, tag: ${i}, tagValue: ${r}}`},code(e){let{gen:a,data:s,schema:d,parentSchema:c,it:l}=e,{oneOf:p}=c;if(!l.opts.discriminator)throw Error("discriminator: requires discriminator option");let u=d.propertyName;if("string"!=typeof u)throw Error("discriminator: requires propertyName");if(d.mapping)throw Error("discriminator: mapping is not supported");if(!p)throw Error("discriminator: requires oneOf keyword");let m=a.let("valid",!1),f=a.const("tag",(0,t._)`${s}${(0,t.getProperty)(u)}`);a.if((0,t._)`typeof ${f} == "string"`,()=>(function(){let s=function(){var e;let t={},r=s(c),a=!0;for(let t=0;te.error(!1,{discrError:r.DiscrError.Tag,tag:f,tagName:u})),e.ok(m)}}}),jM=S0((e,t)=>{t.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}}),jN=S0((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.MissingRefError=e.ValidationError=e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=e.Ajv=void 0;let r=x8(),i=jE(),o=jW(),n=jM(),a=["/properties"],s="http://json-schema.org/draft-07/schema";var d=class extends r.default{_addVocabularies(){super._addVocabularies(),i.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(o.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let e=this.opts.$data?this.$dataMetaSchema(n,a):n;this.addMetaSchema(e,s,!1),this.refs["http://json-schema.org/schema"]=s}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(s)?s:void 0)}};e.Ajv=d,t.exports=e=d,t.exports.Ajv=d,Object.defineProperty(e,"__esModule",{value:!0}),e.default=d;var c=xY();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return c.KeywordCxt}});var l=xM();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return l._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return l.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return l.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return l.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return l.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return l.CodeGen}});var p=x1();Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return p.default}});var u=x0();Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return u.default}})}),jz=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.dynamicAnchor=void 0;let t=xM(),r=xz(),i=x2(),o=je();function n(e,n){let{gen:a,it:s}=e;s.schemaEnv.root.dynamicAnchors[n]=!0;let d=(0,t._)`${r.default.dynamicAnchors}${(0,t.getProperty)(n)}`,c="#"===s.errSchemaPath?s.validateName:function(e){let{schemaEnv:t,schema:r,self:n}=e.it,{root:a,baseId:s,localRefs:d,meta:c}=t.root,{schemaId:l}=n.opts,p=new i.SchemaEnv({schema:r,schemaId:l,root:a,baseId:s,localRefs:d,meta:c});return i.compileSchema.call(n,p),(0,o.getValidate)(e,p)}(e);a.if((0,t._)`!${d}`,()=>a.assign(d,c))}e.dynamicAnchor=n,e.default={keyword:"$dynamicAnchor",schemaType:"string",code:e=>n(e,e.schema)}}),jD=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.dynamicRef=void 0;let t=xM(),r=xz(),i=je();function o(e,o){let{gen:n,keyword:a,it:s}=e;if("#"!==o[0])throw Error(`"${a}" only supports hash fragment reference`);let d=o.slice(1);if(s.allErrors)c();else{let t=n.let("valid",!1);c(t),e.ok(t)}function c(e){if(s.schemaEnv.root.dynamicAnchors[d]){let i=n.let("_v",(0,t._)`${r.default.dynamicAnchors}${(0,t.getProperty)(d)}`);n.if(i,l(i,e),l(s.validateName,e))}else l(s.validateName,e)()}function l(t,r){return r?()=>n.block(()=>{(0,i.callRef)(e,t),n.let(r,!0)}):()=>(0,i.callRef)(e,t)}}e.dynamicRef=o,e.default={keyword:"$dynamicRef",schemaType:"string",code:e=>o(e,e.schema)}}),jF=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=jz(),r=xN();e.default={keyword:"$recursiveAnchor",schemaType:"boolean",code(e){e.schema?(0,t.dynamicAnchor)(e,""):(0,r.checkStrictMode)(e.it,"$recursiveAnchor: false is ignored")}}}),jL=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=jD();e.default={keyword:"$recursiveRef",schemaType:"string",code:e=>(0,t.dynamicRef)(e,e.schema)}}),jU=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=jz(),r=jD(),i=jF(),o=jL();e.default=[t.default,r.default,i.default,o.default]}),jH=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=jb();e.default={keyword:"dependentRequired",type:"object",schemaType:"object",error:t.error,code:e=>(0,t.validatePropertyDeps)(e)}}),jG=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=jb();e.default={keyword:"dependentSchemas",type:"object",schemaType:"object",code:e=>(0,t.validateSchemaDeps)(e)}}),jB=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xN();e.default={keyword:["maxContains","minContains"],type:"array",schemaType:"number",code({keyword:e,parentSchema:r,it:i}){void 0===r.contains&&(0,t.checkStrictMode)(i,`"${e}" without "contains" is ignored`)}}}),jK=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=jH(),r=jG(),i=jB();e.default=[t.default,r.default,i.default]}),jJ=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xM(),r=xN(),i=xz();e.default={keyword:"unevaluatedProperties",type:"object",schemaType:["boolean","object"],trackErrors:!0,error:{message:"must NOT have unevaluated properties",params:({params:e})=>(0,t._)`{unevaluatedProperty: ${e.unevaluatedProperty}}`},code(e){let{gen:o,schema:n,data:a,errsCount:s,it:d}=e;if(!s)throw Error("ajv implementation error");let{allErrors:c,props:l}=d;function p(i){if(!1===n){e.setParams({unevaluatedProperty:i}),e.error(),c||o.break();return}if(!(0,r.alwaysValidSchema)(d,n)){let n=o.name("valid");e.subschema({keyword:"unevaluatedProperties",dataProp:i,dataPropType:r.Type.Str},n),c||o.if((0,t.not)(n),()=>o.break())}}l instanceof t.Name?o.if((0,t._)`${l} !== true`,()=>o.forIn("key",a,e=>{var r,i;return o.if((r=l,i=e,(0,t._)`!${r} || !${r}[${i}]`),()=>p(e))})):!0!==l&&o.forIn("key",a,e=>void 0===l?p(e):o.if(function(e,r){let i=[];for(let o in e)!0===e[o]&&i.push((0,t._)`${r} !== ${o}`);return(0,t.and)(...i)}(l,e),()=>p(e))),d.props=!0,e.ok((0,t._)`${s} === ${i.default.errors}`)}}}),jZ=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xM(),r=xN();e.default={keyword:"unevaluatedItems",type:"array",schemaType:["boolean","object"],error:{message:({params:{len:e}})=>(0,t.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,t._)`{limit: ${e}}`},code(e){let{gen:i,schema:o,data:n,it:a}=e,s=a.items||0;if(!0===s)return;let d=i.const("len",(0,t._)`${n}.length`);if(!1===o)e.setParams({len:s}),e.fail((0,t._)`${d} > ${s}`);else if("object"==typeof o&&!(0,r.alwaysValidSchema)(a,o)){let o=i.var("valid",(0,t._)`${d} <= ${s}`);i.if((0,t.not)(o),()=>{var n,c;return n=o,c=s,void i.forRange("i",c,d,o=>{e.subschema({keyword:"unevaluatedItems",dataProp:o,dataPropType:r.Type.Num},n),a.allErrors||i.if((0,t.not)(n),()=>i.break())})}),e.ok(o)}a.items=!0}}}),jQ=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=jJ(),r=jZ();e.default=[t.default,r.default]}),jX=S0((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/schema",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/core":!0,"https://json-schema.org/draft/2019-09/vocab/applicator":!0,"https://json-schema.org/draft/2019-09/vocab/validation":!0,"https://json-schema.org/draft/2019-09/vocab/meta-data":!0,"https://json-schema.org/draft/2019-09/vocab/format":!1,"https://json-schema.org/draft/2019-09/vocab/content":!0},$recursiveAnchor:!0,title:"Core and Validation specifications meta-schema",allOf:[{$ref:"meta/core"},{$ref:"meta/applicator"},{$ref:"meta/validation"},{$ref:"meta/meta-data"},{$ref:"meta/format"},{$ref:"meta/content"}],type:["object","boolean"],properties:{definitions:{$comment:"While no longer an official keyword as it is replaced by $defs, this keyword is retained in the meta-schema to prevent incompatible extensions as it remains in common use.",type:"object",additionalProperties:{$recursiveRef:"#"},default:{}},dependencies:{$comment:'"dependencies" is no longer a keyword, but schema authors should avoid redefining it to facilitate a smooth transition to "dependentSchemas" and "dependentRequired"',type:"object",additionalProperties:{anyOf:[{$recursiveRef:"#"},{$ref:"meta/validation#/$defs/stringArray"}]}}}}}),jY=S0((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/meta/applicator",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/applicator":!0},$recursiveAnchor:!0,title:"Applicator vocabulary meta-schema",type:["object","boolean"],properties:{additionalItems:{$recursiveRef:"#"},unevaluatedItems:{$recursiveRef:"#"},items:{anyOf:[{$recursiveRef:"#"},{$ref:"#/$defs/schemaArray"}]},contains:{$recursiveRef:"#"},additionalProperties:{$recursiveRef:"#"},unevaluatedProperties:{$recursiveRef:"#"},properties:{type:"object",additionalProperties:{$recursiveRef:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$recursiveRef:"#"},propertyNames:{format:"regex"},default:{}},dependentSchemas:{type:"object",additionalProperties:{$recursiveRef:"#"}},propertyNames:{$recursiveRef:"#"},if:{$recursiveRef:"#"},then:{$recursiveRef:"#"},else:{$recursiveRef:"#"},allOf:{$ref:"#/$defs/schemaArray"},anyOf:{$ref:"#/$defs/schemaArray"},oneOf:{$ref:"#/$defs/schemaArray"},not:{$recursiveRef:"#"}},$defs:{schemaArray:{type:"array",minItems:1,items:{$recursiveRef:"#"}}}}}),j1=S0((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/meta/content",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/content":!0},$recursiveAnchor:!0,title:"Content vocabulary meta-schema",type:["object","boolean"],properties:{contentMediaType:{type:"string"},contentEncoding:{type:"string"},contentSchema:{$recursiveRef:"#"}}}}),j0=S0((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/meta/core",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/core":!0},$recursiveAnchor:!0,title:"Core vocabulary meta-schema",type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference",$comment:"Non-empty fragments not allowed.",pattern:"^[^#]*#?$"},$schema:{type:"string",format:"uri"},$anchor:{type:"string",pattern:"^[A-Za-z][-A-Za-z0-9.:_]*$"},$ref:{type:"string",format:"uri-reference"},$recursiveRef:{type:"string",format:"uri-reference"},$recursiveAnchor:{type:"boolean",default:!1},$vocabulary:{type:"object",propertyNames:{type:"string",format:"uri"},additionalProperties:{type:"boolean"}},$comment:{type:"string"},$defs:{type:"object",additionalProperties:{$recursiveRef:"#"},default:{}}}}}),j2=S0((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/meta/format",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/format":!0},$recursiveAnchor:!0,title:"Format vocabulary meta-schema",type:["object","boolean"],properties:{format:{type:"string"}}}}),j4=S0((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/meta/meta-data",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/meta-data":!0},$recursiveAnchor:!0,title:"Meta-data vocabulary meta-schema",type:["object","boolean"],properties:{title:{type:"string"},description:{type:"string"},default:!0,deprecated:{type:"boolean",default:!1},readOnly:{type:"boolean",default:!1},writeOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0}}}}),j6=S0((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/meta/validation",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/validation":!0},$recursiveAnchor:!0,title:"Validation vocabulary meta-schema",type:["object","boolean"],properties:{multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/$defs/nonNegativeInteger"},minLength:{$ref:"#/$defs/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},maxItems:{$ref:"#/$defs/nonNegativeInteger"},minItems:{$ref:"#/$defs/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxContains:{$ref:"#/$defs/nonNegativeInteger"},minContains:{$ref:"#/$defs/nonNegativeInteger",default:1},maxProperties:{$ref:"#/$defs/nonNegativeInteger"},minProperties:{$ref:"#/$defs/nonNegativeIntegerDefault0"},required:{$ref:"#/$defs/stringArray"},dependentRequired:{type:"object",additionalProperties:{$ref:"#/$defs/stringArray"}},const:!0,enum:{type:"array",items:!0},type:{anyOf:[{$ref:"#/$defs/simpleTypes"},{type:"array",items:{$ref:"#/$defs/simpleTypes"},minItems:1,uniqueItems:!0}]}},$defs:{nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{$ref:"#/$defs/nonNegativeInteger",default:0},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}}}}),j3=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=jX(),r=jY(),i=j1(),o=j0(),n=j2(),a=j4(),s=j6(),d=["/properties"];e.default=function(e){return[t,r,i,o,c(this,n),a,c(this,s)].forEach(e=>this.addMetaSchema(e,void 0,!1)),this;function c(t,r){return e?t.$dataMetaSchema(r,d):r}}}),j9=S0((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.MissingRefError=e.ValidationError=e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=e.Ajv2019=void 0;let r=x8(),i=jE(),o=jU(),n=jK(),a=jQ(),s=jW(),d=j3(),c="https://json-schema.org/draft/2019-09/schema";var l=class extends r.default{constructor(e={}){super({...e,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),this.addVocabulary(o.default),i.default.forEach(e=>this.addVocabulary(e)),this.addVocabulary(n.default),this.addVocabulary(a.default),this.opts.discriminator&&this.addKeyword(s.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();let{$data:e,meta:t}=this.opts;t&&(d.default.call(this,e),this.refs["http://json-schema.org/schema"]=c)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(c)?c:void 0)}};e.Ajv2019=l,t.exports=e=l,t.exports.Ajv2019=l,Object.defineProperty(e,"__esModule",{value:!0}),e.default=l;var p=xY();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return p.KeywordCxt}});var u=xM();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return u._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return u.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return u.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return u.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return u.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return u.CodeGen}});var m=x1();Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return m.default}});var f=x0();Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return f.default}})}),j5=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=jt(),r=jf(),i=jj(),o=jU(),n=jK(),a=jQ(),s=jT(),d=jO();e.default=[o.default,t.default,r.default,(0,i.default)(!0),s.default,d.metadataVocabulary,d.contentVocabulary,n.default,a.default]}),j8=S0((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/schema",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/core":!0,"https://json-schema.org/draft/2020-12/vocab/applicator":!0,"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0,"https://json-schema.org/draft/2020-12/vocab/validation":!0,"https://json-schema.org/draft/2020-12/vocab/meta-data":!0,"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0,"https://json-schema.org/draft/2020-12/vocab/content":!0},$dynamicAnchor:"meta",title:"Core and Validation specifications meta-schema",allOf:[{$ref:"meta/core"},{$ref:"meta/applicator"},{$ref:"meta/unevaluated"},{$ref:"meta/validation"},{$ref:"meta/meta-data"},{$ref:"meta/format-annotation"},{$ref:"meta/content"}],type:["object","boolean"],$comment:"This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.",properties:{definitions:{$comment:'"definitions" has been replaced by "$defs".',type:"object",additionalProperties:{$dynamicRef:"#meta"},deprecated:!0,default:{}},dependencies:{$comment:'"dependencies" has been split and replaced by "dependentSchemas" and "dependentRequired" in order to serve their differing semantics.',type:"object",additionalProperties:{anyOf:[{$dynamicRef:"#meta"},{$ref:"meta/validation#/$defs/stringArray"}]},deprecated:!0,default:{}},$recursiveAnchor:{$comment:'"$recursiveAnchor" has been replaced by "$dynamicAnchor".',$ref:"meta/core#/$defs/anchorString",deprecated:!0},$recursiveRef:{$comment:'"$recursiveRef" has been replaced by "$dynamicRef".',$ref:"meta/core#/$defs/uriReferenceString",deprecated:!0}}}}),j7=S0((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/applicator",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/applicator":!0},$dynamicAnchor:"meta",title:"Applicator vocabulary meta-schema",type:["object","boolean"],properties:{prefixItems:{$ref:"#/$defs/schemaArray"},items:{$dynamicRef:"#meta"},contains:{$dynamicRef:"#meta"},additionalProperties:{$dynamicRef:"#meta"},properties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},patternProperties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},propertyNames:{format:"regex"},default:{}},dependentSchemas:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},propertyNames:{$dynamicRef:"#meta"},if:{$dynamicRef:"#meta"},then:{$dynamicRef:"#meta"},else:{$dynamicRef:"#meta"},allOf:{$ref:"#/$defs/schemaArray"},anyOf:{$ref:"#/$defs/schemaArray"},oneOf:{$ref:"#/$defs/schemaArray"},not:{$dynamicRef:"#meta"}},$defs:{schemaArray:{type:"array",minItems:1,items:{$dynamicRef:"#meta"}}}}}),Ce=S0((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/unevaluated",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0},$dynamicAnchor:"meta",title:"Unevaluated applicator vocabulary meta-schema",type:["object","boolean"],properties:{unevaluatedItems:{$dynamicRef:"#meta"},unevaluatedProperties:{$dynamicRef:"#meta"}}}}),Ct=S0((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/content",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/content":!0},$dynamicAnchor:"meta",title:"Content vocabulary meta-schema",type:["object","boolean"],properties:{contentEncoding:{type:"string"},contentMediaType:{type:"string"},contentSchema:{$dynamicRef:"#meta"}}}}),Cr=S0((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/core",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/core":!0},$dynamicAnchor:"meta",title:"Core vocabulary meta-schema",type:["object","boolean"],properties:{$id:{$ref:"#/$defs/uriReferenceString",$comment:"Non-empty fragments not allowed.",pattern:"^[^#]*#?$"},$schema:{$ref:"#/$defs/uriString"},$ref:{$ref:"#/$defs/uriReferenceString"},$anchor:{$ref:"#/$defs/anchorString"},$dynamicRef:{$ref:"#/$defs/uriReferenceString"},$dynamicAnchor:{$ref:"#/$defs/anchorString"},$vocabulary:{type:"object",propertyNames:{$ref:"#/$defs/uriString"},additionalProperties:{type:"boolean"}},$comment:{type:"string"},$defs:{type:"object",additionalProperties:{$dynamicRef:"#meta"}}},$defs:{anchorString:{type:"string",pattern:"^[A-Za-z_][-A-Za-z0-9._]*$"},uriString:{type:"string",format:"uri"},uriReferenceString:{type:"string",format:"uri-reference"}}}}),Ci=S0((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/format-annotation",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0},$dynamicAnchor:"meta",title:"Format vocabulary meta-schema for annotation results",type:["object","boolean"],properties:{format:{type:"string"}}}}),Co=S0((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/meta-data",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/meta-data":!0},$dynamicAnchor:"meta",title:"Meta-data vocabulary meta-schema",type:["object","boolean"],properties:{title:{type:"string"},description:{type:"string"},default:!0,deprecated:{type:"boolean",default:!1},readOnly:{type:"boolean",default:!1},writeOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0}}}}),Cn=S0((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/validation",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/validation":!0},$dynamicAnchor:"meta",title:"Validation vocabulary meta-schema",type:["object","boolean"],properties:{type:{anyOf:[{$ref:"#/$defs/simpleTypes"},{type:"array",items:{$ref:"#/$defs/simpleTypes"},minItems:1,uniqueItems:!0}]},const:!0,enum:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/$defs/nonNegativeInteger"},minLength:{$ref:"#/$defs/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},maxItems:{$ref:"#/$defs/nonNegativeInteger"},minItems:{$ref:"#/$defs/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxContains:{$ref:"#/$defs/nonNegativeInteger"},minContains:{$ref:"#/$defs/nonNegativeInteger",default:1},maxProperties:{$ref:"#/$defs/nonNegativeInteger"},minProperties:{$ref:"#/$defs/nonNegativeIntegerDefault0"},required:{$ref:"#/$defs/stringArray"},dependentRequired:{type:"object",additionalProperties:{$ref:"#/$defs/stringArray"}}},$defs:{nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{$ref:"#/$defs/nonNegativeInteger",default:0},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}}}}),Ca=S0(e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=j8(),r=j7(),i=Ce(),o=Ct(),n=Cr(),a=Ci(),s=Co(),d=Cn(),c=["/properties"];e.default=function(e){return[t,r,i,o,n,l(this,a),s,l(this,d)].forEach(e=>this.addMetaSchema(e,void 0,!1)),this;function l(t,r){return e?t.$dataMetaSchema(r,c):r}}}),Cs=S0((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.MissingRefError=e.ValidationError=e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=e.Ajv2020=void 0;let r=x8(),i=j5(),o=jW(),n=Ca(),a="https://json-schema.org/draft/2020-12/schema";var s=class extends r.default{constructor(e={}){super({...e,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),i.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(o.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();let{$data:e,meta:t}=this.opts;t&&(n.default.call(this,e),this.refs["http://json-schema.org/schema"]=a)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(a)?a:void 0)}};e.Ajv2020=s,t.exports=e=s,t.exports.Ajv2020=s,Object.defineProperty(e,"__esModule",{value:!0}),e.default=s;var d=xY();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return d.KeywordCxt}});var c=xM();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return c._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return c.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return c.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return c.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return c.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return c.CodeGen}});var l=x1();Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return l.default}});var p=x0();Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return p.default}})}),Cd=S0(e=>{function t(e,t){return{validate:e,compare:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.formatNames=e.fastFormats=e.fullFormats=void 0,e.fullFormats={date:t(o,n),time:t(s(!0),d),"date-time":t(p(!0),u),"iso-time":t(s(),c),"iso-date-time":t(p(),m),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:function(e){return f.test(e)&&h.test(e)},"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:function(e){if(b.test(e))return!1;try{return new RegExp(e),!0}catch(e){return!1}},uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:function(e){return y.lastIndex=0,y.test(e)},int32:{type:"number",validate:function(e){return Number.isInteger(e)&&e<=_&&e>=g}},int64:{type:"number",validate:function(e){return Number.isInteger(e)}},float:{type:"number",validate:v},double:{type:"number",validate:v},password:!0,binary:!0},e.fastFormats={...e.fullFormats,date:t(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,n),time:t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,d),"date-time":t(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,u),"iso-time":t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,c),"iso-date-time":t(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,m),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},e.formatNames=Object.keys(e.fullFormats);let r=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,i=[0,31,28,31,30,31,30,31,31,30,31,30,31];function o(e){var t;let o=r.exec(e);if(!o)return!1;let n=+o[1],a=+o[2],s=+o[3];return a>=1&&a<=12&&s>=1&&s<=(2===a&&(t=n)%4==0&&(t%100!=0||t%400==0)?29:i[a])}function n(e,t){if(e&&t)return e>t?1:e23||l>59||e&&!s)return!1;if(i<=23&&o<=59&&n<60)return!0;let p=o-l*d,u=i-c*d-(p<0);return(23===u||-1===u)&&(59===p||-1===p)&&n<61}}function d(e,t){if(!(e&&t))return;let r=(new Date("2020-01-01T"+e)).valueOf(),i=(new Date("2020-01-01T"+t)).valueOf();if(r&&i)return r-i}function c(e,t){if(!(e&&t))return;let r=a.exec(e),i=a.exec(t);if(r&&i)return(e=r[1]+r[2]+r[3])>(t=i[1]+i[2]+i[3])?1:e{Object.defineProperty(e,"__esModule",{value:!0}),e.formatLimitDefinition=void 0;let t=jN(),r=xM(),i=r.operators,o={formatMaximum:{okStr:"<=",ok:i.LTE,fail:i.GT},formatMinimum:{okStr:">=",ok:i.GTE,fail:i.LT},formatExclusiveMaximum:{okStr:"<",ok:i.LT,fail:i.GTE},formatExclusiveMinimum:{okStr:">",ok:i.GT,fail:i.LTE}};e.formatLimitDefinition={keyword:Object.keys(o),type:"string",schemaType:"string",$data:!0,error:{message:({keyword:e,schemaCode:t})=>(0,r.str)`should be ${o[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,r._)`{comparison: ${o[e].okStr}, limit: ${t}}`},code(e){let i,n,{gen:a,data:s,schemaCode:d,keyword:c,it:l}=e,{opts:p,self:u}=l;if(!p.validateFormats)return;let m=new t.KeywordCxt(l,u.RULES.all.format.definition,"format");function f(e){return(0,r._)`${e}.compare(${s}, ${d}) ${o[c].fail} 0`}m.$data?(i=a.scopeValue("formats",{ref:u.formats,code:p.code.formats}),n=a.const("fmt",(0,r._)`${i}[${m.schemaCode}]`),e.fail$data((0,r.or)((0,r._)`typeof ${n} != "object"`,(0,r._)`${n} instanceof RegExp`,(0,r._)`typeof ${n}.compare != "function"`,f(n)))):function(){let t=m.schema,i=u.formats[t];if(!i||!0===i)return;if("object"!=typeof i||i instanceof RegExp||"function"!=typeof i.compare)throw Error(`"${c}": format "${t}" does not define "compare" function`);let o=a.scopeValue("formats",{key:t,ref:i,code:p.code.formats?(0,r._)`${p.code.formats}${(0,r.getProperty)(t)}`:void 0});e.fail$data(f(o))}()},dependencies:["format"]},e.default=t=>(t.addKeyword(e.formatLimitDefinition),t)}),Cl=S0((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0});let r=Cd(),i=Cc(),o=xM(),n=new o.Name("fullFormats"),a=new o.Name("fastFormats"),s=(e,t={keywords:!0})=>{if(Array.isArray(t))return d(e,t,r.fullFormats,n),e;let[o,s]="fast"===t.mode?[r.fastFormats,a]:[r.fullFormats,n];return d(e,t.formats||r.formatNames,o,s),t.keywords&&(0,i.default)(e),e};function d(e,t,r,i){var n;for(let a of(null!=(n=e.opts.code).formats||(n.formats=(0,o._)`require("ajv-formats/dist/formats").${i}`),t))e.addFormat(a,r[a])}s.get=(e,t="full")=>{let i=("fast"===t?r.fastFormats:r.fullFormats)[e];if(!i)throw Error(`Unknown format "${e}"`);return i},t.exports=e=s,Object.defineProperty(e,"__esModule",{value:!0}),e.default=s}),Cp=jN(),Cu=j9(),Cm=Cs();let Cf=((e,t,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(var i,o=SX(t),n=0,a=o.length;nt[e]).bind(null,i),enumerable:!(r=SQ(t,i))||r.enumerable});return e})(SZ(null!=(w=Cl())?SJ(SY(w)):{},"default",{value:w,enumerable:!0}),w).default;function Ch(e){let t=new e({strict:!1,validateFormats:!0,validateSchema:!1,allErrors:!0});return Cf(t),t}var Cy=class{_ajv;_ajvDraft7;_ajv2019;_userAjv;constructor(e){this._userAjv=void 0!==e,this._ajv=e}get ajv(){return this._ajv??=Ch(Cm.Ajv2020)}_engineFor(e){if(this._userAjv)return this.ajv;let t=function(e,t){if(!("$schema"in e)||"string"!=typeof e.$schema)return"2020-12";let r=e.$schema.replace(/#$/,"");if(S2.has(r))return"2020-12";if(S4.has(r))return"2019-09";if(S6.has(r)||S3.has(r))return"draft-7";throw Error(`JSON Schema declares an unsupported dialect ("$schema": "${e.$schema.slice(0,200)}"). The default validator supports JSON Schema 2020-12, 2019-09, draft-07, and draft-06; ${t}`)}(e,"pass a pre-configured Ajv instance to AjvJsonSchemaValidator(ajv) to validate other dialects.");return"2020-12"===t?this.ajv:"2019-09"===t?this._ajv2019??=Ch(Cu.Ajv2019):this._ajvDraft7??=Ch(Cp.Ajv)}getValidator(e){let t=this._engineFor(e),r="$id"in e&&"string"==typeof e.$id?t.getSchema(e.$id)??t.compile(e):t.compile(e);return e=>r(e)?{valid:!0,data:e,errorMessage:void 0}:{valid:!1,data:void 0,errorMessage:t.errorsText(r.errors)}}};Cp.Ajv,globalThis.crypto?.webcrypto??globalThis.crypto??import("node:crypto").then(e=>e.webcrypto);var Cg=class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.OAuthClientFlowError"})}static[Symbol.hasInstance](e){return V4(this,e)}static isInstance(e){if("function"!=typeof this)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return V4(this,e)}constructor(e){super(e),this.name=new.target.name,V2(this,new.target)}};(class extends Cg{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.IssuerMismatchError"})}kind;expected;received;constructor(e,t,r){super(`Issuer mismatch in ${"metadata"===e?"authorization server metadata (RFC 8414 \xa73.3)":"authorization response (RFC 9207)"}: expected ${JSON.stringify(t)}, received ${JSON.stringify(r)}`),this.kind=e,this.expected=t,this.received=r}}),(class extends Cg{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.RegistrationRejectedError"})}status;body;submittedMetadata;constructor(e){super(`Dynamic Client Registration rejected (HTTP ${e.status}): ${e.body}`),this.status=e.status,this.body=e.body,this.submittedMetadata=e.submittedMetadata}}),(class extends Cg{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.InsecureTokenEndpointError"})}tokenEndpoint;constructor(e){super(`Refusing to send credentials to non-https token endpoint '${e}'. OAuth token requests MUST use TLS (localhost / *.localhost / 127.0.0.1 / ::1 are exempt).`),this.tokenEndpoint=e}}),(class extends Cg{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.AuthorizationServerMismatchError"})}constructor(e,t){super(`Authorization server mismatch: credentials are bound to ${JSON.stringify(e)} but this call resolved ${JSON.stringify(t)}; refusing to present them to a different authorization server`),this.recordedIssuer=e,this.currentIssuer=t}}),class extends Cg{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.InsufficientScopeError"})}requiredScope;resourceMetadataUrl;errorDescription;constructor(e){super(`Insufficient scope${e.requiredScope?`: required "${e.requiredScope}"`:""}`),this.requiredScope=e.requiredScope,this.resourceMetadataUrl=e.resourceMetadataUrl,this.errorDescription=e.errorDescription}};var C_=class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.UnauthorizedError"})}static[Symbol.hasInstance](e){return V4(this,e)}static isInstance(e){if("function"!=typeof this)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return V4(this,e)}constructor(e){super(e??"Unauthorized"),this.name="UnauthorizedError",V2(this,new.target)}};let Cv=new Set(["tools/list","prompts/list","resources/list","resources/templates/list","server/discover"]);var Cb=class{_entries=new Map;_maxEntries;_stamp=0;_cappedSize=0;constructor(e){this._maxEntries=e?.maxEntries??512}get size(){return this._entries.size}get(e){return this._entries.get(C$(e))}set(e,t){let r=C$(e),i=Cv.has(e.method),o=!this._entries.has(r);if(!i&&o&&this._maxEntries>0&&this._cappedSize>=this._maxEntries){for(let e of this._entries.keys())if(!Cv.has(e.slice(0,e.indexOf("\0")))){this._entries.delete(e),this._cappedSize--;break}}let n=++this._stamp;return this._entries.set(r,{...t,stamp:n}),o&&!i&&this._cappedSize++,n}delete(e){this._entries.delete(C$(e))&&!Cv.has(e.method)&&this._cappedSize--}evict(e){let t=`${e}\0`,r=Cv.has(e);for(let e of this._entries.keys())e.startsWith(t)&&(this._entries.delete(e),!r&&this._cappedSize--)}clear(){this._entries.clear(),this._cappedSize=0}};function C$(e){return`${e.method}\0${JSON.stringify([e.partition??"",e.params??""])}`}function CS(e,t){return void 0===t?e:`${e}\0${t}`}var Ck=class{_evictionGeneration=new Map;_toolIndex;_toolOutputValidatorIndex;_serverIdentity="";constructor(e,t,r=()=>{},i="",o=Date.now){this._store=e,this._isUserSupplied=t,this._reportError=r,this._cachePartition=i,this._now=o}now(){return this._now()}setServerIdentity(e){this._serverIdentity=e}_partitionFor(e){return JSON.stringify([this._serverIdentity,"public"===e?"":this._cachePartition])}async _probe(e,t){let r={method:e,params:t??""},i=this._partitionFor("private"),o=await this._store.get({...r,partition:i});if(void 0!==o)return o;let n=this._partitionFor("public");if(n===i)return;let a=await this._store.get({...r,partition:n});return a?.scope==="public"?a:void 0}async evict(e){this._evictionGeneration.set(e,(this._evictionGeneration.get(e)??0)+1),await this._deleteBoth(e,"")}async _deleteBoth(e,t){let r=this._partitionFor("private"),i=this._partitionFor("public");try{await this._store.delete({method:e,params:t,partition:r})}catch(e){this._reportError(e)}if(i!==r)try{await this._store.delete({method:e,params:t,partition:i})}catch(e){this._reportError(e)}}async evictKey(e,t){let r=CS(e,t),i=this._evictionGeneration.get(r);void 0!==i&&this._evictionGeneration.set(r,i+1),await this._deleteBoth(e,t)}captureGeneration(e,t){let r=CS(e,t),i=this._evictionGeneration.get(r)??0;return this._evictionGeneration.set(r,i),i}async write(e,t,r,i){if((this._evictionGeneration.get(CS(e,i?.params))??0)!==r)return;let o=i?.params??"",n=this._partitionFor("private"),a=this._partitionFor("public"),s=(i?.scope??"private")==="public"?a:n;try{await this._store.set({method:e,params:o,partition:s},{value:function(e){let t;try{t=JSON.stringify(e)}catch(e){throw TypeError(`cache value is not JSON-serializable: ${e instanceof Error?e.message:String(e)}`)}if("string"!=typeof t)throw TypeError("cache value is not JSON-serializable: it has no JSON representation");return t}(t),expiresAt:i?.expiresAt,scope:i?.scope})}catch(e){this._reportError(e)}if(a!==n)try{await this._store.delete({method:e,params:o,partition:s===n?a:n})}catch(e){this._reportError(e)}}async read(e,t){let r=await this._probe(e,t);if(r?.expiresAt!==void 0&&r.expiresAt>this.now())try{let e=JSON.parse(r.value);if("object"!=typeof e||null===e||Array.isArray(e))throw TypeError("cached document is not an object");return{value:e}}catch(r){this._reportError(r),await this._deleteBoth(e,t??"");return}}resetForReconnect(){this._isUserSupplied||this._store.clear(),this._evictionGeneration.clear(),this._toolIndex=void 0,this._toolOutputValidatorIndex=void 0,this._serverIdentity=""}async toolDefinition(e){let t=await this._probe("tools/list");if(void 0===t){this._toolIndex=void 0;return}if(this._toolIndex?.stamp!==t.stamp){let e=this._decodeListTools(t),r=new Map;if(void 0!==e)for(let t of e.tools)r.set(t.name,t);this._toolIndex={stamp:t.stamp,byName:r}}return this._toolIndex.byName.get(e)}async outputValidator(e,t){let r=await this._probe("tools/list");if(void 0===r){this._toolOutputValidatorIndex=void 0;return}if(this._toolOutputValidatorIndex?.stamp!==r.stamp){let e=this._decodeListTools(r)??{tools:[]},i=new Map;for(let r of e.tools){let e=t(r);void 0!==e&&i.set(r.name,e)}this._toolOutputValidatorIndex={stamp:r.stamp,byName:i}}return this._toolOutputValidatorIndex.byName.get(e)}_decodeListTools(e){try{let t=JSON.parse(e.value);if(!Array.isArray(t?.tools)||!t.tools.every(e=>null!==e&&"object"==typeof e))throw TypeError("cached tools/list document has a malformed tools array");return t}catch(e){this._reportError(e);return}}};let Cw=Symbol.for("mcp.authSeamEscape"),CV=new Set([-32001,-32020,-32021]);function CP(e,t){let{code:r,message:i,data:o}=e;if(-32022===r){let e=function(e){if("object"!=typeof e||null===e)return;let t=e.supported;if(Array.isArray(t)&&0!==t.length&&t.every(e=>"string"==typeof e))return t}(o);if(void 0===e)return{kind:"legacy"};let r=new PI({supported:e,requested:function(e){if("object"!=typeof e||null===e)return;let t=e.requested;return"string"==typeof t?t:void 0}(o)??t.requestedVersion},i),n=Pe(e),a=t.clientModernVersions.find(e=>n.includes(e));return void 0!==a?{kind:"corrective",version:a,error:r}:n.length>0?{kind:"error",error:r}:t.fallbackAvailable?{kind:"legacy"}:{kind:"error",error:r}}return CV.has(r),{kind:"legacy"}}function CR(e,t){var r;return"browser"===t.environment&&((r=e)instanceof TypeError||r instanceof Error&&"TypeError"===r.name)?{kind:"legacy"}:{kind:"error",error:new V3(V6.EraNegotiationFailed,`Version negotiation probe failed: ${Cq(e)}`,{cause:e},{cause:e})}}function Cq(e){return e instanceof Error?e.message:String(e)}function CI(){let e=globalThis;return void 0!==e.window&&void 0!==e.document?"browser":"node"}function Cx(e){return"stderr"in e&&"pid"in e?"stdio":"http"}var Cj=class e{_pending;_probeCounter=0;_savedOnMessage;_savedOnError;_savedOnClose;_closeDelivered=!1;constructor(e){this._transport=e,this._savedOnMessage=e.onmessage,this._savedOnError=e.onerror,this._savedOnClose=e.onclose}static async open(t){let r=new e(t);t.onmessage=e=>{let t=r._pending;if(void 0!==t&&(k$.safeParse(e).success||kS.safeParse(e).success)&&e.id===t.id){r._pending=void 0,k$.safeParse(e).success?t.resolve({kind:"response",result:e.result}):t.resolve({kind:"response",error:e.error});return}},t.onerror=e=>{r._savedOnError?.(e)},t.onclose=()=>{let e=r._pending;void 0!==e&&(r._pending=void 0,e.resolve({kind:"closed"})),r._closeDelivered=!0,r._savedOnClose?.()};try{await t.start()}catch(e){throw r.detach(),e}return r}async exchange(e,t){let r=`server-discover-probe-${++this._probeCounter}`;return new Promise(i=>{let o=!1,n=e=>{o||(o=!0,clearTimeout(a),this._pending?.id===r&&(this._pending=void 0),i(e))},a=setTimeout(()=>n({kind:"timeout"}),t);this._pending={id:r,resolve:n},this._transport.send(e(r)).catch(e=>n({kind:"send-error",error:e}))})}detach(){if(this._pending=void 0,this._transport.onmessage=this._savedOnMessage,this._transport.onerror=this._savedOnError,this._closeDelivered&&void 0!==this._savedOnClose){let e=this._savedOnClose,t=this._transport,r=!1,i=()=>{if(!r){r=!0;return}e()};t.onclose=i,CC.set(t,()=>{t.onclose===i&&(t.onclose=e)})}else this._transport.onclose=this._savedOnClose}release(){this.detach();let e=this._transport,t=e.start,r=!0;e.start=async function(){if(r){r=!1,e.start=t;return}return t.call(e)}}};let CC=new WeakMap;function CT(e){let t=CC.get(e);CC.delete(e),t?.()}async function CO(e,t){let r,i=e.probe.timeoutMs??t.defaultTimeoutMs,o=Math.max(0,e.probe.maxRetries??0),n="pin"===e.kind?[e.version]:e.modernVersions,a="auto"===e.kind&&e.fallbackAvailable,s=await Cj.open(t.transport);try{r=await (async()=>{let r=n[0],d=!1,c=o;for(;;){let o=await s.exchange(e=>{var i,o,n;return i=r,o=t.clientInfo,n=t.capabilities,{jsonrpc:"2.0",id:e,method:"server/discover",params:{_meta:PG(i).outboundEnvelope({protocolVersion:i,clientInfo:o,clientCapabilities:n})}}},i);if("timeout"===o.kind&&c>0){c--;continue}let l=function(e,t){switch(e.kind){case"response":return void 0===e.error?{kind:"result",result:e.result}:{kind:"rpc-error",...e.error};case"send-error":{let t=e.error;if(("object"==typeof t&&null!==t||"function"==typeof t)&&!0===t[Cw]||t instanceof C_||t instanceof Error&&"UnauthorizedError"===t.name)return{kind:"auth-required",error:t};if(t instanceof V9){let e=t.data?.text;return{kind:"http-error",status:t.data.status,body:"string"==typeof e?e:void 0,statusText:t.data.statusText}}if(t instanceof V3&&t.code===V6.ClientHttpUnexpectedContent||t instanceof Error&&"SyntaxError"===t.name)return{kind:"unusable-reply",error:t};return{kind:"network-error",error:t}}case"closed":return{kind:"closed"};case"timeout":return{kind:"timeout",timeoutMs:t}}}(o,i),p=function(e,t){switch(e.kind){case"result":return function(e,t){let r=PG(PH).validateResult("server/discover",e);if(!r.ok)return{kind:"legacy"};let i=r.value.supportedVersions,o=t.clientModernVersions.find(e=>i.includes(e));return void 0!==o?{kind:"modern",version:o,discover:r.value}:t.fallbackAvailable?{kind:"legacy"}:{kind:"error",error:new PI({supported:[...i],requested:t.requestedVersion})}}(e.result,t);case"rpc-error":return CP(e,t);case"http-error":return function(e,t){if(401===e.status||403===e.status){let t=403===e.status;return{kind:"error",error:new V9(t?V6.ClientHttpForbidden:V6.ClientHttpAuthentication,`Version negotiation failed: ${t?"the server denied access (HTTP 403)":"the server requires authorization (HTTP 401)"}`,{status:e.status,statusText:e.statusText,text:e.body})}}if(e.status>=500)return{kind:"error",error:new V9(V6.EraNegotiationFailed,`Version negotiation failed: the server answered the probe with HTTP ${e.status}`,{status:e.status,statusText:e.statusText,text:e.body})};let r=function(e){let t;if(void 0===e||""===e)return;try{t=JSON.parse(e)}catch{return}if("object"!=typeof t||null===t)return;let r=t.error;if("object"!=typeof r||null===r)return;let{code:i,message:o,data:n}=r;if("number"==typeof i)return{code:i,message:"string"==typeof o?o:"",data:n}}(e.body);return void 0!==r?CP(r,t):{kind:"legacy"}}(e,t);case"network-error":return CR(e.error,t);case"unusable-reply":return{kind:"error",error:new V3(V6.EraNegotiationFailed,`Version negotiation probe failed: the server answered with an unusable reply (${Cq(e.error)})`,{cause:e.error},{cause:e.error})};case"auth-required":return{kind:"error",error:e.error};case"closed":if("stdio"===t.transportKind)return{kind:"legacy"};return CR(Error("Connection closed during the version negotiation probe"),t);case"timeout":if("stdio"===t.transportKind)return{kind:"legacy"};return{kind:"error",error:new V3(V6.RequestTimeout,`Version negotiation probe timed out after ${e.timeoutMs}ms`,{timeout:e.timeoutMs})}}}(l,{clientModernVersions:n,requestedVersion:r,fallbackAvailable:a,environment:t.environment,transportKind:t.transportKind});switch(p.kind){case"modern":return{era:"modern",version:p.version,discover:p.discover};case"corrective":if(d)throw p.error;d=!0,r=p.version;continue;case"legacy":{let r="closed"===l.kind?"the connection closed during the server/discover probe":void 0;if("pin"===e.kind)throw new V3(V6.EraNegotiationFailed,void 0===r?`Version negotiation failed: the server did not offer pinned protocol version ${e.version} via server/discover (no fallback in pin mode)`:`Version negotiation failed: ${r} before the server offered pinned protocol version ${e.version} (no fallback in pin mode)`);if(!e.fallbackAvailable)throw new V3(V6.EraNegotiationFailed,void 0===r?"Version negotiation failed: the server gave no modern evidence and this client supports no pre-2026-07-28 protocol version to fall back to":`Version negotiation failed: ${r} and this client supports no pre-2026-07-28 protocol version to fall back to`);if(void 0!==r&&!0!==t.disposableProbe)throw new V3(V6.EraNegotiationFailed,`Version negotiation failed: ${r} (this transport probed in place — the disposable sibling probe requires the SDK's base StdioClientTransport)`);return{era:"legacy"}}case"error":throw p.error}}})()}catch(e){throw s.detach(),e}return s.release(),r}function CE(){return new V3(V6.EraNegotiationFailed,"Version negotiation failed: the transport was closed during the server/discover probe")}function CA(e){let t=e._meta?.[S7];return Rm.Implementation(t)?t:void 0}let CW={"notifications/tools/list_changed":["tools/list"],"notifications/prompts/list_changed":["prompts/list"],"notifications/resources/list_changed":["resources/list","resources/templates/list"]};var CM=class extends Rv{_serverCapabilities;_serverVersion;_capabilities;_instructions;_jsonSchemaValidator;_cache;_defaultCacheTtlMs;_listMaxPages;_listChangedDebounceTimers=new Map;_listChangedConfig;_enforceStrictCapabilities;_versionNegotiation;_supportedProtocolVersionsOption;_inputRequiredDriverConfig;_listenState=new Map;_nextListenId=0;_autoOpenedSubscription;_discoverResult;_resetConnectionState(){if(this._negotiatedProtocolVersion=void 0,this._serverCapabilities=void 0,this._serverVersion=void 0,this._instructions=void 0,this._discoverResult=void 0,this._autoOpenedSubscription=void 0,this._listenState.size>0){let e=new V3(V6.ConnectionClosed,"subscriptions/listen: client reconnected or closed; subscription state from the previous connection was reset");for(let t of this._listenState.values())t.settle({cause:"remote",error:e})}for(let e of(this._listenState.clear(),this._listChangedDebounceTimers.values()))clearTimeout(e);this._listChangedDebounceTimers.clear(),this._cache.resetForReconnect()}async close(){try{await super.close()}finally{this._resetConnectionState()}}constructor(e,t){var r;super(t),this._clientInfo=e,this._capabilities=t?.capabilities?{...t.capabilities}:{},this._jsonSchemaValidator=t?.jsonSchemaValidator??new Cy,this._enforceStrictCapabilities=t?.enforceStrictCapabilities??!1,this._versionNegotiation=t?.versionNegotiation,this._supportedProtocolVersionsOption=t?.supportedProtocolVersions,this._inputRequiredDriverConfig=(r=t?.inputRequired,{autoFulfill:r?.autoFulfill??!0,maxRounds:r?.maxRounds??10}),this._cache=new Ck(t?.responseCacheStore??new Cb,t?.responseCacheStore!==void 0,e=>this._reportStoreError(e),t?.cachePartition??""),this._defaultCacheTtlMs=t?.defaultCacheTtlMs??0,this._listMaxPages=t?.listMaxPages??64,t?.listChanged&&(this._listChangedConfig=t.listChanged)}buildContext(e,t){return e}_shouldDropInbound(e){if(void 0!==this._negotiatedProtocolVersion&&this._negotiatedProtocolVersion>=V5&&kv.safeParse(e).success)return"drop"}_outboundMetaEnvelope(){let e=this._negotiatedProtocolVersion;if(void 0!==e)return this._wireCodec().outboundEnvelope({protocolVersion:e,clientInfo:this._clientInfo,clientCapabilities:this._capabilities})}_resolveNonCompleteResult(e,t){return this._inputRequiredDriverConfig.autoFulfill?function(e,t,r,i){let{codec:o,request:n,options:a,flowStartedAt:s}=i,d={inputRequests:r.inputRequests,...void 0!==r.requestState&&{requestState:r.requestState}};return async function(e){let{config:t,method:r,originalParams:i,requestOptions:o,hooks:n,signal:a}=e,s=e.flowStartedAt??Date.now(),d=e.firstPayload,c=0;for(;;){let e;if((c+=1)>t.maxRounds){var l;throw new V3(V6.InputRequiredRoundsExceeded,(l=t.maxRounds,`Multi-round-trip request '${r}' still required input after ${l} rounds (inputRequired.maxRounds)`),{rounds:t.maxRounds,lastResult:{inputRequests:d.inputRequests,...void 0!==d.requestState&&{requestState:d.requestState}}})}o.onprogress?.({progress:c,message:`Fulfilling input required by '${r}' (round ${c})`});let p=Object.entries(d.inputRequests??{});if(p.length>0){let t=function(e){let t=new AbortController,r=()=>t.abort(e?.reason);return e?.addEventListener("abort",r,{once:!0}),e?.aborted&&t.abort(e.reason),{signal:t.signal,abort:e=>t.abort(e),dispose:()=>e?.removeEventListener("abort",r)}}(a);try{let r=await Promise.all(p.map(async([e,r])=>{try{return[e,await n.dispatchInputRequest(e,r,t.signal)]}catch(e){throw t.abort(e),e}}));e=Object.fromEntries(r)}finally{t.dispose()}}else await function(e){return new Promise((t,r)=>{if(e?.aborted)return void r(e.reason instanceof V3?e.reason:new V3(V6.RequestTimeout,String(e.reason)));let i=setTimeout(()=>{e?.removeEventListener("abort",o),t()},250),o=()=>{clearTimeout(i),r(e?.reason instanceof V3?e.reason:new V3(V6.RequestTimeout,String(e?.reason)))};e?.addEventListener("abort",o,{once:!0})})}(a);let u={...void 0!==o.timeout&&{timeout:o.timeout}};if(void 0!==o.maxTotalTimeout){let e=Date.now()-s,t=o.maxTotalTimeout-e;if(t<=0)throw new V3(V6.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:o.maxTotalTimeout,totalElapsed:e});u.maxTotalTimeout=t}let m=await n.retry(function(e,t,r){let i=void 0!==t&&Object.keys(t).length>0;return i||void 0!==r?{...e,...i&&{inputResponses:t},...void 0!==r&&{requestState:r}}:e}(i,e,d.requestState),u);if(PY(m)){d={inputRequests:m.inputRequests??{},...void 0!==m.requestState&&{requestState:m.requestState}};continue}return m}}({config:t,method:n.method,originalParams:n.params,firstPayload:d,flowStartedAt:s,signal:a?.signal,requestOptions:{...a?.timeout!==void 0&&{timeout:a.timeout},...a?.maxTotalTimeout!==void 0&&{maxTotalTimeout:a.maxTotalTimeout},...a?.onprogress!==void 0&&{onprogress:a.onprogress}},hooks:{dispatchInputRequest:(t,r,i)=>(async function(e,t,r,i,o){var n;if(!R$(i)||"string"!=typeof i.method)throw new V3(V6.InvalidResult,`Invalid input request '${r}': each inputRequests entry must be an embedded request object with a method`,{key:r});let a=i.method;if(!t.hasInputRequestMethod(a))throw new V3(V6.InvalidResult,`Invalid input request '${r}': '${a}' is not an embedded request the ${t.era} revision defines (expected elicitation/create, sampling/createMessage, or roots/list)`,{key:r,method:a});let s=e.getRequestHandler(a);if(void 0===s)throw new V3(V6.CapabilityNotSupported,`Cannot fulfil input request '${r}': no handler is registered for '${a}' on this client. Declare the corresponding capability and register a handler, or handle input_required results manually.`,{key:r,method:a});let d=R$(i.params)?i.params:void 0;return await s({jsonrpc:"2.0",id:r,method:a,...void 0!==d&&{params:d}},e.buildContext({sessionId:e.sessionId,mcpReq:{id:r,method:a,_meta:d?._meta,requestState:(n=void 0,()=>n),signal:o,send:()=>RS("send"),notify:()=>RS("notify")}}))})(e,o,t,r,i),retry:(e,t)=>i.retry(e,{...a?.signal!==void 0&&{signal:a.signal},...a?.onprogress!==void 0&&{onprogress:a.onprogress},...a?.resetTimeoutOnProgress!==void 0&&{resetTimeoutOnProgress:a.resetTimeoutOnProgress},...a?.headers!==void 0&&{headers:a.headers},...void 0!==t.timeout&&{timeout:t.timeout},...void 0!==t.maxTotalTimeout&&{maxTotalTimeout:t.maxTotalTimeout},allowInputRequired:!0})}})}({getRequestHandler:e=>this._getRequestHandler(e),buildContext:e=>this.buildContext(e,void 0),sessionId:this.transport?.sessionId},this._inputRequiredDriverConfig,e,t):Promise.reject(new V3(V6.UnsupportedResultType,`Unsupported result type 'input_required' for ${t.request.method}: multi-round-trip auto-fulfilment is not enabled on this instance — pass allowInputRequired: true to handle it manually, or enable inputRequired.autoFulfill`,{resultType:"input_required",method:t.request.method}))}_setupListChangedHandlers(e){e.tools&&this._serverCapabilities?.tools?.listChanged&&this._setupListChangedHandler("tools","notifications/tools/list_changed",e.tools,async()=>(await this.listTools(void 0,{cacheMode:"refresh"})).tools),e.prompts&&this._serverCapabilities?.prompts?.listChanged&&this._setupListChangedHandler("prompts","notifications/prompts/list_changed",e.prompts,async()=>(await this.listPrompts(void 0,{cacheMode:"refresh"})).prompts),e.resources&&this._serverCapabilities?.resources?.listChanged&&this._setupListChangedHandler("resources","notifications/resources/list_changed",e.resources,async()=>(await this.listResources(void 0,{cacheMode:"refresh"})).resources)}registerCapabilities(e){if(this.transport)throw Error("Cannot register capabilities after connecting to transport");this._capabilities=function(e,t){let r={...e};for(let e in t){let i=t[e];if(void 0===i)continue;let o=r[e];r[e]=Rb(o)&&Rb(i)?{...o,...i}:i}return r}(this._capabilities,e)}setVersionNegotiation(e){if(this.transport)throw Error("Cannot configure version negotiation after connecting to transport");this._versionNegotiation=e}_wrapHandler(e,t){return"elicitation/create"===e?async(e,r)=>{let i=PG(this._negotiatedProtocolVersion),o=i.validateRequest("elicitation/create",e);if(o.ok||"not-in-era"!==o.reason||(o=i.validateInputRequest("elicitation/create",e)),!o.ok)throw new PP("not-in-era"===o.reason?PV.InternalError:PV.InvalidParams,"not-in-era"===o.reason?"No wire schema for elicitation/create in the resolved era":`Invalid elicitation request: ${o.message}`);let{params:n}=o.value;n.mode=n.mode??"form";let{supportsFormMode:a,supportsUrlMode:s}=function(e){if(!e)return{supportsFormMode:!1,supportsUrlMode:!1};let t=void 0!==e.form,r=void 0!==e.url;return{supportsFormMode:t||!t&&!r,supportsUrlMode:r}}(this._capabilities.elicitation);if("form"===n.mode&&!a)throw new PP(PV.InvalidParams,"Client does not support form-mode elicitation requests");if("url"===n.mode&&!s)throw new PP(PV.InvalidParams,"Client does not support URL-mode elicitation requests");let d=await t(e,r),c=i.validateResult("elicitation/create",d);if(c.ok||"not-in-era"!==c.reason||(c=i.validateInputResponse("elicitation/create",d)),!c.ok)throw new PP("not-in-era"===c.reason?PV.InternalError:PV.InvalidParams,"not-in-era"===c.reason?"No wire schema for elicitation/create in the resolved era":`Invalid elicitation result: ${c.message}`);let l=c.value,p="form"===n.mode?n.requestedSchema:void 0;if("form"===n.mode&&"accept"===l.action&&l.content&&p&&this._capabilities.elicitation?.form?.applyDefaults)try{!function e(t,r){if(t&&null!==r&&"object"==typeof r){if("object"===t.type&&t.properties&&"object"==typeof t.properties){let i=t.properties;for(let t of Object.keys(i)){let o=i[t];void 0===r[t]&&Object.prototype.hasOwnProperty.call(o,"default")&&(r[t]=o.default),void 0!==r[t]&&e(o,r[t])}}if(Array.isArray(t.anyOf))for(let i of t.anyOf)"boolean"!=typeof i&&e(i,r);if(Array.isArray(t.oneOf))for(let i of t.oneOf)"boolean"!=typeof i&&e(i,r)}}(p,l.content)}catch{}return l}:"sampling/createMessage"===e?async(e,r)=>{let i=PG(this._negotiatedProtocolVersion),o=i.validateRequest("sampling/createMessage",e);if(o.ok||"not-in-era"!==o.reason||(o=i.validateInputRequest("sampling/createMessage",e)),!o.ok)throw new PP("not-in-era"===o.reason?PV.InternalError:PV.InvalidParams,"not-in-era"===o.reason?"No wire schema for sampling/createMessage in the resolved era":`Invalid sampling request: ${o.message}`);let{params:n}=o.value,a=await t(e,r),s=!!(n.tools||n.toolChoice),d=i.samplingResultVariant(s,a);if(d.ok||"not-in-era"!==d.reason||(d=i.validateInputResponse("sampling/createMessage",a)),!d.ok)throw new PP("not-in-era"===d.reason?PV.InternalError:PV.InvalidParams,"not-in-era"===d.reason?"No result schema for sampling/createMessage in the resolved era":`Invalid sampling result: ${d.message}`);return d.value}:t}assertCapability(e,t){if(!this._serverCapabilities?.[e])throw new V3(V6.CapabilityNotSupported,`Server does not support ${e} (required for ${t})`)}async connect(e,t){if(t?.prior!=null)return this._connectFromPrior(e,function(e){if("object"==typeof e&&null!==e&&("legacy"===e.kind&&!("supportedVersions"in e)&&!("discover"in e)||"modern"===e.kind&&kL.safeParse(e.discover).success))return e;throw new V3(V6.EraNegotiationFailed,"connect({ prior }): unrecognized prior — expected { kind: 'modern', discover } or { kind: 'legacy' }")}(t.prior),t);let r=function(e,t){let r=e?.mode??"legacy";if("legacy"===r)return{kind:"legacy"};let i=e?.probe??{};if("object"==typeof r){if(!(r.pin>=V5))throw TypeError(`versionNegotiation: { pin: '${r.pin}' } is not a modern protocol revision — pinning is for 2026-07-28 and later; omit versionNegotiation (or use mode: 'legacy') for 2025-era servers.`);return{kind:"pin",version:r.pin,probe:i}}let o=t?Pe(t):[];return{kind:"auto",modernVersions:o.length>0?o:[...V8],fallbackAvailable:!t||V7(t).length>0,probe:i}}(this._versionNegotiation,this._supportedProtocolVersionsOption);return"legacy"!==r.kind?this._connectNegotiated(e,r,t):this._connectPlainLegacy(e,t)}async _connectPlainLegacy(e,t){if(await super.connect(e),void 0!==e.sessionId){let t=this._negotiatedProtocolVersion;void 0!==t&&e.setProtocolVersion?.(t);return}this._resetConnectionState(),await this._legacyHandshake(e,t)}async _legacyHandshake(e,t){let r=V7(this._supportedProtocolVersions);try{let i=r[0];if(void 0===i)throw new V3(V6.EraNegotiationFailed,"Cannot run the initialize handshake: supportedProtocolVersions contains no pre-2026-07-28 protocol version");let o=await this.request({method:"initialize",params:{protocolVersion:i,capabilities:this._capabilities,clientInfo:this._clientInfo}},t);if(void 0===o)throw Error(`Server sent invalid initialize result: ${o}`);if(!r.includes(o.protocolVersion))throw Error(`Server's protocol version is not supported: ${o.protocolVersion}`);this._serverCapabilities=o.capabilities,this._serverVersion=o.serverInfo,this._cache.setServerIdentity(this._deriveServerIdentity(e)),e.setProtocolVersion&&e.setProtocolVersion(o.protocolVersion),this._instructions=o.instructions,await this.notification({method:"notifications/initialized"}),this._negotiatedProtocolVersion=o.protocolVersion,this._listChangedConfig&&this._setupListChangedHandlers(this._listChangedConfig)}catch(e){throw this.close(),e}}async _connectNegotiated(e,t,r){let i;if(void 0!==e.sessionId){await super.connect(e);let t=this._negotiatedProtocolVersion;void 0!==t&&e.setProtocolVersion&&e.setProtocolVersion(t);return}this._resetConnectionState();try{let o=Cx(e),n={clientInfo:this._clientInfo,capabilities:this._capabilities,environment:CI(),defaultTimeoutMs:r?.timeout??6e4},a="stdio"===o?function(e){let t=Object.getPrototypeOf(e);if(null===t||!Object.prototype.hasOwnProperty.call(t,"_dispose"))return;let r=e._serverParams;return"object"==typeof r&&null!==r&&"string"==typeof r.command?r:void 0}(e):void 0;i=void 0===a?await CO(t,{...n,transport:e,transportKind:o}):await async function(e,t,r,i){let o,n,a=new t.constructor({...r,stderr:"ignore"}),s=t.close,d=!1,c=new Promise((e,t)=>{o=()=>t(CE())});t.close=async function(){return d=!0,o?.(),s.call(t)};try{let t=CO(e,{...i,transport:a,transportKind:"stdio",disposableProbe:!0});t.catch(()=>{}),n=await Promise.race([t,c])}finally{await async function(e){try{let t=e._dispose;await ("function"==typeof t?t.call(e):e.close())}catch{}}(a),t.close=s}if(d)throw CE();return n}(t,e,a,n)}catch(t){throw await e.close().catch(()=>{}),CT(e),t}if(CT(e),await super.connect(e),"legacy"===i.era)return void await this._legacyHandshake(e,r);if(this._serverCapabilities=i.discover.capabilities,this._serverVersion=CA(i.discover),this._cache.setServerIdentity(this._deriveServerIdentity(e)),this._instructions=i.discover.instructions,this._discoverResult=i.discover,this._negotiatedProtocolVersion=i.version,e.setProtocolVersion&&e.setProtocolVersion(i.version),this._listChangedConfig){let e=this._listChangedConfig,t=this._serverCapabilities,i={...e.tools&&t?.tools?.listChanged&&{tools:e.tools},...e.prompts&&t?.prompts?.listChanged&&{prompts:e.prompts},...e.resources&&t?.resources?.listChanged&&{resources:e.resources}},o=!0;try{this._setupListChangedHandlers(i)}catch(e){o=!1,this.onerror?.(e instanceof Error?e:Error(String(e)))}let n=o?{...i.tools&&{toolsListChanged:!0},...i.prompts&&{promptsListChanged:!0},...i.resources&&{resourcesListChanged:!0}}:{};if(Object.keys(n).length>0){let e=new AbortController,t=()=>e.abort(r?.signal?.reason);r?.signal?.aborted&&t(),r?.signal?.addEventListener("abort",t);try{this._autoOpenedSubscription=await this.listen(n,{timeout:r?.timeout,signal:e.signal})}catch(e){if(r?.signal?.aborted)throw await this.close().catch(()=>{}),e;this.onerror?.(e instanceof Error?e:Error(String(e)))}finally{r?.signal?.removeEventListener("abort",t)}}}}async _connectFromPrior(e,t,r){if("legacy"===t.kind)return this._connectPlainLegacy(e,r);let i=t.discover;this._resetConnectionState();let o=this._supportedProtocolVersionsOption,n=(o&&Pe(o).length>0?Pe(o):V8).find(e=>i.supportedVersions.includes(e));if(void 0===n)throw new V3(V6.EraNegotiationFailed,"connect({ prior }) with a modern verdict requires a 2026-07-28+ mutual protocol version; the supplied DiscoverResult and this client's supportedProtocolVersions have no modern overlap. For a server known to be legacy, pass prior: { kind: 'legacy' } to skip the probe and initialize directly, or use versionNegotiation: { mode: 'auto' } to re-probe with legacy fallback.");if(await super.connect(e),this._discoverResult=i,this._serverCapabilities=i.capabilities,this._serverVersion=CA(i),this._cache.setServerIdentity(this._deriveServerIdentity(e)),this._instructions=i.instructions,this._negotiatedProtocolVersion=n,e.setProtocolVersion?.(n),this._listChangedConfig)try{this._setupListChangedHandlers(this._listChangedConfig)}catch(e){this.onerror?.(e instanceof Error?e:Error(String(e)))}}getServerCapabilities(){return this._serverCapabilities}getServerVersion(){return this._serverVersion}_deriveServerIdentity(e){let t=this._serverVersion;return void 0!==t?`${t.name}@${t.version}`:e.sessionId??`anonymous:${Date.now()}-${Math.random().toString(36).slice(2)}`}getNegotiatedProtocolVersion(){return this._negotiatedProtocolVersion}getProtocolEra(){let e=this._negotiatedProtocolVersion;if(void 0!==e)return e>=V5?"modern":"legacy"}getInstructions(){return this._instructions}getDiscoverResult(){return this._discoverResult}assertCapabilityForMethod(e){switch(e){case"logging/setLevel":if(!this._serverCapabilities?.logging)throw new V3(V6.CapabilityNotSupported,`Server does not support logging (required for ${e})`);break;case"prompts/get":case"prompts/list":if(!this._serverCapabilities?.prompts)throw new V3(V6.CapabilityNotSupported,`Server does not support prompts (required for ${e})`);break;case"resources/list":case"resources/templates/list":case"resources/read":case"resources/subscribe":case"resources/unsubscribe":if(!this._serverCapabilities?.resources)throw new V3(V6.CapabilityNotSupported,`Server does not support resources (required for ${e})`);if("resources/subscribe"===e&&!this._serverCapabilities.resources.subscribe)throw new V3(V6.CapabilityNotSupported,`Server does not support resource subscriptions (required for ${e})`);break;case"tools/call":case"tools/list":if(!this._serverCapabilities?.tools)throw new V3(V6.CapabilityNotSupported,`Server does not support tools (required for ${e})`);break;case"completion/complete":if(!this._serverCapabilities?.completions)throw new V3(V6.CapabilityNotSupported,`Server does not support completions (required for ${e})`)}}assertNotificationCapability(e){if("notifications/roots/list_changed"===e&&!this._capabilities.roots?.listChanged)throw new V3(V6.CapabilityNotSupported,`Client does not support roots list changed notifications (required for ${e})`)}assertRequestHandlerCapability(e){switch(e){case"sampling/createMessage":if(!this._capabilities.sampling)throw new V3(V6.CapabilityNotSupported,`Client does not support sampling capability (required for ${e})`);break;case"elicitation/create":if(!this._capabilities.elicitation)throw new V3(V6.CapabilityNotSupported,`Client does not support elicitation capability (required for ${e})`);break;case"roots/list":if(!this._capabilities.roots)throw new V3(V6.CapabilityNotSupported,`Client does not support roots capability (required for ${e})`)}}async ping(e){return this.request({method:"ping"},e)}async discover(e){let t=await this._requestWithSchema({method:"server/discover"},kL,e);return this._discoverResult=t,t}async complete(e,t){return this.request({method:"completion/complete",params:e},t)}async setLoggingLevel(e,t){return this.request({method:"logging/setLevel",params:{level:e}},t)}async getPrompt(e,t){return this.request({method:"prompts/get",params:e},t)}async listPrompts(e,t){if(!this._serverCapabilities?.prompts&&!this._enforceStrictCapabilities)return console.debug("Client.listPrompts() called but server does not advertise prompts capability - returning empty list"),{prompts:[]};if(e?.cursor!==void 0)return this.request({method:"prompts/list",params:e},t);let r=await this._serveFromCache("prompts/list",void 0,t);return void 0!==r?r:this._listAllPages("prompts/list",e,t,e=>e.prompts)}async listResources(e,t){if(!this._serverCapabilities?.resources&&!this._enforceStrictCapabilities)return console.debug("Client.listResources() called but server does not advertise resources capability - returning empty list"),{resources:[]};if(e?.cursor!==void 0)return this.request({method:"resources/list",params:e},t);let r=await this._serveFromCache("resources/list",void 0,t);return void 0!==r?r:this._listAllPages("resources/list",e,t,e=>e.resources)}async listResourceTemplates(e,t){if(!this._serverCapabilities?.resources&&!this._enforceStrictCapabilities)return console.debug("Client.listResourceTemplates() called but server does not advertise resources capability - returning empty list"),{resourceTemplates:[]};if(e?.cursor!==void 0)return this.request({method:"resources/templates/list",params:e},t);let r=await this._serveFromCache("resources/templates/list",void 0,t);return void 0!==r?r:this._listAllPages("resources/templates/list",e,t,e=>e.resourceTemplates)}async _listAllPages(e,t,r,i,o){let n=r?.cacheMode==="bypass",a=this._cache.captureGeneration(e),s=await this.request({method:e,...t&&{params:{...t}}},r),d=s.nextCursor,c=s,l=1;for(;void 0!==d;){if(0!==this._listMaxPages&&l>=this._listMaxPages)throw new V3(V6.ListPaginationExceeded,`${e}: exceeded listMaxPages (${this._listMaxPages}); server pagination did not terminate`,{method:e,listMaxPages:this._listMaxPages});let o=await this.request({method:e,params:{...t,cursor:d}},r);if(o.nextCursor===d&&JSON.stringify(i(o))===JSON.stringify(i(c)))break;i(s).push(...i(o)),c=o,d=o.nextCursor,l++}return delete s.nextCursor,o?.(s),n||await this._cache.write(e,s,a,this._freshness(s)),s}_freshness(e,t){let r="number"==typeof e.ttlMs?e.ttlMs:this._defaultCacheTtlMs,i="public"===e.cacheScope?"public":"private";return{expiresAt:this._cache.now()+Math.min(Math.max(0,r),864e5),scope:i,params:t}}async _serveFromCache(e,t,r){if(r?.cacheMode==="bypass"||r?.cacheMode==="refresh")return;let i=await this._cache.read(e,t).catch(e=>void this._reportStoreError(e));if(void 0!==i){if(r?.signal?.aborted){let e=r.signal.reason;throw e instanceof V3?e:new V3(V6.RequestTimeout,String(e))}return i.value}}_reportStoreError(e){this.onerror?.(e instanceof Error?e:Error(String(e)))}_compileOutputValidator(e){if(e.outputSchema)try{return{ok:!0,validator:this._jsonSchemaValidator.getValidator(e.outputSchema)}}catch(e){return{ok:!1,compileError:e}}}async _resolveXMcpHeaderScan(e,t){let r=t??await this._cache.toolDefinition(e);return void 0===r?void 0:P4(r.inputSchema)}async readResource(e,t){let r=await this._serveFromCache("resources/read",e.uri,t);if(void 0!==r)return r;let i=this._cache.captureGeneration("resources/read",e.uri),o=await this.request({method:"resources/read",params:e},t);if(t?.cacheMode!=="bypass"){let r=this._freshness(o,e.uri);r.expiresAt>this._cache.now()?await this._cache.write("resources/read",o,i,r):t?.cacheMode==="refresh"&&await this._cache.evictKey("resources/read",e.uri)}return o}async subscribeResource(e,t){return this.request({method:"resources/subscribe",params:e},t)}async unsubscribeResource(e,t){return this.request({method:"resources/unsubscribe",params:e},t)}async listen(e,t){let r,i,o,n,a;if(void 0===this.transport)throw new V3(V6.NotConnected,"Not connected");let s=this._negotiatedProtocolVersion;if(void 0===s||!(s>=V5))throw new V3(V6.MethodNotSupportedByProtocolVersion,`subscriptions/listen requires a 2026-07-28-era connection (negotiated: ${s??"none"}). On a 2025-era connection, change notifications are delivered unsolicited: use ClientOptions.listChanged and resources/subscribe instead.`,{method:"subscriptions/listen",protocolVersion:s});if(t?.signal?.aborted){let e=t.signal.reason;throw e instanceof V3?e:new V3(V6.RequestTimeout,String(e))}let d=new AbortController,c=`listen:${this._nextListenId++}`,l="opening",p=new Promise((e,t)=>{o=e,n=t}),u=new Promise(e=>{a=e}),m=e=>{if("closed"===l)return;let s="opening"===l;if(void 0!==r&&(clearTimeout(r),r=void 0),"ack"in e){l="open",o(e.ack);return}l="closed",void 0!==i&&t?.signal?.removeEventListener("abort",i),this._listenState.delete(c),d.abort(),a(e.cause),s&&n(e.error??new V3(V6.ConnectionClosed,"subscriptions/listen closed before the server acknowledged"))},f=async()=>{d.abort(),await this.notification({method:"notifications/cancelled",params:{requestId:c}}).catch(()=>{})};this._listenState.set(c,{settle:m});let h=t?.timeout??6e4;if(r=setTimeout(()=>{m({cause:"remote",error:new V3(V6.RequestTimeout,"subscriptions/listen ack timed out",{timeout:h})}),f().catch(()=>{})},h),t?.signal){let e=t.signal;i=()=>{if("closed"===l)return;let t=e.reason;m({cause:"local",error:t instanceof Error?t:Error(String(t??"Aborted"))}),f().catch(()=>{})},e.addEventListener("abort",i,{once:!0})}let y={jsonrpc:"2.0",id:c,method:"subscriptions/listen",params:{_meta:{...this._outboundMetaEnvelope()},notifications:e}},g=e=>{m({cause:"remote",error:e instanceof Error?e:Error(String(e))})};try{this.transport.send(y,{requestSignal:d.signal,onRequestStreamEnd:()=>m({cause:"remote",error:Error("subscriptions/listen: stream ended")})}).catch(g)}catch(e){g(e)}return{honoredFilter:await p,close:async()=>{"closed"!==l&&(m({cause:"local"}),await f())},closed:u}}get autoOpenedSubscription(){return this._autoOpenedSubscription}_onnotification(e,t){let r=Object.hasOwn(CW,e.method)?CW[e.method]:void 0;if("notifications/resources/updated"===e.method){let t=e.params?.uri;"string"==typeof t&&this._cache.evictKey("resources/read",t)}else if(void 0!==r)for(let e of r)this._cache.evict(e);if("notifications/subscriptions/acknowledged"===e.method){let t=e.params?._meta?.[kt],r="string"==typeof t?this._listenState.get(t):void 0;if(void 0!==r){let t=this._wireCodec().validateNotification("notifications/subscriptions/acknowledged",e);r.settle({ack:t.ok?t.value.params.notifications:{}});return}}if("notifications/cancelled"===e.method){let t=e.params?.requestId,r="string"==typeof t?this._listenState.get(t):void 0;if(void 0!==r)return void r.settle({cause:"remote",error:Error("subscriptions/listen: server cancelled the subscription")})}super._onnotification(e,t)}_onresponse(e){let t=e.id,r="string"==typeof t?this._listenState.get(t):void 0;if(void 0!==r)return void(kS.safeParse(e).success?r.settle({cause:"remote",error:PP.fromError(e.error.code,e.error.message,e.error.data)}):r.settle({cause:"graceful",error:new V3(V6.ConnectionClosed,"subscriptions/listen: server closed the subscription gracefully before acknowledging")}));super._onresponse(e)}_onclose(){if(this._listenState.size>0){let e=new V3(V6.ConnectionClosed,"Connection closed");for(let t of this._listenState.values())t.settle({cause:"remote",error:e});this._listenState.clear()}super._onclose()}async callTool(e,t){let r,i="modern"===this.getProtocolEra()&&"browser"!==CI(),o=async()=>{let r;if(!i)return t;try{r=await this._resolveXMcpHeaderScan(e.name,t?.toolDefinition)}catch(e){this._reportStoreError(e)}if(!r?.valid||0===r.declarations.length)return t;let o=function(e,t){let r={};for(let i of e){let e=function(e,t){let r=e;for(let e of t){if(null===r||"object"!=typeof r)return;r=r[e]}return r}(t,i.path);if(null==e)continue;let o=function(e){if("string"==typeof e)return e;if("boolean"==typeof e)return e?"true":"false";if("number"==typeof e){if(!Number.isFinite(e)||Number.isInteger(e)&&!Number.isSafeInteger(e))return;return String(e)}}(e);void 0!==o&&(r[`Mcp-Param-${i.headerName}`]=!function(e){if(0===e.length||e.startsWith(P5)&&e.endsWith("?=")||e!==e.trim())return!0;for(let t=0;t=32)||!(r<=126)))return!0}return!1}(o)?o:`${P5}${function(e){let t=new TextEncoder().encode(e),r="";for(let e of t)r+=String.fromCodePoint(e);return btoa(r)}(o)}?=`)}return r}(r.declarations,e.arguments);return 0===Object.keys(o).length?t:{...t,headers:{...t?.headers,...o}}},n=t?.toolDefinition===void 0?await this._cache.outputValidator(e.name,e=>this._compileOutputValidator(e)).catch(e=>void this._reportStoreError(e)):this._compileOutputValidator(t.toolDefinition),a=()=>{if(void 0===n||n.ok)return;let t=n.compileError,r=(t instanceof Error?t.message:String(t)).slice(0,200);throw new PP(PV.InvalidParams,`Tool '${e.name}' has an invalid outputSchema: ${r}`)};a();try{r=await this.request({method:"tools/call",params:e},await o())}catch(c){let s=c instanceof PP&&-32020===c.code;if(!i||!s||t?.toolDefinition!==void 0)throw c;let d={signal:t?.signal,timeout:t?.timeout,cacheMode:"refresh"};await this._cache.evict("tools/list"),await this.listTools(void 0,d).catch(e=>this._reportStoreError(e)),n=await this._cache.outputValidator(e.name,e=>this._compileOutputValidator(e)).catch(e=>void this._reportStoreError(e)),a(),r=await this.request({method:"tools/call",params:e},await o())}let s=void 0!==n&&n.ok?n.validator:void 0;if(s){if(void 0===r.structuredContent&&!r.isError)throw new PP(PV.InvalidRequest,`Tool ${e.name} has an output schema but did not return structured content`);if(void 0!==r.structuredContent&&!r.isError)try{let e=s(r.structuredContent);if(!e.valid)throw new PP(PV.InvalidParams,`Structured content does not match the tool's output schema: ${e.errorMessage}`)}catch(e){if(e instanceof PP)throw e;throw new PP(PV.InvalidParams,`Failed to validate structured content: ${e instanceof Error?e.message:String(e)}`)}}return r}async listTools(e,t){if(!this._serverCapabilities?.tools&&!this._enforceStrictCapabilities)return console.debug("Client.listTools() called but server does not advertise tools capability - returning empty list"),{tools:[]};if(e?.cursor!==void 0){let r=await this.request({method:"tools/list",params:e},t);return this._excludeInvalidXMcpHeaderTools(r),r}let r=await this._serveFromCache("tools/list",void 0,t);return void 0!==r?r:this._listAllPages("tools/list",e,t,e=>e.tools,e=>this._excludeInvalidXMcpHeaderTools(e))}_excludeInvalidXMcpHeaderTools(e){if("modern"!==this.getProtocolEra()||!this.transport||"stdio"===Cx(this.transport))return;let t=e.tools.filter(e=>{let t=P4(e.inputSchema);return!!t.valid||(console.warn(`[mcp-sdk] excluding tool '${e.name}' from tools/list: invalid x-mcp-header declaration — ${t.reason}`),!1)});t.length!==e.tools.length&&(e.tools=t)}_setupListChangedHandler(e,t,r,i){let o=oJ(wz,r);if(!o.success)throw Error(`Invalid ${e} listChanged options: ${o.error.message}`);if("function"!=typeof r.onChanged)throw TypeError(`Invalid ${e} listChanged options: onChanged must be a function`);let{autoRefresh:n,debounceMs:a}=o.data,{onChanged:s}=r,d=async()=>{if(!n)return void s(null,null);try{s(null,await i())}catch(e){s(e instanceof Error?e:Error(String(e)),null)}},c=()=>{if(a){let t=this._listChangedDebounceTimers.get(e);t&&clearTimeout(t);let r=setTimeout(d,a);this._listChangedDebounceTimers.set(e,r)}else d()};this.setNotificationHandler(t,c)}async sendRootsListChanged(){return this.notification({method:"notifications/roots/list_changed"})}};(class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.SseError"})}static[Symbol.hasInstance](e){return V4(this,e)}static isInstance(e){if("function"!=typeof this)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return V4(this,e)}constructor(e,t,r){super(`SSE error: ${t}`),this.code=e,this.event=r,V2(this,new.target)}});let CN=nR().nonnegative(),Cz=new U;class CD extends Error{failure;constructor(e,t){super(e.message,t),this.name="DaemonFailure",this.failure=e}}function CF(e){let t=0;for(let r=0;r=55296&&i<=56319){let t=e.charCodeAt(r+1);if(t<56320||t>57343||Number.isNaN(t))return null;r+=1}else if(i>=56320&&i<=57343)return null;t+=1}return t}function CL(e,t){return new CD({kind:"protocol",code:e,message:t})}function CU(e,t){return new CD({kind:"unavailable",code:e,message:t})}function CH(e){if(e instanceof CD)return e.failure;if(e instanceof PP){let t=e.data,r="object"==typeof t&&null!==t&&"code"in t&&"string"==typeof t.code?t.code:`jsonrpc_${e.code}`;return{kind:CG(r),code:r,message:e.message}}if(e instanceof V3){let t=`sdk_${e.code.toLowerCase()}`;return{kind:CG(t),code:t,message:e.message}}return e instanceof Error?{kind:"protocol",code:e.name,message:e.message}:{kind:"protocol",code:"unknown",message:String(e)}}function CG(e){return e.includes("not_authorized")||"denied"===e||e.startsWith("authorization")?"denied":e.includes("not_found")||"project_required"===e?"not_found":e.includes("stale")?"stale":e.includes("unavailable")||e.includes("warming")||e.includes("saturated")?"unavailable":e.includes("invalid")||e.includes("malformed")?"invalid_request":e.includes("disconnected")||e.includes("socket")?"disconnected":"protocol"}let CB=nz({handle:o7().min(1),original_chars:CN,preview:o7(),preview_chars:CN,truncated:nY(!0)}),CK=nz({handle:o7().min(1),expired:nY(!1),original_chars:CN,total_chars:CN,content:o7(),offset:CN,next_offset:CN.nullable().optional(),has_more:nI()}),CJ=nz({handle:o7().min(1),expired:nI().nullable().optional(),content:nj().optional(),reason_code:o7()}),CZ=new Set(["PATH","HOME","USERPROFILE","HOMEDRIVE","HOMEPATH","XDG_CONFIG_HOME","XDG_DATA_HOME","LANG","LC_ALL","LC_CTYPE","TMPDIR","TEMP","TMP","SystemRoot","SystemDrive","APPDATA","LOCALAPPDATA","RUST_LOG","RUST_BACKTRACE","RUST_LIB_BACKTRACE","HTTP_PROXY","HTTPS_PROXY","ALL_PROXY","NO_PROXY","http_proxy","https_proxy","all_proxy","no_proxy"]);class CQ{options;#g;#_;#v;#b=null;#$=null;#S=!1;#k=!1;constructor(e){this.options=e;let t=["serve"];null!==e.projectRoot&&t.push("--path",e.projectRoot),this.#_=new RP({command:e.binary,args:t,env:function(e){let t={};for(let[r,i]of Object.entries(e))void 0!==i&&(CZ.has(r)||r.startsWith("TRACEDECAY_"))&&(t[r]=i);return t}(e.env),cwd:e.cwd,stderr:"inherit"}),this.#g=new CM({name:"tracedecay-chatgpt-extension",version:"0.0.0"}),this.#v=new Promise(e=>{this.#_.onclose=()=>{this.#k=!0,e()}})}get closed(){return this.#k}async connect(){this.#w(),null===this.#b&&(this.#b=this.#g.connect(this.#_).catch(e=>{throw this.#k=!0,new CD({kind:"disconnected",code:"serve_spawn_failed",message:`Cannot start ${this.options.binary} serve: ${e instanceof Error?e.message:String(e)}`},{cause:e})}),this.#S=null!==this.#_.pid),await this.#b,this.#w()}serverInfo(){let e=this.#g.getServerVersion();return void 0===e?null:{name:e.name,version:e.version}}async listToolNames(){return await this.connect(),this.#w(),(await this.#g.listTools()).tools.map(e=>e.name)}async callJson(e,t,r){var i;await this.connect(),this.#w();let o=await this.#V({name:e,arguments:{...t,format:"json"}},r);for(let e of o.content)"text"===e.type&&e.text.startsWith("tracedecay_repeated_query:")&&Cz.getStore()?.push(e.text);let n=CY(o,e);if("object"==typeof(i=n)&&null!==i&&!Array.isArray(i)&&"handle"in i&&"truncated"in i&&!0===i.truncated){let t=CB.safeParse(n);if(!t.success)throw CL("response_handle_malformed","truncated response metadata is malformed");if(CF(t.data.preview)!==t.data.preview_chars)throw CL("response_handle_malformed","truncated response preview length is inconsistent");if(t.data.original_chars>1048576)throw CU("response_handle_too_large","response handle exceeds the 1048576-byte reassembly budget");n=C1(await this.#P(t.data,r),e)}return n}async #P(e,t){let r=0,i=0,o=[];for(;;){if(1024===o.length)throw CU("response_handle_page_limit","response handle exceeds the 1024-page reassembly limit");let n=CY(await this.#V({name:"tracedecay_retrieve",arguments:{handle:e.handle,offset:r,format:"json"}},t),"tracedecay_retrieve"),a=CK.safeParse(n);if(!a.success){let t=CJ.safeParse(n);if(t.success&&t.data.handle===e.handle)throw new CD({kind:"unavailable",code:t.data.reason_code,message:`response handle ${e.handle} is no longer available (${t.data.reason_code})`});throw new CD({kind:"protocol",code:"retrieve_page_malformed",message:`tracedecay_retrieve returned an unexpected page shape for ${e.handle}`})}let s=a.data,d=CF(s.content),c=null===d?null:r+d;if(s.handle!==e.handle||s.original_chars!==e.original_chars||s.total_chars!==e.original_chars||s.offset!==r||null===c||!Number.isSafeInteger(c)||c>e.original_chars)throw CL("retrieve_page_malformed",`tracedecay_retrieve returned inconsistent page metadata for ${e.handle}`);let l=Buffer.byteLength(s.content,"utf8");if(l>1048576-i)throw CU("response_handle_too_large","response handle exceeds the 1048576-byte reassembly budget");if(i+=l,o.push(s.content),s.has_more){if(null===s.next_offset||void 0===s.next_offset||s.next_offset<=r||s.next_offset!==c||c>=e.original_chars)throw CL("retrieve_page_malformed",`tracedecay_retrieve returned an invalid continuation for ${e.handle}`);r=s.next_offset;continue}if(null!==s.next_offset&&void 0!==s.next_offset||c!==e.original_chars)throw CL("retrieve_page_malformed",`tracedecay_retrieve returned an incomplete terminal page for ${e.handle}`);return o.join("")}}async #V(e,t){if(this.#w(),t?.aborted)throw t.reason??new DOMException("The operation was aborted","AbortError");try{let r=await this.#g.callTool(e,{...void 0===t?{}:{signal:t}});if(t?.aborted)throw t.reason??new DOMException("The operation was aborted","AbortError");return r}catch(e){if(t?.aborted)throw t.reason??e;throw e}}#w(){if(this.#k)throw new CD({kind:"disconnected",code:"serve_closed",message:"tracedecay serve exited"})}close(){return this.#k=!0,this.#$??=this.#R(),this.#$}async #R(){let e=this.#S||null!==this.#_.pid?this.#v:null,[t]=await Promise.allSettled([(async()=>{await this.#_.close(),await e})(),this.#b]),r=this.#S||null!==this.#_.pid?this.#v:null,[i]=await Promise.allSettled([(async()=>{await this.#g.close(),await r})()]),o=[t,i].flatMap(e=>"rejected"===e.status?[e.reason]:[]);if(1===o.length)throw o[0];if(o.length>1)throw AggregateError(o,"Failed to close tracedecay serve session")}}let CX=nz({problem:nz({kind:o7(),code:o7(),message:o7()})});function CY(e,t){let r=!0===e.isError?CX.safeParse(e.structuredContent):null;if(r?.success){let{kind:e,code:t,message:i}=r.data.problem,o=`${e}/${t}`;throw new CD({kind:CG(o),code:o,message:i})}return C1(function(e){for(let t of e.content)if("text"===t.type)return t.text;return""}(e),t)}function C1(e,t){try{return JSON.parse(e)}catch(r){throw new CD({kind:"protocol",code:"non_json_tool_result",message:`${t} did not return JSON: ${e.slice(0,200)}`},{cause:r})}}class C0{#q;#I=null;#x=new Map;#j=new Map;#$=!1;#C=null;constructor(e){this.#q=e}async authority(){this.#w();let e=await async function(e){let t,r,i=O.join(e,"daemon-authority.json");try{t=await x(i,"utf8")}catch(t){let e="object"==typeof t&&null!==t&&"code"in t?String(t.code):"io_error";return{kind:"absent",failure:{kind:"disconnected",code:"ENOENT"===e?"daemon_authority_absent":e,message:"ENOENT"===e?`No TraceDecay daemon authority record at ${i}; start the daemon (tracedecay daemon run) first.`:`Cannot read ${i}: ${String(t)}`}}}try{r=JSON.parse(t)}catch(e){return{kind:"invalid",failure:{kind:"protocol",code:"daemon_authority_malformed",message:`${i} is not JSON: ${String(e)}`}}}let o=mS.safeParse(r);return o.success?{kind:"available",record:o.data}:{kind:"invalid",failure:{kind:"protocol",code:"daemon_authority_malformed",message:`${i} does not match the daemon authority record: ${o.error.message}`}}}(this.#q.profileRoot);return this.#w(),e}async daemonState(){this.#w();let e=await this.authority();if(this.#w(),"available"!==e.kind)return{state:"disconnected",failure:e.failure};let t=await async function(e,t=fetch){let r=mk(e);if(null===r)return!function(e){if(e<=0)return!1;try{return process.kill(e,0),!0}catch(e){return"object"==typeof e&&null!==e&&"code"in e&&"EPERM"===e.code}}(e.pid)?{kind:"disconnected",code:"daemon_exited",message:`Daemon pid ${e.pid} recorded in ${e.profile_root} is no longer running; start it with \`tracedecay daemon run\`.`}:{kind:"unavailable",code:"http_application_endpoint_absent",message:`Daemon pid ${e.pid} has not published its HTTP application endpoint yet.`};try{return await t(`${r}/`,{method:"GET",signal:AbortSignal.timeout(2e3),redirect:"manual"}),null}catch(t){return{kind:"disconnected",code:"daemon_unreachable",message:`Daemon pid ${e.pid} published ${r} but is not answering: ${t instanceof Error?t.cause instanceof Error?t.cause.message:t.message:String(t)}`}}}(e.record);return(this.#w(),null!==t)?{state:"disconnected",failure:t}:{state:"connected",profile_root:e.record.profile_root,version:e.record.version,pid:e.record.pid}}async #T(){this.#w();let e=await this.authority();if(this.#w(),"available"!==e.kind)throw new CD(e.failure);return e.record}async #O(){for(;;){this.#w();let e=this.#I;if(null===e)return this.#I=new CQ({binary:this.#q.binary,projectRoot:null,env:this.#q.env,cwd:this.#q.cwd}),this.#I;if(!e.closed)return e;await e.close(),this.#w(),this.#I===e&&(this.#I=null)}}#E(){return new SK(async(e,t,r)=>{let i=await this.#O();return this.#w(),i.callJson(e,t,r)})}async listProjects(e){await this.#T();let t=this.#E();return(await this.#A(()=>t.projectList({limit:10},e))).projects.map(C6)}async resolveProject(e,t){await this.#T();let r=this.#E(),i=await this.#A(()=>r.projectContext({project_selector:{project_id:e}},t));if("not_found"===i.status){let t=this.#x.get(e);throw await t?.session.close(),this.#x.get(e)===t&&this.#x.delete(e),new CD({kind:"denied",code:"project_not_registered",message:`Project ${e} is not registered in this TraceDecay profile; only registered projects can be explored.`})}return C6(i.project)}async #W(e,t){this.#w();let r=await this.resolveProject(e,t);this.#w();let i=this.#j.get(e);if(void 0===i){let t=this.#M(r).finally(()=>{this.#j.get(e)===t&&this.#j.delete(e)});t.catch(()=>void 0),this.#j.set(e,t),i=t}return await async function(e,t){if(void 0===t)return await e;let r=()=>t.reason instanceof Error?t.reason:new DOMException("This operation was aborted","AbortError");if(t.aborted)throw r();return await new Promise((i,o)=>{let n=()=>o(r());t.addEventListener("abort",n,{once:!0}),e.then(i,o).finally(()=>t.removeEventListener("abort",n))})}(i,t)}async #M(e){let t=e.project_id,r=await this.#T();this.#w();let i=this.#x.get(t);if(void 0!==i){if(!i.session.closed&&i.authority.process_run_id===r.process_run_id&&i.project.project_root===e.project_root)return i;await i.session.close(),this.#x.get(t)===i&&this.#x.delete(t),this.#w()}let o=mk(r);if(null===o)throw new CD({kind:"unavailable",code:"http_application_endpoint_absent",message:"The daemon has not published its HTTP application endpoint yet."});let n=new CQ({binary:this.#q.binary,projectRoot:e.project_root,env:this.#q.env,cwd:e.project_root}),a=new SU({baseUrl:o,projectId:e.project_id,token:r.auth_token,mcp:{callTool:(e,t,r)=>n.callJson(e,function(e){if("object"==typeof e&&null!==e&&!Array.isArray(e))return e;throw new CD({kind:"invalid_request",code:"non_object_request",message:"MCP tool requests must be objects"})}(t),r.signal)}}),s={project:e,session:n,client:a,authority:r};return this.#x.set(t,s),s}async status(e,t){let{client:r,authority:i}=await this.#W(e,t);return{status:await this.#A(()=>r.operations.status({},C2(t))),authority:i}}async search(e,t,r,i){let{client:o}=await this.#W(e,i);return this.#A(()=>o.operations.search({query:t,limit:r,prefer_symbol:!0},C2(i)))}async node(e,t,r){let{client:i}=await this.#W(e,r);return this.#A(()=>i.operations.node({node_id:t},C2(r)))}async impact(e,t,r,i){let{client:o}=await this.#W(e,i);return this.#A(()=>o.operations.impact({node_id:t,max_depth:r},C2(i)))}async callers(e,t,r,i){let{client:o}=await this.#W(e,i);return this.#A(()=>o.operations.code_callers({node_id:t,maximum_depth:r,meta:{order:"stable_identity",projection:"summary"}},C2(i))).then(C4)}async callees(e,t,r,i,o){let{client:n}=await this.#W(e,o);return this.#A(()=>n.operations.code_callees({node_id:t,maximum_depth:i,scope:{generation:r},meta:{order:"stable_identity",projection:"summary"}},C2(o))).then(C4)}async symbolSearch(e,t,r){let{client:i}=await this.#W(e,r);return this.#A(()=>i.operations.code_symbol_search({query:t,lazy_index_ignored_dependencies:!1,scope:{},meta:{order:"relevance",projection:"summary"}},C2(r))).then(C4)}#w(){if(this.#$)throw new CD({kind:"unavailable",code:"bridge_closed",message:"the extension bridge is shutting down"})}async #A(e){this.#w();try{let t=await e();return this.#w(),t}catch(e){throw new CD(function(e){if(e instanceof CD)return e.failure;if(e instanceof Sb){var t,r;let i=e.problem.kind,o=`${i}/${e.problem.code}`;return{kind:(t=i,r=e.status,"not_found_or_not_authorized"===t||403===r?"denied":404===r?"not_found":CG(t)),code:o,message:e.problem.message}}return e instanceof Sg?{kind:"protocol",code:"daemon_authentication",message:e.message}:e instanceof Sy?{kind:"disconnected",code:"daemon_disconnected",message:e.message}:e instanceof Sf?void 0!==e.cause?CH(e.cause):{kind:"disconnected",code:"transport",message:e.message}:e instanceof S_?{kind:"protocol",code:e.name,message:e.message}:CH(e)}(e),{cause:e})}}close(){return null!==this.#C||(this.#$=!0,this.#C=this.#N()),this.#C}async #N(){await Promise.allSettled([...this.#j.values()]);let e=[...this.#x.values()].map(e=>e.session);null!==this.#I&&e.push(this.#I),this.#x.clear(),this.#I=null;let t=(await Promise.allSettled(e.map(async e=>e.close()))).flatMap(e=>"rejected"===e.status?[e.reason]:[]);if(1===t.length)throw t[0];if(t.length>1)throw AggregateError(t,"extension bridge session cleanup failed")}}function C2(e){return void 0===e?{}:{signal:e}}function C4(e){let t=e.outcome.value.payload;if(null===t)throw new CD({kind:"unavailable",code:"empty_payload",message:`the daemon returned a ${e.outcome.outcome} outcome without a payload`});return t}function C6(e){return{project_id:e.project_id,label:e.label,project_root:e.project_root,head_branch:e.head_branch??null,default_branch:e.default_branch??null}}var C3="ui/resourceUri";function C9(e,t,r,i){let o=r._meta,n=o.ui,a=o[C3],s=o;return n?.resourceUri&&!a?s={...o,[C3]:n.resourceUri}:a&&!n?.resourceUri&&(s={...o,ui:{...n,resourceUri:a}}),e.registerTool(t,{...r,_meta:s},i)}function C5(e,t,r){function i(r,i){if(r._zod||Object.defineProperty(r,"_zod",{value:{def:i,constr:a,traits:new Set},enumerable:!1}),r._zod.traits.has(e))return;r._zod.traits.add(e),t(r,i);let o=a.prototype,n=Object.keys(o);for(let e=0;e!!r?.Parent&&t instanceof r.Parent||t?._zod?.traits?.has(e)}),Object.defineProperty(a,"name",{value:e}),a}Symbol("zod_brand");class C8 extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class C7 extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}}(en=globalThis).__zod_globalConfig??(en.__zod_globalConfig={});let Te=globalThis.__zod_globalConfig;function Tt(e){return e&&Object.assign(Te,e),Te}let Tr=/^[cC][0-9a-z]{6,}$/,Ti=/^[0-9a-z]+$/,To=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Tn=/^[0-9a-vA-V]{20}$/,Ta=/^[A-Za-z0-9]{27}$/,Ts=/^[a-zA-Z0-9_-]{21}$/,Td=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Tc=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Tl=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([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)$/,Tp=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Tu=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Tm=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,Tf=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Th=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Ty=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Tg=/^[A-Za-z0-9_-]*$/,T_=/^https?$/,Tv=/^\+[1-9]\d{6,14}$/,Tb="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",T$=RegExp(`^${Tb}$`);function TS(e){let t="(?:[01]\\d|2[0-3]):[0-5]\\d";return"number"==typeof e.precision?-1===e.precision?`${t}`:0===e.precision?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}let Tk=/^-?\d+$/,Tw=/^-?\d+(?:\.\d+)?$/,TV=/^(?:true|false)$/i,TP=/^[^A-Z]*$/,TR=/^[^a-z]*$/;function Tq(e){let t=Object.values(e).filter(e=>"number"==typeof e);return Object.entries(e).filter(([e,r])=>-1===t.indexOf(+e)).map(([e,t])=>t)}function TI(e,t){return"bigint"==typeof t?t.toString():t}function Tx(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function Tj(e){let t=+!!e.startsWith("^"),r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}let TC=Symbol("evaluating");function TT(e,t,r){let i;Object.defineProperty(e,t,{get(){if(i!==TC)return void 0===i&&(i=TC,i=r()),i},set(r){Object.defineProperty(e,t,{value:r})},configurable:!0})}function TO(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function TE(...e){let t={};for(let r of e)Object.assign(t,Object.getOwnPropertyDescriptors(r));return Object.defineProperties({},t)}function TA(e){return JSON.stringify(e)}let TW="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function TM(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}let TN=Tx(()=>{if(Te.jitless||"u">typeof navigator&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return Function(""),!0}catch(e){return!1}});function Tz(e){if(!1===TM(e))return!1;let t=e.constructor;if(void 0===t||"function"!=typeof t)return!0;let r=t.prototype;return!1!==TM(r)&&!1!==Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")}function TD(e){return Tz(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}let TF=new Set(["string","number","symbol"]);function TL(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function TU(e,t,r){let i=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(i._zod.parent=e),i}function TH(e){if(!e)return{};if("string"==typeof e)return{error:()=>e};if(e?.message!==void 0){if(e?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");e.error=e.message}return(delete e.message,"string"==typeof e.error)?{...e,error:()=>e.error}:e}let TG={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-0x80000000,0x7fffffff],uint32:[0,0xffffffff],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function TB(e,t=0){if(!0===e.aborted)return!0;for(let r=t;r(t.path??(t.path=[]),t.path.unshift(e),t))}function TJ(e){return"string"==typeof e?e:e?.message}function TZ(e,t,r){let i=e.message?e.message:TJ(e.inst?._zod.def?.error?.(e))??TJ(t?.error?.(e))??TJ(r.customError?.(e))??TJ(r.localeError?.(e))??"Invalid input",{inst:o,continue:n,input:a,...s}=e;return s.path??(s.path=[]),s.message=i,t?.reportInput&&(s.input=a),s}function TQ(e){return Array.isArray(e)?"array":"string"==typeof e?"string":"unknown"}function TX(...e){let[t,r,i]=e;return"string"==typeof t?{message:t,code:"custom",input:r,inst:i}:{...t}}let TY=C5("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),T1={number:"number",bigint:"bigint",object:"date"},T0=C5("$ZodCheckLessThan",(e,t)=>{TY.init(e,t);let r=T1[typeof t.value];e._zod.onattach.push(e=>{let r=e._zod.bag,i=(t.inclusive?r.maximum:r.exclusiveMaximum)??1/0;t.value{(t.inclusive?i.value<=t.value:i.value{TY.init(e,t);let r=T1[typeof t.value];e._zod.onattach.push(e=>{let r=e._zod.bag,i=(t.inclusive?r.minimum:r.exclusiveMinimum)??-1/0;t.value>i&&(t.inclusive?r.minimum=t.value:r.exclusiveMinimum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value>=t.value:i.value>t.value)||i.issues.push({origin:r,code:"too_small",minimum:"object"==typeof t.value?t.value.getTime():t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),T4=C5("$ZodCheckMultipleOf",(e,t)=>{TY.init(e,t),e._zod.onattach.push(e=>{var r;(r=e._zod.bag).multipleOf??(r.multipleOf=t.value)}),e._zod.check=r=>{let i,o,n;if(typeof r.value!=typeof t.value)throw Error("Cannot mix number and bigint in multiple_of check.");("bigint"==typeof r.value?r.value%t.value===BigInt(0):0==(o=Math.round(i=r.value/t.value),n=Number.EPSILON*Math.max(Math.abs(i),1),Math.abs(i-o){TY.init(e,t),t.format=t.format||"float64";let r=t.format?.includes("int"),i=r?"int":"number",[o,n]=TG[t.format];e._zod.onattach.push(e=>{let i=e._zod.bag;i.format=t.format,i.minimum=o,i.maximum=n,r&&(i.pattern=Tk)}),e._zod.check=a=>{let s=a.value;if(r){if(!Number.isInteger(s))return void a.issues.push({expected:i,format:t.format,code:"invalid_type",continue:!1,input:s,inst:e});if(!Number.isSafeInteger(s))return void(s>0?a.issues.push({input:s,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!t.abort}):a.issues.push({input:s,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!t.abort}))}sn&&a.issues.push({origin:"number",input:s,code:"too_big",maximum:n,inclusive:!0,inst:e,continue:!t.abort})}}),T3=C5("$ZodCheckMaxLength",(e,t)=>{var r;TY.init(e,t),(r=e._zod.def).when??(r.when=e=>{let t=e.value;return null!=t&&void 0!==t.length}),e._zod.onattach.push(e=>{let r=e._zod.bag.maximum??1/0;t.maximum{let i=r.value;if(i.length<=t.maximum)return;let o=TQ(i);r.issues.push({origin:o,code:"too_big",maximum:t.maximum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),T9=C5("$ZodCheckMinLength",(e,t)=>{var r;TY.init(e,t),(r=e._zod.def).when??(r.when=e=>{let t=e.value;return null!=t&&void 0!==t.length}),e._zod.onattach.push(e=>{let r=e._zod.bag.minimum??-1/0;t.minimum>r&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{let i=r.value;if(i.length>=t.minimum)return;let o=TQ(i);r.issues.push({origin:o,code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),T5=C5("$ZodCheckLengthEquals",(e,t)=>{var r;TY.init(e,t),(r=e._zod.def).when??(r.when=e=>{let t=e.value;return null!=t&&void 0!==t.length}),e._zod.onattach.push(e=>{let r=e._zod.bag;r.minimum=t.length,r.maximum=t.length,r.length=t.length}),e._zod.check=r=>{let i=r.value,o=i.length;if(o===t.length)return;let n=TQ(i),a=o>t.length;r.issues.push({origin:n,...a?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),T8=C5("$ZodCheckStringFormat",(e,t)=>{var r,i;TY.init(e,t),e._zod.onattach.push(e=>{let r=e._zod.bag;r.format=t.format,t.pattern&&(r.patterns??(r.patterns=new Set),r.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=r=>{t.pattern.lastIndex=0,t.pattern.test(r.value)||r.issues.push({origin:"string",code:"invalid_format",format:t.format,input:r.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(i=e._zod).check??(i.check=()=>{})}),T7=C5("$ZodCheckRegex",(e,t)=>{T8.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,t.pattern.test(r.value)||r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Oe=C5("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=TP),T8.init(e,t)}),Ot=C5("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=TR),T8.init(e,t)}),Or=C5("$ZodCheckIncludes",(e,t)=>{TY.init(e,t);let r=TL(t.includes),i=new RegExp("number"==typeof t.position?`^.{${t.position}}${r}`:r);t.pattern=i,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(i)}),e._zod.check=r=>{r.value.includes(t.includes,t.position)||r.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:r.value,inst:e,continue:!t.abort})}}),Oi=C5("$ZodCheckStartsWith",(e,t)=>{TY.init(e,t);let r=RegExp(`^${TL(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(r)}),e._zod.check=r=>{r.value.startsWith(t.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:r.value,inst:e,continue:!t.abort})}}),Oo=C5("$ZodCheckEndsWith",(e,t)=>{TY.init(e,t);let r=RegExp(`.*${TL(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(r)}),e._zod.check=r=>{r.value.endsWith(t.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:r.value,inst:e,continue:!t.abort})}}),On=C5("$ZodCheckOverwrite",(e,t)=>{TY.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}});class Oa{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if("function"==typeof e){e(this,{execution:"sync"}),e(this,{execution:"async"});return}let t=e.split("\n").filter(e=>e),r=Math.min(...t.map(e=>e.length-e.trimStart().length));for(let e of t.map(e=>e.slice(r)).map(e=>" ".repeat(2*this.indent)+e))this.content.push(e)}compile(){let e=Function,t=this?.args,r=[...(this?.content??[""]).map(e=>` ${e}`)];return new e(...t,r.join("\n"))}}let Os=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,TI,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Od=C5("$ZodError",Os),Oc=C5("$ZodError",Os,{Parent:Error}),Ol=e=>(t,r,i,o)=>{let n=i?{...i,async:!1}:{async:!1},a=t._zod.run({value:r,issues:[]},n);if(a instanceof Promise)throw new C8;if(a.issues.length){let t=new(o?.Err??e)(a.issues.map(e=>TZ(e,n,Tt())));throw TW(t,o?.callee),t}return a.value},Op=e=>async(t,r,i,o)=>{let n=i?{...i,async:!0}:{async:!0},a=t._zod.run({value:r,issues:[]},n);if(a instanceof Promise&&(a=await a),a.issues.length){let t=new(o?.Err??e)(a.issues.map(e=>TZ(e,n,Tt())));throw TW(t,o?.callee),t}return a.value},Ou=e=>(t,r,i)=>{let o=i?{...i,async:!1}:{async:!1},n=t._zod.run({value:r,issues:[]},o);if(n instanceof Promise)throw new C8;return n.issues.length?{success:!1,error:new(e??Od)(n.issues.map(e=>TZ(e,o,Tt())))}:{success:!0,data:n.value}},Om=Ou(Oc),Of=e=>async(t,r,i)=>{let o=i?{...i,async:!0}:{async:!0},n=t._zod.run({value:r,issues:[]},o);return n instanceof Promise&&(n=await n),n.issues.length?{success:!1,error:new e(n.issues.map(e=>TZ(e,o,Tt())))}:{success:!0,data:n.value}},Oh=Of(Oc),Oy={major:4,minor:4,patch:3},Og=C5("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Oy;let i=[...e._zod.def.checks??[]];for(let t of(e._zod.traits.has("$ZodCheck")&&i.unshift(e),i))for(let r of t._zod.onattach)r(e);if(0===i.length)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(e,t,r)=>{let i,o=TB(e);for(let n of t){if(n._zod.def.when){if(function(e,t=0){if(!0===e.aborted)return!0;for(let r=t;r{await a,e.issues.length!==t&&(o||(o=TB(e,t)))});else{if(e.issues.length===t)continue;o||(o=TB(e,t))}}return i?i.then(()=>e):e},r=(r,o,n)=>{if(TB(r))return r.aborted=!0,r;let a=t(o,i,n);if(a instanceof Promise){if(!1===n.async)throw new C8;return a.then(t=>e._zod.parse(t,n))}return e._zod.parse(a,n)};e._zod.run=(o,n)=>{if(n.skipChecks)return e._zod.parse(o,n);if("backward"===n.direction){let t=e._zod.parse({value:o.value,issues:[]},{...n,skipChecks:!0});return t instanceof Promise?t.then(e=>r(e,o,n)):r(t,o,n)}let a=e._zod.parse(o,n);if(a instanceof Promise){if(!1===n.async)throw new C8;return a.then(e=>t(e,i,n))}return t(a,i,n)}}TT(e,"~standard",()=>({validate:t=>{try{let r=Om(e,t);return r.success?{value:r.data}:{issues:r.error?.issues}}catch(r){return Oh(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:"zod",version:1}))}),O_=C5("$ZodString",(e,t)=>{var r;let i;Og.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??(i=(r=e._zod.bag)?`[\\s\\S]{${r?.minimum??0},${r?.maximum??""}}`:"[\\s\\S]*",RegExp(`^${i}$`)),e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=String(r.value)}catch(e){}return"string"==typeof r.value||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),Ov=C5("$ZodStringFormat",(e,t)=>{T8.init(e,t),O_.init(e,t)}),Ob=C5("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Tc),Ov.init(e,t)}),O$=C5("$ZodUUID",(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(void 0===e)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Tl(e))}else t.pattern??(t.pattern=Tl());Ov.init(e,t)}),OS=C5("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Tp),Ov.init(e,t)}),Ok=C5("$ZodURL",(e,t)=>{Ov.init(e,t),e._zod.check=r=>{try{let i=r.value.trim();if(!t.normalize&&t.protocol?.source===T_.source&&!/^https?:\/\//i.test(i))return void r.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:r.value,inst:e,continue:!t.abort});let o=new URL(i);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(o.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(o.protocol.endsWith(":")?o.protocol.slice(0,-1):o.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),t.normalize?r.value=o.href:r.value=i;return}catch(i){r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),Ow=C5("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),Ov.init(e,t)}),OV=C5("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=Ts),Ov.init(e,t)}),OP=C5("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Tr),Ov.init(e,t)}),OR=C5("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Ti),Ov.init(e,t)}),Oq=C5("$ZodULID",(e,t)=>{t.pattern??(t.pattern=To),Ov.init(e,t)}),OI=C5("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Tn),Ov.init(e,t)}),Ox=C5("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Ta),Ov.init(e,t)}),Oj=C5("$ZodISODateTime",(e,t)=>{let r,i,o;t.pattern??(r=TS({precision:t.precision}),i=["Z"],t.local&&i.push(""),t.offset&&i.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)"),o=`${r}(?:${i.join("|")})`,t.pattern=RegExp(`^${Tb}T(?:${o})$`)),Ov.init(e,t)}),OC=C5("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=T$),Ov.init(e,t)}),OT=C5("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=RegExp(`^${TS(t)}$`)),Ov.init(e,t)}),OO=C5("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Td),Ov.init(e,t)}),OE=C5("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=Tu),Ov.init(e,t),e._zod.bag.format="ipv4"}),OA=C5("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=Tm),Ov.init(e,t),e._zod.bag.format="ipv6",e._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}}),OW=C5("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=Tf),Ov.init(e,t)}),OM=C5("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=Th),Ov.init(e,t),e._zod.check=r=>{let i=r.value.split("/");try{if(2!==i.length)throw Error();let[e,t]=i;if(!t)throw Error();let r=Number(t);if(`${r}`!==t||r<0||r>128)throw Error();new URL(`http://[${e}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}}});function ON(e){if(""===e)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}let Oz=C5("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Ty),Ov.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=r=>{ON(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}}),OD=C5("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=Tg),Ov.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=r=>{!function(e){if(!Tg.test(e))return!1;let t=e.replace(/[-_]/g,e=>"-"===e?"+":"/");return ON(t.padEnd(4*Math.ceil(t.length/4),"="))}(r.value)&&r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),OF=C5("$ZodE164",(e,t)=>{t.pattern??(t.pattern=Tv),Ov.init(e,t)}),OL=C5("$ZodJWT",(e,t)=>{Ov.init(e,t),e._zod.check=r=>{!function(e,t=null){try{let r=e.split(".");if(3!==r.length)return!1;let[i]=r;if(!i)return!1;let o=JSON.parse(atob(i));if("typ"in o&&o?.typ!=="JWT"||!o.alg||t&&(!("alg"in o)||o.alg!==t))return!1;return!0}catch{return!1}}(r.value,t.alg)&&r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),OU=C5("$ZodNumber",(e,t)=>{Og.init(e,t),e._zod.pattern=e._zod.bag.pattern??Tw,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=Number(r.value)}catch(e){}let o=r.value;if("number"==typeof o&&!Number.isNaN(o)&&Number.isFinite(o))return r;let n="number"==typeof o?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:o,inst:e,...n?{received:n}:{}}),r}}),OH=C5("$ZodNumberFormat",(e,t)=>{T6.init(e,t),OU.init(e,t)}),OG=C5("$ZodBoolean",(e,t)=>{Og.init(e,t),e._zod.pattern=TV,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=!!r.value}catch(e){}let o=r.value;return"boolean"==typeof o||r.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:e}),r}}),OB=C5("$ZodUnknown",(e,t)=>{Og.init(e,t),e._zod.parse=e=>e}),OK=C5("$ZodNever",(e,t)=>{Og.init(e,t),e._zod.parse=(t,r)=>(t.issues.push({expected:"never",code:"invalid_type",input:t.value,inst:e}),t)});function OJ(e,t,r){e.issues.length&&t.issues.push(...TK(r,e.issues)),t.value[r]=e.value}let OZ=C5("$ZodArray",(e,t)=>{Og.init(e,t),e._zod.parse=(r,i)=>{let o=r.value;if(!Array.isArray(o))return r.issues.push({expected:"array",code:"invalid_type",input:o,inst:e}),r;r.value=Array(o.length);let n=[];for(let e=0;eOJ(t,r,e))):OJ(s,r,e)}return n.length?Promise.all(n).then(()=>r):r}});function OQ(e,t,r,i,o,n){let a=r in i;if(e.issues.length){if(o&&n&&!a)return;t.issues.push(...TK(r,e.issues))}if(!a&&!o){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[r]});return}void 0===e.value?a&&(t.value[r]=void 0):t.value[r]=e.value}function OX(e){var t;let r=Object.keys(e.shape);for(let t of r)if(!e.shape?.[t]?._zod?.traits?.has("$ZodType"))throw Error(`Invalid element at key "${t}": expected a Zod schema`);let i=Object.keys(t=e.shape).filter(e=>"optional"===t[e]._zod.optin&&"optional"===t[e]._zod.optout);return{...e,keys:r,keySet:new Set(r),numKeys:r.length,optionalKeys:new Set(i)}}function OY(e,t,r,i,o,n){let a=[],s=o.keySet,d=o.catchall._zod,c=d.def.type,l="optional"===d.optin,p="optional"===d.optout;for(let o in t){if("__proto__"===o||s.has(o))continue;if("never"===c){a.push(o);continue}let n=d.run({value:t[o],issues:[]},i);n instanceof Promise?e.push(n.then(e=>OQ(e,r,o,t,l,p))):OQ(n,r,o,t,l,p)}return(a.length&&r.issues.push({code:"unrecognized_keys",keys:a,input:t,inst:n}),e.length)?Promise.all(e).then(()=>r):r}let O1=C5("$ZodObject",(e,t)=>{let r;Og.init(e,t);let i=Object.getOwnPropertyDescriptor(t,"shape");if(!i?.get){let e=t.shape;Object.defineProperty(t,"shape",{get:()=>{let r={...e};return Object.defineProperty(t,"shape",{value:r}),r}})}let o=Tx(()=>OX(t));TT(e._zod,"propValues",()=>{let e=t.shape,r={};for(let t in e){let i=e[t]._zod;if(i.values)for(let e of(r[t]??(r[t]=new Set),i.values))r[t].add(e)}return r});let n=t.catchall;e._zod.parse=(t,i)=>{r??(r=o.value);let a=t.value;if(!TM(a))return t.issues.push({expected:"object",code:"invalid_type",input:a,inst:e}),t;t.value={};let s=[],d=r.shape;for(let e of r.keys){let r=d[e],o="optional"===r._zod.optin,n="optional"===r._zod.optout,c=r._zod.run({value:a[e],issues:[]},i);c instanceof Promise?s.push(c.then(r=>OQ(r,t,e,a,o,n))):OQ(c,t,e,a,o,n)}return n?OY(s,a,t,i,o.value,e):s.length?Promise.all(s).then(()=>t):t}}),O0=C5("$ZodObjectJIT",(e,t)=>{let r,i;O1.init(e,t);let o=e._zod.parse,n=Tx(()=>OX(t)),a=!Te.jitless,s=a&&TN.value,d=t.catchall;e._zod.parse=(c,l)=>{i??(i=n.value);let p=c.value;return TM(p)?a&&s&&l?.async===!1&&!0!==l.jitless?(r||(r=(e=>{let t=new Oa(["shape","payload","ctx"]),r=n.value,i=e=>{let t=TA(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write("const input = payload.value;");let o=Object.create(null),a=0;for(let e of r.keys)o[e]=`key_${a++}`;for(let n of(t.write("const newResult = {};"),r.keys)){let r=o[n],a=TA(n),s=e[n],d=s?._zod?.optin==="optional",c=s?._zod?.optout==="optional";t.write(`const ${r} = ${i(n)};`),d&&c?t.write(` if (${r}.issues.length) { if (${a} in input) { payload.issues = payload.issues.concat(${r}.issues.map(iss => ({ @@ -142,13 +142,13 @@ ${n} } } - `)}t.write("payload.value = newResult;"),t.write("return payload;");let s=t.compile();return(t,r)=>s(e,t,r)})(t.shape)),c=r(c,l),d)?Ow([],p,c,l,i,e):c:o(c,l):(c.issues.push({expected:"object",code:"invalid_type",input:p,inst:e}),c)}});function OV(e,t,r,i){for(let r of e)if(0===r.issues.length)return t.value=r.value,t;let o=e.filter(e=>!T_(e));return 1===o.length?(t.value=o[0].value,o[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(e=>e.issues.map(e=>T$(e,i,CA())))}),t)}let Oq=CC("$ZodUnion",(e,t)=>{TX.init(e,t),To(e._zod,"optin",()=>t.options.some(e=>"optional"===e._zod.optin)?"optional":void 0),To(e._zod,"optout",()=>t.options.some(e=>"optional"===e._zod.optout)?"optional":void 0),To(e._zod,"values",()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),To(e._zod,"pattern",()=>{if(t.options.every(e=>e._zod.pattern)){let e=t.options.map(e=>e._zod.pattern);return RegExp(`^(${e.map(e=>Tr(e.source)).join("|")})$`)}});let r=1===t.options.length?t.options[0]._zod.run:null;e._zod.parse=(i,o)=>{if(r)return r(i,o);let n=!1,a=[];for(let e of t.options){let t=e._zod.run({value:i.value,issues:[]},o);if(t instanceof Promise)a.push(t),n=!0;else{if(0===t.issues.length)return t;a.push(t)}}return n?Promise.all(a).then(t=>OV(t,i,e,o)):OV(a,i,e,o)}}),OI=CC("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,Oq.init(e,t);let r=e._zod.parse;To(e._zod,"propValues",()=>{let e={};for(let r of t.options){let i=r._zod.propValues;if(!i||0===Object.keys(i).length)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(r)}"`);for(let[t,r]of Object.entries(i))for(let i of(e[t]||(e[t]=new Set),r))e[t].add(i)}return e});let i=Tt(()=>{let e=t.options,r=new Map;for(let i of e){let e=i._zod.propValues?.[t.discriminator];if(!e||0===e.size)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(i)}"`);for(let t of e){if(r.has(t))throw Error(`Duplicate discriminator value "${String(t)}"`);r.set(t,i)}}return r});e._zod.parse=(o,n)=>{let a=o.value;if(!Tc(a))return o.issues.push({code:"invalid_type",expected:"object",input:a,inst:e}),o;let s=i.value.get(a?.[t.discriminator]);return s?s._zod.run(o,n):t.unionFallback||"backward"===n.direction?r(o,n):(o.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,options:Array.from(i.value.keys()),input:a,path:[t.discriminator],inst:e}),o)}}),Ox=CC("$ZodIntersection",(e,t)=>{TX.init(e,t),e._zod.parse=(e,r)=>{let i=e.value,o=t.left._zod.run({value:i,issues:[]},r),n=t.right._zod.run({value:i,issues:[]},r);return o instanceof Promise||n instanceof Promise?Promise.all([o,n]).then(([t,r])=>Oj(e,t,r)):Oj(e,o,n)}});function Oj(e,t,r){let i,o=new Map;for(let r of t.issues)if("unrecognized_keys"===r.code)for(let e of(i??(i=r),r.keys))o.has(e)||o.set(e,{}),o.get(e).l=!0;else e.issues.push(r);for(let t of r.issues)if("unrecognized_keys"===t.code)for(let e of t.keys)o.has(e)||o.set(e,{}),o.get(e).r=!0;else e.issues.push(t);let n=[...o].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(n.length&&i&&e.issues.push({...i,keys:n}),T_(e))return e;let a=function e(t,r){if(t===r||t instanceof Date&&r instanceof Date&&+t==+r)return{valid:!0,data:t};if(Tp(t)&&Tp(r)){let i=Object.keys(r),o=Object.keys(t).filter(e=>-1!==i.indexOf(e)),n={...t,...r};for(let i of o){let o=e(t[i],r[i]);if(!o.valid)return{valid:!1,mergeErrorPath:[i,...o.mergeErrorPath]};n[i]=o.data}return{valid:!0,data:n}}if(Array.isArray(t)&&Array.isArray(r)){if(t.length!==r.length)return{valid:!1,mergeErrorPath:[]};let i=[];for(let o=0;o{TX.init(e,t);let r=t.items;e._zod.parse=(i,o)=>{let n=i.value;if(!Array.isArray(n))return i.issues.push({input:n,inst:e,expected:"tuple",code:"invalid_type"}),i;i.value=[];let a=[],s=OT(r,"optin"),d=OT(r,"optout");if(!t.rest){if(n.lengthr.length&&i.issues.push({code:"too_big",maximum:r.length,inclusive:!0,input:n,inst:e,origin:"array"})}let c=Array(r.length);for(let e=0;e{c[e]=t})):c[e]=t}if(t.rest){let e=r.length-1;for(let s of n.slice(r.length)){e++;let r=t.rest._zod.run({value:s,issues:[]},o);r instanceof Promise?a.push(r.then(t=>OO(t,i,e))):OO(r,i,e)}}return a.length?Promise.all(a).then(()=>OE(c,i,r,n,d)):OE(c,i,r,n,d)}});function OT(e,t){for(let r=e.length-1;r>=0;r--)if("optional"!==e[r]._zod[t])return r+1;return 0}function OO(e,t,r){e.issues.length&&t.issues.push(...Tv(r,e.issues)),t.value[r]=e.value}function OE(e,t,r,i,o){for(let n=0;n=o){t.value.length=n;break}t.issues.push(...Tv(n,r.issues))}t.value[n]=r.value}for(let e=t.value.length-1;e>=i.length;e--)if("optional"===r[e]._zod.optout&&void 0===t.value[e])t.value.length=e;else break;return t}let OA=CC("$ZodRecord",(e,t)=>{TX.init(e,t),e._zod.parse=(r,i)=>{let o=r.value;if(!Tp(o))return r.issues.push({expected:"record",code:"invalid_type",input:o,inst:e}),r;let n=[],a=t.keyType._zod.values;if(a){let s;r.value={};let d=new Set;for(let s of a)if("string"==typeof s||"number"==typeof s||"symbol"==typeof s){d.add("number"==typeof s?s.toString():s);let a=t.keyType._zod.run({value:s,issues:[]},i);if(a instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(a.issues.length){r.issues.push({code:"invalid_key",origin:"record",issues:a.issues.map(e=>T$(e,i,CA())),input:s,path:[s],inst:e});continue}let c=a.value,l=t.valueType._zod.run({value:o[s],issues:[]},i);l instanceof Promise?n.push(l.then(e=>{e.issues.length&&r.issues.push(...Tv(s,e.issues)),r.value[c]=e.value})):(l.issues.length&&r.issues.push(...Tv(s,l.issues)),r.value[c]=l.value)}for(let e in o)d.has(e)||(s=s??[]).push(e);s&&s.length>0&&r.issues.push({code:"unrecognized_keys",input:o,inst:e,keys:s})}else for(let a of(r.value={},Reflect.ownKeys(o))){if("__proto__"===a||!Object.prototype.propertyIsEnumerable.call(o,a))continue;let s=t.keyType._zod.run({value:a,issues:[]},i);if(s instanceof Promise)throw Error("Async schemas not supported in object keys currently");if("string"==typeof a&&C3.test(a)&&s.issues.length){let e=t.keyType._zod.run({value:Number(a),issues:[]},i);if(e instanceof Promise)throw Error("Async schemas not supported in object keys currently");0===e.issues.length&&(s=e)}if(s.issues.length){"loose"===t.mode?r.value[a]=o[a]:r.issues.push({code:"invalid_key",origin:"record",issues:s.issues.map(e=>T$(e,i,CA())),input:a,path:[a],inst:e});continue}let d=t.valueType._zod.run({value:o[a],issues:[]},i);d instanceof Promise?n.push(d.then(e=>{e.issues.length&&r.issues.push(...Tv(a,e.issues)),r.value[s.value]=e.value})):(d.issues.length&&r.issues.push(...Tv(a,d.issues)),r.value[s.value]=d.value)}return n.length?Promise.all(n).then(()=>r):r}}),OM=CC("$ZodEnum",(e,t)=>{TX.init(e,t);let r=C7(t.entries),i=new Set(r);e._zod.values=i,e._zod.pattern=RegExp(`^(${r.filter(e=>Tm.has(typeof e)).map(e=>"string"==typeof e?Tf(e):e.toString()).join("|")})$`),e._zod.parse=(t,o)=>{let n=t.value;return i.has(n)||t.issues.push({code:"invalid_value",values:r,input:n,inst:e}),t}}),OW=CC("$ZodLiteral",(e,t)=>{if(TX.init(e,t),0===t.values.length)throw Error("Cannot create literal schema with no valid values");let r=new Set(t.values);e._zod.values=r,e._zod.pattern=RegExp(`^(${t.values.map(e=>"string"==typeof e?Tf(e):e?Tf(e.toString()):String(e)).join("|")})$`),e._zod.parse=(i,o)=>{let n=i.value;return r.has(n)||i.issues.push({code:"invalid_value",values:t.values,input:n,inst:e}),i}}),ON=CC("$ZodTransform",(e,t)=>{TX.init(e,t),e._zod.optin="optional",e._zod.parse=(r,i)=>{if("backward"===i.direction)throw new CO(e.constructor.name);let o=t.transform(r.value,r);if(i.async)return(o instanceof Promise?o:Promise.resolve(o)).then(e=>(r.value=e,r.fallback=!0,r));if(o instanceof Promise)throw new CT;return r.value=o,r.fallback=!0,r}});function Oz(e,t){return void 0===t&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}let OD=CC("$ZodOptional",(e,t)=>{TX.init(e,t),e._zod.optin="optional",e._zod.optout="optional",To(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),To(e._zod,"pattern",()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${Tr(e.source)})?$`):void 0}),e._zod.parse=(e,r)=>{if("optional"===t.innerType._zod.optin){let i=e.value,o=t.innerType._zod.run(e,r);return o instanceof Promise?o.then(e=>Oz(e,i)):Oz(o,i)}return void 0===e.value?e:t.innerType._zod.run(e,r)}}),OF=CC("$ZodExactOptional",(e,t)=>{OD.init(e,t),To(e._zod,"values",()=>t.innerType._zod.values),To(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(e,r)=>t.innerType._zod.run(e,r)}),OL=CC("$ZodNullable",(e,t)=>{TX.init(e,t),To(e._zod,"optin",()=>t.innerType._zod.optin),To(e._zod,"optout",()=>t.innerType._zod.optout),To(e._zod,"pattern",()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${Tr(e.source)}|null)$`):void 0}),To(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,r)=>null===e.value?e:t.innerType._zod.run(e,r)}),OU=CC("$ZodDefault",(e,t)=>{TX.init(e,t),e._zod.optin="optional",To(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,r)=>{if("backward"===r.direction)return t.innerType._zod.run(e,r);if(void 0===e.value)return e.value=t.defaultValue,e;let i=t.innerType._zod.run(e,r);return i instanceof Promise?i.then(e=>OH(e,t)):OH(i,t)}});function OH(e,t){return void 0===e.value&&(e.value=t.defaultValue),e}let OG=CC("$ZodPrefault",(e,t)=>{TX.init(e,t),e._zod.optin="optional",To(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,r)=>("backward"===r.direction||void 0===e.value&&(e.value=t.defaultValue),t.innerType._zod.run(e,r))}),OB=CC("$ZodNonOptional",(e,t)=>{TX.init(e,t),To(e._zod,"values",()=>{let e=t.innerType._zod.values;return e?new Set([...e].filter(e=>void 0!==e)):void 0}),e._zod.parse=(r,i)=>{let o=t.innerType._zod.run(r,i);return o instanceof Promise?o.then(t=>OK(t,e)):OK(o,e)}});function OK(e,t){return e.issues.length||void 0!==e.value||e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}let OJ=CC("$ZodCatch",(e,t)=>{TX.init(e,t),e._zod.optin="optional",To(e._zod,"optout",()=>t.innerType._zod.optout),To(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,r)=>{if("backward"===r.direction)return t.innerType._zod.run(e,r);let i=t.innerType._zod.run(e,r);return i instanceof Promise?i.then(i=>(e.value=i.value,i.issues.length&&(e.value=t.catchValue({...e,error:{issues:i.issues.map(e=>T$(e,r,CA()))},input:e.value}),e.issues=[],e.fallback=!0),e)):(e.value=i.value,i.issues.length&&(e.value=t.catchValue({...e,error:{issues:i.issues.map(e=>T$(e,r,CA()))},input:e.value}),e.issues=[],e.fallback=!0),e)}}),OZ=CC("$ZodPipe",(e,t)=>{TX.init(e,t),To(e._zod,"values",()=>t.in._zod.values),To(e._zod,"optin",()=>t.in._zod.optin),To(e._zod,"optout",()=>t.out._zod.optout),To(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(e,r)=>{if("backward"===r.direction){let i=t.out._zod.run(e,r);return i instanceof Promise?i.then(e=>OQ(e,t.in,r)):OQ(i,t.in,r)}let i=t.in._zod.run(e,r);return i instanceof Promise?i.then(e=>OQ(e,t.out,r)):OQ(i,t.out,r)}});function OQ(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},r)}let OX=CC("$ZodReadonly",(e,t)=>{TX.init(e,t),To(e._zod,"propValues",()=>t.innerType._zod.propValues),To(e._zod,"values",()=>t.innerType._zod.values),To(e._zod,"optin",()=>t.innerType?._zod?.optin),To(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(e,r)=>{if("backward"===r.direction)return t.innerType._zod.run(e,r);let i=t.innerType._zod.run(e,r);return i instanceof Promise?i.then(OY):OY(i)}});function OY(e){return e.value=Object.freeze(e.value),e}let O1=CC("$ZodCustom",(e,t)=>{Tw.init(e,t),TX.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=r=>{let i=r.value,o=t.fn(i);if(o instanceof Promise)return o.then(t=>O0(t,r,i,e));O0(o,r,i,e)}});function O0(e,t,r,i){if(!e){let e={code:"custom",input:r,inst:i,path:[...i._zod.def.path??[]],continue:!i._zod.def.abort};i._zod.def.params&&(e.params=i._zod.def.params),t.issues.push(Tk(e))}}Symbol("ZodOutput"),Symbol("ZodInput");(ea=globalThis).__zod_globalRegistry??(ea.__zod_globalRegistry=new class e{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let r=t[0];return this._map.set(e,r),r&&"object"==typeof r&&"id"in r&&this._idmap.set(r.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&"object"==typeof t&&"id"in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let r={...this.get(t)??{}};delete r.id;let i={...r,...this._map.get(e)};return Object.keys(i).length?i:void 0}return this._map.get(e)}has(e){return this._map.has(e)}});let O2=globalThis.__zod_globalRegistry;function O4(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...Ty(t)})}function O6(e,t){return new TP({check:"less_than",...Ty(t),value:e,inclusive:!1})}function O3(e,t){return new TP({check:"less_than",...Ty(t),value:e,inclusive:!0})}function O9(e,t){return new TV({check:"greater_than",...Ty(t),value:e,inclusive:!1})}function O5(e,t){return new TV({check:"greater_than",...Ty(t),value:e,inclusive:!0})}function O8(e,t){return new Tq({check:"multiple_of",...Ty(t),value:e})}function O7(e,t){return new Tx({check:"max_length",...Ty(t),maximum:e})}function Ee(e,t){return new Tj({check:"min_length",...Ty(t),minimum:e})}function Et(e,t){return new TC({check:"length_equals",...Ty(t),length:e})}function Er(e){return new Tz({check:"overwrite",tx:e})}function Ei(e){let t=e?.target??"draft-2020-12";return"draft-4"===t&&(t="draft-04"),"draft-7"===t&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??O2,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function Eo(e,t,r={path:[],schemaPath:[]}){var i;let o=e._zod.def,n=t.seen.get(e);if(n)return n.count++,r.schemaPath.includes(e)&&(n.cycle=r.path),n.schema;let a={schema:{},count:1,cycle:void 0,path:r.path};t.seen.set(e,a);let s=e._zod.toJSONSchema?.();if(s)a.schema=s;else{let i={...r,schemaPath:[...r.schemaPath,e],path:r.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,a.schema,i);else{let r=a.schema,n=t.processors[o.type];if(!n)throw Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);n(e,t,r,i)}let n=e._zod.parent;n&&(a.ref||(a.ref=n),Eo(n,t,i),t.seen.get(n).isParent=!0)}let d=t.metadataRegistry.get(e);return d&&Object.assign(a.schema,d),"input"===t.io&&function e(t,r){let i=r??{seen:new Set};if(i.seen.has(t))return!1;i.seen.add(t);let o=t._zod.def;if("transform"===o.type)return!0;if("array"===o.type)return e(o.element,i);if("set"===o.type)return e(o.valueType,i);if("lazy"===o.type)return e(o.getter(),i);if("promise"===o.type||"optional"===o.type||"nonoptional"===o.type||"nullable"===o.type||"readonly"===o.type||"default"===o.type||"prefault"===o.type)return e(o.innerType,i);if("intersection"===o.type)return e(o.left,i)||e(o.right,i);if("record"===o.type||"map"===o.type)return e(o.keyType,i)||e(o.valueType,i);if("pipe"===o.type)return!!t._zod.traits.has("$ZodCodec")||e(o.in,i)||e(o.out,i);if("object"===o.type){for(let t in o.shape)if(e(o.shape[t],i))return!0;return!1}if("union"===o.type){for(let t of o.options)if(e(t,i))return!0;return!1}if("tuple"===o.type){for(let t of o.items)if(e(t,i))return!0;if(o.rest&&e(o.rest,i))return!0}return!1}(e)&&(delete a.schema.examples,delete a.schema.default),"input"===t.io&&"_prefault"in a.schema&&((i=a.schema).default??(i.default=a.schema._prefault)),delete a.schema._prefault,t.seen.get(e).schema}function En(e,t){let r=e.seen.get(t);if(!r)throw Error("Unprocessed schema. This is a bug in Zod.");let i=new Map;for(let t of e.seen.entries()){let r=e.metadataRegistry.get(t[0])?.id;if(r){let e=i.get(r);if(e&&e!==t[0])throw Error(`Duplicate schema id "${r}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);i.set(r,t[0])}}let o=t=>{if(t[1].schema.$ref)return;let i=t[1],{ref:o,defId:n}=(t=>{let i="draft-2020-12"===e.target?"$defs":"definitions";if(e.external){let r=e.external.registry.get(t[0])?.id,o=e.external.uri??(e=>e);if(r)return{ref:o(r)};let n=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=n,{defId:n,ref:`${o("__shared")}#/${i}/${n}`}}if(t[1]===r)return{ref:"#"};let o=`#/${i}/`,n=t[1].schema.id??`__schema${e.counter++}`;return{defId:n,ref:o+n}})(t);i.def={...i.schema},n&&(i.defId=n);let a=i.schema;for(let e in a)delete a[e];a.$ref=o};if("throw"===e.cycles)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join("/")}/ + `)}t.write("payload.value = newResult;"),t.write("return payload;");let s=t.compile();return(t,r)=>s(e,t,r)})(t.shape)),c=r(c,l),d)?OY([],p,c,l,i,e):c:o(c,l):(c.issues.push({expected:"object",code:"invalid_type",input:p,inst:e}),c)}});function O2(e,t,r,i){for(let r of e)if(0===r.issues.length)return t.value=r.value,t;let o=e.filter(e=>!TB(e));return 1===o.length?(t.value=o[0].value,o[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(e=>e.issues.map(e=>TZ(e,i,Tt())))}),t)}let O4=C5("$ZodUnion",(e,t)=>{Og.init(e,t),TT(e._zod,"optin",()=>t.options.some(e=>"optional"===e._zod.optin)?"optional":void 0),TT(e._zod,"optout",()=>t.options.some(e=>"optional"===e._zod.optout)?"optional":void 0),TT(e._zod,"values",()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),TT(e._zod,"pattern",()=>{if(t.options.every(e=>e._zod.pattern)){let e=t.options.map(e=>e._zod.pattern);return RegExp(`^(${e.map(e=>Tj(e.source)).join("|")})$`)}});let r=1===t.options.length?t.options[0]._zod.run:null;e._zod.parse=(i,o)=>{if(r)return r(i,o);let n=!1,a=[];for(let e of t.options){let t=e._zod.run({value:i.value,issues:[]},o);if(t instanceof Promise)a.push(t),n=!0;else{if(0===t.issues.length)return t;a.push(t)}}return n?Promise.all(a).then(t=>O2(t,i,e,o)):O2(a,i,e,o)}}),O6=C5("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,O4.init(e,t);let r=e._zod.parse;TT(e._zod,"propValues",()=>{let e={};for(let r of t.options){let i=r._zod.propValues;if(!i||0===Object.keys(i).length)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(r)}"`);for(let[t,r]of Object.entries(i))for(let i of(e[t]||(e[t]=new Set),r))e[t].add(i)}return e});let i=Tx(()=>{let e=t.options,r=new Map;for(let i of e){let e=i._zod.propValues?.[t.discriminator];if(!e||0===e.size)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(i)}"`);for(let t of e){if(r.has(t))throw Error(`Duplicate discriminator value "${String(t)}"`);r.set(t,i)}}return r});e._zod.parse=(o,n)=>{let a=o.value;if(!TM(a))return o.issues.push({code:"invalid_type",expected:"object",input:a,inst:e}),o;let s=i.value.get(a?.[t.discriminator]);return s?s._zod.run(o,n):t.unionFallback||"backward"===n.direction?r(o,n):(o.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,options:Array.from(i.value.keys()),input:a,path:[t.discriminator],inst:e}),o)}}),O3=C5("$ZodIntersection",(e,t)=>{Og.init(e,t),e._zod.parse=(e,r)=>{let i=e.value,o=t.left._zod.run({value:i,issues:[]},r),n=t.right._zod.run({value:i,issues:[]},r);return o instanceof Promise||n instanceof Promise?Promise.all([o,n]).then(([t,r])=>O9(e,t,r)):O9(e,o,n)}});function O9(e,t,r){let i,o=new Map;for(let r of t.issues)if("unrecognized_keys"===r.code)for(let e of(i??(i=r),r.keys))o.has(e)||o.set(e,{}),o.get(e).l=!0;else e.issues.push(r);for(let t of r.issues)if("unrecognized_keys"===t.code)for(let e of t.keys)o.has(e)||o.set(e,{}),o.get(e).r=!0;else e.issues.push(t);let n=[...o].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(n.length&&i&&e.issues.push({...i,keys:n}),TB(e))return e;let a=function e(t,r){if(t===r||t instanceof Date&&r instanceof Date&&+t==+r)return{valid:!0,data:t};if(Tz(t)&&Tz(r)){let i=Object.keys(r),o=Object.keys(t).filter(e=>-1!==i.indexOf(e)),n={...t,...r};for(let i of o){let o=e(t[i],r[i]);if(!o.valid)return{valid:!1,mergeErrorPath:[i,...o.mergeErrorPath]};n[i]=o.data}return{valid:!0,data:n}}if(Array.isArray(t)&&Array.isArray(r)){if(t.length!==r.length)return{valid:!1,mergeErrorPath:[]};let i=[];for(let o=0;o{Og.init(e,t);let r=t.items;e._zod.parse=(i,o)=>{let n=i.value;if(!Array.isArray(n))return i.issues.push({input:n,inst:e,expected:"tuple",code:"invalid_type"}),i;i.value=[];let a=[],s=O8(r,"optin"),d=O8(r,"optout");if(!t.rest){if(n.lengthr.length&&i.issues.push({code:"too_big",maximum:r.length,inclusive:!0,input:n,inst:e,origin:"array"})}let c=Array(r.length);for(let e=0;e{c[e]=t})):c[e]=t}if(t.rest){let e=r.length-1;for(let s of n.slice(r.length)){e++;let r=t.rest._zod.run({value:s,issues:[]},o);r instanceof Promise?a.push(r.then(t=>O7(t,i,e))):O7(r,i,e)}}return a.length?Promise.all(a).then(()=>Ee(c,i,r,n,d)):Ee(c,i,r,n,d)}});function O8(e,t){for(let r=e.length-1;r>=0;r--)if("optional"!==e[r]._zod[t])return r+1;return 0}function O7(e,t,r){e.issues.length&&t.issues.push(...TK(r,e.issues)),t.value[r]=e.value}function Ee(e,t,r,i,o){for(let n=0;n=o){t.value.length=n;break}t.issues.push(...TK(n,r.issues))}t.value[n]=r.value}for(let e=t.value.length-1;e>=i.length;e--)if("optional"===r[e]._zod.optout&&void 0===t.value[e])t.value.length=e;else break;return t}let Et=C5("$ZodRecord",(e,t)=>{Og.init(e,t),e._zod.parse=(r,i)=>{let o=r.value;if(!Tz(o))return r.issues.push({expected:"record",code:"invalid_type",input:o,inst:e}),r;let n=[],a=t.keyType._zod.values;if(a){let s;r.value={};let d=new Set;for(let s of a)if("string"==typeof s||"number"==typeof s||"symbol"==typeof s){d.add("number"==typeof s?s.toString():s);let a=t.keyType._zod.run({value:s,issues:[]},i);if(a instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(a.issues.length){r.issues.push({code:"invalid_key",origin:"record",issues:a.issues.map(e=>TZ(e,i,Tt())),input:s,path:[s],inst:e});continue}let c=a.value,l=t.valueType._zod.run({value:o[s],issues:[]},i);l instanceof Promise?n.push(l.then(e=>{e.issues.length&&r.issues.push(...TK(s,e.issues)),r.value[c]=e.value})):(l.issues.length&&r.issues.push(...TK(s,l.issues)),r.value[c]=l.value)}for(let e in o)d.has(e)||(s=s??[]).push(e);s&&s.length>0&&r.issues.push({code:"unrecognized_keys",input:o,inst:e,keys:s})}else for(let a of(r.value={},Reflect.ownKeys(o))){if("__proto__"===a||!Object.prototype.propertyIsEnumerable.call(o,a))continue;let s=t.keyType._zod.run({value:a,issues:[]},i);if(s instanceof Promise)throw Error("Async schemas not supported in object keys currently");if("string"==typeof a&&Tw.test(a)&&s.issues.length){let e=t.keyType._zod.run({value:Number(a),issues:[]},i);if(e instanceof Promise)throw Error("Async schemas not supported in object keys currently");0===e.issues.length&&(s=e)}if(s.issues.length){"loose"===t.mode?r.value[a]=o[a]:r.issues.push({code:"invalid_key",origin:"record",issues:s.issues.map(e=>TZ(e,i,Tt())),input:a,path:[a],inst:e});continue}let d=t.valueType._zod.run({value:o[a],issues:[]},i);d instanceof Promise?n.push(d.then(e=>{e.issues.length&&r.issues.push(...TK(a,e.issues)),r.value[s.value]=e.value})):(d.issues.length&&r.issues.push(...TK(a,d.issues)),r.value[s.value]=d.value)}return n.length?Promise.all(n).then(()=>r):r}}),Er=C5("$ZodEnum",(e,t)=>{Og.init(e,t);let r=Tq(t.entries),i=new Set(r);e._zod.values=i,e._zod.pattern=RegExp(`^(${r.filter(e=>TF.has(typeof e)).map(e=>"string"==typeof e?TL(e):e.toString()).join("|")})$`),e._zod.parse=(t,o)=>{let n=t.value;return i.has(n)||t.issues.push({code:"invalid_value",values:r,input:n,inst:e}),t}}),Ei=C5("$ZodLiteral",(e,t)=>{if(Og.init(e,t),0===t.values.length)throw Error("Cannot create literal schema with no valid values");let r=new Set(t.values);e._zod.values=r,e._zod.pattern=RegExp(`^(${t.values.map(e=>"string"==typeof e?TL(e):e?TL(e.toString()):String(e)).join("|")})$`),e._zod.parse=(i,o)=>{let n=i.value;return r.has(n)||i.issues.push({code:"invalid_value",values:t.values,input:n,inst:e}),i}}),Eo=C5("$ZodTransform",(e,t)=>{Og.init(e,t),e._zod.optin="optional",e._zod.parse=(r,i)=>{if("backward"===i.direction)throw new C7(e.constructor.name);let o=t.transform(r.value,r);if(i.async)return(o instanceof Promise?o:Promise.resolve(o)).then(e=>(r.value=e,r.fallback=!0,r));if(o instanceof Promise)throw new C8;return r.value=o,r.fallback=!0,r}});function En(e,t){return void 0===t&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}let Ea=C5("$ZodOptional",(e,t)=>{Og.init(e,t),e._zod.optin="optional",e._zod.optout="optional",TT(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),TT(e._zod,"pattern",()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${Tj(e.source)})?$`):void 0}),e._zod.parse=(e,r)=>{if("optional"===t.innerType._zod.optin){let i=e.value,o=t.innerType._zod.run(e,r);return o instanceof Promise?o.then(e=>En(e,i)):En(o,i)}return void 0===e.value?e:t.innerType._zod.run(e,r)}}),Es=C5("$ZodExactOptional",(e,t)=>{Ea.init(e,t),TT(e._zod,"values",()=>t.innerType._zod.values),TT(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(e,r)=>t.innerType._zod.run(e,r)}),Ed=C5("$ZodNullable",(e,t)=>{Og.init(e,t),TT(e._zod,"optin",()=>t.innerType._zod.optin),TT(e._zod,"optout",()=>t.innerType._zod.optout),TT(e._zod,"pattern",()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${Tj(e.source)}|null)$`):void 0}),TT(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,r)=>null===e.value?e:t.innerType._zod.run(e,r)}),Ec=C5("$ZodDefault",(e,t)=>{Og.init(e,t),e._zod.optin="optional",TT(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,r)=>{if("backward"===r.direction)return t.innerType._zod.run(e,r);if(void 0===e.value)return e.value=t.defaultValue,e;let i=t.innerType._zod.run(e,r);return i instanceof Promise?i.then(e=>El(e,t)):El(i,t)}});function El(e,t){return void 0===e.value&&(e.value=t.defaultValue),e}let Ep=C5("$ZodPrefault",(e,t)=>{Og.init(e,t),e._zod.optin="optional",TT(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,r)=>("backward"===r.direction||void 0===e.value&&(e.value=t.defaultValue),t.innerType._zod.run(e,r))}),Eu=C5("$ZodNonOptional",(e,t)=>{Og.init(e,t),TT(e._zod,"values",()=>{let e=t.innerType._zod.values;return e?new Set([...e].filter(e=>void 0!==e)):void 0}),e._zod.parse=(r,i)=>{let o=t.innerType._zod.run(r,i);return o instanceof Promise?o.then(t=>Em(t,e)):Em(o,e)}});function Em(e,t){return e.issues.length||void 0!==e.value||e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}let Ef=C5("$ZodCatch",(e,t)=>{Og.init(e,t),e._zod.optin="optional",TT(e._zod,"optout",()=>t.innerType._zod.optout),TT(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,r)=>{if("backward"===r.direction)return t.innerType._zod.run(e,r);let i=t.innerType._zod.run(e,r);return i instanceof Promise?i.then(i=>(e.value=i.value,i.issues.length&&(e.value=t.catchValue({...e,error:{issues:i.issues.map(e=>TZ(e,r,Tt()))},input:e.value}),e.issues=[],e.fallback=!0),e)):(e.value=i.value,i.issues.length&&(e.value=t.catchValue({...e,error:{issues:i.issues.map(e=>TZ(e,r,Tt()))},input:e.value}),e.issues=[],e.fallback=!0),e)}}),Eh=C5("$ZodPipe",(e,t)=>{Og.init(e,t),TT(e._zod,"values",()=>t.in._zod.values),TT(e._zod,"optin",()=>t.in._zod.optin),TT(e._zod,"optout",()=>t.out._zod.optout),TT(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(e,r)=>{if("backward"===r.direction){let i=t.out._zod.run(e,r);return i instanceof Promise?i.then(e=>Ey(e,t.in,r)):Ey(i,t.in,r)}let i=t.in._zod.run(e,r);return i instanceof Promise?i.then(e=>Ey(e,t.out,r)):Ey(i,t.out,r)}});function Ey(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},r)}let Eg=C5("$ZodReadonly",(e,t)=>{Og.init(e,t),TT(e._zod,"propValues",()=>t.innerType._zod.propValues),TT(e._zod,"values",()=>t.innerType._zod.values),TT(e._zod,"optin",()=>t.innerType?._zod?.optin),TT(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(e,r)=>{if("backward"===r.direction)return t.innerType._zod.run(e,r);let i=t.innerType._zod.run(e,r);return i instanceof Promise?i.then(E_):E_(i)}});function E_(e){return e.value=Object.freeze(e.value),e}let Ev=C5("$ZodCustom",(e,t)=>{TY.init(e,t),Og.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=r=>{let i=r.value,o=t.fn(i);if(o instanceof Promise)return o.then(t=>Eb(t,r,i,e));Eb(o,r,i,e)}});function Eb(e,t,r,i){if(!e){let e={code:"custom",input:r,inst:i,path:[...i._zod.def.path??[]],continue:!i._zod.def.abort};i._zod.def.params&&(e.params=i._zod.def.params),t.issues.push(TX(e))}}Symbol("ZodOutput"),Symbol("ZodInput");(ea=globalThis).__zod_globalRegistry??(ea.__zod_globalRegistry=new class e{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let r=t[0];return this._map.set(e,r),r&&"object"==typeof r&&"id"in r&&this._idmap.set(r.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&"object"==typeof t&&"id"in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let r={...this.get(t)??{}};delete r.id;let i={...r,...this._map.get(e)};return Object.keys(i).length?i:void 0}return this._map.get(e)}has(e){return this._map.has(e)}});let E$=globalThis.__zod_globalRegistry;function ES(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...TH(t)})}function Ek(e,t){return new T0({check:"less_than",...TH(t),value:e,inclusive:!1})}function Ew(e,t){return new T0({check:"less_than",...TH(t),value:e,inclusive:!0})}function EV(e,t){return new T2({check:"greater_than",...TH(t),value:e,inclusive:!1})}function EP(e,t){return new T2({check:"greater_than",...TH(t),value:e,inclusive:!0})}function ER(e,t){return new T4({check:"multiple_of",...TH(t),value:e})}function Eq(e,t){return new T3({check:"max_length",...TH(t),maximum:e})}function EI(e,t){return new T9({check:"min_length",...TH(t),minimum:e})}function Ex(e,t){return new T5({check:"length_equals",...TH(t),length:e})}function Ej(e){return new On({check:"overwrite",tx:e})}function EC(e){let t=e?.target??"draft-2020-12";return"draft-4"===t&&(t="draft-04"),"draft-7"===t&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??E$,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function ET(e,t,r={path:[],schemaPath:[]}){var i;let o=e._zod.def,n=t.seen.get(e);if(n)return n.count++,r.schemaPath.includes(e)&&(n.cycle=r.path),n.schema;let a={schema:{},count:1,cycle:void 0,path:r.path};t.seen.set(e,a);let s=e._zod.toJSONSchema?.();if(s)a.schema=s;else{let i={...r,schemaPath:[...r.schemaPath,e],path:r.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,a.schema,i);else{let r=a.schema,n=t.processors[o.type];if(!n)throw Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);n(e,t,r,i)}let n=e._zod.parent;n&&(a.ref||(a.ref=n),ET(n,t,i),t.seen.get(n).isParent=!0)}let d=t.metadataRegistry.get(e);return d&&Object.assign(a.schema,d),"input"===t.io&&function e(t,r){let i=r??{seen:new Set};if(i.seen.has(t))return!1;i.seen.add(t);let o=t._zod.def;if("transform"===o.type)return!0;if("array"===o.type)return e(o.element,i);if("set"===o.type)return e(o.valueType,i);if("lazy"===o.type)return e(o.getter(),i);if("promise"===o.type||"optional"===o.type||"nonoptional"===o.type||"nullable"===o.type||"readonly"===o.type||"default"===o.type||"prefault"===o.type)return e(o.innerType,i);if("intersection"===o.type)return e(o.left,i)||e(o.right,i);if("record"===o.type||"map"===o.type)return e(o.keyType,i)||e(o.valueType,i);if("pipe"===o.type)return!!t._zod.traits.has("$ZodCodec")||e(o.in,i)||e(o.out,i);if("object"===o.type){for(let t in o.shape)if(e(o.shape[t],i))return!0;return!1}if("union"===o.type){for(let t of o.options)if(e(t,i))return!0;return!1}if("tuple"===o.type){for(let t of o.items)if(e(t,i))return!0;if(o.rest&&e(o.rest,i))return!0}return!1}(e)&&(delete a.schema.examples,delete a.schema.default),"input"===t.io&&"_prefault"in a.schema&&((i=a.schema).default??(i.default=a.schema._prefault)),delete a.schema._prefault,t.seen.get(e).schema}function EO(e,t){let r=e.seen.get(t);if(!r)throw Error("Unprocessed schema. This is a bug in Zod.");let i=new Map;for(let t of e.seen.entries()){let r=e.metadataRegistry.get(t[0])?.id;if(r){let e=i.get(r);if(e&&e!==t[0])throw Error(`Duplicate schema id "${r}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);i.set(r,t[0])}}let o=t=>{if(t[1].schema.$ref)return;let i=t[1],{ref:o,defId:n}=(t=>{let i="draft-2020-12"===e.target?"$defs":"definitions";if(e.external){let r=e.external.registry.get(t[0])?.id,o=e.external.uri??(e=>e);if(r)return{ref:o(r)};let n=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=n,{defId:n,ref:`${o("__shared")}#/${i}/${n}`}}if(t[1]===r)return{ref:"#"};let o=`#/${i}/`,n=t[1].schema.id??`__schema${e.counter++}`;return{defId:n,ref:o+n}})(t);i.def={...i.schema},n&&(i.defId=n);let a=i.schema;for(let e in a)delete a[e];a.$ref=o};if("throw"===e.cycles)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join("/")}/ -Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let r of e.seen.entries()){let i=r[1];if(t===r[0]){o(r);continue}if(e.external){let i=e.external.registry.get(r[0])?.id;if(t!==r[0]&&i){o(r);continue}}if(e.metadataRegistry.get(r[0])?.id||i.cycle||i.count>1&&"ref"===e.reused){o(r);continue}}}function Ea(e,t){let r=e.seen.get(t);if(!r)throw Error("Unprocessed schema. This is a bug in Zod.");let i=t=>{let r=e.seen.get(t);if(null===r.ref)return;let o=r.def??r.schema,n={...o},a=r.ref;if(r.ref=null,a){i(a);let r=e.seen.get(a),s=r.schema;if(s.$ref&&("draft-07"===e.target||"draft-04"===e.target||"openapi-3.0"===e.target)?(o.allOf=o.allOf??[],o.allOf.push(s)):Object.assign(o,s),Object.assign(o,n),t._zod.parent===a)for(let e in o)"$ref"!==e&&"allOf"!==e&&(e in n||delete o[e]);if(s.$ref&&r.def)for(let e in o)"$ref"!==e&&"allOf"!==e&&e in r.def&&JSON.stringify(o[e])===JSON.stringify(r.def[e])&&delete o[e]}let s=t._zod.parent;if(s&&s!==a){i(s);let t=e.seen.get(s);if(t?.schema.$ref&&(o.$ref=t.schema.$ref,t.def))for(let e in o)"$ref"!==e&&"allOf"!==e&&e in t.def&&JSON.stringify(o[e])===JSON.stringify(t.def[e])&&delete o[e]}e.override({zodSchema:t,jsonSchema:o,path:r.path??[]})};for(let t of[...e.seen.entries()].reverse())i(t[0]);let o={};if("draft-2020-12"===e.target?o.$schema="https://json-schema.org/draft/2020-12/schema":"draft-07"===e.target?o.$schema="http://json-schema.org/draft-07/schema#":"draft-04"===e.target?o.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){let r=e.external.registry.get(t)?.id;if(!r)throw Error("Schema is missing an `id` property");o.$id=e.external.uri(r)}Object.assign(o,r.def??r.schema);let n=e.metadataRegistry.get(t)?.id;void 0!==n&&o.id===n&&delete o.id;let a=e.external?.defs??{};for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,a[e.defId]=e.def)}e.external||Object.keys(a).length>0&&("draft-2020-12"===e.target?o.$defs=a:o.definitions=a);try{let r=JSON.parse(JSON.stringify(o));return Object.defineProperty(r,"~standard",{value:{...t["~standard"],jsonSchema:{input:Es(t,"input",e.processors),output:Es(t,"output",e.processors)}},enumerable:!1,writable:!1}),r}catch(e){throw Error("Error converting schema to JSON.")}}let Es=(e,t,r={})=>i=>{let{libraryOptions:o,target:n}=i??{},a=Ei({...o??{},target:n,io:t,processors:r});return Eo(e,a),En(a,e),Ea(a,e)},Ed={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Ec=(e,t,r,i)=>{r.type="string";let{minimum:o,maximum:n,format:a,patterns:s,contentEncoding:d}=e._zod.bag;if("number"==typeof o&&(r.minLength=o),"number"==typeof n&&(r.maxLength=n),a&&(r.format=Ed[a]??a,""===r.format&&delete r.format,"time"===a&&delete r.format),d&&(r.contentEncoding=d),s&&s.size>0){let e=[...s];1===e.length?r.pattern=e[0].source:e.length>1&&(r.allOf=[...e.map(e=>({..."draft-07"===t.target||"draft-04"===t.target||"openapi-3.0"===t.target?{type:"string"}:{},pattern:e.source}))])}},El=(e,t,r,i)=>{let{minimum:o,maximum:n,format:a,multipleOf:s,exclusiveMaximum:d,exclusiveMinimum:c}=e._zod.bag;"string"==typeof a&&a.includes("int")?r.type="integer":r.type="number";let l="number"==typeof c&&c>=(o??-1/0),p="number"==typeof d&&d<=(n??1/0),u="draft-04"===t.target||"openapi-3.0"===t.target;l?u?(r.minimum=c,r.exclusiveMinimum=!0):r.exclusiveMinimum=c:"number"==typeof o&&(r.minimum=o),p?u?(r.maximum=d,r.exclusiveMaximum=!0):r.exclusiveMaximum=d:"number"==typeof n&&(r.maximum=n),"number"==typeof s&&(r.multipleOf=s)},Ep=(e,t,r,i)=>{r.type="boolean"},Eu=(e,t,r,i)=>{r.not={}},Em=(e,t,r,i)=>{},Ef=(e,t,r,i)=>{let o=C7(e._zod.def.entries);o.every(e=>"number"==typeof e)&&(r.type="number"),o.every(e=>"string"==typeof e)&&(r.type="string"),r.enum=o},Eh=(e,t,r,i)=>{let o=e._zod.def,n=[];for(let e of o.values)if(void 0===e){if("throw"===t.unrepresentable)throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if("bigint"==typeof e)if("throw"===t.unrepresentable)throw Error("BigInt literals cannot be represented in JSON Schema");else n.push(Number(e));else n.push(e);if(0===n.length);else if(1===n.length){let e=n[0];r.type=null===e?"null":typeof e,"draft-04"===t.target||"openapi-3.0"===t.target?r.enum=[e]:r.const=e}else n.every(e=>"number"==typeof e)&&(r.type="number"),n.every(e=>"string"==typeof e)&&(r.type="string"),n.every(e=>"boolean"==typeof e)&&(r.type="boolean"),n.every(e=>null===e)&&(r.type="null"),r.enum=n},Ey=(e,t,r,i)=>{if("throw"===t.unrepresentable)throw Error("Custom types cannot be represented in JSON Schema")},Eg=(e,t,r,i)=>{if("throw"===t.unrepresentable)throw Error("Transforms cannot be represented in JSON Schema")},E_=(e,t,r,i)=>{let o=e._zod.def,{minimum:n,maximum:a}=e._zod.bag;"number"==typeof n&&(r.minItems=n),"number"==typeof a&&(r.maxItems=a),r.type="array",r.items=Eo(o.element,t,{...i,path:[...i.path,"items"]})},Ev=(e,t,r,i)=>{let o=e._zod.def;r.type="object",r.properties={};let n=o.shape;for(let e in n)r.properties[e]=Eo(n[e],t,{...i,path:[...i.path,"properties",e]});let a=new Set([...new Set(Object.keys(n))].filter(e=>{let r=o.shape[e]._zod;return"input"===t.io?void 0===r.optin:void 0===r.optout}));a.size>0&&(r.required=Array.from(a)),o.catchall?._zod.def.type==="never"?r.additionalProperties=!1:o.catchall?o.catchall&&(r.additionalProperties=Eo(o.catchall,t,{...i,path:[...i.path,"additionalProperties"]})):"output"===t.io&&(r.additionalProperties=!1)},Eb=(e,t,r,i)=>{let o=e._zod.def,n=!1===o.inclusive,a=o.options.map((e,r)=>Eo(e,t,{...i,path:[...i.path,n?"oneOf":"anyOf",r]}));n?r.oneOf=a:r.anyOf=a},E$=(e,t,r,i)=>{let o=e._zod.def,n=Eo(o.left,t,{...i,path:[...i.path,"allOf",0]}),a=Eo(o.right,t,{...i,path:[...i.path,"allOf",1]}),s=e=>"allOf"in e&&1===Object.keys(e).length;r.allOf=[...s(n)?n.allOf:[n],...s(a)?a.allOf:[a]]},ES=(e,t,r,i)=>{let o=e._zod.def;r.type="array";let n="draft-2020-12"===t.target?"prefixItems":"items",a="draft-2020-12"===t.target||"openapi-3.0"===t.target?"items":"additionalItems",s=o.items.map((e,r)=>Eo(e,t,{...i,path:[...i.path,n,r]})),d=o.rest?Eo(o.rest,t,{...i,path:[...i.path,a,..."openapi-3.0"===t.target?[o.items.length]:[]]}):null;"draft-2020-12"===t.target?(r.prefixItems=s,d&&(r.items=d)):"openapi-3.0"===t.target?(r.items={anyOf:s},d&&r.items.anyOf.push(d),r.minItems=s.length,d||(r.maxItems=s.length)):(r.items=s,d&&(r.additionalItems=d));let{minimum:c,maximum:l}=e._zod.bag;"number"==typeof c&&(r.minItems=c),"number"==typeof l&&(r.maxItems=l)},Ek=(e,t,r,i)=>{let o=e._zod.def;r.type="object";let n=o.keyType,a=n._zod.bag,s=a?.patterns;if("loose"===o.mode&&s&&s.size>0){let e=Eo(o.valueType,t,{...i,path:[...i.path,"patternProperties","*"]});for(let t of(r.patternProperties={},s))r.patternProperties[t.source]=e}else("draft-07"===t.target||"draft-2020-12"===t.target)&&(r.propertyNames=Eo(o.keyType,t,{...i,path:[...i.path,"propertyNames"]})),r.additionalProperties=Eo(o.valueType,t,{...i,path:[...i.path,"additionalProperties"]});let d=n._zod.values;if(d){let e=[...d].filter(e=>"string"==typeof e||"number"==typeof e);e.length>0&&(r.required=e)}},Ew=(e,t,r,i)=>{let o=e._zod.def,n=Eo(o.innerType,t,i),a=t.seen.get(e);"openapi-3.0"===t.target?(a.ref=o.innerType,r.nullable=!0):r.anyOf=[n,{type:"null"}]},ER=(e,t,r,i)=>{let o=e._zod.def;Eo(o.innerType,t,i),t.seen.get(e).ref=o.innerType},EP=(e,t,r,i)=>{let o=e._zod.def;Eo(o.innerType,t,i),t.seen.get(e).ref=o.innerType,r.default=JSON.parse(JSON.stringify(o.defaultValue))},EV=(e,t,r,i)=>{let o=e._zod.def;Eo(o.innerType,t,i),t.seen.get(e).ref=o.innerType,"input"===t.io&&(r._prefault=JSON.parse(JSON.stringify(o.defaultValue)))},Eq=(e,t,r,i)=>{let o,n=e._zod.def;Eo(n.innerType,t,i),t.seen.get(e).ref=n.innerType;try{o=n.catchValue(void 0)}catch{throw Error("Dynamic catch values are not supported in JSON Schema")}r.default=o},EI=(e,t,r,i)=>{let o=e._zod.def,n=o.in._zod.traits.has("$ZodTransform"),a="input"===t.io?n?o.out:o.in:o.out;Eo(a,t,i),t.seen.get(e).ref=a},Ex=(e,t,r,i)=>{let o=e._zod.def;Eo(o.innerType,t,i),t.seen.get(e).ref=o.innerType,r.readOnly=!0},Ej=(e,t,r,i)=>{let o=e._zod.def;Eo(o.innerType,t,i),t.seen.get(e).ref=o.innerType},EC={string:Ec,number:El,boolean:Ep,bigint:(e,t,r,i)=>{if("throw"===t.unrepresentable)throw Error("BigInt cannot be represented in JSON Schema")},symbol:(e,t,r,i)=>{if("throw"===t.unrepresentable)throw Error("Symbols cannot be represented in JSON Schema")},null:(e,t,r,i)=>{"openapi-3.0"===t.target?(r.type="string",r.nullable=!0,r.enum=[null]):r.type="null"},undefined:(e,t,r,i)=>{if("throw"===t.unrepresentable)throw Error("Undefined cannot be represented in JSON Schema")},void:(e,t,r,i)=>{if("throw"===t.unrepresentable)throw Error("Void cannot be represented in JSON Schema")},never:Eu,any:(e,t,r,i)=>{},unknown:Em,date:(e,t,r,i)=>{if("throw"===t.unrepresentable)throw Error("Date cannot be represented in JSON Schema")},enum:Ef,literal:Eh,nan:(e,t,r,i)=>{if("throw"===t.unrepresentable)throw Error("NaN cannot be represented in JSON Schema")},template_literal:(e,t,r,i)=>{let o=e._zod.pattern;if(!o)throw Error("Pattern not found in template literal");r.type="string",r.pattern=o.source},file:(e,t,r,i)=>{let o={type:"string",format:"binary",contentEncoding:"binary"},{minimum:n,maximum:a,mime:s}=e._zod.bag;void 0!==n&&(o.minLength=n),void 0!==a&&(o.maxLength=a),s?1===s.length?(o.contentMediaType=s[0],Object.assign(r,o)):(Object.assign(r,o),r.anyOf=s.map(e=>({contentMediaType:e}))):Object.assign(r,o)},success:(e,t,r,i)=>{r.type="boolean"},custom:Ey,function:(e,t,r,i)=>{if("throw"===t.unrepresentable)throw Error("Function types cannot be represented in JSON Schema")},transform:Eg,map:(e,t,r,i)=>{if("throw"===t.unrepresentable)throw Error("Map cannot be represented in JSON Schema")},set:(e,t,r,i)=>{if("throw"===t.unrepresentable)throw Error("Set cannot be represented in JSON Schema")},array:E_,object:Ev,union:Eb,intersection:E$,tuple:ES,record:Ek,nullable:Ew,nonoptional:ER,default:EP,prefault:EV,catch:Eq,pipe:EI,readonly:Ex,promise:(e,t,r,i)=>{let o=e._zod.def;Eo(o.innerType,t,i),t.seen.get(e).ref=o.innerType},optional:Ej,lazy:(e,t,r,i)=>{let o=e._zod.innerType;Eo(o,t,i),t.seen.get(e).ref=o}},ET=CC("ZodISODateTime",(e,t)=>{Or.init(e,t),E2.init(e,t)}),EO=CC("ZodISODate",(e,t)=>{Oi.init(e,t),E2.init(e,t)}),EE=CC("ZodISOTime",(e,t)=>{Oo.init(e,t),E2.init(e,t)}),EA=CC("ZodISODuration",(e,t)=>{On.init(e,t),E2.init(e,t)}),EM=CC("ZodError",(e,t)=>{TL.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:t=>(function(e,t=e=>e.message){let r={_errors:[]},i=(e,o=[])=>{for(let n of e.issues)if("invalid_union"===n.code&&n.errors.length)n.errors.map(e=>i({issues:e},[...o,...n.path]));else if("invalid_key"===n.code)i({issues:n.issues},[...o,...n.path]);else if("invalid_element"===n.code)i({issues:n.issues},[...o,...n.path]);else{let e=[...o,...n.path];if(0===e.length)r._errors.push(t(n));else{let i=r,o=0;for(;o(function(e,t=e=>e.message){let r={},i=[];for(let o of e.issues)o.path.length>0?(r[o.path[0]]=r[o.path[0]]||[],r[o.path[0]].push(t(o))):i.push(t(o));return{formErrors:i,fieldErrors:r}})(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,Te,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,Te,2)}},isEmpty:{get:()=>0===e.issues.length}})},{Parent:Error}),EW=TH(EM),EN=TG(EM),Ez=TB(EM),ED=TJ(EM),EF=(e,t,r)=>{let i=r?{...r,direction:"backward"}:{direction:"backward"};return TH(EM)(e,t,i)},EL=(e,t,r)=>TH(EM)(e,t,r),EU=async(e,t,r)=>{let i=r?{...r,direction:"backward"}:{direction:"backward"};return TG(EM)(e,t,i)},EH=async(e,t,r)=>TG(EM)(e,t,r),EG=(e,t,r)=>{let i=r?{...r,direction:"backward"}:{direction:"backward"};return TB(EM)(e,t,i)},EB=(e,t,r)=>TB(EM)(e,t,r),EK=async(e,t,r)=>{let i=r?{...r,direction:"backward"}:{direction:"backward"};return TJ(EM)(e,t,i)},EJ=async(e,t,r)=>TJ(EM)(e,t,r),EZ=new WeakMap;function EQ(e,t,r){let i=Object.getPrototypeOf(e),o=EZ.get(i);if(o||(o=new Set,EZ.set(i,o)),!o.has(t))for(let e in o.add(t),r){let t=r[e];Object.defineProperty(i,e,{configurable:!0,enumerable:!1,get(){let r=t.bind(this);return Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:r}),r},set(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:t})}})}}let EX=CC("ZodType",(e,t)=>(TX.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Es(e,"input"),output:Es(e,"output")}}),e.toJSONSchema=((e,t={})=>r=>{let i=Ei({...r,processors:t});return Eo(e,i),En(i,e),Ea(i,e)})(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(t,r)=>EW(e,t,r,{callee:e.parse}),e.safeParse=(t,r)=>Ez(e,t,r),e.parseAsync=async(t,r)=>EN(e,t,r,{callee:e.parseAsync}),e.safeParseAsync=async(t,r)=>ED(e,t,r),e.spa=e.safeParseAsync,e.encode=(t,r)=>EF(e,t,r),e.decode=(t,r)=>EL(e,t,r),e.encodeAsync=async(t,r)=>EU(e,t,r),e.decodeAsync=async(t,r)=>EH(e,t,r),e.safeEncode=(t,r)=>EG(e,t,r),e.safeDecode=(t,r)=>EB(e,t,r),e.safeEncodeAsync=async(t,r)=>EK(e,t,r),e.safeDecodeAsync=async(t,r)=>EJ(e,t,r),EQ(e,"ZodType",{check(...e){let t=this.def;return this.clone(Ta(t,{checks:[...t.checks??[],...e.map(e=>"function"==typeof e?{_zod:{check:e,def:{check:"custom"},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return Th(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(function(e,t={}){return new AQ({type:"custom",check:"custom",fn:e,...Ty(t)})}(e,t))},superRefine(e,t){return this.check(function(e,t){var r;let i,o;return r=t=>(t.addIssue=e=>{"string"==typeof e?t.issues.push(Tk(e,t.value,i._zod.def)):(e.fatal&&(e.continue=!1),e.code??(e.code="custom"),e.input??(e.input=t.value),e.inst??(e.inst=i),e.continue??(e.continue=!i._zod.def.abort),t.issues.push(Tk(e)))},e(t.value,t)),(o=new Tw({check:"custom",...Ty(t)}))._zod.check=r,i=o}(e,t))},overwrite(e){return this.check(Er(e))},optional(){return Az(this)},exactOptional(){var e;return e=this,new AD({type:"optional",innerType:e})},nullable(){return AL(this)},nullish(){return Az(AL(this))},nonoptional(e){var t;return t=this,new AG({type:"nonoptional",innerType:t,...Ty(e)})},array(){return AS(this)},or(e){return AV([this,e])},and(e){var t;return t=this,new Ax({type:"intersection",left:t,right:e})},transform(e){return AJ(this,new AW({type:"transform",transform:e}))},default(e){var t,r;return t=this,r=e,new AU({type:"default",innerType:t,get defaultValue(){return"function"==typeof r?r():Tu(r)}})},prefault(e){var t,r;return t=this,r=e,new AH({type:"prefault",innerType:t,get defaultValue(){return"function"==typeof r?r():Tu(r)}})},catch(e){var t,r;return t=this,new AB({type:"catch",innerType:t,catchValue:"function"==typeof(r=e)?r:()=>r})},pipe(e){return AJ(this,e)},readonly(){var e;return e=this,new AZ({type:"readonly",innerType:e})},describe(e){let t=this.clone();return O2.add(t,{description:e}),t},meta(...e){if(0===e.length)return O2.get(this);let t=this.clone();return O2.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e){return e(this)}}),Object.defineProperty(e,"description",{get:()=>O2.get(e)?.description,configurable:!0}),e)),EY=CC("_ZodString",(e,t)=>{TY.init(e,t),EX.init(e,t),e._zod.processJSONSchema=(t,r,i)=>Ec(e,t,r,i);let r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,EQ(e,"_ZodString",{regex(...e){return this.check(function(e,t){return new TO({check:"string_format",format:"regex",...Ty(t),pattern:e})}(...e))},includes(...e){return this.check(function(e,t){return new TM({check:"string_format",format:"includes",...Ty(t),includes:e})}(...e))},startsWith(...e){return this.check(function(e,t){return new TW({check:"string_format",format:"starts_with",...Ty(t),prefix:e})}(...e))},endsWith(...e){return this.check(function(e,t){return new TN({check:"string_format",format:"ends_with",...Ty(t),suffix:e})}(...e))},min(...e){return this.check(Ee(...e))},max(...e){return this.check(O7(...e))},length(...e){return this.check(Et(...e))},nonempty(...e){return this.check(Ee(1,...e))},lowercase(e){return this.check(new TE({check:"string_format",format:"lowercase",...Ty(e)}))},uppercase(e){return this.check(new TA({check:"string_format",format:"uppercase",...Ty(e)}))},trim(){return this.check(Er(e=>e.trim()))},normalize(...e){return this.check(function(e){return Er(t=>t.normalize(e))}(...e))},toLowerCase(){return this.check(Er(e=>e.toLowerCase()))},toUpperCase(){return this.check(Er(e=>e.toUpperCase()))},slugify(){return this.check(Er(e=>e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")))}})}),E1=CC("ZodString",(e,t)=>{TY.init(e,t),EY.init(e,t),e.email=t=>e.check(new E4({type:"string",format:"email",check:"string_format",abort:!1,...Ty(t)})),e.url=t=>e.check(new E9({type:"string",format:"url",check:"string_format",abort:!1,...Ty(t)})),e.jwt=t=>e.check(new Ap({type:"string",format:"jwt",check:"string_format",abort:!1,...Ty(t)})),e.emoji=t=>e.check(new E5({type:"string",format:"emoji",check:"string_format",abort:!1,...Ty(t)})),e.guid=t=>e.check(O4(E6,t)),e.uuid=t=>e.check(new E3({type:"string",format:"uuid",check:"string_format",abort:!1,...Ty(t)})),e.uuidv4=t=>e.check(new E3({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Ty(t)})),e.uuidv6=t=>e.check(new E3({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Ty(t)})),e.uuidv7=t=>e.check(new E3({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Ty(t)})),e.nanoid=t=>e.check(new E8({type:"string",format:"nanoid",check:"string_format",abort:!1,...Ty(t)})),e.guid=t=>e.check(O4(E6,t)),e.cuid=t=>e.check(new E7({type:"string",format:"cuid",check:"string_format",abort:!1,...Ty(t)})),e.cuid2=t=>e.check(new Ae({type:"string",format:"cuid2",check:"string_format",abort:!1,...Ty(t)})),e.ulid=t=>e.check(new At({type:"string",format:"ulid",check:"string_format",abort:!1,...Ty(t)})),e.base64=t=>e.check(new Ad({type:"string",format:"base64",check:"string_format",abort:!1,...Ty(t)})),e.base64url=t=>e.check(new Ac({type:"string",format:"base64url",check:"string_format",abort:!1,...Ty(t)})),e.xid=t=>e.check(new Ar({type:"string",format:"xid",check:"string_format",abort:!1,...Ty(t)})),e.ksuid=t=>e.check(new Ai({type:"string",format:"ksuid",check:"string_format",abort:!1,...Ty(t)})),e.ipv4=t=>e.check(new Ao({type:"string",format:"ipv4",check:"string_format",abort:!1,...Ty(t)})),e.ipv6=t=>e.check(new An({type:"string",format:"ipv6",check:"string_format",abort:!1,...Ty(t)})),e.cidrv4=t=>e.check(new Aa({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Ty(t)})),e.cidrv6=t=>e.check(new As({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Ty(t)})),e.e164=t=>e.check(new Al({type:"string",format:"e164",check:"string_format",abort:!1,...Ty(t)})),e.datetime=t=>e.check(new ET({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...Ty(t)})),e.date=t=>e.check(new EO({type:"string",format:"date",check:"string_format",...Ty(t)})),e.time=t=>e.check(new EE({type:"string",format:"time",check:"string_format",precision:null,...Ty(t)})),e.duration=t=>e.check(new EA({type:"string",format:"duration",check:"string_format",...Ty(t)}))});function E0(e){return new E1({type:"string",...Ty(e)})}let E2=CC("ZodStringFormat",(e,t)=>{T1.init(e,t),EY.init(e,t)}),E4=CC("ZodEmail",(e,t)=>{T4.init(e,t),E2.init(e,t)}),E6=CC("ZodGUID",(e,t)=>{T0.init(e,t),E2.init(e,t)}),E3=CC("ZodUUID",(e,t)=>{T2.init(e,t),E2.init(e,t)}),E9=CC("ZodURL",(e,t)=>{T6.init(e,t),E2.init(e,t)}),E5=CC("ZodEmoji",(e,t)=>{T3.init(e,t),E2.init(e,t)}),E8=CC("ZodNanoID",(e,t)=>{T9.init(e,t),E2.init(e,t)}),E7=CC("ZodCUID",(e,t)=>{T5.init(e,t),E2.init(e,t)}),Ae=CC("ZodCUID2",(e,t)=>{T8.init(e,t),E2.init(e,t)}),At=CC("ZodULID",(e,t)=>{T7.init(e,t),E2.init(e,t)}),Ar=CC("ZodXID",(e,t)=>{Oe.init(e,t),E2.init(e,t)}),Ai=CC("ZodKSUID",(e,t)=>{Ot.init(e,t),E2.init(e,t)}),Ao=CC("ZodIPv4",(e,t)=>{Oa.init(e,t),E2.init(e,t)}),An=CC("ZodIPv6",(e,t)=>{Os.init(e,t),E2.init(e,t)}),Aa=CC("ZodCIDRv4",(e,t)=>{Od.init(e,t),E2.init(e,t)}),As=CC("ZodCIDRv6",(e,t)=>{Oc.init(e,t),E2.init(e,t)}),Ad=CC("ZodBase64",(e,t)=>{Op.init(e,t),E2.init(e,t)}),Ac=CC("ZodBase64URL",(e,t)=>{Ou.init(e,t),E2.init(e,t)}),Al=CC("ZodE164",(e,t)=>{Om.init(e,t),E2.init(e,t)}),Ap=CC("ZodJWT",(e,t)=>{Of.init(e,t),E2.init(e,t)}),Au=CC("ZodNumber",(e,t)=>{Oh.init(e,t),EX.init(e,t),e._zod.processJSONSchema=(t,r,i)=>El(e,t,r,i),EQ(e,"ZodNumber",{gt(e,t){return this.check(O9(e,t))},gte(e,t){return this.check(O5(e,t))},min(e,t){return this.check(O5(e,t))},lt(e,t){return this.check(O6(e,t))},lte(e,t){return this.check(O3(e,t))},max(e,t){return this.check(O3(e,t))},int(e){return this.check(Af(e))},safe(e){return this.check(Af(e))},positive(e){return this.check(O9(0,e))},nonnegative(e){return this.check(O5(0,e))},negative(e){return this.check(O6(0,e))},nonpositive(e){return this.check(O3(0,e))},multipleOf(e,t){return this.check(O8(e,t))},step(e,t){return this.check(O8(e,t))},finite(){return this}});let r=e._zod.bag;e.minValue=Math.max(r.minimum??-1/0,r.exclusiveMinimum??-1/0)??null,e.maxValue=Math.min(r.maximum??1/0,r.exclusiveMaximum??1/0)??null,e.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),e.isFinite=!0,e.format=r.format??null}),Am=CC("ZodNumberFormat",(e,t)=>{Oy.init(e,t),Au.init(e,t)});function Af(e){return new Am({type:"number",check:"number_format",abort:!1,format:"safeint",...Ty(e)})}let Ah=CC("ZodBoolean",(e,t)=>{Og.init(e,t),EX.init(e,t),e._zod.processJSONSchema=(t,r,i)=>Ep(e,t,r,i)});function Ay(e){return new Ah({type:"boolean",...Ty(e)})}let Ag=CC("ZodUnknown",(e,t)=>{O_.init(e,t),EX.init(e,t),e._zod.processJSONSchema=(t,r,i)=>Em(e,t,r,i)});function A_(){return new Ag({type:"unknown"})}let Av=CC("ZodNever",(e,t)=>{Ov.init(e,t),EX.init(e,t),e._zod.processJSONSchema=(t,r,i)=>Eu(e,t,r,i)});function Ab(e){return new Av({type:"never",...Ty(e)})}let A$=CC("ZodArray",(e,t)=>{O$.init(e,t),EX.init(e,t),e._zod.processJSONSchema=(t,r,i)=>E_(e,t,r,i),e.element=t.element,EQ(e,"ZodArray",{min(e,t){return this.check(Ee(e,t))},nonempty(e){return this.check(Ee(1,e))},max(e,t){return this.check(O7(e,t))},length(e,t){return this.check(Et(e,t))},unwrap(){return this.element}})});function AS(e,t){return new A$({type:"array",element:e,...Ty(t)})}let Ak=CC("ZodObject",(e,t)=>{OP.init(e,t),EX.init(e,t),e._zod.processJSONSchema=(t,r,i)=>Ev(e,t,r,i),To(e,"shape",()=>t.shape),EQ(e,"ZodObject",{keyof(){return AE(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:A_()})},loose(){return this.clone({...this._zod.def,catchall:A_()})},strict(){return this.clone({...this._zod.def,catchall:Ab()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(e){return function(e,t){if(!Tp(t))throw Error("Invalid input to extend: expected a plain object");let r=e._zod.def.checks;if(r&&r.length>0){let r=e._zod.def.shape;for(let e in t)if(void 0!==Object.getOwnPropertyDescriptor(r,e))throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let i=Ta(e._zod.def,{get shape(){let r={...e._zod.def.shape,...t};return Tn(this,"shape",r),r}});return Th(e,i)}(this,e)},safeExtend(e){var t=this;if(!Tp(e))throw Error("Invalid input to safeExtend: expected a plain object");let r=Ta(t._zod.def,{get shape(){let r={...t._zod.def.shape,...e};return Tn(this,"shape",r),r}});return Th(t,r)},merge(e){var t=this;if(t._zod.def.checks?.length)throw Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let r=Ta(t._zod.def,{get shape(){let r={...t._zod.def.shape,...e._zod.def.shape};return Tn(this,"shape",r),r},get catchall(){return e._zod.def.catchall},checks:e._zod.def.checks??[]});return Th(t,r)},pick(e){return function(e,t){let r=e._zod.def,i=r.checks;if(i&&i.length>0)throw Error(".pick() cannot be used on object schemas containing refinements");let o=Ta(e._zod.def,{get shape(){let e={};for(let i in t){if(!(i in r.shape))throw Error(`Unrecognized key: "${i}"`);t[i]&&(e[i]=r.shape[i])}return Tn(this,"shape",e),e},checks:[]});return Th(e,o)}(this,e)},omit(e){return function(e,t){let r=e._zod.def,i=r.checks;if(i&&i.length>0)throw Error(".omit() cannot be used on object schemas containing refinements");let o=Ta(e._zod.def,{get shape(){let i={...e._zod.def.shape};for(let e in t){if(!(e in r.shape))throw Error(`Unrecognized key: "${e}"`);t[e]&&delete i[e]}return Tn(this,"shape",i),i},checks:[]});return Th(e,o)}(this,e)},partial(...e){return function(e,t,r){let i=t._zod.def.checks;if(i&&i.length>0)throw Error(".partial() cannot be used on object schemas containing refinements");let o=Ta(t._zod.def,{get shape(){let i=t._zod.def.shape,o={...i};if(r)for(let t in r){if(!(t in i))throw Error(`Unrecognized key: "${t}"`);r[t]&&(o[t]=e?new e({type:"optional",innerType:i[t]}):i[t])}else for(let t in i)o[t]=e?new e({type:"optional",innerType:i[t]}):i[t];return Tn(this,"shape",o),o},checks:[]});return Th(t,o)}(AN,this,e[0])},required(...e){var t,r;let i;return t=this,r=e[0],i=Ta(t._zod.def,{get shape(){let e=t._zod.def.shape,i={...e};if(r)for(let t in r){if(!(t in i))throw Error(`Unrecognized key: "${t}"`);r[t]&&(i[t]=new AG({type:"nonoptional",innerType:e[t]}))}else for(let t in e)i[t]=new AG({type:"nonoptional",innerType:e[t]});return Tn(this,"shape",i),i}}),Th(t,i)}})});function Aw(e,t){return new Ak({type:"object",shape:e??{},...Ty(t)})}function AR(e,t){return new Ak({type:"object",shape:e,catchall:Ab(),...Ty(t)})}let AP=CC("ZodUnion",(e,t)=>{Oq.init(e,t),EX.init(e,t),e._zod.processJSONSchema=(t,r,i)=>Eb(e,t,r,i),e.options=t.options});function AV(e,t){return new AP({type:"union",options:e,...Ty(t)})}let Aq=CC("ZodDiscriminatedUnion",(e,t)=>{AP.init(e,t),OI.init(e,t)});function AI(e,t,r){return new Aq({type:"union",options:t,discriminator:e,...Ty(r)})}let Ax=CC("ZodIntersection",(e,t)=>{Ox.init(e,t),EX.init(e,t),e._zod.processJSONSchema=(t,r,i)=>E$(e,t,r,i)}),Aj=CC("ZodTuple",(e,t)=>{OC.init(e,t),EX.init(e,t),e._zod.processJSONSchema=(t,r,i)=>ES(e,t,r,i),e.rest=t=>e.clone({...e._zod.def,rest:t})}),AC=CC("ZodRecord",(e,t)=>{OA.init(e,t),EX.init(e,t),e._zod.processJSONSchema=(t,r,i)=>Ek(e,t,r,i),e.keyType=t.keyType,e.valueType=t.valueType});function AT(e,t,r){return new AC(t&&t._zod?{type:"record",keyType:e,valueType:t,...Ty(r)}:{type:"record",keyType:E0(),valueType:e,...Ty(t)})}let AO=CC("ZodEnum",(e,t)=>{OM.init(e,t),EX.init(e,t),e._zod.processJSONSchema=(t,r,i)=>Ef(e,t,r,i),e.enum=t.entries,e.options=Object.values(t.entries);let r=new Set(Object.keys(t.entries));e.extract=(e,i)=>{let o={};for(let i of e)if(r.has(i))o[i]=t.entries[i];else throw Error(`Key ${i} not found in enum`);return new AO({...t,checks:[],...Ty(i),entries:o})},e.exclude=(e,i)=>{let o={...t.entries};for(let t of e)if(r.has(t))delete o[t];else throw Error(`Key ${t} not found in enum`);return new AO({...t,checks:[],...Ty(i),entries:o})}});function AE(e,t){return new AO({type:"enum",entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...Ty(t)})}let AA=CC("ZodLiteral",(e,t)=>{OW.init(e,t),EX.init(e,t),e._zod.processJSONSchema=(t,r,i)=>Eh(e,t,r,i),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function AM(e,t){return new AA({type:"literal",values:Array.isArray(e)?e:[e],...Ty(t)})}let AW=CC("ZodTransform",(e,t)=>{ON.init(e,t),EX.init(e,t),e._zod.processJSONSchema=(t,r,i)=>Eg(e,t,r,i),e._zod.parse=(r,i)=>{if("backward"===i.direction)throw new CO(e.constructor.name);r.addIssue=i=>{"string"==typeof i?r.issues.push(Tk(i,r.value,t)):(i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=r.value),i.inst??(i.inst=e),r.issues.push(Tk(i)))};let o=t.transform(r.value,r);return o instanceof Promise?o.then(e=>(r.value=e,r.fallback=!0,r)):(r.value=o,r.fallback=!0,r)}}),AN=CC("ZodOptional",(e,t)=>{OD.init(e,t),EX.init(e,t),e._zod.processJSONSchema=(t,r,i)=>Ej(e,t,r,i),e.unwrap=()=>e._zod.def.innerType});function Az(e){return new AN({type:"optional",innerType:e})}let AD=CC("ZodExactOptional",(e,t)=>{OF.init(e,t),EX.init(e,t),e._zod.processJSONSchema=(t,r,i)=>Ej(e,t,r,i),e.unwrap=()=>e._zod.def.innerType}),AF=CC("ZodNullable",(e,t)=>{OL.init(e,t),EX.init(e,t),e._zod.processJSONSchema=(t,r,i)=>Ew(e,t,r,i),e.unwrap=()=>e._zod.def.innerType});function AL(e){return new AF({type:"nullable",innerType:e})}let AU=CC("ZodDefault",(e,t)=>{OU.init(e,t),EX.init(e,t),e._zod.processJSONSchema=(t,r,i)=>EP(e,t,r,i),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap}),AH=CC("ZodPrefault",(e,t)=>{OG.init(e,t),EX.init(e,t),e._zod.processJSONSchema=(t,r,i)=>EV(e,t,r,i),e.unwrap=()=>e._zod.def.innerType}),AG=CC("ZodNonOptional",(e,t)=>{OB.init(e,t),EX.init(e,t),e._zod.processJSONSchema=(t,r,i)=>ER(e,t,r,i),e.unwrap=()=>e._zod.def.innerType}),AB=CC("ZodCatch",(e,t)=>{OJ.init(e,t),EX.init(e,t),e._zod.processJSONSchema=(t,r,i)=>Eq(e,t,r,i),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap}),AK=CC("ZodPipe",(e,t)=>{OZ.init(e,t),EX.init(e,t),e._zod.processJSONSchema=(t,r,i)=>EI(e,t,r,i),e.in=t.in,e.out=t.out});function AJ(e,t){return new AK({type:"pipe",in:e,out:t})}let AZ=CC("ZodReadonly",(e,t)=>{OX.init(e,t),EX.init(e,t),e._zod.processJSONSchema=(t,r,i)=>Ex(e,t,r,i),e.unwrap=()=>e._zod.def.innerType}),AQ=CC("ZodCustom",(e,t)=>{O1.init(e,t),EX.init(e,t),e._zod.processJSONSchema=(t,r,i)=>Ey(e,t,r,i)});function AX(e){return encodeURI(e.replace(/~/g,"~0").replace(/\//g,"~1"))}let AY={prefixItems:!0,items:!0,allOf:!0,anyOf:!0,oneOf:!0},A1={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependentSchemas:!0},A0={id:!0,$id:!0,$ref:!0,$schema:!0,$anchor:!0,$vocabulary:!0,$comment:!0,default:!0,enum:!0,const:!0,required:!0,type:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0},A2="u">typeof self&&self.location&&"null"!==self.location.origin?new URL(self.location.origin+self.location.pathname+location.search):new URL("https://github.com/cfworker");function A4(e,t=Object.create(null),r=A2,i=""){if(e&&"object"==typeof e&&!Array.isArray(e)){let o=e.$id||e.id;if(o){let n=new URL(o,r.href);n.hash.length>1?t[n.href]=e:(n.hash="",""===i?r=n:A4(e,t,r))}}else if(!0!==e&&!1!==e)return t;let o=r.href+(i?"#"+i:"");if(void 0!==t[o])throw Error(`Duplicate schema URI "${o}".`);if(t[o]=e,!0===e||!1===e)return t;if(void 0===e.__absolute_uri__&&Object.defineProperty(e,"__absolute_uri__",{enumerable:!1,value:o}),e.$ref&&void 0===e.__absolute_ref__){let t=new URL(e.$ref,r.href);t.hash=t.hash,Object.defineProperty(e,"__absolute_ref__",{enumerable:!1,value:t.href})}if(e.$recursiveRef&&void 0===e.__absolute_recursive_ref__){let t=new URL(e.$recursiveRef,r.href);t.hash=t.hash,Object.defineProperty(e,"__absolute_recursive_ref__",{enumerable:!1,value:t.href})}for(let o in e.$anchor&&(t[new URL("#"+e.$anchor,r.href).href]=e),e){if(A0[o])continue;let n=`${i}/${AX(o)}`,a=e[o];if(Array.isArray(a)){if(AY[o]){let e=a.length;for(let i=0;ie.length>1&&e.length<80&&(/^P\d+([.,]\d+)?W$/.test(e)||/^P[\dYMDTHS]*(\d[.,]\d+)?[YMDHS]$/.test(e)&&/^P([.,\d]+Y)?([.,\d]+M)?([.,\d]+D)?(T([.,\d]+H)?([.,\d]+M)?([.,\d]+S)?)?$/.test(e)),uri:function(e){return Mr.test(e)&&Mi.test(e)},"uri-reference":A5(/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i),"uri-template":A5(/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i),url:A5(/^(?:(?:https?|ftp):\/\/)(?:\S+(?::\S*)?@)?(?:(?!10(?:\.\d{1,3}){3})(?!127(?:\.\d{1,3}){3})(?!169\.254(?:\.\d{1,3}){2})(?!192\.168(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)(?:\.(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu),email:e=>{if('"'===e[0])return!1;let[t,r,...i]=e.split("@");return!(!t||!r||0!==i.length||t.length>64||r.length>253||"."===t[0]||t.endsWith(".")||t.includes(".."))&&!!/^[a-z0-9.-]+$/i.test(r)&&!!/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+$/i.test(t)&&r.split(".").every(e=>/^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$/i.test(e))},hostname:A5(/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i),ipv4:A5(/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/),ipv6:A5(/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i),regex:function(e){if(Mo.test(e))return!1;try{return RegExp(e,"u"),!0}catch(e){return!1}},uuid:A5(/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i),"json-pointer":A5(/^(?:\/(?:[^~/]|~0|~1)*)*$/),"json-pointer-uri-fragment":A5(/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i),"relative-json-pointer":A5(/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/)};function A7(e){var t;let r=e.match(A6);if(!r)return!1;let i=+r[1],o=+r[2],n=+r[3];return o>=1&&o<=12&&n>=1&&n<=(2==o&&(t=i)%4==0&&(t%100!=0||t%400==0)?29:A3[o])}function Me(e,t){let r=t.match(A9);if(!r)return!1;let i=+r[1],o=+r[2],n=+r[3],a=!!r[5];return(i<=23&&o<=59&&n<=59||23==i&&59==o&&60==n)&&(!e||a)}let Mt=/t|\s/i,Mr=/\/|:/,Mi=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,Mo=/[^\\]\\Z/;function Mn(e,t){let r=typeof e;if(r!==typeof t)return!1;if(Array.isArray(e)){if(!Array.isArray(t))return!1;let r=e.length;if(r!==t.length)return!1;for(let i=0;i1&&"ref"===e.reused){o(r);continue}}}function EE(e,t){let r=e.seen.get(t);if(!r)throw Error("Unprocessed schema. This is a bug in Zod.");let i=t=>{let r=e.seen.get(t);if(null===r.ref)return;let o=r.def??r.schema,n={...o},a=r.ref;if(r.ref=null,a){i(a);let r=e.seen.get(a),s=r.schema;if(s.$ref&&("draft-07"===e.target||"draft-04"===e.target||"openapi-3.0"===e.target)?(o.allOf=o.allOf??[],o.allOf.push(s)):Object.assign(o,s),Object.assign(o,n),t._zod.parent===a)for(let e in o)"$ref"!==e&&"allOf"!==e&&(e in n||delete o[e]);if(s.$ref&&r.def)for(let e in o)"$ref"!==e&&"allOf"!==e&&e in r.def&&JSON.stringify(o[e])===JSON.stringify(r.def[e])&&delete o[e]}let s=t._zod.parent;if(s&&s!==a){i(s);let t=e.seen.get(s);if(t?.schema.$ref&&(o.$ref=t.schema.$ref,t.def))for(let e in o)"$ref"!==e&&"allOf"!==e&&e in t.def&&JSON.stringify(o[e])===JSON.stringify(t.def[e])&&delete o[e]}e.override({zodSchema:t,jsonSchema:o,path:r.path??[]})};for(let t of[...e.seen.entries()].reverse())i(t[0]);let o={};if("draft-2020-12"===e.target?o.$schema="https://json-schema.org/draft/2020-12/schema":"draft-07"===e.target?o.$schema="http://json-schema.org/draft-07/schema#":"draft-04"===e.target?o.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){let r=e.external.registry.get(t)?.id;if(!r)throw Error("Schema is missing an `id` property");o.$id=e.external.uri(r)}Object.assign(o,r.def??r.schema);let n=e.metadataRegistry.get(t)?.id;void 0!==n&&o.id===n&&delete o.id;let a=e.external?.defs??{};for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,a[e.defId]=e.def)}e.external||Object.keys(a).length>0&&("draft-2020-12"===e.target?o.$defs=a:o.definitions=a);try{let r=JSON.parse(JSON.stringify(o));return Object.defineProperty(r,"~standard",{value:{...t["~standard"],jsonSchema:{input:EA(t,"input",e.processors),output:EA(t,"output",e.processors)}},enumerable:!1,writable:!1}),r}catch(e){throw Error("Error converting schema to JSON.")}}let EA=(e,t,r={})=>i=>{let{libraryOptions:o,target:n}=i??{},a=EC({...o??{},target:n,io:t,processors:r});return ET(e,a),EO(a,e),EE(a,e)},EW={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},EM=(e,t,r,i)=>{r.type="string";let{minimum:o,maximum:n,format:a,patterns:s,contentEncoding:d}=e._zod.bag;if("number"==typeof o&&(r.minLength=o),"number"==typeof n&&(r.maxLength=n),a&&(r.format=EW[a]??a,""===r.format&&delete r.format,"time"===a&&delete r.format),d&&(r.contentEncoding=d),s&&s.size>0){let e=[...s];1===e.length?r.pattern=e[0].source:e.length>1&&(r.allOf=[...e.map(e=>({..."draft-07"===t.target||"draft-04"===t.target||"openapi-3.0"===t.target?{type:"string"}:{},pattern:e.source}))])}},EN=(e,t,r,i)=>{let{minimum:o,maximum:n,format:a,multipleOf:s,exclusiveMaximum:d,exclusiveMinimum:c}=e._zod.bag;"string"==typeof a&&a.includes("int")?r.type="integer":r.type="number";let l="number"==typeof c&&c>=(o??-1/0),p="number"==typeof d&&d<=(n??1/0),u="draft-04"===t.target||"openapi-3.0"===t.target;l?u?(r.minimum=c,r.exclusiveMinimum=!0):r.exclusiveMinimum=c:"number"==typeof o&&(r.minimum=o),p?u?(r.maximum=d,r.exclusiveMaximum=!0):r.exclusiveMaximum=d:"number"==typeof n&&(r.maximum=n),"number"==typeof s&&(r.multipleOf=s)},Ez=(e,t,r,i)=>{r.type="boolean"},ED=(e,t,r,i)=>{r.not={}},EF=(e,t,r,i)=>{},EL=(e,t,r,i)=>{let o=Tq(e._zod.def.entries);o.every(e=>"number"==typeof e)&&(r.type="number"),o.every(e=>"string"==typeof e)&&(r.type="string"),r.enum=o},EU=(e,t,r,i)=>{let o=e._zod.def,n=[];for(let e of o.values)if(void 0===e){if("throw"===t.unrepresentable)throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if("bigint"==typeof e)if("throw"===t.unrepresentable)throw Error("BigInt literals cannot be represented in JSON Schema");else n.push(Number(e));else n.push(e);if(0===n.length);else if(1===n.length){let e=n[0];r.type=null===e?"null":typeof e,"draft-04"===t.target||"openapi-3.0"===t.target?r.enum=[e]:r.const=e}else n.every(e=>"number"==typeof e)&&(r.type="number"),n.every(e=>"string"==typeof e)&&(r.type="string"),n.every(e=>"boolean"==typeof e)&&(r.type="boolean"),n.every(e=>null===e)&&(r.type="null"),r.enum=n},EH=(e,t,r,i)=>{if("throw"===t.unrepresentable)throw Error("Custom types cannot be represented in JSON Schema")},EG=(e,t,r,i)=>{if("throw"===t.unrepresentable)throw Error("Transforms cannot be represented in JSON Schema")},EB=(e,t,r,i)=>{let o=e._zod.def,{minimum:n,maximum:a}=e._zod.bag;"number"==typeof n&&(r.minItems=n),"number"==typeof a&&(r.maxItems=a),r.type="array",r.items=ET(o.element,t,{...i,path:[...i.path,"items"]})},EK=(e,t,r,i)=>{let o=e._zod.def;r.type="object",r.properties={};let n=o.shape;for(let e in n)r.properties[e]=ET(n[e],t,{...i,path:[...i.path,"properties",e]});let a=new Set([...new Set(Object.keys(n))].filter(e=>{let r=o.shape[e]._zod;return"input"===t.io?void 0===r.optin:void 0===r.optout}));a.size>0&&(r.required=Array.from(a)),o.catchall?._zod.def.type==="never"?r.additionalProperties=!1:o.catchall?o.catchall&&(r.additionalProperties=ET(o.catchall,t,{...i,path:[...i.path,"additionalProperties"]})):"output"===t.io&&(r.additionalProperties=!1)},EJ=(e,t,r,i)=>{let o=e._zod.def,n=!1===o.inclusive,a=o.options.map((e,r)=>ET(e,t,{...i,path:[...i.path,n?"oneOf":"anyOf",r]}));n?r.oneOf=a:r.anyOf=a},EZ=(e,t,r,i)=>{let o=e._zod.def,n=ET(o.left,t,{...i,path:[...i.path,"allOf",0]}),a=ET(o.right,t,{...i,path:[...i.path,"allOf",1]}),s=e=>"allOf"in e&&1===Object.keys(e).length;r.allOf=[...s(n)?n.allOf:[n],...s(a)?a.allOf:[a]]},EQ=(e,t,r,i)=>{let o=e._zod.def;r.type="array";let n="draft-2020-12"===t.target?"prefixItems":"items",a="draft-2020-12"===t.target||"openapi-3.0"===t.target?"items":"additionalItems",s=o.items.map((e,r)=>ET(e,t,{...i,path:[...i.path,n,r]})),d=o.rest?ET(o.rest,t,{...i,path:[...i.path,a,..."openapi-3.0"===t.target?[o.items.length]:[]]}):null;"draft-2020-12"===t.target?(r.prefixItems=s,d&&(r.items=d)):"openapi-3.0"===t.target?(r.items={anyOf:s},d&&r.items.anyOf.push(d),r.minItems=s.length,d||(r.maxItems=s.length)):(r.items=s,d&&(r.additionalItems=d));let{minimum:c,maximum:l}=e._zod.bag;"number"==typeof c&&(r.minItems=c),"number"==typeof l&&(r.maxItems=l)},EX=(e,t,r,i)=>{let o=e._zod.def;r.type="object";let n=o.keyType,a=n._zod.bag,s=a?.patterns;if("loose"===o.mode&&s&&s.size>0){let e=ET(o.valueType,t,{...i,path:[...i.path,"patternProperties","*"]});for(let t of(r.patternProperties={},s))r.patternProperties[t.source]=e}else("draft-07"===t.target||"draft-2020-12"===t.target)&&(r.propertyNames=ET(o.keyType,t,{...i,path:[...i.path,"propertyNames"]})),r.additionalProperties=ET(o.valueType,t,{...i,path:[...i.path,"additionalProperties"]});let d=n._zod.values;if(d){let e=[...d].filter(e=>"string"==typeof e||"number"==typeof e);e.length>0&&(r.required=e)}},EY=(e,t,r,i)=>{let o=e._zod.def,n=ET(o.innerType,t,i),a=t.seen.get(e);"openapi-3.0"===t.target?(a.ref=o.innerType,r.nullable=!0):r.anyOf=[n,{type:"null"}]},E1=(e,t,r,i)=>{let o=e._zod.def;ET(o.innerType,t,i),t.seen.get(e).ref=o.innerType},E0=(e,t,r,i)=>{let o=e._zod.def;ET(o.innerType,t,i),t.seen.get(e).ref=o.innerType,r.default=JSON.parse(JSON.stringify(o.defaultValue))},E2=(e,t,r,i)=>{let o=e._zod.def;ET(o.innerType,t,i),t.seen.get(e).ref=o.innerType,"input"===t.io&&(r._prefault=JSON.parse(JSON.stringify(o.defaultValue)))},E4=(e,t,r,i)=>{let o,n=e._zod.def;ET(n.innerType,t,i),t.seen.get(e).ref=n.innerType;try{o=n.catchValue(void 0)}catch{throw Error("Dynamic catch values are not supported in JSON Schema")}r.default=o},E6=(e,t,r,i)=>{let o=e._zod.def,n=o.in._zod.traits.has("$ZodTransform"),a="input"===t.io?n?o.out:o.in:o.out;ET(a,t,i),t.seen.get(e).ref=a},E3=(e,t,r,i)=>{let o=e._zod.def;ET(o.innerType,t,i),t.seen.get(e).ref=o.innerType,r.readOnly=!0},E9=(e,t,r,i)=>{let o=e._zod.def;ET(o.innerType,t,i),t.seen.get(e).ref=o.innerType},E5={string:EM,number:EN,boolean:Ez,bigint:(e,t,r,i)=>{if("throw"===t.unrepresentable)throw Error("BigInt cannot be represented in JSON Schema")},symbol:(e,t,r,i)=>{if("throw"===t.unrepresentable)throw Error("Symbols cannot be represented in JSON Schema")},null:(e,t,r,i)=>{"openapi-3.0"===t.target?(r.type="string",r.nullable=!0,r.enum=[null]):r.type="null"},undefined:(e,t,r,i)=>{if("throw"===t.unrepresentable)throw Error("Undefined cannot be represented in JSON Schema")},void:(e,t,r,i)=>{if("throw"===t.unrepresentable)throw Error("Void cannot be represented in JSON Schema")},never:ED,any:(e,t,r,i)=>{},unknown:EF,date:(e,t,r,i)=>{if("throw"===t.unrepresentable)throw Error("Date cannot be represented in JSON Schema")},enum:EL,literal:EU,nan:(e,t,r,i)=>{if("throw"===t.unrepresentable)throw Error("NaN cannot be represented in JSON Schema")},template_literal:(e,t,r,i)=>{let o=e._zod.pattern;if(!o)throw Error("Pattern not found in template literal");r.type="string",r.pattern=o.source},file:(e,t,r,i)=>{let o={type:"string",format:"binary",contentEncoding:"binary"},{minimum:n,maximum:a,mime:s}=e._zod.bag;void 0!==n&&(o.minLength=n),void 0!==a&&(o.maxLength=a),s?1===s.length?(o.contentMediaType=s[0],Object.assign(r,o)):(Object.assign(r,o),r.anyOf=s.map(e=>({contentMediaType:e}))):Object.assign(r,o)},success:(e,t,r,i)=>{r.type="boolean"},custom:EH,function:(e,t,r,i)=>{if("throw"===t.unrepresentable)throw Error("Function types cannot be represented in JSON Schema")},transform:EG,map:(e,t,r,i)=>{if("throw"===t.unrepresentable)throw Error("Map cannot be represented in JSON Schema")},set:(e,t,r,i)=>{if("throw"===t.unrepresentable)throw Error("Set cannot be represented in JSON Schema")},array:EB,object:EK,union:EJ,intersection:EZ,tuple:EQ,record:EX,nullable:EY,nonoptional:E1,default:E0,prefault:E2,catch:E4,pipe:E6,readonly:E3,promise:(e,t,r,i)=>{let o=e._zod.def;ET(o.innerType,t,i),t.seen.get(e).ref=o.innerType},optional:E9,lazy:(e,t,r,i)=>{let o=e._zod.innerType;ET(o,t,i),t.seen.get(e).ref=o}},E8=C5("ZodISODateTime",(e,t)=>{Oj.init(e,t),A$.init(e,t)}),E7=C5("ZodISODate",(e,t)=>{OC.init(e,t),A$.init(e,t)}),Ae=C5("ZodISOTime",(e,t)=>{OT.init(e,t),A$.init(e,t)}),At=C5("ZodISODuration",(e,t)=>{OO.init(e,t),A$.init(e,t)}),Ar=C5("ZodError",(e,t)=>{Od.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:t=>(function(e,t=e=>e.message){let r={_errors:[]},i=(e,o=[])=>{for(let n of e.issues)if("invalid_union"===n.code&&n.errors.length)n.errors.map(e=>i({issues:e},[...o,...n.path]));else if("invalid_key"===n.code)i({issues:n.issues},[...o,...n.path]);else if("invalid_element"===n.code)i({issues:n.issues},[...o,...n.path]);else{let e=[...o,...n.path];if(0===e.length)r._errors.push(t(n));else{let i=r,o=0;for(;o(function(e,t=e=>e.message){let r={},i=[];for(let o of e.issues)o.path.length>0?(r[o.path[0]]=r[o.path[0]]||[],r[o.path[0]].push(t(o))):i.push(t(o));return{formErrors:i,fieldErrors:r}})(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,TI,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,TI,2)}},isEmpty:{get:()=>0===e.issues.length}})},{Parent:Error}),Ai=Ol(Ar),Ao=Op(Ar),An=Ou(Ar),Aa=Of(Ar),As=(e,t,r)=>{let i=r?{...r,direction:"backward"}:{direction:"backward"};return Ol(Ar)(e,t,i)},Ad=(e,t,r)=>Ol(Ar)(e,t,r),Ac=async(e,t,r)=>{let i=r?{...r,direction:"backward"}:{direction:"backward"};return Op(Ar)(e,t,i)},Al=async(e,t,r)=>Op(Ar)(e,t,r),Ap=(e,t,r)=>{let i=r?{...r,direction:"backward"}:{direction:"backward"};return Ou(Ar)(e,t,i)},Au=(e,t,r)=>Ou(Ar)(e,t,r),Am=async(e,t,r)=>{let i=r?{...r,direction:"backward"}:{direction:"backward"};return Of(Ar)(e,t,i)},Af=async(e,t,r)=>Of(Ar)(e,t,r),Ah=new WeakMap;function Ay(e,t,r){let i=Object.getPrototypeOf(e),o=Ah.get(i);if(o||(o=new Set,Ah.set(i,o)),!o.has(t))for(let e in o.add(t),r){let t=r[e];Object.defineProperty(i,e,{configurable:!0,enumerable:!1,get(){let r=t.bind(this);return Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:r}),r},set(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:t})}})}}let Ag=C5("ZodType",(e,t)=>(Og.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:EA(e,"input"),output:EA(e,"output")}}),e.toJSONSchema=((e,t={})=>r=>{let i=EC({...r,processors:t});return ET(e,i),EO(i,e),EE(i,e)})(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(t,r)=>Ai(e,t,r,{callee:e.parse}),e.safeParse=(t,r)=>An(e,t,r),e.parseAsync=async(t,r)=>Ao(e,t,r,{callee:e.parseAsync}),e.safeParseAsync=async(t,r)=>Aa(e,t,r),e.spa=e.safeParseAsync,e.encode=(t,r)=>As(e,t,r),e.decode=(t,r)=>Ad(e,t,r),e.encodeAsync=async(t,r)=>Ac(e,t,r),e.decodeAsync=async(t,r)=>Al(e,t,r),e.safeEncode=(t,r)=>Ap(e,t,r),e.safeDecode=(t,r)=>Au(e,t,r),e.safeEncodeAsync=async(t,r)=>Am(e,t,r),e.safeDecodeAsync=async(t,r)=>Af(e,t,r),Ay(e,"ZodType",{check(...e){let t=this.def;return this.clone(TE(t,{checks:[...t.checks??[],...e.map(e=>"function"==typeof e?{_zod:{check:e,def:{check:"custom"},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return TU(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(function(e,t={}){return new Wy({type:"custom",check:"custom",fn:e,...TH(t)})}(e,t))},superRefine(e,t){return this.check(function(e,t){var r;let i,o;return r=t=>(t.addIssue=e=>{"string"==typeof e?t.issues.push(TX(e,t.value,i._zod.def)):(e.fatal&&(e.continue=!1),e.code??(e.code="custom"),e.input??(e.input=t.value),e.inst??(e.inst=i),e.continue??(e.continue=!i._zod.def.abort),t.issues.push(TX(e)))},e(t.value,t)),(o=new TY({check:"custom",...TH(t)}))._zod.check=r,i=o}(e,t))},overwrite(e){return this.check(Ej(e))},optional(){return Wn(this)},exactOptional(){var e;return e=this,new Wa({type:"optional",innerType:e})},nullable(){return Wd(this)},nullish(){return Wn(Wd(this))},nonoptional(e){var t;return t=this,new Wp({type:"nonoptional",innerType:t,...TH(e)})},array(){return AQ(this)},or(e){return A2([this,e])},and(e){var t;return t=this,new A3({type:"intersection",left:t,right:e})},transform(e){return Wf(this,new Wi({type:"transform",transform:e}))},default(e){var t,r;return t=this,r=e,new Wc({type:"default",innerType:t,get defaultValue(){return"function"==typeof r?r():TD(r)}})},prefault(e){var t,r;return t=this,r=e,new Wl({type:"prefault",innerType:t,get defaultValue(){return"function"==typeof r?r():TD(r)}})},catch(e){var t,r;return t=this,new Wu({type:"catch",innerType:t,catchValue:"function"==typeof(r=e)?r:()=>r})},pipe(e){return Wf(this,e)},readonly(){var e;return e=this,new Wh({type:"readonly",innerType:e})},describe(e){let t=this.clone();return E$.add(t,{description:e}),t},meta(...e){if(0===e.length)return E$.get(this);let t=this.clone();return E$.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e){return e(this)}}),Object.defineProperty(e,"description",{get:()=>E$.get(e)?.description,configurable:!0}),e)),A_=C5("_ZodString",(e,t)=>{O_.init(e,t),Ag.init(e,t),e._zod.processJSONSchema=(t,r,i)=>EM(e,t,r,i);let r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,Ay(e,"_ZodString",{regex(...e){return this.check(function(e,t){return new T7({check:"string_format",format:"regex",...TH(t),pattern:e})}(...e))},includes(...e){return this.check(function(e,t){return new Or({check:"string_format",format:"includes",...TH(t),includes:e})}(...e))},startsWith(...e){return this.check(function(e,t){return new Oi({check:"string_format",format:"starts_with",...TH(t),prefix:e})}(...e))},endsWith(...e){return this.check(function(e,t){return new Oo({check:"string_format",format:"ends_with",...TH(t),suffix:e})}(...e))},min(...e){return this.check(EI(...e))},max(...e){return this.check(Eq(...e))},length(...e){return this.check(Ex(...e))},nonempty(...e){return this.check(EI(1,...e))},lowercase(e){return this.check(new Oe({check:"string_format",format:"lowercase",...TH(e)}))},uppercase(e){return this.check(new Ot({check:"string_format",format:"uppercase",...TH(e)}))},trim(){return this.check(Ej(e=>e.trim()))},normalize(...e){return this.check(function(e){return Ej(t=>t.normalize(e))}(...e))},toLowerCase(){return this.check(Ej(e=>e.toLowerCase()))},toUpperCase(){return this.check(Ej(e=>e.toUpperCase()))},slugify(){return this.check(Ej(e=>e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")))}})}),Av=C5("ZodString",(e,t)=>{O_.init(e,t),A_.init(e,t),e.email=t=>e.check(new AS({type:"string",format:"email",check:"string_format",abort:!1,...TH(t)})),e.url=t=>e.check(new AV({type:"string",format:"url",check:"string_format",abort:!1,...TH(t)})),e.jwt=t=>e.check(new Az({type:"string",format:"jwt",check:"string_format",abort:!1,...TH(t)})),e.emoji=t=>e.check(new AP({type:"string",format:"emoji",check:"string_format",abort:!1,...TH(t)})),e.guid=t=>e.check(ES(Ak,t)),e.uuid=t=>e.check(new Aw({type:"string",format:"uuid",check:"string_format",abort:!1,...TH(t)})),e.uuidv4=t=>e.check(new Aw({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...TH(t)})),e.uuidv6=t=>e.check(new Aw({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...TH(t)})),e.uuidv7=t=>e.check(new Aw({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...TH(t)})),e.nanoid=t=>e.check(new AR({type:"string",format:"nanoid",check:"string_format",abort:!1,...TH(t)})),e.guid=t=>e.check(ES(Ak,t)),e.cuid=t=>e.check(new Aq({type:"string",format:"cuid",check:"string_format",abort:!1,...TH(t)})),e.cuid2=t=>e.check(new AI({type:"string",format:"cuid2",check:"string_format",abort:!1,...TH(t)})),e.ulid=t=>e.check(new Ax({type:"string",format:"ulid",check:"string_format",abort:!1,...TH(t)})),e.base64=t=>e.check(new AW({type:"string",format:"base64",check:"string_format",abort:!1,...TH(t)})),e.base64url=t=>e.check(new AM({type:"string",format:"base64url",check:"string_format",abort:!1,...TH(t)})),e.xid=t=>e.check(new Aj({type:"string",format:"xid",check:"string_format",abort:!1,...TH(t)})),e.ksuid=t=>e.check(new AC({type:"string",format:"ksuid",check:"string_format",abort:!1,...TH(t)})),e.ipv4=t=>e.check(new AT({type:"string",format:"ipv4",check:"string_format",abort:!1,...TH(t)})),e.ipv6=t=>e.check(new AO({type:"string",format:"ipv6",check:"string_format",abort:!1,...TH(t)})),e.cidrv4=t=>e.check(new AE({type:"string",format:"cidrv4",check:"string_format",abort:!1,...TH(t)})),e.cidrv6=t=>e.check(new AA({type:"string",format:"cidrv6",check:"string_format",abort:!1,...TH(t)})),e.e164=t=>e.check(new AN({type:"string",format:"e164",check:"string_format",abort:!1,...TH(t)})),e.datetime=t=>e.check(new E8({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...TH(t)})),e.date=t=>e.check(new E7({type:"string",format:"date",check:"string_format",...TH(t)})),e.time=t=>e.check(new Ae({type:"string",format:"time",check:"string_format",precision:null,...TH(t)})),e.duration=t=>e.check(new At({type:"string",format:"duration",check:"string_format",...TH(t)}))});function Ab(e){return new Av({type:"string",...TH(e)})}let A$=C5("ZodStringFormat",(e,t)=>{Ov.init(e,t),A_.init(e,t)}),AS=C5("ZodEmail",(e,t)=>{OS.init(e,t),A$.init(e,t)}),Ak=C5("ZodGUID",(e,t)=>{Ob.init(e,t),A$.init(e,t)}),Aw=C5("ZodUUID",(e,t)=>{O$.init(e,t),A$.init(e,t)}),AV=C5("ZodURL",(e,t)=>{Ok.init(e,t),A$.init(e,t)}),AP=C5("ZodEmoji",(e,t)=>{Ow.init(e,t),A$.init(e,t)}),AR=C5("ZodNanoID",(e,t)=>{OV.init(e,t),A$.init(e,t)}),Aq=C5("ZodCUID",(e,t)=>{OP.init(e,t),A$.init(e,t)}),AI=C5("ZodCUID2",(e,t)=>{OR.init(e,t),A$.init(e,t)}),Ax=C5("ZodULID",(e,t)=>{Oq.init(e,t),A$.init(e,t)}),Aj=C5("ZodXID",(e,t)=>{OI.init(e,t),A$.init(e,t)}),AC=C5("ZodKSUID",(e,t)=>{Ox.init(e,t),A$.init(e,t)}),AT=C5("ZodIPv4",(e,t)=>{OE.init(e,t),A$.init(e,t)}),AO=C5("ZodIPv6",(e,t)=>{OA.init(e,t),A$.init(e,t)}),AE=C5("ZodCIDRv4",(e,t)=>{OW.init(e,t),A$.init(e,t)}),AA=C5("ZodCIDRv6",(e,t)=>{OM.init(e,t),A$.init(e,t)}),AW=C5("ZodBase64",(e,t)=>{Oz.init(e,t),A$.init(e,t)}),AM=C5("ZodBase64URL",(e,t)=>{OD.init(e,t),A$.init(e,t)}),AN=C5("ZodE164",(e,t)=>{OF.init(e,t),A$.init(e,t)}),Az=C5("ZodJWT",(e,t)=>{OL.init(e,t),A$.init(e,t)}),AD=C5("ZodNumber",(e,t)=>{OU.init(e,t),Ag.init(e,t),e._zod.processJSONSchema=(t,r,i)=>EN(e,t,r,i),Ay(e,"ZodNumber",{gt(e,t){return this.check(EV(e,t))},gte(e,t){return this.check(EP(e,t))},min(e,t){return this.check(EP(e,t))},lt(e,t){return this.check(Ek(e,t))},lte(e,t){return this.check(Ew(e,t))},max(e,t){return this.check(Ew(e,t))},int(e){return this.check(AL(e))},safe(e){return this.check(AL(e))},positive(e){return this.check(EV(0,e))},nonnegative(e){return this.check(EP(0,e))},negative(e){return this.check(Ek(0,e))},nonpositive(e){return this.check(Ew(0,e))},multipleOf(e,t){return this.check(ER(e,t))},step(e,t){return this.check(ER(e,t))},finite(){return this}});let r=e._zod.bag;e.minValue=Math.max(r.minimum??-1/0,r.exclusiveMinimum??-1/0)??null,e.maxValue=Math.min(r.maximum??1/0,r.exclusiveMaximum??1/0)??null,e.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),e.isFinite=!0,e.format=r.format??null}),AF=C5("ZodNumberFormat",(e,t)=>{OH.init(e,t),AD.init(e,t)});function AL(e){return new AF({type:"number",check:"number_format",abort:!1,format:"safeint",...TH(e)})}let AU=C5("ZodBoolean",(e,t)=>{OG.init(e,t),Ag.init(e,t),e._zod.processJSONSchema=(t,r,i)=>Ez(e,t,r,i)});function AH(e){return new AU({type:"boolean",...TH(e)})}let AG=C5("ZodUnknown",(e,t)=>{OB.init(e,t),Ag.init(e,t),e._zod.processJSONSchema=(t,r,i)=>EF(e,t,r,i)});function AB(){return new AG({type:"unknown"})}let AK=C5("ZodNever",(e,t)=>{OK.init(e,t),Ag.init(e,t),e._zod.processJSONSchema=(t,r,i)=>ED(e,t,r,i)});function AJ(e){return new AK({type:"never",...TH(e)})}let AZ=C5("ZodArray",(e,t)=>{OZ.init(e,t),Ag.init(e,t),e._zod.processJSONSchema=(t,r,i)=>EB(e,t,r,i),e.element=t.element,Ay(e,"ZodArray",{min(e,t){return this.check(EI(e,t))},nonempty(e){return this.check(EI(1,e))},max(e,t){return this.check(Eq(e,t))},length(e,t){return this.check(Ex(e,t))},unwrap(){return this.element}})});function AQ(e,t){return new AZ({type:"array",element:e,...TH(t)})}let AX=C5("ZodObject",(e,t)=>{O0.init(e,t),Ag.init(e,t),e._zod.processJSONSchema=(t,r,i)=>EK(e,t,r,i),TT(e,"shape",()=>t.shape),Ay(e,"ZodObject",{keyof(){return We(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:AB()})},loose(){return this.clone({...this._zod.def,catchall:AB()})},strict(){return this.clone({...this._zod.def,catchall:AJ()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(e){return function(e,t){if(!Tz(t))throw Error("Invalid input to extend: expected a plain object");let r=e._zod.def.checks;if(r&&r.length>0){let r=e._zod.def.shape;for(let e in t)if(void 0!==Object.getOwnPropertyDescriptor(r,e))throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let i=TE(e._zod.def,{get shape(){let r={...e._zod.def.shape,...t};return TO(this,"shape",r),r}});return TU(e,i)}(this,e)},safeExtend(e){var t=this;if(!Tz(e))throw Error("Invalid input to safeExtend: expected a plain object");let r=TE(t._zod.def,{get shape(){let r={...t._zod.def.shape,...e};return TO(this,"shape",r),r}});return TU(t,r)},merge(e){var t=this;if(t._zod.def.checks?.length)throw Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let r=TE(t._zod.def,{get shape(){let r={...t._zod.def.shape,...e._zod.def.shape};return TO(this,"shape",r),r},get catchall(){return e._zod.def.catchall},checks:e._zod.def.checks??[]});return TU(t,r)},pick(e){return function(e,t){let r=e._zod.def,i=r.checks;if(i&&i.length>0)throw Error(".pick() cannot be used on object schemas containing refinements");let o=TE(e._zod.def,{get shape(){let e={};for(let i in t){if(!(i in r.shape))throw Error(`Unrecognized key: "${i}"`);t[i]&&(e[i]=r.shape[i])}return TO(this,"shape",e),e},checks:[]});return TU(e,o)}(this,e)},omit(e){return function(e,t){let r=e._zod.def,i=r.checks;if(i&&i.length>0)throw Error(".omit() cannot be used on object schemas containing refinements");let o=TE(e._zod.def,{get shape(){let i={...e._zod.def.shape};for(let e in t){if(!(e in r.shape))throw Error(`Unrecognized key: "${e}"`);t[e]&&delete i[e]}return TO(this,"shape",i),i},checks:[]});return TU(e,o)}(this,e)},partial(...e){return function(e,t,r){let i=t._zod.def.checks;if(i&&i.length>0)throw Error(".partial() cannot be used on object schemas containing refinements");let o=TE(t._zod.def,{get shape(){let i=t._zod.def.shape,o={...i};if(r)for(let t in r){if(!(t in i))throw Error(`Unrecognized key: "${t}"`);r[t]&&(o[t]=e?new e({type:"optional",innerType:i[t]}):i[t])}else for(let t in i)o[t]=e?new e({type:"optional",innerType:i[t]}):i[t];return TO(this,"shape",o),o},checks:[]});return TU(t,o)}(Wo,this,e[0])},required(...e){var t,r;let i;return t=this,r=e[0],i=TE(t._zod.def,{get shape(){let e=t._zod.def.shape,i={...e};if(r)for(let t in r){if(!(t in i))throw Error(`Unrecognized key: "${t}"`);r[t]&&(i[t]=new Wp({type:"nonoptional",innerType:e[t]}))}else for(let t in e)i[t]=new Wp({type:"nonoptional",innerType:e[t]});return TO(this,"shape",i),i}}),TU(t,i)}})});function AY(e,t){return new AX({type:"object",shape:e??{},...TH(t)})}function A1(e,t){return new AX({type:"object",shape:e,catchall:AJ(),...TH(t)})}let A0=C5("ZodUnion",(e,t)=>{O4.init(e,t),Ag.init(e,t),e._zod.processJSONSchema=(t,r,i)=>EJ(e,t,r,i),e.options=t.options});function A2(e,t){return new A0({type:"union",options:e,...TH(t)})}let A4=C5("ZodDiscriminatedUnion",(e,t)=>{A0.init(e,t),O6.init(e,t)});function A6(e,t,r){return new A4({type:"union",options:t,discriminator:e,...TH(r)})}let A3=C5("ZodIntersection",(e,t)=>{O3.init(e,t),Ag.init(e,t),e._zod.processJSONSchema=(t,r,i)=>EZ(e,t,r,i)}),A9=C5("ZodTuple",(e,t)=>{O5.init(e,t),Ag.init(e,t),e._zod.processJSONSchema=(t,r,i)=>EQ(e,t,r,i),e.rest=t=>e.clone({...e._zod.def,rest:t})}),A5=C5("ZodRecord",(e,t)=>{Et.init(e,t),Ag.init(e,t),e._zod.processJSONSchema=(t,r,i)=>EX(e,t,r,i),e.keyType=t.keyType,e.valueType=t.valueType});function A8(e,t,r){return new A5(t&&t._zod?{type:"record",keyType:e,valueType:t,...TH(r)}:{type:"record",keyType:Ab(),valueType:e,...TH(t)})}let A7=C5("ZodEnum",(e,t)=>{Er.init(e,t),Ag.init(e,t),e._zod.processJSONSchema=(t,r,i)=>EL(e,t,r,i),e.enum=t.entries,e.options=Object.values(t.entries);let r=new Set(Object.keys(t.entries));e.extract=(e,i)=>{let o={};for(let i of e)if(r.has(i))o[i]=t.entries[i];else throw Error(`Key ${i} not found in enum`);return new A7({...t,checks:[],...TH(i),entries:o})},e.exclude=(e,i)=>{let o={...t.entries};for(let t of e)if(r.has(t))delete o[t];else throw Error(`Key ${t} not found in enum`);return new A7({...t,checks:[],...TH(i),entries:o})}});function We(e,t){return new A7({type:"enum",entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...TH(t)})}let Wt=C5("ZodLiteral",(e,t)=>{Ei.init(e,t),Ag.init(e,t),e._zod.processJSONSchema=(t,r,i)=>EU(e,t,r,i),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function Wr(e,t){return new Wt({type:"literal",values:Array.isArray(e)?e:[e],...TH(t)})}let Wi=C5("ZodTransform",(e,t)=>{Eo.init(e,t),Ag.init(e,t),e._zod.processJSONSchema=(t,r,i)=>EG(e,t,r,i),e._zod.parse=(r,i)=>{if("backward"===i.direction)throw new C7(e.constructor.name);r.addIssue=i=>{"string"==typeof i?r.issues.push(TX(i,r.value,t)):(i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=r.value),i.inst??(i.inst=e),r.issues.push(TX(i)))};let o=t.transform(r.value,r);return o instanceof Promise?o.then(e=>(r.value=e,r.fallback=!0,r)):(r.value=o,r.fallback=!0,r)}}),Wo=C5("ZodOptional",(e,t)=>{Ea.init(e,t),Ag.init(e,t),e._zod.processJSONSchema=(t,r,i)=>E9(e,t,r,i),e.unwrap=()=>e._zod.def.innerType});function Wn(e){return new Wo({type:"optional",innerType:e})}let Wa=C5("ZodExactOptional",(e,t)=>{Es.init(e,t),Ag.init(e,t),e._zod.processJSONSchema=(t,r,i)=>E9(e,t,r,i),e.unwrap=()=>e._zod.def.innerType}),Ws=C5("ZodNullable",(e,t)=>{Ed.init(e,t),Ag.init(e,t),e._zod.processJSONSchema=(t,r,i)=>EY(e,t,r,i),e.unwrap=()=>e._zod.def.innerType});function Wd(e){return new Ws({type:"nullable",innerType:e})}let Wc=C5("ZodDefault",(e,t)=>{Ec.init(e,t),Ag.init(e,t),e._zod.processJSONSchema=(t,r,i)=>E0(e,t,r,i),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap}),Wl=C5("ZodPrefault",(e,t)=>{Ep.init(e,t),Ag.init(e,t),e._zod.processJSONSchema=(t,r,i)=>E2(e,t,r,i),e.unwrap=()=>e._zod.def.innerType}),Wp=C5("ZodNonOptional",(e,t)=>{Eu.init(e,t),Ag.init(e,t),e._zod.processJSONSchema=(t,r,i)=>E1(e,t,r,i),e.unwrap=()=>e._zod.def.innerType}),Wu=C5("ZodCatch",(e,t)=>{Ef.init(e,t),Ag.init(e,t),e._zod.processJSONSchema=(t,r,i)=>E4(e,t,r,i),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap}),Wm=C5("ZodPipe",(e,t)=>{Eh.init(e,t),Ag.init(e,t),e._zod.processJSONSchema=(t,r,i)=>E6(e,t,r,i),e.in=t.in,e.out=t.out});function Wf(e,t){return new Wm({type:"pipe",in:e,out:t})}let Wh=C5("ZodReadonly",(e,t)=>{Eg.init(e,t),Ag.init(e,t),e._zod.processJSONSchema=(t,r,i)=>E3(e,t,r,i),e.unwrap=()=>e._zod.def.innerType}),Wy=C5("ZodCustom",(e,t)=>{Ev.init(e,t),Ag.init(e,t),e._zod.processJSONSchema=(t,r,i)=>EH(e,t,r,i)});function Wg(e){return encodeURI(e.replace(/~/g,"~0").replace(/\//g,"~1"))}let W_={prefixItems:!0,items:!0,allOf:!0,anyOf:!0,oneOf:!0},Wv={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependentSchemas:!0},Wb={id:!0,$id:!0,$ref:!0,$schema:!0,$anchor:!0,$vocabulary:!0,$comment:!0,default:!0,enum:!0,const:!0,required:!0,type:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0},W$="u">typeof self&&self.location&&"null"!==self.location.origin?new URL(self.location.origin+self.location.pathname+location.search):new URL("https://github.com/cfworker");function WS(e,t=Object.create(null),r=W$,i=""){if(e&&"object"==typeof e&&!Array.isArray(e)){let o=e.$id||e.id;if(o){let n=new URL(o,r.href);n.hash.length>1?t[n.href]=e:(n.hash="",""===i?r=n:WS(e,t,r))}}else if(!0!==e&&!1!==e)return t;let o=r.href+(i?"#"+i:"");if(void 0!==t[o])throw Error(`Duplicate schema URI "${o}".`);if(t[o]=e,!0===e||!1===e)return t;if(void 0===e.__absolute_uri__&&Object.defineProperty(e,"__absolute_uri__",{enumerable:!1,value:o}),e.$ref&&void 0===e.__absolute_ref__){let t=new URL(e.$ref,r.href);t.hash=t.hash,Object.defineProperty(e,"__absolute_ref__",{enumerable:!1,value:t.href})}if(e.$recursiveRef&&void 0===e.__absolute_recursive_ref__){let t=new URL(e.$recursiveRef,r.href);t.hash=t.hash,Object.defineProperty(e,"__absolute_recursive_ref__",{enumerable:!1,value:t.href})}for(let o in e.$anchor&&(t[new URL("#"+e.$anchor,r.href).href]=e),e){if(Wb[o])continue;let n=`${i}/${Wg(o)}`,a=e[o];if(Array.isArray(a)){if(W_[o]){let e=a.length;for(let i=0;ie.length>1&&e.length<80&&(/^P\d+([.,]\d+)?W$/.test(e)||/^P[\dYMDTHS]*(\d[.,]\d+)?[YMDHS]$/.test(e)&&/^P([.,\d]+Y)?([.,\d]+M)?([.,\d]+D)?(T([.,\d]+H)?([.,\d]+M)?([.,\d]+S)?)?$/.test(e)),uri:function(e){return Wj.test(e)&&WC.test(e)},"uri-reference":WP(/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i),"uri-template":WP(/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i),url:WP(/^(?:(?:https?|ftp):\/\/)(?:\S+(?::\S*)?@)?(?:(?!10(?:\.\d{1,3}){3})(?!127(?:\.\d{1,3}){3})(?!169\.254(?:\.\d{1,3}){2})(?!192\.168(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)(?:\.(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu),email:e=>{if('"'===e[0])return!1;let[t,r,...i]=e.split("@");return!(!t||!r||0!==i.length||t.length>64||r.length>253||"."===t[0]||t.endsWith(".")||t.includes(".."))&&!!/^[a-z0-9.-]+$/i.test(r)&&!!/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+$/i.test(t)&&r.split(".").every(e=>/^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$/i.test(e))},hostname:WP(/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i),ipv4:WP(/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/),ipv6:WP(/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i),regex:function(e){if(WT.test(e))return!1;try{return RegExp(e,"u"),!0}catch(e){return!1}},uuid:WP(/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i),"json-pointer":WP(/^(?:\/(?:[^~/]|~0|~1)*)*$/),"json-pointer-uri-fragment":WP(/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i),"relative-json-pointer":WP(/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/)};function Wq(e){var t;let r=e.match(Wk);if(!r)return!1;let i=+r[1],o=+r[2],n=+r[3];return o>=1&&o<=12&&n>=1&&n<=(2==o&&(t=i)%4==0&&(t%100!=0||t%400==0)?29:Ww[o])}function WI(e,t){let r=t.match(WV);if(!r)return!1;let i=+r[1],o=+r[2],n=+r[3],a=!!r[5];return(i<=23&&o<=59&&n<=59||23==i&&59==o&&60==n)&&(!e||a)}let Wx=/t|\s/i,Wj=/\/|:/,WC=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,WT=/[^\\]\\Z/;function WO(e,t){let r=typeof e;if(r!==typeof t)return!1;if(Array.isArray(e)){if(!Array.isArray(t))return!1;let r=e.length;if(r!==t.length)return!1;for(let i=0;iMn(t,e))||ei.push({instanceLocation:s,keyword:"enum",keywordLocation:`${d}/enum`,error:`Instance does not match any of ${JSON.stringify(g)}.`}):g.some(e=>t===e)||ei.push({instanceLocation:s,keyword:"enum",keywordLocation:`${d}/enum`,error:`Instance does not match any of ${JSON.stringify(g)}.`})),void 0!==v){let r=`${d}/not`;e(t,v,i,o,n,a,s,r).valid&&ei.push({instanceLocation:s,keyword:"not",keywordLocation:r,error:'Instance matched "not" schema.'})}let eo=[];if(void 0!==b){let r=`${d}/anyOf`,l=ei.length,p=!1;for(let d=0;d{let p=Object.create(c),u=e(t,d,i,o,n,!0===f?a:null,s,`${r}/${l}`,p);return ei.push(...u.errors),u.valid&&eo.push(p),u.valid}).length;1===p?ei.length=l:ei.splice(l,0,{instanceLocation:s,keyword:"oneOf",keywordLocation:r,error:`Instance does not match exactly one subschema (${p} matches).`})}if(("object"===l||"array"===l)&&Object.assign(c,...eo),void 0!==k){let r=`${d}/if`;if(e(t,k,i,o,n,a,s,r,c).valid){if(void 0!==w){let l=e(t,w,i,o,n,a,s,`${d}/then`,c);l.valid||ei.push({instanceLocation:s,keyword:"if",keywordLocation:r,error:'Instance does not match "then" schema.'},...l.errors)}}else if(void 0!==R){let l=e(t,R,i,o,n,a,s,`${d}/else`,c);l.valid||ei.push({instanceLocation:s,keyword:"if",keywordLocation:r,error:'Instance does not match "else" schema.'},...l.errors)}}if("object"===l){if(void 0!==_)for(let e of _)e in t||ei.push({instanceLocation:s,keyword:"required",keywordLocation:`${d}/required`,error:`Instance does not have required property "${e}".`});let r=Object.keys(t);if(void 0!==j&&r.lengthC&&ei.push({instanceLocation:s,keyword:"maxProperties",keywordLocation:`${d}/maxProperties`,error:`Instance does not have at least ${C} properties.`}),void 0!==T){let r=`${d}/propertyNames`;for(let d in t){let t=`${s}/${AX(d)}`,c=e(d,T,i,o,n,a,t,r);c.valid||ei.push({instanceLocation:s,keyword:"propertyNames",keywordLocation:r,error:`Property name "${d}" does not match schema.`},...c.errors)}}if(void 0!==O){let e=`${d}/dependantRequired`;for(let r in O)if(r in t)for(let i of O[r])i in t||ei.push({instanceLocation:s,keyword:"dependentRequired",keywordLocation:e,error:`Instance has "${r}" but does not have "${i}".`})}if(void 0!==E)for(let r in E){let l=`${d}/dependentSchemas`;if(r in t){let d=e(t,E[r],i,o,n,a,s,`${l}/${AX(r)}`,c);d.valid||ei.push({instanceLocation:s,keyword:"dependentSchemas",keywordLocation:l,error:`Instance has "${r}" but does not match dependant schema.`},...d.errors)}}if(void 0!==A){let r=`${d}/dependencies`;for(let d in A)if(d in t){let c=A[d];if(Array.isArray(c))for(let e of c)e in t||ei.push({instanceLocation:s,keyword:"dependencies",keywordLocation:r,error:`Instance has "${d}" but does not have "${e}".`});else{let l=e(t,c,i,o,n,a,s,`${r}/${AX(d)}`);l.valid||ei.push({instanceLocation:s,keyword:"dependencies",keywordLocation:r,error:`Instance has "${d}" but does not match dependant schema.`},...l.errors)}}}let l=Object.create(null),p=!1;if(void 0!==V){let r=`${d}/properties`;for(let d in V){if(!(d in t))continue;let u=`${s}/${AX(d)}`,m=e(t[d],V[d],i,o,n,a,u,`${r}/${AX(d)}`);if(m.valid)c[d]=l[d]=!0;else if(p=n,ei.push({instanceLocation:s,keyword:"properties",keywordLocation:r,error:`Property "${d}" does not match schema.`},...m.errors),p)break}}if(!p&&void 0!==q){let r=`${d}/patternProperties`;for(let d in q){let u=RegExp(d,"u"),m=q[d];for(let f in t){if(!u.test(f))continue;let h=`${s}/${AX(f)}`,y=e(t[f],m,i,o,n,a,h,`${r}/${AX(d)}`);y.valid?c[f]=l[f]=!0:(p=n,ei.push({instanceLocation:s,keyword:"patternProperties",keywordLocation:r,error:`Property "${f}" matches pattern "${d}" but does not match associated schema.`},...y.errors))}}}if(p||void 0===I){if(!p&&void 0!==x){let r=`${d}/unevaluatedProperties`;for(let d in t)if(!c[d]){let l=`${s}/${AX(d)}`,p=e(t[d],x,i,o,n,a,l,r);p.valid?c[d]=!0:ei.push({instanceLocation:s,keyword:"unevaluatedProperties",keywordLocation:r,error:`Property "${d}" does not match unevaluated properties schema.`},...p.errors)}}}else{let r=`${d}/additionalProperties`;for(let d in t){if(l[d])continue;let u=`${s}/${AX(d)}`,m=e(t[d],I,i,o,n,a,u,r);m.valid?c[d]=!0:(p=n,ei.push({instanceLocation:s,keyword:"additionalProperties",keywordLocation:r,error:`Property "${d}" does not match additional properties schema.`},...m.errors))}}}else if("array"===l){void 0!==H&&t.length>H&&ei.push({instanceLocation:s,keyword:"maxItems",keywordLocation:`${d}/maxItems`,error:`Array has too many items (${t.length} > ${H}).`}),void 0!==U&&t.length=(F||0)&&(ei.length=p),void 0===F&&void 0===L&&0===u?ei.splice(p,0,{instanceLocation:s,keyword:"contains",keywordLocation:l,error:"Array does not contain item matching schema."}):void 0!==F&&uL&&ei.push({instanceLocation:s,keyword:"maxContains",keywordLocation:`${d}/maxContains`,error:`Array may contain at most ${L} items matching schema. ${u} items were found.`})}if(!p&&void 0!==z){let p=`${d}/unevaluatedItems`;for(;l=K||t>K)&&ei.push({instanceLocation:s,keyword:"maximum",keywordLocation:`${d}/maximum`,error:`${t} is greater than ${Z?"or equal to ":""} ${K}.`})):(void 0!==B&&tK&&ei.push({instanceLocation:s,keyword:"maximum",keywordLocation:`${d}/maximum`,error:`${t} is greater than ${K}.`}),void 0!==J&&t<=J&&ei.push({instanceLocation:s,keyword:"exclusiveMinimum",keywordLocation:`${d}/exclusiveMinimum`,error:`${t} is less than ${J}.`}),void 0!==Z&&t>=Z&&ei.push({instanceLocation:s,keyword:"exclusiveMaximum",keywordLocation:`${d}/exclusiveMaximum`,error:`${t} is greater than or equal to ${Z}.`})),void 0!==Q){let e=t%Q;Math.abs(0-e)>=11920929e-14&&Math.abs(Q-e)>=11920929e-14&&ei.push({instanceLocation:s,keyword:"multipleOf",keywordLocation:`${d}/multipleOf`,error:`${t} is not a multiple of ${Q}.`})}}else if("string"===l){let e=void 0===X&&void 0===Y?0:function(e){let t,r=0,i=e.length,o=0;for(;o=55296&&t<=56319&&oY&&ei.push({instanceLocation:s,keyword:"maxLength",keywordLocation:`${d}/maxLength`,error:`String is too long (${e} > ${Y}).`}),void 0===ee||RegExp(ee,"u").test(t)||ei.push({instanceLocation:s,keyword:"pattern",keywordLocation:`${d}/pattern`,error:"String does not match pattern."}),void 0!==P&&A8[P]&&!A8[P](t)&&ei.push({instanceLocation:s,keyword:"format",keywordLocation:`${d}/format`,error:`String does not match format "${P}".`})}return{valid:0===ei.length,errors:ei}}(e,this.schema,this.draft,this.lookup,this.shortCircuit)}addSchema(e,t){t&&(e={...e,$id:t}),A4(e,this.lookup)}}let Ms=wC.shape.oneOf.element.extend({"x-openai-thumbnail":S7.optional(),"x-openai-preview":S7.optional(),description:E0().optional()}),Md=wA.omit({items:!0}).shape,Mc=wI.extend({pattern:E0().optional(),"x-openai-suggestions":AS(Ms).optional()}),Ml={"x-openai-input":Ab().optional()},Mp=wC.extend({...Ml,oneOf:AS(Ms),anyOf:Ab().optional()}),Mu=Aw({...Md,...Ml,uniqueItems:Ay().optional(),items:Mc.extend({enum:Ab().optional(),oneOf:Ab().optional(),anyOf:Ab().optional()})}),Mm=[Mp,wA.extend({...Ml,items:Aw({enum:Ab().optional(),anyOf:AS(Ms)})}),wE.extend({...Ml,items:wE.shape.items.extend({anyOf:Ab().optional()})}),wT.extend({...Ml,oneOf:Ab().optional(),anyOf:Ab().optional()}),Mc.extend({...Ml,enum:Ab().optional(),oneOf:Ab().optional(),anyOf:Ab().optional()}),wx.extend(Ml),wq.extend(Ml),Mu],Mf=Aw({kind:AE(["file","directory"]).optional(),accept:AS(E0()).optional()}),Mh=Aw({type:AE(["resource","file"]).describe('"file" is deprecated. Use "resource" instead.'),options:AS(kq),userOptions:Mf.optional(),selection:AE(["explicit","implicit"]).optional()}),My=Mc.extend({format:AM("uri"),enum:Ab().optional(),oneOf:Ab().optional(),anyOf:Ab().optional()}),Mg=AV([AI("type",[My.extend({"x-openai-input":Mh.extend({selection:Ab().optional()})}),Aw({...Md,items:My,"x-openai-input":Mh})]).superRefine((e,t)=>{let r=e["x-openai-input"];null!=e.default&&("implicit"===r.selection&&t.addIssue({code:"custom",path:["default"],message:"Implicit selection cannot specify a default"}),(Array.isArray(e.default)?e.default:[e.default]).some(e=>!r.options.some(t=>t.uri===e))&&t.addIssue({code:"custom",path:["default"],message:"Defaults must name supplied resources"}))}),...Mm]),M_=Aw({$schema:E0().optional(),type:AM("object"),required:AS(E0()).optional(),properties:M$(Mg)}),Mv=M$(AV([E0(),new Au({type:"number",checks:[],...Ty(void 0)}),Ay(),AS(E0())])),Mb=AI("action",[Aw({action:AM("accept"),content:Mv}),Aw({action:AE(["cancel","decline"])})]);function M$(e){var t,r;let i;return(t=(e=>AT(E0(),A_()).safeParse(e).success)??(()=>!0),(i=Ty(void 0)).abort??(i.abort=!0),new AQ({type:"custom",check:"custom",fn:t,...i})).transform(e=>Object.entries(e)).pipe(AS((r=[E0(),e.nonoptional()],new Aj({type:"tuple",items:r,rest:null,...Ty(void 0)})))).transform(e=>Object.fromEntries(e))}let MS="openai/elicitation",Mk=Aw({"io.modelcontextprotocol/protocolVersion":E0().optional(),"io.modelcontextprotocol/clientCapabilities":A_().optional()}),Mw=Aw({extensions:Aw({[MS]:Aw({form:Aw({})})})}),MR=E0().regex(/\S/),MP="openai/mentions";Aw({searchTool:MR});let MV=AI("type",[k9,AR({icons:AS(S7).optional(),resourceUri:MR,subtitle:MR.optional(),title:MR,type:AM("resource")})]),Mq=Aw({query:E0()}),MI=AR({items:AS(MV)}),Mx="openai/settings";Aw({readTool:MR,updateTool:MR});let Mj=AI("kind",[AR({kind:AM("property"),property:E0()}),AR({kind:AM("tool"),tool:MR,title:MR.optional(),description:E0().optional()})]),MC=AR({kind:AM("group"),title:MR,items:AS(Mj)}),MT=Aw({title:MR,description:E0().optional()}),MO=Aw({schema:new Ak({type:"object",shape:{type:AM("object"),properties:AT(E0(),A_()).optional(),required:AS(E0()).optional()},catchall:A_(),...Ty(void 0)}),layout:AS(MC).optional(),values:AT(E0(),A_())}).superRefine(({schema:e,layout:t},r)=>{let i=new Set;for(let o of t??[])for(let t of o.items)"property"===t.kind&&((!Object.hasOwn(e.properties??{},t.property)||i.has(t.property))&&r.addIssue({code:"custom",path:["layout"],message:`Unknown or duplicate settings key: ${t.property}`}),i.add(t.property))});AR({set:AT(E0(),A_()).refine(e=>Object.keys(e).length>0,"Set at least one setting.").meta({minProperties:1})});let ME=Aw({values:AT(E0(),A_())}),MA=Aw({type:AE(["boolean","string","number","integer"]),enum:AS(E0()).nonempty().optional(),$ref:Ab().optional(),anyOf:Ab().optional(),oneOf:Ab().optional(),allOf:Ab().optional()}).refine(e=>void 0===e.enum||"string"===e.type);class MM{elicitInputLegacy;elicitInput;mentions;settings;constructor(e){let t,r,i;this.elicitInputLegacy=async(t,r,i)=>{let o=Mk.parse(t.mcpReq.envelope??{}),n=o["io.modelcontextprotocol/protocolVersion"]??e.server.getNegotiatedProtocolVersion();if(void 0!==n&&n>="2026-07-28")throw Error("Use requestFormInput for MCP 2026-07-28 or newer");if(!Mw.safeParse(o["io.modelcontextprotocol/clientCapabilities"]??e.server.getClientCapabilities()).success)throw Error(`The MCP client does not support ${MS} form requests`);let a=M_.parse(r.requestedSchema),s=await t.mcpReq.send({method:"openai/elicitation/create",params:{...r,requestedSchema:a}},Mb,i);if("accept"===s.action){let e;return{...s,content:(e=new Ma(structuredClone(a),"2020-12",!1),Mv.superRefine((t,r)=>{for(let i of e.validate(Object.setPrototypeOf({...t},null)).errors)"#/required"!==i.keywordLocation&&r.addIssue({code:"custom",path:i.instanceLocation.split("/").slice(1).map(e=>e.replace(/~1/g,"/").replace(/~0/g,"~")),message:i.error});for(let e of a.required??[])Object.hasOwn(t,e)||r.addIssue({code:"custom",path:[e],message:"Required field"});for(let[e,i]of Object.entries(a.properties))Object.hasOwn(t,e)&&null!=i["x-openai-input"]&&!function(e,t){let r=Array.isArray(t)?t:[t];return"implicit"===e.selection||null!=e.userOptions||r.every(t=>e.options.some(e=>e.uri===t))}(i["x-openai-input"],t[e])&&r.addIssue({code:"custom",path:[e],message:"Invalid file selection"})})).parse(s.content)}}return s},this.elicitInput=this.elicitInputLegacy,this.mentions=(t=null,r=!1,{setHandler:i=>{if(!r){if(e.server.transport)throw Error("Register mention search before connecting the server.");e.registerTool("search_mentions",{annotations:{readOnlyHint:!0},inputSchema:Mq,outputSchema:MI,_meta:{"openai/extensions":{"mentions/search":{}},ui:{visibility:["app"]}}},async(e,r)=>({content:[],structuredContent:null==t?{items:[]}:await t(e,r)}));let i={searchTool:"search_mentions"};e.server.registerCapabilities({extensions:{[MP]:i},experimental:{[MP]:i}}),r=!0}t=i}}),this.settings=(i=Symbol.for("@openai/mcp-extensions/settings/registered"),{register(t){if(i in e)throw Error("Settings are already registered on this server.");if(e.server.transport)throw Error("Register settings before connecting the server.");let r=MR.parse(t.readTool??"settings.read"),o=MR.parse(t.updateTool??"settings.update");if(r===o)throw Error("Settings read and update tools must have different names.");let n=Object.fromEntries(Object.entries(t.fields).map(([e,t])=>[e,t.schema.meta({...t.schema.meta(),title:t.title,description:t.description})])),a=AR(n).required(),s=wi.shape.inputSchema.parse(function(e){if("_idmap"in e){let t=Ei({processors:EC}),r={};for(let r of e._idmap.entries()){let[e,i]=r;Eo(i,t)}let i={};for(let o of(t.external={registry:e,uri:void 0,defs:r},e._idmap.entries())){let[e,r]=o;En(t,r),i[e]=Ea(t,r)}return Object.keys(r).length>0&&(i.__shared={["draft-2020-12"===t.target?"$defs":"definitions"]:r}),{schemas:i}}let t=Ei({processors:EC});return Eo(e,t),En(t,e),Ea(t,e)}(a));for(let[e,t]of Object.entries(s.properties??{})){if(MT.parse(t),!MA.safeParse(t).success)throw Error(`Unsupported native setting ${JSON.stringify(e)}: use a boolean, string, string enum, number, or integer field.`);if("object"==typeof t&&null!==t&&"default"in t)throw Error("Settings defaults must be returned by the read handler, not declared in the schema.")}let{layout:d}=MO.parse({schema:s,layout:t.layout,values:{}}),c=AR(n).partial().refine(e=>Object.keys(e).length>0,"Set at least one setting.").meta({minProperties:1}),l=e.registerTool(r,{inputSchema:AR({}),outputSchema:MO.safeExtend({values:a}),annotations:{readOnlyHint:!0}},async(e,r)=>({content:[],structuredContent:{schema:s,...void 0===d?{}:{layout:d},values:a.parse(await t.read(r))}}));try{e.registerTool(o,{inputSchema:AR({set:c}),outputSchema:ME.extend({values:a})},async({set:e},r)=>({content:[],structuredContent:{values:a.parse(await t.update(e,r))}}));let n={readTool:r,updateTool:o};e.server.registerCapabilities({extensions:{[Mx]:n},experimental:{[Mx]:n}}),Object.defineProperty(e,i,{value:!0})}catch(e){throw l.remove(),e}}})}}function MW(e){switch(e.kind){case"projects":return"/";case"project":return`/projects/${encodeURIComponent(e.project_id)}`;case"search":return`/projects/${encodeURIComponent(e.project_id)}/search?q=${encodeURIComponent(e.query)}`;case"symbol":return`/projects/${encodeURIComponent(e.project_id)}/symbols/${encodeURIComponent(e.node_id)}`}}async function MN(e){try{return await e()}catch(e){return{state:"failed",failure:Cy(e)}}}async function Mz(e,t){let r=await MN(async()=>{let r=await e.listProjects(t);return 0===r.length?{state:"empty",message:"No projects are registered in this TraceDecay profile. Run `tracedecay init` in a repository first."}:{state:"ready",data:r}});return{page:"projects",daemon:await e.daemonState(),projects:r}}async function MD(e,t,r){let i=Cy(r),o=null;try{o=await e.resolveProject(t)}catch{o=null}return{page:"failure",project:o,failure:i}}async function MF(e,t,r,i){var o,n,a,s,d,c;let l,p,u=await e.resolveProject(t,i),m=MU(u,await ML(()=>e.status(t,i))),[f,h,y,g]=await Promise.all([MN(async()=>{var o,n;let a=await e.node(t,r,i);return"id"in(o=a)&&"string"==typeof o.id?{state:"ready",data:{node_id:(n=a).id,name:n.name,qualified_name:n.qualified_name,kind:n.kind,file:n.file,start_line:n.start_line,end_line:n.end_line,signature:n.signature??null,complexity:n.cyclomatic_complexity??null,unavailable_fields:n.unavailable_fields}}:{state:"failed",failure:{kind:"not_found",code:a.reason_code,message:a.message}}}),MN(async()=>MG(await e.callers(t,r,1,i),"callers")),MN(async()=>{let o=m?.generation;if(null==o)throw new Cu({kind:"unavailable",code:"generation_unknown",message:"The daemon has not reported a served code generation for this project yet, so callee reads cannot be scoped."});return MG(await e.callees(t,r,o,1,i),"callees")}),MN(async()=>{let o=await e.impact(t,r,3,i);if(!("nodes"in o))return{state:"failed",failure:{kind:"not_found",code:o.reason_code,message:o.message}};let n=o.nodes.map(MB);return 0===n.length&&o.complete?{state:"empty",message:"No dependents reach this symbol within the traversed depth."}:{state:"ready",data:{nodes:n,complete:o.complete,max_depth:3}}})]),_=function(e,t,r){if("ready"!==e.state)return"failed"===e.state?{state:"failed",failure:e.failure}:{state:"empty",message:e.message};if("failed"===t.state&&"failed"===r.state)return{state:"failed",failure:t.failure};let i={...e.data,role:"focus",depth:0},o=[i],n=[],a=new Set([i.node_id]),s=(e,t)=>{for(let r of e)a.has(r.symbol.node_id)||(a.add(r.symbol.node_id),o.push({...r.symbol,role:t,depth:r.depth})),n.push("caller"===t?{from:r.symbol.node_id,to:i.node_id,edge_kind:r.edge_kind}:{from:i.node_id,to:r.symbol.node_id,edge_kind:r.edge_kind})};if("ready"===t.state&&s(t.data,"caller"),"ready"===r.state&&s(r.data,"callee"),1===o.length)return{state:"empty",message:"This symbol has no recorded callers or callees."};let d="ready"===t.state&&"ready"===r.state&&void 0!==t.generation&&void 0!==r.generation&&t.generation!==r.generation;return{state:"ready",data:{nodes:o,edges:n,max_depth:1,truncated:"failed"===t.state||"failed"===r.state||"ready"===t.state&&!0===t.truncated||"ready"===r.state&&!0===r.truncated||d}}}(f,h,y),v="ready"===f.state?(o=u,n=f.data,a=h,s=y,d=g,c=m,l=`${n.file}:${n.start_line??"?"}-${n.end_line??"?"}`,p=[`## ${n.kind} \`${n.qualified_name}\``,`- Project: ${o.label} (${o.project_id})`,`- Location: ${l}`,...null===n.signature?[]:[`- Signature: \`${n.signature}\``],`- Node id: \`${n.node_id}\``,"_Symbol and impact reads do not report a generation; their snapshot identity is unverified._",...MJ(a,"Callers",c?.generation??null),...MJ(s,"Callees",c?.generation??null),...MK("Impact","ready"===d.state?{state:"ready",data:d.data.nodes}:d,e=>`depth ${e.depth}: ${e.name} (${e.file}:${e.line})`),..."ready"!==d.state||d.data.complete?[]:["_Impact traversal is partial: the daemon hit its traversal budget._"],"### Reported project status (separate read)",...null===c?["_Project status unavailable; provenance not verified._"]:[`- Repository: ${c.repository_id??"unknown"}`,`- Worktree: ${c.worktree_id??"unknown"} (${c.project_root})`,`- Ref: ${c.reference??"unknown"}${null===c.branch?"":` (branch ${c.branch})`}`,`- Commit: ${c.commit??"unknown"}`,`- Generation: ${c.generation??"unknown"}`,`- Freshness: ${c.freshness.state}${null===c.freshness.detail?"":` (${c.freshness.detail})`}`,`- Coverage: ${c.coverage.recall}${null===c.coverage.detail?"":` (${c.coverage.detail})`}`],`- Deep link: ${MW({kind:"symbol",project_id:o.project_id,node_id:n.node_id})}`],{title:`${n.kind} ${n.qualified_name}`,markdown:p.join("\n"),structured:{project:o,symbol:n,callers:a,callees:s,impact:d,provenance:c}}):null;return{page:"symbol",project:u,symbol:f,callers:h,callees:y,impact:g,graph:_,provenance:m,evidence:v}}async function ML(e){try{return{ok:!0,value:await e()}}catch(e){return{ok:!1,failure:Cy(e)}}}function MU(e,t){if(!t.ok||!("code_index_freshness"in t.value.status))return null;let r=t.value.status,i=t.value.authority,o=r.code_index_freshness;if(!("worktree"in o))return null;let n=o.worktree,a=null===n.staleness_state||void 0===n.staleness_state?null:`worktree ${n.staleness_state}`,s=n.coverage,d="string"==typeof s?s:JSON.stringify(s);return{project_id:e.project_id,project_root:n.worktree_root,repository_id:n.repository_id??null,worktree_id:n.worktree_id??null,reference:n.source_reference??null,branch:r.current_branch??r.active_branch??null,commit:n.source_revision??null,generation:n.latest_generation_id??null,freshness:{state:function(e){switch(e){case"current":case"stale":case"warming":case"restoring":case"parked":case"unavailable":return e;default:return"unavailable"}}(o.status),detail:"reason"in o&&"string"==typeof o.reason?o.reason:a},coverage:{recall:"complete"===d?"full":"partial",detail:d},authority:{profile_root:i.profile_root,daemon_version:i.version,daemon_pid:i.pid}}}function MH(e){var t;return{symbol:{node_id:(t=e.symbol).node_id,name:t.name,qualified_name:t.qualified_name,kind:t.kind,file:t.file,start_line:t.line,end_line:t.end_line,signature:t.signature??null},edge_kind:e.edge_kind,depth:e.depth??1,dispatch_via_trait:e.dispatch_via_trait}}function MG(e,t){let r=e.items.map(MH);if(0===r.length)return{state:"empty",message:`No ${t} recorded in the served graph.`};let i="truncated"in e&&e.truncated||null!==e.next_cursor&&void 0!==e.next_cursor||"number"==typeof e.total&&e.total>r.length;return{state:"ready",data:r,truncated:i,generation:e.generation}}function MB(e){return{node_id:e.id,name:e.name,kind:e.kind,file:e.file,line:e.line,depth:e.depth}}function MK(e,t,r){let i=[`### ${e}`];switch(t.state){case"ready":i.push(...t.data.map(e=>`- ${r(e)}`)),!0===t.truncated&&i.push("_First page only; more rows exist than shown._");break;case"empty":i.push(`_${t.message}_`);break;case"failed":i.push(`_Unavailable (${t.failure.kind}: ${t.failure.message})_`)}return i}function MJ(e,t,r){let i=MK(t,e,e=>`${e.symbol.qualified_name} (${e.symbol.file}:${e.symbol.start_line??"?"}, ${e.edge_kind})`);return"ready"===e.state&&null!==r&&void 0!==e.generation&&e.generation!==r&&i.push(`_Served from generation ${e.generation}, which differs from the reported project generation ${r}._`),i}function MZ(e){switch(e.page){case"projects":return"ready"===e.projects.state?`Recent TraceDecay projects: ${e.projects.data.map(e=>`${e.label} (${e.project_id})`).join(", ")}`:"empty"===e.projects.state?e.projects.message:`TraceDecay projects unavailable (${e.projects.failure.kind}): ${e.projects.failure.message}`;case"search":if("ready"===e.results.state){let t=e.results.data.hits.map(e=>`- ${e.kind} ${e.qualified_name} (${e.file}) node_id=${e.node_id}`).join("\n"),r=e.results.data.undisplayable.length;return`Search "${e.query}" in ${e.project.label}${"partial"===e.results.data.recall?" (partial recall)":""}${r>0?` (${r} candidate(s) could not be displayed)`:""}: -${t}`}return"empty"===e.results.state?`Search "${e.query}" in ${e.project.label}: ${e.results.message}`:`Search "${e.query}" in ${e.project.label} failed (${e.results.failure.kind}): ${e.results.failure.message}`;case"symbol":return null===e.evidence?"failed"===e.symbol.state?`Symbol lookup failed (${e.symbol.failure.kind}): ${e.symbol.failure.message}`:"Symbol unavailable":e.evidence.markdown;case"failure":return`TraceDecay request failed (${e.failure.kind}): ${e.failure.message}`}}let MQ="ui://tracedecay/code-explorer",MX={readOnlyHint:!0,destructiveHint:!1,openWorldHint:!1,idempotentHint:!0};function MY(e,t=[]){return{content:[{type:"text",text:MZ(e)},...t.map(e=>({type:"text",text:e}))],structuredContent:e}}async function M1(e){let t=[];return MY(await Cp.run(t,e),t)}function M0(e){let t=Array.isArray(e)?e[0]:e;if(void 0===t||0===t.length)throw Error("resource URI is missing a template variable");return decodeURIComponent(t)}let M2={name:"tracedecay-chatgpt-extension",title:"TraceDecay",version:"0.0.0"};async function M4(){let[e,t]=await Promise.all([x(new URL("./app.html",import.meta.url),"utf8"),x(new URL("../assets/icon.svg",import.meta.url),"utf8")]);return{html:e,iconSvg:t}}function M6({bridge:e,assets:t}){let r=new uL({...M2,icons:[{src:`data:image/svg+xml,${encodeURIComponent(t.iconSvg)}`,mimeType:"image/svg+xml"}]});return!function({server:e,bridge:t,html:r}){let i=(e=[])=>({ui:{resourceUri:MQ},"openai/ui":{entrypoints:e},"openai/iconStyle":"monochrome"}),o=o7().min(1).describe("Registered TraceDecay project id");Cj(e,"tracedecay_workspace",{title:"TraceDecay",description:"Open the TraceDecay code explorer: pick an authorized project, search code, inspect symbols and their graph.",inputSchema:nz({}),annotations:MX,_meta:i([{type:"global"}])},async(e,r)=>MY(await Mz(t,r.mcpReq.signal))),Cj(e,"tracedecay_thread_panel",{title:"TraceDecay",description:"Open the TraceDecay code explorer beside this conversation.",inputSchema:nz({}),annotations:MX,_meta:i([{type:"thread"}])},async(e,r)=>MY(await Mz(t,r.mcpReq.signal))),Cj(e,"tracedecay_list_projects",{title:"List TraceDecay projects",description:"List up to ten recent projects registered in the local TraceDecay profile.",inputSchema:nz({}),annotations:MX,_meta:{ui:{visibility:["app"]}}},async(e,r)=>MY(await Mz(t,r.mcpReq.signal))),Cj(e,"tracedecay_search_code",{title:"Search TraceDecay code",description:"Search symbols in a registered TraceDecay project. Returns node ids usable with tracedecay_inspect_symbol plus the served code generation and freshness.",inputSchema:nz({project_id:o,query:o7().describe("Symbol or free-text query")}),annotations:MX,_meta:i()},async({project_id:e,query:r},i)=>M1(async()=>{try{return await async function(e,t,r,i){let o=await e.resolveProject(t,i),[n,a]=await Promise.all([ML(()=>e.status(t,i)),MN(async()=>0===r.trim().length?{state:"empty",message:"Enter a query to search this project."}:function(e){let t=e.coverage.recall;if("status"in e&&"unavailable"===e.status){var r;return{state:"failed",failure:{kind:"possibly_stale"===e.freshness.state?"stale":"unavailable",code:e.reason,message:(r=e.detail,(null==r?null:"parked"===r.kind?`${r.kind}: ${r.cause} (${r.remedy})`:"reset_required"===r.kind?`${r.kind}: ${r.reason} (${r.remedy})`:r.kind)??e.reason)}}}let i=[],o=[];for(let t of e.results){let e=function(e){let t=e.display;if(null===e.node_id||void 0===e.node_id||null==t)return null;let r=(e.lexical_routes??[]).map(e=>"object"==typeof e&&null!==e&&"lane"in e?String(e.lane):"lexical");return{node_id:e.node_id,name:t.name,qualified_name:t.qualified_name,kind:t.kind,file:t.path,start_line:null,end_line:null,signature:null,score:e.candidate.utility_micros/1e6,lanes:r}}(t);null===e?o.push(t.display_unavailable??"undisplayable"):i.push(e)}let n="next_cursor"in e?e.next_cursor:null;return 0===i.length&&0===o.length?{state:"empty",message:"partial"===t?"No results in the indexed portion of this project yet.":"No symbols match this query."}:{state:"ready",data:{hits:i,truncated:null!=n,undisplayable:o,recall:t},generation:"string"==typeof e.code_generation?e.code_generation:void 0}}(await e.search(t,r,20,i)))]);return{page:"search",project:o,query:r,results:a,provenance:MU(o,n)}}(t,e,r,i.mcpReq.signal)}catch(r){return await MD(t,e,r)}})),Cj(e,"tracedecay_inspect_symbol",{title:"Inspect TraceDecay symbol",description:"Inspect one symbol by node id: definition, direct callers and callees, dependent impact, and separately reported project status. Relations carry their served generation; symbol and impact reads do not report snapshot identity.",inputSchema:nz({project_id:o,node_id:o7().min(1).describe("Symbol node id from a search result")}),annotations:MX,_meta:i()},async({project_id:e,node_id:r},i)=>M1(async()=>{try{return await MF(t,e,r,i.mcpReq.signal)}catch(r){return await MD(t,e,r)}})),new MM(e).mentions.setHandler(async({query:e},r)=>{if(0===e.trim().length)return{items:[]};let i=(await t.listProjects(r.mcpReq.signal)).slice(0,4),o=await Promise.allSettled(i.map(async i=>(await t.symbolSearch(i.project_id,e,r.mcpReq.signal)).items.slice(0,8).map(e=>{var t,r;return{type:"resource_link",uri:(t=i.project_id,r=e.node_id,`tracedecay://projects/${encodeURIComponent(t)}/symbols/${encodeURIComponent(r)}`),name:e.qualified_name,title:`${e.kind} ${e.name}`,description:`${i.label} \xb7 ${e.file}:${e.line}`,mimeType:"text/markdown"}}))),n=[],a=[];if(o.forEach((e,t)=>{"fulfilled"===e.status?n.push(...e.value):a.push(`${i[t]?.label}: ${Cy(e.reason).message}`)}),0===n.length&&a.length>0)throw Error(`symbol lookup failed for ${a.join("; ")}`);return{items:n}}),e.registerResource("tracedecay-symbol",new uU("tracedecay://projects/{project_id}/symbols/{node_id}",{list:void 0}),{title:"TraceDecay symbol evidence",mimeType:"text/markdown"},async(e,r,i)=>{let o=M0(r.project_id),n=M0(r.node_id),a=await MF(t,o,n,i.mcpReq.signal);return{contents:[{uri:e.href,mimeType:"text/markdown",text:MZ(a),_meta:{"openai/deepLink":MW({kind:"symbol",project_id:o,node_id:n})}}]}}),e.registerResource("tracedecay-code-explorer",MQ,{title:"TraceDecay code explorer",mimeType:"text/html;profile=mcp-app"},async()=>({contents:[{uri:MQ,mimeType:"text/html;profile=mcp-app",text:r,_meta:{"openai/ui":{preferredDisplayMode:"inline",availableDisplayModes:["inline","fullscreen"]},ui:{prefersBorder:!0,csp:{connectDomains:[],resourceDomains:[]}}}}]}))}({server:r,bridge:e,html:t.html}),r}function M3(e,t){return new CP({binary:t??e.TRACEDECAY_BIN??"tracedecay",profileRoot:mb(e),env:e,cwd:process.cwd()})}async function M9(e,t,r,i){if("127.0.0.1"!==t&&"localhost"!==t&&"::1"!==t)throw Error(`--http must bind a loopback address, got ${t}`);if(0===i.length)throw Error("--http requires a bearer token");let o=r,n=T((r,n)=>{(async function(e,t,r,i,o,n){if("/mcp"!==new URL(t.url??"/",`http://${"::1"===i?"[::1]":i}:${o}`).pathname){r.writeHead(404,{"content-type":"application/json"}),r.end(JSON.stringify({error:"not_found"}));return}if(!function(e,t){if(void 0===e||!e.startsWith("Bearer "))return!1;let r=Buffer.from(e.slice(7),"utf8"),i=Buffer.from(t,"utf8");return r.length===i.length&&P(r,i)}(t.headers.authorization,n)){r.writeHead(401,{"content-type":"application/json"}),r.end(JSON.stringify({jsonrpc:"2.0",error:{code:-32001,message:"unauthorized: a Bearer token is required"},id:null}));return}if(![`${i}:${o}`,`localhost:${o}`,`127.0.0.1:${o}`,`[::1]:${o}`].includes(t.headers.host??"")){r.writeHead(403,{"content-type":"application/json"}),r.end(JSON.stringify({jsonrpc:"2.0",error:{code:-32e3,message:`Invalid Host header: ${t.headers.host??""}`},id:null}));return}let a=new mv({sessionIdGenerator:void 0,enableJsonResponse:!0}),s=e();r.on("close",()=>{a.close().finally(()=>s.close())}),await s.connect(a),await a.handleRequest(t,r)})(e,r,n,t,o,i).catch(e=>{n.headersSent||n.writeHead(500,{"content-type":"application/json"}),n.end(JSON.stringify({jsonrpc:"2.0",error:{code:-32603,message:String(e)},id:null}))})});await new Promise((e,i)=>{n.once("error",i),n.listen(r,t,()=>e())});let a=n.address();if("object"!=typeof a||null===a)throw Error("loopback HTTP server did not report a bound address");return o=a.port,{url:`http://${"::1"===t?"[::1]":t}:${o}/mcp`,close:()=>new Promise((e,t)=>{n.close(r=>void 0===r?e():t(r)),n.closeAllConnections()})}}(function(){let e=process.argv[1];if(void 0===e)return!1;try{return import.meta.url===A(V(e)).href}catch{return!1}})()&&(async function(){let{values:e}=M({options:{http:{type:"string"},binary:{type:"string"},token:{type:"string"}}}),t=M3(process.env,e.binary),r=await M4(),i=()=>M6({bridge:t,assets:r}),o=null,n=async()=>{await t.close(),null!==o&&await j(o,{force:!0})};if(process.once("SIGINT",()=>void n().finally(()=>process.exit(0))),process.once("SIGTERM",()=>void n().finally(()=>process.exit(0))),void 0!==e.http){var a;let t,[r,n]=-1===(t=(a=e.http).lastIndexOf(":"))?["127.0.0.1",a]:[a.slice(0,t),a.slice(t+1)],s=Number.parseInt(n,10);if(!Number.isInteger(s)||s<0||s>65535)throw Error(`invalid --http port: ${n}`);let d=e.token??R(24).toString("base64url"),c=await M9(i,r,s,d);if(process.stderr.write(`tracedecay-chatgpt-extension listening on ${c.url} +- ${Object.keys(o).join("\n- ")}`)}let l=`${d}/$ref`,p=e(t,r,i,o,n,a,s,l,c);if(p.valid||ei.push({instanceLocation:s,keyword:"$ref",keywordLocation:l,error:"A subschema had errors."},...p.errors),"4"===i||"7"===i)return{valid:0===ei.length,errors:ei}}if(Array.isArray(h)){let e=h.length,r=!1;for(let i=0;iWO(t,e))||ei.push({instanceLocation:s,keyword:"enum",keywordLocation:`${d}/enum`,error:`Instance does not match any of ${JSON.stringify(g)}.`}):g.some(e=>t===e)||ei.push({instanceLocation:s,keyword:"enum",keywordLocation:`${d}/enum`,error:`Instance does not match any of ${JSON.stringify(g)}.`})),void 0!==v){let r=`${d}/not`;e(t,v,i,o,n,a,s,r).valid&&ei.push({instanceLocation:s,keyword:"not",keywordLocation:r,error:'Instance matched "not" schema.'})}let eo=[];if(void 0!==b){let r=`${d}/anyOf`,l=ei.length,p=!1;for(let d=0;d{let p=Object.create(c),u=e(t,d,i,o,n,!0===f?a:null,s,`${r}/${l}`,p);return ei.push(...u.errors),u.valid&&eo.push(p),u.valid}).length;1===p?ei.length=l:ei.splice(l,0,{instanceLocation:s,keyword:"oneOf",keywordLocation:r,error:`Instance does not match exactly one subschema (${p} matches).`})}if(("object"===l||"array"===l)&&Object.assign(c,...eo),void 0!==k){let r=`${d}/if`;if(e(t,k,i,o,n,a,s,r,c).valid){if(void 0!==w){let l=e(t,w,i,o,n,a,s,`${d}/then`,c);l.valid||ei.push({instanceLocation:s,keyword:"if",keywordLocation:r,error:'Instance does not match "then" schema.'},...l.errors)}}else if(void 0!==V){let l=e(t,V,i,o,n,a,s,`${d}/else`,c);l.valid||ei.push({instanceLocation:s,keyword:"if",keywordLocation:r,error:'Instance does not match "else" schema.'},...l.errors)}}if("object"===l){if(void 0!==_)for(let e of _)e in t||ei.push({instanceLocation:s,keyword:"required",keywordLocation:`${d}/required`,error:`Instance does not have required property "${e}".`});let r=Object.keys(t);if(void 0!==j&&r.lengthC&&ei.push({instanceLocation:s,keyword:"maxProperties",keywordLocation:`${d}/maxProperties`,error:`Instance does not have at least ${C} properties.`}),void 0!==T){let r=`${d}/propertyNames`;for(let d in t){let t=`${s}/${Wg(d)}`,c=e(d,T,i,o,n,a,t,r);c.valid||ei.push({instanceLocation:s,keyword:"propertyNames",keywordLocation:r,error:`Property name "${d}" does not match schema.`},...c.errors)}}if(void 0!==O){let e=`${d}/dependantRequired`;for(let r in O)if(r in t)for(let i of O[r])i in t||ei.push({instanceLocation:s,keyword:"dependentRequired",keywordLocation:e,error:`Instance has "${r}" but does not have "${i}".`})}if(void 0!==E)for(let r in E){let l=`${d}/dependentSchemas`;if(r in t){let d=e(t,E[r],i,o,n,a,s,`${l}/${Wg(r)}`,c);d.valid||ei.push({instanceLocation:s,keyword:"dependentSchemas",keywordLocation:l,error:`Instance has "${r}" but does not match dependant schema.`},...d.errors)}}if(void 0!==A){let r=`${d}/dependencies`;for(let d in A)if(d in t){let c=A[d];if(Array.isArray(c))for(let e of c)e in t||ei.push({instanceLocation:s,keyword:"dependencies",keywordLocation:r,error:`Instance has "${d}" but does not have "${e}".`});else{let l=e(t,c,i,o,n,a,s,`${r}/${Wg(d)}`);l.valid||ei.push({instanceLocation:s,keyword:"dependencies",keywordLocation:r,error:`Instance has "${d}" but does not match dependant schema.`},...l.errors)}}}let l=Object.create(null),p=!1;if(void 0!==R){let r=`${d}/properties`;for(let d in R){if(!(d in t))continue;let u=`${s}/${Wg(d)}`,m=e(t[d],R[d],i,o,n,a,u,`${r}/${Wg(d)}`);if(m.valid)c[d]=l[d]=!0;else if(p=n,ei.push({instanceLocation:s,keyword:"properties",keywordLocation:r,error:`Property "${d}" does not match schema.`},...m.errors),p)break}}if(!p&&void 0!==q){let r=`${d}/patternProperties`;for(let d in q){let u=RegExp(d,"u"),m=q[d];for(let f in t){if(!u.test(f))continue;let h=`${s}/${Wg(f)}`,y=e(t[f],m,i,o,n,a,h,`${r}/${Wg(d)}`);y.valid?c[f]=l[f]=!0:(p=n,ei.push({instanceLocation:s,keyword:"patternProperties",keywordLocation:r,error:`Property "${f}" matches pattern "${d}" but does not match associated schema.`},...y.errors))}}}if(p||void 0===I){if(!p&&void 0!==x){let r=`${d}/unevaluatedProperties`;for(let d in t)if(!c[d]){let l=`${s}/${Wg(d)}`,p=e(t[d],x,i,o,n,a,l,r);p.valid?c[d]=!0:ei.push({instanceLocation:s,keyword:"unevaluatedProperties",keywordLocation:r,error:`Property "${d}" does not match unevaluated properties schema.`},...p.errors)}}}else{let r=`${d}/additionalProperties`;for(let d in t){if(l[d])continue;let u=`${s}/${Wg(d)}`,m=e(t[d],I,i,o,n,a,u,r);m.valid?c[d]=!0:(p=n,ei.push({instanceLocation:s,keyword:"additionalProperties",keywordLocation:r,error:`Property "${d}" does not match additional properties schema.`},...m.errors))}}}else if("array"===l){void 0!==H&&t.length>H&&ei.push({instanceLocation:s,keyword:"maxItems",keywordLocation:`${d}/maxItems`,error:`Array has too many items (${t.length} > ${H}).`}),void 0!==U&&t.length=(F||0)&&(ei.length=p),void 0===F&&void 0===L&&0===u?ei.splice(p,0,{instanceLocation:s,keyword:"contains",keywordLocation:l,error:"Array does not contain item matching schema."}):void 0!==F&&uL&&ei.push({instanceLocation:s,keyword:"maxContains",keywordLocation:`${d}/maxContains`,error:`Array may contain at most ${L} items matching schema. ${u} items were found.`})}if(!p&&void 0!==z){let p=`${d}/unevaluatedItems`;for(;l=K||t>K)&&ei.push({instanceLocation:s,keyword:"maximum",keywordLocation:`${d}/maximum`,error:`${t} is greater than ${Z?"or equal to ":""} ${K}.`})):(void 0!==B&&tK&&ei.push({instanceLocation:s,keyword:"maximum",keywordLocation:`${d}/maximum`,error:`${t} is greater than ${K}.`}),void 0!==J&&t<=J&&ei.push({instanceLocation:s,keyword:"exclusiveMinimum",keywordLocation:`${d}/exclusiveMinimum`,error:`${t} is less than ${J}.`}),void 0!==Z&&t>=Z&&ei.push({instanceLocation:s,keyword:"exclusiveMaximum",keywordLocation:`${d}/exclusiveMaximum`,error:`${t} is greater than or equal to ${Z}.`})),void 0!==Q){let e=t%Q;Math.abs(0-e)>=11920929e-14&&Math.abs(Q-e)>=11920929e-14&&ei.push({instanceLocation:s,keyword:"multipleOf",keywordLocation:`${d}/multipleOf`,error:`${t} is not a multiple of ${Q}.`})}}else if("string"===l){let e=void 0===X&&void 0===Y?0:function(e){let t,r=0,i=e.length,o=0;for(;o=55296&&t<=56319&&oY&&ei.push({instanceLocation:s,keyword:"maxLength",keywordLocation:`${d}/maxLength`,error:`String is too long (${e} > ${Y}).`}),void 0===ee||RegExp(ee,"u").test(t)||ei.push({instanceLocation:s,keyword:"pattern",keywordLocation:`${d}/pattern`,error:"String does not match pattern."}),void 0!==P&&WR[P]&&!WR[P](t)&&ei.push({instanceLocation:s,keyword:"format",keywordLocation:`${d}/format`,error:`String does not match format "${P}".`})}return{valid:0===ei.length,errors:ei}}(e,this.schema,this.draft,this.lookup,this.shortCircuit)}addSchema(e,t){t&&(e={...e,$id:t}),WS(e,this.lookup)}}let WA=w5.shape.oneOf.element.extend({"x-openai-thumbnail":kq.optional(),"x-openai-preview":kq.optional(),description:Ab().optional()}),WW=Vt.omit({items:!0}).shape,WM=w6.extend({pattern:Ab().optional(),"x-openai-suggestions":AQ(WA).optional()}),WN={"x-openai-input":AJ().optional()},Wz=w5.extend({...WN,oneOf:AQ(WA),anyOf:AJ().optional()}),WD=AY({...WW,...WN,uniqueItems:AH().optional(),items:WM.extend({enum:AJ().optional(),oneOf:AJ().optional(),anyOf:AJ().optional()})}),WF=[Wz,Vt.extend({...WN,items:AY({enum:AJ().optional(),anyOf:AQ(WA)})}),Ve.extend({...WN,items:Ve.shape.items.extend({anyOf:AJ().optional()})}),w8.extend({...WN,oneOf:AJ().optional(),anyOf:AJ().optional()}),WM.extend({...WN,enum:AJ().optional(),oneOf:AJ().optional(),anyOf:AJ().optional()}),w3.extend(WN),w4.extend(WN),WD],WL=AY({kind:We(["file","directory"]).optional(),accept:AQ(Ab()).optional()}),WU=AY({type:We(["resource","file"]).describe('"file" is deprecated. Use "resource" instead.'),options:AQ(k4),userOptions:WL.optional(),selection:We(["explicit","implicit"]).optional()}),WH=WM.extend({format:Wr("uri"),enum:AJ().optional(),oneOf:AJ().optional(),anyOf:AJ().optional()}),WG=A2([A6("type",[WH.extend({"x-openai-input":WU.extend({selection:AJ().optional()})}),AY({...WW,items:WH,"x-openai-input":WU})]).superRefine((e,t)=>{let r=e["x-openai-input"];null!=e.default&&("implicit"===r.selection&&t.addIssue({code:"custom",path:["default"],message:"Implicit selection cannot specify a default"}),(Array.isArray(e.default)?e.default:[e.default]).some(e=>!r.options.some(t=>t.uri===e))&&t.addIssue({code:"custom",path:["default"],message:"Defaults must name supplied resources"}))}),...WF]),WB=AY({$schema:Ab().optional(),type:Wr("object"),required:AQ(Ab()).optional(),properties:WZ(WG)}),WK=WZ(A2([Ab(),new AD({type:"number",checks:[],...TH(void 0)}),AH(),AQ(Ab())])),WJ=A6("action",[AY({action:Wr("accept"),content:WK}),AY({action:We(["cancel","decline"])})]);function WZ(e){var t,r;let i;return(t=(e=>A8(Ab(),AB()).safeParse(e).success)??(()=>!0),(i=TH(void 0)).abort??(i.abort=!0),new Wy({type:"custom",check:"custom",fn:t,...i})).transform(e=>Object.entries(e)).pipe(AQ((r=[Ab(),e.nonoptional()],new A9({type:"tuple",items:r,rest:null,...TH(void 0)})))).transform(e=>Object.fromEntries(e))}let WQ="openai/elicitation",WX=AY({"io.modelcontextprotocol/protocolVersion":Ab().optional(),"io.modelcontextprotocol/clientCapabilities":AB().optional()}),WY=AY({extensions:AY({[WQ]:AY({form:AY({})})})}),W1=Ab().regex(/\S/),W0="openai/mentions";AY({searchTool:W1});let W2=A6("type",[wV,A1({icons:AQ(kq).optional(),resourceUri:W1,subtitle:W1.optional(),title:W1,type:Wr("resource")})]),W4=AY({query:Ab()}),W6=A1({items:AQ(W2)}),W3="openai/settings";AY({readTool:W1,updateTool:W1});let W9=A6("kind",[A1({kind:Wr("property"),property:Ab()}),A1({kind:Wr("tool"),tool:W1,title:W1.optional(),description:Ab().optional()})]),W5=A1({kind:Wr("group"),title:W1,items:AQ(W9)}),W8=AY({title:W1,description:Ab().optional()}),W7=AY({schema:new AX({type:"object",shape:{type:Wr("object"),properties:A8(Ab(),AB()).optional(),required:AQ(Ab()).optional()},catchall:AB(),...TH(void 0)}),layout:AQ(W5).optional(),values:A8(Ab(),AB())}).superRefine(({schema:e,layout:t},r)=>{let i=new Set;for(let o of t??[])for(let t of o.items)"property"===t.kind&&((!Object.hasOwn(e.properties??{},t.property)||i.has(t.property))&&r.addIssue({code:"custom",path:["layout"],message:`Unknown or duplicate settings key: ${t.property}`}),i.add(t.property))});A1({set:A8(Ab(),AB()).refine(e=>Object.keys(e).length>0,"Set at least one setting.").meta({minProperties:1})});let Me=AY({values:A8(Ab(),AB())}),Mt=AY({type:We(["boolean","string","number","integer"]),enum:AQ(Ab()).nonempty().optional(),$ref:AJ().optional(),anyOf:AJ().optional(),oneOf:AJ().optional(),allOf:AJ().optional()}).refine(e=>void 0===e.enum||"string"===e.type);class Mr{elicitInputLegacy;elicitInput;mentions;settings;constructor(e){let t,r,i;this.elicitInputLegacy=async(t,r,i)=>{let o=WX.parse(t.mcpReq.envelope??{}),n=o["io.modelcontextprotocol/protocolVersion"]??e.server.getNegotiatedProtocolVersion();if(void 0!==n&&n>="2026-07-28")throw Error("Use requestFormInput for MCP 2026-07-28 or newer");if(!WY.safeParse(o["io.modelcontextprotocol/clientCapabilities"]??e.server.getClientCapabilities()).success)throw Error(`The MCP client does not support ${WQ} form requests`);let a=WB.parse(r.requestedSchema),s=await t.mcpReq.send({method:"openai/elicitation/create",params:{...r,requestedSchema:a}},WJ,i);if("accept"===s.action){let e;return{...s,content:(e=new WE(structuredClone(a),"2020-12",!1),WK.superRefine((t,r)=>{for(let i of e.validate(Object.setPrototypeOf({...t},null)).errors)"#/required"!==i.keywordLocation&&r.addIssue({code:"custom",path:i.instanceLocation.split("/").slice(1).map(e=>e.replace(/~1/g,"/").replace(/~0/g,"~")),message:i.error});for(let e of a.required??[])Object.hasOwn(t,e)||r.addIssue({code:"custom",path:[e],message:"Required field"});for(let[e,i]of Object.entries(a.properties))Object.hasOwn(t,e)&&null!=i["x-openai-input"]&&!function(e,t){let r=Array.isArray(t)?t:[t];return"implicit"===e.selection||null!=e.userOptions||r.every(t=>e.options.some(e=>e.uri===t))}(i["x-openai-input"],t[e])&&r.addIssue({code:"custom",path:[e],message:"Invalid file selection"})})).parse(s.content)}}return s},this.elicitInput=this.elicitInputLegacy,this.mentions=(t=null,r=!1,{setHandler:i=>{if(!r){if(e.server.transport)throw Error("Register mention search before connecting the server.");e.registerTool("search_mentions",{annotations:{readOnlyHint:!0},inputSchema:W4,outputSchema:W6,_meta:{"openai/extensions":{"mentions/search":{}},ui:{visibility:["app"]}}},async(e,r)=>({content:[],structuredContent:null==t?{items:[]}:await t(e,r)}));let i={searchTool:"search_mentions"};e.server.registerCapabilities({extensions:{[W0]:i},experimental:{[W0]:i}}),r=!0}t=i}}),this.settings=(i=Symbol.for("@openai/mcp-extensions/settings/registered"),{register(t){if(i in e)throw Error("Settings are already registered on this server.");if(e.server.transport)throw Error("Register settings before connecting the server.");let r=W1.parse(t.readTool??"settings.read"),o=W1.parse(t.updateTool??"settings.update");if(r===o)throw Error("Settings read and update tools must have different names.");let n=Object.fromEntries(Object.entries(t.fields).map(([e,t])=>[e,t.schema.meta({...t.schema.meta(),title:t.title,description:t.description})])),a=A1(n).required(),s=wC.shape.inputSchema.parse(function(e){if("_idmap"in e){let t=EC({processors:E5}),r={};for(let r of e._idmap.entries()){let[e,i]=r;ET(i,t)}let i={};for(let o of(t.external={registry:e,uri:void 0,defs:r},e._idmap.entries())){let[e,r]=o;EO(t,r),i[e]=EE(t,r)}return Object.keys(r).length>0&&(i.__shared={["draft-2020-12"===t.target?"$defs":"definitions"]:r}),{schemas:i}}let t=EC({processors:E5});return ET(e,t),EO(t,e),EE(t,e)}(a));for(let[e,t]of Object.entries(s.properties??{})){if(W8.parse(t),!Mt.safeParse(t).success)throw Error(`Unsupported native setting ${JSON.stringify(e)}: use a boolean, string, string enum, number, or integer field.`);if("object"==typeof t&&null!==t&&"default"in t)throw Error("Settings defaults must be returned by the read handler, not declared in the schema.")}let{layout:d}=W7.parse({schema:s,layout:t.layout,values:{}}),c=A1(n).partial().refine(e=>Object.keys(e).length>0,"Set at least one setting.").meta({minProperties:1}),l=e.registerTool(r,{inputSchema:A1({}),outputSchema:W7.safeExtend({values:a}),annotations:{readOnlyHint:!0}},async(e,r)=>({content:[],structuredContent:{schema:s,...void 0===d?{}:{layout:d},values:a.parse(await t.read(r))}}));try{e.registerTool(o,{inputSchema:A1({set:c}),outputSchema:Me.extend({values:a})},async({set:e},r)=>({content:[],structuredContent:{values:a.parse(await t.update(e,r))}}));let n={readTool:r,updateTool:o};e.server.registerCapabilities({extensions:{[W3]:n},experimental:{[W3]:n}}),Object.defineProperty(e,i,{value:!0})}catch(e){throw l.remove(),e}}})}}function Mi(e){switch(e.kind){case"projects":return"/";case"project":return`/projects/${encodeURIComponent(e.project_id)}`;case"search":return`/projects/${encodeURIComponent(e.project_id)}/search?q=${encodeURIComponent(e.query)}`;case"symbol":return`/projects/${encodeURIComponent(e.project_id)}/symbols/${encodeURIComponent(e.node_id)}`}}async function Mo(e){try{return await e()}catch(e){return{state:"failed",failure:CH(e)}}}async function Mn(e,t){let r=await Mo(async()=>{let r=await e.listProjects(t);return 0===r.length?{state:"empty",message:"No projects are registered in this TraceDecay profile. Run `tracedecay init` in a repository first."}:{state:"ready",data:r}});return{page:"projects",daemon:await e.daemonState(),projects:r}}async function Ma(e,t,r){let i=CH(r),o=null;try{o=await e.resolveProject(t)}catch{o=null}return{page:"failure",project:o,failure:i}}async function Ms(e,t,r,i){var o,n,a,s,d,c;let l,p,u=await e.resolveProject(t,i),m=Mc(u,await Md(()=>e.status(t,i))),[f,h,y,g]=await Promise.all([Mo(async()=>{var o,n;let a=await e.node(t,r,i);return"id"in(o=a)&&"string"==typeof o.id?{state:"ready",data:{node_id:(n=a).id,name:n.name,qualified_name:n.qualified_name,kind:n.kind,file:n.file,start_line:n.start_line,end_line:n.end_line,signature:n.signature??null,complexity:n.cyclomatic_complexity??null,unavailable_fields:n.unavailable_fields}}:{state:"failed",failure:{kind:"not_found",code:a.reason_code,message:a.message}}}),Mo(async()=>Mp(await e.callers(t,r,1,i),"callers")),Mo(async()=>{let o=m?.generation;if(null==o)throw new CD({kind:"unavailable",code:"generation_unknown",message:"The daemon has not reported a served code generation for this project yet, so callee reads cannot be scoped."});return Mp(await e.callees(t,r,o,1,i),"callees")}),Mo(async()=>{let o=await e.impact(t,r,3,i);if(!("nodes"in o))return{state:"failed",failure:{kind:"not_found",code:o.reason_code,message:o.message}};let n=o.nodes.map(Mu);return 0===n.length&&o.complete?{state:"empty",message:"No dependents reach this symbol within the traversed depth."}:{state:"ready",data:{nodes:n,complete:o.complete,max_depth:3}}})]),_=function(e,t,r){if("ready"!==e.state)return"failed"===e.state?{state:"failed",failure:e.failure}:{state:"empty",message:e.message};if("failed"===t.state&&"failed"===r.state)return{state:"failed",failure:t.failure};let i={...e.data,role:"focus",depth:0},o=[i],n=[],a=new Set([i.node_id]),s=(e,t)=>{for(let r of e)a.has(r.symbol.node_id)||(a.add(r.symbol.node_id),o.push({...r.symbol,role:t,depth:r.depth})),n.push("caller"===t?{from:r.symbol.node_id,to:i.node_id,edge_kind:r.edge_kind}:{from:i.node_id,to:r.symbol.node_id,edge_kind:r.edge_kind})};if("ready"===t.state&&s(t.data,"caller"),"ready"===r.state&&s(r.data,"callee"),1===o.length)return{state:"empty",message:"This symbol has no recorded callers or callees."};let d="ready"===t.state&&"ready"===r.state&&void 0!==t.generation&&void 0!==r.generation&&t.generation!==r.generation;return{state:"ready",data:{nodes:o,edges:n,max_depth:1,truncated:"failed"===t.state||"failed"===r.state||"ready"===t.state&&!0===t.truncated||"ready"===r.state&&!0===r.truncated||d}}}(f,h,y),v="ready"===f.state?(o=u,n=f.data,a=h,s=y,d=g,c=m,l=`${n.file}:${n.start_line??"?"}-${n.end_line??"?"}`,p=[`## ${n.kind} \`${n.qualified_name}\``,`- Project: ${o.label} (${o.project_id})`,`- Location: ${l}`,...null===n.signature?[]:[`- Signature: \`${n.signature}\``],`- Node id: \`${n.node_id}\``,"_Symbol and impact reads do not report a generation; their snapshot identity is unverified._",...Mf(a,"Callers",c?.generation??null),...Mf(s,"Callees",c?.generation??null),...Mm("Impact","ready"===d.state?{state:"ready",data:d.data.nodes}:d,e=>`depth ${e.depth}: ${e.name} (${e.file}:${e.line})`),..."ready"!==d.state||d.data.complete?[]:["_Impact traversal is partial: the daemon hit its traversal budget._"],"### Reported project status (separate read)",...null===c?["_Project status unavailable; provenance not verified._"]:[`- Repository: ${c.repository_id??"unknown"}`,`- Worktree: ${c.worktree_id??"unknown"} (${c.project_root})`,`- Ref: ${c.reference??"unknown"}${null===c.branch?"":` (branch ${c.branch})`}`,`- Commit: ${c.commit??"unknown"}`,`- Generation: ${c.generation??"unknown"}`,`- Freshness: ${c.freshness.state}${null===c.freshness.detail?"":` (${c.freshness.detail})`}`,`- Coverage: ${c.coverage.recall}${null===c.coverage.detail?"":` (${c.coverage.detail})`}`],`- Deep link: ${Mi({kind:"symbol",project_id:o.project_id,node_id:n.node_id})}`],{title:`${n.kind} ${n.qualified_name}`,markdown:p.join("\n"),structured:{project:o,symbol:n,callers:a,callees:s,impact:d,provenance:c}}):null;return{page:"symbol",project:u,symbol:f,callers:h,callees:y,impact:g,graph:_,provenance:m,evidence:v}}async function Md(e){try{return{ok:!0,value:await e()}}catch(e){return{ok:!1,failure:CH(e)}}}function Mc(e,t){if(!t.ok||!("code_index_freshness"in t.value.status))return null;let r=t.value.status,i=t.value.authority,o=r.code_index_freshness;if(!("worktree"in o))return null;let n=o.worktree,a=null===n.staleness_state||void 0===n.staleness_state?null:`worktree ${n.staleness_state}`,s=n.coverage,d="string"==typeof s?s:JSON.stringify(s);return{project_id:e.project_id,project_root:n.worktree_root,repository_id:n.repository_id??null,worktree_id:n.worktree_id??null,reference:n.source_reference??null,branch:r.current_branch??r.active_branch??null,commit:n.source_revision??null,generation:n.latest_generation_id??null,freshness:{state:function(e){switch(e){case"current":case"stale":case"warming":case"restoring":case"parked":case"unavailable":return e;default:return"unavailable"}}(o.status),detail:"reason"in o&&"string"==typeof o.reason?o.reason:a},coverage:{recall:"complete"===d?"full":"partial",detail:d},authority:{profile_root:i.profile_root,daemon_version:i.version,daemon_pid:i.pid}}}function Ml(e){var t;return{symbol:{node_id:(t=e.symbol).node_id,name:t.name,qualified_name:t.qualified_name,kind:t.kind,file:t.file,start_line:t.line,end_line:t.end_line,signature:t.signature??null},edge_kind:e.edge_kind,depth:e.depth??1,dispatch_via_trait:e.dispatch_via_trait}}function Mp(e,t){let r=e.items.map(Ml);if(0===r.length)return{state:"empty",message:`No ${t} recorded in the served graph.`};let i="truncated"in e&&e.truncated||null!==e.next_cursor&&void 0!==e.next_cursor||"number"==typeof e.total&&e.total>r.length;return{state:"ready",data:r,truncated:i,generation:e.generation}}function Mu(e){return{node_id:e.id,name:e.name,kind:e.kind,file:e.file,line:e.line,depth:e.depth}}function Mm(e,t,r){let i=[`### ${e}`];switch(t.state){case"ready":i.push(...t.data.map(e=>`- ${r(e)}`)),!0===t.truncated&&i.push("_First page only; more rows exist than shown._");break;case"empty":i.push(`_${t.message}_`);break;case"failed":i.push(`_Unavailable (${t.failure.kind}: ${t.failure.message})_`)}return i}function Mf(e,t,r){let i=Mm(t,e,e=>`${e.symbol.qualified_name} (${e.symbol.file}:${e.symbol.start_line??"?"}, ${e.edge_kind})`);return"ready"===e.state&&null!==r&&void 0!==e.generation&&e.generation!==r&&i.push(`_Served from generation ${e.generation}, which differs from the reported project generation ${r}._`),i}function Mh(e){switch(e.page){case"projects":return"ready"===e.projects.state?`Recent TraceDecay projects: ${e.projects.data.map(e=>`${e.label} (${e.project_id})`).join(", ")}`:"empty"===e.projects.state?e.projects.message:`TraceDecay projects unavailable (${e.projects.failure.kind}): ${e.projects.failure.message}`;case"search":if("ready"===e.results.state){let t=e.results.data.hits.map(e=>`- ${e.kind} ${e.qualified_name} (${e.file}) node_id=${e.node_id}`).join("\n"),r=e.results.data.undisplayable.length;return`Search "${e.query}" in ${e.project.label}${"partial"===e.results.data.recall?" (partial recall)":""}${r>0?` (${r} candidate(s) could not be displayed)`:""}: +${t}`}return"empty"===e.results.state?`Search "${e.query}" in ${e.project.label}: ${e.results.message}`:`Search "${e.query}" in ${e.project.label} failed (${e.results.failure.kind}): ${e.results.failure.message}`;case"symbol":return null===e.evidence?"failed"===e.symbol.state?`Symbol lookup failed (${e.symbol.failure.kind}): ${e.symbol.failure.message}`:"Symbol unavailable":e.evidence.markdown;case"failure":return`TraceDecay request failed (${e.failure.kind}): ${e.failure.message}`}}let My="ui://tracedecay/code-explorer",Mg={readOnlyHint:!0,destructiveHint:!1,openWorldHint:!1,idempotentHint:!0};function M_(e,t=[]){return{content:[{type:"text",text:Mh(e)},...t.map(e=>({type:"text",text:e}))],structuredContent:e}}async function Mv(e){let t=[];return M_(await Cz.run(t,e),t)}function Mb(e){let t=Array.isArray(e)?e[0]:e;if(void 0===t||0===t.length)throw Error("resource URI is missing a template variable");return decodeURIComponent(t)}let M$={name:"tracedecay-chatgpt-extension",title:"TraceDecay",version:"0.0.0"};async function MS(){let[e,t]=await Promise.all([x(new URL("./app.html",import.meta.url),"utf8"),x(new URL("../assets/icon.svg",import.meta.url),"utf8")]);return{html:e,iconSvg:t}}function Mk({bridge:e,assets:t}){let r=new uL({...M$,icons:[{src:`data:image/svg+xml,${encodeURIComponent(t.iconSvg)}`,mimeType:"image/svg+xml"}]});return!function({server:e,bridge:t,html:r}){let i=(e=[])=>({ui:{resourceUri:My},"openai/ui":{entrypoints:e},"openai/iconStyle":"monochrome"}),o=o7().min(1).describe("Registered TraceDecay project id");C9(e,"tracedecay_workspace",{title:"TraceDecay",description:"Open the TraceDecay code explorer: pick an authorized project, search code, inspect symbols and their graph.",inputSchema:nz({}),annotations:Mg,_meta:i([{type:"global"}])},async(e,r)=>M_(await Mn(t,r.mcpReq.signal))),C9(e,"tracedecay_thread_panel",{title:"TraceDecay",description:"Open the TraceDecay code explorer beside this conversation.",inputSchema:nz({}),annotations:Mg,_meta:i([{type:"thread"}])},async(e,r)=>M_(await Mn(t,r.mcpReq.signal))),C9(e,"tracedecay_list_projects",{title:"List TraceDecay projects",description:"List up to ten recent projects registered in the local TraceDecay profile.",inputSchema:nz({}),annotations:Mg,_meta:{ui:{visibility:["app"]}}},async(e,r)=>M_(await Mn(t,r.mcpReq.signal))),C9(e,"tracedecay_search_code",{title:"Search TraceDecay code",description:"Search symbols in a registered TraceDecay project. Returns node ids usable with tracedecay_inspect_symbol plus the served code generation and freshness.",inputSchema:nz({project_id:o,query:o7().describe("Symbol or free-text query")}),annotations:Mg,_meta:i()},async({project_id:e,query:r},i)=>Mv(async()=>{try{return await async function(e,t,r,i){let o=await e.resolveProject(t,i),[n,a]=await Promise.all([Md(()=>e.status(t,i)),Mo(async()=>0===r.trim().length?{state:"empty",message:"Enter a query to search this project."}:function(e){let t=e.coverage.recall;if("status"in e&&"unavailable"===e.status){var r;return{state:"failed",failure:{kind:"possibly_stale"===e.freshness.state?"stale":"unavailable",code:e.reason,message:(r=e.detail,(null==r?null:"parked"===r.kind?`${r.kind}: ${r.cause} (${r.remedy})`:"reset_required"===r.kind?`${r.kind}: ${r.reason} (${r.remedy})`:r.kind)??e.reason)}}}let i=[],o=[];for(let t of e.results){let e=function(e){let t=e.display;if(null===e.node_id||void 0===e.node_id||null==t)return null;let r=(e.lexical_routes??[]).map(e=>"object"==typeof e&&null!==e&&"lane"in e?String(e.lane):"lexical");return{node_id:e.node_id,name:t.name,qualified_name:t.qualified_name,kind:t.kind,file:t.path,start_line:null,end_line:null,signature:null,score:e.candidate.utility_micros/1e6,lanes:r}}(t);null===e?o.push(t.display_unavailable??"undisplayable"):i.push(e)}let n="next_cursor"in e?e.next_cursor:null;return 0===i.length&&0===o.length?{state:"empty",message:"partial"===t?"No results in the indexed portion of this project yet.":"No symbols match this query."}:{state:"ready",data:{hits:i,truncated:null!=n,undisplayable:o,recall:t},generation:"string"==typeof e.code_generation?e.code_generation:void 0}}(await e.search(t,r,20,i)))]);return{page:"search",project:o,query:r,results:a,provenance:Mc(o,n)}}(t,e,r,i.mcpReq.signal)}catch(r){return await Ma(t,e,r)}})),C9(e,"tracedecay_inspect_symbol",{title:"Inspect TraceDecay symbol",description:"Inspect one symbol by node id: definition, direct callers and callees, dependent impact, and separately reported project status. Relations carry their served generation; symbol and impact reads do not report snapshot identity.",inputSchema:nz({project_id:o,node_id:o7().min(1).describe("Symbol node id from a search result")}),annotations:Mg,_meta:i()},async({project_id:e,node_id:r},i)=>Mv(async()=>{try{return await Ms(t,e,r,i.mcpReq.signal)}catch(r){return await Ma(t,e,r)}})),new Mr(e).mentions.setHandler(async({query:e},r)=>{if(0===e.trim().length)return{items:[]};let i=(await t.listProjects(r.mcpReq.signal)).slice(0,4),o=await Promise.allSettled(i.map(async i=>(await t.symbolSearch(i.project_id,e,r.mcpReq.signal)).items.slice(0,8).map(e=>{var t,r;return{type:"resource_link",uri:(t=i.project_id,r=e.node_id,`tracedecay://projects/${encodeURIComponent(t)}/symbols/${encodeURIComponent(r)}`),name:e.qualified_name,title:`${e.kind} ${e.name}`,description:`${i.label} \xb7 ${e.file}:${e.line}`,mimeType:"text/markdown"}}))),n=[],a=[];if(o.forEach((e,t)=>{"fulfilled"===e.status?n.push(...e.value):a.push(`${i[t]?.label}: ${CH(e.reason).message}`)}),0===n.length&&a.length>0)throw Error(`symbol lookup failed for ${a.join("; ")}`);return{items:n}}),e.registerResource("tracedecay-symbol",new uU("tracedecay://projects/{project_id}/symbols/{node_id}",{list:void 0}),{title:"TraceDecay symbol evidence",mimeType:"text/markdown"},async(e,r,i)=>{let o=Mb(r.project_id),n=Mb(r.node_id),a=await Ms(t,o,n,i.mcpReq.signal);return{contents:[{uri:e.href,mimeType:"text/markdown",text:Mh(a),_meta:{"openai/deepLink":Mi({kind:"symbol",project_id:o,node_id:n})}}]}}),e.registerResource("tracedecay-code-explorer",My,{title:"TraceDecay code explorer",mimeType:"text/html;profile=mcp-app"},async()=>({contents:[{uri:My,mimeType:"text/html;profile=mcp-app",text:r,_meta:{"openai/ui":{preferredDisplayMode:"inline",availableDisplayModes:["inline","fullscreen"]},ui:{prefersBorder:!0,csp:{connectDomains:[],resourceDomains:[]}}}}]}))}({server:r,bridge:e,html:t.html}),r}function Mw(e,t){return new C0({binary:t??e.TRACEDECAY_BIN??"tracedecay",profileRoot:mb(e),env:e,cwd:process.cwd()})}async function MV(e,t,r,i){if("127.0.0.1"!==t&&"localhost"!==t&&"::1"!==t)throw Error(`--http must bind a loopback address, got ${t}`);if(0===i.length)throw Error("--http requires a bearer token");let o=r,n=T((r,n)=>{(async function(e,t,r,i,o,n){if("/mcp"!==new URL(t.url??"/",`http://${"::1"===i?"[::1]":i}:${o}`).pathname){r.writeHead(404,{"content-type":"application/json"}),r.end(JSON.stringify({error:"not_found"}));return}if(!function(e,t){if(void 0===e||!e.startsWith("Bearer "))return!1;let r=Buffer.from(e.slice(7),"utf8"),i=Buffer.from(t,"utf8");return r.length===i.length&&P(r,i)}(t.headers.authorization,n)){r.writeHead(401,{"content-type":"application/json"}),r.end(JSON.stringify({jsonrpc:"2.0",error:{code:-32001,message:"unauthorized: a Bearer token is required"},id:null}));return}if(![`${i}:${o}`,`localhost:${o}`,`127.0.0.1:${o}`,`[::1]:${o}`].includes(t.headers.host??"")){r.writeHead(403,{"content-type":"application/json"}),r.end(JSON.stringify({jsonrpc:"2.0",error:{code:-32e3,message:`Invalid Host header: ${t.headers.host??""}`},id:null}));return}let a=new mv({sessionIdGenerator:void 0,enableJsonResponse:!0}),s=e();r.on("close",()=>{a.close().finally(()=>s.close())}),await s.connect(a),await a.handleRequest(t,r)})(e,r,n,t,o,i).catch(e=>{n.headersSent||n.writeHead(500,{"content-type":"application/json"}),n.end(JSON.stringify({jsonrpc:"2.0",error:{code:-32603,message:String(e)},id:null}))})});await new Promise((e,i)=>{n.once("error",i),n.listen(r,t,()=>e())});let a=n.address();if("object"!=typeof a||null===a)throw Error("loopback HTTP server did not report a bound address");return o=a.port,{url:`http://${"::1"===t?"[::1]":t}:${o}/mcp`,close:()=>new Promise((e,t)=>{n.close(r=>void 0===r?e():t(r)),n.closeAllConnections()})}}(function(){let e=process.argv[1];if(void 0===e)return!1;try{return import.meta.url===A(R(e)).href}catch{return!1}})()&&(async function(){let{values:e}=W({options:{http:{type:"string"},binary:{type:"string"},token:{type:"string"}}}),t=Mw(process.env,e.binary),r=await MS(),i=()=>Mk({bridge:t,assets:r}),o=null,n=async()=>{await t.close(),null!==o&&await j(o,{force:!0})};if(process.once("SIGINT",()=>void n().finally(()=>process.exit(0))),process.once("SIGTERM",()=>void n().finally(()=>process.exit(0))),void 0!==e.http){var a;let t,[r,n]=-1===(t=(a=e.http).lastIndexOf(":"))?["127.0.0.1",a]:[a.slice(0,t),a.slice(t+1)],s=Number.parseInt(n,10);if(!Number.isInteger(s)||s<0||s>65535)throw Error(`invalid --http port: ${n}`);let d=e.token??V(24).toString("base64url"),c=await MV(i,r,s,d);if(process.stderr.write(`tracedecay-chatgpt-extension listening on ${c.url} `),void 0===e.token){let e=mb(process.env);o=E(e,`chatgpt-loopback-bearer-token-${new URL(c.url).port}`),await I(e,{recursive:!0}),await C(o,`${d} `,{mode:384}),await q(o,384),process.stderr.write(`MCP bearer token written to ${o} (send as Authorization: Bearer) `)}return}let s=i();s.server.onclose=()=>void n(),await s.connect(new u0)})().catch(e=>{process.stderr.write(`${e instanceof Error?e.stack??e.message:String(e)} -`),process.exit(1)});export{M2 as SERVER_INFO,M3 as bridgeFromEnvironment,M6 as createExtensionServer,M4 as loadAssets,M9 as serveLoopbackHttp}; \ No newline at end of file +`),process.exit(1)});export{M$ as SERVER_INFO,Mw as bridgeFromEnvironment,Mk as createExtensionServer,MS as loadAssets,MV as serveLoopbackHttp}; \ No newline at end of file